From 3d2d94cdb247fac61be9c40ddf6851fd9213d44e Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Tue, 29 Mar 2022 19:15:49 -0500 Subject: [PATCH 001/539] Initial version of a xml parser and linter using rapidxml --- xml_converter/.gdignore | 0 xml_converter/.gitignore | 6 + xml_converter/CMakeLists.txt | 24 +++ xml_converter/README.md | 3 + xml_converter/src/attribute/bool.cpp | 20 ++ xml_converter/src/attribute/bool.hpp | 10 + xml_converter/src/attribute/chirality.cpp | 13 ++ xml_converter/src/attribute/chirality.hpp | 15 ++ xml_converter/src/attribute/color.cpp | 12 ++ xml_converter/src/attribute/color.hpp | 14 ++ xml_converter/src/attribute/euler_angle.cpp | 26 +++ xml_converter/src/attribute/euler_angle.hpp | 17 ++ .../src/attribute/festival_filter.cpp | 13 ++ .../src/attribute/festival_filter.hpp | 27 +++ xml_converter/src/attribute/filter.cpp | 44 +++++ xml_converter/src/attribute/filter.hpp | 66 +++++++ xml_converter/src/attribute/float.cpp | 9 + xml_converter/src/attribute/float.hpp | 8 + xml_converter/src/attribute/int.cpp | 28 +++ xml_converter/src/attribute/int.hpp | 11 ++ .../src/attribute/map_type_filter.cpp | 9 + .../src/attribute/map_type_filter.hpp | 86 +++++++++ xml_converter/src/attribute/mount_filter.cpp | 9 + xml_converter/src/attribute/mount_filter.hpp | 26 +++ .../src/attribute/profession_filter.cpp | 13 ++ .../src/attribute/profession_filter.hpp | 27 +++ xml_converter/src/attribute/race_filter.cpp | 9 + xml_converter/src/attribute/race_filter.hpp | 20 ++ .../src/attribute/specialization_filter.cpp | 7 + .../src/attribute/specialization_filter.hpp | 82 ++++++++ xml_converter/src/attribute/string.cpp | 10 + xml_converter/src/attribute/string.hpp | 10 + xml_converter/src/category.cpp | 23 +++ xml_converter/src/category.hpp | 31 +++ xml_converter/src/icon.cpp | 16 ++ xml_converter/src/icon.hpp | 177 ++++++++++++++++++ xml_converter/src/parseable.cpp | 63 +++++++ xml_converter/src/parseable.hpp | 49 +++++ xml_converter/src/string_helper.cpp | 65 +++++++ xml_converter/src/string_helper.hpp | 13 ++ xml_converter/src/trail.cpp | 5 + xml_converter/src/trail.hpp | 102 ++++++++++ xml_converter/src/xml_converter.cpp | 151 +++++++++++++++ 43 files changed, 1369 insertions(+) create mode 100644 xml_converter/.gdignore create mode 100644 xml_converter/.gitignore create mode 100644 xml_converter/CMakeLists.txt create mode 100644 xml_converter/README.md create mode 100644 xml_converter/src/attribute/bool.cpp create mode 100644 xml_converter/src/attribute/bool.hpp create mode 100644 xml_converter/src/attribute/chirality.cpp create mode 100644 xml_converter/src/attribute/chirality.hpp create mode 100644 xml_converter/src/attribute/color.cpp create mode 100644 xml_converter/src/attribute/color.hpp create mode 100644 xml_converter/src/attribute/euler_angle.cpp create mode 100644 xml_converter/src/attribute/euler_angle.hpp create mode 100644 xml_converter/src/attribute/festival_filter.cpp create mode 100644 xml_converter/src/attribute/festival_filter.hpp create mode 100644 xml_converter/src/attribute/filter.cpp create mode 100644 xml_converter/src/attribute/filter.hpp create mode 100644 xml_converter/src/attribute/float.cpp create mode 100644 xml_converter/src/attribute/float.hpp create mode 100644 xml_converter/src/attribute/int.cpp create mode 100644 xml_converter/src/attribute/int.hpp create mode 100644 xml_converter/src/attribute/map_type_filter.cpp create mode 100644 xml_converter/src/attribute/map_type_filter.hpp create mode 100644 xml_converter/src/attribute/mount_filter.cpp create mode 100644 xml_converter/src/attribute/mount_filter.hpp create mode 100644 xml_converter/src/attribute/profession_filter.cpp create mode 100644 xml_converter/src/attribute/profession_filter.hpp create mode 100644 xml_converter/src/attribute/race_filter.cpp create mode 100644 xml_converter/src/attribute/race_filter.hpp create mode 100644 xml_converter/src/attribute/specialization_filter.cpp create mode 100644 xml_converter/src/attribute/specialization_filter.hpp create mode 100644 xml_converter/src/attribute/string.cpp create mode 100644 xml_converter/src/attribute/string.hpp create mode 100644 xml_converter/src/category.cpp create mode 100644 xml_converter/src/category.hpp create mode 100644 xml_converter/src/icon.cpp create mode 100644 xml_converter/src/icon.hpp create mode 100644 xml_converter/src/parseable.cpp create mode 100644 xml_converter/src/parseable.hpp create mode 100644 xml_converter/src/string_helper.cpp create mode 100644 xml_converter/src/string_helper.hpp create mode 100644 xml_converter/src/trail.cpp create mode 100644 xml_converter/src/trail.hpp create mode 100644 xml_converter/src/xml_converter.cpp diff --git a/xml_converter/.gdignore b/xml_converter/.gdignore new file mode 100644 index 00000000..e69de29b diff --git a/xml_converter/.gitignore b/xml_converter/.gitignore new file mode 100644 index 00000000..66ef237e --- /dev/null +++ b/xml_converter/.gitignore @@ -0,0 +1,6 @@ +packs/ +Makefile +CMakeFiles +CMakeCache.txt +cmake_install.cmake +compile_commands.json diff --git a/xml_converter/CMakeLists.txt b/xml_converter/CMakeLists.txt new file mode 100644 index 00000000..9d440f2c --- /dev/null +++ b/xml_converter/CMakeLists.txt @@ -0,0 +1,24 @@ +cmake_minimum_required (VERSION 3.16) +project (XMLConverter) + +# Name Output File +set(TARGET_NAME xml_converter) + +# Add Dependencies +file(GLOB_RECURSE SOURCES "src/*.cpp") + +# Set output as executable. +# TODO: This will eventually become a library when it gets integrated into burrito. +add_executable (${TARGET_NAME} ${SOURCES}) + +# Require C++ 17 or newer. +target_compile_features(${TARGET_NAME} PRIVATE cxx_std_17) + +# Enable Extra Warnings and Errors +if(MSVC) + target_compile_options(${TARGET_NAME} PRIVATE /W4 /WX) +else() + # TODO: We are ignoring some of the stronger warnings for now but in the future we should address them. + # target_compile_options(${TARGET_NAME} PRIVATE -Wall -Wextra -Wpedantic -Werror) + target_compile_options(${TARGET_NAME} PRIVATE -Wall) +endif() diff --git a/xml_converter/README.md b/xml_converter/README.md new file mode 100644 index 00000000..a5f1f897 --- /dev/null +++ b/xml_converter/README.md @@ -0,0 +1,3 @@ +The XML Converter Module is tasked with parsing XML marker files and loading them into Burrito. + +In the future it may also preform the revers action and be able to export XML files as well. diff --git a/xml_converter/src/attribute/bool.cpp b/xml_converter/src/attribute/bool.cpp new file mode 100644 index 00000000..0841cf38 --- /dev/null +++ b/xml_converter/src/attribute/bool.cpp @@ -0,0 +1,20 @@ +#include "../rapidxml-1.13/rapidxml.hpp" +#include +#include +#include +#include "bool.hpp" + +using namespace std; + +bool parse_bool(rapidxml::xml_attribute<>* input, vector *errors) { + if (string(input->value()) == "0" || string(input->value()) == "false"){ + return false; + } + else if (string(input->value()) == "1" || string(input->value()) == "true") { + return true; + } + else { + errors->push_back("Found a boolean value that was not a '1', '0', 'true', or 'false'"); + return false; + } +} diff --git a/xml_converter/src/attribute/bool.hpp b/xml_converter/src/attribute/bool.hpp new file mode 100644 index 00000000..da36a18a --- /dev/null +++ b/xml_converter/src/attribute/bool.hpp @@ -0,0 +1,10 @@ +#pragma once + +#include "../rapidxml-1.13/rapidxml.hpp" +#include +#include +#include + +using namespace std; + +bool parse_bool(rapidxml::xml_attribute<>* input, vector *errors); diff --git a/xml_converter/src/attribute/chirality.cpp b/xml_converter/src/attribute/chirality.cpp new file mode 100644 index 00000000..b910ea60 --- /dev/null +++ b/xml_converter/src/attribute/chirality.cpp @@ -0,0 +1,13 @@ +#include "../rapidxml-1.13/rapidxml.hpp" +#include +#include +#include "chirality.hpp" + + +using namespace std; + +Chirality parse_Chirality(rapidxml::xml_attribute<>* input, vector *errors) { + Chirality chirality; + chirality.chirality = string(input->value()); + return chirality; +} diff --git a/xml_converter/src/attribute/chirality.hpp b/xml_converter/src/attribute/chirality.hpp new file mode 100644 index 00000000..5444e67f --- /dev/null +++ b/xml_converter/src/attribute/chirality.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../rapidxml-1.13/rapidxml.hpp" +#include +#include + +using namespace std; + + +class Chirality { +public: + string chirality; +}; + +Chirality parse_Chirality(rapidxml::xml_attribute<>* input, vector *errors); diff --git a/xml_converter/src/attribute/color.cpp b/xml_converter/src/attribute/color.cpp new file mode 100644 index 00000000..1322ab7b --- /dev/null +++ b/xml_converter/src/attribute/color.cpp @@ -0,0 +1,12 @@ +#include "../rapidxml-1.13/rapidxml.hpp" +#include +#include +#include "color.hpp" + +using namespace std; + +Color parse_Color(rapidxml::xml_attribute<>* input, vector *errors) { + Color color; + color.hex = string(input->value()); + return color; +} diff --git a/xml_converter/src/attribute/color.hpp b/xml_converter/src/attribute/color.hpp new file mode 100644 index 00000000..a124c182 --- /dev/null +++ b/xml_converter/src/attribute/color.hpp @@ -0,0 +1,14 @@ +#pragma once + +#include "../rapidxml-1.13/rapidxml.hpp" +#include +#include + +using namespace std; + +class Color { +public: + string hex; +}; + +Color parse_Color(rapidxml::xml_attribute<>* input, vector *errors); diff --git a/xml_converter/src/attribute/euler_angle.cpp b/xml_converter/src/attribute/euler_angle.cpp new file mode 100644 index 00000000..59c19777 --- /dev/null +++ b/xml_converter/src/attribute/euler_angle.cpp @@ -0,0 +1,26 @@ +#include "../rapidxml-1.13/rapidxml.hpp" +#include +#include +#include "../string_helper.hpp" +#include "euler_angle.hpp" + + +using namespace std; + + +EulerAngle parse_EulerAngle(rapidxml::xml_attribute<>* input, vector *errors) { + + vector components = split(string(input->value()), ","); + + EulerAngle euler_angle; + if (components.size() == 3) { + euler_angle.x = stof(components[0].c_str()); + euler_angle.y = stof(components[1].c_str()); + euler_angle.z = stof(components[2].c_str()); + } + else { + errors->push_back("invlaid 'x,y,z' rotation " + string(input->value()) + " " + to_string(components.size())); + } + + return euler_angle; +} diff --git a/xml_converter/src/attribute/euler_angle.hpp b/xml_converter/src/attribute/euler_angle.hpp new file mode 100644 index 00000000..b6cc169d --- /dev/null +++ b/xml_converter/src/attribute/euler_angle.hpp @@ -0,0 +1,17 @@ +#pragma once + +#include "../rapidxml-1.13/rapidxml.hpp" +#include +#include + +using namespace std; + + +class EulerAngle { +public: + float x; + float y; + float z; +}; + +EulerAngle parse_EulerAngle(rapidxml::xml_attribute<>* input, vector *errors); diff --git a/xml_converter/src/attribute/festival_filter.cpp b/xml_converter/src/attribute/festival_filter.cpp new file mode 100644 index 00000000..6bc68206 --- /dev/null +++ b/xml_converter/src/attribute/festival_filter.cpp @@ -0,0 +1,13 @@ +#include "../rapidxml-1.13/rapidxml.hpp" +#include "../string_helper.hpp" +#include +#include +#include "festival_filter.hpp" + +using namespace std; + +FestivalFilter parse_FestivalFilter(rapidxml::xml_attribute<>* input, vector *errors) { + FestivalFilter festival_filter; + festival_filter.parse(input, errors); + return festival_filter; +} diff --git a/xml_converter/src/attribute/festival_filter.hpp b/xml_converter/src/attribute/festival_filter.hpp new file mode 100644 index 00000000..a608ecb0 --- /dev/null +++ b/xml_converter/src/attribute/festival_filter.hpp @@ -0,0 +1,27 @@ +#pragma once + +#include "../rapidxml-1.13/rapidxml.hpp" +#include "../string_helper.hpp" +#include +#include +#include + +#include "filter.hpp" + +using namespace std; + + +class FestivalFilter: public Filter { +public: + FILTER_ITEM(dragonbash, "dragonbash") + FILTER_ITEM(festival_of_the_four_winds, "festival_of_the_four_winds") + FILTER_ITEM(haloween, "haloween") + FILTER_ITEM(lunar_new_year, "lunar_new_year") + FILTER_ITEM(super_adventure_festival, "super_adventure_festival") + FILTER_ITEM(wintersday, "wintersday") + FILTER_ITEM(none, "none") + + virtual string classname() { return "FestivalFilter"; } +}; + +FestivalFilter parse_FestivalFilter(rapidxml::xml_attribute<>* input, vector *errors); diff --git a/xml_converter/src/attribute/filter.cpp b/xml_converter/src/attribute/filter.cpp new file mode 100644 index 00000000..f8fd45f0 --- /dev/null +++ b/xml_converter/src/attribute/filter.cpp @@ -0,0 +1,44 @@ +#include "../rapidxml-1.13/rapidxml.hpp" +#include "../string_helper.hpp" +#include +#include +#include "filter.hpp" + +using namespace std; + +bool Filter::setup_variable(void (*function)(bool*), bool* flag, vector names) { + for (auto name : names) { + if (this->variable_list.count(name)) { + throw; + } + this->variable_list[name] = {function, flag}; + } + + return false; +} + +//////////////////////////////////////////////////////////////////////////////// +// Filter::parse +// +// Runs through all of the items that are defined with FILTER_ITEM() to be used +// as valid elemetns of this filter, and parses them out into their individual +// boolean values. This function should be called by the respective subclass +// parse functions to handle the extraction automatically. +//////////////////////////////////////////////////////////////////////////////// +void Filter::parse(rapidxml::xml_attribute<>* input, vector *errors) { + vector items = split(string(input->value()), ","); + + for (string item : items) { + auto iterator = this->variable_list.find(item); + + if (iterator == this->variable_list.end()) { + errors->push_back("Unknown " + this->classname() + " option " + item); + continue; + } + + RemoteCall function_call = iterator->second; + + function_call.function(function_call.object); + } + +} diff --git a/xml_converter/src/attribute/filter.hpp b/xml_converter/src/attribute/filter.hpp new file mode 100644 index 00000000..d976599b --- /dev/null +++ b/xml_converter/src/attribute/filter.hpp @@ -0,0 +1,66 @@ +#pragma once + +#include "../rapidxml-1.13/rapidxml.hpp" +#include "../string_helper.hpp" +#include +#include +#include + +using namespace std; + + +//////////////////////////////////////////////////////////////////////////////// +// FILTER_ITEM +// +// The FILTER_ITEM macro takes a name of a flag variable and a series of values +// for what strings should trigger that flag. It useese setup_variable to +// construct a list of all the flags that can be set for a given class on +// runtime. +// +// TODO: Because everything in `Filter` is a bool, unlike how `Parseable` works +// we might not even need to store a function pointer and instead +// Filter.variable_list could be a map and we use one generic +// function to set all the flags. +//////////////////////////////////////////////////////////////////////////////// +#define FILTER_ITEM(name, ...) \ + static void assign_##name(bool* obj) { \ + *obj = true; \ + } \ + bool name = setup_variable(assign_##name, &name, { __VA_ARGS__ }); + + + +//////////////////////////////////////////////////////////////////////////////// +// RemoteCall +// +// RemoteCall is a struct used to store the information needed to set flags +// while we are parsing the input. +// +// TODO: Because everything in `Filter` is a bool, unlike how `Parseable` works +// we might not even need to store a function pointer and instead +// Filter.variable_list could be a map and we use one generic +// function to set all the flags. +//////////////////////////////////////////////////////////////////////////////// +struct RemoteCall { + void (*function)(bool*); + bool* object; +}; + + +//////////////////////////////////////////////////////////////////////////////// +// Filter +// +// Filter is ment to be a base class for various attributes where one or more +// options can be selected. Typically these function as filters for whatever +// element they are associated with. For example a marker or path may be hidden +// or shown base on what class a user it when the path is relevent to only +// one class. +//////////////////////////////////////////////////////////////////////////////// +class Filter { +public: + map variable_list; + bool setup_variable(void (*function)(bool*), bool*, vector names); + void parse(rapidxml::xml_attribute<>* input, vector *errors); + virtual string classname() { return "Filter"; } +}; + diff --git a/xml_converter/src/attribute/float.cpp b/xml_converter/src/attribute/float.cpp new file mode 100644 index 00000000..46e010c9 --- /dev/null +++ b/xml_converter/src/attribute/float.cpp @@ -0,0 +1,9 @@ +#include "../rapidxml-1.13/rapidxml.hpp" +#include +#include +#include "float.hpp" + + +float parse_float(rapidxml::xml_attribute<>* input, std::vector *errors) { + return std::stof(input->value()); +} diff --git a/xml_converter/src/attribute/float.hpp b/xml_converter/src/attribute/float.hpp new file mode 100644 index 00000000..53047f61 --- /dev/null +++ b/xml_converter/src/attribute/float.hpp @@ -0,0 +1,8 @@ +#pragma once + +#include "../rapidxml-1.13/rapidxml.hpp" +#include +#include + + +float parse_float(rapidxml::xml_attribute<>* input, std::vector *errors); diff --git a/xml_converter/src/attribute/int.cpp b/xml_converter/src/attribute/int.cpp new file mode 100644 index 00000000..c0c23f06 --- /dev/null +++ b/xml_converter/src/attribute/int.cpp @@ -0,0 +1,28 @@ +#include "../rapidxml-1.13/rapidxml.hpp" +#include +#include +#include +#include "int.hpp" + +using namespace std; + +int parse_int(rapidxml::xml_attribute<>* input, vector *errors) { + + try { + return stoi(input->value()); + } + catch(std::invalid_argument const& exception) { + errors->push_back("Invalid integer value '" + string(input->value()) + "'"); + return 0; + } + // catch(std::out_of_range const& exception) { + // std::cout << "std::out_of_range::what(): " << ex.what() << '\n'; + // const long long ll {std::stoll(s, &pos)}; + // std::cout << "std::stoll('" << s << "'): " << ll << "; pos: " << pos << '\n'; + // } +} + + +int init_int_attribute() { + return 0; +} \ No newline at end of file diff --git a/xml_converter/src/attribute/int.hpp b/xml_converter/src/attribute/int.hpp new file mode 100644 index 00000000..6c092ec1 --- /dev/null +++ b/xml_converter/src/attribute/int.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "../rapidxml-1.13/rapidxml.hpp" +#include +#include + +using namespace std; + +int parse_int(rapidxml::xml_attribute<>* input, vector *errors); + +int init_int_attribute(); \ No newline at end of file diff --git a/xml_converter/src/attribute/map_type_filter.cpp b/xml_converter/src/attribute/map_type_filter.cpp new file mode 100644 index 00000000..89c43247 --- /dev/null +++ b/xml_converter/src/attribute/map_type_filter.cpp @@ -0,0 +1,9 @@ +#include "map_type_filter.hpp" + +using namespace std; + +MapTypeFilter parse_MapTypeFilter(rapidxml::xml_attribute<>* input, vector *errors) { + MapTypeFilter filter; + filter.parse(input, errors); + return filter; +} \ No newline at end of file diff --git a/xml_converter/src/attribute/map_type_filter.hpp b/xml_converter/src/attribute/map_type_filter.hpp new file mode 100644 index 00000000..e252f645 --- /dev/null +++ b/xml_converter/src/attribute/map_type_filter.hpp @@ -0,0 +1,86 @@ +#pragma once + +#include "../rapidxml-1.13/rapidxml.hpp" +#include "filter.hpp" + + +using namespace std; + +class MapTypeFilter: public Filter { +public: + // An unknown map type. Used as fallback. + FILTER_ITEM(unknown_map, "unknown") + + // Redirect map type, e.g. when logging in while in a PvP match. + FILTER_ITEM(redirect_map, "redirect") + + // Character create map type. + FILTER_ITEM(character_create_map, "charactercreate") + + // PvP map type. + FILTER_ITEM(pvp_map, "pvp") + + // GvG map type. Unused. + FILTER_ITEM(gvg_map, "gvg") + + // Instance map type, e.g. dungeons and story content. + FILTER_ITEM(instance_map, "instance") + + // Public map type, e.g. open world. + FILTER_ITEM(public_map, "public") + + // Tournament map type. Probably unused. + FILTER_ITEM(tournament_map, "tournament") + + // Tutorial map type. + FILTER_ITEM(tutorial_map, "tutorial") + + // User tournament map type. Probably unused. + FILTER_ITEM(user_tournament_map, "usertournament") + + // Eternal Battlegrounds (WvW) map type. + FILTER_ITEM(center_map, "center") + + // Eternal Battlegrounds (WvW) map type. + FILTER_ITEM(eternal_battlegrounds_map, "eternalbattlegrounds") + + // Blue Borderlands (WvW) map type. + FILTER_ITEM(bluehome_map, "bluehome") + + // Blue Borderlands (WvW) map type. + FILTER_ITEM(blue_borderlands_map, "blueborderlands") + + // Green Borderlands (WvW) map type. + FILTER_ITEM(green_home_map, "greenhome") + + // Green Borderlands (WvW) map type. + FILTER_ITEM(green_borderlands_map, "greenborderlands") + + // Red Borderlands (WvW) map type. + FILTER_ITEM(red_home_map, "redhome") + + // Red Borderlands (WvW) map type. + FILTER_ITEM(red_borderlands_map, "redborderlands") + + // Fortune's Vale. Unused. + FILTER_ITEM(fortunes_vale_map, "fortunesvale") + + // Obsidian Sanctum (WvW) map type. + FILTER_ITEM(jump_puzzle_map, "jumppuzzle") + + // Obsidian Sanctum (WvW) map type. + FILTER_ITEM(obsidian_sanctum_map, "obsidiansanctum") + + // Edge of the Mists (WvW) map type. + FILTER_ITEM(edge_of_the_mists_map, "edgeofthemists") + + // Mini public map type, e.g. Dry Top, the Silverwastes and Mistlock Sanctuary. + FILTER_ITEM(public_mini_map, "publicmini") + + // WvW lounge map type, e.g. Armistice Bastion. + FILTER_ITEM(wvw_lounge_map, "wvwlounge") + + virtual string classname() { return "MapTypeFilter"; } +}; + +MapTypeFilter parse_MapTypeFilter(rapidxml::xml_attribute<>* input, vector *errors); diff --git a/xml_converter/src/attribute/mount_filter.cpp b/xml_converter/src/attribute/mount_filter.cpp new file mode 100644 index 00000000..abae9b8c --- /dev/null +++ b/xml_converter/src/attribute/mount_filter.cpp @@ -0,0 +1,9 @@ +#include "mount_filter.hpp" + +using namespace std; + +MountFilter parse_MountFilter(rapidxml::xml_attribute<>* input, vector *errors) { + MountFilter filter; + filter.parse(input, errors); + return filter; +} \ No newline at end of file diff --git a/xml_converter/src/attribute/mount_filter.hpp b/xml_converter/src/attribute/mount_filter.hpp new file mode 100644 index 00000000..2b6d5043 --- /dev/null +++ b/xml_converter/src/attribute/mount_filter.hpp @@ -0,0 +1,26 @@ +#pragma once + +#include "../rapidxml-1.13/rapidxml.hpp" +#include "filter.hpp" + + +using namespace std; + +class MountFilter: public Filter { +public: + FILTER_ITEM(jackal, "jackal") + FILTER_ITEM(griffon, "griffon") + FILTER_ITEM(springer, "springer") + FILTER_ITEM(skimmer, "skimmer") + FILTER_ITEM(raptor, "raptor") + FILTER_ITEM(rollerbeetle, "rollerbeetle") + FILTER_ITEM(warclaw, "warclaw") + FILTER_ITEM(skyscale, "skyscale") + FILTER_ITEM(skiff, "skiff") + FILTER_ITEM(seige_turtle, "seigeturtle") + + + virtual string classname() { return "MountFilter"; } +}; + +MountFilter parse_MountFilter(rapidxml::xml_attribute<>* input, vector *errors); diff --git a/xml_converter/src/attribute/profession_filter.cpp b/xml_converter/src/attribute/profession_filter.cpp new file mode 100644 index 00000000..9a786242 --- /dev/null +++ b/xml_converter/src/attribute/profession_filter.cpp @@ -0,0 +1,13 @@ +#include "../rapidxml-1.13/rapidxml.hpp" +#include "../string_helper.hpp" +#include +#include +#include "profession_filter.hpp" + +using namespace std; + +ProfessionFilter parse_ProfessionFilter(rapidxml::xml_attribute<>* input, vector *errors) { + ProfessionFilter profession_filter; + profession_filter.parse(input, errors); + return profession_filter; +} \ No newline at end of file diff --git a/xml_converter/src/attribute/profession_filter.hpp b/xml_converter/src/attribute/profession_filter.hpp new file mode 100644 index 00000000..671d7ded --- /dev/null +++ b/xml_converter/src/attribute/profession_filter.hpp @@ -0,0 +1,27 @@ +#pragma once + +#include "../rapidxml-1.13/rapidxml.hpp" +#include "../string_helper.hpp" +#include +#include +#include "filter.hpp" + + +using namespace std; + +class ProfessionFilter: public Filter { +public: + FILTER_ITEM(elementalist, "elementalist") + FILTER_ITEM(engineer, "engineer") + FILTER_ITEM(guardian, "guardian") + FILTER_ITEM(mesmer, "mesmer") + FILTER_ITEM(necromancer, "necromancer") + FILTER_ITEM(ranger, "ranger") + FILTER_ITEM(revenant, "revenant") + FILTER_ITEM(thief, "thief") + FILTER_ITEM(warrior, "warrior") + + virtual string classname() { return "ProfessionFilter"; } +}; + +ProfessionFilter parse_ProfessionFilter(rapidxml::xml_attribute<>* input, vector *errors); diff --git a/xml_converter/src/attribute/race_filter.cpp b/xml_converter/src/attribute/race_filter.cpp new file mode 100644 index 00000000..6aba1290 --- /dev/null +++ b/xml_converter/src/attribute/race_filter.cpp @@ -0,0 +1,9 @@ +#include "race_filter.hpp" + +using namespace std; + +RaceFilter parse_RaceFilter(rapidxml::xml_attribute<>* input, vector *errors) { + RaceFilter filter; + filter.parse(input, errors); + return filter; +} \ No newline at end of file diff --git a/xml_converter/src/attribute/race_filter.hpp b/xml_converter/src/attribute/race_filter.hpp new file mode 100644 index 00000000..50913bb0 --- /dev/null +++ b/xml_converter/src/attribute/race_filter.hpp @@ -0,0 +1,20 @@ +#pragma once + +#include "../rapidxml-1.13/rapidxml.hpp" +#include "filter.hpp" + + +using namespace std; + +class RaceFilter: public Filter { +public: + FILTER_ITEM(asura, "asura") + FILTER_ITEM(charr, "charr") + FILTER_ITEM(human, "human") + FILTER_ITEM(norn, "norn") + FILTER_ITEM(sylvari, "sylvari") + + virtual string classname() { return "RaceFilter"; } +}; + +RaceFilter parse_RaceFilter(rapidxml::xml_attribute<>* input, vector *errors); diff --git a/xml_converter/src/attribute/specialization_filter.cpp b/xml_converter/src/attribute/specialization_filter.cpp new file mode 100644 index 00000000..faf6001e --- /dev/null +++ b/xml_converter/src/attribute/specialization_filter.cpp @@ -0,0 +1,7 @@ +#include "specialization_filter.hpp" + +SpecializationFilter parse_SpecializationFilter(rapidxml::xml_attribute<>* input, vector *errors) { + SpecializationFilter specialization_filter; + specialization_filter.parse(input, errors); + return specialization_filter; +} \ No newline at end of file diff --git a/xml_converter/src/attribute/specialization_filter.hpp b/xml_converter/src/attribute/specialization_filter.hpp new file mode 100644 index 00000000..25a8562d --- /dev/null +++ b/xml_converter/src/attribute/specialization_filter.hpp @@ -0,0 +1,82 @@ +#pragma once + +#include "filter.hpp" + +class SpecializationFilter: public Filter { + // Heart of Thorns Spec + FILTER_ITEM(ranger_druid, "5") + FILTER_ITEM(thief_daredevil, "7") + FILTER_ITEM(warrior_berserker, "18") + FILTER_ITEM(guardian_dragonhunter, "27") + FILTER_ITEM(necromancer_reaper, "34") + FILTER_ITEM(mesmer_chronomancer, "40") + FILTER_ITEM(engineer_scrapper, "43") + FILTER_ITEM(elementalist_tempest, "48") + FILTER_ITEM(revenant_herald, "52") + + // Path of Fire Spec + FILTER_ITEM(ranger_soulbeast, "55") + FILTER_ITEM(elementalist_weaver, "56") + FILTER_ITEM(engineer_holosmith, "57") + FILTER_ITEM(thief_deadeye, "58") + FILTER_ITEM(mesmer_mirage, "59") + FILTER_ITEM(necromancer_scourge, "60") + FILTER_ITEM(warrior_spellbreaker, "61") + FILTER_ITEM(guardian_firebrand, "62") + FILTER_ITEM(revenant_renegade, "63") + + // TODO: End of Dragons Spec + + // Core Spec + FILTER_ITEM(mesmer_dueling, "1") + FILTER_ITEM(necromancer_death_magic, "2") + FILTER_ITEM(revenant_invocation, "3") + FILTER_ITEM(warrior_strength, "4") + FILTER_ITEM(engineer_explosives, "6") + FILTER_ITEM(ranger_marksmanship, "8") + FILTER_ITEM(revenant_retribution, "9") + FILTER_ITEM(mesmer_domination, "10") + FILTER_ITEM(warrior_tactics, "11") + FILTER_ITEM(revenant_salvation, "12") + FILTER_ITEM(guardian_valor, "13") + FILTER_ITEM(revenant_corruption, "14") + FILTER_ITEM(revenant_devastation, "15") + FILTER_ITEM(guardian_radiance, "16") + FILTER_ITEM(elementalist_water, "17") + FILTER_ITEM(necromancer_blood_magic, "19") + FILTER_ITEM(thief_shadow_arts, "20") + FILTER_ITEM(engineer_tools, "21") + FILTER_ITEM(warrior_defense, "22") + FILTER_ITEM(mesmer_inspiration, "23") + FILTER_ITEM(mesmer_illusions, "24") + FILTER_ITEM(ranger_nature_magic, "25") + FILTER_ITEM(elementalist_earth, "26") + FILTER_ITEM(thief_deadly_arts, "28") + FILTER_ITEM(engineer_alchemy, "29") + FILTER_ITEM(ranger_skirmishing, "30") + FILTER_ITEM(elementalist_fire, "31") + FILTER_ITEM(ranger_beastmastery, "32") + FILTER_ITEM(ranger_wilderness_survival, "33") + FILTER_ITEM(thief_critical_strikes, "35") + FILTER_ITEM(warrior_arms, "36") + FILTER_ITEM(elementalist_arcane, "37") + FILTER_ITEM(engineer_firearms, "38") + FILTER_ITEM(necromancer_curses, "39") + FILTER_ITEM(elementalist_air, "41") + FILTER_ITEM(guardian_zeal, "42") + FILTER_ITEM(thief_trickery, "44") + FILTER_ITEM(mesmer_chaos, "45") + FILTER_ITEM(guardian_virtues, "46") + FILTER_ITEM(engineer_inventions, "47") + FILTER_ITEM(guardian_honor, "49") + FILTER_ITEM(necromancer_soul_reaping, "50") + FILTER_ITEM(warrior_discipline, "51") + FILTER_ITEM(necromancer_spite, "53") + FILTER_ITEM(thief_acrobatics, "54") + + virtual string classname() { return "SpecializationFilter"; } + +}; + + +SpecializationFilter parse_SpecializationFilter(rapidxml::xml_attribute<>* input, vector *errors); \ No newline at end of file diff --git a/xml_converter/src/attribute/string.cpp b/xml_converter/src/attribute/string.cpp new file mode 100644 index 00000000..39a18e0c --- /dev/null +++ b/xml_converter/src/attribute/string.cpp @@ -0,0 +1,10 @@ +#include "../rapidxml-1.13/rapidxml.hpp" +#include +#include +#include "string.hpp" + +using namespace std; + +string parse_string(rapidxml::xml_attribute<>* input, vector *errors) { + return string(input->value()); +} diff --git a/xml_converter/src/attribute/string.hpp b/xml_converter/src/attribute/string.hpp new file mode 100644 index 00000000..d47ade05 --- /dev/null +++ b/xml_converter/src/attribute/string.hpp @@ -0,0 +1,10 @@ +#pragma once + +#include "../rapidxml-1.13/rapidxml.hpp" +#include +#include + +using namespace std; + +string parse_string(rapidxml::xml_attribute<>* input, vector *errors); + diff --git a/xml_converter/src/category.cpp b/xml_converter/src/category.cpp new file mode 100644 index 00000000..bd3f2352 --- /dev/null +++ b/xml_converter/src/category.cpp @@ -0,0 +1,23 @@ +#include "category.hpp" +#include "attribute/string.hpp" +#include "attribute/bool.hpp" + +using namespace std; + + +string Cateogry::classname() { + return "MarkerCategory"; +} + +void Cateogry::init_from_xml(rapidxml::xml_node<>* node, vector *errors) { + for (rapidxml::xml_attribute<>* attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()){ + if (init_xml_attribute(attribute, errors)) {} + else { + errors->push_back("Unknown " + this->classname() + " attribute " + string(attribute->name())); + } + } +} + +bool Cateogry::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors) { + return false; +} \ No newline at end of file diff --git a/xml_converter/src/category.hpp b/xml_converter/src/category.hpp new file mode 100644 index 00000000..0141d5ec --- /dev/null +++ b/xml_converter/src/category.hpp @@ -0,0 +1,31 @@ +#include "rapidxml-1.13/rapidxml.hpp" + +#include +#include +#include "icon.hpp" +#include "trail.hpp" +using namespace std; + +class Cateogry { +public: + // https://blishhud.com/docs/markers/attributes/defaulttoggle + bool default_toggle; + + // https://blishhud.com/docs/markers/attributes/displayname + string display_name; + + // https://blishhud.com/docs/markers/attributes/isseparator + bool is_seperator; + + + + vector children; + Icon default_icon; + Trail default_trail; + + + virtual string classname(); + void init_from_xml(rapidxml::xml_node<>* node, vector *errors); + virtual bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors); +}; + diff --git a/xml_converter/src/icon.cpp b/xml_converter/src/icon.cpp new file mode 100644 index 00000000..54c1eabd --- /dev/null +++ b/xml_converter/src/icon.cpp @@ -0,0 +1,16 @@ +#include "attribute/string.hpp" +#include "attribute/float.hpp" +#include "attribute/int.hpp" +#include "attribute/bool.hpp" + +#include "rapidxml-1.13/rapidxml.hpp" + +#include "icon.hpp" + +#include +#include +using namespace std; + +string Icon::classname() { + return "POI"; +} diff --git a/xml_converter/src/icon.hpp b/xml_converter/src/icon.hpp new file mode 100644 index 00000000..25a6970c --- /dev/null +++ b/xml_converter/src/icon.hpp @@ -0,0 +1,177 @@ +#pragma once +#include "rapidxml-1.13/rapidxml.hpp" +#include "rapidxml-1.13/rapidxml_print.hpp" + +#include "parseable.hpp" + +#include "attribute/chirality.hpp" +#include "attribute/color.hpp" +#include "attribute/euler_angle.hpp" +#include "attribute/festival_filter.hpp" +#include "attribute/int.hpp" +#include "attribute/profession_filter.hpp" +#include "attribute/float.hpp" +#include "attribute/bool.hpp" +#include "attribute/string.hpp" +#include "attribute/specialization_filter.hpp" +#include "attribute/race_filter.hpp" +#include "attribute/map_type_filter.hpp" +#include "attribute/mount_filter.hpp" + +#include "string_helper.hpp" + +#include +#include +using namespace std; + + +class Icon: public Parseable { +private: + // https://blishhud.com/docs/markers/attributes/achievement + PARSEABLE_VAR(achievement_id, int, "AchievementId") + PARSEABLE_VAR(achievement_bit, int, "AchievementBit") + + // https://blishhud.com/docs/markers/attributes/alpha + PARSEABLE_VAR(alpha, float, "Alpha") + + // https://blishhud.com/docs/markers/attributes/autotrigger + PARSEABLE_VAR(auto_trigger, bool, "AutoTrigger") + + // https://blishhud.com/docs/markers/attributes/behavior + PARSEABLE_VAR(behavior, int, "Behavior") + + // https://blishhud.com/docs/markers/attributes/bounce + PARSEABLE_VAR(bounce_height, float, "BounceHeight") + PARSEABLE_VAR(bounce_duration, float, "BounceDuration") + PARSEABLE_VAR(bounce_delay, float, "BounceDelay") + + // https://blishhud.com/docs/markers/attributes/canfade + PARSEABLE_VAR(can_fade, bool, "CanFade") + + // https://blishhud.com/docs/markers/attributes/color + PARSEABLE_VAR(color, Color, "Color") + + // https://blishhud.com/docs/markers/attributes/copy + PARSEABLE_VAR(copy, string, "Copy") + PARSEABLE_VAR(copy_message, string, "CopyMessage") + + // https://blishhud.com/docs/markers/attributes/cull + PARSEABLE_VAR(cull, Chirality, "Cull") + + // https://blishhud.com/docs/markers/attributes/fade + PARSEABLE_VAR(fade_near, float, "FadeNear") + PARSEABLE_VAR(fade_far, float, "FadeFar") + + // https://blishhud.com/docs/markers/attributes/festival + PARSEABLE_VAR(festival_filter, FestivalFilter, "Festival") + + // https://blishhud.com/docs/markers/attributes/guid + PARSEABLE_VAR(guid, string, "GUID") + + // https://blishhud.com/docs/markers/attributes/heightoffset + PARSEABLE_VAR(height_offset, float, "HeightOffset") + + // https://blishhud.com/docs/markers/attributes/iconfile + PARSEABLE_VAR(icon_file, string, "IconFile") + + // https://blishhud.com/docs/markers/attributes/iconsize + PARSEABLE_VAR(icon_size, float, "IconSize") + + // https://blishhud.com/docs/markers/attributes/info + PARSEABLE_VAR(info, string, "Info") + PARSEABLE_VAR(info_range, float, "InfoRange") + + // https://blishhud.com/docs/markers/attributes/invertbehavior + PARSEABLE_VAR(invert_behavior, bool, "InvertBehavior") + + // https://blishhud.com/docs/markers/attributes/mapdisplaysize + PARSEABLE_VAR(map_display_size, float, "MapDisplaySize") + + // https://blishhud.com/docs/markers/attributes/mapid + PARSEABLE_VAR(map_id, int, "MapId") + + // https://blishhud.com/docs/markers/attributes/maptype + PARSEABLE_VAR(map_type_filter, MapTypeFilter, "MapType") + + // https://blishhud.com/docs/markers/attributes/mount + PARSEABLE_VAR(mount_filter, MountFilter, "Mount") + + // https://blishhud.com/docs/markers/attributes/position + PARSEABLE_VAR(xpos, float, "XPos") + PARSEABLE_VAR(ypos, float, "YPos") + PARSEABLE_VAR(zpos, float, "ZPos") + + // https://blishhud.com/docs/markers/attributes/profession + PARSEABLE_VAR(profession_filter, ProfessionFilter, "Profession") + + // https://blishhud.com/docs/markers/attributes/race + PARSEABLE_VAR(race_filter, RaceFilter, "Race") + + // https://blishhud.com/docs/markers/attributes/resetlength + PARSEABLE_VAR(reset_length, float, "ResetLength", "ResetLenght") + + // https://blishhud.com/docs/markers/attributes/rotate + PARSEABLE_VAR(rotation, EulerAngle, "Rotate") + PARSEABLE_SUBVAR(rotation, x, EulerAngle, float, "RotateX") + PARSEABLE_SUBVAR(rotation, y, EulerAngle, float, "RotateY") + PARSEABLE_SUBVAR(rotation, z, EulerAngle, float, "RotateZ") + + + // https://blishhud.com/docs/markers/attributes/scaleonmapwithzoom + bool scaleonmapwithzoom; + + // https://blishhud.com/docs/markers/attributes/schedule + // Not including parsing support for now due to complexity and lack of practical uses + // Schedule schedule; + // float schedule_duration; + + // https://blishhud.com/docs/markers/attributes/showhide + PARSEABLE_VAR(show, string, "Show") + PARSEABLE_VAR(hide, string, "Hide") + + // https://blishhud.com/docs/markers/attributes/size + PARSEABLE_VAR(min_size, float, "MinSize", "nimSize") + PARSEABLE_VAR(max_size, float, "MaxSize") + + // https://blishhud.com/docs/markers/attributes/specialization + PARSEABLE_VAR(specialization_filter, SpecializationFilter, "Specialization") + + // https://blishhud.com/docs/markers/attributes/tip + // INFO: This seems to only be partially defined for blishud between how it + // works with markers vs categories. + PARSEABLE_VAR(tip_name, string, "TipName") + PARSEABLE_VAR(tip_description, string, "TipDescription") + + // https://blishhud.com/docs/markers/attributes/toggle + PARSEABLE_VAR(toggle, string, "Toggle") + + // https://blishhud.com/docs/markers/attributes/triggerrange + PARSEABLE_VAR(trigger_range, float, "TriggerRange") + + // https://blishhud.com/docs/markers/attributes/type + PARSEABLE_VAR(category, string, "Type") + + // https://blishhud.com/docs/markers/attributes/visibility + PARSEABLE_VAR(visible_on_minimap, bool, "MinimapVisibility") + PARSEABLE_VAR(visible_on_map, bool, "MapVisibility") + PARSEABLE_VAR(visible_ingame, bool, "IngameVisibility") + + + + + + + // TODO: not supported by blishud's docs + PARSEABLE_VAR(reset_offset, float, "ResetOffset") + PARSEABLE_VAR(has_countdown, bool, "HasCountdown") + + + + + + + + + + virtual string classname(); +}; \ No newline at end of file diff --git a/xml_converter/src/parseable.cpp b/xml_converter/src/parseable.cpp new file mode 100644 index 00000000..6190e860 --- /dev/null +++ b/xml_converter/src/parseable.cpp @@ -0,0 +1,63 @@ +#include "rapidxml-1.13/rapidxml.hpp" + +#include "parseable.hpp" + +#include "string_helper.hpp" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +using namespace std; + +Parseable::Parseable() {} + +string Parseable::classname() { + return "Parseable"; +} + + +void Parseable::init_from_xml(rapidxml::xml_node<>* node, vector *errors) { + + for (rapidxml::xml_attribute<>* attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()){ + if (init_xml_attribute(attribute, errors)) {} + else { + errors->push_back("Unknown " + this->classname() + " attribute " + string(attribute->name())); + } + } +} + +bool Parseable::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors) { + for (auto parser_function : this->variable_list) { + if (nomralized_matches_any(attribute->name(), parser_function.token_names)) { + // if (string(attribute->name()) != attr_name) { + /*errors->push_back("Found a similar but incorrect attribute \"" + string(attribute->name()) + "\" treating it as \"" + attr_name + "\".");*/ \ + // } + parser_function.function(parser_function.object, attribute, errors); + return true; + } + } + + return false; +} + + +bool Parseable::setup_variable( + void (*function)(void*, rapidxml::xml_attribute<>*, vector*), + void* object, + vector names +) { + this->variable_list.push_back({ + function, + object, + names + }); + return false; +} diff --git a/xml_converter/src/parseable.hpp b/xml_converter/src/parseable.hpp new file mode 100644 index 00000000..0a936c5f --- /dev/null +++ b/xml_converter/src/parseable.hpp @@ -0,0 +1,49 @@ +#pragma once + +#include "rapidxml-1.13/rapidxml.hpp" +#include "rapidxml-1.13/rapidxml_print.hpp" + +#include +#include +using namespace std; + + +#define PARSEABLE_VAR(varname, vartype, ...) \ + vartype varname; \ + static void assign_##varname(void* obj, rapidxml::xml_attribute<>* input, vector *errors) { \ + *(vartype*)obj = parse_##vartype(input, errors); \ + } \ + bool is_##varname##_set = setup_variable(assign_##varname, &varname, { __VA_ARGS__ }); + +#define PARSEABLE_SUBVAR(varname, subvarname, vartype, subvartype, ...) \ + static void assign_##varname##_##subvarname(void* obj, rapidxml::xml_attribute<>* input, vector *errors) { \ + (*(vartype*)obj).subvarname = parse_##subvartype(input, errors); \ + }\ + bool is_##varname##_##subvarname##_set = setup_variable(assign_##varname##_##subvarname, &varname, { __VA_ARGS__ }); + + +struct ParseableAttribute; + +class Parseable { +public: + vector variable_list; + bool setup_variable( + void (*function)(void*, rapidxml::xml_attribute<>*, vector*), + void* object, + vector names + ); + + +public: + Parseable(); + virtual string classname(); + void init_from_xml(rapidxml::xml_node<>* node, vector *errors); + bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors); +}; + + +struct ParseableAttribute { + void (*function)(void*, rapidxml::xml_attribute<>*, vector*); + void* object; + vector token_names; +}; diff --git a/xml_converter/src/string_helper.cpp b/xml_converter/src/string_helper.cpp new file mode 100644 index 00000000..907be666 --- /dev/null +++ b/xml_converter/src/string_helper.cpp @@ -0,0 +1,65 @@ +#include +#include +#include +#include "string_helper.hpp" +using namespace std; + +bool matches_any(string test, std::initializer_list list) { + for( auto elem : list ) { + if (test == elem) { + return true; + } + } + return false; +} + +bool nomralized_matches_any(string test, std::initializer_list list) { + test = normalize_type_name(test); + for( auto elem : list ) { + if (test == normalize_type_name(elem)) { + return true; + } + } + return false; +} + +bool nomralized_matches_any(string test, std::vector list) { + test = normalize_type_name(test); + for( auto elem : list ) { + if (test == normalize_type_name(elem)) { + return true; + } + } + return false; +} + + +vector split(string input, string delimiter) { + vector output; + size_t cursor_position = 0; + while((cursor_position = input.find(delimiter)) != std::string::npos) { + output.push_back(input.substr(0, cursor_position)); + input.erase(0, cursor_position + delimiter.length()); + } + output.push_back(input); + return output; +} + + +string normalize_type_name(string type_name) { + char output[type_name.length()]; + size_t i = 0; + for (char character : type_name) { + if (character >= 'A' && character <= 'Z') { + output[i] = (character - 'A' + 'a'); + i += 1; + } + else if (character >= 'a' && character <= 'z') { + output[i] = character; + i += 1; + } + } + output[i] = '\0'; + + return string(output); +} diff --git a/xml_converter/src/string_helper.hpp b/xml_converter/src/string_helper.hpp new file mode 100644 index 00000000..d3403160 --- /dev/null +++ b/xml_converter/src/string_helper.hpp @@ -0,0 +1,13 @@ +#pragma once + +#include +#include +using namespace std; + +bool matches_any(string test, std::initializer_list list); +bool nomralized_matches_any(string test, std::initializer_list list); +bool nomralized_matches_any(string test, std::vector list); + +vector split(string input, string delimiter); + +string normalize_type_name(string type_name); diff --git a/xml_converter/src/trail.cpp b/xml_converter/src/trail.cpp new file mode 100644 index 00000000..419992e9 --- /dev/null +++ b/xml_converter/src/trail.cpp @@ -0,0 +1,5 @@ +#include "trail.hpp" + +string Trail::classname() { + return string("Trail"); +} diff --git a/xml_converter/src/trail.hpp b/xml_converter/src/trail.hpp new file mode 100644 index 00000000..1a50852f --- /dev/null +++ b/xml_converter/src/trail.hpp @@ -0,0 +1,102 @@ +#pragma once + +#include "rapidxml-1.13/rapidxml.hpp" +#include "rapidxml-1.13/rapidxml_print.hpp" + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "attribute/bool.hpp" +#include "attribute/chirality.hpp" +#include "attribute/color.hpp" +#include "attribute/festival_filter.hpp" +#include "attribute/float.hpp" +#include "attribute/float.hpp" +#include "attribute/int.hpp" +#include "attribute/profession_filter.hpp" +#include "attribute/string.hpp" +#include "attribute/map_type_filter.hpp" +#include "attribute/mount_filter.hpp" +#include "attribute/race_filter.hpp" + +#include "parseable.hpp" +using namespace std; + +//////////////////////////////////////////////////////////////////////////////// +// +//////////////////////////////////////////////////////////////////////////////// +class Trail: public Parseable { +public: + // https://blishhud.com/docs/markers/attributes/achievement + PARSEABLE_VAR(achievement_id, int, "AchievementId") + PARSEABLE_VAR(achievement_bit, int, "AchievementBit") + + // https://blishhud.com/docs/markers/attributes/alpha + PARSEABLE_VAR(alpha, float, "Alpha") + + // https://blishhud.com/docs/markers/attributes/animspeed + PARSEABLE_VAR(animation_speed, float, "AnimSpeed") + + // https://blishhud.com/docs/markers/attributes/canfade + PARSEABLE_VAR(can_fade, bool, "CanFade") + + // https://blishhud.com/docs/markers/attributes/color + PARSEABLE_VAR(color, Color, "Color"); + + // https://blishhud.com/docs/markers/attributes/cull + PARSEABLE_VAR(cull, Chirality, "Cull"); + + // https://blishhud.com/docs/markers/attributes/fade + PARSEABLE_VAR(fade_near, float, "FadeNear") + PARSEABLE_VAR(fade_far, float, "FadeFar") + + // https://blishhud.com/docs/markers/attributes/festival + PARSEABLE_VAR(festival_filter, FestivalFilter, "Festival") + + // https://blishhud.com/docs/markers/attributes/iswall + PARSEABLE_VAR(is_wall, bool, "IsWall") + + // https://blishhud.com/docs/markers/attributes/maptype + PARSEABLE_VAR(map_type, MapTypeFilter, "MapType") + + // https://blishhud.com/docs/markers/attributes/mount + PARSEABLE_VAR(mount, MountFilter, "Mount") + + // https://blishhud.com/docs/markers/attributes/profession + PARSEABLE_VAR(profession_filter, ProfessionFilter, "Profession") + + // https://blishhud.com/docs/markers/attributes/race + PARSEABLE_VAR(race_filter, RaceFilter, "Race") + + // https://blishhud.com/docs/markers/attributes/texture + PARSEABLE_VAR(texture, string, "Texture") + + // https://blishhud.com/docs/markers/attributes/trailscale + PARSEABLE_VAR(trail_scale, float, "TrailScale") + + // https://blishhud.com/docs/markers/attributes/type + PARSEABLE_VAR(category, string, "Type") + + // https://blishhud.com/docs/markers/attributes/visibility + PARSEABLE_VAR(visible_on_minimap, bool, "MinimapVisibility") + PARSEABLE_VAR(visible_on_map, bool, "MapVisibility") + PARSEABLE_VAR(visible_ingame, bool, "IngameVisibility") + + // TODO: Currently Uncatagorized by BlishHUD + PARSEABLE_VAR(trail_data, string, "TrailData") + PARSEABLE_VAR(guid, string, "GUID") // https://blishhud.com/docs/markers/attributes/guid (but this is only valid for markers it seems) + PARSEABLE_VAR(map_display_size, int, "MapDisplaySize") + + + virtual string classname(); +}; diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp new file mode 100644 index 00000000..2be77ff6 --- /dev/null +++ b/xml_converter/src/xml_converter.cpp @@ -0,0 +1,151 @@ +#include "rapidxml-1.13/rapidxml.hpp" +#include "rapidxml-1.13/rapidxml_print.hpp" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +using namespace std; + +#include "parseable.hpp" +#include "trail.hpp" +#include "icon.hpp" +#include "category.hpp" + +#include "attribute/float.hpp" + + + + +bool has_suffix (std::string const &fullString, std::string const &ending) { + if (fullString.length() >= ending.length()) { + return (0 == fullString.compare (fullString.length() - ending.length(), ending.length(), ending)); + } else { + return false; + } +} + + + +//////////////////////////////////////////////////////////////////////////////// +// parse_pois +// +// Parse the xml block into an in memory array of Markers. +//////////////////////////////////////////////////////////////////////////////// +vector parse_pois(rapidxml::xml_node<>* root_node, string filename, vector* errors) { + vector markers; + + for (rapidxml::xml_node<>* node = root_node->first_node(); node; node = node->next_sibling()) { + if (string(node->name()) == "POI") { + Icon poi; + poi.init_from_xml(node, errors); + markers.push_back(poi); + } + else if (string(node->name()) == "Trail") { + Trail trail; + trail.init_from_xml(node, errors); + markers.push_back(trail); + } + else { + cout << "Unknown POIs node name \"" << node->name() << "\" " << filename << endl; + } + } + return markers; +} + + +void parse_marker_categories(rapidxml::xml_node<>* root_node, vector* errors) { + for (rapidxml::xml_node<>* node = root_node->first_node(); node; node = node->next_sibling()) { + if (string(node->name()) == "MarkerCategory") { + Cateogry marker_category; + marker_category.init_from_xml(node, errors); + parse_marker_categories(node, errors); + } + else { + errors->push_back("unknown maker category tag " + string(node->name())); + } + } +} + + +//////////////////////////////////////////////////////////////////////////////// +// parse_xml_file +// +// +//////////////////////////////////////////////////////////////////////////////// +void parse_xml_file(string xml_filepath) { + + vector errors; + + rapidxml::xml_document<> doc; + rapidxml::xml_node<>* root_node; + + ifstream inputFile(xml_filepath); + vector buffer((istreambuf_iterator(inputFile)), istreambuf_iterator()); + buffer.push_back('\0'); + + doc.parse<0>(&buffer[0]); + + root_node = doc.first_node(); + + + // Validate the Root Node + if (string(root_node->name()) != "OverlayData") { + cout << "Root Node is \"" << root_node->name() << "\" not \"OverlayData\" in " << xml_filepath << endl; + } + if (root_node->first_attribute() != nullptr) { + cout << "Root Node has attributes when it should have none in " << xml_filepath << endl; + } + + + + for (rapidxml::xml_node<>* node = root_node->first_node(); node; node = node->next_sibling()) { + + if (string(node->name()) == "MarkerCategory") { + // parse_marker_categories(node, &errors); + } + else if (string(node->name()) == "POIs") { + parse_pois(node, xml_filepath, &errors); + } + else { + cout << "Unknown top-level node name " << node->name() << endl; + } + } + + if (errors.size() > 0) { + cout << xml_filepath << endl; + for (auto error : errors) { + cout << error << endl; + } + } +} + + + +void convert_taco_directory(string directory) { + for (const auto & entry : filesystem::directory_iterator(directory)) { + string path = entry.path(); + if (has_suffix(path, ".xml")) { + parse_xml_file(path); + } + } +} + +int main() { + convert_taco_directory("./packs/tw_ALL_IN_ONE"); + convert_taco_directory("./packs/TehsTrails"); + convert_taco_directory("./packs/MoW"); + convert_taco_directory("./packs/Hero.Blish.Pack"); + convert_taco_directory("./packs/GW2 TacO ReActif EN External"); + convert_taco_directory("./packs/602fd903dad6efast_TacO_pack_001"); + + return 0; +} From a97c9b753534d442bf3e1c4f95ece5fb92bf4897 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sat, 2 Apr 2022 00:57:00 -0500 Subject: [PATCH 002/539] adding a position attribute similar to how rotation works --- xml_converter/src/attribute/position.cpp | 26 ++++++++++++++++++++++++ xml_converter/src/attribute/position.hpp | 17 ++++++++++++++++ xml_converter/src/icon.hpp | 8 +++++--- 3 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 xml_converter/src/attribute/position.cpp create mode 100644 xml_converter/src/attribute/position.hpp diff --git a/xml_converter/src/attribute/position.cpp b/xml_converter/src/attribute/position.cpp new file mode 100644 index 00000000..90754d5e --- /dev/null +++ b/xml_converter/src/attribute/position.cpp @@ -0,0 +1,26 @@ +#include "../rapidxml-1.13/rapidxml.hpp" +#include +#include +#include "../string_helper.hpp" +#include "position.hpp" + + +using namespace std; + + +Position parse_Position(rapidxml::xml_attribute<>* input, vector *errors) { + + vector components = split(string(input->value()), ","); + + Position position; + if (components.size() == 3) { + position.x = stof(components[0].c_str()); + position.y = stof(components[1].c_str()); + position.z = stof(components[2].c_str()); + } + else { + errors->push_back("invlaid 'x,y,z' rotation " + string(input->value()) + " " + to_string(components.size())); + } + + return position; +} diff --git a/xml_converter/src/attribute/position.hpp b/xml_converter/src/attribute/position.hpp new file mode 100644 index 00000000..6c4933ab --- /dev/null +++ b/xml_converter/src/attribute/position.hpp @@ -0,0 +1,17 @@ +#pragma once + +#include "../rapidxml-1.13/rapidxml.hpp" +#include +#include + +using namespace std; + + +class Position { +public: + float x; + float y; + float z; +}; + +Position parse_Position(rapidxml::xml_attribute<>* input, vector *errors); diff --git a/xml_converter/src/icon.hpp b/xml_converter/src/icon.hpp index 25a6970c..6945a651 100644 --- a/xml_converter/src/icon.hpp +++ b/xml_converter/src/icon.hpp @@ -17,6 +17,7 @@ #include "attribute/race_filter.hpp" #include "attribute/map_type_filter.hpp" #include "attribute/mount_filter.hpp" +#include "attribute/position.hpp" #include "string_helper.hpp" @@ -97,9 +98,10 @@ class Icon: public Parseable { PARSEABLE_VAR(mount_filter, MountFilter, "Mount") // https://blishhud.com/docs/markers/attributes/position - PARSEABLE_VAR(xpos, float, "XPos") - PARSEABLE_VAR(ypos, float, "YPos") - PARSEABLE_VAR(zpos, float, "ZPos") + PARSEABLE_VAR(position, Position, "Position") + PARSEABLE_SUBVAR(position, x, Position, float, "XPos", "PositionX") + PARSEABLE_SUBVAR(position, y, Position, float, "YPos", "PositionY") + PARSEABLE_SUBVAR(position, z, Position, float, "ZPos", "PositionZ") // https://blishhud.com/docs/markers/attributes/profession PARSEABLE_VAR(profession_filter, ProfessionFilter, "Profession") From d8fffd93fe2c4dbe0656bd37b486216345156f60 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sat, 2 Apr 2022 01:20:05 -0500 Subject: [PATCH 003/539] Minor speedups using a map lookup instead of a linear lookup, ~35% faster at parsing all test files --- xml_converter/src/attribute/filter.cpp | 9 ++++---- xml_converter/src/attribute/filter.hpp | 27 +++--------------------- xml_converter/src/parseable.cpp | 29 +++++++++++++------------- xml_converter/src/parseable.hpp | 25 ++++++++++++++-------- 4 files changed, 38 insertions(+), 52 deletions(-) diff --git a/xml_converter/src/attribute/filter.cpp b/xml_converter/src/attribute/filter.cpp index f8fd45f0..d5ecdd41 100644 --- a/xml_converter/src/attribute/filter.cpp +++ b/xml_converter/src/attribute/filter.cpp @@ -6,12 +6,12 @@ using namespace std; -bool Filter::setup_variable(void (*function)(bool*), bool* flag, vector names) { +bool Filter::setup_variable(bool* flag, vector names) { for (auto name : names) { if (this->variable_list.count(name)) { throw; } - this->variable_list[name] = {function, flag}; + this->variable_list[name] = flag; } return false; @@ -36,9 +36,8 @@ void Filter::parse(rapidxml::xml_attribute<>* input, vector *errors) { continue; } - RemoteCall function_call = iterator->second; - - function_call.function(function_call.object); + bool* target = iterator->second; + *target = true; } } diff --git a/xml_converter/src/attribute/filter.hpp b/xml_converter/src/attribute/filter.hpp index d976599b..1d0073e2 100644 --- a/xml_converter/src/attribute/filter.hpp +++ b/xml_converter/src/attribute/filter.hpp @@ -23,28 +23,7 @@ using namespace std; // function to set all the flags. //////////////////////////////////////////////////////////////////////////////// #define FILTER_ITEM(name, ...) \ - static void assign_##name(bool* obj) { \ - *obj = true; \ - } \ - bool name = setup_variable(assign_##name, &name, { __VA_ARGS__ }); - - - -//////////////////////////////////////////////////////////////////////////////// -// RemoteCall -// -// RemoteCall is a struct used to store the information needed to set flags -// while we are parsing the input. -// -// TODO: Because everything in `Filter` is a bool, unlike how `Parseable` works -// we might not even need to store a function pointer and instead -// Filter.variable_list could be a map and we use one generic -// function to set all the flags. -//////////////////////////////////////////////////////////////////////////////// -struct RemoteCall { - void (*function)(bool*); - bool* object; -}; + bool name = setup_variable(&name, { __VA_ARGS__ }); //////////////////////////////////////////////////////////////////////////////// @@ -58,8 +37,8 @@ struct RemoteCall { //////////////////////////////////////////////////////////////////////////////// class Filter { public: - map variable_list; - bool setup_variable(void (*function)(bool*), bool*, vector names); + map variable_list; + bool setup_variable(bool*, vector names); void parse(rapidxml::xml_attribute<>* input, vector *errors); virtual string classname() { return "Filter"; } }; diff --git a/xml_converter/src/parseable.cpp b/xml_converter/src/parseable.cpp index 6190e860..4b9bc28d 100644 --- a/xml_converter/src/parseable.cpp +++ b/xml_converter/src/parseable.cpp @@ -35,17 +35,15 @@ void Parseable::init_from_xml(rapidxml::xml_node<>* node, vector *errors } bool Parseable::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors) { - for (auto parser_function : this->variable_list) { - if (nomralized_matches_any(attribute->name(), parser_function.token_names)) { - // if (string(attribute->name()) != attr_name) { - /*errors->push_back("Found a similar but incorrect attribute \"" + string(attribute->name()) + "\" treating it as \"" + attr_name + "\".");*/ \ - // } - parser_function.function(parser_function.object, attribute, errors); - return true; - } + auto iterator = this->variable_list.find(normalize_type_name(attribute->name())); + + if (iterator == this->variable_list.end()) { + return false;; } - return false; + RemoteCall function_call = iterator->second; + function_call.function(function_call.object, attribute, errors); + return true; } @@ -54,10 +52,13 @@ bool Parseable::setup_variable( void* object, vector names ) { - this->variable_list.push_back({ - function, - object, - names - }); + + for (auto name : names) { + if (this->variable_list.count(name)) { + throw; + } + this->variable_list[normalize_type_name(name)] = {function, object}; + } + return false; } diff --git a/xml_converter/src/parseable.hpp b/xml_converter/src/parseable.hpp index 0a936c5f..c0015a36 100644 --- a/xml_converter/src/parseable.hpp +++ b/xml_converter/src/parseable.hpp @@ -5,6 +5,7 @@ #include #include +#include using namespace std; @@ -22,11 +23,24 @@ using namespace std; bool is_##varname##_##subvarname##_set = setup_variable(assign_##varname##_##subvarname, &varname, { __VA_ARGS__ }); -struct ParseableAttribute; +//////////////////////////////////////////////////////////////////////////////// +// RemoteCall +// +// RemoteCall is a struct used to store the information needed to set flags +// while we are parsing the input. +//////////////////////////////////////////////////////////////////////////////// +struct RemoteCall { + void (*function)(void*, rapidxml::xml_attribute<>*, vector*); + void* object; +}; + + class Parseable { public: - vector variable_list; + map variable_list; + + bool setup_variable( void (*function)(void*, rapidxml::xml_attribute<>*, vector*), void* object, @@ -40,10 +54,3 @@ class Parseable { void init_from_xml(rapidxml::xml_node<>* node, vector *errors); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors); }; - - -struct ParseableAttribute { - void (*function)(void*, rapidxml::xml_attribute<>*, vector*); - void* object; - vector token_names; -}; From 2f95224f7dd6a632cabce44bd051d24a86fe1c2f Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sat, 2 Apr 2022 22:51:40 -0500 Subject: [PATCH 004/539] adding fields to allow for all markers to be parsed --- .../src/attribute/festival_filter.hpp | 8 ++++---- xml_converter/src/category.cpp | 18 ++++++++++++++---- xml_converter/src/category.hpp | 14 +++++++++----- xml_converter/src/icon.hpp | 12 +++++++----- 4 files changed, 34 insertions(+), 18 deletions(-) diff --git a/xml_converter/src/attribute/festival_filter.hpp b/xml_converter/src/attribute/festival_filter.hpp index a608ecb0..65f6c002 100644 --- a/xml_converter/src/attribute/festival_filter.hpp +++ b/xml_converter/src/attribute/festival_filter.hpp @@ -14,10 +14,10 @@ using namespace std; class FestivalFilter: public Filter { public: FILTER_ITEM(dragonbash, "dragonbash") - FILTER_ITEM(festival_of_the_four_winds, "festival_of_the_four_winds") - FILTER_ITEM(haloween, "haloween") - FILTER_ITEM(lunar_new_year, "lunar_new_year") - FILTER_ITEM(super_adventure_festival, "super_adventure_festival") + FILTER_ITEM(festival_of_the_four_winds, "festivalofthefourwinds") + FILTER_ITEM(halloween, "halloween") + FILTER_ITEM(lunar_new_year, "lunarnewyear") + FILTER_ITEM(super_adventure_festival, "superadventurefestival") FILTER_ITEM(wintersday, "wintersday") FILTER_ITEM(none, "none") diff --git a/xml_converter/src/category.cpp b/xml_converter/src/category.cpp index bd3f2352..e971774c 100644 --- a/xml_converter/src/category.cpp +++ b/xml_converter/src/category.cpp @@ -11,13 +11,23 @@ string Cateogry::classname() { void Cateogry::init_from_xml(rapidxml::xml_node<>* node, vector *errors) { for (rapidxml::xml_attribute<>* attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()){ + bool is_icon_value = this->default_icon.init_xml_attribute(attribute, errors); + bool is_trail_value = this->default_trail.init_xml_attribute(attribute, errors); + if (init_xml_attribute(attribute, errors)) {} + else if (is_icon_value || is_trail_value) {} else { errors->push_back("Unknown " + this->classname() + " attribute " + string(attribute->name())); } - } + } + // for (rapidxml::xml_attribute<>* attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()){ + // if (init_xml_attribute(attribute, errors)) {} + // else { + // errors->push_back("Unknown " + this->classname() + " attribute " + string(attribute->name())); + // } + // } } -bool Cateogry::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors) { - return false; -} \ No newline at end of file +// bool Cateogry::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors) { +// return false; +// } \ No newline at end of file diff --git a/xml_converter/src/category.hpp b/xml_converter/src/category.hpp index 0141d5ec..c6c476b5 100644 --- a/xml_converter/src/category.hpp +++ b/xml_converter/src/category.hpp @@ -4,18 +4,22 @@ #include #include "icon.hpp" #include "trail.hpp" +#include "parseable.hpp" using namespace std; -class Cateogry { +class Cateogry: public Parseable { public: // https://blishhud.com/docs/markers/attributes/defaulttoggle - bool default_toggle; + PARSEABLE_VAR(default_toggle, bool, "DefaultToggle") // https://blishhud.com/docs/markers/attributes/displayname - string display_name; + PARSEABLE_VAR(display_name, string, "DisplayName") // https://blishhud.com/docs/markers/attributes/isseparator - bool is_seperator; + PARSEABLE_VAR(is_separator, bool, "IsSeparator") + + // Not Documented on blishhud + PARSEABLE_VAR(name, string, "Name") @@ -26,6 +30,6 @@ class Cateogry { virtual string classname(); void init_from_xml(rapidxml::xml_node<>* node, vector *errors); - virtual bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors); + // virtual bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors); }; diff --git a/xml_converter/src/icon.hpp b/xml_converter/src/icon.hpp index 6945a651..9a9f24dd 100644 --- a/xml_converter/src/icon.hpp +++ b/xml_converter/src/icon.hpp @@ -120,12 +120,14 @@ class Icon: public Parseable { // https://blishhud.com/docs/markers/attributes/scaleonmapwithzoom - bool scaleonmapwithzoom; + PARSEABLE_VAR(scale_on_map_with_zoom, bool, "ScaleOnMapWithZoom") // https://blishhud.com/docs/markers/attributes/schedule // Not including parsing support for now due to complexity and lack of practical uses // Schedule schedule; // float schedule_duration; + PARSEABLE_VAR(schedule, string, "Schedule") + PARSEABLE_VAR(schedule_duration, int, "ScheduleDuration") // https://blishhud.com/docs/markers/attributes/showhide PARSEABLE_VAR(show, string, "Show") @@ -145,7 +147,7 @@ class Icon: public Parseable { PARSEABLE_VAR(tip_description, string, "TipDescription") // https://blishhud.com/docs/markers/attributes/toggle - PARSEABLE_VAR(toggle, string, "Toggle") + PARSEABLE_VAR(toggle, string, "Toggle", "ToggleCategory") // https://blishhud.com/docs/markers/attributes/triggerrange PARSEABLE_VAR(trigger_range, float, "TriggerRange") @@ -154,9 +156,9 @@ class Icon: public Parseable { PARSEABLE_VAR(category, string, "Type") // https://blishhud.com/docs/markers/attributes/visibility - PARSEABLE_VAR(visible_on_minimap, bool, "MinimapVisibility") - PARSEABLE_VAR(visible_on_map, bool, "MapVisibility") - PARSEABLE_VAR(visible_ingame, bool, "IngameVisibility") + PARSEABLE_VAR(visible_on_minimap, bool, "MinimapVisibility", "BHMinimapVisibility") + PARSEABLE_VAR(visible_on_map, bool, "MapVisibility", "BHMapVisibility") + PARSEABLE_VAR(visible_ingame, bool, "IngameVisibility", "BHIngameVisibility") From a0ee0c50627ce44384a7afddf1cd4778cc392677 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sun, 3 Apr 2022 00:09:28 -0500 Subject: [PATCH 005/539] abstracting the lookup table to be class specific instead of instance specific --- .../src/attribute/festival_filter.hpp | 3 ++ xml_converter/src/attribute/filter.cpp | 20 +++++----- xml_converter/src/attribute/filter.hpp | 39 ++++++++++++------- .../src/attribute/map_type_filter.hpp | 5 +++ xml_converter/src/attribute/mount_filter.hpp | 5 +++ .../src/attribute/profession_filter.hpp | 4 ++ xml_converter/src/attribute/race_filter.hpp | 6 ++- .../src/attribute/specialization_filter.hpp | 3 ++ 8 files changed, 59 insertions(+), 26 deletions(-) diff --git a/xml_converter/src/attribute/festival_filter.hpp b/xml_converter/src/attribute/festival_filter.hpp index 65f6c002..38710ef1 100644 --- a/xml_converter/src/attribute/festival_filter.hpp +++ b/xml_converter/src/attribute/festival_filter.hpp @@ -10,6 +10,7 @@ using namespace std; +#define FILTER_ITEM(...) CLASS_FILTER_ITEM(FestivalFilter, __VA_ARGS__ ) class FestivalFilter: public Filter { public: @@ -24,4 +25,6 @@ class FestivalFilter: public Filter { virtual string classname() { return "FestivalFilter"; } }; +#undef FILTER_ITEM + FestivalFilter parse_FestivalFilter(rapidxml::xml_attribute<>* input, vector *errors); diff --git a/xml_converter/src/attribute/filter.cpp b/xml_converter/src/attribute/filter.cpp index d5ecdd41..839c0abd 100644 --- a/xml_converter/src/attribute/filter.cpp +++ b/xml_converter/src/attribute/filter.cpp @@ -3,20 +3,22 @@ #include #include #include "filter.hpp" +#include +#include using namespace std; -bool Filter::setup_variable(bool* flag, vector names) { - for (auto name : names) { - if (this->variable_list.count(name)) { +bool Filter::setup_variable(void (*function)(void* filter_object), void* object, vector names) { + for (auto name: names) { + if (this->setter_lookup.count(name)) { throw; } - this->variable_list[name] = flag; + this->setter_lookup[name] = function; } - return false; } + //////////////////////////////////////////////////////////////////////////////// // Filter::parse // @@ -29,15 +31,13 @@ void Filter::parse(rapidxml::xml_attribute<>* input, vector *errors) { vector items = split(string(input->value()), ","); for (string item : items) { - auto iterator = this->variable_list.find(item); + auto iterator = this->setter_lookup.find(item); - if (iterator == this->variable_list.end()) { + if (iterator == this->setter_lookup.end()) { errors->push_back("Unknown " + this->classname() + " option " + item); continue; } - bool* target = iterator->second; - *target = true; + iterator->second(this); } - } diff --git a/xml_converter/src/attribute/filter.hpp b/xml_converter/src/attribute/filter.hpp index 1d0073e2..c5386c50 100644 --- a/xml_converter/src/attribute/filter.hpp +++ b/xml_converter/src/attribute/filter.hpp @@ -10,35 +10,44 @@ using namespace std; //////////////////////////////////////////////////////////////////////////////// -// FILTER_ITEM +// CLASS_FILTER_ITEM // -// The FILTER_ITEM macro takes a name of a flag variable and a series of values -// for what strings should trigger that flag. It useese setup_variable to -// construct a list of all the flags that can be set for a given class on -// runtime. +// The CLASS_FILTER_ITEM macro takes the name of a class, the name of a +// variable inside that class, and a series of strings that should cause that +// variable to be set. It uses setup_variable to construct a list of all the +// flags that can be set for a given Filter subclass at runtime. It has no +// references to the object itself so that it can be instance agnostic and +// re-used when subsequent classes are initialized. +// +// It is suggested to #define a curried version of CLASS_FILTER_ITEM for each +// subclass. For example the class SubFilter may define it as: +// +// #define FILTER_ITEM(...) CLASS_FILTER_ITEM(SubFilter, __VA_ARGS__ ) // -// TODO: Because everything in `Filter` is a bool, unlike how `Parseable` works -// we might not even need to store a function pointer and instead -// Filter.variable_list could be a map and we use one generic -// function to set all the flags. //////////////////////////////////////////////////////////////////////////////// -#define FILTER_ITEM(name, ...) \ - bool name = setup_variable(&name, { __VA_ARGS__ }); +#define CLASS_FILTER_ITEM(filtername, name, ...) \ + bool name; \ + static void enable_##name(void* obj) { \ + (*(filtername*)obj).name = true; \ + } \ + bool name##_setup = setup_variable(enable_##name, &name, { __VA_ARGS__ }); //////////////////////////////////////////////////////////////////////////////// // Filter // -// Filter is ment to be a base class for various attributes where one or more +// Filter is meant to be a base class for various attributes where one or more // options can be selected. Typically these function as filters for whatever // element they are associated with. For example a marker or path may be hidden -// or shown base on what class a user it when the path is relevent to only +// or shown base on what class a user it when the path is relevant to only // one class. //////////////////////////////////////////////////////////////////////////////// class Filter { public: - map variable_list; - bool setup_variable(bool*, vector names); + map setter_lookup; + + bool setup_variable(void (*function)(void* filter_object), void* object, vector names); + void parse(rapidxml::xml_attribute<>* input, vector *errors); virtual string classname() { return "Filter"; } }; diff --git a/xml_converter/src/attribute/map_type_filter.hpp b/xml_converter/src/attribute/map_type_filter.hpp index e252f645..46d858ef 100644 --- a/xml_converter/src/attribute/map_type_filter.hpp +++ b/xml_converter/src/attribute/map_type_filter.hpp @@ -6,6 +6,9 @@ using namespace std; +#define FILTER_ITEM(...) CLASS_FILTER_ITEM(MapTypeFilter, __VA_ARGS__ ) + + class MapTypeFilter: public Filter { public: // An unknown map type. Used as fallback. @@ -83,4 +86,6 @@ class MapTypeFilter: public Filter { virtual string classname() { return "MapTypeFilter"; } }; +#undef FILTER_ITEM + MapTypeFilter parse_MapTypeFilter(rapidxml::xml_attribute<>* input, vector *errors); diff --git a/xml_converter/src/attribute/mount_filter.hpp b/xml_converter/src/attribute/mount_filter.hpp index 2b6d5043..41f7292f 100644 --- a/xml_converter/src/attribute/mount_filter.hpp +++ b/xml_converter/src/attribute/mount_filter.hpp @@ -6,6 +6,9 @@ using namespace std; +#define FILTER_ITEM(...) CLASS_FILTER_ITEM(MountFilter, __VA_ARGS__ ) + + class MountFilter: public Filter { public: FILTER_ITEM(jackal, "jackal") @@ -23,4 +26,6 @@ class MountFilter: public Filter { virtual string classname() { return "MountFilter"; } }; +#undef FILTER_ITEM + MountFilter parse_MountFilter(rapidxml::xml_attribute<>* input, vector *errors); diff --git a/xml_converter/src/attribute/profession_filter.hpp b/xml_converter/src/attribute/profession_filter.hpp index 671d7ded..d3f13952 100644 --- a/xml_converter/src/attribute/profession_filter.hpp +++ b/xml_converter/src/attribute/profession_filter.hpp @@ -9,6 +9,8 @@ using namespace std; +#define FILTER_ITEM(...) CLASS_FILTER_ITEM(ProfessionFilter, __VA_ARGS__ ) + class ProfessionFilter: public Filter { public: FILTER_ITEM(elementalist, "elementalist") @@ -24,4 +26,6 @@ class ProfessionFilter: public Filter { virtual string classname() { return "ProfessionFilter"; } }; +#undef FILTER_ITEM + ProfessionFilter parse_ProfessionFilter(rapidxml::xml_attribute<>* input, vector *errors); diff --git a/xml_converter/src/attribute/race_filter.hpp b/xml_converter/src/attribute/race_filter.hpp index 50913bb0..56299ab6 100644 --- a/xml_converter/src/attribute/race_filter.hpp +++ b/xml_converter/src/attribute/race_filter.hpp @@ -3,9 +3,10 @@ #include "../rapidxml-1.13/rapidxml.hpp" #include "filter.hpp" - using namespace std; +#define FILTER_ITEM(...) CLASS_FILTER_ITEM(RaceFilter, __VA_ARGS__ ) + class RaceFilter: public Filter { public: FILTER_ITEM(asura, "asura") @@ -17,4 +18,7 @@ class RaceFilter: public Filter { virtual string classname() { return "RaceFilter"; } }; + RaceFilter parse_RaceFilter(rapidxml::xml_attribute<>* input, vector *errors); + +#undef FILTER_ITEM diff --git a/xml_converter/src/attribute/specialization_filter.hpp b/xml_converter/src/attribute/specialization_filter.hpp index 25a8562d..4beefe48 100644 --- a/xml_converter/src/attribute/specialization_filter.hpp +++ b/xml_converter/src/attribute/specialization_filter.hpp @@ -2,6 +2,8 @@ #include "filter.hpp" +#define FILTER_ITEM(...) CLASS_FILTER_ITEM(SpecializationFilter, __VA_ARGS__ ) + class SpecializationFilter: public Filter { // Heart of Thorns Spec FILTER_ITEM(ranger_druid, "5") @@ -78,5 +80,6 @@ class SpecializationFilter: public Filter { }; +#undef FILTER_ITEM SpecializationFilter parse_SpecializationFilter(rapidxml::xml_attribute<>* input, vector *errors); \ No newline at end of file From 4d518a23895ebf9d0754a674fe7cb70d86ef6ae0 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sun, 3 Apr 2022 01:31:05 -0500 Subject: [PATCH 006/539] Giving the filter subclasses the ability to only init once, and reuse previos inits to speed up parsing --- xml_converter/src/attribute/filter.cpp | 28 ++++++++++++++++++++++---- xml_converter/src/attribute/filter.hpp | 7 ++++--- 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/xml_converter/src/attribute/filter.cpp b/xml_converter/src/attribute/filter.cpp index 839c0abd..bde68e14 100644 --- a/xml_converter/src/attribute/filter.cpp +++ b/xml_converter/src/attribute/filter.cpp @@ -8,12 +8,29 @@ using namespace std; +uint64_t Filter::_counter = 0; +map original; +map> lookup; + bool Filter::setup_variable(void (*function)(void* filter_object), void* object, vector names) { + + const char* type_id = typeid(*this).name(); + auto iterator = original.find(type_id); + + if (iterator != original.end() && iterator->second != this->_id) { + return false; + } + original[type_id] = this->_id; + + // Grab a pointer to the lookup data for this subclass so we can edit it. + map* variable_list = &lookup[type_id]; + + // Insert all of the names for this field, error on duplicates. for (auto name: names) { - if (this->setter_lookup.count(name)) { + if (variable_list->count(name)) { throw; } - this->setter_lookup[name] = function; + (*variable_list)[name] = function; } return false; } @@ -30,10 +47,13 @@ bool Filter::setup_variable(void (*function)(void* filter_object), void* object, void Filter::parse(rapidxml::xml_attribute<>* input, vector *errors) { vector items = split(string(input->value()), ","); + const char* type_id = typeid(*this).name(); + auto variable_list = &lookup[type_id]; + for (string item : items) { - auto iterator = this->setter_lookup.find(item); + auto iterator = variable_list->find(item); - if (iterator == this->setter_lookup.end()) { + if (iterator == variable_list->end()) { errors->push_back("Unknown " + this->classname() + " option " + item); continue; } diff --git a/xml_converter/src/attribute/filter.hpp b/xml_converter/src/attribute/filter.hpp index c5386c50..cdf23d9e 100644 --- a/xml_converter/src/attribute/filter.hpp +++ b/xml_converter/src/attribute/filter.hpp @@ -2,6 +2,7 @@ #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" +#include #include #include #include @@ -32,7 +33,6 @@ using namespace std; } \ bool name##_setup = setup_variable(enable_##name, &name, { __VA_ARGS__ }); - //////////////////////////////////////////////////////////////////////////////// // Filter // @@ -43,9 +43,10 @@ using namespace std; // one class. //////////////////////////////////////////////////////////////////////////////// class Filter { -public: - map setter_lookup; + static uint64_t _counter; + uint64_t _id = ++_counter; +public: bool setup_variable(void (*function)(void* filter_object), void* object, vector names); void parse(rapidxml::xml_attribute<>* input, vector *errors); From 1f5533a900c878c4306aee88a99d3c42d00bbe02 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sun, 3 Apr 2022 02:03:34 -0500 Subject: [PATCH 007/539] Applying similar init logic to the parsable class and subclasses as was applied to filters --- xml_converter/src/attribute/filter.cpp | 4 +-- xml_converter/src/attribute/filter.hpp | 3 ++ xml_converter/src/category.hpp | 7 +++++ xml_converter/src/icon.hpp | 9 +++++- xml_converter/src/parseable.cpp | 42 +++++++++++++++++++------- xml_converter/src/parseable.hpp | 34 +++++++-------------- xml_converter/src/trail.hpp | 6 ++++ 7 files changed, 68 insertions(+), 37 deletions(-) diff --git a/xml_converter/src/attribute/filter.cpp b/xml_converter/src/attribute/filter.cpp index bde68e14..c963b869 100644 --- a/xml_converter/src/attribute/filter.cpp +++ b/xml_converter/src/attribute/filter.cpp @@ -9,8 +9,8 @@ using namespace std; uint64_t Filter::_counter = 0; -map original; -map> lookup; +map Filter::original; +map> Filter::lookup; bool Filter::setup_variable(void (*function)(void* filter_object), void* object, vector names) { diff --git a/xml_converter/src/attribute/filter.hpp b/xml_converter/src/attribute/filter.hpp index cdf23d9e..87249afa 100644 --- a/xml_converter/src/attribute/filter.hpp +++ b/xml_converter/src/attribute/filter.hpp @@ -46,6 +46,9 @@ class Filter { static uint64_t _counter; uint64_t _id = ++_counter; + static map original; + static map> lookup; + public: bool setup_variable(void (*function)(void* filter_object), void* object, vector names); diff --git a/xml_converter/src/category.hpp b/xml_converter/src/category.hpp index c6c476b5..a391f116 100644 --- a/xml_converter/src/category.hpp +++ b/xml_converter/src/category.hpp @@ -7,6 +7,11 @@ #include "parseable.hpp" using namespace std; + + +#define PARSEABLE_VAR(...) CLASS_PARSEABLE_VAR(Cateogry, __VA_ARGS__ ) +#define PARSEABLE_SUBVAR(...) CLASS_PARSEABLE_SUBVAR(Cateogry, __VA_ARGS__ ) + class Cateogry: public Parseable { public: // https://blishhud.com/docs/markers/attributes/defaulttoggle @@ -33,3 +38,5 @@ class Cateogry: public Parseable { // virtual bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors); }; +#undef PARSEABLE_VAR +#undef PARSEABLE_SUBVAR diff --git a/xml_converter/src/icon.hpp b/xml_converter/src/icon.hpp index 9a9f24dd..108c0cff 100644 --- a/xml_converter/src/icon.hpp +++ b/xml_converter/src/icon.hpp @@ -26,6 +26,10 @@ using namespace std; + +#define PARSEABLE_VAR(...) CLASS_PARSEABLE_VAR(Icon, __VA_ARGS__ ) +#define PARSEABLE_SUBVAR(...) CLASS_PARSEABLE_SUBVAR(Icon, __VA_ARGS__ ) + class Icon: public Parseable { private: // https://blishhud.com/docs/markers/attributes/achievement @@ -178,4 +182,7 @@ class Icon: public Parseable { virtual string classname(); -}; \ No newline at end of file +}; + +#undef PARSEABLE_VAR +#undef PARSEABLE_SUBVAR diff --git a/xml_converter/src/parseable.cpp b/xml_converter/src/parseable.cpp index 4b9bc28d..4345a8f1 100644 --- a/xml_converter/src/parseable.cpp +++ b/xml_converter/src/parseable.cpp @@ -17,7 +17,13 @@ #include using namespace std; -Parseable::Parseable() {} + + +uint64_t Parseable::_counter = 0; +map Parseable::original; +map*, vector*)>> Parseable::lookup; + + string Parseable::classname() { return "Parseable"; @@ -35,30 +41,44 @@ void Parseable::init_from_xml(rapidxml::xml_node<>* node, vector *errors } bool Parseable::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors) { - auto iterator = this->variable_list.find(normalize_type_name(attribute->name())); + const char* type_id = typeid(*this).name(); + auto variable_list = &lookup[type_id]; + + string item = normalize_type_name(attribute->name()); - if (iterator == this->variable_list.end()) { - return false;; + auto iterator = variable_list->find(item); + + if (iterator == variable_list->end()) { + errors->push_back("Unknown " + this->classname() + " option " + item); + return false; } - RemoteCall function_call = iterator->second; - function_call.function(function_call.object, attribute, errors); + iterator->second(this, attribute, errors); return true; } bool Parseable::setup_variable( void (*function)(void*, rapidxml::xml_attribute<>*, vector*), - void* object, vector names ) { + const char* type_id = typeid(*this).name(); + auto iterator = original.find(type_id); + + if (iterator != original.end() && iterator->second != this->_id) { + return false; + } + original[type_id] = this->_id; - for (auto name : names) { - if (this->variable_list.count(name)) { + // Grab a pointer to the lookup data for this subclass so we can edit it. + map*, vector*)>* variable_list = &lookup[type_id]; + + // Insert all of the names for this field, error on duplicates. + for (auto name: names) { + if (variable_list->count(name)) { throw; } - this->variable_list[normalize_type_name(name)] = {function, object}; + (*variable_list)[normalize_type_name(name)] = function; } - return false; } diff --git a/xml_converter/src/parseable.hpp b/xml_converter/src/parseable.hpp index c0015a36..72aa613c 100644 --- a/xml_converter/src/parseable.hpp +++ b/xml_converter/src/parseable.hpp @@ -9,47 +9,35 @@ using namespace std; -#define PARSEABLE_VAR(varname, vartype, ...) \ +#define CLASS_PARSEABLE_VAR(parseableclassname, varname, vartype, ...) \ vartype varname; \ static void assign_##varname(void* obj, rapidxml::xml_attribute<>* input, vector *errors) { \ - *(vartype*)obj = parse_##vartype(input, errors); \ + (*(parseableclassname*)obj).varname = parse_##vartype(input, errors); \ } \ - bool is_##varname##_set = setup_variable(assign_##varname, &varname, { __VA_ARGS__ }); + bool is_##varname##_set = setup_variable(assign_##varname, { __VA_ARGS__ }); -#define PARSEABLE_SUBVAR(varname, subvarname, vartype, subvartype, ...) \ +#define CLASS_PARSEABLE_SUBVAR(parseableclassname, varname, subvarname, vartype, subvartype, ...) \ static void assign_##varname##_##subvarname(void* obj, rapidxml::xml_attribute<>* input, vector *errors) { \ - (*(vartype*)obj).subvarname = parse_##subvartype(input, errors); \ + (*(parseableclassname*)obj).varname.subvarname = parse_##subvartype(input, errors); \ }\ - bool is_##varname##_##subvarname##_set = setup_variable(assign_##varname##_##subvarname, &varname, { __VA_ARGS__ }); - - -//////////////////////////////////////////////////////////////////////////////// -// RemoteCall -// -// RemoteCall is a struct used to store the information needed to set flags -// while we are parsing the input. -//////////////////////////////////////////////////////////////////////////////// -struct RemoteCall { - void (*function)(void*, rapidxml::xml_attribute<>*, vector*); - void* object; -}; - + bool is_##varname##_##subvarname##_set = setup_variable(assign_##varname##_##subvarname, { __VA_ARGS__ }); class Parseable { -public: - map variable_list; + static uint64_t _counter; + uint64_t _id = ++_counter; + static map original; + static map*, vector*)>> lookup; +public: bool setup_variable( void (*function)(void*, rapidxml::xml_attribute<>*, vector*), - void* object, vector names ); public: - Parseable(); virtual string classname(); void init_from_xml(rapidxml::xml_node<>* node, vector *errors); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors); diff --git a/xml_converter/src/trail.hpp b/xml_converter/src/trail.hpp index 1a50852f..45b08a25 100644 --- a/xml_converter/src/trail.hpp +++ b/xml_converter/src/trail.hpp @@ -32,6 +32,9 @@ #include "parseable.hpp" using namespace std; +#define PARSEABLE_VAR(...) CLASS_PARSEABLE_VAR(Trail, __VA_ARGS__ ) +#define PARSEABLE_SUBVAR(...) CLASS_PARSEABLE_SUBVAR(Trail, __VA_ARGS__ ) + //////////////////////////////////////////////////////////////////////////////// // //////////////////////////////////////////////////////////////////////////////// @@ -100,3 +103,6 @@ class Trail: public Parseable { virtual string classname(); }; + +#undef PARSEABLE_VAR +#undef PARSEABLE_SUBVAR From 6b4bdbc95826f45bf3b680005e2137569ca8562f Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sun, 3 Apr 2022 10:41:41 -0500 Subject: [PATCH 008/539] removing commented out fields --- xml_converter/src/icon.hpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/xml_converter/src/icon.hpp b/xml_converter/src/icon.hpp index 108c0cff..63d99cb4 100644 --- a/xml_converter/src/icon.hpp +++ b/xml_converter/src/icon.hpp @@ -128,8 +128,6 @@ class Icon: public Parseable { // https://blishhud.com/docs/markers/attributes/schedule // Not including parsing support for now due to complexity and lack of practical uses - // Schedule schedule; - // float schedule_duration; PARSEABLE_VAR(schedule, string, "Schedule") PARSEABLE_VAR(schedule_duration, int, "ScheduleDuration") From f5ae8a101960dc9399abd7c3ebd393e53fd5b5d1 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sun, 3 Apr 2022 11:08:37 -0500 Subject: [PATCH 009/539] removing extra functions from Category --- xml_converter/src/category.cpp | 9 --------- xml_converter/src/category.hpp | 1 - 2 files changed, 10 deletions(-) diff --git a/xml_converter/src/category.cpp b/xml_converter/src/category.cpp index e971774c..c1298488 100644 --- a/xml_converter/src/category.cpp +++ b/xml_converter/src/category.cpp @@ -20,14 +20,5 @@ void Cateogry::init_from_xml(rapidxml::xml_node<>* node, vector *errors) errors->push_back("Unknown " + this->classname() + " attribute " + string(attribute->name())); } } - // for (rapidxml::xml_attribute<>* attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()){ - // if (init_xml_attribute(attribute, errors)) {} - // else { - // errors->push_back("Unknown " + this->classname() + " attribute " + string(attribute->name())); - // } - // } } -// bool Cateogry::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors) { -// return false; -// } \ No newline at end of file diff --git a/xml_converter/src/category.hpp b/xml_converter/src/category.hpp index a391f116..013a0c9e 100644 --- a/xml_converter/src/category.hpp +++ b/xml_converter/src/category.hpp @@ -35,7 +35,6 @@ class Cateogry: public Parseable { virtual string classname(); void init_from_xml(rapidxml::xml_node<>* node, vector *errors); - // virtual bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors); }; #undef PARSEABLE_VAR From d9259d627dbabaffd7f19bacd989a52aa791dd58 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sun, 3 Apr 2022 11:57:05 -0500 Subject: [PATCH 010/539] rewriing normalize_type_name() to not use variable length arrays --- xml_converter/src/string_helper.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/xml_converter/src/string_helper.cpp b/xml_converter/src/string_helper.cpp index 907be666..880d3ff2 100644 --- a/xml_converter/src/string_helper.cpp +++ b/xml_converter/src/string_helper.cpp @@ -47,19 +47,19 @@ vector split(string input, string delimiter) { string normalize_type_name(string type_name) { - char output[type_name.length()]; + string output; + output.reserve(type_name.length()); + + size_t i = 0; for (char character : type_name) { if (character >= 'A' && character <= 'Z') { - output[i] = (character - 'A' + 'a'); - i += 1; + output += (character - 'A' + 'a'); } else if (character >= 'a' && character <= 'z') { - output[i] = character; - i += 1; + output += character; } } - output[i] = '\0'; - return string(output); + return output; } From cfeef6f59084d4b29f4193b27d52bf746e1a6030 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sun, 3 Apr 2022 12:58:00 -0500 Subject: [PATCH 011/539] adding cpplint requirement to xml_parser and obeying cpplint in existing xml_parser files --- xml_converter/CMakeLists.txt | 2 + xml_converter/presubmit.sh | 4 + xml_converter/src/attribute/bool.cpp | 28 +- xml_converter/src/attribute/bool.hpp | 3 +- xml_converter/src/attribute/chirality.cpp | 11 +- xml_converter/src/attribute/chirality.hpp | 7 +- xml_converter/src/attribute/color.cpp | 12 +- xml_converter/src/attribute/color.hpp | 7 +- xml_converter/src/attribute/euler_angle.cpp | 30 +- xml_converter/src/attribute/euler_angle.hpp | 12 +- .../src/attribute/festival_filter.cpp | 14 +- .../src/attribute/festival_filter.hpp | 8 +- xml_converter/src/attribute/filter.cpp | 76 +- xml_converter/src/attribute/filter.hpp | 34 +- xml_converter/src/attribute/float.cpp | 7 +- xml_converter/src/attribute/float.hpp | 2 +- xml_converter/src/attribute/int.cpp | 38 +- xml_converter/src/attribute/int.hpp | 5 +- .../src/attribute/map_type_filter.cpp | 8 +- .../src/attribute/map_type_filter.hpp | 148 +- xml_converter/src/attribute/mount_filter.cpp | 8 +- xml_converter/src/attribute/mount_filter.hpp | 6 +- xml_converter/src/attribute/position.cpp | 30 +- xml_converter/src/attribute/position.hpp | 11 +- .../src/attribute/profession_filter.cpp | 16 +- .../src/attribute/profession_filter.hpp | 25 +- xml_converter/src/attribute/race_filter.cpp | 8 +- xml_converter/src/attribute/race_filter.hpp | 15 +- .../src/attribute/specialization_filter.cpp | 8 +- .../src/attribute/specialization_filter.hpp | 140 +- xml_converter/src/attribute/string.cpp | 8 +- xml_converter/src/attribute/string.hpp | 3 +- xml_converter/src/category.cpp | 23 +- xml_converter/src/category.hpp | 38 +- xml_converter/src/icon.cpp | 11 +- xml_converter/src/icon.hpp | 231 +- xml_converter/src/parseable.cpp | 96 +- xml_converter/src/parseable.hpp | 49 +- xml_converter/src/rapidxml-1.13/license.txt | 52 + xml_converter/src/rapidxml-1.13/rapidxml.hpp | 2596 +++++++++++++++++ .../src/rapidxml-1.13/rapidxml_iterators.hpp | 174 ++ .../src/rapidxml-1.13/rapidxml_print.hpp | 421 +++ .../src/rapidxml-1.13/rapidxml_utils.hpp | 122 + xml_converter/src/string_helper.cpp | 16 +- xml_converter/src/trail.cpp | 2 +- xml_converter/src/trail.hpp | 110 +- xml_converter/src/xml_converter.cpp | 168 +- 47 files changed, 4107 insertions(+), 736 deletions(-) create mode 100755 xml_converter/presubmit.sh create mode 100644 xml_converter/src/rapidxml-1.13/license.txt create mode 100644 xml_converter/src/rapidxml-1.13/rapidxml.hpp create mode 100644 xml_converter/src/rapidxml-1.13/rapidxml_iterators.hpp create mode 100644 xml_converter/src/rapidxml-1.13/rapidxml_print.hpp create mode 100644 xml_converter/src/rapidxml-1.13/rapidxml_utils.hpp diff --git a/xml_converter/CMakeLists.txt b/xml_converter/CMakeLists.txt index 9d440f2c..b8ab58d4 100644 --- a/xml_converter/CMakeLists.txt +++ b/xml_converter/CMakeLists.txt @@ -1,6 +1,8 @@ cmake_minimum_required (VERSION 3.16) project (XMLConverter) +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + # Name Output File set(TARGET_NAME xml_converter) diff --git a/xml_converter/presubmit.sh b/xml_converter/presubmit.sh new file mode 100755 index 00000000..a08c6e14 --- /dev/null +++ b/xml_converter/presubmit.sh @@ -0,0 +1,4 @@ +cpplint --quiet --recursive --exclude="src/rapidxml-1.13" --filter=-whitespace/newline,-whitespace/line_length,-readability/braces,-legal/copyright,-build/namespaces,-readability/casting src/ +# TODO: remove readability/casting from the filter. It was temporarily added +# because the changes required would need testing unfitting of the original +# style check update commit. diff --git a/xml_converter/src/attribute/bool.cpp b/xml_converter/src/attribute/bool.cpp index 0841cf38..97c1328b 100644 --- a/xml_converter/src/attribute/bool.cpp +++ b/xml_converter/src/attribute/bool.cpp @@ -1,20 +1,22 @@ -#include "../rapidxml-1.13/rapidxml.hpp" -#include +#include "bool.hpp" + #include +#include #include -#include "bool.hpp" + +#include "../rapidxml-1.13/rapidxml.hpp" using namespace std; bool parse_bool(rapidxml::xml_attribute<>* input, vector *errors) { - if (string(input->value()) == "0" || string(input->value()) == "false"){ - return false; - } - else if (string(input->value()) == "1" || string(input->value()) == "true") { - return true; - } - else { - errors->push_back("Found a boolean value that was not a '1', '0', 'true', or 'false'"); - return false; - } + if (string(input->value()) == "0" || string(input->value()) == "false") { + return false; + } + else if (string(input->value()) == "1" || string(input->value()) == "true") { + return true; + } + else { + errors->push_back("Found a boolean value that was not a '1', '0', 'true', or 'false'"); + return false; + } } diff --git a/xml_converter/src/attribute/bool.hpp b/xml_converter/src/attribute/bool.hpp index da36a18a..ceedbfc7 100644 --- a/xml_converter/src/attribute/bool.hpp +++ b/xml_converter/src/attribute/bool.hpp @@ -1,10 +1,11 @@ #pragma once -#include "../rapidxml-1.13/rapidxml.hpp" #include #include #include +#include "../rapidxml-1.13/rapidxml.hpp" + using namespace std; bool parse_bool(rapidxml::xml_attribute<>* input, vector *errors); diff --git a/xml_converter/src/attribute/chirality.cpp b/xml_converter/src/attribute/chirality.cpp index b910ea60..605164dd 100644 --- a/xml_converter/src/attribute/chirality.cpp +++ b/xml_converter/src/attribute/chirality.cpp @@ -1,13 +1,14 @@ -#include "../rapidxml-1.13/rapidxml.hpp" +#include "chirality.hpp" + #include #include -#include "chirality.hpp" +#include "../rapidxml-1.13/rapidxml.hpp" using namespace std; Chirality parse_Chirality(rapidxml::xml_attribute<>* input, vector *errors) { - Chirality chirality; - chirality.chirality = string(input->value()); - return chirality; + Chirality chirality; + chirality.chirality = string(input->value()); + return chirality; } diff --git a/xml_converter/src/attribute/chirality.hpp b/xml_converter/src/attribute/chirality.hpp index 5444e67f..e561a0d5 100644 --- a/xml_converter/src/attribute/chirality.hpp +++ b/xml_converter/src/attribute/chirality.hpp @@ -1,15 +1,16 @@ #pragma once -#include "../rapidxml-1.13/rapidxml.hpp" #include #include +#include "../rapidxml-1.13/rapidxml.hpp" + using namespace std; class Chirality { -public: - string chirality; + public: + string chirality; }; Chirality parse_Chirality(rapidxml::xml_attribute<>* input, vector *errors); diff --git a/xml_converter/src/attribute/color.cpp b/xml_converter/src/attribute/color.cpp index 1322ab7b..0e2c5121 100644 --- a/xml_converter/src/attribute/color.cpp +++ b/xml_converter/src/attribute/color.cpp @@ -1,12 +1,14 @@ -#include "../rapidxml-1.13/rapidxml.hpp" +#include "color.hpp" + #include #include -#include "color.hpp" + +#include "../rapidxml-1.13/rapidxml.hpp" using namespace std; Color parse_Color(rapidxml::xml_attribute<>* input, vector *errors) { - Color color; - color.hex = string(input->value()); - return color; + Color color; + color.hex = string(input->value()); + return color; } diff --git a/xml_converter/src/attribute/color.hpp b/xml_converter/src/attribute/color.hpp index a124c182..b8bb7572 100644 --- a/xml_converter/src/attribute/color.hpp +++ b/xml_converter/src/attribute/color.hpp @@ -1,14 +1,15 @@ #pragma once -#include "../rapidxml-1.13/rapidxml.hpp" #include #include +#include "../rapidxml-1.13/rapidxml.hpp" + using namespace std; class Color { -public: - string hex; + public: + string hex; }; Color parse_Color(rapidxml::xml_attribute<>* input, vector *errors); diff --git a/xml_converter/src/attribute/euler_angle.cpp b/xml_converter/src/attribute/euler_angle.cpp index 59c19777..7249edae 100644 --- a/xml_converter/src/attribute/euler_angle.cpp +++ b/xml_converter/src/attribute/euler_angle.cpp @@ -1,26 +1,26 @@ -#include "../rapidxml-1.13/rapidxml.hpp" +#include "euler_angle.hpp" + #include #include -#include "../string_helper.hpp" -#include "euler_angle.hpp" +#include "../rapidxml-1.13/rapidxml.hpp" +#include "../string_helper.hpp" using namespace std; EulerAngle parse_EulerAngle(rapidxml::xml_attribute<>* input, vector *errors) { + vector components = split(string(input->value()), ","); - vector components = split(string(input->value()), ","); - - EulerAngle euler_angle; - if (components.size() == 3) { - euler_angle.x = stof(components[0].c_str()); - euler_angle.y = stof(components[1].c_str()); - euler_angle.z = stof(components[2].c_str()); - } - else { - errors->push_back("invlaid 'x,y,z' rotation " + string(input->value()) + " " + to_string(components.size())); - } + EulerAngle euler_angle; + if (components.size() == 3) { + euler_angle.x = stof(components[0].c_str()); + euler_angle.y = stof(components[1].c_str()); + euler_angle.z = stof(components[2].c_str()); + } + else { + errors->push_back("invlaid 'x,y,z' rotation " + string(input->value()) + " " + to_string(components.size())); + } - return euler_angle; + return euler_angle; } diff --git a/xml_converter/src/attribute/euler_angle.hpp b/xml_converter/src/attribute/euler_angle.hpp index b6cc169d..30bb7735 100644 --- a/xml_converter/src/attribute/euler_angle.hpp +++ b/xml_converter/src/attribute/euler_angle.hpp @@ -1,17 +1,17 @@ #pragma once -#include "../rapidxml-1.13/rapidxml.hpp" #include #include -using namespace std; +#include "../rapidxml-1.13/rapidxml.hpp" +using namespace std; class EulerAngle { -public: - float x; - float y; - float z; + public: + float x; + float y; + float z; }; EulerAngle parse_EulerAngle(rapidxml::xml_attribute<>* input, vector *errors); diff --git a/xml_converter/src/attribute/festival_filter.cpp b/xml_converter/src/attribute/festival_filter.cpp index 6bc68206..890a0499 100644 --- a/xml_converter/src/attribute/festival_filter.cpp +++ b/xml_converter/src/attribute/festival_filter.cpp @@ -1,13 +1,15 @@ -#include "../rapidxml-1.13/rapidxml.hpp" -#include "../string_helper.hpp" +#include "festival_filter.hpp" + #include #include -#include "festival_filter.hpp" + +#include "../rapidxml-1.13/rapidxml.hpp" +#include "../string_helper.hpp" using namespace std; FestivalFilter parse_FestivalFilter(rapidxml::xml_attribute<>* input, vector *errors) { - FestivalFilter festival_filter; - festival_filter.parse(input, errors); - return festival_filter; + FestivalFilter festival_filter; + festival_filter.parse(input, errors); + return festival_filter; } diff --git a/xml_converter/src/attribute/festival_filter.hpp b/xml_converter/src/attribute/festival_filter.hpp index 38710ef1..9efb5ca2 100644 --- a/xml_converter/src/attribute/festival_filter.hpp +++ b/xml_converter/src/attribute/festival_filter.hpp @@ -1,11 +1,11 @@ #pragma once -#include "../rapidxml-1.13/rapidxml.hpp" -#include "../string_helper.hpp" +#include #include #include -#include +#include "../rapidxml-1.13/rapidxml.hpp" +#include "../string_helper.hpp" #include "filter.hpp" using namespace std; @@ -13,7 +13,7 @@ using namespace std; #define FILTER_ITEM(...) CLASS_FILTER_ITEM(FestivalFilter, __VA_ARGS__ ) class FestivalFilter: public Filter { -public: + public: FILTER_ITEM(dragonbash, "dragonbash") FILTER_ITEM(festival_of_the_four_winds, "festivalofthefourwinds") FILTER_ITEM(halloween, "halloween") diff --git a/xml_converter/src/attribute/filter.cpp b/xml_converter/src/attribute/filter.cpp index c963b869..3922a071 100644 --- a/xml_converter/src/attribute/filter.cpp +++ b/xml_converter/src/attribute/filter.cpp @@ -1,10 +1,12 @@ -#include "../rapidxml-1.13/rapidxml.hpp" -#include "../string_helper.hpp" -#include -#include #include "filter.hpp" + #include #include +#include +#include + +#include "../rapidxml-1.13/rapidxml.hpp" +#include "../string_helper.hpp" using namespace std; @@ -13,26 +15,30 @@ map Filter::original; map> Filter::lookup; bool Filter::setup_variable(void (*function)(void* filter_object), void* object, vector names) { + const char* type_id = typeid(*this).name(); + auto iterator = original.find(type_id); + + // If this instance is not the first instance of the subclass this + // execution then exit early to avoid rebuilding the lookup map. + if (iterator != original.end() && iterator->second != this->_id) { + return false; + } + + // Set this instance's id as the id of the first instance of this subclass + // to prevent any other instances from rebuilding the lookup map. + original[type_id] = this->_id; + + // Grab a pointer to the lookup data for this subclass so we can edit it. + map* variable_list = &lookup[type_id]; - const char* type_id = typeid(*this).name(); - auto iterator = original.find(type_id); - - if (iterator != original.end() && iterator->second != this->_id) { - return false; - } - original[type_id] = this->_id; - - // Grab a pointer to the lookup data for this subclass so we can edit it. - map* variable_list = &lookup[type_id]; - - // Insert all of the names for this field, error on duplicates. - for (auto name: names) { - if (variable_list->count(name)) { - throw; - } - (*variable_list)[name] = function; - } - return false; + // Insert all of the names for this field, error on duplicates. + for (auto name : names) { + if (variable_list->count(name)) { + throw; + } + (*variable_list)[name] = function; + } + return false; } @@ -42,22 +48,22 @@ bool Filter::setup_variable(void (*function)(void* filter_object), void* object, // Runs through all of the items that are defined with FILTER_ITEM() to be used // as valid elemetns of this filter, and parses them out into their individual // boolean values. This function should be called by the respective subclass -// parse functions to handle the extraction automatically. +// parse functions to handle the extraction automatically. //////////////////////////////////////////////////////////////////////////////// void Filter::parse(rapidxml::xml_attribute<>* input, vector *errors) { - vector items = split(string(input->value()), ","); + vector items = split(string(input->value()), ","); - const char* type_id = typeid(*this).name(); - auto variable_list = &lookup[type_id]; + const char* type_id = typeid(*this).name(); + auto variable_list = &lookup[type_id]; - for (string item : items) { - auto iterator = variable_list->find(item); + for (string item : items) { + auto iterator = variable_list->find(item); - if (iterator == variable_list->end()) { - errors->push_back("Unknown " + this->classname() + " option " + item); - continue; - } + if (iterator == variable_list->end()) { + errors->push_back("Unknown " + this->classname() + " option " + item); + continue; + } - iterator->second(this); - } + iterator->second(this); + } } diff --git a/xml_converter/src/attribute/filter.hpp b/xml_converter/src/attribute/filter.hpp index 87249afa..b4f94a8c 100644 --- a/xml_converter/src/attribute/filter.hpp +++ b/xml_converter/src/attribute/filter.hpp @@ -1,21 +1,21 @@ #pragma once -#include "../rapidxml-1.13/rapidxml.hpp" -#include "../string_helper.hpp" #include #include #include #include -using namespace std; +#include "../rapidxml-1.13/rapidxml.hpp" +#include "../string_helper.hpp" +using namespace std; //////////////////////////////////////////////////////////////////////////////// // CLASS_FILTER_ITEM // // The CLASS_FILTER_ITEM macro takes the name of a class, the name of a // variable inside that class, and a series of strings that should cause that -// variable to be set. It uses setup_variable to construct a list of all the +// variable to be set. It uses setup_variable to construct a list of all the // flags that can be set for a given Filter subclass at runtime. It has no // references to the object itself so that it can be instance agnostic and // re-used when subsequent classes are initialized. @@ -27,11 +27,11 @@ using namespace std; // //////////////////////////////////////////////////////////////////////////////// #define CLASS_FILTER_ITEM(filtername, name, ...) \ - bool name; \ - static void enable_##name(void* obj) { \ - (*(filtername*)obj).name = true; \ - } \ - bool name##_setup = setup_variable(enable_##name, &name, { __VA_ARGS__ }); + bool name; \ + static void enable_##name(void* obj) { \ + (*(filtername*)obj).name = true; \ + } \ + bool name##_setup = setup_variable(enable_##name, &name, { __VA_ARGS__ }); //////////////////////////////////////////////////////////////////////////////// // Filter @@ -43,16 +43,16 @@ using namespace std; // one class. //////////////////////////////////////////////////////////////////////////////// class Filter { - static uint64_t _counter; - uint64_t _id = ++_counter; + static uint64_t _counter; + uint64_t _id = ++_counter; - static map original; - static map> lookup; + static map original; + static map> lookup; -public: - bool setup_variable(void (*function)(void* filter_object), void* object, vector names); + public: + bool setup_variable(void (*function)(void* filter_object), void* object, vector names); - void parse(rapidxml::xml_attribute<>* input, vector *errors); - virtual string classname() { return "Filter"; } + void parse(rapidxml::xml_attribute<>* input, vector *errors); + virtual string classname() { return "Filter"; } }; diff --git a/xml_converter/src/attribute/float.cpp b/xml_converter/src/attribute/float.cpp index 46e010c9..183786fd 100644 --- a/xml_converter/src/attribute/float.cpp +++ b/xml_converter/src/attribute/float.cpp @@ -1,9 +1,10 @@ -#include "../rapidxml-1.13/rapidxml.hpp" +#include "float.hpp" + #include #include -#include "float.hpp" +#include "../rapidxml-1.13/rapidxml.hpp" float parse_float(rapidxml::xml_attribute<>* input, std::vector *errors) { - return std::stof(input->value()); + return std::stof(input->value()); } diff --git a/xml_converter/src/attribute/float.hpp b/xml_converter/src/attribute/float.hpp index 53047f61..a95b136d 100644 --- a/xml_converter/src/attribute/float.hpp +++ b/xml_converter/src/attribute/float.hpp @@ -1,8 +1,8 @@ #pragma once -#include "../rapidxml-1.13/rapidxml.hpp" #include #include +#include "../rapidxml-1.13/rapidxml.hpp" float parse_float(rapidxml::xml_attribute<>* input, std::vector *errors); diff --git a/xml_converter/src/attribute/int.cpp b/xml_converter/src/attribute/int.cpp index c0c23f06..f1f782e6 100644 --- a/xml_converter/src/attribute/int.cpp +++ b/xml_converter/src/attribute/int.cpp @@ -1,28 +1,28 @@ -#include "../rapidxml-1.13/rapidxml.hpp" -#include +#include "int.hpp" + #include +#include #include -#include "int.hpp" + +#include "../rapidxml-1.13/rapidxml.hpp" using namespace std; int parse_int(rapidxml::xml_attribute<>* input, vector *errors) { - - try { - return stoi(input->value()); - } - catch(std::invalid_argument const& exception) { - errors->push_back("Invalid integer value '" + string(input->value()) + "'"); - return 0; - } - // catch(std::out_of_range const& exception) { - // std::cout << "std::out_of_range::what(): " << ex.what() << '\n'; - // const long long ll {std::stoll(s, &pos)}; - // std::cout << "std::stoll('" << s << "'): " << ll << "; pos: " << pos << '\n'; - // } + try { + return stoi(input->value()); + } + catch(std::invalid_argument const& exception) { + errors->push_back("Invalid integer value '" + string(input->value()) + "'"); + return 0; + } + // catch(std::out_of_range const& exception) { + // std::cout << "std::out_of_range::what(): " << ex.what() << '\n'; + // const long long ll {std::stoll(s, &pos)}; + // std::cout << "std::stoll('" << s << "'): " << ll << "; pos: " << pos << '\n'; + // } } - int init_int_attribute() { - return 0; -} \ No newline at end of file + return 0; +} diff --git a/xml_converter/src/attribute/int.hpp b/xml_converter/src/attribute/int.hpp index 6c092ec1..405582fa 100644 --- a/xml_converter/src/attribute/int.hpp +++ b/xml_converter/src/attribute/int.hpp @@ -1,11 +1,12 @@ #pragma once -#include "../rapidxml-1.13/rapidxml.hpp" #include #include +#include "../rapidxml-1.13/rapidxml.hpp" + using namespace std; int parse_int(rapidxml::xml_attribute<>* input, vector *errors); -int init_int_attribute(); \ No newline at end of file +int init_int_attribute(); diff --git a/xml_converter/src/attribute/map_type_filter.cpp b/xml_converter/src/attribute/map_type_filter.cpp index 89c43247..81108d60 100644 --- a/xml_converter/src/attribute/map_type_filter.cpp +++ b/xml_converter/src/attribute/map_type_filter.cpp @@ -3,7 +3,7 @@ using namespace std; MapTypeFilter parse_MapTypeFilter(rapidxml::xml_attribute<>* input, vector *errors) { - MapTypeFilter filter; - filter.parse(input, errors); - return filter; -} \ No newline at end of file + MapTypeFilter filter; + filter.parse(input, errors); + return filter; +} diff --git a/xml_converter/src/attribute/map_type_filter.hpp b/xml_converter/src/attribute/map_type_filter.hpp index 46d858ef..ae5c19d5 100644 --- a/xml_converter/src/attribute/map_type_filter.hpp +++ b/xml_converter/src/attribute/map_type_filter.hpp @@ -1,87 +1,89 @@ #pragma once +#include +#include + #include "../rapidxml-1.13/rapidxml.hpp" #include "filter.hpp" - using namespace std; #define FILTER_ITEM(...) CLASS_FILTER_ITEM(MapTypeFilter, __VA_ARGS__ ) class MapTypeFilter: public Filter { -public: - // An unknown map type. Used as fallback. - FILTER_ITEM(unknown_map, "unknown") - - // Redirect map type, e.g. when logging in while in a PvP match. - FILTER_ITEM(redirect_map, "redirect") - - // Character create map type. - FILTER_ITEM(character_create_map, "charactercreate") - - // PvP map type. - FILTER_ITEM(pvp_map, "pvp") - - // GvG map type. Unused. - FILTER_ITEM(gvg_map, "gvg") - - // Instance map type, e.g. dungeons and story content. - FILTER_ITEM(instance_map, "instance") - - // Public map type, e.g. open world. - FILTER_ITEM(public_map, "public") - - // Tournament map type. Probably unused. - FILTER_ITEM(tournament_map, "tournament") - - // Tutorial map type. - FILTER_ITEM(tutorial_map, "tutorial") - - // User tournament map type. Probably unused. - FILTER_ITEM(user_tournament_map, "usertournament") - - // Eternal Battlegrounds (WvW) map type. - FILTER_ITEM(center_map, "center") - - // Eternal Battlegrounds (WvW) map type. - FILTER_ITEM(eternal_battlegrounds_map, "eternalbattlegrounds") - - // Blue Borderlands (WvW) map type. - FILTER_ITEM(bluehome_map, "bluehome") - - // Blue Borderlands (WvW) map type. - FILTER_ITEM(blue_borderlands_map, "blueborderlands") - - // Green Borderlands (WvW) map type. - FILTER_ITEM(green_home_map, "greenhome") - - // Green Borderlands (WvW) map type. - FILTER_ITEM(green_borderlands_map, "greenborderlands") - - // Red Borderlands (WvW) map type. - FILTER_ITEM(red_home_map, "redhome") - - // Red Borderlands (WvW) map type. - FILTER_ITEM(red_borderlands_map, "redborderlands") - - // Fortune's Vale. Unused. - FILTER_ITEM(fortunes_vale_map, "fortunesvale") - - // Obsidian Sanctum (WvW) map type. - FILTER_ITEM(jump_puzzle_map, "jumppuzzle") - - // Obsidian Sanctum (WvW) map type. - FILTER_ITEM(obsidian_sanctum_map, "obsidiansanctum") - - // Edge of the Mists (WvW) map type. - FILTER_ITEM(edge_of_the_mists_map, "edgeofthemists") - - // Mini public map type, e.g. Dry Top, the Silverwastes and Mistlock Sanctuary. - FILTER_ITEM(public_mini_map, "publicmini") - - // WvW lounge map type, e.g. Armistice Bastion. - FILTER_ITEM(wvw_lounge_map, "wvwlounge") + public: + // An unknown map type. Used as fallback. + FILTER_ITEM(unknown_map, "unknown") + + // Redirect map type, e.g. when logging in while in a PvP match. + FILTER_ITEM(redirect_map, "redirect") + + // Character create map type. + FILTER_ITEM(character_create_map, "charactercreate") + + // PvP map type. + FILTER_ITEM(pvp_map, "pvp") + + // GvG map type. Unused. + FILTER_ITEM(gvg_map, "gvg") + + // Instance map type, e.g. dungeons and story content. + FILTER_ITEM(instance_map, "instance") + + // Public map type, e.g. open world. + FILTER_ITEM(public_map, "public") + + // Tournament map type. Probably unused. + FILTER_ITEM(tournament_map, "tournament") + + // Tutorial map type. + FILTER_ITEM(tutorial_map, "tutorial") + + // User tournament map type. Probably unused. + FILTER_ITEM(user_tournament_map, "usertournament") + + // Eternal Battlegrounds (WvW) map type. + FILTER_ITEM(center_map, "center") + + // Eternal Battlegrounds (WvW) map type. + FILTER_ITEM(eternal_battlegrounds_map, "eternalbattlegrounds") + + // Blue Borderlands (WvW) map type. + FILTER_ITEM(bluehome_map, "bluehome") + + // Blue Borderlands (WvW) map type. + FILTER_ITEM(blue_borderlands_map, "blueborderlands") + + // Green Borderlands (WvW) map type. + FILTER_ITEM(green_home_map, "greenhome") + + // Green Borderlands (WvW) map type. + FILTER_ITEM(green_borderlands_map, "greenborderlands") + + // Red Borderlands (WvW) map type. + FILTER_ITEM(red_home_map, "redhome") + + // Red Borderlands (WvW) map type. + FILTER_ITEM(red_borderlands_map, "redborderlands") + + // Fortune's Vale. Unused. + FILTER_ITEM(fortunes_vale_map, "fortunesvale") + + // Obsidian Sanctum (WvW) map type. + FILTER_ITEM(jump_puzzle_map, "jumppuzzle") + + // Obsidian Sanctum (WvW) map type. + FILTER_ITEM(obsidian_sanctum_map, "obsidiansanctum") + + // Edge of the Mists (WvW) map type. + FILTER_ITEM(edge_of_the_mists_map, "edgeofthemists") + + // Mini public map type, e.g. Dry Top, the Silverwastes and Mistlock Sanctuary. + FILTER_ITEM(public_mini_map, "publicmini") + + // WvW lounge map type, e.g. Armistice Bastion. + FILTER_ITEM(wvw_lounge_map, "wvwlounge") virtual string classname() { return "MapTypeFilter"; } }; diff --git a/xml_converter/src/attribute/mount_filter.cpp b/xml_converter/src/attribute/mount_filter.cpp index abae9b8c..7c70167f 100644 --- a/xml_converter/src/attribute/mount_filter.cpp +++ b/xml_converter/src/attribute/mount_filter.cpp @@ -3,7 +3,7 @@ using namespace std; MountFilter parse_MountFilter(rapidxml::xml_attribute<>* input, vector *errors) { - MountFilter filter; - filter.parse(input, errors); - return filter; -} \ No newline at end of file + MountFilter filter; + filter.parse(input, errors); + return filter; +} diff --git a/xml_converter/src/attribute/mount_filter.hpp b/xml_converter/src/attribute/mount_filter.hpp index 41f7292f..8e552c4e 100644 --- a/xml_converter/src/attribute/mount_filter.hpp +++ b/xml_converter/src/attribute/mount_filter.hpp @@ -1,16 +1,18 @@ #pragma once +#include +#include + #include "../rapidxml-1.13/rapidxml.hpp" #include "filter.hpp" - using namespace std; #define FILTER_ITEM(...) CLASS_FILTER_ITEM(MountFilter, __VA_ARGS__ ) class MountFilter: public Filter { -public: + public: FILTER_ITEM(jackal, "jackal") FILTER_ITEM(griffon, "griffon") FILTER_ITEM(springer, "springer") diff --git a/xml_converter/src/attribute/position.cpp b/xml_converter/src/attribute/position.cpp index 90754d5e..feddaf42 100644 --- a/xml_converter/src/attribute/position.cpp +++ b/xml_converter/src/attribute/position.cpp @@ -1,26 +1,26 @@ -#include "../rapidxml-1.13/rapidxml.hpp" +#include "position.hpp" + #include #include -#include "../string_helper.hpp" -#include "position.hpp" +#include "../rapidxml-1.13/rapidxml.hpp" +#include "../string_helper.hpp" using namespace std; Position parse_Position(rapidxml::xml_attribute<>* input, vector *errors) { + vector components = split(string(input->value()), ","); - vector components = split(string(input->value()), ","); - - Position position; - if (components.size() == 3) { - position.x = stof(components[0].c_str()); - position.y = stof(components[1].c_str()); - position.z = stof(components[2].c_str()); - } - else { - errors->push_back("invlaid 'x,y,z' rotation " + string(input->value()) + " " + to_string(components.size())); - } + Position position; + if (components.size() == 3) { + position.x = stof(components[0].c_str()); + position.y = stof(components[1].c_str()); + position.z = stof(components[2].c_str()); + } + else { + errors->push_back("invlaid 'x,y,z' rotation " + string(input->value()) + " " + to_string(components.size())); + } - return position; + return position; } diff --git a/xml_converter/src/attribute/position.hpp b/xml_converter/src/attribute/position.hpp index 6c4933ab..4b329485 100644 --- a/xml_converter/src/attribute/position.hpp +++ b/xml_converter/src/attribute/position.hpp @@ -1,17 +1,18 @@ #pragma once -#include "../rapidxml-1.13/rapidxml.hpp" #include #include +#include "../rapidxml-1.13/rapidxml.hpp" + using namespace std; class Position { -public: - float x; - float y; - float z; + public: + float x; + float y; + float z; }; Position parse_Position(rapidxml::xml_attribute<>* input, vector *errors); diff --git a/xml_converter/src/attribute/profession_filter.cpp b/xml_converter/src/attribute/profession_filter.cpp index 9a786242..c90a06d5 100644 --- a/xml_converter/src/attribute/profession_filter.cpp +++ b/xml_converter/src/attribute/profession_filter.cpp @@ -1,13 +1,15 @@ -#include "../rapidxml-1.13/rapidxml.hpp" -#include "../string_helper.hpp" +#include "profession_filter.hpp" + #include #include -#include "profession_filter.hpp" + +#include "../rapidxml-1.13/rapidxml.hpp" +#include "../string_helper.hpp" using namespace std; ProfessionFilter parse_ProfessionFilter(rapidxml::xml_attribute<>* input, vector *errors) { - ProfessionFilter profession_filter; - profession_filter.parse(input, errors); - return profession_filter; -} \ No newline at end of file + ProfessionFilter profession_filter; + profession_filter.parse(input, errors); + return profession_filter; +} diff --git a/xml_converter/src/attribute/profession_filter.hpp b/xml_converter/src/attribute/profession_filter.hpp index d3f13952..74807d5a 100644 --- a/xml_converter/src/attribute/profession_filter.hpp +++ b/xml_converter/src/attribute/profession_filter.hpp @@ -1,27 +1,26 @@ #pragma once -#include "../rapidxml-1.13/rapidxml.hpp" -#include "../string_helper.hpp" #include #include -#include "filter.hpp" +#include "../rapidxml-1.13/rapidxml.hpp" +#include "filter.hpp" using namespace std; #define FILTER_ITEM(...) CLASS_FILTER_ITEM(ProfessionFilter, __VA_ARGS__ ) class ProfessionFilter: public Filter { -public: - FILTER_ITEM(elementalist, "elementalist") - FILTER_ITEM(engineer, "engineer") - FILTER_ITEM(guardian, "guardian") - FILTER_ITEM(mesmer, "mesmer") - FILTER_ITEM(necromancer, "necromancer") - FILTER_ITEM(ranger, "ranger") - FILTER_ITEM(revenant, "revenant") - FILTER_ITEM(thief, "thief") - FILTER_ITEM(warrior, "warrior") + public: + FILTER_ITEM(elementalist, "elementalist") + FILTER_ITEM(engineer, "engineer") + FILTER_ITEM(guardian, "guardian") + FILTER_ITEM(mesmer, "mesmer") + FILTER_ITEM(necromancer, "necromancer") + FILTER_ITEM(ranger, "ranger") + FILTER_ITEM(revenant, "revenant") + FILTER_ITEM(thief, "thief") + FILTER_ITEM(warrior, "warrior") virtual string classname() { return "ProfessionFilter"; } }; diff --git a/xml_converter/src/attribute/race_filter.cpp b/xml_converter/src/attribute/race_filter.cpp index 6aba1290..f2342cf2 100644 --- a/xml_converter/src/attribute/race_filter.cpp +++ b/xml_converter/src/attribute/race_filter.cpp @@ -3,7 +3,7 @@ using namespace std; RaceFilter parse_RaceFilter(rapidxml::xml_attribute<>* input, vector *errors) { - RaceFilter filter; - filter.parse(input, errors); - return filter; -} \ No newline at end of file + RaceFilter filter; + filter.parse(input, errors); + return filter; +} diff --git a/xml_converter/src/attribute/race_filter.hpp b/xml_converter/src/attribute/race_filter.hpp index 56299ab6..5b830862 100644 --- a/xml_converter/src/attribute/race_filter.hpp +++ b/xml_converter/src/attribute/race_filter.hpp @@ -1,5 +1,8 @@ #pragma once +#include +#include + #include "../rapidxml-1.13/rapidxml.hpp" #include "filter.hpp" @@ -8,12 +11,12 @@ using namespace std; #define FILTER_ITEM(...) CLASS_FILTER_ITEM(RaceFilter, __VA_ARGS__ ) class RaceFilter: public Filter { -public: - FILTER_ITEM(asura, "asura") - FILTER_ITEM(charr, "charr") - FILTER_ITEM(human, "human") - FILTER_ITEM(norn, "norn") - FILTER_ITEM(sylvari, "sylvari") + public: + FILTER_ITEM(asura, "asura") + FILTER_ITEM(charr, "charr") + FILTER_ITEM(human, "human") + FILTER_ITEM(norn, "norn") + FILTER_ITEM(sylvari, "sylvari") virtual string classname() { return "RaceFilter"; } }; diff --git a/xml_converter/src/attribute/specialization_filter.cpp b/xml_converter/src/attribute/specialization_filter.cpp index faf6001e..8df03f2e 100644 --- a/xml_converter/src/attribute/specialization_filter.cpp +++ b/xml_converter/src/attribute/specialization_filter.cpp @@ -1,7 +1,7 @@ #include "specialization_filter.hpp" SpecializationFilter parse_SpecializationFilter(rapidxml::xml_attribute<>* input, vector *errors) { - SpecializationFilter specialization_filter; - specialization_filter.parse(input, errors); - return specialization_filter; -} \ No newline at end of file + SpecializationFilter specialization_filter; + specialization_filter.parse(input, errors); + return specialization_filter; +} diff --git a/xml_converter/src/attribute/specialization_filter.hpp b/xml_converter/src/attribute/specialization_filter.hpp index 4beefe48..0fb2fe4b 100644 --- a/xml_converter/src/attribute/specialization_filter.hpp +++ b/xml_converter/src/attribute/specialization_filter.hpp @@ -1,85 +1,87 @@ #pragma once +#include +#include + #include "filter.hpp" #define FILTER_ITEM(...) CLASS_FILTER_ITEM(SpecializationFilter, __VA_ARGS__ ) class SpecializationFilter: public Filter { - // Heart of Thorns Spec - FILTER_ITEM(ranger_druid, "5") - FILTER_ITEM(thief_daredevil, "7") - FILTER_ITEM(warrior_berserker, "18") - FILTER_ITEM(guardian_dragonhunter, "27") - FILTER_ITEM(necromancer_reaper, "34") - FILTER_ITEM(mesmer_chronomancer, "40") - FILTER_ITEM(engineer_scrapper, "43") - FILTER_ITEM(elementalist_tempest, "48") - FILTER_ITEM(revenant_herald, "52") + // Heart of Thorns Spec + FILTER_ITEM(ranger_druid, "5") + FILTER_ITEM(thief_daredevil, "7") + FILTER_ITEM(warrior_berserker, "18") + FILTER_ITEM(guardian_dragonhunter, "27") + FILTER_ITEM(necromancer_reaper, "34") + FILTER_ITEM(mesmer_chronomancer, "40") + FILTER_ITEM(engineer_scrapper, "43") + FILTER_ITEM(elementalist_tempest, "48") + FILTER_ITEM(revenant_herald, "52") - // Path of Fire Spec - FILTER_ITEM(ranger_soulbeast, "55") - FILTER_ITEM(elementalist_weaver, "56") - FILTER_ITEM(engineer_holosmith, "57") - FILTER_ITEM(thief_deadeye, "58") - FILTER_ITEM(mesmer_mirage, "59") - FILTER_ITEM(necromancer_scourge, "60") - FILTER_ITEM(warrior_spellbreaker, "61") - FILTER_ITEM(guardian_firebrand, "62") - FILTER_ITEM(revenant_renegade, "63") + // Path of Fire Spec + FILTER_ITEM(ranger_soulbeast, "55") + FILTER_ITEM(elementalist_weaver, "56") + FILTER_ITEM(engineer_holosmith, "57") + FILTER_ITEM(thief_deadeye, "58") + FILTER_ITEM(mesmer_mirage, "59") + FILTER_ITEM(necromancer_scourge, "60") + FILTER_ITEM(warrior_spellbreaker, "61") + FILTER_ITEM(guardian_firebrand, "62") + FILTER_ITEM(revenant_renegade, "63") - // TODO: End of Dragons Spec + // TODO(#58): End of Dragons Spec - // Core Spec - FILTER_ITEM(mesmer_dueling, "1") - FILTER_ITEM(necromancer_death_magic, "2") - FILTER_ITEM(revenant_invocation, "3") - FILTER_ITEM(warrior_strength, "4") - FILTER_ITEM(engineer_explosives, "6") - FILTER_ITEM(ranger_marksmanship, "8") - FILTER_ITEM(revenant_retribution, "9") - FILTER_ITEM(mesmer_domination, "10") - FILTER_ITEM(warrior_tactics, "11") - FILTER_ITEM(revenant_salvation, "12") - FILTER_ITEM(guardian_valor, "13") - FILTER_ITEM(revenant_corruption, "14") - FILTER_ITEM(revenant_devastation, "15") - FILTER_ITEM(guardian_radiance, "16") - FILTER_ITEM(elementalist_water, "17") - FILTER_ITEM(necromancer_blood_magic, "19") - FILTER_ITEM(thief_shadow_arts, "20") - FILTER_ITEM(engineer_tools, "21") - FILTER_ITEM(warrior_defense, "22") - FILTER_ITEM(mesmer_inspiration, "23") - FILTER_ITEM(mesmer_illusions, "24") - FILTER_ITEM(ranger_nature_magic, "25") - FILTER_ITEM(elementalist_earth, "26") - FILTER_ITEM(thief_deadly_arts, "28") - FILTER_ITEM(engineer_alchemy, "29") - FILTER_ITEM(ranger_skirmishing, "30") - FILTER_ITEM(elementalist_fire, "31") - FILTER_ITEM(ranger_beastmastery, "32") - FILTER_ITEM(ranger_wilderness_survival, "33") - FILTER_ITEM(thief_critical_strikes, "35") - FILTER_ITEM(warrior_arms, "36") - FILTER_ITEM(elementalist_arcane, "37") - FILTER_ITEM(engineer_firearms, "38") - FILTER_ITEM(necromancer_curses, "39") - FILTER_ITEM(elementalist_air, "41") - FILTER_ITEM(guardian_zeal, "42") - FILTER_ITEM(thief_trickery, "44") - FILTER_ITEM(mesmer_chaos, "45") - FILTER_ITEM(guardian_virtues, "46") - FILTER_ITEM(engineer_inventions, "47") - FILTER_ITEM(guardian_honor, "49") - FILTER_ITEM(necromancer_soul_reaping, "50") - FILTER_ITEM(warrior_discipline, "51") - FILTER_ITEM(necromancer_spite, "53") - FILTER_ITEM(thief_acrobatics, "54") + // Core Spec + FILTER_ITEM(mesmer_dueling, "1") + FILTER_ITEM(necromancer_death_magic, "2") + FILTER_ITEM(revenant_invocation, "3") + FILTER_ITEM(warrior_strength, "4") + FILTER_ITEM(engineer_explosives, "6") + FILTER_ITEM(ranger_marksmanship, "8") + FILTER_ITEM(revenant_retribution, "9") + FILTER_ITEM(mesmer_domination, "10") + FILTER_ITEM(warrior_tactics, "11") + FILTER_ITEM(revenant_salvation, "12") + FILTER_ITEM(guardian_valor, "13") + FILTER_ITEM(revenant_corruption, "14") + FILTER_ITEM(revenant_devastation, "15") + FILTER_ITEM(guardian_radiance, "16") + FILTER_ITEM(elementalist_water, "17") + FILTER_ITEM(necromancer_blood_magic, "19") + FILTER_ITEM(thief_shadow_arts, "20") + FILTER_ITEM(engineer_tools, "21") + FILTER_ITEM(warrior_defense, "22") + FILTER_ITEM(mesmer_inspiration, "23") + FILTER_ITEM(mesmer_illusions, "24") + FILTER_ITEM(ranger_nature_magic, "25") + FILTER_ITEM(elementalist_earth, "26") + FILTER_ITEM(thief_deadly_arts, "28") + FILTER_ITEM(engineer_alchemy, "29") + FILTER_ITEM(ranger_skirmishing, "30") + FILTER_ITEM(elementalist_fire, "31") + FILTER_ITEM(ranger_beastmastery, "32") + FILTER_ITEM(ranger_wilderness_survival, "33") + FILTER_ITEM(thief_critical_strikes, "35") + FILTER_ITEM(warrior_arms, "36") + FILTER_ITEM(elementalist_arcane, "37") + FILTER_ITEM(engineer_firearms, "38") + FILTER_ITEM(necromancer_curses, "39") + FILTER_ITEM(elementalist_air, "41") + FILTER_ITEM(guardian_zeal, "42") + FILTER_ITEM(thief_trickery, "44") + FILTER_ITEM(mesmer_chaos, "45") + FILTER_ITEM(guardian_virtues, "46") + FILTER_ITEM(engineer_inventions, "47") + FILTER_ITEM(guardian_honor, "49") + FILTER_ITEM(necromancer_soul_reaping, "50") + FILTER_ITEM(warrior_discipline, "51") + FILTER_ITEM(necromancer_spite, "53") + FILTER_ITEM(thief_acrobatics, "54") virtual string classname() { return "SpecializationFilter"; } - }; #undef FILTER_ITEM -SpecializationFilter parse_SpecializationFilter(rapidxml::xml_attribute<>* input, vector *errors); \ No newline at end of file +SpecializationFilter parse_SpecializationFilter(rapidxml::xml_attribute<>* input, vector *errors); diff --git a/xml_converter/src/attribute/string.cpp b/xml_converter/src/attribute/string.cpp index 39a18e0c..7c7c1069 100644 --- a/xml_converter/src/attribute/string.cpp +++ b/xml_converter/src/attribute/string.cpp @@ -1,10 +1,12 @@ -#include "../rapidxml-1.13/rapidxml.hpp" +#include "string.hpp" + #include #include -#include "string.hpp" + +#include "../rapidxml-1.13/rapidxml.hpp" using namespace std; string parse_string(rapidxml::xml_attribute<>* input, vector *errors) { - return string(input->value()); + return string(input->value()); } diff --git a/xml_converter/src/attribute/string.hpp b/xml_converter/src/attribute/string.hpp index d47ade05..d74270c9 100644 --- a/xml_converter/src/attribute/string.hpp +++ b/xml_converter/src/attribute/string.hpp @@ -1,9 +1,10 @@ #pragma once -#include "../rapidxml-1.13/rapidxml.hpp" #include #include +#include "../rapidxml-1.13/rapidxml.hpp" + using namespace std; string parse_string(rapidxml::xml_attribute<>* input, vector *errors); diff --git a/xml_converter/src/category.cpp b/xml_converter/src/category.cpp index c1298488..4ca6e229 100644 --- a/xml_converter/src/category.cpp +++ b/xml_converter/src/category.cpp @@ -1,24 +1,21 @@ #include "category.hpp" -#include "attribute/string.hpp" -#include "attribute/bool.hpp" using namespace std; - string Cateogry::classname() { - return "MarkerCategory"; + return "MarkerCategory"; } void Cateogry::init_from_xml(rapidxml::xml_node<>* node, vector *errors) { - for (rapidxml::xml_attribute<>* attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()){ - bool is_icon_value = this->default_icon.init_xml_attribute(attribute, errors); - bool is_trail_value = this->default_trail.init_xml_attribute(attribute, errors); + for (rapidxml::xml_attribute<>* attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()) { + bool is_icon_value = this->default_icon.init_xml_attribute(attribute, errors); + bool is_trail_value = this->default_trail.init_xml_attribute(attribute, errors); - if (init_xml_attribute(attribute, errors)) {} - else if (is_icon_value || is_trail_value) {} - else { - errors->push_back("Unknown " + this->classname() + " attribute " + string(attribute->name())); - } - } + if (init_xml_attribute(attribute, errors)) {} + else if (is_icon_value || is_trail_value) {} + else { + errors->push_back("Unknown " + this->classname() + " attribute " + string(attribute->name())); + } + } } diff --git a/xml_converter/src/category.hpp b/xml_converter/src/category.hpp index 013a0c9e..0a0addea 100644 --- a/xml_converter/src/category.hpp +++ b/xml_converter/src/category.hpp @@ -1,10 +1,13 @@ -#include "rapidxml-1.13/rapidxml.hpp" +#pragma once -#include #include +#include + #include "icon.hpp" -#include "trail.hpp" #include "parseable.hpp" +#include "rapidxml-1.13/rapidxml.hpp" +#include "trail.hpp" + using namespace std; @@ -13,28 +16,27 @@ using namespace std; #define PARSEABLE_SUBVAR(...) CLASS_PARSEABLE_SUBVAR(Cateogry, __VA_ARGS__ ) class Cateogry: public Parseable { -public: - // https://blishhud.com/docs/markers/attributes/defaulttoggle - PARSEABLE_VAR(default_toggle, bool, "DefaultToggle") - - // https://blishhud.com/docs/markers/attributes/displayname - PARSEABLE_VAR(display_name, string, "DisplayName") + public: + // https://blishhud.com/docs/markers/attributes/defaulttoggle + PARSEABLE_VAR(default_toggle, bool, "DefaultToggle") - // https://blishhud.com/docs/markers/attributes/isseparator - PARSEABLE_VAR(is_separator, bool, "IsSeparator") + // https://blishhud.com/docs/markers/attributes/displayname + PARSEABLE_VAR(display_name, string, "DisplayName") - // Not Documented on blishhud - PARSEABLE_VAR(name, string, "Name") + // https://blishhud.com/docs/markers/attributes/isseparator + PARSEABLE_VAR(is_separator, bool, "IsSeparator") + // Not Documented on blishhud + PARSEABLE_VAR(name, string, "Name") - vector children; - Icon default_icon; - Trail default_trail; + vector children; + Icon default_icon; + Trail default_trail; - virtual string classname(); - void init_from_xml(rapidxml::xml_node<>* node, vector *errors); + virtual string classname(); + void init_from_xml(rapidxml::xml_node<>* node, vector *errors); }; #undef PARSEABLE_VAR diff --git a/xml_converter/src/icon.cpp b/xml_converter/src/icon.cpp index 54c1eabd..9926eec9 100644 --- a/xml_converter/src/icon.cpp +++ b/xml_converter/src/icon.cpp @@ -1,16 +1,7 @@ -#include "attribute/string.hpp" -#include "attribute/float.hpp" -#include "attribute/int.hpp" -#include "attribute/bool.hpp" - -#include "rapidxml-1.13/rapidxml.hpp" - #include "icon.hpp" -#include -#include using namespace std; string Icon::classname() { - return "POI"; + return "POI"; } diff --git a/xml_converter/src/icon.hpp b/xml_converter/src/icon.hpp index 63d99cb4..dd46c265 100644 --- a/xml_converter/src/icon.hpp +++ b/xml_converter/src/icon.hpp @@ -1,28 +1,26 @@ #pragma once -#include "rapidxml-1.13/rapidxml.hpp" -#include "rapidxml-1.13/rapidxml_print.hpp" -#include "parseable.hpp" +#include +#include +#include "attribute/bool.hpp" #include "attribute/chirality.hpp" #include "attribute/color.hpp" #include "attribute/euler_angle.hpp" #include "attribute/festival_filter.hpp" -#include "attribute/int.hpp" -#include "attribute/profession_filter.hpp" #include "attribute/float.hpp" -#include "attribute/bool.hpp" -#include "attribute/string.hpp" -#include "attribute/specialization_filter.hpp" -#include "attribute/race_filter.hpp" +#include "attribute/int.hpp" #include "attribute/map_type_filter.hpp" #include "attribute/mount_filter.hpp" #include "attribute/position.hpp" - +#include "attribute/profession_filter.hpp" +#include "attribute/race_filter.hpp" +#include "attribute/specialization_filter.hpp" +#include "attribute/string.hpp" +#include "parseable.hpp" +#include "rapidxml-1.13/rapidxml.hpp" #include "string_helper.hpp" -#include -#include using namespace std; @@ -31,155 +29,142 @@ using namespace std; #define PARSEABLE_SUBVAR(...) CLASS_PARSEABLE_SUBVAR(Icon, __VA_ARGS__ ) class Icon: public Parseable { -private: - // https://blishhud.com/docs/markers/attributes/achievement - PARSEABLE_VAR(achievement_id, int, "AchievementId") - PARSEABLE_VAR(achievement_bit, int, "AchievementBit") - - // https://blishhud.com/docs/markers/attributes/alpha - PARSEABLE_VAR(alpha, float, "Alpha") - - // https://blishhud.com/docs/markers/attributes/autotrigger - PARSEABLE_VAR(auto_trigger, bool, "AutoTrigger") - - // https://blishhud.com/docs/markers/attributes/behavior - PARSEABLE_VAR(behavior, int, "Behavior") - - // https://blishhud.com/docs/markers/attributes/bounce - PARSEABLE_VAR(bounce_height, float, "BounceHeight") - PARSEABLE_VAR(bounce_duration, float, "BounceDuration") - PARSEABLE_VAR(bounce_delay, float, "BounceDelay") - - // https://blishhud.com/docs/markers/attributes/canfade - PARSEABLE_VAR(can_fade, bool, "CanFade") - - // https://blishhud.com/docs/markers/attributes/color - PARSEABLE_VAR(color, Color, "Color") - - // https://blishhud.com/docs/markers/attributes/copy - PARSEABLE_VAR(copy, string, "Copy") - PARSEABLE_VAR(copy_message, string, "CopyMessage") - - // https://blishhud.com/docs/markers/attributes/cull - PARSEABLE_VAR(cull, Chirality, "Cull") - - // https://blishhud.com/docs/markers/attributes/fade - PARSEABLE_VAR(fade_near, float, "FadeNear") - PARSEABLE_VAR(fade_far, float, "FadeFar") - - // https://blishhud.com/docs/markers/attributes/festival - PARSEABLE_VAR(festival_filter, FestivalFilter, "Festival") - - // https://blishhud.com/docs/markers/attributes/guid - PARSEABLE_VAR(guid, string, "GUID") - - // https://blishhud.com/docs/markers/attributes/heightoffset - PARSEABLE_VAR(height_offset, float, "HeightOffset") - - // https://blishhud.com/docs/markers/attributes/iconfile - PARSEABLE_VAR(icon_file, string, "IconFile") + private: + // https://blishhud.com/docs/markers/attributes/achievement + PARSEABLE_VAR(achievement_id, int, "AchievementId") + PARSEABLE_VAR(achievement_bit, int, "AchievementBit") - // https://blishhud.com/docs/markers/attributes/iconsize - PARSEABLE_VAR(icon_size, float, "IconSize") + // https://blishhud.com/docs/markers/attributes/alpha + PARSEABLE_VAR(alpha, float, "Alpha") - // https://blishhud.com/docs/markers/attributes/info - PARSEABLE_VAR(info, string, "Info") - PARSEABLE_VAR(info_range, float, "InfoRange") + // https://blishhud.com/docs/markers/attributes/autotrigger + PARSEABLE_VAR(auto_trigger, bool, "AutoTrigger") - // https://blishhud.com/docs/markers/attributes/invertbehavior - PARSEABLE_VAR(invert_behavior, bool, "InvertBehavior") + // https://blishhud.com/docs/markers/attributes/behavior + PARSEABLE_VAR(behavior, int, "Behavior") - // https://blishhud.com/docs/markers/attributes/mapdisplaysize - PARSEABLE_VAR(map_display_size, float, "MapDisplaySize") + // https://blishhud.com/docs/markers/attributes/bounce + PARSEABLE_VAR(bounce_height, float, "BounceHeight") + PARSEABLE_VAR(bounce_duration, float, "BounceDuration") + PARSEABLE_VAR(bounce_delay, float, "BounceDelay") - // https://blishhud.com/docs/markers/attributes/mapid - PARSEABLE_VAR(map_id, int, "MapId") + // https://blishhud.com/docs/markers/attributes/canfade + PARSEABLE_VAR(can_fade, bool, "CanFade") - // https://blishhud.com/docs/markers/attributes/maptype - PARSEABLE_VAR(map_type_filter, MapTypeFilter, "MapType") + // https://blishhud.com/docs/markers/attributes/color + PARSEABLE_VAR(color, Color, "Color") - // https://blishhud.com/docs/markers/attributes/mount - PARSEABLE_VAR(mount_filter, MountFilter, "Mount") + // https://blishhud.com/docs/markers/attributes/copy + PARSEABLE_VAR(copy, string, "Copy") + PARSEABLE_VAR(copy_message, string, "CopyMessage") - // https://blishhud.com/docs/markers/attributes/position - PARSEABLE_VAR(position, Position, "Position") - PARSEABLE_SUBVAR(position, x, Position, float, "XPos", "PositionX") - PARSEABLE_SUBVAR(position, y, Position, float, "YPos", "PositionY") - PARSEABLE_SUBVAR(position, z, Position, float, "ZPos", "PositionZ") + // https://blishhud.com/docs/markers/attributes/cull + PARSEABLE_VAR(cull, Chirality, "Cull") - // https://blishhud.com/docs/markers/attributes/profession - PARSEABLE_VAR(profession_filter, ProfessionFilter, "Profession") + // https://blishhud.com/docs/markers/attributes/fade + PARSEABLE_VAR(fade_near, float, "FadeNear") + PARSEABLE_VAR(fade_far, float, "FadeFar") - // https://blishhud.com/docs/markers/attributes/race - PARSEABLE_VAR(race_filter, RaceFilter, "Race") + // https://blishhud.com/docs/markers/attributes/festival + PARSEABLE_VAR(festival_filter, FestivalFilter, "Festival") - // https://blishhud.com/docs/markers/attributes/resetlength - PARSEABLE_VAR(reset_length, float, "ResetLength", "ResetLenght") + // https://blishhud.com/docs/markers/attributes/guid + PARSEABLE_VAR(guid, string, "GUID") - // https://blishhud.com/docs/markers/attributes/rotate - PARSEABLE_VAR(rotation, EulerAngle, "Rotate") - PARSEABLE_SUBVAR(rotation, x, EulerAngle, float, "RotateX") - PARSEABLE_SUBVAR(rotation, y, EulerAngle, float, "RotateY") - PARSEABLE_SUBVAR(rotation, z, EulerAngle, float, "RotateZ") + // https://blishhud.com/docs/markers/attributes/heightoffset + PARSEABLE_VAR(height_offset, float, "HeightOffset") + // https://blishhud.com/docs/markers/attributes/iconfile + PARSEABLE_VAR(icon_file, string, "IconFile") - // https://blishhud.com/docs/markers/attributes/scaleonmapwithzoom - PARSEABLE_VAR(scale_on_map_with_zoom, bool, "ScaleOnMapWithZoom") + // https://blishhud.com/docs/markers/attributes/iconsize + PARSEABLE_VAR(icon_size, float, "IconSize") - // https://blishhud.com/docs/markers/attributes/schedule - // Not including parsing support for now due to complexity and lack of practical uses - PARSEABLE_VAR(schedule, string, "Schedule") - PARSEABLE_VAR(schedule_duration, int, "ScheduleDuration") + // https://blishhud.com/docs/markers/attributes/info + PARSEABLE_VAR(info, string, "Info") + PARSEABLE_VAR(info_range, float, "InfoRange") - // https://blishhud.com/docs/markers/attributes/showhide - PARSEABLE_VAR(show, string, "Show") - PARSEABLE_VAR(hide, string, "Hide") + // https://blishhud.com/docs/markers/attributes/invertbehavior + PARSEABLE_VAR(invert_behavior, bool, "InvertBehavior") - // https://blishhud.com/docs/markers/attributes/size - PARSEABLE_VAR(min_size, float, "MinSize", "nimSize") - PARSEABLE_VAR(max_size, float, "MaxSize") + // https://blishhud.com/docs/markers/attributes/mapdisplaysize + PARSEABLE_VAR(map_display_size, float, "MapDisplaySize") - // https://blishhud.com/docs/markers/attributes/specialization - PARSEABLE_VAR(specialization_filter, SpecializationFilter, "Specialization") + // https://blishhud.com/docs/markers/attributes/mapid + PARSEABLE_VAR(map_id, int, "MapId") - // https://blishhud.com/docs/markers/attributes/tip - // INFO: This seems to only be partially defined for blishud between how it - // works with markers vs categories. - PARSEABLE_VAR(tip_name, string, "TipName") - PARSEABLE_VAR(tip_description, string, "TipDescription") + // https://blishhud.com/docs/markers/attributes/maptype + PARSEABLE_VAR(map_type_filter, MapTypeFilter, "MapType") - // https://blishhud.com/docs/markers/attributes/toggle - PARSEABLE_VAR(toggle, string, "Toggle", "ToggleCategory") + // https://blishhud.com/docs/markers/attributes/mount + PARSEABLE_VAR(mount_filter, MountFilter, "Mount") - // https://blishhud.com/docs/markers/attributes/triggerrange - PARSEABLE_VAR(trigger_range, float, "TriggerRange") + // https://blishhud.com/docs/markers/attributes/position + PARSEABLE_VAR(position, Position, "Position") + PARSEABLE_SUBVAR(position, x, Position, float, "XPos", "PositionX") + PARSEABLE_SUBVAR(position, y, Position, float, "YPos", "PositionY") + PARSEABLE_SUBVAR(position, z, Position, float, "ZPos", "PositionZ") - // https://blishhud.com/docs/markers/attributes/type - PARSEABLE_VAR(category, string, "Type") + // https://blishhud.com/docs/markers/attributes/profession + PARSEABLE_VAR(profession_filter, ProfessionFilter, "Profession") - // https://blishhud.com/docs/markers/attributes/visibility - PARSEABLE_VAR(visible_on_minimap, bool, "MinimapVisibility", "BHMinimapVisibility") - PARSEABLE_VAR(visible_on_map, bool, "MapVisibility", "BHMapVisibility") - PARSEABLE_VAR(visible_ingame, bool, "IngameVisibility", "BHIngameVisibility") + // https://blishhud.com/docs/markers/attributes/race + PARSEABLE_VAR(race_filter, RaceFilter, "Race") + // https://blishhud.com/docs/markers/attributes/resetlength + PARSEABLE_VAR(reset_length, float, "ResetLength", "ResetLenght") + // https://blishhud.com/docs/markers/attributes/rotate + PARSEABLE_VAR(rotation, EulerAngle, "Rotate") + PARSEABLE_SUBVAR(rotation, x, EulerAngle, float, "RotateX") + PARSEABLE_SUBVAR(rotation, y, EulerAngle, float, "RotateY") + PARSEABLE_SUBVAR(rotation, z, EulerAngle, float, "RotateZ") + // https://blishhud.com/docs/markers/attributes/scaleonmapwithzoom + PARSEABLE_VAR(scale_on_map_with_zoom, bool, "ScaleOnMapWithZoom") + // https://blishhud.com/docs/markers/attributes/schedule + // Not including parsing support for now due to complexity and lack of practical uses + PARSEABLE_VAR(schedule, string, "Schedule") + PARSEABLE_VAR(schedule_duration, int, "ScheduleDuration") - // TODO: not supported by blishud's docs - PARSEABLE_VAR(reset_offset, float, "ResetOffset") - PARSEABLE_VAR(has_countdown, bool, "HasCountdown") + // https://blishhud.com/docs/markers/attributes/showhide + PARSEABLE_VAR(show, string, "Show") + PARSEABLE_VAR(hide, string, "Hide") + // https://blishhud.com/docs/markers/attributes/size + PARSEABLE_VAR(min_size, float, "MinSize", "nimSize") + PARSEABLE_VAR(max_size, float, "MaxSize") + // https://blishhud.com/docs/markers/attributes/specialization + PARSEABLE_VAR(specialization_filter, SpecializationFilter, "Specialization") + // https://blishhud.com/docs/markers/attributes/tip + // INFO: This seems to only be partially defined for blishud between how it + // works with markers vs categories. + PARSEABLE_VAR(tip_name, string, "TipName") + PARSEABLE_VAR(tip_description, string, "TipDescription") + // https://blishhud.com/docs/markers/attributes/toggle + PARSEABLE_VAR(toggle, string, "Toggle", "ToggleCategory") + // https://blishhud.com/docs/markers/attributes/triggerrange + PARSEABLE_VAR(trigger_range, float, "TriggerRange") + // https://blishhud.com/docs/markers/attributes/type + PARSEABLE_VAR(category, string, "Type") + // https://blishhud.com/docs/markers/attributes/visibility + PARSEABLE_VAR(visible_on_minimap, bool, "MinimapVisibility", "BHMinimapVisibility") + PARSEABLE_VAR(visible_on_map, bool, "MapVisibility", "BHMapVisibility") + PARSEABLE_VAR(visible_ingame, bool, "IngameVisibility", "BHIngameVisibility") + // Not supported by blishud's docs + PARSEABLE_VAR(reset_offset, float, "ResetOffset") + PARSEABLE_VAR(has_countdown, bool, "HasCountdown") - virtual string classname(); + virtual string classname(); }; #undef PARSEABLE_VAR diff --git a/xml_converter/src/parseable.cpp b/xml_converter/src/parseable.cpp index 4345a8f1..8cffba32 100644 --- a/xml_converter/src/parseable.cpp +++ b/xml_converter/src/parseable.cpp @@ -1,24 +1,23 @@ -#include "rapidxml-1.13/rapidxml.hpp" - #include "parseable.hpp" -#include "string_helper.hpp" - -#include +#include +#include #include +#include +#include #include #include #include #include #include -#include -#include -#include -#include -using namespace std; +#include "rapidxml-1.13/rapidxml.hpp" +#include "string_helper.hpp" + +using namespace std; +// Initalize Static variables. uint64_t Parseable::_counter = 0; map Parseable::original; map*, vector*)>> Parseable::lookup; @@ -26,59 +25,58 @@ map*, vector* node, vector *errors) { - - for (rapidxml::xml_attribute<>* attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()){ - if (init_xml_attribute(attribute, errors)) {} - else { - errors->push_back("Unknown " + this->classname() + " attribute " + string(attribute->name())); - } - } + for (rapidxml::xml_attribute<>* attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()) { + if (init_xml_attribute(attribute, errors)) {} + else { + errors->push_back("Unknown " + this->classname() + " attribute " + string(attribute->name())); + } + } } bool Parseable::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors) { - const char* type_id = typeid(*this).name(); - auto variable_list = &lookup[type_id]; + const char* type_id = typeid(*this).name(); + auto variable_list = &lookup[type_id]; - string item = normalize_type_name(attribute->name()); + string item = normalize_type_name(attribute->name()); - auto iterator = variable_list->find(item); + auto iterator = variable_list->find(item); - if (iterator == variable_list->end()) { - errors->push_back("Unknown " + this->classname() + " option " + item); - return false; - } + if (iterator == variable_list->end()) { + errors->push_back("Unknown " + this->classname() + " option " + item); + return false; + } - iterator->second(this, attribute, errors); - return true; + iterator->second(this, attribute, errors); + return true; } bool Parseable::setup_variable( - void (*function)(void*, rapidxml::xml_attribute<>*, vector*), - vector names + void (*function)(void*, rapidxml::xml_attribute<>*, vector*), + vector names ) { - const char* type_id = typeid(*this).name(); - auto iterator = original.find(type_id); - - if (iterator != original.end() && iterator->second != this->_id) { - return false; - } - original[type_id] = this->_id; - - // Grab a pointer to the lookup data for this subclass so we can edit it. - map*, vector*)>* variable_list = &lookup[type_id]; - - // Insert all of the names for this field, error on duplicates. - for (auto name: names) { - if (variable_list->count(name)) { - throw; - } - (*variable_list)[normalize_type_name(name)] = function; - } - return false; + const char* type_id = typeid(*this).name(); + auto iterator = original.find(type_id); + + if (iterator != original.end() && iterator->second != this->_id) { + return false; + } + original[type_id] = this->_id; + + // Grab a pointer to the lookup data for this subclass so we can edit it. + map*, vector*)>* variable_list = &lookup[type_id]; + + // Insert all of the names for this field, error on duplicates. + for (auto name : names) { + if (variable_list->count(name)) { + throw; + } + (*variable_list)[normalize_type_name(name)] = function; + } + return false; } diff --git a/xml_converter/src/parseable.hpp b/xml_converter/src/parseable.hpp index 72aa613c..4cba29ff 100644 --- a/xml_converter/src/parseable.hpp +++ b/xml_converter/src/parseable.hpp @@ -1,44 +1,41 @@ #pragma once -#include "rapidxml-1.13/rapidxml.hpp" -#include "rapidxml-1.13/rapidxml_print.hpp" - #include #include #include + +#include "rapidxml-1.13/rapidxml.hpp" + using namespace std; #define CLASS_PARSEABLE_VAR(parseableclassname, varname, vartype, ...) \ - vartype varname; \ - static void assign_##varname(void* obj, rapidxml::xml_attribute<>* input, vector *errors) { \ - (*(parseableclassname*)obj).varname = parse_##vartype(input, errors); \ - } \ - bool is_##varname##_set = setup_variable(assign_##varname, { __VA_ARGS__ }); + vartype varname; \ + static void assign_##varname(void* obj, rapidxml::xml_attribute<>* input, vector *errors) { \ + (*(parseableclassname*)obj).varname = parse_##vartype(input, errors); \ + } \ + bool is_##varname##_set = setup_variable(assign_##varname, { __VA_ARGS__ }); #define CLASS_PARSEABLE_SUBVAR(parseableclassname, varname, subvarname, vartype, subvartype, ...) \ - static void assign_##varname##_##subvarname(void* obj, rapidxml::xml_attribute<>* input, vector *errors) { \ - (*(parseableclassname*)obj).varname.subvarname = parse_##subvartype(input, errors); \ - }\ - bool is_##varname##_##subvarname##_set = setup_variable(assign_##varname##_##subvarname, { __VA_ARGS__ }); + static void assign_##varname##_##subvarname(void* obj, rapidxml::xml_attribute<>* input, vector *errors) { \ + (*(parseableclassname*)obj).varname.subvarname = parse_##subvartype(input, errors); \ + }\ + bool is_##varname##_##subvarname##_set = setup_variable(assign_##varname##_##subvarname, { __VA_ARGS__ }); class Parseable { - static uint64_t _counter; - uint64_t _id = ++_counter; - - static map original; - static map*, vector*)>> lookup; + static uint64_t _counter; + uint64_t _id = ++_counter; -public: - bool setup_variable( - void (*function)(void*, rapidxml::xml_attribute<>*, vector*), - vector names - ); + static map original; + static map*, vector*)>> lookup; + public: + bool setup_variable( + void (*function)(void*, rapidxml::xml_attribute<>*, vector*), + vector names); -public: - virtual string classname(); - void init_from_xml(rapidxml::xml_node<>* node, vector *errors); - bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors); + virtual string classname(); + void init_from_xml(rapidxml::xml_node<>* node, vector *errors); + bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors); }; diff --git a/xml_converter/src/rapidxml-1.13/license.txt b/xml_converter/src/rapidxml-1.13/license.txt new file mode 100644 index 00000000..0095bc72 --- /dev/null +++ b/xml_converter/src/rapidxml-1.13/license.txt @@ -0,0 +1,52 @@ +Use of this software is granted under one of the following two licenses, +to be chosen freely by the user. + +1. Boost Software License - Version 1.0 - August 17th, 2003 +=============================================================================== + +Copyright (c) 2006, 2007 Marcin Kalicinski + +Permission is hereby granted, free of charge, to any person or organization +obtaining a copy of the software and accompanying documentation covered by +this license (the "Software") to use, reproduce, display, distribute, +execute, and transmit the Software, and to prepare derivative works of the +Software, and to permit third-parties to whom the Software is furnished to +do so, all subject to the following: + +The copyright notices in the Software and this entire statement, including +the above license grant, this restriction and the following disclaimer, +must be included in all copies of the Software, in whole or in part, and +all derivative works of the Software, unless such copies or derivative +works are solely in the form of machine-executable object code generated by +a source language processor. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT +SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE +FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +2. The MIT License +=============================================================================== + +Copyright (c) 2006, 2007 Marcin Kalicinski + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. diff --git a/xml_converter/src/rapidxml-1.13/rapidxml.hpp b/xml_converter/src/rapidxml-1.13/rapidxml.hpp new file mode 100644 index 00000000..6b82f20a --- /dev/null +++ b/xml_converter/src/rapidxml-1.13/rapidxml.hpp @@ -0,0 +1,2596 @@ +#ifndef RAPIDXML_HPP_INCLUDED +#define RAPIDXML_HPP_INCLUDED + +// Copyright (C) 2006, 2009 Marcin Kalicinski +// Version 1.13 +// Revision $DateTime: 2009/05/13 01:46:17 $ +//! \file rapidxml.hpp This file contains rapidxml parser and DOM implementation + +// If standard library is disabled, user must provide implementations of required functions and typedefs +#if !defined(RAPIDXML_NO_STDLIB) + #include // For std::size_t + #include // For assert + #include // For placement new +#endif + +// On MSVC, disable "conditional expression is constant" warning (level 4). +// This warning is almost impossible to avoid with certain types of templated code +#ifdef _MSC_VER + #pragma warning(push) + #pragma warning(disable:4127) // Conditional expression is constant +#endif + +/////////////////////////////////////////////////////////////////////////// +// RAPIDXML_PARSE_ERROR + +#if defined(RAPIDXML_NO_EXCEPTIONS) + +#define RAPIDXML_PARSE_ERROR(what, where) { parse_error_handler(what, where); assert(0); } + +namespace rapidxml +{ + //! When exceptions are disabled by defining RAPIDXML_NO_EXCEPTIONS, + //! this function is called to notify user about the error. + //! It must be defined by the user. + //!

+ //! This function cannot return. If it does, the results are undefined. + //!

+ //! A very simple definition might look like that: + //!
+    //! void %rapidxml::%parse_error_handler(const char *what, void *where)
+    //! {
+    //!     std::cout << "Parse error: " << what << "\n";
+    //!     std::abort();
+    //! }
+    //! 
+ //! \param what Human readable description of the error. + //! \param where Pointer to character data where error was detected. + void parse_error_handler(const char *what, void *where); +} + +#else + +#include // For std::exception + +#define RAPIDXML_PARSE_ERROR(what, where) throw parse_error(what, where) + +namespace rapidxml +{ + + //! Parse error exception. + //! This exception is thrown by the parser when an error occurs. + //! Use what() function to get human-readable error message. + //! Use where() function to get a pointer to position within source text where error was detected. + //!

+ //! If throwing exceptions by the parser is undesirable, + //! it can be disabled by defining RAPIDXML_NO_EXCEPTIONS macro before rapidxml.hpp is included. + //! This will cause the parser to call rapidxml::parse_error_handler() function instead of throwing an exception. + //! This function must be defined by the user. + //!

+ //! This class derives from std::exception class. + class parse_error: public std::exception + { + + public: + + //! Constructs parse error + parse_error(const char *what, void *where) + : m_what(what) + , m_where(where) + { + } + + //! Gets human readable description of error. + //! \return Pointer to null terminated description of the error. + virtual const char *what() const throw() + { + return m_what; + } + + //! Gets pointer to character data where error happened. + //! Ch should be the same as char type of xml_document that produced the error. + //! \return Pointer to location within the parsed string where error occured. + template + Ch *where() const + { + return reinterpret_cast(m_where); + } + + private: + + const char *m_what; + void *m_where; + + }; +} + +#endif + +/////////////////////////////////////////////////////////////////////////// +// Pool sizes + +#ifndef RAPIDXML_STATIC_POOL_SIZE + // Size of static memory block of memory_pool. + // Define RAPIDXML_STATIC_POOL_SIZE before including rapidxml.hpp if you want to override the default value. + // No dynamic memory allocations are performed by memory_pool until static memory is exhausted. + #define RAPIDXML_STATIC_POOL_SIZE (64 * 1024) +#endif + +#ifndef RAPIDXML_DYNAMIC_POOL_SIZE + // Size of dynamic memory block of memory_pool. + // Define RAPIDXML_DYNAMIC_POOL_SIZE before including rapidxml.hpp if you want to override the default value. + // After the static block is exhausted, dynamic blocks with approximately this size are allocated by memory_pool. + #define RAPIDXML_DYNAMIC_POOL_SIZE (64 * 1024) +#endif + +#ifndef RAPIDXML_ALIGNMENT + // Memory allocation alignment. + // Define RAPIDXML_ALIGNMENT before including rapidxml.hpp if you want to override the default value, which is the size of pointer. + // All memory allocations for nodes, attributes and strings will be aligned to this value. + // This must be a power of 2 and at least 1, otherwise memory_pool will not work. + #define RAPIDXML_ALIGNMENT sizeof(void *) +#endif + +namespace rapidxml +{ + // Forward declarations + template class xml_node; + template class xml_attribute; + template class xml_document; + + //! Enumeration listing all node types produced by the parser. + //! Use xml_node::type() function to query node type. + enum node_type + { + node_document, //!< A document node. Name and value are empty. + node_element, //!< An element node. Name contains element name. Value contains text of first data node. + node_data, //!< A data node. Name is empty. Value contains data text. + node_cdata, //!< A CDATA node. Name is empty. Value contains data text. + node_comment, //!< A comment node. Name is empty. Value contains comment text. + node_declaration, //!< A declaration node. Name and value are empty. Declaration parameters (version, encoding and standalone) are in node attributes. + node_doctype, //!< A DOCTYPE node. Name is empty. Value contains DOCTYPE text. + node_pi //!< A PI node. Name contains target. Value contains instructions. + }; + + /////////////////////////////////////////////////////////////////////// + // Parsing flags + + //! Parse flag instructing the parser to not create data nodes. + //! Text of first data node will still be placed in value of parent element, unless rapidxml::parse_no_element_values flag is also specified. + //! Can be combined with other flags by use of | operator. + //!

+ //! See xml_document::parse() function. + const int parse_no_data_nodes = 0x1; + + //! Parse flag instructing the parser to not use text of first data node as a value of parent element. + //! Can be combined with other flags by use of | operator. + //! Note that child data nodes of element node take precendence over its value when printing. + //! That is, if element has one or more child data nodes and a value, the value will be ignored. + //! Use rapidxml::parse_no_data_nodes flag to prevent creation of data nodes if you want to manipulate data using values of elements. + //!

+ //! See xml_document::parse() function. + const int parse_no_element_values = 0x2; + + //! Parse flag instructing the parser to not place zero terminators after strings in the source text. + //! By default zero terminators are placed, modifying source text. + //! Can be combined with other flags by use of | operator. + //!

+ //! See xml_document::parse() function. + const int parse_no_string_terminators = 0x4; + + //! Parse flag instructing the parser to not translate entities in the source text. + //! By default entities are translated, modifying source text. + //! Can be combined with other flags by use of | operator. + //!

+ //! See xml_document::parse() function. + const int parse_no_entity_translation = 0x8; + + //! Parse flag instructing the parser to disable UTF-8 handling and assume plain 8 bit characters. + //! By default, UTF-8 handling is enabled. + //! Can be combined with other flags by use of | operator. + //!

+ //! See xml_document::parse() function. + const int parse_no_utf8 = 0x10; + + //! Parse flag instructing the parser to create XML declaration node. + //! By default, declaration node is not created. + //! Can be combined with other flags by use of | operator. + //!

+ //! See xml_document::parse() function. + const int parse_declaration_node = 0x20; + + //! Parse flag instructing the parser to create comments nodes. + //! By default, comment nodes are not created. + //! Can be combined with other flags by use of | operator. + //!

+ //! See xml_document::parse() function. + const int parse_comment_nodes = 0x40; + + //! Parse flag instructing the parser to create DOCTYPE node. + //! By default, doctype node is not created. + //! Although W3C specification allows at most one DOCTYPE node, RapidXml will silently accept documents with more than one. + //! Can be combined with other flags by use of | operator. + //!

+ //! See xml_document::parse() function. + const int parse_doctype_node = 0x80; + + //! Parse flag instructing the parser to create PI nodes. + //! By default, PI nodes are not created. + //! Can be combined with other flags by use of | operator. + //!

+ //! See xml_document::parse() function. + const int parse_pi_nodes = 0x100; + + //! Parse flag instructing the parser to validate closing tag names. + //! If not set, name inside closing tag is irrelevant to the parser. + //! By default, closing tags are not validated. + //! Can be combined with other flags by use of | operator. + //!

+ //! See xml_document::parse() function. + const int parse_validate_closing_tags = 0x200; + + //! Parse flag instructing the parser to trim all leading and trailing whitespace of data nodes. + //! By default, whitespace is not trimmed. + //! This flag does not cause the parser to modify source text. + //! Can be combined with other flags by use of | operator. + //!

+ //! See xml_document::parse() function. + const int parse_trim_whitespace = 0x400; + + //! Parse flag instructing the parser to condense all whitespace runs of data nodes to a single space character. + //! Trimming of leading and trailing whitespace of data is controlled by rapidxml::parse_trim_whitespace flag. + //! By default, whitespace is not normalized. + //! If this flag is specified, source text will be modified. + //! Can be combined with other flags by use of | operator. + //!

+ //! See xml_document::parse() function. + const int parse_normalize_whitespace = 0x800; + + // Compound flags + + //! Parse flags which represent default behaviour of the parser. + //! This is always equal to 0, so that all other flags can be simply ored together. + //! Normally there is no need to inconveniently disable flags by anding with their negated (~) values. + //! This also means that meaning of each flag is a negation of the default setting. + //! For example, if flag name is rapidxml::parse_no_utf8, it means that utf-8 is enabled by default, + //! and using the flag will disable it. + //!

+ //! See xml_document::parse() function. + const int parse_default = 0; + + //! A combination of parse flags that forbids any modifications of the source text. + //! This also results in faster parsing. However, note that the following will occur: + //!
    + //!
  • names and values of nodes will not be zero terminated, you have to use xml_base::name_size() and xml_base::value_size() functions to determine where name and value ends
  • + //!
  • entities will not be translated
  • + //!
  • whitespace will not be normalized
  • + //!
+ //! See xml_document::parse() function. + const int parse_non_destructive = parse_no_string_terminators | parse_no_entity_translation; + + //! A combination of parse flags resulting in fastest possible parsing, without sacrificing important data. + //!

+ //! See xml_document::parse() function. + const int parse_fastest = parse_non_destructive | parse_no_data_nodes; + + //! A combination of parse flags resulting in largest amount of data being extracted. + //! This usually results in slowest parsing. + //!

+ //! See xml_document::parse() function. + const int parse_full = parse_declaration_node | parse_comment_nodes | parse_doctype_node | parse_pi_nodes | parse_validate_closing_tags; + + /////////////////////////////////////////////////////////////////////// + // Internals + + //! \cond internal + namespace internal + { + + // Struct that contains lookup tables for the parser + // It must be a template to allow correct linking (because it has static data members, which are defined in a header file). + template + struct lookup_tables + { + static const unsigned char lookup_whitespace[256]; // Whitespace table + static const unsigned char lookup_node_name[256]; // Node name table + static const unsigned char lookup_text[256]; // Text table + static const unsigned char lookup_text_pure_no_ws[256]; // Text table + static const unsigned char lookup_text_pure_with_ws[256]; // Text table + static const unsigned char lookup_attribute_name[256]; // Attribute name table + static const unsigned char lookup_attribute_data_1[256]; // Attribute data table with single quote + static const unsigned char lookup_attribute_data_1_pure[256]; // Attribute data table with single quote + static const unsigned char lookup_attribute_data_2[256]; // Attribute data table with double quotes + static const unsigned char lookup_attribute_data_2_pure[256]; // Attribute data table with double quotes + static const unsigned char lookup_digits[256]; // Digits + static const unsigned char lookup_upcase[256]; // To uppercase conversion table for ASCII characters + }; + + // Find length of the string + template + inline std::size_t measure(const Ch *p) + { + const Ch *tmp = p; + while (*tmp) + ++tmp; + return tmp - p; + } + + // Compare strings for equality + template + inline bool compare(const Ch *p1, std::size_t size1, const Ch *p2, std::size_t size2, bool case_sensitive) + { + if (size1 != size2) + return false; + if (case_sensitive) + { + for (const Ch *end = p1 + size1; p1 < end; ++p1, ++p2) + if (*p1 != *p2) + return false; + } + else + { + for (const Ch *end = p1 + size1; p1 < end; ++p1, ++p2) + if (lookup_tables<0>::lookup_upcase[static_cast(*p1)] != lookup_tables<0>::lookup_upcase[static_cast(*p2)]) + return false; + } + return true; + } + } + //! \endcond + + /////////////////////////////////////////////////////////////////////// + // Memory pool + + //! This class is used by the parser to create new nodes and attributes, without overheads of dynamic memory allocation. + //! In most cases, you will not need to use this class directly. + //! However, if you need to create nodes manually or modify names/values of nodes, + //! you are encouraged to use memory_pool of relevant xml_document to allocate the memory. + //! Not only is this faster than allocating them by using new operator, + //! but also their lifetime will be tied to the lifetime of document, + //! possibly simplyfing memory management. + //!

+ //! Call allocate_node() or allocate_attribute() functions to obtain new nodes or attributes from the pool. + //! You can also call allocate_string() function to allocate strings. + //! Such strings can then be used as names or values of nodes without worrying about their lifetime. + //! Note that there is no free() function -- all allocations are freed at once when clear() function is called, + //! or when the pool is destroyed. + //!

+ //! It is also possible to create a standalone memory_pool, and use it + //! to allocate nodes, whose lifetime will not be tied to any document. + //!

+ //! Pool maintains RAPIDXML_STATIC_POOL_SIZE bytes of statically allocated memory. + //! Until static memory is exhausted, no dynamic memory allocations are done. + //! When static memory is exhausted, pool allocates additional blocks of memory of size RAPIDXML_DYNAMIC_POOL_SIZE each, + //! by using global new[] and delete[] operators. + //! This behaviour can be changed by setting custom allocation routines. + //! Use set_allocator() function to set them. + //!

+ //! Allocations for nodes, attributes and strings are aligned at RAPIDXML_ALIGNMENT bytes. + //! This value defaults to the size of pointer on target architecture. + //!

+ //! To obtain absolutely top performance from the parser, + //! it is important that all nodes are allocated from a single, contiguous block of memory. + //! Otherwise, cache misses when jumping between two (or more) disjoint blocks of memory can slow down parsing quite considerably. + //! If required, you can tweak RAPIDXML_STATIC_POOL_SIZE, RAPIDXML_DYNAMIC_POOL_SIZE and RAPIDXML_ALIGNMENT + //! to obtain best wasted memory to performance compromise. + //! To do it, define their values before rapidxml.hpp file is included. + //! \param Ch Character type of created nodes. + template + class memory_pool + { + + public: + + //! \cond internal + typedef void *(alloc_func)(std::size_t); // Type of user-defined function used to allocate memory + typedef void (free_func)(void *); // Type of user-defined function used to free memory + //! \endcond + + //! Constructs empty pool with default allocator functions. + memory_pool() + : m_alloc_func(0) + , m_free_func(0) + { + init(); + } + + //! Destroys pool and frees all the memory. + //! This causes memory occupied by nodes allocated by the pool to be freed. + //! Nodes allocated from the pool are no longer valid. + ~memory_pool() + { + clear(); + } + + //! Allocates a new node from the pool, and optionally assigns name and value to it. + //! If the allocation request cannot be accomodated, this function will throw std::bad_alloc. + //! If exceptions are disabled by defining RAPIDXML_NO_EXCEPTIONS, this function + //! will call rapidxml::parse_error_handler() function. + //! \param type Type of node to create. + //! \param name Name to assign to the node, or 0 to assign no name. + //! \param value Value to assign to the node, or 0 to assign no value. + //! \param name_size Size of name to assign, or 0 to automatically calculate size from name string. + //! \param value_size Size of value to assign, or 0 to automatically calculate size from value string. + //! \return Pointer to allocated node. This pointer will never be NULL. + xml_node *allocate_node(node_type type, + const Ch *name = 0, const Ch *value = 0, + std::size_t name_size = 0, std::size_t value_size = 0) + { + void *memory = allocate_aligned(sizeof(xml_node)); + xml_node *node = new(memory) xml_node(type); + if (name) + { + if (name_size > 0) + node->name(name, name_size); + else + node->name(name); + } + if (value) + { + if (value_size > 0) + node->value(value, value_size); + else + node->value(value); + } + return node; + } + + //! Allocates a new attribute from the pool, and optionally assigns name and value to it. + //! If the allocation request cannot be accomodated, this function will throw std::bad_alloc. + //! If exceptions are disabled by defining RAPIDXML_NO_EXCEPTIONS, this function + //! will call rapidxml::parse_error_handler() function. + //! \param name Name to assign to the attribute, or 0 to assign no name. + //! \param value Value to assign to the attribute, or 0 to assign no value. + //! \param name_size Size of name to assign, or 0 to automatically calculate size from name string. + //! \param value_size Size of value to assign, or 0 to automatically calculate size from value string. + //! \return Pointer to allocated attribute. This pointer will never be NULL. + xml_attribute *allocate_attribute(const Ch *name = 0, const Ch *value = 0, + std::size_t name_size = 0, std::size_t value_size = 0) + { + void *memory = allocate_aligned(sizeof(xml_attribute)); + xml_attribute *attribute = new(memory) xml_attribute; + if (name) + { + if (name_size > 0) + attribute->name(name, name_size); + else + attribute->name(name); + } + if (value) + { + if (value_size > 0) + attribute->value(value, value_size); + else + attribute->value(value); + } + return attribute; + } + + //! Allocates a char array of given size from the pool, and optionally copies a given string to it. + //! If the allocation request cannot be accomodated, this function will throw std::bad_alloc. + //! If exceptions are disabled by defining RAPIDXML_NO_EXCEPTIONS, this function + //! will call rapidxml::parse_error_handler() function. + //! \param source String to initialize the allocated memory with, or 0 to not initialize it. + //! \param size Number of characters to allocate, or zero to calculate it automatically from source string length; if size is 0, source string must be specified and null terminated. + //! \return Pointer to allocated char array. This pointer will never be NULL. + Ch *allocate_string(const Ch *source = 0, std::size_t size = 0) + { + assert(source || size); // Either source or size (or both) must be specified + if (size == 0) + size = internal::measure(source) + 1; + Ch *result = static_cast(allocate_aligned(size * sizeof(Ch))); + if (source) + for (std::size_t i = 0; i < size; ++i) + result[i] = source[i]; + return result; + } + + //! Clones an xml_node and its hierarchy of child nodes and attributes. + //! Nodes and attributes are allocated from this memory pool. + //! Names and values are not cloned, they are shared between the clone and the source. + //! Result node can be optionally specified as a second parameter, + //! in which case its contents will be replaced with cloned source node. + //! This is useful when you want to clone entire document. + //! \param source Node to clone. + //! \param result Node to put results in, or 0 to automatically allocate result node + //! \return Pointer to cloned node. This pointer will never be NULL. + xml_node *clone_node(const xml_node *source, xml_node *result = 0) + { + // Prepare result node + if (result) + { + result->remove_all_attributes(); + result->remove_all_nodes(); + result->type(source->type()); + } + else + result = allocate_node(source->type()); + + // Clone name and value + result->name(source->name(), source->name_size()); + result->value(source->value(), source->value_size()); + + // Clone child nodes and attributes + for (xml_node *child = source->first_node(); child; child = child->next_sibling()) + result->append_node(clone_node(child)); + for (xml_attribute *attr = source->first_attribute(); attr; attr = attr->next_attribute()) + result->append_attribute(allocate_attribute(attr->name(), attr->value(), attr->name_size(), attr->value_size())); + + return result; + } + + //! Clears the pool. + //! This causes memory occupied by nodes allocated by the pool to be freed. + //! Any nodes or strings allocated from the pool will no longer be valid. + void clear() + { + while (m_begin != m_static_memory) + { + char *previous_begin = reinterpret_cast
(align(m_begin))->previous_begin; + if (m_free_func) + m_free_func(m_begin); + else + delete[] m_begin; + m_begin = previous_begin; + } + init(); + } + + //! Sets or resets the user-defined memory allocation functions for the pool. + //! This can only be called when no memory is allocated from the pool yet, otherwise results are undefined. + //! Allocation function must not return invalid pointer on failure. It should either throw, + //! stop the program, or use longjmp() function to pass control to other place of program. + //! If it returns invalid pointer, results are undefined. + //!

+ //! User defined allocation functions must have the following forms: + //!
+ //!
void *allocate(std::size_t size); + //!
void free(void *pointer); + //!

+ //! \param af Allocation function, or 0 to restore default function + //! \param ff Free function, or 0 to restore default function + void set_allocator(alloc_func *af, free_func *ff) + { + assert(m_begin == m_static_memory && m_ptr == align(m_begin)); // Verify that no memory is allocated yet + m_alloc_func = af; + m_free_func = ff; + } + + private: + + struct header + { + char *previous_begin; + }; + + void init() + { + m_begin = m_static_memory; + m_ptr = align(m_begin); + m_end = m_static_memory + sizeof(m_static_memory); + } + + char *align(char *ptr) + { + std::size_t alignment = ((RAPIDXML_ALIGNMENT - (std::size_t(ptr) & (RAPIDXML_ALIGNMENT - 1))) & (RAPIDXML_ALIGNMENT - 1)); + return ptr + alignment; + } + + char *allocate_raw(std::size_t size) + { + // Allocate + void *memory; + if (m_alloc_func) // Allocate memory using either user-specified allocation function or global operator new[] + { + memory = m_alloc_func(size); + assert(memory); // Allocator is not allowed to return 0, on failure it must either throw, stop the program or use longjmp + } + else + { + memory = new char[size]; +#ifdef RAPIDXML_NO_EXCEPTIONS + if (!memory) // If exceptions are disabled, verify memory allocation, because new will not be able to throw bad_alloc + RAPIDXML_PARSE_ERROR("out of memory", 0); +#endif + } + return static_cast(memory); + } + + void *allocate_aligned(std::size_t size) + { + // Calculate aligned pointer + char *result = align(m_ptr); + + // If not enough memory left in current pool, allocate a new pool + if (result + size > m_end) + { + // Calculate required pool size (may be bigger than RAPIDXML_DYNAMIC_POOL_SIZE) + std::size_t pool_size = RAPIDXML_DYNAMIC_POOL_SIZE; + if (pool_size < size) + pool_size = size; + + // Allocate + std::size_t alloc_size = sizeof(header) + (2 * RAPIDXML_ALIGNMENT - 2) + pool_size; // 2 alignments required in worst case: one for header, one for actual allocation + char *raw_memory = allocate_raw(alloc_size); + + // Setup new pool in allocated memory + char *pool = align(raw_memory); + header *new_header = reinterpret_cast
(pool); + new_header->previous_begin = m_begin; + m_begin = raw_memory; + m_ptr = pool + sizeof(header); + m_end = raw_memory + alloc_size; + + // Calculate aligned pointer again using new pool + result = align(m_ptr); + } + + // Update pool and return aligned pointer + m_ptr = result + size; + return result; + } + + char *m_begin; // Start of raw memory making up current pool + char *m_ptr; // First free byte in current pool + char *m_end; // One past last available byte in current pool + char m_static_memory[RAPIDXML_STATIC_POOL_SIZE]; // Static raw memory + alloc_func *m_alloc_func; // Allocator function, or 0 if default is to be used + free_func *m_free_func; // Free function, or 0 if default is to be used + }; + + /////////////////////////////////////////////////////////////////////////// + // XML base + + //! Base class for xml_node and xml_attribute implementing common functions: + //! name(), name_size(), value(), value_size() and parent(). + //! \param Ch Character type to use + template + class xml_base + { + + public: + + /////////////////////////////////////////////////////////////////////////// + // Construction & destruction + + // Construct a base with empty name, value and parent + xml_base() + : m_name(0) + , m_value(0) + , m_parent(0) + { + } + + /////////////////////////////////////////////////////////////////////////// + // Node data access + + //! Gets name of the node. + //! Interpretation of name depends on type of node. + //! Note that name will not be zero-terminated if rapidxml::parse_no_string_terminators option was selected during parse. + //!

+ //! Use name_size() function to determine length of the name. + //! \return Name of node, or empty string if node has no name. + Ch *name() const + { + return m_name ? m_name : nullstr(); + } + + //! Gets size of node name, not including terminator character. + //! This function works correctly irrespective of whether name is or is not zero terminated. + //! \return Size of node name, in characters. + std::size_t name_size() const + { + return m_name ? m_name_size : 0; + } + + //! Gets value of node. + //! Interpretation of value depends on type of node. + //! Note that value will not be zero-terminated if rapidxml::parse_no_string_terminators option was selected during parse. + //!

+ //! Use value_size() function to determine length of the value. + //! \return Value of node, or empty string if node has no value. + Ch *value() const + { + return m_value ? m_value : nullstr(); + } + + //! Gets size of node value, not including terminator character. + //! This function works correctly irrespective of whether value is or is not zero terminated. + //! \return Size of node value, in characters. + std::size_t value_size() const + { + return m_value ? m_value_size : 0; + } + + /////////////////////////////////////////////////////////////////////////// + // Node modification + + //! Sets name of node to a non zero-terminated string. + //! See \ref ownership_of_strings. + //!

+ //! Note that node does not own its name or value, it only stores a pointer to it. + //! It will not delete or otherwise free the pointer on destruction. + //! It is reponsibility of the user to properly manage lifetime of the string. + //! The easiest way to achieve it is to use memory_pool of the document to allocate the string - + //! on destruction of the document the string will be automatically freed. + //!

+ //! Size of name must be specified separately, because name does not have to be zero terminated. + //! Use name(const Ch *) function to have the length automatically calculated (string must be zero terminated). + //! \param name Name of node to set. Does not have to be zero terminated. + //! \param size Size of name, in characters. This does not include zero terminator, if one is present. + void name(const Ch *name, std::size_t size) + { + m_name = const_cast(name); + m_name_size = size; + } + + //! Sets name of node to a zero-terminated string. + //! See also \ref ownership_of_strings and xml_node::name(const Ch *, std::size_t). + //! \param name Name of node to set. Must be zero terminated. + void name(const Ch *name) + { + this->name(name, internal::measure(name)); + } + + //! Sets value of node to a non zero-terminated string. + //! See \ref ownership_of_strings. + //!

+ //! Note that node does not own its name or value, it only stores a pointer to it. + //! It will not delete or otherwise free the pointer on destruction. + //! It is reponsibility of the user to properly manage lifetime of the string. + //! The easiest way to achieve it is to use memory_pool of the document to allocate the string - + //! on destruction of the document the string will be automatically freed. + //!

+ //! Size of value must be specified separately, because it does not have to be zero terminated. + //! Use value(const Ch *) function to have the length automatically calculated (string must be zero terminated). + //!

+ //! If an element has a child node of type node_data, it will take precedence over element value when printing. + //! If you want to manipulate data of elements using values, use parser flag rapidxml::parse_no_data_nodes to prevent creation of data nodes by the parser. + //! \param value value of node to set. Does not have to be zero terminated. + //! \param size Size of value, in characters. This does not include zero terminator, if one is present. + void value(const Ch *value, std::size_t size) + { + m_value = const_cast(value); + m_value_size = size; + } + + //! Sets value of node to a zero-terminated string. + //! See also \ref ownership_of_strings and xml_node::value(const Ch *, std::size_t). + //! \param value Vame of node to set. Must be zero terminated. + void value(const Ch *value) + { + this->value(value, internal::measure(value)); + } + + /////////////////////////////////////////////////////////////////////////// + // Related nodes access + + //! Gets node parent. + //! \return Pointer to parent node, or 0 if there is no parent. + xml_node *parent() const + { + return m_parent; + } + + protected: + + // Return empty string + static Ch *nullstr() + { + static Ch zero = Ch('\0'); + return &zero; + } + + Ch *m_name; // Name of node, or 0 if no name + Ch *m_value; // Value of node, or 0 if no value + std::size_t m_name_size; // Length of node name, or undefined of no name + std::size_t m_value_size; // Length of node value, or undefined if no value + xml_node *m_parent; // Pointer to parent node, or 0 if none + + }; + + //! Class representing attribute node of XML document. + //! Each attribute has name and value strings, which are available through name() and value() functions (inherited from xml_base). + //! Note that after parse, both name and value of attribute will point to interior of source text used for parsing. + //! Thus, this text must persist in memory for the lifetime of attribute. + //! \param Ch Character type to use. + template + class xml_attribute: public xml_base + { + + friend class xml_node; + + public: + + /////////////////////////////////////////////////////////////////////////// + // Construction & destruction + + //! Constructs an empty attribute with the specified type. + //! Consider using memory_pool of appropriate xml_document if allocating attributes manually. + xml_attribute() + { + } + + /////////////////////////////////////////////////////////////////////////// + // Related nodes access + + //! Gets document of which attribute is a child. + //! \return Pointer to document that contains this attribute, or 0 if there is no parent document. + xml_document *document() const + { + if (xml_node *node = this->parent()) + { + while (node->parent()) + node = node->parent(); + return node->type() == node_document ? static_cast *>(node) : 0; + } + else + return 0; + } + + //! Gets previous attribute, optionally matching attribute name. + //! \param name Name of attribute to find, or 0 to return previous attribute regardless of its name; this string doesn't have to be zero-terminated if name_size is non-zero + //! \param name_size Size of name, in characters, or 0 to have size calculated automatically from string + //! \param case_sensitive Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters + //! \return Pointer to found attribute, or 0 if not found. + xml_attribute *previous_attribute(const Ch *name = 0, std::size_t name_size = 0, bool case_sensitive = true) const + { + if (name) + { + if (name_size == 0) + name_size = internal::measure(name); + for (xml_attribute *attribute = m_prev_attribute; attribute; attribute = attribute->m_prev_attribute) + if (internal::compare(attribute->name(), attribute->name_size(), name, name_size, case_sensitive)) + return attribute; + return 0; + } + else + return this->m_parent ? m_prev_attribute : 0; + } + + //! Gets next attribute, optionally matching attribute name. + //! \param name Name of attribute to find, or 0 to return next attribute regardless of its name; this string doesn't have to be zero-terminated if name_size is non-zero + //! \param name_size Size of name, in characters, or 0 to have size calculated automatically from string + //! \param case_sensitive Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters + //! \return Pointer to found attribute, or 0 if not found. + xml_attribute *next_attribute(const Ch *name = 0, std::size_t name_size = 0, bool case_sensitive = true) const + { + if (name) + { + if (name_size == 0) + name_size = internal::measure(name); + for (xml_attribute *attribute = m_next_attribute; attribute; attribute = attribute->m_next_attribute) + if (internal::compare(attribute->name(), attribute->name_size(), name, name_size, case_sensitive)) + return attribute; + return 0; + } + else + return this->m_parent ? m_next_attribute : 0; + } + + private: + + xml_attribute *m_prev_attribute; // Pointer to previous sibling of attribute, or 0 if none; only valid if parent is non-zero + xml_attribute *m_next_attribute; // Pointer to next sibling of attribute, or 0 if none; only valid if parent is non-zero + + }; + + /////////////////////////////////////////////////////////////////////////// + // XML node + + //! Class representing a node of XML document. + //! Each node may have associated name and value strings, which are available through name() and value() functions. + //! Interpretation of name and value depends on type of the node. + //! Type of node can be determined by using type() function. + //!

+ //! Note that after parse, both name and value of node, if any, will point interior of source text used for parsing. + //! Thus, this text must persist in the memory for the lifetime of node. + //! \param Ch Character type to use. + template + class xml_node: public xml_base + { + + public: + + /////////////////////////////////////////////////////////////////////////// + // Construction & destruction + + //! Constructs an empty node with the specified type. + //! Consider using memory_pool of appropriate document to allocate nodes manually. + //! \param type Type of node to construct. + xml_node(node_type type) + : m_type(type) + , m_first_node(0) + , m_first_attribute(0) + { + } + + /////////////////////////////////////////////////////////////////////////// + // Node data access + + //! Gets type of node. + //! \return Type of node. + node_type type() const + { + return m_type; + } + + /////////////////////////////////////////////////////////////////////////// + // Related nodes access + + //! Gets document of which node is a child. + //! \return Pointer to document that contains this node, or 0 if there is no parent document. + xml_document *document() const + { + xml_node *node = const_cast *>(this); + while (node->parent()) + node = node->parent(); + return node->type() == node_document ? static_cast *>(node) : 0; + } + + //! Gets first child node, optionally matching node name. + //! \param name Name of child to find, or 0 to return first child regardless of its name; this string doesn't have to be zero-terminated if name_size is non-zero + //! \param name_size Size of name, in characters, or 0 to have size calculated automatically from string + //! \param case_sensitive Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters + //! \return Pointer to found child, or 0 if not found. + xml_node *first_node(const Ch *name = 0, std::size_t name_size = 0, bool case_sensitive = true) const + { + if (name) + { + if (name_size == 0) + name_size = internal::measure(name); + for (xml_node *child = m_first_node; child; child = child->next_sibling()) + if (internal::compare(child->name(), child->name_size(), name, name_size, case_sensitive)) + return child; + return 0; + } + else + return m_first_node; + } + + //! Gets last child node, optionally matching node name. + //! Behaviour is undefined if node has no children. + //! Use first_node() to test if node has children. + //! \param name Name of child to find, or 0 to return last child regardless of its name; this string doesn't have to be zero-terminated if name_size is non-zero + //! \param name_size Size of name, in characters, or 0 to have size calculated automatically from string + //! \param case_sensitive Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters + //! \return Pointer to found child, or 0 if not found. + xml_node *last_node(const Ch *name = 0, std::size_t name_size = 0, bool case_sensitive = true) const + { + assert(m_first_node); // Cannot query for last child if node has no children + if (name) + { + if (name_size == 0) + name_size = internal::measure(name); + for (xml_node *child = m_last_node; child; child = child->previous_sibling()) + if (internal::compare(child->name(), child->name_size(), name, name_size, case_sensitive)) + return child; + return 0; + } + else + return m_last_node; + } + + //! Gets previous sibling node, optionally matching node name. + //! Behaviour is undefined if node has no parent. + //! Use parent() to test if node has a parent. + //! \param name Name of sibling to find, or 0 to return previous sibling regardless of its name; this string doesn't have to be zero-terminated if name_size is non-zero + //! \param name_size Size of name, in characters, or 0 to have size calculated automatically from string + //! \param case_sensitive Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters + //! \return Pointer to found sibling, or 0 if not found. + xml_node *previous_sibling(const Ch *name = 0, std::size_t name_size = 0, bool case_sensitive = true) const + { + assert(this->m_parent); // Cannot query for siblings if node has no parent + if (name) + { + if (name_size == 0) + name_size = internal::measure(name); + for (xml_node *sibling = m_prev_sibling; sibling; sibling = sibling->m_prev_sibling) + if (internal::compare(sibling->name(), sibling->name_size(), name, name_size, case_sensitive)) + return sibling; + return 0; + } + else + return m_prev_sibling; + } + + //! Gets next sibling node, optionally matching node name. + //! Behaviour is undefined if node has no parent. + //! Use parent() to test if node has a parent. + //! \param name Name of sibling to find, or 0 to return next sibling regardless of its name; this string doesn't have to be zero-terminated if name_size is non-zero + //! \param name_size Size of name, in characters, or 0 to have size calculated automatically from string + //! \param case_sensitive Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters + //! \return Pointer to found sibling, or 0 if not found. + xml_node *next_sibling(const Ch *name = 0, std::size_t name_size = 0, bool case_sensitive = true) const + { + assert(this->m_parent); // Cannot query for siblings if node has no parent + if (name) + { + if (name_size == 0) + name_size = internal::measure(name); + for (xml_node *sibling = m_next_sibling; sibling; sibling = sibling->m_next_sibling) + if (internal::compare(sibling->name(), sibling->name_size(), name, name_size, case_sensitive)) + return sibling; + return 0; + } + else + return m_next_sibling; + } + + //! Gets first attribute of node, optionally matching attribute name. + //! \param name Name of attribute to find, or 0 to return first attribute regardless of its name; this string doesn't have to be zero-terminated if name_size is non-zero + //! \param name_size Size of name, in characters, or 0 to have size calculated automatically from string + //! \param case_sensitive Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters + //! \return Pointer to found attribute, or 0 if not found. + xml_attribute *first_attribute(const Ch *name = 0, std::size_t name_size = 0, bool case_sensitive = true) const + { + if (name) + { + if (name_size == 0) + name_size = internal::measure(name); + for (xml_attribute *attribute = m_first_attribute; attribute; attribute = attribute->m_next_attribute) + if (internal::compare(attribute->name(), attribute->name_size(), name, name_size, case_sensitive)) + return attribute; + return 0; + } + else + return m_first_attribute; + } + + //! Gets last attribute of node, optionally matching attribute name. + //! \param name Name of attribute to find, or 0 to return last attribute regardless of its name; this string doesn't have to be zero-terminated if name_size is non-zero + //! \param name_size Size of name, in characters, or 0 to have size calculated automatically from string + //! \param case_sensitive Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters + //! \return Pointer to found attribute, or 0 if not found. + xml_attribute *last_attribute(const Ch *name = 0, std::size_t name_size = 0, bool case_sensitive = true) const + { + if (name) + { + if (name_size == 0) + name_size = internal::measure(name); + for (xml_attribute *attribute = m_last_attribute; attribute; attribute = attribute->m_prev_attribute) + if (internal::compare(attribute->name(), attribute->name_size(), name, name_size, case_sensitive)) + return attribute; + return 0; + } + else + return m_first_attribute ? m_last_attribute : 0; + } + + /////////////////////////////////////////////////////////////////////////// + // Node modification + + //! Sets type of node. + //! \param type Type of node to set. + void type(node_type type) + { + m_type = type; + } + + /////////////////////////////////////////////////////////////////////////// + // Node manipulation + + //! Prepends a new child node. + //! The prepended child becomes the first child, and all existing children are moved one position back. + //! \param child Node to prepend. + void prepend_node(xml_node *child) + { + assert(child && !child->parent() && child->type() != node_document); + if (first_node()) + { + child->m_next_sibling = m_first_node; + m_first_node->m_prev_sibling = child; + } + else + { + child->m_next_sibling = 0; + m_last_node = child; + } + m_first_node = child; + child->m_parent = this; + child->m_prev_sibling = 0; + } + + //! Appends a new child node. + //! The appended child becomes the last child. + //! \param child Node to append. + void append_node(xml_node *child) + { + assert(child && !child->parent() && child->type() != node_document); + if (first_node()) + { + child->m_prev_sibling = m_last_node; + m_last_node->m_next_sibling = child; + } + else + { + child->m_prev_sibling = 0; + m_first_node = child; + } + m_last_node = child; + child->m_parent = this; + child->m_next_sibling = 0; + } + + //! Inserts a new child node at specified place inside the node. + //! All children after and including the specified node are moved one position back. + //! \param where Place where to insert the child, or 0 to insert at the back. + //! \param child Node to insert. + void insert_node(xml_node *where, xml_node *child) + { + assert(!where || where->parent() == this); + assert(child && !child->parent() && child->type() != node_document); + if (where == m_first_node) + prepend_node(child); + else if (where == 0) + append_node(child); + else + { + child->m_prev_sibling = where->m_prev_sibling; + child->m_next_sibling = where; + where->m_prev_sibling->m_next_sibling = child; + where->m_prev_sibling = child; + child->m_parent = this; + } + } + + //! Removes first child node. + //! If node has no children, behaviour is undefined. + //! Use first_node() to test if node has children. + void remove_first_node() + { + assert(first_node()); + xml_node *child = m_first_node; + m_first_node = child->m_next_sibling; + if (child->m_next_sibling) + child->m_next_sibling->m_prev_sibling = 0; + else + m_last_node = 0; + child->m_parent = 0; + } + + //! Removes last child of the node. + //! If node has no children, behaviour is undefined. + //! Use first_node() to test if node has children. + void remove_last_node() + { + assert(first_node()); + xml_node *child = m_last_node; + if (child->m_prev_sibling) + { + m_last_node = child->m_prev_sibling; + child->m_prev_sibling->m_next_sibling = 0; + } + else + m_first_node = 0; + child->m_parent = 0; + } + + //! Removes specified child from the node + // \param where Pointer to child to be removed. + void remove_node(xml_node *where) + { + assert(where && where->parent() == this); + assert(first_node()); + if (where == m_first_node) + remove_first_node(); + else if (where == m_last_node) + remove_last_node(); + else + { + where->m_prev_sibling->m_next_sibling = where->m_next_sibling; + where->m_next_sibling->m_prev_sibling = where->m_prev_sibling; + where->m_parent = 0; + } + } + + //! Removes all child nodes (but not attributes). + void remove_all_nodes() + { + for (xml_node *node = first_node(); node; node = node->m_next_sibling) + node->m_parent = 0; + m_first_node = 0; + } + + //! Prepends a new attribute to the node. + //! \param attribute Attribute to prepend. + void prepend_attribute(xml_attribute *attribute) + { + assert(attribute && !attribute->parent()); + if (first_attribute()) + { + attribute->m_next_attribute = m_first_attribute; + m_first_attribute->m_prev_attribute = attribute; + } + else + { + attribute->m_next_attribute = 0; + m_last_attribute = attribute; + } + m_first_attribute = attribute; + attribute->m_parent = this; + attribute->m_prev_attribute = 0; + } + + //! Appends a new attribute to the node. + //! \param attribute Attribute to append. + void append_attribute(xml_attribute *attribute) + { + assert(attribute && !attribute->parent()); + if (first_attribute()) + { + attribute->m_prev_attribute = m_last_attribute; + m_last_attribute->m_next_attribute = attribute; + } + else + { + attribute->m_prev_attribute = 0; + m_first_attribute = attribute; + } + m_last_attribute = attribute; + attribute->m_parent = this; + attribute->m_next_attribute = 0; + } + + //! Inserts a new attribute at specified place inside the node. + //! All attributes after and including the specified attribute are moved one position back. + //! \param where Place where to insert the attribute, or 0 to insert at the back. + //! \param attribute Attribute to insert. + void insert_attribute(xml_attribute *where, xml_attribute *attribute) + { + assert(!where || where->parent() == this); + assert(attribute && !attribute->parent()); + if (where == m_first_attribute) + prepend_attribute(attribute); + else if (where == 0) + append_attribute(attribute); + else + { + attribute->m_prev_attribute = where->m_prev_attribute; + attribute->m_next_attribute = where; + where->m_prev_attribute->m_next_attribute = attribute; + where->m_prev_attribute = attribute; + attribute->m_parent = this; + } + } + + //! Removes first attribute of the node. + //! If node has no attributes, behaviour is undefined. + //! Use first_attribute() to test if node has attributes. + void remove_first_attribute() + { + assert(first_attribute()); + xml_attribute *attribute = m_first_attribute; + if (attribute->m_next_attribute) + { + attribute->m_next_attribute->m_prev_attribute = 0; + } + else + m_last_attribute = 0; + attribute->m_parent = 0; + m_first_attribute = attribute->m_next_attribute; + } + + //! Removes last attribute of the node. + //! If node has no attributes, behaviour is undefined. + //! Use first_attribute() to test if node has attributes. + void remove_last_attribute() + { + assert(first_attribute()); + xml_attribute *attribute = m_last_attribute; + if (attribute->m_prev_attribute) + { + attribute->m_prev_attribute->m_next_attribute = 0; + m_last_attribute = attribute->m_prev_attribute; + } + else + m_first_attribute = 0; + attribute->m_parent = 0; + } + + //! Removes specified attribute from node. + //! \param where Pointer to attribute to be removed. + void remove_attribute(xml_attribute *where) + { + assert(first_attribute() && where->parent() == this); + if (where == m_first_attribute) + remove_first_attribute(); + else if (where == m_last_attribute) + remove_last_attribute(); + else + { + where->m_prev_attribute->m_next_attribute = where->m_next_attribute; + where->m_next_attribute->m_prev_attribute = where->m_prev_attribute; + where->m_parent = 0; + } + } + + //! Removes all attributes of node. + void remove_all_attributes() + { + for (xml_attribute *attribute = first_attribute(); attribute; attribute = attribute->m_next_attribute) + attribute->m_parent = 0; + m_first_attribute = 0; + } + + private: + + /////////////////////////////////////////////////////////////////////////// + // Restrictions + + // No copying + xml_node(const xml_node &); + void operator =(const xml_node &); + + /////////////////////////////////////////////////////////////////////////// + // Data members + + // Note that some of the pointers below have UNDEFINED values if certain other pointers are 0. + // This is required for maximum performance, as it allows the parser to omit initialization of + // unneded/redundant values. + // + // The rules are as follows: + // 1. first_node and first_attribute contain valid pointers, or 0 if node has no children/attributes respectively + // 2. last_node and last_attribute are valid only if node has at least one child/attribute respectively, otherwise they contain garbage + // 3. prev_sibling and next_sibling are valid only if node has a parent, otherwise they contain garbage + + node_type m_type; // Type of node; always valid + xml_node *m_first_node; // Pointer to first child node, or 0 if none; always valid + xml_node *m_last_node; // Pointer to last child node, or 0 if none; this value is only valid if m_first_node is non-zero + xml_attribute *m_first_attribute; // Pointer to first attribute of node, or 0 if none; always valid + xml_attribute *m_last_attribute; // Pointer to last attribute of node, or 0 if none; this value is only valid if m_first_attribute is non-zero + xml_node *m_prev_sibling; // Pointer to previous sibling of node, or 0 if none; this value is only valid if m_parent is non-zero + xml_node *m_next_sibling; // Pointer to next sibling of node, or 0 if none; this value is only valid if m_parent is non-zero + + }; + + /////////////////////////////////////////////////////////////////////////// + // XML document + + //! This class represents root of the DOM hierarchy. + //! It is also an xml_node and a memory_pool through public inheritance. + //! Use parse() function to build a DOM tree from a zero-terminated XML text string. + //! parse() function allocates memory for nodes and attributes by using functions of xml_document, + //! which are inherited from memory_pool. + //! To access root node of the document, use the document itself, as if it was an xml_node. + //! \param Ch Character type to use. + template + class xml_document: public xml_node, public memory_pool + { + + public: + + //! Constructs empty XML document + xml_document() + : xml_node(node_document) + { + } + + //! Parses zero-terminated XML string according to given flags. + //! Passed string will be modified by the parser, unless rapidxml::parse_non_destructive flag is used. + //! The string must persist for the lifetime of the document. + //! In case of error, rapidxml::parse_error exception will be thrown. + //!

+ //! If you want to parse contents of a file, you must first load the file into the memory, and pass pointer to its beginning. + //! Make sure that data is zero-terminated. + //!

+ //! Document can be parsed into multiple times. + //! Each new call to parse removes previous nodes and attributes (if any), but does not clear memory pool. + //! \param text XML data to parse; pointer is non-const to denote fact that this data may be modified by the parser. + template + void parse(Ch *text) + { + assert(text); + + // Remove current contents + this->remove_all_nodes(); + this->remove_all_attributes(); + + // Parse BOM, if any + parse_bom(text); + + // Parse children + while (1) + { + // Skip whitespace before node + skip(text); + if (*text == 0) + break; + + // Parse and append new child + if (*text == Ch('<')) + { + ++text; // Skip '<' + if (xml_node *node = parse_node(text)) + this->append_node(node); + } + else + RAPIDXML_PARSE_ERROR("expected <", text); + } + + } + + //! Clears the document by deleting all nodes and clearing the memory pool. + //! All nodes owned by document pool are destroyed. + void clear() + { + this->remove_all_nodes(); + this->remove_all_attributes(); + memory_pool::clear(); + } + + private: + + /////////////////////////////////////////////////////////////////////// + // Internal character utility functions + + // Detect whitespace character + struct whitespace_pred + { + static unsigned char test(Ch ch) + { + return internal::lookup_tables<0>::lookup_whitespace[static_cast(ch)]; + } + }; + + // Detect node name character + struct node_name_pred + { + static unsigned char test(Ch ch) + { + return internal::lookup_tables<0>::lookup_node_name[static_cast(ch)]; + } + }; + + // Detect attribute name character + struct attribute_name_pred + { + static unsigned char test(Ch ch) + { + return internal::lookup_tables<0>::lookup_attribute_name[static_cast(ch)]; + } + }; + + // Detect text character (PCDATA) + struct text_pred + { + static unsigned char test(Ch ch) + { + return internal::lookup_tables<0>::lookup_text[static_cast(ch)]; + } + }; + + // Detect text character (PCDATA) that does not require processing + struct text_pure_no_ws_pred + { + static unsigned char test(Ch ch) + { + return internal::lookup_tables<0>::lookup_text_pure_no_ws[static_cast(ch)]; + } + }; + + // Detect text character (PCDATA) that does not require processing + struct text_pure_with_ws_pred + { + static unsigned char test(Ch ch) + { + return internal::lookup_tables<0>::lookup_text_pure_with_ws[static_cast(ch)]; + } + }; + + // Detect attribute value character + template + struct attribute_value_pred + { + static unsigned char test(Ch ch) + { + if (Quote == Ch('\'')) + return internal::lookup_tables<0>::lookup_attribute_data_1[static_cast(ch)]; + if (Quote == Ch('\"')) + return internal::lookup_tables<0>::lookup_attribute_data_2[static_cast(ch)]; + return 0; // Should never be executed, to avoid warnings on Comeau + } + }; + + // Detect attribute value character + template + struct attribute_value_pure_pred + { + static unsigned char test(Ch ch) + { + if (Quote == Ch('\'')) + return internal::lookup_tables<0>::lookup_attribute_data_1_pure[static_cast(ch)]; + if (Quote == Ch('\"')) + return internal::lookup_tables<0>::lookup_attribute_data_2_pure[static_cast(ch)]; + return 0; // Should never be executed, to avoid warnings on Comeau + } + }; + + // Insert coded character, using UTF8 or 8-bit ASCII + template + static void insert_coded_character(Ch *&text, unsigned long code) + { + if (Flags & parse_no_utf8) + { + // Insert 8-bit ASCII character + // Todo: possibly verify that code is less than 256 and use replacement char otherwise? + text[0] = static_cast(code); + text += 1; + } + else + { + // Insert UTF8 sequence + if (code < 0x80) // 1 byte sequence + { + text[0] = static_cast(code); + text += 1; + } + else if (code < 0x800) // 2 byte sequence + { + text[1] = static_cast((code | 0x80) & 0xBF); code >>= 6; + text[0] = static_cast(code | 0xC0); + text += 2; + } + else if (code < 0x10000) // 3 byte sequence + { + text[2] = static_cast((code | 0x80) & 0xBF); code >>= 6; + text[1] = static_cast((code | 0x80) & 0xBF); code >>= 6; + text[0] = static_cast(code | 0xE0); + text += 3; + } + else if (code < 0x110000) // 4 byte sequence + { + text[3] = static_cast((code | 0x80) & 0xBF); code >>= 6; + text[2] = static_cast((code | 0x80) & 0xBF); code >>= 6; + text[1] = static_cast((code | 0x80) & 0xBF); code >>= 6; + text[0] = static_cast(code | 0xF0); + text += 4; + } + else // Invalid, only codes up to 0x10FFFF are allowed in Unicode + { + RAPIDXML_PARSE_ERROR("invalid numeric character entity", text); + } + } + } + + // Skip characters until predicate evaluates to true + template + static void skip(Ch *&text) + { + Ch *tmp = text; + while (StopPred::test(*tmp)) + ++tmp; + text = tmp; + } + + // Skip characters until predicate evaluates to true while doing the following: + // - replacing XML character entity references with proper characters (' & " < > &#...;) + // - condensing whitespace sequences to single space character + template + static Ch *skip_and_expand_character_refs(Ch *&text) + { + // If entity translation, whitespace condense and whitespace trimming is disabled, use plain skip + if (Flags & parse_no_entity_translation && + !(Flags & parse_normalize_whitespace) && + !(Flags & parse_trim_whitespace)) + { + skip(text); + return text; + } + + // Use simple skip until first modification is detected + skip(text); + + // Use translation skip + Ch *src = text; + Ch *dest = src; + while (StopPred::test(*src)) + { + // If entity translation is enabled + if (!(Flags & parse_no_entity_translation)) + { + // Test if replacement is needed + if (src[0] == Ch('&')) + { + switch (src[1]) + { + + // & ' + case Ch('a'): + if (src[2] == Ch('m') && src[3] == Ch('p') && src[4] == Ch(';')) + { + *dest = Ch('&'); + ++dest; + src += 5; + continue; + } + if (src[2] == Ch('p') && src[3] == Ch('o') && src[4] == Ch('s') && src[5] == Ch(';')) + { + *dest = Ch('\''); + ++dest; + src += 6; + continue; + } + break; + + // " + case Ch('q'): + if (src[2] == Ch('u') && src[3] == Ch('o') && src[4] == Ch('t') && src[5] == Ch(';')) + { + *dest = Ch('"'); + ++dest; + src += 6; + continue; + } + break; + + // > + case Ch('g'): + if (src[2] == Ch('t') && src[3] == Ch(';')) + { + *dest = Ch('>'); + ++dest; + src += 4; + continue; + } + break; + + // < + case Ch('l'): + if (src[2] == Ch('t') && src[3] == Ch(';')) + { + *dest = Ch('<'); + ++dest; + src += 4; + continue; + } + break; + + // &#...; - assumes ASCII + case Ch('#'): + if (src[2] == Ch('x')) + { + unsigned long code = 0; + src += 3; // Skip &#x + while (1) + { + unsigned char digit = internal::lookup_tables<0>::lookup_digits[static_cast(*src)]; + if (digit == 0xFF) + break; + code = code * 16 + digit; + ++src; + } + insert_coded_character(dest, code); // Put character in output + } + else + { + unsigned long code = 0; + src += 2; // Skip &# + while (1) + { + unsigned char digit = internal::lookup_tables<0>::lookup_digits[static_cast(*src)]; + if (digit == 0xFF) + break; + code = code * 10 + digit; + ++src; + } + insert_coded_character(dest, code); // Put character in output + } + if (*src == Ch(';')) + ++src; + else + RAPIDXML_PARSE_ERROR("expected ;", src); + continue; + + // Something else + default: + // Ignore, just copy '&' verbatim + break; + + } + } + } + + // If whitespace condensing is enabled + if (Flags & parse_normalize_whitespace) + { + // Test if condensing is needed + if (whitespace_pred::test(*src)) + { + *dest = Ch(' '); ++dest; // Put single space in dest + ++src; // Skip first whitespace char + // Skip remaining whitespace chars + while (whitespace_pred::test(*src)) + ++src; + continue; + } + } + + // No replacement, only copy character + *dest++ = *src++; + + } + + // Return new end + text = src; + return dest; + + } + + /////////////////////////////////////////////////////////////////////// + // Internal parsing functions + + // Parse BOM, if any + template + void parse_bom(Ch *&text) + { + // UTF-8? + if (static_cast(text[0]) == 0xEF && + static_cast(text[1]) == 0xBB && + static_cast(text[2]) == 0xBF) + { + text += 3; // Skup utf-8 bom + } + } + + // Parse XML declaration ( + xml_node *parse_xml_declaration(Ch *&text) + { + // If parsing of declaration is disabled + if (!(Flags & parse_declaration_node)) + { + // Skip until end of declaration + while (text[0] != Ch('?') || text[1] != Ch('>')) + { + if (!text[0]) + RAPIDXML_PARSE_ERROR("unexpected end of data", text); + ++text; + } + text += 2; // Skip '?>' + return 0; + } + + // Create declaration + xml_node *declaration = this->allocate_node(node_declaration); + + // Skip whitespace before attributes or ?> + skip(text); + + // Parse declaration attributes + parse_node_attributes(text, declaration); + + // Skip ?> + if (text[0] != Ch('?') || text[1] != Ch('>')) + RAPIDXML_PARSE_ERROR("expected ?>", text); + text += 2; + + return declaration; + } + + // Parse XML comment (' + return 0; // Do not produce comment node + } + + // Remember value start + Ch *value = text; + + // Skip until end of comment + while (text[0] != Ch('-') || text[1] != Ch('-') || text[2] != Ch('>')) + { + if (!text[0]) + RAPIDXML_PARSE_ERROR("unexpected end of data", text); + ++text; + } + + // Create comment node + xml_node *comment = this->allocate_node(node_comment); + comment->value(value, text - value); + + // Place zero terminator after comment value + if (!(Flags & parse_no_string_terminators)) + *text = Ch('\0'); + + text += 3; // Skip '-->' + return comment; + } + + // Parse DOCTYPE + template + xml_node *parse_doctype(Ch *&text) + { + // Remember value start + Ch *value = text; + + // Skip to > + while (*text != Ch('>')) + { + // Determine character type + switch (*text) + { + + // If '[' encountered, scan for matching ending ']' using naive algorithm with depth + // This works for all W3C test files except for 2 most wicked + case Ch('['): + { + ++text; // Skip '[' + int depth = 1; + while (depth > 0) + { + switch (*text) + { + case Ch('['): ++depth; break; + case Ch(']'): --depth; break; + case 0: RAPIDXML_PARSE_ERROR("unexpected end of data", text); + } + ++text; + } + break; + } + + // Error on end of text + case Ch('\0'): + RAPIDXML_PARSE_ERROR("unexpected end of data", text); + + // Other character, skip it + default: + ++text; + + } + } + + // If DOCTYPE nodes enabled + if (Flags & parse_doctype_node) + { + // Create a new doctype node + xml_node *doctype = this->allocate_node(node_doctype); + doctype->value(value, text - value); + + // Place zero terminator after value + if (!(Flags & parse_no_string_terminators)) + *text = Ch('\0'); + + text += 1; // skip '>' + return doctype; + } + else + { + text += 1; // skip '>' + return 0; + } + + } + + // Parse PI + template + xml_node *parse_pi(Ch *&text) + { + // If creation of PI nodes is enabled + if (Flags & parse_pi_nodes) + { + // Create pi node + xml_node *pi = this->allocate_node(node_pi); + + // Extract PI target name + Ch *name = text; + skip(text); + if (text == name) + RAPIDXML_PARSE_ERROR("expected PI target", text); + pi->name(name, text - name); + + // Skip whitespace between pi target and pi + skip(text); + + // Remember start of pi + Ch *value = text; + + // Skip to '?>' + while (text[0] != Ch('?') || text[1] != Ch('>')) + { + if (*text == Ch('\0')) + RAPIDXML_PARSE_ERROR("unexpected end of data", text); + ++text; + } + + // Set pi value (verbatim, no entity expansion or whitespace normalization) + pi->value(value, text - value); + + // Place zero terminator after name and value + if (!(Flags & parse_no_string_terminators)) + { + pi->name()[pi->name_size()] = Ch('\0'); + pi->value()[pi->value_size()] = Ch('\0'); + } + + text += 2; // Skip '?>' + return pi; + } + else + { + // Skip to '?>' + while (text[0] != Ch('?') || text[1] != Ch('>')) + { + if (*text == Ch('\0')) + RAPIDXML_PARSE_ERROR("unexpected end of data", text); + ++text; + } + text += 2; // Skip '?>' + return 0; + } + } + + // Parse and append data + // Return character that ends data. + // This is necessary because this character might have been overwritten by a terminating 0 + template + Ch parse_and_append_data(xml_node *node, Ch *&text, Ch *contents_start) + { + // Backup to contents start if whitespace trimming is disabled + if (!(Flags & parse_trim_whitespace)) + text = contents_start; + + // Skip until end of data + Ch *value = text, *end; + if (Flags & parse_normalize_whitespace) + end = skip_and_expand_character_refs(text); + else + end = skip_and_expand_character_refs(text); + + // Trim trailing whitespace if flag is set; leading was already trimmed by whitespace skip after > + if (Flags & parse_trim_whitespace) + { + if (Flags & parse_normalize_whitespace) + { + // Whitespace is already condensed to single space characters by skipping function, so just trim 1 char off the end + if (*(end - 1) == Ch(' ')) + --end; + } + else + { + // Backup until non-whitespace character is found + while (whitespace_pred::test(*(end - 1))) + --end; + } + } + + // If characters are still left between end and value (this test is only necessary if normalization is enabled) + // Create new data node + if (!(Flags & parse_no_data_nodes)) + { + xml_node *data = this->allocate_node(node_data); + data->value(value, end - value); + node->append_node(data); + } + + // Add data to parent node if no data exists yet + if (!(Flags & parse_no_element_values)) + if (*node->value() == Ch('\0')) + node->value(value, end - value); + + // Place zero terminator after value + if (!(Flags & parse_no_string_terminators)) + { + Ch ch = *text; + *end = Ch('\0'); + return ch; // Return character that ends data; this is required because zero terminator overwritten it + } + + // Return character that ends data + return *text; + } + + // Parse CDATA + template + xml_node *parse_cdata(Ch *&text) + { + // If CDATA is disabled + if (Flags & parse_no_data_nodes) + { + // Skip until end of cdata + while (text[0] != Ch(']') || text[1] != Ch(']') || text[2] != Ch('>')) + { + if (!text[0]) + RAPIDXML_PARSE_ERROR("unexpected end of data", text); + ++text; + } + text += 3; // Skip ]]> + return 0; // Do not produce CDATA node + } + + // Skip until end of cdata + Ch *value = text; + while (text[0] != Ch(']') || text[1] != Ch(']') || text[2] != Ch('>')) + { + if (!text[0]) + RAPIDXML_PARSE_ERROR("unexpected end of data", text); + ++text; + } + + // Create new cdata node + xml_node *cdata = this->allocate_node(node_cdata); + cdata->value(value, text - value); + + // Place zero terminator after value + if (!(Flags & parse_no_string_terminators)) + *text = Ch('\0'); + + text += 3; // Skip ]]> + return cdata; + } + + // Parse element node + template + xml_node *parse_element(Ch *&text) + { + // Create element node + xml_node *element = this->allocate_node(node_element); + + // Extract element name + Ch *name = text; + skip(text); + if (text == name) + RAPIDXML_PARSE_ERROR("expected element name", text); + element->name(name, text - name); + + // Skip whitespace between element name and attributes or > + skip(text); + + // Parse attributes, if any + parse_node_attributes(text, element); + + // Determine ending type + if (*text == Ch('>')) + { + ++text; + parse_node_contents(text, element); + } + else if (*text == Ch('/')) + { + ++text; + if (*text != Ch('>')) + RAPIDXML_PARSE_ERROR("expected >", text); + ++text; + } + else + RAPIDXML_PARSE_ERROR("expected >", text); + + // Place zero terminator after name + if (!(Flags & parse_no_string_terminators)) + element->name()[element->name_size()] = Ch('\0'); + + // Return parsed element + return element; + } + + // Determine node type, and parse it + template + xml_node *parse_node(Ch *&text) + { + // Parse proper node type + switch (text[0]) + { + + // <... + default: + // Parse and append element node + return parse_element(text); + + // (text); + } + else + { + // Parse PI + return parse_pi(text); + } + + // (text); + } + break; + + // (text); + } + break; + + // (text); + } + + } // switch + + // Attempt to skip other, unrecognized node types starting with ')) + { + if (*text == 0) + RAPIDXML_PARSE_ERROR("unexpected end of data", text); + ++text; + } + ++text; // Skip '>' + return 0; // No node recognized + + } + } + + // Parse contents of the node - children, data etc. + template + void parse_node_contents(Ch *&text, xml_node *node) + { + // For all children and text + while (1) + { + // Skip whitespace between > and node contents + Ch *contents_start = text; // Store start of node contents before whitespace is skipped + skip(text); + Ch next_char = *text; + + // After data nodes, instead of continuing the loop, control jumps here. + // This is because zero termination inside parse_and_append_data() function + // would wreak havoc with the above code. + // Also, skipping whitespace after data nodes is unnecessary. + after_data_node: + + // Determine what comes next: node closing, child node, data node, or 0? + switch (next_char) + { + + // Node closing or child node + case Ch('<'): + if (text[1] == Ch('/')) + { + // Node closing + text += 2; // Skip '(text); + if (!internal::compare(node->name(), node->name_size(), closing_name, text - closing_name, true)) + RAPIDXML_PARSE_ERROR("invalid closing tag name", text); + } + else + { + // No validation, just skip name + skip(text); + } + // Skip remaining whitespace after node name + skip(text); + if (*text != Ch('>')) + RAPIDXML_PARSE_ERROR("expected >", text); + ++text; // Skip '>' + return; // Node closed, finished parsing contents + } + else + { + // Child node + ++text; // Skip '<' + if (xml_node *child = parse_node(text)) + node->append_node(child); + } + break; + + // End of data - error + case Ch('\0'): + RAPIDXML_PARSE_ERROR("unexpected end of data", text); + + // Data node + default: + next_char = parse_and_append_data(node, text, contents_start); + goto after_data_node; // Bypass regular processing after data nodes + + } + } + } + + // Parse XML attributes of the node + template + void parse_node_attributes(Ch *&text, xml_node *node) + { + // For all attributes + while (attribute_name_pred::test(*text)) + { + // Extract attribute name + Ch *name = text; + ++text; // Skip first character of attribute name + skip(text); + if (text == name) + RAPIDXML_PARSE_ERROR("expected attribute name", name); + + // Create new attribute + xml_attribute *attribute = this->allocate_attribute(); + attribute->name(name, text - name); + node->append_attribute(attribute); + + // Skip whitespace after attribute name + skip(text); + + // Skip = + if (*text != Ch('=')) + RAPIDXML_PARSE_ERROR("expected =", text); + ++text; + + // Add terminating zero after name + if (!(Flags & parse_no_string_terminators)) + attribute->name()[attribute->name_size()] = 0; + + // Skip whitespace after = + skip(text); + + // Skip quote and remember if it was ' or " + Ch quote = *text; + if (quote != Ch('\'') && quote != Ch('"')) + RAPIDXML_PARSE_ERROR("expected ' or \"", text); + ++text; + + // Extract attribute value and expand char refs in it + Ch *value = text, *end; + const int AttFlags = Flags & ~parse_normalize_whitespace; // No whitespace normalization in attributes + if (quote == Ch('\'')) + end = skip_and_expand_character_refs, attribute_value_pure_pred, AttFlags>(text); + else + end = skip_and_expand_character_refs, attribute_value_pure_pred, AttFlags>(text); + + // Set attribute value + attribute->value(value, end - value); + + // Make sure that end quote is present + if (*text != quote) + RAPIDXML_PARSE_ERROR("expected ' or \"", text); + ++text; // Skip quote + + // Add terminating zero after value + if (!(Flags & parse_no_string_terminators)) + attribute->value()[attribute->value_size()] = 0; + + // Skip whitespace after attribute value + skip(text); + } + } + + }; + + //! \cond internal + namespace internal + { + + // Whitespace (space \n \r \t) + template + const unsigned char lookup_tables::lookup_whitespace[256] = + { + // 0 1 2 3 4 5 6 7 8 9 A B C D E F + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, // 0 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1 + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 2 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 3 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 4 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 5 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 6 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 7 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // A + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // B + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // C + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // D + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // E + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 // F + }; + + // Node name (anything but space \n \r \t / > ? \0) + template + const unsigned char lookup_tables::lookup_node_name[256] = + { + // 0 1 2 3 4 5 6 7 8 9 A B C D E F + 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, // 0 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 1 + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, // 2 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, // 3 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 4 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 5 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 6 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 7 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 8 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 9 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // A + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // B + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // C + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // D + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // E + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // F + }; + + // Text (i.e. PCDATA) (anything but < \0) + template + const unsigned char lookup_tables::lookup_text[256] = + { + // 0 1 2 3 4 5 6 7 8 9 A B C D E F + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 1 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 2 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, // 3 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 4 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 5 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 6 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 7 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 8 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 9 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // A + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // B + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // C + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // D + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // E + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // F + }; + + // Text (i.e. PCDATA) that does not require processing when ws normalization is disabled + // (anything but < \0 &) + template + const unsigned char lookup_tables::lookup_text_pure_no_ws[256] = + { + // 0 1 2 3 4 5 6 7 8 9 A B C D E F + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 1 + 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 2 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, // 3 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 4 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 5 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 6 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 7 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 8 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 9 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // A + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // B + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // C + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // D + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // E + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // F + }; + + // Text (i.e. PCDATA) that does not require processing when ws normalizationis is enabled + // (anything but < \0 & space \n \r \t) + template + const unsigned char lookup_tables::lookup_text_pure_with_ws[256] = + { + // 0 1 2 3 4 5 6 7 8 9 A B C D E F + 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, // 0 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 1 + 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 2 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, // 3 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 4 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 5 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 6 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 7 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 8 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 9 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // A + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // B + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // C + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // D + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // E + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // F + }; + + // Attribute name (anything but space \n \r \t / < > = ? ! \0) + template + const unsigned char lookup_tables::lookup_attribute_name[256] = + { + // 0 1 2 3 4 5 6 7 8 9 A B C D E F + 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, // 0 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 1 + 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, // 2 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, // 3 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 4 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 5 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 6 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 7 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 8 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 9 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // A + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // B + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // C + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // D + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // E + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // F + }; + + // Attribute data with single quote (anything but ' \0) + template + const unsigned char lookup_tables::lookup_attribute_data_1[256] = + { + // 0 1 2 3 4 5 6 7 8 9 A B C D E F + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 1 + 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, // 2 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 3 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 4 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 5 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 6 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 7 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 8 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 9 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // A + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // B + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // C + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // D + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // E + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // F + }; + + // Attribute data with single quote that does not require processing (anything but ' \0 &) + template + const unsigned char lookup_tables::lookup_attribute_data_1_pure[256] = + { + // 0 1 2 3 4 5 6 7 8 9 A B C D E F + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 1 + 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, // 2 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 3 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 4 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 5 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 6 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 7 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 8 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 9 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // A + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // B + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // C + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // D + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // E + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // F + }; + + // Attribute data with double quote (anything but " \0) + template + const unsigned char lookup_tables::lookup_attribute_data_2[256] = + { + // 0 1 2 3 4 5 6 7 8 9 A B C D E F + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 1 + 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 2 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 3 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 4 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 5 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 6 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 7 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 8 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 9 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // A + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // B + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // C + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // D + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // E + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // F + }; + + // Attribute data with double quote that does not require processing (anything but " \0 &) + template + const unsigned char lookup_tables::lookup_attribute_data_2_pure[256] = + { + // 0 1 2 3 4 5 6 7 8 9 A B C D E F + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 1 + 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 2 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 3 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 4 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 5 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 6 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 7 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 8 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 9 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // A + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // B + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // C + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // D + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // E + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // F + }; + + // Digits (dec and hex, 255 denotes end of numeric character reference) + template + const unsigned char lookup_tables::lookup_digits[256] = + { + // 0 1 2 3 4 5 6 7 8 9 A B C D E F + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // 0 + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // 1 + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // 2 + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,255,255,255,255,255,255, // 3 + 255, 10, 11, 12, 13, 14, 15,255,255,255,255,255,255,255,255,255, // 4 + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // 5 + 255, 10, 11, 12, 13, 14, 15,255,255,255,255,255,255,255,255,255, // 6 + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // 7 + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // 8 + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // 9 + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // A + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // B + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // C + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // D + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // E + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255 // F + }; + + // Upper case conversion + template + const unsigned char lookup_tables::lookup_upcase[256] = + { + // 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A B C D E F + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, // 0 + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, // 1 + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, // 2 + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, // 3 + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, // 4 + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, // 5 + 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, // 6 + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 123,124,125,126,127, // 7 + 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143, // 8 + 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159, // 9 + 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175, // A + 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191, // B + 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207, // C + 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223, // D + 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239, // E + 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255 // F + }; + } + //! \endcond + +} + +// Undefine internal macros +#undef RAPIDXML_PARSE_ERROR + +// On MSVC, restore warnings state +#ifdef _MSC_VER + #pragma warning(pop) +#endif + +#endif diff --git a/xml_converter/src/rapidxml-1.13/rapidxml_iterators.hpp b/xml_converter/src/rapidxml-1.13/rapidxml_iterators.hpp new file mode 100644 index 00000000..85c58946 --- /dev/null +++ b/xml_converter/src/rapidxml-1.13/rapidxml_iterators.hpp @@ -0,0 +1,174 @@ +#ifndef RAPIDXML_ITERATORS_HPP_INCLUDED +#define RAPIDXML_ITERATORS_HPP_INCLUDED + +// Copyright (C) 2006, 2009 Marcin Kalicinski +// Version 1.13 +// Revision $DateTime: 2009/05/13 01:46:17 $ +//! \file rapidxml_iterators.hpp This file contains rapidxml iterators + +#include "rapidxml.hpp" + +namespace rapidxml +{ + + //! Iterator of child nodes of xml_node + template + class node_iterator + { + + public: + + typedef typename xml_node value_type; + typedef typename xml_node &reference; + typedef typename xml_node *pointer; + typedef std::ptrdiff_t difference_type; + typedef std::bidirectional_iterator_tag iterator_category; + + node_iterator() + : m_node(0) + { + } + + node_iterator(xml_node *node) + : m_node(node->first_node()) + { + } + + reference operator *() const + { + assert(m_node); + return *m_node; + } + + pointer operator->() const + { + assert(m_node); + return m_node; + } + + node_iterator& operator++() + { + assert(m_node); + m_node = m_node->next_sibling(); + return *this; + } + + node_iterator operator++(int) + { + node_iterator tmp = *this; + ++this; + return tmp; + } + + node_iterator& operator--() + { + assert(m_node && m_node->previous_sibling()); + m_node = m_node->previous_sibling(); + return *this; + } + + node_iterator operator--(int) + { + node_iterator tmp = *this; + ++this; + return tmp; + } + + bool operator ==(const node_iterator &rhs) + { + return m_node == rhs.m_node; + } + + bool operator !=(const node_iterator &rhs) + { + return m_node != rhs.m_node; + } + + private: + + xml_node *m_node; + + }; + + //! Iterator of child attributes of xml_node + template + class attribute_iterator + { + + public: + + typedef typename xml_attribute value_type; + typedef typename xml_attribute &reference; + typedef typename xml_attribute *pointer; + typedef std::ptrdiff_t difference_type; + typedef std::bidirectional_iterator_tag iterator_category; + + attribute_iterator() + : m_attribute(0) + { + } + + attribute_iterator(xml_node *node) + : m_attribute(node->first_attribute()) + { + } + + reference operator *() const + { + assert(m_attribute); + return *m_attribute; + } + + pointer operator->() const + { + assert(m_attribute); + return m_attribute; + } + + attribute_iterator& operator++() + { + assert(m_attribute); + m_attribute = m_attribute->next_attribute(); + return *this; + } + + attribute_iterator operator++(int) + { + attribute_iterator tmp = *this; + ++this; + return tmp; + } + + attribute_iterator& operator--() + { + assert(m_attribute && m_attribute->previous_attribute()); + m_attribute = m_attribute->previous_attribute(); + return *this; + } + + attribute_iterator operator--(int) + { + attribute_iterator tmp = *this; + ++this; + return tmp; + } + + bool operator ==(const attribute_iterator &rhs) + { + return m_attribute == rhs.m_attribute; + } + + bool operator !=(const attribute_iterator &rhs) + { + return m_attribute != rhs.m_attribute; + } + + private: + + xml_attribute *m_attribute; + + }; + +} + +#endif diff --git a/xml_converter/src/rapidxml-1.13/rapidxml_print.hpp b/xml_converter/src/rapidxml-1.13/rapidxml_print.hpp new file mode 100644 index 00000000..d03d5f5b --- /dev/null +++ b/xml_converter/src/rapidxml-1.13/rapidxml_print.hpp @@ -0,0 +1,421 @@ +#ifndef RAPIDXML_PRINT_HPP_INCLUDED +#define RAPIDXML_PRINT_HPP_INCLUDED + +// Copyright (C) 2006, 2009 Marcin Kalicinski +// Version 1.13 +// Revision $DateTime: 2009/05/13 01:46:17 $ +//! \file rapidxml_print.hpp This file contains rapidxml printer implementation + +#include "rapidxml.hpp" + +// Only include streams if not disabled +#ifndef RAPIDXML_NO_STREAMS + #include + #include +#endif + +namespace rapidxml +{ + + /////////////////////////////////////////////////////////////////////// + // Printing flags + + const int print_no_indenting = 0x1; //!< Printer flag instructing the printer to suppress indenting of XML. See print() function. + + /////////////////////////////////////////////////////////////////////// + // Internal + + //! \cond internal + namespace internal + { + + /////////////////////////////////////////////////////////////////////////// + // Internal character operations + + // Copy characters from given range to given output iterator + template + inline OutIt copy_chars(const Ch *begin, const Ch *end, OutIt out) + { + while (begin != end) + *out++ = *begin++; + return out; + } + + // Copy characters from given range to given output iterator and expand + // characters into references (< > ' " &) + template + inline OutIt copy_and_expand_chars(const Ch *begin, const Ch *end, Ch noexpand, OutIt out) + { + while (begin != end) + { + if (*begin == noexpand) + { + *out++ = *begin; // No expansion, copy character + } + else + { + switch (*begin) + { + case Ch('<'): + *out++ = Ch('&'); *out++ = Ch('l'); *out++ = Ch('t'); *out++ = Ch(';'); + break; + case Ch('>'): + *out++ = Ch('&'); *out++ = Ch('g'); *out++ = Ch('t'); *out++ = Ch(';'); + break; + case Ch('\''): + *out++ = Ch('&'); *out++ = Ch('a'); *out++ = Ch('p'); *out++ = Ch('o'); *out++ = Ch('s'); *out++ = Ch(';'); + break; + case Ch('"'): + *out++ = Ch('&'); *out++ = Ch('q'); *out++ = Ch('u'); *out++ = Ch('o'); *out++ = Ch('t'); *out++ = Ch(';'); + break; + case Ch('&'): + *out++ = Ch('&'); *out++ = Ch('a'); *out++ = Ch('m'); *out++ = Ch('p'); *out++ = Ch(';'); + break; + default: + *out++ = *begin; // No expansion, copy character + } + } + ++begin; // Step to next character + } + return out; + } + + // Fill given output iterator with repetitions of the same character + template + inline OutIt fill_chars(OutIt out, int n, Ch ch) + { + for (int i = 0; i < n; ++i) + *out++ = ch; + return out; + } + + // Find character + template + inline bool find_char(const Ch *begin, const Ch *end) + { + while (begin != end) + if (*begin++ == ch) + return true; + return false; + } + + /////////////////////////////////////////////////////////////////////////// + // Internal printing operations + + // Print node + template + inline OutIt print_node(OutIt out, const xml_node *node, int flags, int indent) + { + // Print proper node type + switch (node->type()) + { + + // Document + case node_document: + out = print_children(out, node, flags, indent); + break; + + // Element + case node_element: + out = print_element_node(out, node, flags, indent); + break; + + // Data + case node_data: + out = print_data_node(out, node, flags, indent); + break; + + // CDATA + case node_cdata: + out = print_cdata_node(out, node, flags, indent); + break; + + // Declaration + case node_declaration: + out = print_declaration_node(out, node, flags, indent); + break; + + // Comment + case node_comment: + out = print_comment_node(out, node, flags, indent); + break; + + // Doctype + case node_doctype: + out = print_doctype_node(out, node, flags, indent); + break; + + // Pi + case node_pi: + out = print_pi_node(out, node, flags, indent); + break; + + // Unknown + default: + assert(0); + break; + } + + // If indenting not disabled, add line break after node + if (!(flags & print_no_indenting)) + *out = Ch('\n'), ++out; + + // Return modified iterator + return out; + } + + // Print children of the node + template + inline OutIt print_children(OutIt out, const xml_node *node, int flags, int indent) + { + for (xml_node *child = node->first_node(); child; child = child->next_sibling()) + out = print_node(out, child, flags, indent); + return out; + } + + // Print attributes of the node + template + inline OutIt print_attributes(OutIt out, const xml_node *node, int flags) + { + for (xml_attribute *attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()) + { + if (attribute->name() && attribute->value()) + { + // Print attribute name + *out = Ch(' '), ++out; + out = copy_chars(attribute->name(), attribute->name() + attribute->name_size(), out); + *out = Ch('='), ++out; + // Print attribute value using appropriate quote type + if (find_char(attribute->value(), attribute->value() + attribute->value_size())) + { + *out = Ch('\''), ++out; + out = copy_and_expand_chars(attribute->value(), attribute->value() + attribute->value_size(), Ch('"'), out); + *out = Ch('\''), ++out; + } + else + { + *out = Ch('"'), ++out; + out = copy_and_expand_chars(attribute->value(), attribute->value() + attribute->value_size(), Ch('\''), out); + *out = Ch('"'), ++out; + } + } + } + return out; + } + + // Print data node + template + inline OutIt print_data_node(OutIt out, const xml_node *node, int flags, int indent) + { + assert(node->type() == node_data); + if (!(flags & print_no_indenting)) + out = fill_chars(out, indent, Ch('\t')); + out = copy_and_expand_chars(node->value(), node->value() + node->value_size(), Ch(0), out); + return out; + } + + // Print data node + template + inline OutIt print_cdata_node(OutIt out, const xml_node *node, int flags, int indent) + { + assert(node->type() == node_cdata); + if (!(flags & print_no_indenting)) + out = fill_chars(out, indent, Ch('\t')); + *out = Ch('<'); ++out; + *out = Ch('!'); ++out; + *out = Ch('['); ++out; + *out = Ch('C'); ++out; + *out = Ch('D'); ++out; + *out = Ch('A'); ++out; + *out = Ch('T'); ++out; + *out = Ch('A'); ++out; + *out = Ch('['); ++out; + out = copy_chars(node->value(), node->value() + node->value_size(), out); + *out = Ch(']'); ++out; + *out = Ch(']'); ++out; + *out = Ch('>'); ++out; + return out; + } + + // Print element node + template + inline OutIt print_element_node(OutIt out, const xml_node *node, int flags, int indent) + { + assert(node->type() == node_element); + + // Print element name and attributes, if any + if (!(flags & print_no_indenting)) + out = fill_chars(out, indent, Ch('\t')); + *out = Ch('<'), ++out; + out = copy_chars(node->name(), node->name() + node->name_size(), out); + out = print_attributes(out, node, flags); + + // If node is childless + if (node->value_size() == 0 && !node->first_node()) + { + // Print childless node tag ending + *out = Ch('/'), ++out; + *out = Ch('>'), ++out; + } + else + { + // Print normal node tag ending + *out = Ch('>'), ++out; + + // Test if node contains a single data node only (and no other nodes) + xml_node *child = node->first_node(); + if (!child) + { + // If node has no children, only print its value without indenting + out = copy_and_expand_chars(node->value(), node->value() + node->value_size(), Ch(0), out); + } + else if (child->next_sibling() == 0 && child->type() == node_data) + { + // If node has a sole data child, only print its value without indenting + out = copy_and_expand_chars(child->value(), child->value() + child->value_size(), Ch(0), out); + } + else + { + // Print all children with full indenting + if (!(flags & print_no_indenting)) + *out = Ch('\n'), ++out; + out = print_children(out, node, flags, indent + 1); + if (!(flags & print_no_indenting)) + out = fill_chars(out, indent, Ch('\t')); + } + + // Print node end + *out = Ch('<'), ++out; + *out = Ch('/'), ++out; + out = copy_chars(node->name(), node->name() + node->name_size(), out); + *out = Ch('>'), ++out; + } + return out; + } + + // Print declaration node + template + inline OutIt print_declaration_node(OutIt out, const xml_node *node, int flags, int indent) + { + // Print declaration start + if (!(flags & print_no_indenting)) + out = fill_chars(out, indent, Ch('\t')); + *out = Ch('<'), ++out; + *out = Ch('?'), ++out; + *out = Ch('x'), ++out; + *out = Ch('m'), ++out; + *out = Ch('l'), ++out; + + // Print attributes + out = print_attributes(out, node, flags); + + // Print declaration end + *out = Ch('?'), ++out; + *out = Ch('>'), ++out; + + return out; + } + + // Print comment node + template + inline OutIt print_comment_node(OutIt out, const xml_node *node, int flags, int indent) + { + assert(node->type() == node_comment); + if (!(flags & print_no_indenting)) + out = fill_chars(out, indent, Ch('\t')); + *out = Ch('<'), ++out; + *out = Ch('!'), ++out; + *out = Ch('-'), ++out; + *out = Ch('-'), ++out; + out = copy_chars(node->value(), node->value() + node->value_size(), out); + *out = Ch('-'), ++out; + *out = Ch('-'), ++out; + *out = Ch('>'), ++out; + return out; + } + + // Print doctype node + template + inline OutIt print_doctype_node(OutIt out, const xml_node *node, int flags, int indent) + { + assert(node->type() == node_doctype); + if (!(flags & print_no_indenting)) + out = fill_chars(out, indent, Ch('\t')); + *out = Ch('<'), ++out; + *out = Ch('!'), ++out; + *out = Ch('D'), ++out; + *out = Ch('O'), ++out; + *out = Ch('C'), ++out; + *out = Ch('T'), ++out; + *out = Ch('Y'), ++out; + *out = Ch('P'), ++out; + *out = Ch('E'), ++out; + *out = Ch(' '), ++out; + out = copy_chars(node->value(), node->value() + node->value_size(), out); + *out = Ch('>'), ++out; + return out; + } + + // Print pi node + template + inline OutIt print_pi_node(OutIt out, const xml_node *node, int flags, int indent) + { + assert(node->type() == node_pi); + if (!(flags & print_no_indenting)) + out = fill_chars(out, indent, Ch('\t')); + *out = Ch('<'), ++out; + *out = Ch('?'), ++out; + out = copy_chars(node->name(), node->name() + node->name_size(), out); + *out = Ch(' '), ++out; + out = copy_chars(node->value(), node->value() + node->value_size(), out); + *out = Ch('?'), ++out; + *out = Ch('>'), ++out; + return out; + } + + } + //! \endcond + + /////////////////////////////////////////////////////////////////////////// + // Printing + + //! Prints XML to given output iterator. + //! \param out Output iterator to print to. + //! \param node Node to be printed. Pass xml_document to print entire document. + //! \param flags Flags controlling how XML is printed. + //! \return Output iterator pointing to position immediately after last character of printed text. + template + inline OutIt print(OutIt out, const xml_node &node, int flags = 0) + { + return internal::print_node(out, &node, flags, 0); + } + +#ifndef RAPIDXML_NO_STREAMS + + //! Prints XML to given output stream. + //! \param out Output stream to print to. + //! \param node Node to be printed. Pass xml_document to print entire document. + //! \param flags Flags controlling how XML is printed. + //! \return Output stream. + template + inline std::basic_ostream &print(std::basic_ostream &out, const xml_node &node, int flags = 0) + { + print(std::ostream_iterator(out), node, flags); + return out; + } + + //! Prints formatted XML to given output stream. Uses default printing flags. Use print() function to customize printing process. + //! \param out Output stream to print to. + //! \param node Node to be printed. + //! \return Output stream. + template + inline std::basic_ostream &operator <<(std::basic_ostream &out, const xml_node &node) + { + return print(out, node); + } + +#endif + +} + +#endif diff --git a/xml_converter/src/rapidxml-1.13/rapidxml_utils.hpp b/xml_converter/src/rapidxml-1.13/rapidxml_utils.hpp new file mode 100644 index 00000000..5eafa35d --- /dev/null +++ b/xml_converter/src/rapidxml-1.13/rapidxml_utils.hpp @@ -0,0 +1,122 @@ +#ifndef RAPIDXML_UTILS_HPP_INCLUDED +#define RAPIDXML_UTILS_HPP_INCLUDED + +// Copyright (C) 2006, 2009 Marcin Kalicinski +// Version 1.13 +// Revision $DateTime: 2009/05/13 01:46:17 $ +//! \file rapidxml_utils.hpp This file contains high-level rapidxml utilities that can be useful +//! in certain simple scenarios. They should probably not be used if maximizing performance is the main objective. + +#include "rapidxml.hpp" +#include +#include +#include +#include + +namespace rapidxml +{ + + //! Represents data loaded from a file + template + class file + { + + public: + + //! Loads file into the memory. Data will be automatically destroyed by the destructor. + //! \param filename Filename to load. + file(const char *filename) + { + using namespace std; + + // Open stream + basic_ifstream stream(filename, ios::binary); + if (!stream) + throw runtime_error(string("cannot open file ") + filename); + stream.unsetf(ios::skipws); + + // Determine stream size + stream.seekg(0, ios::end); + size_t size = stream.tellg(); + stream.seekg(0); + + // Load data and add terminating 0 + m_data.resize(size + 1); + stream.read(&m_data.front(), static_cast(size)); + m_data[size] = 0; + } + + //! Loads file into the memory. Data will be automatically destroyed by the destructor + //! \param stream Stream to load from + file(std::basic_istream &stream) + { + using namespace std; + + // Load data and add terminating 0 + stream.unsetf(ios::skipws); + m_data.assign(istreambuf_iterator(stream), istreambuf_iterator()); + if (stream.fail() || stream.bad()) + throw runtime_error("error reading stream"); + m_data.push_back(0); + } + + //! Gets file data. + //! \return Pointer to data of file. + Ch *data() + { + return &m_data.front(); + } + + //! Gets file data. + //! \return Pointer to data of file. + const Ch *data() const + { + return &m_data.front(); + } + + //! Gets file data size. + //! \return Size of file data, in characters. + std::size_t size() const + { + return m_data.size(); + } + + private: + + std::vector m_data; // File data + + }; + + //! Counts children of node. Time complexity is O(n). + //! \return Number of children of node + template + inline std::size_t count_children(xml_node *node) + { + xml_node *child = node->first_node(); + std::size_t count = 0; + while (child) + { + ++count; + child = child->next_sibling(); + } + return count; + } + + //! Counts attributes of node. Time complexity is O(n). + //! \return Number of attributes of node + template + inline std::size_t count_attributes(xml_node *node) + { + xml_attribute *attr = node->first_attribute(); + std::size_t count = 0; + while (attr) + { + ++count; + attr = attr->next_attribute(); + } + return count; + } + +} + +#endif diff --git a/xml_converter/src/string_helper.cpp b/xml_converter/src/string_helper.cpp index 880d3ff2..cbc08030 100644 --- a/xml_converter/src/string_helper.cpp +++ b/xml_converter/src/string_helper.cpp @@ -1,11 +1,13 @@ +#include "string_helper.hpp" + #include #include #include -#include "string_helper.hpp" + using namespace std; bool matches_any(string test, std::initializer_list list) { - for( auto elem : list ) { + for (auto elem : list) { if (test == elem) { return true; } @@ -15,7 +17,7 @@ bool matches_any(string test, std::initializer_list list) { bool nomralized_matches_any(string test, std::initializer_list list) { test = normalize_type_name(test); - for( auto elem : list ) { + for (auto elem : list) { if (test == normalize_type_name(elem)) { return true; } @@ -25,7 +27,7 @@ bool nomralized_matches_any(string test, std::initializer_list list) { bool nomralized_matches_any(string test, std::vector list) { test = normalize_type_name(test); - for( auto elem : list ) { + for (auto elem : list) { if (test == normalize_type_name(elem)) { return true; } @@ -34,10 +36,10 @@ bool nomralized_matches_any(string test, std::vector list) { } -vector split(string input, string delimiter) { +vector split(string input, string delimiter) { vector output; size_t cursor_position = 0; - while((cursor_position = input.find(delimiter)) != std::string::npos) { + while ((cursor_position = input.find(delimiter)) != std::string::npos) { output.push_back(input.substr(0, cursor_position)); input.erase(0, cursor_position + delimiter.length()); } @@ -50,8 +52,6 @@ string normalize_type_name(string type_name) { string output; output.reserve(type_name.length()); - - size_t i = 0; for (char character : type_name) { if (character >= 'A' && character <= 'Z') { output += (character - 'A' + 'a'); diff --git a/xml_converter/src/trail.cpp b/xml_converter/src/trail.cpp index 419992e9..9d117f17 100644 --- a/xml_converter/src/trail.cpp +++ b/xml_converter/src/trail.cpp @@ -1,5 +1,5 @@ #include "trail.hpp" string Trail::classname() { - return string("Trail"); + return string("Trail"); } diff --git a/xml_converter/src/trail.hpp b/xml_converter/src/trail.hpp index 45b08a25..6d17e40f 100644 --- a/xml_converter/src/trail.hpp +++ b/xml_converter/src/trail.hpp @@ -1,35 +1,33 @@ #pragma once -#include "rapidxml-1.13/rapidxml.hpp" -#include "rapidxml-1.13/rapidxml_print.hpp" - +#include -#include +#include +#include #include +#include +#include #include #include #include #include #include -#include -#include -#include -#include #include "attribute/bool.hpp" #include "attribute/chirality.hpp" #include "attribute/color.hpp" #include "attribute/festival_filter.hpp" #include "attribute/float.hpp" -#include "attribute/float.hpp" #include "attribute/int.hpp" -#include "attribute/profession_filter.hpp" -#include "attribute/string.hpp" #include "attribute/map_type_filter.hpp" #include "attribute/mount_filter.hpp" +#include "attribute/profession_filter.hpp" #include "attribute/race_filter.hpp" - +#include "attribute/string.hpp" #include "parseable.hpp" +#include "rapidxml-1.13/rapidxml.hpp" +#include "rapidxml-1.13/rapidxml_print.hpp" + using namespace std; #define PARSEABLE_VAR(...) CLASS_PARSEABLE_VAR(Trail, __VA_ARGS__ ) @@ -39,69 +37,69 @@ using namespace std; // //////////////////////////////////////////////////////////////////////////////// class Trail: public Parseable { -public: - // https://blishhud.com/docs/markers/attributes/achievement - PARSEABLE_VAR(achievement_id, int, "AchievementId") - PARSEABLE_VAR(achievement_bit, int, "AchievementBit") + public: + // https://blishhud.com/docs/markers/attributes/achievement + PARSEABLE_VAR(achievement_id, int, "AchievementId") + PARSEABLE_VAR(achievement_bit, int, "AchievementBit") - // https://blishhud.com/docs/markers/attributes/alpha - PARSEABLE_VAR(alpha, float, "Alpha") + // https://blishhud.com/docs/markers/attributes/alpha + PARSEABLE_VAR(alpha, float, "Alpha") - // https://blishhud.com/docs/markers/attributes/animspeed - PARSEABLE_VAR(animation_speed, float, "AnimSpeed") + // https://blishhud.com/docs/markers/attributes/animspeed + PARSEABLE_VAR(animation_speed, float, "AnimSpeed") - // https://blishhud.com/docs/markers/attributes/canfade - PARSEABLE_VAR(can_fade, bool, "CanFade") + // https://blishhud.com/docs/markers/attributes/canfade + PARSEABLE_VAR(can_fade, bool, "CanFade") - // https://blishhud.com/docs/markers/attributes/color - PARSEABLE_VAR(color, Color, "Color"); + // https://blishhud.com/docs/markers/attributes/color + PARSEABLE_VAR(color, Color, "Color"); - // https://blishhud.com/docs/markers/attributes/cull - PARSEABLE_VAR(cull, Chirality, "Cull"); + // https://blishhud.com/docs/markers/attributes/cull + PARSEABLE_VAR(cull, Chirality, "Cull"); - // https://blishhud.com/docs/markers/attributes/fade - PARSEABLE_VAR(fade_near, float, "FadeNear") - PARSEABLE_VAR(fade_far, float, "FadeFar") + // https://blishhud.com/docs/markers/attributes/fade + PARSEABLE_VAR(fade_near, float, "FadeNear") + PARSEABLE_VAR(fade_far, float, "FadeFar") - // https://blishhud.com/docs/markers/attributes/festival - PARSEABLE_VAR(festival_filter, FestivalFilter, "Festival") + // https://blishhud.com/docs/markers/attributes/festival + PARSEABLE_VAR(festival_filter, FestivalFilter, "Festival") - // https://blishhud.com/docs/markers/attributes/iswall - PARSEABLE_VAR(is_wall, bool, "IsWall") + // https://blishhud.com/docs/markers/attributes/iswall + PARSEABLE_VAR(is_wall, bool, "IsWall") - // https://blishhud.com/docs/markers/attributes/maptype - PARSEABLE_VAR(map_type, MapTypeFilter, "MapType") + // https://blishhud.com/docs/markers/attributes/maptype + PARSEABLE_VAR(map_type, MapTypeFilter, "MapType") - // https://blishhud.com/docs/markers/attributes/mount - PARSEABLE_VAR(mount, MountFilter, "Mount") + // https://blishhud.com/docs/markers/attributes/mount + PARSEABLE_VAR(mount, MountFilter, "Mount") - // https://blishhud.com/docs/markers/attributes/profession - PARSEABLE_VAR(profession_filter, ProfessionFilter, "Profession") + // https://blishhud.com/docs/markers/attributes/profession + PARSEABLE_VAR(profession_filter, ProfessionFilter, "Profession") - // https://blishhud.com/docs/markers/attributes/race - PARSEABLE_VAR(race_filter, RaceFilter, "Race") + // https://blishhud.com/docs/markers/attributes/race + PARSEABLE_VAR(race_filter, RaceFilter, "Race") - // https://blishhud.com/docs/markers/attributes/texture - PARSEABLE_VAR(texture, string, "Texture") + // https://blishhud.com/docs/markers/attributes/texture + PARSEABLE_VAR(texture, string, "Texture") - // https://blishhud.com/docs/markers/attributes/trailscale - PARSEABLE_VAR(trail_scale, float, "TrailScale") + // https://blishhud.com/docs/markers/attributes/trailscale + PARSEABLE_VAR(trail_scale, float, "TrailScale") - // https://blishhud.com/docs/markers/attributes/type - PARSEABLE_VAR(category, string, "Type") + // https://blishhud.com/docs/markers/attributes/type + PARSEABLE_VAR(category, string, "Type") - // https://blishhud.com/docs/markers/attributes/visibility - PARSEABLE_VAR(visible_on_minimap, bool, "MinimapVisibility") - PARSEABLE_VAR(visible_on_map, bool, "MapVisibility") - PARSEABLE_VAR(visible_ingame, bool, "IngameVisibility") + // https://blishhud.com/docs/markers/attributes/visibility + PARSEABLE_VAR(visible_on_minimap, bool, "MinimapVisibility") + PARSEABLE_VAR(visible_on_map, bool, "MapVisibility") + PARSEABLE_VAR(visible_ingame, bool, "IngameVisibility") - // TODO: Currently Uncatagorized by BlishHUD - PARSEABLE_VAR(trail_data, string, "TrailData") - PARSEABLE_VAR(guid, string, "GUID") // https://blishhud.com/docs/markers/attributes/guid (but this is only valid for markers it seems) - PARSEABLE_VAR(map_display_size, int, "MapDisplaySize") + // Currently Uncatagorized by BlishHUD + PARSEABLE_VAR(trail_data, string, "TrailData") + PARSEABLE_VAR(guid, string, "GUID") // https://blishhud.com/docs/markers/attributes/guid (but this is only valid for markers it seems) + PARSEABLE_VAR(map_display_size, int, "MapDisplaySize") - virtual string classname(); + virtual string classname(); }; #undef PARSEABLE_VAR diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 2be77ff6..0fe97bf0 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -1,7 +1,5 @@ -#include "rapidxml-1.13/rapidxml.hpp" -#include "rapidxml-1.13/rapidxml_print.hpp" +#include -#include #include #include #include @@ -10,22 +8,26 @@ #include #include #include -#include #include #include -using namespace std; #include "parseable.hpp" #include "trail.hpp" #include "icon.hpp" #include "category.hpp" - #include "attribute/float.hpp" +#include "rapidxml-1.13/rapidxml.hpp" +#include "rapidxml-1.13/rapidxml_print.hpp" + +using namespace std; + -bool has_suffix (std::string const &fullString, std::string const &ending) { + + +bool has_suffix(std::string const &fullString, std::string const &ending) { if (fullString.length() >= ending.length()) { return (0 == fullString.compare (fullString.length() - ending.length(), ending.length(), ending)); } else { @@ -41,111 +43,109 @@ bool has_suffix (std::string const &fullString, std::string const &ending) { // Parse the xml block into an in memory array of Markers. //////////////////////////////////////////////////////////////////////////////// vector parse_pois(rapidxml::xml_node<>* root_node, string filename, vector* errors) { - vector markers; - - for (rapidxml::xml_node<>* node = root_node->first_node(); node; node = node->next_sibling()) { - if (string(node->name()) == "POI") { - Icon poi; - poi.init_from_xml(node, errors); - markers.push_back(poi); - } - else if (string(node->name()) == "Trail") { - Trail trail; - trail.init_from_xml(node, errors); - markers.push_back(trail); - } - else { - cout << "Unknown POIs node name \"" << node->name() << "\" " << filename << endl; - } - } - return markers; + vector markers; + + for (rapidxml::xml_node<>* node = root_node->first_node(); node; node = node->next_sibling()) { + if (string(node->name()) == "POI") { + Icon poi; + poi.init_from_xml(node, errors); + markers.push_back(poi); + } + else if (string(node->name()) == "Trail") { + Trail trail; + trail.init_from_xml(node, errors); + markers.push_back(trail); + } + else { + cout << "Unknown POIs node name \"" << node->name() << "\" " << filename << endl; + } + } + return markers; } void parse_marker_categories(rapidxml::xml_node<>* root_node, vector* errors) { - for (rapidxml::xml_node<>* node = root_node->first_node(); node; node = node->next_sibling()) { - if (string(node->name()) == "MarkerCategory") { - Cateogry marker_category; - marker_category.init_from_xml(node, errors); - parse_marker_categories(node, errors); - } - else { - errors->push_back("unknown maker category tag " + string(node->name())); - } - } + for (rapidxml::xml_node<>* node = root_node->first_node(); node; node = node->next_sibling()) { + if (string(node->name()) == "MarkerCategory") { + Cateogry marker_category; + marker_category.init_from_xml(node, errors); + parse_marker_categories(node, errors); + } + else { + errors->push_back("unknown maker category tag " + string(node->name())); + } + } } //////////////////////////////////////////////////////////////////////////////// // parse_xml_file // -// +// A function which parses a single XML file into their corrisponding classes. //////////////////////////////////////////////////////////////////////////////// void parse_xml_file(string xml_filepath) { + vector errors; - vector errors; - - rapidxml::xml_document<> doc; - rapidxml::xml_node<>* root_node; - - ifstream inputFile(xml_filepath); - vector buffer((istreambuf_iterator(inputFile)), istreambuf_iterator()); - buffer.push_back('\0'); + rapidxml::xml_document<> doc; + rapidxml::xml_node<>* root_node; - doc.parse<0>(&buffer[0]); + ifstream inputFile(xml_filepath); + vector buffer((istreambuf_iterator(inputFile)), istreambuf_iterator()); + buffer.push_back('\0'); - root_node = doc.first_node(); + doc.parse<0>(&buffer[0]); + root_node = doc.first_node(); - // Validate the Root Node - if (string(root_node->name()) != "OverlayData") { - cout << "Root Node is \"" << root_node->name() << "\" not \"OverlayData\" in " << xml_filepath << endl; - } - if (root_node->first_attribute() != nullptr) { - cout << "Root Node has attributes when it should have none in " << xml_filepath << endl; - } + // Validate the Root Node + if (string(root_node->name()) != "OverlayData") { + cout << "Root Node is \"" << root_node->name() << "\" not \"OverlayData\" in " << xml_filepath << endl; + } + if (root_node->first_attribute() != nullptr) { + cout << "Root Node has attributes when it should have none in " << xml_filepath << endl; + } - for (rapidxml::xml_node<>* node = root_node->first_node(); node; node = node->next_sibling()) { - if (string(node->name()) == "MarkerCategory") { - // parse_marker_categories(node, &errors); - } - else if (string(node->name()) == "POIs") { - parse_pois(node, xml_filepath, &errors); - } - else { - cout << "Unknown top-level node name " << node->name() << endl; - } - } + for (rapidxml::xml_node<>* node = root_node->first_node(); node; node = node->next_sibling()) { + if (string(node->name()) == "MarkerCategory") { + // parse_marker_categories(node, &errors); + } + else if (string(node->name()) == "POIs") { + parse_pois(node, xml_filepath, &errors); + } + else { + cout << "Unknown top-level node name " << node->name() << endl; + } + } - if (errors.size() > 0) { - cout << xml_filepath << endl; - for (auto error : errors) { - cout << error << endl; - } - } + if (errors.size() > 0) { + cout << xml_filepath << endl; + for (auto error : errors) { + cout << error << endl; + } + } } void convert_taco_directory(string directory) { - for (const auto & entry : filesystem::directory_iterator(directory)) { - string path = entry.path(); - if (has_suffix(path, ".xml")) { - parse_xml_file(path); - } - } + for (const auto & entry : filesystem::directory_iterator(directory)) { + string path = entry.path(); + if (has_suffix(path, ".xml")) { + parse_xml_file(path); + } + } } int main() { - convert_taco_directory("./packs/tw_ALL_IN_ONE"); - convert_taco_directory("./packs/TehsTrails"); - convert_taco_directory("./packs/MoW"); - convert_taco_directory("./packs/Hero.Blish.Pack"); - convert_taco_directory("./packs/GW2 TacO ReActif EN External"); - convert_taco_directory("./packs/602fd903dad6efast_TacO_pack_001"); - - return 0; + convert_taco_directory("./packs/tw_ALL_IN_ONE"); + convert_taco_directory("./packs/TehsTrails"); + convert_taco_directory("./packs/MoW"); + convert_taco_directory("./packs/Hero.Blish.Pack"); + convert_taco_directory("./packs/GW2 TacO ReActif EN External"); + convert_taco_directory("./packs/602fd903dad6efast_TacO_pack_001"); + + return 0; } From c48b9dfbe2290c00a7f34c9a1ce939d1c6cbe64e Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sun, 3 Apr 2022 13:13:32 -0500 Subject: [PATCH 012/539] Enabling all compiler warnings+errors. Fixing warnings and errors --- xml_converter/CMakeLists.txt | 4 +--- xml_converter/src/attribute/chirality.cpp | 2 +- xml_converter/src/attribute/color.cpp | 2 +- xml_converter/src/attribute/filter.cpp | 2 +- xml_converter/src/attribute/filter.hpp | 4 ++-- xml_converter/src/attribute/float.cpp | 2 +- xml_converter/src/attribute/string.cpp | 2 +- xml_converter/src/trail.hpp | 4 ++-- 8 files changed, 10 insertions(+), 12 deletions(-) diff --git a/xml_converter/CMakeLists.txt b/xml_converter/CMakeLists.txt index b8ab58d4..0dd272bc 100644 --- a/xml_converter/CMakeLists.txt +++ b/xml_converter/CMakeLists.txt @@ -20,7 +20,5 @@ target_compile_features(${TARGET_NAME} PRIVATE cxx_std_17) if(MSVC) target_compile_options(${TARGET_NAME} PRIVATE /W4 /WX) else() - # TODO: We are ignoring some of the stronger warnings for now but in the future we should address them. - # target_compile_options(${TARGET_NAME} PRIVATE -Wall -Wextra -Wpedantic -Werror) - target_compile_options(${TARGET_NAME} PRIVATE -Wall) + target_compile_options(${TARGET_NAME} PRIVATE -Wall -Wextra -Wpedantic -Werror) endif() diff --git a/xml_converter/src/attribute/chirality.cpp b/xml_converter/src/attribute/chirality.cpp index 605164dd..a2b9ec96 100644 --- a/xml_converter/src/attribute/chirality.cpp +++ b/xml_converter/src/attribute/chirality.cpp @@ -7,7 +7,7 @@ using namespace std; -Chirality parse_Chirality(rapidxml::xml_attribute<>* input, vector *errors) { +Chirality parse_Chirality(rapidxml::xml_attribute<>* input, vector *) { Chirality chirality; chirality.chirality = string(input->value()); return chirality; diff --git a/xml_converter/src/attribute/color.cpp b/xml_converter/src/attribute/color.cpp index 0e2c5121..2273e917 100644 --- a/xml_converter/src/attribute/color.cpp +++ b/xml_converter/src/attribute/color.cpp @@ -7,7 +7,7 @@ using namespace std; -Color parse_Color(rapidxml::xml_attribute<>* input, vector *errors) { +Color parse_Color(rapidxml::xml_attribute<>* input, vector *) { Color color; color.hex = string(input->value()); return color; diff --git a/xml_converter/src/attribute/filter.cpp b/xml_converter/src/attribute/filter.cpp index 3922a071..8ce302fb 100644 --- a/xml_converter/src/attribute/filter.cpp +++ b/xml_converter/src/attribute/filter.cpp @@ -14,7 +14,7 @@ uint64_t Filter::_counter = 0; map Filter::original; map> Filter::lookup; -bool Filter::setup_variable(void (*function)(void* filter_object), void* object, vector names) { +bool Filter::setup_variable(void (*function)(void* filter_object), vector names) { const char* type_id = typeid(*this).name(); auto iterator = original.find(type_id); diff --git a/xml_converter/src/attribute/filter.hpp b/xml_converter/src/attribute/filter.hpp index b4f94a8c..c987e84a 100644 --- a/xml_converter/src/attribute/filter.hpp +++ b/xml_converter/src/attribute/filter.hpp @@ -31,7 +31,7 @@ using namespace std; static void enable_##name(void* obj) { \ (*(filtername*)obj).name = true; \ } \ - bool name##_setup = setup_variable(enable_##name, &name, { __VA_ARGS__ }); + bool name##_setup = setup_variable(enable_##name, { __VA_ARGS__ }); //////////////////////////////////////////////////////////////////////////////// // Filter @@ -50,7 +50,7 @@ class Filter { static map> lookup; public: - bool setup_variable(void (*function)(void* filter_object), void* object, vector names); + bool setup_variable(void (*function)(void* filter_object), vector names); void parse(rapidxml::xml_attribute<>* input, vector *errors); virtual string classname() { return "Filter"; } diff --git a/xml_converter/src/attribute/float.cpp b/xml_converter/src/attribute/float.cpp index 183786fd..21ad98d2 100644 --- a/xml_converter/src/attribute/float.cpp +++ b/xml_converter/src/attribute/float.cpp @@ -5,6 +5,6 @@ #include "../rapidxml-1.13/rapidxml.hpp" -float parse_float(rapidxml::xml_attribute<>* input, std::vector *errors) { +float parse_float(rapidxml::xml_attribute<>* input, std::vector *) { return std::stof(input->value()); } diff --git a/xml_converter/src/attribute/string.cpp b/xml_converter/src/attribute/string.cpp index 7c7c1069..8575ebbb 100644 --- a/xml_converter/src/attribute/string.cpp +++ b/xml_converter/src/attribute/string.cpp @@ -7,6 +7,6 @@ using namespace std; -string parse_string(rapidxml::xml_attribute<>* input, vector *errors) { +string parse_string(rapidxml::xml_attribute<>* input, vector *) { return string(input->value()); } diff --git a/xml_converter/src/trail.hpp b/xml_converter/src/trail.hpp index 6d17e40f..229d9855 100644 --- a/xml_converter/src/trail.hpp +++ b/xml_converter/src/trail.hpp @@ -52,10 +52,10 @@ class Trail: public Parseable { PARSEABLE_VAR(can_fade, bool, "CanFade") // https://blishhud.com/docs/markers/attributes/color - PARSEABLE_VAR(color, Color, "Color"); + PARSEABLE_VAR(color, Color, "Color") // https://blishhud.com/docs/markers/attributes/cull - PARSEABLE_VAR(cull, Chirality, "Cull"); + PARSEABLE_VAR(cull, Chirality, "Cull") // https://blishhud.com/docs/markers/attributes/fade PARSEABLE_VAR(fade_near, float, "FadeNear") From 32f42767ca2a1fd11de38f9d179f81bbbbebbb2b Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sun, 3 Apr 2022 13:23:05 -0500 Subject: [PATCH 013/539] removing excess error log for parseables --- xml_converter/src/parseable.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/xml_converter/src/parseable.cpp b/xml_converter/src/parseable.cpp index 8cffba32..c43c730f 100644 --- a/xml_converter/src/parseable.cpp +++ b/xml_converter/src/parseable.cpp @@ -47,7 +47,6 @@ bool Parseable::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector< auto iterator = variable_list->find(item); if (iterator == variable_list->end()) { - errors->push_back("Unknown " + this->classname() + " option " + item); return false; } From 7e90a108eae7ae0232049498a34298c9a426b76a Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sun, 3 Apr 2022 13:24:29 -0500 Subject: [PATCH 014/539] Re enabling parsing categories --- xml_converter/src/category.cpp | 11 +++++++++-- xml_converter/src/xml_converter.cpp | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/xml_converter/src/category.cpp b/xml_converter/src/category.cpp index 4ca6e229..c59f1c46 100644 --- a/xml_converter/src/category.cpp +++ b/xml_converter/src/category.cpp @@ -8,8 +8,15 @@ string Cateogry::classname() { void Cateogry::init_from_xml(rapidxml::xml_node<>* node, vector *errors) { for (rapidxml::xml_attribute<>* attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()) { - bool is_icon_value = this->default_icon.init_xml_attribute(attribute, errors); - bool is_trail_value = this->default_trail.init_xml_attribute(attribute, errors); + + // Attempt to parse all the attributes of the category into an Icon and + // Trail to use as default values for all their children. + bool is_icon_value = false; + bool is_trail_value = false; + for (rapidxml::xml_attribute<>* attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()) { + is_icon_value |= this->default_icon.init_xml_attribute(attribute, errors); + is_trail_value |= this->default_trail.init_xml_attribute(attribute, errors); + } if (init_xml_attribute(attribute, errors)) {} else if (is_icon_value || is_trail_value) {} diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 0fe97bf0..c84df1e3 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -110,7 +110,7 @@ void parse_xml_file(string xml_filepath) { for (rapidxml::xml_node<>* node = root_node->first_node(); node; node = node->next_sibling()) { if (string(node->name()) == "MarkerCategory") { - // parse_marker_categories(node, &errors); + parse_marker_categories(node, &errors); } else if (string(node->name()) == "POIs") { parse_pois(node, xml_filepath, &errors); From 5fa54cd179f562ca5902c912757979fb2a3dec4c Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sun, 3 Apr 2022 14:13:29 -0500 Subject: [PATCH 015/539] simplifying filter object by using the filter flag variable as the registrar instead of a seperate variable --- xml_converter/src/attribute/filter.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/xml_converter/src/attribute/filter.hpp b/xml_converter/src/attribute/filter.hpp index c987e84a..6231fd5d 100644 --- a/xml_converter/src/attribute/filter.hpp +++ b/xml_converter/src/attribute/filter.hpp @@ -27,11 +27,10 @@ using namespace std; // //////////////////////////////////////////////////////////////////////////////// #define CLASS_FILTER_ITEM(filtername, name, ...) \ - bool name; \ static void enable_##name(void* obj) { \ (*(filtername*)obj).name = true; \ } \ - bool name##_setup = setup_variable(enable_##name, { __VA_ARGS__ }); + bool name = setup_variable(enable_##name, { __VA_ARGS__ }); //////////////////////////////////////////////////////////////////////////////// // Filter From 5513312a6be8902407ae12c3c3686ed478c2f1cd Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sun, 3 Apr 2022 14:47:39 -0500 Subject: [PATCH 016/539] adding comments to the parseable class functions --- xml_converter/src/parseable.hpp | 58 +++++++++++++++++++++++++++++++-- 1 file changed, 56 insertions(+), 2 deletions(-) diff --git a/xml_converter/src/parseable.hpp b/xml_converter/src/parseable.hpp index 4cba29ff..06eccc44 100644 --- a/xml_converter/src/parseable.hpp +++ b/xml_converter/src/parseable.hpp @@ -8,7 +8,20 @@ using namespace std; - +//////////////////////////////////////////////////////////////////////////////// +// CLASS_PARSEABLE_VAR +// +// A macro to setup a new variable in a Parseable subclass that can be +// extracted from the attributes of an XML element. It takes in the class +// name, the name of a variable inside the class, the variable type, and a +// series of strings of names of XML attributes this field should be set from. +// +// It is suggested to #define a curried version of CLASS_PARSEABLE_VAR for each +// subclass. For Example the class SubParseable may define it as +// +// #define PARSEABLE_VAR(...) CLASS_PARSEABLE_VAR(SubParseable, __VA_ARGS__ ) +// +//////////////////////////////////////////////////////////////////////////////// #define CLASS_PARSEABLE_VAR(parseableclassname, varname, vartype, ...) \ vartype varname; \ static void assign_##varname(void* obj, rapidxml::xml_attribute<>* input, vector *errors) { \ @@ -16,6 +29,20 @@ using namespace std; } \ bool is_##varname##_set = setup_variable(assign_##varname, { __VA_ARGS__ }); +//////////////////////////////////////////////////////////////////////////////// +// CLASS_PARSEABLE_SUBVAR +// +// Similar to CLASS_PARSEABLE_VAR but instead of creating a new variable that +// can be parsed it only creates an association between an existing variable's +// member variable and a series of strings of names of XML attributes the +// member variable should be set from. +// +// It is suggested to #define a curried version of CLASS_PARSEABLE_SUBVAR for +// each subclass. For Example the class SubParseable may define it as +// +// #define PARSEABLE_SUBVAR(...) CLASS_PARSEABLE_SUBVAR(SubParseable, __VA_ARGS__ ) +// +//////////////////////////////////////////////////////////////////////////////// #define CLASS_PARSEABLE_SUBVAR(parseableclassname, varname, subvarname, vartype, subvartype, ...) \ static void assign_##varname##_##subvarname(void* obj, rapidxml::xml_attribute<>* input, vector *errors) { \ (*(parseableclassname*)obj).varname.subvarname = parse_##subvartype(input, errors); \ @@ -23,19 +50,46 @@ using namespace std; bool is_##varname##_##subvarname##_set = setup_variable(assign_##varname##_##subvarname, { __VA_ARGS__ }); +//////////////////////////////////////////////////////////////////////////////// +// Parseable +// +// Parseable is a parent class which allows subclasses that parse a given XML +// node, to be defined quickly without duplicating schema definitions across +// multiple locations or files. To use it define a subclass of Parseable and +// then use CLASS_PARSEABLE_VAR and CLASS_PARSEABLE_SUBVAR to define all the +// attributes that can be parsed out of the node. +// +// Parseable takes advantage of many quirks of C++ to achieve a system that is +// easy to maintain and is efficient to process. All of the variables defined +// get mapped to functions linked to the subclass on first execution. These +// maps are stored in a Parseable static variable and are re-used when a second +// instance of the same subclass is instantiated. +//////////////////////////////////////////////////////////////////////////////// class Parseable { + private: + // A counter and ID used for identifying instances reliably. static uint64_t _counter; uint64_t _id = ++_counter; + // A static map keeping track of the original instance id of each subclass. static map original; + + // A static map keeping track of the function parser mappings for each subclass. static map*, vector*)>> lookup; - public: + protected: + // The function responsible for registering each variable to the subclass. bool setup_variable( void (*function)(void*, rapidxml::xml_attribute<>*, vector*), vector names); + // A stringy representation of a human readable classname. Used for errors. virtual string classname(); + + public: + // A default parser function to parse an entire XML node into the class. void init_from_xml(rapidxml::xml_node<>* node, vector *errors); + + // A default parser function to parse a single XML attribute into the class. bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors); }; From 684aae6a1527ee4c4ef6fdb5fbb644ed94d074c2 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Wed, 6 Apr 2022 23:52:56 -0500 Subject: [PATCH 017/539] removing -Werror as it does not provide any extra validation it only makes debugging more annoying --- xml_converter/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml_converter/CMakeLists.txt b/xml_converter/CMakeLists.txt index 0dd272bc..eaca0185 100644 --- a/xml_converter/CMakeLists.txt +++ b/xml_converter/CMakeLists.txt @@ -20,5 +20,5 @@ target_compile_features(${TARGET_NAME} PRIVATE cxx_std_17) if(MSVC) target_compile_options(${TARGET_NAME} PRIVATE /W4 /WX) else() - target_compile_options(${TARGET_NAME} PRIVATE -Wall -Wextra -Wpedantic -Werror) + target_compile_options(${TARGET_NAME} PRIVATE -Wall -Wextra -Wpedantic) endif() From 401848b682f36da15dc62cab3e847822c726d52a Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Wed, 6 Apr 2022 23:54:02 -0500 Subject: [PATCH 018/539] implementing usage of the boolean parser variable pairs --- xml_converter/src/parseable.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xml_converter/src/parseable.hpp b/xml_converter/src/parseable.hpp index 06eccc44..a88eb6a5 100644 --- a/xml_converter/src/parseable.hpp +++ b/xml_converter/src/parseable.hpp @@ -26,6 +26,7 @@ using namespace std; vartype varname; \ static void assign_##varname(void* obj, rapidxml::xml_attribute<>* input, vector *errors) { \ (*(parseableclassname*)obj).varname = parse_##vartype(input, errors); \ + (*(parseableclassname*)obj).is_##varname##_set = true; \ } \ bool is_##varname##_set = setup_variable(assign_##varname, { __VA_ARGS__ }); @@ -46,7 +47,8 @@ using namespace std; #define CLASS_PARSEABLE_SUBVAR(parseableclassname, varname, subvarname, vartype, subvartype, ...) \ static void assign_##varname##_##subvarname(void* obj, rapidxml::xml_attribute<>* input, vector *errors) { \ (*(parseableclassname*)obj).varname.subvarname = parse_##subvartype(input, errors); \ - }\ + (*(parseableclassname*)obj).is_##varname##_##subvarname##_set = true; \ + } \ bool is_##varname##_##subvarname##_set = setup_variable(assign_##varname##_##subvarname, { __VA_ARGS__ }); From 20514858cd670633f5e7eba06affecf96842ce9d Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Wed, 6 Apr 2022 23:54:31 -0500 Subject: [PATCH 019/539] adding a function to just lowercase a string --- xml_converter/src/string_helper.cpp | 16 ++++++++++++++++ xml_converter/src/string_helper.hpp | 4 ++++ 2 files changed, 20 insertions(+) diff --git a/xml_converter/src/string_helper.cpp b/xml_converter/src/string_helper.cpp index cbc08030..bf01d014 100644 --- a/xml_converter/src/string_helper.cpp +++ b/xml_converter/src/string_helper.cpp @@ -63,3 +63,19 @@ string normalize_type_name(string type_name) { return output; } + + +string lowercase(string input) { + string output; + output.reserve(input.length()); + + for (char character : input) { + if (character >= 'A' && character <= 'Z') { + output += (character - 'A' + 'a'); + } + else { + output += character; + } + } + return output; +} \ No newline at end of file diff --git a/xml_converter/src/string_helper.hpp b/xml_converter/src/string_helper.hpp index d3403160..83a67d35 100644 --- a/xml_converter/src/string_helper.hpp +++ b/xml_converter/src/string_helper.hpp @@ -8,6 +8,10 @@ bool matches_any(string test, std::initializer_list list); bool nomralized_matches_any(string test, std::initializer_list list); bool nomralized_matches_any(string test, std::vector list); +string lowercase(string); + vector split(string input, string delimiter); string normalize_type_name(string type_name); + + From 37a8f9e2da18eff3cbd0cf558581afcbd54e653d Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Wed, 6 Apr 2022 23:57:59 -0500 Subject: [PATCH 020/539] adding a proper method of parsing categories --- xml_converter/src/category.cpp | 4 +- xml_converter/src/category.hpp | 9 +-- xml_converter/src/xml_converter.cpp | 108 +++++++++++++++++++++++----- 3 files changed, 99 insertions(+), 22 deletions(-) diff --git a/xml_converter/src/category.cpp b/xml_converter/src/category.cpp index c59f1c46..28da3a8a 100644 --- a/xml_converter/src/category.cpp +++ b/xml_converter/src/category.cpp @@ -2,11 +2,11 @@ using namespace std; -string Cateogry::classname() { +string Category::classname() { return "MarkerCategory"; } -void Cateogry::init_from_xml(rapidxml::xml_node<>* node, vector *errors) { +void Category::init_from_xml(rapidxml::xml_node<>* node, vector *errors) { for (rapidxml::xml_attribute<>* attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()) { // Attempt to parse all the attributes of the category into an Icon and diff --git a/xml_converter/src/category.hpp b/xml_converter/src/category.hpp index 0a0addea..a681d285 100644 --- a/xml_converter/src/category.hpp +++ b/xml_converter/src/category.hpp @@ -1,5 +1,6 @@ #pragma once +#include #include #include @@ -12,10 +13,10 @@ using namespace std; -#define PARSEABLE_VAR(...) CLASS_PARSEABLE_VAR(Cateogry, __VA_ARGS__ ) -#define PARSEABLE_SUBVAR(...) CLASS_PARSEABLE_SUBVAR(Cateogry, __VA_ARGS__ ) +#define PARSEABLE_VAR(...) CLASS_PARSEABLE_VAR(Category, __VA_ARGS__ ) +#define PARSEABLE_SUBVAR(...) CLASS_PARSEABLE_SUBVAR(Category, __VA_ARGS__ ) -class Cateogry: public Parseable { +class Category: public Parseable { public: // https://blishhud.com/docs/markers/attributes/defaulttoggle PARSEABLE_VAR(default_toggle, bool, "DefaultToggle") @@ -30,7 +31,7 @@ class Cateogry: public Parseable { PARSEABLE_VAR(name, string, "Name") - vector children; + map children; Icon default_icon; Trail default_trail; diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index c84df1e3..47e9a499 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -16,6 +16,7 @@ #include "icon.hpp" #include "category.hpp" #include "attribute/float.hpp" +#include "string_helper.hpp" #include "rapidxml-1.13/rapidxml.hpp" #include "rapidxml-1.13/rapidxml_print.hpp" @@ -35,6 +36,34 @@ bool has_suffix(std::string const &fullString, std::string const &ending) { } } +Category* get_category(string name, map* marker_categories, vector* errors) { + vector split_categories = split(name, "."); + + if (split_categories.size() == 0) { + errors->push_back("Empty Type " + name); + return nullptr; + } + + Category* output = nullptr; + + for (unsigned int i = 0; i < split_categories.size(); i++) { + string category_name = split_categories[i]; + + auto category = marker_categories->find(category_name); + + if (category == marker_categories->end()) { + errors->push_back("Category Not Found " + category_name + " " + name); + return nullptr; + } + + output = &category->second; + + marker_categories = &output->children; + } + + return output; + +} //////////////////////////////////////////////////////////////////////////////// @@ -42,16 +71,22 @@ bool has_suffix(std::string const &fullString, std::string const &ending) { // // Parse the xml block into an in memory array of Markers. //////////////////////////////////////////////////////////////////////////////// -vector parse_pois(rapidxml::xml_node<>* root_node, string filename, vector* errors) { +vector parse_pois(rapidxml::xml_node<>* root_node, map* marker_categories, string filename, vector* errors) { vector markers; + for (rapidxml::xml_node<>* node = root_node->first_node(); node; node = node->next_sibling()) { + if (string(node->name()) == "POI") { + Category* default_category = get_category(node->first_attribute("type", 0, false)->value(), marker_categories, errors); + Icon poi; poi.init_from_xml(node, errors); markers.push_back(poi); } else if (string(node->name()) == "Trail") { + Category* default_category = get_category(node->first_attribute("type", 0, false)->value(), marker_categories, errors); + Trail trail; trail.init_from_xml(node, errors); markers.push_back(trail); @@ -64,17 +99,23 @@ vector parse_pois(rapidxml::xml_node<>* root_node, string filename, v } -void parse_marker_categories(rapidxml::xml_node<>* root_node, vector* errors) { - for (rapidxml::xml_node<>* node = root_node->first_node(); node; node = node->next_sibling()) { - if (string(node->name()) == "MarkerCategory") { - Cateogry marker_category; - marker_category.init_from_xml(node, errors); - parse_marker_categories(node, errors); - } - else { - errors->push_back("unknown maker category tag " + string(node->name())); +void parse_marker_categories(rapidxml::xml_node<>* node, map* marker_categories, vector* errors, int depth=0) { + if (string(node->name()) == "MarkerCategory") { + string name = node->first_attribute("name", 0, false)->value(); + + Category* this_category = &(*marker_categories)[name]; + this_category->init_from_xml(node, errors); + + for (rapidxml::xml_node<>* child_node = node->first_node(); child_node; child_node = child_node->next_sibling()) { + parse_marker_categories(child_node, &(this_category->children), errors, depth +1); } } + else { + errors->push_back("unknown maker category tag " + string(node->name())); + } + + + } @@ -83,7 +124,7 @@ void parse_marker_categories(rapidxml::xml_node<>* root_node, vector* er // // A function which parses a single XML file into their corrisponding classes. //////////////////////////////////////////////////////////////////////////////// -void parse_xml_file(string xml_filepath) { +void parse_xml_file(string xml_filepath, map* marker_categories) { vector errors; rapidxml::xml_document<> doc; @@ -110,10 +151,10 @@ void parse_xml_file(string xml_filepath) { for (rapidxml::xml_node<>* node = root_node->first_node(); node; node = node->next_sibling()) { if (string(node->name()) == "MarkerCategory") { - parse_marker_categories(node, &errors); + parse_marker_categories(node, marker_categories, &errors); } else if (string(node->name()) == "POIs") { - parse_pois(node, xml_filepath, &errors); + parse_pois(node, marker_categories, xml_filepath, &errors); } else { cout << "Unknown top-level node name " << node->name() << endl; @@ -130,13 +171,48 @@ void parse_xml_file(string xml_filepath) { -void convert_taco_directory(string directory) { + +bool filename_comp(string a, string b){ + return lowercase(a) < lowercase(b); +} + + +vector get_xml_files(string directory) { + vector files; + vector subfolders; + for (const auto & entry : filesystem::directory_iterator(directory)) { string path = entry.path(); - if (has_suffix(path, ".xml")) { - parse_xml_file(path); + if (entry.is_directory()) { + subfolders.push_back(path); + } + else { + if (has_suffix(path, ".xml")) { + files.push_back(path); + } } } + + std::sort(files.begin(), files.end(), filename_comp); + std::sort(subfolders.begin(), subfolders.end(), filename_comp); + + for (const string & subfolder : subfolders ) { + vector subfiles = get_xml_files(subfolder); + files.insert( files.end(), subfiles.begin(), subfiles.end() ); + } + + return files; +} + +void convert_taco_directory(string directory) { + map marker_categories; + + vector xml_files = get_xml_files(directory); + + for (const string & path : xml_files) { + parse_xml_file(path, &marker_categories); + } + } int main() { From bc81f090ca82a7b10597d90a08fc5b55c2664f23 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Thu, 7 Apr 2022 02:52:56 -0500 Subject: [PATCH 021/539] refactoring error handling to be more flexable then pure strings --- xml_converter/src/attribute/bool.cpp | 9 +-- xml_converter/src/attribute/bool.hpp | 3 +- xml_converter/src/attribute/chirality.cpp | 5 +- xml_converter/src/attribute/chirality.hpp | 3 +- xml_converter/src/attribute/color.cpp | 5 +- xml_converter/src/attribute/color.hpp | 3 +- xml_converter/src/attribute/euler_angle.cpp | 7 +- xml_converter/src/attribute/euler_angle.hpp | 3 +- .../src/attribute/festival_filter.cpp | 2 +- .../src/attribute/festival_filter.hpp | 3 +- xml_converter/src/attribute/filter.cpp | 6 +- xml_converter/src/attribute/filter.hpp | 3 +- xml_converter/src/attribute/float.cpp | 4 +- xml_converter/src/attribute/float.hpp | 3 +- xml_converter/src/attribute/int.cpp | 7 +- xml_converter/src/attribute/int.hpp | 3 +- .../src/attribute/map_type_filter.cpp | 2 +- .../src/attribute/map_type_filter.hpp | 2 +- xml_converter/src/attribute/mount_filter.cpp | 2 +- xml_converter/src/attribute/mount_filter.hpp | 2 +- xml_converter/src/attribute/position.cpp | 7 +- xml_converter/src/attribute/position.hpp | 3 +- .../src/attribute/profession_filter.cpp | 3 +- .../src/attribute/profession_filter.hpp | 3 +- xml_converter/src/attribute/race_filter.cpp | 2 +- xml_converter/src/attribute/race_filter.hpp | 2 +- .../src/attribute/specialization_filter.cpp | 2 +- .../src/attribute/specialization_filter.hpp | 2 +- xml_converter/src/attribute/string.cpp | 4 +- xml_converter/src/attribute/string.hpp | 3 +- xml_converter/src/category.cpp | 4 +- xml_converter/src/category.hpp | 2 +- xml_converter/src/parseable.cpp | 14 ++-- xml_converter/src/parseable.hpp | 13 ++-- xml_converter/src/rapid_helpers.cpp | 66 +++++++++++++++++++ xml_converter/src/rapid_helpers.hpp | 57 ++++++++++++++++ xml_converter/src/xml_converter.cpp | 53 +++++++-------- 37 files changed, 228 insertions(+), 89 deletions(-) create mode 100644 xml_converter/src/rapid_helpers.cpp create mode 100644 xml_converter/src/rapid_helpers.hpp diff --git a/xml_converter/src/attribute/bool.cpp b/xml_converter/src/attribute/bool.cpp index 97c1328b..9be5867b 100644 --- a/xml_converter/src/attribute/bool.cpp +++ b/xml_converter/src/attribute/bool.cpp @@ -5,18 +5,19 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "../rapid_helpers.hpp" using namespace std; -bool parse_bool(rapidxml::xml_attribute<>* input, vector *errors) { - if (string(input->value()) == "0" || string(input->value()) == "false") { +bool parse_bool(rapidxml::xml_attribute<>* input, vector *errors) { + if (get_attribute_value(input) == "0" || get_attribute_value(input) == "false") { return false; } - else if (string(input->value()) == "1" || string(input->value()) == "true") { + else if (get_attribute_value(input) == "1" || get_attribute_value(input) == "true") { return true; } else { - errors->push_back("Found a boolean value that was not a '1', '0', 'true', or 'false'"); + errors->push_back(new XMLAttributeValueError("Found a boolean value that was not a '1', '0', 'true', or 'false'", input)); return false; } } diff --git a/xml_converter/src/attribute/bool.hpp b/xml_converter/src/attribute/bool.hpp index ceedbfc7..205f061f 100644 --- a/xml_converter/src/attribute/bool.hpp +++ b/xml_converter/src/attribute/bool.hpp @@ -4,8 +4,9 @@ #include #include +#include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" using namespace std; -bool parse_bool(rapidxml::xml_attribute<>* input, vector *errors); +bool parse_bool(rapidxml::xml_attribute<>* input, vector *errors); diff --git a/xml_converter/src/attribute/chirality.cpp b/xml_converter/src/attribute/chirality.cpp index a2b9ec96..cb418322 100644 --- a/xml_converter/src/attribute/chirality.cpp +++ b/xml_converter/src/attribute/chirality.cpp @@ -3,12 +3,13 @@ #include #include +#include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" using namespace std; -Chirality parse_Chirality(rapidxml::xml_attribute<>* input, vector *) { +Chirality parse_Chirality(rapidxml::xml_attribute<>* input, vector *) { Chirality chirality; - chirality.chirality = string(input->value()); + chirality.chirality = get_attribute_value(input); return chirality; } diff --git a/xml_converter/src/attribute/chirality.hpp b/xml_converter/src/attribute/chirality.hpp index e561a0d5..97abf3b1 100644 --- a/xml_converter/src/attribute/chirality.hpp +++ b/xml_converter/src/attribute/chirality.hpp @@ -3,6 +3,7 @@ #include #include +#include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" using namespace std; @@ -13,4 +14,4 @@ class Chirality { string chirality; }; -Chirality parse_Chirality(rapidxml::xml_attribute<>* input, vector *errors); +Chirality parse_Chirality(rapidxml::xml_attribute<>* input, vector *errors); diff --git a/xml_converter/src/attribute/color.cpp b/xml_converter/src/attribute/color.cpp index 2273e917..972f7a5b 100644 --- a/xml_converter/src/attribute/color.cpp +++ b/xml_converter/src/attribute/color.cpp @@ -3,12 +3,13 @@ #include #include +#include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" using namespace std; -Color parse_Color(rapidxml::xml_attribute<>* input, vector *) { +Color parse_Color(rapidxml::xml_attribute<>* input, vector *) { Color color; - color.hex = string(input->value()); + color.hex = get_attribute_value(input); return color; } diff --git a/xml_converter/src/attribute/color.hpp b/xml_converter/src/attribute/color.hpp index b8bb7572..a7bf402b 100644 --- a/xml_converter/src/attribute/color.hpp +++ b/xml_converter/src/attribute/color.hpp @@ -3,6 +3,7 @@ #include #include +#include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" using namespace std; @@ -12,4 +13,4 @@ class Color { string hex; }; -Color parse_Color(rapidxml::xml_attribute<>* input, vector *errors); +Color parse_Color(rapidxml::xml_attribute<>* input, vector *errors); diff --git a/xml_converter/src/attribute/euler_angle.cpp b/xml_converter/src/attribute/euler_angle.cpp index 7249edae..89035acd 100644 --- a/xml_converter/src/attribute/euler_angle.cpp +++ b/xml_converter/src/attribute/euler_angle.cpp @@ -3,14 +3,15 @@ #include #include +#include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" using namespace std; -EulerAngle parse_EulerAngle(rapidxml::xml_attribute<>* input, vector *errors) { - vector components = split(string(input->value()), ","); +EulerAngle parse_EulerAngle(rapidxml::xml_attribute<>* input, vector *errors) { + vector components = split(get_attribute_value(input), ","); EulerAngle euler_angle; if (components.size() == 3) { @@ -19,7 +20,7 @@ EulerAngle parse_EulerAngle(rapidxml::xml_attribute<>* input, vector *er euler_angle.z = stof(components[2].c_str()); } else { - errors->push_back("invlaid 'x,y,z' rotation " + string(input->value()) + " " + to_string(components.size())); + errors->push_back(new XMLAttributeValueError("Invlaid 'x,y,z' rotation ", input)); } return euler_angle; diff --git a/xml_converter/src/attribute/euler_angle.hpp b/xml_converter/src/attribute/euler_angle.hpp index 30bb7735..32f3937e 100644 --- a/xml_converter/src/attribute/euler_angle.hpp +++ b/xml_converter/src/attribute/euler_angle.hpp @@ -3,6 +3,7 @@ #include #include +#include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" using namespace std; @@ -14,4 +15,4 @@ class EulerAngle { float z; }; -EulerAngle parse_EulerAngle(rapidxml::xml_attribute<>* input, vector *errors); +EulerAngle parse_EulerAngle(rapidxml::xml_attribute<>* input, vector *errors); diff --git a/xml_converter/src/attribute/festival_filter.cpp b/xml_converter/src/attribute/festival_filter.cpp index 890a0499..ee12fdf1 100644 --- a/xml_converter/src/attribute/festival_filter.cpp +++ b/xml_converter/src/attribute/festival_filter.cpp @@ -8,7 +8,7 @@ using namespace std; -FestivalFilter parse_FestivalFilter(rapidxml::xml_attribute<>* input, vector *errors) { +FestivalFilter parse_FestivalFilter(rapidxml::xml_attribute<>* input, vector *errors) { FestivalFilter festival_filter; festival_filter.parse(input, errors); return festival_filter; diff --git a/xml_converter/src/attribute/festival_filter.hpp b/xml_converter/src/attribute/festival_filter.hpp index 9efb5ca2..cea7a464 100644 --- a/xml_converter/src/attribute/festival_filter.hpp +++ b/xml_converter/src/attribute/festival_filter.hpp @@ -4,6 +4,7 @@ #include #include +#include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" #include "filter.hpp" @@ -27,4 +28,4 @@ class FestivalFilter: public Filter { #undef FILTER_ITEM -FestivalFilter parse_FestivalFilter(rapidxml::xml_attribute<>* input, vector *errors); +FestivalFilter parse_FestivalFilter(rapidxml::xml_attribute<>* input, vector *errors); diff --git a/xml_converter/src/attribute/filter.cpp b/xml_converter/src/attribute/filter.cpp index 8ce302fb..f4dfe008 100644 --- a/xml_converter/src/attribute/filter.cpp +++ b/xml_converter/src/attribute/filter.cpp @@ -50,8 +50,8 @@ bool Filter::setup_variable(void (*function)(void* filter_object), vector* input, vector *errors) { - vector items = split(string(input->value()), ","); +void Filter::parse(rapidxml::xml_attribute<>* input, vector *errors) { + vector items = split(get_attribute_value(input), ","); const char* type_id = typeid(*this).name(); auto variable_list = &lookup[type_id]; @@ -60,7 +60,7 @@ void Filter::parse(rapidxml::xml_attribute<>* input, vector *errors) { auto iterator = variable_list->find(item); if (iterator == variable_list->end()) { - errors->push_back("Unknown " + this->classname() + " option " + item); + errors->push_back(new XMLAttributeValueError("Unknown " + this->classname() + " option " + item, input)); continue; } diff --git a/xml_converter/src/attribute/filter.hpp b/xml_converter/src/attribute/filter.hpp index 6231fd5d..893c0199 100644 --- a/xml_converter/src/attribute/filter.hpp +++ b/xml_converter/src/attribute/filter.hpp @@ -5,6 +5,7 @@ #include #include +#include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" @@ -51,7 +52,7 @@ class Filter { public: bool setup_variable(void (*function)(void* filter_object), vector names); - void parse(rapidxml::xml_attribute<>* input, vector *errors); + void parse(rapidxml::xml_attribute<>* input, vector *errors); virtual string classname() { return "Filter"; } }; diff --git a/xml_converter/src/attribute/float.cpp b/xml_converter/src/attribute/float.cpp index 21ad98d2..1ec7f815 100644 --- a/xml_converter/src/attribute/float.cpp +++ b/xml_converter/src/attribute/float.cpp @@ -5,6 +5,6 @@ #include "../rapidxml-1.13/rapidxml.hpp" -float parse_float(rapidxml::xml_attribute<>* input, std::vector *) { - return std::stof(input->value()); +float parse_float(rapidxml::xml_attribute<>* input, std::vector *) { + return std::stof(get_attribute_value(input)); } diff --git a/xml_converter/src/attribute/float.hpp b/xml_converter/src/attribute/float.hpp index a95b136d..9e9ba8df 100644 --- a/xml_converter/src/attribute/float.hpp +++ b/xml_converter/src/attribute/float.hpp @@ -3,6 +3,7 @@ #include #include +#include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" -float parse_float(rapidxml::xml_attribute<>* input, std::vector *errors); +float parse_float(rapidxml::xml_attribute<>* input, std::vector *errors); diff --git a/xml_converter/src/attribute/int.cpp b/xml_converter/src/attribute/int.cpp index f1f782e6..38a7d833 100644 --- a/xml_converter/src/attribute/int.cpp +++ b/xml_converter/src/attribute/int.cpp @@ -4,16 +4,17 @@ #include #include +#include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" using namespace std; -int parse_int(rapidxml::xml_attribute<>* input, vector *errors) { +int parse_int(rapidxml::xml_attribute<>* input, vector *errors) { try { - return stoi(input->value()); + return stoi(get_attribute_value(input)); } catch(std::invalid_argument const& exception) { - errors->push_back("Invalid integer value '" + string(input->value()) + "'"); + errors->push_back(new XMLAttributeValueError("Invalid integer value", input)); return 0; } // catch(std::out_of_range const& exception) { diff --git a/xml_converter/src/attribute/int.hpp b/xml_converter/src/attribute/int.hpp index 405582fa..cfa4857c 100644 --- a/xml_converter/src/attribute/int.hpp +++ b/xml_converter/src/attribute/int.hpp @@ -3,10 +3,11 @@ #include #include +#include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" using namespace std; -int parse_int(rapidxml::xml_attribute<>* input, vector *errors); +int parse_int(rapidxml::xml_attribute<>* input, vector *errors); int init_int_attribute(); diff --git a/xml_converter/src/attribute/map_type_filter.cpp b/xml_converter/src/attribute/map_type_filter.cpp index 81108d60..a2911b51 100644 --- a/xml_converter/src/attribute/map_type_filter.cpp +++ b/xml_converter/src/attribute/map_type_filter.cpp @@ -2,7 +2,7 @@ using namespace std; -MapTypeFilter parse_MapTypeFilter(rapidxml::xml_attribute<>* input, vector *errors) { +MapTypeFilter parse_MapTypeFilter(rapidxml::xml_attribute<>* input, vector *errors) { MapTypeFilter filter; filter.parse(input, errors); return filter; diff --git a/xml_converter/src/attribute/map_type_filter.hpp b/xml_converter/src/attribute/map_type_filter.hpp index ae5c19d5..0fae664b 100644 --- a/xml_converter/src/attribute/map_type_filter.hpp +++ b/xml_converter/src/attribute/map_type_filter.hpp @@ -90,4 +90,4 @@ class MapTypeFilter: public Filter { #undef FILTER_ITEM -MapTypeFilter parse_MapTypeFilter(rapidxml::xml_attribute<>* input, vector *errors); +MapTypeFilter parse_MapTypeFilter(rapidxml::xml_attribute<>* input, vector *errors); diff --git a/xml_converter/src/attribute/mount_filter.cpp b/xml_converter/src/attribute/mount_filter.cpp index 7c70167f..66ed5962 100644 --- a/xml_converter/src/attribute/mount_filter.cpp +++ b/xml_converter/src/attribute/mount_filter.cpp @@ -2,7 +2,7 @@ using namespace std; -MountFilter parse_MountFilter(rapidxml::xml_attribute<>* input, vector *errors) { +MountFilter parse_MountFilter(rapidxml::xml_attribute<>* input, vector *errors) { MountFilter filter; filter.parse(input, errors); return filter; diff --git a/xml_converter/src/attribute/mount_filter.hpp b/xml_converter/src/attribute/mount_filter.hpp index 8e552c4e..91693692 100644 --- a/xml_converter/src/attribute/mount_filter.hpp +++ b/xml_converter/src/attribute/mount_filter.hpp @@ -30,4 +30,4 @@ class MountFilter: public Filter { #undef FILTER_ITEM -MountFilter parse_MountFilter(rapidxml::xml_attribute<>* input, vector *errors); +MountFilter parse_MountFilter(rapidxml::xml_attribute<>* input, vector *errors); diff --git a/xml_converter/src/attribute/position.cpp b/xml_converter/src/attribute/position.cpp index feddaf42..1b703073 100644 --- a/xml_converter/src/attribute/position.cpp +++ b/xml_converter/src/attribute/position.cpp @@ -3,14 +3,15 @@ #include #include +#include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" using namespace std; -Position parse_Position(rapidxml::xml_attribute<>* input, vector *errors) { - vector components = split(string(input->value()), ","); +Position parse_Position(rapidxml::xml_attribute<>* input, vector *errors) { + vector components = split(get_attribute_value(input), ","); Position position; if (components.size() == 3) { @@ -19,7 +20,7 @@ Position parse_Position(rapidxml::xml_attribute<>* input, vector *errors position.z = stof(components[2].c_str()); } else { - errors->push_back("invlaid 'x,y,z' rotation " + string(input->value()) + " " + to_string(components.size())); + errors->push_back(new XMLAttributeValueError("Invlaid 'x,y,z' rotation ", input)); } return position; diff --git a/xml_converter/src/attribute/position.hpp b/xml_converter/src/attribute/position.hpp index 4b329485..9639ff3c 100644 --- a/xml_converter/src/attribute/position.hpp +++ b/xml_converter/src/attribute/position.hpp @@ -3,6 +3,7 @@ #include #include +#include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" using namespace std; @@ -15,4 +16,4 @@ class Position { float z; }; -Position parse_Position(rapidxml::xml_attribute<>* input, vector *errors); +Position parse_Position(rapidxml::xml_attribute<>* input, vector *errors); diff --git a/xml_converter/src/attribute/profession_filter.cpp b/xml_converter/src/attribute/profession_filter.cpp index c90a06d5..dd8f0c04 100644 --- a/xml_converter/src/attribute/profession_filter.cpp +++ b/xml_converter/src/attribute/profession_filter.cpp @@ -3,12 +3,13 @@ #include #include +#include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" using namespace std; -ProfessionFilter parse_ProfessionFilter(rapidxml::xml_attribute<>* input, vector *errors) { +ProfessionFilter parse_ProfessionFilter(rapidxml::xml_attribute<>* input, vector *errors) { ProfessionFilter profession_filter; profession_filter.parse(input, errors); return profession_filter; diff --git a/xml_converter/src/attribute/profession_filter.hpp b/xml_converter/src/attribute/profession_filter.hpp index 74807d5a..d5dab8ab 100644 --- a/xml_converter/src/attribute/profession_filter.hpp +++ b/xml_converter/src/attribute/profession_filter.hpp @@ -3,6 +3,7 @@ #include #include +#include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" #include "filter.hpp" @@ -27,4 +28,4 @@ class ProfessionFilter: public Filter { #undef FILTER_ITEM -ProfessionFilter parse_ProfessionFilter(rapidxml::xml_attribute<>* input, vector *errors); +ProfessionFilter parse_ProfessionFilter(rapidxml::xml_attribute<>* input, vector *errors); diff --git a/xml_converter/src/attribute/race_filter.cpp b/xml_converter/src/attribute/race_filter.cpp index f2342cf2..be7d037f 100644 --- a/xml_converter/src/attribute/race_filter.cpp +++ b/xml_converter/src/attribute/race_filter.cpp @@ -2,7 +2,7 @@ using namespace std; -RaceFilter parse_RaceFilter(rapidxml::xml_attribute<>* input, vector *errors) { +RaceFilter parse_RaceFilter(rapidxml::xml_attribute<>* input, vector *errors) { RaceFilter filter; filter.parse(input, errors); return filter; diff --git a/xml_converter/src/attribute/race_filter.hpp b/xml_converter/src/attribute/race_filter.hpp index 5b830862..1138603a 100644 --- a/xml_converter/src/attribute/race_filter.hpp +++ b/xml_converter/src/attribute/race_filter.hpp @@ -22,6 +22,6 @@ class RaceFilter: public Filter { }; -RaceFilter parse_RaceFilter(rapidxml::xml_attribute<>* input, vector *errors); +RaceFilter parse_RaceFilter(rapidxml::xml_attribute<>* input, vector *errors); #undef FILTER_ITEM diff --git a/xml_converter/src/attribute/specialization_filter.cpp b/xml_converter/src/attribute/specialization_filter.cpp index 8df03f2e..fe57bd0f 100644 --- a/xml_converter/src/attribute/specialization_filter.cpp +++ b/xml_converter/src/attribute/specialization_filter.cpp @@ -1,6 +1,6 @@ #include "specialization_filter.hpp" -SpecializationFilter parse_SpecializationFilter(rapidxml::xml_attribute<>* input, vector *errors) { +SpecializationFilter parse_SpecializationFilter(rapidxml::xml_attribute<>* input, vector *errors) { SpecializationFilter specialization_filter; specialization_filter.parse(input, errors); return specialization_filter; diff --git a/xml_converter/src/attribute/specialization_filter.hpp b/xml_converter/src/attribute/specialization_filter.hpp index 0fb2fe4b..91cac8ab 100644 --- a/xml_converter/src/attribute/specialization_filter.hpp +++ b/xml_converter/src/attribute/specialization_filter.hpp @@ -84,4 +84,4 @@ class SpecializationFilter: public Filter { #undef FILTER_ITEM -SpecializationFilter parse_SpecializationFilter(rapidxml::xml_attribute<>* input, vector *errors); +SpecializationFilter parse_SpecializationFilter(rapidxml::xml_attribute<>* input, vector *errors); diff --git a/xml_converter/src/attribute/string.cpp b/xml_converter/src/attribute/string.cpp index 8575ebbb..02a84ecc 100644 --- a/xml_converter/src/attribute/string.cpp +++ b/xml_converter/src/attribute/string.cpp @@ -7,6 +7,6 @@ using namespace std; -string parse_string(rapidxml::xml_attribute<>* input, vector *) { - return string(input->value()); +string parse_string(rapidxml::xml_attribute<>* input, vector *) { + return get_attribute_value(input); } diff --git a/xml_converter/src/attribute/string.hpp b/xml_converter/src/attribute/string.hpp index d74270c9..afe105ae 100644 --- a/xml_converter/src/attribute/string.hpp +++ b/xml_converter/src/attribute/string.hpp @@ -3,9 +3,10 @@ #include #include +#include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" using namespace std; -string parse_string(rapidxml::xml_attribute<>* input, vector *errors); +string parse_string(rapidxml::xml_attribute<>* input, vector *errors); diff --git a/xml_converter/src/category.cpp b/xml_converter/src/category.cpp index 28da3a8a..289bf2a4 100644 --- a/xml_converter/src/category.cpp +++ b/xml_converter/src/category.cpp @@ -6,7 +6,7 @@ string Category::classname() { return "MarkerCategory"; } -void Category::init_from_xml(rapidxml::xml_node<>* node, vector *errors) { +void Category::init_from_xml(rapidxml::xml_node<>* node, vector *errors) { for (rapidxml::xml_attribute<>* attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()) { // Attempt to parse all the attributes of the category into an Icon and @@ -21,7 +21,7 @@ void Category::init_from_xml(rapidxml::xml_node<>* node, vector *errors) if (init_xml_attribute(attribute, errors)) {} else if (is_icon_value || is_trail_value) {} else { - errors->push_back("Unknown " + this->classname() + " attribute " + string(attribute->name())); + errors->push_back(new XMLAttributeNameError("Unknown " + this->classname() + " attribute ", attribute)); } } } diff --git a/xml_converter/src/category.hpp b/xml_converter/src/category.hpp index a681d285..febe9df3 100644 --- a/xml_converter/src/category.hpp +++ b/xml_converter/src/category.hpp @@ -37,7 +37,7 @@ class Category: public Parseable { virtual string classname(); - void init_from_xml(rapidxml::xml_node<>* node, vector *errors); + void init_from_xml(rapidxml::xml_node<>* node, vector *errors); }; #undef PARSEABLE_VAR diff --git a/xml_converter/src/parseable.cpp b/xml_converter/src/parseable.cpp index c43c730f..d1b874ab 100644 --- a/xml_converter/src/parseable.cpp +++ b/xml_converter/src/parseable.cpp @@ -20,7 +20,7 @@ using namespace std; // Initalize Static variables. uint64_t Parseable::_counter = 0; map Parseable::original; -map*, vector*)>> Parseable::lookup; +map*, vector*)>> Parseable::lookup; @@ -29,20 +29,20 @@ string Parseable::classname() { } -void Parseable::init_from_xml(rapidxml::xml_node<>* node, vector *errors) { +void Parseable::init_from_xml(rapidxml::xml_node<>* node, vector *errors) { for (rapidxml::xml_attribute<>* attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()) { if (init_xml_attribute(attribute, errors)) {} else { - errors->push_back("Unknown " + this->classname() + " attribute " + string(attribute->name())); + errors->push_back(new XMLAttributeNameError("Unknown " + this->classname() + " attribute ", attribute)); } } } -bool Parseable::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors) { +bool Parseable::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors) { const char* type_id = typeid(*this).name(); auto variable_list = &lookup[type_id]; - string item = normalize_type_name(attribute->name()); + string item = normalize_type_name(get_attribute_name(attribute)); auto iterator = variable_list->find(item); @@ -56,7 +56,7 @@ bool Parseable::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector< bool Parseable::setup_variable( - void (*function)(void*, rapidxml::xml_attribute<>*, vector*), + void (*function)(void*, rapidxml::xml_attribute<>*, vector*), vector names ) { const char* type_id = typeid(*this).name(); @@ -68,7 +68,7 @@ bool Parseable::setup_variable( original[type_id] = this->_id; // Grab a pointer to the lookup data for this subclass so we can edit it. - map*, vector*)>* variable_list = &lookup[type_id]; + map*, vector*)>* variable_list = &lookup[type_id]; // Insert all of the names for this field, error on duplicates. for (auto name : names) { diff --git a/xml_converter/src/parseable.hpp b/xml_converter/src/parseable.hpp index a88eb6a5..42959907 100644 --- a/xml_converter/src/parseable.hpp +++ b/xml_converter/src/parseable.hpp @@ -4,6 +4,7 @@ #include #include +#include "rapid_helpers.hpp" #include "rapidxml-1.13/rapidxml.hpp" using namespace std; @@ -24,7 +25,7 @@ using namespace std; //////////////////////////////////////////////////////////////////////////////// #define CLASS_PARSEABLE_VAR(parseableclassname, varname, vartype, ...) \ vartype varname; \ - static void assign_##varname(void* obj, rapidxml::xml_attribute<>* input, vector *errors) { \ + static void assign_##varname(void* obj, rapidxml::xml_attribute<>* input, vector *errors) { \ (*(parseableclassname*)obj).varname = parse_##vartype(input, errors); \ (*(parseableclassname*)obj).is_##varname##_set = true; \ } \ @@ -45,7 +46,7 @@ using namespace std; // //////////////////////////////////////////////////////////////////////////////// #define CLASS_PARSEABLE_SUBVAR(parseableclassname, varname, subvarname, vartype, subvartype, ...) \ - static void assign_##varname##_##subvarname(void* obj, rapidxml::xml_attribute<>* input, vector *errors) { \ + static void assign_##varname##_##subvarname(void* obj, rapidxml::xml_attribute<>* input, vector *errors) { \ (*(parseableclassname*)obj).varname.subvarname = parse_##subvartype(input, errors); \ (*(parseableclassname*)obj).is_##varname##_##subvarname##_set = true; \ } \ @@ -77,12 +78,12 @@ class Parseable { static map original; // A static map keeping track of the function parser mappings for each subclass. - static map*, vector*)>> lookup; + static map*, vector*)>> lookup; protected: // The function responsible for registering each variable to the subclass. bool setup_variable( - void (*function)(void*, rapidxml::xml_attribute<>*, vector*), + void (*function)(void*, rapidxml::xml_attribute<>*, vector*), vector names); // A stringy representation of a human readable classname. Used for errors. @@ -90,8 +91,8 @@ class Parseable { public: // A default parser function to parse an entire XML node into the class. - void init_from_xml(rapidxml::xml_node<>* node, vector *errors); + void init_from_xml(rapidxml::xml_node<>* node, vector *errors); // A default parser function to parse a single XML attribute into the class. - bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors); + bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors); }; diff --git a/xml_converter/src/rapid_helpers.cpp b/xml_converter/src/rapid_helpers.cpp new file mode 100644 index 00000000..c14a4d23 --- /dev/null +++ b/xml_converter/src/rapid_helpers.cpp @@ -0,0 +1,66 @@ +#include "rapid_helpers.hpp" +#include +using namespace std; + +string find_attribute_value(rapidxml::xml_node<>* node, string attribute_name) { + auto attribute = node->first_attribute(attribute_name.data(), attribute_name.size(), false); + + return string(attribute->value(), attribute->value_size()); +} + +rapidxml::xml_attribute<>* find_attribute(rapidxml::xml_node<>* node, string attribute_name) { + return node->first_attribute(attribute_name.data(), attribute_name.size(), false); +} + +string get_attribute_name(rapidxml::xml_attribute<>* attribute) { + return string(attribute->name(), attribute->name_size()); +} + +string get_attribute_value(rapidxml::xml_attribute<>* attribute) { + return string(attribute->value(), attribute->value_size()); +} + +string get_node_name(rapidxml::xml_node<>* node) { + return string(node->name(), node->name_size()); +} + + + + + +XMLStringError::XMLStringError(string message) { + this->message = message; +} + +void XMLStringError::print_error(string source) { + cout << this->message << endl; +} + + +XMLAttributeNameError::XMLAttributeNameError(string message, rapidxml::xml_attribute<>* attribute) { + this->message = message; + this->attribute = attribute; +} +void XMLAttributeNameError::print_error(string source) { + cout << "Attribute Name Error: " << this->message << get_attribute_name(this->attribute) << endl; + +} + +XMLAttributeValueError::XMLAttributeValueError(string message, rapidxml::xml_attribute<>* attribute) { + this->message = message; + this->attribute = attribute; +} +void XMLAttributeValueError::print_error(string source) { + cout << "Attribute Value Error: " << this->message << get_attribute_value(this->attribute) << endl; +} + + +XMLNodeNameError::XMLNodeNameError(string message, rapidxml::xml_node<>* node) { + this->message = message; + this->node = node; +} +void XMLNodeNameError::print_error(string source){ + cout << "XMLNodeNameError: " << this->message << get_node_name(this->node) << endl; +} + + diff --git a/xml_converter/src/rapid_helpers.hpp b/xml_converter/src/rapid_helpers.hpp new file mode 100644 index 00000000..0bb3a81e --- /dev/null +++ b/xml_converter/src/rapid_helpers.hpp @@ -0,0 +1,57 @@ +#pragma once + +#include + +#include "rapidxml-1.13/rapidxml.hpp" + +using namespace std; + +string find_attribute_value(rapidxml::xml_node<>* node, string attribute_name); +rapidxml::xml_attribute<>* find_attribute(rapidxml::xml_node<>* node, string attribute_name); + +string get_attribute_name(rapidxml::xml_attribute<>* attribute); +string get_attribute_value(rapidxml::xml_attribute<>* attribute); + +string get_node_name(rapidxml::xml_node<>* node); + + +class XMLError { + protected: + string message; + public: + virtual void print_error(string source) = 0; +}; + + +// rapidxml::xml_node<>* root_node +// rapidxml::xml_attribute<>* input + +class XMLStringError: public XMLError { + public: + XMLStringError(string message); + void print_error(string source); +}; + +class XMLAttributeNameError: public XMLError { + protected: + rapidxml::xml_attribute<>* attribute; + public: + XMLAttributeNameError(string message, rapidxml::xml_attribute<>* attribute); + void print_error(string source); +}; + +class XMLAttributeValueError: public XMLError { + protected: + rapidxml::xml_attribute<>* attribute; + public: + XMLAttributeValueError(string message, rapidxml::xml_attribute<>* attribute); + void print_error(string source); +}; + +class XMLNodeNameError: public XMLError { + protected: + rapidxml::xml_node<>* node; + public: + XMLNodeNameError(string message, rapidxml::xml_node<>* node); + void print_error(string source); +}; diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 47e9a499..c6773feb 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -17,9 +17,10 @@ #include "category.hpp" #include "attribute/float.hpp" #include "string_helper.hpp" +#include "rapid_helpers.hpp" #include "rapidxml-1.13/rapidxml.hpp" -#include "rapidxml-1.13/rapidxml_print.hpp" +#include "rapidxml-1.13/rapidxml_utils.hpp" using namespace std; @@ -36,11 +37,11 @@ bool has_suffix(std::string const &fullString, std::string const &ending) { } } -Category* get_category(string name, map* marker_categories, vector* errors) { - vector split_categories = split(name, "."); +Category* get_category(rapidxml::xml_attribute<>* name, map* marker_categories, vector* errors) { + vector split_categories = split(get_attribute_value(name), "."); if (split_categories.size() == 0) { - errors->push_back("Empty Type " + name); + errors->push_back(new XMLAttributeValueError("Empty Type", name)); return nullptr; } @@ -52,7 +53,7 @@ Category* get_category(string name, map* marker_categories, ve auto category = marker_categories->find(category_name); if (category == marker_categories->end()) { - errors->push_back("Category Not Found " + category_name + " " + name); + errors->push_back(new XMLAttributeValueError("Category " + category_name + " Not Found ", name)); return nullptr; } @@ -71,37 +72,37 @@ Category* get_category(string name, map* marker_categories, ve // // Parse the xml block into an in memory array of Markers. //////////////////////////////////////////////////////////////////////////////// -vector parse_pois(rapidxml::xml_node<>* root_node, map* marker_categories, string filename, vector* errors) { +vector parse_pois(rapidxml::xml_node<>* root_node, map* marker_categories, string filename, vector* errors) { vector markers; for (rapidxml::xml_node<>* node = root_node->first_node(); node; node = node->next_sibling()) { - if (string(node->name()) == "POI") { - Category* default_category = get_category(node->first_attribute("type", 0, false)->value(), marker_categories, errors); + if (get_node_name(node) == "POI") { + Category* default_category = get_category(find_attribute(node, "type"), marker_categories, errors); Icon poi; poi.init_from_xml(node, errors); markers.push_back(poi); } - else if (string(node->name()) == "Trail") { - Category* default_category = get_category(node->first_attribute("type", 0, false)->value(), marker_categories, errors); + else if (get_node_name(node) == "Trail") { + Category* default_category = get_category(find_attribute(node, "type"), marker_categories, errors); Trail trail; trail.init_from_xml(node, errors); markers.push_back(trail); } else { - cout << "Unknown POIs node name \"" << node->name() << "\" " << filename << endl; + errors->push_back(new XMLNodeNameError("Unknown POIs node name", node)); } } return markers; } -void parse_marker_categories(rapidxml::xml_node<>* node, map* marker_categories, vector* errors, int depth=0) { - if (string(node->name()) == "MarkerCategory") { - string name = node->first_attribute("name", 0, false)->value(); +void parse_marker_categories(rapidxml::xml_node<>* node, map* marker_categories, vector* errors, int depth=0) { + if (get_node_name(node) == "MarkerCategory") { + string name = find_attribute_value(node, "name"); Category* this_category = &(*marker_categories)[name]; this_category->init_from_xml(node, errors); @@ -111,7 +112,7 @@ void parse_marker_categories(rapidxml::xml_node<>* node, map* } } else { - errors->push_back("unknown maker category tag " + string(node->name())); + errors->push_back(new XMLNodeNameError("Unknown MarkerCategory tag", node)); } @@ -125,23 +126,20 @@ void parse_marker_categories(rapidxml::xml_node<>* node, map* // A function which parses a single XML file into their corrisponding classes. //////////////////////////////////////////////////////////////////////////////// void parse_xml_file(string xml_filepath, map* marker_categories) { - vector errors; + vector errors; rapidxml::xml_document<> doc; rapidxml::xml_node<>* root_node; - ifstream inputFile(xml_filepath); - vector buffer((istreambuf_iterator(inputFile)), istreambuf_iterator()); - buffer.push_back('\0'); - - doc.parse<0>(&buffer[0]); + rapidxml::file<> xml_file(xml_filepath.c_str()); + doc.parse(xml_file.data()); root_node = doc.first_node(); // Validate the Root Node - if (string(root_node->name()) != "OverlayData") { - cout << "Root Node is \"" << root_node->name() << "\" not \"OverlayData\" in " << xml_filepath << endl; + if (get_node_name(root_node) != "OverlayData") { + errors.push_back(new XMLNodeNameError("Root node should be of type OverlayData", root_node)); } if (root_node->first_attribute() != nullptr) { cout << "Root Node has attributes when it should have none in " << xml_filepath << endl; @@ -150,21 +148,21 @@ void parse_xml_file(string xml_filepath, map* marker_categorie for (rapidxml::xml_node<>* node = root_node->first_node(); node; node = node->next_sibling()) { - if (string(node->name()) == "MarkerCategory") { + if (get_node_name(node) == "MarkerCategory") { parse_marker_categories(node, marker_categories, &errors); } - else if (string(node->name()) == "POIs") { + else if (get_node_name(node) == "POIs") { parse_pois(node, marker_categories, xml_filepath, &errors); } else { - cout << "Unknown top-level node name " << node->name() << endl; + errors.push_back(new XMLNodeNameError("Unknown top-level node name", node)); } } if (errors.size() > 0) { cout << xml_filepath << endl; for (auto error : errors) { - cout << error << endl; + error->print_error(xml_file.data()); } } } @@ -212,7 +210,6 @@ void convert_taco_directory(string directory) { for (const string & path : xml_files) { parse_xml_file(path, &marker_categories); } - } int main() { From 5e8d5759bb44dfeeab6e8dd5de1829110df89b03 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Thu, 7 Apr 2022 14:42:52 -0500 Subject: [PATCH 022/539] Updating error printing to be more helpful --- xml_converter/src/rapid_helpers.cpp | 112 ++++++++++++++++++++++++---- xml_converter/src/rapid_helpers.hpp | 24 +++--- xml_converter/src/xml_converter.cpp | 7 +- 3 files changed, 110 insertions(+), 33 deletions(-) diff --git a/xml_converter/src/rapid_helpers.cpp b/xml_converter/src/rapid_helpers.cpp index c14a4d23..8d47146b 100644 --- a/xml_converter/src/rapid_helpers.cpp +++ b/xml_converter/src/rapid_helpers.cpp @@ -1,5 +1,6 @@ #include "rapid_helpers.hpp" #include +#include using namespace std; string find_attribute_value(rapidxml::xml_node<>* node, string attribute_name) { @@ -26,32 +27,117 @@ string get_node_name(rapidxml::xml_node<>* node) { +struct TextPosition { + uint line_number; + uint column_number; + char* line_start; + uint line_length; +}; + + +TextPosition get_line_number(char* source, char* start_index, string filepath) { + uint newline_count = 0; + uint column_number = 0; + char* line_start = nullptr; + + char* index = start_index; + + while (index >= source) { + if (*index == '\n') { + if (line_start == nullptr) { + line_start = index+1; + } + + newline_count++; + } + if (line_start == nullptr) { + column_number++; + } + index--; + } + + uint line_length = column_number; + index = start_index; + while (*index != '\n' && *index != '\0') { + index++; + line_length++; + } + + return TextPosition{ + newline_count, + column_number, + line_start, + line_length + }; +} -XMLStringError::XMLStringError(string message) { - this->message = message; + +string replace_tabs(string input){ + string tab = "\t"; //tab + string spaces = " "; //four spaces + + auto iterator = input.find(tab); + while (iterator != string::npos) + { + input.replace(iterator, tab.size(), spaces); + iterator = input.find(tab); + } + return input; } - -void XMLStringError::print_error(string source) { - cout << this->message << endl; +void print_generic_error(string error_message, char* source, string filepath, char* start_index, uint length) { + + string BOLD_COLOR = "\033[1m"; + string RED_COLOR = "\033[31;1m"; + string DEFAULT_COLOR = "\033[0m"; + + cout << BOLD_COLOR << "Error: " << DEFAULT_COLOR << error_message << " " << filepath << endl; + + + if (start_index < source) { + cout << "some weird fuckery" << endl; + return; + } + + + + TextPosition text_position = get_line_number(source, start_index, filepath); + string line_number_string = to_string(text_position.line_number); + string padding_string = string(line_number_string.length(), ' '); + + + string prefix = replace_tabs(string(text_position.line_start, text_position.column_number-1)); + string value = replace_tabs(string(start_index, length)); + + uint suffix_length = text_position.line_length - length - text_position.column_number; + string suffix = string(start_index+length, suffix_length); + + + string prefix_padding = string(prefix.length(), ' '); + string value_markers = string(value.length(), '^'); + + + cout << line_number_string << " |" << prefix << RED_COLOR << value << DEFAULT_COLOR << suffix << endl; + cout << padding_string << " |" << prefix_padding << RED_COLOR << value_markers << DEFAULT_COLOR << endl << endl; } + + XMLAttributeNameError::XMLAttributeNameError(string message, rapidxml::xml_attribute<>* attribute) { this->message = message; this->attribute = attribute; } -void XMLAttributeNameError::print_error(string source) { - cout << "Attribute Name Error: " << this->message << get_attribute_name(this->attribute) << endl; - +void XMLAttributeNameError::print_error(char* source, string filepath) { + print_generic_error(this->message, source, filepath, this->attribute->name(), this->attribute->name_size()); } XMLAttributeValueError::XMLAttributeValueError(string message, rapidxml::xml_attribute<>* attribute) { this->message = message; this->attribute = attribute; } -void XMLAttributeValueError::print_error(string source) { - cout << "Attribute Value Error: " << this->message << get_attribute_value(this->attribute) << endl; +void XMLAttributeValueError::print_error(char* source, string filepath) { + print_generic_error(this->message, source, filepath, this->attribute->value(), this->attribute->value_size()); } @@ -59,8 +145,6 @@ XMLNodeNameError::XMLNodeNameError(string message, rapidxml::xml_node<>* node) { this->message = message; this->node = node; } -void XMLNodeNameError::print_error(string source){ - cout << "XMLNodeNameError: " << this->message << get_node_name(this->node) << endl; +void XMLNodeNameError::print_error(char* source, string filepath){ + print_generic_error(this->message, source, filepath, this->node->name(), this->node->name_size()); } - - diff --git a/xml_converter/src/rapid_helpers.hpp b/xml_converter/src/rapid_helpers.hpp index 0bb3a81e..8ec6ca90 100644 --- a/xml_converter/src/rapid_helpers.hpp +++ b/xml_converter/src/rapid_helpers.hpp @@ -15,21 +15,17 @@ string get_attribute_value(rapidxml::xml_attribute<>* attribute); string get_node_name(rapidxml::xml_node<>* node); +//////////////////////////////////////////////////////////////////////////////// +// XMLError +// +// A base class for all the XML errors. It itself should not be used as an +// error, but all of it's subclasses can be. +//////////////////////////////////////////////////////////////////////////////// class XMLError { protected: string message; public: - virtual void print_error(string source) = 0; -}; - - -// rapidxml::xml_node<>* root_node -// rapidxml::xml_attribute<>* input - -class XMLStringError: public XMLError { - public: - XMLStringError(string message); - void print_error(string source); + virtual void print_error(char* source, string filepath) = 0; }; class XMLAttributeNameError: public XMLError { @@ -37,7 +33,7 @@ class XMLAttributeNameError: public XMLError { rapidxml::xml_attribute<>* attribute; public: XMLAttributeNameError(string message, rapidxml::xml_attribute<>* attribute); - void print_error(string source); + void print_error(char* source, string filepath); }; class XMLAttributeValueError: public XMLError { @@ -45,7 +41,7 @@ class XMLAttributeValueError: public XMLError { rapidxml::xml_attribute<>* attribute; public: XMLAttributeValueError(string message, rapidxml::xml_attribute<>* attribute); - void print_error(string source); + void print_error(char* source, string filepath); }; class XMLNodeNameError: public XMLError { @@ -53,5 +49,5 @@ class XMLNodeNameError: public XMLError { rapidxml::xml_node<>* node; public: XMLNodeNameError(string message, rapidxml::xml_node<>* node); - void print_error(string source); + void print_error(char* source, string filepath); }; diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index c6773feb..f1c5dcc4 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -159,11 +159,8 @@ void parse_xml_file(string xml_filepath, map* marker_categorie } } - if (errors.size() > 0) { - cout << xml_filepath << endl; - for (auto error : errors) { - error->print_error(xml_file.data()); - } + for (auto error : errors) { + error->print_error(xml_file.data(), xml_filepath); } } From 6565515feeaa60c16e5e20b519f9f119bb89a801 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Thu, 7 Apr 2022 14:43:41 -0500 Subject: [PATCH 023/539] Using the MarkerCategory default values when creating icon and trail objects --- xml_converter/src/xml_converter.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index f1c5dcc4..4225c2ea 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -81,14 +81,24 @@ vector parse_pois(rapidxml::xml_node<>* root_node, mapdefault_icon; + } + + icon.init_from_xml(node, errors); + markers.push_back(icon); } else if (get_node_name(node) == "Trail") { Category* default_category = get_category(find_attribute(node, "type"), marker_categories, errors); Trail trail; + + if (default_category != nullptr) { + trail = default_category->default_trail; + } + trail.init_from_xml(node, errors); markers.push_back(trail); } From af30ad8fb32fed88ae5889cfb787d2b794f3909b Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Thu, 7 Apr 2022 17:23:08 -0500 Subject: [PATCH 024/539] adding comments to some of the rapid_helpers functions --- xml_converter/src/rapid_helpers.cpp | 72 ++++++++++++++++++++++------- 1 file changed, 56 insertions(+), 16 deletions(-) diff --git a/xml_converter/src/rapid_helpers.cpp b/xml_converter/src/rapid_helpers.cpp index 8d47146b..bdff9731 100644 --- a/xml_converter/src/rapid_helpers.cpp +++ b/xml_converter/src/rapid_helpers.cpp @@ -1,4 +1,5 @@ #include "rapid_helpers.hpp" +#include "rapidxml-1.13/rapidxml.hpp" #include #include using namespace std; @@ -26,7 +27,12 @@ string get_node_name(rapidxml::xml_node<>* node) { } - +//////////////////////////////////////////////////////////////////////////////// +// TextPosition +// +// The return value for get_line_number(). Contains several pieces of useful +// information about the location of a particular character and its context. +//////////////////////////////////////////////////////////////////////////////// struct TextPosition { uint line_number; uint column_number; @@ -35,7 +41,13 @@ struct TextPosition { }; -TextPosition get_line_number(char* source, char* start_index, string filepath) { +//////////////////////////////////////////////////////////////////////////////// +// get_line_number +// +// Gets several useful pieces of information about a particular token that +// starts at `start_index` and is within `source`. +//////////////////////////////////////////////////////////////////////////////// +TextPosition get_line_number(char* source, char* start_index) { uint newline_count = 0; uint column_number = 0; char* line_start = nullptr; @@ -72,10 +84,15 @@ TextPosition get_line_number(char* source, char* start_index, string filepath) { } - +//////////////////////////////////////////////////////////////////////////////// +// replace_tabs +// +// This function creates a new string with all the tabs replaced with four +// spaces. This is done to normalize the size of the strings when printed. +//////////////////////////////////////////////////////////////////////////////// string replace_tabs(string input){ - string tab = "\t"; //tab - string spaces = " "; //four spaces + string tab = "\t"; + string spaces = " "; auto iterator = input.find(tab); while (iterator != string::npos) @@ -85,45 +102,59 @@ string replace_tabs(string input){ } return input; } + + +//////////////////////////////////////////////////////////////////////////////// +// print_generic_error +// +// Prints out a formatted error message taking in some non-specific values +// in order to do so. +//////////////////////////////////////////////////////////////////////////////// void print_generic_error(string error_message, char* source, string filepath, char* start_index, uint length) { string BOLD_COLOR = "\033[1m"; string RED_COLOR = "\033[31;1m"; string DEFAULT_COLOR = "\033[0m"; - cout << BOLD_COLOR << "Error: " << DEFAULT_COLOR << error_message << " " << filepath << endl; - + // Print out the first line of the error containing the message and the + // filename, leaving the location hint for later in this function. + cout << RED_COLOR << "Error: " << DEFAULT_COLOR << BOLD_COLOR << error_message << DEFAULT_COLOR << "\n" << filepath << endl; + // Sanity check to see if we are definitely not inside the string. if (start_index < source) { - cout << "some weird fuckery" << endl; + cout << "Unable to Identify Error in source" << endl; return; } + // Calculate the row, column, and some other values for the token. + TextPosition text_position = get_line_number(source, start_index); - - TextPosition text_position = get_line_number(source, start_index, filepath); + // Calculate the left-hand column text. string line_number_string = to_string(text_position.line_number); string padding_string = string(line_number_string.length(), ' '); - + // Calculate the strings for the row of XML that should be shown to the + // user, splitting out the value which will be colored. string prefix = replace_tabs(string(text_position.line_start, text_position.column_number-1)); string value = replace_tabs(string(start_index, length)); - uint suffix_length = text_position.line_length - length - text_position.column_number; string suffix = string(start_index+length, suffix_length); - + // Calculate the strings that position and indicate where the error is for + // displays that do not use color. string prefix_padding = string(prefix.length(), ' '); string value_markers = string(value.length(), '^'); - + // Display the formatted lines to the user. cout << line_number_string << " |" << prefix << RED_COLOR << value << DEFAULT_COLOR << suffix << endl; cout << padding_string << " |" << prefix_padding << RED_COLOR << value_markers << DEFAULT_COLOR << endl << endl; } - - +//////////////////////////////////////////////////////////////////////////////// +// Implementation of the constructor and print_error functions for +// the XMLAttributeNameError subclass. +//////////////////////////////////////////////////////////////////////////////// XMLAttributeNameError::XMLAttributeNameError(string message, rapidxml::xml_attribute<>* attribute) { this->message = message; this->attribute = attribute; @@ -132,6 +163,11 @@ void XMLAttributeNameError::print_error(char* source, string filepath) { print_generic_error(this->message, source, filepath, this->attribute->name(), this->attribute->name_size()); } + +//////////////////////////////////////////////////////////////////////////////// +// Implementation of the constructor and print_error functions for +// the XMLAttributeValueError subclass. +//////////////////////////////////////////////////////////////////////////////// XMLAttributeValueError::XMLAttributeValueError(string message, rapidxml::xml_attribute<>* attribute) { this->message = message; this->attribute = attribute; @@ -141,6 +177,10 @@ void XMLAttributeValueError::print_error(char* source, string filepath) { } +//////////////////////////////////////////////////////////////////////////////// +// Implementation of the constructor and print_error functions for +// the XMLNodeNameError subclass. +//////////////////////////////////////////////////////////////////////////////// XMLNodeNameError::XMLNodeNameError(string message, rapidxml::xml_node<>* node) { this->message = message; this->node = node; From a9f582d5232db7b5f11146eca8ec5bfec91868a4 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Thu, 7 Apr 2022 17:23:33 -0500 Subject: [PATCH 025/539] removing the unused filename argument for parse_pois --- xml_converter/src/xml_converter.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 4225c2ea..686cbb48 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -72,7 +72,7 @@ Category* get_category(rapidxml::xml_attribute<>* name, map* m // // Parse the xml block into an in memory array of Markers. //////////////////////////////////////////////////////////////////////////////// -vector parse_pois(rapidxml::xml_node<>* root_node, map* marker_categories, string filename, vector* errors) { +vector parse_pois(rapidxml::xml_node<>* root_node, map* marker_categories, vector* errors) { vector markers; @@ -142,7 +142,7 @@ void parse_xml_file(string xml_filepath, map* marker_categorie rapidxml::xml_node<>* root_node; rapidxml::file<> xml_file(xml_filepath.c_str()); - doc.parse(xml_file.data()); + doc.parse(xml_file.data()); root_node = doc.first_node(); @@ -162,7 +162,7 @@ void parse_xml_file(string xml_filepath, map* marker_categorie parse_marker_categories(node, marker_categories, &errors); } else if (get_node_name(node) == "POIs") { - parse_pois(node, marker_categories, xml_filepath, &errors); + parse_pois(node, marker_categories, &errors); } else { errors.push_back(new XMLNodeNameError("Unknown top-level node name", node)); From a5a5af27bcabb8a086c54dc24b62880a999e5521 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Thu, 7 Apr 2022 17:51:29 -0500 Subject: [PATCH 026/539] removing case sensitivity from category names and node tyoes --- xml_converter/src/xml_converter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 686cbb48..1fffe4ca 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -48,7 +48,7 @@ Category* get_category(rapidxml::xml_attribute<>* name, map* m Category* output = nullptr; for (unsigned int i = 0; i < split_categories.size(); i++) { - string category_name = split_categories[i]; + string category_name = lowercase(split_categories[i]); auto category = marker_categories->find(category_name); @@ -112,7 +112,7 @@ vector parse_pois(rapidxml::xml_node<>* root_node, map* node, map* marker_categories, vector* errors, int depth=0) { if (get_node_name(node) == "MarkerCategory") { - string name = find_attribute_value(node, "name"); + string name = lowercase(find_attribute_value(node, "name")); Category* this_category = &(*marker_categories)[name]; this_category->init_from_xml(node, errors); From 744afc8f915c1d410ec07795e854a49cbca79b6c Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Thu, 7 Apr 2022 17:51:48 -0500 Subject: [PATCH 027/539] adding output bin and clangd cache directory to gitignore --- xml_converter/.gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xml_converter/.gitignore b/xml_converter/.gitignore index 66ef237e..f5f956de 100644 --- a/xml_converter/.gitignore +++ b/xml_converter/.gitignore @@ -4,3 +4,5 @@ CMakeFiles CMakeCache.txt cmake_install.cmake compile_commands.json +.clangd/ +xml_converter From 3a5cb54b7de8a9b82daeb01660bd4804c0884a60 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Thu, 7 Apr 2022 17:53:22 -0500 Subject: [PATCH 028/539] adding an image attribute for specifically image filepaths --- xml_converter/src/attribute/image.cpp | 15 +++++++++++++++ xml_converter/src/attribute/image.hpp | 18 ++++++++++++++++++ xml_converter/src/icon.hpp | 3 ++- xml_converter/src/trail.hpp | 3 ++- 4 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 xml_converter/src/attribute/image.cpp create mode 100644 xml_converter/src/attribute/image.hpp diff --git a/xml_converter/src/attribute/image.cpp b/xml_converter/src/attribute/image.cpp new file mode 100644 index 00000000..de4907c5 --- /dev/null +++ b/xml_converter/src/attribute/image.cpp @@ -0,0 +1,15 @@ +#include "image.hpp" + +#include +#include + +#include "../rapidxml-1.13/rapidxml.hpp" + +using namespace std; + +Image parse_Image(rapidxml::xml_attribute<>* input, vector *) { + Image image; + image.path = get_attribute_value(input); + image.original_token = input; + return image; +} diff --git a/xml_converter/src/attribute/image.hpp b/xml_converter/src/attribute/image.hpp new file mode 100644 index 00000000..b0d66c63 --- /dev/null +++ b/xml_converter/src/attribute/image.hpp @@ -0,0 +1,18 @@ +#pragma once + +#include +#include + +#include "../rapid_helpers.hpp" +#include "../rapidxml-1.13/rapidxml.hpp" + +using namespace std; + +class Image { + public: + string path; + rapidxml::xml_attribute<>* original_token; +}; + +Image parse_Image(rapidxml::xml_attribute<>* input, vector *errors); + diff --git a/xml_converter/src/icon.hpp b/xml_converter/src/icon.hpp index dd46c265..560e8043 100644 --- a/xml_converter/src/icon.hpp +++ b/xml_converter/src/icon.hpp @@ -9,6 +9,7 @@ #include "attribute/euler_angle.hpp" #include "attribute/festival_filter.hpp" #include "attribute/float.hpp" +#include "attribute/image.hpp" #include "attribute/int.hpp" #include "attribute/map_type_filter.hpp" #include "attribute/mount_filter.hpp" @@ -75,7 +76,7 @@ class Icon: public Parseable { PARSEABLE_VAR(height_offset, float, "HeightOffset") // https://blishhud.com/docs/markers/attributes/iconfile - PARSEABLE_VAR(icon_file, string, "IconFile") + PARSEABLE_VAR(icon_file, Image, "IconFile") // https://blishhud.com/docs/markers/attributes/iconsize PARSEABLE_VAR(icon_size, float, "IconSize") diff --git a/xml_converter/src/trail.hpp b/xml_converter/src/trail.hpp index 229d9855..8e61c52f 100644 --- a/xml_converter/src/trail.hpp +++ b/xml_converter/src/trail.hpp @@ -18,6 +18,7 @@ #include "attribute/color.hpp" #include "attribute/festival_filter.hpp" #include "attribute/float.hpp" +#include "attribute/image.hpp" #include "attribute/int.hpp" #include "attribute/map_type_filter.hpp" #include "attribute/mount_filter.hpp" @@ -80,7 +81,7 @@ class Trail: public Parseable { PARSEABLE_VAR(race_filter, RaceFilter, "Race") // https://blishhud.com/docs/markers/attributes/texture - PARSEABLE_VAR(texture, string, "Texture") + PARSEABLE_VAR(texture, Image, "Texture") // https://blishhud.com/docs/markers/attributes/trailscale PARSEABLE_VAR(trail_scale, float, "TrailScale") From b0657e662bb9926704cf4906c811c7c02a505fac Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Fri, 8 Apr 2022 12:56:52 -0500 Subject: [PATCH 029/539] fixing line endings in rapidxml --- xml_converter/src/rapidxml-1.13/rapidxml.hpp | 5192 ++++++++--------- .../src/rapidxml-1.13/rapidxml_iterators.hpp | 348 +- .../src/rapidxml-1.13/rapidxml_print.hpp | 842 +-- .../src/rapidxml-1.13/rapidxml_utils.hpp | 244 +- 4 files changed, 3313 insertions(+), 3313 deletions(-) diff --git a/xml_converter/src/rapidxml-1.13/rapidxml.hpp b/xml_converter/src/rapidxml-1.13/rapidxml.hpp index 6b82f20a..ae91e081 100644 --- a/xml_converter/src/rapidxml-1.13/rapidxml.hpp +++ b/xml_converter/src/rapidxml-1.13/rapidxml.hpp @@ -1,2596 +1,2596 @@ -#ifndef RAPIDXML_HPP_INCLUDED -#define RAPIDXML_HPP_INCLUDED - -// Copyright (C) 2006, 2009 Marcin Kalicinski -// Version 1.13 -// Revision $DateTime: 2009/05/13 01:46:17 $ -//! \file rapidxml.hpp This file contains rapidxml parser and DOM implementation - -// If standard library is disabled, user must provide implementations of required functions and typedefs -#if !defined(RAPIDXML_NO_STDLIB) - #include // For std::size_t - #include // For assert - #include // For placement new -#endif - -// On MSVC, disable "conditional expression is constant" warning (level 4). -// This warning is almost impossible to avoid with certain types of templated code -#ifdef _MSC_VER - #pragma warning(push) - #pragma warning(disable:4127) // Conditional expression is constant -#endif - -/////////////////////////////////////////////////////////////////////////// -// RAPIDXML_PARSE_ERROR - -#if defined(RAPIDXML_NO_EXCEPTIONS) - -#define RAPIDXML_PARSE_ERROR(what, where) { parse_error_handler(what, where); assert(0); } - -namespace rapidxml -{ - //! When exceptions are disabled by defining RAPIDXML_NO_EXCEPTIONS, - //! this function is called to notify user about the error. - //! It must be defined by the user. - //!

- //! This function cannot return. If it does, the results are undefined. - //!

- //! A very simple definition might look like that: - //!
-    //! void %rapidxml::%parse_error_handler(const char *what, void *where)
-    //! {
-    //!     std::cout << "Parse error: " << what << "\n";
-    //!     std::abort();
-    //! }
-    //! 
- //! \param what Human readable description of the error. - //! \param where Pointer to character data where error was detected. - void parse_error_handler(const char *what, void *where); -} - -#else - -#include // For std::exception - -#define RAPIDXML_PARSE_ERROR(what, where) throw parse_error(what, where) - -namespace rapidxml -{ - - //! Parse error exception. - //! This exception is thrown by the parser when an error occurs. - //! Use what() function to get human-readable error message. - //! Use where() function to get a pointer to position within source text where error was detected. - //!

- //! If throwing exceptions by the parser is undesirable, - //! it can be disabled by defining RAPIDXML_NO_EXCEPTIONS macro before rapidxml.hpp is included. - //! This will cause the parser to call rapidxml::parse_error_handler() function instead of throwing an exception. - //! This function must be defined by the user. - //!

- //! This class derives from std::exception class. - class parse_error: public std::exception - { - - public: - - //! Constructs parse error - parse_error(const char *what, void *where) - : m_what(what) - , m_where(where) - { - } - - //! Gets human readable description of error. - //! \return Pointer to null terminated description of the error. - virtual const char *what() const throw() - { - return m_what; - } - - //! Gets pointer to character data where error happened. - //! Ch should be the same as char type of xml_document that produced the error. - //! \return Pointer to location within the parsed string where error occured. - template - Ch *where() const - { - return reinterpret_cast(m_where); - } - - private: - - const char *m_what; - void *m_where; - - }; -} - -#endif - -/////////////////////////////////////////////////////////////////////////// -// Pool sizes - -#ifndef RAPIDXML_STATIC_POOL_SIZE - // Size of static memory block of memory_pool. - // Define RAPIDXML_STATIC_POOL_SIZE before including rapidxml.hpp if you want to override the default value. - // No dynamic memory allocations are performed by memory_pool until static memory is exhausted. - #define RAPIDXML_STATIC_POOL_SIZE (64 * 1024) -#endif - -#ifndef RAPIDXML_DYNAMIC_POOL_SIZE - // Size of dynamic memory block of memory_pool. - // Define RAPIDXML_DYNAMIC_POOL_SIZE before including rapidxml.hpp if you want to override the default value. - // After the static block is exhausted, dynamic blocks with approximately this size are allocated by memory_pool. - #define RAPIDXML_DYNAMIC_POOL_SIZE (64 * 1024) -#endif - -#ifndef RAPIDXML_ALIGNMENT - // Memory allocation alignment. - // Define RAPIDXML_ALIGNMENT before including rapidxml.hpp if you want to override the default value, which is the size of pointer. - // All memory allocations for nodes, attributes and strings will be aligned to this value. - // This must be a power of 2 and at least 1, otherwise memory_pool will not work. - #define RAPIDXML_ALIGNMENT sizeof(void *) -#endif - -namespace rapidxml -{ - // Forward declarations - template class xml_node; - template class xml_attribute; - template class xml_document; - - //! Enumeration listing all node types produced by the parser. - //! Use xml_node::type() function to query node type. - enum node_type - { - node_document, //!< A document node. Name and value are empty. - node_element, //!< An element node. Name contains element name. Value contains text of first data node. - node_data, //!< A data node. Name is empty. Value contains data text. - node_cdata, //!< A CDATA node. Name is empty. Value contains data text. - node_comment, //!< A comment node. Name is empty. Value contains comment text. - node_declaration, //!< A declaration node. Name and value are empty. Declaration parameters (version, encoding and standalone) are in node attributes. - node_doctype, //!< A DOCTYPE node. Name is empty. Value contains DOCTYPE text. - node_pi //!< A PI node. Name contains target. Value contains instructions. - }; - - /////////////////////////////////////////////////////////////////////// - // Parsing flags - - //! Parse flag instructing the parser to not create data nodes. - //! Text of first data node will still be placed in value of parent element, unless rapidxml::parse_no_element_values flag is also specified. - //! Can be combined with other flags by use of | operator. - //!

- //! See xml_document::parse() function. - const int parse_no_data_nodes = 0x1; - - //! Parse flag instructing the parser to not use text of first data node as a value of parent element. - //! Can be combined with other flags by use of | operator. - //! Note that child data nodes of element node take precendence over its value when printing. - //! That is, if element has one or more child data nodes and a value, the value will be ignored. - //! Use rapidxml::parse_no_data_nodes flag to prevent creation of data nodes if you want to manipulate data using values of elements. - //!

- //! See xml_document::parse() function. - const int parse_no_element_values = 0x2; - - //! Parse flag instructing the parser to not place zero terminators after strings in the source text. - //! By default zero terminators are placed, modifying source text. - //! Can be combined with other flags by use of | operator. - //!

- //! See xml_document::parse() function. - const int parse_no_string_terminators = 0x4; - - //! Parse flag instructing the parser to not translate entities in the source text. - //! By default entities are translated, modifying source text. - //! Can be combined with other flags by use of | operator. - //!

- //! See xml_document::parse() function. - const int parse_no_entity_translation = 0x8; - - //! Parse flag instructing the parser to disable UTF-8 handling and assume plain 8 bit characters. - //! By default, UTF-8 handling is enabled. - //! Can be combined with other flags by use of | operator. - //!

- //! See xml_document::parse() function. - const int parse_no_utf8 = 0x10; - - //! Parse flag instructing the parser to create XML declaration node. - //! By default, declaration node is not created. - //! Can be combined with other flags by use of | operator. - //!

- //! See xml_document::parse() function. - const int parse_declaration_node = 0x20; - - //! Parse flag instructing the parser to create comments nodes. - //! By default, comment nodes are not created. - //! Can be combined with other flags by use of | operator. - //!

- //! See xml_document::parse() function. - const int parse_comment_nodes = 0x40; - - //! Parse flag instructing the parser to create DOCTYPE node. - //! By default, doctype node is not created. - //! Although W3C specification allows at most one DOCTYPE node, RapidXml will silently accept documents with more than one. - //! Can be combined with other flags by use of | operator. - //!

- //! See xml_document::parse() function. - const int parse_doctype_node = 0x80; - - //! Parse flag instructing the parser to create PI nodes. - //! By default, PI nodes are not created. - //! Can be combined with other flags by use of | operator. - //!

- //! See xml_document::parse() function. - const int parse_pi_nodes = 0x100; - - //! Parse flag instructing the parser to validate closing tag names. - //! If not set, name inside closing tag is irrelevant to the parser. - //! By default, closing tags are not validated. - //! Can be combined with other flags by use of | operator. - //!

- //! See xml_document::parse() function. - const int parse_validate_closing_tags = 0x200; - - //! Parse flag instructing the parser to trim all leading and trailing whitespace of data nodes. - //! By default, whitespace is not trimmed. - //! This flag does not cause the parser to modify source text. - //! Can be combined with other flags by use of | operator. - //!

- //! See xml_document::parse() function. - const int parse_trim_whitespace = 0x400; - - //! Parse flag instructing the parser to condense all whitespace runs of data nodes to a single space character. - //! Trimming of leading and trailing whitespace of data is controlled by rapidxml::parse_trim_whitespace flag. - //! By default, whitespace is not normalized. - //! If this flag is specified, source text will be modified. - //! Can be combined with other flags by use of | operator. - //!

- //! See xml_document::parse() function. - const int parse_normalize_whitespace = 0x800; - - // Compound flags - - //! Parse flags which represent default behaviour of the parser. - //! This is always equal to 0, so that all other flags can be simply ored together. - //! Normally there is no need to inconveniently disable flags by anding with their negated (~) values. - //! This also means that meaning of each flag is a negation of the default setting. - //! For example, if flag name is rapidxml::parse_no_utf8, it means that utf-8 is enabled by default, - //! and using the flag will disable it. - //!

- //! See xml_document::parse() function. - const int parse_default = 0; - - //! A combination of parse flags that forbids any modifications of the source text. - //! This also results in faster parsing. However, note that the following will occur: - //!
    - //!
  • names and values of nodes will not be zero terminated, you have to use xml_base::name_size() and xml_base::value_size() functions to determine where name and value ends
  • - //!
  • entities will not be translated
  • - //!
  • whitespace will not be normalized
  • - //!
- //! See xml_document::parse() function. - const int parse_non_destructive = parse_no_string_terminators | parse_no_entity_translation; - - //! A combination of parse flags resulting in fastest possible parsing, without sacrificing important data. - //!

- //! See xml_document::parse() function. - const int parse_fastest = parse_non_destructive | parse_no_data_nodes; - - //! A combination of parse flags resulting in largest amount of data being extracted. - //! This usually results in slowest parsing. - //!

- //! See xml_document::parse() function. - const int parse_full = parse_declaration_node | parse_comment_nodes | parse_doctype_node | parse_pi_nodes | parse_validate_closing_tags; - - /////////////////////////////////////////////////////////////////////// - // Internals - - //! \cond internal - namespace internal - { - - // Struct that contains lookup tables for the parser - // It must be a template to allow correct linking (because it has static data members, which are defined in a header file). - template - struct lookup_tables - { - static const unsigned char lookup_whitespace[256]; // Whitespace table - static const unsigned char lookup_node_name[256]; // Node name table - static const unsigned char lookup_text[256]; // Text table - static const unsigned char lookup_text_pure_no_ws[256]; // Text table - static const unsigned char lookup_text_pure_with_ws[256]; // Text table - static const unsigned char lookup_attribute_name[256]; // Attribute name table - static const unsigned char lookup_attribute_data_1[256]; // Attribute data table with single quote - static const unsigned char lookup_attribute_data_1_pure[256]; // Attribute data table with single quote - static const unsigned char lookup_attribute_data_2[256]; // Attribute data table with double quotes - static const unsigned char lookup_attribute_data_2_pure[256]; // Attribute data table with double quotes - static const unsigned char lookup_digits[256]; // Digits - static const unsigned char lookup_upcase[256]; // To uppercase conversion table for ASCII characters - }; - - // Find length of the string - template - inline std::size_t measure(const Ch *p) - { - const Ch *tmp = p; - while (*tmp) - ++tmp; - return tmp - p; - } - - // Compare strings for equality - template - inline bool compare(const Ch *p1, std::size_t size1, const Ch *p2, std::size_t size2, bool case_sensitive) - { - if (size1 != size2) - return false; - if (case_sensitive) - { - for (const Ch *end = p1 + size1; p1 < end; ++p1, ++p2) - if (*p1 != *p2) - return false; - } - else - { - for (const Ch *end = p1 + size1; p1 < end; ++p1, ++p2) - if (lookup_tables<0>::lookup_upcase[static_cast(*p1)] != lookup_tables<0>::lookup_upcase[static_cast(*p2)]) - return false; - } - return true; - } - } - //! \endcond - - /////////////////////////////////////////////////////////////////////// - // Memory pool - - //! This class is used by the parser to create new nodes and attributes, without overheads of dynamic memory allocation. - //! In most cases, you will not need to use this class directly. - //! However, if you need to create nodes manually or modify names/values of nodes, - //! you are encouraged to use memory_pool of relevant xml_document to allocate the memory. - //! Not only is this faster than allocating them by using new operator, - //! but also their lifetime will be tied to the lifetime of document, - //! possibly simplyfing memory management. - //!

- //! Call allocate_node() or allocate_attribute() functions to obtain new nodes or attributes from the pool. - //! You can also call allocate_string() function to allocate strings. - //! Such strings can then be used as names or values of nodes without worrying about their lifetime. - //! Note that there is no free() function -- all allocations are freed at once when clear() function is called, - //! or when the pool is destroyed. - //!

- //! It is also possible to create a standalone memory_pool, and use it - //! to allocate nodes, whose lifetime will not be tied to any document. - //!

- //! Pool maintains RAPIDXML_STATIC_POOL_SIZE bytes of statically allocated memory. - //! Until static memory is exhausted, no dynamic memory allocations are done. - //! When static memory is exhausted, pool allocates additional blocks of memory of size RAPIDXML_DYNAMIC_POOL_SIZE each, - //! by using global new[] and delete[] operators. - //! This behaviour can be changed by setting custom allocation routines. - //! Use set_allocator() function to set them. - //!

- //! Allocations for nodes, attributes and strings are aligned at RAPIDXML_ALIGNMENT bytes. - //! This value defaults to the size of pointer on target architecture. - //!

- //! To obtain absolutely top performance from the parser, - //! it is important that all nodes are allocated from a single, contiguous block of memory. - //! Otherwise, cache misses when jumping between two (or more) disjoint blocks of memory can slow down parsing quite considerably. - //! If required, you can tweak RAPIDXML_STATIC_POOL_SIZE, RAPIDXML_DYNAMIC_POOL_SIZE and RAPIDXML_ALIGNMENT - //! to obtain best wasted memory to performance compromise. - //! To do it, define their values before rapidxml.hpp file is included. - //! \param Ch Character type of created nodes. - template - class memory_pool - { - - public: - - //! \cond internal - typedef void *(alloc_func)(std::size_t); // Type of user-defined function used to allocate memory - typedef void (free_func)(void *); // Type of user-defined function used to free memory - //! \endcond - - //! Constructs empty pool with default allocator functions. - memory_pool() - : m_alloc_func(0) - , m_free_func(0) - { - init(); - } - - //! Destroys pool and frees all the memory. - //! This causes memory occupied by nodes allocated by the pool to be freed. - //! Nodes allocated from the pool are no longer valid. - ~memory_pool() - { - clear(); - } - - //! Allocates a new node from the pool, and optionally assigns name and value to it. - //! If the allocation request cannot be accomodated, this function will throw std::bad_alloc. - //! If exceptions are disabled by defining RAPIDXML_NO_EXCEPTIONS, this function - //! will call rapidxml::parse_error_handler() function. - //! \param type Type of node to create. - //! \param name Name to assign to the node, or 0 to assign no name. - //! \param value Value to assign to the node, or 0 to assign no value. - //! \param name_size Size of name to assign, or 0 to automatically calculate size from name string. - //! \param value_size Size of value to assign, or 0 to automatically calculate size from value string. - //! \return Pointer to allocated node. This pointer will never be NULL. - xml_node *allocate_node(node_type type, - const Ch *name = 0, const Ch *value = 0, - std::size_t name_size = 0, std::size_t value_size = 0) - { - void *memory = allocate_aligned(sizeof(xml_node)); - xml_node *node = new(memory) xml_node(type); - if (name) - { - if (name_size > 0) - node->name(name, name_size); - else - node->name(name); - } - if (value) - { - if (value_size > 0) - node->value(value, value_size); - else - node->value(value); - } - return node; - } - - //! Allocates a new attribute from the pool, and optionally assigns name and value to it. - //! If the allocation request cannot be accomodated, this function will throw std::bad_alloc. - //! If exceptions are disabled by defining RAPIDXML_NO_EXCEPTIONS, this function - //! will call rapidxml::parse_error_handler() function. - //! \param name Name to assign to the attribute, or 0 to assign no name. - //! \param value Value to assign to the attribute, or 0 to assign no value. - //! \param name_size Size of name to assign, or 0 to automatically calculate size from name string. - //! \param value_size Size of value to assign, or 0 to automatically calculate size from value string. - //! \return Pointer to allocated attribute. This pointer will never be NULL. - xml_attribute *allocate_attribute(const Ch *name = 0, const Ch *value = 0, - std::size_t name_size = 0, std::size_t value_size = 0) - { - void *memory = allocate_aligned(sizeof(xml_attribute)); - xml_attribute *attribute = new(memory) xml_attribute; - if (name) - { - if (name_size > 0) - attribute->name(name, name_size); - else - attribute->name(name); - } - if (value) - { - if (value_size > 0) - attribute->value(value, value_size); - else - attribute->value(value); - } - return attribute; - } - - //! Allocates a char array of given size from the pool, and optionally copies a given string to it. - //! If the allocation request cannot be accomodated, this function will throw std::bad_alloc. - //! If exceptions are disabled by defining RAPIDXML_NO_EXCEPTIONS, this function - //! will call rapidxml::parse_error_handler() function. - //! \param source String to initialize the allocated memory with, or 0 to not initialize it. - //! \param size Number of characters to allocate, or zero to calculate it automatically from source string length; if size is 0, source string must be specified and null terminated. - //! \return Pointer to allocated char array. This pointer will never be NULL. - Ch *allocate_string(const Ch *source = 0, std::size_t size = 0) - { - assert(source || size); // Either source or size (or both) must be specified - if (size == 0) - size = internal::measure(source) + 1; - Ch *result = static_cast(allocate_aligned(size * sizeof(Ch))); - if (source) - for (std::size_t i = 0; i < size; ++i) - result[i] = source[i]; - return result; - } - - //! Clones an xml_node and its hierarchy of child nodes and attributes. - //! Nodes and attributes are allocated from this memory pool. - //! Names and values are not cloned, they are shared between the clone and the source. - //! Result node can be optionally specified as a second parameter, - //! in which case its contents will be replaced with cloned source node. - //! This is useful when you want to clone entire document. - //! \param source Node to clone. - //! \param result Node to put results in, or 0 to automatically allocate result node - //! \return Pointer to cloned node. This pointer will never be NULL. - xml_node *clone_node(const xml_node *source, xml_node *result = 0) - { - // Prepare result node - if (result) - { - result->remove_all_attributes(); - result->remove_all_nodes(); - result->type(source->type()); - } - else - result = allocate_node(source->type()); - - // Clone name and value - result->name(source->name(), source->name_size()); - result->value(source->value(), source->value_size()); - - // Clone child nodes and attributes - for (xml_node *child = source->first_node(); child; child = child->next_sibling()) - result->append_node(clone_node(child)); - for (xml_attribute *attr = source->first_attribute(); attr; attr = attr->next_attribute()) - result->append_attribute(allocate_attribute(attr->name(), attr->value(), attr->name_size(), attr->value_size())); - - return result; - } - - //! Clears the pool. - //! This causes memory occupied by nodes allocated by the pool to be freed. - //! Any nodes or strings allocated from the pool will no longer be valid. - void clear() - { - while (m_begin != m_static_memory) - { - char *previous_begin = reinterpret_cast
(align(m_begin))->previous_begin; - if (m_free_func) - m_free_func(m_begin); - else - delete[] m_begin; - m_begin = previous_begin; - } - init(); - } - - //! Sets or resets the user-defined memory allocation functions for the pool. - //! This can only be called when no memory is allocated from the pool yet, otherwise results are undefined. - //! Allocation function must not return invalid pointer on failure. It should either throw, - //! stop the program, or use longjmp() function to pass control to other place of program. - //! If it returns invalid pointer, results are undefined. - //!

- //! User defined allocation functions must have the following forms: - //!
- //!
void *allocate(std::size_t size); - //!
void free(void *pointer); - //!

- //! \param af Allocation function, or 0 to restore default function - //! \param ff Free function, or 0 to restore default function - void set_allocator(alloc_func *af, free_func *ff) - { - assert(m_begin == m_static_memory && m_ptr == align(m_begin)); // Verify that no memory is allocated yet - m_alloc_func = af; - m_free_func = ff; - } - - private: - - struct header - { - char *previous_begin; - }; - - void init() - { - m_begin = m_static_memory; - m_ptr = align(m_begin); - m_end = m_static_memory + sizeof(m_static_memory); - } - - char *align(char *ptr) - { - std::size_t alignment = ((RAPIDXML_ALIGNMENT - (std::size_t(ptr) & (RAPIDXML_ALIGNMENT - 1))) & (RAPIDXML_ALIGNMENT - 1)); - return ptr + alignment; - } - - char *allocate_raw(std::size_t size) - { - // Allocate - void *memory; - if (m_alloc_func) // Allocate memory using either user-specified allocation function or global operator new[] - { - memory = m_alloc_func(size); - assert(memory); // Allocator is not allowed to return 0, on failure it must either throw, stop the program or use longjmp - } - else - { - memory = new char[size]; -#ifdef RAPIDXML_NO_EXCEPTIONS - if (!memory) // If exceptions are disabled, verify memory allocation, because new will not be able to throw bad_alloc - RAPIDXML_PARSE_ERROR("out of memory", 0); -#endif - } - return static_cast(memory); - } - - void *allocate_aligned(std::size_t size) - { - // Calculate aligned pointer - char *result = align(m_ptr); - - // If not enough memory left in current pool, allocate a new pool - if (result + size > m_end) - { - // Calculate required pool size (may be bigger than RAPIDXML_DYNAMIC_POOL_SIZE) - std::size_t pool_size = RAPIDXML_DYNAMIC_POOL_SIZE; - if (pool_size < size) - pool_size = size; - - // Allocate - std::size_t alloc_size = sizeof(header) + (2 * RAPIDXML_ALIGNMENT - 2) + pool_size; // 2 alignments required in worst case: one for header, one for actual allocation - char *raw_memory = allocate_raw(alloc_size); - - // Setup new pool in allocated memory - char *pool = align(raw_memory); - header *new_header = reinterpret_cast
(pool); - new_header->previous_begin = m_begin; - m_begin = raw_memory; - m_ptr = pool + sizeof(header); - m_end = raw_memory + alloc_size; - - // Calculate aligned pointer again using new pool - result = align(m_ptr); - } - - // Update pool and return aligned pointer - m_ptr = result + size; - return result; - } - - char *m_begin; // Start of raw memory making up current pool - char *m_ptr; // First free byte in current pool - char *m_end; // One past last available byte in current pool - char m_static_memory[RAPIDXML_STATIC_POOL_SIZE]; // Static raw memory - alloc_func *m_alloc_func; // Allocator function, or 0 if default is to be used - free_func *m_free_func; // Free function, or 0 if default is to be used - }; - - /////////////////////////////////////////////////////////////////////////// - // XML base - - //! Base class for xml_node and xml_attribute implementing common functions: - //! name(), name_size(), value(), value_size() and parent(). - //! \param Ch Character type to use - template - class xml_base - { - - public: - - /////////////////////////////////////////////////////////////////////////// - // Construction & destruction - - // Construct a base with empty name, value and parent - xml_base() - : m_name(0) - , m_value(0) - , m_parent(0) - { - } - - /////////////////////////////////////////////////////////////////////////// - // Node data access - - //! Gets name of the node. - //! Interpretation of name depends on type of node. - //! Note that name will not be zero-terminated if rapidxml::parse_no_string_terminators option was selected during parse. - //!

- //! Use name_size() function to determine length of the name. - //! \return Name of node, or empty string if node has no name. - Ch *name() const - { - return m_name ? m_name : nullstr(); - } - - //! Gets size of node name, not including terminator character. - //! This function works correctly irrespective of whether name is or is not zero terminated. - //! \return Size of node name, in characters. - std::size_t name_size() const - { - return m_name ? m_name_size : 0; - } - - //! Gets value of node. - //! Interpretation of value depends on type of node. - //! Note that value will not be zero-terminated if rapidxml::parse_no_string_terminators option was selected during parse. - //!

- //! Use value_size() function to determine length of the value. - //! \return Value of node, or empty string if node has no value. - Ch *value() const - { - return m_value ? m_value : nullstr(); - } - - //! Gets size of node value, not including terminator character. - //! This function works correctly irrespective of whether value is or is not zero terminated. - //! \return Size of node value, in characters. - std::size_t value_size() const - { - return m_value ? m_value_size : 0; - } - - /////////////////////////////////////////////////////////////////////////// - // Node modification - - //! Sets name of node to a non zero-terminated string. - //! See \ref ownership_of_strings. - //!

- //! Note that node does not own its name or value, it only stores a pointer to it. - //! It will not delete or otherwise free the pointer on destruction. - //! It is reponsibility of the user to properly manage lifetime of the string. - //! The easiest way to achieve it is to use memory_pool of the document to allocate the string - - //! on destruction of the document the string will be automatically freed. - //!

- //! Size of name must be specified separately, because name does not have to be zero terminated. - //! Use name(const Ch *) function to have the length automatically calculated (string must be zero terminated). - //! \param name Name of node to set. Does not have to be zero terminated. - //! \param size Size of name, in characters. This does not include zero terminator, if one is present. - void name(const Ch *name, std::size_t size) - { - m_name = const_cast(name); - m_name_size = size; - } - - //! Sets name of node to a zero-terminated string. - //! See also \ref ownership_of_strings and xml_node::name(const Ch *, std::size_t). - //! \param name Name of node to set. Must be zero terminated. - void name(const Ch *name) - { - this->name(name, internal::measure(name)); - } - - //! Sets value of node to a non zero-terminated string. - //! See \ref ownership_of_strings. - //!

- //! Note that node does not own its name or value, it only stores a pointer to it. - //! It will not delete or otherwise free the pointer on destruction. - //! It is reponsibility of the user to properly manage lifetime of the string. - //! The easiest way to achieve it is to use memory_pool of the document to allocate the string - - //! on destruction of the document the string will be automatically freed. - //!

- //! Size of value must be specified separately, because it does not have to be zero terminated. - //! Use value(const Ch *) function to have the length automatically calculated (string must be zero terminated). - //!

- //! If an element has a child node of type node_data, it will take precedence over element value when printing. - //! If you want to manipulate data of elements using values, use parser flag rapidxml::parse_no_data_nodes to prevent creation of data nodes by the parser. - //! \param value value of node to set. Does not have to be zero terminated. - //! \param size Size of value, in characters. This does not include zero terminator, if one is present. - void value(const Ch *value, std::size_t size) - { - m_value = const_cast(value); - m_value_size = size; - } - - //! Sets value of node to a zero-terminated string. - //! See also \ref ownership_of_strings and xml_node::value(const Ch *, std::size_t). - //! \param value Vame of node to set. Must be zero terminated. - void value(const Ch *value) - { - this->value(value, internal::measure(value)); - } - - /////////////////////////////////////////////////////////////////////////// - // Related nodes access - - //! Gets node parent. - //! \return Pointer to parent node, or 0 if there is no parent. - xml_node *parent() const - { - return m_parent; - } - - protected: - - // Return empty string - static Ch *nullstr() - { - static Ch zero = Ch('\0'); - return &zero; - } - - Ch *m_name; // Name of node, or 0 if no name - Ch *m_value; // Value of node, or 0 if no value - std::size_t m_name_size; // Length of node name, or undefined of no name - std::size_t m_value_size; // Length of node value, or undefined if no value - xml_node *m_parent; // Pointer to parent node, or 0 if none - - }; - - //! Class representing attribute node of XML document. - //! Each attribute has name and value strings, which are available through name() and value() functions (inherited from xml_base). - //! Note that after parse, both name and value of attribute will point to interior of source text used for parsing. - //! Thus, this text must persist in memory for the lifetime of attribute. - //! \param Ch Character type to use. - template - class xml_attribute: public xml_base - { - - friend class xml_node; - - public: - - /////////////////////////////////////////////////////////////////////////// - // Construction & destruction - - //! Constructs an empty attribute with the specified type. - //! Consider using memory_pool of appropriate xml_document if allocating attributes manually. - xml_attribute() - { - } - - /////////////////////////////////////////////////////////////////////////// - // Related nodes access - - //! Gets document of which attribute is a child. - //! \return Pointer to document that contains this attribute, or 0 if there is no parent document. - xml_document *document() const - { - if (xml_node *node = this->parent()) - { - while (node->parent()) - node = node->parent(); - return node->type() == node_document ? static_cast *>(node) : 0; - } - else - return 0; - } - - //! Gets previous attribute, optionally matching attribute name. - //! \param name Name of attribute to find, or 0 to return previous attribute regardless of its name; this string doesn't have to be zero-terminated if name_size is non-zero - //! \param name_size Size of name, in characters, or 0 to have size calculated automatically from string - //! \param case_sensitive Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters - //! \return Pointer to found attribute, or 0 if not found. - xml_attribute *previous_attribute(const Ch *name = 0, std::size_t name_size = 0, bool case_sensitive = true) const - { - if (name) - { - if (name_size == 0) - name_size = internal::measure(name); - for (xml_attribute *attribute = m_prev_attribute; attribute; attribute = attribute->m_prev_attribute) - if (internal::compare(attribute->name(), attribute->name_size(), name, name_size, case_sensitive)) - return attribute; - return 0; - } - else - return this->m_parent ? m_prev_attribute : 0; - } - - //! Gets next attribute, optionally matching attribute name. - //! \param name Name of attribute to find, or 0 to return next attribute regardless of its name; this string doesn't have to be zero-terminated if name_size is non-zero - //! \param name_size Size of name, in characters, or 0 to have size calculated automatically from string - //! \param case_sensitive Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters - //! \return Pointer to found attribute, or 0 if not found. - xml_attribute *next_attribute(const Ch *name = 0, std::size_t name_size = 0, bool case_sensitive = true) const - { - if (name) - { - if (name_size == 0) - name_size = internal::measure(name); - for (xml_attribute *attribute = m_next_attribute; attribute; attribute = attribute->m_next_attribute) - if (internal::compare(attribute->name(), attribute->name_size(), name, name_size, case_sensitive)) - return attribute; - return 0; - } - else - return this->m_parent ? m_next_attribute : 0; - } - - private: - - xml_attribute *m_prev_attribute; // Pointer to previous sibling of attribute, or 0 if none; only valid if parent is non-zero - xml_attribute *m_next_attribute; // Pointer to next sibling of attribute, or 0 if none; only valid if parent is non-zero - - }; - - /////////////////////////////////////////////////////////////////////////// - // XML node - - //! Class representing a node of XML document. - //! Each node may have associated name and value strings, which are available through name() and value() functions. - //! Interpretation of name and value depends on type of the node. - //! Type of node can be determined by using type() function. - //!

- //! Note that after parse, both name and value of node, if any, will point interior of source text used for parsing. - //! Thus, this text must persist in the memory for the lifetime of node. - //! \param Ch Character type to use. - template - class xml_node: public xml_base - { - - public: - - /////////////////////////////////////////////////////////////////////////// - // Construction & destruction - - //! Constructs an empty node with the specified type. - //! Consider using memory_pool of appropriate document to allocate nodes manually. - //! \param type Type of node to construct. - xml_node(node_type type) - : m_type(type) - , m_first_node(0) - , m_first_attribute(0) - { - } - - /////////////////////////////////////////////////////////////////////////// - // Node data access - - //! Gets type of node. - //! \return Type of node. - node_type type() const - { - return m_type; - } - - /////////////////////////////////////////////////////////////////////////// - // Related nodes access - - //! Gets document of which node is a child. - //! \return Pointer to document that contains this node, or 0 if there is no parent document. - xml_document *document() const - { - xml_node *node = const_cast *>(this); - while (node->parent()) - node = node->parent(); - return node->type() == node_document ? static_cast *>(node) : 0; - } - - //! Gets first child node, optionally matching node name. - //! \param name Name of child to find, or 0 to return first child regardless of its name; this string doesn't have to be zero-terminated if name_size is non-zero - //! \param name_size Size of name, in characters, or 0 to have size calculated automatically from string - //! \param case_sensitive Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters - //! \return Pointer to found child, or 0 if not found. - xml_node *first_node(const Ch *name = 0, std::size_t name_size = 0, bool case_sensitive = true) const - { - if (name) - { - if (name_size == 0) - name_size = internal::measure(name); - for (xml_node *child = m_first_node; child; child = child->next_sibling()) - if (internal::compare(child->name(), child->name_size(), name, name_size, case_sensitive)) - return child; - return 0; - } - else - return m_first_node; - } - - //! Gets last child node, optionally matching node name. - //! Behaviour is undefined if node has no children. - //! Use first_node() to test if node has children. - //! \param name Name of child to find, or 0 to return last child regardless of its name; this string doesn't have to be zero-terminated if name_size is non-zero - //! \param name_size Size of name, in characters, or 0 to have size calculated automatically from string - //! \param case_sensitive Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters - //! \return Pointer to found child, or 0 if not found. - xml_node *last_node(const Ch *name = 0, std::size_t name_size = 0, bool case_sensitive = true) const - { - assert(m_first_node); // Cannot query for last child if node has no children - if (name) - { - if (name_size == 0) - name_size = internal::measure(name); - for (xml_node *child = m_last_node; child; child = child->previous_sibling()) - if (internal::compare(child->name(), child->name_size(), name, name_size, case_sensitive)) - return child; - return 0; - } - else - return m_last_node; - } - - //! Gets previous sibling node, optionally matching node name. - //! Behaviour is undefined if node has no parent. - //! Use parent() to test if node has a parent. - //! \param name Name of sibling to find, or 0 to return previous sibling regardless of its name; this string doesn't have to be zero-terminated if name_size is non-zero - //! \param name_size Size of name, in characters, or 0 to have size calculated automatically from string - //! \param case_sensitive Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters - //! \return Pointer to found sibling, or 0 if not found. - xml_node *previous_sibling(const Ch *name = 0, std::size_t name_size = 0, bool case_sensitive = true) const - { - assert(this->m_parent); // Cannot query for siblings if node has no parent - if (name) - { - if (name_size == 0) - name_size = internal::measure(name); - for (xml_node *sibling = m_prev_sibling; sibling; sibling = sibling->m_prev_sibling) - if (internal::compare(sibling->name(), sibling->name_size(), name, name_size, case_sensitive)) - return sibling; - return 0; - } - else - return m_prev_sibling; - } - - //! Gets next sibling node, optionally matching node name. - //! Behaviour is undefined if node has no parent. - //! Use parent() to test if node has a parent. - //! \param name Name of sibling to find, or 0 to return next sibling regardless of its name; this string doesn't have to be zero-terminated if name_size is non-zero - //! \param name_size Size of name, in characters, or 0 to have size calculated automatically from string - //! \param case_sensitive Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters - //! \return Pointer to found sibling, or 0 if not found. - xml_node *next_sibling(const Ch *name = 0, std::size_t name_size = 0, bool case_sensitive = true) const - { - assert(this->m_parent); // Cannot query for siblings if node has no parent - if (name) - { - if (name_size == 0) - name_size = internal::measure(name); - for (xml_node *sibling = m_next_sibling; sibling; sibling = sibling->m_next_sibling) - if (internal::compare(sibling->name(), sibling->name_size(), name, name_size, case_sensitive)) - return sibling; - return 0; - } - else - return m_next_sibling; - } - - //! Gets first attribute of node, optionally matching attribute name. - //! \param name Name of attribute to find, or 0 to return first attribute regardless of its name; this string doesn't have to be zero-terminated if name_size is non-zero - //! \param name_size Size of name, in characters, or 0 to have size calculated automatically from string - //! \param case_sensitive Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters - //! \return Pointer to found attribute, or 0 if not found. - xml_attribute *first_attribute(const Ch *name = 0, std::size_t name_size = 0, bool case_sensitive = true) const - { - if (name) - { - if (name_size == 0) - name_size = internal::measure(name); - for (xml_attribute *attribute = m_first_attribute; attribute; attribute = attribute->m_next_attribute) - if (internal::compare(attribute->name(), attribute->name_size(), name, name_size, case_sensitive)) - return attribute; - return 0; - } - else - return m_first_attribute; - } - - //! Gets last attribute of node, optionally matching attribute name. - //! \param name Name of attribute to find, or 0 to return last attribute regardless of its name; this string doesn't have to be zero-terminated if name_size is non-zero - //! \param name_size Size of name, in characters, or 0 to have size calculated automatically from string - //! \param case_sensitive Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters - //! \return Pointer to found attribute, or 0 if not found. - xml_attribute *last_attribute(const Ch *name = 0, std::size_t name_size = 0, bool case_sensitive = true) const - { - if (name) - { - if (name_size == 0) - name_size = internal::measure(name); - for (xml_attribute *attribute = m_last_attribute; attribute; attribute = attribute->m_prev_attribute) - if (internal::compare(attribute->name(), attribute->name_size(), name, name_size, case_sensitive)) - return attribute; - return 0; - } - else - return m_first_attribute ? m_last_attribute : 0; - } - - /////////////////////////////////////////////////////////////////////////// - // Node modification - - //! Sets type of node. - //! \param type Type of node to set. - void type(node_type type) - { - m_type = type; - } - - /////////////////////////////////////////////////////////////////////////// - // Node manipulation - - //! Prepends a new child node. - //! The prepended child becomes the first child, and all existing children are moved one position back. - //! \param child Node to prepend. - void prepend_node(xml_node *child) - { - assert(child && !child->parent() && child->type() != node_document); - if (first_node()) - { - child->m_next_sibling = m_first_node; - m_first_node->m_prev_sibling = child; - } - else - { - child->m_next_sibling = 0; - m_last_node = child; - } - m_first_node = child; - child->m_parent = this; - child->m_prev_sibling = 0; - } - - //! Appends a new child node. - //! The appended child becomes the last child. - //! \param child Node to append. - void append_node(xml_node *child) - { - assert(child && !child->parent() && child->type() != node_document); - if (first_node()) - { - child->m_prev_sibling = m_last_node; - m_last_node->m_next_sibling = child; - } - else - { - child->m_prev_sibling = 0; - m_first_node = child; - } - m_last_node = child; - child->m_parent = this; - child->m_next_sibling = 0; - } - - //! Inserts a new child node at specified place inside the node. - //! All children after and including the specified node are moved one position back. - //! \param where Place where to insert the child, or 0 to insert at the back. - //! \param child Node to insert. - void insert_node(xml_node *where, xml_node *child) - { - assert(!where || where->parent() == this); - assert(child && !child->parent() && child->type() != node_document); - if (where == m_first_node) - prepend_node(child); - else if (where == 0) - append_node(child); - else - { - child->m_prev_sibling = where->m_prev_sibling; - child->m_next_sibling = where; - where->m_prev_sibling->m_next_sibling = child; - where->m_prev_sibling = child; - child->m_parent = this; - } - } - - //! Removes first child node. - //! If node has no children, behaviour is undefined. - //! Use first_node() to test if node has children. - void remove_first_node() - { - assert(first_node()); - xml_node *child = m_first_node; - m_first_node = child->m_next_sibling; - if (child->m_next_sibling) - child->m_next_sibling->m_prev_sibling = 0; - else - m_last_node = 0; - child->m_parent = 0; - } - - //! Removes last child of the node. - //! If node has no children, behaviour is undefined. - //! Use first_node() to test if node has children. - void remove_last_node() - { - assert(first_node()); - xml_node *child = m_last_node; - if (child->m_prev_sibling) - { - m_last_node = child->m_prev_sibling; - child->m_prev_sibling->m_next_sibling = 0; - } - else - m_first_node = 0; - child->m_parent = 0; - } - - //! Removes specified child from the node - // \param where Pointer to child to be removed. - void remove_node(xml_node *where) - { - assert(where && where->parent() == this); - assert(first_node()); - if (where == m_first_node) - remove_first_node(); - else if (where == m_last_node) - remove_last_node(); - else - { - where->m_prev_sibling->m_next_sibling = where->m_next_sibling; - where->m_next_sibling->m_prev_sibling = where->m_prev_sibling; - where->m_parent = 0; - } - } - - //! Removes all child nodes (but not attributes). - void remove_all_nodes() - { - for (xml_node *node = first_node(); node; node = node->m_next_sibling) - node->m_parent = 0; - m_first_node = 0; - } - - //! Prepends a new attribute to the node. - //! \param attribute Attribute to prepend. - void prepend_attribute(xml_attribute *attribute) - { - assert(attribute && !attribute->parent()); - if (first_attribute()) - { - attribute->m_next_attribute = m_first_attribute; - m_first_attribute->m_prev_attribute = attribute; - } - else - { - attribute->m_next_attribute = 0; - m_last_attribute = attribute; - } - m_first_attribute = attribute; - attribute->m_parent = this; - attribute->m_prev_attribute = 0; - } - - //! Appends a new attribute to the node. - //! \param attribute Attribute to append. - void append_attribute(xml_attribute *attribute) - { - assert(attribute && !attribute->parent()); - if (first_attribute()) - { - attribute->m_prev_attribute = m_last_attribute; - m_last_attribute->m_next_attribute = attribute; - } - else - { - attribute->m_prev_attribute = 0; - m_first_attribute = attribute; - } - m_last_attribute = attribute; - attribute->m_parent = this; - attribute->m_next_attribute = 0; - } - - //! Inserts a new attribute at specified place inside the node. - //! All attributes after and including the specified attribute are moved one position back. - //! \param where Place where to insert the attribute, or 0 to insert at the back. - //! \param attribute Attribute to insert. - void insert_attribute(xml_attribute *where, xml_attribute *attribute) - { - assert(!where || where->parent() == this); - assert(attribute && !attribute->parent()); - if (where == m_first_attribute) - prepend_attribute(attribute); - else if (where == 0) - append_attribute(attribute); - else - { - attribute->m_prev_attribute = where->m_prev_attribute; - attribute->m_next_attribute = where; - where->m_prev_attribute->m_next_attribute = attribute; - where->m_prev_attribute = attribute; - attribute->m_parent = this; - } - } - - //! Removes first attribute of the node. - //! If node has no attributes, behaviour is undefined. - //! Use first_attribute() to test if node has attributes. - void remove_first_attribute() - { - assert(first_attribute()); - xml_attribute *attribute = m_first_attribute; - if (attribute->m_next_attribute) - { - attribute->m_next_attribute->m_prev_attribute = 0; - } - else - m_last_attribute = 0; - attribute->m_parent = 0; - m_first_attribute = attribute->m_next_attribute; - } - - //! Removes last attribute of the node. - //! If node has no attributes, behaviour is undefined. - //! Use first_attribute() to test if node has attributes. - void remove_last_attribute() - { - assert(first_attribute()); - xml_attribute *attribute = m_last_attribute; - if (attribute->m_prev_attribute) - { - attribute->m_prev_attribute->m_next_attribute = 0; - m_last_attribute = attribute->m_prev_attribute; - } - else - m_first_attribute = 0; - attribute->m_parent = 0; - } - - //! Removes specified attribute from node. - //! \param where Pointer to attribute to be removed. - void remove_attribute(xml_attribute *where) - { - assert(first_attribute() && where->parent() == this); - if (where == m_first_attribute) - remove_first_attribute(); - else if (where == m_last_attribute) - remove_last_attribute(); - else - { - where->m_prev_attribute->m_next_attribute = where->m_next_attribute; - where->m_next_attribute->m_prev_attribute = where->m_prev_attribute; - where->m_parent = 0; - } - } - - //! Removes all attributes of node. - void remove_all_attributes() - { - for (xml_attribute *attribute = first_attribute(); attribute; attribute = attribute->m_next_attribute) - attribute->m_parent = 0; - m_first_attribute = 0; - } - - private: - - /////////////////////////////////////////////////////////////////////////// - // Restrictions - - // No copying - xml_node(const xml_node &); - void operator =(const xml_node &); - - /////////////////////////////////////////////////////////////////////////// - // Data members - - // Note that some of the pointers below have UNDEFINED values if certain other pointers are 0. - // This is required for maximum performance, as it allows the parser to omit initialization of - // unneded/redundant values. - // - // The rules are as follows: - // 1. first_node and first_attribute contain valid pointers, or 0 if node has no children/attributes respectively - // 2. last_node and last_attribute are valid only if node has at least one child/attribute respectively, otherwise they contain garbage - // 3. prev_sibling and next_sibling are valid only if node has a parent, otherwise they contain garbage - - node_type m_type; // Type of node; always valid - xml_node *m_first_node; // Pointer to first child node, or 0 if none; always valid - xml_node *m_last_node; // Pointer to last child node, or 0 if none; this value is only valid if m_first_node is non-zero - xml_attribute *m_first_attribute; // Pointer to first attribute of node, or 0 if none; always valid - xml_attribute *m_last_attribute; // Pointer to last attribute of node, or 0 if none; this value is only valid if m_first_attribute is non-zero - xml_node *m_prev_sibling; // Pointer to previous sibling of node, or 0 if none; this value is only valid if m_parent is non-zero - xml_node *m_next_sibling; // Pointer to next sibling of node, or 0 if none; this value is only valid if m_parent is non-zero - - }; - - /////////////////////////////////////////////////////////////////////////// - // XML document - - //! This class represents root of the DOM hierarchy. - //! It is also an xml_node and a memory_pool through public inheritance. - //! Use parse() function to build a DOM tree from a zero-terminated XML text string. - //! parse() function allocates memory for nodes and attributes by using functions of xml_document, - //! which are inherited from memory_pool. - //! To access root node of the document, use the document itself, as if it was an xml_node. - //! \param Ch Character type to use. - template - class xml_document: public xml_node, public memory_pool - { - - public: - - //! Constructs empty XML document - xml_document() - : xml_node(node_document) - { - } - - //! Parses zero-terminated XML string according to given flags. - //! Passed string will be modified by the parser, unless rapidxml::parse_non_destructive flag is used. - //! The string must persist for the lifetime of the document. - //! In case of error, rapidxml::parse_error exception will be thrown. - //!

- //! If you want to parse contents of a file, you must first load the file into the memory, and pass pointer to its beginning. - //! Make sure that data is zero-terminated. - //!

- //! Document can be parsed into multiple times. - //! Each new call to parse removes previous nodes and attributes (if any), but does not clear memory pool. - //! \param text XML data to parse; pointer is non-const to denote fact that this data may be modified by the parser. - template - void parse(Ch *text) - { - assert(text); - - // Remove current contents - this->remove_all_nodes(); - this->remove_all_attributes(); - - // Parse BOM, if any - parse_bom(text); - - // Parse children - while (1) - { - // Skip whitespace before node - skip(text); - if (*text == 0) - break; - - // Parse and append new child - if (*text == Ch('<')) - { - ++text; // Skip '<' - if (xml_node *node = parse_node(text)) - this->append_node(node); - } - else - RAPIDXML_PARSE_ERROR("expected <", text); - } - - } - - //! Clears the document by deleting all nodes and clearing the memory pool. - //! All nodes owned by document pool are destroyed. - void clear() - { - this->remove_all_nodes(); - this->remove_all_attributes(); - memory_pool::clear(); - } - - private: - - /////////////////////////////////////////////////////////////////////// - // Internal character utility functions - - // Detect whitespace character - struct whitespace_pred - { - static unsigned char test(Ch ch) - { - return internal::lookup_tables<0>::lookup_whitespace[static_cast(ch)]; - } - }; - - // Detect node name character - struct node_name_pred - { - static unsigned char test(Ch ch) - { - return internal::lookup_tables<0>::lookup_node_name[static_cast(ch)]; - } - }; - - // Detect attribute name character - struct attribute_name_pred - { - static unsigned char test(Ch ch) - { - return internal::lookup_tables<0>::lookup_attribute_name[static_cast(ch)]; - } - }; - - // Detect text character (PCDATA) - struct text_pred - { - static unsigned char test(Ch ch) - { - return internal::lookup_tables<0>::lookup_text[static_cast(ch)]; - } - }; - - // Detect text character (PCDATA) that does not require processing - struct text_pure_no_ws_pred - { - static unsigned char test(Ch ch) - { - return internal::lookup_tables<0>::lookup_text_pure_no_ws[static_cast(ch)]; - } - }; - - // Detect text character (PCDATA) that does not require processing - struct text_pure_with_ws_pred - { - static unsigned char test(Ch ch) - { - return internal::lookup_tables<0>::lookup_text_pure_with_ws[static_cast(ch)]; - } - }; - - // Detect attribute value character - template - struct attribute_value_pred - { - static unsigned char test(Ch ch) - { - if (Quote == Ch('\'')) - return internal::lookup_tables<0>::lookup_attribute_data_1[static_cast(ch)]; - if (Quote == Ch('\"')) - return internal::lookup_tables<0>::lookup_attribute_data_2[static_cast(ch)]; - return 0; // Should never be executed, to avoid warnings on Comeau - } - }; - - // Detect attribute value character - template - struct attribute_value_pure_pred - { - static unsigned char test(Ch ch) - { - if (Quote == Ch('\'')) - return internal::lookup_tables<0>::lookup_attribute_data_1_pure[static_cast(ch)]; - if (Quote == Ch('\"')) - return internal::lookup_tables<0>::lookup_attribute_data_2_pure[static_cast(ch)]; - return 0; // Should never be executed, to avoid warnings on Comeau - } - }; - - // Insert coded character, using UTF8 or 8-bit ASCII - template - static void insert_coded_character(Ch *&text, unsigned long code) - { - if (Flags & parse_no_utf8) - { - // Insert 8-bit ASCII character - // Todo: possibly verify that code is less than 256 and use replacement char otherwise? - text[0] = static_cast(code); - text += 1; - } - else - { - // Insert UTF8 sequence - if (code < 0x80) // 1 byte sequence - { - text[0] = static_cast(code); - text += 1; - } - else if (code < 0x800) // 2 byte sequence - { - text[1] = static_cast((code | 0x80) & 0xBF); code >>= 6; - text[0] = static_cast(code | 0xC0); - text += 2; - } - else if (code < 0x10000) // 3 byte sequence - { - text[2] = static_cast((code | 0x80) & 0xBF); code >>= 6; - text[1] = static_cast((code | 0x80) & 0xBF); code >>= 6; - text[0] = static_cast(code | 0xE0); - text += 3; - } - else if (code < 0x110000) // 4 byte sequence - { - text[3] = static_cast((code | 0x80) & 0xBF); code >>= 6; - text[2] = static_cast((code | 0x80) & 0xBF); code >>= 6; - text[1] = static_cast((code | 0x80) & 0xBF); code >>= 6; - text[0] = static_cast(code | 0xF0); - text += 4; - } - else // Invalid, only codes up to 0x10FFFF are allowed in Unicode - { - RAPIDXML_PARSE_ERROR("invalid numeric character entity", text); - } - } - } - - // Skip characters until predicate evaluates to true - template - static void skip(Ch *&text) - { - Ch *tmp = text; - while (StopPred::test(*tmp)) - ++tmp; - text = tmp; - } - - // Skip characters until predicate evaluates to true while doing the following: - // - replacing XML character entity references with proper characters (' & " < > &#...;) - // - condensing whitespace sequences to single space character - template - static Ch *skip_and_expand_character_refs(Ch *&text) - { - // If entity translation, whitespace condense and whitespace trimming is disabled, use plain skip - if (Flags & parse_no_entity_translation && - !(Flags & parse_normalize_whitespace) && - !(Flags & parse_trim_whitespace)) - { - skip(text); - return text; - } - - // Use simple skip until first modification is detected - skip(text); - - // Use translation skip - Ch *src = text; - Ch *dest = src; - while (StopPred::test(*src)) - { - // If entity translation is enabled - if (!(Flags & parse_no_entity_translation)) - { - // Test if replacement is needed - if (src[0] == Ch('&')) - { - switch (src[1]) - { - - // & ' - case Ch('a'): - if (src[2] == Ch('m') && src[3] == Ch('p') && src[4] == Ch(';')) - { - *dest = Ch('&'); - ++dest; - src += 5; - continue; - } - if (src[2] == Ch('p') && src[3] == Ch('o') && src[4] == Ch('s') && src[5] == Ch(';')) - { - *dest = Ch('\''); - ++dest; - src += 6; - continue; - } - break; - - // " - case Ch('q'): - if (src[2] == Ch('u') && src[3] == Ch('o') && src[4] == Ch('t') && src[5] == Ch(';')) - { - *dest = Ch('"'); - ++dest; - src += 6; - continue; - } - break; - - // > - case Ch('g'): - if (src[2] == Ch('t') && src[3] == Ch(';')) - { - *dest = Ch('>'); - ++dest; - src += 4; - continue; - } - break; - - // < - case Ch('l'): - if (src[2] == Ch('t') && src[3] == Ch(';')) - { - *dest = Ch('<'); - ++dest; - src += 4; - continue; - } - break; - - // &#...; - assumes ASCII - case Ch('#'): - if (src[2] == Ch('x')) - { - unsigned long code = 0; - src += 3; // Skip &#x - while (1) - { - unsigned char digit = internal::lookup_tables<0>::lookup_digits[static_cast(*src)]; - if (digit == 0xFF) - break; - code = code * 16 + digit; - ++src; - } - insert_coded_character(dest, code); // Put character in output - } - else - { - unsigned long code = 0; - src += 2; // Skip &# - while (1) - { - unsigned char digit = internal::lookup_tables<0>::lookup_digits[static_cast(*src)]; - if (digit == 0xFF) - break; - code = code * 10 + digit; - ++src; - } - insert_coded_character(dest, code); // Put character in output - } - if (*src == Ch(';')) - ++src; - else - RAPIDXML_PARSE_ERROR("expected ;", src); - continue; - - // Something else - default: - // Ignore, just copy '&' verbatim - break; - - } - } - } - - // If whitespace condensing is enabled - if (Flags & parse_normalize_whitespace) - { - // Test if condensing is needed - if (whitespace_pred::test(*src)) - { - *dest = Ch(' '); ++dest; // Put single space in dest - ++src; // Skip first whitespace char - // Skip remaining whitespace chars - while (whitespace_pred::test(*src)) - ++src; - continue; - } - } - - // No replacement, only copy character - *dest++ = *src++; - - } - - // Return new end - text = src; - return dest; - - } - - /////////////////////////////////////////////////////////////////////// - // Internal parsing functions - - // Parse BOM, if any - template - void parse_bom(Ch *&text) - { - // UTF-8? - if (static_cast(text[0]) == 0xEF && - static_cast(text[1]) == 0xBB && - static_cast(text[2]) == 0xBF) - { - text += 3; // Skup utf-8 bom - } - } - - // Parse XML declaration ( - xml_node *parse_xml_declaration(Ch *&text) - { - // If parsing of declaration is disabled - if (!(Flags & parse_declaration_node)) - { - // Skip until end of declaration - while (text[0] != Ch('?') || text[1] != Ch('>')) - { - if (!text[0]) - RAPIDXML_PARSE_ERROR("unexpected end of data", text); - ++text; - } - text += 2; // Skip '?>' - return 0; - } - - // Create declaration - xml_node *declaration = this->allocate_node(node_declaration); - - // Skip whitespace before attributes or ?> - skip(text); - - // Parse declaration attributes - parse_node_attributes(text, declaration); - - // Skip ?> - if (text[0] != Ch('?') || text[1] != Ch('>')) - RAPIDXML_PARSE_ERROR("expected ?>", text); - text += 2; - - return declaration; - } - - // Parse XML comment (' - return 0; // Do not produce comment node - } - - // Remember value start - Ch *value = text; - - // Skip until end of comment - while (text[0] != Ch('-') || text[1] != Ch('-') || text[2] != Ch('>')) - { - if (!text[0]) - RAPIDXML_PARSE_ERROR("unexpected end of data", text); - ++text; - } - - // Create comment node - xml_node *comment = this->allocate_node(node_comment); - comment->value(value, text - value); - - // Place zero terminator after comment value - if (!(Flags & parse_no_string_terminators)) - *text = Ch('\0'); - - text += 3; // Skip '-->' - return comment; - } - - // Parse DOCTYPE - template - xml_node *parse_doctype(Ch *&text) - { - // Remember value start - Ch *value = text; - - // Skip to > - while (*text != Ch('>')) - { - // Determine character type - switch (*text) - { - - // If '[' encountered, scan for matching ending ']' using naive algorithm with depth - // This works for all W3C test files except for 2 most wicked - case Ch('['): - { - ++text; // Skip '[' - int depth = 1; - while (depth > 0) - { - switch (*text) - { - case Ch('['): ++depth; break; - case Ch(']'): --depth; break; - case 0: RAPIDXML_PARSE_ERROR("unexpected end of data", text); - } - ++text; - } - break; - } - - // Error on end of text - case Ch('\0'): - RAPIDXML_PARSE_ERROR("unexpected end of data", text); - - // Other character, skip it - default: - ++text; - - } - } - - // If DOCTYPE nodes enabled - if (Flags & parse_doctype_node) - { - // Create a new doctype node - xml_node *doctype = this->allocate_node(node_doctype); - doctype->value(value, text - value); - - // Place zero terminator after value - if (!(Flags & parse_no_string_terminators)) - *text = Ch('\0'); - - text += 1; // skip '>' - return doctype; - } - else - { - text += 1; // skip '>' - return 0; - } - - } - - // Parse PI - template - xml_node *parse_pi(Ch *&text) - { - // If creation of PI nodes is enabled - if (Flags & parse_pi_nodes) - { - // Create pi node - xml_node *pi = this->allocate_node(node_pi); - - // Extract PI target name - Ch *name = text; - skip(text); - if (text == name) - RAPIDXML_PARSE_ERROR("expected PI target", text); - pi->name(name, text - name); - - // Skip whitespace between pi target and pi - skip(text); - - // Remember start of pi - Ch *value = text; - - // Skip to '?>' - while (text[0] != Ch('?') || text[1] != Ch('>')) - { - if (*text == Ch('\0')) - RAPIDXML_PARSE_ERROR("unexpected end of data", text); - ++text; - } - - // Set pi value (verbatim, no entity expansion or whitespace normalization) - pi->value(value, text - value); - - // Place zero terminator after name and value - if (!(Flags & parse_no_string_terminators)) - { - pi->name()[pi->name_size()] = Ch('\0'); - pi->value()[pi->value_size()] = Ch('\0'); - } - - text += 2; // Skip '?>' - return pi; - } - else - { - // Skip to '?>' - while (text[0] != Ch('?') || text[1] != Ch('>')) - { - if (*text == Ch('\0')) - RAPIDXML_PARSE_ERROR("unexpected end of data", text); - ++text; - } - text += 2; // Skip '?>' - return 0; - } - } - - // Parse and append data - // Return character that ends data. - // This is necessary because this character might have been overwritten by a terminating 0 - template - Ch parse_and_append_data(xml_node *node, Ch *&text, Ch *contents_start) - { - // Backup to contents start if whitespace trimming is disabled - if (!(Flags & parse_trim_whitespace)) - text = contents_start; - - // Skip until end of data - Ch *value = text, *end; - if (Flags & parse_normalize_whitespace) - end = skip_and_expand_character_refs(text); - else - end = skip_and_expand_character_refs(text); - - // Trim trailing whitespace if flag is set; leading was already trimmed by whitespace skip after > - if (Flags & parse_trim_whitespace) - { - if (Flags & parse_normalize_whitespace) - { - // Whitespace is already condensed to single space characters by skipping function, so just trim 1 char off the end - if (*(end - 1) == Ch(' ')) - --end; - } - else - { - // Backup until non-whitespace character is found - while (whitespace_pred::test(*(end - 1))) - --end; - } - } - - // If characters are still left between end and value (this test is only necessary if normalization is enabled) - // Create new data node - if (!(Flags & parse_no_data_nodes)) - { - xml_node *data = this->allocate_node(node_data); - data->value(value, end - value); - node->append_node(data); - } - - // Add data to parent node if no data exists yet - if (!(Flags & parse_no_element_values)) - if (*node->value() == Ch('\0')) - node->value(value, end - value); - - // Place zero terminator after value - if (!(Flags & parse_no_string_terminators)) - { - Ch ch = *text; - *end = Ch('\0'); - return ch; // Return character that ends data; this is required because zero terminator overwritten it - } - - // Return character that ends data - return *text; - } - - // Parse CDATA - template - xml_node *parse_cdata(Ch *&text) - { - // If CDATA is disabled - if (Flags & parse_no_data_nodes) - { - // Skip until end of cdata - while (text[0] != Ch(']') || text[1] != Ch(']') || text[2] != Ch('>')) - { - if (!text[0]) - RAPIDXML_PARSE_ERROR("unexpected end of data", text); - ++text; - } - text += 3; // Skip ]]> - return 0; // Do not produce CDATA node - } - - // Skip until end of cdata - Ch *value = text; - while (text[0] != Ch(']') || text[1] != Ch(']') || text[2] != Ch('>')) - { - if (!text[0]) - RAPIDXML_PARSE_ERROR("unexpected end of data", text); - ++text; - } - - // Create new cdata node - xml_node *cdata = this->allocate_node(node_cdata); - cdata->value(value, text - value); - - // Place zero terminator after value - if (!(Flags & parse_no_string_terminators)) - *text = Ch('\0'); - - text += 3; // Skip ]]> - return cdata; - } - - // Parse element node - template - xml_node *parse_element(Ch *&text) - { - // Create element node - xml_node *element = this->allocate_node(node_element); - - // Extract element name - Ch *name = text; - skip(text); - if (text == name) - RAPIDXML_PARSE_ERROR("expected element name", text); - element->name(name, text - name); - - // Skip whitespace between element name and attributes or > - skip(text); - - // Parse attributes, if any - parse_node_attributes(text, element); - - // Determine ending type - if (*text == Ch('>')) - { - ++text; - parse_node_contents(text, element); - } - else if (*text == Ch('/')) - { - ++text; - if (*text != Ch('>')) - RAPIDXML_PARSE_ERROR("expected >", text); - ++text; - } - else - RAPIDXML_PARSE_ERROR("expected >", text); - - // Place zero terminator after name - if (!(Flags & parse_no_string_terminators)) - element->name()[element->name_size()] = Ch('\0'); - - // Return parsed element - return element; - } - - // Determine node type, and parse it - template - xml_node *parse_node(Ch *&text) - { - // Parse proper node type - switch (text[0]) - { - - // <... - default: - // Parse and append element node - return parse_element(text); - - // (text); - } - else - { - // Parse PI - return parse_pi(text); - } - - // (text); - } - break; - - // (text); - } - break; - - // (text); - } - - } // switch - - // Attempt to skip other, unrecognized node types starting with ')) - { - if (*text == 0) - RAPIDXML_PARSE_ERROR("unexpected end of data", text); - ++text; - } - ++text; // Skip '>' - return 0; // No node recognized - - } - } - - // Parse contents of the node - children, data etc. - template - void parse_node_contents(Ch *&text, xml_node *node) - { - // For all children and text - while (1) - { - // Skip whitespace between > and node contents - Ch *contents_start = text; // Store start of node contents before whitespace is skipped - skip(text); - Ch next_char = *text; - - // After data nodes, instead of continuing the loop, control jumps here. - // This is because zero termination inside parse_and_append_data() function - // would wreak havoc with the above code. - // Also, skipping whitespace after data nodes is unnecessary. - after_data_node: - - // Determine what comes next: node closing, child node, data node, or 0? - switch (next_char) - { - - // Node closing or child node - case Ch('<'): - if (text[1] == Ch('/')) - { - // Node closing - text += 2; // Skip '(text); - if (!internal::compare(node->name(), node->name_size(), closing_name, text - closing_name, true)) - RAPIDXML_PARSE_ERROR("invalid closing tag name", text); - } - else - { - // No validation, just skip name - skip(text); - } - // Skip remaining whitespace after node name - skip(text); - if (*text != Ch('>')) - RAPIDXML_PARSE_ERROR("expected >", text); - ++text; // Skip '>' - return; // Node closed, finished parsing contents - } - else - { - // Child node - ++text; // Skip '<' - if (xml_node *child = parse_node(text)) - node->append_node(child); - } - break; - - // End of data - error - case Ch('\0'): - RAPIDXML_PARSE_ERROR("unexpected end of data", text); - - // Data node - default: - next_char = parse_and_append_data(node, text, contents_start); - goto after_data_node; // Bypass regular processing after data nodes - - } - } - } - - // Parse XML attributes of the node - template - void parse_node_attributes(Ch *&text, xml_node *node) - { - // For all attributes - while (attribute_name_pred::test(*text)) - { - // Extract attribute name - Ch *name = text; - ++text; // Skip first character of attribute name - skip(text); - if (text == name) - RAPIDXML_PARSE_ERROR("expected attribute name", name); - - // Create new attribute - xml_attribute *attribute = this->allocate_attribute(); - attribute->name(name, text - name); - node->append_attribute(attribute); - - // Skip whitespace after attribute name - skip(text); - - // Skip = - if (*text != Ch('=')) - RAPIDXML_PARSE_ERROR("expected =", text); - ++text; - - // Add terminating zero after name - if (!(Flags & parse_no_string_terminators)) - attribute->name()[attribute->name_size()] = 0; - - // Skip whitespace after = - skip(text); - - // Skip quote and remember if it was ' or " - Ch quote = *text; - if (quote != Ch('\'') && quote != Ch('"')) - RAPIDXML_PARSE_ERROR("expected ' or \"", text); - ++text; - - // Extract attribute value and expand char refs in it - Ch *value = text, *end; - const int AttFlags = Flags & ~parse_normalize_whitespace; // No whitespace normalization in attributes - if (quote == Ch('\'')) - end = skip_and_expand_character_refs, attribute_value_pure_pred, AttFlags>(text); - else - end = skip_and_expand_character_refs, attribute_value_pure_pred, AttFlags>(text); - - // Set attribute value - attribute->value(value, end - value); - - // Make sure that end quote is present - if (*text != quote) - RAPIDXML_PARSE_ERROR("expected ' or \"", text); - ++text; // Skip quote - - // Add terminating zero after value - if (!(Flags & parse_no_string_terminators)) - attribute->value()[attribute->value_size()] = 0; - - // Skip whitespace after attribute value - skip(text); - } - } - - }; - - //! \cond internal - namespace internal - { - - // Whitespace (space \n \r \t) - template - const unsigned char lookup_tables::lookup_whitespace[256] = - { - // 0 1 2 3 4 5 6 7 8 9 A B C D E F - 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, // 0 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1 - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 2 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 3 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 4 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 5 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 6 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 7 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // A - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // B - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // C - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // D - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // E - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 // F - }; - - // Node name (anything but space \n \r \t / > ? \0) - template - const unsigned char lookup_tables::lookup_node_name[256] = - { - // 0 1 2 3 4 5 6 7 8 9 A B C D E F - 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, // 0 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 1 - 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, // 2 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, // 3 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 4 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 5 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 6 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 7 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 8 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 9 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // A - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // B - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // C - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // D - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // E - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // F - }; - - // Text (i.e. PCDATA) (anything but < \0) - template - const unsigned char lookup_tables::lookup_text[256] = - { - // 0 1 2 3 4 5 6 7 8 9 A B C D E F - 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 1 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 2 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, // 3 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 4 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 5 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 6 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 7 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 8 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 9 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // A - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // B - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // C - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // D - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // E - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // F - }; - - // Text (i.e. PCDATA) that does not require processing when ws normalization is disabled - // (anything but < \0 &) - template - const unsigned char lookup_tables::lookup_text_pure_no_ws[256] = - { - // 0 1 2 3 4 5 6 7 8 9 A B C D E F - 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 1 - 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 2 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, // 3 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 4 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 5 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 6 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 7 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 8 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 9 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // A - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // B - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // C - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // D - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // E - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // F - }; - - // Text (i.e. PCDATA) that does not require processing when ws normalizationis is enabled - // (anything but < \0 & space \n \r \t) - template - const unsigned char lookup_tables::lookup_text_pure_with_ws[256] = - { - // 0 1 2 3 4 5 6 7 8 9 A B C D E F - 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, // 0 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 1 - 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 2 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, // 3 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 4 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 5 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 6 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 7 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 8 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 9 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // A - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // B - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // C - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // D - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // E - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // F - }; - - // Attribute name (anything but space \n \r \t / < > = ? ! \0) - template - const unsigned char lookup_tables::lookup_attribute_name[256] = - { - // 0 1 2 3 4 5 6 7 8 9 A B C D E F - 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, // 0 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 1 - 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, // 2 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, // 3 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 4 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 5 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 6 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 7 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 8 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 9 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // A - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // B - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // C - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // D - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // E - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // F - }; - - // Attribute data with single quote (anything but ' \0) - template - const unsigned char lookup_tables::lookup_attribute_data_1[256] = - { - // 0 1 2 3 4 5 6 7 8 9 A B C D E F - 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 1 - 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, // 2 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 3 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 4 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 5 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 6 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 7 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 8 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 9 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // A - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // B - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // C - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // D - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // E - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // F - }; - - // Attribute data with single quote that does not require processing (anything but ' \0 &) - template - const unsigned char lookup_tables::lookup_attribute_data_1_pure[256] = - { - // 0 1 2 3 4 5 6 7 8 9 A B C D E F - 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 1 - 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, // 2 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 3 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 4 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 5 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 6 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 7 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 8 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 9 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // A - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // B - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // C - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // D - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // E - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // F - }; - - // Attribute data with double quote (anything but " \0) - template - const unsigned char lookup_tables::lookup_attribute_data_2[256] = - { - // 0 1 2 3 4 5 6 7 8 9 A B C D E F - 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 1 - 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 2 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 3 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 4 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 5 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 6 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 7 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 8 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 9 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // A - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // B - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // C - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // D - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // E - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // F - }; - - // Attribute data with double quote that does not require processing (anything but " \0 &) - template - const unsigned char lookup_tables::lookup_attribute_data_2_pure[256] = - { - // 0 1 2 3 4 5 6 7 8 9 A B C D E F - 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 1 - 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 2 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 3 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 4 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 5 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 6 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 7 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 8 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 9 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // A - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // B - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // C - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // D - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // E - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // F - }; - - // Digits (dec and hex, 255 denotes end of numeric character reference) - template - const unsigned char lookup_tables::lookup_digits[256] = - { - // 0 1 2 3 4 5 6 7 8 9 A B C D E F - 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // 0 - 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // 1 - 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // 2 - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,255,255,255,255,255,255, // 3 - 255, 10, 11, 12, 13, 14, 15,255,255,255,255,255,255,255,255,255, // 4 - 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // 5 - 255, 10, 11, 12, 13, 14, 15,255,255,255,255,255,255,255,255,255, // 6 - 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // 7 - 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // 8 - 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // 9 - 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // A - 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // B - 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // C - 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // D - 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // E - 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255 // F - }; - - // Upper case conversion - template - const unsigned char lookup_tables::lookup_upcase[256] = - { - // 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A B C D E F - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, // 0 - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, // 1 - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, // 2 - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, // 3 - 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, // 4 - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, // 5 - 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, // 6 - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 123,124,125,126,127, // 7 - 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143, // 8 - 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159, // 9 - 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175, // A - 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191, // B - 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207, // C - 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223, // D - 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239, // E - 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255 // F - }; - } - //! \endcond - -} - -// Undefine internal macros -#undef RAPIDXML_PARSE_ERROR - -// On MSVC, restore warnings state -#ifdef _MSC_VER - #pragma warning(pop) -#endif - -#endif +#ifndef RAPIDXML_HPP_INCLUDED +#define RAPIDXML_HPP_INCLUDED + +// Copyright (C) 2006, 2009 Marcin Kalicinski +// Version 1.13 +// Revision $DateTime: 2009/05/13 01:46:17 $ +//! \file rapidxml.hpp This file contains rapidxml parser and DOM implementation + +// If standard library is disabled, user must provide implementations of required functions and typedefs +#if !defined(RAPIDXML_NO_STDLIB) + #include // For std::size_t + #include // For assert + #include // For placement new +#endif + +// On MSVC, disable "conditional expression is constant" warning (level 4). +// This warning is almost impossible to avoid with certain types of templated code +#ifdef _MSC_VER + #pragma warning(push) + #pragma warning(disable:4127) // Conditional expression is constant +#endif + +/////////////////////////////////////////////////////////////////////////// +// RAPIDXML_PARSE_ERROR + +#if defined(RAPIDXML_NO_EXCEPTIONS) + +#define RAPIDXML_PARSE_ERROR(what, where) { parse_error_handler(what, where); assert(0); } + +namespace rapidxml +{ + //! When exceptions are disabled by defining RAPIDXML_NO_EXCEPTIONS, + //! this function is called to notify user about the error. + //! It must be defined by the user. + //!

+ //! This function cannot return. If it does, the results are undefined. + //!

+ //! A very simple definition might look like that: + //!
+    //! void %rapidxml::%parse_error_handler(const char *what, void *where)
+    //! {
+    //!     std::cout << "Parse error: " << what << "\n";
+    //!     std::abort();
+    //! }
+    //! 
+ //! \param what Human readable description of the error. + //! \param where Pointer to character data where error was detected. + void parse_error_handler(const char *what, void *where); +} + +#else + +#include // For std::exception + +#define RAPIDXML_PARSE_ERROR(what, where) throw parse_error(what, where) + +namespace rapidxml +{ + + //! Parse error exception. + //! This exception is thrown by the parser when an error occurs. + //! Use what() function to get human-readable error message. + //! Use where() function to get a pointer to position within source text where error was detected. + //!

+ //! If throwing exceptions by the parser is undesirable, + //! it can be disabled by defining RAPIDXML_NO_EXCEPTIONS macro before rapidxml.hpp is included. + //! This will cause the parser to call rapidxml::parse_error_handler() function instead of throwing an exception. + //! This function must be defined by the user. + //!

+ //! This class derives from std::exception class. + class parse_error: public std::exception + { + + public: + + //! Constructs parse error + parse_error(const char *what, void *where) + : m_what(what) + , m_where(where) + { + } + + //! Gets human readable description of error. + //! \return Pointer to null terminated description of the error. + virtual const char *what() const throw() + { + return m_what; + } + + //! Gets pointer to character data where error happened. + //! Ch should be the same as char type of xml_document that produced the error. + //! \return Pointer to location within the parsed string where error occured. + template + Ch *where() const + { + return reinterpret_cast(m_where); + } + + private: + + const char *m_what; + void *m_where; + + }; +} + +#endif + +/////////////////////////////////////////////////////////////////////////// +// Pool sizes + +#ifndef RAPIDXML_STATIC_POOL_SIZE + // Size of static memory block of memory_pool. + // Define RAPIDXML_STATIC_POOL_SIZE before including rapidxml.hpp if you want to override the default value. + // No dynamic memory allocations are performed by memory_pool until static memory is exhausted. + #define RAPIDXML_STATIC_POOL_SIZE (64 * 1024) +#endif + +#ifndef RAPIDXML_DYNAMIC_POOL_SIZE + // Size of dynamic memory block of memory_pool. + // Define RAPIDXML_DYNAMIC_POOL_SIZE before including rapidxml.hpp if you want to override the default value. + // After the static block is exhausted, dynamic blocks with approximately this size are allocated by memory_pool. + #define RAPIDXML_DYNAMIC_POOL_SIZE (64 * 1024) +#endif + +#ifndef RAPIDXML_ALIGNMENT + // Memory allocation alignment. + // Define RAPIDXML_ALIGNMENT before including rapidxml.hpp if you want to override the default value, which is the size of pointer. + // All memory allocations for nodes, attributes and strings will be aligned to this value. + // This must be a power of 2 and at least 1, otherwise memory_pool will not work. + #define RAPIDXML_ALIGNMENT sizeof(void *) +#endif + +namespace rapidxml +{ + // Forward declarations + template class xml_node; + template class xml_attribute; + template class xml_document; + + //! Enumeration listing all node types produced by the parser. + //! Use xml_node::type() function to query node type. + enum node_type + { + node_document, //!< A document node. Name and value are empty. + node_element, //!< An element node. Name contains element name. Value contains text of first data node. + node_data, //!< A data node. Name is empty. Value contains data text. + node_cdata, //!< A CDATA node. Name is empty. Value contains data text. + node_comment, //!< A comment node. Name is empty. Value contains comment text. + node_declaration, //!< A declaration node. Name and value are empty. Declaration parameters (version, encoding and standalone) are in node attributes. + node_doctype, //!< A DOCTYPE node. Name is empty. Value contains DOCTYPE text. + node_pi //!< A PI node. Name contains target. Value contains instructions. + }; + + /////////////////////////////////////////////////////////////////////// + // Parsing flags + + //! Parse flag instructing the parser to not create data nodes. + //! Text of first data node will still be placed in value of parent element, unless rapidxml::parse_no_element_values flag is also specified. + //! Can be combined with other flags by use of | operator. + //!

+ //! See xml_document::parse() function. + const int parse_no_data_nodes = 0x1; + + //! Parse flag instructing the parser to not use text of first data node as a value of parent element. + //! Can be combined with other flags by use of | operator. + //! Note that child data nodes of element node take precendence over its value when printing. + //! That is, if element has one or more child data nodes and a value, the value will be ignored. + //! Use rapidxml::parse_no_data_nodes flag to prevent creation of data nodes if you want to manipulate data using values of elements. + //!

+ //! See xml_document::parse() function. + const int parse_no_element_values = 0x2; + + //! Parse flag instructing the parser to not place zero terminators after strings in the source text. + //! By default zero terminators are placed, modifying source text. + //! Can be combined with other flags by use of | operator. + //!

+ //! See xml_document::parse() function. + const int parse_no_string_terminators = 0x4; + + //! Parse flag instructing the parser to not translate entities in the source text. + //! By default entities are translated, modifying source text. + //! Can be combined with other flags by use of | operator. + //!

+ //! See xml_document::parse() function. + const int parse_no_entity_translation = 0x8; + + //! Parse flag instructing the parser to disable UTF-8 handling and assume plain 8 bit characters. + //! By default, UTF-8 handling is enabled. + //! Can be combined with other flags by use of | operator. + //!

+ //! See xml_document::parse() function. + const int parse_no_utf8 = 0x10; + + //! Parse flag instructing the parser to create XML declaration node. + //! By default, declaration node is not created. + //! Can be combined with other flags by use of | operator. + //!

+ //! See xml_document::parse() function. + const int parse_declaration_node = 0x20; + + //! Parse flag instructing the parser to create comments nodes. + //! By default, comment nodes are not created. + //! Can be combined with other flags by use of | operator. + //!

+ //! See xml_document::parse() function. + const int parse_comment_nodes = 0x40; + + //! Parse flag instructing the parser to create DOCTYPE node. + //! By default, doctype node is not created. + //! Although W3C specification allows at most one DOCTYPE node, RapidXml will silently accept documents with more than one. + //! Can be combined with other flags by use of | operator. + //!

+ //! See xml_document::parse() function. + const int parse_doctype_node = 0x80; + + //! Parse flag instructing the parser to create PI nodes. + //! By default, PI nodes are not created. + //! Can be combined with other flags by use of | operator. + //!

+ //! See xml_document::parse() function. + const int parse_pi_nodes = 0x100; + + //! Parse flag instructing the parser to validate closing tag names. + //! If not set, name inside closing tag is irrelevant to the parser. + //! By default, closing tags are not validated. + //! Can be combined with other flags by use of | operator. + //!

+ //! See xml_document::parse() function. + const int parse_validate_closing_tags = 0x200; + + //! Parse flag instructing the parser to trim all leading and trailing whitespace of data nodes. + //! By default, whitespace is not trimmed. + //! This flag does not cause the parser to modify source text. + //! Can be combined with other flags by use of | operator. + //!

+ //! See xml_document::parse() function. + const int parse_trim_whitespace = 0x400; + + //! Parse flag instructing the parser to condense all whitespace runs of data nodes to a single space character. + //! Trimming of leading and trailing whitespace of data is controlled by rapidxml::parse_trim_whitespace flag. + //! By default, whitespace is not normalized. + //! If this flag is specified, source text will be modified. + //! Can be combined with other flags by use of | operator. + //!

+ //! See xml_document::parse() function. + const int parse_normalize_whitespace = 0x800; + + // Compound flags + + //! Parse flags which represent default behaviour of the parser. + //! This is always equal to 0, so that all other flags can be simply ored together. + //! Normally there is no need to inconveniently disable flags by anding with their negated (~) values. + //! This also means that meaning of each flag is a negation of the default setting. + //! For example, if flag name is rapidxml::parse_no_utf8, it means that utf-8 is enabled by default, + //! and using the flag will disable it. + //!

+ //! See xml_document::parse() function. + const int parse_default = 0; + + //! A combination of parse flags that forbids any modifications of the source text. + //! This also results in faster parsing. However, note that the following will occur: + //!
    + //!
  • names and values of nodes will not be zero terminated, you have to use xml_base::name_size() and xml_base::value_size() functions to determine where name and value ends
  • + //!
  • entities will not be translated
  • + //!
  • whitespace will not be normalized
  • + //!
+ //! See xml_document::parse() function. + const int parse_non_destructive = parse_no_string_terminators | parse_no_entity_translation; + + //! A combination of parse flags resulting in fastest possible parsing, without sacrificing important data. + //!

+ //! See xml_document::parse() function. + const int parse_fastest = parse_non_destructive | parse_no_data_nodes; + + //! A combination of parse flags resulting in largest amount of data being extracted. + //! This usually results in slowest parsing. + //!

+ //! See xml_document::parse() function. + const int parse_full = parse_declaration_node | parse_comment_nodes | parse_doctype_node | parse_pi_nodes | parse_validate_closing_tags; + + /////////////////////////////////////////////////////////////////////// + // Internals + + //! \cond internal + namespace internal + { + + // Struct that contains lookup tables for the parser + // It must be a template to allow correct linking (because it has static data members, which are defined in a header file). + template + struct lookup_tables + { + static const unsigned char lookup_whitespace[256]; // Whitespace table + static const unsigned char lookup_node_name[256]; // Node name table + static const unsigned char lookup_text[256]; // Text table + static const unsigned char lookup_text_pure_no_ws[256]; // Text table + static const unsigned char lookup_text_pure_with_ws[256]; // Text table + static const unsigned char lookup_attribute_name[256]; // Attribute name table + static const unsigned char lookup_attribute_data_1[256]; // Attribute data table with single quote + static const unsigned char lookup_attribute_data_1_pure[256]; // Attribute data table with single quote + static const unsigned char lookup_attribute_data_2[256]; // Attribute data table with double quotes + static const unsigned char lookup_attribute_data_2_pure[256]; // Attribute data table with double quotes + static const unsigned char lookup_digits[256]; // Digits + static const unsigned char lookup_upcase[256]; // To uppercase conversion table for ASCII characters + }; + + // Find length of the string + template + inline std::size_t measure(const Ch *p) + { + const Ch *tmp = p; + while (*tmp) + ++tmp; + return tmp - p; + } + + // Compare strings for equality + template + inline bool compare(const Ch *p1, std::size_t size1, const Ch *p2, std::size_t size2, bool case_sensitive) + { + if (size1 != size2) + return false; + if (case_sensitive) + { + for (const Ch *end = p1 + size1; p1 < end; ++p1, ++p2) + if (*p1 != *p2) + return false; + } + else + { + for (const Ch *end = p1 + size1; p1 < end; ++p1, ++p2) + if (lookup_tables<0>::lookup_upcase[static_cast(*p1)] != lookup_tables<0>::lookup_upcase[static_cast(*p2)]) + return false; + } + return true; + } + } + //! \endcond + + /////////////////////////////////////////////////////////////////////// + // Memory pool + + //! This class is used by the parser to create new nodes and attributes, without overheads of dynamic memory allocation. + //! In most cases, you will not need to use this class directly. + //! However, if you need to create nodes manually or modify names/values of nodes, + //! you are encouraged to use memory_pool of relevant xml_document to allocate the memory. + //! Not only is this faster than allocating them by using new operator, + //! but also their lifetime will be tied to the lifetime of document, + //! possibly simplyfing memory management. + //!

+ //! Call allocate_node() or allocate_attribute() functions to obtain new nodes or attributes from the pool. + //! You can also call allocate_string() function to allocate strings. + //! Such strings can then be used as names or values of nodes without worrying about their lifetime. + //! Note that there is no free() function -- all allocations are freed at once when clear() function is called, + //! or when the pool is destroyed. + //!

+ //! It is also possible to create a standalone memory_pool, and use it + //! to allocate nodes, whose lifetime will not be tied to any document. + //!

+ //! Pool maintains RAPIDXML_STATIC_POOL_SIZE bytes of statically allocated memory. + //! Until static memory is exhausted, no dynamic memory allocations are done. + //! When static memory is exhausted, pool allocates additional blocks of memory of size RAPIDXML_DYNAMIC_POOL_SIZE each, + //! by using global new[] and delete[] operators. + //! This behaviour can be changed by setting custom allocation routines. + //! Use set_allocator() function to set them. + //!

+ //! Allocations for nodes, attributes and strings are aligned at RAPIDXML_ALIGNMENT bytes. + //! This value defaults to the size of pointer on target architecture. + //!

+ //! To obtain absolutely top performance from the parser, + //! it is important that all nodes are allocated from a single, contiguous block of memory. + //! Otherwise, cache misses when jumping between two (or more) disjoint blocks of memory can slow down parsing quite considerably. + //! If required, you can tweak RAPIDXML_STATIC_POOL_SIZE, RAPIDXML_DYNAMIC_POOL_SIZE and RAPIDXML_ALIGNMENT + //! to obtain best wasted memory to performance compromise. + //! To do it, define their values before rapidxml.hpp file is included. + //! \param Ch Character type of created nodes. + template + class memory_pool + { + + public: + + //! \cond internal + typedef void *(alloc_func)(std::size_t); // Type of user-defined function used to allocate memory + typedef void (free_func)(void *); // Type of user-defined function used to free memory + //! \endcond + + //! Constructs empty pool with default allocator functions. + memory_pool() + : m_alloc_func(0) + , m_free_func(0) + { + init(); + } + + //! Destroys pool and frees all the memory. + //! This causes memory occupied by nodes allocated by the pool to be freed. + //! Nodes allocated from the pool are no longer valid. + ~memory_pool() + { + clear(); + } + + //! Allocates a new node from the pool, and optionally assigns name and value to it. + //! If the allocation request cannot be accomodated, this function will throw std::bad_alloc. + //! If exceptions are disabled by defining RAPIDXML_NO_EXCEPTIONS, this function + //! will call rapidxml::parse_error_handler() function. + //! \param type Type of node to create. + //! \param name Name to assign to the node, or 0 to assign no name. + //! \param value Value to assign to the node, or 0 to assign no value. + //! \param name_size Size of name to assign, or 0 to automatically calculate size from name string. + //! \param value_size Size of value to assign, or 0 to automatically calculate size from value string. + //! \return Pointer to allocated node. This pointer will never be NULL. + xml_node *allocate_node(node_type type, + const Ch *name = 0, const Ch *value = 0, + std::size_t name_size = 0, std::size_t value_size = 0) + { + void *memory = allocate_aligned(sizeof(xml_node)); + xml_node *node = new(memory) xml_node(type); + if (name) + { + if (name_size > 0) + node->name(name, name_size); + else + node->name(name); + } + if (value) + { + if (value_size > 0) + node->value(value, value_size); + else + node->value(value); + } + return node; + } + + //! Allocates a new attribute from the pool, and optionally assigns name and value to it. + //! If the allocation request cannot be accomodated, this function will throw std::bad_alloc. + //! If exceptions are disabled by defining RAPIDXML_NO_EXCEPTIONS, this function + //! will call rapidxml::parse_error_handler() function. + //! \param name Name to assign to the attribute, or 0 to assign no name. + //! \param value Value to assign to the attribute, or 0 to assign no value. + //! \param name_size Size of name to assign, or 0 to automatically calculate size from name string. + //! \param value_size Size of value to assign, or 0 to automatically calculate size from value string. + //! \return Pointer to allocated attribute. This pointer will never be NULL. + xml_attribute *allocate_attribute(const Ch *name = 0, const Ch *value = 0, + std::size_t name_size = 0, std::size_t value_size = 0) + { + void *memory = allocate_aligned(sizeof(xml_attribute)); + xml_attribute *attribute = new(memory) xml_attribute; + if (name) + { + if (name_size > 0) + attribute->name(name, name_size); + else + attribute->name(name); + } + if (value) + { + if (value_size > 0) + attribute->value(value, value_size); + else + attribute->value(value); + } + return attribute; + } + + //! Allocates a char array of given size from the pool, and optionally copies a given string to it. + //! If the allocation request cannot be accomodated, this function will throw std::bad_alloc. + //! If exceptions are disabled by defining RAPIDXML_NO_EXCEPTIONS, this function + //! will call rapidxml::parse_error_handler() function. + //! \param source String to initialize the allocated memory with, or 0 to not initialize it. + //! \param size Number of characters to allocate, or zero to calculate it automatically from source string length; if size is 0, source string must be specified and null terminated. + //! \return Pointer to allocated char array. This pointer will never be NULL. + Ch *allocate_string(const Ch *source = 0, std::size_t size = 0) + { + assert(source || size); // Either source or size (or both) must be specified + if (size == 0) + size = internal::measure(source) + 1; + Ch *result = static_cast(allocate_aligned(size * sizeof(Ch))); + if (source) + for (std::size_t i = 0; i < size; ++i) + result[i] = source[i]; + return result; + } + + //! Clones an xml_node and its hierarchy of child nodes and attributes. + //! Nodes and attributes are allocated from this memory pool. + //! Names and values are not cloned, they are shared between the clone and the source. + //! Result node can be optionally specified as a second parameter, + //! in which case its contents will be replaced with cloned source node. + //! This is useful when you want to clone entire document. + //! \param source Node to clone. + //! \param result Node to put results in, or 0 to automatically allocate result node + //! \return Pointer to cloned node. This pointer will never be NULL. + xml_node *clone_node(const xml_node *source, xml_node *result = 0) + { + // Prepare result node + if (result) + { + result->remove_all_attributes(); + result->remove_all_nodes(); + result->type(source->type()); + } + else + result = allocate_node(source->type()); + + // Clone name and value + result->name(source->name(), source->name_size()); + result->value(source->value(), source->value_size()); + + // Clone child nodes and attributes + for (xml_node *child = source->first_node(); child; child = child->next_sibling()) + result->append_node(clone_node(child)); + for (xml_attribute *attr = source->first_attribute(); attr; attr = attr->next_attribute()) + result->append_attribute(allocate_attribute(attr->name(), attr->value(), attr->name_size(), attr->value_size())); + + return result; + } + + //! Clears the pool. + //! This causes memory occupied by nodes allocated by the pool to be freed. + //! Any nodes or strings allocated from the pool will no longer be valid. + void clear() + { + while (m_begin != m_static_memory) + { + char *previous_begin = reinterpret_cast
(align(m_begin))->previous_begin; + if (m_free_func) + m_free_func(m_begin); + else + delete[] m_begin; + m_begin = previous_begin; + } + init(); + } + + //! Sets or resets the user-defined memory allocation functions for the pool. + //! This can only be called when no memory is allocated from the pool yet, otherwise results are undefined. + //! Allocation function must not return invalid pointer on failure. It should either throw, + //! stop the program, or use longjmp() function to pass control to other place of program. + //! If it returns invalid pointer, results are undefined. + //!

+ //! User defined allocation functions must have the following forms: + //!
+ //!
void *allocate(std::size_t size); + //!
void free(void *pointer); + //!

+ //! \param af Allocation function, or 0 to restore default function + //! \param ff Free function, or 0 to restore default function + void set_allocator(alloc_func *af, free_func *ff) + { + assert(m_begin == m_static_memory && m_ptr == align(m_begin)); // Verify that no memory is allocated yet + m_alloc_func = af; + m_free_func = ff; + } + + private: + + struct header + { + char *previous_begin; + }; + + void init() + { + m_begin = m_static_memory; + m_ptr = align(m_begin); + m_end = m_static_memory + sizeof(m_static_memory); + } + + char *align(char *ptr) + { + std::size_t alignment = ((RAPIDXML_ALIGNMENT - (std::size_t(ptr) & (RAPIDXML_ALIGNMENT - 1))) & (RAPIDXML_ALIGNMENT - 1)); + return ptr + alignment; + } + + char *allocate_raw(std::size_t size) + { + // Allocate + void *memory; + if (m_alloc_func) // Allocate memory using either user-specified allocation function or global operator new[] + { + memory = m_alloc_func(size); + assert(memory); // Allocator is not allowed to return 0, on failure it must either throw, stop the program or use longjmp + } + else + { + memory = new char[size]; +#ifdef RAPIDXML_NO_EXCEPTIONS + if (!memory) // If exceptions are disabled, verify memory allocation, because new will not be able to throw bad_alloc + RAPIDXML_PARSE_ERROR("out of memory", 0); +#endif + } + return static_cast(memory); + } + + void *allocate_aligned(std::size_t size) + { + // Calculate aligned pointer + char *result = align(m_ptr); + + // If not enough memory left in current pool, allocate a new pool + if (result + size > m_end) + { + // Calculate required pool size (may be bigger than RAPIDXML_DYNAMIC_POOL_SIZE) + std::size_t pool_size = RAPIDXML_DYNAMIC_POOL_SIZE; + if (pool_size < size) + pool_size = size; + + // Allocate + std::size_t alloc_size = sizeof(header) + (2 * RAPIDXML_ALIGNMENT - 2) + pool_size; // 2 alignments required in worst case: one for header, one for actual allocation + char *raw_memory = allocate_raw(alloc_size); + + // Setup new pool in allocated memory + char *pool = align(raw_memory); + header *new_header = reinterpret_cast
(pool); + new_header->previous_begin = m_begin; + m_begin = raw_memory; + m_ptr = pool + sizeof(header); + m_end = raw_memory + alloc_size; + + // Calculate aligned pointer again using new pool + result = align(m_ptr); + } + + // Update pool and return aligned pointer + m_ptr = result + size; + return result; + } + + char *m_begin; // Start of raw memory making up current pool + char *m_ptr; // First free byte in current pool + char *m_end; // One past last available byte in current pool + char m_static_memory[RAPIDXML_STATIC_POOL_SIZE]; // Static raw memory + alloc_func *m_alloc_func; // Allocator function, or 0 if default is to be used + free_func *m_free_func; // Free function, or 0 if default is to be used + }; + + /////////////////////////////////////////////////////////////////////////// + // XML base + + //! Base class for xml_node and xml_attribute implementing common functions: + //! name(), name_size(), value(), value_size() and parent(). + //! \param Ch Character type to use + template + class xml_base + { + + public: + + /////////////////////////////////////////////////////////////////////////// + // Construction & destruction + + // Construct a base with empty name, value and parent + xml_base() + : m_name(0) + , m_value(0) + , m_parent(0) + { + } + + /////////////////////////////////////////////////////////////////////////// + // Node data access + + //! Gets name of the node. + //! Interpretation of name depends on type of node. + //! Note that name will not be zero-terminated if rapidxml::parse_no_string_terminators option was selected during parse. + //!

+ //! Use name_size() function to determine length of the name. + //! \return Name of node, or empty string if node has no name. + Ch *name() const + { + return m_name ? m_name : nullstr(); + } + + //! Gets size of node name, not including terminator character. + //! This function works correctly irrespective of whether name is or is not zero terminated. + //! \return Size of node name, in characters. + std::size_t name_size() const + { + return m_name ? m_name_size : 0; + } + + //! Gets value of node. + //! Interpretation of value depends on type of node. + //! Note that value will not be zero-terminated if rapidxml::parse_no_string_terminators option was selected during parse. + //!

+ //! Use value_size() function to determine length of the value. + //! \return Value of node, or empty string if node has no value. + Ch *value() const + { + return m_value ? m_value : nullstr(); + } + + //! Gets size of node value, not including terminator character. + //! This function works correctly irrespective of whether value is or is not zero terminated. + //! \return Size of node value, in characters. + std::size_t value_size() const + { + return m_value ? m_value_size : 0; + } + + /////////////////////////////////////////////////////////////////////////// + // Node modification + + //! Sets name of node to a non zero-terminated string. + //! See \ref ownership_of_strings. + //!

+ //! Note that node does not own its name or value, it only stores a pointer to it. + //! It will not delete or otherwise free the pointer on destruction. + //! It is reponsibility of the user to properly manage lifetime of the string. + //! The easiest way to achieve it is to use memory_pool of the document to allocate the string - + //! on destruction of the document the string will be automatically freed. + //!

+ //! Size of name must be specified separately, because name does not have to be zero terminated. + //! Use name(const Ch *) function to have the length automatically calculated (string must be zero terminated). + //! \param name Name of node to set. Does not have to be zero terminated. + //! \param size Size of name, in characters. This does not include zero terminator, if one is present. + void name(const Ch *name, std::size_t size) + { + m_name = const_cast(name); + m_name_size = size; + } + + //! Sets name of node to a zero-terminated string. + //! See also \ref ownership_of_strings and xml_node::name(const Ch *, std::size_t). + //! \param name Name of node to set. Must be zero terminated. + void name(const Ch *name) + { + this->name(name, internal::measure(name)); + } + + //! Sets value of node to a non zero-terminated string. + //! See \ref ownership_of_strings. + //!

+ //! Note that node does not own its name or value, it only stores a pointer to it. + //! It will not delete or otherwise free the pointer on destruction. + //! It is reponsibility of the user to properly manage lifetime of the string. + //! The easiest way to achieve it is to use memory_pool of the document to allocate the string - + //! on destruction of the document the string will be automatically freed. + //!

+ //! Size of value must be specified separately, because it does not have to be zero terminated. + //! Use value(const Ch *) function to have the length automatically calculated (string must be zero terminated). + //!

+ //! If an element has a child node of type node_data, it will take precedence over element value when printing. + //! If you want to manipulate data of elements using values, use parser flag rapidxml::parse_no_data_nodes to prevent creation of data nodes by the parser. + //! \param value value of node to set. Does not have to be zero terminated. + //! \param size Size of value, in characters. This does not include zero terminator, if one is present. + void value(const Ch *value, std::size_t size) + { + m_value = const_cast(value); + m_value_size = size; + } + + //! Sets value of node to a zero-terminated string. + //! See also \ref ownership_of_strings and xml_node::value(const Ch *, std::size_t). + //! \param value Vame of node to set. Must be zero terminated. + void value(const Ch *value) + { + this->value(value, internal::measure(value)); + } + + /////////////////////////////////////////////////////////////////////////// + // Related nodes access + + //! Gets node parent. + //! \return Pointer to parent node, or 0 if there is no parent. + xml_node *parent() const + { + return m_parent; + } + + protected: + + // Return empty string + static Ch *nullstr() + { + static Ch zero = Ch('\0'); + return &zero; + } + + Ch *m_name; // Name of node, or 0 if no name + Ch *m_value; // Value of node, or 0 if no value + std::size_t m_name_size; // Length of node name, or undefined of no name + std::size_t m_value_size; // Length of node value, or undefined if no value + xml_node *m_parent; // Pointer to parent node, or 0 if none + + }; + + //! Class representing attribute node of XML document. + //! Each attribute has name and value strings, which are available through name() and value() functions (inherited from xml_base). + //! Note that after parse, both name and value of attribute will point to interior of source text used for parsing. + //! Thus, this text must persist in memory for the lifetime of attribute. + //! \param Ch Character type to use. + template + class xml_attribute: public xml_base + { + + friend class xml_node; + + public: + + /////////////////////////////////////////////////////////////////////////// + // Construction & destruction + + //! Constructs an empty attribute with the specified type. + //! Consider using memory_pool of appropriate xml_document if allocating attributes manually. + xml_attribute() + { + } + + /////////////////////////////////////////////////////////////////////////// + // Related nodes access + + //! Gets document of which attribute is a child. + //! \return Pointer to document that contains this attribute, or 0 if there is no parent document. + xml_document *document() const + { + if (xml_node *node = this->parent()) + { + while (node->parent()) + node = node->parent(); + return node->type() == node_document ? static_cast *>(node) : 0; + } + else + return 0; + } + + //! Gets previous attribute, optionally matching attribute name. + //! \param name Name of attribute to find, or 0 to return previous attribute regardless of its name; this string doesn't have to be zero-terminated if name_size is non-zero + //! \param name_size Size of name, in characters, or 0 to have size calculated automatically from string + //! \param case_sensitive Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters + //! \return Pointer to found attribute, or 0 if not found. + xml_attribute *previous_attribute(const Ch *name = 0, std::size_t name_size = 0, bool case_sensitive = true) const + { + if (name) + { + if (name_size == 0) + name_size = internal::measure(name); + for (xml_attribute *attribute = m_prev_attribute; attribute; attribute = attribute->m_prev_attribute) + if (internal::compare(attribute->name(), attribute->name_size(), name, name_size, case_sensitive)) + return attribute; + return 0; + } + else + return this->m_parent ? m_prev_attribute : 0; + } + + //! Gets next attribute, optionally matching attribute name. + //! \param name Name of attribute to find, or 0 to return next attribute regardless of its name; this string doesn't have to be zero-terminated if name_size is non-zero + //! \param name_size Size of name, in characters, or 0 to have size calculated automatically from string + //! \param case_sensitive Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters + //! \return Pointer to found attribute, or 0 if not found. + xml_attribute *next_attribute(const Ch *name = 0, std::size_t name_size = 0, bool case_sensitive = true) const + { + if (name) + { + if (name_size == 0) + name_size = internal::measure(name); + for (xml_attribute *attribute = m_next_attribute; attribute; attribute = attribute->m_next_attribute) + if (internal::compare(attribute->name(), attribute->name_size(), name, name_size, case_sensitive)) + return attribute; + return 0; + } + else + return this->m_parent ? m_next_attribute : 0; + } + + private: + + xml_attribute *m_prev_attribute; // Pointer to previous sibling of attribute, or 0 if none; only valid if parent is non-zero + xml_attribute *m_next_attribute; // Pointer to next sibling of attribute, or 0 if none; only valid if parent is non-zero + + }; + + /////////////////////////////////////////////////////////////////////////// + // XML node + + //! Class representing a node of XML document. + //! Each node may have associated name and value strings, which are available through name() and value() functions. + //! Interpretation of name and value depends on type of the node. + //! Type of node can be determined by using type() function. + //!

+ //! Note that after parse, both name and value of node, if any, will point interior of source text used for parsing. + //! Thus, this text must persist in the memory for the lifetime of node. + //! \param Ch Character type to use. + template + class xml_node: public xml_base + { + + public: + + /////////////////////////////////////////////////////////////////////////// + // Construction & destruction + + //! Constructs an empty node with the specified type. + //! Consider using memory_pool of appropriate document to allocate nodes manually. + //! \param type Type of node to construct. + xml_node(node_type type) + : m_type(type) + , m_first_node(0) + , m_first_attribute(0) + { + } + + /////////////////////////////////////////////////////////////////////////// + // Node data access + + //! Gets type of node. + //! \return Type of node. + node_type type() const + { + return m_type; + } + + /////////////////////////////////////////////////////////////////////////// + // Related nodes access + + //! Gets document of which node is a child. + //! \return Pointer to document that contains this node, or 0 if there is no parent document. + xml_document *document() const + { + xml_node *node = const_cast *>(this); + while (node->parent()) + node = node->parent(); + return node->type() == node_document ? static_cast *>(node) : 0; + } + + //! Gets first child node, optionally matching node name. + //! \param name Name of child to find, or 0 to return first child regardless of its name; this string doesn't have to be zero-terminated if name_size is non-zero + //! \param name_size Size of name, in characters, or 0 to have size calculated automatically from string + //! \param case_sensitive Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters + //! \return Pointer to found child, or 0 if not found. + xml_node *first_node(const Ch *name = 0, std::size_t name_size = 0, bool case_sensitive = true) const + { + if (name) + { + if (name_size == 0) + name_size = internal::measure(name); + for (xml_node *child = m_first_node; child; child = child->next_sibling()) + if (internal::compare(child->name(), child->name_size(), name, name_size, case_sensitive)) + return child; + return 0; + } + else + return m_first_node; + } + + //! Gets last child node, optionally matching node name. + //! Behaviour is undefined if node has no children. + //! Use first_node() to test if node has children. + //! \param name Name of child to find, or 0 to return last child regardless of its name; this string doesn't have to be zero-terminated if name_size is non-zero + //! \param name_size Size of name, in characters, or 0 to have size calculated automatically from string + //! \param case_sensitive Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters + //! \return Pointer to found child, or 0 if not found. + xml_node *last_node(const Ch *name = 0, std::size_t name_size = 0, bool case_sensitive = true) const + { + assert(m_first_node); // Cannot query for last child if node has no children + if (name) + { + if (name_size == 0) + name_size = internal::measure(name); + for (xml_node *child = m_last_node; child; child = child->previous_sibling()) + if (internal::compare(child->name(), child->name_size(), name, name_size, case_sensitive)) + return child; + return 0; + } + else + return m_last_node; + } + + //! Gets previous sibling node, optionally matching node name. + //! Behaviour is undefined if node has no parent. + //! Use parent() to test if node has a parent. + //! \param name Name of sibling to find, or 0 to return previous sibling regardless of its name; this string doesn't have to be zero-terminated if name_size is non-zero + //! \param name_size Size of name, in characters, or 0 to have size calculated automatically from string + //! \param case_sensitive Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters + //! \return Pointer to found sibling, or 0 if not found. + xml_node *previous_sibling(const Ch *name = 0, std::size_t name_size = 0, bool case_sensitive = true) const + { + assert(this->m_parent); // Cannot query for siblings if node has no parent + if (name) + { + if (name_size == 0) + name_size = internal::measure(name); + for (xml_node *sibling = m_prev_sibling; sibling; sibling = sibling->m_prev_sibling) + if (internal::compare(sibling->name(), sibling->name_size(), name, name_size, case_sensitive)) + return sibling; + return 0; + } + else + return m_prev_sibling; + } + + //! Gets next sibling node, optionally matching node name. + //! Behaviour is undefined if node has no parent. + //! Use parent() to test if node has a parent. + //! \param name Name of sibling to find, or 0 to return next sibling regardless of its name; this string doesn't have to be zero-terminated if name_size is non-zero + //! \param name_size Size of name, in characters, or 0 to have size calculated automatically from string + //! \param case_sensitive Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters + //! \return Pointer to found sibling, or 0 if not found. + xml_node *next_sibling(const Ch *name = 0, std::size_t name_size = 0, bool case_sensitive = true) const + { + assert(this->m_parent); // Cannot query for siblings if node has no parent + if (name) + { + if (name_size == 0) + name_size = internal::measure(name); + for (xml_node *sibling = m_next_sibling; sibling; sibling = sibling->m_next_sibling) + if (internal::compare(sibling->name(), sibling->name_size(), name, name_size, case_sensitive)) + return sibling; + return 0; + } + else + return m_next_sibling; + } + + //! Gets first attribute of node, optionally matching attribute name. + //! \param name Name of attribute to find, or 0 to return first attribute regardless of its name; this string doesn't have to be zero-terminated if name_size is non-zero + //! \param name_size Size of name, in characters, or 0 to have size calculated automatically from string + //! \param case_sensitive Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters + //! \return Pointer to found attribute, or 0 if not found. + xml_attribute *first_attribute(const Ch *name = 0, std::size_t name_size = 0, bool case_sensitive = true) const + { + if (name) + { + if (name_size == 0) + name_size = internal::measure(name); + for (xml_attribute *attribute = m_first_attribute; attribute; attribute = attribute->m_next_attribute) + if (internal::compare(attribute->name(), attribute->name_size(), name, name_size, case_sensitive)) + return attribute; + return 0; + } + else + return m_first_attribute; + } + + //! Gets last attribute of node, optionally matching attribute name. + //! \param name Name of attribute to find, or 0 to return last attribute regardless of its name; this string doesn't have to be zero-terminated if name_size is non-zero + //! \param name_size Size of name, in characters, or 0 to have size calculated automatically from string + //! \param case_sensitive Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters + //! \return Pointer to found attribute, or 0 if not found. + xml_attribute *last_attribute(const Ch *name = 0, std::size_t name_size = 0, bool case_sensitive = true) const + { + if (name) + { + if (name_size == 0) + name_size = internal::measure(name); + for (xml_attribute *attribute = m_last_attribute; attribute; attribute = attribute->m_prev_attribute) + if (internal::compare(attribute->name(), attribute->name_size(), name, name_size, case_sensitive)) + return attribute; + return 0; + } + else + return m_first_attribute ? m_last_attribute : 0; + } + + /////////////////////////////////////////////////////////////////////////// + // Node modification + + //! Sets type of node. + //! \param type Type of node to set. + void type(node_type type) + { + m_type = type; + } + + /////////////////////////////////////////////////////////////////////////// + // Node manipulation + + //! Prepends a new child node. + //! The prepended child becomes the first child, and all existing children are moved one position back. + //! \param child Node to prepend. + void prepend_node(xml_node *child) + { + assert(child && !child->parent() && child->type() != node_document); + if (first_node()) + { + child->m_next_sibling = m_first_node; + m_first_node->m_prev_sibling = child; + } + else + { + child->m_next_sibling = 0; + m_last_node = child; + } + m_first_node = child; + child->m_parent = this; + child->m_prev_sibling = 0; + } + + //! Appends a new child node. + //! The appended child becomes the last child. + //! \param child Node to append. + void append_node(xml_node *child) + { + assert(child && !child->parent() && child->type() != node_document); + if (first_node()) + { + child->m_prev_sibling = m_last_node; + m_last_node->m_next_sibling = child; + } + else + { + child->m_prev_sibling = 0; + m_first_node = child; + } + m_last_node = child; + child->m_parent = this; + child->m_next_sibling = 0; + } + + //! Inserts a new child node at specified place inside the node. + //! All children after and including the specified node are moved one position back. + //! \param where Place where to insert the child, or 0 to insert at the back. + //! \param child Node to insert. + void insert_node(xml_node *where, xml_node *child) + { + assert(!where || where->parent() == this); + assert(child && !child->parent() && child->type() != node_document); + if (where == m_first_node) + prepend_node(child); + else if (where == 0) + append_node(child); + else + { + child->m_prev_sibling = where->m_prev_sibling; + child->m_next_sibling = where; + where->m_prev_sibling->m_next_sibling = child; + where->m_prev_sibling = child; + child->m_parent = this; + } + } + + //! Removes first child node. + //! If node has no children, behaviour is undefined. + //! Use first_node() to test if node has children. + void remove_first_node() + { + assert(first_node()); + xml_node *child = m_first_node; + m_first_node = child->m_next_sibling; + if (child->m_next_sibling) + child->m_next_sibling->m_prev_sibling = 0; + else + m_last_node = 0; + child->m_parent = 0; + } + + //! Removes last child of the node. + //! If node has no children, behaviour is undefined. + //! Use first_node() to test if node has children. + void remove_last_node() + { + assert(first_node()); + xml_node *child = m_last_node; + if (child->m_prev_sibling) + { + m_last_node = child->m_prev_sibling; + child->m_prev_sibling->m_next_sibling = 0; + } + else + m_first_node = 0; + child->m_parent = 0; + } + + //! Removes specified child from the node + // \param where Pointer to child to be removed. + void remove_node(xml_node *where) + { + assert(where && where->parent() == this); + assert(first_node()); + if (where == m_first_node) + remove_first_node(); + else if (where == m_last_node) + remove_last_node(); + else + { + where->m_prev_sibling->m_next_sibling = where->m_next_sibling; + where->m_next_sibling->m_prev_sibling = where->m_prev_sibling; + where->m_parent = 0; + } + } + + //! Removes all child nodes (but not attributes). + void remove_all_nodes() + { + for (xml_node *node = first_node(); node; node = node->m_next_sibling) + node->m_parent = 0; + m_first_node = 0; + } + + //! Prepends a new attribute to the node. + //! \param attribute Attribute to prepend. + void prepend_attribute(xml_attribute *attribute) + { + assert(attribute && !attribute->parent()); + if (first_attribute()) + { + attribute->m_next_attribute = m_first_attribute; + m_first_attribute->m_prev_attribute = attribute; + } + else + { + attribute->m_next_attribute = 0; + m_last_attribute = attribute; + } + m_first_attribute = attribute; + attribute->m_parent = this; + attribute->m_prev_attribute = 0; + } + + //! Appends a new attribute to the node. + //! \param attribute Attribute to append. + void append_attribute(xml_attribute *attribute) + { + assert(attribute && !attribute->parent()); + if (first_attribute()) + { + attribute->m_prev_attribute = m_last_attribute; + m_last_attribute->m_next_attribute = attribute; + } + else + { + attribute->m_prev_attribute = 0; + m_first_attribute = attribute; + } + m_last_attribute = attribute; + attribute->m_parent = this; + attribute->m_next_attribute = 0; + } + + //! Inserts a new attribute at specified place inside the node. + //! All attributes after and including the specified attribute are moved one position back. + //! \param where Place where to insert the attribute, or 0 to insert at the back. + //! \param attribute Attribute to insert. + void insert_attribute(xml_attribute *where, xml_attribute *attribute) + { + assert(!where || where->parent() == this); + assert(attribute && !attribute->parent()); + if (where == m_first_attribute) + prepend_attribute(attribute); + else if (where == 0) + append_attribute(attribute); + else + { + attribute->m_prev_attribute = where->m_prev_attribute; + attribute->m_next_attribute = where; + where->m_prev_attribute->m_next_attribute = attribute; + where->m_prev_attribute = attribute; + attribute->m_parent = this; + } + } + + //! Removes first attribute of the node. + //! If node has no attributes, behaviour is undefined. + //! Use first_attribute() to test if node has attributes. + void remove_first_attribute() + { + assert(first_attribute()); + xml_attribute *attribute = m_first_attribute; + if (attribute->m_next_attribute) + { + attribute->m_next_attribute->m_prev_attribute = 0; + } + else + m_last_attribute = 0; + attribute->m_parent = 0; + m_first_attribute = attribute->m_next_attribute; + } + + //! Removes last attribute of the node. + //! If node has no attributes, behaviour is undefined. + //! Use first_attribute() to test if node has attributes. + void remove_last_attribute() + { + assert(first_attribute()); + xml_attribute *attribute = m_last_attribute; + if (attribute->m_prev_attribute) + { + attribute->m_prev_attribute->m_next_attribute = 0; + m_last_attribute = attribute->m_prev_attribute; + } + else + m_first_attribute = 0; + attribute->m_parent = 0; + } + + //! Removes specified attribute from node. + //! \param where Pointer to attribute to be removed. + void remove_attribute(xml_attribute *where) + { + assert(first_attribute() && where->parent() == this); + if (where == m_first_attribute) + remove_first_attribute(); + else if (where == m_last_attribute) + remove_last_attribute(); + else + { + where->m_prev_attribute->m_next_attribute = where->m_next_attribute; + where->m_next_attribute->m_prev_attribute = where->m_prev_attribute; + where->m_parent = 0; + } + } + + //! Removes all attributes of node. + void remove_all_attributes() + { + for (xml_attribute *attribute = first_attribute(); attribute; attribute = attribute->m_next_attribute) + attribute->m_parent = 0; + m_first_attribute = 0; + } + + private: + + /////////////////////////////////////////////////////////////////////////// + // Restrictions + + // No copying + xml_node(const xml_node &); + void operator =(const xml_node &); + + /////////////////////////////////////////////////////////////////////////// + // Data members + + // Note that some of the pointers below have UNDEFINED values if certain other pointers are 0. + // This is required for maximum performance, as it allows the parser to omit initialization of + // unneded/redundant values. + // + // The rules are as follows: + // 1. first_node and first_attribute contain valid pointers, or 0 if node has no children/attributes respectively + // 2. last_node and last_attribute are valid only if node has at least one child/attribute respectively, otherwise they contain garbage + // 3. prev_sibling and next_sibling are valid only if node has a parent, otherwise they contain garbage + + node_type m_type; // Type of node; always valid + xml_node *m_first_node; // Pointer to first child node, or 0 if none; always valid + xml_node *m_last_node; // Pointer to last child node, or 0 if none; this value is only valid if m_first_node is non-zero + xml_attribute *m_first_attribute; // Pointer to first attribute of node, or 0 if none; always valid + xml_attribute *m_last_attribute; // Pointer to last attribute of node, or 0 if none; this value is only valid if m_first_attribute is non-zero + xml_node *m_prev_sibling; // Pointer to previous sibling of node, or 0 if none; this value is only valid if m_parent is non-zero + xml_node *m_next_sibling; // Pointer to next sibling of node, or 0 if none; this value is only valid if m_parent is non-zero + + }; + + /////////////////////////////////////////////////////////////////////////// + // XML document + + //! This class represents root of the DOM hierarchy. + //! It is also an xml_node and a memory_pool through public inheritance. + //! Use parse() function to build a DOM tree from a zero-terminated XML text string. + //! parse() function allocates memory for nodes and attributes by using functions of xml_document, + //! which are inherited from memory_pool. + //! To access root node of the document, use the document itself, as if it was an xml_node. + //! \param Ch Character type to use. + template + class xml_document: public xml_node, public memory_pool + { + + public: + + //! Constructs empty XML document + xml_document() + : xml_node(node_document) + { + } + + //! Parses zero-terminated XML string according to given flags. + //! Passed string will be modified by the parser, unless rapidxml::parse_non_destructive flag is used. + //! The string must persist for the lifetime of the document. + //! In case of error, rapidxml::parse_error exception will be thrown. + //!

+ //! If you want to parse contents of a file, you must first load the file into the memory, and pass pointer to its beginning. + //! Make sure that data is zero-terminated. + //!

+ //! Document can be parsed into multiple times. + //! Each new call to parse removes previous nodes and attributes (if any), but does not clear memory pool. + //! \param text XML data to parse; pointer is non-const to denote fact that this data may be modified by the parser. + template + void parse(Ch *text) + { + assert(text); + + // Remove current contents + this->remove_all_nodes(); + this->remove_all_attributes(); + + // Parse BOM, if any + parse_bom(text); + + // Parse children + while (1) + { + // Skip whitespace before node + skip(text); + if (*text == 0) + break; + + // Parse and append new child + if (*text == Ch('<')) + { + ++text; // Skip '<' + if (xml_node *node = parse_node(text)) + this->append_node(node); + } + else + RAPIDXML_PARSE_ERROR("expected <", text); + } + + } + + //! Clears the document by deleting all nodes and clearing the memory pool. + //! All nodes owned by document pool are destroyed. + void clear() + { + this->remove_all_nodes(); + this->remove_all_attributes(); + memory_pool::clear(); + } + + private: + + /////////////////////////////////////////////////////////////////////// + // Internal character utility functions + + // Detect whitespace character + struct whitespace_pred + { + static unsigned char test(Ch ch) + { + return internal::lookup_tables<0>::lookup_whitespace[static_cast(ch)]; + } + }; + + // Detect node name character + struct node_name_pred + { + static unsigned char test(Ch ch) + { + return internal::lookup_tables<0>::lookup_node_name[static_cast(ch)]; + } + }; + + // Detect attribute name character + struct attribute_name_pred + { + static unsigned char test(Ch ch) + { + return internal::lookup_tables<0>::lookup_attribute_name[static_cast(ch)]; + } + }; + + // Detect text character (PCDATA) + struct text_pred + { + static unsigned char test(Ch ch) + { + return internal::lookup_tables<0>::lookup_text[static_cast(ch)]; + } + }; + + // Detect text character (PCDATA) that does not require processing + struct text_pure_no_ws_pred + { + static unsigned char test(Ch ch) + { + return internal::lookup_tables<0>::lookup_text_pure_no_ws[static_cast(ch)]; + } + }; + + // Detect text character (PCDATA) that does not require processing + struct text_pure_with_ws_pred + { + static unsigned char test(Ch ch) + { + return internal::lookup_tables<0>::lookup_text_pure_with_ws[static_cast(ch)]; + } + }; + + // Detect attribute value character + template + struct attribute_value_pred + { + static unsigned char test(Ch ch) + { + if (Quote == Ch('\'')) + return internal::lookup_tables<0>::lookup_attribute_data_1[static_cast(ch)]; + if (Quote == Ch('\"')) + return internal::lookup_tables<0>::lookup_attribute_data_2[static_cast(ch)]; + return 0; // Should never be executed, to avoid warnings on Comeau + } + }; + + // Detect attribute value character + template + struct attribute_value_pure_pred + { + static unsigned char test(Ch ch) + { + if (Quote == Ch('\'')) + return internal::lookup_tables<0>::lookup_attribute_data_1_pure[static_cast(ch)]; + if (Quote == Ch('\"')) + return internal::lookup_tables<0>::lookup_attribute_data_2_pure[static_cast(ch)]; + return 0; // Should never be executed, to avoid warnings on Comeau + } + }; + + // Insert coded character, using UTF8 or 8-bit ASCII + template + static void insert_coded_character(Ch *&text, unsigned long code) + { + if (Flags & parse_no_utf8) + { + // Insert 8-bit ASCII character + // Todo: possibly verify that code is less than 256 and use replacement char otherwise? + text[0] = static_cast(code); + text += 1; + } + else + { + // Insert UTF8 sequence + if (code < 0x80) // 1 byte sequence + { + text[0] = static_cast(code); + text += 1; + } + else if (code < 0x800) // 2 byte sequence + { + text[1] = static_cast((code | 0x80) & 0xBF); code >>= 6; + text[0] = static_cast(code | 0xC0); + text += 2; + } + else if (code < 0x10000) // 3 byte sequence + { + text[2] = static_cast((code | 0x80) & 0xBF); code >>= 6; + text[1] = static_cast((code | 0x80) & 0xBF); code >>= 6; + text[0] = static_cast(code | 0xE0); + text += 3; + } + else if (code < 0x110000) // 4 byte sequence + { + text[3] = static_cast((code | 0x80) & 0xBF); code >>= 6; + text[2] = static_cast((code | 0x80) & 0xBF); code >>= 6; + text[1] = static_cast((code | 0x80) & 0xBF); code >>= 6; + text[0] = static_cast(code | 0xF0); + text += 4; + } + else // Invalid, only codes up to 0x10FFFF are allowed in Unicode + { + RAPIDXML_PARSE_ERROR("invalid numeric character entity", text); + } + } + } + + // Skip characters until predicate evaluates to true + template + static void skip(Ch *&text) + { + Ch *tmp = text; + while (StopPred::test(*tmp)) + ++tmp; + text = tmp; + } + + // Skip characters until predicate evaluates to true while doing the following: + // - replacing XML character entity references with proper characters (' & " < > &#...;) + // - condensing whitespace sequences to single space character + template + static Ch *skip_and_expand_character_refs(Ch *&text) + { + // If entity translation, whitespace condense and whitespace trimming is disabled, use plain skip + if (Flags & parse_no_entity_translation && + !(Flags & parse_normalize_whitespace) && + !(Flags & parse_trim_whitespace)) + { + skip(text); + return text; + } + + // Use simple skip until first modification is detected + skip(text); + + // Use translation skip + Ch *src = text; + Ch *dest = src; + while (StopPred::test(*src)) + { + // If entity translation is enabled + if (!(Flags & parse_no_entity_translation)) + { + // Test if replacement is needed + if (src[0] == Ch('&')) + { + switch (src[1]) + { + + // & ' + case Ch('a'): + if (src[2] == Ch('m') && src[3] == Ch('p') && src[4] == Ch(';')) + { + *dest = Ch('&'); + ++dest; + src += 5; + continue; + } + if (src[2] == Ch('p') && src[3] == Ch('o') && src[4] == Ch('s') && src[5] == Ch(';')) + { + *dest = Ch('\''); + ++dest; + src += 6; + continue; + } + break; + + // " + case Ch('q'): + if (src[2] == Ch('u') && src[3] == Ch('o') && src[4] == Ch('t') && src[5] == Ch(';')) + { + *dest = Ch('"'); + ++dest; + src += 6; + continue; + } + break; + + // > + case Ch('g'): + if (src[2] == Ch('t') && src[3] == Ch(';')) + { + *dest = Ch('>'); + ++dest; + src += 4; + continue; + } + break; + + // < + case Ch('l'): + if (src[2] == Ch('t') && src[3] == Ch(';')) + { + *dest = Ch('<'); + ++dest; + src += 4; + continue; + } + break; + + // &#...; - assumes ASCII + case Ch('#'): + if (src[2] == Ch('x')) + { + unsigned long code = 0; + src += 3; // Skip &#x + while (1) + { + unsigned char digit = internal::lookup_tables<0>::lookup_digits[static_cast(*src)]; + if (digit == 0xFF) + break; + code = code * 16 + digit; + ++src; + } + insert_coded_character(dest, code); // Put character in output + } + else + { + unsigned long code = 0; + src += 2; // Skip &# + while (1) + { + unsigned char digit = internal::lookup_tables<0>::lookup_digits[static_cast(*src)]; + if (digit == 0xFF) + break; + code = code * 10 + digit; + ++src; + } + insert_coded_character(dest, code); // Put character in output + } + if (*src == Ch(';')) + ++src; + else + RAPIDXML_PARSE_ERROR("expected ;", src); + continue; + + // Something else + default: + // Ignore, just copy '&' verbatim + break; + + } + } + } + + // If whitespace condensing is enabled + if (Flags & parse_normalize_whitespace) + { + // Test if condensing is needed + if (whitespace_pred::test(*src)) + { + *dest = Ch(' '); ++dest; // Put single space in dest + ++src; // Skip first whitespace char + // Skip remaining whitespace chars + while (whitespace_pred::test(*src)) + ++src; + continue; + } + } + + // No replacement, only copy character + *dest++ = *src++; + + } + + // Return new end + text = src; + return dest; + + } + + /////////////////////////////////////////////////////////////////////// + // Internal parsing functions + + // Parse BOM, if any + template + void parse_bom(Ch *&text) + { + // UTF-8? + if (static_cast(text[0]) == 0xEF && + static_cast(text[1]) == 0xBB && + static_cast(text[2]) == 0xBF) + { + text += 3; // Skup utf-8 bom + } + } + + // Parse XML declaration ( + xml_node *parse_xml_declaration(Ch *&text) + { + // If parsing of declaration is disabled + if (!(Flags & parse_declaration_node)) + { + // Skip until end of declaration + while (text[0] != Ch('?') || text[1] != Ch('>')) + { + if (!text[0]) + RAPIDXML_PARSE_ERROR("unexpected end of data", text); + ++text; + } + text += 2; // Skip '?>' + return 0; + } + + // Create declaration + xml_node *declaration = this->allocate_node(node_declaration); + + // Skip whitespace before attributes or ?> + skip(text); + + // Parse declaration attributes + parse_node_attributes(text, declaration); + + // Skip ?> + if (text[0] != Ch('?') || text[1] != Ch('>')) + RAPIDXML_PARSE_ERROR("expected ?>", text); + text += 2; + + return declaration; + } + + // Parse XML comment (' + return 0; // Do not produce comment node + } + + // Remember value start + Ch *value = text; + + // Skip until end of comment + while (text[0] != Ch('-') || text[1] != Ch('-') || text[2] != Ch('>')) + { + if (!text[0]) + RAPIDXML_PARSE_ERROR("unexpected end of data", text); + ++text; + } + + // Create comment node + xml_node *comment = this->allocate_node(node_comment); + comment->value(value, text - value); + + // Place zero terminator after comment value + if (!(Flags & parse_no_string_terminators)) + *text = Ch('\0'); + + text += 3; // Skip '-->' + return comment; + } + + // Parse DOCTYPE + template + xml_node *parse_doctype(Ch *&text) + { + // Remember value start + Ch *value = text; + + // Skip to > + while (*text != Ch('>')) + { + // Determine character type + switch (*text) + { + + // If '[' encountered, scan for matching ending ']' using naive algorithm with depth + // This works for all W3C test files except for 2 most wicked + case Ch('['): + { + ++text; // Skip '[' + int depth = 1; + while (depth > 0) + { + switch (*text) + { + case Ch('['): ++depth; break; + case Ch(']'): --depth; break; + case 0: RAPIDXML_PARSE_ERROR("unexpected end of data", text); + } + ++text; + } + break; + } + + // Error on end of text + case Ch('\0'): + RAPIDXML_PARSE_ERROR("unexpected end of data", text); + + // Other character, skip it + default: + ++text; + + } + } + + // If DOCTYPE nodes enabled + if (Flags & parse_doctype_node) + { + // Create a new doctype node + xml_node *doctype = this->allocate_node(node_doctype); + doctype->value(value, text - value); + + // Place zero terminator after value + if (!(Flags & parse_no_string_terminators)) + *text = Ch('\0'); + + text += 1; // skip '>' + return doctype; + } + else + { + text += 1; // skip '>' + return 0; + } + + } + + // Parse PI + template + xml_node *parse_pi(Ch *&text) + { + // If creation of PI nodes is enabled + if (Flags & parse_pi_nodes) + { + // Create pi node + xml_node *pi = this->allocate_node(node_pi); + + // Extract PI target name + Ch *name = text; + skip(text); + if (text == name) + RAPIDXML_PARSE_ERROR("expected PI target", text); + pi->name(name, text - name); + + // Skip whitespace between pi target and pi + skip(text); + + // Remember start of pi + Ch *value = text; + + // Skip to '?>' + while (text[0] != Ch('?') || text[1] != Ch('>')) + { + if (*text == Ch('\0')) + RAPIDXML_PARSE_ERROR("unexpected end of data", text); + ++text; + } + + // Set pi value (verbatim, no entity expansion or whitespace normalization) + pi->value(value, text - value); + + // Place zero terminator after name and value + if (!(Flags & parse_no_string_terminators)) + { + pi->name()[pi->name_size()] = Ch('\0'); + pi->value()[pi->value_size()] = Ch('\0'); + } + + text += 2; // Skip '?>' + return pi; + } + else + { + // Skip to '?>' + while (text[0] != Ch('?') || text[1] != Ch('>')) + { + if (*text == Ch('\0')) + RAPIDXML_PARSE_ERROR("unexpected end of data", text); + ++text; + } + text += 2; // Skip '?>' + return 0; + } + } + + // Parse and append data + // Return character that ends data. + // This is necessary because this character might have been overwritten by a terminating 0 + template + Ch parse_and_append_data(xml_node *node, Ch *&text, Ch *contents_start) + { + // Backup to contents start if whitespace trimming is disabled + if (!(Flags & parse_trim_whitespace)) + text = contents_start; + + // Skip until end of data + Ch *value = text, *end; + if (Flags & parse_normalize_whitespace) + end = skip_and_expand_character_refs(text); + else + end = skip_and_expand_character_refs(text); + + // Trim trailing whitespace if flag is set; leading was already trimmed by whitespace skip after > + if (Flags & parse_trim_whitespace) + { + if (Flags & parse_normalize_whitespace) + { + // Whitespace is already condensed to single space characters by skipping function, so just trim 1 char off the end + if (*(end - 1) == Ch(' ')) + --end; + } + else + { + // Backup until non-whitespace character is found + while (whitespace_pred::test(*(end - 1))) + --end; + } + } + + // If characters are still left between end and value (this test is only necessary if normalization is enabled) + // Create new data node + if (!(Flags & parse_no_data_nodes)) + { + xml_node *data = this->allocate_node(node_data); + data->value(value, end - value); + node->append_node(data); + } + + // Add data to parent node if no data exists yet + if (!(Flags & parse_no_element_values)) + if (*node->value() == Ch('\0')) + node->value(value, end - value); + + // Place zero terminator after value + if (!(Flags & parse_no_string_terminators)) + { + Ch ch = *text; + *end = Ch('\0'); + return ch; // Return character that ends data; this is required because zero terminator overwritten it + } + + // Return character that ends data + return *text; + } + + // Parse CDATA + template + xml_node *parse_cdata(Ch *&text) + { + // If CDATA is disabled + if (Flags & parse_no_data_nodes) + { + // Skip until end of cdata + while (text[0] != Ch(']') || text[1] != Ch(']') || text[2] != Ch('>')) + { + if (!text[0]) + RAPIDXML_PARSE_ERROR("unexpected end of data", text); + ++text; + } + text += 3; // Skip ]]> + return 0; // Do not produce CDATA node + } + + // Skip until end of cdata + Ch *value = text; + while (text[0] != Ch(']') || text[1] != Ch(']') || text[2] != Ch('>')) + { + if (!text[0]) + RAPIDXML_PARSE_ERROR("unexpected end of data", text); + ++text; + } + + // Create new cdata node + xml_node *cdata = this->allocate_node(node_cdata); + cdata->value(value, text - value); + + // Place zero terminator after value + if (!(Flags & parse_no_string_terminators)) + *text = Ch('\0'); + + text += 3; // Skip ]]> + return cdata; + } + + // Parse element node + template + xml_node *parse_element(Ch *&text) + { + // Create element node + xml_node *element = this->allocate_node(node_element); + + // Extract element name + Ch *name = text; + skip(text); + if (text == name) + RAPIDXML_PARSE_ERROR("expected element name", text); + element->name(name, text - name); + + // Skip whitespace between element name and attributes or > + skip(text); + + // Parse attributes, if any + parse_node_attributes(text, element); + + // Determine ending type + if (*text == Ch('>')) + { + ++text; + parse_node_contents(text, element); + } + else if (*text == Ch('/')) + { + ++text; + if (*text != Ch('>')) + RAPIDXML_PARSE_ERROR("expected >", text); + ++text; + } + else + RAPIDXML_PARSE_ERROR("expected >", text); + + // Place zero terminator after name + if (!(Flags & parse_no_string_terminators)) + element->name()[element->name_size()] = Ch('\0'); + + // Return parsed element + return element; + } + + // Determine node type, and parse it + template + xml_node *parse_node(Ch *&text) + { + // Parse proper node type + switch (text[0]) + { + + // <... + default: + // Parse and append element node + return parse_element(text); + + // (text); + } + else + { + // Parse PI + return parse_pi(text); + } + + // (text); + } + break; + + // (text); + } + break; + + // (text); + } + + } // switch + + // Attempt to skip other, unrecognized node types starting with ')) + { + if (*text == 0) + RAPIDXML_PARSE_ERROR("unexpected end of data", text); + ++text; + } + ++text; // Skip '>' + return 0; // No node recognized + + } + } + + // Parse contents of the node - children, data etc. + template + void parse_node_contents(Ch *&text, xml_node *node) + { + // For all children and text + while (1) + { + // Skip whitespace between > and node contents + Ch *contents_start = text; // Store start of node contents before whitespace is skipped + skip(text); + Ch next_char = *text; + + // After data nodes, instead of continuing the loop, control jumps here. + // This is because zero termination inside parse_and_append_data() function + // would wreak havoc with the above code. + // Also, skipping whitespace after data nodes is unnecessary. + after_data_node: + + // Determine what comes next: node closing, child node, data node, or 0? + switch (next_char) + { + + // Node closing or child node + case Ch('<'): + if (text[1] == Ch('/')) + { + // Node closing + text += 2; // Skip '(text); + if (!internal::compare(node->name(), node->name_size(), closing_name, text - closing_name, true)) + RAPIDXML_PARSE_ERROR("invalid closing tag name", text); + } + else + { + // No validation, just skip name + skip(text); + } + // Skip remaining whitespace after node name + skip(text); + if (*text != Ch('>')) + RAPIDXML_PARSE_ERROR("expected >", text); + ++text; // Skip '>' + return; // Node closed, finished parsing contents + } + else + { + // Child node + ++text; // Skip '<' + if (xml_node *child = parse_node(text)) + node->append_node(child); + } + break; + + // End of data - error + case Ch('\0'): + RAPIDXML_PARSE_ERROR("unexpected end of data", text); + + // Data node + default: + next_char = parse_and_append_data(node, text, contents_start); + goto after_data_node; // Bypass regular processing after data nodes + + } + } + } + + // Parse XML attributes of the node + template + void parse_node_attributes(Ch *&text, xml_node *node) + { + // For all attributes + while (attribute_name_pred::test(*text)) + { + // Extract attribute name + Ch *name = text; + ++text; // Skip first character of attribute name + skip(text); + if (text == name) + RAPIDXML_PARSE_ERROR("expected attribute name", name); + + // Create new attribute + xml_attribute *attribute = this->allocate_attribute(); + attribute->name(name, text - name); + node->append_attribute(attribute); + + // Skip whitespace after attribute name + skip(text); + + // Skip = + if (*text != Ch('=')) + RAPIDXML_PARSE_ERROR("expected =", text); + ++text; + + // Add terminating zero after name + if (!(Flags & parse_no_string_terminators)) + attribute->name()[attribute->name_size()] = 0; + + // Skip whitespace after = + skip(text); + + // Skip quote and remember if it was ' or " + Ch quote = *text; + if (quote != Ch('\'') && quote != Ch('"')) + RAPIDXML_PARSE_ERROR("expected ' or \"", text); + ++text; + + // Extract attribute value and expand char refs in it + Ch *value = text, *end; + const int AttFlags = Flags & ~parse_normalize_whitespace; // No whitespace normalization in attributes + if (quote == Ch('\'')) + end = skip_and_expand_character_refs, attribute_value_pure_pred, AttFlags>(text); + else + end = skip_and_expand_character_refs, attribute_value_pure_pred, AttFlags>(text); + + // Set attribute value + attribute->value(value, end - value); + + // Make sure that end quote is present + if (*text != quote) + RAPIDXML_PARSE_ERROR("expected ' or \"", text); + ++text; // Skip quote + + // Add terminating zero after value + if (!(Flags & parse_no_string_terminators)) + attribute->value()[attribute->value_size()] = 0; + + // Skip whitespace after attribute value + skip(text); + } + } + + }; + + //! \cond internal + namespace internal + { + + // Whitespace (space \n \r \t) + template + const unsigned char lookup_tables::lookup_whitespace[256] = + { + // 0 1 2 3 4 5 6 7 8 9 A B C D E F + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, // 0 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1 + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 2 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 3 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 4 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 5 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 6 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 7 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // A + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // B + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // C + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // D + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // E + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 // F + }; + + // Node name (anything but space \n \r \t / > ? \0) + template + const unsigned char lookup_tables::lookup_node_name[256] = + { + // 0 1 2 3 4 5 6 7 8 9 A B C D E F + 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, // 0 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 1 + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, // 2 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, // 3 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 4 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 5 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 6 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 7 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 8 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 9 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // A + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // B + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // C + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // D + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // E + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // F + }; + + // Text (i.e. PCDATA) (anything but < \0) + template + const unsigned char lookup_tables::lookup_text[256] = + { + // 0 1 2 3 4 5 6 7 8 9 A B C D E F + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 1 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 2 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, // 3 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 4 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 5 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 6 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 7 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 8 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 9 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // A + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // B + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // C + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // D + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // E + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // F + }; + + // Text (i.e. PCDATA) that does not require processing when ws normalization is disabled + // (anything but < \0 &) + template + const unsigned char lookup_tables::lookup_text_pure_no_ws[256] = + { + // 0 1 2 3 4 5 6 7 8 9 A B C D E F + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 1 + 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 2 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, // 3 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 4 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 5 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 6 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 7 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 8 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 9 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // A + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // B + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // C + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // D + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // E + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // F + }; + + // Text (i.e. PCDATA) that does not require processing when ws normalizationis is enabled + // (anything but < \0 & space \n \r \t) + template + const unsigned char lookup_tables::lookup_text_pure_with_ws[256] = + { + // 0 1 2 3 4 5 6 7 8 9 A B C D E F + 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, // 0 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 1 + 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 2 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, // 3 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 4 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 5 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 6 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 7 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 8 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 9 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // A + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // B + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // C + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // D + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // E + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // F + }; + + // Attribute name (anything but space \n \r \t / < > = ? ! \0) + template + const unsigned char lookup_tables::lookup_attribute_name[256] = + { + // 0 1 2 3 4 5 6 7 8 9 A B C D E F + 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, // 0 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 1 + 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, // 2 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, // 3 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 4 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 5 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 6 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 7 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 8 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 9 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // A + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // B + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // C + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // D + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // E + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // F + }; + + // Attribute data with single quote (anything but ' \0) + template + const unsigned char lookup_tables::lookup_attribute_data_1[256] = + { + // 0 1 2 3 4 5 6 7 8 9 A B C D E F + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 1 + 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, // 2 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 3 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 4 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 5 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 6 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 7 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 8 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 9 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // A + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // B + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // C + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // D + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // E + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // F + }; + + // Attribute data with single quote that does not require processing (anything but ' \0 &) + template + const unsigned char lookup_tables::lookup_attribute_data_1_pure[256] = + { + // 0 1 2 3 4 5 6 7 8 9 A B C D E F + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 1 + 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, // 2 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 3 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 4 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 5 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 6 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 7 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 8 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 9 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // A + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // B + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // C + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // D + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // E + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // F + }; + + // Attribute data with double quote (anything but " \0) + template + const unsigned char lookup_tables::lookup_attribute_data_2[256] = + { + // 0 1 2 3 4 5 6 7 8 9 A B C D E F + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 1 + 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 2 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 3 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 4 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 5 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 6 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 7 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 8 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 9 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // A + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // B + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // C + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // D + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // E + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // F + }; + + // Attribute data with double quote that does not require processing (anything but " \0 &) + template + const unsigned char lookup_tables::lookup_attribute_data_2_pure[256] = + { + // 0 1 2 3 4 5 6 7 8 9 A B C D E F + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 1 + 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 2 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 3 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 4 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 5 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 6 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 7 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 8 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 9 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // A + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // B + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // C + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // D + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // E + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // F + }; + + // Digits (dec and hex, 255 denotes end of numeric character reference) + template + const unsigned char lookup_tables::lookup_digits[256] = + { + // 0 1 2 3 4 5 6 7 8 9 A B C D E F + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // 0 + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // 1 + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // 2 + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,255,255,255,255,255,255, // 3 + 255, 10, 11, 12, 13, 14, 15,255,255,255,255,255,255,255,255,255, // 4 + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // 5 + 255, 10, 11, 12, 13, 14, 15,255,255,255,255,255,255,255,255,255, // 6 + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // 7 + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // 8 + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // 9 + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // A + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // B + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // C + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // D + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // E + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255 // F + }; + + // Upper case conversion + template + const unsigned char lookup_tables::lookup_upcase[256] = + { + // 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A B C D E F + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, // 0 + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, // 1 + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, // 2 + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, // 3 + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, // 4 + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, // 5 + 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, // 6 + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 123,124,125,126,127, // 7 + 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143, // 8 + 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159, // 9 + 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175, // A + 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191, // B + 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207, // C + 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223, // D + 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239, // E + 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255 // F + }; + } + //! \endcond + +} + +// Undefine internal macros +#undef RAPIDXML_PARSE_ERROR + +// On MSVC, restore warnings state +#ifdef _MSC_VER + #pragma warning(pop) +#endif + +#endif diff --git a/xml_converter/src/rapidxml-1.13/rapidxml_iterators.hpp b/xml_converter/src/rapidxml-1.13/rapidxml_iterators.hpp index 85c58946..52ebc298 100644 --- a/xml_converter/src/rapidxml-1.13/rapidxml_iterators.hpp +++ b/xml_converter/src/rapidxml-1.13/rapidxml_iterators.hpp @@ -1,174 +1,174 @@ -#ifndef RAPIDXML_ITERATORS_HPP_INCLUDED -#define RAPIDXML_ITERATORS_HPP_INCLUDED - -// Copyright (C) 2006, 2009 Marcin Kalicinski -// Version 1.13 -// Revision $DateTime: 2009/05/13 01:46:17 $ -//! \file rapidxml_iterators.hpp This file contains rapidxml iterators - -#include "rapidxml.hpp" - -namespace rapidxml -{ - - //! Iterator of child nodes of xml_node - template - class node_iterator - { - - public: - - typedef typename xml_node value_type; - typedef typename xml_node &reference; - typedef typename xml_node *pointer; - typedef std::ptrdiff_t difference_type; - typedef std::bidirectional_iterator_tag iterator_category; - - node_iterator() - : m_node(0) - { - } - - node_iterator(xml_node *node) - : m_node(node->first_node()) - { - } - - reference operator *() const - { - assert(m_node); - return *m_node; - } - - pointer operator->() const - { - assert(m_node); - return m_node; - } - - node_iterator& operator++() - { - assert(m_node); - m_node = m_node->next_sibling(); - return *this; - } - - node_iterator operator++(int) - { - node_iterator tmp = *this; - ++this; - return tmp; - } - - node_iterator& operator--() - { - assert(m_node && m_node->previous_sibling()); - m_node = m_node->previous_sibling(); - return *this; - } - - node_iterator operator--(int) - { - node_iterator tmp = *this; - ++this; - return tmp; - } - - bool operator ==(const node_iterator &rhs) - { - return m_node == rhs.m_node; - } - - bool operator !=(const node_iterator &rhs) - { - return m_node != rhs.m_node; - } - - private: - - xml_node *m_node; - - }; - - //! Iterator of child attributes of xml_node - template - class attribute_iterator - { - - public: - - typedef typename xml_attribute value_type; - typedef typename xml_attribute &reference; - typedef typename xml_attribute *pointer; - typedef std::ptrdiff_t difference_type; - typedef std::bidirectional_iterator_tag iterator_category; - - attribute_iterator() - : m_attribute(0) - { - } - - attribute_iterator(xml_node *node) - : m_attribute(node->first_attribute()) - { - } - - reference operator *() const - { - assert(m_attribute); - return *m_attribute; - } - - pointer operator->() const - { - assert(m_attribute); - return m_attribute; - } - - attribute_iterator& operator++() - { - assert(m_attribute); - m_attribute = m_attribute->next_attribute(); - return *this; - } - - attribute_iterator operator++(int) - { - attribute_iterator tmp = *this; - ++this; - return tmp; - } - - attribute_iterator& operator--() - { - assert(m_attribute && m_attribute->previous_attribute()); - m_attribute = m_attribute->previous_attribute(); - return *this; - } - - attribute_iterator operator--(int) - { - attribute_iterator tmp = *this; - ++this; - return tmp; - } - - bool operator ==(const attribute_iterator &rhs) - { - return m_attribute == rhs.m_attribute; - } - - bool operator !=(const attribute_iterator &rhs) - { - return m_attribute != rhs.m_attribute; - } - - private: - - xml_attribute *m_attribute; - - }; - -} - -#endif +#ifndef RAPIDXML_ITERATORS_HPP_INCLUDED +#define RAPIDXML_ITERATORS_HPP_INCLUDED + +// Copyright (C) 2006, 2009 Marcin Kalicinski +// Version 1.13 +// Revision $DateTime: 2009/05/13 01:46:17 $ +//! \file rapidxml_iterators.hpp This file contains rapidxml iterators + +#include "rapidxml.hpp" + +namespace rapidxml +{ + + //! Iterator of child nodes of xml_node + template + class node_iterator + { + + public: + + typedef typename xml_node value_type; + typedef typename xml_node &reference; + typedef typename xml_node *pointer; + typedef std::ptrdiff_t difference_type; + typedef std::bidirectional_iterator_tag iterator_category; + + node_iterator() + : m_node(0) + { + } + + node_iterator(xml_node *node) + : m_node(node->first_node()) + { + } + + reference operator *() const + { + assert(m_node); + return *m_node; + } + + pointer operator->() const + { + assert(m_node); + return m_node; + } + + node_iterator& operator++() + { + assert(m_node); + m_node = m_node->next_sibling(); + return *this; + } + + node_iterator operator++(int) + { + node_iterator tmp = *this; + ++this; + return tmp; + } + + node_iterator& operator--() + { + assert(m_node && m_node->previous_sibling()); + m_node = m_node->previous_sibling(); + return *this; + } + + node_iterator operator--(int) + { + node_iterator tmp = *this; + ++this; + return tmp; + } + + bool operator ==(const node_iterator &rhs) + { + return m_node == rhs.m_node; + } + + bool operator !=(const node_iterator &rhs) + { + return m_node != rhs.m_node; + } + + private: + + xml_node *m_node; + + }; + + //! Iterator of child attributes of xml_node + template + class attribute_iterator + { + + public: + + typedef typename xml_attribute value_type; + typedef typename xml_attribute &reference; + typedef typename xml_attribute *pointer; + typedef std::ptrdiff_t difference_type; + typedef std::bidirectional_iterator_tag iterator_category; + + attribute_iterator() + : m_attribute(0) + { + } + + attribute_iterator(xml_node *node) + : m_attribute(node->first_attribute()) + { + } + + reference operator *() const + { + assert(m_attribute); + return *m_attribute; + } + + pointer operator->() const + { + assert(m_attribute); + return m_attribute; + } + + attribute_iterator& operator++() + { + assert(m_attribute); + m_attribute = m_attribute->next_attribute(); + return *this; + } + + attribute_iterator operator++(int) + { + attribute_iterator tmp = *this; + ++this; + return tmp; + } + + attribute_iterator& operator--() + { + assert(m_attribute && m_attribute->previous_attribute()); + m_attribute = m_attribute->previous_attribute(); + return *this; + } + + attribute_iterator operator--(int) + { + attribute_iterator tmp = *this; + ++this; + return tmp; + } + + bool operator ==(const attribute_iterator &rhs) + { + return m_attribute == rhs.m_attribute; + } + + bool operator !=(const attribute_iterator &rhs) + { + return m_attribute != rhs.m_attribute; + } + + private: + + xml_attribute *m_attribute; + + }; + +} + +#endif diff --git a/xml_converter/src/rapidxml-1.13/rapidxml_print.hpp b/xml_converter/src/rapidxml-1.13/rapidxml_print.hpp index d03d5f5b..0ae2b14f 100644 --- a/xml_converter/src/rapidxml-1.13/rapidxml_print.hpp +++ b/xml_converter/src/rapidxml-1.13/rapidxml_print.hpp @@ -1,421 +1,421 @@ -#ifndef RAPIDXML_PRINT_HPP_INCLUDED -#define RAPIDXML_PRINT_HPP_INCLUDED - -// Copyright (C) 2006, 2009 Marcin Kalicinski -// Version 1.13 -// Revision $DateTime: 2009/05/13 01:46:17 $ -//! \file rapidxml_print.hpp This file contains rapidxml printer implementation - -#include "rapidxml.hpp" - -// Only include streams if not disabled -#ifndef RAPIDXML_NO_STREAMS - #include - #include -#endif - -namespace rapidxml -{ - - /////////////////////////////////////////////////////////////////////// - // Printing flags - - const int print_no_indenting = 0x1; //!< Printer flag instructing the printer to suppress indenting of XML. See print() function. - - /////////////////////////////////////////////////////////////////////// - // Internal - - //! \cond internal - namespace internal - { - - /////////////////////////////////////////////////////////////////////////// - // Internal character operations - - // Copy characters from given range to given output iterator - template - inline OutIt copy_chars(const Ch *begin, const Ch *end, OutIt out) - { - while (begin != end) - *out++ = *begin++; - return out; - } - - // Copy characters from given range to given output iterator and expand - // characters into references (< > ' " &) - template - inline OutIt copy_and_expand_chars(const Ch *begin, const Ch *end, Ch noexpand, OutIt out) - { - while (begin != end) - { - if (*begin == noexpand) - { - *out++ = *begin; // No expansion, copy character - } - else - { - switch (*begin) - { - case Ch('<'): - *out++ = Ch('&'); *out++ = Ch('l'); *out++ = Ch('t'); *out++ = Ch(';'); - break; - case Ch('>'): - *out++ = Ch('&'); *out++ = Ch('g'); *out++ = Ch('t'); *out++ = Ch(';'); - break; - case Ch('\''): - *out++ = Ch('&'); *out++ = Ch('a'); *out++ = Ch('p'); *out++ = Ch('o'); *out++ = Ch('s'); *out++ = Ch(';'); - break; - case Ch('"'): - *out++ = Ch('&'); *out++ = Ch('q'); *out++ = Ch('u'); *out++ = Ch('o'); *out++ = Ch('t'); *out++ = Ch(';'); - break; - case Ch('&'): - *out++ = Ch('&'); *out++ = Ch('a'); *out++ = Ch('m'); *out++ = Ch('p'); *out++ = Ch(';'); - break; - default: - *out++ = *begin; // No expansion, copy character - } - } - ++begin; // Step to next character - } - return out; - } - - // Fill given output iterator with repetitions of the same character - template - inline OutIt fill_chars(OutIt out, int n, Ch ch) - { - for (int i = 0; i < n; ++i) - *out++ = ch; - return out; - } - - // Find character - template - inline bool find_char(const Ch *begin, const Ch *end) - { - while (begin != end) - if (*begin++ == ch) - return true; - return false; - } - - /////////////////////////////////////////////////////////////////////////// - // Internal printing operations - - // Print node - template - inline OutIt print_node(OutIt out, const xml_node *node, int flags, int indent) - { - // Print proper node type - switch (node->type()) - { - - // Document - case node_document: - out = print_children(out, node, flags, indent); - break; - - // Element - case node_element: - out = print_element_node(out, node, flags, indent); - break; - - // Data - case node_data: - out = print_data_node(out, node, flags, indent); - break; - - // CDATA - case node_cdata: - out = print_cdata_node(out, node, flags, indent); - break; - - // Declaration - case node_declaration: - out = print_declaration_node(out, node, flags, indent); - break; - - // Comment - case node_comment: - out = print_comment_node(out, node, flags, indent); - break; - - // Doctype - case node_doctype: - out = print_doctype_node(out, node, flags, indent); - break; - - // Pi - case node_pi: - out = print_pi_node(out, node, flags, indent); - break; - - // Unknown - default: - assert(0); - break; - } - - // If indenting not disabled, add line break after node - if (!(flags & print_no_indenting)) - *out = Ch('\n'), ++out; - - // Return modified iterator - return out; - } - - // Print children of the node - template - inline OutIt print_children(OutIt out, const xml_node *node, int flags, int indent) - { - for (xml_node *child = node->first_node(); child; child = child->next_sibling()) - out = print_node(out, child, flags, indent); - return out; - } - - // Print attributes of the node - template - inline OutIt print_attributes(OutIt out, const xml_node *node, int flags) - { - for (xml_attribute *attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()) - { - if (attribute->name() && attribute->value()) - { - // Print attribute name - *out = Ch(' '), ++out; - out = copy_chars(attribute->name(), attribute->name() + attribute->name_size(), out); - *out = Ch('='), ++out; - // Print attribute value using appropriate quote type - if (find_char(attribute->value(), attribute->value() + attribute->value_size())) - { - *out = Ch('\''), ++out; - out = copy_and_expand_chars(attribute->value(), attribute->value() + attribute->value_size(), Ch('"'), out); - *out = Ch('\''), ++out; - } - else - { - *out = Ch('"'), ++out; - out = copy_and_expand_chars(attribute->value(), attribute->value() + attribute->value_size(), Ch('\''), out); - *out = Ch('"'), ++out; - } - } - } - return out; - } - - // Print data node - template - inline OutIt print_data_node(OutIt out, const xml_node *node, int flags, int indent) - { - assert(node->type() == node_data); - if (!(flags & print_no_indenting)) - out = fill_chars(out, indent, Ch('\t')); - out = copy_and_expand_chars(node->value(), node->value() + node->value_size(), Ch(0), out); - return out; - } - - // Print data node - template - inline OutIt print_cdata_node(OutIt out, const xml_node *node, int flags, int indent) - { - assert(node->type() == node_cdata); - if (!(flags & print_no_indenting)) - out = fill_chars(out, indent, Ch('\t')); - *out = Ch('<'); ++out; - *out = Ch('!'); ++out; - *out = Ch('['); ++out; - *out = Ch('C'); ++out; - *out = Ch('D'); ++out; - *out = Ch('A'); ++out; - *out = Ch('T'); ++out; - *out = Ch('A'); ++out; - *out = Ch('['); ++out; - out = copy_chars(node->value(), node->value() + node->value_size(), out); - *out = Ch(']'); ++out; - *out = Ch(']'); ++out; - *out = Ch('>'); ++out; - return out; - } - - // Print element node - template - inline OutIt print_element_node(OutIt out, const xml_node *node, int flags, int indent) - { - assert(node->type() == node_element); - - // Print element name and attributes, if any - if (!(flags & print_no_indenting)) - out = fill_chars(out, indent, Ch('\t')); - *out = Ch('<'), ++out; - out = copy_chars(node->name(), node->name() + node->name_size(), out); - out = print_attributes(out, node, flags); - - // If node is childless - if (node->value_size() == 0 && !node->first_node()) - { - // Print childless node tag ending - *out = Ch('/'), ++out; - *out = Ch('>'), ++out; - } - else - { - // Print normal node tag ending - *out = Ch('>'), ++out; - - // Test if node contains a single data node only (and no other nodes) - xml_node *child = node->first_node(); - if (!child) - { - // If node has no children, only print its value without indenting - out = copy_and_expand_chars(node->value(), node->value() + node->value_size(), Ch(0), out); - } - else if (child->next_sibling() == 0 && child->type() == node_data) - { - // If node has a sole data child, only print its value without indenting - out = copy_and_expand_chars(child->value(), child->value() + child->value_size(), Ch(0), out); - } - else - { - // Print all children with full indenting - if (!(flags & print_no_indenting)) - *out = Ch('\n'), ++out; - out = print_children(out, node, flags, indent + 1); - if (!(flags & print_no_indenting)) - out = fill_chars(out, indent, Ch('\t')); - } - - // Print node end - *out = Ch('<'), ++out; - *out = Ch('/'), ++out; - out = copy_chars(node->name(), node->name() + node->name_size(), out); - *out = Ch('>'), ++out; - } - return out; - } - - // Print declaration node - template - inline OutIt print_declaration_node(OutIt out, const xml_node *node, int flags, int indent) - { - // Print declaration start - if (!(flags & print_no_indenting)) - out = fill_chars(out, indent, Ch('\t')); - *out = Ch('<'), ++out; - *out = Ch('?'), ++out; - *out = Ch('x'), ++out; - *out = Ch('m'), ++out; - *out = Ch('l'), ++out; - - // Print attributes - out = print_attributes(out, node, flags); - - // Print declaration end - *out = Ch('?'), ++out; - *out = Ch('>'), ++out; - - return out; - } - - // Print comment node - template - inline OutIt print_comment_node(OutIt out, const xml_node *node, int flags, int indent) - { - assert(node->type() == node_comment); - if (!(flags & print_no_indenting)) - out = fill_chars(out, indent, Ch('\t')); - *out = Ch('<'), ++out; - *out = Ch('!'), ++out; - *out = Ch('-'), ++out; - *out = Ch('-'), ++out; - out = copy_chars(node->value(), node->value() + node->value_size(), out); - *out = Ch('-'), ++out; - *out = Ch('-'), ++out; - *out = Ch('>'), ++out; - return out; - } - - // Print doctype node - template - inline OutIt print_doctype_node(OutIt out, const xml_node *node, int flags, int indent) - { - assert(node->type() == node_doctype); - if (!(flags & print_no_indenting)) - out = fill_chars(out, indent, Ch('\t')); - *out = Ch('<'), ++out; - *out = Ch('!'), ++out; - *out = Ch('D'), ++out; - *out = Ch('O'), ++out; - *out = Ch('C'), ++out; - *out = Ch('T'), ++out; - *out = Ch('Y'), ++out; - *out = Ch('P'), ++out; - *out = Ch('E'), ++out; - *out = Ch(' '), ++out; - out = copy_chars(node->value(), node->value() + node->value_size(), out); - *out = Ch('>'), ++out; - return out; - } - - // Print pi node - template - inline OutIt print_pi_node(OutIt out, const xml_node *node, int flags, int indent) - { - assert(node->type() == node_pi); - if (!(flags & print_no_indenting)) - out = fill_chars(out, indent, Ch('\t')); - *out = Ch('<'), ++out; - *out = Ch('?'), ++out; - out = copy_chars(node->name(), node->name() + node->name_size(), out); - *out = Ch(' '), ++out; - out = copy_chars(node->value(), node->value() + node->value_size(), out); - *out = Ch('?'), ++out; - *out = Ch('>'), ++out; - return out; - } - - } - //! \endcond - - /////////////////////////////////////////////////////////////////////////// - // Printing - - //! Prints XML to given output iterator. - //! \param out Output iterator to print to. - //! \param node Node to be printed. Pass xml_document to print entire document. - //! \param flags Flags controlling how XML is printed. - //! \return Output iterator pointing to position immediately after last character of printed text. - template - inline OutIt print(OutIt out, const xml_node &node, int flags = 0) - { - return internal::print_node(out, &node, flags, 0); - } - -#ifndef RAPIDXML_NO_STREAMS - - //! Prints XML to given output stream. - //! \param out Output stream to print to. - //! \param node Node to be printed. Pass xml_document to print entire document. - //! \param flags Flags controlling how XML is printed. - //! \return Output stream. - template - inline std::basic_ostream &print(std::basic_ostream &out, const xml_node &node, int flags = 0) - { - print(std::ostream_iterator(out), node, flags); - return out; - } - - //! Prints formatted XML to given output stream. Uses default printing flags. Use print() function to customize printing process. - //! \param out Output stream to print to. - //! \param node Node to be printed. - //! \return Output stream. - template - inline std::basic_ostream &operator <<(std::basic_ostream &out, const xml_node &node) - { - return print(out, node); - } - -#endif - -} - -#endif +#ifndef RAPIDXML_PRINT_HPP_INCLUDED +#define RAPIDXML_PRINT_HPP_INCLUDED + +// Copyright (C) 2006, 2009 Marcin Kalicinski +// Version 1.13 +// Revision $DateTime: 2009/05/13 01:46:17 $ +//! \file rapidxml_print.hpp This file contains rapidxml printer implementation + +#include "rapidxml.hpp" + +// Only include streams if not disabled +#ifndef RAPIDXML_NO_STREAMS + #include + #include +#endif + +namespace rapidxml +{ + + /////////////////////////////////////////////////////////////////////// + // Printing flags + + const int print_no_indenting = 0x1; //!< Printer flag instructing the printer to suppress indenting of XML. See print() function. + + /////////////////////////////////////////////////////////////////////// + // Internal + + //! \cond internal + namespace internal + { + + /////////////////////////////////////////////////////////////////////////// + // Internal character operations + + // Copy characters from given range to given output iterator + template + inline OutIt copy_chars(const Ch *begin, const Ch *end, OutIt out) + { + while (begin != end) + *out++ = *begin++; + return out; + } + + // Copy characters from given range to given output iterator and expand + // characters into references (< > ' " &) + template + inline OutIt copy_and_expand_chars(const Ch *begin, const Ch *end, Ch noexpand, OutIt out) + { + while (begin != end) + { + if (*begin == noexpand) + { + *out++ = *begin; // No expansion, copy character + } + else + { + switch (*begin) + { + case Ch('<'): + *out++ = Ch('&'); *out++ = Ch('l'); *out++ = Ch('t'); *out++ = Ch(';'); + break; + case Ch('>'): + *out++ = Ch('&'); *out++ = Ch('g'); *out++ = Ch('t'); *out++ = Ch(';'); + break; + case Ch('\''): + *out++ = Ch('&'); *out++ = Ch('a'); *out++ = Ch('p'); *out++ = Ch('o'); *out++ = Ch('s'); *out++ = Ch(';'); + break; + case Ch('"'): + *out++ = Ch('&'); *out++ = Ch('q'); *out++ = Ch('u'); *out++ = Ch('o'); *out++ = Ch('t'); *out++ = Ch(';'); + break; + case Ch('&'): + *out++ = Ch('&'); *out++ = Ch('a'); *out++ = Ch('m'); *out++ = Ch('p'); *out++ = Ch(';'); + break; + default: + *out++ = *begin; // No expansion, copy character + } + } + ++begin; // Step to next character + } + return out; + } + + // Fill given output iterator with repetitions of the same character + template + inline OutIt fill_chars(OutIt out, int n, Ch ch) + { + for (int i = 0; i < n; ++i) + *out++ = ch; + return out; + } + + // Find character + template + inline bool find_char(const Ch *begin, const Ch *end) + { + while (begin != end) + if (*begin++ == ch) + return true; + return false; + } + + /////////////////////////////////////////////////////////////////////////// + // Internal printing operations + + // Print node + template + inline OutIt print_node(OutIt out, const xml_node *node, int flags, int indent) + { + // Print proper node type + switch (node->type()) + { + + // Document + case node_document: + out = print_children(out, node, flags, indent); + break; + + // Element + case node_element: + out = print_element_node(out, node, flags, indent); + break; + + // Data + case node_data: + out = print_data_node(out, node, flags, indent); + break; + + // CDATA + case node_cdata: + out = print_cdata_node(out, node, flags, indent); + break; + + // Declaration + case node_declaration: + out = print_declaration_node(out, node, flags, indent); + break; + + // Comment + case node_comment: + out = print_comment_node(out, node, flags, indent); + break; + + // Doctype + case node_doctype: + out = print_doctype_node(out, node, flags, indent); + break; + + // Pi + case node_pi: + out = print_pi_node(out, node, flags, indent); + break; + + // Unknown + default: + assert(0); + break; + } + + // If indenting not disabled, add line break after node + if (!(flags & print_no_indenting)) + *out = Ch('\n'), ++out; + + // Return modified iterator + return out; + } + + // Print children of the node + template + inline OutIt print_children(OutIt out, const xml_node *node, int flags, int indent) + { + for (xml_node *child = node->first_node(); child; child = child->next_sibling()) + out = print_node(out, child, flags, indent); + return out; + } + + // Print attributes of the node + template + inline OutIt print_attributes(OutIt out, const xml_node *node, int flags) + { + for (xml_attribute *attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()) + { + if (attribute->name() && attribute->value()) + { + // Print attribute name + *out = Ch(' '), ++out; + out = copy_chars(attribute->name(), attribute->name() + attribute->name_size(), out); + *out = Ch('='), ++out; + // Print attribute value using appropriate quote type + if (find_char(attribute->value(), attribute->value() + attribute->value_size())) + { + *out = Ch('\''), ++out; + out = copy_and_expand_chars(attribute->value(), attribute->value() + attribute->value_size(), Ch('"'), out); + *out = Ch('\''), ++out; + } + else + { + *out = Ch('"'), ++out; + out = copy_and_expand_chars(attribute->value(), attribute->value() + attribute->value_size(), Ch('\''), out); + *out = Ch('"'), ++out; + } + } + } + return out; + } + + // Print data node + template + inline OutIt print_data_node(OutIt out, const xml_node *node, int flags, int indent) + { + assert(node->type() == node_data); + if (!(flags & print_no_indenting)) + out = fill_chars(out, indent, Ch('\t')); + out = copy_and_expand_chars(node->value(), node->value() + node->value_size(), Ch(0), out); + return out; + } + + // Print data node + template + inline OutIt print_cdata_node(OutIt out, const xml_node *node, int flags, int indent) + { + assert(node->type() == node_cdata); + if (!(flags & print_no_indenting)) + out = fill_chars(out, indent, Ch('\t')); + *out = Ch('<'); ++out; + *out = Ch('!'); ++out; + *out = Ch('['); ++out; + *out = Ch('C'); ++out; + *out = Ch('D'); ++out; + *out = Ch('A'); ++out; + *out = Ch('T'); ++out; + *out = Ch('A'); ++out; + *out = Ch('['); ++out; + out = copy_chars(node->value(), node->value() + node->value_size(), out); + *out = Ch(']'); ++out; + *out = Ch(']'); ++out; + *out = Ch('>'); ++out; + return out; + } + + // Print element node + template + inline OutIt print_element_node(OutIt out, const xml_node *node, int flags, int indent) + { + assert(node->type() == node_element); + + // Print element name and attributes, if any + if (!(flags & print_no_indenting)) + out = fill_chars(out, indent, Ch('\t')); + *out = Ch('<'), ++out; + out = copy_chars(node->name(), node->name() + node->name_size(), out); + out = print_attributes(out, node, flags); + + // If node is childless + if (node->value_size() == 0 && !node->first_node()) + { + // Print childless node tag ending + *out = Ch('/'), ++out; + *out = Ch('>'), ++out; + } + else + { + // Print normal node tag ending + *out = Ch('>'), ++out; + + // Test if node contains a single data node only (and no other nodes) + xml_node *child = node->first_node(); + if (!child) + { + // If node has no children, only print its value without indenting + out = copy_and_expand_chars(node->value(), node->value() + node->value_size(), Ch(0), out); + } + else if (child->next_sibling() == 0 && child->type() == node_data) + { + // If node has a sole data child, only print its value without indenting + out = copy_and_expand_chars(child->value(), child->value() + child->value_size(), Ch(0), out); + } + else + { + // Print all children with full indenting + if (!(flags & print_no_indenting)) + *out = Ch('\n'), ++out; + out = print_children(out, node, flags, indent + 1); + if (!(flags & print_no_indenting)) + out = fill_chars(out, indent, Ch('\t')); + } + + // Print node end + *out = Ch('<'), ++out; + *out = Ch('/'), ++out; + out = copy_chars(node->name(), node->name() + node->name_size(), out); + *out = Ch('>'), ++out; + } + return out; + } + + // Print declaration node + template + inline OutIt print_declaration_node(OutIt out, const xml_node *node, int flags, int indent) + { + // Print declaration start + if (!(flags & print_no_indenting)) + out = fill_chars(out, indent, Ch('\t')); + *out = Ch('<'), ++out; + *out = Ch('?'), ++out; + *out = Ch('x'), ++out; + *out = Ch('m'), ++out; + *out = Ch('l'), ++out; + + // Print attributes + out = print_attributes(out, node, flags); + + // Print declaration end + *out = Ch('?'), ++out; + *out = Ch('>'), ++out; + + return out; + } + + // Print comment node + template + inline OutIt print_comment_node(OutIt out, const xml_node *node, int flags, int indent) + { + assert(node->type() == node_comment); + if (!(flags & print_no_indenting)) + out = fill_chars(out, indent, Ch('\t')); + *out = Ch('<'), ++out; + *out = Ch('!'), ++out; + *out = Ch('-'), ++out; + *out = Ch('-'), ++out; + out = copy_chars(node->value(), node->value() + node->value_size(), out); + *out = Ch('-'), ++out; + *out = Ch('-'), ++out; + *out = Ch('>'), ++out; + return out; + } + + // Print doctype node + template + inline OutIt print_doctype_node(OutIt out, const xml_node *node, int flags, int indent) + { + assert(node->type() == node_doctype); + if (!(flags & print_no_indenting)) + out = fill_chars(out, indent, Ch('\t')); + *out = Ch('<'), ++out; + *out = Ch('!'), ++out; + *out = Ch('D'), ++out; + *out = Ch('O'), ++out; + *out = Ch('C'), ++out; + *out = Ch('T'), ++out; + *out = Ch('Y'), ++out; + *out = Ch('P'), ++out; + *out = Ch('E'), ++out; + *out = Ch(' '), ++out; + out = copy_chars(node->value(), node->value() + node->value_size(), out); + *out = Ch('>'), ++out; + return out; + } + + // Print pi node + template + inline OutIt print_pi_node(OutIt out, const xml_node *node, int flags, int indent) + { + assert(node->type() == node_pi); + if (!(flags & print_no_indenting)) + out = fill_chars(out, indent, Ch('\t')); + *out = Ch('<'), ++out; + *out = Ch('?'), ++out; + out = copy_chars(node->name(), node->name() + node->name_size(), out); + *out = Ch(' '), ++out; + out = copy_chars(node->value(), node->value() + node->value_size(), out); + *out = Ch('?'), ++out; + *out = Ch('>'), ++out; + return out; + } + + } + //! \endcond + + /////////////////////////////////////////////////////////////////////////// + // Printing + + //! Prints XML to given output iterator. + //! \param out Output iterator to print to. + //! \param node Node to be printed. Pass xml_document to print entire document. + //! \param flags Flags controlling how XML is printed. + //! \return Output iterator pointing to position immediately after last character of printed text. + template + inline OutIt print(OutIt out, const xml_node &node, int flags = 0) + { + return internal::print_node(out, &node, flags, 0); + } + +#ifndef RAPIDXML_NO_STREAMS + + //! Prints XML to given output stream. + //! \param out Output stream to print to. + //! \param node Node to be printed. Pass xml_document to print entire document. + //! \param flags Flags controlling how XML is printed. + //! \return Output stream. + template + inline std::basic_ostream &print(std::basic_ostream &out, const xml_node &node, int flags = 0) + { + print(std::ostream_iterator(out), node, flags); + return out; + } + + //! Prints formatted XML to given output stream. Uses default printing flags. Use print() function to customize printing process. + //! \param out Output stream to print to. + //! \param node Node to be printed. + //! \return Output stream. + template + inline std::basic_ostream &operator <<(std::basic_ostream &out, const xml_node &node) + { + return print(out, node); + } + +#endif + +} + +#endif diff --git a/xml_converter/src/rapidxml-1.13/rapidxml_utils.hpp b/xml_converter/src/rapidxml-1.13/rapidxml_utils.hpp index 5eafa35d..37c29535 100644 --- a/xml_converter/src/rapidxml-1.13/rapidxml_utils.hpp +++ b/xml_converter/src/rapidxml-1.13/rapidxml_utils.hpp @@ -1,122 +1,122 @@ -#ifndef RAPIDXML_UTILS_HPP_INCLUDED -#define RAPIDXML_UTILS_HPP_INCLUDED - -// Copyright (C) 2006, 2009 Marcin Kalicinski -// Version 1.13 -// Revision $DateTime: 2009/05/13 01:46:17 $ -//! \file rapidxml_utils.hpp This file contains high-level rapidxml utilities that can be useful -//! in certain simple scenarios. They should probably not be used if maximizing performance is the main objective. - -#include "rapidxml.hpp" -#include -#include -#include -#include - -namespace rapidxml -{ - - //! Represents data loaded from a file - template - class file - { - - public: - - //! Loads file into the memory. Data will be automatically destroyed by the destructor. - //! \param filename Filename to load. - file(const char *filename) - { - using namespace std; - - // Open stream - basic_ifstream stream(filename, ios::binary); - if (!stream) - throw runtime_error(string("cannot open file ") + filename); - stream.unsetf(ios::skipws); - - // Determine stream size - stream.seekg(0, ios::end); - size_t size = stream.tellg(); - stream.seekg(0); - - // Load data and add terminating 0 - m_data.resize(size + 1); - stream.read(&m_data.front(), static_cast(size)); - m_data[size] = 0; - } - - //! Loads file into the memory. Data will be automatically destroyed by the destructor - //! \param stream Stream to load from - file(std::basic_istream &stream) - { - using namespace std; - - // Load data and add terminating 0 - stream.unsetf(ios::skipws); - m_data.assign(istreambuf_iterator(stream), istreambuf_iterator()); - if (stream.fail() || stream.bad()) - throw runtime_error("error reading stream"); - m_data.push_back(0); - } - - //! Gets file data. - //! \return Pointer to data of file. - Ch *data() - { - return &m_data.front(); - } - - //! Gets file data. - //! \return Pointer to data of file. - const Ch *data() const - { - return &m_data.front(); - } - - //! Gets file data size. - //! \return Size of file data, in characters. - std::size_t size() const - { - return m_data.size(); - } - - private: - - std::vector m_data; // File data - - }; - - //! Counts children of node. Time complexity is O(n). - //! \return Number of children of node - template - inline std::size_t count_children(xml_node *node) - { - xml_node *child = node->first_node(); - std::size_t count = 0; - while (child) - { - ++count; - child = child->next_sibling(); - } - return count; - } - - //! Counts attributes of node. Time complexity is O(n). - //! \return Number of attributes of node - template - inline std::size_t count_attributes(xml_node *node) - { - xml_attribute *attr = node->first_attribute(); - std::size_t count = 0; - while (attr) - { - ++count; - attr = attr->next_attribute(); - } - return count; - } - -} - -#endif +#ifndef RAPIDXML_UTILS_HPP_INCLUDED +#define RAPIDXML_UTILS_HPP_INCLUDED + +// Copyright (C) 2006, 2009 Marcin Kalicinski +// Version 1.13 +// Revision $DateTime: 2009/05/13 01:46:17 $ +//! \file rapidxml_utils.hpp This file contains high-level rapidxml utilities that can be useful +//! in certain simple scenarios. They should probably not be used if maximizing performance is the main objective. + +#include "rapidxml.hpp" +#include +#include +#include +#include + +namespace rapidxml +{ + + //! Represents data loaded from a file + template + class file + { + + public: + + //! Loads file into the memory. Data will be automatically destroyed by the destructor. + //! \param filename Filename to load. + file(const char *filename) + { + using namespace std; + + // Open stream + basic_ifstream stream(filename, ios::binary); + if (!stream) + throw runtime_error(string("cannot open file ") + filename); + stream.unsetf(ios::skipws); + + // Determine stream size + stream.seekg(0, ios::end); + size_t size = stream.tellg(); + stream.seekg(0); + + // Load data and add terminating 0 + m_data.resize(size + 1); + stream.read(&m_data.front(), static_cast(size)); + m_data[size] = 0; + } + + //! Loads file into the memory. Data will be automatically destroyed by the destructor + //! \param stream Stream to load from + file(std::basic_istream &stream) + { + using namespace std; + + // Load data and add terminating 0 + stream.unsetf(ios::skipws); + m_data.assign(istreambuf_iterator(stream), istreambuf_iterator()); + if (stream.fail() || stream.bad()) + throw runtime_error("error reading stream"); + m_data.push_back(0); + } + + //! Gets file data. + //! \return Pointer to data of file. + Ch *data() + { + return &m_data.front(); + } + + //! Gets file data. + //! \return Pointer to data of file. + const Ch *data() const + { + return &m_data.front(); + } + + //! Gets file data size. + //! \return Size of file data, in characters. + std::size_t size() const + { + return m_data.size(); + } + + private: + + std::vector m_data; // File data + + }; + + //! Counts children of node. Time complexity is O(n). + //! \return Number of children of node + template + inline std::size_t count_children(xml_node *node) + { + xml_node *child = node->first_node(); + std::size_t count = 0; + while (child) + { + ++count; + child = child->next_sibling(); + } + return count; + } + + //! Counts attributes of node. Time complexity is O(n). + //! \return Number of attributes of node + template + inline std::size_t count_attributes(xml_node *node) + { + xml_attribute *attr = node->first_attribute(); + std::size_t count = 0; + while (attr) + { + ++count; + attr = attr->next_attribute(); + } + return count; + } + +} + +#endif From 909beabbc78571d82fb6210b61dbbecf16a6224e Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Fri, 8 Apr 2022 12:59:41 -0500 Subject: [PATCH 030/539] simplifying error logging Adding in a couple of variables to rapidxmls document object so they can be parsed immediately when the error message is created. Error messages are now processed immediately and stored internally so there is no risk of the contents of the error message leaving scope and being unallocated before the error message can be printed to the user. --- xml_converter/src/rapid_helpers.cpp | 60 +++++++++++--------- xml_converter/src/rapid_helpers.hpp | 13 +---- xml_converter/src/rapidxml-1.13/rapidxml.hpp | 8 ++- xml_converter/src/xml_converter.cpp | 11 ++-- 4 files changed, 47 insertions(+), 45 deletions(-) diff --git a/xml_converter/src/rapid_helpers.cpp b/xml_converter/src/rapid_helpers.cpp index bdff9731..afa8c20c 100644 --- a/xml_converter/src/rapid_helpers.cpp +++ b/xml_converter/src/rapid_helpers.cpp @@ -110,20 +110,22 @@ string replace_tabs(string input){ // Prints out a formatted error message taking in some non-specific values // in order to do so. //////////////////////////////////////////////////////////////////////////////// -void print_generic_error(string error_message, char* source, string filepath, char* start_index, uint length) { +string generate_generic_error(string error_message, char* source, string filepath, char* start_index, uint length) { string BOLD_COLOR = "\033[1m"; string RED_COLOR = "\033[31;1m"; string DEFAULT_COLOR = "\033[0m"; + string output; + // Print out the first line of the error containing the message and the // filename, leaving the location hint for later in this function. - cout << RED_COLOR << "Error: " << DEFAULT_COLOR << BOLD_COLOR << error_message << DEFAULT_COLOR << "\n" << filepath << endl; + output = RED_COLOR + "Error: " + DEFAULT_COLOR + BOLD_COLOR + error_message + DEFAULT_COLOR + "\n" + filepath + "\n"; // Sanity check to see if we are definitely not inside the string. if (start_index < source) { cout << "Unable to Identify Error in source" << endl; - return; + return output; } // Calculate the row, column, and some other values for the token. @@ -146,45 +148,51 @@ void print_generic_error(string error_message, char* source, string filepath, ch string value_markers = string(value.length(), '^'); // Display the formatted lines to the user. - cout << line_number_string << " |" << prefix << RED_COLOR << value << DEFAULT_COLOR << suffix << endl; - cout << padding_string << " |" << prefix_padding << RED_COLOR << value_markers << DEFAULT_COLOR << endl << endl; + return output + line_number_string + " |" + prefix + RED_COLOR + value + DEFAULT_COLOR + suffix + "\n" + + padding_string + " |" + prefix_padding + RED_COLOR + value_markers + DEFAULT_COLOR + "\n"; } +void XMLError::print_error() { + cout << this->error_message << endl; +} //////////////////////////////////////////////////////////////////////////////// -// Implementation of the constructor and print_error functions for -// the XMLAttributeNameError subclass. +// Implementation of the constructor for the XMLAttributeNameError subclass. //////////////////////////////////////////////////////////////////////////////// XMLAttributeNameError::XMLAttributeNameError(string message, rapidxml::xml_attribute<>* attribute) { - this->message = message; - this->attribute = attribute; -} -void XMLAttributeNameError::print_error(char* source, string filepath) { - print_generic_error(this->message, source, filepath, this->attribute->name(), this->attribute->name_size()); + this->error_message = generate_generic_error( + message, + attribute->document()->source, + attribute->document()->source_name, + attribute->name(), + attribute->name_size() + ); } //////////////////////////////////////////////////////////////////////////////// -// Implementation of the constructor and print_error functions for -// the XMLAttributeValueError subclass. +// Implementation of the constructor for the XMLAttributeValueError subclass. //////////////////////////////////////////////////////////////////////////////// XMLAttributeValueError::XMLAttributeValueError(string message, rapidxml::xml_attribute<>* attribute) { - this->message = message; - this->attribute = attribute; -} -void XMLAttributeValueError::print_error(char* source, string filepath) { - print_generic_error(this->message, source, filepath, this->attribute->value(), this->attribute->value_size()); + this->error_message = generate_generic_error( + message, + attribute->document()->source, + attribute->document()->source_name, + attribute->value(), + attribute->value_size() + ); } //////////////////////////////////////////////////////////////////////////////// -// Implementation of the constructor and print_error functions for -// the XMLNodeNameError subclass. +// Implementation of the constructor for the XMLNodeNameError subclass. //////////////////////////////////////////////////////////////////////////////// XMLNodeNameError::XMLNodeNameError(string message, rapidxml::xml_node<>* node) { - this->message = message; - this->node = node; -} -void XMLNodeNameError::print_error(char* source, string filepath){ - print_generic_error(this->message, source, filepath, this->node->name(), this->node->name_size()); + this->error_message = generate_generic_error( + message, + node->document()->source, + node->document()->source_name, + node->name(), + node->name_size() + ); } diff --git a/xml_converter/src/rapid_helpers.hpp b/xml_converter/src/rapid_helpers.hpp index 8ec6ca90..00e924fe 100644 --- a/xml_converter/src/rapid_helpers.hpp +++ b/xml_converter/src/rapid_helpers.hpp @@ -23,31 +23,22 @@ string get_node_name(rapidxml::xml_node<>* node); //////////////////////////////////////////////////////////////////////////////// class XMLError { protected: - string message; + string error_message; public: - virtual void print_error(char* source, string filepath) = 0; + void print_error(); }; class XMLAttributeNameError: public XMLError { - protected: - rapidxml::xml_attribute<>* attribute; public: XMLAttributeNameError(string message, rapidxml::xml_attribute<>* attribute); - void print_error(char* source, string filepath); }; class XMLAttributeValueError: public XMLError { - protected: - rapidxml::xml_attribute<>* attribute; public: XMLAttributeValueError(string message, rapidxml::xml_attribute<>* attribute); - void print_error(char* source, string filepath); }; class XMLNodeNameError: public XMLError { - protected: - rapidxml::xml_node<>* node; public: XMLNodeNameError(string message, rapidxml::xml_node<>* node); - void print_error(char* source, string filepath); }; diff --git a/xml_converter/src/rapidxml-1.13/rapidxml.hpp b/xml_converter/src/rapidxml-1.13/rapidxml.hpp index ae91e081..88f05999 100644 --- a/xml_converter/src/rapidxml-1.13/rapidxml.hpp +++ b/xml_converter/src/rapidxml-1.13/rapidxml.hpp @@ -1378,10 +1378,13 @@ namespace rapidxml //! Each new call to parse removes previous nodes and attributes (if any), but does not clear memory pool. //! \param text XML data to parse; pointer is non-const to denote fact that this data may be modified by the parser. template - void parse(Ch *text) + void parse(Ch *text, const Ch *name) { assert(text); + this->source = text; + this->source_name = name; + // Remove current contents this->remove_all_nodes(); this->remove_all_attributes(); @@ -1410,6 +1413,9 @@ namespace rapidxml } + Ch* source; + const Ch* source_name; + //! Clears the document by deleting all nodes and clearing the memory pool. //! All nodes owned by document pool are destroyed. void clear() diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 1fffe4ca..521a302f 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -53,7 +53,7 @@ Category* get_category(rapidxml::xml_attribute<>* name, map* m auto category = marker_categories->find(category_name); if (category == marker_categories->end()) { - errors->push_back(new XMLAttributeValueError("Category " + category_name + " Not Found ", name)); + errors->push_back(new XMLAttributeValueError("Category Not Found \"" + category_name + "\"", name)); return nullptr; } @@ -122,11 +122,8 @@ void parse_marker_categories(rapidxml::xml_node<>* node, map* } } else { - errors->push_back(new XMLNodeNameError("Unknown MarkerCategory tag", node)); + errors->push_back(new XMLNodeNameError("Unknown MarkerCategory Tag", node)); } - - - } @@ -142,7 +139,7 @@ void parse_xml_file(string xml_filepath, map* marker_categorie rapidxml::xml_node<>* root_node; rapidxml::file<> xml_file(xml_filepath.c_str()); - doc.parse(xml_file.data()); + doc.parse(xml_file.data(), xml_filepath.c_str()); root_node = doc.first_node(); @@ -170,7 +167,7 @@ void parse_xml_file(string xml_filepath, map* marker_categorie } for (auto error : errors) { - error->print_error(xml_file.data(), xml_filepath); + error->print_error(); } } From c75721f07c882cdf9d431e9deeb7d4c46a23bb05 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Fri, 8 Apr 2022 14:01:29 -0500 Subject: [PATCH 031/539] fixing line numbers, numbers start at 1 not 0 --- xml_converter/src/rapid_helpers.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml_converter/src/rapid_helpers.cpp b/xml_converter/src/rapid_helpers.cpp index afa8c20c..c23d9d6d 100644 --- a/xml_converter/src/rapid_helpers.cpp +++ b/xml_converter/src/rapid_helpers.cpp @@ -76,7 +76,7 @@ TextPosition get_line_number(char* source, char* start_index) { } return TextPosition{ - newline_count, + newline_count + 1, column_number, line_start, line_length From c5fdcd518de4cb1c7f1032ad1a9e944734f7d5a4 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Thu, 14 Jul 2022 18:14:52 -0500 Subject: [PATCH 032/539] first step towards a documentation based converter --- xml_converter/.gitignore | 3 + xml_converter/doc/achievement.md | 24 + xml_converter/doc/alpha.md | 15 + xml_converter/doc/can_fade.md | 15 + xml_converter/doc/category.md | 16 + xml_converter/doc/fade.md | 23 + xml_converter/doc/festival_filter.md | 24 + xml_converter/doc/is_wall.md | 15 + xml_converter/doc/map_id.md | 73 +++ xml_converter/doc/menu.md | 46 ++ xml_converter/doc/mount_filter.md | 28 + xml_converter/doc/position.md | 47 ++ xml_converter/doc/profession_filter.md | 26 + xml_converter/doc/rendering.md | 75 +++ xml_converter/doc/rotation.md | 37 ++ xml_converter/doc/scale.md | 25 + xml_converter/doc/schedule.md | 23 + xml_converter/doc/size_on_screen.md | 23 + xml_converter/doc/specialization_filter.md | 95 ++++ xml_converter/doc/species_filter.md | 21 + xml_converter/doc/texture.md | 45 ++ xml_converter/doc/tooltip.md | 25 + xml_converter/doc/trail_data.md | 50 ++ xml_converter/doc/trigger.md | 168 ++++++ xml_converter/generators/code_generator.py | 489 ++++++++++++++++++ .../web_templates/documentation.html | 101 ++++ .../generators/web_templates/infotable.html | 55 ++ 27 files changed, 1587 insertions(+) create mode 100644 xml_converter/doc/achievement.md create mode 100644 xml_converter/doc/alpha.md create mode 100644 xml_converter/doc/can_fade.md create mode 100644 xml_converter/doc/category.md create mode 100644 xml_converter/doc/fade.md create mode 100644 xml_converter/doc/festival_filter.md create mode 100644 xml_converter/doc/is_wall.md create mode 100644 xml_converter/doc/map_id.md create mode 100644 xml_converter/doc/menu.md create mode 100644 xml_converter/doc/mount_filter.md create mode 100644 xml_converter/doc/position.md create mode 100644 xml_converter/doc/profession_filter.md create mode 100644 xml_converter/doc/rendering.md create mode 100644 xml_converter/doc/rotation.md create mode 100644 xml_converter/doc/scale.md create mode 100644 xml_converter/doc/schedule.md create mode 100644 xml_converter/doc/size_on_screen.md create mode 100644 xml_converter/doc/specialization_filter.md create mode 100644 xml_converter/doc/species_filter.md create mode 100644 xml_converter/doc/texture.md create mode 100644 xml_converter/doc/tooltip.md create mode 100644 xml_converter/doc/trail_data.md create mode 100644 xml_converter/doc/trigger.md create mode 100644 xml_converter/generators/code_generator.py create mode 100644 xml_converter/generators/web_templates/documentation.html create mode 100644 xml_converter/generators/web_templates/infotable.html diff --git a/xml_converter/.gitignore b/xml_converter/.gitignore index f5f956de..75099e8b 100644 --- a/xml_converter/.gitignore +++ b/xml_converter/.gitignore @@ -6,3 +6,6 @@ cmake_install.cmake compile_commands.json .clangd/ xml_converter +venv/ +web_docs +__pycache__/ diff --git a/xml_converter/doc/achievement.md b/xml_converter/doc/achievement.md new file mode 100644 index 00000000..ae97b069 --- /dev/null +++ b/xml_converter/doc/achievement.md @@ -0,0 +1,24 @@ +--- +attribute_category: Achievement +fields: + - name: Achievement ID + type: Int32 + applies_to: [Icon, Trail] + compatability: [TacO, BlishHUD, Burrito] + xml_fields: ["AchievementId"] + protobuf_field: "achievement_id" + description: "An achivement that, if completed, will hide this marker." + + - name: Achievement Bitmask + type: Fixed32 + applies_to: [Icon, Trail] + compatability: [TacO, BlishHUD, Burrito] + xml_fields: ["AchievementBit"] + protobuf_field: "achievement_bit" + description: "A portion of an achievement that, if completed, will hide this marker." +--- + +Notes +===== + +https://blishhud.com/docs/markers/attributes/achievement \ No newline at end of file diff --git a/xml_converter/doc/alpha.md b/xml_converter/doc/alpha.md new file mode 100644 index 00000000..78b7da55 --- /dev/null +++ b/xml_converter/doc/alpha.md @@ -0,0 +1,15 @@ +--- +attribute_category: Alpha +fields: + - name: Alpha + description: The opacity of the object + type: Float32 + applies_to: [Icon, Trail] + xml_fields: [Alpha] + protobuf_field: alpha + compatability: [TacO, BlishHUD, Burrito] +--- + +Notes +===== +https://blishhud.com/docs/markers/attributes/alpha diff --git a/xml_converter/doc/can_fade.md b/xml_converter/doc/can_fade.md new file mode 100644 index 00000000..e93eb947 --- /dev/null +++ b/xml_converter/doc/can_fade.md @@ -0,0 +1,15 @@ +--- +attribute_category: Can Fade +fields: + - name: Can Fade + description: A flag to determine if an object can be made transparent when it is possibly occluding the player. + type: Boolean + applies_to: [Icon, Trail] + xml_fields: [CanFade] + protobuf_field: can_fade + compatability: [TacO, BlishHUD, Burrito] +--- + +Notes +===== +https://blishhud.com/docs/markers/attributes/canfade diff --git a/xml_converter/doc/category.md b/xml_converter/doc/category.md new file mode 100644 index 00000000..83909790 --- /dev/null +++ b/xml_converter/doc/category.md @@ -0,0 +1,16 @@ +--- +attribute_category: Category +fields: + - name: Category + description: The category this object belongs to. + type: Custom + class: Category + applies_to: [Icon, Trail] + xml_fields: [Type, Category] + protobuf_field: category + compatability: [TacO, BlishHUD, Burrito] +--- + +Notes +===== +https://blishhud.com/docs/markers/attributes/type diff --git a/xml_converter/doc/fade.md b/xml_converter/doc/fade.md new file mode 100644 index 00000000..25ddbc2a --- /dev/null +++ b/xml_converter/doc/fade.md @@ -0,0 +1,23 @@ +--- +attribute_category: Fade +fields: + - name: Distance Fade Start + description: Any part of the object that is farther then this value will begin to alpha fade gradually until it reaches 0 alpha at Distance Fade End. + type: Float32 + applies_to: [Icon, Trail] + xml_fields: [FadeNear, DistanceFadeStart] + protobuf_field: distance_fade_start + compatability: [TacO, BlishHUD, Burrito] + + - name: Distance Fade End + description: Any part of the object that is farther then this value will be at + type: Float32 + applies_to: [Icon, Trail] + xml_fields: [FadeFar, DistanceFadeEnd] + protobuf_field: distance_fade_end + compatability: [TacO, BlishHUD, Burrito] +--- + +Notes +===== +https://blishhud.com/docs/markers/attributes/fade diff --git a/xml_converter/doc/festival_filter.md b/xml_converter/doc/festival_filter.md new file mode 100644 index 00000000..5488ad1b --- /dev/null +++ b/xml_converter/doc/festival_filter.md @@ -0,0 +1,24 @@ +--- +attribute_category: Festival Filter +fields: + - name: Festival Filter + type: MultiflagValue + applies_to: [Icon, Trail] + compatability: [TacO, BlishHUD, Burrito] + xml_fields: [Festival] + protobuf_field: festival_filter + description: "One of these festivals must be occuring for the markers to apear." + flags: + dragonbash: [DragonBash] + festival_of_the_four_winds: [FestivalOfTheFourWinds] + halloween: [Halloween] + lunar_new_year: [LunarNewYear] + super_adventure_festival: [SuperAdventureFestival, SuperAdventureBox] + wintersday: [Wintersday] + none: [None] + +--- + +Notes +===== +https://blishhud.com/docs/markers/attributes/festival diff --git a/xml_converter/doc/is_wall.md b/xml_converter/doc/is_wall.md new file mode 100644 index 00000000..a7c145b3 --- /dev/null +++ b/xml_converter/doc/is_wall.md @@ -0,0 +1,15 @@ +--- +attribute_category: Is Wall +fields: + - name: Is Wall + description: Rotate the trail 90 degrees so it is vertical instead of horizontal to represent a wall. + type: Boolean + applies_to: [Trail] + xml_fields: [IsWall] + protobuf_field: is_wall + compatability: [BlishHUD] +--- + +Notes +===== +https://blishhud.com/docs/markers/attributes/iswall \ No newline at end of file diff --git a/xml_converter/doc/map_id.md b/xml_converter/doc/map_id.md new file mode 100644 index 00000000..05c07b76 --- /dev/null +++ b/xml_converter/doc/map_id.md @@ -0,0 +1,73 @@ +--- +attribute_category: Map ID +fields: + - name: Map ID + description: The ID of the map that this object should be displayed on. + type: Int32 + applies_to: [Icon, Trail] + xml_fields: [MapID] + protobuf_field: map_id + compatability: [TacO, BlishHUD, Burrito] + + - name: Map Type Filter + description: The types of maps this object should be displayed on. + type: MultiflagValue + applies_to: [Icon, Trail] + xml_fields: [MapID] + protobuf_field: map_type + compatability: [TacO, BlishHUD, Burrito] + flags: + # Unknown map type + unknown_map: ["Unknown"] + # Redirect map type, e.g. when logging in while in a PvP match. + redirect_map: [redirect] + # Character create map type. + character_create_map: [charactercreate] + # PvP map type. + pvp_map: [pvp] + # GvG map type. Unused. + gvg_map: [gvg] + # Instance map type, e.g. dungeons and story content. + instance_map: [instance] + # Public map type, e.g. open world. + public_map: [public] + # Tournament map type. Probably unused. + tournament_map: [tournament] + # Tutorial map type. + tutorial_map: [tutorial] + # User tournament map type. Probably unused. + user_tournament_map: [usertournament] + # Eternal Battlegrounds (WvW) map type. + center_map: [center] + # Eternal Battlegrounds (WvW) map type. + eternal_battlegrounds_map: [eternalbattlegrounds] + # Blue Borderlands (WvW) map type. + bluehome_map: [bluehome] + # Blue Borderlands (WvW) map type. + blue_borderlands_map: [blueborderlands] + # Green Borderlands (WvW) map type. + green_home_map: [greenhome] + # Green Borderlands (WvW) map type. + green_borderlands_map: [greenborderlands] + # Red Borderlands (WvW) map type. + red_home_map: [redhome] + # Red Borderlands (WvW) map type. + red_borderlands_map: [redborderlands] + # Fortune's Vale. Unused. + fortunes_vale_map: [fortunesvale] + # Obsidian Sanctum (WvW) map type. + jump_puzzle_map: [jumppuzzle] + # Obsidian Sanctum (WvW) map type. + obsidian_sanctum_map: [obsidiansanctum] + # Edge of the Mists (WvW) map type. + edge_of_the_mists_map: [edgeofthemists] + # Mini public map type, e.g. Dry Top, the Silverwastes and Mistlock Sanctuary. + public_mini_map: [publicmini] + # WvW lounge map type, e.g. Armistice Bastion. + wvw_lounge_map: [wvwlounge] +--- + +Notes +===== +https://blishhud.com/docs/markers/attributes/mapid +https://blishhud.com/docs/markers/attributes/maptype diff --git a/xml_converter/doc/menu.md b/xml_converter/doc/menu.md new file mode 100644 index 00000000..bea9ba61 --- /dev/null +++ b/xml_converter/doc/menu.md @@ -0,0 +1,46 @@ +--- +attribute_category: Category +fields: + - name: Default Visibility + description: If the category should be shown or hidden on or off by default. + type: Boolean + applies_to: [Category] + xml_fields: [DefaultToggle] + protobuf_field: default_visibility + compatability: [TacO, BlishHUD, Burrito] + + - name: Display Name + description: A human readable name of this category. + type: String + applies_to: [Category] + xml_fields: [DisplayName] + protobuf_field: display_name + compatability: [TacO, BlishHUD, Burrito] + + - name: Name + description: A machine readable name of this category. + type: String + applies_to: [Category] + xml_fields: [Name] + protobuf_field: name + compatability: [TacO, BlishHUD, Burrito] + + - name: Is Seperator + description: Determines if this element is a seperator not a category. + type: Boolean + applies_to: [Category] + xml_fields: [IsSeperator] + protobuf_field: is_seperator + compatability: [TacO, BlishHUD, Burrito] + + +--- + +Notes +===== + + +https://blishhud.com/docs/markers/attributes/defaulttoggle +https://blishhud.com/docs/markers/attributes/displayname +https://blishhud.com/docs/markers/attributes/isseparator + diff --git a/xml_converter/doc/mount_filter.md b/xml_converter/doc/mount_filter.md new file mode 100644 index 00000000..046d5545 --- /dev/null +++ b/xml_converter/doc/mount_filter.md @@ -0,0 +1,28 @@ +--- +attribute_category: Mount Filter +fields: + - name: Mount Filter + type: MultiflagValue + applies_to: [Icon, Trail] + compatability: [TacO, BlishHUD, Burrito] + xml_fields: ["Mount"] + protobuf_field: mount_filter + description: "A player must be on one of the mounts in the list to be able to see the objects." + flags: + raptor: ["Raptor"] + springer: ["Springer"] + skimmer: ["Skimmer"] + jackal: ["Jackal"] + griffon: ["Griffon"] + roller_beetle: ["RollerBeetle"] + warclaw: ["Warclaw"] + skyscale: ["Skyscale"] + skiff: ["Skiff"] + seige_turtle: ["SeigeTurtle"] + + +--- + +Notes +===== +https://blishhud.com/docs/markers/attributes/mount diff --git a/xml_converter/doc/position.md b/xml_converter/doc/position.md new file mode 100644 index 00000000..4dbcac1f --- /dev/null +++ b/xml_converter/doc/position.md @@ -0,0 +1,47 @@ +--- +attribute_category: Position +fields: + - name: Position + type: CompoundValue + applies_to: ["Icon"] + xml_fields: ["Position"] + compatability: [TacO, Burrito, BlishHUD] + description: "An XYZ location of a point in the game world." + protobuf_field: position + components: + + - name: X Position + type: Float32 + xml_fields: [XPos, PositionX] + protobuf_field: "x" + compatability: [TacO, Burrito, BlishHUD] + description: The X Component of the Position value + + - name: Y Position + type: Float32 + xml_fields: [YPos, PositionX] + protobuf_field: "y" + compatability: [TacO, Burrito, BlishHUD] + description: The Y Component of the Position value + + - name: Z Position + type: Float32 + xml_fields: [ZPos, PositionZ] + protobuf_field: "z" + compatability: [TacO, Burrito, BlishHUD] + description: The Z Component of the Position value + xml_export: "Children Only" + + - name: Height Offset + type: Float32 + applies_to: ["Icon"] + xml_fields: ["HeightOffset"] + compatability: [TacO, Burrito, BlishHUD] + description: A vertical offset of the object from the recorded position. + protobuf_field: height_offset +--- + +Notes +===== +https://blishhud.com/docs/markers/attributes/position +https://blishhud.com/docs/markers/attributes/heightoffset diff --git a/xml_converter/doc/profession_filter.md b/xml_converter/doc/profession_filter.md new file mode 100644 index 00000000..4f42baa8 --- /dev/null +++ b/xml_converter/doc/profession_filter.md @@ -0,0 +1,26 @@ +--- +attribute_category: Profession Filter +fields: + - name: Profession Filter + type: MultiflagValue + applies_to: [Icon, Trail] + compatability: [TacO, BlishHUD, Burrito] + xml_fields: [Profession] + protobuf_field: profession_filter + description: "The player must be player a character of one of the professions in this list." + flags: + guardian: [Guardian] + warrior: [Warrior] + engineer: [Engineer] + ranger: [Ranger] + thief: [Thief] + elementalist: [Elementalist] + mesmer: [Mesmer] + necromancer: [Necromancer] + revenant: [Revenant] +--- + +Notes +===== +https://blishhud.com/docs/markers/attributes/profession +PARSEABLE_VAR(profession_filter, ProfessionFilter, "Profession") diff --git a/xml_converter/doc/rendering.md b/xml_converter/doc/rendering.md new file mode 100644 index 00000000..4788632a --- /dev/null +++ b/xml_converter/doc/rendering.md @@ -0,0 +1,75 @@ +--- +attribute_category: Scale +fields: + - name: Render on Minimap + description: Allows or Prevents this object from being rendered on the minimap aka compass. + type: Boolean + applies_to: [Icon, Trail] + xml_fields: [MinimapVisibility, BHMinimapVisibility] + protobuf_field: __tentative__render_on_minimap + compatability: [TacO, BlishHUD, Burrito] + + - name: Render on Map + description: Allows or Prevents this object from being rendered on the world map. + type: Boolean + applies_to: [Icon, Trail] + xml_fields: [MapVisibility, BHMapVisibility] + protobuf_field: __tentative__render_on_map + compatability: [TacO, BlishHUD, Burrito] + + - name: Render Ingame + description: Allows or Prevents this object from being rendered in the 3D game space. + type: Boolean + applies_to: [Icon, Trail] + xml_fields: [IngameVisibility, BHIngameVisibility] + protobuf_field: __tentative__render_ingame + compatability: [TacO, BlishHUD, Burrito] + + - name: Render Ingame + description: Allows or Prevents this object from being rendered in the 3D game space. + type: Boolean + applies_to: [Icon, Trail] + xml_fields: [IngameVisibility, BHIngameVisibility] + protobuf_field: __tentative__render_ingame + compatability: [TacO, BlishHUD, Burrito] + + - name: Map Display Size + description: The size, in pixels, that the marker should be shown on the minimap or fullscreen map. + type: Int32 + applies_to: [Icon] + xml_fields: [MapDisplaySize] + protobuf_field: map_display_size + compatability: [TacO, BlishHUD, Burrito] + + - name: Scale on Map With Zoom + description: Scale the size of the object to be the same scale as the map. + type: Boolean + applies_to: [Icon] + xml_fields: [ScaleOnMapWithZoom] + protobuf_field: scale_on_map_with_zoom + compatability: [TacO, BlishHUD, Burrito] + + - name: Cull + description: Cull one of the sides of an Icon or Trail + applies_to: [Icon, Trail] + xml_fields: [Cull] + protobuf_field: cull + type: Enum + compatability: [TacO, BlishHUD, Burrito] + values: + none: ["None"] + clockwise: ["Clockwise"] + counter_clockwise: ["CounterClockwise"] + +--- + +Notes +===== +https://blishhud.com/docs/markers/attributes/visibility + +We want to figure out a way to invert this value becuase a "false" value is the default value inside a protobuf and if we set the default as "true" then we have to write this field for every object. This inversion will need to be present in the code generator and that might take a bit to design and implement. + +https://blishhud.com/docs/markers/attributes/mapdisplaysize +https://blishhud.com/docs/markers/attributes/scaleonmapwithzoom + https://blishhud.com/docs/markers/attributes/cull + diff --git a/xml_converter/doc/rotation.md b/xml_converter/doc/rotation.md new file mode 100644 index 00000000..993c02b4 --- /dev/null +++ b/xml_converter/doc/rotation.md @@ -0,0 +1,37 @@ +--- +attribute_category: Rotation +fields: + - name: Rotation + type: CompoundValue + applies_to: ["Icon"] + xml_fields: ["Rotation"] + compatability: [TacO, Burrito, BlishHUD] + description: "Euler X Y Z rotation." + protobuf_field: euler_rotation + components: + - name: X Rotation + type: Float32 + xml_fields: [RotateX] + protobuf_field: "x" + compatability: [TacO, Burrito, BlishHUD] + description: The X Component of the Euler rotation. + + - name: Y Rotation + type: Float32 + xml_fields: [RotateY] + protobuf_field: "y" + compatability: [TacO, Burrito, BlishHUD] + description: The Y Component of the Euler rotation. + + - name: Z Rotation + type: Float32 + xml_fields: [RotateZ] + protobuf_field: "z" + compatability: [TacO, Burrito, BlishHUD] + description: The Z Component of the Euler rotation. + xml_export: "Parent Only" +--- + +Notes +===== +https://blishhud.com/docs/markers/attributes/rotate diff --git a/xml_converter/doc/scale.md b/xml_converter/doc/scale.md new file mode 100644 index 00000000..7606749f --- /dev/null +++ b/xml_converter/doc/scale.md @@ -0,0 +1,25 @@ +--- +attribute_category: Scale +fields: + - name: Trail Scale + description: Adjusts the width of a trail mesh as a multiplier to the default width. + type: Float32 + applies_to: [Trail] + xml_fields: [TrailScale] + protobuf_field: scale + compatability: [TacO, BlishHUD, Burrito] + + - name: Icon Size + description: (Unclear) Some value representation of how large an icon should be. Is this a scale multiplier or a fixed size value? How does this relate to MinSize and MaxSize. + type: Float32 + applies_to: [Icon] + xml_fields: [IconSize] + protobuf_field: __tentative__scale + compatability: [TacO, BlishHUD, Burrito] +--- + +Notes +===== +https://blishhud.com/docs/markers/attributes/trailscale/ +https://blishhud.com/docs/markers/attributes/iconfile +https://blishhud.com/docs/markers/attributes/color diff --git a/xml_converter/doc/schedule.md b/xml_converter/doc/schedule.md new file mode 100644 index 00000000..f5eb5f24 --- /dev/null +++ b/xml_converter/doc/schedule.md @@ -0,0 +1,23 @@ +--- +attribute_category: Schedule +fields: + - name: Schedule + description: A description of when to hide or show an object based on a realtime schedule. + type: String + applies_to: [Icon, Trail] + xml_fields: [Schedule] + protobuf_field: bhdraft__schedule + compatability: [BlishHUD] + + - name: Schedule Duration + description: Combined with Schedule to determine how long after the object is shown before it is hidden again. + type: Float32 + applies_to: [Icon, Trail] + xml_fields: [ScheduleDuration] + protobuf_field: bhdraft__schedule_duration + compatability: [BlishHUD] +--- + +Notes +===== +https://blishhud.com/docs/markers/attributes/schedule diff --git a/xml_converter/doc/size_on_screen.md b/xml_converter/doc/size_on_screen.md new file mode 100644 index 00000000..d59023a0 --- /dev/null +++ b/xml_converter/doc/size_on_screen.md @@ -0,0 +1,23 @@ +--- +attribute_category: Size On Screen +fields: + - name: Minimum Size on Screen + description: The smallest width/height of this icon on the screen. + type: Int32 + applies_to: [Icon] + xml_fields: [MinSize] + protobuf_field: minimum_size_on_screen + compatability: [TacO, BlishHUD, Burrito] + + - name: Maximum Size On Screen + description: The largest width/height of this icon on the screen. + type: Int32 + applies_to: [Icon] + xml_fields: [MaxSize] + protobuf_field: maximum_size_on_screen + compatability: [TacO, BlishHUD, Burrito] +--- + +Notes +===== +https://blishhud.com/docs/markers/attributes/size diff --git a/xml_converter/doc/specialization_filter.md b/xml_converter/doc/specialization_filter.md new file mode 100644 index 00000000..0fc04bcb --- /dev/null +++ b/xml_converter/doc/specialization_filter.md @@ -0,0 +1,95 @@ +--- +attribute_category: Specialization Filter +fields: + - name: Specialization Filter + type: MultiflagValue + applies_to: [Icon, Trail] + compatability: [TacO, BlishHUD, Burrito] + xml_fields: ["Specialization"] + protobuf_field: specialization_filter + description: "The Specialization(s) that should be present to view this marker." + flags: + # Heart of Thorns Spec + elementalist_tempest: ["48", "Tempest"] + engineer_scrapper: ["43", "Scrapper"] + guardian_dragonhunter: ["27", "Dragonhunter"] + mesmer_chronomancer: ["40", "Chronomancer"] + necromancer_reaper: ["34", "Reaper"] + ranger_druid: ["5", "Druid"] + revenant_herald: ["52", "Herald"] + thief_daredevil: ["7", "Daredevil"] + warrior_berserker: ["18", "Berserker"] + + # Path of Fire Spec + elementalist_weaver: ["56", "Weaver"] + engineer_holosmith: ["57", "Holosmith"] + guardian_firebrand: ["62", "Firebrand"] + mesmer_mirage: ["59", "Mirage"] + necromancer_scourge: ["60", "Scourge"] + ranger_soulbeast: ["55", "Soulbeast"] + revenant_renegade: ["63", "Renegade"] + thief_deadeye: ["58", "Deadeye"] + warrior_spellbreaker: ["61", "Spellbreaker"] + + # TODO(#58): End of Dragons Spec Numbers + elementalist_catalyst: ["Catalyst"] + engineer_mechanist: ["Mechanist"] + guardian_willbender: ["Willbender"] + mesmer_virtuoso: ["Virtuoso"] + necromancer_harbinger: ["Harbinger"] + ranger_untamed: ["Untamed"] + revenant_vindicator: ["Vindicator"] + thief_specter: ["Specter"] + warrior_bladesworn: ["Bladesworn"] + + # Core Spec + elementalist_air: ["41"] + elementalist_arcane: ["37"] + elementalist_earth: ["26"] + elementalist_fire: ["31"] + elementalist_water: ["17"] + engineer_alchemy: ["29"] + engineer_explosives: ["6"] + engineer_firearms: ["38"] + engineer_inventions: ["47"] + engineer_tools: ["21"] + guardian_honor: ["49"] + guardian_radiance: ["16"] + guardian_valor: ["13"] + guardian_virtues: ["46"] + guardian_zeal: ["42"] + mesmer_chaos: ["45"] + mesmer_domination: ["10"] + mesmer_dueling: ["1"] + mesmer_illusions: ["24"] + mesmer_inspiration: ["23"] + necromancer_blood_magic: ["19"] + necromancer_curses: ["39"] + necromancer_death_magic: ["2"] + necromancer_soul_reaping: ["50"] + necromancer_spite: ["53"] + ranger_beastmastery: ["32"] + ranger_marksmanship: ["8"] + ranger_nature_magic: ["25"] + ranger_skirmishing: ["30"] + ranger_wilderness_survival: ["33"] + revenant_corruption: ["14"] + revenant_devastation: ["15"] + revenant_invocation: ["3"] + revenant_retribution: ["9"] + revenant_salvation: ["12"] + thief_acrobatics: ["54"] + thief_critical_strikes: ["35"] + thief_deadly_arts: ["28"] + thief_shadow_arts: ["20"] + thief_trickery: ["44"] + warrior_arms: ["36"] + warrior_defense: ["22"] + warrior_discipline: ["51"] + warrior_strength: ["4"] + warrior_tactics: ["11"] +--- + + +Notes +===== \ No newline at end of file diff --git a/xml_converter/doc/species_filter.md b/xml_converter/doc/species_filter.md new file mode 100644 index 00000000..376d8ea5 --- /dev/null +++ b/xml_converter/doc/species_filter.md @@ -0,0 +1,21 @@ +--- +attribute_category: Species Filter +fields: + - name: Species Filter + type: MultiflagValue + applies_to: [Icon, Trail] + compatability: [TacO, BlishHUD, Burrito] + xml_fields: [Race, Species] + protobuf_field: species_filter + description: "The player must be player a character of one of the species in this list." + flags: + asura: [asura] + charr: [charr] + human: [human] + norn: [norn] + sylvari: [sylvari] +--- + +Notes +===== +https://blishhud.com/docs/markers/attributes/race \ No newline at end of file diff --git a/xml_converter/doc/texture.md b/xml_converter/doc/texture.md new file mode 100644 index 00000000..877f0feb --- /dev/null +++ b/xml_converter/doc/texture.md @@ -0,0 +1,45 @@ +--- +attribute_category: Texture +fields: + - name: Texture + description: The path to an image which contains the texture that will be present on a trail. + type: Custom + class: Image + applies_to: [Trail] + xml_fields: [Texture] + protobuf_field: texture + compatability: [TacO, BlishHUD, Burrito] + + - name: Icon + description: The path to an image which contains the texture that will be present on an icon. + type: Custom + class: Image + applies_to: [Icon] + xml_fields: [IconFile] + protobuf_field: texture + compatability: [TacO, BlishHUD, Burrito] + + - name: Color + description: A multiplier color to tint the raw albedo texture of a marker of trail texture. (Unclear) Solid white will result in no change, solid black will result in a black texture. + type: Custom + class: Color + applies_to: [Icon, Trail] + xml_fields: [Color] + protobuf_field: color + compatability: [TacO, BlishHUD, Burrito] + + - name: Animation Speed + description: The speed which the texture should be moving across the object. + type: Float32 + applies_to: [Trail] + xml_fields: ["AnimSpeed", "AnimationSpeed"] + protobuf_field: animation_speed + compatability: [TacO, BlishHUD, Burrito] +--- + +Notes +===== +https://blishhud.com/docs/markers/attributes/texture +https://blishhud.com/docs/markers/attributes/iconfile +https://blishhud.com/docs/markers/attributes/color +https://blishhud.com/docs/markers/attributes/animspeed diff --git a/xml_converter/doc/tooltip.md b/xml_converter/doc/tooltip.md new file mode 100644 index 00000000..667184eb --- /dev/null +++ b/xml_converter/doc/tooltip.md @@ -0,0 +1,25 @@ +--- +attribute_category: Scale +fields: + - name: Tooltip Name + description: The name of the tooltip when hovering over the minimap. + type: String + applies_to: [Icon] + xml_fields: [TipName] + protobuf_field: tip_name + compatability: [TacO, BlishHUD, Burrito] + + - name: Tooltip Description + description: The full text of the tooltip. + type: String + applies_to: [Icon, Category] + xml_fields: [TipDescription] + protobuf_field: tip_description + compatability: [TacO, BlishHUD, Burrito] +--- + +Notes +===== + + +https://blishhud.com/docs/markers/attributes/tip diff --git a/xml_converter/doc/trail_data.md b/xml_converter/doc/trail_data.md new file mode 100644 index 00000000..e19c5e0b --- /dev/null +++ b/xml_converter/doc/trail_data.md @@ -0,0 +1,50 @@ +--- +attribute_category: Trail Data +fields: + - name: Trail Data + type: Custom + class: TrailData + xml_fields: ["TrailData"] + protobuf_field: traildata + side_effects: [Map ID] + applies_to: [Trail] + compatability: [TacO, BlishHUD, Burrito] + description: A binary coordinate array for the path of a trail. + + - name: Trail Data Map ID + type: Custom + class: TrailDataMapId + xml_fields: ["TrailData"] + protobuf_field: map_id + applies_to: [Trail] + compatability: [TacO, BlishHUD, Burrito] + description: The map id is embedded inside of the trail binary for some ungodly reason. +--- + + +Notes +===== + + + +TrailData + + +GetFromXML(xml_node) +WriteToXML(self) # not quite right. + + +GetFromProtobuf(protobuf_node_object) # not quite right +SetProtobuf() # not quite right + + + +the return value of the set should be the value that needs to be set. +But also we can just pass in the number of variables to be "set" or "get" + + + +so really + GetFromProtobuf(arg1type* argument1, arg2type* argument2) +so really + SetProtobuf(arg1type* argument1, arg2type* argument2) \ No newline at end of file diff --git a/xml_converter/doc/trigger.md b/xml_converter/doc/trigger.md new file mode 100644 index 00000000..0125b916 --- /dev/null +++ b/xml_converter/doc/trigger.md @@ -0,0 +1,168 @@ +--- +attribute_category: Trigger +fields: + - name: Auto Trigger + description: Any triggers will be triggered automatially when the player enters within range instead of being triggered. + type: Boolean + applies_to: [Icon] + xml_fields: [AutoTrigger] + protobuf_field: trigger.auto_trigger + compatability: [TacO, BlishHUD, Burrito] + + - name: Trigger Range + description: Used to indicate a trigger range. This attribute is used by multiple other attributes to define a distance from the marker in which those attributes will activate their functionality or behavior. + type: Float32 + applies_to: [Icon] + xml_fields: [TriggerRange, InfoRange] + protobuf_field: trigger.range + compatability: [TacO, BlishHUD, Burrito] + + - name: Reset Length + description: When using behavior 4 (reappear after timer) this value defines, in seconds, the duration until the marker is reset after being activated. + type: Float32 + applies_to: [Icon] + xml_fields: [ResetLength] + protobuf_field: trigger.reset_length + compatability: [TacO, BlishHUD, Burrito] + + - name: Show Category + description: Show the specified category when triggered. + type: Custom + class: Category + applies_to: [Icon] + xml_fields: [Show] + protobuf_field: trigger.action_show_category + compatability: [TacO, BlishHUD, Burrito] + + - name: Hide Category + description: Hide the specified category when triggered. + type: Custom + class: Category + applies_to: [Icon] + xml_fields: [Hide] + protobuf_field: trigger.action_hide_category + compatability: [TacO, BlishHUD, Burrito] + + - name: Toggle Category + description: Show if hidden or Hide if shown the specified category when triggered. + type: Custom + class: Category + applies_to: [Icon] + xml_fields: [Toggle] + protobuf_field: trigger.action_toggle_category + compatability: [TacO, BlishHUD, Burrito] + + - name: Copy Message + description: A value that is copied to the clipboard when triggered. + type: String + applies_to: [Icon] + xml_fields: [CopyMessage] + protobuf_field: trigger.action_copy_clipboard + compatability: [TacO, BlishHUD, Burrito] + + - name: Copy Message + description: A message that is displayed to the user when an item is copied to the clipboard. + type: String + applies_to: [Icon] + xml_fields: [CopyMessage] + protobuf_field: trigger.action_copy_message + compatability: [TacO, BlishHUD, Burrito] + + - name: Invert Visibility + description: Inverts the hide show behavior so that it is shown when it is supposed to be hidden and hidden when it is supposed to be shown. + type: Boolean + applies_to: [Icon] + xml_fields: [InvertBehavior] + protobuf_field: trigger.invert_display + compatability: [TacO, BlishHUD, Burrito] + + - name: Bounce Height + description: How high should the icon bounce when triggered. + type: Float32 + applies_to: [Icon] + xml_fields: [BounceHeight] + protobuf_field: trigger.bounce_height + compatability: [TacO, BlishHUD, Burrito] + + - name: Bounce Duration + description: How long should the icon bounce for when triggered. + type: Float32 + applies_to: [Icon] + xml_fields: [BounceDuration] + protobuf_field: trigger.bounce_duration + compatability: [TacO, BlishHUD, Burrito] + + - name: Bounce Delay + description: How many seconds should pass before the bouncing begins. + type: Float32 + applies_to: [Icon] + xml_fields: [BounceDelay] + protobuf_field: trigger.bounce_delay + compatability: [TacO, BlishHUD, Burrito] + + - name: Info Message + description: Show a message to the user when triggered + type: String + applies_to: [Icon] + xml_fields: [Info] + protobuf_field: trigger.action_info_message + compatability: [TacO, BlishHUD, Burrito] + + - name: Reset Behavior + description: A behavior around triggers and retriggering. + type: Enum + applies_to: [Icon] + xml_fields: [Behavior] + protobuf_field: trigger.reset_behavior + compatability: [TacO, BlishHUD, Burrito] + values: + always_visible: ["0", "always_visible"] + map_change: ["1", "map_change"] + daily_reset: ["2", "daily_reset"] + never: ["3", "never"] + timer: ["4", "timer"] + map_reset: ["5", "map_reset"] + instance_change: ["6", "instance_change"] + daily_reset_per_character: ["7", "daily_reset_per_character"] + + weekly_reset: ["101", "weekly_reset"] + + - name: GUID + description: A globally unique identifier value to make sure this maker's trigger reset data is always assocaited with this marker and never lost or confused with other markers. + type: Custom + class: UniqueID + xml_fields: ["GUID"] + applies_to: ["Icon", "Trail"] + protobuf_field: "guid" + compatability: [TacO, BlishHUD, Burrito] + + - name: Has Countdown + description: "?" + type: Boolean + xml_fields: ["HasCountdown"] + applies_to: ["Icon"] + protobuf_field: trigger.has_countdown + compatability: ["TacO"] +--- + +Notes +===== +https://blishhud.com/docs/markers/attributes/autotrigger +https://blishhud.com/docs/markers/attributes/triggerrange +https://blishhud.com/docs/markers/attributes/resetlength +https://blishhud.com/docs/markers/attributes/showhide +https://blishhud.com/docs/markers/attributes/toggle +https://blishhud.com/docs/markers/attributes/copy +https://blishhud.com/docs/markers/attributes/invertbehavior +https://blishhud.com/docs/markers/attributes/bounce +https://blishhud.com/docs/markers/attributes/info +https://blishhud.com/docs/markers/attributes/behavior +https://blishhud.com/docs/markers/attributes/guid + + + + + +PARSEABLE_VAR(reset_offset, float, "ResetOffset") // Depricated + +PARSEABLE_VAR(has_countdown, bool, "HasCountdown") \ No newline at end of file diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py new file mode 100644 index 00000000..693b35ec --- /dev/null +++ b/xml_converter/generators/code_generator.py @@ -0,0 +1,489 @@ +from jsonschema import validate +from jsonschema.exceptions import ValidationError +import yaml +import frontmatter +from typing import Any, Dict, List, Tuple +import os +import markdown +from dataclasses import dataclass +from jinja2 import Template, FileSystemLoader, Environment + + +schema = """ +type: object +additionalProperties : false +required: + - attribute_category + - fields +properties: + attribute_category: + type: string + fields: + type: array + items: + type: object + properties: + type: + type: string + enum: [Int32, Fixed32, Float32, String, Boolean, MultiflagValue, Enum, CompoundValue, Custom] + allOf: + ############################# + # Int32 Type + ############################# + - if: + properties: + type: + const: Int32 + then: + additionalProperties: false + required: [{shared_fields}] + properties: + {shared_field_properties} + + ############################# + # Fixed32 Type + ############################# + - if: + properties: + type: + const: Fixed32 + then: + additionalProperties: false + required: [{shared_fields}] + properties: + {shared_field_properties} + + ############################# + # Float32 Type + ############################# + - if: + properties: + type: + const: Float32 + then: + additionalProperties: false + required: [{shared_fields}] + properties: + {shared_field_properties} + + ############################# + # String Type + ############################# + - if: + properties: + type: + const: String + then: + additionalProperties: false + required: [{shared_fields}] + properties: + {shared_field_properties} + + ############################# + # Boolean Type + ############################# + - if: + properties: + type: + const: Boolean + then: + additionalProperties: false + required: [{shared_fields}] + properties: + {shared_field_properties} + + ############################# + # MultiflagValue Type + ############################# + - if: + properties: + type: + const: MultiflagValue + then: + additionalProperties: false + required: [{shared_fields}, flags] + properties: + {shared_field_properties} + flags: + type: object + patternProperties: + "^[a-z_]+$": + type: array + items: + type: string + + ############################# + # Enum Type + ############################# + - if: + properties: + type: + const: Enum + then: + additionalProperties: false + required: [{shared_fields}, values] + properties: + {shared_field_properties} + values: + type: object + patternProperties: + "^[a-z_]+$": + type: array + items: + type: string + + ############################# + # CompoundValue Type + ############################# + - if: + properties: + type: + const: CompoundValue + then: + additionalProperties: false + required: [{shared_fields}, xml_export, components] + properties: + {shared_field_properties} + xml_export: + type: string + enum: + - Parent Only + - Parent and Children + - Children Only + components: + type: array + items: + type: object + additionalProperties: false + required: [name, type, xml_fields, protobuf_field, description, compatability] + properties: + name: + type: string + type: + type: string + enum: [Int32, Fixed32, Float32] + xml_fields: + type: array + items: + type: string + pattern: "^[A-Za-z]+$" + protobuf_field: + type: string + pattern: "^[a-z_.]+$" + description: + type: string + compatability: + type: array + items: + type: string + enum: [BlishHUD, Burrito, TacO] + + + ############################# + # Custom Type + ############################# + - if: + properties: + type: + const: Custom + then: + additionalProperties: false + required: [{shared_fields}, class] + properties: + {shared_field_properties} + class: + type: string + side_effects: + type: array + items: + type: string + +""".format( + shared_field_properties="""type: + type: string + name: + type: string + applies_to: + type: array + items: + type: string + enum: [Icon, Trail, Category] + compatability: + type: array + items: + type: string + enum: [BlishHUD, Burrito, TacO] + xml_fields: + type: array + items: + type: string + pattern: "^[A-Za-z]+$" + protobuf_field: + type: string + pattern: "^[a-z_.]+$" + description: + type: string + """, + shared_fields="type, name, applies_to, compatability, xml_fields, protobuf_field, description" +) + + + + +def validate_front_matter_schema(front_matter: Any) -> str: + try: + validate(front_matter, yaml.safe_load(schema)) + except ValidationError as e: + return "Error Message: {} (Path: {}".format(e.message, e.json_path) + return "" + +@dataclass +class Document: + metadata: Any + content: str + +@dataclass +class FieldRow: + name: str + xml_attribute: str + alternate_xml_attributes: List[str] + binary_field: str + data_type: str + description: str + supported_by_html: str + usable_on_html: str + example: str + valid_values_html: str + is_sub_field: bool + sub_fields: List["FieldRow"] + +class Generator: + data: Dict[str, Document] = {} + + + def load_input_doc(self, filepath: str) -> None: + try: + document = frontmatter.load(filepath) + except Exception as e: + print(filepath) + raise e + + error = validate_front_matter_schema(document.metadata) + if error != "": + print(filepath) + print(error) + + filename = os.path.splitext(os.path.basename(filepath))[0] + + self.data[filename] = Document( + metadata=document.metadata, + content=document.content + ) + + def write_webdocs(self, output_directory: str) -> None: + print("Writing output documentation") + os.makedirs(output_directory, exist_ok=True) + + file_loader = FileSystemLoader('web_templates') + env = Environment(loader=file_loader) + template = env.get_template("documentation.html") + + navigation_links = [ (self.data[x].metadata['attribute_category'], x) for x in sorted(self.data.keys()) ] + + complete_field_row_list = [] + + for page in sorted(self.data.keys()): + content = self.data[page].content + metadata = self.data[page].metadata + + generated_doc, field_rows = self.generate_auto_docs(metadata) + + for field_row in field_rows: + complete_field_row_list.append(field_row) + + html = markdown.markdown(content) + + with open(os.path.join(output_directory, page + ".html"), 'w') as f: + + f.write(template.render( + generated_doc=generated_doc, + content=html, + content_nav=navigation_links + )) + + def get_examples(self, field_type: str) -> List[str]: + return ["???"] + + def get_fixed_option_examples(self, field_type: str, pairings: Any) -> List[str]: + example_values = [] + for elem_name in pairings: + example_values.append(pairings[elem_name][0]) + + solo_field = "" + combo_field = [] + if len(example_values) == 1 or field_type == "Enum": + solo_field = example_values[0] + + elif len(example_values) == 2: + solo_field = example_values[0] + combo_field = [example_values[0], example_values[1]] + + elif len(example_values) == 3: + solo_field = example_values[0] + combo_field = [example_values[0], example_values[1], example_values[2]] + + elif len(example_values) > 3: + solo_field = example_values[0] + combo_field = [example_values[1], example_values[2], example_values[3]] + + examples = [] + examples.append("\"" + solo_field +"\"") + if len(combo_field) > 0: + examples.append("\"" + ",".join(combo_field) +"\"") + + return examples + + def build_example(self, type: str, applies_to: List[str], xml_field: str, examples: List[str]) -> str: + example = "
" + + for node_type in applies_to: + for value in examples: + example += "<" + node_type + " ... " + xml_field + "=" + value +" ... >
" + break + # example += "
" + + + + example +="
" + + return example + + + ############################################################################ + # Generate Auto Docs + # + # This will output documentation for a single category of attributes. + ############################################################################ + def generate_auto_docs(self, metadata: Any) -> Tuple[str, List[FieldRow]]: + file_loader = FileSystemLoader('web_templates') + env = Environment(loader=file_loader) + template = env.get_template("infotable.html") + + + field_rows = [] + for field in metadata["fields"]: + + valid_values = "" + + if field['type'] == "MultiflagValue" or field['type'] == "Enum": + + if (field["type"] == "MultiflagValue"): + pairings = field["flags"] + elif (field["type"] == "Enum"): + pairings = field["values"] + else: + raise ValueError("Type was MultiflagValue or Enum but not MultiflagValue or Enum. Not sure what happened.") + + example = self.build_example( + type=field['type'], + applies_to=field['applies_to'], + xml_field=field['xml_fields'][0], + examples=self.get_fixed_option_examples( + field_type=field['type'], + pairings=pairings + ) + ) + + valid_values = "" + + for elem in pairings: + valid_values += "" + valid_values += "
XML Value" + + if (field["type"] == "MultiflagValue"): + valid_values += "Set Flag" + elif (field["type"] == "Enum"): + valid_values += "Enum Value" + valid_values += "
" + for value in pairings[elem]: + valid_values += "\"" + value + "\"
" + valid_values += "
" + elem + "
" + + + elif field['type'] == "CompoundValue": + + example = self.build_example( + type=field['type'], + applies_to=field['applies_to'], + xml_field=field['xml_fields'][0], + examples=["???TODO???"] + ) + + + + # ",".join( [ self.get_examples(x['type'], field['applies_to'], field['xml_fields'][0]) for x in field['components'] ]) + else: + example = self.build_example( + type=field['type'], + applies_to=field['applies_to'], + xml_field=field['xml_fields'][0], + examples=self.get_examples( + field_type=field['type'], + # pairings=pairings + ) + ) + # self.get_examples(field['type'], field['applies_to'], field['xml_fields'][0]) + + field_rows.append(FieldRow( + name=field["name"], + xml_attribute = field["xml_fields"][0], + alternate_xml_attributes=field["xml_fields"][1:], + binary_field=field["protobuf_field"], + data_type=field["type"], + description=field["description"], + supported_by_html="
".join(field["compatability"]), + usable_on_html="
".join(field["applies_to"]), + example=example, + valid_values_html=valid_values, + is_sub_field=False, + sub_fields=[], # todo: + )) + + if field['type'] == "CompoundValue": + for component_field in field["components"]: + field_rows.append(FieldRow( + name=component_field["name"], + xml_attribute= component_field["xml_fields"][0], + alternate_xml_attributes=component_field["xml_fields"][1:], + binary_field= field["protobuf_field"] + "." + component_field["protobuf_field"], + data_type=component_field["type"], + description=component_field["description"], + supported_by_html="
".join(component_field["compatability"]), + usable_on_html="
".join(field["applies_to"]), + example=self.build_example( + type=component_field["type"], + applies_to=field["applies_to"], + xml_field=field["xml_fields"][0], + examples=["???TODO2???"] + ), + valid_values_html=valid_values, + is_sub_field=True, + sub_fields=[] + + )) + + return template.render(field_rows=field_rows), field_rows + + +def main() -> None: + generator = Generator() + base_directory = "../doc" + + for filename in os.listdir(base_directory): + if filename.endswith('.md'): + generator.load_input_doc(os.path.join(base_directory, filename)) + + + generator.write_webdocs("../web_docs/") + +main() \ No newline at end of file diff --git a/xml_converter/generators/web_templates/documentation.html b/xml_converter/generators/web_templates/documentation.html new file mode 100644 index 00000000..0003f768 --- /dev/null +++ b/xml_converter/generators/web_templates/documentation.html @@ -0,0 +1,101 @@ + + + + + +
Hello world
+
+ {% for link in content_nav %} + + {% endfor %} +
+
{{generated_doc}}{{content}}
+ + \ No newline at end of file diff --git a/xml_converter/generators/web_templates/infotable.html b/xml_converter/generators/web_templates/infotable.html new file mode 100644 index 00000000..45bd7bd0 --- /dev/null +++ b/xml_converter/generators/web_templates/infotable.html @@ -0,0 +1,55 @@ + + + + + + + + + + {% for field_row in field_rows %} + + + + + + + + + {% endfor %} +
NameXML AttributeBinary Field NameData TypeSupported ByUsable On
{% if field_row.is_sub_field %}↳ {% endif %}{{field_row.name}}{{field_row.xml_attribute}}{% for alternate in field_row.alternate_xml_attributes %}, {{alternate}}{% endfor %}{{field_row.binary_field}}{{field_row.data_type}}{{field_row.supported_by_html}}{{field_row.usable_on_html}}
+ +

Type Info

+ +{% for field_row in field_rows %} +

{{field_row.name}}

+
+ + + + + + + + + + + + + + + + + + +
NameXML AttributeBinary Field NameData TypeSupported ByUsable On
{% if field_row.is_sub_field %}↳ {% endif %}{{field_row.name}}{{field_row.xml_attribute}}{% for alternate in field_row.alternate_xml_attributes %}, {{alternate}}{% endfor %}{{field_row.binary_field}}{{field_row.data_type}}{{field_row.supported_by_html}}{{field_row.usable_on_html}}
+

Description

{{field_row.description}}
+ +

Examples

{{field_row.example}}
+ +

Valid XML Values

{{field_row.valid_values_html}}
+ +
+{% endfor %} + + From 329022ca10560cf461aee2bc87c950b401acdeec Mon Sep 17 00:00:00 2001 From: klingbolt Date: Thu, 21 Jul 2022 19:48:31 -0400 Subject: [PATCH 033/539] Changed markdown files into seperate categories Modified code generator to match change --- .../doc/acheivement/achievement_bitmask.md | 14 + .../doc/acheivement/achievement_id.md | 14 + xml_converter/doc/achievement.md | 24 - xml_converter/doc/alpha.md | 15 - xml_converter/doc/alpha/alpha.md | 13 + xml_converter/doc/can_fade.md | 15 - xml_converter/doc/can_fade/can_fade.md | 12 + xml_converter/doc/category.md | 16 - xml_converter/doc/category/category.md | 14 + xml_converter/doc/fade.md | 23 - xml_converter/doc/fade/distance_fade_end.md | 13 + xml_converter/doc/fade/distance_fade_start.md | 13 + xml_converter/doc/festival_filter.md | 24 - .../doc/festival_filter/festival_filter.md | 21 + xml_converter/doc/is_wall.md | 15 - xml_converter/doc/is_wall/is_wall.md | 13 + xml_converter/doc/map_id.md | 73 --- xml_converter/doc/map_id/map_id.md | 13 + xml_converter/doc/map_id/map_type_filter.md | 62 +++ xml_converter/doc/menu.md | 46 -- xml_converter/doc/menu/default_visibility.md | 16 + xml_converter/doc/menu/display_name.md | 15 + xml_converter/doc/menu/is_seperator.md | 15 + xml_converter/doc/menu/name.md | 16 + xml_converter/doc/mount_filter.md | 28 - .../doc/mount_filter/mount_filter.md | 24 + xml_converter/doc/position.md | 47 -- xml_converter/doc/position/heightoffset.md | 13 + xml_converter/doc/position/position.md | 37 ++ xml_converter/doc/profession_filter.md | 26 - .../profession_filter/profession_filter.md | 25 + xml_converter/doc/rendering.md | 75 --- xml_converter/doc/rendering/cull.md | 19 + .../doc/rendering/map_display_size.md | 15 + xml_converter/doc/rendering/render_ingame.md | 17 + xml_converter/doc/rendering/render_on_map.md | 13 + .../doc/rendering/render_on_minimap.md | 13 + .../doc/rendering/scale_on_map_with_zoom.md | 15 + xml_converter/doc/rotation.md | 37 -- xml_converter/doc/rotation/rotation.md | 35 ++ xml_converter/doc/scale.md | 25 - xml_converter/doc/scale/icon_size.md | 13 + xml_converter/doc/scale/trail_scale.md | 13 + xml_converter/doc/schedule.md | 23 - xml_converter/doc/schedule/schedule.md | 13 + .../doc/schedule/schedule_duration.md | 13 + xml_converter/doc/size_on_screen.md | 23 - .../size_on_screen/maximum_size_on_screen.md | 12 + .../size_on_screen/minimum_size_on_screen.md | 13 + xml_converter/doc/specialization_filter.md | 95 ---- .../specialization_filter.md | 92 ++++ xml_converter/doc/species_filter.md | 21 - .../doc/species_filter/species_filter.md | 19 + xml_converter/doc/texture.md | 45 -- xml_converter/doc/texture/animation_speed.md | 16 + xml_converter/doc/texture/color.md | 17 + xml_converter/doc/texture/icon.md | 17 + xml_converter/doc/texture/texture.md | 17 + xml_converter/doc/tooltip.md | 25 - .../doc/tooltip/tooltip_description.md | 15 + xml_converter/doc/tooltip/tooltip_name.md | 15 + xml_converter/doc/trail_data.md | 50 -- xml_converter/doc/trail_data/trail_data.md | 38 ++ .../doc/trail_data/trail_data_map_id.md | 37 ++ xml_converter/doc/trigger.md | 168 ------ xml_converter/doc/trigger/auto-trigger.md | 21 + xml_converter/doc/trigger/bounce_delay.md | 23 + xml_converter/doc/trigger/bounce_duration.md | 23 + xml_converter/doc/trigger/bounce_height.md | 22 + xml_converter/doc/trigger/copy_clipboard.md | 22 + xml_converter/doc/trigger/copy_message.md | 21 + xml_converter/doc/trigger/guid.md | 32 ++ xml_converter/doc/trigger/has_countdown.md | 20 + xml_converter/doc/trigger/hide_category.md | 21 + xml_converter/doc/trigger/info_message.md | 31 ++ .../doc/trigger/invert_visibility.md | 23 + xml_converter/doc/trigger/reset_behavior.md | 33 ++ xml_converter/doc/trigger/reset_length.md | 22 + xml_converter/doc/trigger/show_category.md | 23 + xml_converter/doc/trigger/toggle_category.md | 24 + xml_converter/doc/trigger/trigger_range.md | 23 + xml_converter/generators/code_generator.py | 479 +++++++++--------- xml_converter/generators/requirements.txt | 9 + .../web_templates/documentation.html | 2 +- .../generators/web_templates/infotable.html | 8 +- 85 files changed, 1495 insertions(+), 1176 deletions(-) create mode 100644 xml_converter/doc/acheivement/achievement_bitmask.md create mode 100644 xml_converter/doc/acheivement/achievement_id.md delete mode 100644 xml_converter/doc/achievement.md delete mode 100644 xml_converter/doc/alpha.md create mode 100644 xml_converter/doc/alpha/alpha.md delete mode 100644 xml_converter/doc/can_fade.md create mode 100644 xml_converter/doc/can_fade/can_fade.md delete mode 100644 xml_converter/doc/category.md create mode 100644 xml_converter/doc/category/category.md delete mode 100644 xml_converter/doc/fade.md create mode 100644 xml_converter/doc/fade/distance_fade_end.md create mode 100644 xml_converter/doc/fade/distance_fade_start.md delete mode 100644 xml_converter/doc/festival_filter.md create mode 100644 xml_converter/doc/festival_filter/festival_filter.md delete mode 100644 xml_converter/doc/is_wall.md create mode 100644 xml_converter/doc/is_wall/is_wall.md delete mode 100644 xml_converter/doc/map_id.md create mode 100644 xml_converter/doc/map_id/map_id.md create mode 100644 xml_converter/doc/map_id/map_type_filter.md delete mode 100644 xml_converter/doc/menu.md create mode 100644 xml_converter/doc/menu/default_visibility.md create mode 100644 xml_converter/doc/menu/display_name.md create mode 100644 xml_converter/doc/menu/is_seperator.md create mode 100644 xml_converter/doc/menu/name.md delete mode 100644 xml_converter/doc/mount_filter.md create mode 100644 xml_converter/doc/mount_filter/mount_filter.md delete mode 100644 xml_converter/doc/position.md create mode 100644 xml_converter/doc/position/heightoffset.md create mode 100644 xml_converter/doc/position/position.md delete mode 100644 xml_converter/doc/profession_filter.md create mode 100644 xml_converter/doc/profession_filter/profession_filter.md delete mode 100644 xml_converter/doc/rendering.md create mode 100644 xml_converter/doc/rendering/cull.md create mode 100644 xml_converter/doc/rendering/map_display_size.md create mode 100644 xml_converter/doc/rendering/render_ingame.md create mode 100644 xml_converter/doc/rendering/render_on_map.md create mode 100644 xml_converter/doc/rendering/render_on_minimap.md create mode 100644 xml_converter/doc/rendering/scale_on_map_with_zoom.md delete mode 100644 xml_converter/doc/rotation.md create mode 100644 xml_converter/doc/rotation/rotation.md delete mode 100644 xml_converter/doc/scale.md create mode 100644 xml_converter/doc/scale/icon_size.md create mode 100644 xml_converter/doc/scale/trail_scale.md delete mode 100644 xml_converter/doc/schedule.md create mode 100644 xml_converter/doc/schedule/schedule.md create mode 100644 xml_converter/doc/schedule/schedule_duration.md delete mode 100644 xml_converter/doc/size_on_screen.md create mode 100644 xml_converter/doc/size_on_screen/maximum_size_on_screen.md create mode 100644 xml_converter/doc/size_on_screen/minimum_size_on_screen.md delete mode 100644 xml_converter/doc/specialization_filter.md create mode 100644 xml_converter/doc/specialization_filter/specialization_filter.md delete mode 100644 xml_converter/doc/species_filter.md create mode 100644 xml_converter/doc/species_filter/species_filter.md delete mode 100644 xml_converter/doc/texture.md create mode 100644 xml_converter/doc/texture/animation_speed.md create mode 100644 xml_converter/doc/texture/color.md create mode 100644 xml_converter/doc/texture/icon.md create mode 100644 xml_converter/doc/texture/texture.md delete mode 100644 xml_converter/doc/tooltip.md create mode 100644 xml_converter/doc/tooltip/tooltip_description.md create mode 100644 xml_converter/doc/tooltip/tooltip_name.md delete mode 100644 xml_converter/doc/trail_data.md create mode 100644 xml_converter/doc/trail_data/trail_data.md create mode 100644 xml_converter/doc/trail_data/trail_data_map_id.md delete mode 100644 xml_converter/doc/trigger.md create mode 100644 xml_converter/doc/trigger/auto-trigger.md create mode 100644 xml_converter/doc/trigger/bounce_delay.md create mode 100644 xml_converter/doc/trigger/bounce_duration.md create mode 100644 xml_converter/doc/trigger/bounce_height.md create mode 100644 xml_converter/doc/trigger/copy_clipboard.md create mode 100644 xml_converter/doc/trigger/copy_message.md create mode 100644 xml_converter/doc/trigger/guid.md create mode 100644 xml_converter/doc/trigger/has_countdown.md create mode 100644 xml_converter/doc/trigger/hide_category.md create mode 100644 xml_converter/doc/trigger/info_message.md create mode 100644 xml_converter/doc/trigger/invert_visibility.md create mode 100644 xml_converter/doc/trigger/reset_behavior.md create mode 100644 xml_converter/doc/trigger/reset_length.md create mode 100644 xml_converter/doc/trigger/show_category.md create mode 100644 xml_converter/doc/trigger/toggle_category.md create mode 100644 xml_converter/doc/trigger/trigger_range.md create mode 100644 xml_converter/generators/requirements.txt diff --git a/xml_converter/doc/acheivement/achievement_bitmask.md b/xml_converter/doc/acheivement/achievement_bitmask.md new file mode 100644 index 00000000..91d44e83 --- /dev/null +++ b/xml_converter/doc/acheivement/achievement_bitmask.md @@ -0,0 +1,14 @@ +--- +name: Achievement Bitmask +type: Fixed32 +applies_to: [Icon, Trail] +compatability: [TacO, BlishHUD, Burrito] +xml_fields: ["AchievementBit"] +protobuf_field: "achievement_bit" +--- +A portion of an achievement that, if completed, will hide this marker. + +Notes +===== + +https://blishhud.com/docs/markers/attributes/achievement \ No newline at end of file diff --git a/xml_converter/doc/acheivement/achievement_id.md b/xml_converter/doc/acheivement/achievement_id.md new file mode 100644 index 00000000..1a569dd8 --- /dev/null +++ b/xml_converter/doc/acheivement/achievement_id.md @@ -0,0 +1,14 @@ +--- +name: Achievement ID +type: Int32 +applies_to: [Icon, Trail] +compatability: [TacO, BlishHUD, Burrito] +xml_fields: ["AchievementId"] +protobuf_field: "achievement_id" +--- +An achivement that, if completed, will hide this marker + +Notes +===== + +https://blishhud.com/docs/markers/attributes/achievement \ No newline at end of file diff --git a/xml_converter/doc/achievement.md b/xml_converter/doc/achievement.md deleted file mode 100644 index ae97b069..00000000 --- a/xml_converter/doc/achievement.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -attribute_category: Achievement -fields: - - name: Achievement ID - type: Int32 - applies_to: [Icon, Trail] - compatability: [TacO, BlishHUD, Burrito] - xml_fields: ["AchievementId"] - protobuf_field: "achievement_id" - description: "An achivement that, if completed, will hide this marker." - - - name: Achievement Bitmask - type: Fixed32 - applies_to: [Icon, Trail] - compatability: [TacO, BlishHUD, Burrito] - xml_fields: ["AchievementBit"] - protobuf_field: "achievement_bit" - description: "A portion of an achievement that, if completed, will hide this marker." ---- - -Notes -===== - -https://blishhud.com/docs/markers/attributes/achievement \ No newline at end of file diff --git a/xml_converter/doc/alpha.md b/xml_converter/doc/alpha.md deleted file mode 100644 index 78b7da55..00000000 --- a/xml_converter/doc/alpha.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -attribute_category: Alpha -fields: - - name: Alpha - description: The opacity of the object - type: Float32 - applies_to: [Icon, Trail] - xml_fields: [Alpha] - protobuf_field: alpha - compatability: [TacO, BlishHUD, Burrito] ---- - -Notes -===== -https://blishhud.com/docs/markers/attributes/alpha diff --git a/xml_converter/doc/alpha/alpha.md b/xml_converter/doc/alpha/alpha.md new file mode 100644 index 00000000..f25752a8 --- /dev/null +++ b/xml_converter/doc/alpha/alpha.md @@ -0,0 +1,13 @@ +--- +name: Alpha +type: Float32 +applies_to: [Icon, Trail] +xml_fields: [Alpha] +protobuf_field: alpha +compatability: [TacO, BlishHUD, Burrito] +--- +The opacity of the object + +Notes +===== +https://blishhud.com/docs/markers/attributes/alpha diff --git a/xml_converter/doc/can_fade.md b/xml_converter/doc/can_fade.md deleted file mode 100644 index e93eb947..00000000 --- a/xml_converter/doc/can_fade.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -attribute_category: Can Fade -fields: - - name: Can Fade - description: A flag to determine if an object can be made transparent when it is possibly occluding the player. - type: Boolean - applies_to: [Icon, Trail] - xml_fields: [CanFade] - protobuf_field: can_fade - compatability: [TacO, BlishHUD, Burrito] ---- - -Notes -===== -https://blishhud.com/docs/markers/attributes/canfade diff --git a/xml_converter/doc/can_fade/can_fade.md b/xml_converter/doc/can_fade/can_fade.md new file mode 100644 index 00000000..e6f5fc1a --- /dev/null +++ b/xml_converter/doc/can_fade/can_fade.md @@ -0,0 +1,12 @@ +--- +name: Can Fade +type: Boolean +applies_to: [Icon, Trail] +xml_fields: [CanFade] +protobuf_field: can_fade +compatability: [TacO, BlishHUD, Burrito] +--- + A flag to determine if an object can be made transparent when it is possibly occluding the player. +Notes +===== +https://blishhud.com/docs/markers/attributes/canfade diff --git a/xml_converter/doc/category.md b/xml_converter/doc/category.md deleted file mode 100644 index 83909790..00000000 --- a/xml_converter/doc/category.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -attribute_category: Category -fields: - - name: Category - description: The category this object belongs to. - type: Custom - class: Category - applies_to: [Icon, Trail] - xml_fields: [Type, Category] - protobuf_field: category - compatability: [TacO, BlishHUD, Burrito] ---- - -Notes -===== -https://blishhud.com/docs/markers/attributes/type diff --git a/xml_converter/doc/category/category.md b/xml_converter/doc/category/category.md new file mode 100644 index 00000000..9f345deb --- /dev/null +++ b/xml_converter/doc/category/category.md @@ -0,0 +1,14 @@ +--- +name: Category +type: Custom +class: Category +applies_to: [Icon, Trail] +xml_fields: [Type, Category] +protobuf_field: category +compatability: [TacO, BlishHUD, Burrito] +--- +The category this object belongs to. + +Notes +===== +https://blishhud.com/docs/markers/attributes/type diff --git a/xml_converter/doc/fade.md b/xml_converter/doc/fade.md deleted file mode 100644 index 25ddbc2a..00000000 --- a/xml_converter/doc/fade.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -attribute_category: Fade -fields: - - name: Distance Fade Start - description: Any part of the object that is farther then this value will begin to alpha fade gradually until it reaches 0 alpha at Distance Fade End. - type: Float32 - applies_to: [Icon, Trail] - xml_fields: [FadeNear, DistanceFadeStart] - protobuf_field: distance_fade_start - compatability: [TacO, BlishHUD, Burrito] - - - name: Distance Fade End - description: Any part of the object that is farther then this value will be at - type: Float32 - applies_to: [Icon, Trail] - xml_fields: [FadeFar, DistanceFadeEnd] - protobuf_field: distance_fade_end - compatability: [TacO, BlishHUD, Burrito] ---- - -Notes -===== -https://blishhud.com/docs/markers/attributes/fade diff --git a/xml_converter/doc/fade/distance_fade_end.md b/xml_converter/doc/fade/distance_fade_end.md new file mode 100644 index 00000000..a6082ce3 --- /dev/null +++ b/xml_converter/doc/fade/distance_fade_end.md @@ -0,0 +1,13 @@ +--- +name: Distance Fade End +type: Float32 +applies_to: [Icon, Trail] +xml_fields: [FadeFar, DistanceFadeEnd] +protobuf_field: distance_fade_end +compatability: [TacO, BlishHUD, Burrito] +--- +Any part of the object that is farther then this value will be at. + +Notes +===== +https://blishhud.com/docs/markers/attributes/fade diff --git a/xml_converter/doc/fade/distance_fade_start.md b/xml_converter/doc/fade/distance_fade_start.md new file mode 100644 index 00000000..db3a1762 --- /dev/null +++ b/xml_converter/doc/fade/distance_fade_start.md @@ -0,0 +1,13 @@ +--- +name: Distance Fade Start +type: Float32 +applies_to: [Icon, Trail] +xml_fields: [FadeNear, DistanceFadeStart] +protobuf_field: distance_fade_start +compatability: [TacO, BlishHUD, Burrito] +--- +Any part of the object that is farther then this value will begin to alpha fade gradually until it reaches 0 alpha at Distance Fade End. + +Notes +===== +https://blishhud.com/docs/markers/attributes/fade diff --git a/xml_converter/doc/festival_filter.md b/xml_converter/doc/festival_filter.md deleted file mode 100644 index 5488ad1b..00000000 --- a/xml_converter/doc/festival_filter.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -attribute_category: Festival Filter -fields: - - name: Festival Filter - type: MultiflagValue - applies_to: [Icon, Trail] - compatability: [TacO, BlishHUD, Burrito] - xml_fields: [Festival] - protobuf_field: festival_filter - description: "One of these festivals must be occuring for the markers to apear." - flags: - dragonbash: [DragonBash] - festival_of_the_four_winds: [FestivalOfTheFourWinds] - halloween: [Halloween] - lunar_new_year: [LunarNewYear] - super_adventure_festival: [SuperAdventureFestival, SuperAdventureBox] - wintersday: [Wintersday] - none: [None] - ---- - -Notes -===== -https://blishhud.com/docs/markers/attributes/festival diff --git a/xml_converter/doc/festival_filter/festival_filter.md b/xml_converter/doc/festival_filter/festival_filter.md new file mode 100644 index 00000000..16ec37c0 --- /dev/null +++ b/xml_converter/doc/festival_filter/festival_filter.md @@ -0,0 +1,21 @@ +--- +name: Festival Filter +type: MultiflagValue +applies_to: [Icon, Trail] +compatability: [TacO, BlishHUD, Burrito] +xml_fields: [Festival] +protobuf_field: festival_filter +flags: + dragonbash: [DragonBash] + festival_of_the_four_winds: [FestivalOfTheFourWinds] + halloween: [Halloween] + lunar_new_year: [LunarNewYear] + super_adventure_festival: [SuperAdventureFestival, SuperAdventureBox] + wintersday: [Wintersday] + none: [None] +--- +One of these festivals must be occuring for these markers to apear. + +Notes +===== +https://blishhud.com/docs/markers/attributes/festival diff --git a/xml_converter/doc/is_wall.md b/xml_converter/doc/is_wall.md deleted file mode 100644 index a7c145b3..00000000 --- a/xml_converter/doc/is_wall.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -attribute_category: Is Wall -fields: - - name: Is Wall - description: Rotate the trail 90 degrees so it is vertical instead of horizontal to represent a wall. - type: Boolean - applies_to: [Trail] - xml_fields: [IsWall] - protobuf_field: is_wall - compatability: [BlishHUD] ---- - -Notes -===== -https://blishhud.com/docs/markers/attributes/iswall \ No newline at end of file diff --git a/xml_converter/doc/is_wall/is_wall.md b/xml_converter/doc/is_wall/is_wall.md new file mode 100644 index 00000000..79d1eeaa --- /dev/null +++ b/xml_converter/doc/is_wall/is_wall.md @@ -0,0 +1,13 @@ +--- +name: Is Wall +type: Boolean +applies_to: [Trail] +xml_fields: [IsWall] +protobuf_field: is_wall +compatability: [BlishHUD] +--- +Rotate the trail 90 degrees so it is vertical instead of horizontal to represent a wall. + +Notes +===== +https://blishhud.com/docs/markers/attributes/iswall \ No newline at end of file diff --git a/xml_converter/doc/map_id.md b/xml_converter/doc/map_id.md deleted file mode 100644 index 05c07b76..00000000 --- a/xml_converter/doc/map_id.md +++ /dev/null @@ -1,73 +0,0 @@ ---- -attribute_category: Map ID -fields: - - name: Map ID - description: The ID of the map that this object should be displayed on. - type: Int32 - applies_to: [Icon, Trail] - xml_fields: [MapID] - protobuf_field: map_id - compatability: [TacO, BlishHUD, Burrito] - - - name: Map Type Filter - description: The types of maps this object should be displayed on. - type: MultiflagValue - applies_to: [Icon, Trail] - xml_fields: [MapID] - protobuf_field: map_type - compatability: [TacO, BlishHUD, Burrito] - flags: - # Unknown map type - unknown_map: ["Unknown"] - # Redirect map type, e.g. when logging in while in a PvP match. - redirect_map: [redirect] - # Character create map type. - character_create_map: [charactercreate] - # PvP map type. - pvp_map: [pvp] - # GvG map type. Unused. - gvg_map: [gvg] - # Instance map type, e.g. dungeons and story content. - instance_map: [instance] - # Public map type, e.g. open world. - public_map: [public] - # Tournament map type. Probably unused. - tournament_map: [tournament] - # Tutorial map type. - tutorial_map: [tutorial] - # User tournament map type. Probably unused. - user_tournament_map: [usertournament] - # Eternal Battlegrounds (WvW) map type. - center_map: [center] - # Eternal Battlegrounds (WvW) map type. - eternal_battlegrounds_map: [eternalbattlegrounds] - # Blue Borderlands (WvW) map type. - bluehome_map: [bluehome] - # Blue Borderlands (WvW) map type. - blue_borderlands_map: [blueborderlands] - # Green Borderlands (WvW) map type. - green_home_map: [greenhome] - # Green Borderlands (WvW) map type. - green_borderlands_map: [greenborderlands] - # Red Borderlands (WvW) map type. - red_home_map: [redhome] - # Red Borderlands (WvW) map type. - red_borderlands_map: [redborderlands] - # Fortune's Vale. Unused. - fortunes_vale_map: [fortunesvale] - # Obsidian Sanctum (WvW) map type. - jump_puzzle_map: [jumppuzzle] - # Obsidian Sanctum (WvW) map type. - obsidian_sanctum_map: [obsidiansanctum] - # Edge of the Mists (WvW) map type. - edge_of_the_mists_map: [edgeofthemists] - # Mini public map type, e.g. Dry Top, the Silverwastes and Mistlock Sanctuary. - public_mini_map: [publicmini] - # WvW lounge map type, e.g. Armistice Bastion. - wvw_lounge_map: [wvwlounge] ---- - -Notes -===== -https://blishhud.com/docs/markers/attributes/mapid -https://blishhud.com/docs/markers/attributes/maptype diff --git a/xml_converter/doc/map_id/map_id.md b/xml_converter/doc/map_id/map_id.md new file mode 100644 index 00000000..5598e309 --- /dev/null +++ b/xml_converter/doc/map_id/map_id.md @@ -0,0 +1,13 @@ +--- +name: Map ID +type: Int32 +applies_to: [Icon, Trail] +xml_fields: [MapID] +protobuf_field: map_id +compatability: [TacO, BlishHUD, Burrito] +--- +The ID of the map that this object should be displayed on. + +Notes +===== +https://blishhud.com/docs/markers/attributes/mapid diff --git a/xml_converter/doc/map_id/map_type_filter.md b/xml_converter/doc/map_id/map_type_filter.md new file mode 100644 index 00000000..c0b01142 --- /dev/null +++ b/xml_converter/doc/map_id/map_type_filter.md @@ -0,0 +1,62 @@ +--- +name: Map Type Filter +type: MultiflagValue +applies_to: [Icon, Trail] +xml_fields: [MapID] +protobuf_field: map_type +compatability: [TacO, BlishHUD, Burrito] +flags: + # Unknown map type + unknown_map: ["Unknown"] + # Redirect map type, e.g. when logging in while in a PvP match. + redirect_map: [redirect] + # Character create map type. + character_create_map: [charactercreate] + # PvP map type. + pvp_map: [pvp] + # GvG map type. Unused. + gvg_map: [gvg] + # Instance map type, e.g. dungeons and story content. + instance_map: [instance] + # Public map type, e.g. open world. + public_map: [public] + # Tournament map type. Probably unused. + tournament_map: [tournament] + # Tutorial map type. + tutorial_map: [tutorial] + # User tournament map type. Probably unused. + user_tournament_map: [usertournament] + # Eternal Battlegrounds (WvW) map type. + center_map: [center] + # Eternal Battlegrounds (WvW) map type. + eternal_battlegrounds_map: [eternalbattlegrounds] + # Blue Borderlands (WvW) map type. + bluehome_map: [bluehome] + # Blue Borderlands (WvW) map type. + blue_borderlands_map: [blueborderlands] + # Green Borderlands (WvW) map type. + green_home_map: [greenhome] + # Green Borderlands (WvW) map type. + green_borderlands_map: [greenborderlands] + # Red Borderlands (WvW) map type. + red_home_map: [redhome] + # Red Borderlands (WvW) map type. + red_borderlands_map: [redborderlands] + # Fortune's Vale. Unused. + fortunes_vale_map: [fortunesvale] + # Obsidian Sanctum (WvW) map type. + jump_puzzle_map: [jumppuzzle] + # Obsidian Sanctum (WvW) map type. + obsidian_sanctum_map: [obsidiansanctum] + # Edge of the Mists (WvW) map type. + edge_of_the_mists_map: [edgeofthemists] + # Mini public map type, e.g. Dry Top, the Silverwastes and Mistlock Sanctuary. + public_mini_map: [publicmini] + # WvW lounge map type, e.g. Armistice Bastion. + wvw_lounge_map: [wvwlounge] +--- +The types of maps this object should be displayed on. + +Notes +===== +https://blishhud.com/docs/markers/attributes/maptype diff --git a/xml_converter/doc/menu.md b/xml_converter/doc/menu.md deleted file mode 100644 index bea9ba61..00000000 --- a/xml_converter/doc/menu.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -attribute_category: Category -fields: - - name: Default Visibility - description: If the category should be shown or hidden on or off by default. - type: Boolean - applies_to: [Category] - xml_fields: [DefaultToggle] - protobuf_field: default_visibility - compatability: [TacO, BlishHUD, Burrito] - - - name: Display Name - description: A human readable name of this category. - type: String - applies_to: [Category] - xml_fields: [DisplayName] - protobuf_field: display_name - compatability: [TacO, BlishHUD, Burrito] - - - name: Name - description: A machine readable name of this category. - type: String - applies_to: [Category] - xml_fields: [Name] - protobuf_field: name - compatability: [TacO, BlishHUD, Burrito] - - - name: Is Seperator - description: Determines if this element is a seperator not a category. - type: Boolean - applies_to: [Category] - xml_fields: [IsSeperator] - protobuf_field: is_seperator - compatability: [TacO, BlishHUD, Burrito] - - ---- - -Notes -===== - - -https://blishhud.com/docs/markers/attributes/defaulttoggle -https://blishhud.com/docs/markers/attributes/displayname -https://blishhud.com/docs/markers/attributes/isseparator - diff --git a/xml_converter/doc/menu/default_visibility.md b/xml_converter/doc/menu/default_visibility.md new file mode 100644 index 00000000..0559489d --- /dev/null +++ b/xml_converter/doc/menu/default_visibility.md @@ -0,0 +1,16 @@ +--- +name: Default Visibility +type: Boolean +applies_to: [Category] +xml_fields: [DefaultToggle] +protobuf_field: default_visibility +compatability: [TacO, BlishHUD, Burrito] +--- + +Notes +===== +If the category should be shown or hidden on or off by default. + +https://blishhud.com/docs/markers/attributes/defaulttoggle + + diff --git a/xml_converter/doc/menu/display_name.md b/xml_converter/doc/menu/display_name.md new file mode 100644 index 00000000..c66d97b5 --- /dev/null +++ b/xml_converter/doc/menu/display_name.md @@ -0,0 +1,15 @@ +--- +name: Display Name +type: String +applies_to: [Category] +xml_fields: [DisplayName] +protobuf_field: display_name +compatability: [TacO, BlishHUD, Burrito] +--- +A human readable name of this category. + +Notes +===== +https://blishhud.com/docs/markers/attributes/displayname + + diff --git a/xml_converter/doc/menu/is_seperator.md b/xml_converter/doc/menu/is_seperator.md new file mode 100644 index 00000000..3b21bbe5 --- /dev/null +++ b/xml_converter/doc/menu/is_seperator.md @@ -0,0 +1,15 @@ +--- +name: Is Seperator +type: Boolean +applies_to: [Category] +xml_fields: [IsSeperator] +protobuf_field: is_seperator +compatability: [TacO, BlishHUD, Burrito] +--- + +Notes +===== +Determines if this element is a seperator not a category. + +https://blishhud.com/docs/markers/attributes/isseparator + diff --git a/xml_converter/doc/menu/name.md b/xml_converter/doc/menu/name.md new file mode 100644 index 00000000..94425156 --- /dev/null +++ b/xml_converter/doc/menu/name.md @@ -0,0 +1,16 @@ +--- +name: Name +type: String +applies_to: [Category] +xml_fields: [Name] +protobuf_field: name +compatability: [TacO, BlishHUD, Burrito] +--- + +Notes +===== +A machine readable name of this category. + +https://blishhud.com/docs/markers/attributes/displayname + + diff --git a/xml_converter/doc/mount_filter.md b/xml_converter/doc/mount_filter.md deleted file mode 100644 index 046d5545..00000000 --- a/xml_converter/doc/mount_filter.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -attribute_category: Mount Filter -fields: - - name: Mount Filter - type: MultiflagValue - applies_to: [Icon, Trail] - compatability: [TacO, BlishHUD, Burrito] - xml_fields: ["Mount"] - protobuf_field: mount_filter - description: "A player must be on one of the mounts in the list to be able to see the objects." - flags: - raptor: ["Raptor"] - springer: ["Springer"] - skimmer: ["Skimmer"] - jackal: ["Jackal"] - griffon: ["Griffon"] - roller_beetle: ["RollerBeetle"] - warclaw: ["Warclaw"] - skyscale: ["Skyscale"] - skiff: ["Skiff"] - seige_turtle: ["SeigeTurtle"] - - ---- - -Notes -===== -https://blishhud.com/docs/markers/attributes/mount diff --git a/xml_converter/doc/mount_filter/mount_filter.md b/xml_converter/doc/mount_filter/mount_filter.md new file mode 100644 index 00000000..226c7c65 --- /dev/null +++ b/xml_converter/doc/mount_filter/mount_filter.md @@ -0,0 +1,24 @@ +--- +name: Mount Filter +type: MultiflagValue +applies_to: [Icon, Trail] +compatability: [TacO, BlishHUD, Burrito] +xml_fields: ["Mount"] +protobuf_field: mount_filter +flags: + raptor: ["Raptor"] + springer: ["Springer"] + skimmer: ["Skimmer"] + jackal: ["Jackal"] + griffon: ["Griffon"] + roller_beetle: ["RollerBeetle"] + warclaw: ["Warclaw"] + skyscale: ["Skyscale"] + skiff: ["Skiff"] + seige_turtle: ["SeigeTurtle"] +--- +A player must be on one of the mounts in the list to be able to see the objects. + +Notes +===== +https://blishhud.com/docs/markers/attributes/mount diff --git a/xml_converter/doc/position.md b/xml_converter/doc/position.md deleted file mode 100644 index 4dbcac1f..00000000 --- a/xml_converter/doc/position.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -attribute_category: Position -fields: - - name: Position - type: CompoundValue - applies_to: ["Icon"] - xml_fields: ["Position"] - compatability: [TacO, Burrito, BlishHUD] - description: "An XYZ location of a point in the game world." - protobuf_field: position - components: - - - name: X Position - type: Float32 - xml_fields: [XPos, PositionX] - protobuf_field: "x" - compatability: [TacO, Burrito, BlishHUD] - description: The X Component of the Position value - - - name: Y Position - type: Float32 - xml_fields: [YPos, PositionX] - protobuf_field: "y" - compatability: [TacO, Burrito, BlishHUD] - description: The Y Component of the Position value - - - name: Z Position - type: Float32 - xml_fields: [ZPos, PositionZ] - protobuf_field: "z" - compatability: [TacO, Burrito, BlishHUD] - description: The Z Component of the Position value - xml_export: "Children Only" - - - name: Height Offset - type: Float32 - applies_to: ["Icon"] - xml_fields: ["HeightOffset"] - compatability: [TacO, Burrito, BlishHUD] - description: A vertical offset of the object from the recorded position. - protobuf_field: height_offset ---- - -Notes -===== -https://blishhud.com/docs/markers/attributes/position -https://blishhud.com/docs/markers/attributes/heightoffset diff --git a/xml_converter/doc/position/heightoffset.md b/xml_converter/doc/position/heightoffset.md new file mode 100644 index 00000000..21aab22d --- /dev/null +++ b/xml_converter/doc/position/heightoffset.md @@ -0,0 +1,13 @@ +--- +name: Height Offset +type: Float32 +applies_to: ["Icon"] +xml_fields: ["HeightOffset"] +compatability: [TacO, Burrito, BlishHUD] +protobuf_field: height_offset +--- +A vertical offset of the object from the recorded position. + +Notes +===== +https://blishhud.com/docs/markers/attributes/heightoffset diff --git a/xml_converter/doc/position/position.md b/xml_converter/doc/position/position.md new file mode 100644 index 00000000..1c60fb4d --- /dev/null +++ b/xml_converter/doc/position/position.md @@ -0,0 +1,37 @@ +--- +name: Position +type: CompoundValue +applies_to: ["Icon"] +xml_fields: ["Position"] +compatability: [TacO, Burrito, BlishHUD] +protobuf_field: position +components: + + - name: X Position + type: Float32 + xml_fields: [XPos, PositionX] + protobuf_field: "x" + compatability: [TacO, Burrito, BlishHUD] + + + - name: Y Position + type: Float32 + xml_fields: [YPos, PositionX] + protobuf_field: "y" + compatability: [TacO, Burrito, BlishHUD] + + + - name: Z Position + type: Float32 + xml_fields: [ZPos, PositionZ] + protobuf_field: "z" + compatability: [TacO, Burrito, BlishHUD] + +xml_export: "Children Only" +--- +An XYZ location of a point in the game world. + +Notes +===== +https://blishhud.com/docs/markers/attributes/position +https://blishhud.com/docs/markers/attributes/heightoffset diff --git a/xml_converter/doc/profession_filter.md b/xml_converter/doc/profession_filter.md deleted file mode 100644 index 4f42baa8..00000000 --- a/xml_converter/doc/profession_filter.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -attribute_category: Profession Filter -fields: - - name: Profession Filter - type: MultiflagValue - applies_to: [Icon, Trail] - compatability: [TacO, BlishHUD, Burrito] - xml_fields: [Profession] - protobuf_field: profession_filter - description: "The player must be player a character of one of the professions in this list." - flags: - guardian: [Guardian] - warrior: [Warrior] - engineer: [Engineer] - ranger: [Ranger] - thief: [Thief] - elementalist: [Elementalist] - mesmer: [Mesmer] - necromancer: [Necromancer] - revenant: [Revenant] ---- - -Notes -===== -https://blishhud.com/docs/markers/attributes/profession -PARSEABLE_VAR(profession_filter, ProfessionFilter, "Profession") diff --git a/xml_converter/doc/profession_filter/profession_filter.md b/xml_converter/doc/profession_filter/profession_filter.md new file mode 100644 index 00000000..999c71eb --- /dev/null +++ b/xml_converter/doc/profession_filter/profession_filter.md @@ -0,0 +1,25 @@ +--- +name: Profession Filter +type: MultiflagValue +applies_to: [Icon, Trail] +compatability: [TacO, BlishHUD, Burrito] +xml_fields: [Profession] +protobuf_field: profession_filter +flags: + guardian: [Guardian] + warrior: [Warrior] + engineer: [Engineer] + ranger: [Ranger] + thief: [Thief] + elementalist: [Elementalist] + mesmer: [Mesmer] + necromancer: [Necromancer] + revenant: [Revenant] +--- +The player must be player a character of one of the professions in this list. + +Notes +===== +https://blishhud.com/docs/markers/attributes/profession + +PARSEABLE_VAR(profession_filter, ProfessionFilter, "Profession") diff --git a/xml_converter/doc/rendering.md b/xml_converter/doc/rendering.md deleted file mode 100644 index 4788632a..00000000 --- a/xml_converter/doc/rendering.md +++ /dev/null @@ -1,75 +0,0 @@ ---- -attribute_category: Scale -fields: - - name: Render on Minimap - description: Allows or Prevents this object from being rendered on the minimap aka compass. - type: Boolean - applies_to: [Icon, Trail] - xml_fields: [MinimapVisibility, BHMinimapVisibility] - protobuf_field: __tentative__render_on_minimap - compatability: [TacO, BlishHUD, Burrito] - - - name: Render on Map - description: Allows or Prevents this object from being rendered on the world map. - type: Boolean - applies_to: [Icon, Trail] - xml_fields: [MapVisibility, BHMapVisibility] - protobuf_field: __tentative__render_on_map - compatability: [TacO, BlishHUD, Burrito] - - - name: Render Ingame - description: Allows or Prevents this object from being rendered in the 3D game space. - type: Boolean - applies_to: [Icon, Trail] - xml_fields: [IngameVisibility, BHIngameVisibility] - protobuf_field: __tentative__render_ingame - compatability: [TacO, BlishHUD, Burrito] - - - name: Render Ingame - description: Allows or Prevents this object from being rendered in the 3D game space. - type: Boolean - applies_to: [Icon, Trail] - xml_fields: [IngameVisibility, BHIngameVisibility] - protobuf_field: __tentative__render_ingame - compatability: [TacO, BlishHUD, Burrito] - - - name: Map Display Size - description: The size, in pixels, that the marker should be shown on the minimap or fullscreen map. - type: Int32 - applies_to: [Icon] - xml_fields: [MapDisplaySize] - protobuf_field: map_display_size - compatability: [TacO, BlishHUD, Burrito] - - - name: Scale on Map With Zoom - description: Scale the size of the object to be the same scale as the map. - type: Boolean - applies_to: [Icon] - xml_fields: [ScaleOnMapWithZoom] - protobuf_field: scale_on_map_with_zoom - compatability: [TacO, BlishHUD, Burrito] - - - name: Cull - description: Cull one of the sides of an Icon or Trail - applies_to: [Icon, Trail] - xml_fields: [Cull] - protobuf_field: cull - type: Enum - compatability: [TacO, BlishHUD, Burrito] - values: - none: ["None"] - clockwise: ["Clockwise"] - counter_clockwise: ["CounterClockwise"] - ---- - -Notes -===== -https://blishhud.com/docs/markers/attributes/visibility - -We want to figure out a way to invert this value becuase a "false" value is the default value inside a protobuf and if we set the default as "true" then we have to write this field for every object. This inversion will need to be present in the code generator and that might take a bit to design and implement. - -https://blishhud.com/docs/markers/attributes/mapdisplaysize -https://blishhud.com/docs/markers/attributes/scaleonmapwithzoom - https://blishhud.com/docs/markers/attributes/cull - diff --git a/xml_converter/doc/rendering/cull.md b/xml_converter/doc/rendering/cull.md new file mode 100644 index 00000000..6a0ef05e --- /dev/null +++ b/xml_converter/doc/rendering/cull.md @@ -0,0 +1,19 @@ +--- +name: Cull +applies_to: [Icon, Trail] +xml_fields: [Cull] +protobuf_field: cull +type: Enum +compatability: [TacO, BlishHUD, Burrito] +values: + none: ["None"] + clockwise: ["Clockwise"] + counter_clockwise: ["CounterClockwise"] + +--- +Cull one of the sides of an Icon or Trail + +Notes +===== + https://blishhud.com/docs/markers/attributes/cull + diff --git a/xml_converter/doc/rendering/map_display_size.md b/xml_converter/doc/rendering/map_display_size.md new file mode 100644 index 00000000..f8f022ab --- /dev/null +++ b/xml_converter/doc/rendering/map_display_size.md @@ -0,0 +1,15 @@ +--- +name: Map Display Size +type: Int32 +applies_to: [Icon] +xml_fields: [MapDisplaySize] +protobuf_field: map_display_size +compatability: [TacO, BlishHUD, Burrito] +--- +The size, in pixels, that the marker should be shown on the minimap or fullscreen map. + +Notes +===== +https://blishhud.com/docs/markers/attributes/mapdisplaysize + + diff --git a/xml_converter/doc/rendering/render_ingame.md b/xml_converter/doc/rendering/render_ingame.md new file mode 100644 index 00000000..0794b34c --- /dev/null +++ b/xml_converter/doc/rendering/render_ingame.md @@ -0,0 +1,17 @@ +--- +name: Render Ingame +type: Boolean +applies_to: [Icon, Trail] +xml_fields: [IngameVisibility, BHIngameVisibility] +protobuf_field: __tentative__render_ingame +compatability: [TacO, BlishHUD, Burrito] + +--- + +Allows or Prevents this object from being rendered in the 3D game space. + +Notes +===== + +We want to figure out a way to invert this value becuase a "false" value is the default value inside a protobuf and if we set the default as "true" then we have to write this field for every object. This inversion will need to be present in the code generator and that might take a bit to design and implement. + diff --git a/xml_converter/doc/rendering/render_on_map.md b/xml_converter/doc/rendering/render_on_map.md new file mode 100644 index 00000000..e63e3020 --- /dev/null +++ b/xml_converter/doc/rendering/render_on_map.md @@ -0,0 +1,13 @@ +--- +name: Render on Map +type: Boolean +applies_to: [Icon, Trail] +xml_fields: [MapVisibility, BHMapVisibility] +protobuf_field: __tentative__render_on_map +compatability: [TacO, BlishHUD, Burrito] +--- +Allows or Prevents this object from being rendered on the world map. + +Notes +===== + diff --git a/xml_converter/doc/rendering/render_on_minimap.md b/xml_converter/doc/rendering/render_on_minimap.md new file mode 100644 index 00000000..77fb2322 --- /dev/null +++ b/xml_converter/doc/rendering/render_on_minimap.md @@ -0,0 +1,13 @@ +--- +name: Render on Minimap +type: Boolean +applies_to: [Icon, Trail] +xml_fields: [MinimapVisibility, BHMinimapVisibility] +protobuf_field: __tentative__render_on_minimap +compatability: [TacO, BlishHUD, Burrito] +--- + +Allows or Prevents this object from being rendered on the minimap aka compass. + +Notes +===== diff --git a/xml_converter/doc/rendering/scale_on_map_with_zoom.md b/xml_converter/doc/rendering/scale_on_map_with_zoom.md new file mode 100644 index 00000000..7679a6a5 --- /dev/null +++ b/xml_converter/doc/rendering/scale_on_map_with_zoom.md @@ -0,0 +1,15 @@ +--- +name: Scale on Map With Zoom +type: Boolean +applies_to: [Icon] +xml_fields: [ScaleOnMapWithZoom] +protobuf_field: scale_on_map_with_zoom +compatability: [TacO, BlishHUD, Burrito] +--- +Scale the size of the object to be the same scale as the map. + +Notes +===== + +https://blishhud.com/docs/markers/attributes/scaleonmapwithzoom + diff --git a/xml_converter/doc/rotation.md b/xml_converter/doc/rotation.md deleted file mode 100644 index 993c02b4..00000000 --- a/xml_converter/doc/rotation.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -attribute_category: Rotation -fields: - - name: Rotation - type: CompoundValue - applies_to: ["Icon"] - xml_fields: ["Rotation"] - compatability: [TacO, Burrito, BlishHUD] - description: "Euler X Y Z rotation." - protobuf_field: euler_rotation - components: - - name: X Rotation - type: Float32 - xml_fields: [RotateX] - protobuf_field: "x" - compatability: [TacO, Burrito, BlishHUD] - description: The X Component of the Euler rotation. - - - name: Y Rotation - type: Float32 - xml_fields: [RotateY] - protobuf_field: "y" - compatability: [TacO, Burrito, BlishHUD] - description: The Y Component of the Euler rotation. - - - name: Z Rotation - type: Float32 - xml_fields: [RotateZ] - protobuf_field: "z" - compatability: [TacO, Burrito, BlishHUD] - description: The Z Component of the Euler rotation. - xml_export: "Parent Only" ---- - -Notes -===== -https://blishhud.com/docs/markers/attributes/rotate diff --git a/xml_converter/doc/rotation/rotation.md b/xml_converter/doc/rotation/rotation.md new file mode 100644 index 00000000..d6137e0a --- /dev/null +++ b/xml_converter/doc/rotation/rotation.md @@ -0,0 +1,35 @@ +--- +name: Rotation +type: CompoundValue +applies_to: ["Icon"] +xml_fields: ["Rotation"] +compatability: [TacO, Burrito, BlishHUD] +protobuf_field: euler_rotation +components: +- name: X Rotation + type: Float32 + xml_fields: [RotateX] + protobuf_field: "x" + compatability: [TacO, Burrito, BlishHUD] + + +- name: Y Rotation + type: Float32 + xml_fields: [RotateY] + protobuf_field: "y" + compatability: [TacO, Burrito, BlishHUD] + + +- name: Z Rotation + type: Float32 + xml_fields: [RotateZ] + protobuf_field: "z" + compatability: [TacO, Burrito, BlishHUD] + +xml_export: "Parent Only" +--- +Euler X Y Z rotation. + +Notes +===== +https://blishhud.com/docs/markers/attributes/rotate diff --git a/xml_converter/doc/scale.md b/xml_converter/doc/scale.md deleted file mode 100644 index 7606749f..00000000 --- a/xml_converter/doc/scale.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -attribute_category: Scale -fields: - - name: Trail Scale - description: Adjusts the width of a trail mesh as a multiplier to the default width. - type: Float32 - applies_to: [Trail] - xml_fields: [TrailScale] - protobuf_field: scale - compatability: [TacO, BlishHUD, Burrito] - - - name: Icon Size - description: (Unclear) Some value representation of how large an icon should be. Is this a scale multiplier or a fixed size value? How does this relate to MinSize and MaxSize. - type: Float32 - applies_to: [Icon] - xml_fields: [IconSize] - protobuf_field: __tentative__scale - compatability: [TacO, BlishHUD, Burrito] ---- - -Notes -===== -https://blishhud.com/docs/markers/attributes/trailscale/ -https://blishhud.com/docs/markers/attributes/iconfile -https://blishhud.com/docs/markers/attributes/color diff --git a/xml_converter/doc/scale/icon_size.md b/xml_converter/doc/scale/icon_size.md new file mode 100644 index 00000000..8b8322ba --- /dev/null +++ b/xml_converter/doc/scale/icon_size.md @@ -0,0 +1,13 @@ +--- +name: Icon Size +type: Float32 +applies_to: [Icon] +xml_fields: [IconSize] +protobuf_field: __tentative__scale +compatability: [TacO, BlishHUD, Burrito] +--- +Unclear) Some value representation of how large an icon should be. Is this a scale multiplier or a fixed size value? How does this relate to MinSize and MaxSize. + +Notes +===== +https://blishhud.com/docs/markers/attributes/iconfile diff --git a/xml_converter/doc/scale/trail_scale.md b/xml_converter/doc/scale/trail_scale.md new file mode 100644 index 00000000..6cb6c106 --- /dev/null +++ b/xml_converter/doc/scale/trail_scale.md @@ -0,0 +1,13 @@ +--- +name: Trail Scale +type: Float32 +applies_to: [Trail] +xml_fields: [TrailScale] +protobuf_field: scale +compatability: [TacO, BlishHUD, Burrito] +--- +Adjusts the width of a trail mesh as a multiplier to the default width. + +Notes +===== +https://blishhud.com/docs/markers/attributes/trailscale/ diff --git a/xml_converter/doc/schedule.md b/xml_converter/doc/schedule.md deleted file mode 100644 index f5eb5f24..00000000 --- a/xml_converter/doc/schedule.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -attribute_category: Schedule -fields: - - name: Schedule - description: A description of when to hide or show an object based on a realtime schedule. - type: String - applies_to: [Icon, Trail] - xml_fields: [Schedule] - protobuf_field: bhdraft__schedule - compatability: [BlishHUD] - - - name: Schedule Duration - description: Combined with Schedule to determine how long after the object is shown before it is hidden again. - type: Float32 - applies_to: [Icon, Trail] - xml_fields: [ScheduleDuration] - protobuf_field: bhdraft__schedule_duration - compatability: [BlishHUD] ---- - -Notes -===== -https://blishhud.com/docs/markers/attributes/schedule diff --git a/xml_converter/doc/schedule/schedule.md b/xml_converter/doc/schedule/schedule.md new file mode 100644 index 00000000..91f20e49 --- /dev/null +++ b/xml_converter/doc/schedule/schedule.md @@ -0,0 +1,13 @@ +--- +name: Schedule +type: String +applies_to: [Icon, Trail] +xml_fields: [Schedule] +protobuf_field: bhdraft__schedule +compatability: [BlishHUD] +--- +A description of when to hide or show an object based on a realtime schedule. + +Notes +===== +https://blishhud.com/docs/markers/attributes/schedule diff --git a/xml_converter/doc/schedule/schedule_duration.md b/xml_converter/doc/schedule/schedule_duration.md new file mode 100644 index 00000000..cd573129 --- /dev/null +++ b/xml_converter/doc/schedule/schedule_duration.md @@ -0,0 +1,13 @@ +--- +name: Schedule Duration +type: Float32 +applies_to: [Icon, Trail] +xml_fields: [ScheduleDuration] +protobuf_field: bhdraft__schedule_duration +compatability: [BlishHUD] +--- +Combined with Schedule to determine how long after the object is shown before it is hidden again. + +Notes +===== +https://blishhud.com/docs/markers/attributes/schedule diff --git a/xml_converter/doc/size_on_screen.md b/xml_converter/doc/size_on_screen.md deleted file mode 100644 index d59023a0..00000000 --- a/xml_converter/doc/size_on_screen.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -attribute_category: Size On Screen -fields: - - name: Minimum Size on Screen - description: The smallest width/height of this icon on the screen. - type: Int32 - applies_to: [Icon] - xml_fields: [MinSize] - protobuf_field: minimum_size_on_screen - compatability: [TacO, BlishHUD, Burrito] - - - name: Maximum Size On Screen - description: The largest width/height of this icon on the screen. - type: Int32 - applies_to: [Icon] - xml_fields: [MaxSize] - protobuf_field: maximum_size_on_screen - compatability: [TacO, BlishHUD, Burrito] ---- - -Notes -===== -https://blishhud.com/docs/markers/attributes/size diff --git a/xml_converter/doc/size_on_screen/maximum_size_on_screen.md b/xml_converter/doc/size_on_screen/maximum_size_on_screen.md new file mode 100644 index 00000000..346f48fc --- /dev/null +++ b/xml_converter/doc/size_on_screen/maximum_size_on_screen.md @@ -0,0 +1,12 @@ +--- +name: Maximum Size On Screen +type: Int32 +applies_to: [Icon] +xml_fields: [MaxSize] +protobuf_field: maximum_size_on_screen +compatability: [TacO, BlishHUD, Burrito] +--- +The largest width/height of this icon on the screen. +Notes +===== +https://blishhud.com/docs/markers/attributes/size diff --git a/xml_converter/doc/size_on_screen/minimum_size_on_screen.md b/xml_converter/doc/size_on_screen/minimum_size_on_screen.md new file mode 100644 index 00000000..cf6554c9 --- /dev/null +++ b/xml_converter/doc/size_on_screen/minimum_size_on_screen.md @@ -0,0 +1,13 @@ +--- +name: Minimum Size on Screen +type: Int32 +applies_to: [Icon] +xml_fields: [MinSize] +protobuf_field: minimum_size_on_screen +compatability: [TacO, BlishHUD, Burrito] +--- +The smallest width/height of this icon on the screen. + +Notes +===== +https://blishhud.com/docs/markers/attributes/size diff --git a/xml_converter/doc/specialization_filter.md b/xml_converter/doc/specialization_filter.md deleted file mode 100644 index 0fc04bcb..00000000 --- a/xml_converter/doc/specialization_filter.md +++ /dev/null @@ -1,95 +0,0 @@ ---- -attribute_category: Specialization Filter -fields: - - name: Specialization Filter - type: MultiflagValue - applies_to: [Icon, Trail] - compatability: [TacO, BlishHUD, Burrito] - xml_fields: ["Specialization"] - protobuf_field: specialization_filter - description: "The Specialization(s) that should be present to view this marker." - flags: - # Heart of Thorns Spec - elementalist_tempest: ["48", "Tempest"] - engineer_scrapper: ["43", "Scrapper"] - guardian_dragonhunter: ["27", "Dragonhunter"] - mesmer_chronomancer: ["40", "Chronomancer"] - necromancer_reaper: ["34", "Reaper"] - ranger_druid: ["5", "Druid"] - revenant_herald: ["52", "Herald"] - thief_daredevil: ["7", "Daredevil"] - warrior_berserker: ["18", "Berserker"] - - # Path of Fire Spec - elementalist_weaver: ["56", "Weaver"] - engineer_holosmith: ["57", "Holosmith"] - guardian_firebrand: ["62", "Firebrand"] - mesmer_mirage: ["59", "Mirage"] - necromancer_scourge: ["60", "Scourge"] - ranger_soulbeast: ["55", "Soulbeast"] - revenant_renegade: ["63", "Renegade"] - thief_deadeye: ["58", "Deadeye"] - warrior_spellbreaker: ["61", "Spellbreaker"] - - # TODO(#58): End of Dragons Spec Numbers - elementalist_catalyst: ["Catalyst"] - engineer_mechanist: ["Mechanist"] - guardian_willbender: ["Willbender"] - mesmer_virtuoso: ["Virtuoso"] - necromancer_harbinger: ["Harbinger"] - ranger_untamed: ["Untamed"] - revenant_vindicator: ["Vindicator"] - thief_specter: ["Specter"] - warrior_bladesworn: ["Bladesworn"] - - # Core Spec - elementalist_air: ["41"] - elementalist_arcane: ["37"] - elementalist_earth: ["26"] - elementalist_fire: ["31"] - elementalist_water: ["17"] - engineer_alchemy: ["29"] - engineer_explosives: ["6"] - engineer_firearms: ["38"] - engineer_inventions: ["47"] - engineer_tools: ["21"] - guardian_honor: ["49"] - guardian_radiance: ["16"] - guardian_valor: ["13"] - guardian_virtues: ["46"] - guardian_zeal: ["42"] - mesmer_chaos: ["45"] - mesmer_domination: ["10"] - mesmer_dueling: ["1"] - mesmer_illusions: ["24"] - mesmer_inspiration: ["23"] - necromancer_blood_magic: ["19"] - necromancer_curses: ["39"] - necromancer_death_magic: ["2"] - necromancer_soul_reaping: ["50"] - necromancer_spite: ["53"] - ranger_beastmastery: ["32"] - ranger_marksmanship: ["8"] - ranger_nature_magic: ["25"] - ranger_skirmishing: ["30"] - ranger_wilderness_survival: ["33"] - revenant_corruption: ["14"] - revenant_devastation: ["15"] - revenant_invocation: ["3"] - revenant_retribution: ["9"] - revenant_salvation: ["12"] - thief_acrobatics: ["54"] - thief_critical_strikes: ["35"] - thief_deadly_arts: ["28"] - thief_shadow_arts: ["20"] - thief_trickery: ["44"] - warrior_arms: ["36"] - warrior_defense: ["22"] - warrior_discipline: ["51"] - warrior_strength: ["4"] - warrior_tactics: ["11"] ---- - - -Notes -===== \ No newline at end of file diff --git a/xml_converter/doc/specialization_filter/specialization_filter.md b/xml_converter/doc/specialization_filter/specialization_filter.md new file mode 100644 index 00000000..5fa67fc9 --- /dev/null +++ b/xml_converter/doc/specialization_filter/specialization_filter.md @@ -0,0 +1,92 @@ +--- +name: Specialization Filter +type: MultiflagValue +applies_to: [Icon, Trail] +compatability: [TacO, BlishHUD, Burrito] +xml_fields: ["Specialization"] +protobuf_field: specialization_filter +flags: + # Heart of Thorns Spec + elementalist_tempest: ["48", "Tempest"] + engineer_scrapper: ["43", "Scrapper"] + guardian_dragonhunter: ["27", "Dragonhunter"] + mesmer_chronomancer: ["40", "Chronomancer"] + necromancer_reaper: ["34", "Reaper"] + ranger_druid: ["5", "Druid"] + revenant_herald: ["52", "Herald"] + thief_daredevil: ["7", "Daredevil"] + warrior_berserker: ["18", "Berserker"] + + # Path of Fire Spec + elementalist_weaver: ["56", "Weaver"] + engineer_holosmith: ["57", "Holosmith"] + guardian_firebrand: ["62", "Firebrand"] + mesmer_mirage: ["59", "Mirage"] + necromancer_scourge: ["60", "Scourge"] + ranger_soulbeast: ["55", "Soulbeast"] + revenant_renegade: ["63", "Renegade"] + thief_deadeye: ["58", "Deadeye"] + warrior_spellbreaker: ["61", "Spellbreaker"] + + # TODO(#58): End of Dragons Spec Numbers + elementalist_catalyst: ["Catalyst"] + engineer_mechanist: ["Mechanist"] + guardian_willbender: ["Willbender"] + mesmer_virtuoso: ["Virtuoso"] + necromancer_harbinger: ["Harbinger"] + ranger_untamed: ["Untamed"] + revenant_vindicator: ["Vindicator"] + thief_specter: ["Specter"] + warrior_bladesworn: ["Bladesworn"] + + # Core Spec + elementalist_air: ["41"] + elementalist_arcane: ["37"] + elementalist_earth: ["26"] + elementalist_fire: ["31"] + elementalist_water: ["17"] + engineer_alchemy: ["29"] + engineer_explosives: ["6"] + engineer_firearms: ["38"] + engineer_inventions: ["47"] + engineer_tools: ["21"] + guardian_honor: ["49"] + guardian_radiance: ["16"] + guardian_valor: ["13"] + guardian_virtues: ["46"] + guardian_zeal: ["42"] + mesmer_chaos: ["45"] + mesmer_domination: ["10"] + mesmer_dueling: ["1"] + mesmer_illusions: ["24"] + mesmer_inspiration: ["23"] + necromancer_blood_magic: ["19"] + necromancer_curses: ["39"] + necromancer_death_magic: ["2"] + necromancer_soul_reaping: ["50"] + necromancer_spite: ["53"] + ranger_beastmastery: ["32"] + ranger_marksmanship: ["8"] + ranger_nature_magic: ["25"] + ranger_skirmishing: ["30"] + ranger_wilderness_survival: ["33"] + revenant_corruption: ["14"] + revenant_devastation: ["15"] + revenant_invocation: ["3"] + revenant_retribution: ["9"] + revenant_salvation: ["12"] + thief_acrobatics: ["54"] + thief_critical_strikes: ["35"] + thief_deadly_arts: ["28"] + thief_shadow_arts: ["20"] + thief_trickery: ["44"] + warrior_arms: ["36"] + warrior_defense: ["22"] + warrior_discipline: ["51"] + warrior_strength: ["4"] + warrior_tactics: ["11"] +--- +The Specialization(s) that should be present to view this marker. + +Notes +===== \ No newline at end of file diff --git a/xml_converter/doc/species_filter.md b/xml_converter/doc/species_filter.md deleted file mode 100644 index 376d8ea5..00000000 --- a/xml_converter/doc/species_filter.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -attribute_category: Species Filter -fields: - - name: Species Filter - type: MultiflagValue - applies_to: [Icon, Trail] - compatability: [TacO, BlishHUD, Burrito] - xml_fields: [Race, Species] - protobuf_field: species_filter - description: "The player must be player a character of one of the species in this list." - flags: - asura: [asura] - charr: [charr] - human: [human] - norn: [norn] - sylvari: [sylvari] ---- - -Notes -===== -https://blishhud.com/docs/markers/attributes/race \ No newline at end of file diff --git a/xml_converter/doc/species_filter/species_filter.md b/xml_converter/doc/species_filter/species_filter.md new file mode 100644 index 00000000..f4e07898 --- /dev/null +++ b/xml_converter/doc/species_filter/species_filter.md @@ -0,0 +1,19 @@ +--- +name: Species Filter +type: MultiflagValue +applies_to: [Icon, Trail] +compatability: [TacO, BlishHUD, Burrito] +xml_fields: [Race, Species] +protobuf_field: species_filter + +flags: + asura: [asura] + charr: [charr] + human: [human] + norn: [norn] + sylvari: [sylvari] +--- +The player must be player a character of one of the species in this list." +Notes +===== +https://blishhud.com/docs/markers/attributes/race \ No newline at end of file diff --git a/xml_converter/doc/texture.md b/xml_converter/doc/texture.md deleted file mode 100644 index 877f0feb..00000000 --- a/xml_converter/doc/texture.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -attribute_category: Texture -fields: - - name: Texture - description: The path to an image which contains the texture that will be present on a trail. - type: Custom - class: Image - applies_to: [Trail] - xml_fields: [Texture] - protobuf_field: texture - compatability: [TacO, BlishHUD, Burrito] - - - name: Icon - description: The path to an image which contains the texture that will be present on an icon. - type: Custom - class: Image - applies_to: [Icon] - xml_fields: [IconFile] - protobuf_field: texture - compatability: [TacO, BlishHUD, Burrito] - - - name: Color - description: A multiplier color to tint the raw albedo texture of a marker of trail texture. (Unclear) Solid white will result in no change, solid black will result in a black texture. - type: Custom - class: Color - applies_to: [Icon, Trail] - xml_fields: [Color] - protobuf_field: color - compatability: [TacO, BlishHUD, Burrito] - - - name: Animation Speed - description: The speed which the texture should be moving across the object. - type: Float32 - applies_to: [Trail] - xml_fields: ["AnimSpeed", "AnimationSpeed"] - protobuf_field: animation_speed - compatability: [TacO, BlishHUD, Burrito] ---- - -Notes -===== -https://blishhud.com/docs/markers/attributes/texture -https://blishhud.com/docs/markers/attributes/iconfile -https://blishhud.com/docs/markers/attributes/color -https://blishhud.com/docs/markers/attributes/animspeed diff --git a/xml_converter/doc/texture/animation_speed.md b/xml_converter/doc/texture/animation_speed.md new file mode 100644 index 00000000..01b0e217 --- /dev/null +++ b/xml_converter/doc/texture/animation_speed.md @@ -0,0 +1,16 @@ +--- +name: Animation Speed +type: Float32 +applies_to: [Trail] +xml_fields: ["AnimSpeed", "AnimationSpeed"] +protobuf_field: animation_speed +compatability: [TacO, BlishHUD, Burrito] +--- +The speed which the texture should be moving across the object. + +Notes +===== +https://blishhud.com/docs/markers/attributes/texture +https://blishhud.com/docs/markers/attributes/iconfile +https://blishhud.com/docs/markers/attributes/color +https://blishhud.com/docs/markers/attributes/animspeed diff --git a/xml_converter/doc/texture/color.md b/xml_converter/doc/texture/color.md new file mode 100644 index 00000000..3b657cac --- /dev/null +++ b/xml_converter/doc/texture/color.md @@ -0,0 +1,17 @@ +--- +name: Color +type: Custom +class: Color +applies_to: [Icon, Trail] +xml_fields: [Color] +protobuf_field: color +compatability: [TacO, BlishHUD, Burrito] +--- +A multiplier color to tint the raw albedo texture of a marker of trail texture. (Unclear) Solid white will result in no change, solid black will result in a black texture. + +Notes +===== +https://blishhud.com/docs/markers/attributes/texture +https://blishhud.com/docs/markers/attributes/iconfile +https://blishhud.com/docs/markers/attributes/color +https://blishhud.com/docs/markers/attributes/animspeed diff --git a/xml_converter/doc/texture/icon.md b/xml_converter/doc/texture/icon.md new file mode 100644 index 00000000..716aaf99 --- /dev/null +++ b/xml_converter/doc/texture/icon.md @@ -0,0 +1,17 @@ +--- +name: Icon +type: Custom +class: Image +applies_to: [Icon] +xml_fields: [IconFile] +protobuf_field: texture +compatability: [TacO, BlishHUD, Burrito] +--- +The path to an image which contains the texture that will be present on an icon. + +Notes +===== +https://blishhud.com/docs/markers/attributes/texture +https://blishhud.com/docs/markers/attributes/iconfile +https://blishhud.com/docs/markers/attributes/color +https://blishhud.com/docs/markers/attributes/animspeed diff --git a/xml_converter/doc/texture/texture.md b/xml_converter/doc/texture/texture.md new file mode 100644 index 00000000..7823cbc5 --- /dev/null +++ b/xml_converter/doc/texture/texture.md @@ -0,0 +1,17 @@ +--- +name: Texture +type: Custom +class: Image +applies_to: [Trail] +xml_fields: [Texture] +protobuf_field: texture +compatability: [TacO, BlishHUD, Burrito] +--- +The path to an image which contains the texture that will be present on a trail. + +Notes +===== +https://blishhud.com/docs/markers/attributes/texture +https://blishhud.com/docs/markers/attributes/iconfile +https://blishhud.com/docs/markers/attributes/color +https://blishhud.com/docs/markers/attributes/animspeed diff --git a/xml_converter/doc/tooltip.md b/xml_converter/doc/tooltip.md deleted file mode 100644 index 667184eb..00000000 --- a/xml_converter/doc/tooltip.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -attribute_category: Scale -fields: - - name: Tooltip Name - description: The name of the tooltip when hovering over the minimap. - type: String - applies_to: [Icon] - xml_fields: [TipName] - protobuf_field: tip_name - compatability: [TacO, BlishHUD, Burrito] - - - name: Tooltip Description - description: The full text of the tooltip. - type: String - applies_to: [Icon, Category] - xml_fields: [TipDescription] - protobuf_field: tip_description - compatability: [TacO, BlishHUD, Burrito] ---- - -Notes -===== - - -https://blishhud.com/docs/markers/attributes/tip diff --git a/xml_converter/doc/tooltip/tooltip_description.md b/xml_converter/doc/tooltip/tooltip_description.md new file mode 100644 index 00000000..0c9df800 --- /dev/null +++ b/xml_converter/doc/tooltip/tooltip_description.md @@ -0,0 +1,15 @@ +--- +name: Tooltip Name +type: String +applies_to: [Icon] +xml_fields: [TipName] +protobuf_field: tip_name +compatability: [TacO, BlishHUD, Burrito] +--- +The name of the tooltip when hovering over the minimap. + +Notes +===== + + +https://blishhud.com/docs/markers/attributes/tip diff --git a/xml_converter/doc/tooltip/tooltip_name.md b/xml_converter/doc/tooltip/tooltip_name.md new file mode 100644 index 00000000..5c315f68 --- /dev/null +++ b/xml_converter/doc/tooltip/tooltip_name.md @@ -0,0 +1,15 @@ +--- +name: Tooltip Description +type: String +applies_to: [Icon, Category] +xml_fields: [TipDescription] +protobuf_field: tip_description +compatability: [TacO, BlishHUD, Burrito] +--- +The full text of the tooltip. + +Notes +===== + + +https://blishhud.com/docs/markers/attributes/tip diff --git a/xml_converter/doc/trail_data.md b/xml_converter/doc/trail_data.md deleted file mode 100644 index e19c5e0b..00000000 --- a/xml_converter/doc/trail_data.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -attribute_category: Trail Data -fields: - - name: Trail Data - type: Custom - class: TrailData - xml_fields: ["TrailData"] - protobuf_field: traildata - side_effects: [Map ID] - applies_to: [Trail] - compatability: [TacO, BlishHUD, Burrito] - description: A binary coordinate array for the path of a trail. - - - name: Trail Data Map ID - type: Custom - class: TrailDataMapId - xml_fields: ["TrailData"] - protobuf_field: map_id - applies_to: [Trail] - compatability: [TacO, BlishHUD, Burrito] - description: The map id is embedded inside of the trail binary for some ungodly reason. ---- - - -Notes -===== - - - -TrailData - - -GetFromXML(xml_node) -WriteToXML(self) # not quite right. - - -GetFromProtobuf(protobuf_node_object) # not quite right -SetProtobuf() # not quite right - - - -the return value of the set should be the value that needs to be set. -But also we can just pass in the number of variables to be "set" or "get" - - - -so really - GetFromProtobuf(arg1type* argument1, arg2type* argument2) -so really - SetProtobuf(arg1type* argument1, arg2type* argument2) \ No newline at end of file diff --git a/xml_converter/doc/trail_data/trail_data.md b/xml_converter/doc/trail_data/trail_data.md new file mode 100644 index 00000000..67169db0 --- /dev/null +++ b/xml_converter/doc/trail_data/trail_data.md @@ -0,0 +1,38 @@ +--- +name: Trail Data +type: Custom +class: TrailData +xml_fields: ["TrailData"] +protobuf_field: traildata +side_effects: [Map ID] +applies_to: [Trail] +compatability: [TacO, BlishHUD, Burrito] +--- +A binary coordinate array for the path of a trail. + +Notes +===== + + + +TrailData + + +GetFromXML(xml_node) +WriteToXML(self) # not quite right. + + +GetFromProtobuf(protobuf_node_object) # not quite right +SetProtobuf() # not quite right + + + +the return value of the set should be the value that needs to be set. +But also we can just pass in the number of variables to be "set" or "get" + + + +so really + GetFromProtobuf(arg1type* argument1, arg2type* argument2) +so really + SetProtobuf(arg1type* argument1, arg2type* argument2) \ No newline at end of file diff --git a/xml_converter/doc/trail_data/trail_data_map_id.md b/xml_converter/doc/trail_data/trail_data_map_id.md new file mode 100644 index 00000000..7d2c8773 --- /dev/null +++ b/xml_converter/doc/trail_data/trail_data_map_id.md @@ -0,0 +1,37 @@ +--- +name: Trail Data Map ID +type: Custom +class: TrailDataMapId +xml_fields: ["TrailData"] +protobuf_field: map_id +applies_to: [Trail] +compatability: [TacO, BlishHUD, Burrito] +--- +The map id is embedded inside of the trail binary for some ungodly reason. + +Notes +===== + + + +TrailData + + +GetFromXML(xml_node) +WriteToXML(self) # not quite right. + + +GetFromProtobuf(protobuf_node_object) # not quite right +SetProtobuf() # not quite right + + + +the return value of the set should be the value that needs to be set. +But also we can just pass in the number of variables to be "set" or "get" + + + +so really + GetFromProtobuf(arg1type* argument1, arg2type* argument2) +so really + SetProtobuf(arg1type* argument1, arg2type* argument2) \ No newline at end of file diff --git a/xml_converter/doc/trigger.md b/xml_converter/doc/trigger.md deleted file mode 100644 index 0125b916..00000000 --- a/xml_converter/doc/trigger.md +++ /dev/null @@ -1,168 +0,0 @@ ---- -attribute_category: Trigger -fields: - - name: Auto Trigger - description: Any triggers will be triggered automatially when the player enters within range instead of being triggered. - type: Boolean - applies_to: [Icon] - xml_fields: [AutoTrigger] - protobuf_field: trigger.auto_trigger - compatability: [TacO, BlishHUD, Burrito] - - - name: Trigger Range - description: Used to indicate a trigger range. This attribute is used by multiple other attributes to define a distance from the marker in which those attributes will activate their functionality or behavior. - type: Float32 - applies_to: [Icon] - xml_fields: [TriggerRange, InfoRange] - protobuf_field: trigger.range - compatability: [TacO, BlishHUD, Burrito] - - - name: Reset Length - description: When using behavior 4 (reappear after timer) this value defines, in seconds, the duration until the marker is reset after being activated. - type: Float32 - applies_to: [Icon] - xml_fields: [ResetLength] - protobuf_field: trigger.reset_length - compatability: [TacO, BlishHUD, Burrito] - - - name: Show Category - description: Show the specified category when triggered. - type: Custom - class: Category - applies_to: [Icon] - xml_fields: [Show] - protobuf_field: trigger.action_show_category - compatability: [TacO, BlishHUD, Burrito] - - - name: Hide Category - description: Hide the specified category when triggered. - type: Custom - class: Category - applies_to: [Icon] - xml_fields: [Hide] - protobuf_field: trigger.action_hide_category - compatability: [TacO, BlishHUD, Burrito] - - - name: Toggle Category - description: Show if hidden or Hide if shown the specified category when triggered. - type: Custom - class: Category - applies_to: [Icon] - xml_fields: [Toggle] - protobuf_field: trigger.action_toggle_category - compatability: [TacO, BlishHUD, Burrito] - - - name: Copy Message - description: A value that is copied to the clipboard when triggered. - type: String - applies_to: [Icon] - xml_fields: [CopyMessage] - protobuf_field: trigger.action_copy_clipboard - compatability: [TacO, BlishHUD, Burrito] - - - name: Copy Message - description: A message that is displayed to the user when an item is copied to the clipboard. - type: String - applies_to: [Icon] - xml_fields: [CopyMessage] - protobuf_field: trigger.action_copy_message - compatability: [TacO, BlishHUD, Burrito] - - - name: Invert Visibility - description: Inverts the hide show behavior so that it is shown when it is supposed to be hidden and hidden when it is supposed to be shown. - type: Boolean - applies_to: [Icon] - xml_fields: [InvertBehavior] - protobuf_field: trigger.invert_display - compatability: [TacO, BlishHUD, Burrito] - - - name: Bounce Height - description: How high should the icon bounce when triggered. - type: Float32 - applies_to: [Icon] - xml_fields: [BounceHeight] - protobuf_field: trigger.bounce_height - compatability: [TacO, BlishHUD, Burrito] - - - name: Bounce Duration - description: How long should the icon bounce for when triggered. - type: Float32 - applies_to: [Icon] - xml_fields: [BounceDuration] - protobuf_field: trigger.bounce_duration - compatability: [TacO, BlishHUD, Burrito] - - - name: Bounce Delay - description: How many seconds should pass before the bouncing begins. - type: Float32 - applies_to: [Icon] - xml_fields: [BounceDelay] - protobuf_field: trigger.bounce_delay - compatability: [TacO, BlishHUD, Burrito] - - - name: Info Message - description: Show a message to the user when triggered - type: String - applies_to: [Icon] - xml_fields: [Info] - protobuf_field: trigger.action_info_message - compatability: [TacO, BlishHUD, Burrito] - - - name: Reset Behavior - description: A behavior around triggers and retriggering. - type: Enum - applies_to: [Icon] - xml_fields: [Behavior] - protobuf_field: trigger.reset_behavior - compatability: [TacO, BlishHUD, Burrito] - values: - always_visible: ["0", "always_visible"] - map_change: ["1", "map_change"] - daily_reset: ["2", "daily_reset"] - never: ["3", "never"] - timer: ["4", "timer"] - map_reset: ["5", "map_reset"] - instance_change: ["6", "instance_change"] - daily_reset_per_character: ["7", "daily_reset_per_character"] - - weekly_reset: ["101", "weekly_reset"] - - - name: GUID - description: A globally unique identifier value to make sure this maker's trigger reset data is always assocaited with this marker and never lost or confused with other markers. - type: Custom - class: UniqueID - xml_fields: ["GUID"] - applies_to: ["Icon", "Trail"] - protobuf_field: "guid" - compatability: [TacO, BlishHUD, Burrito] - - - name: Has Countdown - description: "?" - type: Boolean - xml_fields: ["HasCountdown"] - applies_to: ["Icon"] - protobuf_field: trigger.has_countdown - compatability: ["TacO"] ---- - -Notes -===== -https://blishhud.com/docs/markers/attributes/autotrigger -https://blishhud.com/docs/markers/attributes/triggerrange -https://blishhud.com/docs/markers/attributes/resetlength -https://blishhud.com/docs/markers/attributes/showhide -https://blishhud.com/docs/markers/attributes/toggle -https://blishhud.com/docs/markers/attributes/copy -https://blishhud.com/docs/markers/attributes/invertbehavior -https://blishhud.com/docs/markers/attributes/bounce -https://blishhud.com/docs/markers/attributes/info -https://blishhud.com/docs/markers/attributes/behavior -https://blishhud.com/docs/markers/attributes/guid - - - - - -PARSEABLE_VAR(reset_offset, float, "ResetOffset") // Depricated - -PARSEABLE_VAR(has_countdown, bool, "HasCountdown") \ No newline at end of file diff --git a/xml_converter/doc/trigger/auto-trigger.md b/xml_converter/doc/trigger/auto-trigger.md new file mode 100644 index 00000000..0bf34c53 --- /dev/null +++ b/xml_converter/doc/trigger/auto-trigger.md @@ -0,0 +1,21 @@ +--- +name: Auto Trigger +type: Boolean +applies_to: [Icon] +xml_fields: [AutoTrigger] +protobuf_field: trigger.auto_trigger +compatability: [TacO, BlishHUD, Burrito] +--- +Any triggers will be triggered automatially when the player enters within range instead of being triggered. + +Notes +===== +https://blishhud.com/docs/markers/attributes/autotrigger + + + + + +PARSEABLE_VAR(reset_offset, float, "ResetOffset") // Depricated + +PARSEABLE_VAR(has_countdown, bool, "HasCountdown") \ No newline at end of file diff --git a/xml_converter/doc/trigger/bounce_delay.md b/xml_converter/doc/trigger/bounce_delay.md new file mode 100644 index 00000000..17ca4e55 --- /dev/null +++ b/xml_converter/doc/trigger/bounce_delay.md @@ -0,0 +1,23 @@ +--- +name: Bounce Delay +type: Float32 +applies_to: [Icon] +xml_fields: [BounceDelay] +protobuf_field: trigger.bounce_delay +compatability: [TacO, BlishHUD, Burrito] +--- +How many seconds should pass before the bouncing begins. + +Notes +===== + +https://blishhud.com/docs/markers/attributes/bounce + + + + + + +PARSEABLE_VAR(reset_offset, float, "ResetOffset") // Depricated + +PARSEABLE_VAR(has_countdown, bool, "HasCountdown") \ No newline at end of file diff --git a/xml_converter/doc/trigger/bounce_duration.md b/xml_converter/doc/trigger/bounce_duration.md new file mode 100644 index 00000000..5d0fc77c --- /dev/null +++ b/xml_converter/doc/trigger/bounce_duration.md @@ -0,0 +1,23 @@ +--- +name: Bounce Duration +type: Float32 +applies_to: [Icon] +xml_fields: [BounceDuration] +protobuf_field: trigger.bounce_duration +compatability: [TacO, BlishHUD, Burrito] +--- +How long should the icon bounce for when triggered. + +Notes +===== + +https://blishhud.com/docs/markers/attributes/bounce + + + + + + +PARSEABLE_VAR(reset_offset, float, "ResetOffset") // Depricated + +PARSEABLE_VAR(has_countdown, bool, "HasCountdown") \ No newline at end of file diff --git a/xml_converter/doc/trigger/bounce_height.md b/xml_converter/doc/trigger/bounce_height.md new file mode 100644 index 00000000..b8680437 --- /dev/null +++ b/xml_converter/doc/trigger/bounce_height.md @@ -0,0 +1,22 @@ +--- +name: Bounce Height +type: Float32 +applies_to: [Icon] +xml_fields: [BounceHeight] +protobuf_field: trigger.bounce_height +compatability: [TacO, BlishHUD, Burrito] +--- +How high should the icon bounce when triggered. + +Notes +===== + +https://blishhud.com/docs/markers/attributes/bounce + + + + + +PARSEABLE_VAR(reset_offset, float, "ResetOffset") // Depricated + +PARSEABLE_VAR(has_countdown, bool, "HasCountdown") \ No newline at end of file diff --git a/xml_converter/doc/trigger/copy_clipboard.md b/xml_converter/doc/trigger/copy_clipboard.md new file mode 100644 index 00000000..1bbb74f2 --- /dev/null +++ b/xml_converter/doc/trigger/copy_clipboard.md @@ -0,0 +1,22 @@ +--- +name: Copy Clipboard +type: String +applies_to: [Icon] +xml_fields: [CopyClipboard] +protobuf_field: trigger.action_copy_clipboard +compatability: [TacO, BlishHUD, Burrito] +--- +A value that is copied to the clipboard when triggered. + +Notes +===== + +https://blishhud.com/docs/markers/attributes/copy + + + + + +PARSEABLE_VAR(reset_offset, float, "ResetOffset") // Depricated + +PARSEABLE_VAR(has_countdown, bool, "HasCountdown") \ No newline at end of file diff --git a/xml_converter/doc/trigger/copy_message.md b/xml_converter/doc/trigger/copy_message.md new file mode 100644 index 00000000..616a66f0 --- /dev/null +++ b/xml_converter/doc/trigger/copy_message.md @@ -0,0 +1,21 @@ +--- +name: Copy Message +type: String +applies_to: [Icon] +xml_fields: [CopyMessage] +protobuf_field: trigger.action_copy_message +compatability: [TacO, BlishHUD, Burrito] +--- + A message that is displayed to the user when an item is copied to the clipboard. + +Notes +===== +https://blishhud.com/docs/markers/attributes/copy + + + + + +PARSEABLE_VAR(reset_offset, float, "ResetOffset") // Depricated + +PARSEABLE_VAR(has_countdown, bool, "HasCountdown") \ No newline at end of file diff --git a/xml_converter/doc/trigger/guid.md b/xml_converter/doc/trigger/guid.md new file mode 100644 index 00000000..025467e5 --- /dev/null +++ b/xml_converter/doc/trigger/guid.md @@ -0,0 +1,32 @@ +--- +name: GUID +type: Custom +class: UniqueID +xml_fields: ["GUID"] +applies_to: ["Icon", "Trail"] +protobuf_field: "guid" +compatability: [TacO, BlishHUD, Burrito] +--- +A globally unique identifier value to make sure this maker's trigger reset data is always assocaited with this marker and never lost or confused with other markers. + +Notes +===== +https://blishhud.com/docs/markers/attributes/autotrigger +https://blishhud.com/docs/markers/attributes/triggerrange +https://blishhud.com/docs/markers/attributes/resetlength +https://blishhud.com/docs/markers/attributes/showhide +https://blishhud.com/docs/markers/attributes/toggle +https://blishhud.com/docs/markers/attributes/copy +https://blishhud.com/docs/markers/attributes/invertbehavior +https://blishhud.com/docs/markers/attributes/bounce +https://blishhud.com/docs/markers/attributes/info +https://blishhud.com/docs/markers/attributes/behavior +https://blishhud.com/docs/markers/attributes/guid + + + + + +PARSEABLE_VAR(reset_offset, float, "ResetOffset") // Depricated + +PARSEABLE_VAR(has_countdown, bool, "HasCountdown") \ No newline at end of file diff --git a/xml_converter/doc/trigger/has_countdown.md b/xml_converter/doc/trigger/has_countdown.md new file mode 100644 index 00000000..74c88606 --- /dev/null +++ b/xml_converter/doc/trigger/has_countdown.md @@ -0,0 +1,20 @@ +--- +name: Has Countdown +type: Boolean +xml_fields: ["HasCountdown"] +applies_to: ["Icon"] +protobuf_field: trigger.has_countdown +compatability: ["TacO"] +--- +? + +Notes +===== + + + + + +PARSEABLE_VAR(reset_offset, float, "ResetOffset") // Depricated + +PARSEABLE_VAR(has_countdown, bool, "HasCountdown") \ No newline at end of file diff --git a/xml_converter/doc/trigger/hide_category.md b/xml_converter/doc/trigger/hide_category.md new file mode 100644 index 00000000..a7a6f279 --- /dev/null +++ b/xml_converter/doc/trigger/hide_category.md @@ -0,0 +1,21 @@ +--- +name: Hide Category +type: Custom +class: Category +applies_to: [Icon] +xml_fields: [Hide] +protobuf_field: trigger.action_hide_category +compatability: [TacO, BlishHUD, Burrito] +--- +Hide the specified category when triggered. + +Notes +===== + + + + + +PARSEABLE_VAR(reset_offset, float, "ResetOffset") // Depricated + +PARSEABLE_VAR(has_countdown, bool, "HasCountdown") \ No newline at end of file diff --git a/xml_converter/doc/trigger/info_message.md b/xml_converter/doc/trigger/info_message.md new file mode 100644 index 00000000..7a21ff9a --- /dev/null +++ b/xml_converter/doc/trigger/info_message.md @@ -0,0 +1,31 @@ +--- +name: Info Message +type: String +applies_to: [Icon] +xml_fields: [Info] +protobuf_field: trigger.action_info_message +compatability: [TacO, BlishHUD, Burrito] +--- +Show a message to the user when triggered + +Notes +===== +https://blishhud.com/docs/markers/attributes/autotrigger +https://blishhud.com/docs/markers/attributes/triggerrange +https://blishhud.com/docs/markers/attributes/resetlength +https://blishhud.com/docs/markers/attributes/showhide +https://blishhud.com/docs/markers/attributes/toggle +https://blishhud.com/docs/markers/attributes/copy +https://blishhud.com/docs/markers/attributes/invertbehavior +https://blishhud.com/docs/markers/attributes/bounce +https://blishhud.com/docs/markers/attributes/info +https://blishhud.com/docs/markers/attributes/behavior +https://blishhud.com/docs/markers/attributes/guid + + + + + +PARSEABLE_VAR(reset_offset, float, "ResetOffset") // Depricated + +PARSEABLE_VAR(has_countdown, bool, "HasCountdown") \ No newline at end of file diff --git a/xml_converter/doc/trigger/invert_visibility.md b/xml_converter/doc/trigger/invert_visibility.md new file mode 100644 index 00000000..37ea3337 --- /dev/null +++ b/xml_converter/doc/trigger/invert_visibility.md @@ -0,0 +1,23 @@ +--- +name: Invert Visibility +type: Boolean +applies_to: [Icon] +xml_fields: [InvertBehavior] +protobuf_field: trigger.invert_display +compatability: [TacO, BlishHUD, Burrito] +--- +Inverts the hide show behavior so that it is shown when it is supposed to be hidden and hidden when it is supposed to be shown. + +Notes +===== + +https://blishhud.com/docs/markers/attributes/invertbehavior + + + + + + +PARSEABLE_VAR(reset_offset, float, "ResetOffset") // Depricated + +PARSEABLE_VAR(has_countdown, bool, "HasCountdown") \ No newline at end of file diff --git a/xml_converter/doc/trigger/reset_behavior.md b/xml_converter/doc/trigger/reset_behavior.md new file mode 100644 index 00000000..4b07cd66 --- /dev/null +++ b/xml_converter/doc/trigger/reset_behavior.md @@ -0,0 +1,33 @@ +--- +name: Reset Behavior +type: Enum +applies_to: [Icon] +xml_fields: [Behavior] +protobuf_field: trigger.reset_behavior +compatability: [TacO, BlishHUD, Burrito] +values: + always_visible: ["0", "always_visible"] + map_change: ["1", "map_change"] + daily_reset: ["2", "daily_reset"] + never: ["3", "never"] + timer: ["4", "timer"] + map_reset: ["5", "map_reset"] + instance_change: ["6", "instance_change"] + daily_reset_per_character: ["7", "daily_reset_per_character"] + + weekly_reset: ["101", "weekly_reset"] +--- +A behavior around triggers and retriggering. + +Notes +===== + +https://blishhud.com/docs/markers/attributes/behavior + + + + + +PARSEABLE_VAR(reset_offset, float, "ResetOffset") // Depricated + +PARSEABLE_VAR(has_countdown, bool, "HasCountdown") \ No newline at end of file diff --git a/xml_converter/doc/trigger/reset_length.md b/xml_converter/doc/trigger/reset_length.md new file mode 100644 index 00000000..30bb9bb7 --- /dev/null +++ b/xml_converter/doc/trigger/reset_length.md @@ -0,0 +1,22 @@ +--- +name: Reset Length +type: Float32 +applies_to: [Icon] +xml_fields: [ResetLength] +protobuf_field: trigger.reset_length +compatability: [TacO, BlishHUD, Burrito] +--- +When using behavior 4 (reappear after timer) this value defines, in seconds, the duration until the marker is reset after being activated. +Notes +===== + +https://blishhud.com/docs/markers/attributes/resetlength + + + + + + +PARSEABLE_VAR(reset_offset, float, "ResetOffset") // Depricated + +PARSEABLE_VAR(has_countdown, bool, "HasCountdown") \ No newline at end of file diff --git a/xml_converter/doc/trigger/show_category.md b/xml_converter/doc/trigger/show_category.md new file mode 100644 index 00000000..62c3a343 --- /dev/null +++ b/xml_converter/doc/trigger/show_category.md @@ -0,0 +1,23 @@ +--- +name: Show Category +type: Custom +class: Category +applies_to: [Icon] +xml_fields: [Show] +protobuf_field: trigger.action_show_category +compatability: [TacO, BlishHUD, Burrito] +--- +Show the specified category when triggered. + +Notes +===== + +https://blishhud.com/docs/markers/attributes/showhide + + + + + +PARSEABLE_VAR(reset_offset, float, "ResetOffset") // Depricated + +PARSEABLE_VAR(has_countdown, bool, "HasCountdown") \ No newline at end of file diff --git a/xml_converter/doc/trigger/toggle_category.md b/xml_converter/doc/trigger/toggle_category.md new file mode 100644 index 00000000..eeb11a6f --- /dev/null +++ b/xml_converter/doc/trigger/toggle_category.md @@ -0,0 +1,24 @@ +--- +name: Toggle Category +type: Custom +class: Category +applies_to: [Icon] +xml_fields: [Toggle] +protobuf_field: trigger.action_toggle_category +compatability: [TacO, BlishHUD, Burrito] +--- +Show if hidden or Hide if shown the specified category when triggered. + +Notes +===== + +https://blishhud.com/docs/markers/attributes/toggle + + + + + + +PARSEABLE_VAR(reset_offset, float, "ResetOffset") // Depricated + +PARSEABLE_VAR(has_countdown, bool, "HasCountdown") \ No newline at end of file diff --git a/xml_converter/doc/trigger/trigger_range.md b/xml_converter/doc/trigger/trigger_range.md new file mode 100644 index 00000000..f8ddf6a8 --- /dev/null +++ b/xml_converter/doc/trigger/trigger_range.md @@ -0,0 +1,23 @@ +--- +name: Trigger Range +type: Float32 +applies_to: [Icon] +xml_fields: [TriggerRange, InfoRange] +protobuf_field: trigger.range +compatability: [TacO, BlishHUD, Burrito] +--- + +Used to indicate a trigger range. This attribute is used by multiple other attributes to define a distance from the marker in which those attributes will activate their functionality or behavior. + +Notes +===== + +https://blishhud.com/docs/markers/attributes/triggerrange + + + + + +PARSEABLE_VAR(reset_offset, float, "ResetOffset") // Depricated + +PARSEABLE_VAR(has_countdown, bool, "HasCountdown") \ No newline at end of file diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 693b35ec..8836ba42 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -11,208 +11,146 @@ schema = """ type: object -additionalProperties : false -required: - - attribute_category - - fields properties: - attribute_category: - type: string - fields: - type: array - items: - type: object - properties: - type: - type: string - enum: [Int32, Fixed32, Float32, String, Boolean, MultiflagValue, Enum, CompoundValue, Custom] - allOf: - ############################# - # Int32 Type - ############################# - - if: - properties: - type: - const: Int32 - then: - additionalProperties: false - required: [{shared_fields}] - properties: - {shared_field_properties} - - ############################# - # Fixed32 Type - ############################# - - if: - properties: - type: - const: Fixed32 - then: - additionalProperties: false - required: [{shared_fields}] - properties: - {shared_field_properties} - - ############################# - # Float32 Type - ############################# - - if: - properties: - type: - const: Float32 - then: - additionalProperties: false - required: [{shared_fields}] - properties: - {shared_field_properties} - - ############################# - # String Type - ############################# - - if: - properties: - type: - const: String - then: - additionalProperties: false - required: [{shared_fields}] - properties: - {shared_field_properties} + type: + type: string + enum: [Int32, Fixed32, Float32, String, Boolean, MultiflagValue, Enum, CompoundValue, Custom] +allOf: + ############################# + # Int32 Type + ############################# + - if: + properties: + type: + const: Int32 + then: + additionalProperties: false + required: [{shared_fields}] + properties: + {shared_field_properties} + + ############################# + # Fixed32 Type + ############################# + - if: + properties: + type: + const: Fixed32 + then: + additionalProperties: false + required: [{shared_fields}] + properties: + {shared_field_properties} + + ############################# + # Float32 Type + ############################# + - if: + properties: + type: + const: Float32 + then: + additionalProperties: false + required: [{shared_fields}] + properties: + {shared_field_properties} + + ############################# + # String Type + ############################# + - if: + properties: + type: + const: String + then: + additionalProperties: false + required: [{shared_fields}] + properties: + {shared_field_properties} + + ############################# + # Boolean Type + ############################# + - if: + properties: + type: + const: Boolean + then: + additionalProperties: false + required: [{shared_fields}] + properties: + {shared_field_properties} + + ############################# + # MultiflagValue Type + ############################# + - if: + properties: + type: + const: MultiflagValue + then: + additionalProperties: false + required: [{shared_fields}, flags] + properties: + {shared_field_properties} + flags: + type: object + patternProperties: + "^[a-z_]+$": + type: array + items: + type: string - ############################# - # Boolean Type - ############################# - - if: - properties: - type: - const: Boolean - then: - additionalProperties: false - required: [{shared_fields}] - properties: - {shared_field_properties} + ############################# + # Enum Type + ############################# + - if: + properties: + type: + const: Enum + then: + additionalProperties: false + required: [{shared_fields}, values] + properties: + {shared_field_properties} + values: + type: object + patternProperties: + "^[a-z_]+$": + type: array + items: + type: string - ############################# - # MultiflagValue Type - ############################# - - if: - properties: - type: - const: MultiflagValue - then: - additionalProperties: false - required: [{shared_fields}, flags] - properties: - {shared_field_properties} - flags: - type: object - patternProperties: - "^[a-z_]+$": - type: array - items: - type: string - - ############################# - # Enum Type - ############################# - - if: - properties: - type: - const: Enum - then: + ############################# + # CompoundValue Type + ############################# + - if: + properties: + type: + const: CompoundValue + then: + additionalProperties: false + required: [{shared_fields}, xml_export, components] + properties: + {shared_field_properties} + xml_export: + type: string + enum: + - Parent Only + - Parent and Children + - Children Only + components: + type: array + items: + type: object additionalProperties: false - required: [{shared_fields}, values] + required: [name, type, xml_fields, protobuf_field, compatability] properties: - {shared_field_properties} - values: - type: object - patternProperties: - "^[a-z_]+$": - type: array - items: - type: string - - ############################# - # CompoundValue Type - ############################# - - if: - properties: - type: - const: CompoundValue - then: - additionalProperties: false - required: [{shared_fields}, xml_export, components] - properties: - {shared_field_properties} - xml_export: + name: type: string - enum: - - Parent Only - - Parent and Children - - Children Only - components: - type: array - items: - type: object - additionalProperties: false - required: [name, type, xml_fields, protobuf_field, description, compatability] - properties: - name: - type: string - type: - type: string - enum: [Int32, Fixed32, Float32] - xml_fields: - type: array - items: - type: string - pattern: "^[A-Za-z]+$" - protobuf_field: - type: string - pattern: "^[a-z_.]+$" - description: - type: string - compatability: - type: array - items: - type: string - enum: [BlishHUD, Burrito, TacO] - - - ############################# - # Custom Type - ############################# - - if: - properties: type: - const: Custom - then: - additionalProperties: false - required: [{shared_fields}, class] - properties: - {shared_field_properties} - class: type: string - side_effects: - type: array - items: - type: string - -""".format( - shared_field_properties="""type: - type: string - name: - type: string - applies_to: - type: array - items: - type: string - enum: [Icon, Trail, Category] - compatability: - type: array - items: - type: string - enum: [BlishHUD, Burrito, TacO] + enum: [Int32, Fixed32, Float32] xml_fields: type: array items: @@ -221,10 +159,57 @@ protobuf_field: type: string pattern: "^[a-z_.]+$" - description: - type: string - """, - shared_fields="type, name, applies_to, compatability, xml_fields, protobuf_field, description" + compatability: + type: array + items: + type: string + enum: [BlishHUD, Burrito, TacO] + + + ############################# + # Custom Type + ############################# + - if: + properties: + type: + const: Custom + then: + additionalProperties: false + required: [{shared_fields}, class] + properties: + {shared_field_properties} + class: + type: string + side_effects: + type: array + items: + type: string + +""".format( + shared_field_properties="""type: + type: string + name: + type: string + applies_to: + type: array + items: + type: string + enum: [Icon, Trail, Category] + compatability: + type: array + items: + type: string + enum: [BlishHUD, Burrito, TacO] + xml_fields: + type: array + items: + type: string + pattern: "^[A-Za-z]+$" + protobuf_field: + type: string + pattern: "^[a-z_.]+$" + """, + shared_fields="type, name, applies_to, compatability, xml_fields, protobuf_field" ) @@ -249,36 +234,38 @@ class FieldRow: alternate_xml_attributes: List[str] binary_field: str data_type: str - description: str supported_by_html: str usable_on_html: str example: str valid_values_html: str is_sub_field: bool sub_fields: List["FieldRow"] + description: str class Generator: data: Dict[str, Document] = {} - def load_input_doc(self, filepath: str) -> None: - try: - document = frontmatter.load(filepath) - except Exception as e: - print(filepath) - raise e + def load_input_doc(self, dir_path: str) -> None: + for filepath in os.listdir(dir_path): + filepath = os.path.join(dir_path,filepath) + try: + document = frontmatter.load(filepath) + except Exception as e: + print(filepath) + raise e - error = validate_front_matter_schema(document.metadata) - if error != "": - print(filepath) - print(error) + error = validate_front_matter_schema(document.metadata) + if error != "": + print(filepath) + print(error) - filename = os.path.splitext(os.path.basename(filepath))[0] + - self.data[filename] = Document( - metadata=document.metadata, - content=document.content - ) + self.data[filepath] = Document( + metadata=document.metadata, + content=document.content + ) def write_webdocs(self, output_directory: str) -> None: print("Writing output documentation") @@ -287,27 +274,46 @@ def write_webdocs(self, output_directory: str) -> None: file_loader = FileSystemLoader('web_templates') env = Environment(loader=file_loader) template = env.get_template("documentation.html") + categories: Dict[str,List[str]] = {} - navigation_links = [ (self.data[x].metadata['attribute_category'], x) for x in sorted(self.data.keys()) ] + for filename in self.data.keys(): + category = os.path.basename(os.path.dirname(filename)) + if category not in categories: + categories[category] = [] + categories[category].append(filename) + + navigation_links = [ (capitalize(category), category) for category in sorted(categories.keys()) ] + + complete_field_row_list = [] + pages: Dict[str,List[str]] = {} + + for page in sorted(categories): + content: Dict[str,List[str]] = {} + metadata: Dict[str,List[str]] = {} + # Resets the content and metadata to empty for each loop - for page in sorted(self.data.keys()): - content = self.data[page].content - metadata = self.data[page].metadata + for subpage in categories[page]: + + content[subpage] = self.data[subpage].content + + metadata[subpage] = self.data[subpage].metadata + + content[subpage] = markdown.markdown(content[subpage]) - generated_doc, field_rows = self.generate_auto_docs(metadata) + generated_doc, field_rows = self.generate_auto_docs(metadata,content) for field_row in field_rows: complete_field_row_list.append(field_row) - html = markdown.markdown(content) + + # html = markdown.markdown(content) with open(os.path.join(output_directory, page + ".html"), 'w') as f: f.write(template.render( generated_doc=generated_doc, - content=html, content_nav=navigation_links )) @@ -364,15 +370,15 @@ def build_example(self, type: str, applies_to: List[str], xml_field: str, exampl # # This will output documentation for a single category of attributes. ############################################################################ - def generate_auto_docs(self, metadata: Any) -> Tuple[str, List[FieldRow]]: + def generate_auto_docs(self, metadata: Any,content: Any) -> Tuple[str, List[FieldRow]]: file_loader = FileSystemLoader('web_templates') env = Environment(loader=file_loader) template = env.get_template("infotable.html") field_rows = [] - for field in metadata["fields"]: - + for fieldkey,field in metadata.items(): + valid_values = "" if field['type'] == "MultiflagValue" or field['type'] == "Enum": @@ -440,13 +446,13 @@ def generate_auto_docs(self, metadata: Any) -> Tuple[str, List[FieldRow]]: alternate_xml_attributes=field["xml_fields"][1:], binary_field=field["protobuf_field"], data_type=field["type"], - description=field["description"], supported_by_html="
".join(field["compatability"]), usable_on_html="
".join(field["applies_to"]), example=example, valid_values_html=valid_values, is_sub_field=False, - sub_fields=[], # todo: + sub_fields=[], + description=content[fieldkey]# todo: )) if field['type'] == "CompoundValue": @@ -457,15 +463,15 @@ def generate_auto_docs(self, metadata: Any) -> Tuple[str, List[FieldRow]]: alternate_xml_attributes=component_field["xml_fields"][1:], binary_field= field["protobuf_field"] + "." + component_field["protobuf_field"], data_type=component_field["type"], - description=component_field["description"], supported_by_html="
".join(component_field["compatability"]), usable_on_html="
".join(field["applies_to"]), example=self.build_example( type=component_field["type"], applies_to=field["applies_to"], xml_field=field["xml_fields"][0], - examples=["???TODO2???"] + examples=["???TODO2???"], ), + description=content[fieldkey], valid_values_html=valid_values, is_sub_field=True, sub_fields=[] @@ -474,15 +480,24 @@ def generate_auto_docs(self, metadata: Any) -> Tuple[str, List[FieldRow]]: return template.render(field_rows=field_rows), field_rows +def capitalize(word: str) -> str: + + wordarray = word.split("_") + capital_word_array = [] + + for each_word in wordarray: + capital_each_word = each_word.capitalize() + capital_word_array.append(capital_each_word) + + return " ".join(capital_word_array) def main() -> None: generator = Generator() base_directory = "../doc" - for filename in os.listdir(base_directory): - if filename.endswith('.md'): - generator.load_input_doc(os.path.join(base_directory, filename)) - + for directory in os.listdir(base_directory): + if os.path.isdir(os.path.join(base_directory, directory)): + generator.load_input_doc(os.path.join(base_directory, directory)) generator.write_webdocs("../web_docs/") diff --git a/xml_converter/generators/requirements.txt b/xml_converter/generators/requirements.txt new file mode 100644 index 00000000..a2aae9ab --- /dev/null +++ b/xml_converter/generators/requirements.txt @@ -0,0 +1,9 @@ +attrs==21.4.0 +Jinja2==3.1.2 +jsonschema==4.7.2 +Markdown==3.4.1 +MarkupSafe==2.1.1 +pyaml==21.10.1 +pyrsistent==0.18.1 +python-frontmatter==1.0.0 +PyYAML==5.1 diff --git a/xml_converter/generators/web_templates/documentation.html b/xml_converter/generators/web_templates/documentation.html index 0003f768..8230ca97 100644 --- a/xml_converter/generators/web_templates/documentation.html +++ b/xml_converter/generators/web_templates/documentation.html @@ -96,6 +96,6 @@ {% endfor %} -
{{generated_doc}}{{content}}
+
{{generated_doc}}
\ No newline at end of file diff --git a/xml_converter/generators/web_templates/infotable.html b/xml_converter/generators/web_templates/infotable.html index 45bd7bd0..06a7ebe2 100644 --- a/xml_converter/generators/web_templates/infotable.html +++ b/xml_converter/generators/web_templates/infotable.html @@ -43,12 +43,12 @@

{{field_row.name}}

{{field_row.usable_on_html}} -

Description

{{field_row.description}}
- -

Examples

{{field_row.example}}
+

Examples

{{field_row.example}}
-

Valid XML Values

{{field_row.valid_values_html}}
+

Valid XML Values

{{field_row.valid_values_html}}
+

Description

{{field_row.description}}
+ {% endfor %} From 5d1f2528d3a8abc55527b89f25891ff34c7b7ff7 Mon Sep 17 00:00:00 2001 From: klingbolt <89052698+klingbolt@users.noreply.github.com> Date: Thu, 21 Jul 2022 20:09:06 -0400 Subject: [PATCH 034/539] Update xml_converter/generators/code_generator.py Co-authored-by: Asher Glick --- xml_converter/generators/code_generator.py | 1 - 1 file changed, 1 deletion(-) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 8836ba42..0ef0172c 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -300,7 +300,6 @@ def write_webdocs(self, output_directory: str) -> None: metadata[subpage] = self.data[subpage].metadata - content[subpage] = markdown.markdown(content[subpage]) generated_doc, field_rows = self.generate_auto_docs(metadata,content) From 07a6ca5c613e2c4dc3014020f3476acef0c096fe Mon Sep 17 00:00:00 2001 From: klingbolt <89052698+klingbolt@users.noreply.github.com> Date: Thu, 21 Jul 2022 20:09:28 -0400 Subject: [PATCH 035/539] Update xml_converter/generators/code_generator.py Co-authored-by: Asher Glick --- xml_converter/generators/code_generator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 0ef0172c..90077636 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -296,7 +296,7 @@ def write_webdocs(self, output_directory: str) -> None: for subpage in categories[page]: - content[subpage] = self.data[subpage].content + content[subpage] = markdown.markdown(self.data[subpage].content) metadata[subpage] = self.data[subpage].metadata From 7a573ee535784d8a7bd722f87904e1d66a30227e Mon Sep 17 00:00:00 2001 From: klingbolt Date: Thu, 21 Jul 2022 20:15:33 -0400 Subject: [PATCH 036/539] Making requested changes --- xml_converter/generators/code_generator.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 90077636..2fd61a9f 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -299,16 +299,12 @@ def write_webdocs(self, output_directory: str) -> None: content[subpage] = markdown.markdown(self.data[subpage].content) metadata[subpage] = self.data[subpage].metadata - generated_doc, field_rows = self.generate_auto_docs(metadata,content) for field_row in field_rows: complete_field_row_list.append(field_row) - - # html = markdown.markdown(content) - with open(os.path.join(output_directory, page + ".html"), 'w') as f: f.write(template.render( @@ -369,7 +365,7 @@ def build_example(self, type: str, applies_to: List[str], xml_field: str, exampl # # This will output documentation for a single category of attributes. ############################################################################ - def generate_auto_docs(self, metadata: Any,content: Any) -> Tuple[str, List[FieldRow]]: + def generate_auto_docs(self, metadata: Any,content: Dict[str,List[str]]) -> Tuple[str, List[FieldRow]]: file_loader = FileSystemLoader('web_templates') env = Environment(loader=file_loader) template = env.get_template("infotable.html") From 609a811fc682bf8c046b113e3c17d32ea5b13218 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Thu, 21 Jul 2022 20:48:55 -0400 Subject: [PATCH 037/539] Cleaned up variable typing --- xml_converter/generators/code_generator.py | 10 +++++----- xml_converter/generators/presubmit.sh | 9 +++++++++ xml_converter/generators/requirements.txt | 10 ++++++++++ xml_converter/presubmit.sh | 8 ++++++++ 4 files changed, 32 insertions(+), 5 deletions(-) create mode 100755 xml_converter/generators/presubmit.sh diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 2fd61a9f..7ff0caa0 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -1,7 +1,7 @@ -from jsonschema import validate -from jsonschema.exceptions import ValidationError +from jsonschema import validate # type:ignore +from jsonschema.exceptions import ValidationError # type:ignore import yaml -import frontmatter +import frontmatter # type:ignore from typing import Any, Dict, List, Tuple import os import markdown @@ -290,7 +290,7 @@ def write_webdocs(self, output_directory: str) -> None: pages: Dict[str,List[str]] = {} for page in sorted(categories): - content: Dict[str,List[str]] = {} + content: Dict[str,str] = {} metadata: Dict[str,List[str]] = {} # Resets the content and metadata to empty for each loop @@ -365,7 +365,7 @@ def build_example(self, type: str, applies_to: List[str], xml_field: str, exampl # # This will output documentation for a single category of attributes. ############################################################################ - def generate_auto_docs(self, metadata: Any,content: Dict[str,List[str]]) -> Tuple[str, List[FieldRow]]: + def generate_auto_docs(self, metadata: Any,content: Dict[str,str]) -> Tuple[str, List[FieldRow]]: file_loader = FileSystemLoader('web_templates') env = Environment(loader=file_loader) template = env.get_template("infotable.html") diff --git a/xml_converter/generators/presubmit.sh b/xml_converter/generators/presubmit.sh new file mode 100755 index 00000000..a252c86e --- /dev/null +++ b/xml_converter/generators/presubmit.sh @@ -0,0 +1,9 @@ +source ./venv/bin/activate + +readarray -d '' FILES < <(find . -type f -name "*.py" -not -path "*/venv/*" -print0) + +# Lint Python Files +flake8 --ignore=E501,E266,W503 "${FILES[@]}" + +# Type Check Python Files +mypy --strict "${FILES[@]}" \ No newline at end of file diff --git a/xml_converter/generators/requirements.txt b/xml_converter/generators/requirements.txt index a2aae9ab..01586b2e 100644 --- a/xml_converter/generators/requirements.txt +++ b/xml_converter/generators/requirements.txt @@ -1,9 +1,19 @@ attrs==21.4.0 +flake8==4.0.1 Jinja2==3.1.2 jsonschema==4.7.2 Markdown==3.4.1 MarkupSafe==2.1.1 +mccabe==0.6.1 +mypy==0.971 +mypy-extensions==0.4.3 pyaml==21.10.1 +pycodestyle==2.8.0 +pyflakes==2.4.0 pyrsistent==0.18.1 python-frontmatter==1.0.0 PyYAML==5.1 +tomli==2.0.1 +types-Markdown==3.4.0 +types-PyYAML==6.0.10 +typing_extensions==4.3.0 \ No newline at end of file diff --git a/xml_converter/presubmit.sh b/xml_converter/presubmit.sh index a08c6e14..672a7c14 100755 --- a/xml_converter/presubmit.sh +++ b/xml_converter/presubmit.sh @@ -2,3 +2,11 @@ cpplint --quiet --recursive --exclude="src/rapidxml-1.13" --filter=-whitespace/n # TODO: remove readability/casting from the filter. It was temporarily added # because the changes required would need testing unfitting of the original # style check update commit. + +source ./generators/venv/bin/activate + +# Lint Python Files +flake8 --ignore=E501,E266,W503 "${FILES[@]}" + +# Type Check Python Files +mypy --strict "${FILES[@]}" \ No newline at end of file From 23914da9d7436005525347ab909bfc351545b287 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 1 Aug 2022 18:10:06 -0400 Subject: [PATCH 038/539] new C++ class generator for XML Node Types Addressing Issue #65 --- .../rendering/{cull.md => cull_chirality.md} | 2 +- .../{rotation.md => euler_rotation.md} | 2 +- xml_converter/doc/trigger/copy_clipboard.md | 2 +- xml_converter/generators/code_generator.py | 80 +++++- .../cpp_templates/parseabletemplate.hpp | 82 ++++++ xml_converter/src/category.hpp | 45 ++-- xml_converter/src/icon.hpp | 248 ++++++++---------- xml_converter/src/trail.hpp | 135 +++++----- 8 files changed, 351 insertions(+), 245 deletions(-) rename xml_converter/doc/rendering/{cull.md => cull_chirality.md} (93%) rename xml_converter/doc/rotation/{rotation.md => euler_rotation.md} (96%) create mode 100644 xml_converter/generators/cpp_templates/parseabletemplate.hpp diff --git a/xml_converter/doc/rendering/cull.md b/xml_converter/doc/rendering/cull_chirality.md similarity index 93% rename from xml_converter/doc/rendering/cull.md rename to xml_converter/doc/rendering/cull_chirality.md index 6a0ef05e..9a04d888 100644 --- a/xml_converter/doc/rendering/cull.md +++ b/xml_converter/doc/rendering/cull_chirality.md @@ -1,5 +1,5 @@ --- -name: Cull +name: Cull Chirality applies_to: [Icon, Trail] xml_fields: [Cull] protobuf_field: cull diff --git a/xml_converter/doc/rotation/rotation.md b/xml_converter/doc/rotation/euler_rotation.md similarity index 96% rename from xml_converter/doc/rotation/rotation.md rename to xml_converter/doc/rotation/euler_rotation.md index d6137e0a..b90463dd 100644 --- a/xml_converter/doc/rotation/rotation.md +++ b/xml_converter/doc/rotation/euler_rotation.md @@ -1,5 +1,5 @@ --- -name: Rotation +name: Euler Rotation type: CompoundValue applies_to: ["Icon"] xml_fields: ["Rotation"] diff --git a/xml_converter/doc/trigger/copy_clipboard.md b/xml_converter/doc/trigger/copy_clipboard.md index 1bbb74f2..2b6bb748 100644 --- a/xml_converter/doc/trigger/copy_clipboard.md +++ b/xml_converter/doc/trigger/copy_clipboard.md @@ -2,7 +2,7 @@ name: Copy Clipboard type: String applies_to: [Icon] -xml_fields: [CopyClipboard] +xml_fields: [Copy, CopyClipboard] protobuf_field: trigger.action_copy_clipboard compatability: [TacO, BlishHUD, Burrito] --- diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 7ff0caa0..3b23f38e 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -38,7 +38,7 @@ const: Fixed32 then: additionalProperties: false - required: [{shared_fields}] + requiint achievement_id;red: [{shared_fields}] properties: {shared_field_properties} @@ -224,7 +224,7 @@ def validate_front_matter_schema(front_matter: Any) -> str: @dataclass class Document: - metadata: Any + metadata: Dict[str, Any] content: str @dataclass @@ -267,6 +267,34 @@ def load_input_doc(self, dir_path: str) -> None: content=document.content ) + def write_parseable(self, output_directory: str) -> None: + file_loader = FileSystemLoader('cpp_templates') + env = Environment(loader=file_loader) + template = env.get_template("parseabletemplate.hpp") + attributenames: Dict[str,str] = {} + + for filepath in self.data.keys(): + filename = os.path.basename(filepath) + attributenames[filepath]= filename.split(".md")[0] + + pages = ["Category","Icon","Trail"] + + for page in pages: + content: Dict[str,str] = {} + metadata: Dict[str,List[str]] = {} + + for attributename in attributenames: + metadata[attributename] = self.data[attributename].metadata + + field_rows = self.generate_node_types(metadata, attributenames, page) + + with open(os.path.join(output_directory, page.lower() + ".hpp"), 'w') as f: + + f.write(template.render( + page=page, + fieldrows=sorted(field_rows), + )) + def write_webdocs(self, output_directory: str) -> None: print("Writing output documentation") os.makedirs(output_directory, exist_ok=True) @@ -360,6 +388,47 @@ def build_example(self, type: str, applies_to: List[str], xml_field: str, exampl return example + # ########################################################################### + # Generate Node Types + + # This will output code for a single category of nodes. + # ########################################################################### + + def generate_node_types(self, metadata: Any, attributenames: Dict[str,str],page: str) -> List[str]: + + field_rows = [] + + typechange: Dict[str,str] = { + "Fixed32": "int", + "Int32": "int", + "Boolean": "bool", + "Float32": "float", + "String": "string", + } + + for fieldkey,field in metadata.items(): + for x in attributenames: + if fieldkey in x : + attributename = attributenames[x] + + if page in field['applies_to']: + if field['type'] in typechange: + newtype = typechange[field['type']] + elif field['type'] == "Custom": + newtype = field['class'] + elif field['type'] in ["Enum","MultiflagValue","CompoundValue"]: + newtype = capitalize(attributename,delimiter="") + + else : + raise ValueError("Unexpected type {field_type} for attribute {attributename}".format( + field_type=field['type'], + attributename=attributename, + ) ) + + field_rows.append((attributename,newtype)) + + return field_rows + ############################################################################ # Generate Auto Docs # @@ -475,7 +544,7 @@ def generate_auto_docs(self, metadata: Any,content: Dict[str,str]) -> Tuple[str, return template.render(field_rows=field_rows), field_rows -def capitalize(word: str) -> str: +def capitalize(word: str,delimiter: str = " ") -> str: wordarray = word.split("_") capital_word_array = [] @@ -484,8 +553,8 @@ def capitalize(word: str) -> str: capital_each_word = each_word.capitalize() capital_word_array.append(capital_each_word) - return " ".join(capital_word_array) - + return delimiter.join(capital_word_array) + def main() -> None: generator = Generator() base_directory = "../doc" @@ -495,5 +564,6 @@ def main() -> None: generator.load_input_doc(os.path.join(base_directory, directory)) generator.write_webdocs("../web_docs/") + generator.write_parseable("../src/") main() \ No newline at end of file diff --git a/xml_converter/generators/cpp_templates/parseabletemplate.hpp b/xml_converter/generators/cpp_templates/parseabletemplate.hpp new file mode 100644 index 00000000..b644c0f1 --- /dev/null +++ b/xml_converter/generators/cpp_templates/parseabletemplate.hpp @@ -0,0 +1,82 @@ +#pragma once +{% if page == "Icon": %} +#include +#include +#include "attribute/bool.hpp" +#include "attribute/chirality.hpp" +#include "attribute/color.hpp" +#include "attribute/euler_angle.hpp" +#include "attribute/festival_filter.hpp" +#include "attribute/float.hpp" +#include "attribute/image.hpp" +#include "attribute/int.hpp" +#include "attribute/map_type_filter.hpp" +#include "attribute/mount_filter.hpp" +#include "attribute/position.hpp" +#include "attribute/profession_filter.hpp" +#include "attribute/race_filter.hpp" +#include "attribute/specialization_filter.hpp" +#include "attribute/string.hpp" +#include "parseable.hpp" +#include "rapidxml-1.13/rapidxml.hpp" +#include "string_helper.hpp" +{% elif page == "Category": %} +#include +#include +#include + +#include "icon.hpp" +#include "parseable.hpp" +#include "rapidxml-1.13/rapidxml.hpp" +#include "trail.hpp" +{% elif page == "Trail": %} +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "attribute/bool.hpp" +#include "attribute/chirality.hpp" +#include "attribute/color.hpp" +#include "attribute/festival_filter.hpp" +#include "attribute/float.hpp" +#include "attribute/image.hpp" +#include "attribute/int.hpp" +#include "attribute/map_type_filter.hpp" +#include "attribute/mount_filter.hpp" +#include "attribute/profession_filter.hpp" +#include "attribute/race_filter.hpp" +#include "attribute/string.hpp" +#include "parseable.hpp" +#include "rapidxml-1.13/rapidxml.hpp" +#include "rapidxml-1.13/rapidxml_print.hpp" +{% endif %} + +using namespace std; + +// #define PARSEABLE_VAR(...) CLASS_PARSEABLE_VAR(Icon, __VA_ARGS__ ) +// #define PARSEABLE_SUBVAR(...) CLASS_PARSEABLE_SUBVAR(Icon, __VA_ARGS__ ) + +class {{page}}: public Parseable { + private: + {% for fieldrow in fieldrows: %} + {{fieldrow[1]}} {{fieldrow[0]}}; + {% endfor %} + {% if page == "Category": %} + map children; + Icon default_icon; + Trail default_trail; + {% endif %} + virtual string classname(); +}; + +// #undef PARSEABLE_VAR +// #undef PARSEABLE_SUBVAR \ No newline at end of file diff --git a/xml_converter/src/category.hpp b/xml_converter/src/category.hpp index febe9df3..c3968e19 100644 --- a/xml_converter/src/category.hpp +++ b/xml_converter/src/category.hpp @@ -9,36 +9,33 @@ #include "rapidxml-1.13/rapidxml.hpp" #include "trail.hpp" -using namespace std; +using namespace std; -#define PARSEABLE_VAR(...) CLASS_PARSEABLE_VAR(Category, __VA_ARGS__ ) -#define PARSEABLE_SUBVAR(...) CLASS_PARSEABLE_SUBVAR(Category, __VA_ARGS__ ) +// #define PARSEABLE_VAR(...) CLASS_PARSEABLE_VAR(Icon, __VA_ARGS__ ) +// #define PARSEABLE_SUBVAR(...) CLASS_PARSEABLE_SUBVAR(Icon, __VA_ARGS__ ) class Category: public Parseable { - public: - // https://blishhud.com/docs/markers/attributes/defaulttoggle - PARSEABLE_VAR(default_toggle, bool, "DefaultToggle") - - // https://blishhud.com/docs/markers/attributes/displayname - PARSEABLE_VAR(display_name, string, "DisplayName") - - // https://blishhud.com/docs/markers/attributes/isseparator - PARSEABLE_VAR(is_separator, bool, "IsSeparator") - - // Not Documented on blishhud - PARSEABLE_VAR(name, string, "Name") - - - map children; + private: + + bool default_visibility; + + string display_name; + + bool is_seperator; + + string name; + + string tooltip_name; + + + map children; Icon default_icon; Trail default_trail; - - - virtual string classname(); - void init_from_xml(rapidxml::xml_node<>* node, vector *errors); + + virtual string classname(); }; -#undef PARSEABLE_VAR -#undef PARSEABLE_SUBVAR +// #undef PARSEABLE_VAR +// #undef PARSEABLE_SUBVAR \ No newline at end of file diff --git a/xml_converter/src/icon.hpp b/xml_converter/src/icon.hpp index 560e8043..639ae8c6 100644 --- a/xml_converter/src/icon.hpp +++ b/xml_converter/src/icon.hpp @@ -2,7 +2,6 @@ #include #include - #include "attribute/bool.hpp" #include "attribute/chirality.hpp" #include "attribute/color.hpp" @@ -22,151 +21,114 @@ #include "rapidxml-1.13/rapidxml.hpp" #include "string_helper.hpp" -using namespace std; - +using namespace std; -#define PARSEABLE_VAR(...) CLASS_PARSEABLE_VAR(Icon, __VA_ARGS__ ) -#define PARSEABLE_SUBVAR(...) CLASS_PARSEABLE_SUBVAR(Icon, __VA_ARGS__ ) +// #define PARSEABLE_VAR(...) CLASS_PARSEABLE_VAR(Icon, __VA_ARGS__ ) +// #define PARSEABLE_SUBVAR(...) CLASS_PARSEABLE_SUBVAR(Icon, __VA_ARGS__ ) class Icon: public Parseable { - private: - // https://blishhud.com/docs/markers/attributes/achievement - PARSEABLE_VAR(achievement_id, int, "AchievementId") - PARSEABLE_VAR(achievement_bit, int, "AchievementBit") - - // https://blishhud.com/docs/markers/attributes/alpha - PARSEABLE_VAR(alpha, float, "Alpha") - - // https://blishhud.com/docs/markers/attributes/autotrigger - PARSEABLE_VAR(auto_trigger, bool, "AutoTrigger") - - // https://blishhud.com/docs/markers/attributes/behavior - PARSEABLE_VAR(behavior, int, "Behavior") - - // https://blishhud.com/docs/markers/attributes/bounce - PARSEABLE_VAR(bounce_height, float, "BounceHeight") - PARSEABLE_VAR(bounce_duration, float, "BounceDuration") - PARSEABLE_VAR(bounce_delay, float, "BounceDelay") - - // https://blishhud.com/docs/markers/attributes/canfade - PARSEABLE_VAR(can_fade, bool, "CanFade") - - // https://blishhud.com/docs/markers/attributes/color - PARSEABLE_VAR(color, Color, "Color") - - // https://blishhud.com/docs/markers/attributes/copy - PARSEABLE_VAR(copy, string, "Copy") - PARSEABLE_VAR(copy_message, string, "CopyMessage") - - // https://blishhud.com/docs/markers/attributes/cull - PARSEABLE_VAR(cull, Chirality, "Cull") - - // https://blishhud.com/docs/markers/attributes/fade - PARSEABLE_VAR(fade_near, float, "FadeNear") - PARSEABLE_VAR(fade_far, float, "FadeFar") - - // https://blishhud.com/docs/markers/attributes/festival - PARSEABLE_VAR(festival_filter, FestivalFilter, "Festival") - - // https://blishhud.com/docs/markers/attributes/guid - PARSEABLE_VAR(guid, string, "GUID") - - // https://blishhud.com/docs/markers/attributes/heightoffset - PARSEABLE_VAR(height_offset, float, "HeightOffset") - - // https://blishhud.com/docs/markers/attributes/iconfile - PARSEABLE_VAR(icon_file, Image, "IconFile") - - // https://blishhud.com/docs/markers/attributes/iconsize - PARSEABLE_VAR(icon_size, float, "IconSize") - - // https://blishhud.com/docs/markers/attributes/info - PARSEABLE_VAR(info, string, "Info") - PARSEABLE_VAR(info_range, float, "InfoRange") - - // https://blishhud.com/docs/markers/attributes/invertbehavior - PARSEABLE_VAR(invert_behavior, bool, "InvertBehavior") - - // https://blishhud.com/docs/markers/attributes/mapdisplaysize - PARSEABLE_VAR(map_display_size, float, "MapDisplaySize") - - // https://blishhud.com/docs/markers/attributes/mapid - PARSEABLE_VAR(map_id, int, "MapId") - - // https://blishhud.com/docs/markers/attributes/maptype - PARSEABLE_VAR(map_type_filter, MapTypeFilter, "MapType") - - // https://blishhud.com/docs/markers/attributes/mount - PARSEABLE_VAR(mount_filter, MountFilter, "Mount") - - // https://blishhud.com/docs/markers/attributes/position - PARSEABLE_VAR(position, Position, "Position") - PARSEABLE_SUBVAR(position, x, Position, float, "XPos", "PositionX") - PARSEABLE_SUBVAR(position, y, Position, float, "YPos", "PositionY") - PARSEABLE_SUBVAR(position, z, Position, float, "ZPos", "PositionZ") - - // https://blishhud.com/docs/markers/attributes/profession - PARSEABLE_VAR(profession_filter, ProfessionFilter, "Profession") - - // https://blishhud.com/docs/markers/attributes/race - PARSEABLE_VAR(race_filter, RaceFilter, "Race") - - // https://blishhud.com/docs/markers/attributes/resetlength - PARSEABLE_VAR(reset_length, float, "ResetLength", "ResetLenght") - - // https://blishhud.com/docs/markers/attributes/rotate - PARSEABLE_VAR(rotation, EulerAngle, "Rotate") - PARSEABLE_SUBVAR(rotation, x, EulerAngle, float, "RotateX") - PARSEABLE_SUBVAR(rotation, y, EulerAngle, float, "RotateY") - PARSEABLE_SUBVAR(rotation, z, EulerAngle, float, "RotateZ") - - - // https://blishhud.com/docs/markers/attributes/scaleonmapwithzoom - PARSEABLE_VAR(scale_on_map_with_zoom, bool, "ScaleOnMapWithZoom") - - // https://blishhud.com/docs/markers/attributes/schedule - // Not including parsing support for now due to complexity and lack of practical uses - PARSEABLE_VAR(schedule, string, "Schedule") - PARSEABLE_VAR(schedule_duration, int, "ScheduleDuration") - - // https://blishhud.com/docs/markers/attributes/showhide - PARSEABLE_VAR(show, string, "Show") - PARSEABLE_VAR(hide, string, "Hide") - - // https://blishhud.com/docs/markers/attributes/size - PARSEABLE_VAR(min_size, float, "MinSize", "nimSize") - PARSEABLE_VAR(max_size, float, "MaxSize") - - // https://blishhud.com/docs/markers/attributes/specialization - PARSEABLE_VAR(specialization_filter, SpecializationFilter, "Specialization") - - // https://blishhud.com/docs/markers/attributes/tip - // INFO: This seems to only be partially defined for blishud between how it - // works with markers vs categories. - PARSEABLE_VAR(tip_name, string, "TipName") - PARSEABLE_VAR(tip_description, string, "TipDescription") - - // https://blishhud.com/docs/markers/attributes/toggle - PARSEABLE_VAR(toggle, string, "Toggle", "ToggleCategory") - - // https://blishhud.com/docs/markers/attributes/triggerrange - PARSEABLE_VAR(trigger_range, float, "TriggerRange") - - // https://blishhud.com/docs/markers/attributes/type - PARSEABLE_VAR(category, string, "Type") - - // https://blishhud.com/docs/markers/attributes/visibility - PARSEABLE_VAR(visible_on_minimap, bool, "MinimapVisibility", "BHMinimapVisibility") - PARSEABLE_VAR(visible_on_map, bool, "MapVisibility", "BHMapVisibility") - PARSEABLE_VAR(visible_ingame, bool, "IngameVisibility", "BHIngameVisibility") - - // Not supported by blishud's docs - PARSEABLE_VAR(reset_offset, float, "ResetOffset") - PARSEABLE_VAR(has_countdown, bool, "HasCountdown") - - virtual string classname(); + private: + + int achievement_bitmask; + + int achievement_id; + + float alpha; + + bool auto-trigger; + + float bounce_delay; + + float bounce_duration; + + float bounce_height; + + bool can_fade; + + Category category; + + Color color; + + string copy_clipboard; + + string copy_message; + + CullChirality cull_chirality; + + float distance_fade_end; + + float distance_fade_start; + + EulerRotation euler_rotation; + + FestivalFilter festival_filter; + + UniqueID guid; + + bool has_countdown; + + float heightoffset; + + Category hide_category; + + Image icon; + + float icon_size; + + string info_message; + + bool invert_visibility; + + int map_display_size; + + int map_id; + + MapTypeFilter map_type_filter; + + int maximum_size_on_screen; + + int minimum_size_on_screen; + + MountFilter mount_filter; + + Position position; + + ProfessionFilter profession_filter; + + bool render_ingame; + + bool render_on_map; + + bool render_on_minimap; + + ResetBehavior reset_behavior; + + float reset_length; + + bool scale_on_map_with_zoom; + + string schedule; + + float schedule_duration; + + Category show_category; + + SpecializationFilter specialization_filter; + + SpeciesFilter species_filter; + + Category toggle_category; + + string tooltip_description; + + string tooltip_name; + + float trigger_range; + + + virtual string classname(); }; -#undef PARSEABLE_VAR -#undef PARSEABLE_SUBVAR +// #undef PARSEABLE_VAR +// #undef PARSEABLE_SUBVAR \ No newline at end of file diff --git a/xml_converter/src/trail.hpp b/xml_converter/src/trail.hpp index 8e61c52f..2bdf2765 100644 --- a/xml_converter/src/trail.hpp +++ b/xml_converter/src/trail.hpp @@ -29,79 +29,74 @@ #include "rapidxml-1.13/rapidxml.hpp" #include "rapidxml-1.13/rapidxml_print.hpp" + using namespace std; -#define PARSEABLE_VAR(...) CLASS_PARSEABLE_VAR(Trail, __VA_ARGS__ ) -#define PARSEABLE_SUBVAR(...) CLASS_PARSEABLE_SUBVAR(Trail, __VA_ARGS__ ) +// #define PARSEABLE_VAR(...) CLASS_PARSEABLE_VAR(Icon, __VA_ARGS__ ) +// #define PARSEABLE_SUBVAR(...) CLASS_PARSEABLE_SUBVAR(Icon, __VA_ARGS__ ) -//////////////////////////////////////////////////////////////////////////////// -// -//////////////////////////////////////////////////////////////////////////////// class Trail: public Parseable { - public: - // https://blishhud.com/docs/markers/attributes/achievement - PARSEABLE_VAR(achievement_id, int, "AchievementId") - PARSEABLE_VAR(achievement_bit, int, "AchievementBit") - - // https://blishhud.com/docs/markers/attributes/alpha - PARSEABLE_VAR(alpha, float, "Alpha") - - // https://blishhud.com/docs/markers/attributes/animspeed - PARSEABLE_VAR(animation_speed, float, "AnimSpeed") - - // https://blishhud.com/docs/markers/attributes/canfade - PARSEABLE_VAR(can_fade, bool, "CanFade") - - // https://blishhud.com/docs/markers/attributes/color - PARSEABLE_VAR(color, Color, "Color") - - // https://blishhud.com/docs/markers/attributes/cull - PARSEABLE_VAR(cull, Chirality, "Cull") - - // https://blishhud.com/docs/markers/attributes/fade - PARSEABLE_VAR(fade_near, float, "FadeNear") - PARSEABLE_VAR(fade_far, float, "FadeFar") - - // https://blishhud.com/docs/markers/attributes/festival - PARSEABLE_VAR(festival_filter, FestivalFilter, "Festival") - - // https://blishhud.com/docs/markers/attributes/iswall - PARSEABLE_VAR(is_wall, bool, "IsWall") - - // https://blishhud.com/docs/markers/attributes/maptype - PARSEABLE_VAR(map_type, MapTypeFilter, "MapType") - - // https://blishhud.com/docs/markers/attributes/mount - PARSEABLE_VAR(mount, MountFilter, "Mount") - - // https://blishhud.com/docs/markers/attributes/profession - PARSEABLE_VAR(profession_filter, ProfessionFilter, "Profession") - - // https://blishhud.com/docs/markers/attributes/race - PARSEABLE_VAR(race_filter, RaceFilter, "Race") - - // https://blishhud.com/docs/markers/attributes/texture - PARSEABLE_VAR(texture, Image, "Texture") - - // https://blishhud.com/docs/markers/attributes/trailscale - PARSEABLE_VAR(trail_scale, float, "TrailScale") - - // https://blishhud.com/docs/markers/attributes/type - PARSEABLE_VAR(category, string, "Type") - - // https://blishhud.com/docs/markers/attributes/visibility - PARSEABLE_VAR(visible_on_minimap, bool, "MinimapVisibility") - PARSEABLE_VAR(visible_on_map, bool, "MapVisibility") - PARSEABLE_VAR(visible_ingame, bool, "IngameVisibility") - - // Currently Uncatagorized by BlishHUD - PARSEABLE_VAR(trail_data, string, "TrailData") - PARSEABLE_VAR(guid, string, "GUID") // https://blishhud.com/docs/markers/attributes/guid (but this is only valid for markers it seems) - PARSEABLE_VAR(map_display_size, int, "MapDisplaySize") - - - virtual string classname(); + private: + + int achievement_bitmask; + + int achievement_id; + + float alpha; + + float animation_speed; + + bool can_fade; + + Category category; + + Color color; + + CullChirality cull_chirality; + + float distance_fade_end; + + float distance_fade_start; + + FestivalFilter festival_filter; + + UniqueID guid; + + bool is_wall; + + int map_id; + + MapTypeFilter map_type_filter; + + MountFilter mount_filter; + + ProfessionFilter profession_filter; + + bool render_ingame; + + bool render_on_map; + + bool render_on_minimap; + + string schedule; + + float schedule_duration; + + SpecializationFilter specialization_filter; + + SpeciesFilter species_filter; + + Image texture; + + TrailData trail_data; + + TrailDataMapId trail_data_map_id; + + float trail_scale; + + + virtual string classname(); }; -#undef PARSEABLE_VAR -#undef PARSEABLE_SUBVAR +// #undef PARSEABLE_VAR +// #undef PARSEABLE_SUBVAR \ No newline at end of file From 5b92978b29ab71d4df619720b384bffed50d592c Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 1 Aug 2022 18:16:29 -0400 Subject: [PATCH 039/539] Found typo in line 41 --- xml_converter/generators/code_generator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 3b23f38e..14869c21 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -38,7 +38,7 @@ const: Fixed32 then: additionalProperties: false - requiint achievement_id;red: [{shared_fields}] + required: [{shared_fields}] properties: {shared_field_properties} From 66ac0204c350397396769518c466f941bf52deac Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 1 Aug 2022 21:16:58 -0400 Subject: [PATCH 040/539] Addressing some of the comments in code review --- xml_converter/generators/code_generator.py | 8 +++----- .../generators/cpp_templates/parseabletemplate.hpp | 11 ++--------- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 14869c21..06631396 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -387,13 +387,11 @@ def build_example(self, type: str, applies_to: List[str], xml_field: str, exampl return example - - # ########################################################################### + ############################################################################ # Generate Node Types - + # # This will output code for a single category of nodes. - # ########################################################################### - + ############################################################################ def generate_node_types(self, metadata: Any, attributenames: Dict[str,str],page: str) -> List[str]: field_rows = [] diff --git a/xml_converter/generators/cpp_templates/parseabletemplate.hpp b/xml_converter/generators/cpp_templates/parseabletemplate.hpp index b644c0f1..37a3ea75 100644 --- a/xml_converter/generators/cpp_templates/parseabletemplate.hpp +++ b/xml_converter/generators/cpp_templates/parseabletemplate.hpp @@ -59,24 +59,17 @@ #include "rapidxml-1.13/rapidxml.hpp" #include "rapidxml-1.13/rapidxml_print.hpp" {% endif %} - using namespace std; -// #define PARSEABLE_VAR(...) CLASS_PARSEABLE_VAR(Icon, __VA_ARGS__ ) -// #define PARSEABLE_SUBVAR(...) CLASS_PARSEABLE_SUBVAR(Icon, __VA_ARGS__ ) - class {{page}}: public Parseable { private: {% for fieldrow in fieldrows: %} {{fieldrow[1]}} {{fieldrow[0]}}; {% endfor %} {% if page == "Category": %} - map children; + map children; Icon default_icon; Trail default_trail; {% endif %} virtual string classname(); -}; - -// #undef PARSEABLE_VAR -// #undef PARSEABLE_SUBVAR \ No newline at end of file +}; \ No newline at end of file From 5b431c7dd74e1d8d88328bd0bfef6924f9b057ea Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 1 Aug 2022 23:04:52 -0400 Subject: [PATCH 041/539] Addressing remaining comments from code review --- xml_converter/generators/code_generator.py | 27 ++++++---- .../cpp_templates/parseabletemplate.hpp | 50 ++----------------- xml_converter/src/category.hpp | 25 ++++------ xml_converter/src/icon.hpp | 45 ++++++++--------- xml_converter/src/trail.hpp | 48 ++++++++---------- 5 files changed, 73 insertions(+), 122 deletions(-) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 06631396..55a1de97 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -286,13 +286,14 @@ def write_parseable(self, output_directory: str) -> None: for attributename in attributenames: metadata[attributename] = self.data[attributename].metadata - field_rows = self.generate_node_types(metadata, attributenames, page) + field_rows, cpptypes = self.generate_node_types(metadata, attributenames, page) with open(os.path.join(output_directory, page.lower() + ".hpp"), 'w') as f: f.write(template.render( page=page, fieldrows=sorted(field_rows), + cpptypes=sorted(cpptypes), )) def write_webdocs(self, output_directory: str) -> None: @@ -392,10 +393,10 @@ def build_example(self, type: str, applies_to: List[str], xml_field: str, exampl # # This will output code for a single category of nodes. ############################################################################ - def generate_node_types(self, metadata: Any, attributenames: Dict[str,str],page: str) -> List[str]: + def generate_node_types(self, metadata: Any, attributenames: Dict[str,str],page: str) -> Tuple[List[str],List[str]]: - field_rows = [] - + field_rows: List[str] = [] + cpptypes: List[str] = [] typechange: Dict[str,str] = { "Fixed32": "int", "Int32": "int", @@ -411,11 +412,17 @@ def generate_node_types(self, metadata: Any, attributenames: Dict[str,str],page: if page in field['applies_to']: if field['type'] in typechange: - newtype = typechange[field['type']] + cpptype = typechange[field['type']] + if cpptype not in cpptypes: + cpptypes.append(cpptype) elif field['type'] == "Custom": - newtype = field['class'] + cpptype = field['class'] + if cpptype.lower() not in cpptypes: + cpptypes.append(cpptype.lower()) elif field['type'] in ["Enum","MultiflagValue","CompoundValue"]: - newtype = capitalize(attributename,delimiter="") + cpptype = capitalize(attributename,delimiter="") + if attributename not in cpptypes: + cpptypes.append(attributename) else : raise ValueError("Unexpected type {field_type} for attribute {attributename}".format( @@ -423,9 +430,9 @@ def generate_node_types(self, metadata: Any, attributenames: Dict[str,str],page: attributename=attributename, ) ) - field_rows.append((attributename,newtype)) - - return field_rows + field_rows.append((attributename,cpptype)) + + return field_rows, cpptypes ############################################################################ # Generate Auto Docs diff --git a/xml_converter/generators/cpp_templates/parseabletemplate.hpp b/xml_converter/generators/cpp_templates/parseabletemplate.hpp index 37a3ea75..ed3c3d66 100644 --- a/xml_converter/generators/cpp_templates/parseabletemplate.hpp +++ b/xml_converter/generators/cpp_templates/parseabletemplate.hpp @@ -1,37 +1,12 @@ #pragma once -{% if page == "Icon": %} -#include -#include -#include "attribute/bool.hpp" -#include "attribute/chirality.hpp" -#include "attribute/color.hpp" -#include "attribute/euler_angle.hpp" -#include "attribute/festival_filter.hpp" -#include "attribute/float.hpp" -#include "attribute/image.hpp" -#include "attribute/int.hpp" -#include "attribute/map_type_filter.hpp" -#include "attribute/mount_filter.hpp" -#include "attribute/position.hpp" -#include "attribute/profession_filter.hpp" -#include "attribute/race_filter.hpp" -#include "attribute/specialization_filter.hpp" -#include "attribute/string.hpp" -#include "parseable.hpp" #include "rapidxml-1.13/rapidxml.hpp" -#include "string_helper.hpp" -{% elif page == "Category": %} -#include #include #include - -#include "icon.hpp" #include "parseable.hpp" -#include "rapidxml-1.13/rapidxml.hpp" +{% if page == "Icon": %}{% elif page == "Category": %}#include +#include "icon.hpp" #include "trail.hpp" -{% elif page == "Trail": %} -#include - +{% elif page == "Trail": %}#include #include #include #include @@ -39,26 +14,11 @@ #include #include #include -#include #include -#include - -#include "attribute/bool.hpp" -#include "attribute/chirality.hpp" -#include "attribute/color.hpp" -#include "attribute/festival_filter.hpp" -#include "attribute/float.hpp" -#include "attribute/image.hpp" -#include "attribute/int.hpp" -#include "attribute/map_type_filter.hpp" -#include "attribute/mount_filter.hpp" -#include "attribute/profession_filter.hpp" -#include "attribute/race_filter.hpp" -#include "attribute/string.hpp" -#include "parseable.hpp" -#include "rapidxml-1.13/rapidxml.hpp" #include "rapidxml-1.13/rapidxml_print.hpp" {% endif %} +{%for cpptype in cpptypes%}#include "{{cpptype}}.hpp" +{% endfor %} using namespace std; class {{page}}: public Parseable { diff --git a/xml_converter/src/category.hpp b/xml_converter/src/category.hpp index c3968e19..2def3a6d 100644 --- a/xml_converter/src/category.hpp +++ b/xml_converter/src/category.hpp @@ -1,21 +1,17 @@ #pragma once - -#include +#include "rapidxml-1.13/rapidxml.hpp" #include #include - -#include "icon.hpp" #include "parseable.hpp" -#include "rapidxml-1.13/rapidxml.hpp" +#include +#include "icon.hpp" #include "trail.hpp" - +#include "bool.hpp" +#include "string.hpp" using namespace std; -// #define PARSEABLE_VAR(...) CLASS_PARSEABLE_VAR(Icon, __VA_ARGS__ ) -// #define PARSEABLE_SUBVAR(...) CLASS_PARSEABLE_SUBVAR(Icon, __VA_ARGS__ ) - class Category: public Parseable { private: @@ -30,12 +26,9 @@ class Category: public Parseable { string tooltip_name; - map children; - Icon default_icon; - Trail default_trail; + map children; + Icon default_icon; + Trail default_trail; virtual string classname(); -}; - -// #undef PARSEABLE_VAR -// #undef PARSEABLE_SUBVAR \ No newline at end of file +}; \ No newline at end of file diff --git a/xml_converter/src/icon.hpp b/xml_converter/src/icon.hpp index 639ae8c6..89ead666 100644 --- a/xml_converter/src/icon.hpp +++ b/xml_converter/src/icon.hpp @@ -1,32 +1,30 @@ #pragma once - +#include "rapidxml-1.13/rapidxml.hpp" #include #include -#include "attribute/bool.hpp" -#include "attribute/chirality.hpp" -#include "attribute/color.hpp" -#include "attribute/euler_angle.hpp" -#include "attribute/festival_filter.hpp" -#include "attribute/float.hpp" -#include "attribute/image.hpp" -#include "attribute/int.hpp" -#include "attribute/map_type_filter.hpp" -#include "attribute/mount_filter.hpp" -#include "attribute/position.hpp" -#include "attribute/profession_filter.hpp" -#include "attribute/race_filter.hpp" -#include "attribute/specialization_filter.hpp" -#include "attribute/string.hpp" #include "parseable.hpp" -#include "rapidxml-1.13/rapidxml.hpp" -#include "string_helper.hpp" +#include "bool.hpp" +#include "category.hpp" +#include "color.hpp" +#include "cull_chirality.hpp" +#include "euler_rotation.hpp" +#include "festival_filter.hpp" +#include "float.hpp" +#include "image.hpp" +#include "int.hpp" +#include "map_type_filter.hpp" +#include "mount_filter.hpp" +#include "position.hpp" +#include "profession_filter.hpp" +#include "reset_behavior.hpp" +#include "specialization_filter.hpp" +#include "species_filter.hpp" +#include "string.hpp" +#include "uniqueid.hpp" using namespace std; -// #define PARSEABLE_VAR(...) CLASS_PARSEABLE_VAR(Icon, __VA_ARGS__ ) -// #define PARSEABLE_SUBVAR(...) CLASS_PARSEABLE_SUBVAR(Icon, __VA_ARGS__ ) - class Icon: public Parseable { private: @@ -128,7 +126,4 @@ class Icon: public Parseable { virtual string classname(); -}; - -// #undef PARSEABLE_VAR -// #undef PARSEABLE_SUBVAR \ No newline at end of file +}; \ No newline at end of file diff --git a/xml_converter/src/trail.hpp b/xml_converter/src/trail.hpp index 2bdf2765..9dd1be28 100644 --- a/xml_converter/src/trail.hpp +++ b/xml_converter/src/trail.hpp @@ -1,7 +1,9 @@ #pragma once - +#include "rapidxml-1.13/rapidxml.hpp" +#include +#include +#include "parseable.hpp" #include - #include #include #include @@ -9,32 +11,29 @@ #include #include #include -#include #include -#include - -#include "attribute/bool.hpp" -#include "attribute/chirality.hpp" -#include "attribute/color.hpp" -#include "attribute/festival_filter.hpp" -#include "attribute/float.hpp" -#include "attribute/image.hpp" -#include "attribute/int.hpp" -#include "attribute/map_type_filter.hpp" -#include "attribute/mount_filter.hpp" -#include "attribute/profession_filter.hpp" -#include "attribute/race_filter.hpp" -#include "attribute/string.hpp" -#include "parseable.hpp" -#include "rapidxml-1.13/rapidxml.hpp" #include "rapidxml-1.13/rapidxml_print.hpp" +#include "bool.hpp" +#include "category.hpp" +#include "color.hpp" +#include "cull_chirality.hpp" +#include "festival_filter.hpp" +#include "float.hpp" +#include "image.hpp" +#include "int.hpp" +#include "map_type_filter.hpp" +#include "mount_filter.hpp" +#include "profession_filter.hpp" +#include "specialization_filter.hpp" +#include "species_filter.hpp" +#include "string.hpp" +#include "traildata.hpp" +#include "traildatamapid.hpp" +#include "uniqueid.hpp" using namespace std; -// #define PARSEABLE_VAR(...) CLASS_PARSEABLE_VAR(Icon, __VA_ARGS__ ) -// #define PARSEABLE_SUBVAR(...) CLASS_PARSEABLE_SUBVAR(Icon, __VA_ARGS__ ) - class Trail: public Parseable { private: @@ -96,7 +95,4 @@ class Trail: public Parseable { virtual string classname(); -}; - -// #undef PARSEABLE_VAR -// #undef PARSEABLE_SUBVAR \ No newline at end of file +}; \ No newline at end of file From 92298249bcfe2b71f1fbed317fd02f2afaecaa40 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 1 Aug 2022 23:23:00 -0400 Subject: [PATCH 042/539] Changed name of variable to includelist --- xml_converter/generators/code_generator.py | 20 +++++++++---------- .../cpp_templates/parseabletemplate.hpp | 5 ++--- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 55a1de97..427e48e9 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -286,14 +286,14 @@ def write_parseable(self, output_directory: str) -> None: for attributename in attributenames: metadata[attributename] = self.data[attributename].metadata - field_rows, cpptypes = self.generate_node_types(metadata, attributenames, page) + field_rows, includelist = self.generate_node_types(metadata, attributenames, page) with open(os.path.join(output_directory, page.lower() + ".hpp"), 'w') as f: f.write(template.render( page=page, fieldrows=sorted(field_rows), - cpptypes=sorted(cpptypes), + includelist=sorted(includelist), )) def write_webdocs(self, output_directory: str) -> None: @@ -413,16 +413,16 @@ def generate_node_types(self, metadata: Any, attributenames: Dict[str,str],page: if page in field['applies_to']: if field['type'] in typechange: cpptype = typechange[field['type']] - if cpptype not in cpptypes: - cpptypes.append(cpptype) + if cpptype not in includelist: + includelist.append(cpptype) elif field['type'] == "Custom": cpptype = field['class'] - if cpptype.lower() not in cpptypes: - cpptypes.append(cpptype.lower()) + if cpptype.lower() not in includelist: + includelist.append(cpptype.lower()) elif field['type'] in ["Enum","MultiflagValue","CompoundValue"]: cpptype = capitalize(attributename,delimiter="") - if attributename not in cpptypes: - cpptypes.append(attributename) + if attributename not in includelist: + includelist.append(attributename) else : raise ValueError("Unexpected type {field_type} for attribute {attributename}".format( @@ -430,9 +430,9 @@ def generate_node_types(self, metadata: Any, attributenames: Dict[str,str],page: attributename=attributename, ) ) - field_rows.append((attributename,cpptype)) + field_rows.append((attributename,includelist)) - return field_rows, cpptypes + return field_rows, includelist ############################################################################ # Generate Auto Docs diff --git a/xml_converter/generators/cpp_templates/parseabletemplate.hpp b/xml_converter/generators/cpp_templates/parseabletemplate.hpp index ed3c3d66..ac24457f 100644 --- a/xml_converter/generators/cpp_templates/parseabletemplate.hpp +++ b/xml_converter/generators/cpp_templates/parseabletemplate.hpp @@ -17,13 +17,12 @@ #include #include "rapidxml-1.13/rapidxml_print.hpp" {% endif %} -{%for cpptype in cpptypes%}#include "{{cpptype}}.hpp" +{%for include in includelist%}#include "{{include}}.hpp" {% endfor %} using namespace std; class {{page}}: public Parseable { - private: - {% for fieldrow in fieldrows: %} + private: {% for fieldrow in fieldrows: %} {{fieldrow[1]}} {{fieldrow[0]}}; {% endfor %} {% if page == "Category": %} From fcc618e9e19efedbadb296a66a2589f2a4bb8e6d Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 1 Aug 2022 23:48:39 -0400 Subject: [PATCH 043/539] Changed includelist to a set --- xml_converter/generators/code_generator.py | 13 ++--- .../cpp_templates/parseabletemplate.hpp | 13 ++--- xml_converter/src/category.hpp | 8 --- xml_converter/src/icon.hpp | 51 +------------------ xml_converter/src/trail.hpp | 31 +---------- 5 files changed, 12 insertions(+), 104 deletions(-) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 427e48e9..43bf7ba7 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -396,7 +396,7 @@ def build_example(self, type: str, applies_to: List[str], xml_field: str, exampl def generate_node_types(self, metadata: Any, attributenames: Dict[str,str],page: str) -> Tuple[List[str],List[str]]: field_rows: List[str] = [] - cpptypes: List[str] = [] + includelist: Set[str] = set() typechange: Dict[str,str] = { "Fixed32": "int", "Int32": "int", @@ -413,16 +413,13 @@ def generate_node_types(self, metadata: Any, attributenames: Dict[str,str],page: if page in field['applies_to']: if field['type'] in typechange: cpptype = typechange[field['type']] - if cpptype not in includelist: - includelist.append(cpptype) + includelist.add(cpptype) elif field['type'] == "Custom": cpptype = field['class'] - if cpptype.lower() not in includelist: - includelist.append(cpptype.lower()) + includelist.add(cpptype.lower()) elif field['type'] in ["Enum","MultiflagValue","CompoundValue"]: cpptype = capitalize(attributename,delimiter="") - if attributename not in includelist: - includelist.append(attributename) + includelist.add(attributename) else : raise ValueError("Unexpected type {field_type} for attribute {attributename}".format( @@ -430,7 +427,7 @@ def generate_node_types(self, metadata: Any, attributenames: Dict[str,str],page: attributename=attributename, ) ) - field_rows.append((attributename,includelist)) + field_rows.append((attributename,cpptype)) return field_rows, includelist diff --git a/xml_converter/generators/cpp_templates/parseabletemplate.hpp b/xml_converter/generators/cpp_templates/parseabletemplate.hpp index ac24457f..85132fd4 100644 --- a/xml_converter/generators/cpp_templates/parseabletemplate.hpp +++ b/xml_converter/generators/cpp_templates/parseabletemplate.hpp @@ -3,7 +3,7 @@ #include #include #include "parseable.hpp" -{% if page == "Icon": %}{% elif page == "Category": %}#include +{% if page == "Category": %}#include #include "icon.hpp" #include "trail.hpp" {% elif page == "Trail": %}#include @@ -23,12 +23,9 @@ using namespace std; class {{page}}: public Parseable { private: {% for fieldrow in fieldrows: %} - {{fieldrow[1]}} {{fieldrow[0]}}; - {% endfor %} - {% if page == "Category": %} - map children; + {{fieldrow[1]}} {{fieldrow[0]}};{% endfor %} + {% if page == "Category": %}map children; Icon default_icon; - Trail default_trail; - {% endif %} - virtual string classname(); + Trail default_trail;{% endif %} + virtual string classname(); }; \ No newline at end of file diff --git a/xml_converter/src/category.hpp b/xml_converter/src/category.hpp index 2def3a6d..6cb984e7 100644 --- a/xml_converter/src/category.hpp +++ b/xml_converter/src/category.hpp @@ -14,21 +14,13 @@ using namespace std; class Category: public Parseable { private: - bool default_visibility; - string display_name; - bool is_seperator; - string name; - string tooltip_name; - - map children; Icon default_icon; Trail default_trail; - virtual string classname(); }; \ No newline at end of file diff --git a/xml_converter/src/icon.hpp b/xml_converter/src/icon.hpp index 89ead666..94f98460 100644 --- a/xml_converter/src/icon.hpp +++ b/xml_converter/src/icon.hpp @@ -27,103 +27,54 @@ using namespace std; class Icon: public Parseable { private: - int achievement_bitmask; - int achievement_id; - float alpha; - bool auto-trigger; - float bounce_delay; - float bounce_duration; - float bounce_height; - bool can_fade; - Category category; - Color color; - string copy_clipboard; - string copy_message; - CullChirality cull_chirality; - float distance_fade_end; - float distance_fade_start; - EulerRotation euler_rotation; - FestivalFilter festival_filter; - UniqueID guid; - bool has_countdown; - float heightoffset; - Category hide_category; - Image icon; - float icon_size; - string info_message; - bool invert_visibility; - int map_display_size; - int map_id; - MapTypeFilter map_type_filter; - int maximum_size_on_screen; - int minimum_size_on_screen; - MountFilter mount_filter; - Position position; - ProfessionFilter profession_filter; - bool render_ingame; - bool render_on_map; - bool render_on_minimap; - ResetBehavior reset_behavior; - float reset_length; - bool scale_on_map_with_zoom; - string schedule; - float schedule_duration; - Category show_category; - SpecializationFilter specialization_filter; - SpeciesFilter species_filter; - Category toggle_category; - string tooltip_description; - string tooltip_name; - float trigger_range; - - + virtual string classname(); }; \ No newline at end of file diff --git a/xml_converter/src/trail.hpp b/xml_converter/src/trail.hpp index 9dd1be28..a724e921 100644 --- a/xml_converter/src/trail.hpp +++ b/xml_converter/src/trail.hpp @@ -36,63 +36,34 @@ using namespace std; class Trail: public Parseable { private: - int achievement_bitmask; - int achievement_id; - float alpha; - float animation_speed; - bool can_fade; - Category category; - Color color; - CullChirality cull_chirality; - float distance_fade_end; - float distance_fade_start; - FestivalFilter festival_filter; - UniqueID guid; - bool is_wall; - int map_id; - MapTypeFilter map_type_filter; - MountFilter mount_filter; - ProfessionFilter profession_filter; - bool render_ingame; - bool render_on_map; - bool render_on_minimap; - string schedule; - float schedule_duration; - SpecializationFilter specialization_filter; - SpeciesFilter species_filter; - Image texture; - TrailData trail_data; - TrailDataMapId trail_data_map_id; - float trail_scale; - - + virtual string classname(); }; \ No newline at end of file From 6c750d94e8ab72ae94dd997444480a321a9de4b7 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Tue, 2 Aug 2022 19:36:02 -0400 Subject: [PATCH 044/539] Addressing comments from code review --- xml_converter/generators/code_generator.py | 55 ++++++++++--------- .../cpp_templates/parseabletemplate.hpp | 6 +- xml_converter/src/category.hpp | 2 +- xml_converter/src/icon.hpp | 2 +- xml_converter/src/trail.hpp | 2 +- 5 files changed, 34 insertions(+), 33 deletions(-) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 43bf7ba7..9c7664f1 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -224,7 +224,7 @@ def validate_front_matter_schema(front_matter: Any) -> str: @dataclass class Document: - metadata: Dict[str, Any] + metadata: Dict[str, List[str]] content: str @dataclass @@ -268,32 +268,32 @@ def load_input_doc(self, dir_path: str) -> None: ) def write_parseable(self, output_directory: str) -> None: + print("Writing Node Type Headers") file_loader = FileSystemLoader('cpp_templates') env = Environment(loader=file_loader) template = env.get_template("parseabletemplate.hpp") - attributenames: Dict[str,str] = {} + attribute_names: Dict[str,str] = {} for filepath in self.data.keys(): filename = os.path.basename(filepath) - attributenames[filepath]= filename.split(".md")[0] + attribute_names[filepath]= filename.split(".md")[0] pages = ["Category","Icon","Trail"] for page in pages: - content: Dict[str,str] = {} metadata: Dict[str,List[str]] = {} - for attributename in attributenames: - metadata[attributename] = self.data[attributename].metadata + for attribute_name in attribute_names: + metadata[attribute_name] = self.data[attribute_name].metadata - field_rows, includelist = self.generate_node_types(metadata, attributenames, page) + attribute_variables, cpp_include_paths = self.generate_node_types(metadata, page, attribute_names) with open(os.path.join(output_directory, page.lower() + ".hpp"), 'w') as f: f.write(template.render( page=page, - fieldrows=sorted(field_rows), - includelist=sorted(includelist), + attribute_variables=sorted(attribute_variables), + cpp_include_paths=sorted(cpp_include_paths), )) def write_webdocs(self, output_directory: str) -> None: @@ -393,11 +393,12 @@ def build_example(self, type: str, applies_to: List[str], xml_field: str, exampl # # This will output code for a single category of nodes. ############################################################################ - def generate_node_types(self, metadata: Any, attributenames: Dict[str,str],page: str) -> Tuple[List[str],List[str]]: + def generate_node_types(self, metadata: Dict[str, List[str]], page: str, attribute_names: Dict[str,str] = {}) -> Tuple[Tuple[str],set[str]]: - field_rows: List[str] = [] - includelist: Set[str] = set() - typechange: Dict[str,str] = { + attribute_variables: List[Tuple[str]] = [] + cpp_include_paths: set[str] = set() + attribute_name: str = "" + doc_type_to_cpp_type: Dict[str,str] = { "Fixed32": "int", "Int32": "int", "Boolean": "bool", @@ -406,37 +407,37 @@ def generate_node_types(self, metadata: Any, attributenames: Dict[str,str],page: } for fieldkey,field in metadata.items(): - for x in attributenames: + for x in attribute_names: if fieldkey in x : - attributename = attributenames[x] + attribute_name = attribute_names[x] if page in field['applies_to']: - if field['type'] in typechange: - cpptype = typechange[field['type']] - includelist.add(cpptype) + if field['type'] in doc_type_to_cpp_type: + cpp_type = doc_type_to_cpp_type[field['type']] + cpp_include_paths.add(cpp_type) elif field['type'] == "Custom": - cpptype = field['class'] - includelist.add(cpptype.lower()) + cpp_type = field['class'] + cpp_include_paths.add(cpp_type.lower()) elif field['type'] in ["Enum","MultiflagValue","CompoundValue"]: - cpptype = capitalize(attributename,delimiter="") - includelist.add(attributename) + cpp_type = capitalize(attribute_name,delimiter="") + cpp_include_paths.add(attribute_name) else : - raise ValueError("Unexpected type {field_type} for attribute {attributename}".format( + raise ValueError("Unexpected type {field_type} for attribute {attribute_name}".format( field_type=field['type'], - attributename=attributename, + attribute_name=attribute_name, ) ) - field_rows.append((attributename,cpptype)) + attribute_variables.append((attribute_name,cpp_type)) - return field_rows, includelist + return attribute_variables, cpp_include_paths ############################################################################ # Generate Auto Docs # # This will output documentation for a single category of attributes. ############################################################################ - def generate_auto_docs(self, metadata: Any,content: Dict[str,str]) -> Tuple[str, List[FieldRow]]: + def generate_auto_docs(self, metadata: Dict[str, List[str]],content: Dict[str,str]) -> Tuple[str, List[FieldRow]]: file_loader = FileSystemLoader('web_templates') env = Environment(loader=file_loader) template = env.get_template("infotable.html") diff --git a/xml_converter/generators/cpp_templates/parseabletemplate.hpp b/xml_converter/generators/cpp_templates/parseabletemplate.hpp index 85132fd4..06c018cc 100644 --- a/xml_converter/generators/cpp_templates/parseabletemplate.hpp +++ b/xml_converter/generators/cpp_templates/parseabletemplate.hpp @@ -17,13 +17,13 @@ #include #include "rapidxml-1.13/rapidxml_print.hpp" {% endif %} -{%for include in includelist%}#include "{{include}}.hpp" +{%for cpp_include_path in cpp_include_paths%}#include "{{cpp_include_path}}.hpp" {% endfor %} using namespace std; class {{page}}: public Parseable { - private: {% for fieldrow in fieldrows: %} - {{fieldrow[1]}} {{fieldrow[0]}};{% endfor %} + private: {% for attribute_variable in attribute_variables: %} + {{attribute_variable[1]}} {{attribute_variable[0]}};{% endfor %} {% if page == "Category": %}map children; Icon default_icon; Trail default_trail;{% endif %} diff --git a/xml_converter/src/category.hpp b/xml_converter/src/category.hpp index 6cb984e7..4ccd31fb 100644 --- a/xml_converter/src/category.hpp +++ b/xml_converter/src/category.hpp @@ -22,5 +22,5 @@ class Category: public Parseable { map children; Icon default_icon; Trail default_trail; - virtual string classname(); + virtual string classname(); }; \ No newline at end of file diff --git a/xml_converter/src/icon.hpp b/xml_converter/src/icon.hpp index 94f98460..00e96ed1 100644 --- a/xml_converter/src/icon.hpp +++ b/xml_converter/src/icon.hpp @@ -76,5 +76,5 @@ class Icon: public Parseable { string tooltip_name; float trigger_range; - virtual string classname(); + virtual string classname(); }; \ No newline at end of file diff --git a/xml_converter/src/trail.hpp b/xml_converter/src/trail.hpp index a724e921..04edcbf1 100644 --- a/xml_converter/src/trail.hpp +++ b/xml_converter/src/trail.hpp @@ -65,5 +65,5 @@ class Trail: public Parseable { TrailDataMapId trail_data_map_id; float trail_scale; - virtual string classname(); + virtual string classname(); }; \ No newline at end of file From 1abd6eea84a7585a136c9218623b90072e74184f Mon Sep 17 00:00:00 2001 From: klingbolt <89052698+klingbolt@users.noreply.github.com> Date: Tue, 2 Aug 2022 19:49:52 -0400 Subject: [PATCH 045/539] Update xml_converter/generators/code_generator.py Co-authored-by: Asher Glick --- xml_converter/generators/code_generator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 9c7664f1..3fd042a9 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -396,7 +396,7 @@ def build_example(self, type: str, applies_to: List[str], xml_field: str, exampl def generate_node_types(self, metadata: Dict[str, List[str]], page: str, attribute_names: Dict[str,str] = {}) -> Tuple[Tuple[str],set[str]]: attribute_variables: List[Tuple[str]] = [] - cpp_include_paths: set[str] = set() + cpp_include_paths: Set[str] = set() attribute_name: str = "" doc_type_to_cpp_type: Dict[str,str] = { "Fixed32": "int", From 68d758555df16afd641ed2280dd44c703201d80a Mon Sep 17 00:00:00 2001 From: klingbolt <89052698+klingbolt@users.noreply.github.com> Date: Tue, 2 Aug 2022 19:50:03 -0400 Subject: [PATCH 046/539] Update xml_converter/generators/code_generator.py Co-authored-by: Asher Glick --- xml_converter/generators/code_generator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 3fd042a9..82510131 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -2,7 +2,7 @@ from jsonschema.exceptions import ValidationError # type:ignore import yaml import frontmatter # type:ignore -from typing import Any, Dict, List, Tuple +from typing import Any, Dict, List, Tuple, Set import os import markdown from dataclasses import dataclass From 46d97607dc9d63aaa4cdb54d7915fea2ed58aba4 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Wed, 3 Aug 2022 01:27:47 -0500 Subject: [PATCH 047/539] minor cleanup of names, comments, and types --- xml_converter/generators/code_generator.py | 164 ++++++++++++--------- 1 file changed, 94 insertions(+), 70 deletions(-) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 82510131..3a8e4246 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -8,7 +8,7 @@ from dataclasses import dataclass from jinja2 import Template, FileSystemLoader, Environment - +SchemaType = Dict[str, Any] schema = """ type: object properties: @@ -224,7 +224,7 @@ def validate_front_matter_schema(front_matter: Any) -> str: @dataclass class Document: - metadata: Dict[str, List[str]] + metadata: SchemaType content: str @dataclass @@ -267,8 +267,14 @@ def load_input_doc(self, dir_path: str) -> None: content=document.content ) - def write_parseable(self, output_directory: str) -> None: - print("Writing Node Type Headers") + ############################################################################ + # write_cpp_classes + # + # Create all of the auto generated cpp classes that can be created from + # the documents. + ############################################################################ + def write_cpp_classes(self, output_directory: str) -> None: + print("Writing XML Node Cpp Classes") file_loader = FileSystemLoader('cpp_templates') env = Environment(loader=file_loader) template = env.get_template("parseabletemplate.hpp") @@ -281,20 +287,71 @@ def write_parseable(self, output_directory: str) -> None: pages = ["Category","Icon","Trail"] for page in pages: - metadata: Dict[str,List[str]] = {} + metadata: Dict[str, Any] = {} for attribute_name in attribute_names: metadata[attribute_name] = self.data[attribute_name].metadata - attribute_variables, cpp_include_paths = self.generate_node_types(metadata, page, attribute_names) + attribute_variables, cpp_include_paths = self.generate_cpp_variable_data(metadata, page, attribute_names) with open(os.path.join(output_directory, page.lower() + ".hpp"), 'w') as f: f.write(template.render( - page=page, - attribute_variables=sorted(attribute_variables), - cpp_include_paths=sorted(cpp_include_paths), - )) + page=page, + attribute_variables=sorted(attribute_variables), + cpp_include_paths=sorted(cpp_include_paths), + )) + + ############################################################################ + # generate_cpp_variable_data + # + # This will return a list of tuples containing tuple pairs of the variable + # name and the variable cpp type, and a set of all of the dependencies + # those variables will need to have included. + ############################################################################ + def generate_cpp_variable_data( + self, + metadata: Dict[str, SchemaType], + page: str, + attribute_names: Dict[str, str] = {} + ) -> Tuple[List[Tuple[str, str]], Set[str]]: + + attribute_variables: List[Tuple[str, str]] = [] + cpp_include_paths: Set[str] = set() + attribute_name: str = "" + doc_type_to_cpp_type: Dict[str,str] = { + "Fixed32": "int", + "Int32": "int", + "Boolean": "bool", + "Float32": "float", + "String": "string", + } + + for fieldkey,field in metadata.items(): + for x in attribute_names: + if fieldkey in x : + attribute_name = attribute_names[x] + + if page in field['applies_to']: + if field['type'] in doc_type_to_cpp_type: + cpp_type = doc_type_to_cpp_type[field['type']] + cpp_include_paths.add(cpp_type) + elif field['type'] == "Custom": + cpp_type = field['class'] + cpp_include_paths.add(cpp_type.lower()) + elif field['type'] in ["Enum","MultiflagValue","CompoundValue"]: + cpp_type = capitalize(attribute_name,delimiter="") + cpp_include_paths.add(attribute_name) + + else : + raise ValueError("Unexpected type {field_type} for attribute {attribute_name}".format( + field_type=field['type'], + attribute_name=attribute_name, + )) + + attribute_variables.append((attribute_name, cpp_type)) + + return attribute_variables, cpp_include_paths def write_webdocs(self, output_directory: str) -> None: print("Writing output documentation") @@ -312,15 +369,12 @@ def write_webdocs(self, output_directory: str) -> None: categories[category].append(filename) navigation_links = [ (capitalize(category), category) for category in sorted(categories.keys()) ] - - complete_field_row_list = [] - pages: Dict[str,List[str]] = {} for page in sorted(categories): - content: Dict[str,str] = {} - metadata: Dict[str,List[str]] = {} + content: Dict[str, str] = {} + metadata: Dict[str, SchemaType] = {} # Resets the content and metadata to empty for each loop for subpage in categories[page]: @@ -329,7 +383,7 @@ def write_webdocs(self, output_directory: str) -> None: metadata[subpage] = self.data[subpage].metadata - generated_doc, field_rows = self.generate_auto_docs(metadata,content) + generated_doc, field_rows = self.generate_auto_docs(metadata, content) for field_row in field_rows: complete_field_row_list.append(field_row) @@ -388,64 +442,19 @@ def build_example(self, type: str, applies_to: List[str], xml_field: str, exampl return example - ############################################################################ - # Generate Node Types - # - # This will output code for a single category of nodes. - ############################################################################ - def generate_node_types(self, metadata: Dict[str, List[str]], page: str, attribute_names: Dict[str,str] = {}) -> Tuple[Tuple[str],set[str]]: - - attribute_variables: List[Tuple[str]] = [] - cpp_include_paths: Set[str] = set() - attribute_name: str = "" - doc_type_to_cpp_type: Dict[str,str] = { - "Fixed32": "int", - "Int32": "int", - "Boolean": "bool", - "Float32": "float", - "String": "string", - } - - for fieldkey,field in metadata.items(): - for x in attribute_names: - if fieldkey in x : - attribute_name = attribute_names[x] - - if page in field['applies_to']: - if field['type'] in doc_type_to_cpp_type: - cpp_type = doc_type_to_cpp_type[field['type']] - cpp_include_paths.add(cpp_type) - elif field['type'] == "Custom": - cpp_type = field['class'] - cpp_include_paths.add(cpp_type.lower()) - elif field['type'] in ["Enum","MultiflagValue","CompoundValue"]: - cpp_type = capitalize(attribute_name,delimiter="") - cpp_include_paths.add(attribute_name) - - else : - raise ValueError("Unexpected type {field_type} for attribute {attribute_name}".format( - field_type=field['type'], - attribute_name=attribute_name, - ) ) - - attribute_variables.append((attribute_name,cpp_type)) - - return attribute_variables, cpp_include_paths - ############################################################################ # Generate Auto Docs # # This will output documentation for a single category of attributes. ############################################################################ - def generate_auto_docs(self, metadata: Dict[str, List[str]],content: Dict[str,str]) -> Tuple[str, List[FieldRow]]: + def generate_auto_docs(self, metadata: Dict[str, SchemaType],content: Dict[str,str]) -> Tuple[str, List[FieldRow]]: file_loader = FileSystemLoader('web_templates') env = Environment(loader=file_loader) template = env.get_template("infotable.html") field_rows = [] - for fieldkey,field in metadata.items(): - + for fieldkey, field in metadata.items(): valid_values = "" if field['type'] == "MultiflagValue" or field['type'] == "Enum": @@ -547,8 +556,15 @@ def generate_auto_docs(self, metadata: Dict[str, List[str]],content: Dict[str,st return template.render(field_rows=field_rows), field_rows -def capitalize(word: str,delimiter: str = " ") -> str: - + +################################################################################ +# capitalize +# +# A helper function to take a snake case string and capitalize the first letter +# of each word in the string. A delimiter can be passed in to change the +# characters inserted between the newly capitalized words. +################################################################################ +def capitalize(word: str, delimiter: str = " ") -> str: wordarray = word.split("_") capital_word_array = [] @@ -558,15 +574,23 @@ def capitalize(word: str,delimiter: str = " ") -> str: return delimiter.join(capital_word_array) + +################################################################################ +# main +# +# The first function that gets called. Is in change of parsing the input +# markdown files, and then creating the desired output files. +################################################################################ def main() -> None: generator = Generator() - base_directory = "../doc" + markdown_doc_directory = "../doc" - for directory in os.listdir(base_directory): - if os.path.isdir(os.path.join(base_directory, directory)): - generator.load_input_doc(os.path.join(base_directory, directory)) + for directory in os.listdir(markdown_doc_directory): + full_markdown_doc_directory = os.path.join(markdown_doc_directory, directory) + if os.path.isdir(full_markdown_doc_directory): + generator.load_input_doc(full_markdown_doc_directory) generator.write_webdocs("../web_docs/") - generator.write_parseable("../src/") + generator.write_cpp_classes("../src/") main() \ No newline at end of file From 3e0354e7e412be73132f7bd36b282af9470a82a1 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Wed, 3 Aug 2022 07:48:43 -0500 Subject: [PATCH 048/539] adding a note for how to do one of the steps for clangd setup --- xml_converter/README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/xml_converter/README.md b/xml_converter/README.md index a5f1f897..d77fa51e 100644 --- a/xml_converter/README.md +++ b/xml_converter/README.md @@ -1,3 +1,11 @@ The XML Converter Module is tasked with parsing XML marker files and loading them into Burrito. In the future it may also preform the revers action and be able to export XML files as well. + + +Setup Clangd +------------ + +```bash +cmake . -DCMAKE_EXPORT_COMPILE_COMMANDS=ON +``` From 1eb6a1457bafabe650af41e2c638b4be5e4fe7e6 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Wed, 3 Aug 2022 07:49:13 -0500 Subject: [PATCH 049/539] cleaning up aspects of the cpp template --- .../cpp_templates/parseabletemplate.hpp | 32 ++++-- xml_converter/src/category.hpp | 21 ++-- xml_converter/src/icon.hpp | 102 +++++++++--------- xml_converter/src/trail.hpp | 62 +++++------ 4 files changed, 114 insertions(+), 103 deletions(-) diff --git a/xml_converter/generators/cpp_templates/parseabletemplate.hpp b/xml_converter/generators/cpp_templates/parseabletemplate.hpp index 06c018cc..d2750e53 100644 --- a/xml_converter/generators/cpp_templates/parseabletemplate.hpp +++ b/xml_converter/generators/cpp_templates/parseabletemplate.hpp @@ -3,10 +3,12 @@ #include #include #include "parseable.hpp" -{% if page == "Category": %}#include +{%- if page == "Category": %} +#include #include "icon.hpp" #include "trail.hpp" -{% elif page == "Trail": %}#include +{%- elif page == "Trail": %} +#include #include #include #include @@ -16,16 +18,24 @@ #include #include #include "rapidxml-1.13/rapidxml_print.hpp" -{% endif %} -{%for cpp_include_path in cpp_include_paths%}#include "{{cpp_include_path}}.hpp" -{% endfor %} +{%- endif %} +{% for cpp_include_path in cpp_include_paths %} +#include "{{cpp_include_path}}.hpp" +{%- endfor %} + using namespace std; class {{page}}: public Parseable { - private: {% for attribute_variable in attribute_variables: %} - {{attribute_variable[1]}} {{attribute_variable[0]}};{% endfor %} - {% if page == "Category": %}map children; - Icon default_icon; - Trail default_trail;{% endif %} - virtual string classname(); + private: + {%- for attribute_variable in attribute_variables: %} + {{attribute_variable[1]}} {{attribute_variable[0]}}; + {%- endfor %} + + {%- if page == "Category": %} + map children; + Icon default_icon; + Trail default_trail; + {%- endif %} + + virtual string classname(); }; \ No newline at end of file diff --git a/xml_converter/src/category.hpp b/xml_converter/src/category.hpp index 4ccd31fb..ad1ca16e 100644 --- a/xml_converter/src/category.hpp +++ b/xml_converter/src/category.hpp @@ -13,14 +13,15 @@ using namespace std; class Category: public Parseable { - private: - bool default_visibility; - string display_name; - bool is_seperator; - string name; - string tooltip_name; - map children; - Icon default_icon; - Trail default_trail; - virtual string classname(); + private: + bool default_visibility; + string display_name; + bool is_seperator; + string name; + string tooltip_name; + map children; + Icon default_icon; + Trail default_trail; + + virtual string classname(); }; \ No newline at end of file diff --git a/xml_converter/src/icon.hpp b/xml_converter/src/icon.hpp index 00e96ed1..fad8a0a9 100644 --- a/xml_converter/src/icon.hpp +++ b/xml_converter/src/icon.hpp @@ -26,55 +26,55 @@ using namespace std; class Icon: public Parseable { - private: - int achievement_bitmask; - int achievement_id; - float alpha; - bool auto-trigger; - float bounce_delay; - float bounce_duration; - float bounce_height; - bool can_fade; - Category category; - Color color; - string copy_clipboard; - string copy_message; - CullChirality cull_chirality; - float distance_fade_end; - float distance_fade_start; - EulerRotation euler_rotation; - FestivalFilter festival_filter; - UniqueID guid; - bool has_countdown; - float heightoffset; - Category hide_category; - Image icon; - float icon_size; - string info_message; - bool invert_visibility; - int map_display_size; - int map_id; - MapTypeFilter map_type_filter; - int maximum_size_on_screen; - int minimum_size_on_screen; - MountFilter mount_filter; - Position position; - ProfessionFilter profession_filter; - bool render_ingame; - bool render_on_map; - bool render_on_minimap; - ResetBehavior reset_behavior; - float reset_length; - bool scale_on_map_with_zoom; - string schedule; - float schedule_duration; - Category show_category; - SpecializationFilter specialization_filter; - SpeciesFilter species_filter; - Category toggle_category; - string tooltip_description; - string tooltip_name; - float trigger_range; - - virtual string classname(); + private: + int achievement_bitmask; + int achievement_id; + float alpha; + bool auto-trigger; + float bounce_delay; + float bounce_duration; + float bounce_height; + bool can_fade; + Category category; + Color color; + string copy_clipboard; + string copy_message; + CullChirality cull_chirality; + float distance_fade_end; + float distance_fade_start; + EulerRotation euler_rotation; + FestivalFilter festival_filter; + UniqueID guid; + bool has_countdown; + float heightoffset; + Category hide_category; + Image icon; + float icon_size; + string info_message; + bool invert_visibility; + int map_display_size; + int map_id; + MapTypeFilter map_type_filter; + int maximum_size_on_screen; + int minimum_size_on_screen; + MountFilter mount_filter; + Position position; + ProfessionFilter profession_filter; + bool render_ingame; + bool render_on_map; + bool render_on_minimap; + ResetBehavior reset_behavior; + float reset_length; + bool scale_on_map_with_zoom; + string schedule; + float schedule_duration; + Category show_category; + SpecializationFilter specialization_filter; + SpeciesFilter species_filter; + Category toggle_category; + string tooltip_description; + string tooltip_name; + float trigger_range; + + virtual string classname(); }; \ No newline at end of file diff --git a/xml_converter/src/trail.hpp b/xml_converter/src/trail.hpp index 04edcbf1..c0beba50 100644 --- a/xml_converter/src/trail.hpp +++ b/xml_converter/src/trail.hpp @@ -35,35 +35,35 @@ using namespace std; class Trail: public Parseable { - private: - int achievement_bitmask; - int achievement_id; - float alpha; - float animation_speed; - bool can_fade; - Category category; - Color color; - CullChirality cull_chirality; - float distance_fade_end; - float distance_fade_start; - FestivalFilter festival_filter; - UniqueID guid; - bool is_wall; - int map_id; - MapTypeFilter map_type_filter; - MountFilter mount_filter; - ProfessionFilter profession_filter; - bool render_ingame; - bool render_on_map; - bool render_on_minimap; - string schedule; - float schedule_duration; - SpecializationFilter specialization_filter; - SpeciesFilter species_filter; - Image texture; - TrailData trail_data; - TrailDataMapId trail_data_map_id; - float trail_scale; - - virtual string classname(); + private: + int achievement_bitmask; + int achievement_id; + float alpha; + float animation_speed; + bool can_fade; + Category category; + Color color; + CullChirality cull_chirality; + float distance_fade_end; + float distance_fade_start; + FestivalFilter festival_filter; + UniqueID guid; + bool is_wall; + int map_id; + MapTypeFilter map_type_filter; + MountFilter mount_filter; + ProfessionFilter profession_filter; + bool render_ingame; + bool render_on_map; + bool render_on_minimap; + string schedule; + float schedule_duration; + SpecializationFilter specialization_filter; + SpeciesFilter species_filter; + Image texture; + TrailData trail_data; + TrailDataMapId trail_data_map_id; + float trail_scale; + + virtual string classname(); }; \ No newline at end of file From 9158e3a97f8539d0623abca3b70c09803dd796d3 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Wed, 3 Aug 2022 08:25:04 -0500 Subject: [PATCH 050/539] Fixing naming, includes, and adding missing files to allow cpp to compile --- xml_converter/doc/category/category.md | 2 +- .../{auto-trigger.md => auto_trigger.md} | 0 xml_converter/doc/trigger/guid.md | 2 +- xml_converter/doc/trigger/hide_category.md | 2 +- xml_converter/doc/trigger/show_category.md | 2 +- xml_converter/doc/trigger/toggle_category.md | 2 +- .../cpp_templates/parseabletemplate.hpp | 4 +- .../{chirality.cpp => cull_chirality.cpp} | 6 +-- .../{chirality.hpp => cull_chirality.hpp} | 4 +- .../{euler_angle.cpp => euler_rotation.cpp} | 6 +-- .../{euler_angle.hpp => euler_rotation.hpp} | 4 +- .../src/attribute/markercategory.hpp | 13 +++++ xml_converter/src/attribute/race_filter.cpp | 9 ---- .../src/attribute/reset_behavior.hpp | 13 +++++ .../src/attribute/species_filter.cpp | 9 ++++ .../{race_filter.hpp => species_filter.hpp} | 8 +-- xml_converter/src/attribute/traildata.hpp | 13 +++++ .../src/attribute/traildatamapid.hpp | 13 +++++ xml_converter/src/attribute/uniqueid.hpp | 13 +++++ xml_converter/src/category.cpp | 34 ++++++------- xml_converter/src/category.hpp | 6 +-- xml_converter/src/icon.hpp | 50 +++++++++---------- xml_converter/src/trail.hpp | 40 +++++++-------- 23 files changed, 160 insertions(+), 95 deletions(-) rename xml_converter/doc/trigger/{auto-trigger.md => auto_trigger.md} (100%) rename xml_converter/src/attribute/{chirality.cpp => cull_chirality.cpp} (59%) rename xml_converter/src/attribute/{chirality.hpp => cull_chirality.hpp} (61%) rename xml_converter/src/attribute/{euler_angle.cpp => euler_rotation.cpp} (78%) rename xml_converter/src/attribute/{euler_angle.hpp => euler_rotation.hpp} (63%) create mode 100644 xml_converter/src/attribute/markercategory.hpp delete mode 100644 xml_converter/src/attribute/race_filter.cpp create mode 100644 xml_converter/src/attribute/reset_behavior.hpp create mode 100644 xml_converter/src/attribute/species_filter.cpp rename xml_converter/src/attribute/{race_filter.hpp => species_filter.hpp} (55%) create mode 100644 xml_converter/src/attribute/traildata.hpp create mode 100644 xml_converter/src/attribute/traildatamapid.hpp create mode 100644 xml_converter/src/attribute/uniqueid.hpp diff --git a/xml_converter/doc/category/category.md b/xml_converter/doc/category/category.md index 9f345deb..91e68742 100644 --- a/xml_converter/doc/category/category.md +++ b/xml_converter/doc/category/category.md @@ -1,7 +1,7 @@ --- name: Category type: Custom -class: Category +class: MarkerCategory applies_to: [Icon, Trail] xml_fields: [Type, Category] protobuf_field: category diff --git a/xml_converter/doc/trigger/auto-trigger.md b/xml_converter/doc/trigger/auto_trigger.md similarity index 100% rename from xml_converter/doc/trigger/auto-trigger.md rename to xml_converter/doc/trigger/auto_trigger.md diff --git a/xml_converter/doc/trigger/guid.md b/xml_converter/doc/trigger/guid.md index 025467e5..625b22bf 100644 --- a/xml_converter/doc/trigger/guid.md +++ b/xml_converter/doc/trigger/guid.md @@ -1,7 +1,7 @@ --- name: GUID type: Custom -class: UniqueID +class: UniqueId xml_fields: ["GUID"] applies_to: ["Icon", "Trail"] protobuf_field: "guid" diff --git a/xml_converter/doc/trigger/hide_category.md b/xml_converter/doc/trigger/hide_category.md index a7a6f279..1df6652b 100644 --- a/xml_converter/doc/trigger/hide_category.md +++ b/xml_converter/doc/trigger/hide_category.md @@ -1,7 +1,7 @@ --- name: Hide Category type: Custom -class: Category +class: MarkerCategory applies_to: [Icon] xml_fields: [Hide] protobuf_field: trigger.action_hide_category diff --git a/xml_converter/doc/trigger/show_category.md b/xml_converter/doc/trigger/show_category.md index 62c3a343..3bb542fb 100644 --- a/xml_converter/doc/trigger/show_category.md +++ b/xml_converter/doc/trigger/show_category.md @@ -1,7 +1,7 @@ --- name: Show Category type: Custom -class: Category +class: MarkerCategory applies_to: [Icon] xml_fields: [Show] protobuf_field: trigger.action_show_category diff --git a/xml_converter/doc/trigger/toggle_category.md b/xml_converter/doc/trigger/toggle_category.md index eeb11a6f..8d73e457 100644 --- a/xml_converter/doc/trigger/toggle_category.md +++ b/xml_converter/doc/trigger/toggle_category.md @@ -1,7 +1,7 @@ --- name: Toggle Category type: Custom -class: Category +class: MarkerCategory applies_to: [Icon] xml_fields: [Toggle] protobuf_field: trigger.action_toggle_category diff --git a/xml_converter/generators/cpp_templates/parseabletemplate.hpp b/xml_converter/generators/cpp_templates/parseabletemplate.hpp index d2750e53..cf2baadc 100644 --- a/xml_converter/generators/cpp_templates/parseabletemplate.hpp +++ b/xml_converter/generators/cpp_templates/parseabletemplate.hpp @@ -20,13 +20,13 @@ #include "rapidxml-1.13/rapidxml_print.hpp" {%- endif %} {% for cpp_include_path in cpp_include_paths %} -#include "{{cpp_include_path}}.hpp" +#include "attribute/{{cpp_include_path}}.hpp" {%- endfor %} using namespace std; class {{page}}: public Parseable { - private: + public: {%- for attribute_variable in attribute_variables: %} {{attribute_variable[1]}} {{attribute_variable[0]}}; {%- endfor %} diff --git a/xml_converter/src/attribute/chirality.cpp b/xml_converter/src/attribute/cull_chirality.cpp similarity index 59% rename from xml_converter/src/attribute/chirality.cpp rename to xml_converter/src/attribute/cull_chirality.cpp index cb418322..1880f920 100644 --- a/xml_converter/src/attribute/chirality.cpp +++ b/xml_converter/src/attribute/cull_chirality.cpp @@ -1,4 +1,4 @@ -#include "chirality.hpp" +#include "cull_chirality.hpp" #include #include @@ -8,8 +8,8 @@ using namespace std; -Chirality parse_Chirality(rapidxml::xml_attribute<>* input, vector *) { - Chirality chirality; +CullChirality parse_Chirality(rapidxml::xml_attribute<>* input, vector *) { + CullChirality chirality; chirality.chirality = get_attribute_value(input); return chirality; } diff --git a/xml_converter/src/attribute/chirality.hpp b/xml_converter/src/attribute/cull_chirality.hpp similarity index 61% rename from xml_converter/src/attribute/chirality.hpp rename to xml_converter/src/attribute/cull_chirality.hpp index 97abf3b1..30277250 100644 --- a/xml_converter/src/attribute/chirality.hpp +++ b/xml_converter/src/attribute/cull_chirality.hpp @@ -9,9 +9,9 @@ using namespace std; -class Chirality { +class CullChirality { public: string chirality; }; -Chirality parse_Chirality(rapidxml::xml_attribute<>* input, vector *errors); +CullChirality parse_Chirality(rapidxml::xml_attribute<>* input, vector *errors); diff --git a/xml_converter/src/attribute/euler_angle.cpp b/xml_converter/src/attribute/euler_rotation.cpp similarity index 78% rename from xml_converter/src/attribute/euler_angle.cpp rename to xml_converter/src/attribute/euler_rotation.cpp index 89035acd..818b21ef 100644 --- a/xml_converter/src/attribute/euler_angle.cpp +++ b/xml_converter/src/attribute/euler_rotation.cpp @@ -1,4 +1,4 @@ -#include "euler_angle.hpp" +#include "euler_rotation.hpp" #include #include @@ -10,10 +10,10 @@ using namespace std; -EulerAngle parse_EulerAngle(rapidxml::xml_attribute<>* input, vector *errors) { +EulerRotation parse_EulerAngle(rapidxml::xml_attribute<>* input, vector *errors) { vector components = split(get_attribute_value(input), ","); - EulerAngle euler_angle; + EulerRotation euler_angle; if (components.size() == 3) { euler_angle.x = stof(components[0].c_str()); euler_angle.y = stof(components[1].c_str()); diff --git a/xml_converter/src/attribute/euler_angle.hpp b/xml_converter/src/attribute/euler_rotation.hpp similarity index 63% rename from xml_converter/src/attribute/euler_angle.hpp rename to xml_converter/src/attribute/euler_rotation.hpp index 32f3937e..98556757 100644 --- a/xml_converter/src/attribute/euler_angle.hpp +++ b/xml_converter/src/attribute/euler_rotation.hpp @@ -8,11 +8,11 @@ using namespace std; -class EulerAngle { +class EulerRotation { public: float x; float y; float z; }; -EulerAngle parse_EulerAngle(rapidxml::xml_attribute<>* input, vector *errors); +EulerRotation parse_EulerAngle(rapidxml::xml_attribute<>* input, vector *errors); diff --git a/xml_converter/src/attribute/markercategory.hpp b/xml_converter/src/attribute/markercategory.hpp new file mode 100644 index 00000000..759d3400 --- /dev/null +++ b/xml_converter/src/attribute/markercategory.hpp @@ -0,0 +1,13 @@ +#pragma once + +#include +#include + +#include "../rapid_helpers.hpp" +#include "../rapidxml-1.13/rapidxml.hpp" + +class MarkerCategory { + +}; + +MarkerCategory parse_MarkerCategory(rapidxml::xml_attribute<>* input, vector *errors); diff --git a/xml_converter/src/attribute/race_filter.cpp b/xml_converter/src/attribute/race_filter.cpp deleted file mode 100644 index be7d037f..00000000 --- a/xml_converter/src/attribute/race_filter.cpp +++ /dev/null @@ -1,9 +0,0 @@ -#include "race_filter.hpp" - -using namespace std; - -RaceFilter parse_RaceFilter(rapidxml::xml_attribute<>* input, vector *errors) { - RaceFilter filter; - filter.parse(input, errors); - return filter; -} diff --git a/xml_converter/src/attribute/reset_behavior.hpp b/xml_converter/src/attribute/reset_behavior.hpp new file mode 100644 index 00000000..3b88fe41 --- /dev/null +++ b/xml_converter/src/attribute/reset_behavior.hpp @@ -0,0 +1,13 @@ +#pragma once + +#include +#include + +#include "../rapid_helpers.hpp" +#include "../rapidxml-1.13/rapidxml.hpp" + +class ResetBehavior { + +}; + +ResetBehavior parse_ResetBehavior(rapidxml::xml_attribute<>* input, vector *errors); diff --git a/xml_converter/src/attribute/species_filter.cpp b/xml_converter/src/attribute/species_filter.cpp new file mode 100644 index 00000000..7ed07aaf --- /dev/null +++ b/xml_converter/src/attribute/species_filter.cpp @@ -0,0 +1,9 @@ +#include "species_filter.hpp" + +using namespace std; + +SpeciesFilter parse_RaceFilter(rapidxml::xml_attribute<>* input, vector *errors) { + SpeciesFilter filter; + filter.parse(input, errors); + return filter; +} diff --git a/xml_converter/src/attribute/race_filter.hpp b/xml_converter/src/attribute/species_filter.hpp similarity index 55% rename from xml_converter/src/attribute/race_filter.hpp rename to xml_converter/src/attribute/species_filter.hpp index 1138603a..fa45a86b 100644 --- a/xml_converter/src/attribute/race_filter.hpp +++ b/xml_converter/src/attribute/species_filter.hpp @@ -8,9 +8,9 @@ using namespace std; -#define FILTER_ITEM(...) CLASS_FILTER_ITEM(RaceFilter, __VA_ARGS__ ) +#define FILTER_ITEM(...) CLASS_FILTER_ITEM(SpeciesFilter, __VA_ARGS__ ) -class RaceFilter: public Filter { +class SpeciesFilter: public Filter { public: FILTER_ITEM(asura, "asura") FILTER_ITEM(charr, "charr") @@ -18,10 +18,10 @@ class RaceFilter: public Filter { FILTER_ITEM(norn, "norn") FILTER_ITEM(sylvari, "sylvari") - virtual string classname() { return "RaceFilter"; } + virtual string classname() { return "SpeciesFilter"; } }; -RaceFilter parse_RaceFilter(rapidxml::xml_attribute<>* input, vector *errors); +SpeciesFilter parse_SpeciesFilter(rapidxml::xml_attribute<>* input, vector *errors); #undef FILTER_ITEM diff --git a/xml_converter/src/attribute/traildata.hpp b/xml_converter/src/attribute/traildata.hpp new file mode 100644 index 00000000..7b400549 --- /dev/null +++ b/xml_converter/src/attribute/traildata.hpp @@ -0,0 +1,13 @@ +#pragma once + +#include +#include + +#include "../rapid_helpers.hpp" +#include "../rapidxml-1.13/rapidxml.hpp" + +class TrailData { + +}; + +TrailData parse_TrailData(rapidxml::xml_attribute<>* input, vector *errors); diff --git a/xml_converter/src/attribute/traildatamapid.hpp b/xml_converter/src/attribute/traildatamapid.hpp new file mode 100644 index 00000000..6ed4df43 --- /dev/null +++ b/xml_converter/src/attribute/traildatamapid.hpp @@ -0,0 +1,13 @@ +#pragma once + +#include +#include + +#include "../rapid_helpers.hpp" +#include "../rapidxml-1.13/rapidxml.hpp" + +class TrailDataMapId { + +}; + +TrailDataMapId parse_TrailDataMapId(rapidxml::xml_attribute<>* input, vector *errors); diff --git a/xml_converter/src/attribute/uniqueid.hpp b/xml_converter/src/attribute/uniqueid.hpp new file mode 100644 index 00000000..293b6dd2 --- /dev/null +++ b/xml_converter/src/attribute/uniqueid.hpp @@ -0,0 +1,13 @@ +#pragma once + +#include +#include + +#include "../rapid_helpers.hpp" +#include "../rapidxml-1.13/rapidxml.hpp" + +class UniqueId { + +}; + +UniqueId parse_UniqueId(rapidxml::xml_attribute<>* input, vector *errors); diff --git a/xml_converter/src/category.cpp b/xml_converter/src/category.cpp index 289bf2a4..0f82acac 100644 --- a/xml_converter/src/category.cpp +++ b/xml_converter/src/category.cpp @@ -6,23 +6,23 @@ string Category::classname() { return "MarkerCategory"; } -void Category::init_from_xml(rapidxml::xml_node<>* node, vector *errors) { - for (rapidxml::xml_attribute<>* attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()) { +// void Category::init_from_xml(rapidxml::xml_node<>* node, vector *errors) { +// for (rapidxml::xml_attribute<>* attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()) { - // Attempt to parse all the attributes of the category into an Icon and - // Trail to use as default values for all their children. - bool is_icon_value = false; - bool is_trail_value = false; - for (rapidxml::xml_attribute<>* attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()) { - is_icon_value |= this->default_icon.init_xml_attribute(attribute, errors); - is_trail_value |= this->default_trail.init_xml_attribute(attribute, errors); - } +// // Attempt to parse all the attributes of the category into an Icon and +// // Trail to use as default values for all their children. +// bool is_icon_value = false; +// bool is_trail_value = false; +// for (rapidxml::xml_attribute<>* attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()) { +// is_icon_value |= this->default_icon.init_xml_attribute(attribute, errors); +// is_trail_value |= this->default_trail.init_xml_attribute(attribute, errors); +// } - if (init_xml_attribute(attribute, errors)) {} - else if (is_icon_value || is_trail_value) {} - else { - errors->push_back(new XMLAttributeNameError("Unknown " + this->classname() + " attribute ", attribute)); - } - } -} +// if (init_xml_attribute(attribute, errors)) {} +// else if (is_icon_value || is_trail_value) {} +// else { +// errors->push_back(new XMLAttributeNameError("Unknown " + this->classname() + " attribute ", attribute)); +// } +// } +// } diff --git a/xml_converter/src/category.hpp b/xml_converter/src/category.hpp index ad1ca16e..4a245f9a 100644 --- a/xml_converter/src/category.hpp +++ b/xml_converter/src/category.hpp @@ -7,13 +7,13 @@ #include "icon.hpp" #include "trail.hpp" -#include "bool.hpp" -#include "string.hpp" +#include "attribute/bool.hpp" +#include "attribute/string.hpp" using namespace std; class Category: public Parseable { - private: + public: bool default_visibility; string display_name; bool is_seperator; diff --git a/xml_converter/src/icon.hpp b/xml_converter/src/icon.hpp index fad8a0a9..71550de7 100644 --- a/xml_converter/src/icon.hpp +++ b/xml_converter/src/icon.hpp @@ -4,38 +4,38 @@ #include #include "parseable.hpp" -#include "bool.hpp" -#include "category.hpp" -#include "color.hpp" -#include "cull_chirality.hpp" -#include "euler_rotation.hpp" -#include "festival_filter.hpp" -#include "float.hpp" -#include "image.hpp" -#include "int.hpp" -#include "map_type_filter.hpp" -#include "mount_filter.hpp" -#include "position.hpp" -#include "profession_filter.hpp" -#include "reset_behavior.hpp" -#include "specialization_filter.hpp" -#include "species_filter.hpp" -#include "string.hpp" -#include "uniqueid.hpp" +#include "attribute/bool.hpp" +#include "attribute/color.hpp" +#include "attribute/cull_chirality.hpp" +#include "attribute/euler_rotation.hpp" +#include "attribute/festival_filter.hpp" +#include "attribute/float.hpp" +#include "attribute/image.hpp" +#include "attribute/int.hpp" +#include "attribute/map_type_filter.hpp" +#include "attribute/markercategory.hpp" +#include "attribute/mount_filter.hpp" +#include "attribute/position.hpp" +#include "attribute/profession_filter.hpp" +#include "attribute/reset_behavior.hpp" +#include "attribute/specialization_filter.hpp" +#include "attribute/species_filter.hpp" +#include "attribute/string.hpp" +#include "attribute/uniqueid.hpp" using namespace std; class Icon: public Parseable { - private: + public: int achievement_bitmask; int achievement_id; float alpha; - bool auto-trigger; + bool auto_trigger; float bounce_delay; float bounce_duration; float bounce_height; bool can_fade; - Category category; + MarkerCategory category; Color color; string copy_clipboard; string copy_message; @@ -44,10 +44,10 @@ class Icon: public Parseable { float distance_fade_start; EulerRotation euler_rotation; FestivalFilter festival_filter; - UniqueID guid; + UniqueId guid; bool has_countdown; float heightoffset; - Category hide_category; + MarkerCategory hide_category; Image icon; float icon_size; string info_message; @@ -68,10 +68,10 @@ class Icon: public Parseable { bool scale_on_map_with_zoom; string schedule; float schedule_duration; - Category show_category; + MarkerCategory show_category; SpecializationFilter specialization_filter; SpeciesFilter species_filter; - Category toggle_category; + MarkerCategory toggle_category; string tooltip_description; string tooltip_name; float trigger_range; diff --git a/xml_converter/src/trail.hpp b/xml_converter/src/trail.hpp index c0beba50..0c0b2428 100644 --- a/xml_converter/src/trail.hpp +++ b/xml_converter/src/trail.hpp @@ -14,40 +14,40 @@ #include #include "rapidxml-1.13/rapidxml_print.hpp" -#include "bool.hpp" -#include "category.hpp" -#include "color.hpp" -#include "cull_chirality.hpp" -#include "festival_filter.hpp" -#include "float.hpp" -#include "image.hpp" -#include "int.hpp" -#include "map_type_filter.hpp" -#include "mount_filter.hpp" -#include "profession_filter.hpp" -#include "specialization_filter.hpp" -#include "species_filter.hpp" -#include "string.hpp" -#include "traildata.hpp" -#include "traildatamapid.hpp" -#include "uniqueid.hpp" +#include "attribute/bool.hpp" +#include "attribute/color.hpp" +#include "attribute/cull_chirality.hpp" +#include "attribute/festival_filter.hpp" +#include "attribute/float.hpp" +#include "attribute/image.hpp" +#include "attribute/int.hpp" +#include "attribute/map_type_filter.hpp" +#include "attribute/markercategory.hpp" +#include "attribute/mount_filter.hpp" +#include "attribute/profession_filter.hpp" +#include "attribute/specialization_filter.hpp" +#include "attribute/species_filter.hpp" +#include "attribute/string.hpp" +#include "attribute/traildata.hpp" +#include "attribute/traildatamapid.hpp" +#include "attribute/uniqueid.hpp" using namespace std; class Trail: public Parseable { - private: + public: int achievement_bitmask; int achievement_id; float alpha; float animation_speed; bool can_fade; - Category category; + MarkerCategory category; Color color; CullChirality cull_chirality; float distance_fade_end; float distance_fade_start; FestivalFilter festival_filter; - UniqueID guid; + UniqueId guid; bool is_wall; int map_id; MapTypeFilter map_type_filter; From 99a2d69e522d26a706676e8150560c046084928a Mon Sep 17 00:00:00 2001 From: klingbolt Date: Thu, 4 Aug 2022 19:12:12 -0400 Subject: [PATCH 051/539] Updated naming convention for cpp_classes --- xml_converter/generators/code_generator.py | 22 ++++++++++++------- ...rseabletemplate.hpp => class_template.hpp} | 8 +++---- 2 files changed, 18 insertions(+), 12 deletions(-) rename xml_converter/generators/cpp_templates/{parseabletemplate.hpp => class_template.hpp} (84%) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 3a8e4246..728a5c63 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -284,20 +284,20 @@ def write_cpp_classes(self, output_directory: str) -> None: filename = os.path.basename(filepath) attribute_names[filepath]= filename.split(".md")[0] - pages = ["Category","Icon","Trail"] + cpp_classes = ["Category","Icon","Trail"] - for page in pages: + for cpp_class in cpp_classeses: metadata: Dict[str, Any] = {} for attribute_name in attribute_names: metadata[attribute_name] = self.data[attribute_name].metadata - attribute_variables, cpp_include_paths = self.generate_cpp_variable_data(metadata, page, attribute_names) + attribute_variables, cpp_include_paths = self.generate_cpp_variable_data(metadata, cpp_class, attribute_names) - with open(os.path.join(output_directory, page.lower() + ".hpp"), 'w') as f: + with open(os.path.join(output_directory, cpp_class.lower() + ".hpp"), 'w') as f: f.write(template.render( - page=page, + cpp_class=cpp_class, attribute_variables=sorted(attribute_variables), cpp_include_paths=sorted(cpp_include_paths), )) @@ -312,7 +312,7 @@ def write_cpp_classes(self, output_directory: str) -> None: def generate_cpp_variable_data( self, metadata: Dict[str, SchemaType], - page: str, + doc_type: str, attribute_names: Dict[str, str] = {} ) -> Tuple[List[Tuple[str, str]], Set[str]]: @@ -332,7 +332,7 @@ def generate_cpp_variable_data( if fieldkey in x : attribute_name = attribute_names[x] - if page in field['applies_to']: + if doc_type in field['applies_to']: if field['type'] in doc_type_to_cpp_type: cpp_type = doc_type_to_cpp_type[field['type']] cpp_include_paths.add(cpp_type) @@ -352,7 +352,13 @@ def generate_cpp_variable_data( attribute_variables.append((attribute_name, cpp_type)) return attribute_variables, cpp_include_paths - + + ############################################################################ + # write_webdocs + # + # Create all of the auto generated cpp classes that can be created from + # the documents. + ############################################################################ def write_webdocs(self, output_directory: str) -> None: print("Writing output documentation") os.makedirs(output_directory, exist_ok=True) diff --git a/xml_converter/generators/cpp_templates/parseabletemplate.hpp b/xml_converter/generators/cpp_templates/class_template.hpp similarity index 84% rename from xml_converter/generators/cpp_templates/parseabletemplate.hpp rename to xml_converter/generators/cpp_templates/class_template.hpp index cf2baadc..03465856 100644 --- a/xml_converter/generators/cpp_templates/parseabletemplate.hpp +++ b/xml_converter/generators/cpp_templates/class_template.hpp @@ -3,11 +3,11 @@ #include #include #include "parseable.hpp" -{%- if page == "Category": %} +{%- if cpp_class == "Category": %} #include #include "icon.hpp" #include "trail.hpp" -{%- elif page == "Trail": %} +{%- elif cpp_class == "Trail": %} #include #include #include @@ -25,13 +25,13 @@ using namespace std; -class {{page}}: public Parseable { +class {{cpp_class}: public Parseable { public: {%- for attribute_variable in attribute_variables: %} {{attribute_variable[1]}} {{attribute_variable[0]}}; {%- endfor %} - {%- if page == "Category": %} + {%- if cpp_class == "Category": %} map children; Icon default_icon; Trail default_trail; From 6b6f11b1e3e11b59b03b22213b9fdb38f27a9662 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Thu, 4 Aug 2022 20:53:57 -0400 Subject: [PATCH 052/539] Addressing issue #66 --- xml_converter/generators/code_generator.py | 2 +- xml_converter/src/parseable.cpp | 30 +-------- xml_converter/src/parseable.hpp | 77 +--------------------- 3 files changed, 5 insertions(+), 104 deletions(-) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 728a5c63..4ce92e0a 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -356,7 +356,7 @@ def generate_cpp_variable_data( ############################################################################ # write_webdocs # - # Create all of the auto generated cpp classes that can be created from + # Create all of the html pages that can be created from # the documents. ############################################################################ def write_webdocs(self, output_directory: str) -> None: diff --git a/xml_converter/src/parseable.cpp b/xml_converter/src/parseable.cpp index d1b874ab..d8560cf9 100644 --- a/xml_converter/src/parseable.cpp +++ b/xml_converter/src/parseable.cpp @@ -38,7 +38,7 @@ void Parseable::init_from_xml(rapidxml::xml_node<>* node, vector *err } } -bool Parseable::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors) { +virtual bool Parseable::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors) { const char* type_id = typeid(*this).name(); auto variable_list = &lookup[type_id]; @@ -52,30 +52,4 @@ bool Parseable::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector< iterator->second(this, attribute, errors); return true; -} - - -bool Parseable::setup_variable( - void (*function)(void*, rapidxml::xml_attribute<>*, vector*), - vector names -) { - const char* type_id = typeid(*this).name(); - auto iterator = original.find(type_id); - - if (iterator != original.end() && iterator->second != this->_id) { - return false; - } - original[type_id] = this->_id; - - // Grab a pointer to the lookup data for this subclass so we can edit it. - map*, vector*)>* variable_list = &lookup[type_id]; - - // Insert all of the names for this field, error on duplicates. - for (auto name : names) { - if (variable_list->count(name)) { - throw; - } - (*variable_list)[normalize_type_name(name)] = function; - } - return false; -} +} \ No newline at end of file diff --git a/xml_converter/src/parseable.hpp b/xml_converter/src/parseable.hpp index 42959907..3b9acf39 100644 --- a/xml_converter/src/parseable.hpp +++ b/xml_converter/src/parseable.hpp @@ -9,83 +9,10 @@ using namespace std; -//////////////////////////////////////////////////////////////////////////////// -// CLASS_PARSEABLE_VAR -// -// A macro to setup a new variable in a Parseable subclass that can be -// extracted from the attributes of an XML element. It takes in the class -// name, the name of a variable inside the class, the variable type, and a -// series of strings of names of XML attributes this field should be set from. -// -// It is suggested to #define a curried version of CLASS_PARSEABLE_VAR for each -// subclass. For Example the class SubParseable may define it as -// -// #define PARSEABLE_VAR(...) CLASS_PARSEABLE_VAR(SubParseable, __VA_ARGS__ ) -// -//////////////////////////////////////////////////////////////////////////////// -#define CLASS_PARSEABLE_VAR(parseableclassname, varname, vartype, ...) \ - vartype varname; \ - static void assign_##varname(void* obj, rapidxml::xml_attribute<>* input, vector *errors) { \ - (*(parseableclassname*)obj).varname = parse_##vartype(input, errors); \ - (*(parseableclassname*)obj).is_##varname##_set = true; \ - } \ - bool is_##varname##_set = setup_variable(assign_##varname, { __VA_ARGS__ }); - -//////////////////////////////////////////////////////////////////////////////// -// CLASS_PARSEABLE_SUBVAR -// -// Similar to CLASS_PARSEABLE_VAR but instead of creating a new variable that -// can be parsed it only creates an association between an existing variable's -// member variable and a series of strings of names of XML attributes the -// member variable should be set from. -// -// It is suggested to #define a curried version of CLASS_PARSEABLE_SUBVAR for -// each subclass. For Example the class SubParseable may define it as -// -// #define PARSEABLE_SUBVAR(...) CLASS_PARSEABLE_SUBVAR(SubParseable, __VA_ARGS__ ) -// -//////////////////////////////////////////////////////////////////////////////// -#define CLASS_PARSEABLE_SUBVAR(parseableclassname, varname, subvarname, vartype, subvartype, ...) \ - static void assign_##varname##_##subvarname(void* obj, rapidxml::xml_attribute<>* input, vector *errors) { \ - (*(parseableclassname*)obj).varname.subvarname = parse_##subvartype(input, errors); \ - (*(parseableclassname*)obj).is_##varname##_##subvarname##_set = true; \ - } \ - bool is_##varname##_##subvarname##_set = setup_variable(assign_##varname##_##subvarname, { __VA_ARGS__ }); - - -//////////////////////////////////////////////////////////////////////////////// -// Parseable -// -// Parseable is a parent class which allows subclasses that parse a given XML -// node, to be defined quickly without duplicating schema definitions across -// multiple locations or files. To use it define a subclass of Parseable and -// then use CLASS_PARSEABLE_VAR and CLASS_PARSEABLE_SUBVAR to define all the -// attributes that can be parsed out of the node. -// -// Parseable takes advantage of many quirks of C++ to achieve a system that is -// easy to maintain and is efficient to process. All of the variables defined -// get mapped to functions linked to the subclass on first execution. These -// maps are stored in a Parseable static variable and are re-used when a second -// instance of the same subclass is instantiated. -//////////////////////////////////////////////////////////////////////////////// class Parseable { private: - // A counter and ID used for identifying instances reliably. - static uint64_t _counter; - uint64_t _id = ++_counter; - - // A static map keeping track of the original instance id of each subclass. - static map original; - - // A static map keeping track of the function parser mappings for each subclass. - static map*, vector*)>> lookup; - + protected: - // The function responsible for registering each variable to the subclass. - bool setup_variable( - void (*function)(void*, rapidxml::xml_attribute<>*, vector*), - vector names); - // A stringy representation of a human readable classname. Used for errors. virtual string classname(); @@ -94,5 +21,5 @@ class Parseable { void init_from_xml(rapidxml::xml_node<>* node, vector *errors); // A default parser function to parse a single XML attribute into the class. - bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors); + virtual bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors); }; From f23cb24432c28355df423c397b33f9cb5cb1a06f Mon Sep 17 00:00:00 2001 From: klingbolt Date: Thu, 4 Aug 2022 21:19:05 -0400 Subject: [PATCH 053/539] Fixing error mentioned above --- xml_converter/generators/code_generator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 4ce92e0a..f614a02f 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -277,7 +277,7 @@ def write_cpp_classes(self, output_directory: str) -> None: print("Writing XML Node Cpp Classes") file_loader = FileSystemLoader('cpp_templates') env = Environment(loader=file_loader) - template = env.get_template("parseabletemplate.hpp") + template = env.get_template("class_template.hpp") attribute_names: Dict[str,str] = {} for filepath in self.data.keys(): From 2c37cf6d1cea2b71492811e56129d8ea30ad4c96 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Thu, 4 Aug 2022 21:23:38 -0400 Subject: [PATCH 054/539] Fixed remaining errors --- xml_converter/generators/code_generator.py | 2 +- xml_converter/generators/cpp_templates/class_template.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index f614a02f..51c13428 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -286,7 +286,7 @@ def write_cpp_classes(self, output_directory: str) -> None: cpp_classes = ["Category","Icon","Trail"] - for cpp_class in cpp_classeses: + for cpp_class in cpp_classes: metadata: Dict[str, Any] = {} for attribute_name in attribute_names: diff --git a/xml_converter/generators/cpp_templates/class_template.hpp b/xml_converter/generators/cpp_templates/class_template.hpp index 03465856..a0c85bee 100644 --- a/xml_converter/generators/cpp_templates/class_template.hpp +++ b/xml_converter/generators/cpp_templates/class_template.hpp @@ -25,7 +25,7 @@ using namespace std; -class {{cpp_class}: public Parseable { +class {{cpp_class}}: public Parseable { public: {%- for attribute_variable in attribute_variables: %} {{attribute_variable[1]}} {{attribute_variable[0]}}; From 1cf411618d84ee05b446fe7bf5e61193893ca94b Mon Sep 17 00:00:00 2001 From: klingbolt Date: Thu, 4 Aug 2022 22:36:07 -0400 Subject: [PATCH 055/539] Further Error fixes --- xml_converter/src/parseable.cpp | 21 ++------------------- xml_converter/src/parseable.hpp | 1 + 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/xml_converter/src/parseable.cpp b/xml_converter/src/parseable.cpp index d8560cf9..dfec830f 100644 --- a/xml_converter/src/parseable.cpp +++ b/xml_converter/src/parseable.cpp @@ -17,13 +17,6 @@ using namespace std; -// Initalize Static variables. -uint64_t Parseable::_counter = 0; -map Parseable::original; -map*, vector*)>> Parseable::lookup; - - - string Parseable::classname() { return "Parseable"; } @@ -38,18 +31,8 @@ void Parseable::init_from_xml(rapidxml::xml_node<>* node, vector *err } } -virtual bool Parseable::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors) { - const char* type_id = typeid(*this).name(); - auto variable_list = &lookup[type_id]; - +bool Parseable::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors) { + // I removed all of the offending variables. This whole section will be relooked at. string item = normalize_type_name(get_attribute_name(attribute)); - - auto iterator = variable_list->find(item); - - if (iterator == variable_list->end()) { - return false; - } - - iterator->second(this, attribute, errors); return true; } \ No newline at end of file diff --git a/xml_converter/src/parseable.hpp b/xml_converter/src/parseable.hpp index 3b9acf39..96c85d92 100644 --- a/xml_converter/src/parseable.hpp +++ b/xml_converter/src/parseable.hpp @@ -22,4 +22,5 @@ class Parseable { // A default parser function to parse a single XML attribute into the class. virtual bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors); + }; From ef7da6b48206a28f6f40b1ab62d68b64630e77a6 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 7 Aug 2022 20:05:15 -0400 Subject: [PATCH 056/539] Changes to code_generator to generate MultiFlagValue types Allows removal of Filter attribute --- xml_converter/generators/code_generator.py | 42 ++++- .../cpp_templates/attribute_template.hpp | 21 +++ .../src/attribute/festival_filter.cpp | 10 +- .../src/attribute/festival_filter.hpp | 28 ++-- xml_converter/src/attribute/filter.cpp | 69 -------- xml_converter/src/attribute/filter.hpp | 58 ------- .../src/attribute/map_type_filter.cpp | 12 +- .../src/attribute/map_type_filter.hpp | 111 ++++--------- xml_converter/src/attribute/mount_filter.cpp | 12 +- xml_converter/src/attribute/mount_filter.hpp | 37 ++--- .../src/attribute/profession_filter.cpp | 12 +- .../src/attribute/profession_filter.hpp | 32 ++-- .../src/attribute/specialization_filter.cpp | 12 +- .../src/attribute/specialization_filter.hpp | 157 +++++++++--------- .../src/attribute/species_filter.cpp | 12 +- .../src/attribute/species_filter.hpp | 24 ++- 16 files changed, 258 insertions(+), 391 deletions(-) create mode 100644 xml_converter/generators/cpp_templates/attribute_template.hpp delete mode 100644 xml_converter/src/attribute/filter.cpp delete mode 100644 xml_converter/src/attribute/filter.hpp diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 51c13428..4aca3d95 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -287,7 +287,7 @@ def write_cpp_classes(self, output_directory: str) -> None: cpp_classes = ["Category","Icon","Trail"] for cpp_class in cpp_classes: - metadata: Dict[str, Any] = {} + metadata: Dict[str, SchemaType] = {} for attribute_name in attribute_names: metadata[attribute_name] = self.data[attribute_name].metadata @@ -353,6 +353,45 @@ def generate_cpp_variable_data( return attribute_variables, cpp_include_paths + ############################################################################ + # write_attributes + # + # Creates the attribute files that contain multiple values + # + ############################################################################ + def write_attribute (self, output_directory: str) -> None: + print("Writing attributes") + os.makedirs(output_directory, exist_ok=True) + + file_loader = FileSystemLoader('cpp_templates') + env = Environment(loader=file_loader) + template = env.get_template("attribute_template.hpp") + categories: Dict[str,List[str]] = {} + attribute_names: Dict[str,str] = {} + metadata: Dict[str, SchemaType] = {} + + + for filepath in self.data.keys(): + filename = os.path.basename(filepath) + attribute_names[filepath]= filename.split(".md")[0] + + for filepath in attribute_names: + attribute_name = attribute_names[filepath] + metadata[filepath] = self.data[filepath].metadata + if metadata[filepath]['type'] in ["MultiflagValue"]: + # Testing Multiflag for now. Will add Compound and Enum(?) later + + attribute_variables = metadata[filepath]['flags'] + class_name = capitalize(attribute_name,delimiter="") + + with open(os.path.join(output_directory, attribute_name + ".hpp"), 'w') as f: + + f.write(template.render( + attribute_name=attribute_name, + attribute_variables=sorted(attribute_variables), + class_name=class_name, + )) + ############################################################################ # write_webdocs # @@ -598,5 +637,6 @@ def main() -> None: generator.write_webdocs("../web_docs/") generator.write_cpp_classes("../src/") + generator.write_attribute("../src/attribute") main() \ No newline at end of file diff --git a/xml_converter/generators/cpp_templates/attribute_template.hpp b/xml_converter/generators/cpp_templates/attribute_template.hpp new file mode 100644 index 00000000..31b91374 --- /dev/null +++ b/xml_converter/generators/cpp_templates/attribute_template.hpp @@ -0,0 +1,21 @@ +#pragma once + +#include +#include + +#include "../rapid_helpers.hpp" +#include "../rapidxml-1.13/rapidxml.hpp" +#include "../string_helper.hpp" + +using namespace std; + +class {{class_name}} { + public: + {%- for attribute_variable in attribute_variables: %} + bool {{attribute_variable}}; + {%- endfor %} + + virtual string classname() { return "{{class_name}}"; }; +}; + +{{class_name}} parse_{{class_name}}(rapidxml::xml_attribute<>* input, vector *errors); diff --git a/xml_converter/src/attribute/festival_filter.cpp b/xml_converter/src/attribute/festival_filter.cpp index ee12fdf1..5df8496b 100644 --- a/xml_converter/src/attribute/festival_filter.cpp +++ b/xml_converter/src/attribute/festival_filter.cpp @@ -7,9 +7,9 @@ #include "../string_helper.hpp" using namespace std; +// Functionality will change for parsing +// FestivalFilter parse_FestivalFilter(rapidxml::xml_attribute<>* input, vector *errors) { +// FestivalFilter festival_filter; +// festival_filter.parse(input, errors); +// return festival_filter; -FestivalFilter parse_FestivalFilter(rapidxml::xml_attribute<>* input, vector *errors) { - FestivalFilter festival_filter; - festival_filter.parse(input, errors); - return festival_filter; -} diff --git a/xml_converter/src/attribute/festival_filter.hpp b/xml_converter/src/attribute/festival_filter.hpp index cea7a464..aa8db367 100644 --- a/xml_converter/src/attribute/festival_filter.hpp +++ b/xml_converter/src/attribute/festival_filter.hpp @@ -1,31 +1,25 @@ #pragma once -#include #include #include #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" -#include "filter.hpp" using namespace std; -#define FILTER_ITEM(...) CLASS_FILTER_ITEM(FestivalFilter, __VA_ARGS__ ) - -class FestivalFilter: public Filter { +class FestivalFilter { public: - FILTER_ITEM(dragonbash, "dragonbash") - FILTER_ITEM(festival_of_the_four_winds, "festivalofthefourwinds") - FILTER_ITEM(halloween, "halloween") - FILTER_ITEM(lunar_new_year, "lunarnewyear") - FILTER_ITEM(super_adventure_festival, "superadventurefestival") - FILTER_ITEM(wintersday, "wintersday") - FILTER_ITEM(none, "none") - - virtual string classname() { return "FestivalFilter"; } + bool dragonbash; + bool festival_of_the_four_winds; + bool halloween; + bool lunar_new_year; + bool none; + bool super_adventure_festival; + bool wintersday; + + virtual string classname() { return "FestivalFilter"; }; }; -#undef FILTER_ITEM - -FestivalFilter parse_FestivalFilter(rapidxml::xml_attribute<>* input, vector *errors); +FestivalFilter parse_FestivalFilter(rapidxml::xml_attribute<>* input, vector *errors); \ No newline at end of file diff --git a/xml_converter/src/attribute/filter.cpp b/xml_converter/src/attribute/filter.cpp deleted file mode 100644 index f4dfe008..00000000 --- a/xml_converter/src/attribute/filter.cpp +++ /dev/null @@ -1,69 +0,0 @@ -#include "filter.hpp" - -#include -#include -#include -#include - -#include "../rapidxml-1.13/rapidxml.hpp" -#include "../string_helper.hpp" - -using namespace std; - -uint64_t Filter::_counter = 0; -map Filter::original; -map> Filter::lookup; - -bool Filter::setup_variable(void (*function)(void* filter_object), vector names) { - const char* type_id = typeid(*this).name(); - auto iterator = original.find(type_id); - - // If this instance is not the first instance of the subclass this - // execution then exit early to avoid rebuilding the lookup map. - if (iterator != original.end() && iterator->second != this->_id) { - return false; - } - - // Set this instance's id as the id of the first instance of this subclass - // to prevent any other instances from rebuilding the lookup map. - original[type_id] = this->_id; - - // Grab a pointer to the lookup data for this subclass so we can edit it. - map* variable_list = &lookup[type_id]; - - // Insert all of the names for this field, error on duplicates. - for (auto name : names) { - if (variable_list->count(name)) { - throw; - } - (*variable_list)[name] = function; - } - return false; -} - - -//////////////////////////////////////////////////////////////////////////////// -// Filter::parse -// -// Runs through all of the items that are defined with FILTER_ITEM() to be used -// as valid elemetns of this filter, and parses them out into their individual -// boolean values. This function should be called by the respective subclass -// parse functions to handle the extraction automatically. -//////////////////////////////////////////////////////////////////////////////// -void Filter::parse(rapidxml::xml_attribute<>* input, vector *errors) { - vector items = split(get_attribute_value(input), ","); - - const char* type_id = typeid(*this).name(); - auto variable_list = &lookup[type_id]; - - for (string item : items) { - auto iterator = variable_list->find(item); - - if (iterator == variable_list->end()) { - errors->push_back(new XMLAttributeValueError("Unknown " + this->classname() + " option " + item, input)); - continue; - } - - iterator->second(this); - } -} diff --git a/xml_converter/src/attribute/filter.hpp b/xml_converter/src/attribute/filter.hpp deleted file mode 100644 index 893c0199..00000000 --- a/xml_converter/src/attribute/filter.hpp +++ /dev/null @@ -1,58 +0,0 @@ -#pragma once - -#include -#include -#include -#include - -#include "../rapid_helpers.hpp" -#include "../rapidxml-1.13/rapidxml.hpp" -#include "../string_helper.hpp" - -using namespace std; - -//////////////////////////////////////////////////////////////////////////////// -// CLASS_FILTER_ITEM -// -// The CLASS_FILTER_ITEM macro takes the name of a class, the name of a -// variable inside that class, and a series of strings that should cause that -// variable to be set. It uses setup_variable to construct a list of all the -// flags that can be set for a given Filter subclass at runtime. It has no -// references to the object itself so that it can be instance agnostic and -// re-used when subsequent classes are initialized. -// -// It is suggested to #define a curried version of CLASS_FILTER_ITEM for each -// subclass. For example the class SubFilter may define it as: -// -// #define FILTER_ITEM(...) CLASS_FILTER_ITEM(SubFilter, __VA_ARGS__ ) -// -//////////////////////////////////////////////////////////////////////////////// -#define CLASS_FILTER_ITEM(filtername, name, ...) \ - static void enable_##name(void* obj) { \ - (*(filtername*)obj).name = true; \ - } \ - bool name = setup_variable(enable_##name, { __VA_ARGS__ }); - -//////////////////////////////////////////////////////////////////////////////// -// Filter -// -// Filter is meant to be a base class for various attributes where one or more -// options can be selected. Typically these function as filters for whatever -// element they are associated with. For example a marker or path may be hidden -// or shown base on what class a user it when the path is relevant to only -// one class. -//////////////////////////////////////////////////////////////////////////////// -class Filter { - static uint64_t _counter; - uint64_t _id = ++_counter; - - static map original; - static map> lookup; - - public: - bool setup_variable(void (*function)(void* filter_object), vector names); - - void parse(rapidxml::xml_attribute<>* input, vector *errors); - virtual string classname() { return "Filter"; } -}; - diff --git a/xml_converter/src/attribute/map_type_filter.cpp b/xml_converter/src/attribute/map_type_filter.cpp index a2911b51..1fa184c0 100644 --- a/xml_converter/src/attribute/map_type_filter.cpp +++ b/xml_converter/src/attribute/map_type_filter.cpp @@ -1,9 +1,9 @@ #include "map_type_filter.hpp" using namespace std; - -MapTypeFilter parse_MapTypeFilter(rapidxml::xml_attribute<>* input, vector *errors) { - MapTypeFilter filter; - filter.parse(input, errors); - return filter; -} +// // Functionality will change for parsing +// MapTypeFilter parse_MapTypeFilter(rapidxml::xml_attribute<>* input, vector *errors) { +// MapTypeFilter filter; +// filter.parse(input, errors); +// return filter; +// } diff --git a/xml_converter/src/attribute/map_type_filter.hpp b/xml_converter/src/attribute/map_type_filter.hpp index 0fae664b..0816818d 100644 --- a/xml_converter/src/attribute/map_type_filter.hpp +++ b/xml_converter/src/attribute/map_type_filter.hpp @@ -3,91 +3,40 @@ #include #include +#include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" -#include "filter.hpp" +#include "../string_helper.hpp" using namespace std; -#define FILTER_ITEM(...) CLASS_FILTER_ITEM(MapTypeFilter, __VA_ARGS__ ) - - -class MapTypeFilter: public Filter { +class MapTypeFilter { public: - // An unknown map type. Used as fallback. - FILTER_ITEM(unknown_map, "unknown") - - // Redirect map type, e.g. when logging in while in a PvP match. - FILTER_ITEM(redirect_map, "redirect") - - // Character create map type. - FILTER_ITEM(character_create_map, "charactercreate") - - // PvP map type. - FILTER_ITEM(pvp_map, "pvp") - - // GvG map type. Unused. - FILTER_ITEM(gvg_map, "gvg") - - // Instance map type, e.g. dungeons and story content. - FILTER_ITEM(instance_map, "instance") - - // Public map type, e.g. open world. - FILTER_ITEM(public_map, "public") - - // Tournament map type. Probably unused. - FILTER_ITEM(tournament_map, "tournament") - - // Tutorial map type. - FILTER_ITEM(tutorial_map, "tutorial") - - // User tournament map type. Probably unused. - FILTER_ITEM(user_tournament_map, "usertournament") - - // Eternal Battlegrounds (WvW) map type. - FILTER_ITEM(center_map, "center") - - // Eternal Battlegrounds (WvW) map type. - FILTER_ITEM(eternal_battlegrounds_map, "eternalbattlegrounds") - - // Blue Borderlands (WvW) map type. - FILTER_ITEM(bluehome_map, "bluehome") - - // Blue Borderlands (WvW) map type. - FILTER_ITEM(blue_borderlands_map, "blueborderlands") - - // Green Borderlands (WvW) map type. - FILTER_ITEM(green_home_map, "greenhome") - - // Green Borderlands (WvW) map type. - FILTER_ITEM(green_borderlands_map, "greenborderlands") - - // Red Borderlands (WvW) map type. - FILTER_ITEM(red_home_map, "redhome") - - // Red Borderlands (WvW) map type. - FILTER_ITEM(red_borderlands_map, "redborderlands") - - // Fortune's Vale. Unused. - FILTER_ITEM(fortunes_vale_map, "fortunesvale") - - // Obsidian Sanctum (WvW) map type. - FILTER_ITEM(jump_puzzle_map, "jumppuzzle") - - // Obsidian Sanctum (WvW) map type. - FILTER_ITEM(obsidian_sanctum_map, "obsidiansanctum") - - // Edge of the Mists (WvW) map type. - FILTER_ITEM(edge_of_the_mists_map, "edgeofthemists") - - // Mini public map type, e.g. Dry Top, the Silverwastes and Mistlock Sanctuary. - FILTER_ITEM(public_mini_map, "publicmini") - - // WvW lounge map type, e.g. Armistice Bastion. - FILTER_ITEM(wvw_lounge_map, "wvwlounge") - - virtual string classname() { return "MapTypeFilter"; } + bool blue_borderlands_map; + bool bluehome_map; + bool center_map; + bool character_create_map; + bool edge_of_the_mists_map; + bool eternal_battlegrounds_map; + bool fortunes_vale_map; + bool green_borderlands_map; + bool green_home_map; + bool gvg_map; + bool instance_map; + bool jump_puzzle_map; + bool obsidian_sanctum_map; + bool public_map; + bool public_mini_map; + bool pvp_map; + bool red_borderlands_map; + bool red_home_map; + bool redirect_map; + bool tournament_map; + bool tutorial_map; + bool unknown_map; + bool user_tournament_map; + bool wvw_lounge_map; + + virtual string classname() { return "MapTypeFilter"; }; }; -#undef FILTER_ITEM - -MapTypeFilter parse_MapTypeFilter(rapidxml::xml_attribute<>* input, vector *errors); +MapTypeFilter parse_MapTypeFilter(rapidxml::xml_attribute<>* input, vector *errors); \ No newline at end of file diff --git a/xml_converter/src/attribute/mount_filter.cpp b/xml_converter/src/attribute/mount_filter.cpp index 66ed5962..75cd06b7 100644 --- a/xml_converter/src/attribute/mount_filter.cpp +++ b/xml_converter/src/attribute/mount_filter.cpp @@ -1,9 +1,9 @@ #include "mount_filter.hpp" using namespace std; - -MountFilter parse_MountFilter(rapidxml::xml_attribute<>* input, vector *errors) { - MountFilter filter; - filter.parse(input, errors); - return filter; -} +// // Functionality will change for parsing +// MountFilter parse_MountFilter(rapidxml::xml_attribute<>* input, vector *errors) { +// MountFilter filter; +// filter.parse(input, errors); +// return filter; +// } diff --git a/xml_converter/src/attribute/mount_filter.hpp b/xml_converter/src/attribute/mount_filter.hpp index 91693692..01f67e9f 100644 --- a/xml_converter/src/attribute/mount_filter.hpp +++ b/xml_converter/src/attribute/mount_filter.hpp @@ -3,31 +3,26 @@ #include #include +#include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" -#include "filter.hpp" +#include "../string_helper.hpp" using namespace std; -#define FILTER_ITEM(...) CLASS_FILTER_ITEM(MountFilter, __VA_ARGS__ ) - - -class MountFilter: public Filter { +class MountFilter { public: - FILTER_ITEM(jackal, "jackal") - FILTER_ITEM(griffon, "griffon") - FILTER_ITEM(springer, "springer") - FILTER_ITEM(skimmer, "skimmer") - FILTER_ITEM(raptor, "raptor") - FILTER_ITEM(rollerbeetle, "rollerbeetle") - FILTER_ITEM(warclaw, "warclaw") - FILTER_ITEM(skyscale, "skyscale") - FILTER_ITEM(skiff, "skiff") - FILTER_ITEM(seige_turtle, "seigeturtle") - - - virtual string classname() { return "MountFilter"; } + bool griffon; + bool jackal; + bool raptor; + bool roller_beetle; + bool seige_turtle; + bool skiff; + bool skimmer; + bool skyscale; + bool springer; + bool warclaw; + + virtual string classname() { return "MountFilter"; }; }; -#undef FILTER_ITEM - -MountFilter parse_MountFilter(rapidxml::xml_attribute<>* input, vector *errors); +MountFilter parse_MountFilter(rapidxml::xml_attribute<>* input, vector *errors); \ No newline at end of file diff --git a/xml_converter/src/attribute/profession_filter.cpp b/xml_converter/src/attribute/profession_filter.cpp index dd8f0c04..f1b523a4 100644 --- a/xml_converter/src/attribute/profession_filter.cpp +++ b/xml_converter/src/attribute/profession_filter.cpp @@ -8,9 +8,9 @@ #include "../string_helper.hpp" using namespace std; - -ProfessionFilter parse_ProfessionFilter(rapidxml::xml_attribute<>* input, vector *errors) { - ProfessionFilter profession_filter; - profession_filter.parse(input, errors); - return profession_filter; -} +// // Functionality will change for parsing +// ProfessionFilter parse_ProfessionFilter(rapidxml::xml_attribute<>* input, vector *errors) { +// ProfessionFilter profession_filter; +// profession_filter.parse(input, errors); +// return profession_filter; +// } diff --git a/xml_converter/src/attribute/profession_filter.hpp b/xml_converter/src/attribute/profession_filter.hpp index d5dab8ab..eb642c89 100644 --- a/xml_converter/src/attribute/profession_filter.hpp +++ b/xml_converter/src/attribute/profession_filter.hpp @@ -5,27 +5,23 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" -#include "filter.hpp" +#include "../string_helper.hpp" using namespace std; -#define FILTER_ITEM(...) CLASS_FILTER_ITEM(ProfessionFilter, __VA_ARGS__ ) - -class ProfessionFilter: public Filter { +class ProfessionFilter { public: - FILTER_ITEM(elementalist, "elementalist") - FILTER_ITEM(engineer, "engineer") - FILTER_ITEM(guardian, "guardian") - FILTER_ITEM(mesmer, "mesmer") - FILTER_ITEM(necromancer, "necromancer") - FILTER_ITEM(ranger, "ranger") - FILTER_ITEM(revenant, "revenant") - FILTER_ITEM(thief, "thief") - FILTER_ITEM(warrior, "warrior") - - virtual string classname() { return "ProfessionFilter"; } + bool elementalist; + bool engineer; + bool guardian; + bool mesmer; + bool necromancer; + bool ranger; + bool revenant; + bool thief; + bool warrior; + + virtual string classname() { return "ProfessionFilter"; }; }; -#undef FILTER_ITEM - -ProfessionFilter parse_ProfessionFilter(rapidxml::xml_attribute<>* input, vector *errors); +ProfessionFilter parse_ProfessionFilter(rapidxml::xml_attribute<>* input, vector *errors); \ No newline at end of file diff --git a/xml_converter/src/attribute/specialization_filter.cpp b/xml_converter/src/attribute/specialization_filter.cpp index fe57bd0f..f4ad66b6 100644 --- a/xml_converter/src/attribute/specialization_filter.cpp +++ b/xml_converter/src/attribute/specialization_filter.cpp @@ -1,7 +1,7 @@ #include "specialization_filter.hpp" - -SpecializationFilter parse_SpecializationFilter(rapidxml::xml_attribute<>* input, vector *errors) { - SpecializationFilter specialization_filter; - specialization_filter.parse(input, errors); - return specialization_filter; -} +// Functionality will change for parsing +// SpecializationFilter parse_SpecializationFilter(rapidxml::xml_attribute<>* input, vector *errors) { +// SpecializationFilter specialization_filter; +// specialization_filter.parse(input, errors); +// return specialization_filter; +// } diff --git a/xml_converter/src/attribute/specialization_filter.hpp b/xml_converter/src/attribute/specialization_filter.hpp index 91cac8ab..efca48a7 100644 --- a/xml_converter/src/attribute/specialization_filter.hpp +++ b/xml_converter/src/attribute/specialization_filter.hpp @@ -3,85 +3,88 @@ #include #include -#include "filter.hpp" +#include "../rapid_helpers.hpp" +#include "../rapidxml-1.13/rapidxml.hpp" +#include "../string_helper.hpp" -#define FILTER_ITEM(...) CLASS_FILTER_ITEM(SpecializationFilter, __VA_ARGS__ ) +using namespace std; -class SpecializationFilter: public Filter { - // Heart of Thorns Spec - FILTER_ITEM(ranger_druid, "5") - FILTER_ITEM(thief_daredevil, "7") - FILTER_ITEM(warrior_berserker, "18") - FILTER_ITEM(guardian_dragonhunter, "27") - FILTER_ITEM(necromancer_reaper, "34") - FILTER_ITEM(mesmer_chronomancer, "40") - FILTER_ITEM(engineer_scrapper, "43") - FILTER_ITEM(elementalist_tempest, "48") - FILTER_ITEM(revenant_herald, "52") +class SpecializationFilter { + public: + bool elementalist_air; + bool elementalist_arcane; + bool elementalist_catalyst; + bool elementalist_earth; + bool elementalist_fire; + bool elementalist_tempest; + bool elementalist_water; + bool elementalist_weaver; + bool engineer_alchemy; + bool engineer_explosives; + bool engineer_firearms; + bool engineer_holosmith; + bool engineer_inventions; + bool engineer_mechanist; + bool engineer_scrapper; + bool engineer_tools; + bool guardian_dragonhunter; + bool guardian_firebrand; + bool guardian_honor; + bool guardian_radiance; + bool guardian_valor; + bool guardian_virtues; + bool guardian_willbender; + bool guardian_zeal; + bool mesmer_chaos; + bool mesmer_chronomancer; + bool mesmer_domination; + bool mesmer_dueling; + bool mesmer_illusions; + bool mesmer_inspiration; + bool mesmer_mirage; + bool mesmer_virtuoso; + bool necromancer_blood_magic; + bool necromancer_curses; + bool necromancer_death_magic; + bool necromancer_harbinger; + bool necromancer_reaper; + bool necromancer_scourge; + bool necromancer_soul_reaping; + bool necromancer_spite; + bool ranger_beastmastery; + bool ranger_druid; + bool ranger_marksmanship; + bool ranger_nature_magic; + bool ranger_skirmishing; + bool ranger_soulbeast; + bool ranger_untamed; + bool ranger_wilderness_survival; + bool revenant_corruption; + bool revenant_devastation; + bool revenant_herald; + bool revenant_invocation; + bool revenant_renegade; + bool revenant_retribution; + bool revenant_salvation; + bool revenant_vindicator; + bool thief_acrobatics; + bool thief_critical_strikes; + bool thief_daredevil; + bool thief_deadeye; + bool thief_deadly_arts; + bool thief_shadow_arts; + bool thief_specter; + bool thief_trickery; + bool warrior_arms; + bool warrior_berserker; + bool warrior_bladesworn; + bool warrior_defense; + bool warrior_discipline; + bool warrior_spellbreaker; + bool warrior_strength; + bool warrior_tactics; - // Path of Fire Spec - FILTER_ITEM(ranger_soulbeast, "55") - FILTER_ITEM(elementalist_weaver, "56") - FILTER_ITEM(engineer_holosmith, "57") - FILTER_ITEM(thief_deadeye, "58") - FILTER_ITEM(mesmer_mirage, "59") - FILTER_ITEM(necromancer_scourge, "60") - FILTER_ITEM(warrior_spellbreaker, "61") - FILTER_ITEM(guardian_firebrand, "62") - FILTER_ITEM(revenant_renegade, "63") - - // TODO(#58): End of Dragons Spec - - // Core Spec - FILTER_ITEM(mesmer_dueling, "1") - FILTER_ITEM(necromancer_death_magic, "2") - FILTER_ITEM(revenant_invocation, "3") - FILTER_ITEM(warrior_strength, "4") - FILTER_ITEM(engineer_explosives, "6") - FILTER_ITEM(ranger_marksmanship, "8") - FILTER_ITEM(revenant_retribution, "9") - FILTER_ITEM(mesmer_domination, "10") - FILTER_ITEM(warrior_tactics, "11") - FILTER_ITEM(revenant_salvation, "12") - FILTER_ITEM(guardian_valor, "13") - FILTER_ITEM(revenant_corruption, "14") - FILTER_ITEM(revenant_devastation, "15") - FILTER_ITEM(guardian_radiance, "16") - FILTER_ITEM(elementalist_water, "17") - FILTER_ITEM(necromancer_blood_magic, "19") - FILTER_ITEM(thief_shadow_arts, "20") - FILTER_ITEM(engineer_tools, "21") - FILTER_ITEM(warrior_defense, "22") - FILTER_ITEM(mesmer_inspiration, "23") - FILTER_ITEM(mesmer_illusions, "24") - FILTER_ITEM(ranger_nature_magic, "25") - FILTER_ITEM(elementalist_earth, "26") - FILTER_ITEM(thief_deadly_arts, "28") - FILTER_ITEM(engineer_alchemy, "29") - FILTER_ITEM(ranger_skirmishing, "30") - FILTER_ITEM(elementalist_fire, "31") - FILTER_ITEM(ranger_beastmastery, "32") - FILTER_ITEM(ranger_wilderness_survival, "33") - FILTER_ITEM(thief_critical_strikes, "35") - FILTER_ITEM(warrior_arms, "36") - FILTER_ITEM(elementalist_arcane, "37") - FILTER_ITEM(engineer_firearms, "38") - FILTER_ITEM(necromancer_curses, "39") - FILTER_ITEM(elementalist_air, "41") - FILTER_ITEM(guardian_zeal, "42") - FILTER_ITEM(thief_trickery, "44") - FILTER_ITEM(mesmer_chaos, "45") - FILTER_ITEM(guardian_virtues, "46") - FILTER_ITEM(engineer_inventions, "47") - FILTER_ITEM(guardian_honor, "49") - FILTER_ITEM(necromancer_soul_reaping, "50") - FILTER_ITEM(warrior_discipline, "51") - FILTER_ITEM(necromancer_spite, "53") - FILTER_ITEM(thief_acrobatics, "54") - - virtual string classname() { return "SpecializationFilter"; } + virtual string classname() { return "SpecializationFilter"; }; }; -#undef FILTER_ITEM - -SpecializationFilter parse_SpecializationFilter(rapidxml::xml_attribute<>* input, vector *errors); +SpecializationFilter parse_SpecializationFilter(rapidxml::xml_attribute<>* input, vector *errors); \ No newline at end of file diff --git a/xml_converter/src/attribute/species_filter.cpp b/xml_converter/src/attribute/species_filter.cpp index 7ed07aaf..d7c75622 100644 --- a/xml_converter/src/attribute/species_filter.cpp +++ b/xml_converter/src/attribute/species_filter.cpp @@ -1,9 +1,9 @@ #include "species_filter.hpp" using namespace std; - -SpeciesFilter parse_RaceFilter(rapidxml::xml_attribute<>* input, vector *errors) { - SpeciesFilter filter; - filter.parse(input, errors); - return filter; -} +// Functionality will change for parsing +// SpeciesFilter parse_RaceFilter(rapidxml::xml_attribute<>* input, vector *errors) { +// SpeciesFilter filter; +// filter.parse(input, errors); +// return filter; +// } diff --git a/xml_converter/src/attribute/species_filter.hpp b/xml_converter/src/attribute/species_filter.hpp index fa45a86b..b550785d 100644 --- a/xml_converter/src/attribute/species_filter.hpp +++ b/xml_converter/src/attribute/species_filter.hpp @@ -3,25 +3,21 @@ #include #include +#include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" -#include "filter.hpp" +#include "../string_helper.hpp" using namespace std; -#define FILTER_ITEM(...) CLASS_FILTER_ITEM(SpeciesFilter, __VA_ARGS__ ) - -class SpeciesFilter: public Filter { +class SpeciesFilter { public: - FILTER_ITEM(asura, "asura") - FILTER_ITEM(charr, "charr") - FILTER_ITEM(human, "human") - FILTER_ITEM(norn, "norn") - FILTER_ITEM(sylvari, "sylvari") + bool asura; + bool charr; + bool human; + bool norn; + bool sylvari; - virtual string classname() { return "SpeciesFilter"; } + virtual string classname() { return "SpeciesFilter"; }; }; - -SpeciesFilter parse_SpeciesFilter(rapidxml::xml_attribute<>* input, vector *errors); - -#undef FILTER_ITEM +SpeciesFilter parse_SpeciesFilter(rapidxml::xml_attribute<>* input, vector *errors); \ No newline at end of file From 9d9be0821ebd71895584f302b0a5ad5e419370cc Mon Sep 17 00:00:00 2001 From: klingbolt Date: Tue, 9 Aug 2022 20:27:32 -0400 Subject: [PATCH 057/539] Addressing comments in code review Mostly deletion of unnessecary comments --- xml_converter/generators/code_generator.py | 7 ++----- .../generators/cpp_templates/attribute_template.hpp | 2 +- xml_converter/src/attribute/festival_filter.cpp | 8 +------- xml_converter/src/attribute/map_type_filter.cpp | 8 +------- xml_converter/src/attribute/mount_filter.cpp | 8 +------- xml_converter/src/attribute/profession_filter.cpp | 8 +------- xml_converter/src/attribute/specialization_filter.cpp | 8 +------- xml_converter/src/attribute/species_filter.cpp | 8 +------- 8 files changed, 9 insertions(+), 48 deletions(-) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 4aca3d95..f5b96a74 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -356,8 +356,7 @@ def generate_cpp_variable_data( ############################################################################ # write_attributes # - # Creates the attribute files that contain multiple values - # + # Creates the attribute files for attributes that contain multiple values ############################################################################ def write_attribute (self, output_directory: str) -> None: print("Writing attributes") @@ -378,9 +377,7 @@ def write_attribute (self, output_directory: str) -> None: for filepath in attribute_names: attribute_name = attribute_names[filepath] metadata[filepath] = self.data[filepath].metadata - if metadata[filepath]['type'] in ["MultiflagValue"]: - # Testing Multiflag for now. Will add Compound and Enum(?) later - + if metadata[filepath]['type'] == ["MultiflagValue"]: attribute_variables = metadata[filepath]['flags'] class_name = capitalize(attribute_name,delimiter="") diff --git a/xml_converter/generators/cpp_templates/attribute_template.hpp b/xml_converter/generators/cpp_templates/attribute_template.hpp index 31b91374..35ee5e0b 100644 --- a/xml_converter/generators/cpp_templates/attribute_template.hpp +++ b/xml_converter/generators/cpp_templates/attribute_template.hpp @@ -11,7 +11,7 @@ using namespace std; class {{class_name}} { public: - {%- for attribute_variable in attribute_variables: %} + {%- for attribute_variable in attribute_variables: %} bool {{attribute_variable}}; {%- endfor %} diff --git a/xml_converter/src/attribute/festival_filter.cpp b/xml_converter/src/attribute/festival_filter.cpp index 5df8496b..21d84f31 100644 --- a/xml_converter/src/attribute/festival_filter.cpp +++ b/xml_converter/src/attribute/festival_filter.cpp @@ -6,10 +6,4 @@ #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" -using namespace std; -// Functionality will change for parsing -// FestivalFilter parse_FestivalFilter(rapidxml::xml_attribute<>* input, vector *errors) { -// FestivalFilter festival_filter; -// festival_filter.parse(input, errors); -// return festival_filter; - +using namespace std; \ No newline at end of file diff --git a/xml_converter/src/attribute/map_type_filter.cpp b/xml_converter/src/attribute/map_type_filter.cpp index 1fa184c0..be687606 100644 --- a/xml_converter/src/attribute/map_type_filter.cpp +++ b/xml_converter/src/attribute/map_type_filter.cpp @@ -1,9 +1,3 @@ #include "map_type_filter.hpp" -using namespace std; -// // Functionality will change for parsing -// MapTypeFilter parse_MapTypeFilter(rapidxml::xml_attribute<>* input, vector *errors) { -// MapTypeFilter filter; -// filter.parse(input, errors); -// return filter; -// } +using namespace std; \ No newline at end of file diff --git a/xml_converter/src/attribute/mount_filter.cpp b/xml_converter/src/attribute/mount_filter.cpp index 75cd06b7..2efd1e95 100644 --- a/xml_converter/src/attribute/mount_filter.cpp +++ b/xml_converter/src/attribute/mount_filter.cpp @@ -1,9 +1,3 @@ #include "mount_filter.hpp" -using namespace std; -// // Functionality will change for parsing -// MountFilter parse_MountFilter(rapidxml::xml_attribute<>* input, vector *errors) { -// MountFilter filter; -// filter.parse(input, errors); -// return filter; -// } +using namespace std; \ No newline at end of file diff --git a/xml_converter/src/attribute/profession_filter.cpp b/xml_converter/src/attribute/profession_filter.cpp index f1b523a4..d3ded80e 100644 --- a/xml_converter/src/attribute/profession_filter.cpp +++ b/xml_converter/src/attribute/profession_filter.cpp @@ -7,10 +7,4 @@ #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" -using namespace std; -// // Functionality will change for parsing -// ProfessionFilter parse_ProfessionFilter(rapidxml::xml_attribute<>* input, vector *errors) { -// ProfessionFilter profession_filter; -// profession_filter.parse(input, errors); -// return profession_filter; -// } +using namespace std; \ No newline at end of file diff --git a/xml_converter/src/attribute/specialization_filter.cpp b/xml_converter/src/attribute/specialization_filter.cpp index f4ad66b6..9b505acc 100644 --- a/xml_converter/src/attribute/specialization_filter.cpp +++ b/xml_converter/src/attribute/specialization_filter.cpp @@ -1,7 +1 @@ -#include "specialization_filter.hpp" -// Functionality will change for parsing -// SpecializationFilter parse_SpecializationFilter(rapidxml::xml_attribute<>* input, vector *errors) { -// SpecializationFilter specialization_filter; -// specialization_filter.parse(input, errors); -// return specialization_filter; -// } +#include "specialization_filter.hpp" \ No newline at end of file diff --git a/xml_converter/src/attribute/species_filter.cpp b/xml_converter/src/attribute/species_filter.cpp index d7c75622..7c74a4b5 100644 --- a/xml_converter/src/attribute/species_filter.cpp +++ b/xml_converter/src/attribute/species_filter.cpp @@ -1,9 +1,3 @@ #include "species_filter.hpp" -using namespace std; -// Functionality will change for parsing -// SpeciesFilter parse_RaceFilter(rapidxml::xml_attribute<>* input, vector *errors) { -// SpeciesFilter filter; -// filter.parse(input, errors); -// return filter; -// } +using namespace std; \ No newline at end of file From 050eb88c44b2a4bb2ced58a0e2455d42ddaaef2f Mon Sep 17 00:00:00 2001 From: klingbolt Date: Tue, 9 Aug 2022 23:36:36 -0400 Subject: [PATCH 058/539] Code Generator now makes attribute files for CompoundValues and Enum --- xml_converter/generators/code_generator.py | 40 ++++- .../cpp_templates/attribute_template.hpp | 8 +- .../src/attribute/cull_chirality.cpp | 6 - .../src/attribute/cull_chirality.hpp | 8 +- .../src/attribute/euler_rotation.cpp | 17 -- .../src/attribute/euler_rotation.hpp | 11 +- .../src/attribute/festival_filter.hpp | 16 +- .../src/attribute/map_type_filter.hpp | 50 +++--- xml_converter/src/attribute/mount_filter.hpp | 22 +-- xml_converter/src/attribute/position.cpp | 19 +-- xml_converter/src/attribute/position.hpp | 12 +- .../src/attribute/profession_filter.hpp | 20 +-- .../src/attribute/reset_behavior.hpp | 8 +- .../src/attribute/specialization_filter.hpp | 146 +++++++++--------- .../src/attribute/species_filter.hpp | 12 +- 15 files changed, 198 insertions(+), 197 deletions(-) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index f5b96a74..6159eacf 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -295,7 +295,7 @@ def write_cpp_classes(self, output_directory: str) -> None: attribute_variables, cpp_include_paths = self.generate_cpp_variable_data(metadata, cpp_class, attribute_names) with open(os.path.join(output_directory, cpp_class.lower() + ".hpp"), 'w') as f: - + f.write(template.render( cpp_class=cpp_class, attribute_variables=sorted(attribute_variables), @@ -368,7 +368,14 @@ def write_attribute (self, output_directory: str) -> None: categories: Dict[str,List[str]] = {} attribute_names: Dict[str,str] = {} metadata: Dict[str, SchemaType] = {} - + attribute_variables: Tuple[List[Tuple[str, str]]] = [] + doc_type_to_cpp_type: Dict[str,str] = { + "Fixed32": "int", + "Int32": "int", + "Boolean": "bool", + "Float32": "float", + "String": "string", + } for filepath in self.data.keys(): filename = os.path.basename(filepath) @@ -377,17 +384,38 @@ def write_attribute (self, output_directory: str) -> None: for filepath in attribute_names: attribute_name = attribute_names[filepath] metadata[filepath] = self.data[filepath].metadata - if metadata[filepath]['type'] == ["MultiflagValue"]: - attribute_variables = metadata[filepath]['flags'] - class_name = capitalize(attribute_name,delimiter="") + if metadata[filepath]['type'] in ["MultiflagValue", "CompoundValue", "Enum"]: + if metadata[filepath]['type'] == "MultiflagValue": + for flag in metadata[filepath]['flags']: + attribute_variables.append((flag, "bool")) + + elif metadata[filepath]['type'] == "CompoundValue": + + for component in metadata[filepath]['components']: + if component['type'] not in doc_type_to_cpp_type: + raise ValueError("Unexpected type for component. Look at markdown file {attribute_name}".format( + attribute_name=attribute_name + )) + + attribute_variables.append((component['name'].lower().replace(" ","_"), doc_type_to_cpp_type[component['type']])) - with open(os.path.join(output_directory, attribute_name + ".hpp"), 'w') as f: + elif metadata[filepath]['type'] == "Enum": + attribute_variables.append((metadata[filepath]['name'].lower().replace(" ","_"), "string")) + else: + raise ValueError("Type was in the list [MultiflagValue, CompoundValue, Enum] but not equal to one of those strings. Look at markdown file {attribute_name}".format( + attribute_name=attribute_name + )) + class_name = capitalize(attribute_name,delimiter="") + + with open(os.path.join(output_directory, attribute_name + ".hpp"), 'w') as f: + f.write(template.render( attribute_name=attribute_name, attribute_variables=sorted(attribute_variables), class_name=class_name, )) + attribute_variables = [] ############################################################################ # write_webdocs diff --git a/xml_converter/generators/cpp_templates/attribute_template.hpp b/xml_converter/generators/cpp_templates/attribute_template.hpp index 35ee5e0b..96343167 100644 --- a/xml_converter/generators/cpp_templates/attribute_template.hpp +++ b/xml_converter/generators/cpp_templates/attribute_template.hpp @@ -11,11 +11,11 @@ using namespace std; class {{class_name}} { public: - {%- for attribute_variable in attribute_variables: %} - bool {{attribute_variable}}; - {%- endfor %} + {%- for attribute_variable in attribute_variables: %} + {{attribute_variable[1]}} {{attribute_variable[0]}}; + {%- endfor %} - virtual string classname() { return "{{class_name}}"; }; + virtual string classname() { return "{{class_name}}"; }; }; {{class_name}} parse_{{class_name}}(rapidxml::xml_attribute<>* input, vector *errors); diff --git a/xml_converter/src/attribute/cull_chirality.cpp b/xml_converter/src/attribute/cull_chirality.cpp index 1880f920..11f435cd 100644 --- a/xml_converter/src/attribute/cull_chirality.cpp +++ b/xml_converter/src/attribute/cull_chirality.cpp @@ -7,9 +7,3 @@ #include "../rapidxml-1.13/rapidxml.hpp" using namespace std; - -CullChirality parse_Chirality(rapidxml::xml_attribute<>* input, vector *) { - CullChirality chirality; - chirality.chirality = get_attribute_value(input); - return chirality; -} diff --git a/xml_converter/src/attribute/cull_chirality.hpp b/xml_converter/src/attribute/cull_chirality.hpp index 30277250..7df396eb 100644 --- a/xml_converter/src/attribute/cull_chirality.hpp +++ b/xml_converter/src/attribute/cull_chirality.hpp @@ -5,13 +5,15 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" +#include "../string_helper.hpp" using namespace std; - class CullChirality { public: - string chirality; + string cull_chirality; + + virtual string classname() { return "CullChirality"; }; }; -CullChirality parse_Chirality(rapidxml::xml_attribute<>* input, vector *errors); +CullChirality parse_CullChirality(rapidxml::xml_attribute<>* input, vector *errors); \ No newline at end of file diff --git a/xml_converter/src/attribute/euler_rotation.cpp b/xml_converter/src/attribute/euler_rotation.cpp index 818b21ef..aafbc384 100644 --- a/xml_converter/src/attribute/euler_rotation.cpp +++ b/xml_converter/src/attribute/euler_rotation.cpp @@ -8,20 +8,3 @@ #include "../string_helper.hpp" using namespace std; - - -EulerRotation parse_EulerAngle(rapidxml::xml_attribute<>* input, vector *errors) { - vector components = split(get_attribute_value(input), ","); - - EulerRotation euler_angle; - if (components.size() == 3) { - euler_angle.x = stof(components[0].c_str()); - euler_angle.y = stof(components[1].c_str()); - euler_angle.z = stof(components[2].c_str()); - } - else { - errors->push_back(new XMLAttributeValueError("Invlaid 'x,y,z' rotation ", input)); - } - - return euler_angle; -} diff --git a/xml_converter/src/attribute/euler_rotation.hpp b/xml_converter/src/attribute/euler_rotation.hpp index 98556757..9843c578 100644 --- a/xml_converter/src/attribute/euler_rotation.hpp +++ b/xml_converter/src/attribute/euler_rotation.hpp @@ -5,14 +5,17 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" +#include "../string_helper.hpp" using namespace std; class EulerRotation { public: - float x; - float y; - float z; + float x_rotation; + float y_rotation; + float z_rotation; + + virtual string classname() { return "EulerRotation"; }; }; -EulerRotation parse_EulerAngle(rapidxml::xml_attribute<>* input, vector *errors); +EulerRotation parse_EulerRotation(rapidxml::xml_attribute<>* input, vector *errors); \ No newline at end of file diff --git a/xml_converter/src/attribute/festival_filter.hpp b/xml_converter/src/attribute/festival_filter.hpp index aa8db367..14418124 100644 --- a/xml_converter/src/attribute/festival_filter.hpp +++ b/xml_converter/src/attribute/festival_filter.hpp @@ -11,15 +11,15 @@ using namespace std; class FestivalFilter { public: - bool dragonbash; - bool festival_of_the_four_winds; - bool halloween; - bool lunar_new_year; - bool none; - bool super_adventure_festival; - bool wintersday; + bool dragonbash; + bool festival_of_the_four_winds; + bool halloween; + bool lunar_new_year; + bool none; + bool super_adventure_festival; + bool wintersday; - virtual string classname() { return "FestivalFilter"; }; + virtual string classname() { return "FestivalFilter"; }; }; FestivalFilter parse_FestivalFilter(rapidxml::xml_attribute<>* input, vector *errors); \ No newline at end of file diff --git a/xml_converter/src/attribute/map_type_filter.hpp b/xml_converter/src/attribute/map_type_filter.hpp index 0816818d..f3a78c76 100644 --- a/xml_converter/src/attribute/map_type_filter.hpp +++ b/xml_converter/src/attribute/map_type_filter.hpp @@ -11,32 +11,32 @@ using namespace std; class MapTypeFilter { public: - bool blue_borderlands_map; - bool bluehome_map; - bool center_map; - bool character_create_map; - bool edge_of_the_mists_map; - bool eternal_battlegrounds_map; - bool fortunes_vale_map; - bool green_borderlands_map; - bool green_home_map; - bool gvg_map; - bool instance_map; - bool jump_puzzle_map; - bool obsidian_sanctum_map; - bool public_map; - bool public_mini_map; - bool pvp_map; - bool red_borderlands_map; - bool red_home_map; - bool redirect_map; - bool tournament_map; - bool tutorial_map; - bool unknown_map; - bool user_tournament_map; - bool wvw_lounge_map; + bool blue_borderlands_map; + bool bluehome_map; + bool center_map; + bool character_create_map; + bool edge_of_the_mists_map; + bool eternal_battlegrounds_map; + bool fortunes_vale_map; + bool green_borderlands_map; + bool green_home_map; + bool gvg_map; + bool instance_map; + bool jump_puzzle_map; + bool obsidian_sanctum_map; + bool public_map; + bool public_mini_map; + bool pvp_map; + bool red_borderlands_map; + bool red_home_map; + bool redirect_map; + bool tournament_map; + bool tutorial_map; + bool unknown_map; + bool user_tournament_map; + bool wvw_lounge_map; - virtual string classname() { return "MapTypeFilter"; }; + virtual string classname() { return "MapTypeFilter"; }; }; MapTypeFilter parse_MapTypeFilter(rapidxml::xml_attribute<>* input, vector *errors); \ No newline at end of file diff --git a/xml_converter/src/attribute/mount_filter.hpp b/xml_converter/src/attribute/mount_filter.hpp index 01f67e9f..139d7ac7 100644 --- a/xml_converter/src/attribute/mount_filter.hpp +++ b/xml_converter/src/attribute/mount_filter.hpp @@ -11,18 +11,18 @@ using namespace std; class MountFilter { public: - bool griffon; - bool jackal; - bool raptor; - bool roller_beetle; - bool seige_turtle; - bool skiff; - bool skimmer; - bool skyscale; - bool springer; - bool warclaw; + bool griffon; + bool jackal; + bool raptor; + bool roller_beetle; + bool seige_turtle; + bool skiff; + bool skimmer; + bool skyscale; + bool springer; + bool warclaw; - virtual string classname() { return "MountFilter"; }; + virtual string classname() { return "MountFilter"; }; }; MountFilter parse_MountFilter(rapidxml::xml_attribute<>* input, vector *errors); \ No newline at end of file diff --git a/xml_converter/src/attribute/position.cpp b/xml_converter/src/attribute/position.cpp index 1b703073..d93b2286 100644 --- a/xml_converter/src/attribute/position.cpp +++ b/xml_converter/src/attribute/position.cpp @@ -7,21 +7,4 @@ #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" -using namespace std; - - -Position parse_Position(rapidxml::xml_attribute<>* input, vector *errors) { - vector components = split(get_attribute_value(input), ","); - - Position position; - if (components.size() == 3) { - position.x = stof(components[0].c_str()); - position.y = stof(components[1].c_str()); - position.z = stof(components[2].c_str()); - } - else { - errors->push_back(new XMLAttributeValueError("Invlaid 'x,y,z' rotation ", input)); - } - - return position; -} +using namespace std; \ No newline at end of file diff --git a/xml_converter/src/attribute/position.hpp b/xml_converter/src/attribute/position.hpp index 9639ff3c..4d3e458e 100644 --- a/xml_converter/src/attribute/position.hpp +++ b/xml_converter/src/attribute/position.hpp @@ -5,15 +5,17 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" +#include "../string_helper.hpp" using namespace std; - class Position { public: - float x; - float y; - float z; + float x_position; + float y_position; + float z_position; + + virtual string classname() { return "Position"; }; }; -Position parse_Position(rapidxml::xml_attribute<>* input, vector *errors); +Position parse_Position(rapidxml::xml_attribute<>* input, vector *errors); \ No newline at end of file diff --git a/xml_converter/src/attribute/profession_filter.hpp b/xml_converter/src/attribute/profession_filter.hpp index eb642c89..6fd921ca 100644 --- a/xml_converter/src/attribute/profession_filter.hpp +++ b/xml_converter/src/attribute/profession_filter.hpp @@ -11,17 +11,17 @@ using namespace std; class ProfessionFilter { public: - bool elementalist; - bool engineer; - bool guardian; - bool mesmer; - bool necromancer; - bool ranger; - bool revenant; - bool thief; - bool warrior; + bool elementalist; + bool engineer; + bool guardian; + bool mesmer; + bool necromancer; + bool ranger; + bool revenant; + bool thief; + bool warrior; - virtual string classname() { return "ProfessionFilter"; }; + virtual string classname() { return "ProfessionFilter"; }; }; ProfessionFilter parse_ProfessionFilter(rapidxml::xml_attribute<>* input, vector *errors); \ No newline at end of file diff --git a/xml_converter/src/attribute/reset_behavior.hpp b/xml_converter/src/attribute/reset_behavior.hpp index 3b88fe41..25113ea8 100644 --- a/xml_converter/src/attribute/reset_behavior.hpp +++ b/xml_converter/src/attribute/reset_behavior.hpp @@ -5,9 +5,15 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" +#include "../string_helper.hpp" + +using namespace std; class ResetBehavior { + public: + string reset_behavior; + virtual string classname() { return "ResetBehavior"; }; }; -ResetBehavior parse_ResetBehavior(rapidxml::xml_attribute<>* input, vector *errors); +ResetBehavior parse_ResetBehavior(rapidxml::xml_attribute<>* input, vector *errors); \ No newline at end of file diff --git a/xml_converter/src/attribute/specialization_filter.hpp b/xml_converter/src/attribute/specialization_filter.hpp index efca48a7..82fd20ab 100644 --- a/xml_converter/src/attribute/specialization_filter.hpp +++ b/xml_converter/src/attribute/specialization_filter.hpp @@ -11,80 +11,80 @@ using namespace std; class SpecializationFilter { public: - bool elementalist_air; - bool elementalist_arcane; - bool elementalist_catalyst; - bool elementalist_earth; - bool elementalist_fire; - bool elementalist_tempest; - bool elementalist_water; - bool elementalist_weaver; - bool engineer_alchemy; - bool engineer_explosives; - bool engineer_firearms; - bool engineer_holosmith; - bool engineer_inventions; - bool engineer_mechanist; - bool engineer_scrapper; - bool engineer_tools; - bool guardian_dragonhunter; - bool guardian_firebrand; - bool guardian_honor; - bool guardian_radiance; - bool guardian_valor; - bool guardian_virtues; - bool guardian_willbender; - bool guardian_zeal; - bool mesmer_chaos; - bool mesmer_chronomancer; - bool mesmer_domination; - bool mesmer_dueling; - bool mesmer_illusions; - bool mesmer_inspiration; - bool mesmer_mirage; - bool mesmer_virtuoso; - bool necromancer_blood_magic; - bool necromancer_curses; - bool necromancer_death_magic; - bool necromancer_harbinger; - bool necromancer_reaper; - bool necromancer_scourge; - bool necromancer_soul_reaping; - bool necromancer_spite; - bool ranger_beastmastery; - bool ranger_druid; - bool ranger_marksmanship; - bool ranger_nature_magic; - bool ranger_skirmishing; - bool ranger_soulbeast; - bool ranger_untamed; - bool ranger_wilderness_survival; - bool revenant_corruption; - bool revenant_devastation; - bool revenant_herald; - bool revenant_invocation; - bool revenant_renegade; - bool revenant_retribution; - bool revenant_salvation; - bool revenant_vindicator; - bool thief_acrobatics; - bool thief_critical_strikes; - bool thief_daredevil; - bool thief_deadeye; - bool thief_deadly_arts; - bool thief_shadow_arts; - bool thief_specter; - bool thief_trickery; - bool warrior_arms; - bool warrior_berserker; - bool warrior_bladesworn; - bool warrior_defense; - bool warrior_discipline; - bool warrior_spellbreaker; - bool warrior_strength; - bool warrior_tactics; + bool elementalist_air; + bool elementalist_arcane; + bool elementalist_catalyst; + bool elementalist_earth; + bool elementalist_fire; + bool elementalist_tempest; + bool elementalist_water; + bool elementalist_weaver; + bool engineer_alchemy; + bool engineer_explosives; + bool engineer_firearms; + bool engineer_holosmith; + bool engineer_inventions; + bool engineer_mechanist; + bool engineer_scrapper; + bool engineer_tools; + bool guardian_dragonhunter; + bool guardian_firebrand; + bool guardian_honor; + bool guardian_radiance; + bool guardian_valor; + bool guardian_virtues; + bool guardian_willbender; + bool guardian_zeal; + bool mesmer_chaos; + bool mesmer_chronomancer; + bool mesmer_domination; + bool mesmer_dueling; + bool mesmer_illusions; + bool mesmer_inspiration; + bool mesmer_mirage; + bool mesmer_virtuoso; + bool necromancer_blood_magic; + bool necromancer_curses; + bool necromancer_death_magic; + bool necromancer_harbinger; + bool necromancer_reaper; + bool necromancer_scourge; + bool necromancer_soul_reaping; + bool necromancer_spite; + bool ranger_beastmastery; + bool ranger_druid; + bool ranger_marksmanship; + bool ranger_nature_magic; + bool ranger_skirmishing; + bool ranger_soulbeast; + bool ranger_untamed; + bool ranger_wilderness_survival; + bool revenant_corruption; + bool revenant_devastation; + bool revenant_herald; + bool revenant_invocation; + bool revenant_renegade; + bool revenant_retribution; + bool revenant_salvation; + bool revenant_vindicator; + bool thief_acrobatics; + bool thief_critical_strikes; + bool thief_daredevil; + bool thief_deadeye; + bool thief_deadly_arts; + bool thief_shadow_arts; + bool thief_specter; + bool thief_trickery; + bool warrior_arms; + bool warrior_berserker; + bool warrior_bladesworn; + bool warrior_defense; + bool warrior_discipline; + bool warrior_spellbreaker; + bool warrior_strength; + bool warrior_tactics; - virtual string classname() { return "SpecializationFilter"; }; + virtual string classname() { return "SpecializationFilter"; }; }; SpecializationFilter parse_SpecializationFilter(rapidxml::xml_attribute<>* input, vector *errors); \ No newline at end of file diff --git a/xml_converter/src/attribute/species_filter.hpp b/xml_converter/src/attribute/species_filter.hpp index b550785d..3b7019b7 100644 --- a/xml_converter/src/attribute/species_filter.hpp +++ b/xml_converter/src/attribute/species_filter.hpp @@ -11,13 +11,13 @@ using namespace std; class SpeciesFilter { public: - bool asura; - bool charr; - bool human; - bool norn; - bool sylvari; + bool asura; + bool charr; + bool human; + bool norn; + bool sylvari; - virtual string classname() { return "SpeciesFilter"; }; + virtual string classname() { return "SpeciesFilter"; }; }; SpeciesFilter parse_SpeciesFilter(rapidxml::xml_attribute<>* input, vector *errors); \ No newline at end of file From ee8e03508a2da9b9c868166911893bab1e141ddf Mon Sep 17 00:00:00 2001 From: klingbolt Date: Wed, 10 Aug 2022 00:02:53 -0400 Subject: [PATCH 059/539] Went over with presubmit to fix formating --- xml_converter/generators/code_generator.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 6159eacf..24655b47 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -295,7 +295,6 @@ def write_cpp_classes(self, output_directory: str) -> None: attribute_variables, cpp_include_paths = self.generate_cpp_variable_data(metadata, cpp_class, attribute_names) with open(os.path.join(output_directory, cpp_class.lower() + ".hpp"), 'w') as f: - f.write(template.render( cpp_class=cpp_class, attribute_variables=sorted(attribute_variables), @@ -382,6 +381,7 @@ def write_attribute (self, output_directory: str) -> None: attribute_names[filepath]= filename.split(".md")[0] for filepath in attribute_names: + attribute_variables = [] attribute_name = attribute_names[filepath] metadata[filepath] = self.data[filepath].metadata if metadata[filepath]['type'] in ["MultiflagValue", "CompoundValue", "Enum"]: @@ -405,17 +405,15 @@ def write_attribute (self, output_directory: str) -> None: raise ValueError("Type was in the list [MultiflagValue, CompoundValue, Enum] but not equal to one of those strings. Look at markdown file {attribute_name}".format( attribute_name=attribute_name )) - class_name = capitalize(attribute_name,delimiter="") with open(os.path.join(output_directory, attribute_name + ".hpp"), 'w') as f: - f.write(template.render( attribute_name=attribute_name, attribute_variables=sorted(attribute_variables), class_name=class_name, )) - attribute_variables = [] + ############################################################################ # write_webdocs From 2052e6c6d8994c8206c72ed2a6dea17994901690 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Wed, 10 Aug 2022 21:46:42 -0400 Subject: [PATCH 060/539] Made changes to Enum generation and addressed code review comments --- xml_converter/generators/code_generator.py | 172 +++++++++--------- .../cpp_templates/attribute_template.hpp | 11 +- .../src/attribute/cull_chirality.hpp | 13 +- .../src/attribute/euler_rotation.hpp | 4 +- .../src/attribute/festival_filter.hpp | 4 +- .../src/attribute/map_type_filter.hpp | 4 +- xml_converter/src/attribute/mount_filter.hpp | 4 +- xml_converter/src/attribute/position.hpp | 4 +- .../src/attribute/profession_filter.hpp | 4 +- .../src/attribute/reset_behavior.hpp | 19 +- .../src/attribute/specialization_filter.hpp | 4 +- .../src/attribute/species_filter.hpp | 4 +- xml_converter/src/string_helper.hpp | 4 +- xml_converter/src/xml_converter.cpp | 10 +- 14 files changed, 125 insertions(+), 136 deletions(-) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 24655b47..e667d32c 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -12,8 +12,8 @@ schema = """ type: object properties: - type: - type: string + type: + type: string enum: [Int32, Fixed32, Float32, String, Boolean, MultiflagValue, Enum, CompoundValue, Custom] allOf: ############################# @@ -163,7 +163,7 @@ type: array items: type: string - enum: [BlishHUD, Burrito, TacO] + enum: [BlishHUD, Burrito, TacO] ############################# @@ -213,8 +213,6 @@ ) - - def validate_front_matter_schema(front_matter: Any) -> str: try: validate(front_matter, yaml.safe_load(schema)) @@ -222,11 +220,13 @@ def validate_front_matter_schema(front_matter: Any) -> str: return "Error Message: {} (Path: {}".format(e.message, e.json_path) return "" + @dataclass class Document: metadata: SchemaType content: str + @dataclass class FieldRow: name: str @@ -242,13 +242,22 @@ class FieldRow: sub_fields: List["FieldRow"] description: str + +doc_type_to_cpp_type: Dict[str, str] = { + "Fixed32": "int", + "Int32": "int", + "Boolean": "bool", + "Float32": "float", + "String": "string", + } + + class Generator: data: Dict[str, Document] = {} - def load_input_doc(self, dir_path: str) -> None: for filepath in os.listdir(dir_path): - filepath = os.path.join(dir_path,filepath) + filepath = os.path.join(dir_path, filepath) try: document = frontmatter.load(filepath) except Exception as e: @@ -260,13 +269,11 @@ def load_input_doc(self, dir_path: str) -> None: print(filepath) print(error) - - self.data[filepath] = Document( metadata=document.metadata, content=document.content ) - + ############################################################################ # write_cpp_classes # @@ -278,23 +285,23 @@ def write_cpp_classes(self, output_directory: str) -> None: file_loader = FileSystemLoader('cpp_templates') env = Environment(loader=file_loader) template = env.get_template("class_template.hpp") - attribute_names: Dict[str,str] = {} - + attribute_names: Dict[str, str] = {} + for filepath in self.data.keys(): filename = os.path.basename(filepath) - attribute_names[filepath]= filename.split(".md")[0] - - cpp_classes = ["Category","Icon","Trail"] - + attribute_names[filepath] = filename.split(".md")[0] + + cpp_classes = ["Category", "Icon", "Trail"] + for cpp_class in cpp_classes: metadata: Dict[str, SchemaType] = {} - + for attribute_name in attribute_names: metadata[attribute_name] = self.data[attribute_name].metadata - + attribute_variables, cpp_include_paths = self.generate_cpp_variable_data(metadata, cpp_class, attribute_names) - with open(os.path.join(output_directory, cpp_class.lower() + ".hpp"), 'w') as f: + with open(os.path.join(output_directory, lowercase(cpp_class) + ".hpp"), 'w') as f: f.write(template.render( cpp_class=cpp_class, attribute_variables=sorted(attribute_variables), @@ -318,17 +325,10 @@ def generate_cpp_variable_data( attribute_variables: List[Tuple[str, str]] = [] cpp_include_paths: Set[str] = set() attribute_name: str = "" - doc_type_to_cpp_type: Dict[str,str] = { - "Fixed32": "int", - "Int32": "int", - "Boolean": "bool", - "Float32": "float", - "String": "string", - } - for fieldkey,field in metadata.items(): + for fieldkey, field in metadata.items(): for x in attribute_names: - if fieldkey in x : + if fieldkey in x: attribute_name = attribute_names[x] if doc_type in field['applies_to']: @@ -337,12 +337,12 @@ def generate_cpp_variable_data( cpp_include_paths.add(cpp_type) elif field['type'] == "Custom": cpp_type = field['class'] - cpp_include_paths.add(cpp_type.lower()) - elif field['type'] in ["Enum","MultiflagValue","CompoundValue"]: - cpp_type = capitalize(attribute_name,delimiter="") + cpp_include_paths.add(lowercase(cpp_type)) + elif field['type'] in ["Enum", "MultiflagValue", "CompoundValue"]: + cpp_type = capitalize(attribute_name, delimiter="") cpp_include_paths.add(attribute_name) - else : + else: raise ValueError("Unexpected type {field_type} for attribute {attribute_name}".format( field_type=field['type'], attribute_name=attribute_name, @@ -351,34 +351,27 @@ def generate_cpp_variable_data( attribute_variables.append((attribute_name, cpp_type)) return attribute_variables, cpp_include_paths - + ############################################################################ # write_attributes # # Creates the attribute files for attributes that contain multiple values ############################################################################ - def write_attribute (self, output_directory: str) -> None: - print("Writing attributes") + def write_attribute(self, output_directory: str) -> None: + print("Writing attributes") os.makedirs(output_directory, exist_ok=True) file_loader = FileSystemLoader('cpp_templates') env = Environment(loader=file_loader) template = env.get_template("attribute_template.hpp") - categories: Dict[str,List[str]] = {} - attribute_names: Dict[str,str] = {} + attribute_names: Dict[str, str] = {} metadata: Dict[str, SchemaType] = {} - attribute_variables: Tuple[List[Tuple[str, str]]] = [] - doc_type_to_cpp_type: Dict[str,str] = { - "Fixed32": "int", - "Int32": "int", - "Boolean": "bool", - "Float32": "float", - "String": "string", - } + attribute_variables: List[Tuple[str, str]] = [] + for filepath in self.data.keys(): filename = os.path.basename(filepath) - attribute_names[filepath]= filename.split(".md")[0] + attribute_names[filepath] = filename.split(".md")[0] for filepath in attribute_names: attribute_variables = [] @@ -387,33 +380,29 @@ def write_attribute (self, output_directory: str) -> None: if metadata[filepath]['type'] in ["MultiflagValue", "CompoundValue", "Enum"]: if metadata[filepath]['type'] == "MultiflagValue": for flag in metadata[filepath]['flags']: - attribute_variables.append((flag, "bool")) - + attribute_variables.append((flag, "bool")) + elif metadata[filepath]['type'] == "CompoundValue": - + for component in metadata[filepath]['components']: if component['type'] not in doc_type_to_cpp_type: raise ValueError("Unexpected type for component. Look at markdown file {attribute_name}".format( attribute_name=attribute_name )) - - attribute_variables.append((component['name'].lower().replace(" ","_"), doc_type_to_cpp_type[component['type']])) - + attribute_variables.append((lowercase(component['name'], delimiter="_"), doc_type_to_cpp_type[component['type']])) + elif metadata[filepath]['type'] == "Enum": - attribute_variables.append((metadata[filepath]['name'].lower().replace(" ","_"), "string")) - else: - raise ValueError("Type was in the list [MultiflagValue, CompoundValue, Enum] but not equal to one of those strings. Look at markdown file {attribute_name}".format( - attribute_name=attribute_name - )) - class_name = capitalize(attribute_name,delimiter="") - + for value in metadata[filepath]['values']: + attribute_variables.append((value,metadata[filepath]['values'][value])) + with open(os.path.join(output_directory, attribute_name + ".hpp"), 'w') as f: f.write(template.render( attribute_name=attribute_name, attribute_variables=sorted(attribute_variables), - class_name=class_name, + class_name=capitalize(attribute_name, delimiter=""), + function_name=lowercase(attribute_name, delimiter="_"), + type=metadata[filepath]['type'], )) - ############################################################################ # write_webdocs @@ -428,15 +417,15 @@ def write_webdocs(self, output_directory: str) -> None: file_loader = FileSystemLoader('web_templates') env = Environment(loader=file_loader) template = env.get_template("documentation.html") - categories: Dict[str,List[str]] = {} + categories: Dict[str, List[str]] = {} for filename in self.data.keys(): category = os.path.basename(os.path.dirname(filename)) if category not in categories: categories[category] = [] - categories[category].append(filename) + categories[category].append(filename) - navigation_links = [ (capitalize(category), category) for category in sorted(categories.keys()) ] + navigation_links = [(capitalize(category), category) for category in sorted(categories.keys())] complete_field_row_list = [] @@ -446,9 +435,7 @@ def write_webdocs(self, output_directory: str) -> None: # Resets the content and metadata to empty for each loop for subpage in categories[page]: - content[subpage] = markdown.markdown(self.data[subpage].content) - metadata[subpage] = self.data[subpage].metadata generated_doc, field_rows = self.generate_auto_docs(metadata, content) @@ -489,9 +476,9 @@ def get_fixed_option_examples(self, field_type: str, pairings: Any) -> List[str] combo_field = [example_values[1], example_values[2], example_values[3]] examples = [] - examples.append("\"" + solo_field +"\"") + examples.append("\"" + solo_field + "\"") if len(combo_field) > 0: - examples.append("\"" + ",".join(combo_field) +"\"") + examples.append("\"" + ",".join(combo_field) + "\"") return examples @@ -500,13 +487,11 @@ def build_example(self, type: str, applies_to: List[str], xml_field: str, exampl for node_type in applies_to: for value in examples: - example += "<" + node_type + " ... " + xml_field + "=" + value +" ... >
" + example += "<" + node_type + " ... " + xml_field + "=" + value + " ... >
" break # example += "
" - - - example +="" + example += "" return example @@ -515,12 +500,11 @@ def build_example(self, type: str, applies_to: List[str], xml_field: str, exampl # # This will output documentation for a single category of attributes. ############################################################################ - def generate_auto_docs(self, metadata: Dict[str, SchemaType],content: Dict[str,str]) -> Tuple[str, List[FieldRow]]: + def generate_auto_docs(self, metadata: Dict[str, SchemaType], content: Dict[str, str]) -> Tuple[str, List[FieldRow]]: file_loader = FileSystemLoader('web_templates') env = Environment(loader=file_loader) template = env.get_template("infotable.html") - field_rows = [] for fieldkey, field in metadata.items(): valid_values = "" @@ -559,18 +543,14 @@ def generate_auto_docs(self, metadata: Dict[str, SchemaType],content: Dict[str,s valid_values += "➞" + elem + "" valid_values += "" - elif field['type'] == "CompoundValue": - + example = self.build_example( type=field['type'], applies_to=field['applies_to'], xml_field=field['xml_fields'][0], examples=["???TODO???"] ) - - - # ",".join( [ self.get_examples(x['type'], field['applies_to'], field['xml_fields'][0]) for x in field['components'] ]) else: example = self.build_example( @@ -586,7 +566,7 @@ def generate_auto_docs(self, metadata: Dict[str, SchemaType],content: Dict[str,s field_rows.append(FieldRow( name=field["name"], - xml_attribute = field["xml_fields"][0], + xml_attribute=field["xml_fields"][0], alternate_xml_attributes=field["xml_fields"][1:], binary_field=field["protobuf_field"], data_type=field["type"], @@ -595,17 +575,17 @@ def generate_auto_docs(self, metadata: Dict[str, SchemaType],content: Dict[str,s example=example, valid_values_html=valid_values, is_sub_field=False, - sub_fields=[], - description=content[fieldkey]# todo: + sub_fields=[], + description=content[fieldkey] # todo: )) if field['type'] == "CompoundValue": for component_field in field["components"]: field_rows.append(FieldRow( name=component_field["name"], - xml_attribute= component_field["xml_fields"][0], + xml_attribute=component_field["xml_fields"][0], alternate_xml_attributes=component_field["xml_fields"][1:], - binary_field= field["protobuf_field"] + "." + component_field["protobuf_field"], + binary_field=field["protobuf_field"] + "." + component_field["protobuf_field"], data_type=component_field["type"], supported_by_html="
".join(component_field["compatability"]), usable_on_html="
".join(field["applies_to"]), @@ -619,7 +599,6 @@ def generate_auto_docs(self, metadata: Dict[str, SchemaType],content: Dict[str,s valid_values_html=valid_values, is_sub_field=True, sub_fields=[] - )) return template.render(field_rows=field_rows), field_rows @@ -641,7 +620,23 @@ def capitalize(word: str, delimiter: str = " ") -> str: capital_word_array.append(capital_each_word) return delimiter.join(capital_word_array) - + +################################################################################ +# lowercase +# +# A helper function to take each word in the string and convert it to a snake +# case string of lowercase letters. A delimiter can be passed in to change the +# characters inserted between the newly lowercased words. +################################################################################ +def lowercase(word: str, delimiter: str = "_") -> str: + wordarray = word.split(" ") + lower_word_array = [] + + for each_word in wordarray: + lower_each_word = each_word.lower() + lower_word_array.append(lower_each_word) + + return delimiter.join(lower_word_array) ################################################################################ # main @@ -649,6 +644,8 @@ def capitalize(word: str, delimiter: str = " ") -> str: # The first function that gets called. Is in change of parsing the input # markdown files, and then creating the desired output files. ################################################################################ + + def main() -> None: generator = Generator() markdown_doc_directory = "../doc" @@ -662,4 +659,5 @@ def main() -> None: generator.write_cpp_classes("../src/") generator.write_attribute("../src/attribute") -main() \ No newline at end of file + +main() diff --git a/xml_converter/generators/cpp_templates/attribute_template.hpp b/xml_converter/generators/cpp_templates/attribute_template.hpp index 96343167..70b2160a 100644 --- a/xml_converter/generators/cpp_templates/attribute_template.hpp +++ b/xml_converter/generators/cpp_templates/attribute_template.hpp @@ -9,6 +9,13 @@ using namespace std; +{%- if type == "Enum":%} +enum {{class_name}} { + {%- for attribute_variable in attribute_variables: %} + {{attribute_variable[0]}}, +{%- endfor %} +}; +{%- else: %} class {{class_name}} { public: {%- for attribute_variable in attribute_variables: %} @@ -17,5 +24,5 @@ class {{class_name}} { virtual string classname() { return "{{class_name}}"; }; }; - -{{class_name}} parse_{{class_name}}(rapidxml::xml_attribute<>* input, vector *errors); +{%- endif %} +{{class_name}} parse_{{function_name}}(rapidxml::xml_attribute<>* input, vector *errors); diff --git a/xml_converter/src/attribute/cull_chirality.hpp b/xml_converter/src/attribute/cull_chirality.hpp index 7df396eb..6ae3794a 100644 --- a/xml_converter/src/attribute/cull_chirality.hpp +++ b/xml_converter/src/attribute/cull_chirality.hpp @@ -8,12 +8,9 @@ #include "../string_helper.hpp" using namespace std; - -class CullChirality { - public: - string cull_chirality; - - virtual string classname() { return "CullChirality"; }; +enum CullChirality { + clockwise, + counter_clockwise, + none, }; - -CullChirality parse_CullChirality(rapidxml::xml_attribute<>* input, vector *errors); \ No newline at end of file +CullChirality parse_cull_chirality(rapidxml::xml_attribute<>* input, vector *errors); \ No newline at end of file diff --git a/xml_converter/src/attribute/euler_rotation.hpp b/xml_converter/src/attribute/euler_rotation.hpp index 9843c578..3ddab641 100644 --- a/xml_converter/src/attribute/euler_rotation.hpp +++ b/xml_converter/src/attribute/euler_rotation.hpp @@ -8,7 +8,6 @@ #include "../string_helper.hpp" using namespace std; - class EulerRotation { public: float x_rotation; @@ -17,5 +16,4 @@ class EulerRotation { virtual string classname() { return "EulerRotation"; }; }; - -EulerRotation parse_EulerRotation(rapidxml::xml_attribute<>* input, vector *errors); \ No newline at end of file +EulerRotation parse_euler_rotation(rapidxml::xml_attribute<>* input, vector *errors); \ No newline at end of file diff --git a/xml_converter/src/attribute/festival_filter.hpp b/xml_converter/src/attribute/festival_filter.hpp index 14418124..30085b2b 100644 --- a/xml_converter/src/attribute/festival_filter.hpp +++ b/xml_converter/src/attribute/festival_filter.hpp @@ -8,7 +8,6 @@ #include "../string_helper.hpp" using namespace std; - class FestivalFilter { public: bool dragonbash; @@ -21,5 +20,4 @@ class FestivalFilter { virtual string classname() { return "FestivalFilter"; }; }; - -FestivalFilter parse_FestivalFilter(rapidxml::xml_attribute<>* input, vector *errors); \ No newline at end of file +FestivalFilter parse_festival_filter(rapidxml::xml_attribute<>* input, vector *errors); \ No newline at end of file diff --git a/xml_converter/src/attribute/map_type_filter.hpp b/xml_converter/src/attribute/map_type_filter.hpp index f3a78c76..ea7ba867 100644 --- a/xml_converter/src/attribute/map_type_filter.hpp +++ b/xml_converter/src/attribute/map_type_filter.hpp @@ -8,7 +8,6 @@ #include "../string_helper.hpp" using namespace std; - class MapTypeFilter { public: bool blue_borderlands_map; @@ -38,5 +37,4 @@ class MapTypeFilter { virtual string classname() { return "MapTypeFilter"; }; }; - -MapTypeFilter parse_MapTypeFilter(rapidxml::xml_attribute<>* input, vector *errors); \ No newline at end of file +MapTypeFilter parse_map_type_filter(rapidxml::xml_attribute<>* input, vector *errors); \ No newline at end of file diff --git a/xml_converter/src/attribute/mount_filter.hpp b/xml_converter/src/attribute/mount_filter.hpp index 139d7ac7..48113c74 100644 --- a/xml_converter/src/attribute/mount_filter.hpp +++ b/xml_converter/src/attribute/mount_filter.hpp @@ -8,7 +8,6 @@ #include "../string_helper.hpp" using namespace std; - class MountFilter { public: bool griffon; @@ -24,5 +23,4 @@ class MountFilter { virtual string classname() { return "MountFilter"; }; }; - -MountFilter parse_MountFilter(rapidxml::xml_attribute<>* input, vector *errors); \ No newline at end of file +MountFilter parse_mount_filter(rapidxml::xml_attribute<>* input, vector *errors); \ No newline at end of file diff --git a/xml_converter/src/attribute/position.hpp b/xml_converter/src/attribute/position.hpp index 4d3e458e..36ddf9ca 100644 --- a/xml_converter/src/attribute/position.hpp +++ b/xml_converter/src/attribute/position.hpp @@ -8,7 +8,6 @@ #include "../string_helper.hpp" using namespace std; - class Position { public: float x_position; @@ -17,5 +16,4 @@ class Position { virtual string classname() { return "Position"; }; }; - -Position parse_Position(rapidxml::xml_attribute<>* input, vector *errors); \ No newline at end of file +Position parse_position(rapidxml::xml_attribute<>* input, vector *errors); \ No newline at end of file diff --git a/xml_converter/src/attribute/profession_filter.hpp b/xml_converter/src/attribute/profession_filter.hpp index 6fd921ca..0e9b22ee 100644 --- a/xml_converter/src/attribute/profession_filter.hpp +++ b/xml_converter/src/attribute/profession_filter.hpp @@ -8,7 +8,6 @@ #include "../string_helper.hpp" using namespace std; - class ProfessionFilter { public: bool elementalist; @@ -23,5 +22,4 @@ class ProfessionFilter { virtual string classname() { return "ProfessionFilter"; }; }; - -ProfessionFilter parse_ProfessionFilter(rapidxml::xml_attribute<>* input, vector *errors); \ No newline at end of file +ProfessionFilter parse_profession_filter(rapidxml::xml_attribute<>* input, vector *errors); \ No newline at end of file diff --git a/xml_converter/src/attribute/reset_behavior.hpp b/xml_converter/src/attribute/reset_behavior.hpp index 25113ea8..b5d0f107 100644 --- a/xml_converter/src/attribute/reset_behavior.hpp +++ b/xml_converter/src/attribute/reset_behavior.hpp @@ -8,12 +8,15 @@ #include "../string_helper.hpp" using namespace std; - -class ResetBehavior { - public: - string reset_behavior; - - virtual string classname() { return "ResetBehavior"; }; +enum ResetBehavior { + always_visible, + daily_reset, + daily_reset_per_character, + instance_change, + map_change, + map_reset, + never, + timer, + weekly_reset, }; - -ResetBehavior parse_ResetBehavior(rapidxml::xml_attribute<>* input, vector *errors); \ No newline at end of file +ResetBehavior parse_reset_behavior(rapidxml::xml_attribute<>* input, vector *errors); \ No newline at end of file diff --git a/xml_converter/src/attribute/specialization_filter.hpp b/xml_converter/src/attribute/specialization_filter.hpp index 82fd20ab..e379e0a7 100644 --- a/xml_converter/src/attribute/specialization_filter.hpp +++ b/xml_converter/src/attribute/specialization_filter.hpp @@ -8,7 +8,6 @@ #include "../string_helper.hpp" using namespace std; - class SpecializationFilter { public: bool elementalist_air; @@ -86,5 +85,4 @@ class SpecializationFilter { virtual string classname() { return "SpecializationFilter"; }; }; - -SpecializationFilter parse_SpecializationFilter(rapidxml::xml_attribute<>* input, vector *errors); \ No newline at end of file +SpecializationFilter parse_specialization_filter(rapidxml::xml_attribute<>* input, vector *errors); \ No newline at end of file diff --git a/xml_converter/src/attribute/species_filter.hpp b/xml_converter/src/attribute/species_filter.hpp index 3b7019b7..cb8bd853 100644 --- a/xml_converter/src/attribute/species_filter.hpp +++ b/xml_converter/src/attribute/species_filter.hpp @@ -8,7 +8,6 @@ #include "../string_helper.hpp" using namespace std; - class SpeciesFilter { public: bool asura; @@ -19,5 +18,4 @@ class SpeciesFilter { virtual string classname() { return "SpeciesFilter"; }; }; - -SpeciesFilter parse_SpeciesFilter(rapidxml::xml_attribute<>* input, vector *errors); \ No newline at end of file +SpeciesFilter parse_species_filter(rapidxml::xml_attribute<>* input, vector *errors); \ No newline at end of file diff --git a/xml_converter/src/string_helper.hpp b/xml_converter/src/string_helper.hpp index 83a67d35..b0fff712 100644 --- a/xml_converter/src/string_helper.hpp +++ b/xml_converter/src/string_helper.hpp @@ -5,8 +5,8 @@ using namespace std; bool matches_any(string test, std::initializer_list list); -bool nomralized_matches_any(string test, std::initializer_list list); -bool nomralized_matches_any(string test, std::vector list); +bool normalized_matches_any(string test, std::initializer_list list); +bool normalized_matches_any(string test, std::vector list); string lowercase(string); diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 521a302f..eda6163f 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -218,11 +218,11 @@ void convert_taco_directory(string directory) { int main() { convert_taco_directory("./packs/tw_ALL_IN_ONE"); - convert_taco_directory("./packs/TehsTrails"); - convert_taco_directory("./packs/MoW"); - convert_taco_directory("./packs/Hero.Blish.Pack"); - convert_taco_directory("./packs/GW2 TacO ReActif EN External"); - convert_taco_directory("./packs/602fd903dad6efast_TacO_pack_001"); + // convert_taco_directory("./packs/TehsTrails"); + // convert_taco_directory("./packs/MoW"); + // convert_taco_directory("./packs/Hero.Blish.Pack"); + // convert_taco_directory("./packs/GW2 TacO ReActif EN External"); + // convert_taco_directory("./packs/602fd903dad6efast_TacO_pack_001"); return 0; } From bb42422dea7af943b4903c38a730d9346b0dd623 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Fri, 12 Aug 2022 22:25:48 -0400 Subject: [PATCH 061/539] Addressed comments in code review Got rid of one layer of for loop in code_generator.py and added an else. Added functionaly to xml_converter that runs the convertor for every directory in paths instead of a list. --- xml_converter/generators/code_generator.py | 55 ++++++++++++---------- xml_converter/src/xml_converter.cpp | 17 ++++--- 2 files changed, 40 insertions(+), 32 deletions(-) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index e667d32c..34b84b93 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -377,32 +377,35 @@ def write_attribute(self, output_directory: str) -> None: attribute_variables = [] attribute_name = attribute_names[filepath] metadata[filepath] = self.data[filepath].metadata - if metadata[filepath]['type'] in ["MultiflagValue", "CompoundValue", "Enum"]: - if metadata[filepath]['type'] == "MultiflagValue": - for flag in metadata[filepath]['flags']: - attribute_variables.append((flag, "bool")) - - elif metadata[filepath]['type'] == "CompoundValue": - - for component in metadata[filepath]['components']: - if component['type'] not in doc_type_to_cpp_type: - raise ValueError("Unexpected type for component. Look at markdown file {attribute_name}".format( - attribute_name=attribute_name - )) - attribute_variables.append((lowercase(component['name'], delimiter="_"), doc_type_to_cpp_type[component['type']])) - - elif metadata[filepath]['type'] == "Enum": - for value in metadata[filepath]['values']: - attribute_variables.append((value,metadata[filepath]['values'][value])) - - with open(os.path.join(output_directory, attribute_name + ".hpp"), 'w') as f: - f.write(template.render( - attribute_name=attribute_name, - attribute_variables=sorted(attribute_variables), - class_name=capitalize(attribute_name, delimiter=""), - function_name=lowercase(attribute_name, delimiter="_"), - type=metadata[filepath]['type'], - )) + + if metadata[filepath]['type'] == "MultiflagValue": + for flag in metadata[filepath]['flags']: + attribute_variables.append((flag, "bool")) + + elif metadata[filepath]['type'] == "CompoundValue": + + for component in metadata[filepath]['components']: + if component['type'] not in doc_type_to_cpp_type: + raise ValueError("Unexpected type for component. Look at markdown file {attribute_name}".format( + attribute_name=attribute_name + )) + attribute_variables.append((lowercase(component['name'], delimiter="_"), doc_type_to_cpp_type[component['type']])) + + elif metadata[filepath]['type'] == "Enum": + for value in metadata[filepath]['values']: + attribute_variables.append((value,metadata[filepath]['values'][value])) + + else: + continue + + with open(os.path.join(output_directory, attribute_name + ".hpp"), 'w') as f: + f.write(template.render( + attribute_name=attribute_name, + attribute_variables=sorted(attribute_variables), + class_name=capitalize(attribute_name, delimiter=""), + function_name=lowercase(attribute_name, delimiter="_"), + type=metadata[filepath]['type'], + )) ############################################################################ # write_webdocs diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index eda6163f..872de46b 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -217,12 +217,17 @@ void convert_taco_directory(string directory) { } int main() { - convert_taco_directory("./packs/tw_ALL_IN_ONE"); - // convert_taco_directory("./packs/TehsTrails"); - // convert_taco_directory("./packs/MoW"); - // convert_taco_directory("./packs/Hero.Blish.Pack"); - // convert_taco_directory("./packs/GW2 TacO ReActif EN External"); - // convert_taco_directory("./packs/602fd903dad6efast_TacO_pack_001"); + + + for (const auto & entry : filesystem::directory_iterator("./packs")) { + string path = entry.path(); + if (entry.is_directory()) { + convert_taco_directory(path); + } + else { + continue; + } + } return 0; } From 86afe1533e4de80ab70c4ef581ca500c5f375358 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sat, 20 Aug 2022 19:03:09 -0400 Subject: [PATCH 062/539] Implement generated init_xml_attribute() Made charges to translate XML values into logic for each variable --- xml_converter/doc/category/category.md | 2 +- .../menu/{is_seperator.md => is_separator.md} | 6 +- xml_converter/doc/position/position.md | 2 +- .../doc/rendering/map_display_size.md | 2 +- xml_converter/doc/trail_data/trail_data.md | 2 +- .../doc/trail_data/trail_data_map_id.md | 2 +- xml_converter/doc/trigger/guid.md | 2 +- xml_converter/doc/trigger/hide_category.md | 2 +- xml_converter/doc/trigger/show_category.md | 2 +- xml_converter/doc/trigger/toggle_category.md | 2 +- xml_converter/generators/code_generator.py | 88 ++++-- .../cpp_templates/attribute_template.hpp | 5 +- .../cpp_templates/class_template.cpp | 55 ++++ .../cpp_templates/class_template.hpp | 6 +- .../cpp_templates/compoundvalue.cpp | 32 ++ .../generators/cpp_templates/enum.cpp | 29 ++ .../cpp_templates/multiflagvalue.cpp | 34 ++ xml_converter/src/attribute/color.cpp | 2 +- xml_converter/src/attribute/color.hpp | 2 +- .../src/attribute/cull_chirality.cpp | 17 +- .../src/attribute/cull_chirality.hpp | 3 +- .../src/attribute/euler_rotation.cpp | 20 +- .../src/attribute/euler_rotation.hpp | 3 +- .../src/attribute/festival_filter.cpp | 40 ++- .../src/attribute/festival_filter.hpp | 3 +- xml_converter/src/attribute/image.cpp | 2 +- xml_converter/src/attribute/image.hpp | 2 +- .../src/attribute/map_type_filter.cpp | 92 +++++- .../src/attribute/map_type_filter.hpp | 3 +- .../src/attribute/marker_category.cpp | 13 + ...markercategory.hpp => marker_category.hpp} | 5 +- xml_converter/src/attribute/mount_filter.cpp | 50 ++- xml_converter/src/attribute/mount_filter.hpp | 3 +- xml_converter/src/attribute/position.cpp | 29 +- xml_converter/src/attribute/position.hpp | 3 +- .../src/attribute/profession_filter.cpp | 42 ++- .../src/attribute/profession_filter.hpp | 3 +- .../src/attribute/reset_behavior.cpp | 69 +++++ .../src/attribute/reset_behavior.hpp | 3 +- .../src/attribute/specialization_filter.cpp | 292 +++++++++++++++++- .../src/attribute/specialization_filter.hpp | 3 +- .../src/attribute/species_filter.cpp | 35 ++- .../src/attribute/species_filter.hpp | 3 +- xml_converter/src/attribute/trail_data.cpp | 14 + .../{traildata.hpp => trail_data.hpp} | 6 +- .../src/attribute/trail_data_map_id.cpp | 13 + .../src/attribute/trail_data_map_id.hpp | 15 + .../src/attribute/traildatamapid.hpp | 13 - xml_converter/src/attribute/unique_id.cpp | 13 + .../attribute/{uniqueid.hpp => unique_id.hpp} | 6 +- xml_converter/src/category.cpp | 63 ++-- xml_converter/src/category.hpp | 5 +- xml_converter/src/icon.cpp | 200 ++++++++++++ xml_converter/src/icon.hpp | 7 +- xml_converter/src/trail.cpp | 120 ++++++- xml_converter/src/trail.hpp | 11 +- xml_converter/src/xml_converter.cpp | 10 +- 57 files changed, 1394 insertions(+), 117 deletions(-) rename xml_converter/doc/menu/{is_seperator.md => is_separator.md} (74%) create mode 100644 xml_converter/generators/cpp_templates/class_template.cpp create mode 100644 xml_converter/generators/cpp_templates/compoundvalue.cpp create mode 100644 xml_converter/generators/cpp_templates/enum.cpp create mode 100644 xml_converter/generators/cpp_templates/multiflagvalue.cpp create mode 100644 xml_converter/src/attribute/marker_category.cpp rename xml_converter/src/attribute/{markercategory.hpp => marker_category.hpp} (53%) create mode 100644 xml_converter/src/attribute/reset_behavior.cpp create mode 100644 xml_converter/src/attribute/trail_data.cpp rename xml_converter/src/attribute/{traildata.hpp => trail_data.hpp} (50%) create mode 100644 xml_converter/src/attribute/trail_data_map_id.cpp create mode 100644 xml_converter/src/attribute/trail_data_map_id.hpp delete mode 100644 xml_converter/src/attribute/traildatamapid.hpp create mode 100644 xml_converter/src/attribute/unique_id.cpp rename xml_converter/src/attribute/{uniqueid.hpp => unique_id.hpp} (52%) diff --git a/xml_converter/doc/category/category.md b/xml_converter/doc/category/category.md index 91e68742..5be245c9 100644 --- a/xml_converter/doc/category/category.md +++ b/xml_converter/doc/category/category.md @@ -1,7 +1,7 @@ --- name: Category type: Custom -class: MarkerCategory +class: Marker_Category applies_to: [Icon, Trail] xml_fields: [Type, Category] protobuf_field: category diff --git a/xml_converter/doc/menu/is_seperator.md b/xml_converter/doc/menu/is_separator.md similarity index 74% rename from xml_converter/doc/menu/is_seperator.md rename to xml_converter/doc/menu/is_separator.md index 3b21bbe5..90caec29 100644 --- a/xml_converter/doc/menu/is_seperator.md +++ b/xml_converter/doc/menu/is_separator.md @@ -1,9 +1,9 @@ --- -name: Is Seperator +name: Is Separator type: Boolean applies_to: [Category] -xml_fields: [IsSeperator] -protobuf_field: is_seperator +xml_fields: [IsSeparator] +protobuf_field: is_separator compatability: [TacO, BlishHUD, Burrito] --- diff --git a/xml_converter/doc/position/position.md b/xml_converter/doc/position/position.md index 1c60fb4d..073b1fa3 100644 --- a/xml_converter/doc/position/position.md +++ b/xml_converter/doc/position/position.md @@ -16,7 +16,7 @@ components: - name: Y Position type: Float32 - xml_fields: [YPos, PositionX] + xml_fields: [YPos, PositionY] protobuf_field: "y" compatability: [TacO, Burrito, BlishHUD] diff --git a/xml_converter/doc/rendering/map_display_size.md b/xml_converter/doc/rendering/map_display_size.md index f8f022ab..dbd4f0c0 100644 --- a/xml_converter/doc/rendering/map_display_size.md +++ b/xml_converter/doc/rendering/map_display_size.md @@ -1,7 +1,7 @@ --- name: Map Display Size type: Int32 -applies_to: [Icon] +applies_to: [Icon, Trail] xml_fields: [MapDisplaySize] protobuf_field: map_display_size compatability: [TacO, BlishHUD, Burrito] diff --git a/xml_converter/doc/trail_data/trail_data.md b/xml_converter/doc/trail_data/trail_data.md index 67169db0..f6d80a36 100644 --- a/xml_converter/doc/trail_data/trail_data.md +++ b/xml_converter/doc/trail_data/trail_data.md @@ -1,7 +1,7 @@ --- name: Trail Data type: Custom -class: TrailData +class: Trail_Data xml_fields: ["TrailData"] protobuf_field: traildata side_effects: [Map ID] diff --git a/xml_converter/doc/trail_data/trail_data_map_id.md b/xml_converter/doc/trail_data/trail_data_map_id.md index 7d2c8773..c9b74604 100644 --- a/xml_converter/doc/trail_data/trail_data_map_id.md +++ b/xml_converter/doc/trail_data/trail_data_map_id.md @@ -1,7 +1,7 @@ --- name: Trail Data Map ID type: Custom -class: TrailDataMapId +class: Trail_Data_Map_Id xml_fields: ["TrailData"] protobuf_field: map_id applies_to: [Trail] diff --git a/xml_converter/doc/trigger/guid.md b/xml_converter/doc/trigger/guid.md index 625b22bf..ea013569 100644 --- a/xml_converter/doc/trigger/guid.md +++ b/xml_converter/doc/trigger/guid.md @@ -1,7 +1,7 @@ --- name: GUID type: Custom -class: UniqueId +class: Unique_Id xml_fields: ["GUID"] applies_to: ["Icon", "Trail"] protobuf_field: "guid" diff --git a/xml_converter/doc/trigger/hide_category.md b/xml_converter/doc/trigger/hide_category.md index 1df6652b..0f7ca823 100644 --- a/xml_converter/doc/trigger/hide_category.md +++ b/xml_converter/doc/trigger/hide_category.md @@ -1,7 +1,7 @@ --- name: Hide Category type: Custom -class: MarkerCategory +class: Marker_Category applies_to: [Icon] xml_fields: [Hide] protobuf_field: trigger.action_hide_category diff --git a/xml_converter/doc/trigger/show_category.md b/xml_converter/doc/trigger/show_category.md index 3bb542fb..63126dfc 100644 --- a/xml_converter/doc/trigger/show_category.md +++ b/xml_converter/doc/trigger/show_category.md @@ -1,7 +1,7 @@ --- name: Show Category type: Custom -class: MarkerCategory +class: Marker_Category applies_to: [Icon] xml_fields: [Show] protobuf_field: trigger.action_show_category diff --git a/xml_converter/doc/trigger/toggle_category.md b/xml_converter/doc/trigger/toggle_category.md index 8d73e457..823f592a 100644 --- a/xml_converter/doc/trigger/toggle_category.md +++ b/xml_converter/doc/trigger/toggle_category.md @@ -1,7 +1,7 @@ --- name: Toggle Category type: Custom -class: MarkerCategory +class: Marker_Category applies_to: [Icon] xml_fields: [Toggle] protobuf_field: trigger.action_toggle_category diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 34b84b93..104b192a 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -252,6 +252,8 @@ class FieldRow: } + + class Generator: data: Dict[str, Document] = {} @@ -284,30 +286,45 @@ def write_cpp_classes(self, output_directory: str) -> None: print("Writing XML Node Cpp Classes") file_loader = FileSystemLoader('cpp_templates') env = Environment(loader=file_loader) - template = env.get_template("class_template.hpp") attribute_names: Dict[str, str] = {} - + template: Dict[str, Any] = { + "header_template": env.get_template("class_template.hpp"), + "code_template": env.get_template("class_template.cpp"), + } + cpp_classes: Dict[str, str] = { + "Category": "MarkerCategory", + "Icon": "POI", + "Trail": "Trail" + } for filepath in self.data.keys(): filename = os.path.basename(filepath) attribute_names[filepath] = filename.split(".md")[0] - cpp_classes = ["Category", "Icon", "Trail"] - for cpp_class in cpp_classes: metadata: Dict[str, SchemaType] = {} for attribute_name in attribute_names: metadata[attribute_name] = self.data[attribute_name].metadata + attribute_variables, cpp_include_paths = self.generate_cpp_variable_data(metadata, cpp_class, attribute_names) with open(os.path.join(output_directory, lowercase(cpp_class) + ".hpp"), 'w') as f: - f.write(template.render( + f.write(template["header_template"].render( cpp_class=cpp_class, attribute_variables=sorted(attribute_variables), cpp_include_paths=sorted(cpp_include_paths), )) + with open(os.path.join(output_directory, lowercase(cpp_class) + ".cpp"), 'w') as f: + f.write(template["code_template"].render( + cpp_class=cpp_class, + cpp_class_header=lowercase(cpp_class), + xml_class_name=cpp_classes[cpp_class], + attribute_variables=sorted(attribute_variables), + enumerate=enumerate, + )) + ############################################################################ # generate_cpp_variable_data # @@ -320,11 +337,12 @@ def generate_cpp_variable_data( metadata: Dict[str, SchemaType], doc_type: str, attribute_names: Dict[str, str] = {} - ) -> Tuple[List[Tuple[str, str]], Set[str]]: + ) -> Tuple[List[Tuple[str, str, str, List[str]]], Set[str]]: - attribute_variables: List[Tuple[str, str]] = [] + attribute_variables: List[Tuple[str, str, str, List[str]]] = [] cpp_include_paths: Set[str] = set() attribute_name: str = "" + xml_fields: List[str] = [] for fieldkey, field in metadata.items(): for x in attribute_names: @@ -332,23 +350,34 @@ def generate_cpp_variable_data( attribute_name = attribute_names[x] if doc_type in field['applies_to']: + xml_fields = [] if field['type'] in doc_type_to_cpp_type: cpp_type = doc_type_to_cpp_type[field['type']] - cpp_include_paths.add(cpp_type) + class_name = cpp_type elif field['type'] == "Custom": - cpp_type = field['class'] - cpp_include_paths.add(lowercase(cpp_type)) + cpp_type = capitalize(field['class'], delimiter="") + class_name = lowercase(field['class'], delimiter="_") elif field['type'] in ["Enum", "MultiflagValue", "CompoundValue"]: cpp_type = capitalize(attribute_name, delimiter="") - cpp_include_paths.add(attribute_name) - + class_name = attribute_name else: raise ValueError("Unexpected type {field_type} for attribute {attribute_name}".format( field_type=field['type'], attribute_name=attribute_name, )) - attribute_variables.append((attribute_name, cpp_type)) + cpp_include_paths.add(class_name) + + if field['type'] == "CompoundValue": + for component in field['components']: + for item in component['xml_fields']: + xml_fields.append(lowercase(item, delimiter="")) + else: + for item in field['xml_fields']: + xml_fields.append(lowercase(item, delimiter="")) + + + attribute_variables.append((attribute_name, cpp_type, class_name, xml_fields)) return attribute_variables, cpp_include_paths @@ -363,11 +392,16 @@ def write_attribute(self, output_directory: str) -> None: file_loader = FileSystemLoader('cpp_templates') env = Environment(loader=file_loader) - template = env.get_template("attribute_template.hpp") attribute_names: Dict[str, str] = {} metadata: Dict[str, SchemaType] = {} - attribute_variables: List[Tuple[str, str]] = [] - + attribute_variables: List[Tuple[str, List[str], str]] = [] + xml_fields: List[str] = [] + template: Dict[str, Any] = { + "attribute": env.get_template("attribute_template.hpp"), + "MultiflagValue": env.get_template("multiflagvalue.cpp"), + "CompoundValue": env.get_template("compoundvalue.cpp"), + "Enum": env.get_template("enum.cpp"), + } for filepath in self.data.keys(): filename = os.path.basename(filepath) @@ -380,33 +414,43 @@ def write_attribute(self, output_directory: str) -> None: if metadata[filepath]['type'] == "MultiflagValue": for flag in metadata[filepath]['flags']: - attribute_variables.append((flag, "bool")) + attribute_variables.append((flag, metadata[filepath]['flags'][flag], "bool")) elif metadata[filepath]['type'] == "CompoundValue": - for component in metadata[filepath]['components']: + xml_fields = [] if component['type'] not in doc_type_to_cpp_type: raise ValueError("Unexpected type for component. Look at markdown file {attribute_name}".format( attribute_name=attribute_name )) - attribute_variables.append((lowercase(component['name'], delimiter="_"), doc_type_to_cpp_type[component['type']])) + for item in component['xml_fields']: + xml_fields.append(lowercase(item, delimiter="")) + attribute_variables.append((lowercase(component['name'], delimiter="_"), xml_fields, doc_type_to_cpp_type[component['type']])) elif metadata[filepath]['type'] == "Enum": for value in metadata[filepath]['values']: - attribute_variables.append((value,metadata[filepath]['values'][value])) + attribute_variables.append((value,metadata[filepath]['values'][value],"str")) else: continue with open(os.path.join(output_directory, attribute_name + ".hpp"), 'w') as f: - f.write(template.render( + f.write(template["attribute"].render( attribute_name=attribute_name, attribute_variables=sorted(attribute_variables), class_name=capitalize(attribute_name, delimiter=""), - function_name=lowercase(attribute_name, delimiter="_"), type=metadata[filepath]['type'], )) + with open(os.path.join(output_directory, attribute_name + ".cpp"), 'w') as f: + f.write(template[metadata[filepath]['type']].render( + attribute_name=attribute_name, + attribute_variables=attribute_variables, + class_name=capitalize(attribute_name, delimiter=""), + enumerate=enumerate, + )) + + ############################################################################ # write_webdocs # diff --git a/xml_converter/generators/cpp_templates/attribute_template.hpp b/xml_converter/generators/cpp_templates/attribute_template.hpp index 70b2160a..a19f5095 100644 --- a/xml_converter/generators/cpp_templates/attribute_template.hpp +++ b/xml_converter/generators/cpp_templates/attribute_template.hpp @@ -19,10 +19,11 @@ enum {{class_name}} { class {{class_name}} { public: {%- for attribute_variable in attribute_variables: %} - {{attribute_variable[1]}} {{attribute_variable[0]}}; + {{attribute_variable[2]}} {{attribute_variable[0]}}; {%- endfor %} virtual string classname() { return "{{class_name}}"; }; }; {%- endif %} -{{class_name}} parse_{{function_name}}(rapidxml::xml_attribute<>* input, vector *errors); +{{class_name}} parse_{{attribute_name}}(rapidxml::xml_attribute<>* input, vector *errors); + \ No newline at end of file diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp new file mode 100644 index 00000000..d6810b3b --- /dev/null +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -0,0 +1,55 @@ +#include "{{cpp_class_header}}.hpp" + +using namespace std; + +string {{cpp_class}}::classname() { + return "{{xml_class_name}}"; +} +{%- if cpp_class == "Category": %} +void Category::init_from_xml(rapidxml::xml_node<>* node, vector *errors) { + for (rapidxml::xml_attribute<>* attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()) { + bool is_icon_value = false; + bool is_trail_value = false; + + for (rapidxml::xml_attribute<>* attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()) { + is_icon_value |= this->default_icon.init_xml_attribute(attribute, errors); + is_trail_value |= this->default_trail.init_xml_attribute(attribute, errors); + } + + if (init_xml_attribute(attribute, errors)) {} + else if (is_icon_value || is_trail_value) {} + else { + errors->push_back(new XMLAttributeNameError("Unknown " + this->classname() + " attribute ", attribute)); + } + } +} +{%- endif %} +bool {{cpp_class}}::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors) { + string attributename; + attributename = normalize_type_name(get_attribute_name(attribute)); +{%-for n, attribute_variable in enumerate(attribute_variables)%} + {%-for i, value in enumerate(attribute_variable[3])%} + {%-if i == 0 and n == 0:%} + if (attributename == "{{value}}") { + this->{{attribute_variables[n][0]}} = parse_{{attribute_variables[n][2]}}(attribute, errors); + } + {%- else: %} + else if (attributename == "{{value}}") { + this->{{attribute_variables[n][0]}} = parse_{{attribute_variables[n][2]}}(attribute, errors); + } + {%- endif %} + {%- endfor %} +{%- endfor %} + {%- if cpp_class == "Category": %} + else if (attributename == "POI") { + this->default_icon.init_xml_attribute(attribute, errors); + } + else if (attributename == "Trail"){ + this->default_trail.init_xml_attribute(attribute, errors); + } + {%- endif %} + else { + return false; + } + return true; +} diff --git a/xml_converter/generators/cpp_templates/class_template.hpp b/xml_converter/generators/cpp_templates/class_template.hpp index a0c85bee..b481d2d1 100644 --- a/xml_converter/generators/cpp_templates/class_template.hpp +++ b/xml_converter/generators/cpp_templates/class_template.hpp @@ -29,13 +29,17 @@ class {{cpp_class}}: public Parseable { public: {%- for attribute_variable in attribute_variables: %} {{attribute_variable[1]}} {{attribute_variable[0]}}; + {%- endfor %} {%- if cpp_class == "Category": %} map children; Icon default_icon; Trail default_trail; - {%- endif %} + void init_from_xml(rapidxml::xml_node<>* node, vector *errors); + {%- endif %} virtual string classname(); + bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors); + }; \ No newline at end of file diff --git a/xml_converter/generators/cpp_templates/compoundvalue.cpp b/xml_converter/generators/cpp_templates/compoundvalue.cpp new file mode 100644 index 00000000..efd9086d --- /dev/null +++ b/xml_converter/generators/cpp_templates/compoundvalue.cpp @@ -0,0 +1,32 @@ +#include "{{attribute_name}}.hpp" + +#include +#include + +#include "../rapid_helpers.hpp" +#include "../rapidxml-1.13/rapidxml.hpp" + +{{class_name}} parse_{{attribute_name}}(rapidxml::xml_attribute<>* input, vector *){ + {{class_name}} {{attribute_name}}; + vector compound_values; + string attributename; + attributename = get_attribute_name(input); + +{%-for n, attribute_variable in enumerate(attribute_variables)%} + {%-for i, value in enumerate(attribute_variable[1])%} + {%-if i == 0 and n == 0:%} + if (attributename == "{{value}}") { + {{attribute_name}}.{{attribute_variables[n][0]}} = std::stof(get_attribute_value(input)); + } + {%- else %} + else if (attributename == "{{value}}") { + {{attribute_name}}.{{attribute_variables[n][0]}} = std::stof(get_attribute_value(input)); + } + {%- endif %} + + {%- endfor %} +{%- endfor %} + + return {{attribute_name}}; + +} \ No newline at end of file diff --git a/xml_converter/generators/cpp_templates/enum.cpp b/xml_converter/generators/cpp_templates/enum.cpp new file mode 100644 index 00000000..ca335836 --- /dev/null +++ b/xml_converter/generators/cpp_templates/enum.cpp @@ -0,0 +1,29 @@ +#include "{{attribute_name}}.hpp" + +#include +#include + +#include "../rapid_helpers.hpp" +#include "../rapidxml-1.13/rapidxml.hpp" + +{{class_name}} parse_{{attribute_name}}(rapidxml::xml_attribute<>* input, vector *errors){ + {{class_name}} {{attribute_name}}; +{%-for n, attribute_variable in enumerate(attribute_variables)%} + {%-for i, value in enumerate(attribute_variable[1])%} + {%-if i == 0 and n == 0:%} + if (get_attribute_value(input) == "{{value}}") { + {{attribute_name}} = {{class_name}}::{{attribute_variable[0]}}; + } + {%- else: %} + else if (get_attribute_value(input) == "{{value}}") { + {{attribute_name}} = {{class_name}}::{{attribute_variable[0]}}; + } + {%- endif %} + {%- endfor %} + +{%- endfor %} + else {errors->push_back(new XMLAttributeValueError("Found a value that was not in the Enum", input)); + {{attribute_name}} = {{class_name}}::{{attribute_variables[0][0]}}; + } + return {{attribute_name}}; +} diff --git a/xml_converter/generators/cpp_templates/multiflagvalue.cpp b/xml_converter/generators/cpp_templates/multiflagvalue.cpp new file mode 100644 index 00000000..072db5a4 --- /dev/null +++ b/xml_converter/generators/cpp_templates/multiflagvalue.cpp @@ -0,0 +1,34 @@ +#include "{{attribute_name}}.hpp" + +#include +#include + +#include "../rapid_helpers.hpp" +#include "../rapidxml-1.13/rapidxml.hpp" + +{{class_name}} parse_{{attribute_name}}(rapidxml::xml_attribute<>* input, vector *errors){ + {{class_name}} {{attribute_name}}; + vector flag_values; + flag_values = split(get_attribute_value(input), ","); + + for (string flag_value : flag_values) { +{%-for n, attribute_variable in enumerate(attribute_variables)%} + {%-for i, value in enumerate(attribute_variable[1])%} + {%-if i == 0 and n == 0:%} + if (flag_value == "{{value}}") { + {{attribute_name}}.{{attribute_variable[0]}} = true; + } + {%- else: %} + else if (flag_value == "{{value}}") { + {{attribute_name}}.{{attribute_variable[0]}} = true; + } + {%- endif %} + {%- endfor %} +{%- endfor %} + else {errors->push_back(new XMLAttributeValueError("Found a value that was not in the class", input)); + continue; + } + } + return {{attribute_name}}; + +} diff --git a/xml_converter/src/attribute/color.cpp b/xml_converter/src/attribute/color.cpp index 972f7a5b..640c647d 100644 --- a/xml_converter/src/attribute/color.cpp +++ b/xml_converter/src/attribute/color.cpp @@ -8,7 +8,7 @@ using namespace std; -Color parse_Color(rapidxml::xml_attribute<>* input, vector *) { +Color parse_color(rapidxml::xml_attribute<>* input, vector *) { Color color; color.hex = get_attribute_value(input); return color; diff --git a/xml_converter/src/attribute/color.hpp b/xml_converter/src/attribute/color.hpp index a7bf402b..7b788402 100644 --- a/xml_converter/src/attribute/color.hpp +++ b/xml_converter/src/attribute/color.hpp @@ -13,4 +13,4 @@ class Color { string hex; }; -Color parse_Color(rapidxml::xml_attribute<>* input, vector *errors); +Color parse_color(rapidxml::xml_attribute<>* input, vector *errors); diff --git a/xml_converter/src/attribute/cull_chirality.cpp b/xml_converter/src/attribute/cull_chirality.cpp index 11f435cd..8d72731d 100644 --- a/xml_converter/src/attribute/cull_chirality.cpp +++ b/xml_converter/src/attribute/cull_chirality.cpp @@ -6,4 +6,19 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" -using namespace std; +CullChirality parse_cull_chirality(rapidxml::xml_attribute<>* input, vector *errors){ + CullChirality cull_chirality; + if (get_attribute_value(input) == "None") { + cull_chirality = CullChirality::none; + } + else if (get_attribute_value(input) == "Clockwise") { + cull_chirality = CullChirality::clockwise; + } + else if (get_attribute_value(input) == "CounterClockwise") { + cull_chirality = CullChirality::counter_clockwise; + } + else {errors->push_back(new XMLAttributeValueError("Found a value that was not in the Enum", input)); + cull_chirality = CullChirality::none; + } + return cull_chirality; +} \ No newline at end of file diff --git a/xml_converter/src/attribute/cull_chirality.hpp b/xml_converter/src/attribute/cull_chirality.hpp index 6ae3794a..4c64f594 100644 --- a/xml_converter/src/attribute/cull_chirality.hpp +++ b/xml_converter/src/attribute/cull_chirality.hpp @@ -13,4 +13,5 @@ enum CullChirality { counter_clockwise, none, }; -CullChirality parse_cull_chirality(rapidxml::xml_attribute<>* input, vector *errors); \ No newline at end of file +CullChirality parse_cull_chirality(rapidxml::xml_attribute<>* input, vector *errors); + \ No newline at end of file diff --git a/xml_converter/src/attribute/euler_rotation.cpp b/xml_converter/src/attribute/euler_rotation.cpp index aafbc384..86fac7bd 100644 --- a/xml_converter/src/attribute/euler_rotation.cpp +++ b/xml_converter/src/attribute/euler_rotation.cpp @@ -5,6 +5,22 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" -#include "../string_helper.hpp" -using namespace std; +EulerRotation parse_euler_rotation(rapidxml::xml_attribute<>* input, vector *){ + EulerRotation euler_rotation; + vector compound_values; + string attributename; + attributename = get_attribute_name(input); + if (attributename == "rotatex") { + euler_rotation.x_rotation = std::stof(get_attribute_value(input)); + } + else if (attributename == "rotatey") { + euler_rotation.y_rotation = std::stof(get_attribute_value(input)); + } + else if (attributename == "rotatez") { + euler_rotation.z_rotation = std::stof(get_attribute_value(input)); + } + + return euler_rotation; + +} \ No newline at end of file diff --git a/xml_converter/src/attribute/euler_rotation.hpp b/xml_converter/src/attribute/euler_rotation.hpp index 3ddab641..726b1109 100644 --- a/xml_converter/src/attribute/euler_rotation.hpp +++ b/xml_converter/src/attribute/euler_rotation.hpp @@ -16,4 +16,5 @@ class EulerRotation { virtual string classname() { return "EulerRotation"; }; }; -EulerRotation parse_euler_rotation(rapidxml::xml_attribute<>* input, vector *errors); \ No newline at end of file +EulerRotation parse_euler_rotation(rapidxml::xml_attribute<>* input, vector *errors); + \ No newline at end of file diff --git a/xml_converter/src/attribute/festival_filter.cpp b/xml_converter/src/attribute/festival_filter.cpp index 21d84f31..449d2761 100644 --- a/xml_converter/src/attribute/festival_filter.cpp +++ b/xml_converter/src/attribute/festival_filter.cpp @@ -3,7 +3,43 @@ #include #include +#include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" -#include "../string_helper.hpp" -using namespace std; \ No newline at end of file +FestivalFilter parse_festival_filter(rapidxml::xml_attribute<>* input, vector *errors){ + FestivalFilter festival_filter; + vector flag_values; + flag_values = split(get_attribute_value(input), ","); + + for (string flag_value : flag_values) { + if (flag_value == "DragonBash") { + festival_filter.dragonbash = true; + } + else if (flag_value == "FestivalOfTheFourWinds") { + festival_filter.festival_of_the_four_winds = true; + } + else if (flag_value == "Halloween") { + festival_filter.halloween = true; + } + else if (flag_value == "LunarNewYear") { + festival_filter.lunar_new_year = true; + } + else if (flag_value == "SuperAdventureFestival") { + festival_filter.super_adventure_festival = true; + } + else if (flag_value == "SuperAdventureBox") { + festival_filter.super_adventure_festival = true; + } + else if (flag_value == "Wintersday") { + festival_filter.wintersday = true; + } + else if (flag_value == "None") { + festival_filter.none = true; + } + else {errors->push_back(new XMLAttributeValueError("Found a value that was not in the class", input)); + continue; + } + } + return festival_filter; + +} \ No newline at end of file diff --git a/xml_converter/src/attribute/festival_filter.hpp b/xml_converter/src/attribute/festival_filter.hpp index 30085b2b..7fac8c52 100644 --- a/xml_converter/src/attribute/festival_filter.hpp +++ b/xml_converter/src/attribute/festival_filter.hpp @@ -20,4 +20,5 @@ class FestivalFilter { virtual string classname() { return "FestivalFilter"; }; }; -FestivalFilter parse_festival_filter(rapidxml::xml_attribute<>* input, vector *errors); \ No newline at end of file +FestivalFilter parse_festival_filter(rapidxml::xml_attribute<>* input, vector *errors); + \ No newline at end of file diff --git a/xml_converter/src/attribute/image.cpp b/xml_converter/src/attribute/image.cpp index de4907c5..6e9188d5 100644 --- a/xml_converter/src/attribute/image.cpp +++ b/xml_converter/src/attribute/image.cpp @@ -7,7 +7,7 @@ using namespace std; -Image parse_Image(rapidxml::xml_attribute<>* input, vector *) { +Image parse_image(rapidxml::xml_attribute<>* input, vector *) { Image image; image.path = get_attribute_value(input); image.original_token = input; diff --git a/xml_converter/src/attribute/image.hpp b/xml_converter/src/attribute/image.hpp index b0d66c63..e500eed7 100644 --- a/xml_converter/src/attribute/image.hpp +++ b/xml_converter/src/attribute/image.hpp @@ -14,5 +14,5 @@ class Image { rapidxml::xml_attribute<>* original_token; }; -Image parse_Image(rapidxml::xml_attribute<>* input, vector *errors); +Image parse_image(rapidxml::xml_attribute<>* input, vector *errors); diff --git a/xml_converter/src/attribute/map_type_filter.cpp b/xml_converter/src/attribute/map_type_filter.cpp index be687606..28b0054b 100644 --- a/xml_converter/src/attribute/map_type_filter.cpp +++ b/xml_converter/src/attribute/map_type_filter.cpp @@ -1,3 +1,93 @@ #include "map_type_filter.hpp" -using namespace std; \ No newline at end of file +#include +#include + +#include "../rapid_helpers.hpp" +#include "../rapidxml-1.13/rapidxml.hpp" + +MapTypeFilter parse_map_type_filter(rapidxml::xml_attribute<>* input, vector *errors){ + MapTypeFilter map_type_filter; + vector flag_values; + flag_values = split(get_attribute_value(input), ","); + + for (string flag_value : flag_values) { + if (flag_value == "Unknown") { + map_type_filter.unknown_map = true; + } + else if (flag_value == "redirect") { + map_type_filter.redirect_map = true; + } + else if (flag_value == "charactercreate") { + map_type_filter.character_create_map = true; + } + else if (flag_value == "pvp") { + map_type_filter.pvp_map = true; + } + else if (flag_value == "gvg") { + map_type_filter.gvg_map = true; + } + else if (flag_value == "instance") { + map_type_filter.instance_map = true; + } + else if (flag_value == "public") { + map_type_filter.public_map = true; + } + else if (flag_value == "tournament") { + map_type_filter.tournament_map = true; + } + else if (flag_value == "tutorial") { + map_type_filter.tutorial_map = true; + } + else if (flag_value == "usertournament") { + map_type_filter.user_tournament_map = true; + } + else if (flag_value == "center") { + map_type_filter.center_map = true; + } + else if (flag_value == "eternalbattlegrounds") { + map_type_filter.eternal_battlegrounds_map = true; + } + else if (flag_value == "bluehome") { + map_type_filter.bluehome_map = true; + } + else if (flag_value == "blueborderlands") { + map_type_filter.blue_borderlands_map = true; + } + else if (flag_value == "greenhome") { + map_type_filter.green_home_map = true; + } + else if (flag_value == "greenborderlands") { + map_type_filter.green_borderlands_map = true; + } + else if (flag_value == "redhome") { + map_type_filter.red_home_map = true; + } + else if (flag_value == "redborderlands") { + map_type_filter.red_borderlands_map = true; + } + else if (flag_value == "fortunesvale") { + map_type_filter.fortunes_vale_map = true; + } + else if (flag_value == "jumppuzzle") { + map_type_filter.jump_puzzle_map = true; + } + else if (flag_value == "obsidiansanctum") { + map_type_filter.obsidian_sanctum_map = true; + } + else if (flag_value == "edgeofthemists") { + map_type_filter.edge_of_the_mists_map = true; + } + else if (flag_value == "publicmini") { + map_type_filter.public_mini_map = true; + } + else if (flag_value == "wvwlounge") { + map_type_filter.wvw_lounge_map = true; + } + else {errors->push_back(new XMLAttributeValueError("Found a value that was not in the class", input)); + continue; + } + } + return map_type_filter; + +} \ No newline at end of file diff --git a/xml_converter/src/attribute/map_type_filter.hpp b/xml_converter/src/attribute/map_type_filter.hpp index ea7ba867..994c60ad 100644 --- a/xml_converter/src/attribute/map_type_filter.hpp +++ b/xml_converter/src/attribute/map_type_filter.hpp @@ -37,4 +37,5 @@ class MapTypeFilter { virtual string classname() { return "MapTypeFilter"; }; }; -MapTypeFilter parse_map_type_filter(rapidxml::xml_attribute<>* input, vector *errors); \ No newline at end of file +MapTypeFilter parse_map_type_filter(rapidxml::xml_attribute<>* input, vector *errors); + \ No newline at end of file diff --git a/xml_converter/src/attribute/marker_category.cpp b/xml_converter/src/attribute/marker_category.cpp new file mode 100644 index 00000000..ce396540 --- /dev/null +++ b/xml_converter/src/attribute/marker_category.cpp @@ -0,0 +1,13 @@ +#include "marker_category.hpp" + +#include +#include + +#include "../rapid_helpers.hpp" +#include "../rapidxml-1.13/rapidxml.hpp" + +MarkerCategory parse_marker_category(rapidxml::xml_attribute<>* input, vector *) { + MarkerCategory marker_category; + marker_category.category = get_attribute_value(input); + return marker_category; +} \ No newline at end of file diff --git a/xml_converter/src/attribute/markercategory.hpp b/xml_converter/src/attribute/marker_category.hpp similarity index 53% rename from xml_converter/src/attribute/markercategory.hpp rename to xml_converter/src/attribute/marker_category.hpp index 759d3400..ea4f3ea3 100644 --- a/xml_converter/src/attribute/markercategory.hpp +++ b/xml_converter/src/attribute/marker_category.hpp @@ -7,7 +7,8 @@ #include "../rapidxml-1.13/rapidxml.hpp" class MarkerCategory { - + public: + string category; }; -MarkerCategory parse_MarkerCategory(rapidxml::xml_attribute<>* input, vector *errors); +MarkerCategory parse_marker_category(rapidxml::xml_attribute<>* input, vector *errors); diff --git a/xml_converter/src/attribute/mount_filter.cpp b/xml_converter/src/attribute/mount_filter.cpp index 2efd1e95..6c85f570 100644 --- a/xml_converter/src/attribute/mount_filter.cpp +++ b/xml_converter/src/attribute/mount_filter.cpp @@ -1,3 +1,51 @@ #include "mount_filter.hpp" -using namespace std; \ No newline at end of file +#include +#include + +#include "../rapid_helpers.hpp" +#include "../rapidxml-1.13/rapidxml.hpp" + +MountFilter parse_mount_filter(rapidxml::xml_attribute<>* input, vector *errors){ + MountFilter mount_filter; + vector flag_values; + flag_values = split(get_attribute_value(input), ","); + + for (string flag_value : flag_values) { + if (flag_value == "Raptor") { + mount_filter.raptor = true; + } + else if (flag_value == "Springer") { + mount_filter.springer = true; + } + else if (flag_value == "Skimmer") { + mount_filter.skimmer = true; + } + else if (flag_value == "Jackal") { + mount_filter.jackal = true; + } + else if (flag_value == "Griffon") { + mount_filter.griffon = true; + } + else if (flag_value == "RollerBeetle") { + mount_filter.roller_beetle = true; + } + else if (flag_value == "Warclaw") { + mount_filter.warclaw = true; + } + else if (flag_value == "Skyscale") { + mount_filter.skyscale = true; + } + else if (flag_value == "Skiff") { + mount_filter.skiff = true; + } + else if (flag_value == "SeigeTurtle") { + mount_filter.seige_turtle = true; + } + else {errors->push_back(new XMLAttributeValueError("Found a value that was not in the class", input)); + continue; + } + } + return mount_filter; + +} \ No newline at end of file diff --git a/xml_converter/src/attribute/mount_filter.hpp b/xml_converter/src/attribute/mount_filter.hpp index 48113c74..e0aecb29 100644 --- a/xml_converter/src/attribute/mount_filter.hpp +++ b/xml_converter/src/attribute/mount_filter.hpp @@ -23,4 +23,5 @@ class MountFilter { virtual string classname() { return "MountFilter"; }; }; -MountFilter parse_mount_filter(rapidxml::xml_attribute<>* input, vector *errors); \ No newline at end of file +MountFilter parse_mount_filter(rapidxml::xml_attribute<>* input, vector *errors); + \ No newline at end of file diff --git a/xml_converter/src/attribute/position.cpp b/xml_converter/src/attribute/position.cpp index d93b2286..5a1236f8 100644 --- a/xml_converter/src/attribute/position.cpp +++ b/xml_converter/src/attribute/position.cpp @@ -5,6 +5,31 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" -#include "../string_helper.hpp" -using namespace std; \ No newline at end of file +Position parse_position(rapidxml::xml_attribute<>* input, vector *){ + Position position; + vector compound_values; + string attributename; + attributename = get_attribute_name(input); + if (attributename == "xpos") { + position.x_position = std::stof(get_attribute_value(input)); + } + else if (attributename == "positionx") { + position.x_position = std::stof(get_attribute_value(input)); + } + else if (attributename == "ypos") { + position.y_position = std::stof(get_attribute_value(input)); + } + else if (attributename == "positiony") { + position.y_position = std::stof(get_attribute_value(input)); + } + else if (attributename == "zpos") { + position.z_position = std::stof(get_attribute_value(input)); + } + else if (attributename == "positionz") { + position.z_position = std::stof(get_attribute_value(input)); + } + + return position; + +} \ No newline at end of file diff --git a/xml_converter/src/attribute/position.hpp b/xml_converter/src/attribute/position.hpp index 36ddf9ca..307d193d 100644 --- a/xml_converter/src/attribute/position.hpp +++ b/xml_converter/src/attribute/position.hpp @@ -16,4 +16,5 @@ class Position { virtual string classname() { return "Position"; }; }; -Position parse_position(rapidxml::xml_attribute<>* input, vector *errors); \ No newline at end of file +Position parse_position(rapidxml::xml_attribute<>* input, vector *errors); + \ No newline at end of file diff --git a/xml_converter/src/attribute/profession_filter.cpp b/xml_converter/src/attribute/profession_filter.cpp index d3ded80e..3d41363b 100644 --- a/xml_converter/src/attribute/profession_filter.cpp +++ b/xml_converter/src/attribute/profession_filter.cpp @@ -5,6 +5,44 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" -#include "../string_helper.hpp" -using namespace std; \ No newline at end of file +ProfessionFilter parse_profession_filter(rapidxml::xml_attribute<>* input, vector *errors){ + ProfessionFilter profession_filter; + vector flag_values; + flag_values = split(get_attribute_value(input), ","); + + for (string flag_value : flag_values) { + if (flag_value == "Guardian") { + profession_filter.guardian = true; + } + else if (flag_value == "Warrior") { + profession_filter.warrior = true; + } + else if (flag_value == "Engineer") { + profession_filter.engineer = true; + } + else if (flag_value == "Ranger") { + profession_filter.ranger = true; + } + else if (flag_value == "Thief") { + profession_filter.thief = true; + } + else if (flag_value == "Elementalist") { + profession_filter.elementalist = true; + } + else if (flag_value == "Mesmer") { + profession_filter.mesmer = true; + } + else if (flag_value == "Necromancer") { + profession_filter.necromancer = true; + } + else if (flag_value == "Revenant") { + profession_filter.revenant = true; + } + else {errors->push_back(new XMLAttributeValueError("Found a value that was not in the class", input)); + continue; + } + } + return profession_filter; + +} \ No newline at end of file diff --git a/xml_converter/src/attribute/profession_filter.hpp b/xml_converter/src/attribute/profession_filter.hpp index 0e9b22ee..6b8f1b20 100644 --- a/xml_converter/src/attribute/profession_filter.hpp +++ b/xml_converter/src/attribute/profession_filter.hpp @@ -22,4 +22,5 @@ class ProfessionFilter { virtual string classname() { return "ProfessionFilter"; }; }; -ProfessionFilter parse_profession_filter(rapidxml::xml_attribute<>* input, vector *errors); \ No newline at end of file +ProfessionFilter parse_profession_filter(rapidxml::xml_attribute<>* input, vector *errors); + \ No newline at end of file diff --git a/xml_converter/src/attribute/reset_behavior.cpp b/xml_converter/src/attribute/reset_behavior.cpp new file mode 100644 index 00000000..6c8bc4a2 --- /dev/null +++ b/xml_converter/src/attribute/reset_behavior.cpp @@ -0,0 +1,69 @@ +#include "reset_behavior.hpp" + +#include +#include + +#include "../rapid_helpers.hpp" +#include "../rapidxml-1.13/rapidxml.hpp" + +ResetBehavior parse_reset_behavior(rapidxml::xml_attribute<>* input, vector *errors){ + ResetBehavior reset_behavior; + if (get_attribute_value(input) == "0") { + reset_behavior = ResetBehavior::always_visible; + } + else if (get_attribute_value(input) == "always_visible") { + reset_behavior = ResetBehavior::always_visible; + } + else if (get_attribute_value(input) == "1") { + reset_behavior = ResetBehavior::map_change; + } + else if (get_attribute_value(input) == "map_change") { + reset_behavior = ResetBehavior::map_change; + } + else if (get_attribute_value(input) == "2") { + reset_behavior = ResetBehavior::daily_reset; + } + else if (get_attribute_value(input) == "daily_reset") { + reset_behavior = ResetBehavior::daily_reset; + } + else if (get_attribute_value(input) == "3") { + reset_behavior = ResetBehavior::never; + } + else if (get_attribute_value(input) == "never") { + reset_behavior = ResetBehavior::never; + } + else if (get_attribute_value(input) == "4") { + reset_behavior = ResetBehavior::timer; + } + else if (get_attribute_value(input) == "timer") { + reset_behavior = ResetBehavior::timer; + } + else if (get_attribute_value(input) == "5") { + reset_behavior = ResetBehavior::map_reset; + } + else if (get_attribute_value(input) == "map_reset") { + reset_behavior = ResetBehavior::map_reset; + } + else if (get_attribute_value(input) == "6") { + reset_behavior = ResetBehavior::instance_change; + } + else if (get_attribute_value(input) == "instance_change") { + reset_behavior = ResetBehavior::instance_change; + } + else if (get_attribute_value(input) == "7") { + reset_behavior = ResetBehavior::daily_reset_per_character; + } + else if (get_attribute_value(input) == "daily_reset_per_character") { + reset_behavior = ResetBehavior::daily_reset_per_character; + } + else if (get_attribute_value(input) == "101") { + reset_behavior = ResetBehavior::weekly_reset; + } + else if (get_attribute_value(input) == "weekly_reset") { + reset_behavior = ResetBehavior::weekly_reset; + } + else {errors->push_back(new XMLAttributeValueError("Found a value that was not in the Enum", input)); + reset_behavior = ResetBehavior::always_visible; + } + return reset_behavior; +} \ No newline at end of file diff --git a/xml_converter/src/attribute/reset_behavior.hpp b/xml_converter/src/attribute/reset_behavior.hpp index b5d0f107..e9741e85 100644 --- a/xml_converter/src/attribute/reset_behavior.hpp +++ b/xml_converter/src/attribute/reset_behavior.hpp @@ -19,4 +19,5 @@ enum ResetBehavior { timer, weekly_reset, }; -ResetBehavior parse_reset_behavior(rapidxml::xml_attribute<>* input, vector *errors); \ No newline at end of file +ResetBehavior parse_reset_behavior(rapidxml::xml_attribute<>* input, vector *errors); + \ No newline at end of file diff --git a/xml_converter/src/attribute/specialization_filter.cpp b/xml_converter/src/attribute/specialization_filter.cpp index 9b505acc..b5de7bc2 100644 --- a/xml_converter/src/attribute/specialization_filter.cpp +++ b/xml_converter/src/attribute/specialization_filter.cpp @@ -1 +1,291 @@ -#include "specialization_filter.hpp" \ No newline at end of file +#include "specialization_filter.hpp" + +#include +#include + +#include "../rapid_helpers.hpp" +#include "../rapidxml-1.13/rapidxml.hpp" + +SpecializationFilter parse_specialization_filter(rapidxml::xml_attribute<>* input, vector *errors){ + SpecializationFilter specialization_filter; + vector flag_values; + flag_values = split(get_attribute_value(input), ","); + + for (string flag_value : flag_values) { + if (flag_value == "48") { + specialization_filter.elementalist_tempest = true; + } + else if (flag_value == "Tempest") { + specialization_filter.elementalist_tempest = true; + } + else if (flag_value == "43") { + specialization_filter.engineer_scrapper = true; + } + else if (flag_value == "Scrapper") { + specialization_filter.engineer_scrapper = true; + } + else if (flag_value == "27") { + specialization_filter.guardian_dragonhunter = true; + } + else if (flag_value == "Dragonhunter") { + specialization_filter.guardian_dragonhunter = true; + } + else if (flag_value == "40") { + specialization_filter.mesmer_chronomancer = true; + } + else if (flag_value == "Chronomancer") { + specialization_filter.mesmer_chronomancer = true; + } + else if (flag_value == "34") { + specialization_filter.necromancer_reaper = true; + } + else if (flag_value == "Reaper") { + specialization_filter.necromancer_reaper = true; + } + else if (flag_value == "5") { + specialization_filter.ranger_druid = true; + } + else if (flag_value == "Druid") { + specialization_filter.ranger_druid = true; + } + else if (flag_value == "52") { + specialization_filter.revenant_herald = true; + } + else if (flag_value == "Herald") { + specialization_filter.revenant_herald = true; + } + else if (flag_value == "7") { + specialization_filter.thief_daredevil = true; + } + else if (flag_value == "Daredevil") { + specialization_filter.thief_daredevil = true; + } + else if (flag_value == "18") { + specialization_filter.warrior_berserker = true; + } + else if (flag_value == "Berserker") { + specialization_filter.warrior_berserker = true; + } + else if (flag_value == "56") { + specialization_filter.elementalist_weaver = true; + } + else if (flag_value == "Weaver") { + specialization_filter.elementalist_weaver = true; + } + else if (flag_value == "57") { + specialization_filter.engineer_holosmith = true; + } + else if (flag_value == "Holosmith") { + specialization_filter.engineer_holosmith = true; + } + else if (flag_value == "62") { + specialization_filter.guardian_firebrand = true; + } + else if (flag_value == "Firebrand") { + specialization_filter.guardian_firebrand = true; + } + else if (flag_value == "59") { + specialization_filter.mesmer_mirage = true; + } + else if (flag_value == "Mirage") { + specialization_filter.mesmer_mirage = true; + } + else if (flag_value == "60") { + specialization_filter.necromancer_scourge = true; + } + else if (flag_value == "Scourge") { + specialization_filter.necromancer_scourge = true; + } + else if (flag_value == "55") { + specialization_filter.ranger_soulbeast = true; + } + else if (flag_value == "Soulbeast") { + specialization_filter.ranger_soulbeast = true; + } + else if (flag_value == "63") { + specialization_filter.revenant_renegade = true; + } + else if (flag_value == "Renegade") { + specialization_filter.revenant_renegade = true; + } + else if (flag_value == "58") { + specialization_filter.thief_deadeye = true; + } + else if (flag_value == "Deadeye") { + specialization_filter.thief_deadeye = true; + } + else if (flag_value == "61") { + specialization_filter.warrior_spellbreaker = true; + } + else if (flag_value == "Spellbreaker") { + specialization_filter.warrior_spellbreaker = true; + } + else if (flag_value == "Catalyst") { + specialization_filter.elementalist_catalyst = true; + } + else if (flag_value == "Mechanist") { + specialization_filter.engineer_mechanist = true; + } + else if (flag_value == "Willbender") { + specialization_filter.guardian_willbender = true; + } + else if (flag_value == "Virtuoso") { + specialization_filter.mesmer_virtuoso = true; + } + else if (flag_value == "Harbinger") { + specialization_filter.necromancer_harbinger = true; + } + else if (flag_value == "Untamed") { + specialization_filter.ranger_untamed = true; + } + else if (flag_value == "Vindicator") { + specialization_filter.revenant_vindicator = true; + } + else if (flag_value == "Specter") { + specialization_filter.thief_specter = true; + } + else if (flag_value == "Bladesworn") { + specialization_filter.warrior_bladesworn = true; + } + else if (flag_value == "41") { + specialization_filter.elementalist_air = true; + } + else if (flag_value == "37") { + specialization_filter.elementalist_arcane = true; + } + else if (flag_value == "26") { + specialization_filter.elementalist_earth = true; + } + else if (flag_value == "31") { + specialization_filter.elementalist_fire = true; + } + else if (flag_value == "17") { + specialization_filter.elementalist_water = true; + } + else if (flag_value == "29") { + specialization_filter.engineer_alchemy = true; + } + else if (flag_value == "6") { + specialization_filter.engineer_explosives = true; + } + else if (flag_value == "38") { + specialization_filter.engineer_firearms = true; + } + else if (flag_value == "47") { + specialization_filter.engineer_inventions = true; + } + else if (flag_value == "21") { + specialization_filter.engineer_tools = true; + } + else if (flag_value == "49") { + specialization_filter.guardian_honor = true; + } + else if (flag_value == "16") { + specialization_filter.guardian_radiance = true; + } + else if (flag_value == "13") { + specialization_filter.guardian_valor = true; + } + else if (flag_value == "46") { + specialization_filter.guardian_virtues = true; + } + else if (flag_value == "42") { + specialization_filter.guardian_zeal = true; + } + else if (flag_value == "45") { + specialization_filter.mesmer_chaos = true; + } + else if (flag_value == "10") { + specialization_filter.mesmer_domination = true; + } + else if (flag_value == "1") { + specialization_filter.mesmer_dueling = true; + } + else if (flag_value == "24") { + specialization_filter.mesmer_illusions = true; + } + else if (flag_value == "23") { + specialization_filter.mesmer_inspiration = true; + } + else if (flag_value == "19") { + specialization_filter.necromancer_blood_magic = true; + } + else if (flag_value == "39") { + specialization_filter.necromancer_curses = true; + } + else if (flag_value == "2") { + specialization_filter.necromancer_death_magic = true; + } + else if (flag_value == "50") { + specialization_filter.necromancer_soul_reaping = true; + } + else if (flag_value == "53") { + specialization_filter.necromancer_spite = true; + } + else if (flag_value == "32") { + specialization_filter.ranger_beastmastery = true; + } + else if (flag_value == "8") { + specialization_filter.ranger_marksmanship = true; + } + else if (flag_value == "25") { + specialization_filter.ranger_nature_magic = true; + } + else if (flag_value == "30") { + specialization_filter.ranger_skirmishing = true; + } + else if (flag_value == "33") { + specialization_filter.ranger_wilderness_survival = true; + } + else if (flag_value == "14") { + specialization_filter.revenant_corruption = true; + } + else if (flag_value == "15") { + specialization_filter.revenant_devastation = true; + } + else if (flag_value == "3") { + specialization_filter.revenant_invocation = true; + } + else if (flag_value == "9") { + specialization_filter.revenant_retribution = true; + } + else if (flag_value == "12") { + specialization_filter.revenant_salvation = true; + } + else if (flag_value == "54") { + specialization_filter.thief_acrobatics = true; + } + else if (flag_value == "35") { + specialization_filter.thief_critical_strikes = true; + } + else if (flag_value == "28") { + specialization_filter.thief_deadly_arts = true; + } + else if (flag_value == "20") { + specialization_filter.thief_shadow_arts = true; + } + else if (flag_value == "44") { + specialization_filter.thief_trickery = true; + } + else if (flag_value == "36") { + specialization_filter.warrior_arms = true; + } + else if (flag_value == "22") { + specialization_filter.warrior_defense = true; + } + else if (flag_value == "51") { + specialization_filter.warrior_discipline = true; + } + else if (flag_value == "4") { + specialization_filter.warrior_strength = true; + } + else if (flag_value == "11") { + specialization_filter.warrior_tactics = true; + } + else {errors->push_back(new XMLAttributeValueError("Found a value that was not in the class", input)); + continue; + } + } + return specialization_filter; + +} \ No newline at end of file diff --git a/xml_converter/src/attribute/specialization_filter.hpp b/xml_converter/src/attribute/specialization_filter.hpp index e379e0a7..421d6dbd 100644 --- a/xml_converter/src/attribute/specialization_filter.hpp +++ b/xml_converter/src/attribute/specialization_filter.hpp @@ -85,4 +85,5 @@ class SpecializationFilter { virtual string classname() { return "SpecializationFilter"; }; }; -SpecializationFilter parse_specialization_filter(rapidxml::xml_attribute<>* input, vector *errors); \ No newline at end of file +SpecializationFilter parse_specialization_filter(rapidxml::xml_attribute<>* input, vector *errors); + \ No newline at end of file diff --git a/xml_converter/src/attribute/species_filter.cpp b/xml_converter/src/attribute/species_filter.cpp index 7c74a4b5..874dfdd1 100644 --- a/xml_converter/src/attribute/species_filter.cpp +++ b/xml_converter/src/attribute/species_filter.cpp @@ -1,3 +1,36 @@ #include "species_filter.hpp" -using namespace std; \ No newline at end of file +#include +#include + +#include "../rapid_helpers.hpp" +#include "../rapidxml-1.13/rapidxml.hpp" + +SpeciesFilter parse_species_filter(rapidxml::xml_attribute<>* input, vector *errors){ + SpeciesFilter species_filter; + vector flag_values; + flag_values = split(get_attribute_value(input), ","); + + for (string flag_value : flag_values) { + if (flag_value == "asura") { + species_filter.asura = true; + } + else if (flag_value == "charr") { + species_filter.charr = true; + } + else if (flag_value == "human") { + species_filter.human = true; + } + else if (flag_value == "norn") { + species_filter.norn = true; + } + else if (flag_value == "sylvari") { + species_filter.sylvari = true; + } + else {errors->push_back(new XMLAttributeValueError("Found a value that was not in the class", input)); + continue; + } + } + return species_filter; + +} \ No newline at end of file diff --git a/xml_converter/src/attribute/species_filter.hpp b/xml_converter/src/attribute/species_filter.hpp index cb8bd853..e7372124 100644 --- a/xml_converter/src/attribute/species_filter.hpp +++ b/xml_converter/src/attribute/species_filter.hpp @@ -18,4 +18,5 @@ class SpeciesFilter { virtual string classname() { return "SpeciesFilter"; }; }; -SpeciesFilter parse_species_filter(rapidxml::xml_attribute<>* input, vector *errors); \ No newline at end of file +SpeciesFilter parse_species_filter(rapidxml::xml_attribute<>* input, vector *errors); + \ No newline at end of file diff --git a/xml_converter/src/attribute/trail_data.cpp b/xml_converter/src/attribute/trail_data.cpp new file mode 100644 index 00000000..9b9309a4 --- /dev/null +++ b/xml_converter/src/attribute/trail_data.cpp @@ -0,0 +1,14 @@ +#include "trail_data.hpp" + +#include +#include + +#include "../rapid_helpers.hpp" +#include "../rapidxml-1.13/rapidxml.hpp" + + +TrailData parse_trail_data(rapidxml::xml_attribute<>* input, vector *) { + TrailData trail_data; + trail_data.trail_data = get_attribute_value(input); + return trail_data; +} diff --git a/xml_converter/src/attribute/traildata.hpp b/xml_converter/src/attribute/trail_data.hpp similarity index 50% rename from xml_converter/src/attribute/traildata.hpp rename to xml_converter/src/attribute/trail_data.hpp index 7b400549..c3771150 100644 --- a/xml_converter/src/attribute/traildata.hpp +++ b/xml_converter/src/attribute/trail_data.hpp @@ -6,8 +6,10 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" +using namespace std; class TrailData { - +public: + string trail_data; }; -TrailData parse_TrailData(rapidxml::xml_attribute<>* input, vector *errors); +TrailData parse_trail_data(rapidxml::xml_attribute<>* input, vector *errors); diff --git a/xml_converter/src/attribute/trail_data_map_id.cpp b/xml_converter/src/attribute/trail_data_map_id.cpp new file mode 100644 index 00000000..b51fad8f --- /dev/null +++ b/xml_converter/src/attribute/trail_data_map_id.cpp @@ -0,0 +1,13 @@ +#include "trail_data_map_id.hpp" + +#include +#include + +#include "../rapid_helpers.hpp" +#include "../rapidxml-1.13/rapidxml.hpp" + +TrailDataMapId parse_trail_data_map_id(rapidxml::xml_attribute<>* input, vector *){ + TrailDataMapId trail_data_map_id; + trail_data_map_id.trail_data_map_id = std::stof(get_attribute_value(input)); + return trail_data_map_id; +} diff --git a/xml_converter/src/attribute/trail_data_map_id.hpp b/xml_converter/src/attribute/trail_data_map_id.hpp new file mode 100644 index 00000000..044d1870 --- /dev/null +++ b/xml_converter/src/attribute/trail_data_map_id.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include +#include + +#include "../rapid_helpers.hpp" +#include "../rapidxml-1.13/rapidxml.hpp" + +using namespace std; +class TrailDataMapId { +public: + int trail_data_map_id; +}; + +TrailDataMapId parse_trail_data_map_id(rapidxml::xml_attribute<>* input, vector *errors); diff --git a/xml_converter/src/attribute/traildatamapid.hpp b/xml_converter/src/attribute/traildatamapid.hpp deleted file mode 100644 index 6ed4df43..00000000 --- a/xml_converter/src/attribute/traildatamapid.hpp +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once - -#include -#include - -#include "../rapid_helpers.hpp" -#include "../rapidxml-1.13/rapidxml.hpp" - -class TrailDataMapId { - -}; - -TrailDataMapId parse_TrailDataMapId(rapidxml::xml_attribute<>* input, vector *errors); diff --git a/xml_converter/src/attribute/unique_id.cpp b/xml_converter/src/attribute/unique_id.cpp new file mode 100644 index 00000000..59166b73 --- /dev/null +++ b/xml_converter/src/attribute/unique_id.cpp @@ -0,0 +1,13 @@ +#include "unique_id.hpp" + +#include +#include + +#include "../rapid_helpers.hpp" +#include "../rapidxml-1.13/rapidxml.hpp" + +UniqueId parse_unique_id(rapidxml::xml_attribute<>* input, vector *) { + UniqueId unique_id; + unique_id.guid = get_attribute_value(input); + return unique_id; +} diff --git a/xml_converter/src/attribute/uniqueid.hpp b/xml_converter/src/attribute/unique_id.hpp similarity index 52% rename from xml_converter/src/attribute/uniqueid.hpp rename to xml_converter/src/attribute/unique_id.hpp index 293b6dd2..80dc7c5f 100644 --- a/xml_converter/src/attribute/uniqueid.hpp +++ b/xml_converter/src/attribute/unique_id.hpp @@ -6,8 +6,10 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" +using namespace std; class UniqueId { - + public: + string guid; }; -UniqueId parse_UniqueId(rapidxml::xml_attribute<>* input, vector *errors); +UniqueId parse_unique_id(rapidxml::xml_attribute<>* input, vector *errors); diff --git a/xml_converter/src/category.cpp b/xml_converter/src/category.cpp index 0f82acac..e3b52a0a 100644 --- a/xml_converter/src/category.cpp +++ b/xml_converter/src/category.cpp @@ -5,24 +5,49 @@ using namespace std; string Category::classname() { return "MarkerCategory"; } +void Category::init_from_xml(rapidxml::xml_node<>* node, vector *errors) { + for (rapidxml::xml_attribute<>* attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()) { + bool is_icon_value = false; + bool is_trail_value = false; -// void Category::init_from_xml(rapidxml::xml_node<>* node, vector *errors) { -// for (rapidxml::xml_attribute<>* attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()) { - -// // Attempt to parse all the attributes of the category into an Icon and -// // Trail to use as default values for all their children. -// bool is_icon_value = false; -// bool is_trail_value = false; -// for (rapidxml::xml_attribute<>* attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()) { -// is_icon_value |= this->default_icon.init_xml_attribute(attribute, errors); -// is_trail_value |= this->default_trail.init_xml_attribute(attribute, errors); -// } - -// if (init_xml_attribute(attribute, errors)) {} -// else if (is_icon_value || is_trail_value) {} -// else { -// errors->push_back(new XMLAttributeNameError("Unknown " + this->classname() + " attribute ", attribute)); -// } -// } -// } + for (rapidxml::xml_attribute<>* attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()) { + is_icon_value |= this->default_icon.init_xml_attribute(attribute, errors); + is_trail_value |= this->default_trail.init_xml_attribute(attribute, errors); + } + if (init_xml_attribute(attribute, errors)) {} + else if (is_icon_value || is_trail_value) {} + else { + errors->push_back(new XMLAttributeNameError("Unknown " + this->classname() + " attribute ", attribute)); + } + } +} +bool Category::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors) { + string attributename; + attributename = normalize_type_name(get_attribute_name(attribute)); + if (attributename == "defaulttoggle") { + this->default_visibility = parse_bool(attribute, errors); + } + else if (attributename == "displayname") { + this->display_name = parse_string(attribute, errors); + } + else if (attributename == "isseparator") { + this->is_separator = parse_bool(attribute, errors); + } + else if (attributename == "name") { + this->name = parse_string(attribute, errors); + } + else if (attributename == "tipdescription") { + this->tooltip_name = parse_string(attribute, errors); + } + else if (attributename == "POI") { + this->default_icon.init_xml_attribute(attribute, errors); + } + else if (attributename == "Trail"){ + this->default_trail.init_xml_attribute(attribute, errors); + } + else { + return false; + } + return true; +} \ No newline at end of file diff --git a/xml_converter/src/category.hpp b/xml_converter/src/category.hpp index 4a245f9a..2d33d374 100644 --- a/xml_converter/src/category.hpp +++ b/xml_converter/src/category.hpp @@ -16,12 +16,15 @@ class Category: public Parseable { public: bool default_visibility; string display_name; - bool is_seperator; + bool is_separator; string name; string tooltip_name; map children; Icon default_icon; Trail default_trail; + void init_from_xml(rapidxml::xml_node<>* node, vector *errors); virtual string classname(); + bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors); + }; \ No newline at end of file diff --git a/xml_converter/src/icon.cpp b/xml_converter/src/icon.cpp index 9926eec9..e35978a1 100644 --- a/xml_converter/src/icon.cpp +++ b/xml_converter/src/icon.cpp @@ -5,3 +5,203 @@ using namespace std; string Icon::classname() { return "POI"; } +bool Icon::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors) { + string attributename; + attributename = normalize_type_name(get_attribute_name(attribute)); + if (attributename == "achievementbit") { + this->achievement_bitmask = parse_int(attribute, errors); + } + else if (attributename == "achievementid") { + this->achievement_id = parse_int(attribute, errors); + } + else if (attributename == "alpha") { + this->alpha = parse_float(attribute, errors); + } + else if (attributename == "autotrigger") { + this->auto_trigger = parse_bool(attribute, errors); + } + else if (attributename == "bouncedelay") { + this->bounce_delay = parse_float(attribute, errors); + } + else if (attributename == "bounceduration") { + this->bounce_duration = parse_float(attribute, errors); + } + else if (attributename == "bounceheight") { + this->bounce_height = parse_float(attribute, errors); + } + else if (attributename == "canfade") { + this->can_fade = parse_bool(attribute, errors); + } + else if (attributename == "type") { + this->category = parse_marker_category(attribute, errors); + } + else if (attributename == "category") { + this->category = parse_marker_category(attribute, errors); + } + else if (attributename == "color") { + this->color = parse_color(attribute, errors); + } + else if (attributename == "copy") { + this->copy_clipboard = parse_string(attribute, errors); + } + else if (attributename == "copyclipboard") { + this->copy_clipboard = parse_string(attribute, errors); + } + else if (attributename == "copymessage") { + this->copy_message = parse_string(attribute, errors); + } + else if (attributename == "cull") { + this->cull_chirality = parse_cull_chirality(attribute, errors); + } + else if (attributename == "fadefar") { + this->distance_fade_end = parse_float(attribute, errors); + } + else if (attributename == "distancefadeend") { + this->distance_fade_end = parse_float(attribute, errors); + } + else if (attributename == "fadenear") { + this->distance_fade_start = parse_float(attribute, errors); + } + else if (attributename == "distancefadestart") { + this->distance_fade_start = parse_float(attribute, errors); + } + else if (attributename == "rotatex") { + this->euler_rotation = parse_euler_rotation(attribute, errors); + } + else if (attributename == "rotatey") { + this->euler_rotation = parse_euler_rotation(attribute, errors); + } + else if (attributename == "rotatez") { + this->euler_rotation = parse_euler_rotation(attribute, errors); + } + else if (attributename == "festival") { + this->festival_filter = parse_festival_filter(attribute, errors); + } + else if (attributename == "guid") { + this->guid = parse_unique_id(attribute, errors); + } + else if (attributename == "hascountdown") { + this->has_countdown = parse_bool(attribute, errors); + } + else if (attributename == "heightoffset") { + this->heightoffset = parse_float(attribute, errors); + } + else if (attributename == "hide") { + this->hide_category = parse_marker_category(attribute, errors); + } + else if (attributename == "iconfile") { + this->icon = parse_image(attribute, errors); + } + else if (attributename == "iconsize") { + this->icon_size = parse_float(attribute, errors); + } + else if (attributename == "info") { + this->info_message = parse_string(attribute, errors); + } + else if (attributename == "invertbehavior") { + this->invert_visibility = parse_bool(attribute, errors); + } + else if (attributename == "mapdisplaysize") { + this->map_display_size = parse_int(attribute, errors); + } + else if (attributename == "mapid") { + this->map_id = parse_int(attribute, errors); + } + else if (attributename == "mapid") { + this->map_type_filter = parse_map_type_filter(attribute, errors); + } + else if (attributename == "maxsize") { + this->maximum_size_on_screen = parse_int(attribute, errors); + } + else if (attributename == "minsize") { + this->minimum_size_on_screen = parse_int(attribute, errors); + } + else if (attributename == "mount") { + this->mount_filter = parse_mount_filter(attribute, errors); + } + else if (attributename == "xpos") { + this->position = parse_position(attribute, errors); + } + else if (attributename == "positionx") { + this->position = parse_position(attribute, errors); + } + else if (attributename == "ypos") { + this->position = parse_position(attribute, errors); + } + else if (attributename == "positiony") { + this->position = parse_position(attribute, errors); + } + else if (attributename == "zpos") { + this->position = parse_position(attribute, errors); + } + else if (attributename == "positionz") { + this->position = parse_position(attribute, errors); + } + else if (attributename == "profession") { + this->profession_filter = parse_profession_filter(attribute, errors); + } + else if (attributename == "ingamevisibility") { + this->render_ingame = parse_bool(attribute, errors); + } + else if (attributename == "bhingamevisibility") { + this->render_ingame = parse_bool(attribute, errors); + } + else if (attributename == "mapvisibility") { + this->render_on_map = parse_bool(attribute, errors); + } + else if (attributename == "bhmapvisibility") { + this->render_on_map = parse_bool(attribute, errors); + } + else if (attributename == "minimapvisibility") { + this->render_on_minimap = parse_bool(attribute, errors); + } + else if (attributename == "bhminimapvisibility") { + this->render_on_minimap = parse_bool(attribute, errors); + } + else if (attributename == "behavior") { + this->reset_behavior = parse_reset_behavior(attribute, errors); + } + else if (attributename == "resetlength") { + this->reset_length = parse_float(attribute, errors); + } + else if (attributename == "scaleonmapwithzoom") { + this->scale_on_map_with_zoom = parse_bool(attribute, errors); + } + else if (attributename == "schedule") { + this->schedule = parse_string(attribute, errors); + } + else if (attributename == "scheduleduration") { + this->schedule_duration = parse_float(attribute, errors); + } + else if (attributename == "show") { + this->show_category = parse_marker_category(attribute, errors); + } + else if (attributename == "specialization") { + this->specialization_filter = parse_specialization_filter(attribute, errors); + } + else if (attributename == "race") { + this->species_filter = parse_species_filter(attribute, errors); + } + else if (attributename == "species") { + this->species_filter = parse_species_filter(attribute, errors); + } + else if (attributename == "toggle") { + this->toggle_category = parse_marker_category(attribute, errors); + } + else if (attributename == "tipname") { + this->tooltip_description = parse_string(attribute, errors); + } + else if (attributename == "tipdescription") { + this->tooltip_name = parse_string(attribute, errors); + } + else if (attributename == "triggerrange") { + this->trigger_range = parse_float(attribute, errors); + } + else if (attributename == "inforange") { + this->trigger_range = parse_float(attribute, errors); + } + else { + return false; + } + return true; +} \ No newline at end of file diff --git a/xml_converter/src/icon.hpp b/xml_converter/src/icon.hpp index 71550de7..5cb81a91 100644 --- a/xml_converter/src/icon.hpp +++ b/xml_converter/src/icon.hpp @@ -13,7 +13,7 @@ #include "attribute/image.hpp" #include "attribute/int.hpp" #include "attribute/map_type_filter.hpp" -#include "attribute/markercategory.hpp" +#include "attribute/marker_category.hpp" #include "attribute/mount_filter.hpp" #include "attribute/position.hpp" #include "attribute/profession_filter.hpp" @@ -21,7 +21,7 @@ #include "attribute/specialization_filter.hpp" #include "attribute/species_filter.hpp" #include "attribute/string.hpp" -#include "attribute/uniqueid.hpp" +#include "attribute/unique_id.hpp" using namespace std; @@ -75,6 +75,7 @@ class Icon: public Parseable { string tooltip_description; string tooltip_name; float trigger_range; - virtual string classname(); + bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors); + }; \ No newline at end of file diff --git a/xml_converter/src/trail.cpp b/xml_converter/src/trail.cpp index 9d117f17..38bb33d8 100644 --- a/xml_converter/src/trail.cpp +++ b/xml_converter/src/trail.cpp @@ -1,5 +1,123 @@ #include "trail.hpp" +using namespace std; + string Trail::classname() { - return string("Trail"); + return "Trail"; } +bool Trail::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors) { + string attributename; + attributename = normalize_type_name(get_attribute_name(attribute)); + if (attributename == "achievementbit") { + this->achievement_bitmask = parse_int(attribute, errors); + } + else if (attributename == "achievementid") { + this->achievement_id = parse_int(attribute, errors); + } + else if (attributename == "alpha") { + this->alpha = parse_float(attribute, errors); + } + else if (attributename == "animspeed") { + this->animation_speed = parse_float(attribute, errors); + } + else if (attributename == "animationspeed") { + this->animation_speed = parse_float(attribute, errors); + } + else if (attributename == "canfade") { + this->can_fade = parse_bool(attribute, errors); + } + else if (attributename == "type") { + this->category = parse_marker_category(attribute, errors); + } + else if (attributename == "category") { + this->category = parse_marker_category(attribute, errors); + } + else if (attributename == "color") { + this->color = parse_color(attribute, errors); + } + else if (attributename == "cull") { + this->cull_chirality = parse_cull_chirality(attribute, errors); + } + else if (attributename == "fadefar") { + this->distance_fade_end = parse_float(attribute, errors); + } + else if (attributename == "distancefadeend") { + this->distance_fade_end = parse_float(attribute, errors); + } + else if (attributename == "fadenear") { + this->distance_fade_start = parse_float(attribute, errors); + } + else if (attributename == "distancefadestart") { + this->distance_fade_start = parse_float(attribute, errors); + } + else if (attributename == "festival") { + this->festival_filter = parse_festival_filter(attribute, errors); + } + else if (attributename == "guid") { + this->guid = parse_unique_id(attribute, errors); + } + else if (attributename == "iswall") { + this->is_wall = parse_bool(attribute, errors); + } + else if (attributename == "mapid") { + this->map_id = parse_int(attribute, errors); + } + else if (attributename == "mapid") { + this->map_type_filter = parse_map_type_filter(attribute, errors); + } + else if (attributename == "mount") { + this->mount_filter = parse_mount_filter(attribute, errors); + } + else if (attributename == "profession") { + this->profession_filter = parse_profession_filter(attribute, errors); + } + else if (attributename == "ingamevisibility") { + this->render_ingame = parse_bool(attribute, errors); + } + else if (attributename == "bhingamevisibility") { + this->render_ingame = parse_bool(attribute, errors); + } + else if (attributename == "mapvisibility") { + this->render_on_map = parse_bool(attribute, errors); + } + else if (attributename == "bhmapvisibility") { + this->render_on_map = parse_bool(attribute, errors); + } + else if (attributename == "minimapvisibility") { + this->render_on_minimap = parse_bool(attribute, errors); + } + else if (attributename == "bhminimapvisibility") { + this->render_on_minimap = parse_bool(attribute, errors); + } + else if (attributename == "schedule") { + this->schedule = parse_string(attribute, errors); + } + else if (attributename == "scheduleduration") { + this->schedule_duration = parse_float(attribute, errors); + } + else if (attributename == "specialization") { + this->specialization_filter = parse_specialization_filter(attribute, errors); + } + else if (attributename == "race") { + this->species_filter = parse_species_filter(attribute, errors); + } + else if (attributename == "species") { + this->species_filter = parse_species_filter(attribute, errors); + } + else if (attributename == "texture") { + this->texture = parse_image(attribute, errors); + } + else if (attributename == "traildata") { + this->trail_data = parse_trail_data(attribute, errors); + } + else if (attributename == "traildata") { + this->trail_data_map_id = parse_trail_data_map_id(attribute, errors); + } + else if (attributename == "trailscale") { + this->trail_scale = parse_float(attribute, errors); + } + else { + return false; + } + return true; +} \ No newline at end of file diff --git a/xml_converter/src/trail.hpp b/xml_converter/src/trail.hpp index 0c0b2428..a92b5c30 100644 --- a/xml_converter/src/trail.hpp +++ b/xml_converter/src/trail.hpp @@ -22,15 +22,15 @@ #include "attribute/image.hpp" #include "attribute/int.hpp" #include "attribute/map_type_filter.hpp" -#include "attribute/markercategory.hpp" +#include "attribute/marker_category.hpp" #include "attribute/mount_filter.hpp" #include "attribute/profession_filter.hpp" #include "attribute/specialization_filter.hpp" #include "attribute/species_filter.hpp" #include "attribute/string.hpp" -#include "attribute/traildata.hpp" -#include "attribute/traildatamapid.hpp" -#include "attribute/uniqueid.hpp" +#include "attribute/trail_data.hpp" +#include "attribute/trail_data_map_id.hpp" +#include "attribute/unique_id.hpp" using namespace std; @@ -64,6 +64,7 @@ class Trail: public Parseable { TrailData trail_data; TrailDataMapId trail_data_map_id; float trail_scale; - virtual string classname(); + bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors); + }; \ No newline at end of file diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 872de46b..0b4b546b 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -37,11 +37,11 @@ bool has_suffix(std::string const &fullString, std::string const &ending) { } } -Category* get_category(rapidxml::xml_attribute<>* name, map* marker_categories, vector* errors) { - vector split_categories = split(get_attribute_value(name), "."); +Category* get_category(rapidxml::xml_attribute<>* attribute, map* marker_categories, vector* errors) { + vector split_categories = split(get_attribute_value(attribute), "."); if (split_categories.size() == 0) { - errors->push_back(new XMLAttributeValueError("Empty Type", name)); + errors->push_back(new XMLAttributeValueError("Empty Type", attribute)); return nullptr; } @@ -53,7 +53,7 @@ Category* get_category(rapidxml::xml_attribute<>* name, map* m auto category = marker_categories->find(category_name); if (category == marker_categories->end()) { - errors->push_back(new XMLAttributeValueError("Category Not Found \"" + category_name + "\"", name)); + errors->push_back(new XMLAttributeValueError("Category Not Found \"" + category_name + "\"", attribute)); return nullptr; } @@ -70,7 +70,7 @@ Category* get_category(rapidxml::xml_attribute<>* name, map* m //////////////////////////////////////////////////////////////////////////////// // parse_pois // -// Parse the xml block into an in memory array of Markers. +// Parse the xml block into an in-memory array of Markers. //////////////////////////////////////////////////////////////////////////////// vector parse_pois(rapidxml::xml_node<>* root_node, map* marker_categories, vector* errors) { vector markers; From bea493fef2359d5a103a8d4b1b7b925cd53b85f4 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sat, 20 Aug 2022 19:27:33 -0400 Subject: [PATCH 063/539] Made changes to account for compound values --- .../doc/rendering/map_display_size.md | 2 +- .../cpp_templates/compoundvalue.cpp | 29 ++++++++---- .../src/attribute/euler_rotation.cpp | 28 +++++++---- xml_converter/src/attribute/position.cpp | 46 +++++++++++-------- 4 files changed, 67 insertions(+), 38 deletions(-) diff --git a/xml_converter/doc/rendering/map_display_size.md b/xml_converter/doc/rendering/map_display_size.md index dbd4f0c0..f8f022ab 100644 --- a/xml_converter/doc/rendering/map_display_size.md +++ b/xml_converter/doc/rendering/map_display_size.md @@ -1,7 +1,7 @@ --- name: Map Display Size type: Int32 -applies_to: [Icon, Trail] +applies_to: [Icon] xml_fields: [MapDisplaySize] protobuf_field: map_display_size compatability: [TacO, BlishHUD, Burrito] diff --git a/xml_converter/generators/cpp_templates/compoundvalue.cpp b/xml_converter/generators/cpp_templates/compoundvalue.cpp index efd9086d..3a63f9cc 100644 --- a/xml_converter/generators/cpp_templates/compoundvalue.cpp +++ b/xml_converter/generators/cpp_templates/compoundvalue.cpp @@ -2,6 +2,7 @@ #include #include +#include #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" @@ -11,22 +12,30 @@ vector compound_values; string attributename; attributename = get_attribute_name(input); - + compound_values = split(get_attribute_value(input), ","); + + if (typeid(compound_values) == typeid(std::string)) { {%-for n, attribute_variable in enumerate(attribute_variables)%} {%-for i, value in enumerate(attribute_variable[1])%} {%-if i == 0 and n == 0:%} - if (attributename == "{{value}}") { - {{attribute_name}}.{{attribute_variables[n][0]}} = std::stof(get_attribute_value(input)); - } + if (attributename == "{{value}}") { + {{attribute_name}}.{{attribute_variables[n][0]}} = std::stof(get_attribute_value(input)); + } {%- else %} - else if (attributename == "{{value}}") { - {{attribute_name}}.{{attribute_variables[n][0]}} = std::stof(get_attribute_value(input)); - } + else if (attributename == "{{value}}") { + {{attribute_name}}.{{attribute_variables[n][0]}} = std::stof(get_attribute_value(input)); + } {%- endif %} - - {%- endfor %} + + {%- endfor %} {%- endfor %} + else { + {%-for n, attribute_variable in enumerate(attribute_variables)%} + {{attribute_name}}.{{attribute_variables[n][0]}} = std::stof(compound_values[{{n}}]); + {%- endfor %} + } + } return {{attribute_name}}; -} \ No newline at end of file +} \ No newline at end of file diff --git a/xml_converter/src/attribute/euler_rotation.cpp b/xml_converter/src/attribute/euler_rotation.cpp index 86fac7bd..0072f59b 100644 --- a/xml_converter/src/attribute/euler_rotation.cpp +++ b/xml_converter/src/attribute/euler_rotation.cpp @@ -2,6 +2,7 @@ #include #include +#include #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" @@ -10,15 +11,24 @@ EulerRotation parse_euler_rotation(rapidxml::xml_attribute<>* input, vector compound_values; string attributename; - attributename = get_attribute_name(input); - if (attributename == "rotatex") { - euler_rotation.x_rotation = std::stof(get_attribute_value(input)); - } - else if (attributename == "rotatey") { - euler_rotation.y_rotation = std::stof(get_attribute_value(input)); - } - else if (attributename == "rotatez") { - euler_rotation.z_rotation = std::stof(get_attribute_value(input)); + attributename = get_attribute_name(input); + compound_values = split(get_attribute_value(input), ","); + + if (typeid(compound_values) == typeid(std::string)) { + if (attributename == "rotatex") { + euler_rotation.x_rotation = std::stof(get_attribute_value(input)); + } + else if (attributename == "rotatey") { + euler_rotation.y_rotation = std::stof(get_attribute_value(input)); + } + else if (attributename == "rotatez") { + euler_rotation.z_rotation = std::stof(get_attribute_value(input)); + } + else { + euler_rotation.x_rotation = std::stof(compound_values[0]); + euler_rotation.y_rotation = std::stof(compound_values[1]); + euler_rotation.z_rotation = std::stof(compound_values[2]); + } } return euler_rotation; diff --git a/xml_converter/src/attribute/position.cpp b/xml_converter/src/attribute/position.cpp index 5a1236f8..352eb0fa 100644 --- a/xml_converter/src/attribute/position.cpp +++ b/xml_converter/src/attribute/position.cpp @@ -2,6 +2,7 @@ #include #include +#include #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" @@ -10,24 +11,33 @@ Position parse_position(rapidxml::xml_attribute<>* input, vector *){ Position position; vector compound_values; string attributename; - attributename = get_attribute_name(input); - if (attributename == "xpos") { - position.x_position = std::stof(get_attribute_value(input)); - } - else if (attributename == "positionx") { - position.x_position = std::stof(get_attribute_value(input)); - } - else if (attributename == "ypos") { - position.y_position = std::stof(get_attribute_value(input)); - } - else if (attributename == "positiony") { - position.y_position = std::stof(get_attribute_value(input)); - } - else if (attributename == "zpos") { - position.z_position = std::stof(get_attribute_value(input)); - } - else if (attributename == "positionz") { - position.z_position = std::stof(get_attribute_value(input)); + attributename = get_attribute_name(input); + compound_values = split(get_attribute_value(input), ","); + + if (typeid(compound_values) == typeid(std::string)) { + if (attributename == "xpos") { + position.x_position = std::stof(get_attribute_value(input)); + } + else if (attributename == "positionx") { + position.x_position = std::stof(get_attribute_value(input)); + } + else if (attributename == "ypos") { + position.y_position = std::stof(get_attribute_value(input)); + } + else if (attributename == "positiony") { + position.y_position = std::stof(get_attribute_value(input)); + } + else if (attributename == "zpos") { + position.z_position = std::stof(get_attribute_value(input)); + } + else if (attributename == "positionz") { + position.z_position = std::stof(get_attribute_value(input)); + } + else { + position.x_position = std::stof(compound_values[0]); + position.y_position = std::stof(compound_values[1]); + position.z_position = std::stof(compound_values[2]); + } } return position; From 100e00f580b2535a9f6754c457f8af32ed9c73c0 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 21 Aug 2022 14:57:59 -0400 Subject: [PATCH 064/539] Addressing issues raised in code review --- xml_converter/doc/category/category.md | 2 +- xml_converter/doc/trail_data/trail_data.md | 2 +- .../doc/trail_data/trail_data_map_id.md | 2 +- xml_converter/doc/trigger/guid.md | 2 +- xml_converter/doc/trigger/hide_category.md | 2 +- xml_converter/doc/trigger/show_category.md | 2 +- xml_converter/doc/trigger/toggle_category.md | 2 +- xml_converter/generators/code_generator.py | 129 ++++++++++++------ .../cpp_templates/attribute_template.hpp | 8 +- .../cpp_templates/class_template.cpp | 28 ++-- .../cpp_templates/class_template.hpp | 9 +- .../cpp_templates/compoundvalue.cpp | 19 +-- .../generators/cpp_templates/enum.cpp | 13 +- .../cpp_templates/multiflagvalue.cpp | 14 +- .../src/attribute/cull_chirality.cpp | 3 +- .../src/attribute/euler_rotation.cpp | 9 +- .../src/attribute/festival_filter.cpp | 12 +- .../src/attribute/map_type_filter.cpp | 29 +++- .../src/attribute/marker_category.cpp | 2 +- xml_converter/src/attribute/mount_filter.cpp | 15 +- xml_converter/src/attribute/position.cpp | 9 +- .../src/attribute/profession_filter.cpp | 14 +- .../src/attribute/reset_behavior.cpp | 3 +- .../src/attribute/specialization_filter.cpp | 77 ++++++++++- .../src/attribute/species_filter.cpp | 10 +- xml_converter/src/attribute/unique_id.cpp | 6 +- xml_converter/src/attribute/unique_id.hpp | 3 +- xml_converter/src/category.cpp | 6 - xml_converter/src/category.hpp | 2 - xml_converter/src/icon.cpp | 13 ++ xml_converter/src/icon.hpp | 3 +- xml_converter/src/string_helper.cpp | 97 +++++++++++++ xml_converter/src/string_helper.hpp | 8 ++ xml_converter/src/trail.cpp | 4 + xml_converter/src/trail.hpp | 3 +- xml_converter/src/xml_converter.cpp | 9 +- 36 files changed, 440 insertions(+), 131 deletions(-) diff --git a/xml_converter/doc/category/category.md b/xml_converter/doc/category/category.md index 5be245c9..91e68742 100644 --- a/xml_converter/doc/category/category.md +++ b/xml_converter/doc/category/category.md @@ -1,7 +1,7 @@ --- name: Category type: Custom -class: Marker_Category +class: MarkerCategory applies_to: [Icon, Trail] xml_fields: [Type, Category] protobuf_field: category diff --git a/xml_converter/doc/trail_data/trail_data.md b/xml_converter/doc/trail_data/trail_data.md index f6d80a36..67169db0 100644 --- a/xml_converter/doc/trail_data/trail_data.md +++ b/xml_converter/doc/trail_data/trail_data.md @@ -1,7 +1,7 @@ --- name: Trail Data type: Custom -class: Trail_Data +class: TrailData xml_fields: ["TrailData"] protobuf_field: traildata side_effects: [Map ID] diff --git a/xml_converter/doc/trail_data/trail_data_map_id.md b/xml_converter/doc/trail_data/trail_data_map_id.md index c9b74604..7d2c8773 100644 --- a/xml_converter/doc/trail_data/trail_data_map_id.md +++ b/xml_converter/doc/trail_data/trail_data_map_id.md @@ -1,7 +1,7 @@ --- name: Trail Data Map ID type: Custom -class: Trail_Data_Map_Id +class: TrailDataMapId xml_fields: ["TrailData"] protobuf_field: map_id applies_to: [Trail] diff --git a/xml_converter/doc/trigger/guid.md b/xml_converter/doc/trigger/guid.md index ea013569..625b22bf 100644 --- a/xml_converter/doc/trigger/guid.md +++ b/xml_converter/doc/trigger/guid.md @@ -1,7 +1,7 @@ --- name: GUID type: Custom -class: Unique_Id +class: UniqueId xml_fields: ["GUID"] applies_to: ["Icon", "Trail"] protobuf_field: "guid" diff --git a/xml_converter/doc/trigger/hide_category.md b/xml_converter/doc/trigger/hide_category.md index 0f7ca823..1df6652b 100644 --- a/xml_converter/doc/trigger/hide_category.md +++ b/xml_converter/doc/trigger/hide_category.md @@ -1,7 +1,7 @@ --- name: Hide Category type: Custom -class: Marker_Category +class: MarkerCategory applies_to: [Icon] xml_fields: [Hide] protobuf_field: trigger.action_hide_category diff --git a/xml_converter/doc/trigger/show_category.md b/xml_converter/doc/trigger/show_category.md index 63126dfc..3bb542fb 100644 --- a/xml_converter/doc/trigger/show_category.md +++ b/xml_converter/doc/trigger/show_category.md @@ -1,7 +1,7 @@ --- name: Show Category type: Custom -class: Marker_Category +class: MarkerCategory applies_to: [Icon] xml_fields: [Show] protobuf_field: trigger.action_show_category diff --git a/xml_converter/doc/trigger/toggle_category.md b/xml_converter/doc/trigger/toggle_category.md index 823f592a..8d73e457 100644 --- a/xml_converter/doc/trigger/toggle_category.md +++ b/xml_converter/doc/trigger/toggle_category.md @@ -1,7 +1,7 @@ --- name: Toggle Category type: Custom -class: Marker_Category +class: MarkerCategory applies_to: [Icon] xml_fields: [Toggle] protobuf_field: trigger.action_toggle_category diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 104b192a..d4561e3a 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -244,14 +244,20 @@ class FieldRow: doc_type_to_cpp_type: Dict[str, str] = { - "Fixed32": "int", - "Int32": "int", - "Boolean": "bool", - "Float32": "float", - "String": "string", - } + "Fixed32": "int", + "Int32": "int", + "Boolean": "bool", + "Float32": "float", + "String": "string", +} +@dataclass +class TemplateVariables: + attribute_name: str + cpp_type: str + class_name: str + xml_fields: List[str] class Generator: @@ -287,49 +293,55 @@ def write_cpp_classes(self, output_directory: str) -> None: file_loader = FileSystemLoader('cpp_templates') env = Environment(loader=file_loader) attribute_names: Dict[str, str] = {} - template: Dict[str, Any] = { - "header_template": env.get_template("class_template.hpp"), - "code_template": env.get_template("class_template.cpp"), - } + header_template: Template = env.get_template("class_template.hpp") + code_template: Template = env.get_template("class_template.cpp") + attributes_of_type_marker_category: List[str] = [] cpp_classes: Dict[str, str] = { - "Category": "MarkerCategory", - "Icon": "POI", + "Category": "MarkerCategory", + "Icon": "POI", "Trail": "Trail" } + for filepath in self.data.keys(): filename = os.path.basename(filepath) attribute_names[filepath] = filename.split(".md")[0] for cpp_class in cpp_classes: metadata: Dict[str, SchemaType] = {} + attributes_of_type_marker_category = [] for attribute_name in attribute_names: metadata[attribute_name] = self.data[attribute_name].metadata - - attribute_variables, cpp_include_paths = self.generate_cpp_variable_data(metadata, cpp_class, attribute_names) + template_variables, cpp_include_paths = self.generate_cpp_variable_data(metadata, cpp_class, attribute_names) + + for template_variable in template_variables: + if template_variable[2] == "marker_category": + attributes_of_type_marker_category.append(template_variable[0]) with open(os.path.join(output_directory, lowercase(cpp_class) + ".hpp"), 'w') as f: - f.write(template["header_template"].render( + f.write(header_template.render( cpp_class=cpp_class, - attribute_variables=sorted(attribute_variables), + template_variables=sorted(template_variables), cpp_include_paths=sorted(cpp_include_paths), + attributes_of_type_marker_category=attributes_of_type_marker_category, )) with open(os.path.join(output_directory, lowercase(cpp_class) + ".cpp"), 'w') as f: - f.write(template["code_template"].render( + f.write(code_template.render( cpp_class=cpp_class, cpp_class_header=lowercase(cpp_class), xml_class_name=cpp_classes[cpp_class], - attribute_variables=sorted(attribute_variables), + template_variables=sorted(template_variables), enumerate=enumerate, + attributes_of_type_marker_category=attributes_of_type_marker_category, )) - + print(attributes_of_type_marker_category) ############################################################################ # generate_cpp_variable_data # - # This will return a list of tuples containing tuple pairs of the variable - # name and the variable cpp type, and a set of all of the dependencies + # This will return a list of tuples containing a tuple of the variables + # needed for the templates, and a set of all of the dependencies # those variables will need to have included. ############################################################################ def generate_cpp_variable_data( @@ -339,9 +351,9 @@ def generate_cpp_variable_data( attribute_names: Dict[str, str] = {} ) -> Tuple[List[Tuple[str, str, str, List[str]]], Set[str]]: - attribute_variables: List[Tuple[str, str, str, List[str]]] = [] cpp_include_paths: Set[str] = set() attribute_name: str = "" + template_variables: List[Tuple[str, str, str, List[str]]] = [] xml_fields: List[str] = [] for fieldkey, field in metadata.items(): @@ -355,8 +367,8 @@ def generate_cpp_variable_data( cpp_type = doc_type_to_cpp_type[field['type']] class_name = cpp_type elif field['type'] == "Custom": - cpp_type = capitalize(field['class'], delimiter="") - class_name = lowercase(field['class'], delimiter="_") + cpp_type = field['class'] + class_name = insert_delimiter(field['class'], delimiter="_") elif field['type'] in ["Enum", "MultiflagValue", "CompoundValue"]: cpp_type = capitalize(attribute_name, delimiter="") class_name = attribute_name @@ -367,19 +379,19 @@ def generate_cpp_variable_data( )) cpp_include_paths.add(class_name) - + + for item in field['xml_fields']: + xml_fields.append(lowercase(item, delimiter="")) + if field['type'] == "CompoundValue": for component in field['components']: for item in component['xml_fields']: xml_fields.append(lowercase(item, delimiter="")) - else: - for item in field['xml_fields']: - xml_fields.append(lowercase(item, delimiter="")) - - attribute_variables.append((attribute_name, cpp_type, class_name, xml_fields)) + TemplateVariables = (attribute_name, cpp_type, class_name, xml_fields) + template_variables.append(TemplateVariables) - return attribute_variables, cpp_include_paths + return template_variables, cpp_include_paths ############################################################################ # write_attributes @@ -393,11 +405,10 @@ def write_attribute(self, output_directory: str) -> None: file_loader = FileSystemLoader('cpp_templates') env = Environment(loader=file_loader) attribute_names: Dict[str, str] = {} + template_variables: List[Tuple[str, str, str, List[str]]] = [] metadata: Dict[str, SchemaType] = {} - attribute_variables: List[Tuple[str, List[str], str]] = [] xml_fields: List[str] = [] - template: Dict[str, Any] = { - "attribute": env.get_template("attribute_template.hpp"), + template: Dict[str, Template] = { "MultiflagValue": env.get_template("multiflagvalue.cpp"), "CompoundValue": env.get_template("compoundvalue.cpp"), "Enum": env.get_template("enum.cpp"), @@ -408,14 +419,18 @@ def write_attribute(self, output_directory: str) -> None: attribute_names[filepath] = filename.split(".md")[0] for filepath in attribute_names: - attribute_variables = [] + template_variables = [] attribute_name = attribute_names[filepath] metadata[filepath] = self.data[filepath].metadata - + if metadata[filepath]['type'] == "MultiflagValue": for flag in metadata[filepath]['flags']: - attribute_variables.append((flag, metadata[filepath]['flags'][flag], "bool")) - + TemplateVariables = (flag, "bool", attribute_name, metadata[filepath]['flags'][flag]) + if type(flag) != str: + print(flag, type(flag)) + if type(metadata[filepath]['flags'][flag]) != list: + print(metadata[filepath]['flags'][flag], type(metadata[filepath]['flags'][flag])) + template_variables.append(TemplateVariables) elif metadata[filepath]['type'] == "CompoundValue": for component in metadata[filepath]['components']: xml_fields = [] @@ -425,19 +440,21 @@ def write_attribute(self, output_directory: str) -> None: )) for item in component['xml_fields']: xml_fields.append(lowercase(item, delimiter="")) - attribute_variables.append((lowercase(component['name'], delimiter="_"), xml_fields, doc_type_to_cpp_type[component['type']])) + TemplateVariables = (lowercase(component['name'], delimiter="_"), doc_type_to_cpp_type[component['type']], attribute_name, xml_fields) + template_variables.append(TemplateVariables) elif metadata[filepath]['type'] == "Enum": for value in metadata[filepath]['values']: - attribute_variables.append((value,metadata[filepath]['values'][value],"str")) + TemplateVariables = (value, "str", attribute_name, metadata[filepath]['values'][value]) + template_variables.append(TemplateVariables) else: continue with open(os.path.join(output_directory, attribute_name + ".hpp"), 'w') as f: - f.write(template["attribute"].render( + f.write(env.get_template("attribute_template.hpp").render( attribute_name=attribute_name, - attribute_variables=sorted(attribute_variables), + template_variables=sorted(template_variables), class_name=capitalize(attribute_name, delimiter=""), type=metadata[filepath]['type'], )) @@ -445,11 +462,10 @@ def write_attribute(self, output_directory: str) -> None: with open(os.path.join(output_directory, attribute_name + ".cpp"), 'w') as f: f.write(template[metadata[filepath]['type']].render( attribute_name=attribute_name, - attribute_variables=attribute_variables, + template_variables=template_variables, class_name=capitalize(attribute_name, delimiter=""), enumerate=enumerate, )) - ############################################################################ # write_webdocs @@ -668,10 +684,11 @@ def capitalize(word: str, delimiter: str = " ") -> str: return delimiter.join(capital_word_array) + ################################################################################ # lowercase # -# A helper function to take each word in the string and convert it to a snake +# A helper function to take each word in the string and convert it to a snake # case string of lowercase letters. A delimiter can be passed in to change the # characters inserted between the newly lowercased words. ################################################################################ @@ -685,6 +702,28 @@ def lowercase(word: str, delimiter: str = "_") -> str: return delimiter.join(lower_word_array) + +################################################################################ +# insert_delimiter (Process is called tmesis) +# +# A helper function to take a string with no delmiter and convert it to a snake +# case string of lowercase letters. A delimiter can be passed in to change the +# characters inserted between the newly lowercased words. +################################################################################ +def insert_delimiter(word: str, delimiter: str = "_") -> str: + delimitered_word_array = [] + + for i, letter in enumerate(word): + if letter.isupper(): + if i != 0: + delimitered_word_array.append(delimiter) + delimitered_word_array.append(letter.lower()) + else: + delimitered_word_array.append(letter) + + return "".join(delimitered_word_array) + + ################################################################################ # main # diff --git a/xml_converter/generators/cpp_templates/attribute_template.hpp b/xml_converter/generators/cpp_templates/attribute_template.hpp index a19f5095..eddd17a6 100644 --- a/xml_converter/generators/cpp_templates/attribute_template.hpp +++ b/xml_converter/generators/cpp_templates/attribute_template.hpp @@ -11,15 +11,15 @@ using namespace std; {%- if type == "Enum":%} enum {{class_name}} { - {%- for attribute_variable in attribute_variables: %} - {{attribute_variable[0]}}, + {%- for template_variable in template_variables: %} + {{template_variable[0]}}, {%- endfor %} }; {%- else: %} class {{class_name}} { public: - {%- for attribute_variable in attribute_variables: %} - {{attribute_variable[2]}} {{attribute_variable[0]}}; + {%- for template_variable in template_variables: %} + {{template_variable[1]}} {{template_variable[0]}}; {%- endfor %} virtual string classname() { return "{{class_name}}"; }; diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index d6810b3b..30a8c7da 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -23,33 +23,35 @@ void Category::init_from_xml(rapidxml::xml_node<>* node, vector *erro } } } + {%- endif %} bool {{cpp_class}}::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors) { string attributename; attributename = normalize_type_name(get_attribute_name(attribute)); -{%-for n, attribute_variable in enumerate(attribute_variables)%} - {%-for i, value in enumerate(attribute_variable[3])%} +{%-for n, template_variable in enumerate(template_variables)%} + {%-for i, value in enumerate(template_variable[3])%} {%-if i == 0 and n == 0:%} if (attributename == "{{value}}") { - this->{{attribute_variables[n][0]}} = parse_{{attribute_variables[n][2]}}(attribute, errors); + this->{{template_variables[n][0]}} = parse_{{template_variables[n][2]}}(attribute, errors); } - {%- else: %} + {%- else: %} else if (attributename == "{{value}}") { - this->{{attribute_variables[n][0]}} = parse_{{attribute_variables[n][2]}}(attribute, errors); + this->{{template_variables[n][0]}} = parse_{{template_variables[n][2]}}(attribute, errors); } {%- endif %} {%- endfor %} {%- endfor %} - {%- if cpp_class == "Category": %} - else if (attributename == "POI") { - this->default_icon.init_xml_attribute(attribute, errors); - } - else if (attributename == "Trail"){ - this->default_trail.init_xml_attribute(attribute, errors); - } - {%- endif %} else { return false; } return true; } + +{%-if attributes_of_type_marker_category %} +bool {{cpp_class}}::validate_attributes_of_type_marker_category(){ + {%-for attribute in attributes_of_type_marker_category%} + // TODO: validate "{{attribute}}") + {%- endfor %} + return true; +} +{%- endif %} diff --git a/xml_converter/generators/cpp_templates/class_template.hpp b/xml_converter/generators/cpp_templates/class_template.hpp index b481d2d1..064ab02f 100644 --- a/xml_converter/generators/cpp_templates/class_template.hpp +++ b/xml_converter/generators/cpp_templates/class_template.hpp @@ -22,13 +22,12 @@ {% for cpp_include_path in cpp_include_paths %} #include "attribute/{{cpp_include_path}}.hpp" {%- endfor %} - using namespace std; class {{cpp_class}}: public Parseable { public: - {%- for attribute_variable in attribute_variables: %} - {{attribute_variable[1]}} {{attribute_variable[0]}}; + {%- for template_variable in template_variables: %} + {{template_variable[1]}} {{template_variable[0]}}; {%- endfor %} @@ -41,5 +40,7 @@ class {{cpp_class}}: public Parseable { {%- endif %} virtual string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors); - + {%-if attributes_of_type_marker_category %} + bool validate_attributes_of_type_marker_category(); + {%- endif %} }; \ No newline at end of file diff --git a/xml_converter/generators/cpp_templates/compoundvalue.cpp b/xml_converter/generators/cpp_templates/compoundvalue.cpp index 3a63f9cc..ac5121c8 100644 --- a/xml_converter/generators/cpp_templates/compoundvalue.cpp +++ b/xml_converter/generators/cpp_templates/compoundvalue.cpp @@ -10,28 +10,31 @@ {{class_name}} parse_{{attribute_name}}(rapidxml::xml_attribute<>* input, vector *){ {{class_name}} {{attribute_name}}; vector compound_values; - string attributename; + string attributename; +{%- for template_variable in template_variables: %} + {{attribute_name}}.{{template_variable[0]}} = 0; +{%- endfor %} attributename = get_attribute_name(input); compound_values = split(get_attribute_value(input), ","); - + if (typeid(compound_values) == typeid(std::string)) { -{%-for n, attribute_variable in enumerate(attribute_variables)%} - {%-for i, value in enumerate(attribute_variable[1])%} +{%-for n, template_variable in enumerate(template_variables)%} + {%-for i, value in enumerate(template_variable[3])%} {%-if i == 0 and n == 0:%} if (attributename == "{{value}}") { - {{attribute_name}}.{{attribute_variables[n][0]}} = std::stof(get_attribute_value(input)); + {{attribute_name}}.{{template_variables[n][0]}} = std::stof(get_attribute_value(input)); } {%- else %} else if (attributename == "{{value}}") { - {{attribute_name}}.{{attribute_variables[n][0]}} = std::stof(get_attribute_value(input)); + {{attribute_name}}.{{template_variables[n][0]}} = std::stof(get_attribute_value(input)); } {%- endif %} {%- endfor %} {%- endfor %} else { - {%-for n, attribute_variable in enumerate(attribute_variables)%} - {{attribute_name}}.{{attribute_variables[n][0]}} = std::stof(compound_values[{{n}}]); + {%-for n, template_variable in enumerate(template_variables)%} + {{attribute_name}}.{{template_variables[n][0]}} = std::stof(compound_values[{{n}}]); {%- endfor %} } } diff --git a/xml_converter/generators/cpp_templates/enum.cpp b/xml_converter/generators/cpp_templates/enum.cpp index ca335836..1ae96a86 100644 --- a/xml_converter/generators/cpp_templates/enum.cpp +++ b/xml_converter/generators/cpp_templates/enum.cpp @@ -8,22 +8,23 @@ {{class_name}} parse_{{attribute_name}}(rapidxml::xml_attribute<>* input, vector *errors){ {{class_name}} {{attribute_name}}; -{%-for n, attribute_variable in enumerate(attribute_variables)%} - {%-for i, value in enumerate(attribute_variable[1])%} +{%-for n, template_variable in enumerate(template_variables)%} + {%-for i, value in enumerate(template_variable[3])%} {%-if i == 0 and n == 0:%} if (get_attribute_value(input) == "{{value}}") { - {{attribute_name}} = {{class_name}}::{{attribute_variable[0]}}; + {{attribute_name}} = {{class_name}}::{{template_variable[0]}}; } {%- else: %} else if (get_attribute_value(input) == "{{value}}") { - {{attribute_name}} = {{class_name}}::{{attribute_variable[0]}}; + {{attribute_name}} = {{class_name}}::{{template_variable[0]}}; } {%- endif %} {%- endfor %} {%- endfor %} - else {errors->push_back(new XMLAttributeValueError("Found a value that was not in the Enum", input)); - {{attribute_name}} = {{class_name}}::{{attribute_variables[0][0]}}; + else { + errors->push_back(new XMLAttributeValueError("Found a value that was not in the Enum", input)); + {{attribute_name}} = {{class_name}}::{{template_variables[0][0]}}; } return {{attribute_name}}; } diff --git a/xml_converter/generators/cpp_templates/multiflagvalue.cpp b/xml_converter/generators/cpp_templates/multiflagvalue.cpp index 072db5a4..35e3b983 100644 --- a/xml_converter/generators/cpp_templates/multiflagvalue.cpp +++ b/xml_converter/generators/cpp_templates/multiflagvalue.cpp @@ -10,22 +10,26 @@ {{class_name}} {{attribute_name}}; vector flag_values; flag_values = split(get_attribute_value(input), ","); +{%-for template_variable in template_variables%} + {{attribute_name}}.{{template_variable[0]}} = false; +{%- endfor %} for (string flag_value : flag_values) { -{%-for n, attribute_variable in enumerate(attribute_variables)%} - {%-for i, value in enumerate(attribute_variable[1])%} +{%-for n, template_variable in enumerate(template_variables)%} + {%-for i, value in enumerate(template_variable[3])%} {%-if i == 0 and n == 0:%} if (flag_value == "{{value}}") { - {{attribute_name}}.{{attribute_variable[0]}} = true; + {{attribute_name}}.{{template_variable[0]}} = true; } {%- else: %} else if (flag_value == "{{value}}") { - {{attribute_name}}.{{attribute_variable[0]}} = true; + {{attribute_name}}.{{template_variable[0]}} = true; } {%- endif %} {%- endfor %} {%- endfor %} - else {errors->push_back(new XMLAttributeValueError("Found a value that was not in the class", input)); + else { + errors->push_back(new XMLAttributeValueError("Found a value that was not in the class", input)); continue; } } diff --git a/xml_converter/src/attribute/cull_chirality.cpp b/xml_converter/src/attribute/cull_chirality.cpp index 8d72731d..928de3f9 100644 --- a/xml_converter/src/attribute/cull_chirality.cpp +++ b/xml_converter/src/attribute/cull_chirality.cpp @@ -17,7 +17,8 @@ CullChirality parse_cull_chirality(rapidxml::xml_attribute<>* input, vectorpush_back(new XMLAttributeValueError("Found a value that was not in the Enum", input)); + else { + errors->push_back(new XMLAttributeValueError("Found a value that was not in the Enum", input)); cull_chirality = CullChirality::none; } return cull_chirality; diff --git a/xml_converter/src/attribute/euler_rotation.cpp b/xml_converter/src/attribute/euler_rotation.cpp index 0072f59b..3cddab5f 100644 --- a/xml_converter/src/attribute/euler_rotation.cpp +++ b/xml_converter/src/attribute/euler_rotation.cpp @@ -10,10 +10,13 @@ EulerRotation parse_euler_rotation(rapidxml::xml_attribute<>* input, vector *){ EulerRotation euler_rotation; vector compound_values; - string attributename; + string attributename; + euler_rotation.x_rotation = 0; + euler_rotation.y_rotation = 0; + euler_rotation.z_rotation = 0; attributename = get_attribute_name(input); compound_values = split(get_attribute_value(input), ","); - + if (typeid(compound_values) == typeid(std::string)) { if (attributename == "rotatex") { euler_rotation.x_rotation = std::stof(get_attribute_value(input)); @@ -33,4 +36,4 @@ EulerRotation parse_euler_rotation(rapidxml::xml_attribute<>* input, vector* input, vector *errors){ FestivalFilter festival_filter; vector flag_values; - flag_values = split(get_attribute_value(input), ","); + flag_values = split(get_attribute_value(input), ","); + festival_filter.dragonbash = false; + festival_filter.festival_of_the_four_winds = false; + festival_filter.halloween = false; + festival_filter.lunar_new_year = false; + festival_filter.super_adventure_festival = false; + festival_filter.wintersday = false; + festival_filter.none = false; for (string flag_value : flag_values) { if (flag_value == "DragonBash") { @@ -36,7 +43,8 @@ FestivalFilter parse_festival_filter(rapidxml::xml_attribute<>* input, vectorpush_back(new XMLAttributeValueError("Found a value that was not in the class", input)); + else { + errors->push_back(new XMLAttributeValueError("Found a value that was not in the class", input)); continue; } } diff --git a/xml_converter/src/attribute/map_type_filter.cpp b/xml_converter/src/attribute/map_type_filter.cpp index 28b0054b..61a92aec 100644 --- a/xml_converter/src/attribute/map_type_filter.cpp +++ b/xml_converter/src/attribute/map_type_filter.cpp @@ -9,7 +9,31 @@ MapTypeFilter parse_map_type_filter(rapidxml::xml_attribute<>* input, vector *errors){ MapTypeFilter map_type_filter; vector flag_values; - flag_values = split(get_attribute_value(input), ","); + flag_values = split(get_attribute_value(input), ","); + map_type_filter.unknown_map = false; + map_type_filter.redirect_map = false; + map_type_filter.character_create_map = false; + map_type_filter.pvp_map = false; + map_type_filter.gvg_map = false; + map_type_filter.instance_map = false; + map_type_filter.public_map = false; + map_type_filter.tournament_map = false; + map_type_filter.tutorial_map = false; + map_type_filter.user_tournament_map = false; + map_type_filter.center_map = false; + map_type_filter.eternal_battlegrounds_map = false; + map_type_filter.bluehome_map = false; + map_type_filter.blue_borderlands_map = false; + map_type_filter.green_home_map = false; + map_type_filter.green_borderlands_map = false; + map_type_filter.red_home_map = false; + map_type_filter.red_borderlands_map = false; + map_type_filter.fortunes_vale_map = false; + map_type_filter.jump_puzzle_map = false; + map_type_filter.obsidian_sanctum_map = false; + map_type_filter.edge_of_the_mists_map = false; + map_type_filter.public_mini_map = false; + map_type_filter.wvw_lounge_map = false; for (string flag_value : flag_values) { if (flag_value == "Unknown") { @@ -84,7 +108,8 @@ MapTypeFilter parse_map_type_filter(rapidxml::xml_attribute<>* input, vectorpush_back(new XMLAttributeValueError("Found a value that was not in the class", input)); + else { + errors->push_back(new XMLAttributeValueError("Found a value that was not in the class", input)); continue; } } diff --git a/xml_converter/src/attribute/marker_category.cpp b/xml_converter/src/attribute/marker_category.cpp index ce396540..8e0294f3 100644 --- a/xml_converter/src/attribute/marker_category.cpp +++ b/xml_converter/src/attribute/marker_category.cpp @@ -10,4 +10,4 @@ MarkerCategory parse_marker_category(rapidxml::xml_attribute<>* input, vector* input, vector *errors){ MountFilter mount_filter; vector flag_values; - flag_values = split(get_attribute_value(input), ","); + flag_values = split(get_attribute_value(input), ","); + mount_filter.raptor = false; + mount_filter.springer = false; + mount_filter.skimmer = false; + mount_filter.jackal = false; + mount_filter.griffon = false; + mount_filter.roller_beetle = false; + mount_filter.warclaw = false; + mount_filter.skyscale = false; + mount_filter.skiff = false; + mount_filter.seige_turtle = false; for (string flag_value : flag_values) { if (flag_value == "Raptor") { @@ -42,7 +52,8 @@ MountFilter parse_mount_filter(rapidxml::xml_attribute<>* input, vectorpush_back(new XMLAttributeValueError("Found a value that was not in the class", input)); + else { + errors->push_back(new XMLAttributeValueError("Found a value that was not in the class", input)); continue; } } diff --git a/xml_converter/src/attribute/position.cpp b/xml_converter/src/attribute/position.cpp index 352eb0fa..6027be72 100644 --- a/xml_converter/src/attribute/position.cpp +++ b/xml_converter/src/attribute/position.cpp @@ -10,10 +10,13 @@ Position parse_position(rapidxml::xml_attribute<>* input, vector *){ Position position; vector compound_values; - string attributename; + string attributename; + position.x_position = 0; + position.y_position = 0; + position.z_position = 0; attributename = get_attribute_name(input); compound_values = split(get_attribute_value(input), ","); - + if (typeid(compound_values) == typeid(std::string)) { if (attributename == "xpos") { position.x_position = std::stof(get_attribute_value(input)); @@ -42,4 +45,4 @@ Position parse_position(rapidxml::xml_attribute<>* input, vector *){ return position; -} \ No newline at end of file +} \ No newline at end of file diff --git a/xml_converter/src/attribute/profession_filter.cpp b/xml_converter/src/attribute/profession_filter.cpp index 3d41363b..f01907f4 100644 --- a/xml_converter/src/attribute/profession_filter.cpp +++ b/xml_converter/src/attribute/profession_filter.cpp @@ -9,7 +9,16 @@ ProfessionFilter parse_profession_filter(rapidxml::xml_attribute<>* input, vector *errors){ ProfessionFilter profession_filter; vector flag_values; - flag_values = split(get_attribute_value(input), ","); + flag_values = split(get_attribute_value(input), ","); + profession_filter.guardian = false; + profession_filter.warrior = false; + profession_filter.engineer = false; + profession_filter.ranger = false; + profession_filter.thief = false; + profession_filter.elementalist = false; + profession_filter.mesmer = false; + profession_filter.necromancer = false; + profession_filter.revenant = false; for (string flag_value : flag_values) { if (flag_value == "Guardian") { @@ -39,7 +48,8 @@ ProfessionFilter parse_profession_filter(rapidxml::xml_attribute<>* input, vecto else if (flag_value == "Revenant") { profession_filter.revenant = true; } - else {errors->push_back(new XMLAttributeValueError("Found a value that was not in the class", input)); + else { + errors->push_back(new XMLAttributeValueError("Found a value that was not in the class", input)); continue; } } diff --git a/xml_converter/src/attribute/reset_behavior.cpp b/xml_converter/src/attribute/reset_behavior.cpp index 6c8bc4a2..72bb71c9 100644 --- a/xml_converter/src/attribute/reset_behavior.cpp +++ b/xml_converter/src/attribute/reset_behavior.cpp @@ -62,7 +62,8 @@ ResetBehavior parse_reset_behavior(rapidxml::xml_attribute<>* input, vectorpush_back(new XMLAttributeValueError("Found a value that was not in the Enum", input)); + else { + errors->push_back(new XMLAttributeValueError("Found a value that was not in the Enum", input)); reset_behavior = ResetBehavior::always_visible; } return reset_behavior; diff --git a/xml_converter/src/attribute/specialization_filter.cpp b/xml_converter/src/attribute/specialization_filter.cpp index b5de7bc2..fef5ffeb 100644 --- a/xml_converter/src/attribute/specialization_filter.cpp +++ b/xml_converter/src/attribute/specialization_filter.cpp @@ -9,7 +9,79 @@ SpecializationFilter parse_specialization_filter(rapidxml::xml_attribute<>* input, vector *errors){ SpecializationFilter specialization_filter; vector flag_values; - flag_values = split(get_attribute_value(input), ","); + flag_values = split(get_attribute_value(input), ","); + specialization_filter.elementalist_tempest = false; + specialization_filter.engineer_scrapper = false; + specialization_filter.guardian_dragonhunter = false; + specialization_filter.mesmer_chronomancer = false; + specialization_filter.necromancer_reaper = false; + specialization_filter.ranger_druid = false; + specialization_filter.revenant_herald = false; + specialization_filter.thief_daredevil = false; + specialization_filter.warrior_berserker = false; + specialization_filter.elementalist_weaver = false; + specialization_filter.engineer_holosmith = false; + specialization_filter.guardian_firebrand = false; + specialization_filter.mesmer_mirage = false; + specialization_filter.necromancer_scourge = false; + specialization_filter.ranger_soulbeast = false; + specialization_filter.revenant_renegade = false; + specialization_filter.thief_deadeye = false; + specialization_filter.warrior_spellbreaker = false; + specialization_filter.elementalist_catalyst = false; + specialization_filter.engineer_mechanist = false; + specialization_filter.guardian_willbender = false; + specialization_filter.mesmer_virtuoso = false; + specialization_filter.necromancer_harbinger = false; + specialization_filter.ranger_untamed = false; + specialization_filter.revenant_vindicator = false; + specialization_filter.thief_specter = false; + specialization_filter.warrior_bladesworn = false; + specialization_filter.elementalist_air = false; + specialization_filter.elementalist_arcane = false; + specialization_filter.elementalist_earth = false; + specialization_filter.elementalist_fire = false; + specialization_filter.elementalist_water = false; + specialization_filter.engineer_alchemy = false; + specialization_filter.engineer_explosives = false; + specialization_filter.engineer_firearms = false; + specialization_filter.engineer_inventions = false; + specialization_filter.engineer_tools = false; + specialization_filter.guardian_honor = false; + specialization_filter.guardian_radiance = false; + specialization_filter.guardian_valor = false; + specialization_filter.guardian_virtues = false; + specialization_filter.guardian_zeal = false; + specialization_filter.mesmer_chaos = false; + specialization_filter.mesmer_domination = false; + specialization_filter.mesmer_dueling = false; + specialization_filter.mesmer_illusions = false; + specialization_filter.mesmer_inspiration = false; + specialization_filter.necromancer_blood_magic = false; + specialization_filter.necromancer_curses = false; + specialization_filter.necromancer_death_magic = false; + specialization_filter.necromancer_soul_reaping = false; + specialization_filter.necromancer_spite = false; + specialization_filter.ranger_beastmastery = false; + specialization_filter.ranger_marksmanship = false; + specialization_filter.ranger_nature_magic = false; + specialization_filter.ranger_skirmishing = false; + specialization_filter.ranger_wilderness_survival = false; + specialization_filter.revenant_corruption = false; + specialization_filter.revenant_devastation = false; + specialization_filter.revenant_invocation = false; + specialization_filter.revenant_retribution = false; + specialization_filter.revenant_salvation = false; + specialization_filter.thief_acrobatics = false; + specialization_filter.thief_critical_strikes = false; + specialization_filter.thief_deadly_arts = false; + specialization_filter.thief_shadow_arts = false; + specialization_filter.thief_trickery = false; + specialization_filter.warrior_arms = false; + specialization_filter.warrior_defense = false; + specialization_filter.warrior_discipline = false; + specialization_filter.warrior_strength = false; + specialization_filter.warrior_tactics = false; for (string flag_value : flag_values) { if (flag_value == "48") { @@ -282,7 +354,8 @@ SpecializationFilter parse_specialization_filter(rapidxml::xml_attribute<>* inpu else if (flag_value == "11") { specialization_filter.warrior_tactics = true; } - else {errors->push_back(new XMLAttributeValueError("Found a value that was not in the class", input)); + else { + errors->push_back(new XMLAttributeValueError("Found a value that was not in the class", input)); continue; } } diff --git a/xml_converter/src/attribute/species_filter.cpp b/xml_converter/src/attribute/species_filter.cpp index 874dfdd1..ad3e5335 100644 --- a/xml_converter/src/attribute/species_filter.cpp +++ b/xml_converter/src/attribute/species_filter.cpp @@ -9,7 +9,12 @@ SpeciesFilter parse_species_filter(rapidxml::xml_attribute<>* input, vector *errors){ SpeciesFilter species_filter; vector flag_values; - flag_values = split(get_attribute_value(input), ","); + flag_values = split(get_attribute_value(input), ","); + species_filter.asura = false; + species_filter.charr = false; + species_filter.human = false; + species_filter.norn = false; + species_filter.sylvari = false; for (string flag_value : flag_values) { if (flag_value == "asura") { @@ -27,7 +32,8 @@ SpeciesFilter parse_species_filter(rapidxml::xml_attribute<>* input, vectorpush_back(new XMLAttributeValueError("Found a value that was not in the class", input)); + else { + errors->push_back(new XMLAttributeValueError("Found a value that was not in the class", input)); continue; } } diff --git a/xml_converter/src/attribute/unique_id.cpp b/xml_converter/src/attribute/unique_id.cpp index 59166b73..24b14392 100644 --- a/xml_converter/src/attribute/unique_id.cpp +++ b/xml_converter/src/attribute/unique_id.cpp @@ -5,9 +5,13 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" +#include "../string_helper.hpp" UniqueId parse_unique_id(rapidxml::xml_attribute<>* input, vector *) { UniqueId unique_id; - unique_id.guid = get_attribute_value(input); + string base64; + base64 = get_attribute_value(input); + std::vector guid = base64_decode(base64); + unique_id.guid = guid; return unique_id; } diff --git a/xml_converter/src/attribute/unique_id.hpp b/xml_converter/src/attribute/unique_id.hpp index 80dc7c5f..8e055c28 100644 --- a/xml_converter/src/attribute/unique_id.hpp +++ b/xml_converter/src/attribute/unique_id.hpp @@ -5,11 +5,12 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" +#include "../string_helper.hpp" using namespace std; class UniqueId { public: - string guid; + vector guid; }; UniqueId parse_unique_id(rapidxml::xml_attribute<>* input, vector *errors); diff --git a/xml_converter/src/category.cpp b/xml_converter/src/category.cpp index e3b52a0a..6bb3b145 100644 --- a/xml_converter/src/category.cpp +++ b/xml_converter/src/category.cpp @@ -40,12 +40,6 @@ bool Category::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectortooltip_name = parse_string(attribute, errors); } - else if (attributename == "POI") { - this->default_icon.init_xml_attribute(attribute, errors); - } - else if (attributename == "Trail"){ - this->default_trail.init_xml_attribute(attribute, errors); - } else { return false; } diff --git a/xml_converter/src/category.hpp b/xml_converter/src/category.hpp index 2d33d374..78c1322f 100644 --- a/xml_converter/src/category.hpp +++ b/xml_converter/src/category.hpp @@ -9,7 +9,6 @@ #include "attribute/bool.hpp" #include "attribute/string.hpp" - using namespace std; class Category: public Parseable { @@ -26,5 +25,4 @@ class Category: public Parseable { void init_from_xml(rapidxml::xml_node<>* node, vector *errors); virtual string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors); - }; \ No newline at end of file diff --git a/xml_converter/src/icon.cpp b/xml_converter/src/icon.cpp index e35978a1..795e29df 100644 --- a/xml_converter/src/icon.cpp +++ b/xml_converter/src/icon.cpp @@ -65,6 +65,9 @@ bool Icon::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectordistance_fade_start = parse_float(attribute, errors); } + else if (attributename == "rotation") { + this->euler_rotation = parse_euler_rotation(attribute, errors); + } else if (attributename == "rotatex") { this->euler_rotation = parse_euler_rotation(attribute, errors); } @@ -119,6 +122,9 @@ bool Icon::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectormount_filter = parse_mount_filter(attribute, errors); } + else if (attributename == "position") { + this->position = parse_position(attribute, errors); + } else if (attributename == "xpos") { this->position = parse_position(attribute, errors); } @@ -204,4 +210,11 @@ bool Icon::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector* attribute, vector *errors); - + bool validate_attributes_of_type_marker_category(); }; \ No newline at end of file diff --git a/xml_converter/src/string_helper.cpp b/xml_converter/src/string_helper.cpp index bf01d014..00dab0b9 100644 --- a/xml_converter/src/string_helper.cpp +++ b/xml_converter/src/string_helper.cpp @@ -1,9 +1,11 @@ #include "string_helper.hpp" +#include #include #include #include + using namespace std; bool matches_any(string test, std::initializer_list list) { @@ -78,4 +80,99 @@ string lowercase(string input) { } } return output; +} + + +// Functions to either encode or decode base64 strings +// Obtained from https://stackoverflow.com/questions/180947/base64-decode-snippet-in-c +static const std::string base64_chars = + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "abcdefghijklmnopqrstuvwxyz" + "0123456789+/"; + + +static inline bool is_base64(BYTE c) { + return (isalnum(c) || (c == '+') || (c == '/')); +} + +std::string base64_encode(BYTE const* buf, unsigned int bufLen) { + std::string ret; + int i = 0; + int j = 0; + BYTE char_array_3[3]; + BYTE char_array_4[4]; + + while (bufLen--) { + char_array_3[i++] = *(buf++); + if (i == 3) { + char_array_4[0] = (char_array_3[0] & 0xfc) >> 2; + char_array_4[1] = ((char_array_3[0] & 0x03) << 4) + ((char_array_3[1] & 0xf0) >> 4); + char_array_4[2] = ((char_array_3[1] & 0x0f) << 2) + ((char_array_3[2] & 0xc0) >> 6); + char_array_4[3] = char_array_3[2] & 0x3f; + + for(i = 0; (i <4) ; i++) + ret += base64_chars[char_array_4[i]]; + i = 0; + } + } + + if (i) + { + for(j = i; j < 3; j++) + char_array_3[j] = '\0'; + + char_array_4[0] = (char_array_3[0] & 0xfc) >> 2; + char_array_4[1] = ((char_array_3[0] & 0x03) << 4) + ((char_array_3[1] & 0xf0) >> 4); + char_array_4[2] = ((char_array_3[1] & 0x0f) << 2) + ((char_array_3[2] & 0xc0) >> 6); + char_array_4[3] = char_array_3[2] & 0x3f; + + for (j = 0; (j < i + 1); j++) + ret += base64_chars[char_array_4[j]]; + + while((i++ < 3)) + ret += '='; + } + + return ret; +} + +std::vector base64_decode(std::string const& encoded_string) { + int in_len = encoded_string.size(); + int i = 0; + int j = 0; + int in_ = 0; + BYTE char_array_4[4], char_array_3[3]; + std::vector ret; + + while (in_len-- && ( encoded_string[in_] != '=') && is_base64(encoded_string[in_])) { + char_array_4[i++] = encoded_string[in_]; in_++; + if (i ==4) { + for (i = 0; i <4; i++) + char_array_4[i] = base64_chars.find(char_array_4[i]); + + char_array_3[0] = (char_array_4[0] << 2) + ((char_array_4[1] & 0x30) >> 4); + char_array_3[1] = ((char_array_4[1] & 0xf) << 4) + ((char_array_4[2] & 0x3c) >> 2); + char_array_3[2] = ((char_array_4[2] & 0x3) << 6) + char_array_4[3]; + + for (i = 0; (i < 3); i++) + ret.push_back(char_array_3[i]); + i = 0; + } + } + + if (i) { + for (j = i; j <4; j++) + char_array_4[j] = 0; + + for (j = 0; j <4; j++) + char_array_4[j] = base64_chars.find(char_array_4[j]); + + char_array_3[0] = (char_array_4[0] << 2) + ((char_array_4[1] & 0x30) >> 4); + char_array_3[1] = ((char_array_4[1] & 0xf) << 4) + ((char_array_4[2] & 0x3c) >> 2); + char_array_3[2] = ((char_array_4[2] & 0x3) << 6) + char_array_4[3]; + + for (j = 0; (j < i - 1); j++) ret.push_back(char_array_3[j]); + } + + return ret; } \ No newline at end of file diff --git a/xml_converter/src/string_helper.hpp b/xml_converter/src/string_helper.hpp index b0fff712..c184e725 100644 --- a/xml_converter/src/string_helper.hpp +++ b/xml_converter/src/string_helper.hpp @@ -14,4 +14,12 @@ vector split(string input, string delimiter); string normalize_type_name(string type_name); +#ifndef _BASE64_H_ +#define _BASE64_H_ +typedef unsigned char BYTE; + +std::string base64_encode(BYTE const* buf, unsigned int bufLen); +std::vector base64_decode(std::string const&); + +#endif \ No newline at end of file diff --git a/xml_converter/src/trail.cpp b/xml_converter/src/trail.cpp index 38bb33d8..86f73bb7 100644 --- a/xml_converter/src/trail.cpp +++ b/xml_converter/src/trail.cpp @@ -120,4 +120,8 @@ bool Trail::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector* attribute, vector *errors); - + bool validate_attributes_of_type_marker_category(); }; \ No newline at end of file diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 0b4b546b..ebe5a089 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -37,9 +37,10 @@ bool has_suffix(std::string const &fullString, std::string const &ending) { } } -Category* get_category(rapidxml::xml_attribute<>* attribute, map* marker_categories, vector* errors) { +Category* get_category(rapidxml::xml_node<>* node, map* marker_categories, vector* errors) { + rapidxml::xml_attribute<>* attribute = find_attribute(node, "type"); vector split_categories = split(get_attribute_value(attribute), "."); - + if (split_categories.size() == 0) { errors->push_back(new XMLAttributeValueError("Empty Type", attribute)); return nullptr; @@ -79,7 +80,7 @@ vector parse_pois(rapidxml::xml_node<>* root_node, map* node = root_node->first_node(); node; node = node->next_sibling()) { if (get_node_name(node) == "POI") { - Category* default_category = get_category(find_attribute(node, "type"), marker_categories, errors); + Category* default_category = get_category(node, marker_categories, errors); Icon icon; @@ -91,7 +92,7 @@ vector parse_pois(rapidxml::xml_node<>* root_node, map Date: Sun, 21 Aug 2022 15:23:18 -0400 Subject: [PATCH 065/539] Changed name of a class and variable --- xml_converter/generators/code_generator.py | 42 +++++++++---------- .../cpp_templates/attribute_template.hpp | 8 ++-- .../cpp_templates/class_template.cpp | 8 ++-- .../cpp_templates/class_template.hpp | 4 +- .../cpp_templates/compoundvalue.cpp | 16 +++---- .../generators/cpp_templates/enum.cpp | 10 ++--- .../cpp_templates/multiflagvalue.cpp | 12 +++--- 7 files changed, 50 insertions(+), 50 deletions(-) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index d4561e3a..59e438d7 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -253,7 +253,7 @@ class FieldRow: @dataclass -class TemplateVariables: +class AttributeVariable: attribute_name: str cpp_type: str class_name: str @@ -313,16 +313,16 @@ def write_cpp_classes(self, output_directory: str) -> None: for attribute_name in attribute_names: metadata[attribute_name] = self.data[attribute_name].metadata - template_variables, cpp_include_paths = self.generate_cpp_variable_data(metadata, cpp_class, attribute_names) + attribute_variables, cpp_include_paths = self.generate_cpp_variable_data(metadata, cpp_class, attribute_names) - for template_variable in template_variables: + for template_variable in attribute_variables: if template_variable[2] == "marker_category": attributes_of_type_marker_category.append(template_variable[0]) with open(os.path.join(output_directory, lowercase(cpp_class) + ".hpp"), 'w') as f: f.write(header_template.render( cpp_class=cpp_class, - template_variables=sorted(template_variables), + attribute_variables=sorted(attribute_variables), cpp_include_paths=sorted(cpp_include_paths), attributes_of_type_marker_category=attributes_of_type_marker_category, )) @@ -332,11 +332,11 @@ def write_cpp_classes(self, output_directory: str) -> None: cpp_class=cpp_class, cpp_class_header=lowercase(cpp_class), xml_class_name=cpp_classes[cpp_class], - template_variables=sorted(template_variables), + attribute_variables=sorted(attribute_variables), enumerate=enumerate, attributes_of_type_marker_category=attributes_of_type_marker_category, )) - print(attributes_of_type_marker_category) + ############################################################################ # generate_cpp_variable_data # @@ -349,11 +349,11 @@ def generate_cpp_variable_data( metadata: Dict[str, SchemaType], doc_type: str, attribute_names: Dict[str, str] = {} - ) -> Tuple[List[Tuple[str, str, str, List[str]]], Set[str]]: + ) -> Tuple[List[AttributeVariable], Set[str]]: cpp_include_paths: Set[str] = set() attribute_name: str = "" - template_variables: List[Tuple[str, str, str, List[str]]] = [] + attribute_variables: AttributeVariable = [] xml_fields: List[str] = [] for fieldkey, field in metadata.items(): @@ -388,10 +388,10 @@ def generate_cpp_variable_data( for item in component['xml_fields']: xml_fields.append(lowercase(item, delimiter="")) - TemplateVariables = (attribute_name, cpp_type, class_name, xml_fields) - template_variables.append(TemplateVariables) + attribute_variable = (attribute_name, cpp_type, class_name, xml_fields) + attribute_variables.append(attribute_variable) - return template_variables, cpp_include_paths + return attribute_variables, cpp_include_paths ############################################################################ # write_attributes @@ -405,7 +405,7 @@ def write_attribute(self, output_directory: str) -> None: file_loader = FileSystemLoader('cpp_templates') env = Environment(loader=file_loader) attribute_names: Dict[str, str] = {} - template_variables: List[Tuple[str, str, str, List[str]]] = [] + attribute_variables: List[AttributeVariable] = [] metadata: Dict[str, SchemaType] = {} xml_fields: List[str] = [] template: Dict[str, Template] = { @@ -419,18 +419,18 @@ def write_attribute(self, output_directory: str) -> None: attribute_names[filepath] = filename.split(".md")[0] for filepath in attribute_names: - template_variables = [] + attribute_variables = [] attribute_name = attribute_names[filepath] metadata[filepath] = self.data[filepath].metadata if metadata[filepath]['type'] == "MultiflagValue": for flag in metadata[filepath]['flags']: - TemplateVariables = (flag, "bool", attribute_name, metadata[filepath]['flags'][flag]) + attribute_variable = (flag, "bool", attribute_name, metadata[filepath]['flags'][flag]) if type(flag) != str: print(flag, type(flag)) if type(metadata[filepath]['flags'][flag]) != list: print(metadata[filepath]['flags'][flag], type(metadata[filepath]['flags'][flag])) - template_variables.append(TemplateVariables) + attribute_variables.append(attribute_variable) elif metadata[filepath]['type'] == "CompoundValue": for component in metadata[filepath]['components']: xml_fields = [] @@ -440,13 +440,13 @@ def write_attribute(self, output_directory: str) -> None: )) for item in component['xml_fields']: xml_fields.append(lowercase(item, delimiter="")) - TemplateVariables = (lowercase(component['name'], delimiter="_"), doc_type_to_cpp_type[component['type']], attribute_name, xml_fields) - template_variables.append(TemplateVariables) + attribute_variable = (lowercase(component['name'], delimiter="_"), doc_type_to_cpp_type[component['type']], attribute_name, xml_fields) + attribute_variables.append(attribute_variable) elif metadata[filepath]['type'] == "Enum": for value in metadata[filepath]['values']: - TemplateVariables = (value, "str", attribute_name, metadata[filepath]['values'][value]) - template_variables.append(TemplateVariables) + attribute_variable = (value, "str", attribute_name, metadata[filepath]['values'][value]) + attribute_variables.append(attribute_variable) else: continue @@ -454,7 +454,7 @@ def write_attribute(self, output_directory: str) -> None: with open(os.path.join(output_directory, attribute_name + ".hpp"), 'w') as f: f.write(env.get_template("attribute_template.hpp").render( attribute_name=attribute_name, - template_variables=sorted(template_variables), + attribute_variables=sorted(attribute_variables), class_name=capitalize(attribute_name, delimiter=""), type=metadata[filepath]['type'], )) @@ -462,7 +462,7 @@ def write_attribute(self, output_directory: str) -> None: with open(os.path.join(output_directory, attribute_name + ".cpp"), 'w') as f: f.write(template[metadata[filepath]['type']].render( attribute_name=attribute_name, - template_variables=template_variables, + attribute_variables=attribute_variables, class_name=capitalize(attribute_name, delimiter=""), enumerate=enumerate, )) diff --git a/xml_converter/generators/cpp_templates/attribute_template.hpp b/xml_converter/generators/cpp_templates/attribute_template.hpp index eddd17a6..a607e38b 100644 --- a/xml_converter/generators/cpp_templates/attribute_template.hpp +++ b/xml_converter/generators/cpp_templates/attribute_template.hpp @@ -11,15 +11,15 @@ using namespace std; {%- if type == "Enum":%} enum {{class_name}} { - {%- for template_variable in template_variables: %} - {{template_variable[0]}}, + {%- for attribute_variable in attribute_variables: %} + {{attribute_variable[0]}}, {%- endfor %} }; {%- else: %} class {{class_name}} { public: - {%- for template_variable in template_variables: %} - {{template_variable[1]}} {{template_variable[0]}}; + {%- for attribute_variable in attribute_variables: %} + {{attribute_variable[1]}} {{attribute_variable[0]}}; {%- endfor %} virtual string classname() { return "{{class_name}}"; }; diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index 30a8c7da..21a3df6a 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -28,15 +28,15 @@ void Category::init_from_xml(rapidxml::xml_node<>* node, vector *erro bool {{cpp_class}}::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors) { string attributename; attributename = normalize_type_name(get_attribute_name(attribute)); -{%-for n, template_variable in enumerate(template_variables)%} - {%-for i, value in enumerate(template_variable[3])%} +{%-for n, attribute_variable in enumerate(attribute_variables)%} + {%-for i, value in enumerate(attribute_variable[3])%} {%-if i == 0 and n == 0:%} if (attributename == "{{value}}") { - this->{{template_variables[n][0]}} = parse_{{template_variables[n][2]}}(attribute, errors); + this->{{attribute_variables[n][0]}} = parse_{{attribute_variables[n][2]}}(attribute, errors); } {%- else: %} else if (attributename == "{{value}}") { - this->{{template_variables[n][0]}} = parse_{{template_variables[n][2]}}(attribute, errors); + this->{{attribute_variables[n][0]}} = parse_{{attribute_variables[n][2]}}(attribute, errors); } {%- endif %} {%- endfor %} diff --git a/xml_converter/generators/cpp_templates/class_template.hpp b/xml_converter/generators/cpp_templates/class_template.hpp index 064ab02f..260cf055 100644 --- a/xml_converter/generators/cpp_templates/class_template.hpp +++ b/xml_converter/generators/cpp_templates/class_template.hpp @@ -26,8 +26,8 @@ using namespace std; class {{cpp_class}}: public Parseable { public: - {%- for template_variable in template_variables: %} - {{template_variable[1]}} {{template_variable[0]}}; + {%- for attribute_variable in attribute_variables: %} + {{attribute_variable[1]}} {{attribute_variable[0]}}; {%- endfor %} diff --git a/xml_converter/generators/cpp_templates/compoundvalue.cpp b/xml_converter/generators/cpp_templates/compoundvalue.cpp index ac5121c8..3cd78c8f 100644 --- a/xml_converter/generators/cpp_templates/compoundvalue.cpp +++ b/xml_converter/generators/cpp_templates/compoundvalue.cpp @@ -11,30 +11,30 @@ {{class_name}} {{attribute_name}}; vector compound_values; string attributename; -{%- for template_variable in template_variables: %} - {{attribute_name}}.{{template_variable[0]}} = 0; +{%- for attribute_variable in attribute_variables: %} + {{attribute_name}}.{{attribute_variable[0]}} = 0; {%- endfor %} attributename = get_attribute_name(input); compound_values = split(get_attribute_value(input), ","); if (typeid(compound_values) == typeid(std::string)) { -{%-for n, template_variable in enumerate(template_variables)%} - {%-for i, value in enumerate(template_variable[3])%} +{%-for n, attribute_variable in enumerate(attribute_variables)%} + {%-for i, value in enumerate(attribute_variable[3])%} {%-if i == 0 and n == 0:%} if (attributename == "{{value}}") { - {{attribute_name}}.{{template_variables[n][0]}} = std::stof(get_attribute_value(input)); + {{attribute_name}}.{{attribute_variables[n][0]}} = std::stof(get_attribute_value(input)); } {%- else %} else if (attributename == "{{value}}") { - {{attribute_name}}.{{template_variables[n][0]}} = std::stof(get_attribute_value(input)); + {{attribute_name}}.{{attribute_variables[n][0]}} = std::stof(get_attribute_value(input)); } {%- endif %} {%- endfor %} {%- endfor %} else { - {%-for n, template_variable in enumerate(template_variables)%} - {{attribute_name}}.{{template_variables[n][0]}} = std::stof(compound_values[{{n}}]); + {%-for n, attribute_variable in enumerate(attribute_variables)%} + {{attribute_name}}.{{attribute_variables[n][0]}} = std::stof(compound_values[{{n}}]); {%- endfor %} } } diff --git a/xml_converter/generators/cpp_templates/enum.cpp b/xml_converter/generators/cpp_templates/enum.cpp index 1ae96a86..596b8dc6 100644 --- a/xml_converter/generators/cpp_templates/enum.cpp +++ b/xml_converter/generators/cpp_templates/enum.cpp @@ -8,15 +8,15 @@ {{class_name}} parse_{{attribute_name}}(rapidxml::xml_attribute<>* input, vector *errors){ {{class_name}} {{attribute_name}}; -{%-for n, template_variable in enumerate(template_variables)%} - {%-for i, value in enumerate(template_variable[3])%} +{%-for n, attribute_variable in enumerate(attribute_variables)%} + {%-for i, value in enumerate(attribute_variable[3])%} {%-if i == 0 and n == 0:%} if (get_attribute_value(input) == "{{value}}") { - {{attribute_name}} = {{class_name}}::{{template_variable[0]}}; + {{attribute_name}} = {{class_name}}::{{attribute_variable[0]}}; } {%- else: %} else if (get_attribute_value(input) == "{{value}}") { - {{attribute_name}} = {{class_name}}::{{template_variable[0]}}; + {{attribute_name}} = {{class_name}}::{{attribute_variable[0]}}; } {%- endif %} {%- endfor %} @@ -24,7 +24,7 @@ {%- endfor %} else { errors->push_back(new XMLAttributeValueError("Found a value that was not in the Enum", input)); - {{attribute_name}} = {{class_name}}::{{template_variables[0][0]}}; + {{attribute_name}} = {{class_name}}::{{attribute_variables[0][0]}}; } return {{attribute_name}}; } diff --git a/xml_converter/generators/cpp_templates/multiflagvalue.cpp b/xml_converter/generators/cpp_templates/multiflagvalue.cpp index 35e3b983..dcd99350 100644 --- a/xml_converter/generators/cpp_templates/multiflagvalue.cpp +++ b/xml_converter/generators/cpp_templates/multiflagvalue.cpp @@ -10,20 +10,20 @@ {{class_name}} {{attribute_name}}; vector flag_values; flag_values = split(get_attribute_value(input), ","); -{%-for template_variable in template_variables%} - {{attribute_name}}.{{template_variable[0]}} = false; +{%-for attribute_variable in attribute_variables%} + {{attribute_name}}.{{attribute_variable[0]}} = false; {%- endfor %} for (string flag_value : flag_values) { -{%-for n, template_variable in enumerate(template_variables)%} - {%-for i, value in enumerate(template_variable[3])%} +{%-for n, attribute_variable in enumerate(attribute_variables)%} + {%-for i, value in enumerate(attribute_variable[3])%} {%-if i == 0 and n == 0:%} if (flag_value == "{{value}}") { - {{attribute_name}}.{{template_variable[0]}} = true; + {{attribute_name}}.{{attribute_variable[0]}} = true; } {%- else: %} else if (flag_value == "{{value}}") { - {{attribute_name}}.{{template_variable[0]}} = true; + {{attribute_name}}.{{attribute_variable[0]}} = true; } {%- endif %} {%- endfor %} From 74eb996fda1b951cdd0ec84f48df7bda3493985b Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 21 Aug 2022 16:00:44 -0400 Subject: [PATCH 066/539] Addressing changes from code review --- xml_converter/generators/code_generator.py | 6 +- .../cpp_templates/class_template.cpp | 2 +- xml_converter/src/attribute/unique_id.cpp | 2 +- xml_converter/src/attribute/unique_id.hpp | 2 +- xml_converter/src/icon.cpp | 8 +-- xml_converter/src/parseable.cpp | 2 +- xml_converter/src/string_helper.cpp | 57 +++++++++++-------- xml_converter/src/string_helper.hpp | 9 +-- xml_converter/src/trail.cpp | 2 +- 9 files changed, 45 insertions(+), 45 deletions(-) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 59e438d7..197abb9c 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -308,7 +308,7 @@ def write_cpp_classes(self, output_directory: str) -> None: for cpp_class in cpp_classes: metadata: Dict[str, SchemaType] = {} - attributes_of_type_marker_category = [] + attributes_of_type_marker_category: List[str] = [] for attribute_name in attribute_names: metadata[attribute_name] = self.data[attribute_name].metadata @@ -426,10 +426,6 @@ def write_attribute(self, output_directory: str) -> None: if metadata[filepath]['type'] == "MultiflagValue": for flag in metadata[filepath]['flags']: attribute_variable = (flag, "bool", attribute_name, metadata[filepath]['flags'][flag]) - if type(flag) != str: - print(flag, type(flag)) - if type(metadata[filepath]['flags'][flag]) != list: - print(metadata[filepath]['flags'][flag], type(metadata[filepath]['flags'][flag])) attribute_variables.append(attribute_variable) elif metadata[filepath]['type'] == "CompoundValue": for component in metadata[filepath]['components']: diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index 21a3df6a..73788c75 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -50,7 +50,7 @@ bool {{cpp_class}}::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vec {%-if attributes_of_type_marker_category %} bool {{cpp_class}}::validate_attributes_of_type_marker_category(){ {%-for attribute in attributes_of_type_marker_category%} - // TODO: validate "{{attribute}}") + // TODO: validate "{{attribute}}" {%- endfor %} return true; } diff --git a/xml_converter/src/attribute/unique_id.cpp b/xml_converter/src/attribute/unique_id.cpp index 24b14392..3a8de878 100644 --- a/xml_converter/src/attribute/unique_id.cpp +++ b/xml_converter/src/attribute/unique_id.cpp @@ -11,7 +11,7 @@ UniqueId parse_unique_id(rapidxml::xml_attribute<>* input, vector *) UniqueId unique_id; string base64; base64 = get_attribute_value(input); - std::vector guid = base64_decode(base64); + std::vector guid = base64_decode(base64); unique_id.guid = guid; return unique_id; } diff --git a/xml_converter/src/attribute/unique_id.hpp b/xml_converter/src/attribute/unique_id.hpp index 8e055c28..b5673328 100644 --- a/xml_converter/src/attribute/unique_id.hpp +++ b/xml_converter/src/attribute/unique_id.hpp @@ -10,7 +10,7 @@ using namespace std; class UniqueId { public: - vector guid; + vector guid; }; UniqueId parse_unique_id(rapidxml::xml_attribute<>* input, vector *errors); diff --git a/xml_converter/src/icon.cpp b/xml_converter/src/icon.cpp index 795e29df..023a8f9f 100644 --- a/xml_converter/src/icon.cpp +++ b/xml_converter/src/icon.cpp @@ -212,9 +212,9 @@ bool Icon::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector* node, vector *err } } -bool Parseable::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors) { +bool Parseable::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *) { // I removed all of the offending variables. This whole section will be relooked at. string item = normalize_type_name(get_attribute_name(attribute)); return true; diff --git a/xml_converter/src/string_helper.cpp b/xml_converter/src/string_helper.cpp index 00dab0b9..7fbdb8f0 100644 --- a/xml_converter/src/string_helper.cpp +++ b/xml_converter/src/string_helper.cpp @@ -91,16 +91,16 @@ static const std::string base64_chars = "0123456789+/"; -static inline bool is_base64(BYTE c) { +static inline bool is_base64(uint8_t c) { return (isalnum(c) || (c == '+') || (c == '/')); } -std::string base64_encode(BYTE const* buf, unsigned int bufLen) { +std::string base64_encode(uint8_t const* buf, unsigned int bufLen) { std::string ret; int i = 0; int j = 0; - BYTE char_array_3[3]; - BYTE char_array_4[4]; + uint8_t char_array_3[3]; + uint8_t char_array_4[4]; while (bufLen--) { char_array_3[i++] = *(buf++); @@ -110,68 +110,77 @@ std::string base64_encode(BYTE const* buf, unsigned int bufLen) { char_array_4[2] = ((char_array_3[1] & 0x0f) << 2) + ((char_array_3[2] & 0xc0) >> 6); char_array_4[3] = char_array_3[2] & 0x3f; - for(i = 0; (i <4) ; i++) + for(i = 0; (i <4) ; i++){ ret += base64_chars[char_array_4[i]]; + } i = 0; } } - if (i) - { - for(j = i; j < 3; j++) + if (i){ + for(j = i; j < 3; j++){ char_array_3[j] = '\0'; + } char_array_4[0] = (char_array_3[0] & 0xfc) >> 2; char_array_4[1] = ((char_array_3[0] & 0x03) << 4) + ((char_array_3[1] & 0xf0) >> 4); char_array_4[2] = ((char_array_3[1] & 0x0f) << 2) + ((char_array_3[2] & 0xc0) >> 6); char_array_4[3] = char_array_3[2] & 0x3f; - for (j = 0; (j < i + 1); j++) + for (j = 0; (j < i + 1); j++){ ret += base64_chars[char_array_4[j]]; + } - while((i++ < 3)) + while((i++ < 3)){ ret += '='; + } } return ret; } -std::vector base64_decode(std::string const& encoded_string) { +std::vector base64_decode(std::string const& encoded_string) { int in_len = encoded_string.size(); int i = 0; int j = 0; int in_ = 0; - BYTE char_array_4[4], char_array_3[3]; - std::vector ret; + uint8_t char_array_4[4], char_array_3[3]; + std::vector ret; while (in_len-- && ( encoded_string[in_] != '=') && is_base64(encoded_string[in_])) { char_array_4[i++] = encoded_string[in_]; in_++; if (i ==4) { - for (i = 0; i <4; i++) + for (i = 0; i <4; i++){ char_array_4[i] = base64_chars.find(char_array_4[i]); + } - char_array_3[0] = (char_array_4[0] << 2) + ((char_array_4[1] & 0x30) >> 4); - char_array_3[1] = ((char_array_4[1] & 0xf) << 4) + ((char_array_4[2] & 0x3c) >> 2); - char_array_3[2] = ((char_array_4[2] & 0x3) << 6) + char_array_4[3]; + char_array_3[0] = (char_array_4[0] << 2) + ((char_array_4[1] & 0x30) >> 4); + char_array_3[1] = ((char_array_4[1] & 0xf) << 4) + ((char_array_4[2] & 0x3c) >> 2); + char_array_3[2] = ((char_array_4[2] & 0x3) << 6) + char_array_4[3]; - for (i = 0; (i < 3); i++) - ret.push_back(char_array_3[i]); + for (i = 0; (i < 3); i++){ + ret.push_back(char_array_3[i]); + } i = 0; } } if (i) { - for (j = i; j <4; j++) - char_array_4[j] = 0; + for (j = i; j <4; j++){ + char_array_4[j] = 0; + } - for (j = 0; j <4; j++) - char_array_4[j] = base64_chars.find(char_array_4[j]); + for (j = 0; j <4; j++){ + char_array_4[j] = base64_chars.find(char_array_4[j]); + } char_array_3[0] = (char_array_4[0] << 2) + ((char_array_4[1] & 0x30) >> 4); char_array_3[1] = ((char_array_4[1] & 0xf) << 4) + ((char_array_4[2] & 0x3c) >> 2); char_array_3[2] = ((char_array_4[2] & 0x3) << 6) + char_array_4[3]; - for (j = 0; (j < i - 1); j++) ret.push_back(char_array_3[j]); + for (j = 0; (j < i - 1); j++){ + ret.push_back(char_array_3[j]); + } } return ret; diff --git a/xml_converter/src/string_helper.hpp b/xml_converter/src/string_helper.hpp index c184e725..241d9638 100644 --- a/xml_converter/src/string_helper.hpp +++ b/xml_converter/src/string_helper.hpp @@ -14,12 +14,7 @@ vector split(string input, string delimiter); string normalize_type_name(string type_name); -#ifndef _BASE64_H_ #define _BASE64_H_ -typedef unsigned char BYTE; - -std::string base64_encode(BYTE const* buf, unsigned int bufLen); -std::vector base64_decode(std::string const&); - -#endif \ No newline at end of file +std::string base64_encode(uint8_t const* buf, unsigned int bufLen); +std::vector base64_decode(std::string const&); diff --git a/xml_converter/src/trail.cpp b/xml_converter/src/trail.cpp index 86f73bb7..3dfc2d76 100644 --- a/xml_converter/src/trail.cpp +++ b/xml_converter/src/trail.cpp @@ -122,6 +122,6 @@ bool Trail::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector Date: Sun, 21 Aug 2022 16:32:19 -0400 Subject: [PATCH 067/539] Made changes to variables of type AttributeVariable --- xml_converter/generators/code_generator.py | 41 +++++++++++++++++----- 1 file changed, 32 insertions(+), 9 deletions(-) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 197abb9c..89946091 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -308,16 +308,16 @@ def write_cpp_classes(self, output_directory: str) -> None: for cpp_class in cpp_classes: metadata: Dict[str, SchemaType] = {} - attributes_of_type_marker_category: List[str] = [] + attributes_of_type_marker_category = [] for attribute_name in attribute_names: metadata[attribute_name] = self.data[attribute_name].metadata attribute_variables, cpp_include_paths = self.generate_cpp_variable_data(metadata, cpp_class, attribute_names) - for template_variable in attribute_variables: - if template_variable[2] == "marker_category": - attributes_of_type_marker_category.append(template_variable[0]) + for attribute_variable in attribute_variables: + if attribute_variable.class_name == "marker_category": + attributes_of_type_marker_category.append(attribute_variable.attribute_name) with open(os.path.join(output_directory, lowercase(cpp_class) + ".hpp"), 'w') as f: f.write(header_template.render( @@ -353,7 +353,7 @@ def generate_cpp_variable_data( cpp_include_paths: Set[str] = set() attribute_name: str = "" - attribute_variables: AttributeVariable = [] + attribute_variables: List[AttributeVariable] = [] xml_fields: List[str] = [] for fieldkey, field in metadata.items(): @@ -383,12 +383,19 @@ def generate_cpp_variable_data( for item in field['xml_fields']: xml_fields.append(lowercase(item, delimiter="")) + # Compound Values are unique in that the components have xml fields in addition to the compound variable if field['type'] == "CompoundValue": for component in field['components']: for item in component['xml_fields']: xml_fields.append(lowercase(item, delimiter="")) - attribute_variable = (attribute_name, cpp_type, class_name, xml_fields) + attribute_variable: AttributeVariable = AttributeVariable( + attribute_name=attribute_name, + cpp_type=cpp_type, + class_name=class_name, + xml_fields=xml_fields, + ) + attribute_variables.append(attribute_variable) return attribute_variables, cpp_include_paths @@ -406,6 +413,7 @@ def write_attribute(self, output_directory: str) -> None: env = Environment(loader=file_loader) attribute_names: Dict[str, str] = {} attribute_variables: List[AttributeVariable] = [] + attribute_variable: AttributeVariable metadata: Dict[str, SchemaType] = {} xml_fields: List[str] = [] template: Dict[str, Template] = { @@ -425,7 +433,12 @@ def write_attribute(self, output_directory: str) -> None: if metadata[filepath]['type'] == "MultiflagValue": for flag in metadata[filepath]['flags']: - attribute_variable = (flag, "bool", attribute_name, metadata[filepath]['flags'][flag]) + attribute_variable = AttributeVariable( + attribute_name=flag, + cpp_type="bool", + class_name=attribute_name, + xml_fields=metadata[filepath]['flags'][flag], + ) attribute_variables.append(attribute_variable) elif metadata[filepath]['type'] == "CompoundValue": for component in metadata[filepath]['components']: @@ -436,12 +449,22 @@ def write_attribute(self, output_directory: str) -> None: )) for item in component['xml_fields']: xml_fields.append(lowercase(item, delimiter="")) - attribute_variable = (lowercase(component['name'], delimiter="_"), doc_type_to_cpp_type[component['type']], attribute_name, xml_fields) + attribute_variable = AttributeVariable( + attribute_name=lowercase(component['name'], delimiter="_"), + cpp_type=doc_type_to_cpp_type[component['type']], + class_name=attribute_name, + xml_fields=xml_fields, + ) attribute_variables.append(attribute_variable) elif metadata[filepath]['type'] == "Enum": for value in metadata[filepath]['values']: - attribute_variable = (value, "str", attribute_name, metadata[filepath]['values'][value]) + attribute_variable = AttributeVariable( + attribute_name=value, + cpp_type="str", + class_name=attribute_name, + xml_fields=metadata[filepath]['values'][value], + ) attribute_variables.append(attribute_variable) else: From 6f1b72b8db2468bf80c42d9f60b8f705e4782bbd Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 21 Aug 2022 17:14:04 -0400 Subject: [PATCH 068/539] Made changes required by the new dataclass Linter is saying I am returning Any instead of "Union[SupportsDunderLT, SupportsDunderGT]" during sorting but everything runs --- xml_converter/generators/code_generator.py | 6 +++--- .../generators/cpp_templates/attribute_template.hpp | 4 ++-- .../generators/cpp_templates/class_template.cpp | 6 +++--- .../generators/cpp_templates/class_template.hpp | 2 +- .../generators/cpp_templates/compoundvalue.cpp | 10 +++++----- xml_converter/generators/cpp_templates/enum.cpp | 8 ++++---- .../generators/cpp_templates/multiflagvalue.cpp | 8 ++++---- 7 files changed, 22 insertions(+), 22 deletions(-) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 89946091..a6a30389 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -322,7 +322,7 @@ def write_cpp_classes(self, output_directory: str) -> None: with open(os.path.join(output_directory, lowercase(cpp_class) + ".hpp"), 'w') as f: f.write(header_template.render( cpp_class=cpp_class, - attribute_variables=sorted(attribute_variables), + attribute_variables=sorted(attribute_variables, key=lambda x: x.attribute_name), cpp_include_paths=sorted(cpp_include_paths), attributes_of_type_marker_category=attributes_of_type_marker_category, )) @@ -332,7 +332,7 @@ def write_cpp_classes(self, output_directory: str) -> None: cpp_class=cpp_class, cpp_class_header=lowercase(cpp_class), xml_class_name=cpp_classes[cpp_class], - attribute_variables=sorted(attribute_variables), + attribute_variables=sorted(attribute_variables, key=lambda x: x.attribute_name), enumerate=enumerate, attributes_of_type_marker_category=attributes_of_type_marker_category, )) @@ -473,7 +473,7 @@ def write_attribute(self, output_directory: str) -> None: with open(os.path.join(output_directory, attribute_name + ".hpp"), 'w') as f: f.write(env.get_template("attribute_template.hpp").render( attribute_name=attribute_name, - attribute_variables=sorted(attribute_variables), + attribute_variables=sorted(attribute_variables, key=lambda x: x.attribute_name), class_name=capitalize(attribute_name, delimiter=""), type=metadata[filepath]['type'], )) diff --git a/xml_converter/generators/cpp_templates/attribute_template.hpp b/xml_converter/generators/cpp_templates/attribute_template.hpp index a607e38b..67917717 100644 --- a/xml_converter/generators/cpp_templates/attribute_template.hpp +++ b/xml_converter/generators/cpp_templates/attribute_template.hpp @@ -12,14 +12,14 @@ using namespace std; {%- if type == "Enum":%} enum {{class_name}} { {%- for attribute_variable in attribute_variables: %} - {{attribute_variable[0]}}, + {{attribute_variable.attribute_name}}, {%- endfor %} }; {%- else: %} class {{class_name}} { public: {%- for attribute_variable in attribute_variables: %} - {{attribute_variable[1]}} {{attribute_variable[0]}}; + {{attribute_variable.cpp_type}} {{attribute_variable.attribute_name}}; {%- endfor %} virtual string classname() { return "{{class_name}}"; }; diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index 73788c75..7983eea6 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -29,14 +29,14 @@ bool {{cpp_class}}::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vec string attributename; attributename = normalize_type_name(get_attribute_name(attribute)); {%-for n, attribute_variable in enumerate(attribute_variables)%} - {%-for i, value in enumerate(attribute_variable[3])%} + {%-for i, value in enumerate(attribute_variable.xml_fields)%} {%-if i == 0 and n == 0:%} if (attributename == "{{value}}") { - this->{{attribute_variables[n][0]}} = parse_{{attribute_variables[n][2]}}(attribute, errors); + this->{{attribute_variables[n].attribute_name}} = parse_{{attribute_variables[n].class_name}}(attribute, errors); } {%- else: %} else if (attributename == "{{value}}") { - this->{{attribute_variables[n][0]}} = parse_{{attribute_variables[n][2]}}(attribute, errors); + this->{{attribute_variables[n].attribute_name}} = parse_{{attribute_variables[n].class_name}}(attribute, errors); } {%- endif %} {%- endfor %} diff --git a/xml_converter/generators/cpp_templates/class_template.hpp b/xml_converter/generators/cpp_templates/class_template.hpp index 260cf055..3611df70 100644 --- a/xml_converter/generators/cpp_templates/class_template.hpp +++ b/xml_converter/generators/cpp_templates/class_template.hpp @@ -27,7 +27,7 @@ using namespace std; class {{cpp_class}}: public Parseable { public: {%- for attribute_variable in attribute_variables: %} - {{attribute_variable[1]}} {{attribute_variable[0]}}; + {{attribute_variable.cpp_type}} {{attribute_variable.attribute_name}}; {%- endfor %} diff --git a/xml_converter/generators/cpp_templates/compoundvalue.cpp b/xml_converter/generators/cpp_templates/compoundvalue.cpp index 3cd78c8f..568f0a75 100644 --- a/xml_converter/generators/cpp_templates/compoundvalue.cpp +++ b/xml_converter/generators/cpp_templates/compoundvalue.cpp @@ -12,21 +12,21 @@ vector compound_values; string attributename; {%- for attribute_variable in attribute_variables: %} - {{attribute_name}}.{{attribute_variable[0]}} = 0; + {{attribute_name}}.{{attribute_variable.attribute_name}} = 0; {%- endfor %} attributename = get_attribute_name(input); compound_values = split(get_attribute_value(input), ","); if (typeid(compound_values) == typeid(std::string)) { {%-for n, attribute_variable in enumerate(attribute_variables)%} - {%-for i, value in enumerate(attribute_variable[3])%} + {%-for i, value in enumerate(attribute_variable.xml_fields)%} {%-if i == 0 and n == 0:%} if (attributename == "{{value}}") { - {{attribute_name}}.{{attribute_variables[n][0]}} = std::stof(get_attribute_value(input)); + {{attribute_name}}.{{attribute_variables[n].attribute_name}} = std::stof(get_attribute_value(input)); } {%- else %} else if (attributename == "{{value}}") { - {{attribute_name}}.{{attribute_variables[n][0]}} = std::stof(get_attribute_value(input)); + {{attribute_name}}.{{attribute_variables[n].attribute_name}} = std::stof(get_attribute_value(input)); } {%- endif %} @@ -34,7 +34,7 @@ {%- endfor %} else { {%-for n, attribute_variable in enumerate(attribute_variables)%} - {{attribute_name}}.{{attribute_variables[n][0]}} = std::stof(compound_values[{{n}}]); + {{attribute_name}}.{{attribute_variables[n].attribute_name}} = std::stof(compound_values[{{n}}]); {%- endfor %} } } diff --git a/xml_converter/generators/cpp_templates/enum.cpp b/xml_converter/generators/cpp_templates/enum.cpp index 596b8dc6..997c9651 100644 --- a/xml_converter/generators/cpp_templates/enum.cpp +++ b/xml_converter/generators/cpp_templates/enum.cpp @@ -9,14 +9,14 @@ {{class_name}} parse_{{attribute_name}}(rapidxml::xml_attribute<>* input, vector *errors){ {{class_name}} {{attribute_name}}; {%-for n, attribute_variable in enumerate(attribute_variables)%} - {%-for i, value in enumerate(attribute_variable[3])%} + {%-for i, value in enumerate(attribute_variable.xml_fields)%} {%-if i == 0 and n == 0:%} if (get_attribute_value(input) == "{{value}}") { - {{attribute_name}} = {{class_name}}::{{attribute_variable[0]}}; + {{attribute_name}} = {{class_name}}::{{attribute_variable.attribute_name}}; } {%- else: %} else if (get_attribute_value(input) == "{{value}}") { - {{attribute_name}} = {{class_name}}::{{attribute_variable[0]}}; + {{attribute_name}} = {{class_name}}::{{attribute_variable.attribute_name}}; } {%- endif %} {%- endfor %} @@ -24,7 +24,7 @@ {%- endfor %} else { errors->push_back(new XMLAttributeValueError("Found a value that was not in the Enum", input)); - {{attribute_name}} = {{class_name}}::{{attribute_variables[0][0]}}; + {{attribute_name}} = {{class_name}}::{{attribute_variables[0].attribute_name}}; } return {{attribute_name}}; } diff --git a/xml_converter/generators/cpp_templates/multiflagvalue.cpp b/xml_converter/generators/cpp_templates/multiflagvalue.cpp index dcd99350..c4bf26a8 100644 --- a/xml_converter/generators/cpp_templates/multiflagvalue.cpp +++ b/xml_converter/generators/cpp_templates/multiflagvalue.cpp @@ -11,19 +11,19 @@ vector flag_values; flag_values = split(get_attribute_value(input), ","); {%-for attribute_variable in attribute_variables%} - {{attribute_name}}.{{attribute_variable[0]}} = false; + {{attribute_name}}.{{attribute_variable.attribute_name}} = false; {%- endfor %} for (string flag_value : flag_values) { {%-for n, attribute_variable in enumerate(attribute_variables)%} - {%-for i, value in enumerate(attribute_variable[3])%} + {%-for i, value in enumerate(attribute_variable.xml_fields)%} {%-if i == 0 and n == 0:%} if (flag_value == "{{value}}") { - {{attribute_name}}.{{attribute_variable[0]}} = true; + {{attribute_name}}.{{attribute_variable.attribute_name}} = true; } {%- else: %} else if (flag_value == "{{value}}") { - {{attribute_name}}.{{attribute_variable[0]}} = true; + {{attribute_name}}.{{attribute_variable.attribute_name}} = true; } {%- endif %} {%- endfor %} From 275c4ee860a3cd49a436a9667edfac0acfad2436 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 21 Aug 2022 18:15:55 -0400 Subject: [PATCH 069/539] Fixed Typing issue from lambda function --- xml_converter/generators/code_generator.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index a6a30389..6bf0561f 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -260,6 +260,10 @@ class AttributeVariable: xml_fields: List[str] +def get_attribute_variable_key(attribute_variable: AttributeVariable) -> str: + return attribute_variable.attribute_name + + class Generator: data: Dict[str, Document] = {} @@ -313,6 +317,7 @@ def write_cpp_classes(self, output_directory: str) -> None: for attribute_name in attribute_names: metadata[attribute_name] = self.data[attribute_name].metadata + attribute_variables: List[AttributeVariable] attribute_variables, cpp_include_paths = self.generate_cpp_variable_data(metadata, cpp_class, attribute_names) for attribute_variable in attribute_variables: @@ -322,7 +327,7 @@ def write_cpp_classes(self, output_directory: str) -> None: with open(os.path.join(output_directory, lowercase(cpp_class) + ".hpp"), 'w') as f: f.write(header_template.render( cpp_class=cpp_class, - attribute_variables=sorted(attribute_variables, key=lambda x: x.attribute_name), + attribute_variables=sorted(attribute_variables, key=get_attribute_variable_key), cpp_include_paths=sorted(cpp_include_paths), attributes_of_type_marker_category=attributes_of_type_marker_category, )) @@ -332,7 +337,7 @@ def write_cpp_classes(self, output_directory: str) -> None: cpp_class=cpp_class, cpp_class_header=lowercase(cpp_class), xml_class_name=cpp_classes[cpp_class], - attribute_variables=sorted(attribute_variables, key=lambda x: x.attribute_name), + attribute_variables=sorted(attribute_variables, key=get_attribute_variable_key), enumerate=enumerate, attributes_of_type_marker_category=attributes_of_type_marker_category, )) @@ -473,7 +478,7 @@ def write_attribute(self, output_directory: str) -> None: with open(os.path.join(output_directory, attribute_name + ".hpp"), 'w') as f: f.write(env.get_template("attribute_template.hpp").render( attribute_name=attribute_name, - attribute_variables=sorted(attribute_variables, key=lambda x: x.attribute_name), + attribute_variables=sorted(attribute_variables, key=get_attribute_variable_key), class_name=capitalize(attribute_name, delimiter=""), type=metadata[filepath]['type'], )) From e39950bd875bc3d38a20ed43cbe6f29de4d3f565 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 21 Aug 2022 18:27:02 -0400 Subject: [PATCH 070/539] Removed erronious include guard --- xml_converter/src/string_helper.hpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/xml_converter/src/string_helper.hpp b/xml_converter/src/string_helper.hpp index 241d9638..10d0d1eb 100644 --- a/xml_converter/src/string_helper.hpp +++ b/xml_converter/src/string_helper.hpp @@ -14,7 +14,5 @@ vector split(string input, string delimiter); string normalize_type_name(string type_name); -#define _BASE64_H_ - std::string base64_encode(uint8_t const* buf, unsigned int bufLen); std::vector base64_decode(std::string const&); From cec515a991f45ae478377b1ad6713634a1b153cb Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 21 Aug 2022 20:16:13 -0400 Subject: [PATCH 071/539] Filters and Enums can now process capitalized or lowercase versions of unique strings Plus addressing other comments --- .../doc/rendering/map_display_size.md | 2 +- xml_converter/doc/rotation/euler_rotation.md | 2 +- xml_converter/generators/code_generator.py | 12 +- .../cpp_templates/class_template.cpp | 2 +- .../generators/cpp_templates/enum.cpp | 7 +- .../cpp_templates/multiflagvalue.cpp | 7 +- .../src/attribute/cull_chirality.cpp | 9 +- .../src/attribute/festival_filter.cpp | 19 +- .../src/attribute/map_type_filter.cpp | 51 ++--- xml_converter/src/attribute/mount_filter.cpp | 23 +-- .../src/attribute/profession_filter.cpp | 21 +- .../src/attribute/reset_behavior.cpp | 39 ++-- .../src/attribute/specialization_filter.cpp | 183 +++++++++--------- .../src/attribute/species_filter.cpp | 13 +- xml_converter/src/category.cpp | 2 +- xml_converter/src/icon.cpp | 4 +- xml_converter/src/parseable.cpp | 2 +- xml_converter/src/string_helper.cpp | 13 +- xml_converter/src/string_helper.hpp | 2 +- xml_converter/src/trail.cpp | 5 +- xml_converter/src/trail.hpp | 1 + 21 files changed, 222 insertions(+), 197 deletions(-) diff --git a/xml_converter/doc/rendering/map_display_size.md b/xml_converter/doc/rendering/map_display_size.md index f8f022ab..cb1c45da 100644 --- a/xml_converter/doc/rendering/map_display_size.md +++ b/xml_converter/doc/rendering/map_display_size.md @@ -1,7 +1,7 @@ --- name: Map Display Size type: Int32 -applies_to: [Icon] +applies_to: [Icon, Trail] #When applied to a Trail, affects the width of the trail only in the maps xml_fields: [MapDisplaySize] protobuf_field: map_display_size compatability: [TacO, BlishHUD, Burrito] diff --git a/xml_converter/doc/rotation/euler_rotation.md b/xml_converter/doc/rotation/euler_rotation.md index b90463dd..8d795ab8 100644 --- a/xml_converter/doc/rotation/euler_rotation.md +++ b/xml_converter/doc/rotation/euler_rotation.md @@ -2,7 +2,7 @@ name: Euler Rotation type: CompoundValue applies_to: ["Icon"] -xml_fields: ["Rotation"] +xml_fields: ["Rotate"] compatability: [TacO, Burrito, BlishHUD] protobuf_field: euler_rotation components: diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 6bf0561f..ab80c77b 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -438,13 +438,18 @@ def write_attribute(self, output_directory: str) -> None: if metadata[filepath]['type'] == "MultiflagValue": for flag in metadata[filepath]['flags']: + xml_fields = [] + for item in metadata[filepath]['flags'][flag]: + xml_fields.append(insert_delimiter(item, delimiter="")) + attribute_variable = AttributeVariable( attribute_name=flag, cpp_type="bool", class_name=attribute_name, - xml_fields=metadata[filepath]['flags'][flag], + xml_fields=xml_fields, ) attribute_variables.append(attribute_variable) + elif metadata[filepath]['type'] == "CompoundValue": for component in metadata[filepath]['components']: xml_fields = [] @@ -464,11 +469,14 @@ def write_attribute(self, output_directory: str) -> None: elif metadata[filepath]['type'] == "Enum": for value in metadata[filepath]['values']: + xml_fields = [] + for item in metadata[filepath]['values'][value]: + xml_fields.append(insert_delimiter(item, delimiter="")) attribute_variable = AttributeVariable( attribute_name=value, cpp_type="str", class_name=attribute_name, - xml_fields=metadata[filepath]['values'][value], + xml_fields=xml_fields ) attribute_variables.append(attribute_variable) diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index 7983eea6..f5c0b1b6 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -27,7 +27,7 @@ void Category::init_from_xml(rapidxml::xml_node<>* node, vector *erro {%- endif %} bool {{cpp_class}}::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors) { string attributename; - attributename = normalize_type_name(get_attribute_name(attribute)); + attributename = normalize(get_attribute_name(attribute)); {%-for n, attribute_variable in enumerate(attribute_variables)%} {%-for i, value in enumerate(attribute_variable.xml_fields)%} {%-if i == 0 and n == 0:%} diff --git a/xml_converter/generators/cpp_templates/enum.cpp b/xml_converter/generators/cpp_templates/enum.cpp index 997c9651..3aabebbb 100644 --- a/xml_converter/generators/cpp_templates/enum.cpp +++ b/xml_converter/generators/cpp_templates/enum.cpp @@ -8,14 +8,15 @@ {{class_name}} parse_{{attribute_name}}(rapidxml::xml_attribute<>* input, vector *errors){ {{class_name}} {{attribute_name}}; + string normalized_value = normalize(get_attribute_value(input)); {%-for n, attribute_variable in enumerate(attribute_variables)%} {%-for i, value in enumerate(attribute_variable.xml_fields)%} {%-if i == 0 and n == 0:%} - if (get_attribute_value(input) == "{{value}}") { + if (normalized_value == "{{value}}") { {{attribute_name}} = {{class_name}}::{{attribute_variable.attribute_name}}; } {%- else: %} - else if (get_attribute_value(input) == "{{value}}") { + else if (normalized_value == "{{value}}") { {{attribute_name}} = {{class_name}}::{{attribute_variable.attribute_name}}; } {%- endif %} @@ -23,7 +24,7 @@ {%- endfor %} else { - errors->push_back(new XMLAttributeValueError("Found a value that was not in the Enum", input)); + errors->push_back(new XMLAttributeValueError("Found an invalid value that was not in the Enum {{class_name}}", input)); {{attribute_name}} = {{class_name}}::{{attribute_variables[0].attribute_name}}; } return {{attribute_name}}; diff --git a/xml_converter/generators/cpp_templates/multiflagvalue.cpp b/xml_converter/generators/cpp_templates/multiflagvalue.cpp index c4bf26a8..2f107a71 100644 --- a/xml_converter/generators/cpp_templates/multiflagvalue.cpp +++ b/xml_converter/generators/cpp_templates/multiflagvalue.cpp @@ -15,21 +15,22 @@ {%- endfor %} for (string flag_value : flag_values) { + string normalized_flag_value = normalize(flag_value); {%-for n, attribute_variable in enumerate(attribute_variables)%} {%-for i, value in enumerate(attribute_variable.xml_fields)%} {%-if i == 0 and n == 0:%} - if (flag_value == "{{value}}") { + if (normalized_flag_value == "{{value}}") { {{attribute_name}}.{{attribute_variable.attribute_name}} = true; } {%- else: %} - else if (flag_value == "{{value}}") { + else if (normalized_flag_value == "{{value}}") { {{attribute_name}}.{{attribute_variable.attribute_name}} = true; } {%- endif %} {%- endfor %} {%- endfor %} else { - errors->push_back(new XMLAttributeValueError("Found a value that was not in the class", input)); + errors->push_back(new XMLAttributeValueError("Invalid Filter for {{class_name}}. Found " + flag_value, input)); continue; } } diff --git a/xml_converter/src/attribute/cull_chirality.cpp b/xml_converter/src/attribute/cull_chirality.cpp index 928de3f9..ff8e5b79 100644 --- a/xml_converter/src/attribute/cull_chirality.cpp +++ b/xml_converter/src/attribute/cull_chirality.cpp @@ -8,17 +8,18 @@ CullChirality parse_cull_chirality(rapidxml::xml_attribute<>* input, vector *errors){ CullChirality cull_chirality; - if (get_attribute_value(input) == "None") { + string normalized_value = normalize(get_attribute_value(input)); + if (normalized_value == "none") { cull_chirality = CullChirality::none; } - else if (get_attribute_value(input) == "Clockwise") { + else if (normalized_value == "clockwise") { cull_chirality = CullChirality::clockwise; } - else if (get_attribute_value(input) == "CounterClockwise") { + else if (normalized_value == "counterclockwise") { cull_chirality = CullChirality::counter_clockwise; } else { - errors->push_back(new XMLAttributeValueError("Found a value that was not in the Enum", input)); + errors->push_back(new XMLAttributeValueError("Found an invalid value that was not in the Enum CullChirality", input)); cull_chirality = CullChirality::none; } return cull_chirality; diff --git a/xml_converter/src/attribute/festival_filter.cpp b/xml_converter/src/attribute/festival_filter.cpp index 6473268e..76ffe4a4 100644 --- a/xml_converter/src/attribute/festival_filter.cpp +++ b/xml_converter/src/attribute/festival_filter.cpp @@ -19,32 +19,33 @@ FestivalFilter parse_festival_filter(rapidxml::xml_attribute<>* input, vectorpush_back(new XMLAttributeValueError("Found a value that was not in the class", input)); + errors->push_back(new XMLAttributeValueError("Invalid Filter for FestivalFilter. Found " + flag_value, input)); continue; } } diff --git a/xml_converter/src/attribute/map_type_filter.cpp b/xml_converter/src/attribute/map_type_filter.cpp index 61a92aec..f74f8405 100644 --- a/xml_converter/src/attribute/map_type_filter.cpp +++ b/xml_converter/src/attribute/map_type_filter.cpp @@ -36,80 +36,81 @@ MapTypeFilter parse_map_type_filter(rapidxml::xml_attribute<>* input, vectorpush_back(new XMLAttributeValueError("Found a value that was not in the class", input)); + errors->push_back(new XMLAttributeValueError("Invalid Filter for MapTypeFilter. Found " + flag_value, input)); continue; } } diff --git a/xml_converter/src/attribute/mount_filter.cpp b/xml_converter/src/attribute/mount_filter.cpp index 5fdf26cd..2bfdffb9 100644 --- a/xml_converter/src/attribute/mount_filter.cpp +++ b/xml_converter/src/attribute/mount_filter.cpp @@ -22,38 +22,39 @@ MountFilter parse_mount_filter(rapidxml::xml_attribute<>* input, vectorpush_back(new XMLAttributeValueError("Found a value that was not in the class", input)); + errors->push_back(new XMLAttributeValueError("Invalid Filter for MountFilter. Found " + flag_value, input)); continue; } } diff --git a/xml_converter/src/attribute/profession_filter.cpp b/xml_converter/src/attribute/profession_filter.cpp index f01907f4..d2185df8 100644 --- a/xml_converter/src/attribute/profession_filter.cpp +++ b/xml_converter/src/attribute/profession_filter.cpp @@ -21,35 +21,36 @@ ProfessionFilter parse_profession_filter(rapidxml::xml_attribute<>* input, vecto profession_filter.revenant = false; for (string flag_value : flag_values) { - if (flag_value == "Guardian") { + string normalized_flag_value = normalize(flag_value); + if (normalized_flag_value == "guardian") { profession_filter.guardian = true; } - else if (flag_value == "Warrior") { + else if (normalized_flag_value == "warrior") { profession_filter.warrior = true; } - else if (flag_value == "Engineer") { + else if (normalized_flag_value == "engineer") { profession_filter.engineer = true; } - else if (flag_value == "Ranger") { + else if (normalized_flag_value == "ranger") { profession_filter.ranger = true; } - else if (flag_value == "Thief") { + else if (normalized_flag_value == "thief") { profession_filter.thief = true; } - else if (flag_value == "Elementalist") { + else if (normalized_flag_value == "elementalist") { profession_filter.elementalist = true; } - else if (flag_value == "Mesmer") { + else if (normalized_flag_value == "mesmer") { profession_filter.mesmer = true; } - else if (flag_value == "Necromancer") { + else if (normalized_flag_value == "necromancer") { profession_filter.necromancer = true; } - else if (flag_value == "Revenant") { + else if (normalized_flag_value == "revenant") { profession_filter.revenant = true; } else { - errors->push_back(new XMLAttributeValueError("Found a value that was not in the class", input)); + errors->push_back(new XMLAttributeValueError("Invalid Filter for ProfessionFilter. Found " + flag_value, input)); continue; } } diff --git a/xml_converter/src/attribute/reset_behavior.cpp b/xml_converter/src/attribute/reset_behavior.cpp index 72bb71c9..7efc9d83 100644 --- a/xml_converter/src/attribute/reset_behavior.cpp +++ b/xml_converter/src/attribute/reset_behavior.cpp @@ -8,62 +8,63 @@ ResetBehavior parse_reset_behavior(rapidxml::xml_attribute<>* input, vector *errors){ ResetBehavior reset_behavior; - if (get_attribute_value(input) == "0") { + string normalized_value = normalize(get_attribute_value(input)); + if (normalized_value == "0") { reset_behavior = ResetBehavior::always_visible; } - else if (get_attribute_value(input) == "always_visible") { + else if (normalized_value == "always_visible") { reset_behavior = ResetBehavior::always_visible; } - else if (get_attribute_value(input) == "1") { + else if (normalized_value == "1") { reset_behavior = ResetBehavior::map_change; } - else if (get_attribute_value(input) == "map_change") { + else if (normalized_value == "map_change") { reset_behavior = ResetBehavior::map_change; } - else if (get_attribute_value(input) == "2") { + else if (normalized_value == "2") { reset_behavior = ResetBehavior::daily_reset; } - else if (get_attribute_value(input) == "daily_reset") { + else if (normalized_value == "daily_reset") { reset_behavior = ResetBehavior::daily_reset; } - else if (get_attribute_value(input) == "3") { + else if (normalized_value == "3") { reset_behavior = ResetBehavior::never; } - else if (get_attribute_value(input) == "never") { + else if (normalized_value == "never") { reset_behavior = ResetBehavior::never; } - else if (get_attribute_value(input) == "4") { + else if (normalized_value == "4") { reset_behavior = ResetBehavior::timer; } - else if (get_attribute_value(input) == "timer") { + else if (normalized_value == "timer") { reset_behavior = ResetBehavior::timer; } - else if (get_attribute_value(input) == "5") { + else if (normalized_value == "5") { reset_behavior = ResetBehavior::map_reset; } - else if (get_attribute_value(input) == "map_reset") { + else if (normalized_value == "map_reset") { reset_behavior = ResetBehavior::map_reset; } - else if (get_attribute_value(input) == "6") { + else if (normalized_value == "6") { reset_behavior = ResetBehavior::instance_change; } - else if (get_attribute_value(input) == "instance_change") { + else if (normalized_value == "instance_change") { reset_behavior = ResetBehavior::instance_change; } - else if (get_attribute_value(input) == "7") { + else if (normalized_value == "7") { reset_behavior = ResetBehavior::daily_reset_per_character; } - else if (get_attribute_value(input) == "daily_reset_per_character") { + else if (normalized_value == "daily_reset_per_character") { reset_behavior = ResetBehavior::daily_reset_per_character; } - else if (get_attribute_value(input) == "101") { + else if (normalized_value == "101") { reset_behavior = ResetBehavior::weekly_reset; } - else if (get_attribute_value(input) == "weekly_reset") { + else if (normalized_value == "weekly_reset") { reset_behavior = ResetBehavior::weekly_reset; } else { - errors->push_back(new XMLAttributeValueError("Found a value that was not in the Enum", input)); + errors->push_back(new XMLAttributeValueError("Found an invalid value that was not in the Enum ResetBehavior", input)); reset_behavior = ResetBehavior::always_visible; } return reset_behavior; diff --git a/xml_converter/src/attribute/specialization_filter.cpp b/xml_converter/src/attribute/specialization_filter.cpp index fef5ffeb..2e19cf4c 100644 --- a/xml_converter/src/attribute/specialization_filter.cpp +++ b/xml_converter/src/attribute/specialization_filter.cpp @@ -84,278 +84,279 @@ SpecializationFilter parse_specialization_filter(rapidxml::xml_attribute<>* inpu specialization_filter.warrior_tactics = false; for (string flag_value : flag_values) { - if (flag_value == "48") { + string normalized_flag_value = normalize(flag_value); + if (normalized_flag_value == "48") { specialization_filter.elementalist_tempest = true; } - else if (flag_value == "Tempest") { + else if (normalized_flag_value == "tempest") { specialization_filter.elementalist_tempest = true; } - else if (flag_value == "43") { + else if (normalized_flag_value == "43") { specialization_filter.engineer_scrapper = true; } - else if (flag_value == "Scrapper") { + else if (normalized_flag_value == "scrapper") { specialization_filter.engineer_scrapper = true; } - else if (flag_value == "27") { + else if (normalized_flag_value == "27") { specialization_filter.guardian_dragonhunter = true; } - else if (flag_value == "Dragonhunter") { + else if (normalized_flag_value == "dragonhunter") { specialization_filter.guardian_dragonhunter = true; } - else if (flag_value == "40") { + else if (normalized_flag_value == "40") { specialization_filter.mesmer_chronomancer = true; } - else if (flag_value == "Chronomancer") { + else if (normalized_flag_value == "chronomancer") { specialization_filter.mesmer_chronomancer = true; } - else if (flag_value == "34") { + else if (normalized_flag_value == "34") { specialization_filter.necromancer_reaper = true; } - else if (flag_value == "Reaper") { + else if (normalized_flag_value == "reaper") { specialization_filter.necromancer_reaper = true; } - else if (flag_value == "5") { + else if (normalized_flag_value == "5") { specialization_filter.ranger_druid = true; } - else if (flag_value == "Druid") { + else if (normalized_flag_value == "druid") { specialization_filter.ranger_druid = true; } - else if (flag_value == "52") { + else if (normalized_flag_value == "52") { specialization_filter.revenant_herald = true; } - else if (flag_value == "Herald") { + else if (normalized_flag_value == "herald") { specialization_filter.revenant_herald = true; } - else if (flag_value == "7") { + else if (normalized_flag_value == "7") { specialization_filter.thief_daredevil = true; } - else if (flag_value == "Daredevil") { + else if (normalized_flag_value == "daredevil") { specialization_filter.thief_daredevil = true; } - else if (flag_value == "18") { + else if (normalized_flag_value == "18") { specialization_filter.warrior_berserker = true; } - else if (flag_value == "Berserker") { + else if (normalized_flag_value == "berserker") { specialization_filter.warrior_berserker = true; } - else if (flag_value == "56") { + else if (normalized_flag_value == "56") { specialization_filter.elementalist_weaver = true; } - else if (flag_value == "Weaver") { + else if (normalized_flag_value == "weaver") { specialization_filter.elementalist_weaver = true; } - else if (flag_value == "57") { + else if (normalized_flag_value == "57") { specialization_filter.engineer_holosmith = true; } - else if (flag_value == "Holosmith") { + else if (normalized_flag_value == "holosmith") { specialization_filter.engineer_holosmith = true; } - else if (flag_value == "62") { + else if (normalized_flag_value == "62") { specialization_filter.guardian_firebrand = true; } - else if (flag_value == "Firebrand") { + else if (normalized_flag_value == "firebrand") { specialization_filter.guardian_firebrand = true; } - else if (flag_value == "59") { + else if (normalized_flag_value == "59") { specialization_filter.mesmer_mirage = true; } - else if (flag_value == "Mirage") { + else if (normalized_flag_value == "mirage") { specialization_filter.mesmer_mirage = true; } - else if (flag_value == "60") { + else if (normalized_flag_value == "60") { specialization_filter.necromancer_scourge = true; } - else if (flag_value == "Scourge") { + else if (normalized_flag_value == "scourge") { specialization_filter.necromancer_scourge = true; } - else if (flag_value == "55") { + else if (normalized_flag_value == "55") { specialization_filter.ranger_soulbeast = true; } - else if (flag_value == "Soulbeast") { + else if (normalized_flag_value == "soulbeast") { specialization_filter.ranger_soulbeast = true; } - else if (flag_value == "63") { + else if (normalized_flag_value == "63") { specialization_filter.revenant_renegade = true; } - else if (flag_value == "Renegade") { + else if (normalized_flag_value == "renegade") { specialization_filter.revenant_renegade = true; } - else if (flag_value == "58") { + else if (normalized_flag_value == "58") { specialization_filter.thief_deadeye = true; } - else if (flag_value == "Deadeye") { + else if (normalized_flag_value == "deadeye") { specialization_filter.thief_deadeye = true; } - else if (flag_value == "61") { + else if (normalized_flag_value == "61") { specialization_filter.warrior_spellbreaker = true; } - else if (flag_value == "Spellbreaker") { + else if (normalized_flag_value == "spellbreaker") { specialization_filter.warrior_spellbreaker = true; } - else if (flag_value == "Catalyst") { + else if (normalized_flag_value == "catalyst") { specialization_filter.elementalist_catalyst = true; } - else if (flag_value == "Mechanist") { + else if (normalized_flag_value == "mechanist") { specialization_filter.engineer_mechanist = true; } - else if (flag_value == "Willbender") { + else if (normalized_flag_value == "willbender") { specialization_filter.guardian_willbender = true; } - else if (flag_value == "Virtuoso") { + else if (normalized_flag_value == "virtuoso") { specialization_filter.mesmer_virtuoso = true; } - else if (flag_value == "Harbinger") { + else if (normalized_flag_value == "harbinger") { specialization_filter.necromancer_harbinger = true; } - else if (flag_value == "Untamed") { + else if (normalized_flag_value == "untamed") { specialization_filter.ranger_untamed = true; } - else if (flag_value == "Vindicator") { + else if (normalized_flag_value == "vindicator") { specialization_filter.revenant_vindicator = true; } - else if (flag_value == "Specter") { + else if (normalized_flag_value == "specter") { specialization_filter.thief_specter = true; } - else if (flag_value == "Bladesworn") { + else if (normalized_flag_value == "bladesworn") { specialization_filter.warrior_bladesworn = true; } - else if (flag_value == "41") { + else if (normalized_flag_value == "41") { specialization_filter.elementalist_air = true; } - else if (flag_value == "37") { + else if (normalized_flag_value == "37") { specialization_filter.elementalist_arcane = true; } - else if (flag_value == "26") { + else if (normalized_flag_value == "26") { specialization_filter.elementalist_earth = true; } - else if (flag_value == "31") { + else if (normalized_flag_value == "31") { specialization_filter.elementalist_fire = true; } - else if (flag_value == "17") { + else if (normalized_flag_value == "17") { specialization_filter.elementalist_water = true; } - else if (flag_value == "29") { + else if (normalized_flag_value == "29") { specialization_filter.engineer_alchemy = true; } - else if (flag_value == "6") { + else if (normalized_flag_value == "6") { specialization_filter.engineer_explosives = true; } - else if (flag_value == "38") { + else if (normalized_flag_value == "38") { specialization_filter.engineer_firearms = true; } - else if (flag_value == "47") { + else if (normalized_flag_value == "47") { specialization_filter.engineer_inventions = true; } - else if (flag_value == "21") { + else if (normalized_flag_value == "21") { specialization_filter.engineer_tools = true; } - else if (flag_value == "49") { + else if (normalized_flag_value == "49") { specialization_filter.guardian_honor = true; } - else if (flag_value == "16") { + else if (normalized_flag_value == "16") { specialization_filter.guardian_radiance = true; } - else if (flag_value == "13") { + else if (normalized_flag_value == "13") { specialization_filter.guardian_valor = true; } - else if (flag_value == "46") { + else if (normalized_flag_value == "46") { specialization_filter.guardian_virtues = true; } - else if (flag_value == "42") { + else if (normalized_flag_value == "42") { specialization_filter.guardian_zeal = true; } - else if (flag_value == "45") { + else if (normalized_flag_value == "45") { specialization_filter.mesmer_chaos = true; } - else if (flag_value == "10") { + else if (normalized_flag_value == "10") { specialization_filter.mesmer_domination = true; } - else if (flag_value == "1") { + else if (normalized_flag_value == "1") { specialization_filter.mesmer_dueling = true; } - else if (flag_value == "24") { + else if (normalized_flag_value == "24") { specialization_filter.mesmer_illusions = true; } - else if (flag_value == "23") { + else if (normalized_flag_value == "23") { specialization_filter.mesmer_inspiration = true; } - else if (flag_value == "19") { + else if (normalized_flag_value == "19") { specialization_filter.necromancer_blood_magic = true; } - else if (flag_value == "39") { + else if (normalized_flag_value == "39") { specialization_filter.necromancer_curses = true; } - else if (flag_value == "2") { + else if (normalized_flag_value == "2") { specialization_filter.necromancer_death_magic = true; } - else if (flag_value == "50") { + else if (normalized_flag_value == "50") { specialization_filter.necromancer_soul_reaping = true; } - else if (flag_value == "53") { + else if (normalized_flag_value == "53") { specialization_filter.necromancer_spite = true; } - else if (flag_value == "32") { + else if (normalized_flag_value == "32") { specialization_filter.ranger_beastmastery = true; } - else if (flag_value == "8") { + else if (normalized_flag_value == "8") { specialization_filter.ranger_marksmanship = true; } - else if (flag_value == "25") { + else if (normalized_flag_value == "25") { specialization_filter.ranger_nature_magic = true; } - else if (flag_value == "30") { + else if (normalized_flag_value == "30") { specialization_filter.ranger_skirmishing = true; } - else if (flag_value == "33") { + else if (normalized_flag_value == "33") { specialization_filter.ranger_wilderness_survival = true; } - else if (flag_value == "14") { + else if (normalized_flag_value == "14") { specialization_filter.revenant_corruption = true; } - else if (flag_value == "15") { + else if (normalized_flag_value == "15") { specialization_filter.revenant_devastation = true; } - else if (flag_value == "3") { + else if (normalized_flag_value == "3") { specialization_filter.revenant_invocation = true; } - else if (flag_value == "9") { + else if (normalized_flag_value == "9") { specialization_filter.revenant_retribution = true; } - else if (flag_value == "12") { + else if (normalized_flag_value == "12") { specialization_filter.revenant_salvation = true; } - else if (flag_value == "54") { + else if (normalized_flag_value == "54") { specialization_filter.thief_acrobatics = true; } - else if (flag_value == "35") { + else if (normalized_flag_value == "35") { specialization_filter.thief_critical_strikes = true; } - else if (flag_value == "28") { + else if (normalized_flag_value == "28") { specialization_filter.thief_deadly_arts = true; } - else if (flag_value == "20") { + else if (normalized_flag_value == "20") { specialization_filter.thief_shadow_arts = true; } - else if (flag_value == "44") { + else if (normalized_flag_value == "44") { specialization_filter.thief_trickery = true; } - else if (flag_value == "36") { + else if (normalized_flag_value == "36") { specialization_filter.warrior_arms = true; } - else if (flag_value == "22") { + else if (normalized_flag_value == "22") { specialization_filter.warrior_defense = true; } - else if (flag_value == "51") { + else if (normalized_flag_value == "51") { specialization_filter.warrior_discipline = true; } - else if (flag_value == "4") { + else if (normalized_flag_value == "4") { specialization_filter.warrior_strength = true; } - else if (flag_value == "11") { + else if (normalized_flag_value == "11") { specialization_filter.warrior_tactics = true; } else { - errors->push_back(new XMLAttributeValueError("Found a value that was not in the class", input)); + errors->push_back(new XMLAttributeValueError("Invalid Filter for SpecializationFilter. Found " + flag_value, input)); continue; } } diff --git a/xml_converter/src/attribute/species_filter.cpp b/xml_converter/src/attribute/species_filter.cpp index ad3e5335..99a267e2 100644 --- a/xml_converter/src/attribute/species_filter.cpp +++ b/xml_converter/src/attribute/species_filter.cpp @@ -17,23 +17,24 @@ SpeciesFilter parse_species_filter(rapidxml::xml_attribute<>* input, vectorpush_back(new XMLAttributeValueError("Found a value that was not in the class", input)); + errors->push_back(new XMLAttributeValueError("Invalid Filter for SpeciesFilter. Found " + flag_value, input)); continue; } } diff --git a/xml_converter/src/category.cpp b/xml_converter/src/category.cpp index 6bb3b145..7003948d 100644 --- a/xml_converter/src/category.cpp +++ b/xml_converter/src/category.cpp @@ -24,7 +24,7 @@ void Category::init_from_xml(rapidxml::xml_node<>* node, vector *erro } bool Category::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors) { string attributename; - attributename = normalize_type_name(get_attribute_name(attribute)); + attributename = normalize(get_attribute_name(attribute)); if (attributename == "defaulttoggle") { this->default_visibility = parse_bool(attribute, errors); } diff --git a/xml_converter/src/icon.cpp b/xml_converter/src/icon.cpp index 023a8f9f..ed8d5485 100644 --- a/xml_converter/src/icon.cpp +++ b/xml_converter/src/icon.cpp @@ -7,7 +7,7 @@ string Icon::classname() { } bool Icon::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors) { string attributename; - attributename = normalize_type_name(get_attribute_name(attribute)); + attributename = normalize(get_attribute_name(attribute)); if (attributename == "achievementbit") { this->achievement_bitmask = parse_int(attribute, errors); } @@ -65,7 +65,7 @@ bool Icon::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectordistance_fade_start = parse_float(attribute, errors); } - else if (attributename == "rotation") { + else if (attributename == "rotate") { this->euler_rotation = parse_euler_rotation(attribute, errors); } else if (attributename == "rotatex") { diff --git a/xml_converter/src/parseable.cpp b/xml_converter/src/parseable.cpp index 0902107f..c5a4fe4c 100644 --- a/xml_converter/src/parseable.cpp +++ b/xml_converter/src/parseable.cpp @@ -33,6 +33,6 @@ void Parseable::init_from_xml(rapidxml::xml_node<>* node, vector *err bool Parseable::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *) { // I removed all of the offending variables. This whole section will be relooked at. - string item = normalize_type_name(get_attribute_name(attribute)); + string item = normalize(get_attribute_name(attribute)); return true; } \ No newline at end of file diff --git a/xml_converter/src/string_helper.cpp b/xml_converter/src/string_helper.cpp index 7fbdb8f0..2be3c2df 100644 --- a/xml_converter/src/string_helper.cpp +++ b/xml_converter/src/string_helper.cpp @@ -18,9 +18,9 @@ bool matches_any(string test, std::initializer_list list) { } bool nomralized_matches_any(string test, std::initializer_list list) { - test = normalize_type_name(test); + test = normalize(test); for (auto elem : list) { - if (test == normalize_type_name(elem)) { + if (test == normalize(elem)) { return true; } } @@ -28,9 +28,9 @@ bool nomralized_matches_any(string test, std::initializer_list list) { } bool nomralized_matches_any(string test, std::vector list) { - test = normalize_type_name(test); + test = normalize(test); for (auto elem : list) { - if (test == normalize_type_name(elem)) { + if (test == normalize(elem)) { return true; } } @@ -50,7 +50,7 @@ vector split(string input, string delimiter) { } -string normalize_type_name(string type_name) { +string normalize(string type_name) { string output; output.reserve(type_name.length()); @@ -61,6 +61,9 @@ string normalize_type_name(string type_name) { else if (character >= 'a' && character <= 'z') { output += character; } + else if (character >= '0' && character <= '9'){ + output += character; + } } return output; diff --git a/xml_converter/src/string_helper.hpp b/xml_converter/src/string_helper.hpp index 10d0d1eb..309a5bcb 100644 --- a/xml_converter/src/string_helper.hpp +++ b/xml_converter/src/string_helper.hpp @@ -12,7 +12,7 @@ string lowercase(string); vector split(string input, string delimiter); -string normalize_type_name(string type_name); +string normalize(string type_name); std::string base64_encode(uint8_t const* buf, unsigned int bufLen); std::vector base64_decode(std::string const&); diff --git a/xml_converter/src/trail.cpp b/xml_converter/src/trail.cpp index 3dfc2d76..1872c50f 100644 --- a/xml_converter/src/trail.cpp +++ b/xml_converter/src/trail.cpp @@ -7,7 +7,7 @@ string Trail::classname() { } bool Trail::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors) { string attributename; - attributename = normalize_type_name(get_attribute_name(attribute)); + attributename = normalize(get_attribute_name(attribute)); if (attributename == "achievementbit") { this->achievement_bitmask = parse_int(attribute, errors); } @@ -59,6 +59,9 @@ bool Trail::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectoris_wall = parse_bool(attribute, errors); } + else if (attributename == "mapdisplaysize") { + this->map_display_size = parse_int(attribute, errors); + } else if (attributename == "mapid") { this->map_id = parse_int(attribute, errors); } diff --git a/xml_converter/src/trail.hpp b/xml_converter/src/trail.hpp index fa5a8dc4..c2b359fc 100644 --- a/xml_converter/src/trail.hpp +++ b/xml_converter/src/trail.hpp @@ -48,6 +48,7 @@ class Trail: public Parseable { FestivalFilter festival_filter; UniqueId guid; bool is_wall; + int map_display_size; int map_id; MapTypeFilter map_type_filter; MountFilter mount_filter; From 450f66996035f80d64970fe1d83f798774a6f82e Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 21 Aug 2022 20:43:20 -0400 Subject: [PATCH 072/539] Added normalize function into code_generator --- .../doc/rendering/map_display_size.md | 3 ++- xml_converter/generators/code_generator.py | 24 ++++++++++++++++--- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/xml_converter/doc/rendering/map_display_size.md b/xml_converter/doc/rendering/map_display_size.md index cb1c45da..e32543f4 100644 --- a/xml_converter/doc/rendering/map_display_size.md +++ b/xml_converter/doc/rendering/map_display_size.md @@ -1,12 +1,13 @@ --- name: Map Display Size type: Int32 -applies_to: [Icon, Trail] #When applied to a Trail, affects the width of the trail only in the maps +applies_to: [Icon, Trail] xml_fields: [MapDisplaySize] protobuf_field: map_display_size compatability: [TacO, BlishHUD, Burrito] --- The size, in pixels, that the marker should be shown on the minimap or fullscreen map. +When applied to a Trail, affects the width of the trail shown on the minimap or fullscreen map. Notes ===== diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index ab80c77b..2d055f5a 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -440,7 +440,7 @@ def write_attribute(self, output_directory: str) -> None: for flag in metadata[filepath]['flags']: xml_fields = [] for item in metadata[filepath]['flags'][flag]: - xml_fields.append(insert_delimiter(item, delimiter="")) + xml_fields.append(normalize(item)) attribute_variable = AttributeVariable( attribute_name=flag, @@ -458,7 +458,7 @@ def write_attribute(self, output_directory: str) -> None: attribute_name=attribute_name )) for item in component['xml_fields']: - xml_fields.append(lowercase(item, delimiter="")) + xml_fields.append(normalize(item)) attribute_variable = AttributeVariable( attribute_name=lowercase(component['name'], delimiter="_"), cpp_type=doc_type_to_cpp_type[component['type']], @@ -471,7 +471,7 @@ def write_attribute(self, output_directory: str) -> None: for value in metadata[filepath]['values']: xml_fields = [] for item in metadata[filepath]['values'][value]: - xml_fields.append(insert_delimiter(item, delimiter="")) + xml_fields.append(normalize(item)) attribute_variable = AttributeVariable( attribute_name=value, cpp_type="str", @@ -756,6 +756,24 @@ def insert_delimiter(word: str, delimiter: str = "_") -> str: return "".join(delimitered_word_array) +################################################################################ +# normalize +# +# A helper function to take a string and convert it to a string of +# lowercase letters. +################################################################################ +def normalize(word: str) ->str: + normalized_word_array = [] + + for i, letter in enumerate(word): + if letter.isupper(): + normalized_word_array.append(letter.lower()) + else: + normalized_word_array.append(letter) + + return "".join(normalized_word_array) + + ################################################################################ # main # From c6a27c46e1a5989558ba7546de6cabdd16855625 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 22 Aug 2022 19:34:37 -0400 Subject: [PATCH 073/539] Added a function that deletes generated files Added _gen to generated files and made adjustments nessecary to ensure functionality --- xml_converter/generators/code_generator.py | 24 +++++++++++++------ .../cpp_templates/class_template.cpp | 2 +- .../cpp_templates/class_template.hpp | 4 ++-- .../cpp_templates/compoundvalue.cpp | 2 +- .../generators/cpp_templates/enum.cpp | 2 +- .../cpp_templates/multiflagvalue.cpp | 2 +- xml_converter/generators/presubmit.sh | 2 +- ...l_chirality.cpp => cull_chirality_gen.cpp} | 2 +- ...l_chirality.hpp => cull_chirality_gen.hpp} | 0 ...er_rotation.cpp => euler_rotation_gen.cpp} | 2 +- ...er_rotation.hpp => euler_rotation_gen.hpp} | 0 ...val_filter.cpp => festival_filter_gen.cpp} | 2 +- ...val_filter.hpp => festival_filter_gen.hpp} | 0 ...ype_filter.cpp => map_type_filter_gen.cpp} | 2 +- ...ype_filter.hpp => map_type_filter_gen.hpp} | 0 ...{mount_filter.cpp => mount_filter_gen.cpp} | 2 +- ...{mount_filter.hpp => mount_filter_gen.hpp} | 0 .../{position.cpp => position_gen.cpp} | 2 +- .../{position.hpp => position_gen.hpp} | 0 ...n_filter.cpp => profession_filter_gen.cpp} | 2 +- ...n_filter.hpp => profession_filter_gen.hpp} | 0 ...et_behavior.cpp => reset_behavior_gen.cpp} | 2 +- ...et_behavior.hpp => reset_behavior_gen.hpp} | 0 ...lter.cpp => specialization_filter_gen.cpp} | 2 +- ...lter.hpp => specialization_filter_gen.hpp} | 0 ...cies_filter.cpp => species_filter_gen.cpp} | 2 +- ...cies_filter.hpp => species_filter_gen.hpp} | 0 .../src/{category.cpp => category_gen.cpp} | 2 +- .../src/{category.hpp => category_gen.hpp} | 4 ++-- xml_converter/src/{icon.cpp => icon_gen.cpp} | 2 +- xml_converter/src/{icon.hpp => icon_gen.hpp} | 20 ++++++++-------- .../src/{trail.cpp => trail_gen.cpp} | 2 +- .../src/{trail.hpp => trail_gen.hpp} | 14 +++++------ xml_converter/src/xml_converter.cpp | 6 ++--- 34 files changed, 59 insertions(+), 49 deletions(-) rename xml_converter/src/attribute/{cull_chirality.cpp => cull_chirality_gen.cpp} (95%) rename xml_converter/src/attribute/{cull_chirality.hpp => cull_chirality_gen.hpp} (100%) rename xml_converter/src/attribute/{euler_rotation.cpp => euler_rotation_gen.cpp} (97%) rename xml_converter/src/attribute/{euler_rotation.hpp => euler_rotation_gen.hpp} (100%) rename xml_converter/src/attribute/{festival_filter.cpp => festival_filter_gen.cpp} (97%) rename xml_converter/src/attribute/{festival_filter.hpp => festival_filter_gen.hpp} (100%) rename xml_converter/src/attribute/{map_type_filter.cpp => map_type_filter_gen.cpp} (99%) rename xml_converter/src/attribute/{map_type_filter.hpp => map_type_filter_gen.hpp} (100%) rename xml_converter/src/attribute/{mount_filter.cpp => mount_filter_gen.cpp} (98%) rename xml_converter/src/attribute/{mount_filter.hpp => mount_filter_gen.hpp} (100%) rename xml_converter/src/attribute/{position.cpp => position_gen.cpp} (98%) rename xml_converter/src/attribute/{position.hpp => position_gen.hpp} (100%) rename xml_converter/src/attribute/{profession_filter.cpp => profession_filter_gen.cpp} (97%) rename xml_converter/src/attribute/{profession_filter.hpp => profession_filter_gen.hpp} (100%) rename xml_converter/src/attribute/{reset_behavior.cpp => reset_behavior_gen.cpp} (98%) rename xml_converter/src/attribute/{reset_behavior.hpp => reset_behavior_gen.hpp} (100%) rename xml_converter/src/attribute/{specialization_filter.cpp => specialization_filter_gen.cpp} (99%) rename xml_converter/src/attribute/{specialization_filter.hpp => specialization_filter_gen.hpp} (100%) rename xml_converter/src/attribute/{species_filter.cpp => species_filter_gen.cpp} (96%) rename xml_converter/src/attribute/{species_filter.hpp => species_filter_gen.hpp} (100%) rename xml_converter/src/{category.cpp => category_gen.cpp} (98%) rename xml_converter/src/{category.hpp => category_gen.hpp} (93%) rename xml_converter/src/{icon.cpp => icon_gen.cpp} (99%) rename xml_converter/src/{icon.hpp => icon_gen.hpp} (82%) rename xml_converter/src/{trail.cpp => trail_gen.cpp} (99%) rename xml_converter/src/{trail.hpp => trail_gen.hpp} (85%) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 6bf0561f..3a42d9a1 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -267,6 +267,12 @@ def get_attribute_variable_key(attribute_variable: AttributeVariable) -> str: class Generator: data: Dict[str, Document] = {} + def delete_generated_docs(self, dir_path: str) -> None: + for filepath in os.listdir(dir_path): + filepath = os.path.join(dir_path, filepath) + if filepath.endswith("_gen.hpp") or filepath.endswith("_gen.cpp") or filepath.endswith("_.html"): + os.remove(filepath) + def load_input_doc(self, dir_path: str) -> None: for filepath in os.listdir(dir_path): filepath = os.path.join(dir_path, filepath) @@ -324,7 +330,7 @@ def write_cpp_classes(self, output_directory: str) -> None: if attribute_variable.class_name == "marker_category": attributes_of_type_marker_category.append(attribute_variable.attribute_name) - with open(os.path.join(output_directory, lowercase(cpp_class) + ".hpp"), 'w') as f: + with open(os.path.join(output_directory, lowercase(cpp_class) + "_gen.hpp"), 'w') as f: f.write(header_template.render( cpp_class=cpp_class, attribute_variables=sorted(attribute_variables, key=get_attribute_variable_key), @@ -332,7 +338,7 @@ def write_cpp_classes(self, output_directory: str) -> None: attributes_of_type_marker_category=attributes_of_type_marker_category, )) - with open(os.path.join(output_directory, lowercase(cpp_class) + ".cpp"), 'w') as f: + with open(os.path.join(output_directory, lowercase(cpp_class) + "_gen.cpp"), 'w') as f: f.write(code_template.render( cpp_class=cpp_class, cpp_class_header=lowercase(cpp_class), @@ -371,20 +377,21 @@ def generate_cpp_variable_data( if field['type'] in doc_type_to_cpp_type: cpp_type = doc_type_to_cpp_type[field['type']] class_name = cpp_type + cpp_include_paths.add(class_name) elif field['type'] == "Custom": cpp_type = field['class'] class_name = insert_delimiter(field['class'], delimiter="_") + cpp_include_paths.add(class_name) elif field['type'] in ["Enum", "MultiflagValue", "CompoundValue"]: cpp_type = capitalize(attribute_name, delimiter="") class_name = attribute_name + cpp_include_paths.add(class_name + "_gen") else: raise ValueError("Unexpected type {field_type} for attribute {attribute_name}".format( field_type=field['type'], attribute_name=attribute_name, )) - cpp_include_paths.add(class_name) - for item in field['xml_fields']: xml_fields.append(lowercase(item, delimiter="")) @@ -475,7 +482,7 @@ def write_attribute(self, output_directory: str) -> None: else: continue - with open(os.path.join(output_directory, attribute_name + ".hpp"), 'w') as f: + with open(os.path.join(output_directory, attribute_name + "_gen.hpp"), 'w') as f: f.write(env.get_template("attribute_template.hpp").render( attribute_name=attribute_name, attribute_variables=sorted(attribute_variables, key=get_attribute_variable_key), @@ -483,7 +490,7 @@ def write_attribute(self, output_directory: str) -> None: type=metadata[filepath]['type'], )) - with open(os.path.join(output_directory, attribute_name + ".cpp"), 'w') as f: + with open(os.path.join(output_directory, attribute_name + "_gen.cpp"), 'w') as f: f.write(template[metadata[filepath]['type']].render( attribute_name=attribute_name, attribute_variables=attribute_variables, @@ -530,7 +537,7 @@ def write_webdocs(self, output_directory: str) -> None: for field_row in field_rows: complete_field_row_list.append(field_row) - with open(os.path.join(output_directory, page + ".html"), 'w') as f: + with open(os.path.join(output_directory, page + "_gen.html"), 'w') as f: f.write(template.render( generated_doc=generated_doc, @@ -765,6 +772,9 @@ def main() -> None: if os.path.isdir(full_markdown_doc_directory): generator.load_input_doc(full_markdown_doc_directory) + generator.delete_generated_docs("../web_docs") + generator.delete_generated_docs("../src/") + generator.delete_generated_docs("../src/attribute") generator.write_webdocs("../web_docs/") generator.write_cpp_classes("../src/") generator.write_attribute("../src/attribute") diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index 7983eea6..92ac0225 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -1,4 +1,4 @@ -#include "{{cpp_class_header}}.hpp" +#include "{{cpp_class_header}}_gen.hpp" using namespace std; diff --git a/xml_converter/generators/cpp_templates/class_template.hpp b/xml_converter/generators/cpp_templates/class_template.hpp index 3611df70..e7f4d938 100644 --- a/xml_converter/generators/cpp_templates/class_template.hpp +++ b/xml_converter/generators/cpp_templates/class_template.hpp @@ -5,8 +5,8 @@ #include "parseable.hpp" {%- if cpp_class == "Category": %} #include -#include "icon.hpp" -#include "trail.hpp" +#include "icon_gen.hpp" +#include "trail_gen.hpp" {%- elif cpp_class == "Trail": %} #include #include diff --git a/xml_converter/generators/cpp_templates/compoundvalue.cpp b/xml_converter/generators/cpp_templates/compoundvalue.cpp index 568f0a75..18d9d866 100644 --- a/xml_converter/generators/cpp_templates/compoundvalue.cpp +++ b/xml_converter/generators/cpp_templates/compoundvalue.cpp @@ -1,4 +1,4 @@ -#include "{{attribute_name}}.hpp" +#include "{{attribute_name}}_gen.hpp" #include #include diff --git a/xml_converter/generators/cpp_templates/enum.cpp b/xml_converter/generators/cpp_templates/enum.cpp index 997c9651..39c79ef0 100644 --- a/xml_converter/generators/cpp_templates/enum.cpp +++ b/xml_converter/generators/cpp_templates/enum.cpp @@ -1,4 +1,4 @@ -#include "{{attribute_name}}.hpp" +#include "{{attribute_name}}_gen.hpp" #include #include diff --git a/xml_converter/generators/cpp_templates/multiflagvalue.cpp b/xml_converter/generators/cpp_templates/multiflagvalue.cpp index c4bf26a8..29fb7eea 100644 --- a/xml_converter/generators/cpp_templates/multiflagvalue.cpp +++ b/xml_converter/generators/cpp_templates/multiflagvalue.cpp @@ -1,4 +1,4 @@ -#include "{{attribute_name}}.hpp" +#include "{{attribute_name}}_gen.hpp" #include #include diff --git a/xml_converter/generators/presubmit.sh b/xml_converter/generators/presubmit.sh index a252c86e..bde91b6a 100755 --- a/xml_converter/generators/presubmit.sh +++ b/xml_converter/generators/presubmit.sh @@ -1,4 +1,4 @@ -source ./venv/bin/activate +source ./generators/venv/bin/activate readarray -d '' FILES < <(find . -type f -name "*.py" -not -path "*/venv/*" -print0) diff --git a/xml_converter/src/attribute/cull_chirality.cpp b/xml_converter/src/attribute/cull_chirality_gen.cpp similarity index 95% rename from xml_converter/src/attribute/cull_chirality.cpp rename to xml_converter/src/attribute/cull_chirality_gen.cpp index 928de3f9..4c529fc7 100644 --- a/xml_converter/src/attribute/cull_chirality.cpp +++ b/xml_converter/src/attribute/cull_chirality_gen.cpp @@ -1,4 +1,4 @@ -#include "cull_chirality.hpp" +#include "cull_chirality_gen.hpp" #include #include diff --git a/xml_converter/src/attribute/cull_chirality.hpp b/xml_converter/src/attribute/cull_chirality_gen.hpp similarity index 100% rename from xml_converter/src/attribute/cull_chirality.hpp rename to xml_converter/src/attribute/cull_chirality_gen.hpp diff --git a/xml_converter/src/attribute/euler_rotation.cpp b/xml_converter/src/attribute/euler_rotation_gen.cpp similarity index 97% rename from xml_converter/src/attribute/euler_rotation.cpp rename to xml_converter/src/attribute/euler_rotation_gen.cpp index 3cddab5f..e72f6fa7 100644 --- a/xml_converter/src/attribute/euler_rotation.cpp +++ b/xml_converter/src/attribute/euler_rotation_gen.cpp @@ -1,4 +1,4 @@ -#include "euler_rotation.hpp" +#include "euler_rotation_gen.hpp" #include #include diff --git a/xml_converter/src/attribute/euler_rotation.hpp b/xml_converter/src/attribute/euler_rotation_gen.hpp similarity index 100% rename from xml_converter/src/attribute/euler_rotation.hpp rename to xml_converter/src/attribute/euler_rotation_gen.hpp diff --git a/xml_converter/src/attribute/festival_filter.cpp b/xml_converter/src/attribute/festival_filter_gen.cpp similarity index 97% rename from xml_converter/src/attribute/festival_filter.cpp rename to xml_converter/src/attribute/festival_filter_gen.cpp index 6473268e..fd33b662 100644 --- a/xml_converter/src/attribute/festival_filter.cpp +++ b/xml_converter/src/attribute/festival_filter_gen.cpp @@ -1,4 +1,4 @@ -#include "festival_filter.hpp" +#include "festival_filter_gen.hpp" #include #include diff --git a/xml_converter/src/attribute/festival_filter.hpp b/xml_converter/src/attribute/festival_filter_gen.hpp similarity index 100% rename from xml_converter/src/attribute/festival_filter.hpp rename to xml_converter/src/attribute/festival_filter_gen.hpp diff --git a/xml_converter/src/attribute/map_type_filter.cpp b/xml_converter/src/attribute/map_type_filter_gen.cpp similarity index 99% rename from xml_converter/src/attribute/map_type_filter.cpp rename to xml_converter/src/attribute/map_type_filter_gen.cpp index 61a92aec..b4ffa4be 100644 --- a/xml_converter/src/attribute/map_type_filter.cpp +++ b/xml_converter/src/attribute/map_type_filter_gen.cpp @@ -1,4 +1,4 @@ -#include "map_type_filter.hpp" +#include "map_type_filter_gen.hpp" #include #include diff --git a/xml_converter/src/attribute/map_type_filter.hpp b/xml_converter/src/attribute/map_type_filter_gen.hpp similarity index 100% rename from xml_converter/src/attribute/map_type_filter.hpp rename to xml_converter/src/attribute/map_type_filter_gen.hpp diff --git a/xml_converter/src/attribute/mount_filter.cpp b/xml_converter/src/attribute/mount_filter_gen.cpp similarity index 98% rename from xml_converter/src/attribute/mount_filter.cpp rename to xml_converter/src/attribute/mount_filter_gen.cpp index 5fdf26cd..1cb5b745 100644 --- a/xml_converter/src/attribute/mount_filter.cpp +++ b/xml_converter/src/attribute/mount_filter_gen.cpp @@ -1,4 +1,4 @@ -#include "mount_filter.hpp" +#include "mount_filter_gen.hpp" #include #include diff --git a/xml_converter/src/attribute/mount_filter.hpp b/xml_converter/src/attribute/mount_filter_gen.hpp similarity index 100% rename from xml_converter/src/attribute/mount_filter.hpp rename to xml_converter/src/attribute/mount_filter_gen.hpp diff --git a/xml_converter/src/attribute/position.cpp b/xml_converter/src/attribute/position_gen.cpp similarity index 98% rename from xml_converter/src/attribute/position.cpp rename to xml_converter/src/attribute/position_gen.cpp index 6027be72..fe391c5d 100644 --- a/xml_converter/src/attribute/position.cpp +++ b/xml_converter/src/attribute/position_gen.cpp @@ -1,4 +1,4 @@ -#include "position.hpp" +#include "position_gen.hpp" #include #include diff --git a/xml_converter/src/attribute/position.hpp b/xml_converter/src/attribute/position_gen.hpp similarity index 100% rename from xml_converter/src/attribute/position.hpp rename to xml_converter/src/attribute/position_gen.hpp diff --git a/xml_converter/src/attribute/profession_filter.cpp b/xml_converter/src/attribute/profession_filter_gen.cpp similarity index 97% rename from xml_converter/src/attribute/profession_filter.cpp rename to xml_converter/src/attribute/profession_filter_gen.cpp index f01907f4..f1d119b4 100644 --- a/xml_converter/src/attribute/profession_filter.cpp +++ b/xml_converter/src/attribute/profession_filter_gen.cpp @@ -1,4 +1,4 @@ -#include "profession_filter.hpp" +#include "profession_filter_gen.hpp" #include #include diff --git a/xml_converter/src/attribute/profession_filter.hpp b/xml_converter/src/attribute/profession_filter_gen.hpp similarity index 100% rename from xml_converter/src/attribute/profession_filter.hpp rename to xml_converter/src/attribute/profession_filter_gen.hpp diff --git a/xml_converter/src/attribute/reset_behavior.cpp b/xml_converter/src/attribute/reset_behavior_gen.cpp similarity index 98% rename from xml_converter/src/attribute/reset_behavior.cpp rename to xml_converter/src/attribute/reset_behavior_gen.cpp index 72bb71c9..247d8e59 100644 --- a/xml_converter/src/attribute/reset_behavior.cpp +++ b/xml_converter/src/attribute/reset_behavior_gen.cpp @@ -1,4 +1,4 @@ -#include "reset_behavior.hpp" +#include "reset_behavior_gen.hpp" #include #include diff --git a/xml_converter/src/attribute/reset_behavior.hpp b/xml_converter/src/attribute/reset_behavior_gen.hpp similarity index 100% rename from xml_converter/src/attribute/reset_behavior.hpp rename to xml_converter/src/attribute/reset_behavior_gen.hpp diff --git a/xml_converter/src/attribute/specialization_filter.cpp b/xml_converter/src/attribute/specialization_filter_gen.cpp similarity index 99% rename from xml_converter/src/attribute/specialization_filter.cpp rename to xml_converter/src/attribute/specialization_filter_gen.cpp index fef5ffeb..c6a5d6f0 100644 --- a/xml_converter/src/attribute/specialization_filter.cpp +++ b/xml_converter/src/attribute/specialization_filter_gen.cpp @@ -1,4 +1,4 @@ -#include "specialization_filter.hpp" +#include "specialization_filter_gen.hpp" #include #include diff --git a/xml_converter/src/attribute/specialization_filter.hpp b/xml_converter/src/attribute/specialization_filter_gen.hpp similarity index 100% rename from xml_converter/src/attribute/specialization_filter.hpp rename to xml_converter/src/attribute/specialization_filter_gen.hpp diff --git a/xml_converter/src/attribute/species_filter.cpp b/xml_converter/src/attribute/species_filter_gen.cpp similarity index 96% rename from xml_converter/src/attribute/species_filter.cpp rename to xml_converter/src/attribute/species_filter_gen.cpp index ad3e5335..f848c261 100644 --- a/xml_converter/src/attribute/species_filter.cpp +++ b/xml_converter/src/attribute/species_filter_gen.cpp @@ -1,4 +1,4 @@ -#include "species_filter.hpp" +#include "species_filter_gen.hpp" #include #include diff --git a/xml_converter/src/attribute/species_filter.hpp b/xml_converter/src/attribute/species_filter_gen.hpp similarity index 100% rename from xml_converter/src/attribute/species_filter.hpp rename to xml_converter/src/attribute/species_filter_gen.hpp diff --git a/xml_converter/src/category.cpp b/xml_converter/src/category_gen.cpp similarity index 98% rename from xml_converter/src/category.cpp rename to xml_converter/src/category_gen.cpp index 6bb3b145..9bd4ecf2 100644 --- a/xml_converter/src/category.cpp +++ b/xml_converter/src/category_gen.cpp @@ -1,4 +1,4 @@ -#include "category.hpp" +#include "category_gen.hpp" using namespace std; diff --git a/xml_converter/src/category.hpp b/xml_converter/src/category_gen.hpp similarity index 93% rename from xml_converter/src/category.hpp rename to xml_converter/src/category_gen.hpp index 78c1322f..a9565239 100644 --- a/xml_converter/src/category.hpp +++ b/xml_converter/src/category_gen.hpp @@ -4,8 +4,8 @@ #include #include "parseable.hpp" #include -#include "icon.hpp" -#include "trail.hpp" +#include "icon_gen.hpp" +#include "trail_gen.hpp" #include "attribute/bool.hpp" #include "attribute/string.hpp" diff --git a/xml_converter/src/icon.cpp b/xml_converter/src/icon_gen.cpp similarity index 99% rename from xml_converter/src/icon.cpp rename to xml_converter/src/icon_gen.cpp index 023a8f9f..68a47e29 100644 --- a/xml_converter/src/icon.cpp +++ b/xml_converter/src/icon_gen.cpp @@ -1,4 +1,4 @@ -#include "icon.hpp" +#include "icon_gen.hpp" using namespace std; diff --git a/xml_converter/src/icon.hpp b/xml_converter/src/icon_gen.hpp similarity index 82% rename from xml_converter/src/icon.hpp rename to xml_converter/src/icon_gen.hpp index 129d9e30..388213ac 100644 --- a/xml_converter/src/icon.hpp +++ b/xml_converter/src/icon_gen.hpp @@ -6,20 +6,20 @@ #include "attribute/bool.hpp" #include "attribute/color.hpp" -#include "attribute/cull_chirality.hpp" -#include "attribute/euler_rotation.hpp" -#include "attribute/festival_filter.hpp" +#include "attribute/cull_chirality_gen.hpp" +#include "attribute/euler_rotation_gen.hpp" +#include "attribute/festival_filter_gen.hpp" #include "attribute/float.hpp" #include "attribute/image.hpp" #include "attribute/int.hpp" -#include "attribute/map_type_filter.hpp" +#include "attribute/map_type_filter_gen.hpp" #include "attribute/marker_category.hpp" -#include "attribute/mount_filter.hpp" -#include "attribute/position.hpp" -#include "attribute/profession_filter.hpp" -#include "attribute/reset_behavior.hpp" -#include "attribute/specialization_filter.hpp" -#include "attribute/species_filter.hpp" +#include "attribute/mount_filter_gen.hpp" +#include "attribute/position_gen.hpp" +#include "attribute/profession_filter_gen.hpp" +#include "attribute/reset_behavior_gen.hpp" +#include "attribute/specialization_filter_gen.hpp" +#include "attribute/species_filter_gen.hpp" #include "attribute/string.hpp" #include "attribute/unique_id.hpp" using namespace std; diff --git a/xml_converter/src/trail.cpp b/xml_converter/src/trail_gen.cpp similarity index 99% rename from xml_converter/src/trail.cpp rename to xml_converter/src/trail_gen.cpp index 3dfc2d76..3aab1e93 100644 --- a/xml_converter/src/trail.cpp +++ b/xml_converter/src/trail_gen.cpp @@ -1,4 +1,4 @@ -#include "trail.hpp" +#include "trail_gen.hpp" using namespace std; diff --git a/xml_converter/src/trail.hpp b/xml_converter/src/trail_gen.hpp similarity index 85% rename from xml_converter/src/trail.hpp rename to xml_converter/src/trail_gen.hpp index fa5a8dc4..594e54b3 100644 --- a/xml_converter/src/trail.hpp +++ b/xml_converter/src/trail_gen.hpp @@ -16,17 +16,17 @@ #include "attribute/bool.hpp" #include "attribute/color.hpp" -#include "attribute/cull_chirality.hpp" -#include "attribute/festival_filter.hpp" +#include "attribute/cull_chirality_gen.hpp" +#include "attribute/festival_filter_gen.hpp" #include "attribute/float.hpp" #include "attribute/image.hpp" #include "attribute/int.hpp" -#include "attribute/map_type_filter.hpp" +#include "attribute/map_type_filter_gen.hpp" #include "attribute/marker_category.hpp" -#include "attribute/mount_filter.hpp" -#include "attribute/profession_filter.hpp" -#include "attribute/specialization_filter.hpp" -#include "attribute/species_filter.hpp" +#include "attribute/mount_filter_gen.hpp" +#include "attribute/profession_filter_gen.hpp" +#include "attribute/specialization_filter_gen.hpp" +#include "attribute/species_filter_gen.hpp" #include "attribute/string.hpp" #include "attribute/trail_data.hpp" #include "attribute/trail_data_map_id.hpp" diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index ebe5a089..5aee1831 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -12,9 +12,9 @@ #include #include "parseable.hpp" -#include "trail.hpp" -#include "icon.hpp" -#include "category.hpp" +#include "trail_gen.hpp" +#include "icon_gen.hpp" +#include "category_gen.hpp" #include "attribute/float.hpp" #include "string_helper.hpp" #include "rapid_helpers.hpp" From 6dfe54ec09ad5459792f7fc6ad51614f16d051a3 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 22 Aug 2022 21:50:12 -0400 Subject: [PATCH 074/539] Small change to file check line --- xml_converter/generators/code_generator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 3a42d9a1..15a3734e 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -270,7 +270,7 @@ class Generator: def delete_generated_docs(self, dir_path: str) -> None: for filepath in os.listdir(dir_path): filepath = os.path.join(dir_path, filepath) - if filepath.endswith("_gen.hpp") or filepath.endswith("_gen.cpp") or filepath.endswith("_.html"): + if filepath.endswith("_gen.hpp") or filepath.endswith("_gen.cpp") or filepath.endswith("_gen.html"): os.remove(filepath) def load_input_doc(self, dir_path: str) -> None: From d20ec99d5ce0915b3aea33e4c9194ac29d30cffb Mon Sep 17 00:00:00 2001 From: klingbolt Date: Tue, 23 Aug 2022 00:00:25 -0400 Subject: [PATCH 075/539] Restoringing presubmit script --- xml_converter/generators/presubmit.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml_converter/generators/presubmit.sh b/xml_converter/generators/presubmit.sh index bde91b6a..a252c86e 100755 --- a/xml_converter/generators/presubmit.sh +++ b/xml_converter/generators/presubmit.sh @@ -1,4 +1,4 @@ -source ./generators/venv/bin/activate +source ./venv/bin/activate readarray -d '' FILES < <(find . -type f -name "*.py" -not -path "*/venv/*" -print0) From a52651a59cc96d83cfda2eafec47dd8616370818 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 29 Aug 2022 20:38:03 -0400 Subject: [PATCH 076/539] Added function write_xml_file() Adds functionality to stringify attribute values from memory and save to an xml file --- xml_converter/doc/position/position.md | 2 +- xml_converter/doc/rotation/euler_rotation.md | 2 +- xml_converter/export_packs/test.xml | 55324 ++++++++++++++++ xml_converter/generators/code_generator.py | 159 +- .../cpp_templates/attribute_template.hpp | 2 +- .../cpp_templates/class_template.cpp | 62 +- .../cpp_templates/class_template.hpp | 5 +- .../cpp_templates/compoundvalue.cpp | 40 +- .../generators/cpp_templates/enum.cpp | 55 +- .../cpp_templates/multiflagvalue.cpp | 47 +- xml_converter/generators/presubmit.sh | 2 +- xml_converter/src/attribute/bool.cpp | 13 + xml_converter/src/attribute/bool.hpp | 2 + xml_converter/src/attribute/color.cpp | 4 + xml_converter/src/attribute/color.hpp | 2 + .../src/attribute/cull_chirality_gen.cpp | 43 +- .../src/attribute/cull_chirality_gen.hpp | 2 +- .../src/attribute/euler_rotation_gen.cpp | 23 +- .../src/attribute/euler_rotation_gen.hpp | 2 +- .../src/attribute/festival_filter_gen.cpp | 99 +- .../src/attribute/festival_filter_gen.hpp | 2 +- xml_converter/src/attribute/float.cpp | 4 + xml_converter/src/attribute/float.hpp | 2 + xml_converter/src/attribute/image.cpp | 4 + xml_converter/src/attribute/image.hpp | 1 + xml_converter/src/attribute/int.cpp | 4 + xml_converter/src/attribute/int.hpp | 2 + .../src/attribute/map_type_filter_gen.cpp | 280 +- .../src/attribute/map_type_filter_gen.hpp | 2 +- .../src/attribute/marker_category.cpp | 6 +- .../src/attribute/marker_category.hpp | 2 + .../src/attribute/mount_filter_gen.cpp | 126 +- .../src/attribute/mount_filter_gen.hpp | 2 +- xml_converter/src/attribute/position_gen.cpp | 25 +- xml_converter/src/attribute/position_gen.hpp | 2 +- .../src/attribute/profession_filter_gen.cpp | 115 +- .../src/attribute/profession_filter_gen.hpp | 2 +- .../src/attribute/reset_behavior_gen.cpp | 178 +- .../src/attribute/reset_behavior_gen.hpp | 2 +- .../attribute/specialization_filter_gen.cpp | 916 +- .../attribute/specialization_filter_gen.hpp | 2 +- .../src/attribute/species_filter_gen.cpp | 71 +- .../src/attribute/species_filter_gen.hpp | 2 +- xml_converter/src/attribute/string.cpp | 4 + xml_converter/src/attribute/string.hpp | 1 + xml_converter/src/attribute/trail_data.cpp | 4 + xml_converter/src/attribute/trail_data.hpp | 2 + .../src/attribute/trail_data_map_id.cpp | 4 + .../src/attribute/trail_data_map_id.hpp | 2 + xml_converter/src/attribute/unique_id.cpp | 4 + xml_converter/src/attribute/unique_id.hpp | 2 + xml_converter/src/category_gen.cpp | 52 +- xml_converter/src/category_gen.hpp | 12 +- xml_converter/src/icon_gen.cpp | 485 +- xml_converter/src/icon_gen.hpp | 133 +- xml_converter/src/parseable.cpp | 8 +- xml_converter/src/parseable.hpp | 6 +- xml_converter/src/trail_gen.cpp | 250 +- xml_converter/src/trail_gen.hpp | 69 +- xml_converter/src/xml_converter.cpp | 91 +- 60 files changed, 57629 insertions(+), 1142 deletions(-) create mode 100644 xml_converter/export_packs/test.xml diff --git a/xml_converter/doc/position/position.md b/xml_converter/doc/position/position.md index 073b1fa3..719d8d44 100644 --- a/xml_converter/doc/position/position.md +++ b/xml_converter/doc/position/position.md @@ -27,7 +27,7 @@ components: protobuf_field: "z" compatability: [TacO, Burrito, BlishHUD] -xml_export: "Children Only" +xml_export: "Children" --- An XYZ location of a point in the game world. diff --git a/xml_converter/doc/rotation/euler_rotation.md b/xml_converter/doc/rotation/euler_rotation.md index 8d795ab8..90ea3ff1 100644 --- a/xml_converter/doc/rotation/euler_rotation.md +++ b/xml_converter/doc/rotation/euler_rotation.md @@ -26,7 +26,7 @@ components: protobuf_field: "z" compatability: [TacO, Burrito, BlishHUD] -xml_export: "Parent Only" +xml_export: "Parent" --- Euler X Y Z rotation. diff --git a/xml_converter/export_packs/test.xml b/xml_converter/export_packs/test.xml new file mode 100644 index 00000000..864091c4 --- /dev/null +++ b/xml_converter/export_packs/test.xml @@ -0,0 +1,55324 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index de241f78..0eece2a3 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -5,7 +5,7 @@ from typing import Any, Dict, List, Tuple, Set import os import markdown -from dataclasses import dataclass +from dataclasses import dataclass, field from jinja2 import Template, FileSystemLoader, Environment SchemaType = Dict[str, Any] @@ -136,9 +136,9 @@ xml_export: type: string enum: - - Parent Only + - Parent - Parent and Children - - Children Only + - Children components: type: array items: @@ -255,9 +255,13 @@ class FieldRow: @dataclass class AttributeVariable: attribute_name: str + attribute_type: str cpp_type: str class_name: str xml_fields: List[str] + default_xml_fields: List[str] = field(default_factory=list) + xml_export: str = "" + is_child: bool = False def get_attribute_variable_key(attribute_variable: AttributeVariable) -> str: @@ -333,7 +337,8 @@ def write_cpp_classes(self, output_directory: str) -> None: with open(os.path.join(output_directory, lowercase(cpp_class) + "_gen.hpp"), 'w') as f: f.write(header_template.render( cpp_class=cpp_class, - attribute_variables=sorted(attribute_variables, key=get_attribute_variable_key), + # attribute_variables=sorted(attribute_variables, key=get_attribute_variable_key), + attribute_variables=attribute_variables, cpp_include_paths=sorted(cpp_include_paths), attributes_of_type_marker_category=attributes_of_type_marker_category, )) @@ -343,7 +348,8 @@ def write_cpp_classes(self, output_directory: str) -> None: cpp_class=cpp_class, cpp_class_header=lowercase(cpp_class), xml_class_name=cpp_classes[cpp_class], - attribute_variables=sorted(attribute_variables, key=get_attribute_variable_key), + # attribute_variables=sorted(attribute_variables, key=get_attribute_variable_key), + attribute_variables=attribute_variables, enumerate=enumerate, attributes_of_type_marker_category=attributes_of_type_marker_category, )) @@ -366,48 +372,75 @@ def generate_cpp_variable_data( attribute_name: str = "" attribute_variables: List[AttributeVariable] = [] xml_fields: List[str] = [] + default_xml_fields: List[str] = [] + xml_export: str = "" - for fieldkey, field in metadata.items(): + for fieldkey, fieldval in metadata.items(): for x in attribute_names: if fieldkey in x: attribute_name = attribute_names[x] - if doc_type in field['applies_to']: + if doc_type in fieldval['applies_to']: xml_fields = [] - if field['type'] in doc_type_to_cpp_type: - cpp_type = doc_type_to_cpp_type[field['type']] + default_xml_fields = [] + xml_export = "" + if fieldval['type'] in doc_type_to_cpp_type: + cpp_type = doc_type_to_cpp_type[fieldval['type']] class_name = cpp_type cpp_include_paths.add(class_name) - elif field['type'] == "Custom": - cpp_type = field['class'] - class_name = insert_delimiter(field['class'], delimiter="_") + elif fieldval['type'] == "Custom": + if fieldval['class'] == "TrailDataMapId": + continue + cpp_type = fieldval['class'] + class_name = insert_delimiter(fieldval['class'], delimiter="_") cpp_include_paths.add(class_name) - elif field['type'] in ["Enum", "MultiflagValue", "CompoundValue"]: + elif fieldval['type'] in ["Enum", "MultiflagValue", "CompoundValue"]: cpp_type = capitalize(attribute_name, delimiter="") class_name = attribute_name cpp_include_paths.add(class_name + "_gen") else: raise ValueError("Unexpected type {field_type} for attribute {attribute_name}".format( - field_type=field['type'], + field_type=fieldval['type'], attribute_name=attribute_name, )) - for item in field['xml_fields']: - xml_fields.append(lowercase(item, delimiter="")) - - # Compound Values are unique in that the components have xml fields in addition to the compound variable - if field['type'] == "CompoundValue": - for component in field['components']: - for item in component['xml_fields']: + # Compound Values are unique in that the components have xml fields in addition to the compound variable + if fieldval['type'] == "CompoundValue": + xml_export = fieldval['xml_export'] + for i, component in enumerate(fieldval['components']): + xml_fields = [] + default_xml_fields = [] + for j, item in enumerate(component['xml_fields']): + if xml_export == "Children": + default_xml_fields.append(item) + if xml_export == "Parent": + default_xml_fields.append(fieldval["xml_fields"][0]) xml_fields.append(lowercase(item, delimiter="")) - - attribute_variable: AttributeVariable = AttributeVariable( + attribute_variable = AttributeVariable( + attribute_name=lowercase(component['name'], delimiter="_"), + attribute_type="CompoundValue", + cpp_type=doc_type_to_cpp_type[component['type']], + class_name=class_name, + xml_fields=xml_fields, + default_xml_fields=default_xml_fields, + xml_export=xml_export, + is_child=True, + ) + attribute_variables.append(attribute_variable) + + for x in fieldval['xml_fields']: + xml_fields.append(lowercase(x, delimiter="")) + default_xml_fields.append(fieldval['xml_fields'][0]) + + attribute_variable = AttributeVariable( attribute_name=attribute_name, + attribute_type=fieldval["type"], cpp_type=cpp_type, class_name=class_name, xml_fields=xml_fields, + default_xml_fields=default_xml_fields, + xml_export=xml_export, ) - attribute_variables.append(attribute_variable) return attribute_variables, cpp_include_paths @@ -451,6 +484,7 @@ def write_attribute(self, output_directory: str) -> None: attribute_variable = AttributeVariable( attribute_name=flag, + attribute_type=metadata[filepath]['type'], cpp_type="bool", class_name=attribute_name, xml_fields=xml_fields, @@ -468,9 +502,11 @@ def write_attribute(self, output_directory: str) -> None: xml_fields.append(normalize(item)) attribute_variable = AttributeVariable( attribute_name=lowercase(component['name'], delimiter="_"), + attribute_type=metadata[filepath]['type'], cpp_type=doc_type_to_cpp_type[component['type']], class_name=attribute_name, xml_fields=xml_fields, + xml_export=metadata[filepath]["xml_export"], ) attribute_variables.append(attribute_variable) @@ -481,6 +517,7 @@ def write_attribute(self, output_directory: str) -> None: xml_fields.append(normalize(item)) attribute_variable = AttributeVariable( attribute_name=value, + attribute_type=metadata[filepath]['type'], cpp_type="str", class_name=attribute_name, xml_fields=xml_fields @@ -608,33 +645,33 @@ def generate_auto_docs(self, metadata: Dict[str, SchemaType], content: Dict[str, template = env.get_template("infotable.html") field_rows = [] - for fieldkey, field in metadata.items(): + for fieldkey, fieldval in metadata.items(): valid_values = "" - if field['type'] == "MultiflagValue" or field['type'] == "Enum": + if fieldval['type'] == "MultiflagValue" or fieldval['type'] == "Enum": - if (field["type"] == "MultiflagValue"): - pairings = field["flags"] - elif (field["type"] == "Enum"): - pairings = field["values"] + if (fieldval["type"] == "MultiflagValue"): + pairings = fieldval["flags"] + elif (fieldval["type"] == "Enum"): + pairings = fieldval["values"] else: raise ValueError("Type was MultiflagValue or Enum but not MultiflagValue or Enum. Not sure what happened.") example = self.build_example( - type=field['type'], - applies_to=field['applies_to'], - xml_field=field['xml_fields'][0], + type=fieldval['type'], + applies_to=fieldval['applies_to'], + xml_field=fieldval['xml_fields'][0], examples=self.get_fixed_option_examples( - field_type=field['type'], + field_type=fieldval['type'], pairings=pairings ) ) valid_values = "" @@ -645,35 +682,35 @@ def generate_auto_docs(self, metadata: Dict[str, SchemaType], content: Dict[str, valid_values += "" valid_values += "
XML Value" - if (field["type"] == "MultiflagValue"): + if (fieldval["type"] == "MultiflagValue"): valid_values += "Set Flag" - elif (field["type"] == "Enum"): + elif (fieldval["type"] == "Enum"): valid_values += "Enum Value" valid_values += "
" + elem + "
" - elif field['type'] == "CompoundValue": + elif fieldval['type'] == "CompoundValue": example = self.build_example( - type=field['type'], - applies_to=field['applies_to'], - xml_field=field['xml_fields'][0], + type=fieldval['type'], + applies_to=fieldval['applies_to'], + xml_field=fieldval['xml_fields'][0], examples=["???TODO???"] ) - # ",".join( [ self.get_examples(x['type'], field['applies_to'], field['xml_fields'][0]) for x in field['components'] ]) + # ",".join( [ self.get_examples(x['type'], fieldval['applies_to'], fieldval['xml_fields'][0]) for x in fieldval['components'] ]) else: example = self.build_example( - type=field['type'], - applies_to=field['applies_to'], - xml_field=field['xml_fields'][0], + type=fieldval['type'], + applies_to=fieldval['applies_to'], + xml_field=fieldval['xml_fields'][0], examples=self.get_examples( - field_type=field['type'], + field_type=fieldval['type'], # pairings=pairings ) ) - # self.get_examples(field['type'], field['applies_to'], field['xml_fields'][0]) + # self.get_examples(fieldval['type'], fieldval['applies_to'], fieldval['xml_fieldsval'][0]) field_rows.append(FieldRow( - name=field["name"], - xml_attribute=field["xml_fields"][0], - alternate_xml_attributes=field["xml_fields"][1:], - binary_field=field["protobuf_field"], - data_type=field["type"], - supported_by_html="
".join(field["compatability"]), - usable_on_html="
".join(field["applies_to"]), + name=fieldval["name"], + xml_attribute=fieldval["xml_fields"][0], + alternate_xml_attributes=fieldval["xml_fields"][1:], + binary_field=fieldval["protobuf_field"], + data_type=fieldval["type"], + supported_by_html="
".join(fieldval["compatability"]), + usable_on_html="
".join(fieldval["applies_to"]), example=example, valid_values_html=valid_values, is_sub_field=False, @@ -681,20 +718,20 @@ def generate_auto_docs(self, metadata: Dict[str, SchemaType], content: Dict[str, description=content[fieldkey] # todo: )) - if field['type'] == "CompoundValue": - for component_field in field["components"]: + if fieldval['type'] == "CompoundValue": + for component_field in fieldval["components"]: field_rows.append(FieldRow( name=component_field["name"], xml_attribute=component_field["xml_fields"][0], alternate_xml_attributes=component_field["xml_fields"][1:], - binary_field=field["protobuf_field"] + "." + component_field["protobuf_field"], + binary_field=fieldval["protobuf_field"] + "." + component_field["protobuf_field"], data_type=component_field["type"], supported_by_html="
".join(component_field["compatability"]), - usable_on_html="
".join(field["applies_to"]), + usable_on_html="
".join(fieldval["applies_to"]), example=self.build_example( type=component_field["type"], - applies_to=field["applies_to"], - xml_field=field["xml_fields"][0], + applies_to=fieldval["applies_to"], + xml_field=fieldval["xml_fields"][0], examples=["???TODO2???"], ), description=content[fieldkey], @@ -766,10 +803,10 @@ def insert_delimiter(word: str, delimiter: str = "_") -> str: ################################################################################ # normalize # -# A helper function to take a string and convert it to a string of +# A helper function to take a string and convert it to a string of # lowercase letters. ################################################################################ -def normalize(word: str) ->str: +def normalize(word: str) -> str: normalized_word_array = [] for i, letter in enumerate(word): diff --git a/xml_converter/generators/cpp_templates/attribute_template.hpp b/xml_converter/generators/cpp_templates/attribute_template.hpp index 67917717..d9459580 100644 --- a/xml_converter/generators/cpp_templates/attribute_template.hpp +++ b/xml_converter/generators/cpp_templates/attribute_template.hpp @@ -26,4 +26,4 @@ class {{class_name}} { }; {%- endif %} {{class_name}} parse_{{attribute_name}}(rapidxml::xml_attribute<>* input, vector *errors); - \ No newline at end of file +string stringify_{{attribute_name}}({{class_name}} attribute_value); diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index dd343c31..20fb7a4f 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -1,4 +1,6 @@ #include "{{cpp_class_header}}_gen.hpp" +#include +#include using namespace std; @@ -28,15 +30,25 @@ void Category::init_from_xml(rapidxml::xml_node<>* node, vector *erro bool {{cpp_class}}::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors) { string attributename; attributename = normalize(get_attribute_name(attribute)); + + + {%-for n, attribute_variable in enumerate(attribute_variables)%} {%-for i, value in enumerate(attribute_variable.xml_fields)%} {%-if i == 0 and n == 0:%} if (attributename == "{{value}}") { - this->{{attribute_variables[n].attribute_name}} = parse_{{attribute_variables[n].class_name}}(attribute, errors); + this->{{attribute_variable.attribute_name}} = parse_{{attribute_variable.class_name}}(attribute, errors); + this->{{attribute_variable.attribute_name}}_is_true = true; + } + {%-elif (attribute_variable.attribute_type == "CompoundValue" and attribute_variable.class_name != attribute_variable.attribute_name) %} + else if (attributename == "{{value}}") { + this->{{attribute_variable.attribute_name}} = parse_float(attribute, errors); + this->{{attribute_variable.attribute_name}}_is_true = true; } {%- else: %} else if (attributename == "{{value}}") { - this->{{attribute_variables[n].attribute_name}} = parse_{{attribute_variables[n].class_name}}(attribute, errors); + this->{{attribute_variable.attribute_name}} = parse_{{attribute_variable.class_name}}(attribute, errors); + this->{{attribute_variable.attribute_name}}_is_true = true; } {%- endif %} {%- endfor %} @@ -48,10 +60,54 @@ bool {{cpp_class}}::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vec } {%-if attributes_of_type_marker_category %} -bool {{cpp_class}}::validate_attributes_of_type_marker_category(){ +bool {{cpp_class}}::validate_attributes_of_type_marker_category() { {%-for attribute in attributes_of_type_marker_category%} // TODO: validate "{{attribute}}" {%- endfor %} return true; } {%- endif %} + +vector {{cpp_class}}::as_xml() const { + vector xml_node_contents; + xml_node_contents.push_back("<{{xml_class_name}} "); +{%-for attribute_variable in attribute_variables%} + {%- if (attribute_variable.attribute_type == "CompoundValue")%} + {%-if (attribute_variable.xml_export == "Children" and attribute_variable.is_child == true)%} + if (this->{{attribute_variable.attribute_name}}_is_true) { + xml_node_contents.push_back(" {{attribute_variable.default_xml_fields[0]}}=\"" + to_string(this->{{attribute_variable.attribute_name}}) + "\""); + } + {%-elif (attribute_variable.xml_export == "Parent" and attribute_variable.is_child == false)%} + if (this->{{attribute_variable.attribute_name}}_is_true) { + xml_node_contents.push_back(" {{attribute_variable.default_xml_fields[0]}}=\"" + stringify_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}}) + "\""); + } + {%-elif (attribute_variable.xml_export == "Parent and Children")%} + {%-for value in attribute_variable.xml_fields%} + if (this->{{attribute_variable.attribute_name}}_is_true) { + xml_node_contents.push_back(" {{value}}=\"" + stringify_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}}) + "\""); + {%- endfor %} + } + {%- endif %} + {%- else: %} + if (this->{{attribute_variable.attribute_name}}_is_true) { + xml_node_contents.push_back(" {{attribute_variable.default_xml_fields[0]}}=\"" + stringify_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}}) + "\""); + } + {%- endif %} + +{%- endfor %} +{%- if cpp_class == "Category": %} + xml_node_contents.push_back(">\n"); + + for (const auto& [key, val] : this->children){ + string text; + for (const auto& s: val.as_xml()) { text += s; }; + + xml_node_contents.push_back("\t" + text); + } + + xml_node_contents.push_back("\n"); +{%- else: %} + xml_node_contents.push_back("/>"); +{%- endif %} + return xml_node_contents; +} diff --git a/xml_converter/generators/cpp_templates/class_template.hpp b/xml_converter/generators/cpp_templates/class_template.hpp index e7f4d938..9360fa13 100644 --- a/xml_converter/generators/cpp_templates/class_template.hpp +++ b/xml_converter/generators/cpp_templates/class_template.hpp @@ -28,7 +28,7 @@ class {{cpp_class}}: public Parseable { public: {%- for attribute_variable in attribute_variables: %} {{attribute_variable.cpp_type}} {{attribute_variable.attribute_name}}; - + bool {{attribute_variable.attribute_name}}_is_true = false; {%- endfor %} {%- if cpp_class == "Category": %} @@ -40,7 +40,8 @@ class {{cpp_class}}: public Parseable { {%- endif %} virtual string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors); + virtual vector as_xml() const; {%-if attributes_of_type_marker_category %} bool validate_attributes_of_type_marker_category(); {%- endif %} -}; \ No newline at end of file +}; diff --git a/xml_converter/generators/cpp_templates/compoundvalue.cpp b/xml_converter/generators/cpp_templates/compoundvalue.cpp index 18d9d866..acead274 100644 --- a/xml_converter/generators/cpp_templates/compoundvalue.cpp +++ b/xml_converter/generators/cpp_templates/compoundvalue.cpp @@ -16,29 +16,23 @@ {%- endfor %} attributename = get_attribute_name(input); compound_values = split(get_attribute_value(input), ","); - - if (typeid(compound_values) == typeid(std::string)) { -{%-for n, attribute_variable in enumerate(attribute_variables)%} - {%-for i, value in enumerate(attribute_variable.xml_fields)%} - {%-if i == 0 and n == 0:%} - if (attributename == "{{value}}") { - {{attribute_name}}.{{attribute_variables[n].attribute_name}} = std::stof(get_attribute_value(input)); - } - {%- else %} - else if (attributename == "{{value}}") { - {{attribute_name}}.{{attribute_variables[n].attribute_name}} = std::stof(get_attribute_value(input)); - } - {%- endif %} - - {%- endfor %} -{%- endfor %} - else { - {%-for n, attribute_variable in enumerate(attribute_variables)%} + if (compound_values.size() == 3){ +{%-for n, attribute_variable in enumerate(attribute_variables)%} {{attribute_name}}.{{attribute_variables[n].attribute_name}} = std::stof(compound_values[{{n}}]); - {%- endfor %} - } +{%- endfor %} } - return {{attribute_name}}; - -} \ No newline at end of file +} +{%-if attribute_variables[0].xml_export == "Parent"%} +string stringify_{{attribute_name}}({{class_name}} attribute_value){ + string output; + {%-for n, attribute_variable in enumerate(attribute_variables)%} + {%-if n == 0:%} + output = to_string(attribute_value.{{attribute_variables[n].attribute_name}}); + {%- else %} + output = output + "," + to_string(attribute_value.{{attribute_variables[n].attribute_name}}); + {%- endif %} + {%- endfor %} + return output; +} +{%- endif %} diff --git a/xml_converter/generators/cpp_templates/enum.cpp b/xml_converter/generators/cpp_templates/enum.cpp index ce767bd0..f9396688 100644 --- a/xml_converter/generators/cpp_templates/enum.cpp +++ b/xml_converter/generators/cpp_templates/enum.cpp @@ -7,25 +7,44 @@ #include "../rapidxml-1.13/rapidxml.hpp" {{class_name}} parse_{{attribute_name}}(rapidxml::xml_attribute<>* input, vector *errors){ - {{class_name}} {{attribute_name}}; - string normalized_value = normalize(get_attribute_value(input)); -{%-for n, attribute_variable in enumerate(attribute_variables)%} - {%-for i, value in enumerate(attribute_variable.xml_fields)%} - {%-if i == 0 and n == 0:%} - if (normalized_value == "{{value}}") { - {{attribute_name}} = {{class_name}}::{{attribute_variable.attribute_name}}; - } - {%- else: %} - else if (normalized_value == "{{value}}") { - {{attribute_name}} = {{class_name}}::{{attribute_variable.attribute_name}}; - } - {%- endif %} - {%- endfor %} - + {{class_name}} {{attribute_name}}; + string normalized_value = normalize(get_attribute_value(input)); +{%-for n, attribute_variable in enumerate(attribute_variables)%} + {%-for i, value in enumerate(attribute_variable.xml_fields)%} + {%-if i == 0 and n == 0:%} + if (normalized_value == "{{value}}") { + {{attribute_name}} = {{class_name}}::{{attribute_variable.attribute_name}}; + } + {%- else: %} + else if (normalized_value == "{{value}}") { + {{attribute_name}} = {{class_name}}::{{attribute_variable.attribute_name}}; + } + {%- endif %} + {%- endfor %} + {%- endfor %} - else { - errors->push_back(new XMLAttributeValueError("Found an invalid value that was not in the Enum {{class_name}}", input)); + else { + errors->push_back(new XMLAttributeValueError("Found an invalid value that was not in the Enum {{class_name}}", input)); {{attribute_name}} = {{class_name}}::{{attribute_variables[0].attribute_name}}; } - return {{attribute_name}}; + return {{attribute_name}}; +} + +string stringify_{{attribute_name}}({{class_name}} attribute_value){ +{%-for n, attribute_variable in enumerate(attribute_variables)%} + {%-for i, value in enumerate(attribute_variable.xml_fields)%} + {%-if i == 0 and n == 0:%} + if (attribute_value == {{class_name}}::{{attribute_variable.attribute_name}}) { + return "{{value}}"; + } + {%- else: %} + else if (attribute_value == {{class_name}}::{{attribute_variable.attribute_name}}) { + return "{{value}}"; + } + {%- endif %} + {%- endfor %} +{%- endfor %} + else { + return "{{class_name}}::{{attribute_variables[0].xml_fields[0]}}"; + } } diff --git a/xml_converter/generators/cpp_templates/multiflagvalue.cpp b/xml_converter/generators/cpp_templates/multiflagvalue.cpp index fb356815..67628dce 100644 --- a/xml_converter/generators/cpp_templates/multiflagvalue.cpp +++ b/xml_converter/generators/cpp_templates/multiflagvalue.cpp @@ -10,30 +10,39 @@ {{class_name}} {{attribute_name}}; vector flag_values; flag_values = split(get_attribute_value(input), ","); -{%-for attribute_variable in attribute_variables%} - {{attribute_name}}.{{attribute_variable.attribute_name}} = false; +{%-for attribute_variable in attribute_variables%} + {{attribute_name}}.{{attribute_variable.attribute_name}} = false; {%- endfor %} for (string flag_value : flag_values) { - string normalized_flag_value = normalize(flag_value); -{%-for n, attribute_variable in enumerate(attribute_variables)%} - {%-for i, value in enumerate(attribute_variable.xml_fields)%} - {%-if i == 0 and n == 0:%} - if (normalized_flag_value == "{{value}}") { - {{attribute_name}}.{{attribute_variable.attribute_name}} = true; - } - {%- else: %} - else if (normalized_flag_value == "{{value}}") { - {{attribute_name}}.{{attribute_variable.attribute_name}} = true; - } - {%- endif %} - {%- endfor %} + string normalized_flag_value = normalize(flag_value); +{%-for n, attribute_variable in enumerate(attribute_variables)%} + {%-for i, value in enumerate(attribute_variable.xml_fields)%} + {%-if i == 0 and n == 0:%} + if (normalized_flag_value == "{{value}}") { + {{attribute_name}}.{{attribute_variable.attribute_name}} = true; + } + {%- else: %} + else if (normalized_flag_value == "{{value}}") { + {{attribute_name}}.{{attribute_variable.attribute_name}} = true; + } + {%- endif %} + {%- endfor %} {%- endfor %} - else { - errors->push_back(new XMLAttributeValueError("Invalid Filter for {{class_name}}. Found " + flag_value, input)); - continue; + else { + errors->push_back(new XMLAttributeValueError("Invalid Filter for {{class_name}}. Found " + flag_value, input)); + continue; } } return {{attribute_name}}; - +} + +string stringify_{{attribute_name}}({{class_name}} attribute_value){ + string output = ""; +{%-for n, attribute_variable in enumerate(attribute_variables)%} + if (attribute_value.{{attribute_variable.attribute_name}} == true){ + output = output + "{{attribute_variable.xml_fields[0]}}"; + } +{%- endfor %} + return output; } diff --git a/xml_converter/generators/presubmit.sh b/xml_converter/generators/presubmit.sh index bde91b6a..a252c86e 100755 --- a/xml_converter/generators/presubmit.sh +++ b/xml_converter/generators/presubmit.sh @@ -1,4 +1,4 @@ -source ./generators/venv/bin/activate +source ./venv/bin/activate readarray -d '' FILES < <(find . -type f -name "*.py" -not -path "*/venv/*" -print0) diff --git a/xml_converter/src/attribute/bool.cpp b/xml_converter/src/attribute/bool.cpp index 9be5867b..43094419 100644 --- a/xml_converter/src/attribute/bool.cpp +++ b/xml_converter/src/attribute/bool.cpp @@ -21,3 +21,16 @@ bool parse_bool(rapidxml::xml_attribute<>* input, vector *errors) { return false; } } + +string stringify_bool(bool attribute_value){ + if (attribute_value == false) { + return "false"; + } + else if (attribute_value == true){ + return "true"; + } + else{ + return "false"; + } +} + \ No newline at end of file diff --git a/xml_converter/src/attribute/bool.hpp b/xml_converter/src/attribute/bool.hpp index 205f061f..2672153f 100644 --- a/xml_converter/src/attribute/bool.hpp +++ b/xml_converter/src/attribute/bool.hpp @@ -10,3 +10,5 @@ using namespace std; bool parse_bool(rapidxml::xml_attribute<>* input, vector *errors); + +string stringify_bool(bool attribute_value); diff --git a/xml_converter/src/attribute/color.cpp b/xml_converter/src/attribute/color.cpp index 640c647d..235d9d36 100644 --- a/xml_converter/src/attribute/color.cpp +++ b/xml_converter/src/attribute/color.cpp @@ -13,3 +13,7 @@ Color parse_color(rapidxml::xml_attribute<>* input, vector *) { color.hex = get_attribute_value(input); return color; } + +string stringify_color (Color attribute_value){ + return attribute_value.hex; +} \ No newline at end of file diff --git a/xml_converter/src/attribute/color.hpp b/xml_converter/src/attribute/color.hpp index 7b788402..91b34443 100644 --- a/xml_converter/src/attribute/color.hpp +++ b/xml_converter/src/attribute/color.hpp @@ -14,3 +14,5 @@ class Color { }; Color parse_color(rapidxml::xml_attribute<>* input, vector *errors); + +string stringify_color (Color attribute_value); \ No newline at end of file diff --git a/xml_converter/src/attribute/cull_chirality_gen.cpp b/xml_converter/src/attribute/cull_chirality_gen.cpp index 6690248d..83a5af41 100644 --- a/xml_converter/src/attribute/cull_chirality_gen.cpp +++ b/xml_converter/src/attribute/cull_chirality_gen.cpp @@ -7,20 +7,35 @@ #include "../rapidxml-1.13/rapidxml.hpp" CullChirality parse_cull_chirality(rapidxml::xml_attribute<>* input, vector *errors){ - CullChirality cull_chirality; - string normalized_value = normalize(get_attribute_value(input)); - if (normalized_value == "none") { - cull_chirality = CullChirality::none; - } - else if (normalized_value == "clockwise") { - cull_chirality = CullChirality::clockwise; - } - else if (normalized_value == "counterclockwise") { - cull_chirality = CullChirality::counter_clockwise; - } - else { - errors->push_back(new XMLAttributeValueError("Found an invalid value that was not in the Enum CullChirality", input)); + CullChirality cull_chirality; + string normalized_value = normalize(get_attribute_value(input)); + if (normalized_value == "none") { cull_chirality = CullChirality::none; } - return cull_chirality; + else if (normalized_value == "clockwise") { + cull_chirality = CullChirality::clockwise; + } + else if (normalized_value == "counterclockwise") { + cull_chirality = CullChirality::counter_clockwise; + } + else { + errors->push_back(new XMLAttributeValueError("Found an invalid value that was not in the Enum CullChirality", input)); + cull_chirality = CullChirality::none; + } + return cull_chirality; +} + +string stringify_cull_chirality(CullChirality attribute_value){ + if (attribute_value == CullChirality::none) { + return "none"; + } + else if (attribute_value == CullChirality::clockwise) { + return "clockwise"; + } + else if (attribute_value == CullChirality::counter_clockwise) { + return "counterclockwise"; + } + else { + return "CullChirality::none"; + } } \ No newline at end of file diff --git a/xml_converter/src/attribute/cull_chirality_gen.hpp b/xml_converter/src/attribute/cull_chirality_gen.hpp index 4c64f594..ce91b790 100644 --- a/xml_converter/src/attribute/cull_chirality_gen.hpp +++ b/xml_converter/src/attribute/cull_chirality_gen.hpp @@ -14,4 +14,4 @@ enum CullChirality { none, }; CullChirality parse_cull_chirality(rapidxml::xml_attribute<>* input, vector *errors); - \ No newline at end of file +string stringify_cull_chirality(CullChirality attribute_value); \ No newline at end of file diff --git a/xml_converter/src/attribute/euler_rotation_gen.cpp b/xml_converter/src/attribute/euler_rotation_gen.cpp index e72f6fa7..16faead6 100644 --- a/xml_converter/src/attribute/euler_rotation_gen.cpp +++ b/xml_converter/src/attribute/euler_rotation_gen.cpp @@ -16,24 +16,17 @@ EulerRotation parse_euler_rotation(rapidxml::xml_attribute<>* input, vector* input, vector *errors); - \ No newline at end of file +string stringify_euler_rotation(EulerRotation attribute_value); \ No newline at end of file diff --git a/xml_converter/src/attribute/festival_filter_gen.cpp b/xml_converter/src/attribute/festival_filter_gen.cpp index 810443d2..7e57f9e9 100644 --- a/xml_converter/src/attribute/festival_filter_gen.cpp +++ b/xml_converter/src/attribute/festival_filter_gen.cpp @@ -9,46 +9,71 @@ FestivalFilter parse_festival_filter(rapidxml::xml_attribute<>* input, vector *errors){ FestivalFilter festival_filter; vector flag_values; - flag_values = split(get_attribute_value(input), ","); - festival_filter.dragonbash = false; - festival_filter.festival_of_the_four_winds = false; - festival_filter.halloween = false; - festival_filter.lunar_new_year = false; - festival_filter.super_adventure_festival = false; - festival_filter.wintersday = false; - festival_filter.none = false; + flag_values = split(get_attribute_value(input), ","); + festival_filter.dragonbash = false; + festival_filter.festival_of_the_four_winds = false; + festival_filter.halloween = false; + festival_filter.lunar_new_year = false; + festival_filter.super_adventure_festival = false; + festival_filter.wintersday = false; + festival_filter.none = false; for (string flag_value : flag_values) { - string normalized_flag_value = normalize(flag_value); - if (normalized_flag_value == "dragonbash") { - festival_filter.dragonbash = true; - } - else if (normalized_flag_value == "festivalofthefourwinds") { - festival_filter.festival_of_the_four_winds = true; - } - else if (normalized_flag_value == "halloween") { - festival_filter.halloween = true; - } - else if (normalized_flag_value == "lunarnewyear") { - festival_filter.lunar_new_year = true; - } - else if (normalized_flag_value == "superadventurefestival") { - festival_filter.super_adventure_festival = true; - } - else if (normalized_flag_value == "superadventurebox") { - festival_filter.super_adventure_festival = true; - } - else if (normalized_flag_value == "wintersday") { - festival_filter.wintersday = true; - } - else if (normalized_flag_value == "none") { - festival_filter.none = true; - } - else { - errors->push_back(new XMLAttributeValueError("Invalid Filter for FestivalFilter. Found " + flag_value, input)); - continue; + string normalized_flag_value = normalize(flag_value); + if (normalized_flag_value == "dragonbash") { + festival_filter.dragonbash = true; + } + else if (normalized_flag_value == "festivalofthefourwinds") { + festival_filter.festival_of_the_four_winds = true; + } + else if (normalized_flag_value == "halloween") { + festival_filter.halloween = true; + } + else if (normalized_flag_value == "lunarnewyear") { + festival_filter.lunar_new_year = true; + } + else if (normalized_flag_value == "superadventurefestival") { + festival_filter.super_adventure_festival = true; + } + else if (normalized_flag_value == "superadventurebox") { + festival_filter.super_adventure_festival = true; + } + else if (normalized_flag_value == "wintersday") { + festival_filter.wintersday = true; + } + else if (normalized_flag_value == "none") { + festival_filter.none = true; + } + else { + errors->push_back(new XMLAttributeValueError("Invalid Filter for FestivalFilter. Found " + flag_value, input)); + continue; } } return festival_filter; - +} + +string stringify_festival_filter(FestivalFilter attribute_value){ + string output = ""; + if (attribute_value.dragonbash == true){ + output = output + "dragonbash"; + } + if (attribute_value.festival_of_the_four_winds == true){ + output = output + "festivalofthefourwinds"; + } + if (attribute_value.halloween == true){ + output = output + "halloween"; + } + if (attribute_value.lunar_new_year == true){ + output = output + "lunarnewyear"; + } + if (attribute_value.super_adventure_festival == true){ + output = output + "superadventurefestival"; + } + if (attribute_value.wintersday == true){ + output = output + "wintersday"; + } + if (attribute_value.none == true){ + output = output + "none"; + } + return output; } \ No newline at end of file diff --git a/xml_converter/src/attribute/festival_filter_gen.hpp b/xml_converter/src/attribute/festival_filter_gen.hpp index 7fac8c52..66341504 100644 --- a/xml_converter/src/attribute/festival_filter_gen.hpp +++ b/xml_converter/src/attribute/festival_filter_gen.hpp @@ -21,4 +21,4 @@ class FestivalFilter { virtual string classname() { return "FestivalFilter"; }; }; FestivalFilter parse_festival_filter(rapidxml::xml_attribute<>* input, vector *errors); - \ No newline at end of file +string stringify_festival_filter(FestivalFilter attribute_value); \ No newline at end of file diff --git a/xml_converter/src/attribute/float.cpp b/xml_converter/src/attribute/float.cpp index 1ec7f815..5180a3db 100644 --- a/xml_converter/src/attribute/float.cpp +++ b/xml_converter/src/attribute/float.cpp @@ -8,3 +8,7 @@ float parse_float(rapidxml::xml_attribute<>* input, std::vector *) { return std::stof(get_attribute_value(input)); } + +string stringify_float (float attribute_value){ + return to_string(attribute_value); +} diff --git a/xml_converter/src/attribute/float.hpp b/xml_converter/src/attribute/float.hpp index 9e9ba8df..621f24c5 100644 --- a/xml_converter/src/attribute/float.hpp +++ b/xml_converter/src/attribute/float.hpp @@ -7,3 +7,5 @@ #include "../rapidxml-1.13/rapidxml.hpp" float parse_float(rapidxml::xml_attribute<>* input, std::vector *errors); + +string stringify_float (float attribute_value); \ No newline at end of file diff --git a/xml_converter/src/attribute/image.cpp b/xml_converter/src/attribute/image.cpp index 6e9188d5..738f9cda 100644 --- a/xml_converter/src/attribute/image.cpp +++ b/xml_converter/src/attribute/image.cpp @@ -13,3 +13,7 @@ Image parse_image(rapidxml::xml_attribute<>* input, vector *) { image.original_token = input; return image; } + +string stringify_image(Image attribute_value){ + return attribute_value.path; +} \ No newline at end of file diff --git a/xml_converter/src/attribute/image.hpp b/xml_converter/src/attribute/image.hpp index e500eed7..591f94d0 100644 --- a/xml_converter/src/attribute/image.hpp +++ b/xml_converter/src/attribute/image.hpp @@ -16,3 +16,4 @@ class Image { Image parse_image(rapidxml::xml_attribute<>* input, vector *errors); +string stringify_image (Image attribute_value); \ No newline at end of file diff --git a/xml_converter/src/attribute/int.cpp b/xml_converter/src/attribute/int.cpp index 38a7d833..fb496230 100644 --- a/xml_converter/src/attribute/int.cpp +++ b/xml_converter/src/attribute/int.cpp @@ -27,3 +27,7 @@ int parse_int(rapidxml::xml_attribute<>* input, vector *errors) { int init_int_attribute() { return 0; } + +string stringify_int (int attribute_value){ + return to_string(attribute_value); +} \ No newline at end of file diff --git a/xml_converter/src/attribute/int.hpp b/xml_converter/src/attribute/int.hpp index cfa4857c..e93baed3 100644 --- a/xml_converter/src/attribute/int.hpp +++ b/xml_converter/src/attribute/int.hpp @@ -11,3 +11,5 @@ using namespace std; int parse_int(rapidxml::xml_attribute<>* input, vector *errors); int init_int_attribute(); + +string stringify_int (int attribute_value); \ No newline at end of file diff --git a/xml_converter/src/attribute/map_type_filter_gen.cpp b/xml_converter/src/attribute/map_type_filter_gen.cpp index 85a1cbae..f4aececc 100644 --- a/xml_converter/src/attribute/map_type_filter_gen.cpp +++ b/xml_converter/src/attribute/map_type_filter_gen.cpp @@ -9,111 +9,187 @@ MapTypeFilter parse_map_type_filter(rapidxml::xml_attribute<>* input, vector *errors){ MapTypeFilter map_type_filter; vector flag_values; - flag_values = split(get_attribute_value(input), ","); - map_type_filter.unknown_map = false; - map_type_filter.redirect_map = false; - map_type_filter.character_create_map = false; - map_type_filter.pvp_map = false; - map_type_filter.gvg_map = false; - map_type_filter.instance_map = false; - map_type_filter.public_map = false; - map_type_filter.tournament_map = false; - map_type_filter.tutorial_map = false; - map_type_filter.user_tournament_map = false; - map_type_filter.center_map = false; - map_type_filter.eternal_battlegrounds_map = false; - map_type_filter.bluehome_map = false; - map_type_filter.blue_borderlands_map = false; - map_type_filter.green_home_map = false; - map_type_filter.green_borderlands_map = false; - map_type_filter.red_home_map = false; - map_type_filter.red_borderlands_map = false; - map_type_filter.fortunes_vale_map = false; - map_type_filter.jump_puzzle_map = false; - map_type_filter.obsidian_sanctum_map = false; - map_type_filter.edge_of_the_mists_map = false; - map_type_filter.public_mini_map = false; - map_type_filter.wvw_lounge_map = false; + flag_values = split(get_attribute_value(input), ","); + map_type_filter.unknown_map = false; + map_type_filter.redirect_map = false; + map_type_filter.character_create_map = false; + map_type_filter.pvp_map = false; + map_type_filter.gvg_map = false; + map_type_filter.instance_map = false; + map_type_filter.public_map = false; + map_type_filter.tournament_map = false; + map_type_filter.tutorial_map = false; + map_type_filter.user_tournament_map = false; + map_type_filter.center_map = false; + map_type_filter.eternal_battlegrounds_map = false; + map_type_filter.bluehome_map = false; + map_type_filter.blue_borderlands_map = false; + map_type_filter.green_home_map = false; + map_type_filter.green_borderlands_map = false; + map_type_filter.red_home_map = false; + map_type_filter.red_borderlands_map = false; + map_type_filter.fortunes_vale_map = false; + map_type_filter.jump_puzzle_map = false; + map_type_filter.obsidian_sanctum_map = false; + map_type_filter.edge_of_the_mists_map = false; + map_type_filter.public_mini_map = false; + map_type_filter.wvw_lounge_map = false; for (string flag_value : flag_values) { - string normalized_flag_value = normalize(flag_value); - if (normalized_flag_value == "unknown") { - map_type_filter.unknown_map = true; - } - else if (normalized_flag_value == "redirect") { - map_type_filter.redirect_map = true; - } - else if (normalized_flag_value == "charactercreate") { - map_type_filter.character_create_map = true; - } - else if (normalized_flag_value == "pvp") { - map_type_filter.pvp_map = true; - } - else if (normalized_flag_value == "gvg") { - map_type_filter.gvg_map = true; - } - else if (normalized_flag_value == "instance") { - map_type_filter.instance_map = true; - } - else if (normalized_flag_value == "public") { - map_type_filter.public_map = true; - } - else if (normalized_flag_value == "tournament") { - map_type_filter.tournament_map = true; - } - else if (normalized_flag_value == "tutorial") { - map_type_filter.tutorial_map = true; - } - else if (normalized_flag_value == "usertournament") { - map_type_filter.user_tournament_map = true; - } - else if (normalized_flag_value == "center") { - map_type_filter.center_map = true; - } - else if (normalized_flag_value == "eternalbattlegrounds") { - map_type_filter.eternal_battlegrounds_map = true; - } - else if (normalized_flag_value == "bluehome") { - map_type_filter.bluehome_map = true; - } - else if (normalized_flag_value == "blueborderlands") { - map_type_filter.blue_borderlands_map = true; - } - else if (normalized_flag_value == "greenhome") { - map_type_filter.green_home_map = true; - } - else if (normalized_flag_value == "greenborderlands") { - map_type_filter.green_borderlands_map = true; - } - else if (normalized_flag_value == "redhome") { - map_type_filter.red_home_map = true; - } - else if (normalized_flag_value == "redborderlands") { - map_type_filter.red_borderlands_map = true; - } - else if (normalized_flag_value == "fortunesvale") { - map_type_filter.fortunes_vale_map = true; - } - else if (normalized_flag_value == "jumppuzzle") { - map_type_filter.jump_puzzle_map = true; - } - else if (normalized_flag_value == "obsidiansanctum") { - map_type_filter.obsidian_sanctum_map = true; - } - else if (normalized_flag_value == "edgeofthemists") { - map_type_filter.edge_of_the_mists_map = true; - } - else if (normalized_flag_value == "publicmini") { - map_type_filter.public_mini_map = true; - } - else if (normalized_flag_value == "wvwlounge") { - map_type_filter.wvw_lounge_map = true; - } - else { - errors->push_back(new XMLAttributeValueError("Invalid Filter for MapTypeFilter. Found " + flag_value, input)); - continue; + string normalized_flag_value = normalize(flag_value); + if (normalized_flag_value == "unknown") { + map_type_filter.unknown_map = true; + } + else if (normalized_flag_value == "redirect") { + map_type_filter.redirect_map = true; + } + else if (normalized_flag_value == "charactercreate") { + map_type_filter.character_create_map = true; + } + else if (normalized_flag_value == "pvp") { + map_type_filter.pvp_map = true; + } + else if (normalized_flag_value == "gvg") { + map_type_filter.gvg_map = true; + } + else if (normalized_flag_value == "instance") { + map_type_filter.instance_map = true; + } + else if (normalized_flag_value == "public") { + map_type_filter.public_map = true; + } + else if (normalized_flag_value == "tournament") { + map_type_filter.tournament_map = true; + } + else if (normalized_flag_value == "tutorial") { + map_type_filter.tutorial_map = true; + } + else if (normalized_flag_value == "usertournament") { + map_type_filter.user_tournament_map = true; + } + else if (normalized_flag_value == "center") { + map_type_filter.center_map = true; + } + else if (normalized_flag_value == "eternalbattlegrounds") { + map_type_filter.eternal_battlegrounds_map = true; + } + else if (normalized_flag_value == "bluehome") { + map_type_filter.bluehome_map = true; + } + else if (normalized_flag_value == "blueborderlands") { + map_type_filter.blue_borderlands_map = true; + } + else if (normalized_flag_value == "greenhome") { + map_type_filter.green_home_map = true; + } + else if (normalized_flag_value == "greenborderlands") { + map_type_filter.green_borderlands_map = true; + } + else if (normalized_flag_value == "redhome") { + map_type_filter.red_home_map = true; + } + else if (normalized_flag_value == "redborderlands") { + map_type_filter.red_borderlands_map = true; + } + else if (normalized_flag_value == "fortunesvale") { + map_type_filter.fortunes_vale_map = true; + } + else if (normalized_flag_value == "jumppuzzle") { + map_type_filter.jump_puzzle_map = true; + } + else if (normalized_flag_value == "obsidiansanctum") { + map_type_filter.obsidian_sanctum_map = true; + } + else if (normalized_flag_value == "edgeofthemists") { + map_type_filter.edge_of_the_mists_map = true; + } + else if (normalized_flag_value == "publicmini") { + map_type_filter.public_mini_map = true; + } + else if (normalized_flag_value == "wvwlounge") { + map_type_filter.wvw_lounge_map = true; + } + else { + errors->push_back(new XMLAttributeValueError("Invalid Filter for MapTypeFilter. Found " + flag_value, input)); + continue; } } return map_type_filter; - +} + +string stringify_map_type_filter(MapTypeFilter attribute_value){ + string output = ""; + if (attribute_value.unknown_map == true){ + output = output + "unknown"; + } + if (attribute_value.redirect_map == true){ + output = output + "redirect"; + } + if (attribute_value.character_create_map == true){ + output = output + "charactercreate"; + } + if (attribute_value.pvp_map == true){ + output = output + "pvp"; + } + if (attribute_value.gvg_map == true){ + output = output + "gvg"; + } + if (attribute_value.instance_map == true){ + output = output + "instance"; + } + if (attribute_value.public_map == true){ + output = output + "public"; + } + if (attribute_value.tournament_map == true){ + output = output + "tournament"; + } + if (attribute_value.tutorial_map == true){ + output = output + "tutorial"; + } + if (attribute_value.user_tournament_map == true){ + output = output + "usertournament"; + } + if (attribute_value.center_map == true){ + output = output + "center"; + } + if (attribute_value.eternal_battlegrounds_map == true){ + output = output + "eternalbattlegrounds"; + } + if (attribute_value.bluehome_map == true){ + output = output + "bluehome"; + } + if (attribute_value.blue_borderlands_map == true){ + output = output + "blueborderlands"; + } + if (attribute_value.green_home_map == true){ + output = output + "greenhome"; + } + if (attribute_value.green_borderlands_map == true){ + output = output + "greenborderlands"; + } + if (attribute_value.red_home_map == true){ + output = output + "redhome"; + } + if (attribute_value.red_borderlands_map == true){ + output = output + "redborderlands"; + } + if (attribute_value.fortunes_vale_map == true){ + output = output + "fortunesvale"; + } + if (attribute_value.jump_puzzle_map == true){ + output = output + "jumppuzzle"; + } + if (attribute_value.obsidian_sanctum_map == true){ + output = output + "obsidiansanctum"; + } + if (attribute_value.edge_of_the_mists_map == true){ + output = output + "edgeofthemists"; + } + if (attribute_value.public_mini_map == true){ + output = output + "publicmini"; + } + if (attribute_value.wvw_lounge_map == true){ + output = output + "wvwlounge"; + } + return output; } \ No newline at end of file diff --git a/xml_converter/src/attribute/map_type_filter_gen.hpp b/xml_converter/src/attribute/map_type_filter_gen.hpp index 994c60ad..9562dd87 100644 --- a/xml_converter/src/attribute/map_type_filter_gen.hpp +++ b/xml_converter/src/attribute/map_type_filter_gen.hpp @@ -38,4 +38,4 @@ class MapTypeFilter { virtual string classname() { return "MapTypeFilter"; }; }; MapTypeFilter parse_map_type_filter(rapidxml::xml_attribute<>* input, vector *errors); - \ No newline at end of file +string stringify_map_type_filter(MapTypeFilter attribute_value); \ No newline at end of file diff --git a/xml_converter/src/attribute/marker_category.cpp b/xml_converter/src/attribute/marker_category.cpp index 8e0294f3..545d2bc1 100644 --- a/xml_converter/src/attribute/marker_category.cpp +++ b/xml_converter/src/attribute/marker_category.cpp @@ -10,4 +10,8 @@ MarkerCategory parse_marker_category(rapidxml::xml_attribute<>* input, vector* input, vector *errors); + +string stringify_marker_category (MarkerCategory attribute_value); \ No newline at end of file diff --git a/xml_converter/src/attribute/mount_filter_gen.cpp b/xml_converter/src/attribute/mount_filter_gen.cpp index db6c7090..be82db68 100644 --- a/xml_converter/src/attribute/mount_filter_gen.cpp +++ b/xml_converter/src/attribute/mount_filter_gen.cpp @@ -9,55 +9,89 @@ MountFilter parse_mount_filter(rapidxml::xml_attribute<>* input, vector *errors){ MountFilter mount_filter; vector flag_values; - flag_values = split(get_attribute_value(input), ","); - mount_filter.raptor = false; - mount_filter.springer = false; - mount_filter.skimmer = false; - mount_filter.jackal = false; - mount_filter.griffon = false; - mount_filter.roller_beetle = false; - mount_filter.warclaw = false; - mount_filter.skyscale = false; - mount_filter.skiff = false; - mount_filter.seige_turtle = false; + flag_values = split(get_attribute_value(input), ","); + mount_filter.raptor = false; + mount_filter.springer = false; + mount_filter.skimmer = false; + mount_filter.jackal = false; + mount_filter.griffon = false; + mount_filter.roller_beetle = false; + mount_filter.warclaw = false; + mount_filter.skyscale = false; + mount_filter.skiff = false; + mount_filter.seige_turtle = false; for (string flag_value : flag_values) { - string normalized_flag_value = normalize(flag_value); - if (normalized_flag_value == "raptor") { - mount_filter.raptor = true; - } - else if (normalized_flag_value == "springer") { - mount_filter.springer = true; - } - else if (normalized_flag_value == "skimmer") { - mount_filter.skimmer = true; - } - else if (normalized_flag_value == "jackal") { - mount_filter.jackal = true; - } - else if (normalized_flag_value == "griffon") { - mount_filter.griffon = true; - } - else if (normalized_flag_value == "rollerbeetle") { - mount_filter.roller_beetle = true; - } - else if (normalized_flag_value == "warclaw") { - mount_filter.warclaw = true; - } - else if (normalized_flag_value == "skyscale") { - mount_filter.skyscale = true; - } - else if (normalized_flag_value == "skiff") { - mount_filter.skiff = true; - } - else if (normalized_flag_value == "seigeturtle") { - mount_filter.seige_turtle = true; - } - else { - errors->push_back(new XMLAttributeValueError("Invalid Filter for MountFilter. Found " + flag_value, input)); - continue; + string normalized_flag_value = normalize(flag_value); + if (normalized_flag_value == "raptor") { + mount_filter.raptor = true; + } + else if (normalized_flag_value == "springer") { + mount_filter.springer = true; + } + else if (normalized_flag_value == "skimmer") { + mount_filter.skimmer = true; + } + else if (normalized_flag_value == "jackal") { + mount_filter.jackal = true; + } + else if (normalized_flag_value == "griffon") { + mount_filter.griffon = true; + } + else if (normalized_flag_value == "rollerbeetle") { + mount_filter.roller_beetle = true; + } + else if (normalized_flag_value == "warclaw") { + mount_filter.warclaw = true; + } + else if (normalized_flag_value == "skyscale") { + mount_filter.skyscale = true; + } + else if (normalized_flag_value == "skiff") { + mount_filter.skiff = true; + } + else if (normalized_flag_value == "seigeturtle") { + mount_filter.seige_turtle = true; + } + else { + errors->push_back(new XMLAttributeValueError("Invalid Filter for MountFilter. Found " + flag_value, input)); + continue; } } return mount_filter; - +} + +string stringify_mount_filter(MountFilter attribute_value){ + string output = ""; + if (attribute_value.raptor == true){ + output = output + "raptor"; + } + if (attribute_value.springer == true){ + output = output + "springer"; + } + if (attribute_value.skimmer == true){ + output = output + "skimmer"; + } + if (attribute_value.jackal == true){ + output = output + "jackal"; + } + if (attribute_value.griffon == true){ + output = output + "griffon"; + } + if (attribute_value.roller_beetle == true){ + output = output + "rollerbeetle"; + } + if (attribute_value.warclaw == true){ + output = output + "warclaw"; + } + if (attribute_value.skyscale == true){ + output = output + "skyscale"; + } + if (attribute_value.skiff == true){ + output = output + "skiff"; + } + if (attribute_value.seige_turtle == true){ + output = output + "seigeturtle"; + } + return output; } \ No newline at end of file diff --git a/xml_converter/src/attribute/mount_filter_gen.hpp b/xml_converter/src/attribute/mount_filter_gen.hpp index e0aecb29..7b62fa37 100644 --- a/xml_converter/src/attribute/mount_filter_gen.hpp +++ b/xml_converter/src/attribute/mount_filter_gen.hpp @@ -24,4 +24,4 @@ class MountFilter { virtual string classname() { return "MountFilter"; }; }; MountFilter parse_mount_filter(rapidxml::xml_attribute<>* input, vector *errors); - \ No newline at end of file +string stringify_mount_filter(MountFilter attribute_value); \ No newline at end of file diff --git a/xml_converter/src/attribute/position_gen.cpp b/xml_converter/src/attribute/position_gen.cpp index fe391c5d..fea38867 100644 --- a/xml_converter/src/attribute/position_gen.cpp +++ b/xml_converter/src/attribute/position_gen.cpp @@ -16,33 +16,10 @@ Position parse_position(rapidxml::xml_attribute<>* input, vector *){ position.z_position = 0; attributename = get_attribute_name(input); compound_values = split(get_attribute_value(input), ","); - - if (typeid(compound_values) == typeid(std::string)) { - if (attributename == "xpos") { - position.x_position = std::stof(get_attribute_value(input)); - } - else if (attributename == "positionx") { - position.x_position = std::stof(get_attribute_value(input)); - } - else if (attributename == "ypos") { - position.y_position = std::stof(get_attribute_value(input)); - } - else if (attributename == "positiony") { - position.y_position = std::stof(get_attribute_value(input)); - } - else if (attributename == "zpos") { - position.z_position = std::stof(get_attribute_value(input)); - } - else if (attributename == "positionz") { - position.z_position = std::stof(get_attribute_value(input)); - } - else { + if (compound_values.size() == 3){ position.x_position = std::stof(compound_values[0]); position.y_position = std::stof(compound_values[1]); position.z_position = std::stof(compound_values[2]); - } } - return position; - } \ No newline at end of file diff --git a/xml_converter/src/attribute/position_gen.hpp b/xml_converter/src/attribute/position_gen.hpp index 307d193d..c97c2af1 100644 --- a/xml_converter/src/attribute/position_gen.hpp +++ b/xml_converter/src/attribute/position_gen.hpp @@ -17,4 +17,4 @@ class Position { virtual string classname() { return "Position"; }; }; Position parse_position(rapidxml::xml_attribute<>* input, vector *errors); - \ No newline at end of file +string stringify_position(Position attribute_value); \ No newline at end of file diff --git a/xml_converter/src/attribute/profession_filter_gen.cpp b/xml_converter/src/attribute/profession_filter_gen.cpp index 68d96cd8..18a1143e 100644 --- a/xml_converter/src/attribute/profession_filter_gen.cpp +++ b/xml_converter/src/attribute/profession_filter_gen.cpp @@ -9,51 +9,82 @@ ProfessionFilter parse_profession_filter(rapidxml::xml_attribute<>* input, vector *errors){ ProfessionFilter profession_filter; vector flag_values; - flag_values = split(get_attribute_value(input), ","); - profession_filter.guardian = false; - profession_filter.warrior = false; - profession_filter.engineer = false; - profession_filter.ranger = false; - profession_filter.thief = false; - profession_filter.elementalist = false; - profession_filter.mesmer = false; - profession_filter.necromancer = false; - profession_filter.revenant = false; + flag_values = split(get_attribute_value(input), ","); + profession_filter.guardian = false; + profession_filter.warrior = false; + profession_filter.engineer = false; + profession_filter.ranger = false; + profession_filter.thief = false; + profession_filter.elementalist = false; + profession_filter.mesmer = false; + profession_filter.necromancer = false; + profession_filter.revenant = false; for (string flag_value : flag_values) { - string normalized_flag_value = normalize(flag_value); - if (normalized_flag_value == "guardian") { - profession_filter.guardian = true; - } - else if (normalized_flag_value == "warrior") { - profession_filter.warrior = true; - } - else if (normalized_flag_value == "engineer") { - profession_filter.engineer = true; - } - else if (normalized_flag_value == "ranger") { - profession_filter.ranger = true; - } - else if (normalized_flag_value == "thief") { - profession_filter.thief = true; - } - else if (normalized_flag_value == "elementalist") { - profession_filter.elementalist = true; - } - else if (normalized_flag_value == "mesmer") { - profession_filter.mesmer = true; - } - else if (normalized_flag_value == "necromancer") { - profession_filter.necromancer = true; - } - else if (normalized_flag_value == "revenant") { - profession_filter.revenant = true; - } - else { - errors->push_back(new XMLAttributeValueError("Invalid Filter for ProfessionFilter. Found " + flag_value, input)); - continue; + string normalized_flag_value = normalize(flag_value); + if (normalized_flag_value == "guardian") { + profession_filter.guardian = true; + } + else if (normalized_flag_value == "warrior") { + profession_filter.warrior = true; + } + else if (normalized_flag_value == "engineer") { + profession_filter.engineer = true; + } + else if (normalized_flag_value == "ranger") { + profession_filter.ranger = true; + } + else if (normalized_flag_value == "thief") { + profession_filter.thief = true; + } + else if (normalized_flag_value == "elementalist") { + profession_filter.elementalist = true; + } + else if (normalized_flag_value == "mesmer") { + profession_filter.mesmer = true; + } + else if (normalized_flag_value == "necromancer") { + profession_filter.necromancer = true; + } + else if (normalized_flag_value == "revenant") { + profession_filter.revenant = true; + } + else { + errors->push_back(new XMLAttributeValueError("Invalid Filter for ProfessionFilter. Found " + flag_value, input)); + continue; } } return profession_filter; - +} + +string stringify_profession_filter(ProfessionFilter attribute_value){ + string output = ""; + if (attribute_value.guardian == true){ + output = output + "guardian"; + } + if (attribute_value.warrior == true){ + output = output + "warrior"; + } + if (attribute_value.engineer == true){ + output = output + "engineer"; + } + if (attribute_value.ranger == true){ + output = output + "ranger"; + } + if (attribute_value.thief == true){ + output = output + "thief"; + } + if (attribute_value.elementalist == true){ + output = output + "elementalist"; + } + if (attribute_value.mesmer == true){ + output = output + "mesmer"; + } + if (attribute_value.necromancer == true){ + output = output + "necromancer"; + } + if (attribute_value.revenant == true){ + output = output + "revenant"; + } + return output; } \ No newline at end of file diff --git a/xml_converter/src/attribute/profession_filter_gen.hpp b/xml_converter/src/attribute/profession_filter_gen.hpp index 6b8f1b20..ae467a00 100644 --- a/xml_converter/src/attribute/profession_filter_gen.hpp +++ b/xml_converter/src/attribute/profession_filter_gen.hpp @@ -23,4 +23,4 @@ class ProfessionFilter { virtual string classname() { return "ProfessionFilter"; }; }; ProfessionFilter parse_profession_filter(rapidxml::xml_attribute<>* input, vector *errors); - \ No newline at end of file +string stringify_profession_filter(ProfessionFilter attribute_value); \ No newline at end of file diff --git a/xml_converter/src/attribute/reset_behavior_gen.cpp b/xml_converter/src/attribute/reset_behavior_gen.cpp index 97519fdc..ed9a31dc 100644 --- a/xml_converter/src/attribute/reset_behavior_gen.cpp +++ b/xml_converter/src/attribute/reset_behavior_gen.cpp @@ -7,65 +7,125 @@ #include "../rapidxml-1.13/rapidxml.hpp" ResetBehavior parse_reset_behavior(rapidxml::xml_attribute<>* input, vector *errors){ - ResetBehavior reset_behavior; - string normalized_value = normalize(get_attribute_value(input)); - if (normalized_value == "0") { - reset_behavior = ResetBehavior::always_visible; - } - else if (normalized_value == "always_visible") { - reset_behavior = ResetBehavior::always_visible; - } - else if (normalized_value == "1") { - reset_behavior = ResetBehavior::map_change; - } - else if (normalized_value == "map_change") { - reset_behavior = ResetBehavior::map_change; - } - else if (normalized_value == "2") { - reset_behavior = ResetBehavior::daily_reset; - } - else if (normalized_value == "daily_reset") { - reset_behavior = ResetBehavior::daily_reset; - } - else if (normalized_value == "3") { - reset_behavior = ResetBehavior::never; - } - else if (normalized_value == "never") { - reset_behavior = ResetBehavior::never; - } - else if (normalized_value == "4") { - reset_behavior = ResetBehavior::timer; - } - else if (normalized_value == "timer") { - reset_behavior = ResetBehavior::timer; - } - else if (normalized_value == "5") { - reset_behavior = ResetBehavior::map_reset; - } - else if (normalized_value == "map_reset") { - reset_behavior = ResetBehavior::map_reset; - } - else if (normalized_value == "6") { - reset_behavior = ResetBehavior::instance_change; - } - else if (normalized_value == "instance_change") { - reset_behavior = ResetBehavior::instance_change; - } - else if (normalized_value == "7") { - reset_behavior = ResetBehavior::daily_reset_per_character; - } - else if (normalized_value == "daily_reset_per_character") { - reset_behavior = ResetBehavior::daily_reset_per_character; - } - else if (normalized_value == "101") { - reset_behavior = ResetBehavior::weekly_reset; - } - else if (normalized_value == "weekly_reset") { - reset_behavior = ResetBehavior::weekly_reset; - } - else { - errors->push_back(new XMLAttributeValueError("Found an invalid value that was not in the Enum ResetBehavior", input)); + ResetBehavior reset_behavior; + string normalized_value = normalize(get_attribute_value(input)); + if (normalized_value == "0") { reset_behavior = ResetBehavior::always_visible; } - return reset_behavior; + else if (normalized_value == "always_visible") { + reset_behavior = ResetBehavior::always_visible; + } + else if (normalized_value == "1") { + reset_behavior = ResetBehavior::map_change; + } + else if (normalized_value == "map_change") { + reset_behavior = ResetBehavior::map_change; + } + else if (normalized_value == "2") { + reset_behavior = ResetBehavior::daily_reset; + } + else if (normalized_value == "daily_reset") { + reset_behavior = ResetBehavior::daily_reset; + } + else if (normalized_value == "3") { + reset_behavior = ResetBehavior::never; + } + else if (normalized_value == "never") { + reset_behavior = ResetBehavior::never; + } + else if (normalized_value == "4") { + reset_behavior = ResetBehavior::timer; + } + else if (normalized_value == "timer") { + reset_behavior = ResetBehavior::timer; + } + else if (normalized_value == "5") { + reset_behavior = ResetBehavior::map_reset; + } + else if (normalized_value == "map_reset") { + reset_behavior = ResetBehavior::map_reset; + } + else if (normalized_value == "6") { + reset_behavior = ResetBehavior::instance_change; + } + else if (normalized_value == "instance_change") { + reset_behavior = ResetBehavior::instance_change; + } + else if (normalized_value == "7") { + reset_behavior = ResetBehavior::daily_reset_per_character; + } + else if (normalized_value == "daily_reset_per_character") { + reset_behavior = ResetBehavior::daily_reset_per_character; + } + else if (normalized_value == "101") { + reset_behavior = ResetBehavior::weekly_reset; + } + else if (normalized_value == "weekly_reset") { + reset_behavior = ResetBehavior::weekly_reset; + } + else { + errors->push_back(new XMLAttributeValueError("Found an invalid value that was not in the Enum ResetBehavior", input)); + reset_behavior = ResetBehavior::always_visible; + } + return reset_behavior; +} + +string stringify_reset_behavior(ResetBehavior attribute_value){ + if (attribute_value == ResetBehavior::always_visible) { + return "0"; + } + else if (attribute_value == ResetBehavior::always_visible) { + return "always_visible"; + } + else if (attribute_value == ResetBehavior::map_change) { + return "1"; + } + else if (attribute_value == ResetBehavior::map_change) { + return "map_change"; + } + else if (attribute_value == ResetBehavior::daily_reset) { + return "2"; + } + else if (attribute_value == ResetBehavior::daily_reset) { + return "daily_reset"; + } + else if (attribute_value == ResetBehavior::never) { + return "3"; + } + else if (attribute_value == ResetBehavior::never) { + return "never"; + } + else if (attribute_value == ResetBehavior::timer) { + return "4"; + } + else if (attribute_value == ResetBehavior::timer) { + return "timer"; + } + else if (attribute_value == ResetBehavior::map_reset) { + return "5"; + } + else if (attribute_value == ResetBehavior::map_reset) { + return "map_reset"; + } + else if (attribute_value == ResetBehavior::instance_change) { + return "6"; + } + else if (attribute_value == ResetBehavior::instance_change) { + return "instance_change"; + } + else if (attribute_value == ResetBehavior::daily_reset_per_character) { + return "7"; + } + else if (attribute_value == ResetBehavior::daily_reset_per_character) { + return "daily_reset_per_character"; + } + else if (attribute_value == ResetBehavior::weekly_reset) { + return "101"; + } + else if (attribute_value == ResetBehavior::weekly_reset) { + return "weekly_reset"; + } + else { + return "ResetBehavior::0"; + } } \ No newline at end of file diff --git a/xml_converter/src/attribute/reset_behavior_gen.hpp b/xml_converter/src/attribute/reset_behavior_gen.hpp index e9741e85..3cbe0f60 100644 --- a/xml_converter/src/attribute/reset_behavior_gen.hpp +++ b/xml_converter/src/attribute/reset_behavior_gen.hpp @@ -20,4 +20,4 @@ enum ResetBehavior { weekly_reset, }; ResetBehavior parse_reset_behavior(rapidxml::xml_attribute<>* input, vector *errors); - \ No newline at end of file +string stringify_reset_behavior(ResetBehavior attribute_value); \ No newline at end of file diff --git a/xml_converter/src/attribute/specialization_filter_gen.cpp b/xml_converter/src/attribute/specialization_filter_gen.cpp index f1bba8da..59e9efa8 100644 --- a/xml_converter/src/attribute/specialization_filter_gen.cpp +++ b/xml_converter/src/attribute/specialization_filter_gen.cpp @@ -9,357 +9,577 @@ SpecializationFilter parse_specialization_filter(rapidxml::xml_attribute<>* input, vector *errors){ SpecializationFilter specialization_filter; vector flag_values; - flag_values = split(get_attribute_value(input), ","); - specialization_filter.elementalist_tempest = false; - specialization_filter.engineer_scrapper = false; - specialization_filter.guardian_dragonhunter = false; - specialization_filter.mesmer_chronomancer = false; - specialization_filter.necromancer_reaper = false; - specialization_filter.ranger_druid = false; - specialization_filter.revenant_herald = false; - specialization_filter.thief_daredevil = false; - specialization_filter.warrior_berserker = false; - specialization_filter.elementalist_weaver = false; - specialization_filter.engineer_holosmith = false; - specialization_filter.guardian_firebrand = false; - specialization_filter.mesmer_mirage = false; - specialization_filter.necromancer_scourge = false; - specialization_filter.ranger_soulbeast = false; - specialization_filter.revenant_renegade = false; - specialization_filter.thief_deadeye = false; - specialization_filter.warrior_spellbreaker = false; - specialization_filter.elementalist_catalyst = false; - specialization_filter.engineer_mechanist = false; - specialization_filter.guardian_willbender = false; - specialization_filter.mesmer_virtuoso = false; - specialization_filter.necromancer_harbinger = false; - specialization_filter.ranger_untamed = false; - specialization_filter.revenant_vindicator = false; - specialization_filter.thief_specter = false; - specialization_filter.warrior_bladesworn = false; - specialization_filter.elementalist_air = false; - specialization_filter.elementalist_arcane = false; - specialization_filter.elementalist_earth = false; - specialization_filter.elementalist_fire = false; - specialization_filter.elementalist_water = false; - specialization_filter.engineer_alchemy = false; - specialization_filter.engineer_explosives = false; - specialization_filter.engineer_firearms = false; - specialization_filter.engineer_inventions = false; - specialization_filter.engineer_tools = false; - specialization_filter.guardian_honor = false; - specialization_filter.guardian_radiance = false; - specialization_filter.guardian_valor = false; - specialization_filter.guardian_virtues = false; - specialization_filter.guardian_zeal = false; - specialization_filter.mesmer_chaos = false; - specialization_filter.mesmer_domination = false; - specialization_filter.mesmer_dueling = false; - specialization_filter.mesmer_illusions = false; - specialization_filter.mesmer_inspiration = false; - specialization_filter.necromancer_blood_magic = false; - specialization_filter.necromancer_curses = false; - specialization_filter.necromancer_death_magic = false; - specialization_filter.necromancer_soul_reaping = false; - specialization_filter.necromancer_spite = false; - specialization_filter.ranger_beastmastery = false; - specialization_filter.ranger_marksmanship = false; - specialization_filter.ranger_nature_magic = false; - specialization_filter.ranger_skirmishing = false; - specialization_filter.ranger_wilderness_survival = false; - specialization_filter.revenant_corruption = false; - specialization_filter.revenant_devastation = false; - specialization_filter.revenant_invocation = false; - specialization_filter.revenant_retribution = false; - specialization_filter.revenant_salvation = false; - specialization_filter.thief_acrobatics = false; - specialization_filter.thief_critical_strikes = false; - specialization_filter.thief_deadly_arts = false; - specialization_filter.thief_shadow_arts = false; - specialization_filter.thief_trickery = false; - specialization_filter.warrior_arms = false; - specialization_filter.warrior_defense = false; - specialization_filter.warrior_discipline = false; - specialization_filter.warrior_strength = false; - specialization_filter.warrior_tactics = false; + flag_values = split(get_attribute_value(input), ","); + specialization_filter.elementalist_tempest = false; + specialization_filter.engineer_scrapper = false; + specialization_filter.guardian_dragonhunter = false; + specialization_filter.mesmer_chronomancer = false; + specialization_filter.necromancer_reaper = false; + specialization_filter.ranger_druid = false; + specialization_filter.revenant_herald = false; + specialization_filter.thief_daredevil = false; + specialization_filter.warrior_berserker = false; + specialization_filter.elementalist_weaver = false; + specialization_filter.engineer_holosmith = false; + specialization_filter.guardian_firebrand = false; + specialization_filter.mesmer_mirage = false; + specialization_filter.necromancer_scourge = false; + specialization_filter.ranger_soulbeast = false; + specialization_filter.revenant_renegade = false; + specialization_filter.thief_deadeye = false; + specialization_filter.warrior_spellbreaker = false; + specialization_filter.elementalist_catalyst = false; + specialization_filter.engineer_mechanist = false; + specialization_filter.guardian_willbender = false; + specialization_filter.mesmer_virtuoso = false; + specialization_filter.necromancer_harbinger = false; + specialization_filter.ranger_untamed = false; + specialization_filter.revenant_vindicator = false; + specialization_filter.thief_specter = false; + specialization_filter.warrior_bladesworn = false; + specialization_filter.elementalist_air = false; + specialization_filter.elementalist_arcane = false; + specialization_filter.elementalist_earth = false; + specialization_filter.elementalist_fire = false; + specialization_filter.elementalist_water = false; + specialization_filter.engineer_alchemy = false; + specialization_filter.engineer_explosives = false; + specialization_filter.engineer_firearms = false; + specialization_filter.engineer_inventions = false; + specialization_filter.engineer_tools = false; + specialization_filter.guardian_honor = false; + specialization_filter.guardian_radiance = false; + specialization_filter.guardian_valor = false; + specialization_filter.guardian_virtues = false; + specialization_filter.guardian_zeal = false; + specialization_filter.mesmer_chaos = false; + specialization_filter.mesmer_domination = false; + specialization_filter.mesmer_dueling = false; + specialization_filter.mesmer_illusions = false; + specialization_filter.mesmer_inspiration = false; + specialization_filter.necromancer_blood_magic = false; + specialization_filter.necromancer_curses = false; + specialization_filter.necromancer_death_magic = false; + specialization_filter.necromancer_soul_reaping = false; + specialization_filter.necromancer_spite = false; + specialization_filter.ranger_beastmastery = false; + specialization_filter.ranger_marksmanship = false; + specialization_filter.ranger_nature_magic = false; + specialization_filter.ranger_skirmishing = false; + specialization_filter.ranger_wilderness_survival = false; + specialization_filter.revenant_corruption = false; + specialization_filter.revenant_devastation = false; + specialization_filter.revenant_invocation = false; + specialization_filter.revenant_retribution = false; + specialization_filter.revenant_salvation = false; + specialization_filter.thief_acrobatics = false; + specialization_filter.thief_critical_strikes = false; + specialization_filter.thief_deadly_arts = false; + specialization_filter.thief_shadow_arts = false; + specialization_filter.thief_trickery = false; + specialization_filter.warrior_arms = false; + specialization_filter.warrior_defense = false; + specialization_filter.warrior_discipline = false; + specialization_filter.warrior_strength = false; + specialization_filter.warrior_tactics = false; for (string flag_value : flag_values) { - string normalized_flag_value = normalize(flag_value); - if (normalized_flag_value == "48") { - specialization_filter.elementalist_tempest = true; - } - else if (normalized_flag_value == "tempest") { - specialization_filter.elementalist_tempest = true; - } - else if (normalized_flag_value == "43") { - specialization_filter.engineer_scrapper = true; - } - else if (normalized_flag_value == "scrapper") { - specialization_filter.engineer_scrapper = true; - } - else if (normalized_flag_value == "27") { - specialization_filter.guardian_dragonhunter = true; - } - else if (normalized_flag_value == "dragonhunter") { - specialization_filter.guardian_dragonhunter = true; - } - else if (normalized_flag_value == "40") { - specialization_filter.mesmer_chronomancer = true; - } - else if (normalized_flag_value == "chronomancer") { - specialization_filter.mesmer_chronomancer = true; - } - else if (normalized_flag_value == "34") { - specialization_filter.necromancer_reaper = true; - } - else if (normalized_flag_value == "reaper") { - specialization_filter.necromancer_reaper = true; - } - else if (normalized_flag_value == "5") { - specialization_filter.ranger_druid = true; - } - else if (normalized_flag_value == "druid") { - specialization_filter.ranger_druid = true; - } - else if (normalized_flag_value == "52") { - specialization_filter.revenant_herald = true; - } - else if (normalized_flag_value == "herald") { - specialization_filter.revenant_herald = true; - } - else if (normalized_flag_value == "7") { - specialization_filter.thief_daredevil = true; - } - else if (normalized_flag_value == "daredevil") { - specialization_filter.thief_daredevil = true; - } - else if (normalized_flag_value == "18") { - specialization_filter.warrior_berserker = true; - } - else if (normalized_flag_value == "berserker") { - specialization_filter.warrior_berserker = true; - } - else if (normalized_flag_value == "56") { - specialization_filter.elementalist_weaver = true; - } - else if (normalized_flag_value == "weaver") { - specialization_filter.elementalist_weaver = true; - } - else if (normalized_flag_value == "57") { - specialization_filter.engineer_holosmith = true; - } - else if (normalized_flag_value == "holosmith") { - specialization_filter.engineer_holosmith = true; - } - else if (normalized_flag_value == "62") { - specialization_filter.guardian_firebrand = true; - } - else if (normalized_flag_value == "firebrand") { - specialization_filter.guardian_firebrand = true; - } - else if (normalized_flag_value == "59") { - specialization_filter.mesmer_mirage = true; - } - else if (normalized_flag_value == "mirage") { - specialization_filter.mesmer_mirage = true; - } - else if (normalized_flag_value == "60") { - specialization_filter.necromancer_scourge = true; - } - else if (normalized_flag_value == "scourge") { - specialization_filter.necromancer_scourge = true; - } - else if (normalized_flag_value == "55") { - specialization_filter.ranger_soulbeast = true; - } - else if (normalized_flag_value == "soulbeast") { - specialization_filter.ranger_soulbeast = true; - } - else if (normalized_flag_value == "63") { - specialization_filter.revenant_renegade = true; - } - else if (normalized_flag_value == "renegade") { - specialization_filter.revenant_renegade = true; - } - else if (normalized_flag_value == "58") { - specialization_filter.thief_deadeye = true; - } - else if (normalized_flag_value == "deadeye") { - specialization_filter.thief_deadeye = true; - } - else if (normalized_flag_value == "61") { - specialization_filter.warrior_spellbreaker = true; - } - else if (normalized_flag_value == "spellbreaker") { - specialization_filter.warrior_spellbreaker = true; - } - else if (normalized_flag_value == "catalyst") { - specialization_filter.elementalist_catalyst = true; - } - else if (normalized_flag_value == "mechanist") { - specialization_filter.engineer_mechanist = true; - } - else if (normalized_flag_value == "willbender") { - specialization_filter.guardian_willbender = true; - } - else if (normalized_flag_value == "virtuoso") { - specialization_filter.mesmer_virtuoso = true; - } - else if (normalized_flag_value == "harbinger") { - specialization_filter.necromancer_harbinger = true; - } - else if (normalized_flag_value == "untamed") { - specialization_filter.ranger_untamed = true; - } - else if (normalized_flag_value == "vindicator") { - specialization_filter.revenant_vindicator = true; - } - else if (normalized_flag_value == "specter") { - specialization_filter.thief_specter = true; - } - else if (normalized_flag_value == "bladesworn") { - specialization_filter.warrior_bladesworn = true; - } - else if (normalized_flag_value == "41") { - specialization_filter.elementalist_air = true; - } - else if (normalized_flag_value == "37") { - specialization_filter.elementalist_arcane = true; - } - else if (normalized_flag_value == "26") { - specialization_filter.elementalist_earth = true; - } - else if (normalized_flag_value == "31") { - specialization_filter.elementalist_fire = true; - } - else if (normalized_flag_value == "17") { - specialization_filter.elementalist_water = true; - } - else if (normalized_flag_value == "29") { - specialization_filter.engineer_alchemy = true; - } - else if (normalized_flag_value == "6") { - specialization_filter.engineer_explosives = true; - } - else if (normalized_flag_value == "38") { - specialization_filter.engineer_firearms = true; - } - else if (normalized_flag_value == "47") { - specialization_filter.engineer_inventions = true; - } - else if (normalized_flag_value == "21") { - specialization_filter.engineer_tools = true; - } - else if (normalized_flag_value == "49") { - specialization_filter.guardian_honor = true; - } - else if (normalized_flag_value == "16") { - specialization_filter.guardian_radiance = true; - } - else if (normalized_flag_value == "13") { - specialization_filter.guardian_valor = true; - } - else if (normalized_flag_value == "46") { - specialization_filter.guardian_virtues = true; - } - else if (normalized_flag_value == "42") { - specialization_filter.guardian_zeal = true; - } - else if (normalized_flag_value == "45") { - specialization_filter.mesmer_chaos = true; - } - else if (normalized_flag_value == "10") { - specialization_filter.mesmer_domination = true; - } - else if (normalized_flag_value == "1") { - specialization_filter.mesmer_dueling = true; - } - else if (normalized_flag_value == "24") { - specialization_filter.mesmer_illusions = true; - } - else if (normalized_flag_value == "23") { - specialization_filter.mesmer_inspiration = true; - } - else if (normalized_flag_value == "19") { - specialization_filter.necromancer_blood_magic = true; - } - else if (normalized_flag_value == "39") { - specialization_filter.necromancer_curses = true; - } - else if (normalized_flag_value == "2") { - specialization_filter.necromancer_death_magic = true; - } - else if (normalized_flag_value == "50") { - specialization_filter.necromancer_soul_reaping = true; - } - else if (normalized_flag_value == "53") { - specialization_filter.necromancer_spite = true; - } - else if (normalized_flag_value == "32") { - specialization_filter.ranger_beastmastery = true; - } - else if (normalized_flag_value == "8") { - specialization_filter.ranger_marksmanship = true; - } - else if (normalized_flag_value == "25") { - specialization_filter.ranger_nature_magic = true; - } - else if (normalized_flag_value == "30") { - specialization_filter.ranger_skirmishing = true; - } - else if (normalized_flag_value == "33") { - specialization_filter.ranger_wilderness_survival = true; - } - else if (normalized_flag_value == "14") { - specialization_filter.revenant_corruption = true; - } - else if (normalized_flag_value == "15") { - specialization_filter.revenant_devastation = true; - } - else if (normalized_flag_value == "3") { - specialization_filter.revenant_invocation = true; - } - else if (normalized_flag_value == "9") { - specialization_filter.revenant_retribution = true; - } - else if (normalized_flag_value == "12") { - specialization_filter.revenant_salvation = true; - } - else if (normalized_flag_value == "54") { - specialization_filter.thief_acrobatics = true; - } - else if (normalized_flag_value == "35") { - specialization_filter.thief_critical_strikes = true; - } - else if (normalized_flag_value == "28") { - specialization_filter.thief_deadly_arts = true; - } - else if (normalized_flag_value == "20") { - specialization_filter.thief_shadow_arts = true; - } - else if (normalized_flag_value == "44") { - specialization_filter.thief_trickery = true; - } - else if (normalized_flag_value == "36") { - specialization_filter.warrior_arms = true; - } - else if (normalized_flag_value == "22") { - specialization_filter.warrior_defense = true; - } - else if (normalized_flag_value == "51") { - specialization_filter.warrior_discipline = true; - } - else if (normalized_flag_value == "4") { - specialization_filter.warrior_strength = true; - } - else if (normalized_flag_value == "11") { - specialization_filter.warrior_tactics = true; - } - else { - errors->push_back(new XMLAttributeValueError("Invalid Filter for SpecializationFilter. Found " + flag_value, input)); - continue; + string normalized_flag_value = normalize(flag_value); + if (normalized_flag_value == "48") { + specialization_filter.elementalist_tempest = true; + } + else if (normalized_flag_value == "tempest") { + specialization_filter.elementalist_tempest = true; + } + else if (normalized_flag_value == "43") { + specialization_filter.engineer_scrapper = true; + } + else if (normalized_flag_value == "scrapper") { + specialization_filter.engineer_scrapper = true; + } + else if (normalized_flag_value == "27") { + specialization_filter.guardian_dragonhunter = true; + } + else if (normalized_flag_value == "dragonhunter") { + specialization_filter.guardian_dragonhunter = true; + } + else if (normalized_flag_value == "40") { + specialization_filter.mesmer_chronomancer = true; + } + else if (normalized_flag_value == "chronomancer") { + specialization_filter.mesmer_chronomancer = true; + } + else if (normalized_flag_value == "34") { + specialization_filter.necromancer_reaper = true; + } + else if (normalized_flag_value == "reaper") { + specialization_filter.necromancer_reaper = true; + } + else if (normalized_flag_value == "5") { + specialization_filter.ranger_druid = true; + } + else if (normalized_flag_value == "druid") { + specialization_filter.ranger_druid = true; + } + else if (normalized_flag_value == "52") { + specialization_filter.revenant_herald = true; + } + else if (normalized_flag_value == "herald") { + specialization_filter.revenant_herald = true; + } + else if (normalized_flag_value == "7") { + specialization_filter.thief_daredevil = true; + } + else if (normalized_flag_value == "daredevil") { + specialization_filter.thief_daredevil = true; + } + else if (normalized_flag_value == "18") { + specialization_filter.warrior_berserker = true; + } + else if (normalized_flag_value == "berserker") { + specialization_filter.warrior_berserker = true; + } + else if (normalized_flag_value == "56") { + specialization_filter.elementalist_weaver = true; + } + else if (normalized_flag_value == "weaver") { + specialization_filter.elementalist_weaver = true; + } + else if (normalized_flag_value == "57") { + specialization_filter.engineer_holosmith = true; + } + else if (normalized_flag_value == "holosmith") { + specialization_filter.engineer_holosmith = true; + } + else if (normalized_flag_value == "62") { + specialization_filter.guardian_firebrand = true; + } + else if (normalized_flag_value == "firebrand") { + specialization_filter.guardian_firebrand = true; + } + else if (normalized_flag_value == "59") { + specialization_filter.mesmer_mirage = true; + } + else if (normalized_flag_value == "mirage") { + specialization_filter.mesmer_mirage = true; + } + else if (normalized_flag_value == "60") { + specialization_filter.necromancer_scourge = true; + } + else if (normalized_flag_value == "scourge") { + specialization_filter.necromancer_scourge = true; + } + else if (normalized_flag_value == "55") { + specialization_filter.ranger_soulbeast = true; + } + else if (normalized_flag_value == "soulbeast") { + specialization_filter.ranger_soulbeast = true; + } + else if (normalized_flag_value == "63") { + specialization_filter.revenant_renegade = true; + } + else if (normalized_flag_value == "renegade") { + specialization_filter.revenant_renegade = true; + } + else if (normalized_flag_value == "58") { + specialization_filter.thief_deadeye = true; + } + else if (normalized_flag_value == "deadeye") { + specialization_filter.thief_deadeye = true; + } + else if (normalized_flag_value == "61") { + specialization_filter.warrior_spellbreaker = true; + } + else if (normalized_flag_value == "spellbreaker") { + specialization_filter.warrior_spellbreaker = true; + } + else if (normalized_flag_value == "catalyst") { + specialization_filter.elementalist_catalyst = true; + } + else if (normalized_flag_value == "mechanist") { + specialization_filter.engineer_mechanist = true; + } + else if (normalized_flag_value == "willbender") { + specialization_filter.guardian_willbender = true; + } + else if (normalized_flag_value == "virtuoso") { + specialization_filter.mesmer_virtuoso = true; + } + else if (normalized_flag_value == "harbinger") { + specialization_filter.necromancer_harbinger = true; + } + else if (normalized_flag_value == "untamed") { + specialization_filter.ranger_untamed = true; + } + else if (normalized_flag_value == "vindicator") { + specialization_filter.revenant_vindicator = true; + } + else if (normalized_flag_value == "specter") { + specialization_filter.thief_specter = true; + } + else if (normalized_flag_value == "bladesworn") { + specialization_filter.warrior_bladesworn = true; + } + else if (normalized_flag_value == "41") { + specialization_filter.elementalist_air = true; + } + else if (normalized_flag_value == "37") { + specialization_filter.elementalist_arcane = true; + } + else if (normalized_flag_value == "26") { + specialization_filter.elementalist_earth = true; + } + else if (normalized_flag_value == "31") { + specialization_filter.elementalist_fire = true; + } + else if (normalized_flag_value == "17") { + specialization_filter.elementalist_water = true; + } + else if (normalized_flag_value == "29") { + specialization_filter.engineer_alchemy = true; + } + else if (normalized_flag_value == "6") { + specialization_filter.engineer_explosives = true; + } + else if (normalized_flag_value == "38") { + specialization_filter.engineer_firearms = true; + } + else if (normalized_flag_value == "47") { + specialization_filter.engineer_inventions = true; + } + else if (normalized_flag_value == "21") { + specialization_filter.engineer_tools = true; + } + else if (normalized_flag_value == "49") { + specialization_filter.guardian_honor = true; + } + else if (normalized_flag_value == "16") { + specialization_filter.guardian_radiance = true; + } + else if (normalized_flag_value == "13") { + specialization_filter.guardian_valor = true; + } + else if (normalized_flag_value == "46") { + specialization_filter.guardian_virtues = true; + } + else if (normalized_flag_value == "42") { + specialization_filter.guardian_zeal = true; + } + else if (normalized_flag_value == "45") { + specialization_filter.mesmer_chaos = true; + } + else if (normalized_flag_value == "10") { + specialization_filter.mesmer_domination = true; + } + else if (normalized_flag_value == "1") { + specialization_filter.mesmer_dueling = true; + } + else if (normalized_flag_value == "24") { + specialization_filter.mesmer_illusions = true; + } + else if (normalized_flag_value == "23") { + specialization_filter.mesmer_inspiration = true; + } + else if (normalized_flag_value == "19") { + specialization_filter.necromancer_blood_magic = true; + } + else if (normalized_flag_value == "39") { + specialization_filter.necromancer_curses = true; + } + else if (normalized_flag_value == "2") { + specialization_filter.necromancer_death_magic = true; + } + else if (normalized_flag_value == "50") { + specialization_filter.necromancer_soul_reaping = true; + } + else if (normalized_flag_value == "53") { + specialization_filter.necromancer_spite = true; + } + else if (normalized_flag_value == "32") { + specialization_filter.ranger_beastmastery = true; + } + else if (normalized_flag_value == "8") { + specialization_filter.ranger_marksmanship = true; + } + else if (normalized_flag_value == "25") { + specialization_filter.ranger_nature_magic = true; + } + else if (normalized_flag_value == "30") { + specialization_filter.ranger_skirmishing = true; + } + else if (normalized_flag_value == "33") { + specialization_filter.ranger_wilderness_survival = true; + } + else if (normalized_flag_value == "14") { + specialization_filter.revenant_corruption = true; + } + else if (normalized_flag_value == "15") { + specialization_filter.revenant_devastation = true; + } + else if (normalized_flag_value == "3") { + specialization_filter.revenant_invocation = true; + } + else if (normalized_flag_value == "9") { + specialization_filter.revenant_retribution = true; + } + else if (normalized_flag_value == "12") { + specialization_filter.revenant_salvation = true; + } + else if (normalized_flag_value == "54") { + specialization_filter.thief_acrobatics = true; + } + else if (normalized_flag_value == "35") { + specialization_filter.thief_critical_strikes = true; + } + else if (normalized_flag_value == "28") { + specialization_filter.thief_deadly_arts = true; + } + else if (normalized_flag_value == "20") { + specialization_filter.thief_shadow_arts = true; + } + else if (normalized_flag_value == "44") { + specialization_filter.thief_trickery = true; + } + else if (normalized_flag_value == "36") { + specialization_filter.warrior_arms = true; + } + else if (normalized_flag_value == "22") { + specialization_filter.warrior_defense = true; + } + else if (normalized_flag_value == "51") { + specialization_filter.warrior_discipline = true; + } + else if (normalized_flag_value == "4") { + specialization_filter.warrior_strength = true; + } + else if (normalized_flag_value == "11") { + specialization_filter.warrior_tactics = true; + } + else { + errors->push_back(new XMLAttributeValueError("Invalid Filter for SpecializationFilter. Found " + flag_value, input)); + continue; } } return specialization_filter; - +} + +string stringify_specialization_filter(SpecializationFilter attribute_value){ + string output = ""; + if (attribute_value.elementalist_tempest == true){ + output = output + "48"; + } + if (attribute_value.engineer_scrapper == true){ + output = output + "43"; + } + if (attribute_value.guardian_dragonhunter == true){ + output = output + "27"; + } + if (attribute_value.mesmer_chronomancer == true){ + output = output + "40"; + } + if (attribute_value.necromancer_reaper == true){ + output = output + "34"; + } + if (attribute_value.ranger_druid == true){ + output = output + "5"; + } + if (attribute_value.revenant_herald == true){ + output = output + "52"; + } + if (attribute_value.thief_daredevil == true){ + output = output + "7"; + } + if (attribute_value.warrior_berserker == true){ + output = output + "18"; + } + if (attribute_value.elementalist_weaver == true){ + output = output + "56"; + } + if (attribute_value.engineer_holosmith == true){ + output = output + "57"; + } + if (attribute_value.guardian_firebrand == true){ + output = output + "62"; + } + if (attribute_value.mesmer_mirage == true){ + output = output + "59"; + } + if (attribute_value.necromancer_scourge == true){ + output = output + "60"; + } + if (attribute_value.ranger_soulbeast == true){ + output = output + "55"; + } + if (attribute_value.revenant_renegade == true){ + output = output + "63"; + } + if (attribute_value.thief_deadeye == true){ + output = output + "58"; + } + if (attribute_value.warrior_spellbreaker == true){ + output = output + "61"; + } + if (attribute_value.elementalist_catalyst == true){ + output = output + "catalyst"; + } + if (attribute_value.engineer_mechanist == true){ + output = output + "mechanist"; + } + if (attribute_value.guardian_willbender == true){ + output = output + "willbender"; + } + if (attribute_value.mesmer_virtuoso == true){ + output = output + "virtuoso"; + } + if (attribute_value.necromancer_harbinger == true){ + output = output + "harbinger"; + } + if (attribute_value.ranger_untamed == true){ + output = output + "untamed"; + } + if (attribute_value.revenant_vindicator == true){ + output = output + "vindicator"; + } + if (attribute_value.thief_specter == true){ + output = output + "specter"; + } + if (attribute_value.warrior_bladesworn == true){ + output = output + "bladesworn"; + } + if (attribute_value.elementalist_air == true){ + output = output + "41"; + } + if (attribute_value.elementalist_arcane == true){ + output = output + "37"; + } + if (attribute_value.elementalist_earth == true){ + output = output + "26"; + } + if (attribute_value.elementalist_fire == true){ + output = output + "31"; + } + if (attribute_value.elementalist_water == true){ + output = output + "17"; + } + if (attribute_value.engineer_alchemy == true){ + output = output + "29"; + } + if (attribute_value.engineer_explosives == true){ + output = output + "6"; + } + if (attribute_value.engineer_firearms == true){ + output = output + "38"; + } + if (attribute_value.engineer_inventions == true){ + output = output + "47"; + } + if (attribute_value.engineer_tools == true){ + output = output + "21"; + } + if (attribute_value.guardian_honor == true){ + output = output + "49"; + } + if (attribute_value.guardian_radiance == true){ + output = output + "16"; + } + if (attribute_value.guardian_valor == true){ + output = output + "13"; + } + if (attribute_value.guardian_virtues == true){ + output = output + "46"; + } + if (attribute_value.guardian_zeal == true){ + output = output + "42"; + } + if (attribute_value.mesmer_chaos == true){ + output = output + "45"; + } + if (attribute_value.mesmer_domination == true){ + output = output + "10"; + } + if (attribute_value.mesmer_dueling == true){ + output = output + "1"; + } + if (attribute_value.mesmer_illusions == true){ + output = output + "24"; + } + if (attribute_value.mesmer_inspiration == true){ + output = output + "23"; + } + if (attribute_value.necromancer_blood_magic == true){ + output = output + "19"; + } + if (attribute_value.necromancer_curses == true){ + output = output + "39"; + } + if (attribute_value.necromancer_death_magic == true){ + output = output + "2"; + } + if (attribute_value.necromancer_soul_reaping == true){ + output = output + "50"; + } + if (attribute_value.necromancer_spite == true){ + output = output + "53"; + } + if (attribute_value.ranger_beastmastery == true){ + output = output + "32"; + } + if (attribute_value.ranger_marksmanship == true){ + output = output + "8"; + } + if (attribute_value.ranger_nature_magic == true){ + output = output + "25"; + } + if (attribute_value.ranger_skirmishing == true){ + output = output + "30"; + } + if (attribute_value.ranger_wilderness_survival == true){ + output = output + "33"; + } + if (attribute_value.revenant_corruption == true){ + output = output + "14"; + } + if (attribute_value.revenant_devastation == true){ + output = output + "15"; + } + if (attribute_value.revenant_invocation == true){ + output = output + "3"; + } + if (attribute_value.revenant_retribution == true){ + output = output + "9"; + } + if (attribute_value.revenant_salvation == true){ + output = output + "12"; + } + if (attribute_value.thief_acrobatics == true){ + output = output + "54"; + } + if (attribute_value.thief_critical_strikes == true){ + output = output + "35"; + } + if (attribute_value.thief_deadly_arts == true){ + output = output + "28"; + } + if (attribute_value.thief_shadow_arts == true){ + output = output + "20"; + } + if (attribute_value.thief_trickery == true){ + output = output + "44"; + } + if (attribute_value.warrior_arms == true){ + output = output + "36"; + } + if (attribute_value.warrior_defense == true){ + output = output + "22"; + } + if (attribute_value.warrior_discipline == true){ + output = output + "51"; + } + if (attribute_value.warrior_strength == true){ + output = output + "4"; + } + if (attribute_value.warrior_tactics == true){ + output = output + "11"; + } + return output; } \ No newline at end of file diff --git a/xml_converter/src/attribute/specialization_filter_gen.hpp b/xml_converter/src/attribute/specialization_filter_gen.hpp index 421d6dbd..afffc7af 100644 --- a/xml_converter/src/attribute/specialization_filter_gen.hpp +++ b/xml_converter/src/attribute/specialization_filter_gen.hpp @@ -86,4 +86,4 @@ class SpecializationFilter { virtual string classname() { return "SpecializationFilter"; }; }; SpecializationFilter parse_specialization_filter(rapidxml::xml_attribute<>* input, vector *errors); - \ No newline at end of file +string stringify_specialization_filter(SpecializationFilter attribute_value); \ No newline at end of file diff --git a/xml_converter/src/attribute/species_filter_gen.cpp b/xml_converter/src/attribute/species_filter_gen.cpp index b7d750db..259c6bb6 100644 --- a/xml_converter/src/attribute/species_filter_gen.cpp +++ b/xml_converter/src/attribute/species_filter_gen.cpp @@ -9,35 +9,54 @@ SpeciesFilter parse_species_filter(rapidxml::xml_attribute<>* input, vector *errors){ SpeciesFilter species_filter; vector flag_values; - flag_values = split(get_attribute_value(input), ","); - species_filter.asura = false; - species_filter.charr = false; - species_filter.human = false; - species_filter.norn = false; - species_filter.sylvari = false; + flag_values = split(get_attribute_value(input), ","); + species_filter.asura = false; + species_filter.charr = false; + species_filter.human = false; + species_filter.norn = false; + species_filter.sylvari = false; for (string flag_value : flag_values) { - string normalized_flag_value = normalize(flag_value); - if (normalized_flag_value == "asura") { - species_filter.asura = true; - } - else if (normalized_flag_value == "charr") { - species_filter.charr = true; - } - else if (normalized_flag_value == "human") { - species_filter.human = true; - } - else if (normalized_flag_value == "norn") { - species_filter.norn = true; - } - else if (normalized_flag_value == "sylvari") { - species_filter.sylvari = true; - } - else { - errors->push_back(new XMLAttributeValueError("Invalid Filter for SpeciesFilter. Found " + flag_value, input)); - continue; + string normalized_flag_value = normalize(flag_value); + if (normalized_flag_value == "asura") { + species_filter.asura = true; + } + else if (normalized_flag_value == "charr") { + species_filter.charr = true; + } + else if (normalized_flag_value == "human") { + species_filter.human = true; + } + else if (normalized_flag_value == "norn") { + species_filter.norn = true; + } + else if (normalized_flag_value == "sylvari") { + species_filter.sylvari = true; + } + else { + errors->push_back(new XMLAttributeValueError("Invalid Filter for SpeciesFilter. Found " + flag_value, input)); + continue; } } return species_filter; - +} + +string stringify_species_filter(SpeciesFilter attribute_value){ + string output = ""; + if (attribute_value.asura == true){ + output = output + "asura"; + } + if (attribute_value.charr == true){ + output = output + "charr"; + } + if (attribute_value.human == true){ + output = output + "human"; + } + if (attribute_value.norn == true){ + output = output + "norn"; + } + if (attribute_value.sylvari == true){ + output = output + "sylvari"; + } + return output; } \ No newline at end of file diff --git a/xml_converter/src/attribute/species_filter_gen.hpp b/xml_converter/src/attribute/species_filter_gen.hpp index e7372124..93e26110 100644 --- a/xml_converter/src/attribute/species_filter_gen.hpp +++ b/xml_converter/src/attribute/species_filter_gen.hpp @@ -19,4 +19,4 @@ class SpeciesFilter { virtual string classname() { return "SpeciesFilter"; }; }; SpeciesFilter parse_species_filter(rapidxml::xml_attribute<>* input, vector *errors); - \ No newline at end of file +string stringify_species_filter(SpeciesFilter attribute_value); \ No newline at end of file diff --git a/xml_converter/src/attribute/string.cpp b/xml_converter/src/attribute/string.cpp index 02a84ecc..68b7970c 100644 --- a/xml_converter/src/attribute/string.cpp +++ b/xml_converter/src/attribute/string.cpp @@ -10,3 +10,7 @@ using namespace std; string parse_string(rapidxml::xml_attribute<>* input, vector *) { return get_attribute_value(input); } + +string stringify_string(string attribute_value){ + return attribute_value; +} \ No newline at end of file diff --git a/xml_converter/src/attribute/string.hpp b/xml_converter/src/attribute/string.hpp index afe105ae..3577d1aa 100644 --- a/xml_converter/src/attribute/string.hpp +++ b/xml_converter/src/attribute/string.hpp @@ -10,3 +10,4 @@ using namespace std; string parse_string(rapidxml::xml_attribute<>* input, vector *errors); +string stringify_string(string attribute_value); \ No newline at end of file diff --git a/xml_converter/src/attribute/trail_data.cpp b/xml_converter/src/attribute/trail_data.cpp index 9b9309a4..e9808d40 100644 --- a/xml_converter/src/attribute/trail_data.cpp +++ b/xml_converter/src/attribute/trail_data.cpp @@ -12,3 +12,7 @@ TrailData parse_trail_data(rapidxml::xml_attribute<>* input, vector * trail_data.trail_data = get_attribute_value(input); return trail_data; } + +string stringify_trail_data(TrailData attribute_value){ + return attribute_value.trail_data; +} diff --git a/xml_converter/src/attribute/trail_data.hpp b/xml_converter/src/attribute/trail_data.hpp index c3771150..22110376 100644 --- a/xml_converter/src/attribute/trail_data.hpp +++ b/xml_converter/src/attribute/trail_data.hpp @@ -13,3 +13,5 @@ class TrailData { }; TrailData parse_trail_data(rapidxml::xml_attribute<>* input, vector *errors); + +string stringify_trail_data(TrailData attribute_value); \ No newline at end of file diff --git a/xml_converter/src/attribute/trail_data_map_id.cpp b/xml_converter/src/attribute/trail_data_map_id.cpp index b51fad8f..304d7708 100644 --- a/xml_converter/src/attribute/trail_data_map_id.cpp +++ b/xml_converter/src/attribute/trail_data_map_id.cpp @@ -11,3 +11,7 @@ TrailDataMapId parse_trail_data_map_id(rapidxml::xml_attribute<>* input, vector< trail_data_map_id.trail_data_map_id = std::stof(get_attribute_value(input)); return trail_data_map_id; } + +string stringify_trail_data_map_id(TrailDataMapId attribute_value){ + return to_string(attribute_value.trail_data_map_id); +} diff --git a/xml_converter/src/attribute/trail_data_map_id.hpp b/xml_converter/src/attribute/trail_data_map_id.hpp index 044d1870..edede2ac 100644 --- a/xml_converter/src/attribute/trail_data_map_id.hpp +++ b/xml_converter/src/attribute/trail_data_map_id.hpp @@ -13,3 +13,5 @@ class TrailDataMapId { }; TrailDataMapId parse_trail_data_map_id(rapidxml::xml_attribute<>* input, vector *errors); + +string stringify_trail_data_map_id(TrailDataMapId attribute_value); \ No newline at end of file diff --git a/xml_converter/src/attribute/unique_id.cpp b/xml_converter/src/attribute/unique_id.cpp index 3a8de878..0b648c4f 100644 --- a/xml_converter/src/attribute/unique_id.cpp +++ b/xml_converter/src/attribute/unique_id.cpp @@ -15,3 +15,7 @@ UniqueId parse_unique_id(rapidxml::xml_attribute<>* input, vector *) unique_id.guid = guid; return unique_id; } + +string stringify_unique_id(UniqueId attribute_value){ + return base64_encode(&attribute_value.guid[0], attribute_value.guid.size()); +} diff --git a/xml_converter/src/attribute/unique_id.hpp b/xml_converter/src/attribute/unique_id.hpp index b5673328..0ee40a8b 100644 --- a/xml_converter/src/attribute/unique_id.hpp +++ b/xml_converter/src/attribute/unique_id.hpp @@ -14,3 +14,5 @@ class UniqueId { }; UniqueId parse_unique_id(rapidxml::xml_attribute<>* input, vector *errors); + +string stringify_unique_id(UniqueId attribute_value); diff --git a/xml_converter/src/category_gen.cpp b/xml_converter/src/category_gen.cpp index 3825f087..5706f100 100644 --- a/xml_converter/src/category_gen.cpp +++ b/xml_converter/src/category_gen.cpp @@ -1,4 +1,6 @@ #include "category_gen.hpp" +#include +#include using namespace std; @@ -25,23 +27,59 @@ void Category::init_from_xml(rapidxml::xml_node<>* node, vector *erro bool Category::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors) { string attributename; attributename = normalize(get_attribute_name(attribute)); - if (attributename == "defaulttoggle") { - this->default_visibility = parse_bool(attribute, errors); + if (attributename == "tipdescription") { + this->tooltip_name = parse_string(attribute, errors); + this->tooltip_name_is_true = true; + } + else if (attributename == "name") { + this->name = parse_string(attribute, errors); + this->name_is_true = true; } else if (attributename == "displayname") { this->display_name = parse_string(attribute, errors); + this->display_name_is_true = true; } else if (attributename == "isseparator") { this->is_separator = parse_bool(attribute, errors); + this->is_separator_is_true = true; } - else if (attributename == "name") { - this->name = parse_string(attribute, errors); - } - else if (attributename == "tipdescription") { - this->tooltip_name = parse_string(attribute, errors); + else if (attributename == "defaulttoggle") { + this->default_visibility = parse_bool(attribute, errors); + this->default_visibility_is_true = true; } else { return false; } return true; +} + +vector Category::as_xml() const { + vector xml_node_contents; + xml_node_contents.push_back("tooltip_name_is_true) { + xml_node_contents.push_back(" TipDescription=\"" + stringify_string(this->tooltip_name) + "\""); + } + if (this->name_is_true) { + xml_node_contents.push_back(" Name=\"" + stringify_string(this->name) + "\""); + } + if (this->display_name_is_true) { + xml_node_contents.push_back(" DisplayName=\"" + stringify_string(this->display_name) + "\""); + } + if (this->is_separator_is_true) { + xml_node_contents.push_back(" IsSeparator=\"" + stringify_bool(this->is_separator) + "\""); + } + if (this->default_visibility_is_true) { + xml_node_contents.push_back(" DefaultToggle=\"" + stringify_bool(this->default_visibility) + "\""); + } + xml_node_contents.push_back(">\n"); + + for (const auto& [key, val] : this->children){ + string text; + for (const auto& s: val.as_xml()) { text += s; }; + + xml_node_contents.push_back("\t" + text); + } + + xml_node_contents.push_back("\n"); + return xml_node_contents; } \ No newline at end of file diff --git a/xml_converter/src/category_gen.hpp b/xml_converter/src/category_gen.hpp index a9565239..7dfb3d62 100644 --- a/xml_converter/src/category_gen.hpp +++ b/xml_converter/src/category_gen.hpp @@ -13,11 +13,16 @@ using namespace std; class Category: public Parseable { public: - bool default_visibility; + string tooltip_name; + bool tooltip_name_is_true = false; + string name; + bool name_is_true = false; string display_name; + bool display_name_is_true = false; bool is_separator; - string name; - string tooltip_name; + bool is_separator_is_true = false; + bool default_visibility; + bool default_visibility_is_true = false; map children; Icon default_icon; Trail default_trail; @@ -25,4 +30,5 @@ class Category: public Parseable { void init_from_xml(rapidxml::xml_node<>* node, vector *errors); virtual string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors); + virtual vector as_xml() const; }; \ No newline at end of file diff --git a/xml_converter/src/icon_gen.cpp b/xml_converter/src/icon_gen.cpp index 43069585..6d666b61 100644 --- a/xml_converter/src/icon_gen.cpp +++ b/xml_converter/src/icon_gen.cpp @@ -1,4 +1,6 @@ #include "icon_gen.hpp" +#include +#include using namespace std; @@ -8,213 +10,456 @@ string Icon::classname() { bool Icon::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors) { string attributename; attributename = normalize(get_attribute_name(attribute)); - if (attributename == "achievementbit") { - this->achievement_bitmask = parse_int(attribute, errors); + if (attributename == "minsize") { + this->minimum_size_on_screen = parse_int(attribute, errors); + this->minimum_size_on_screen_is_true = true; } - else if (attributename == "achievementid") { - this->achievement_id = parse_int(attribute, errors); + else if (attributename == "maxsize") { + this->maximum_size_on_screen = parse_int(attribute, errors); + this->maximum_size_on_screen_is_true = true; } - else if (attributename == "alpha") { - this->alpha = parse_float(attribute, errors); + else if (attributename == "festival") { + this->festival_filter = parse_festival_filter(attribute, errors); + this->festival_filter_is_true = true; } - else if (attributename == "autotrigger") { - this->auto_trigger = parse_bool(attribute, errors); + else if (attributename == "profession") { + this->profession_filter = parse_profession_filter(attribute, errors); + this->profession_filter_is_true = true; } - else if (attributename == "bouncedelay") { - this->bounce_delay = parse_float(attribute, errors); + else if (attributename == "fadenear") { + this->distance_fade_start = parse_float(attribute, errors); + this->distance_fade_start_is_true = true; } - else if (attributename == "bounceduration") { - this->bounce_duration = parse_float(attribute, errors); + else if (attributename == "distancefadestart") { + this->distance_fade_start = parse_float(attribute, errors); + this->distance_fade_start_is_true = true; } - else if (attributename == "bounceheight") { - this->bounce_height = parse_float(attribute, errors); + else if (attributename == "fadefar") { + this->distance_fade_end = parse_float(attribute, errors); + this->distance_fade_end_is_true = true; } - else if (attributename == "canfade") { - this->can_fade = parse_bool(attribute, errors); + else if (attributename == "distancefadeend") { + this->distance_fade_end = parse_float(attribute, errors); + this->distance_fade_end_is_true = true; } - else if (attributename == "type") { - this->category = parse_marker_category(attribute, errors); + else if (attributename == "invertbehavior") { + this->invert_visibility = parse_bool(attribute, errors); + this->invert_visibility_is_true = true; } - else if (attributename == "category") { - this->category = parse_marker_category(attribute, errors); + else if (attributename == "show") { + this->show_category = parse_marker_category(attribute, errors); + this->show_category_is_true = true; } - else if (attributename == "color") { - this->color = parse_color(attribute, errors); + else if (attributename == "resetlength") { + this->reset_length = parse_float(attribute, errors); + this->reset_length_is_true = true; + } + else if (attributename == "info") { + this->info_message = parse_string(attribute, errors); + this->info_message_is_true = true; + } + else if (attributename == "bounceheight") { + this->bounce_height = parse_float(attribute, errors); + this->bounce_height_is_true = true; } else if (attributename == "copy") { this->copy_clipboard = parse_string(attribute, errors); + this->copy_clipboard_is_true = true; } else if (attributename == "copyclipboard") { this->copy_clipboard = parse_string(attribute, errors); + this->copy_clipboard_is_true = true; } - else if (attributename == "copymessage") { - this->copy_message = parse_string(attribute, errors); + else if (attributename == "guid") { + this->guid = parse_unique_id(attribute, errors); + this->guid_is_true = true; } - else if (attributename == "cull") { - this->cull_chirality = parse_cull_chirality(attribute, errors); + else if (attributename == "bouncedelay") { + this->bounce_delay = parse_float(attribute, errors); + this->bounce_delay_is_true = true; } - else if (attributename == "fadefar") { - this->distance_fade_end = parse_float(attribute, errors); + else if (attributename == "autotrigger") { + this->auto_trigger = parse_bool(attribute, errors); + this->auto_trigger_is_true = true; } - else if (attributename == "distancefadeend") { - this->distance_fade_end = parse_float(attribute, errors); + else if (attributename == "behavior") { + this->reset_behavior = parse_reset_behavior(attribute, errors); + this->reset_behavior_is_true = true; } - else if (attributename == "fadenear") { - this->distance_fade_start = parse_float(attribute, errors); + else if (attributename == "bounceduration") { + this->bounce_duration = parse_float(attribute, errors); + this->bounce_duration_is_true = true; } - else if (attributename == "distancefadestart") { - this->distance_fade_start = parse_float(attribute, errors); + else if (attributename == "hascountdown") { + this->has_countdown = parse_bool(attribute, errors); + this->has_countdown_is_true = true; } - else if (attributename == "rotate") { - this->euler_rotation = parse_euler_rotation(attribute, errors); + else if (attributename == "hide") { + this->hide_category = parse_marker_category(attribute, errors); + this->hide_category_is_true = true; } - else if (attributename == "rotatex") { - this->euler_rotation = parse_euler_rotation(attribute, errors); + else if (attributename == "copymessage") { + this->copy_message = parse_string(attribute, errors); + this->copy_message_is_true = true; } - else if (attributename == "rotatey") { - this->euler_rotation = parse_euler_rotation(attribute, errors); + else if (attributename == "toggle") { + this->toggle_category = parse_marker_category(attribute, errors); + this->toggle_category_is_true = true; } - else if (attributename == "rotatez") { - this->euler_rotation = parse_euler_rotation(attribute, errors); + else if (attributename == "triggerrange") { + this->trigger_range = parse_float(attribute, errors); + this->trigger_range_is_true = true; } - else if (attributename == "festival") { - this->festival_filter = parse_festival_filter(attribute, errors); + else if (attributename == "inforange") { + this->trigger_range = parse_float(attribute, errors); + this->trigger_range_is_true = true; } - else if (attributename == "guid") { - this->guid = parse_unique_id(attribute, errors); + else if (attributename == "mount") { + this->mount_filter = parse_mount_filter(attribute, errors); + this->mount_filter_is_true = true; } - else if (attributename == "hascountdown") { - this->has_countdown = parse_bool(attribute, errors); + else if (attributename == "alpha") { + this->alpha = parse_float(attribute, errors); + this->alpha_is_true = true; } - else if (attributename == "heightoffset") { - this->heightoffset = parse_float(attribute, errors); + else if (attributename == "mapid") { + this->map_id = parse_int(attribute, errors); + this->map_id_is_true = true; } - else if (attributename == "hide") { - this->hide_category = parse_marker_category(attribute, errors); + else if (attributename == "mapid") { + this->map_type_filter = parse_map_type_filter(attribute, errors); + this->map_type_filter_is_true = true; } - else if (attributename == "iconfile") { - this->icon = parse_image(attribute, errors); + else if (attributename == "minimapvisibility") { + this->render_on_minimap = parse_bool(attribute, errors); + this->render_on_minimap_is_true = true; } - else if (attributename == "iconsize") { - this->icon_size = parse_float(attribute, errors); + else if (attributename == "bhminimapvisibility") { + this->render_on_minimap = parse_bool(attribute, errors); + this->render_on_minimap_is_true = true; } - else if (attributename == "info") { - this->info_message = parse_string(attribute, errors); + else if (attributename == "cull") { + this->cull_chirality = parse_cull_chirality(attribute, errors); + this->cull_chirality_is_true = true; } - else if (attributename == "invertbehavior") { - this->invert_visibility = parse_bool(attribute, errors); + else if (attributename == "ingamevisibility") { + this->render_ingame = parse_bool(attribute, errors); + this->render_ingame_is_true = true; + } + else if (attributename == "bhingamevisibility") { + this->render_ingame = parse_bool(attribute, errors); + this->render_ingame_is_true = true; + } + else if (attributename == "mapvisibility") { + this->render_on_map = parse_bool(attribute, errors); + this->render_on_map_is_true = true; + } + else if (attributename == "bhmapvisibility") { + this->render_on_map = parse_bool(attribute, errors); + this->render_on_map_is_true = true; } else if (attributename == "mapdisplaysize") { this->map_display_size = parse_int(attribute, errors); + this->map_display_size_is_true = true; } - else if (attributename == "mapid") { - this->map_id = parse_int(attribute, errors); - } - else if (attributename == "mapid") { - this->map_type_filter = parse_map_type_filter(attribute, errors); + else if (attributename == "scaleonmapwithzoom") { + this->scale_on_map_with_zoom = parse_bool(attribute, errors); + this->scale_on_map_with_zoom_is_true = true; } - else if (attributename == "maxsize") { - this->maximum_size_on_screen = parse_int(attribute, errors); + else if (attributename == "race") { + this->species_filter = parse_species_filter(attribute, errors); + this->species_filter_is_true = true; } - else if (attributename == "minsize") { - this->minimum_size_on_screen = parse_int(attribute, errors); + else if (attributename == "species") { + this->species_filter = parse_species_filter(attribute, errors); + this->species_filter_is_true = true; } - else if (attributename == "mount") { - this->mount_filter = parse_mount_filter(attribute, errors); + else if (attributename == "tipdescription") { + this->tooltip_name = parse_string(attribute, errors); + this->tooltip_name_is_true = true; } - else if (attributename == "position") { - this->position = parse_position(attribute, errors); + else if (attributename == "tipname") { + this->tooltip_description = parse_string(attribute, errors); + this->tooltip_description_is_true = true; } else if (attributename == "xpos") { - this->position = parse_position(attribute, errors); + this->x_position = parse_float(attribute, errors); + this->x_position_is_true = true; } else if (attributename == "positionx") { - this->position = parse_position(attribute, errors); + this->x_position = parse_float(attribute, errors); + this->x_position_is_true = true; } else if (attributename == "ypos") { - this->position = parse_position(attribute, errors); + this->y_position = parse_float(attribute, errors); + this->y_position_is_true = true; } else if (attributename == "positiony") { - this->position = parse_position(attribute, errors); + this->y_position = parse_float(attribute, errors); + this->y_position_is_true = true; } else if (attributename == "zpos") { - this->position = parse_position(attribute, errors); + this->z_position = parse_float(attribute, errors); + this->z_position_is_true = true; } else if (attributename == "positionz") { - this->position = parse_position(attribute, errors); + this->z_position = parse_float(attribute, errors); + this->z_position_is_true = true; } - else if (attributename == "profession") { - this->profession_filter = parse_profession_filter(attribute, errors); + else if (attributename == "position") { + this->z_position = parse_float(attribute, errors); + this->z_position_is_true = true; } - else if (attributename == "ingamevisibility") { - this->render_ingame = parse_bool(attribute, errors); + else if (attributename == "zpos") { + this->position = parse_position(attribute, errors); + this->position_is_true = true; } - else if (attributename == "bhingamevisibility") { - this->render_ingame = parse_bool(attribute, errors); + else if (attributename == "positionz") { + this->position = parse_position(attribute, errors); + this->position_is_true = true; } - else if (attributename == "mapvisibility") { - this->render_on_map = parse_bool(attribute, errors); + else if (attributename == "position") { + this->position = parse_position(attribute, errors); + this->position_is_true = true; } - else if (attributename == "bhmapvisibility") { - this->render_on_map = parse_bool(attribute, errors); + else if (attributename == "heightoffset") { + this->heightoffset = parse_float(attribute, errors); + this->heightoffset_is_true = true; } - else if (attributename == "minimapvisibility") { - this->render_on_minimap = parse_bool(attribute, errors); + else if (attributename == "specialization") { + this->specialization_filter = parse_specialization_filter(attribute, errors); + this->specialization_filter_is_true = true; } - else if (attributename == "bhminimapvisibility") { - this->render_on_minimap = parse_bool(attribute, errors); + else if (attributename == "achievementid") { + this->achievement_id = parse_int(attribute, errors); + this->achievement_id_is_true = true; } - else if (attributename == "behavior") { - this->reset_behavior = parse_reset_behavior(attribute, errors); + else if (attributename == "achievementbit") { + this->achievement_bitmask = parse_int(attribute, errors); + this->achievement_bitmask_is_true = true; } - else if (attributename == "resetlength") { - this->reset_length = parse_float(attribute, errors); + else if (attributename == "iconsize") { + this->icon_size = parse_float(attribute, errors); + this->icon_size_is_true = true; } - else if (attributename == "scaleonmapwithzoom") { - this->scale_on_map_with_zoom = parse_bool(attribute, errors); + else if (attributename == "type") { + this->category = parse_marker_category(attribute, errors); + this->category_is_true = true; } - else if (attributename == "schedule") { - this->schedule = parse_string(attribute, errors); + else if (attributename == "category") { + this->category = parse_marker_category(attribute, errors); + this->category_is_true = true; } else if (attributename == "scheduleduration") { this->schedule_duration = parse_float(attribute, errors); + this->schedule_duration_is_true = true; } - else if (attributename == "show") { - this->show_category = parse_marker_category(attribute, errors); + else if (attributename == "schedule") { + this->schedule = parse_string(attribute, errors); + this->schedule_is_true = true; } - else if (attributename == "specialization") { - this->specialization_filter = parse_specialization_filter(attribute, errors); + else if (attributename == "color") { + this->color = parse_color(attribute, errors); + this->color_is_true = true; } - else if (attributename == "race") { - this->species_filter = parse_species_filter(attribute, errors); + else if (attributename == "iconfile") { + this->icon = parse_image(attribute, errors); + this->icon_is_true = true; } - else if (attributename == "species") { - this->species_filter = parse_species_filter(attribute, errors); + else if (attributename == "canfade") { + this->can_fade = parse_bool(attribute, errors); + this->can_fade_is_true = true; } - else if (attributename == "toggle") { - this->toggle_category = parse_marker_category(attribute, errors); + else if (attributename == "rotatex") { + this->x_rotation = parse_float(attribute, errors); + this->x_rotation_is_true = true; } - else if (attributename == "tipname") { - this->tooltip_description = parse_string(attribute, errors); + else if (attributename == "rotatey") { + this->y_rotation = parse_float(attribute, errors); + this->y_rotation_is_true = true; } - else if (attributename == "tipdescription") { - this->tooltip_name = parse_string(attribute, errors); + else if (attributename == "rotatez") { + this->z_rotation = parse_float(attribute, errors); + this->z_rotation_is_true = true; } - else if (attributename == "triggerrange") { - this->trigger_range = parse_float(attribute, errors); + else if (attributename == "rotate") { + this->z_rotation = parse_float(attribute, errors); + this->z_rotation_is_true = true; } - else if (attributename == "inforange") { - this->trigger_range = parse_float(attribute, errors); + else if (attributename == "rotatez") { + this->euler_rotation = parse_euler_rotation(attribute, errors); + this->euler_rotation_is_true = true; + } + else if (attributename == "rotate") { + this->euler_rotation = parse_euler_rotation(attribute, errors); + this->euler_rotation_is_true = true; } else { return false; } return true; } -bool Icon::validate_attributes_of_type_marker_category(){ +bool Icon::validate_attributes_of_type_marker_category() { // TODO: validate "show_category" // TODO: validate "hide_category" // TODO: validate "toggle_category" // TODO: validate "category" return true; +} + +vector Icon::as_xml() const { + vector xml_node_contents; + xml_node_contents.push_back("minimum_size_on_screen_is_true) { + xml_node_contents.push_back(" MinSize=\"" + stringify_int(this->minimum_size_on_screen) + "\""); + } + if (this->maximum_size_on_screen_is_true) { + xml_node_contents.push_back(" MaxSize=\"" + stringify_int(this->maximum_size_on_screen) + "\""); + } + if (this->festival_filter_is_true) { + xml_node_contents.push_back(" Festival=\"" + stringify_festival_filter(this->festival_filter) + "\""); + } + if (this->profession_filter_is_true) { + xml_node_contents.push_back(" Profession=\"" + stringify_profession_filter(this->profession_filter) + "\""); + } + if (this->distance_fade_start_is_true) { + xml_node_contents.push_back(" FadeNear=\"" + stringify_float(this->distance_fade_start) + "\""); + } + if (this->distance_fade_end_is_true) { + xml_node_contents.push_back(" FadeFar=\"" + stringify_float(this->distance_fade_end) + "\""); + } + if (this->invert_visibility_is_true) { + xml_node_contents.push_back(" InvertBehavior=\"" + stringify_bool(this->invert_visibility) + "\""); + } + if (this->show_category_is_true) { + xml_node_contents.push_back(" Show=\"" + stringify_marker_category(this->show_category) + "\""); + } + if (this->reset_length_is_true) { + xml_node_contents.push_back(" ResetLength=\"" + stringify_float(this->reset_length) + "\""); + } + if (this->info_message_is_true) { + xml_node_contents.push_back(" Info=\"" + stringify_string(this->info_message) + "\""); + } + if (this->bounce_height_is_true) { + xml_node_contents.push_back(" BounceHeight=\"" + stringify_float(this->bounce_height) + "\""); + } + if (this->copy_clipboard_is_true) { + xml_node_contents.push_back(" Copy=\"" + stringify_string(this->copy_clipboard) + "\""); + } + if (this->guid_is_true) { + xml_node_contents.push_back(" GUID=\"" + stringify_unique_id(this->guid) + "\""); + } + if (this->bounce_delay_is_true) { + xml_node_contents.push_back(" BounceDelay=\"" + stringify_float(this->bounce_delay) + "\""); + } + if (this->auto_trigger_is_true) { + xml_node_contents.push_back(" AutoTrigger=\"" + stringify_bool(this->auto_trigger) + "\""); + } + if (this->reset_behavior_is_true) { + xml_node_contents.push_back(" Behavior=\"" + stringify_reset_behavior(this->reset_behavior) + "\""); + } + if (this->bounce_duration_is_true) { + xml_node_contents.push_back(" BounceDuration=\"" + stringify_float(this->bounce_duration) + "\""); + } + if (this->has_countdown_is_true) { + xml_node_contents.push_back(" HasCountdown=\"" + stringify_bool(this->has_countdown) + "\""); + } + if (this->hide_category_is_true) { + xml_node_contents.push_back(" Hide=\"" + stringify_marker_category(this->hide_category) + "\""); + } + if (this->copy_message_is_true) { + xml_node_contents.push_back(" CopyMessage=\"" + stringify_string(this->copy_message) + "\""); + } + if (this->toggle_category_is_true) { + xml_node_contents.push_back(" Toggle=\"" + stringify_marker_category(this->toggle_category) + "\""); + } + if (this->trigger_range_is_true) { + xml_node_contents.push_back(" TriggerRange=\"" + stringify_float(this->trigger_range) + "\""); + } + if (this->mount_filter_is_true) { + xml_node_contents.push_back(" Mount=\"" + stringify_mount_filter(this->mount_filter) + "\""); + } + if (this->alpha_is_true) { + xml_node_contents.push_back(" Alpha=\"" + stringify_float(this->alpha) + "\""); + } + if (this->map_id_is_true) { + xml_node_contents.push_back(" MapID=\"" + stringify_int(this->map_id) + "\""); + } + if (this->map_type_filter_is_true) { + xml_node_contents.push_back(" MapID=\"" + stringify_map_type_filter(this->map_type_filter) + "\""); + } + if (this->render_on_minimap_is_true) { + xml_node_contents.push_back(" MinimapVisibility=\"" + stringify_bool(this->render_on_minimap) + "\""); + } + if (this->cull_chirality_is_true) { + xml_node_contents.push_back(" Cull=\"" + stringify_cull_chirality(this->cull_chirality) + "\""); + } + if (this->render_ingame_is_true) { + xml_node_contents.push_back(" IngameVisibility=\"" + stringify_bool(this->render_ingame) + "\""); + } + if (this->render_on_map_is_true) { + xml_node_contents.push_back(" MapVisibility=\"" + stringify_bool(this->render_on_map) + "\""); + } + if (this->map_display_size_is_true) { + xml_node_contents.push_back(" MapDisplaySize=\"" + stringify_int(this->map_display_size) + "\""); + } + if (this->scale_on_map_with_zoom_is_true) { + xml_node_contents.push_back(" ScaleOnMapWithZoom=\"" + stringify_bool(this->scale_on_map_with_zoom) + "\""); + } + if (this->species_filter_is_true) { + xml_node_contents.push_back(" Race=\"" + stringify_species_filter(this->species_filter) + "\""); + } + if (this->tooltip_name_is_true) { + xml_node_contents.push_back(" TipDescription=\"" + stringify_string(this->tooltip_name) + "\""); + } + if (this->tooltip_description_is_true) { + xml_node_contents.push_back(" TipName=\"" + stringify_string(this->tooltip_description) + "\""); + } + if (this->x_position_is_true) { + xml_node_contents.push_back(" XPos=\"" + to_string(this->x_position) + "\""); + } + if (this->y_position_is_true) { + xml_node_contents.push_back(" YPos=\"" + to_string(this->y_position) + "\""); + } + if (this->z_position_is_true) { + xml_node_contents.push_back(" ZPos=\"" + to_string(this->z_position) + "\""); + } + if (this->heightoffset_is_true) { + xml_node_contents.push_back(" HeightOffset=\"" + stringify_float(this->heightoffset) + "\""); + } + if (this->specialization_filter_is_true) { + xml_node_contents.push_back(" Specialization=\"" + stringify_specialization_filter(this->specialization_filter) + "\""); + } + if (this->achievement_id_is_true) { + xml_node_contents.push_back(" AchievementId=\"" + stringify_int(this->achievement_id) + "\""); + } + if (this->achievement_bitmask_is_true) { + xml_node_contents.push_back(" AchievementBit=\"" + stringify_int(this->achievement_bitmask) + "\""); + } + if (this->icon_size_is_true) { + xml_node_contents.push_back(" IconSize=\"" + stringify_float(this->icon_size) + "\""); + } + if (this->category_is_true) { + xml_node_contents.push_back(" Type=\"" + stringify_marker_category(this->category) + "\""); + } + if (this->schedule_duration_is_true) { + xml_node_contents.push_back(" ScheduleDuration=\"" + stringify_float(this->schedule_duration) + "\""); + } + if (this->schedule_is_true) { + xml_node_contents.push_back(" Schedule=\"" + stringify_string(this->schedule) + "\""); + } + if (this->color_is_true) { + xml_node_contents.push_back(" Color=\"" + stringify_color(this->color) + "\""); + } + if (this->icon_is_true) { + xml_node_contents.push_back(" IconFile=\"" + stringify_image(this->icon) + "\""); + } + if (this->can_fade_is_true) { + xml_node_contents.push_back(" CanFade=\"" + stringify_bool(this->can_fade) + "\""); + } + if (this->euler_rotation_is_true) { + xml_node_contents.push_back(" Rotate=\"" + stringify_euler_rotation(this->euler_rotation) + "\""); + } + xml_node_contents.push_back("/>"); + return xml_node_contents; } \ No newline at end of file diff --git a/xml_converter/src/icon_gen.hpp b/xml_converter/src/icon_gen.hpp index 388213ac..0d763365 100644 --- a/xml_converter/src/icon_gen.hpp +++ b/xml_converter/src/icon_gen.hpp @@ -26,55 +26,116 @@ using namespace std; class Icon: public Parseable { public: - int achievement_bitmask; - int achievement_id; - float alpha; - bool auto_trigger; - float bounce_delay; - float bounce_duration; + int minimum_size_on_screen; + bool minimum_size_on_screen_is_true = false; + int maximum_size_on_screen; + bool maximum_size_on_screen_is_true = false; + FestivalFilter festival_filter; + bool festival_filter_is_true = false; + ProfessionFilter profession_filter; + bool profession_filter_is_true = false; + float distance_fade_start; + bool distance_fade_start_is_true = false; + float distance_fade_end; + bool distance_fade_end_is_true = false; + bool invert_visibility; + bool invert_visibility_is_true = false; + MarkerCategory show_category; + bool show_category_is_true = false; + float reset_length; + bool reset_length_is_true = false; + string info_message; + bool info_message_is_true = false; float bounce_height; - bool can_fade; - MarkerCategory category; - Color color; + bool bounce_height_is_true = false; string copy_clipboard; - string copy_message; - CullChirality cull_chirality; - float distance_fade_end; - float distance_fade_start; - EulerRotation euler_rotation; - FestivalFilter festival_filter; + bool copy_clipboard_is_true = false; UniqueId guid; + bool guid_is_true = false; + float bounce_delay; + bool bounce_delay_is_true = false; + bool auto_trigger; + bool auto_trigger_is_true = false; + ResetBehavior reset_behavior; + bool reset_behavior_is_true = false; + float bounce_duration; + bool bounce_duration_is_true = false; bool has_countdown; - float heightoffset; + bool has_countdown_is_true = false; MarkerCategory hide_category; - Image icon; - float icon_size; - string info_message; - bool invert_visibility; - int map_display_size; + bool hide_category_is_true = false; + string copy_message; + bool copy_message_is_true = false; + MarkerCategory toggle_category; + bool toggle_category_is_true = false; + float trigger_range; + bool trigger_range_is_true = false; + MountFilter mount_filter; + bool mount_filter_is_true = false; + float alpha; + bool alpha_is_true = false; int map_id; + bool map_id_is_true = false; MapTypeFilter map_type_filter; - int maximum_size_on_screen; - int minimum_size_on_screen; - MountFilter mount_filter; - Position position; - ProfessionFilter profession_filter; + bool map_type_filter_is_true = false; + bool render_on_minimap; + bool render_on_minimap_is_true = false; + CullChirality cull_chirality; + bool cull_chirality_is_true = false; bool render_ingame; + bool render_ingame_is_true = false; bool render_on_map; - bool render_on_minimap; - ResetBehavior reset_behavior; - float reset_length; + bool render_on_map_is_true = false; + int map_display_size; + bool map_display_size_is_true = false; bool scale_on_map_with_zoom; - string schedule; - float schedule_duration; - MarkerCategory show_category; - SpecializationFilter specialization_filter; + bool scale_on_map_with_zoom_is_true = false; SpeciesFilter species_filter; - MarkerCategory toggle_category; - string tooltip_description; + bool species_filter_is_true = false; string tooltip_name; - float trigger_range; + bool tooltip_name_is_true = false; + string tooltip_description; + bool tooltip_description_is_true = false; + float x_position; + bool x_position_is_true = false; + float y_position; + bool y_position_is_true = false; + float z_position; + bool z_position_is_true = false; + Position position; + bool position_is_true = false; + float heightoffset; + bool heightoffset_is_true = false; + SpecializationFilter specialization_filter; + bool specialization_filter_is_true = false; + int achievement_id; + bool achievement_id_is_true = false; + int achievement_bitmask; + bool achievement_bitmask_is_true = false; + float icon_size; + bool icon_size_is_true = false; + MarkerCategory category; + bool category_is_true = false; + float schedule_duration; + bool schedule_duration_is_true = false; + string schedule; + bool schedule_is_true = false; + Color color; + bool color_is_true = false; + Image icon; + bool icon_is_true = false; + bool can_fade; + bool can_fade_is_true = false; + float x_rotation; + bool x_rotation_is_true = false; + float y_rotation; + bool y_rotation_is_true = false; + float z_rotation; + bool z_rotation_is_true = false; + EulerRotation euler_rotation; + bool euler_rotation_is_true = false; virtual string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors); + virtual vector as_xml() const; bool validate_attributes_of_type_marker_category(); }; \ No newline at end of file diff --git a/xml_converter/src/parseable.cpp b/xml_converter/src/parseable.cpp index c5a4fe4c..c7845279 100644 --- a/xml_converter/src/parseable.cpp +++ b/xml_converter/src/parseable.cpp @@ -35,4 +35,10 @@ bool Parseable::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector< // I removed all of the offending variables. This whole section will be relooked at. string item = normalize(get_attribute_name(attribute)); return true; -} \ No newline at end of file +} + +vector Parseable::as_xml() const{ + vector result; + result.push_back("a"); + return result; +} diff --git a/xml_converter/src/parseable.hpp b/xml_converter/src/parseable.hpp index 96c85d92..1fcf043d 100644 --- a/xml_converter/src/parseable.hpp +++ b/xml_converter/src/parseable.hpp @@ -13,14 +13,18 @@ class Parseable { private: protected: + + public: // A stringy representation of a human readable classname. Used for errors. virtual string classname(); - public: // A default parser function to parse an entire XML node into the class. void init_from_xml(rapidxml::xml_node<>* node, vector *errors); // A default parser function to parse a single XML attribute into the class. virtual bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors); + // + virtual vector as_xml() const; + }; diff --git a/xml_converter/src/trail_gen.cpp b/xml_converter/src/trail_gen.cpp index 797aa927..59d5ad74 100644 --- a/xml_converter/src/trail_gen.cpp +++ b/xml_converter/src/trail_gen.cpp @@ -1,4 +1,6 @@ #include "trail_gen.hpp" +#include +#include using namespace std; @@ -8,123 +10,247 @@ string Trail::classname() { bool Trail::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors) { string attributename; attributename = normalize(get_attribute_name(attribute)); - if (attributename == "achievementbit") { - this->achievement_bitmask = parse_int(attribute, errors); - } - else if (attributename == "achievementid") { - this->achievement_id = parse_int(attribute, errors); - } - else if (attributename == "alpha") { - this->alpha = parse_float(attribute, errors); - } - else if (attributename == "animspeed") { - this->animation_speed = parse_float(attribute, errors); - } - else if (attributename == "animationspeed") { - this->animation_speed = parse_float(attribute, errors); - } - else if (attributename == "canfade") { - this->can_fade = parse_bool(attribute, errors); - } - else if (attributename == "type") { - this->category = parse_marker_category(attribute, errors); + if (attributename == "festival") { + this->festival_filter = parse_festival_filter(attribute, errors); + this->festival_filter_is_true = true; } - else if (attributename == "category") { - this->category = parse_marker_category(attribute, errors); + else if (attributename == "profession") { + this->profession_filter = parse_profession_filter(attribute, errors); + this->profession_filter_is_true = true; } - else if (attributename == "color") { - this->color = parse_color(attribute, errors); + else if (attributename == "fadenear") { + this->distance_fade_start = parse_float(attribute, errors); + this->distance_fade_start_is_true = true; } - else if (attributename == "cull") { - this->cull_chirality = parse_cull_chirality(attribute, errors); + else if (attributename == "distancefadestart") { + this->distance_fade_start = parse_float(attribute, errors); + this->distance_fade_start_is_true = true; } else if (attributename == "fadefar") { this->distance_fade_end = parse_float(attribute, errors); + this->distance_fade_end_is_true = true; } else if (attributename == "distancefadeend") { this->distance_fade_end = parse_float(attribute, errors); - } - else if (attributename == "fadenear") { - this->distance_fade_start = parse_float(attribute, errors); - } - else if (attributename == "distancefadestart") { - this->distance_fade_start = parse_float(attribute, errors); - } - else if (attributename == "festival") { - this->festival_filter = parse_festival_filter(attribute, errors); + this->distance_fade_end_is_true = true; } else if (attributename == "guid") { this->guid = parse_unique_id(attribute, errors); + this->guid_is_true = true; } - else if (attributename == "iswall") { - this->is_wall = parse_bool(attribute, errors); + else if (attributename == "mount") { + this->mount_filter = parse_mount_filter(attribute, errors); + this->mount_filter_is_true = true; } - else if (attributename == "mapdisplaysize") { - this->map_display_size = parse_int(attribute, errors); + else if (attributename == "alpha") { + this->alpha = parse_float(attribute, errors); + this->alpha_is_true = true; } else if (attributename == "mapid") { this->map_id = parse_int(attribute, errors); + this->map_id_is_true = true; } else if (attributename == "mapid") { this->map_type_filter = parse_map_type_filter(attribute, errors); + this->map_type_filter_is_true = true; } - else if (attributename == "mount") { - this->mount_filter = parse_mount_filter(attribute, errors); + else if (attributename == "minimapvisibility") { + this->render_on_minimap = parse_bool(attribute, errors); + this->render_on_minimap_is_true = true; } - else if (attributename == "profession") { - this->profession_filter = parse_profession_filter(attribute, errors); + else if (attributename == "bhminimapvisibility") { + this->render_on_minimap = parse_bool(attribute, errors); + this->render_on_minimap_is_true = true; + } + else if (attributename == "cull") { + this->cull_chirality = parse_cull_chirality(attribute, errors); + this->cull_chirality_is_true = true; } else if (attributename == "ingamevisibility") { this->render_ingame = parse_bool(attribute, errors); + this->render_ingame_is_true = true; } else if (attributename == "bhingamevisibility") { this->render_ingame = parse_bool(attribute, errors); + this->render_ingame_is_true = true; } else if (attributename == "mapvisibility") { this->render_on_map = parse_bool(attribute, errors); + this->render_on_map_is_true = true; } else if (attributename == "bhmapvisibility") { this->render_on_map = parse_bool(attribute, errors); + this->render_on_map_is_true = true; } - else if (attributename == "minimapvisibility") { - this->render_on_minimap = parse_bool(attribute, errors); - } - else if (attributename == "bhminimapvisibility") { - this->render_on_minimap = parse_bool(attribute, errors); - } - else if (attributename == "schedule") { - this->schedule = parse_string(attribute, errors); - } - else if (attributename == "scheduleduration") { - this->schedule_duration = parse_float(attribute, errors); + else if (attributename == "mapdisplaysize") { + this->map_display_size = parse_int(attribute, errors); + this->map_display_size_is_true = true; } - else if (attributename == "specialization") { - this->specialization_filter = parse_specialization_filter(attribute, errors); + else if (attributename == "iswall") { + this->is_wall = parse_bool(attribute, errors); + this->is_wall_is_true = true; } else if (attributename == "race") { this->species_filter = parse_species_filter(attribute, errors); + this->species_filter_is_true = true; } else if (attributename == "species") { this->species_filter = parse_species_filter(attribute, errors); - } - else if (attributename == "texture") { - this->texture = parse_image(attribute, errors); + this->species_filter_is_true = true; } else if (attributename == "traildata") { this->trail_data = parse_trail_data(attribute, errors); + this->trail_data_is_true = true; } - else if (attributename == "traildata") { - this->trail_data_map_id = parse_trail_data_map_id(attribute, errors); + else if (attributename == "specialization") { + this->specialization_filter = parse_specialization_filter(attribute, errors); + this->specialization_filter_is_true = true; + } + else if (attributename == "achievementid") { + this->achievement_id = parse_int(attribute, errors); + this->achievement_id_is_true = true; + } + else if (attributename == "achievementbit") { + this->achievement_bitmask = parse_int(attribute, errors); + this->achievement_bitmask_is_true = true; } else if (attributename == "trailscale") { this->trail_scale = parse_float(attribute, errors); + this->trail_scale_is_true = true; + } + else if (attributename == "type") { + this->category = parse_marker_category(attribute, errors); + this->category_is_true = true; + } + else if (attributename == "category") { + this->category = parse_marker_category(attribute, errors); + this->category_is_true = true; + } + else if (attributename == "scheduleduration") { + this->schedule_duration = parse_float(attribute, errors); + this->schedule_duration_is_true = true; + } + else if (attributename == "schedule") { + this->schedule = parse_string(attribute, errors); + this->schedule_is_true = true; + } + else if (attributename == "color") { + this->color = parse_color(attribute, errors); + this->color_is_true = true; + } + else if (attributename == "texture") { + this->texture = parse_image(attribute, errors); + this->texture_is_true = true; + } + else if (attributename == "animspeed") { + this->animation_speed = parse_float(attribute, errors); + this->animation_speed_is_true = true; + } + else if (attributename == "animationspeed") { + this->animation_speed = parse_float(attribute, errors); + this->animation_speed_is_true = true; + } + else if (attributename == "canfade") { + this->can_fade = parse_bool(attribute, errors); + this->can_fade_is_true = true; } else { return false; } return true; } -bool Trail::validate_attributes_of_type_marker_category(){ +bool Trail::validate_attributes_of_type_marker_category() { // TODO: validate "category" return true; +} + +vector Trail::as_xml() const { + vector xml_node_contents; + xml_node_contents.push_back("festival_filter_is_true) { + xml_node_contents.push_back(" Festival=\"" + stringify_festival_filter(this->festival_filter) + "\""); + } + if (this->profession_filter_is_true) { + xml_node_contents.push_back(" Profession=\"" + stringify_profession_filter(this->profession_filter) + "\""); + } + if (this->distance_fade_start_is_true) { + xml_node_contents.push_back(" FadeNear=\"" + stringify_float(this->distance_fade_start) + "\""); + } + if (this->distance_fade_end_is_true) { + xml_node_contents.push_back(" FadeFar=\"" + stringify_float(this->distance_fade_end) + "\""); + } + if (this->guid_is_true) { + xml_node_contents.push_back(" GUID=\"" + stringify_unique_id(this->guid) + "\""); + } + if (this->mount_filter_is_true) { + xml_node_contents.push_back(" Mount=\"" + stringify_mount_filter(this->mount_filter) + "\""); + } + if (this->alpha_is_true) { + xml_node_contents.push_back(" Alpha=\"" + stringify_float(this->alpha) + "\""); + } + if (this->map_id_is_true) { + xml_node_contents.push_back(" MapID=\"" + stringify_int(this->map_id) + "\""); + } + if (this->map_type_filter_is_true) { + xml_node_contents.push_back(" MapID=\"" + stringify_map_type_filter(this->map_type_filter) + "\""); + } + if (this->render_on_minimap_is_true) { + xml_node_contents.push_back(" MinimapVisibility=\"" + stringify_bool(this->render_on_minimap) + "\""); + } + if (this->cull_chirality_is_true) { + xml_node_contents.push_back(" Cull=\"" + stringify_cull_chirality(this->cull_chirality) + "\""); + } + if (this->render_ingame_is_true) { + xml_node_contents.push_back(" IngameVisibility=\"" + stringify_bool(this->render_ingame) + "\""); + } + if (this->render_on_map_is_true) { + xml_node_contents.push_back(" MapVisibility=\"" + stringify_bool(this->render_on_map) + "\""); + } + if (this->map_display_size_is_true) { + xml_node_contents.push_back(" MapDisplaySize=\"" + stringify_int(this->map_display_size) + "\""); + } + if (this->is_wall_is_true) { + xml_node_contents.push_back(" IsWall=\"" + stringify_bool(this->is_wall) + "\""); + } + if (this->species_filter_is_true) { + xml_node_contents.push_back(" Race=\"" + stringify_species_filter(this->species_filter) + "\""); + } + if (this->trail_data_is_true) { + xml_node_contents.push_back(" TrailData=\"" + stringify_trail_data(this->trail_data) + "\""); + } + if (this->specialization_filter_is_true) { + xml_node_contents.push_back(" Specialization=\"" + stringify_specialization_filter(this->specialization_filter) + "\""); + } + if (this->achievement_id_is_true) { + xml_node_contents.push_back(" AchievementId=\"" + stringify_int(this->achievement_id) + "\""); + } + if (this->achievement_bitmask_is_true) { + xml_node_contents.push_back(" AchievementBit=\"" + stringify_int(this->achievement_bitmask) + "\""); + } + if (this->trail_scale_is_true) { + xml_node_contents.push_back(" TrailScale=\"" + stringify_float(this->trail_scale) + "\""); + } + if (this->category_is_true) { + xml_node_contents.push_back(" Type=\"" + stringify_marker_category(this->category) + "\""); + } + if (this->schedule_duration_is_true) { + xml_node_contents.push_back(" ScheduleDuration=\"" + stringify_float(this->schedule_duration) + "\""); + } + if (this->schedule_is_true) { + xml_node_contents.push_back(" Schedule=\"" + stringify_string(this->schedule) + "\""); + } + if (this->color_is_true) { + xml_node_contents.push_back(" Color=\"" + stringify_color(this->color) + "\""); + } + if (this->texture_is_true) { + xml_node_contents.push_back(" Texture=\"" + stringify_image(this->texture) + "\""); + } + if (this->animation_speed_is_true) { + xml_node_contents.push_back(" AnimSpeed=\"" + stringify_float(this->animation_speed) + "\""); + } + if (this->can_fade_is_true) { + xml_node_contents.push_back(" CanFade=\"" + stringify_bool(this->can_fade) + "\""); + } + xml_node_contents.push_back("/>"); + return xml_node_contents; } \ No newline at end of file diff --git a/xml_converter/src/trail_gen.hpp b/xml_converter/src/trail_gen.hpp index 28997744..84f655f6 100644 --- a/xml_converter/src/trail_gen.hpp +++ b/xml_converter/src/trail_gen.hpp @@ -29,42 +29,69 @@ #include "attribute/species_filter_gen.hpp" #include "attribute/string.hpp" #include "attribute/trail_data.hpp" -#include "attribute/trail_data_map_id.hpp" #include "attribute/unique_id.hpp" using namespace std; class Trail: public Parseable { public: - int achievement_bitmask; - int achievement_id; - float alpha; - float animation_speed; - bool can_fade; - MarkerCategory category; - Color color; - CullChirality cull_chirality; - float distance_fade_end; - float distance_fade_start; FestivalFilter festival_filter; + bool festival_filter_is_true = false; + ProfessionFilter profession_filter; + bool profession_filter_is_true = false; + float distance_fade_start; + bool distance_fade_start_is_true = false; + float distance_fade_end; + bool distance_fade_end_is_true = false; UniqueId guid; - bool is_wall; - int map_display_size; + bool guid_is_true = false; + MountFilter mount_filter; + bool mount_filter_is_true = false; + float alpha; + bool alpha_is_true = false; int map_id; + bool map_id_is_true = false; MapTypeFilter map_type_filter; - MountFilter mount_filter; - ProfessionFilter profession_filter; + bool map_type_filter_is_true = false; + bool render_on_minimap; + bool render_on_minimap_is_true = false; + CullChirality cull_chirality; + bool cull_chirality_is_true = false; bool render_ingame; + bool render_ingame_is_true = false; bool render_on_map; - bool render_on_minimap; - string schedule; - float schedule_duration; - SpecializationFilter specialization_filter; + bool render_on_map_is_true = false; + int map_display_size; + bool map_display_size_is_true = false; + bool is_wall; + bool is_wall_is_true = false; SpeciesFilter species_filter; - Image texture; + bool species_filter_is_true = false; TrailData trail_data; - TrailDataMapId trail_data_map_id; + bool trail_data_is_true = false; + SpecializationFilter specialization_filter; + bool specialization_filter_is_true = false; + int achievement_id; + bool achievement_id_is_true = false; + int achievement_bitmask; + bool achievement_bitmask_is_true = false; float trail_scale; + bool trail_scale_is_true = false; + MarkerCategory category; + bool category_is_true = false; + float schedule_duration; + bool schedule_duration_is_true = false; + string schedule; + bool schedule_is_true = false; + Color color; + bool color_is_true = false; + Image texture; + bool texture_is_true = false; + float animation_speed; + bool animation_speed_is_true = false; + bool can_fade; + bool can_fade_is_true = false; virtual string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors); + virtual vector as_xml() const; bool validate_attributes_of_type_marker_category(); }; \ No newline at end of file diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 5aee1831..d9f6b8aa 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -24,11 +24,6 @@ using namespace std; - - - - - bool has_suffix(std::string const &fullString, std::string const &ending) { if (fullString.length() >= ending.length()) { return (0 == fullString.compare (fullString.length() - ending.length(), ending.length(), ending)); @@ -37,10 +32,36 @@ bool has_suffix(std::string const &fullString, std::string const &ending) { } } +void write_xml_file(string xml_filepath, map* marker_categories, vector* parsed_pois) { + ofstream outfile; + string tab_string; + string file_text; + string new_file_path = xml_filepath + "export.xml"; + + file_text = "\n"; + for (const auto & category : *marker_categories) { + string text; + for (const auto& s : category.second.as_xml()) { text += s; }; + file_text = file_text + text + "\n"; + } + + file_text = file_text + "\n"; + for (const auto & parsed_poi : *parsed_pois) { + string text; + for (const auto& s : parsed_poi->as_xml()) { text += s; }; + file_text = file_text + text + "\n"; + } + file_text = file_text + "\n"; + + + outfile.open(new_file_path, ios::out); + outfile<< file_text; + outfile.close(); +} + Category* get_category(rapidxml::xml_node<>* node, map* marker_categories, vector* errors) { rapidxml::xml_attribute<>* attribute = find_attribute(node, "type"); vector split_categories = split(get_attribute_value(attribute), "."); - if (split_categories.size() == 0) { errors->push_back(new XMLAttributeValueError("Empty Type", attribute)); return nullptr; @@ -62,9 +83,7 @@ Category* get_category(rapidxml::xml_node<>* node, map* marker marker_categories = &output->children; } - return output; - } @@ -73,34 +92,32 @@ Category* get_category(rapidxml::xml_node<>* node, map* marker // // Parse the xml block into an in-memory array of Markers. //////////////////////////////////////////////////////////////////////////////// -vector parse_pois(rapidxml::xml_node<>* root_node, map* marker_categories, vector* errors) { - vector markers; - +vector parse_pois(rapidxml::xml_node<>* root_node, map* marker_categories, vector* errors) { + vector markers; for (rapidxml::xml_node<>* node = root_node->first_node(); node; node = node->next_sibling()) { - if (get_node_name(node) == "POI") { Category* default_category = get_category(node, marker_categories, errors); - Icon icon; + Icon* icon = new Icon(); if (default_category != nullptr) { - icon = default_category->default_icon; + *icon = default_category->default_icon; } - icon.init_from_xml(node, errors); + icon->init_from_xml(node, errors); markers.push_back(icon); } else if (get_node_name(node) == "Trail") { Category* default_category = get_category(node, marker_categories, errors); - Trail trail; + Trail* trail = new Trail(); if (default_category != nullptr) { - trail = default_category->default_trail; + *trail = default_category->default_trail; } - trail.init_from_xml(node, errors); + trail->init_from_xml(node, errors); markers.push_back(trail); } else { @@ -111,7 +128,7 @@ vector parse_pois(rapidxml::xml_node<>* root_node, map* node, map* marker_categories, vector* errors, int depth=0) { +void parse_marker_categories(rapidxml::xml_node<>* node, map* marker_categories, vector* errors, int depth = 0) { if (get_node_name(node) == "MarkerCategory") { string name = lowercase(find_attribute_value(node, "name")); @@ -133,7 +150,7 @@ void parse_marker_categories(rapidxml::xml_node<>* node, map* // // A function which parses a single XML file into their corrisponding classes. //////////////////////////////////////////////////////////////////////////////// -void parse_xml_file(string xml_filepath, map* marker_categories) { +void parse_xml_file(string xml_filepath, map* marker_categories, vector* parsed_pois) { vector errors; rapidxml::xml_document<> doc; @@ -144,7 +161,6 @@ void parse_xml_file(string xml_filepath, map* marker_categorie root_node = doc.first_node(); - // Validate the Root Node if (get_node_name(root_node) != "OverlayData") { errors.push_back(new XMLNodeNameError("Root node should be of type OverlayData", root_node)); @@ -153,14 +169,13 @@ void parse_xml_file(string xml_filepath, map* marker_categorie cout << "Root Node has attributes when it should have none in " << xml_filepath << endl; } - - for (rapidxml::xml_node<>* node = root_node->first_node(); node; node = node->next_sibling()) { if (get_node_name(node) == "MarkerCategory") { parse_marker_categories(node, marker_categories, &errors); } else if (get_node_name(node) == "POIs") { - parse_pois(node, marker_categories, &errors); + vector temp_vector = parse_pois(node, marker_categories, &errors); + move(temp_vector.begin(), temp_vector.end(), back_inserter(*parsed_pois)); } else { errors.push_back(new XMLNodeNameError("Unknown top-level node name", node)); @@ -172,10 +187,7 @@ void parse_xml_file(string xml_filepath, map* marker_categorie } } - - - -bool filename_comp(string a, string b){ +bool filename_comp(string a, string b) { return lowercase(a) < lowercase(b); } @@ -199,36 +211,41 @@ vector get_xml_files(string directory) { std::sort(files.begin(), files.end(), filename_comp); std::sort(subfolders.begin(), subfolders.end(), filename_comp); - for (const string & subfolder : subfolders ) { + for (const string & subfolder : subfolders) { vector subfiles = get_xml_files(subfolder); - files.insert( files.end(), subfiles.begin(), subfiles.end() ); + files.insert(files.end(), subfiles.begin(), subfiles.end() ); } return files; } -void convert_taco_directory(string directory) { - map marker_categories; - +void convert_taco_directory(string directory, map* marker_categories, vector* parsed_pois) { vector xml_files = get_xml_files(directory); for (const string & path : xml_files) { - parse_xml_file(path, &marker_categories); + parse_xml_file(path, marker_categories, parsed_pois); } } int main() { - + vector parsed_pois; + map marker_categories; for (const auto & entry : filesystem::directory_iterator("./packs")) { string path = entry.path(); if (entry.is_directory()) { - convert_taco_directory(path); + convert_taco_directory(path, &marker_categories, &parsed_pois); } else { continue; } } - + cout << "Hey! We Finished Parsing" << endl; + auto begin = chrono::high_resolution_clock::now(); + write_xml_file("./export_packs/", &marker_categories, &parsed_pois); + auto end = chrono::high_resolution_clock::now(); + auto dur = end - begin; + auto secs = std::chrono::duration_cast(dur).count(); + cout << "The write function took " << secs << " seconds to run" << endl; return 0; } From aa3d24ef01bca54fbdfe8ea3d29069b59e31f85f Mon Sep 17 00:00:00 2001 From: klingbolt <89052698+klingbolt@users.noreply.github.com> Date: Mon, 29 Aug 2022 21:02:41 -0400 Subject: [PATCH 077/539] Delete test.xml Not needed --- xml_converter/export_packs/test.xml | 55324 -------------------------- 1 file changed, 55324 deletions(-) delete mode 100644 xml_converter/export_packs/test.xml diff --git a/xml_converter/export_packs/test.xml b/xml_converter/export_packs/test.xml deleted file mode 100644 index 864091c4..00000000 --- a/xml_converter/export_packs/test.xml +++ /dev/null @@ -1,55324 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From 64bbd9d711acb5d2e1345638e78cf1e3721b3077 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 29 Aug 2022 22:48:10 -0400 Subject: [PATCH 078/539] Addressing comments from code review --- xml_converter/generators/code_generator.py | 24 +- .../cpp_templates/class_template.cpp | 16 +- .../cpp_templates/class_template.hpp | 2 +- xml_converter/src/attribute/bool.cpp | 5 +- xml_converter/src/category_gen.cpp | 42 +- xml_converter/src/category_gen.hpp | 16 +- xml_converter/src/icon_gen.cpp | 564 +++++++++--------- xml_converter/src/icon_gen.hpp | 184 +++--- xml_converter/src/parseable.cpp | 4 +- xml_converter/src/trail_gen.cpp | 296 ++++----- xml_converter/src/trail_gen.hpp | 94 +-- xml_converter/src/xml_converter.cpp | 10 +- 12 files changed, 619 insertions(+), 638 deletions(-) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 0eece2a3..a919c77b 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -337,8 +337,7 @@ def write_cpp_classes(self, output_directory: str) -> None: with open(os.path.join(output_directory, lowercase(cpp_class) + "_gen.hpp"), 'w') as f: f.write(header_template.render( cpp_class=cpp_class, - # attribute_variables=sorted(attribute_variables, key=get_attribute_variable_key), - attribute_variables=attribute_variables, + attribute_variables=sorted(attribute_variables, key=get_attribute_variable_key), cpp_include_paths=sorted(cpp_include_paths), attributes_of_type_marker_category=attributes_of_type_marker_category, )) @@ -348,8 +347,7 @@ def write_cpp_classes(self, output_directory: str) -> None: cpp_class=cpp_class, cpp_class_header=lowercase(cpp_class), xml_class_name=cpp_classes[cpp_class], - # attribute_variables=sorted(attribute_variables, key=get_attribute_variable_key), - attribute_variables=attribute_variables, + attribute_variables=sorted(attribute_variables, key=get_attribute_variable_key), enumerate=enumerate, attributes_of_type_marker_category=attributes_of_type_marker_category, )) @@ -408,25 +406,25 @@ def generate_cpp_variable_data( if fieldval['type'] == "CompoundValue": xml_export = fieldval['xml_export'] for i, component in enumerate(fieldval['components']): - xml_fields = [] - default_xml_fields = [] + component_xml_fields = [] + component_default_xml_fields = [] for j, item in enumerate(component['xml_fields']): if xml_export == "Children": - default_xml_fields.append(item) + component_default_xml_fields.append(item) if xml_export == "Parent": - default_xml_fields.append(fieldval["xml_fields"][0]) - xml_fields.append(lowercase(item, delimiter="")) - attribute_variable = AttributeVariable( + component_default_xml_fields.append(fieldval["xml_fields"][0]) + component_xml_fields.append(lowercase(item, delimiter="")) + component_attribute_variable = AttributeVariable( attribute_name=lowercase(component['name'], delimiter="_"), attribute_type="CompoundValue", cpp_type=doc_type_to_cpp_type[component['type']], class_name=class_name, - xml_fields=xml_fields, - default_xml_fields=default_xml_fields, + xml_fields=component_xml_fields, + default_xml_fields=component_default_xml_fields, xml_export=xml_export, is_child=True, ) - attribute_variables.append(attribute_variable) + attribute_variables.append(component_attribute_variable) for x in fieldval['xml_fields']: xml_fields.append(lowercase(x, delimiter="")) diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index 20fb7a4f..cac6fdbf 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -38,17 +38,17 @@ bool {{cpp_class}}::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vec {%-if i == 0 and n == 0:%} if (attributename == "{{value}}") { this->{{attribute_variable.attribute_name}} = parse_{{attribute_variable.class_name}}(attribute, errors); - this->{{attribute_variable.attribute_name}}_is_true = true; + this->{{attribute_variable.attribute_name}}_is_set = true; } - {%-elif (attribute_variable.attribute_type == "CompoundValue" and attribute_variable.class_name != attribute_variable.attribute_name) %} + {%-elif (attribute_variable.attribute_type == "CompoundValue" and attribute_variable.is_child == true) %} else if (attributename == "{{value}}") { this->{{attribute_variable.attribute_name}} = parse_float(attribute, errors); - this->{{attribute_variable.attribute_name}}_is_true = true; + this->{{attribute_variable.attribute_name}}_is_set = true; } {%- else: %} else if (attributename == "{{value}}") { this->{{attribute_variable.attribute_name}} = parse_{{attribute_variable.class_name}}(attribute, errors); - this->{{attribute_variable.attribute_name}}_is_true = true; + this->{{attribute_variable.attribute_name}}_is_set = true; } {%- endif %} {%- endfor %} @@ -74,22 +74,22 @@ vector {{cpp_class}}::as_xml() const { {%-for attribute_variable in attribute_variables%} {%- if (attribute_variable.attribute_type == "CompoundValue")%} {%-if (attribute_variable.xml_export == "Children" and attribute_variable.is_child == true)%} - if (this->{{attribute_variable.attribute_name}}_is_true) { + if (this->{{attribute_variable.attribute_name}}_is_set) { xml_node_contents.push_back(" {{attribute_variable.default_xml_fields[0]}}=\"" + to_string(this->{{attribute_variable.attribute_name}}) + "\""); } {%-elif (attribute_variable.xml_export == "Parent" and attribute_variable.is_child == false)%} - if (this->{{attribute_variable.attribute_name}}_is_true) { + if (this->{{attribute_variable.attribute_name}}_is_set) { xml_node_contents.push_back(" {{attribute_variable.default_xml_fields[0]}}=\"" + stringify_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}}) + "\""); } {%-elif (attribute_variable.xml_export == "Parent and Children")%} {%-for value in attribute_variable.xml_fields%} - if (this->{{attribute_variable.attribute_name}}_is_true) { + if (this->{{attribute_variable.attribute_name}}_is_set) { xml_node_contents.push_back(" {{value}}=\"" + stringify_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}}) + "\""); {%- endfor %} } {%- endif %} {%- else: %} - if (this->{{attribute_variable.attribute_name}}_is_true) { + if (this->{{attribute_variable.attribute_name}}_is_set) { xml_node_contents.push_back(" {{attribute_variable.default_xml_fields[0]}}=\"" + stringify_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}}) + "\""); } {%- endif %} diff --git a/xml_converter/generators/cpp_templates/class_template.hpp b/xml_converter/generators/cpp_templates/class_template.hpp index 9360fa13..ef1e06ff 100644 --- a/xml_converter/generators/cpp_templates/class_template.hpp +++ b/xml_converter/generators/cpp_templates/class_template.hpp @@ -28,7 +28,7 @@ class {{cpp_class}}: public Parseable { public: {%- for attribute_variable in attribute_variables: %} {{attribute_variable.cpp_type}} {{attribute_variable.attribute_name}}; - bool {{attribute_variable.attribute_name}}_is_true = false; + bool {{attribute_variable.attribute_name}}_is_set = false; {%- endfor %} {%- if cpp_class == "Category": %} diff --git a/xml_converter/src/attribute/bool.cpp b/xml_converter/src/attribute/bool.cpp index 43094419..883d50f7 100644 --- a/xml_converter/src/attribute/bool.cpp +++ b/xml_converter/src/attribute/bool.cpp @@ -26,11 +26,8 @@ string stringify_bool(bool attribute_value){ if (attribute_value == false) { return "false"; } - else if (attribute_value == true){ + else { return "true"; } - else{ - return "false"; - } } \ No newline at end of file diff --git a/xml_converter/src/category_gen.cpp b/xml_converter/src/category_gen.cpp index 5706f100..45c44efb 100644 --- a/xml_converter/src/category_gen.cpp +++ b/xml_converter/src/category_gen.cpp @@ -27,25 +27,25 @@ void Category::init_from_xml(rapidxml::xml_node<>* node, vector *erro bool Category::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors) { string attributename; attributename = normalize(get_attribute_name(attribute)); - if (attributename == "tipdescription") { - this->tooltip_name = parse_string(attribute, errors); - this->tooltip_name_is_true = true; - } - else if (attributename == "name") { - this->name = parse_string(attribute, errors); - this->name_is_true = true; + if (attributename == "defaulttoggle") { + this->default_visibility = parse_bool(attribute, errors); + this->default_visibility_is_set = true; } else if (attributename == "displayname") { this->display_name = parse_string(attribute, errors); - this->display_name_is_true = true; + this->display_name_is_set = true; } else if (attributename == "isseparator") { this->is_separator = parse_bool(attribute, errors); - this->is_separator_is_true = true; + this->is_separator_is_set = true; } - else if (attributename == "defaulttoggle") { - this->default_visibility = parse_bool(attribute, errors); - this->default_visibility_is_true = true; + else if (attributename == "name") { + this->name = parse_string(attribute, errors); + this->name_is_set = true; + } + else if (attributename == "tipdescription") { + this->tooltip_name = parse_string(attribute, errors); + this->tooltip_name_is_set = true; } else { return false; @@ -56,20 +56,20 @@ bool Category::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector Category::as_xml() const { vector xml_node_contents; xml_node_contents.push_back("tooltip_name_is_true) { - xml_node_contents.push_back(" TipDescription=\"" + stringify_string(this->tooltip_name) + "\""); - } - if (this->name_is_true) { - xml_node_contents.push_back(" Name=\"" + stringify_string(this->name) + "\""); + if (this->default_visibility_is_set) { + xml_node_contents.push_back(" DefaultToggle=\"" + stringify_bool(this->default_visibility) + "\""); } - if (this->display_name_is_true) { + if (this->display_name_is_set) { xml_node_contents.push_back(" DisplayName=\"" + stringify_string(this->display_name) + "\""); } - if (this->is_separator_is_true) { + if (this->is_separator_is_set) { xml_node_contents.push_back(" IsSeparator=\"" + stringify_bool(this->is_separator) + "\""); } - if (this->default_visibility_is_true) { - xml_node_contents.push_back(" DefaultToggle=\"" + stringify_bool(this->default_visibility) + "\""); + if (this->name_is_set) { + xml_node_contents.push_back(" Name=\"" + stringify_string(this->name) + "\""); + } + if (this->tooltip_name_is_set) { + xml_node_contents.push_back(" TipDescription=\"" + stringify_string(this->tooltip_name) + "\""); } xml_node_contents.push_back(">\n"); diff --git a/xml_converter/src/category_gen.hpp b/xml_converter/src/category_gen.hpp index 7dfb3d62..470ac899 100644 --- a/xml_converter/src/category_gen.hpp +++ b/xml_converter/src/category_gen.hpp @@ -13,16 +13,16 @@ using namespace std; class Category: public Parseable { public: - string tooltip_name; - bool tooltip_name_is_true = false; - string name; - bool name_is_true = false; + bool default_visibility; + bool default_visibility_is_set = false; string display_name; - bool display_name_is_true = false; + bool display_name_is_set = false; bool is_separator; - bool is_separator_is_true = false; - bool default_visibility; - bool default_visibility_is_true = false; + bool is_separator_is_set = false; + string name; + bool name_is_set = false; + string tooltip_name; + bool tooltip_name_is_set = false; map children; Icon default_icon; Trail default_trail; diff --git a/xml_converter/src/icon_gen.cpp b/xml_converter/src/icon_gen.cpp index 6d666b61..5693505b 100644 --- a/xml_converter/src/icon_gen.cpp +++ b/xml_converter/src/icon_gen.cpp @@ -10,289 +10,269 @@ string Icon::classname() { bool Icon::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors) { string attributename; attributename = normalize(get_attribute_name(attribute)); - if (attributename == "minsize") { - this->minimum_size_on_screen = parse_int(attribute, errors); - this->minimum_size_on_screen_is_true = true; - } - else if (attributename == "maxsize") { - this->maximum_size_on_screen = parse_int(attribute, errors); - this->maximum_size_on_screen_is_true = true; - } - else if (attributename == "festival") { - this->festival_filter = parse_festival_filter(attribute, errors); - this->festival_filter_is_true = true; + if (attributename == "achievementbit") { + this->achievement_bitmask = parse_int(attribute, errors); + this->achievement_bitmask_is_set = true; } - else if (attributename == "profession") { - this->profession_filter = parse_profession_filter(attribute, errors); - this->profession_filter_is_true = true; + else if (attributename == "achievementid") { + this->achievement_id = parse_int(attribute, errors); + this->achievement_id_is_set = true; } - else if (attributename == "fadenear") { - this->distance_fade_start = parse_float(attribute, errors); - this->distance_fade_start_is_true = true; + else if (attributename == "alpha") { + this->alpha = parse_float(attribute, errors); + this->alpha_is_set = true; } - else if (attributename == "distancefadestart") { - this->distance_fade_start = parse_float(attribute, errors); - this->distance_fade_start_is_true = true; + else if (attributename == "autotrigger") { + this->auto_trigger = parse_bool(attribute, errors); + this->auto_trigger_is_set = true; } - else if (attributename == "fadefar") { - this->distance_fade_end = parse_float(attribute, errors); - this->distance_fade_end_is_true = true; + else if (attributename == "bouncedelay") { + this->bounce_delay = parse_float(attribute, errors); + this->bounce_delay_is_set = true; } - else if (attributename == "distancefadeend") { - this->distance_fade_end = parse_float(attribute, errors); - this->distance_fade_end_is_true = true; + else if (attributename == "bounceduration") { + this->bounce_duration = parse_float(attribute, errors); + this->bounce_duration_is_set = true; } - else if (attributename == "invertbehavior") { - this->invert_visibility = parse_bool(attribute, errors); - this->invert_visibility_is_true = true; + else if (attributename == "bounceheight") { + this->bounce_height = parse_float(attribute, errors); + this->bounce_height_is_set = true; } - else if (attributename == "show") { - this->show_category = parse_marker_category(attribute, errors); - this->show_category_is_true = true; + else if (attributename == "canfade") { + this->can_fade = parse_bool(attribute, errors); + this->can_fade_is_set = true; } - else if (attributename == "resetlength") { - this->reset_length = parse_float(attribute, errors); - this->reset_length_is_true = true; + else if (attributename == "type") { + this->category = parse_marker_category(attribute, errors); + this->category_is_set = true; } - else if (attributename == "info") { - this->info_message = parse_string(attribute, errors); - this->info_message_is_true = true; + else if (attributename == "category") { + this->category = parse_marker_category(attribute, errors); + this->category_is_set = true; } - else if (attributename == "bounceheight") { - this->bounce_height = parse_float(attribute, errors); - this->bounce_height_is_true = true; + else if (attributename == "color") { + this->color = parse_color(attribute, errors); + this->color_is_set = true; } else if (attributename == "copy") { this->copy_clipboard = parse_string(attribute, errors); - this->copy_clipboard_is_true = true; + this->copy_clipboard_is_set = true; } else if (attributename == "copyclipboard") { this->copy_clipboard = parse_string(attribute, errors); - this->copy_clipboard_is_true = true; + this->copy_clipboard_is_set = true; } - else if (attributename == "guid") { - this->guid = parse_unique_id(attribute, errors); - this->guid_is_true = true; + else if (attributename == "copymessage") { + this->copy_message = parse_string(attribute, errors); + this->copy_message_is_set = true; } - else if (attributename == "bouncedelay") { - this->bounce_delay = parse_float(attribute, errors); - this->bounce_delay_is_true = true; + else if (attributename == "cull") { + this->cull_chirality = parse_cull_chirality(attribute, errors); + this->cull_chirality_is_set = true; } - else if (attributename == "autotrigger") { - this->auto_trigger = parse_bool(attribute, errors); - this->auto_trigger_is_true = true; + else if (attributename == "fadefar") { + this->distance_fade_end = parse_float(attribute, errors); + this->distance_fade_end_is_set = true; } - else if (attributename == "behavior") { - this->reset_behavior = parse_reset_behavior(attribute, errors); - this->reset_behavior_is_true = true; + else if (attributename == "distancefadeend") { + this->distance_fade_end = parse_float(attribute, errors); + this->distance_fade_end_is_set = true; } - else if (attributename == "bounceduration") { - this->bounce_duration = parse_float(attribute, errors); - this->bounce_duration_is_true = true; + else if (attributename == "fadenear") { + this->distance_fade_start = parse_float(attribute, errors); + this->distance_fade_start_is_set = true; + } + else if (attributename == "distancefadestart") { + this->distance_fade_start = parse_float(attribute, errors); + this->distance_fade_start_is_set = true; + } + else if (attributename == "rotate") { + this->euler_rotation = parse_euler_rotation(attribute, errors); + this->euler_rotation_is_set = true; + } + else if (attributename == "festival") { + this->festival_filter = parse_festival_filter(attribute, errors); + this->festival_filter_is_set = true; + } + else if (attributename == "guid") { + this->guid = parse_unique_id(attribute, errors); + this->guid_is_set = true; } else if (attributename == "hascountdown") { this->has_countdown = parse_bool(attribute, errors); - this->has_countdown_is_true = true; + this->has_countdown_is_set = true; + } + else if (attributename == "heightoffset") { + this->heightoffset = parse_float(attribute, errors); + this->heightoffset_is_set = true; } else if (attributename == "hide") { this->hide_category = parse_marker_category(attribute, errors); - this->hide_category_is_true = true; - } - else if (attributename == "copymessage") { - this->copy_message = parse_string(attribute, errors); - this->copy_message_is_true = true; + this->hide_category_is_set = true; } - else if (attributename == "toggle") { - this->toggle_category = parse_marker_category(attribute, errors); - this->toggle_category_is_true = true; + else if (attributename == "iconfile") { + this->icon = parse_image(attribute, errors); + this->icon_is_set = true; } - else if (attributename == "triggerrange") { - this->trigger_range = parse_float(attribute, errors); - this->trigger_range_is_true = true; + else if (attributename == "iconsize") { + this->icon_size = parse_float(attribute, errors); + this->icon_size_is_set = true; } - else if (attributename == "inforange") { - this->trigger_range = parse_float(attribute, errors); - this->trigger_range_is_true = true; + else if (attributename == "info") { + this->info_message = parse_string(attribute, errors); + this->info_message_is_set = true; } - else if (attributename == "mount") { - this->mount_filter = parse_mount_filter(attribute, errors); - this->mount_filter_is_true = true; + else if (attributename == "invertbehavior") { + this->invert_visibility = parse_bool(attribute, errors); + this->invert_visibility_is_set = true; } - else if (attributename == "alpha") { - this->alpha = parse_float(attribute, errors); - this->alpha_is_true = true; + else if (attributename == "mapdisplaysize") { + this->map_display_size = parse_int(attribute, errors); + this->map_display_size_is_set = true; } else if (attributename == "mapid") { this->map_id = parse_int(attribute, errors); - this->map_id_is_true = true; + this->map_id_is_set = true; } else if (attributename == "mapid") { this->map_type_filter = parse_map_type_filter(attribute, errors); - this->map_type_filter_is_true = true; + this->map_type_filter_is_set = true; } - else if (attributename == "minimapvisibility") { - this->render_on_minimap = parse_bool(attribute, errors); - this->render_on_minimap_is_true = true; + else if (attributename == "maxsize") { + this->maximum_size_on_screen = parse_int(attribute, errors); + this->maximum_size_on_screen_is_set = true; } - else if (attributename == "bhminimapvisibility") { - this->render_on_minimap = parse_bool(attribute, errors); - this->render_on_minimap_is_true = true; + else if (attributename == "minsize") { + this->minimum_size_on_screen = parse_int(attribute, errors); + this->minimum_size_on_screen_is_set = true; } - else if (attributename == "cull") { - this->cull_chirality = parse_cull_chirality(attribute, errors); - this->cull_chirality_is_true = true; + else if (attributename == "mount") { + this->mount_filter = parse_mount_filter(attribute, errors); + this->mount_filter_is_set = true; + } + else if (attributename == "position") { + this->position = parse_position(attribute, errors); + this->position_is_set = true; + } + else if (attributename == "profession") { + this->profession_filter = parse_profession_filter(attribute, errors); + this->profession_filter_is_set = true; } else if (attributename == "ingamevisibility") { this->render_ingame = parse_bool(attribute, errors); - this->render_ingame_is_true = true; + this->render_ingame_is_set = true; } else if (attributename == "bhingamevisibility") { this->render_ingame = parse_bool(attribute, errors); - this->render_ingame_is_true = true; + this->render_ingame_is_set = true; } else if (attributename == "mapvisibility") { this->render_on_map = parse_bool(attribute, errors); - this->render_on_map_is_true = true; + this->render_on_map_is_set = true; } else if (attributename == "bhmapvisibility") { this->render_on_map = parse_bool(attribute, errors); - this->render_on_map_is_true = true; + this->render_on_map_is_set = true; } - else if (attributename == "mapdisplaysize") { - this->map_display_size = parse_int(attribute, errors); - this->map_display_size_is_true = true; + else if (attributename == "minimapvisibility") { + this->render_on_minimap = parse_bool(attribute, errors); + this->render_on_minimap_is_set = true; + } + else if (attributename == "bhminimapvisibility") { + this->render_on_minimap = parse_bool(attribute, errors); + this->render_on_minimap_is_set = true; + } + else if (attributename == "behavior") { + this->reset_behavior = parse_reset_behavior(attribute, errors); + this->reset_behavior_is_set = true; + } + else if (attributename == "resetlength") { + this->reset_length = parse_float(attribute, errors); + this->reset_length_is_set = true; } else if (attributename == "scaleonmapwithzoom") { this->scale_on_map_with_zoom = parse_bool(attribute, errors); - this->scale_on_map_with_zoom_is_true = true; + this->scale_on_map_with_zoom_is_set = true; + } + else if (attributename == "schedule") { + this->schedule = parse_string(attribute, errors); + this->schedule_is_set = true; + } + else if (attributename == "scheduleduration") { + this->schedule_duration = parse_float(attribute, errors); + this->schedule_duration_is_set = true; + } + else if (attributename == "show") { + this->show_category = parse_marker_category(attribute, errors); + this->show_category_is_set = true; + } + else if (attributename == "specialization") { + this->specialization_filter = parse_specialization_filter(attribute, errors); + this->specialization_filter_is_set = true; } else if (attributename == "race") { this->species_filter = parse_species_filter(attribute, errors); - this->species_filter_is_true = true; + this->species_filter_is_set = true; } else if (attributename == "species") { this->species_filter = parse_species_filter(attribute, errors); - this->species_filter_is_true = true; + this->species_filter_is_set = true; } - else if (attributename == "tipdescription") { - this->tooltip_name = parse_string(attribute, errors); - this->tooltip_name_is_true = true; + else if (attributename == "toggle") { + this->toggle_category = parse_marker_category(attribute, errors); + this->toggle_category_is_set = true; } else if (attributename == "tipname") { this->tooltip_description = parse_string(attribute, errors); - this->tooltip_description_is_true = true; + this->tooltip_description_is_set = true; + } + else if (attributename == "tipdescription") { + this->tooltip_name = parse_string(attribute, errors); + this->tooltip_name_is_set = true; + } + else if (attributename == "triggerrange") { + this->trigger_range = parse_float(attribute, errors); + this->trigger_range_is_set = true; + } + else if (attributename == "inforange") { + this->trigger_range = parse_float(attribute, errors); + this->trigger_range_is_set = true; } else if (attributename == "xpos") { this->x_position = parse_float(attribute, errors); - this->x_position_is_true = true; + this->x_position_is_set = true; } else if (attributename == "positionx") { this->x_position = parse_float(attribute, errors); - this->x_position_is_true = true; + this->x_position_is_set = true; + } + else if (attributename == "rotatex") { + this->x_rotation = parse_float(attribute, errors); + this->x_rotation_is_set = true; } else if (attributename == "ypos") { this->y_position = parse_float(attribute, errors); - this->y_position_is_true = true; + this->y_position_is_set = true; } else if (attributename == "positiony") { this->y_position = parse_float(attribute, errors); - this->y_position_is_true = true; + this->y_position_is_set = true; + } + else if (attributename == "rotatey") { + this->y_rotation = parse_float(attribute, errors); + this->y_rotation_is_set = true; } else if (attributename == "zpos") { this->z_position = parse_float(attribute, errors); - this->z_position_is_true = true; + this->z_position_is_set = true; } else if (attributename == "positionz") { this->z_position = parse_float(attribute, errors); - this->z_position_is_true = true; - } - else if (attributename == "position") { - this->z_position = parse_float(attribute, errors); - this->z_position_is_true = true; - } - else if (attributename == "zpos") { - this->position = parse_position(attribute, errors); - this->position_is_true = true; - } - else if (attributename == "positionz") { - this->position = parse_position(attribute, errors); - this->position_is_true = true; - } - else if (attributename == "position") { - this->position = parse_position(attribute, errors); - this->position_is_true = true; - } - else if (attributename == "heightoffset") { - this->heightoffset = parse_float(attribute, errors); - this->heightoffset_is_true = true; - } - else if (attributename == "specialization") { - this->specialization_filter = parse_specialization_filter(attribute, errors); - this->specialization_filter_is_true = true; - } - else if (attributename == "achievementid") { - this->achievement_id = parse_int(attribute, errors); - this->achievement_id_is_true = true; - } - else if (attributename == "achievementbit") { - this->achievement_bitmask = parse_int(attribute, errors); - this->achievement_bitmask_is_true = true; - } - else if (attributename == "iconsize") { - this->icon_size = parse_float(attribute, errors); - this->icon_size_is_true = true; - } - else if (attributename == "type") { - this->category = parse_marker_category(attribute, errors); - this->category_is_true = true; - } - else if (attributename == "category") { - this->category = parse_marker_category(attribute, errors); - this->category_is_true = true; - } - else if (attributename == "scheduleduration") { - this->schedule_duration = parse_float(attribute, errors); - this->schedule_duration_is_true = true; - } - else if (attributename == "schedule") { - this->schedule = parse_string(attribute, errors); - this->schedule_is_true = true; - } - else if (attributename == "color") { - this->color = parse_color(attribute, errors); - this->color_is_true = true; - } - else if (attributename == "iconfile") { - this->icon = parse_image(attribute, errors); - this->icon_is_true = true; - } - else if (attributename == "canfade") { - this->can_fade = parse_bool(attribute, errors); - this->can_fade_is_true = true; - } - else if (attributename == "rotatex") { - this->x_rotation = parse_float(attribute, errors); - this->x_rotation_is_true = true; - } - else if (attributename == "rotatey") { - this->y_rotation = parse_float(attribute, errors); - this->y_rotation_is_true = true; + this->z_position_is_set = true; } else if (attributename == "rotatez") { this->z_rotation = parse_float(attribute, errors); - this->z_rotation_is_true = true; - } - else if (attributename == "rotate") { - this->z_rotation = parse_float(attribute, errors); - this->z_rotation_is_true = true; - } - else if (attributename == "rotatez") { - this->euler_rotation = parse_euler_rotation(attribute, errors); - this->euler_rotation_is_true = true; - } - else if (attributename == "rotate") { - this->euler_rotation = parse_euler_rotation(attribute, errors); - this->euler_rotation_is_true = true; + this->z_rotation_is_set = true; } else { return false; @@ -310,155 +290,155 @@ bool Icon::validate_attributes_of_type_marker_category() { vector Icon::as_xml() const { vector xml_node_contents; xml_node_contents.push_back("minimum_size_on_screen_is_true) { - xml_node_contents.push_back(" MinSize=\"" + stringify_int(this->minimum_size_on_screen) + "\""); - } - if (this->maximum_size_on_screen_is_true) { - xml_node_contents.push_back(" MaxSize=\"" + stringify_int(this->maximum_size_on_screen) + "\""); + if (this->achievement_bitmask_is_set) { + xml_node_contents.push_back(" AchievementBit=\"" + stringify_int(this->achievement_bitmask) + "\""); } - if (this->festival_filter_is_true) { - xml_node_contents.push_back(" Festival=\"" + stringify_festival_filter(this->festival_filter) + "\""); + if (this->achievement_id_is_set) { + xml_node_contents.push_back(" AchievementId=\"" + stringify_int(this->achievement_id) + "\""); } - if (this->profession_filter_is_true) { - xml_node_contents.push_back(" Profession=\"" + stringify_profession_filter(this->profession_filter) + "\""); + if (this->alpha_is_set) { + xml_node_contents.push_back(" Alpha=\"" + stringify_float(this->alpha) + "\""); } - if (this->distance_fade_start_is_true) { - xml_node_contents.push_back(" FadeNear=\"" + stringify_float(this->distance_fade_start) + "\""); + if (this->auto_trigger_is_set) { + xml_node_contents.push_back(" AutoTrigger=\"" + stringify_bool(this->auto_trigger) + "\""); } - if (this->distance_fade_end_is_true) { - xml_node_contents.push_back(" FadeFar=\"" + stringify_float(this->distance_fade_end) + "\""); + if (this->bounce_delay_is_set) { + xml_node_contents.push_back(" BounceDelay=\"" + stringify_float(this->bounce_delay) + "\""); } - if (this->invert_visibility_is_true) { - xml_node_contents.push_back(" InvertBehavior=\"" + stringify_bool(this->invert_visibility) + "\""); + if (this->bounce_duration_is_set) { + xml_node_contents.push_back(" BounceDuration=\"" + stringify_float(this->bounce_duration) + "\""); } - if (this->show_category_is_true) { - xml_node_contents.push_back(" Show=\"" + stringify_marker_category(this->show_category) + "\""); + if (this->bounce_height_is_set) { + xml_node_contents.push_back(" BounceHeight=\"" + stringify_float(this->bounce_height) + "\""); } - if (this->reset_length_is_true) { - xml_node_contents.push_back(" ResetLength=\"" + stringify_float(this->reset_length) + "\""); + if (this->can_fade_is_set) { + xml_node_contents.push_back(" CanFade=\"" + stringify_bool(this->can_fade) + "\""); } - if (this->info_message_is_true) { - xml_node_contents.push_back(" Info=\"" + stringify_string(this->info_message) + "\""); + if (this->category_is_set) { + xml_node_contents.push_back(" Type=\"" + stringify_marker_category(this->category) + "\""); } - if (this->bounce_height_is_true) { - xml_node_contents.push_back(" BounceHeight=\"" + stringify_float(this->bounce_height) + "\""); + if (this->color_is_set) { + xml_node_contents.push_back(" Color=\"" + stringify_color(this->color) + "\""); } - if (this->copy_clipboard_is_true) { + if (this->copy_clipboard_is_set) { xml_node_contents.push_back(" Copy=\"" + stringify_string(this->copy_clipboard) + "\""); } - if (this->guid_is_true) { - xml_node_contents.push_back(" GUID=\"" + stringify_unique_id(this->guid) + "\""); + if (this->copy_message_is_set) { + xml_node_contents.push_back(" CopyMessage=\"" + stringify_string(this->copy_message) + "\""); } - if (this->bounce_delay_is_true) { - xml_node_contents.push_back(" BounceDelay=\"" + stringify_float(this->bounce_delay) + "\""); + if (this->cull_chirality_is_set) { + xml_node_contents.push_back(" Cull=\"" + stringify_cull_chirality(this->cull_chirality) + "\""); } - if (this->auto_trigger_is_true) { - xml_node_contents.push_back(" AutoTrigger=\"" + stringify_bool(this->auto_trigger) + "\""); + if (this->distance_fade_end_is_set) { + xml_node_contents.push_back(" FadeFar=\"" + stringify_float(this->distance_fade_end) + "\""); } - if (this->reset_behavior_is_true) { - xml_node_contents.push_back(" Behavior=\"" + stringify_reset_behavior(this->reset_behavior) + "\""); + if (this->distance_fade_start_is_set) { + xml_node_contents.push_back(" FadeNear=\"" + stringify_float(this->distance_fade_start) + "\""); } - if (this->bounce_duration_is_true) { - xml_node_contents.push_back(" BounceDuration=\"" + stringify_float(this->bounce_duration) + "\""); + if (this->euler_rotation_is_set) { + xml_node_contents.push_back(" Rotate=\"" + stringify_euler_rotation(this->euler_rotation) + "\""); + } + if (this->festival_filter_is_set) { + xml_node_contents.push_back(" Festival=\"" + stringify_festival_filter(this->festival_filter) + "\""); } - if (this->has_countdown_is_true) { + if (this->guid_is_set) { + xml_node_contents.push_back(" GUID=\"" + stringify_unique_id(this->guid) + "\""); + } + if (this->has_countdown_is_set) { xml_node_contents.push_back(" HasCountdown=\"" + stringify_bool(this->has_countdown) + "\""); } - if (this->hide_category_is_true) { + if (this->heightoffset_is_set) { + xml_node_contents.push_back(" HeightOffset=\"" + stringify_float(this->heightoffset) + "\""); + } + if (this->hide_category_is_set) { xml_node_contents.push_back(" Hide=\"" + stringify_marker_category(this->hide_category) + "\""); } - if (this->copy_message_is_true) { - xml_node_contents.push_back(" CopyMessage=\"" + stringify_string(this->copy_message) + "\""); + if (this->icon_is_set) { + xml_node_contents.push_back(" IconFile=\"" + stringify_image(this->icon) + "\""); } - if (this->toggle_category_is_true) { - xml_node_contents.push_back(" Toggle=\"" + stringify_marker_category(this->toggle_category) + "\""); + if (this->icon_size_is_set) { + xml_node_contents.push_back(" IconSize=\"" + stringify_float(this->icon_size) + "\""); } - if (this->trigger_range_is_true) { - xml_node_contents.push_back(" TriggerRange=\"" + stringify_float(this->trigger_range) + "\""); + if (this->info_message_is_set) { + xml_node_contents.push_back(" Info=\"" + stringify_string(this->info_message) + "\""); } - if (this->mount_filter_is_true) { - xml_node_contents.push_back(" Mount=\"" + stringify_mount_filter(this->mount_filter) + "\""); + if (this->invert_visibility_is_set) { + xml_node_contents.push_back(" InvertBehavior=\"" + stringify_bool(this->invert_visibility) + "\""); } - if (this->alpha_is_true) { - xml_node_contents.push_back(" Alpha=\"" + stringify_float(this->alpha) + "\""); + if (this->map_display_size_is_set) { + xml_node_contents.push_back(" MapDisplaySize=\"" + stringify_int(this->map_display_size) + "\""); } - if (this->map_id_is_true) { + if (this->map_id_is_set) { xml_node_contents.push_back(" MapID=\"" + stringify_int(this->map_id) + "\""); } - if (this->map_type_filter_is_true) { + if (this->map_type_filter_is_set) { xml_node_contents.push_back(" MapID=\"" + stringify_map_type_filter(this->map_type_filter) + "\""); } - if (this->render_on_minimap_is_true) { - xml_node_contents.push_back(" MinimapVisibility=\"" + stringify_bool(this->render_on_minimap) + "\""); + if (this->maximum_size_on_screen_is_set) { + xml_node_contents.push_back(" MaxSize=\"" + stringify_int(this->maximum_size_on_screen) + "\""); } - if (this->cull_chirality_is_true) { - xml_node_contents.push_back(" Cull=\"" + stringify_cull_chirality(this->cull_chirality) + "\""); + if (this->minimum_size_on_screen_is_set) { + xml_node_contents.push_back(" MinSize=\"" + stringify_int(this->minimum_size_on_screen) + "\""); } - if (this->render_ingame_is_true) { - xml_node_contents.push_back(" IngameVisibility=\"" + stringify_bool(this->render_ingame) + "\""); + if (this->mount_filter_is_set) { + xml_node_contents.push_back(" Mount=\"" + stringify_mount_filter(this->mount_filter) + "\""); } - if (this->render_on_map_is_true) { - xml_node_contents.push_back(" MapVisibility=\"" + stringify_bool(this->render_on_map) + "\""); + if (this->profession_filter_is_set) { + xml_node_contents.push_back(" Profession=\"" + stringify_profession_filter(this->profession_filter) + "\""); } - if (this->map_display_size_is_true) { - xml_node_contents.push_back(" MapDisplaySize=\"" + stringify_int(this->map_display_size) + "\""); + if (this->render_ingame_is_set) { + xml_node_contents.push_back(" IngameVisibility=\"" + stringify_bool(this->render_ingame) + "\""); } - if (this->scale_on_map_with_zoom_is_true) { - xml_node_contents.push_back(" ScaleOnMapWithZoom=\"" + stringify_bool(this->scale_on_map_with_zoom) + "\""); + if (this->render_on_map_is_set) { + xml_node_contents.push_back(" MapVisibility=\"" + stringify_bool(this->render_on_map) + "\""); } - if (this->species_filter_is_true) { - xml_node_contents.push_back(" Race=\"" + stringify_species_filter(this->species_filter) + "\""); + if (this->render_on_minimap_is_set) { + xml_node_contents.push_back(" MinimapVisibility=\"" + stringify_bool(this->render_on_minimap) + "\""); } - if (this->tooltip_name_is_true) { - xml_node_contents.push_back(" TipDescription=\"" + stringify_string(this->tooltip_name) + "\""); + if (this->reset_behavior_is_set) { + xml_node_contents.push_back(" Behavior=\"" + stringify_reset_behavior(this->reset_behavior) + "\""); } - if (this->tooltip_description_is_true) { - xml_node_contents.push_back(" TipName=\"" + stringify_string(this->tooltip_description) + "\""); + if (this->reset_length_is_set) { + xml_node_contents.push_back(" ResetLength=\"" + stringify_float(this->reset_length) + "\""); } - if (this->x_position_is_true) { - xml_node_contents.push_back(" XPos=\"" + to_string(this->x_position) + "\""); + if (this->scale_on_map_with_zoom_is_set) { + xml_node_contents.push_back(" ScaleOnMapWithZoom=\"" + stringify_bool(this->scale_on_map_with_zoom) + "\""); } - if (this->y_position_is_true) { - xml_node_contents.push_back(" YPos=\"" + to_string(this->y_position) + "\""); + if (this->schedule_is_set) { + xml_node_contents.push_back(" Schedule=\"" + stringify_string(this->schedule) + "\""); } - if (this->z_position_is_true) { - xml_node_contents.push_back(" ZPos=\"" + to_string(this->z_position) + "\""); + if (this->schedule_duration_is_set) { + xml_node_contents.push_back(" ScheduleDuration=\"" + stringify_float(this->schedule_duration) + "\""); } - if (this->heightoffset_is_true) { - xml_node_contents.push_back(" HeightOffset=\"" + stringify_float(this->heightoffset) + "\""); + if (this->show_category_is_set) { + xml_node_contents.push_back(" Show=\"" + stringify_marker_category(this->show_category) + "\""); } - if (this->specialization_filter_is_true) { + if (this->specialization_filter_is_set) { xml_node_contents.push_back(" Specialization=\"" + stringify_specialization_filter(this->specialization_filter) + "\""); } - if (this->achievement_id_is_true) { - xml_node_contents.push_back(" AchievementId=\"" + stringify_int(this->achievement_id) + "\""); - } - if (this->achievement_bitmask_is_true) { - xml_node_contents.push_back(" AchievementBit=\"" + stringify_int(this->achievement_bitmask) + "\""); - } - if (this->icon_size_is_true) { - xml_node_contents.push_back(" IconSize=\"" + stringify_float(this->icon_size) + "\""); + if (this->species_filter_is_set) { + xml_node_contents.push_back(" Race=\"" + stringify_species_filter(this->species_filter) + "\""); } - if (this->category_is_true) { - xml_node_contents.push_back(" Type=\"" + stringify_marker_category(this->category) + "\""); + if (this->toggle_category_is_set) { + xml_node_contents.push_back(" Toggle=\"" + stringify_marker_category(this->toggle_category) + "\""); } - if (this->schedule_duration_is_true) { - xml_node_contents.push_back(" ScheduleDuration=\"" + stringify_float(this->schedule_duration) + "\""); + if (this->tooltip_description_is_set) { + xml_node_contents.push_back(" TipName=\"" + stringify_string(this->tooltip_description) + "\""); } - if (this->schedule_is_true) { - xml_node_contents.push_back(" Schedule=\"" + stringify_string(this->schedule) + "\""); + if (this->tooltip_name_is_set) { + xml_node_contents.push_back(" TipDescription=\"" + stringify_string(this->tooltip_name) + "\""); } - if (this->color_is_true) { - xml_node_contents.push_back(" Color=\"" + stringify_color(this->color) + "\""); + if (this->trigger_range_is_set) { + xml_node_contents.push_back(" TriggerRange=\"" + stringify_float(this->trigger_range) + "\""); } - if (this->icon_is_true) { - xml_node_contents.push_back(" IconFile=\"" + stringify_image(this->icon) + "\""); + if (this->x_position_is_set) { + xml_node_contents.push_back(" XPos=\"" + to_string(this->x_position) + "\""); } - if (this->can_fade_is_true) { - xml_node_contents.push_back(" CanFade=\"" + stringify_bool(this->can_fade) + "\""); + if (this->y_position_is_set) { + xml_node_contents.push_back(" YPos=\"" + to_string(this->y_position) + "\""); } - if (this->euler_rotation_is_true) { - xml_node_contents.push_back(" Rotate=\"" + stringify_euler_rotation(this->euler_rotation) + "\""); + if (this->z_position_is_set) { + xml_node_contents.push_back(" ZPos=\"" + to_string(this->z_position) + "\""); } xml_node_contents.push_back("/>"); return xml_node_contents; diff --git a/xml_converter/src/icon_gen.hpp b/xml_converter/src/icon_gen.hpp index 0d763365..22fa6957 100644 --- a/xml_converter/src/icon_gen.hpp +++ b/xml_converter/src/icon_gen.hpp @@ -26,114 +26,114 @@ using namespace std; class Icon: public Parseable { public: - int minimum_size_on_screen; - bool minimum_size_on_screen_is_true = false; - int maximum_size_on_screen; - bool maximum_size_on_screen_is_true = false; - FestivalFilter festival_filter; - bool festival_filter_is_true = false; - ProfessionFilter profession_filter; - bool profession_filter_is_true = false; - float distance_fade_start; - bool distance_fade_start_is_true = false; - float distance_fade_end; - bool distance_fade_end_is_true = false; - bool invert_visibility; - bool invert_visibility_is_true = false; - MarkerCategory show_category; - bool show_category_is_true = false; - float reset_length; - bool reset_length_is_true = false; - string info_message; - bool info_message_is_true = false; + int achievement_bitmask; + bool achievement_bitmask_is_set = false; + int achievement_id; + bool achievement_id_is_set = false; + float alpha; + bool alpha_is_set = false; + bool auto_trigger; + bool auto_trigger_is_set = false; + float bounce_delay; + bool bounce_delay_is_set = false; + float bounce_duration; + bool bounce_duration_is_set = false; float bounce_height; - bool bounce_height_is_true = false; + bool bounce_height_is_set = false; + bool can_fade; + bool can_fade_is_set = false; + MarkerCategory category; + bool category_is_set = false; + Color color; + bool color_is_set = false; string copy_clipboard; - bool copy_clipboard_is_true = false; + bool copy_clipboard_is_set = false; + string copy_message; + bool copy_message_is_set = false; + CullChirality cull_chirality; + bool cull_chirality_is_set = false; + float distance_fade_end; + bool distance_fade_end_is_set = false; + float distance_fade_start; + bool distance_fade_start_is_set = false; + EulerRotation euler_rotation; + bool euler_rotation_is_set = false; + FestivalFilter festival_filter; + bool festival_filter_is_set = false; UniqueId guid; - bool guid_is_true = false; - float bounce_delay; - bool bounce_delay_is_true = false; - bool auto_trigger; - bool auto_trigger_is_true = false; - ResetBehavior reset_behavior; - bool reset_behavior_is_true = false; - float bounce_duration; - bool bounce_duration_is_true = false; + bool guid_is_set = false; bool has_countdown; - bool has_countdown_is_true = false; + bool has_countdown_is_set = false; + float heightoffset; + bool heightoffset_is_set = false; MarkerCategory hide_category; - bool hide_category_is_true = false; - string copy_message; - bool copy_message_is_true = false; - MarkerCategory toggle_category; - bool toggle_category_is_true = false; - float trigger_range; - bool trigger_range_is_true = false; - MountFilter mount_filter; - bool mount_filter_is_true = false; - float alpha; - bool alpha_is_true = false; + bool hide_category_is_set = false; + Image icon; + bool icon_is_set = false; + float icon_size; + bool icon_size_is_set = false; + string info_message; + bool info_message_is_set = false; + bool invert_visibility; + bool invert_visibility_is_set = false; + int map_display_size; + bool map_display_size_is_set = false; int map_id; - bool map_id_is_true = false; + bool map_id_is_set = false; MapTypeFilter map_type_filter; - bool map_type_filter_is_true = false; - bool render_on_minimap; - bool render_on_minimap_is_true = false; - CullChirality cull_chirality; - bool cull_chirality_is_true = false; + bool map_type_filter_is_set = false; + int maximum_size_on_screen; + bool maximum_size_on_screen_is_set = false; + int minimum_size_on_screen; + bool minimum_size_on_screen_is_set = false; + MountFilter mount_filter; + bool mount_filter_is_set = false; + Position position; + bool position_is_set = false; + ProfessionFilter profession_filter; + bool profession_filter_is_set = false; bool render_ingame; - bool render_ingame_is_true = false; + bool render_ingame_is_set = false; bool render_on_map; - bool render_on_map_is_true = false; - int map_display_size; - bool map_display_size_is_true = false; + bool render_on_map_is_set = false; + bool render_on_minimap; + bool render_on_minimap_is_set = false; + ResetBehavior reset_behavior; + bool reset_behavior_is_set = false; + float reset_length; + bool reset_length_is_set = false; bool scale_on_map_with_zoom; - bool scale_on_map_with_zoom_is_true = false; + bool scale_on_map_with_zoom_is_set = false; + string schedule; + bool schedule_is_set = false; + float schedule_duration; + bool schedule_duration_is_set = false; + MarkerCategory show_category; + bool show_category_is_set = false; + SpecializationFilter specialization_filter; + bool specialization_filter_is_set = false; SpeciesFilter species_filter; - bool species_filter_is_true = false; - string tooltip_name; - bool tooltip_name_is_true = false; + bool species_filter_is_set = false; + MarkerCategory toggle_category; + bool toggle_category_is_set = false; string tooltip_description; - bool tooltip_description_is_true = false; + bool tooltip_description_is_set = false; + string tooltip_name; + bool tooltip_name_is_set = false; + float trigger_range; + bool trigger_range_is_set = false; float x_position; - bool x_position_is_true = false; - float y_position; - bool y_position_is_true = false; - float z_position; - bool z_position_is_true = false; - Position position; - bool position_is_true = false; - float heightoffset; - bool heightoffset_is_true = false; - SpecializationFilter specialization_filter; - bool specialization_filter_is_true = false; - int achievement_id; - bool achievement_id_is_true = false; - int achievement_bitmask; - bool achievement_bitmask_is_true = false; - float icon_size; - bool icon_size_is_true = false; - MarkerCategory category; - bool category_is_true = false; - float schedule_duration; - bool schedule_duration_is_true = false; - string schedule; - bool schedule_is_true = false; - Color color; - bool color_is_true = false; - Image icon; - bool icon_is_true = false; - bool can_fade; - bool can_fade_is_true = false; + bool x_position_is_set = false; float x_rotation; - bool x_rotation_is_true = false; + bool x_rotation_is_set = false; + float y_position; + bool y_position_is_set = false; float y_rotation; - bool y_rotation_is_true = false; + bool y_rotation_is_set = false; + float z_position; + bool z_position_is_set = false; float z_rotation; - bool z_rotation_is_true = false; - EulerRotation euler_rotation; - bool euler_rotation_is_true = false; + bool z_rotation_is_set = false; virtual string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors); virtual vector as_xml() const; diff --git a/xml_converter/src/parseable.cpp b/xml_converter/src/parseable.cpp index c7845279..a89aaecc 100644 --- a/xml_converter/src/parseable.cpp +++ b/xml_converter/src/parseable.cpp @@ -38,7 +38,9 @@ bool Parseable::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector< } vector Parseable::as_xml() const{ + cout << "error: Parseable::as_xml() should not be called"; + exit(EXIT_FAILURE); vector result; - result.push_back("a"); + result.push_back(""); return result; } diff --git a/xml_converter/src/trail_gen.cpp b/xml_converter/src/trail_gen.cpp index 59d5ad74..c2b7e959 100644 --- a/xml_converter/src/trail_gen.cpp +++ b/xml_converter/src/trail_gen.cpp @@ -10,149 +10,149 @@ string Trail::classname() { bool Trail::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors) { string attributename; attributename = normalize(get_attribute_name(attribute)); - if (attributename == "festival") { - this->festival_filter = parse_festival_filter(attribute, errors); - this->festival_filter_is_true = true; + if (attributename == "achievementbit") { + this->achievement_bitmask = parse_int(attribute, errors); + this->achievement_bitmask_is_set = true; } - else if (attributename == "profession") { - this->profession_filter = parse_profession_filter(attribute, errors); - this->profession_filter_is_true = true; + else if (attributename == "achievementid") { + this->achievement_id = parse_int(attribute, errors); + this->achievement_id_is_set = true; } - else if (attributename == "fadenear") { - this->distance_fade_start = parse_float(attribute, errors); - this->distance_fade_start_is_true = true; + else if (attributename == "alpha") { + this->alpha = parse_float(attribute, errors); + this->alpha_is_set = true; } - else if (attributename == "distancefadestart") { - this->distance_fade_start = parse_float(attribute, errors); - this->distance_fade_start_is_true = true; + else if (attributename == "animspeed") { + this->animation_speed = parse_float(attribute, errors); + this->animation_speed_is_set = true; + } + else if (attributename == "animationspeed") { + this->animation_speed = parse_float(attribute, errors); + this->animation_speed_is_set = true; + } + else if (attributename == "canfade") { + this->can_fade = parse_bool(attribute, errors); + this->can_fade_is_set = true; + } + else if (attributename == "type") { + this->category = parse_marker_category(attribute, errors); + this->category_is_set = true; + } + else if (attributename == "category") { + this->category = parse_marker_category(attribute, errors); + this->category_is_set = true; + } + else if (attributename == "color") { + this->color = parse_color(attribute, errors); + this->color_is_set = true; + } + else if (attributename == "cull") { + this->cull_chirality = parse_cull_chirality(attribute, errors); + this->cull_chirality_is_set = true; } else if (attributename == "fadefar") { this->distance_fade_end = parse_float(attribute, errors); - this->distance_fade_end_is_true = true; + this->distance_fade_end_is_set = true; } else if (attributename == "distancefadeend") { this->distance_fade_end = parse_float(attribute, errors); - this->distance_fade_end_is_true = true; + this->distance_fade_end_is_set = true; + } + else if (attributename == "fadenear") { + this->distance_fade_start = parse_float(attribute, errors); + this->distance_fade_start_is_set = true; + } + else if (attributename == "distancefadestart") { + this->distance_fade_start = parse_float(attribute, errors); + this->distance_fade_start_is_set = true; + } + else if (attributename == "festival") { + this->festival_filter = parse_festival_filter(attribute, errors); + this->festival_filter_is_set = true; } else if (attributename == "guid") { this->guid = parse_unique_id(attribute, errors); - this->guid_is_true = true; + this->guid_is_set = true; } - else if (attributename == "mount") { - this->mount_filter = parse_mount_filter(attribute, errors); - this->mount_filter_is_true = true; + else if (attributename == "iswall") { + this->is_wall = parse_bool(attribute, errors); + this->is_wall_is_set = true; } - else if (attributename == "alpha") { - this->alpha = parse_float(attribute, errors); - this->alpha_is_true = true; + else if (attributename == "mapdisplaysize") { + this->map_display_size = parse_int(attribute, errors); + this->map_display_size_is_set = true; } else if (attributename == "mapid") { this->map_id = parse_int(attribute, errors); - this->map_id_is_true = true; + this->map_id_is_set = true; } else if (attributename == "mapid") { this->map_type_filter = parse_map_type_filter(attribute, errors); - this->map_type_filter_is_true = true; + this->map_type_filter_is_set = true; } - else if (attributename == "minimapvisibility") { - this->render_on_minimap = parse_bool(attribute, errors); - this->render_on_minimap_is_true = true; - } - else if (attributename == "bhminimapvisibility") { - this->render_on_minimap = parse_bool(attribute, errors); - this->render_on_minimap_is_true = true; + else if (attributename == "mount") { + this->mount_filter = parse_mount_filter(attribute, errors); + this->mount_filter_is_set = true; } - else if (attributename == "cull") { - this->cull_chirality = parse_cull_chirality(attribute, errors); - this->cull_chirality_is_true = true; + else if (attributename == "profession") { + this->profession_filter = parse_profession_filter(attribute, errors); + this->profession_filter_is_set = true; } else if (attributename == "ingamevisibility") { this->render_ingame = parse_bool(attribute, errors); - this->render_ingame_is_true = true; + this->render_ingame_is_set = true; } else if (attributename == "bhingamevisibility") { this->render_ingame = parse_bool(attribute, errors); - this->render_ingame_is_true = true; + this->render_ingame_is_set = true; } else if (attributename == "mapvisibility") { this->render_on_map = parse_bool(attribute, errors); - this->render_on_map_is_true = true; + this->render_on_map_is_set = true; } else if (attributename == "bhmapvisibility") { this->render_on_map = parse_bool(attribute, errors); - this->render_on_map_is_true = true; - } - else if (attributename == "mapdisplaysize") { - this->map_display_size = parse_int(attribute, errors); - this->map_display_size_is_true = true; + this->render_on_map_is_set = true; } - else if (attributename == "iswall") { - this->is_wall = parse_bool(attribute, errors); - this->is_wall_is_true = true; + else if (attributename == "minimapvisibility") { + this->render_on_minimap = parse_bool(attribute, errors); + this->render_on_minimap_is_set = true; } - else if (attributename == "race") { - this->species_filter = parse_species_filter(attribute, errors); - this->species_filter_is_true = true; + else if (attributename == "bhminimapvisibility") { + this->render_on_minimap = parse_bool(attribute, errors); + this->render_on_minimap_is_set = true; } - else if (attributename == "species") { - this->species_filter = parse_species_filter(attribute, errors); - this->species_filter_is_true = true; + else if (attributename == "schedule") { + this->schedule = parse_string(attribute, errors); + this->schedule_is_set = true; } - else if (attributename == "traildata") { - this->trail_data = parse_trail_data(attribute, errors); - this->trail_data_is_true = true; + else if (attributename == "scheduleduration") { + this->schedule_duration = parse_float(attribute, errors); + this->schedule_duration_is_set = true; } else if (attributename == "specialization") { this->specialization_filter = parse_specialization_filter(attribute, errors); - this->specialization_filter_is_true = true; - } - else if (attributename == "achievementid") { - this->achievement_id = parse_int(attribute, errors); - this->achievement_id_is_true = true; - } - else if (attributename == "achievementbit") { - this->achievement_bitmask = parse_int(attribute, errors); - this->achievement_bitmask_is_true = true; - } - else if (attributename == "trailscale") { - this->trail_scale = parse_float(attribute, errors); - this->trail_scale_is_true = true; + this->specialization_filter_is_set = true; } - else if (attributename == "type") { - this->category = parse_marker_category(attribute, errors); - this->category_is_true = true; - } - else if (attributename == "category") { - this->category = parse_marker_category(attribute, errors); - this->category_is_true = true; - } - else if (attributename == "scheduleduration") { - this->schedule_duration = parse_float(attribute, errors); - this->schedule_duration_is_true = true; - } - else if (attributename == "schedule") { - this->schedule = parse_string(attribute, errors); - this->schedule_is_true = true; + else if (attributename == "race") { + this->species_filter = parse_species_filter(attribute, errors); + this->species_filter_is_set = true; } - else if (attributename == "color") { - this->color = parse_color(attribute, errors); - this->color_is_true = true; + else if (attributename == "species") { + this->species_filter = parse_species_filter(attribute, errors); + this->species_filter_is_set = true; } else if (attributename == "texture") { this->texture = parse_image(attribute, errors); - this->texture_is_true = true; + this->texture_is_set = true; } - else if (attributename == "animspeed") { - this->animation_speed = parse_float(attribute, errors); - this->animation_speed_is_true = true; - } - else if (attributename == "animationspeed") { - this->animation_speed = parse_float(attribute, errors); - this->animation_speed_is_true = true; + else if (attributename == "traildata") { + this->trail_data = parse_trail_data(attribute, errors); + this->trail_data_is_set = true; } - else if (attributename == "canfade") { - this->can_fade = parse_bool(attribute, errors); - this->can_fade_is_true = true; + else if (attributename == "trailscale") { + this->trail_scale = parse_float(attribute, errors); + this->trail_scale_is_set = true; } else { return false; @@ -167,89 +167,89 @@ bool Trail::validate_attributes_of_type_marker_category() { vector Trail::as_xml() const { vector xml_node_contents; xml_node_contents.push_back("festival_filter_is_true) { - xml_node_contents.push_back(" Festival=\"" + stringify_festival_filter(this->festival_filter) + "\""); + if (this->achievement_bitmask_is_set) { + xml_node_contents.push_back(" AchievementBit=\"" + stringify_int(this->achievement_bitmask) + "\""); } - if (this->profession_filter_is_true) { - xml_node_contents.push_back(" Profession=\"" + stringify_profession_filter(this->profession_filter) + "\""); + if (this->achievement_id_is_set) { + xml_node_contents.push_back(" AchievementId=\"" + stringify_int(this->achievement_id) + "\""); } - if (this->distance_fade_start_is_true) { - xml_node_contents.push_back(" FadeNear=\"" + stringify_float(this->distance_fade_start) + "\""); + if (this->alpha_is_set) { + xml_node_contents.push_back(" Alpha=\"" + stringify_float(this->alpha) + "\""); } - if (this->distance_fade_end_is_true) { - xml_node_contents.push_back(" FadeFar=\"" + stringify_float(this->distance_fade_end) + "\""); + if (this->animation_speed_is_set) { + xml_node_contents.push_back(" AnimSpeed=\"" + stringify_float(this->animation_speed) + "\""); } - if (this->guid_is_true) { - xml_node_contents.push_back(" GUID=\"" + stringify_unique_id(this->guid) + "\""); + if (this->can_fade_is_set) { + xml_node_contents.push_back(" CanFade=\"" + stringify_bool(this->can_fade) + "\""); } - if (this->mount_filter_is_true) { - xml_node_contents.push_back(" Mount=\"" + stringify_mount_filter(this->mount_filter) + "\""); + if (this->category_is_set) { + xml_node_contents.push_back(" Type=\"" + stringify_marker_category(this->category) + "\""); } - if (this->alpha_is_true) { - xml_node_contents.push_back(" Alpha=\"" + stringify_float(this->alpha) + "\""); + if (this->color_is_set) { + xml_node_contents.push_back(" Color=\"" + stringify_color(this->color) + "\""); } - if (this->map_id_is_true) { - xml_node_contents.push_back(" MapID=\"" + stringify_int(this->map_id) + "\""); + if (this->cull_chirality_is_set) { + xml_node_contents.push_back(" Cull=\"" + stringify_cull_chirality(this->cull_chirality) + "\""); } - if (this->map_type_filter_is_true) { - xml_node_contents.push_back(" MapID=\"" + stringify_map_type_filter(this->map_type_filter) + "\""); + if (this->distance_fade_end_is_set) { + xml_node_contents.push_back(" FadeFar=\"" + stringify_float(this->distance_fade_end) + "\""); } - if (this->render_on_minimap_is_true) { - xml_node_contents.push_back(" MinimapVisibility=\"" + stringify_bool(this->render_on_minimap) + "\""); + if (this->distance_fade_start_is_set) { + xml_node_contents.push_back(" FadeNear=\"" + stringify_float(this->distance_fade_start) + "\""); } - if (this->cull_chirality_is_true) { - xml_node_contents.push_back(" Cull=\"" + stringify_cull_chirality(this->cull_chirality) + "\""); + if (this->festival_filter_is_set) { + xml_node_contents.push_back(" Festival=\"" + stringify_festival_filter(this->festival_filter) + "\""); } - if (this->render_ingame_is_true) { - xml_node_contents.push_back(" IngameVisibility=\"" + stringify_bool(this->render_ingame) + "\""); + if (this->guid_is_set) { + xml_node_contents.push_back(" GUID=\"" + stringify_unique_id(this->guid) + "\""); } - if (this->render_on_map_is_true) { - xml_node_contents.push_back(" MapVisibility=\"" + stringify_bool(this->render_on_map) + "\""); + if (this->is_wall_is_set) { + xml_node_contents.push_back(" IsWall=\"" + stringify_bool(this->is_wall) + "\""); } - if (this->map_display_size_is_true) { + if (this->map_display_size_is_set) { xml_node_contents.push_back(" MapDisplaySize=\"" + stringify_int(this->map_display_size) + "\""); } - if (this->is_wall_is_true) { - xml_node_contents.push_back(" IsWall=\"" + stringify_bool(this->is_wall) + "\""); + if (this->map_id_is_set) { + xml_node_contents.push_back(" MapID=\"" + stringify_int(this->map_id) + "\""); } - if (this->species_filter_is_true) { - xml_node_contents.push_back(" Race=\"" + stringify_species_filter(this->species_filter) + "\""); + if (this->map_type_filter_is_set) { + xml_node_contents.push_back(" MapID=\"" + stringify_map_type_filter(this->map_type_filter) + "\""); } - if (this->trail_data_is_true) { - xml_node_contents.push_back(" TrailData=\"" + stringify_trail_data(this->trail_data) + "\""); + if (this->mount_filter_is_set) { + xml_node_contents.push_back(" Mount=\"" + stringify_mount_filter(this->mount_filter) + "\""); } - if (this->specialization_filter_is_true) { - xml_node_contents.push_back(" Specialization=\"" + stringify_specialization_filter(this->specialization_filter) + "\""); + if (this->profession_filter_is_set) { + xml_node_contents.push_back(" Profession=\"" + stringify_profession_filter(this->profession_filter) + "\""); } - if (this->achievement_id_is_true) { - xml_node_contents.push_back(" AchievementId=\"" + stringify_int(this->achievement_id) + "\""); + if (this->render_ingame_is_set) { + xml_node_contents.push_back(" IngameVisibility=\"" + stringify_bool(this->render_ingame) + "\""); } - if (this->achievement_bitmask_is_true) { - xml_node_contents.push_back(" AchievementBit=\"" + stringify_int(this->achievement_bitmask) + "\""); + if (this->render_on_map_is_set) { + xml_node_contents.push_back(" MapVisibility=\"" + stringify_bool(this->render_on_map) + "\""); } - if (this->trail_scale_is_true) { - xml_node_contents.push_back(" TrailScale=\"" + stringify_float(this->trail_scale) + "\""); + if (this->render_on_minimap_is_set) { + xml_node_contents.push_back(" MinimapVisibility=\"" + stringify_bool(this->render_on_minimap) + "\""); } - if (this->category_is_true) { - xml_node_contents.push_back(" Type=\"" + stringify_marker_category(this->category) + "\""); + if (this->schedule_is_set) { + xml_node_contents.push_back(" Schedule=\"" + stringify_string(this->schedule) + "\""); } - if (this->schedule_duration_is_true) { + if (this->schedule_duration_is_set) { xml_node_contents.push_back(" ScheduleDuration=\"" + stringify_float(this->schedule_duration) + "\""); } - if (this->schedule_is_true) { - xml_node_contents.push_back(" Schedule=\"" + stringify_string(this->schedule) + "\""); + if (this->specialization_filter_is_set) { + xml_node_contents.push_back(" Specialization=\"" + stringify_specialization_filter(this->specialization_filter) + "\""); } - if (this->color_is_true) { - xml_node_contents.push_back(" Color=\"" + stringify_color(this->color) + "\""); + if (this->species_filter_is_set) { + xml_node_contents.push_back(" Race=\"" + stringify_species_filter(this->species_filter) + "\""); } - if (this->texture_is_true) { + if (this->texture_is_set) { xml_node_contents.push_back(" Texture=\"" + stringify_image(this->texture) + "\""); } - if (this->animation_speed_is_true) { - xml_node_contents.push_back(" AnimSpeed=\"" + stringify_float(this->animation_speed) + "\""); + if (this->trail_data_is_set) { + xml_node_contents.push_back(" TrailData=\"" + stringify_trail_data(this->trail_data) + "\""); } - if (this->can_fade_is_true) { - xml_node_contents.push_back(" CanFade=\"" + stringify_bool(this->can_fade) + "\""); + if (this->trail_scale_is_set) { + xml_node_contents.push_back(" TrailScale=\"" + stringify_float(this->trail_scale) + "\""); } xml_node_contents.push_back("/>"); return xml_node_contents; diff --git a/xml_converter/src/trail_gen.hpp b/xml_converter/src/trail_gen.hpp index 84f655f6..a9bf3591 100644 --- a/xml_converter/src/trail_gen.hpp +++ b/xml_converter/src/trail_gen.hpp @@ -34,62 +34,62 @@ using namespace std; class Trail: public Parseable { public: - FestivalFilter festival_filter; - bool festival_filter_is_true = false; - ProfessionFilter profession_filter; - bool profession_filter_is_true = false; - float distance_fade_start; - bool distance_fade_start_is_true = false; + int achievement_bitmask; + bool achievement_bitmask_is_set = false; + int achievement_id; + bool achievement_id_is_set = false; + float alpha; + bool alpha_is_set = false; + float animation_speed; + bool animation_speed_is_set = false; + bool can_fade; + bool can_fade_is_set = false; + MarkerCategory category; + bool category_is_set = false; + Color color; + bool color_is_set = false; + CullChirality cull_chirality; + bool cull_chirality_is_set = false; float distance_fade_end; - bool distance_fade_end_is_true = false; + bool distance_fade_end_is_set = false; + float distance_fade_start; + bool distance_fade_start_is_set = false; + FestivalFilter festival_filter; + bool festival_filter_is_set = false; UniqueId guid; - bool guid_is_true = false; - MountFilter mount_filter; - bool mount_filter_is_true = false; - float alpha; - bool alpha_is_true = false; + bool guid_is_set = false; + bool is_wall; + bool is_wall_is_set = false; + int map_display_size; + bool map_display_size_is_set = false; int map_id; - bool map_id_is_true = false; + bool map_id_is_set = false; MapTypeFilter map_type_filter; - bool map_type_filter_is_true = false; - bool render_on_minimap; - bool render_on_minimap_is_true = false; - CullChirality cull_chirality; - bool cull_chirality_is_true = false; + bool map_type_filter_is_set = false; + MountFilter mount_filter; + bool mount_filter_is_set = false; + ProfessionFilter profession_filter; + bool profession_filter_is_set = false; bool render_ingame; - bool render_ingame_is_true = false; + bool render_ingame_is_set = false; bool render_on_map; - bool render_on_map_is_true = false; - int map_display_size; - bool map_display_size_is_true = false; - bool is_wall; - bool is_wall_is_true = false; + bool render_on_map_is_set = false; + bool render_on_minimap; + bool render_on_minimap_is_set = false; + string schedule; + bool schedule_is_set = false; + float schedule_duration; + bool schedule_duration_is_set = false; + SpecializationFilter specialization_filter; + bool specialization_filter_is_set = false; SpeciesFilter species_filter; - bool species_filter_is_true = false; + bool species_filter_is_set = false; + Image texture; + bool texture_is_set = false; TrailData trail_data; - bool trail_data_is_true = false; - SpecializationFilter specialization_filter; - bool specialization_filter_is_true = false; - int achievement_id; - bool achievement_id_is_true = false; - int achievement_bitmask; - bool achievement_bitmask_is_true = false; + bool trail_data_is_set = false; float trail_scale; - bool trail_scale_is_true = false; - MarkerCategory category; - bool category_is_true = false; - float schedule_duration; - bool schedule_duration_is_true = false; - string schedule; - bool schedule_is_true = false; - Color color; - bool color_is_true = false; - Image texture; - bool texture_is_true = false; - float animation_speed; - bool animation_speed_is_true = false; - bool can_fade; - bool can_fade_is_true = false; + bool trail_scale_is_set = false; virtual string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors); virtual vector as_xml() const; diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index d9f6b8aa..66d8b342 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -41,21 +41,25 @@ void write_xml_file(string xml_filepath, map* marker_categorie file_text = "\n"; for (const auto & category : *marker_categories) { string text; - for (const auto& s : category.second.as_xml()) { text += s; }; + for (const auto& s : category.second.as_xml()) { + text += s; + } file_text = file_text + text + "\n"; } file_text = file_text + "\n"; for (const auto & parsed_poi : *parsed_pois) { string text; - for (const auto& s : parsed_poi->as_xml()) { text += s; }; + for (const auto& s : parsed_poi->as_xml()) { + text += s; + } file_text = file_text + text + "\n"; } file_text = file_text + "\n"; outfile.open(new_file_path, ios::out); - outfile<< file_text; + outfile << file_text; outfile.close(); } From 92a20874a1f3857f1f38675cda43e8f43cff1341 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 29 Aug 2022 23:19:08 -0400 Subject: [PATCH 079/539] Small changed addressing comments --- xml_converter/src/attribute/bool.cpp | 6 +++--- xml_converter/src/parseable.cpp | 4 +--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/xml_converter/src/attribute/bool.cpp b/xml_converter/src/attribute/bool.cpp index 883d50f7..4c4a643b 100644 --- a/xml_converter/src/attribute/bool.cpp +++ b/xml_converter/src/attribute/bool.cpp @@ -23,11 +23,11 @@ bool parse_bool(rapidxml::xml_attribute<>* input, vector *errors) { } string stringify_bool(bool attribute_value){ - if (attribute_value == false) { - return "false"; + if (attribute_value) { + return "true"; } else { - return "true"; + return "false"; } } \ No newline at end of file diff --git a/xml_converter/src/parseable.cpp b/xml_converter/src/parseable.cpp index a89aaecc..77c68269 100644 --- a/xml_converter/src/parseable.cpp +++ b/xml_converter/src/parseable.cpp @@ -38,9 +38,7 @@ bool Parseable::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector< } vector Parseable::as_xml() const{ - cout << "error: Parseable::as_xml() should not be called"; - exit(EXIT_FAILURE); + throw std::runtime_error("error: Parseable::as_xml() should not be called"); vector result; - result.push_back(""); return result; } From 55155a959f8798532b6aa16846ed23e630b576a1 Mon Sep 17 00:00:00 2001 From: klingbolt <89052698+klingbolt@users.noreply.github.com> Date: Mon, 29 Aug 2022 23:46:59 -0400 Subject: [PATCH 080/539] Update xml_converter/src/xml_converter.cpp Co-authored-by: Asher Glick --- xml_converter/src/xml_converter.cpp | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 66d8b342..579b8af6 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -35,34 +35,31 @@ bool has_suffix(std::string const &fullString, std::string const &ending) { void write_xml_file(string xml_filepath, map* marker_categories, vector* parsed_pois) { ofstream outfile; string tab_string; - string file_text; string new_file_path = xml_filepath + "export.xml"; - file_text = "\n"; + outfile.open(new_file_path, ios::out); + + outfile << "\n"; for (const auto & category : *marker_categories) { string text; for (const auto& s : category.second.as_xml()) { text += s; } - file_text = file_text + text + "\n"; + outfile << text + "\n"; } - file_text = file_text + "\n"; + outfile << "\n"; for (const auto & parsed_poi : *parsed_pois) { string text; for (const auto& s : parsed_poi->as_xml()) { text += s; } - file_text = file_text + text + "\n"; + outfile << text + "\n"; } - file_text = file_text + "\n"; - + outfile << "\n"; - outfile.open(new_file_path, ios::out); - outfile << file_text; outfile.close(); } - Category* get_category(rapidxml::xml_node<>* node, map* marker_categories, vector* errors) { rapidxml::xml_attribute<>* attribute = find_attribute(node, "type"); vector split_categories = split(get_attribute_value(attribute), "."); From 4455043e7bd8ebc6c1d735a6b6944a077aefec9b Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 29 Aug 2022 23:54:22 -0400 Subject: [PATCH 081/539] Changed second to milliseconds to reflect new runtime --- xml_converter/src/xml_converter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 579b8af6..0b82ddf6 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -246,7 +246,7 @@ int main() { write_xml_file("./export_packs/", &marker_categories, &parsed_pois); auto end = chrono::high_resolution_clock::now(); auto dur = end - begin; - auto secs = std::chrono::duration_cast(dur).count(); - cout << "The write function took " << secs << " seconds to run" << endl; + auto ms = std::chrono::duration_cast(dur).count(); + cout << "The write function took " << ms << " milliseconds to run" << endl; return 0; } From cf1c97316260e8827e9f6dea1bb2e36af40659a2 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Thu, 1 Sep 2022 23:15:25 -0500 Subject: [PATCH 082/539] fixing segfault if the attribute "type" does not exist --- xml_converter/src/xml_converter.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 0b82ddf6..fc106ac6 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -60,9 +60,18 @@ void write_xml_file(string xml_filepath, map* marker_categorie outfile.close(); } + Category* get_category(rapidxml::xml_node<>* node, map* marker_categories, vector* errors) { rapidxml::xml_attribute<>* attribute = find_attribute(node, "type"); + + if (attribute == 0) { + // TODO: This error should really be for the entire node not just the name + errors->push_back(new XMLNodeNameError("No Attribute Named Type", node)); + return nullptr; + } + vector split_categories = split(get_attribute_value(attribute), "."); + if (split_categories.size() == 0) { errors->push_back(new XMLAttributeValueError("Empty Type", attribute)); return nullptr; From 54f6d3b211feb9f518e8687d9e2785cf801a4635 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Thu, 1 Sep 2022 23:41:49 -0500 Subject: [PATCH 083/539] Removing slow and incorrect category attribute search --- .../cpp_templates/class_template.cpp | 11 +++-------- xml_converter/src/category_gen.cpp | 9 ++------- xml_converter/src/xml_converter.cpp | 18 +++++++++++++++--- 3 files changed, 20 insertions(+), 18 deletions(-) diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index cac6fdbf..4e663f36 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -8,15 +8,10 @@ string {{cpp_class}}::classname() { return "{{xml_class_name}}"; } {%- if cpp_class == "Category": %} -void Category::init_from_xml(rapidxml::xml_node<>* node, vector *errors) { +void {{cpp_class}}::init_from_xml(rapidxml::xml_node<>* node, vector *errors) { for (rapidxml::xml_attribute<>* attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()) { - bool is_icon_value = false; - bool is_trail_value = false; - - for (rapidxml::xml_attribute<>* attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()) { - is_icon_value |= this->default_icon.init_xml_attribute(attribute, errors); - is_trail_value |= this->default_trail.init_xml_attribute(attribute, errors); - } + bool is_icon_value = this->default_icon.init_xml_attribute(attribute, errors); + bool is_trail_value = this->default_trail.init_xml_attribute(attribute, errors); if (init_xml_attribute(attribute, errors)) {} else if (is_icon_value || is_trail_value) {} diff --git a/xml_converter/src/category_gen.cpp b/xml_converter/src/category_gen.cpp index 45c44efb..9f56bb0f 100644 --- a/xml_converter/src/category_gen.cpp +++ b/xml_converter/src/category_gen.cpp @@ -9,13 +9,8 @@ string Category::classname() { } void Category::init_from_xml(rapidxml::xml_node<>* node, vector *errors) { for (rapidxml::xml_attribute<>* attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()) { - bool is_icon_value = false; - bool is_trail_value = false; - - for (rapidxml::xml_attribute<>* attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()) { - is_icon_value |= this->default_icon.init_xml_attribute(attribute, errors); - is_trail_value |= this->default_trail.init_xml_attribute(attribute, errors); - } + bool is_icon_value = this->default_icon.init_xml_attribute(attribute, errors); + bool is_trail_value = this->default_trail.init_xml_attribute(attribute, errors); if (init_xml_attribute(attribute, errors)) {} else if (is_icon_value || is_trail_value) {} diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index fc106ac6..fb7da96b 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -62,6 +62,9 @@ void write_xml_file(string xml_filepath, map* marker_categorie } Category* get_category(rapidxml::xml_node<>* node, map* marker_categories, vector* errors) { + // TODO: This is a slow linear search, replace with something faster. + // maybe use data from already parsed node instead of searching for + // the attribute. rapidxml::xml_attribute<>* attribute = find_attribute(node, "type"); if (attribute == 0) { @@ -238,11 +241,14 @@ void convert_taco_directory(string directory, map* marker_cate } int main() { + auto begin = chrono::high_resolution_clock::now(); + vector parsed_pois; map marker_categories; for (const auto & entry : filesystem::directory_iterator("./packs")) { string path = entry.path(); + if (entry.is_directory()) { convert_taco_directory(path, &marker_categories, &parsed_pois); } @@ -250,12 +256,18 @@ int main() { continue; } } - cout << "Hey! We Finished Parsing" << endl; - auto begin = chrono::high_resolution_clock::now(); - write_xml_file("./export_packs/", &marker_categories, &parsed_pois); + auto end = chrono::high_resolution_clock::now(); auto dur = end - begin; auto ms = std::chrono::duration_cast(dur).count(); + cout << "The parse function took " << ms << " milliseconds to run" << endl; + + + begin = chrono::high_resolution_clock::now(); + write_xml_file("./export_packs/", &marker_categories, &parsed_pois); + end = chrono::high_resolution_clock::now(); + dur = end - begin; + ms = std::chrono::duration_cast(dur).count(); cout << "The write function took " << ms << " milliseconds to run" << endl; return 0; } From bc8a506547f6b671c3a580b4f501f00ac384e24b Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Thu, 1 Sep 2022 23:42:19 -0500 Subject: [PATCH 084/539] have parseable init_xml_attribute return false just in case it is ever called --- xml_converter/src/parseable.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/xml_converter/src/parseable.cpp b/xml_converter/src/parseable.cpp index 77c68269..02de6a6e 100644 --- a/xml_converter/src/parseable.cpp +++ b/xml_converter/src/parseable.cpp @@ -22,7 +22,7 @@ string Parseable::classname() { } -void Parseable::init_from_xml(rapidxml::xml_node<>* node, vector *errors) { +void Parseable::init_from_xml(rapidxml::xml_node<>* node, vector* errors) { for (rapidxml::xml_attribute<>* attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()) { if (init_xml_attribute(attribute, errors)) {} else { @@ -31,12 +31,19 @@ void Parseable::init_from_xml(rapidxml::xml_node<>* node, vector *err } } -bool Parseable::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *) { - // I removed all of the offending variables. This whole section will be relooked at. - string item = normalize(get_attribute_name(attribute)); - return true; + +//////////////////////////////////////////////////////////////////////////////// +// Parseable::init_xml_attribute +// +// Parseable does not have any valid xml attributes as it is a base class for +// all of the other parsible classes. So just return false right away without +// doing anything. +//////////////////////////////////////////////////////////////////////////////// +bool Parseable::init_xml_attribute(rapidxml::xml_attribute<>*, vector*) { + return false; } + vector Parseable::as_xml() const{ throw std::runtime_error("error: Parseable::as_xml() should not be called"); vector result; From 6e2e5a5a8d680bf14d37b12d1e7a6f9ea0adf8c5 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sun, 4 Sep 2022 17:01:00 -0500 Subject: [PATCH 085/539] optimizations for string normalization --- xml_converter/src/string_helper.cpp | 55 +++++++++++++++++++++-------- xml_converter/src/string_helper.hpp | 2 +- 2 files changed, 41 insertions(+), 16 deletions(-) diff --git a/xml_converter/src/string_helper.cpp b/xml_converter/src/string_helper.cpp index 2be3c2df..d18223e0 100644 --- a/xml_converter/src/string_helper.cpp +++ b/xml_converter/src/string_helper.cpp @@ -50,23 +50,48 @@ vector split(string input, string delimiter) { } -string normalize(string type_name) { - string output; - output.reserve(type_name.length()); - - for (char character : type_name) { - if (character >= 'A' && character <= 'Z') { - output += (character - 'A' + 'a'); - } - else if (character >= 'a' && character <= 'z') { - output += character; - } - else if (character >= '0' && character <= '9'){ - output += character; - } +//////////////////////////////////////////////////////////////////////////////// +// normalize +// +// A speedy function to return a normalized copy of a string. Normalization +// happens according to the lookup table defined for this function. +// +// This lookup table maps: +// All Numbers 0-9 to themselves +// All Lowercase Letters a-z to themselves +// All Uppercase Letters A-Z to the lowercase letters a-z +// Everything else to 0 +//////////////////////////////////////////////////////////////////////////////// +static unsigned char normalize_lookup[256] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 0, 0, + 0, 0, 0, 0, 0, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, + 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, + 122, 0, 0, 0, 0, 0, 0, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0 +}; +string normalize(string input_string) { + size_t out_index = 0; + for (size_t i = 0; i < input_string.length(); i++) { + unsigned char new_char = normalize_lookup[(unsigned char)input_string[i]]; + input_string[out_index] = new_char; + out_index += (new_char > 0); } - return output; + input_string.erase(out_index); + return input_string; } diff --git a/xml_converter/src/string_helper.hpp b/xml_converter/src/string_helper.hpp index 309a5bcb..c25512c5 100644 --- a/xml_converter/src/string_helper.hpp +++ b/xml_converter/src/string_helper.hpp @@ -12,7 +12,7 @@ string lowercase(string); vector split(string input, string delimiter); -string normalize(string type_name); +string normalize(string input_string); std::string base64_encode(uint8_t const* buf, unsigned int bufLen); std::vector base64_decode(std::string const&); From e2f33c9933dd187c2e52f4b5aac390c5e4283459 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 16 Oct 2022 22:13:04 -0400 Subject: [PATCH 086/539] Wrote Internal Protobuf Schema for attributes Included the addition of EOD spec values as requested in issue #58 --- .../doc/acheivement/achievement_bitmask.md | 2 +- .../doc/acheivement/achievement_id.md | 2 +- .../specialization_filter.md | 18 +- xml_converter/doc/trail_data/trail_data.md | 2 +- .../cpp_templates/class_template.hpp | 6 +- .../generators/proto_templates/node.pb.cc | 8788 +++++++++++++ .../generators/proto_templates/node.pb.h | 10262 ++++++++++++++++ .../generators/proto_templates/node.proto | 274 + .../attribute/specialization_filter_gen.cpp | 45 +- xml_converter/src/category_gen.hpp | 10 +- xml_converter/src/icon_gen.hpp | 108 +- xml_converter/src/trail_gen.hpp | 56 +- 12 files changed, 19464 insertions(+), 109 deletions(-) create mode 100644 xml_converter/generators/proto_templates/node.pb.cc create mode 100644 xml_converter/generators/proto_templates/node.pb.h create mode 100644 xml_converter/generators/proto_templates/node.proto diff --git a/xml_converter/doc/acheivement/achievement_bitmask.md b/xml_converter/doc/acheivement/achievement_bitmask.md index 91d44e83..9b4cdf15 100644 --- a/xml_converter/doc/acheivement/achievement_bitmask.md +++ b/xml_converter/doc/acheivement/achievement_bitmask.md @@ -4,7 +4,7 @@ type: Fixed32 applies_to: [Icon, Trail] compatability: [TacO, BlishHUD, Burrito] xml_fields: ["AchievementBit"] -protobuf_field: "achievement_bit" +protobuf_field: achievement_bitmask --- A portion of an achievement that, if completed, will hide this marker. diff --git a/xml_converter/doc/acheivement/achievement_id.md b/xml_converter/doc/acheivement/achievement_id.md index 1a569dd8..e791c4be 100644 --- a/xml_converter/doc/acheivement/achievement_id.md +++ b/xml_converter/doc/acheivement/achievement_id.md @@ -4,7 +4,7 @@ type: Int32 applies_to: [Icon, Trail] compatability: [TacO, BlishHUD, Burrito] xml_fields: ["AchievementId"] -protobuf_field: "achievement_id" +protobuf_field: achievement_id --- An achivement that, if completed, will hide this marker diff --git a/xml_converter/doc/specialization_filter/specialization_filter.md b/xml_converter/doc/specialization_filter/specialization_filter.md index 5fa67fc9..a8d79dd6 100644 --- a/xml_converter/doc/specialization_filter/specialization_filter.md +++ b/xml_converter/doc/specialization_filter/specialization_filter.md @@ -29,15 +29,15 @@ flags: warrior_spellbreaker: ["61", "Spellbreaker"] # TODO(#58): End of Dragons Spec Numbers - elementalist_catalyst: ["Catalyst"] - engineer_mechanist: ["Mechanist"] - guardian_willbender: ["Willbender"] - mesmer_virtuoso: ["Virtuoso"] - necromancer_harbinger: ["Harbinger"] - ranger_untamed: ["Untamed"] - revenant_vindicator: ["Vindicator"] - thief_specter: ["Specter"] - warrior_bladesworn: ["Bladesworn"] + elementalist_catalyst: ["67", "Catalyst"] + engineer_mechanist: ["70", "Mechanist"] + guardian_willbender: ["65", "Willbender"] + mesmer_virtuoso: ["66", "Virtuoso"] + necromancer_harbinger: ["64", "Harbinger"] + ranger_untamed: ["72", "Untamed"] + revenant_vindicator: ["69", "Vindicator"] + thief_specter: ["71", "Specter"] + warrior_bladesworn: ["68", "Bladesworn"] # Core Spec elementalist_air: ["41"] diff --git a/xml_converter/doc/trail_data/trail_data.md b/xml_converter/doc/trail_data/trail_data.md index 67169db0..25ab60b9 100644 --- a/xml_converter/doc/trail_data/trail_data.md +++ b/xml_converter/doc/trail_data/trail_data.md @@ -3,7 +3,7 @@ name: Trail Data type: Custom class: TrailData xml_fields: ["TrailData"] -protobuf_field: traildata +protobuf_field: trail_data side_effects: [Map ID] applies_to: [Trail] compatability: [TacO, BlishHUD, Burrito] diff --git a/xml_converter/generators/cpp_templates/class_template.hpp b/xml_converter/generators/cpp_templates/class_template.hpp index ef1e06ff..8d194a34 100644 --- a/xml_converter/generators/cpp_templates/class_template.hpp +++ b/xml_converter/generators/cpp_templates/class_template.hpp @@ -28,6 +28,8 @@ class {{cpp_class}}: public Parseable { public: {%- for attribute_variable in attribute_variables: %} {{attribute_variable.cpp_type}} {{attribute_variable.attribute_name}}; + {%- endfor %} + {%- for attribute_variable in attribute_variables: %} bool {{attribute_variable.attribute_name}}_is_set = false; {%- endfor %} @@ -36,11 +38,13 @@ class {{cpp_class}}: public Parseable { Icon default_icon; Trail default_trail; + virtual vector as_xml() const; void init_from_xml(rapidxml::xml_node<>* node, vector *errors); + {%- else %} + virtual vector as_xml() const; {%- endif %} virtual string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors); - virtual vector as_xml() const; {%-if attributes_of_type_marker_category %} bool validate_attributes_of_type_marker_category(); {%- endif %} diff --git a/xml_converter/generators/proto_templates/node.pb.cc b/xml_converter/generators/proto_templates/node.pb.cc new file mode 100644 index 00000000..95bff400 --- /dev/null +++ b/xml_converter/generators/proto_templates/node.pb.cc @@ -0,0 +1,8788 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: node.proto + +#include "node.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include +extern PROTOBUF_INTERNAL_EXPORT_node_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Category_node_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fany_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Any_google_2fprotobuf_2fany_2eproto; +namespace Proto_Node { +class Category_ChildrenEntry_DoNotUseDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _Category_ChildrenEntry_DoNotUse_default_instance_; +class CategoryDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _Category_default_instance_; +class Icon_textureDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _Icon_texture_default_instance_; +class Icon_positionDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _Icon_position_default_instance_; +class Icon_euler_rotationDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _Icon_euler_rotation_default_instance_; +class Icon_trigger_guidDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _Icon_trigger_guid_default_instance_; +class Icon_triggerDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _Icon_trigger_default_instance_; +class IconDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _Icon_default_instance_; +class Trail_colorDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _Trail_color_default_instance_; +class Trail_festival_filterDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _Trail_festival_filter_default_instance_; +class Trail_guidDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _Trail_guid_default_instance_; +class Trail_map_type_filterDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _Trail_map_type_filter_default_instance_; +class Trail_mount_filterDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _Trail_mount_filter_default_instance_; +class Trail_profession_filterDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _Trail_profession_filter_default_instance_; +class Trail_specialization_filterDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _Trail_specialization_filter_default_instance_; +class Trail_species_filterDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _Trail_species_filter_default_instance_; +class Trail_textureDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _Trail_texture_default_instance_; +class Trail_trail_dataDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _Trail_trail_data_default_instance_; +class TrailDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _Trail_default_instance_; +} // namespace Proto_Node +static void InitDefaultsscc_info_Category_node_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::Proto_Node::_Category_ChildrenEntry_DoNotUse_default_instance_; + new (ptr) ::Proto_Node::Category_ChildrenEntry_DoNotUse(); + } + { + void* ptr = &::Proto_Node::_Category_default_instance_; + new (ptr) ::Proto_Node::Category(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::Proto_Node::Category_ChildrenEntry_DoNotUse::InitAsDefaultInstance(); + ::Proto_Node::Category::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Category_node_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Category_node_2eproto}, {}}; + +static void InitDefaultsscc_info_Icon_node_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::Proto_Node::_Icon_default_instance_; + new (ptr) ::Proto_Node::Icon(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::Proto_Node::Icon::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Icon_node_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Icon_node_2eproto}, {}}; + +static void InitDefaultsscc_info_Icon_euler_rotation_node_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::Proto_Node::_Icon_euler_rotation_default_instance_; + new (ptr) ::Proto_Node::Icon_euler_rotation(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::Proto_Node::Icon_euler_rotation::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Icon_euler_rotation_node_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Icon_euler_rotation_node_2eproto}, {}}; + +static void InitDefaultsscc_info_Icon_position_node_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::Proto_Node::_Icon_position_default_instance_; + new (ptr) ::Proto_Node::Icon_position(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::Proto_Node::Icon_position::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Icon_position_node_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Icon_position_node_2eproto}, {}}; + +static void InitDefaultsscc_info_Icon_texture_node_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::Proto_Node::_Icon_texture_default_instance_; + new (ptr) ::Proto_Node::Icon_texture(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::Proto_Node::Icon_texture::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Icon_texture_node_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_Icon_texture_node_2eproto}, { + &scc_info_Any_google_2fprotobuf_2fany_2eproto.base,}}; + +static void InitDefaultsscc_info_Icon_trigger_node_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::Proto_Node::_Icon_trigger_default_instance_; + new (ptr) ::Proto_Node::Icon_trigger(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::Proto_Node::Icon_trigger::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Icon_trigger_node_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_Icon_trigger_node_2eproto}, { + &scc_info_Category_node_2eproto.base,}}; + +static void InitDefaultsscc_info_Icon_trigger_guid_node_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::Proto_Node::_Icon_trigger_guid_default_instance_; + new (ptr) ::Proto_Node::Icon_trigger_guid(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::Proto_Node::Icon_trigger_guid::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Icon_trigger_guid_node_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Icon_trigger_guid_node_2eproto}, {}}; + +static void InitDefaultsscc_info_Trail_node_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::Proto_Node::_Trail_default_instance_; + new (ptr) ::Proto_Node::Trail(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::Proto_Node::Trail::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Trail_node_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_Trail_node_2eproto}, { + &scc_info_Category_node_2eproto.base,}}; + +static void InitDefaultsscc_info_Trail_color_node_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::Proto_Node::_Trail_color_default_instance_; + new (ptr) ::Proto_Node::Trail_color(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::Proto_Node::Trail_color::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Trail_color_node_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Trail_color_node_2eproto}, {}}; + +static void InitDefaultsscc_info_Trail_festival_filter_node_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::Proto_Node::_Trail_festival_filter_default_instance_; + new (ptr) ::Proto_Node::Trail_festival_filter(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::Proto_Node::Trail_festival_filter::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Trail_festival_filter_node_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Trail_festival_filter_node_2eproto}, {}}; + +static void InitDefaultsscc_info_Trail_guid_node_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::Proto_Node::_Trail_guid_default_instance_; + new (ptr) ::Proto_Node::Trail_guid(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::Proto_Node::Trail_guid::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Trail_guid_node_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Trail_guid_node_2eproto}, {}}; + +static void InitDefaultsscc_info_Trail_map_type_filter_node_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::Proto_Node::_Trail_map_type_filter_default_instance_; + new (ptr) ::Proto_Node::Trail_map_type_filter(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::Proto_Node::Trail_map_type_filter::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Trail_map_type_filter_node_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Trail_map_type_filter_node_2eproto}, {}}; + +static void InitDefaultsscc_info_Trail_mount_filter_node_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::Proto_Node::_Trail_mount_filter_default_instance_; + new (ptr) ::Proto_Node::Trail_mount_filter(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::Proto_Node::Trail_mount_filter::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Trail_mount_filter_node_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Trail_mount_filter_node_2eproto}, {}}; + +static void InitDefaultsscc_info_Trail_profession_filter_node_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::Proto_Node::_Trail_profession_filter_default_instance_; + new (ptr) ::Proto_Node::Trail_profession_filter(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::Proto_Node::Trail_profession_filter::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Trail_profession_filter_node_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Trail_profession_filter_node_2eproto}, {}}; + +static void InitDefaultsscc_info_Trail_specialization_filter_node_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::Proto_Node::_Trail_specialization_filter_default_instance_; + new (ptr) ::Proto_Node::Trail_specialization_filter(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::Proto_Node::Trail_specialization_filter::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Trail_specialization_filter_node_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Trail_specialization_filter_node_2eproto}, {}}; + +static void InitDefaultsscc_info_Trail_species_filter_node_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::Proto_Node::_Trail_species_filter_default_instance_; + new (ptr) ::Proto_Node::Trail_species_filter(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::Proto_Node::Trail_species_filter::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Trail_species_filter_node_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Trail_species_filter_node_2eproto}, {}}; + +static void InitDefaultsscc_info_Trail_texture_node_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::Proto_Node::_Trail_texture_default_instance_; + new (ptr) ::Proto_Node::Trail_texture(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::Proto_Node::Trail_texture::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Trail_texture_node_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_Trail_texture_node_2eproto}, { + &scc_info_Any_google_2fprotobuf_2fany_2eproto.base,}}; + +static void InitDefaultsscc_info_Trail_trail_data_node_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::Proto_Node::_Trail_trail_data_default_instance_; + new (ptr) ::Proto_Node::Trail_trail_data(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::Proto_Node::Trail_trail_data::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Trail_trail_data_node_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Trail_trail_data_node_2eproto}, {}}; + +static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_node_2eproto[19]; +static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_node_2eproto[2]; +static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_node_2eproto = nullptr; + +const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_node_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + PROTOBUF_FIELD_OFFSET(::Proto_Node::Category_ChildrenEntry_DoNotUse, _has_bits_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Category_ChildrenEntry_DoNotUse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::Proto_Node::Category_ChildrenEntry_DoNotUse, key_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Category_ChildrenEntry_DoNotUse, value_), + 0, + 1, + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::Proto_Node::Category, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::Proto_Node::Category, default_visibility_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Category, display_name_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Category, is_separator_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Category, name_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Category, tooltip_name_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Category, children_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_texture, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_texture, path_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_texture, original_token_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_position, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_position, x_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_position, y_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_position, z_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_euler_rotation, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_euler_rotation, x_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_euler_rotation, y_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_euler_rotation, z_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_trigger_guid, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_trigger_guid, guid_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_trigger, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_trigger, auto_trigger_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_trigger, bounce_delay_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_trigger, bounce_duration_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_trigger, bounce_height_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_trigger, action_copy_clipboard_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_trigger, action_copy_message_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_trigger, has_countdown_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_trigger, action_info_message_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_trigger, invert_display_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_trigger, reset_length_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_trigger, range_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_trigger, action_hide_category_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_trigger, action_show_category_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_trigger, action_toggle_category_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon, achievement_bit_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon, achievement_id_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon, alpha_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon, can_fade_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon, distance_fade_end_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon, distance_fade_start_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon, height_offset_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon, __tentative__scale_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon, map_display_size_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon, map_id_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon, maximum_size_on_screen_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon, minimum_size_on_screen_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon, __tentative__render_ingame_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon, __tentative__render_on_map_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon, __tentative__render_on_minimap_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon, scale_on_map_with_zoom_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon, bhdraft__schedule_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon, bhdraft__schedule_duration_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon, tip_description_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon, tip_name_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_color, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_color, hex_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_festival_filter, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_festival_filter, dragonbash_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_festival_filter, festival_of_the_four_winds_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_festival_filter, halloween_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_festival_filter, lunar_new_year_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_festival_filter, super_adventure_festival_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_festival_filter, wintersday_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_festival_filter, none_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_guid, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_guid, guid_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_map_type_filter, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_map_type_filter, unknown_map_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_map_type_filter, redirect_map_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_map_type_filter, character_create_map_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_map_type_filter, pvp_map_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_map_type_filter, gvg_map_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_map_type_filter, instance_map_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_map_type_filter, public_map_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_map_type_filter, tournament_map_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_map_type_filter, tutorial_map_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_map_type_filter, user_tournament_map_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_map_type_filter, center_map_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_map_type_filter, eternal_battlegrounds_map_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_map_type_filter, bluehome_map_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_map_type_filter, blue_borderlands_map_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_map_type_filter, green_home_map_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_map_type_filter, green_borderlands_map_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_map_type_filter, red_home_map_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_map_type_filter, red_borderlands_map_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_map_type_filter, fortunes_vale_map_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_map_type_filter, jump_puzzle_map_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_map_type_filter, obsidian_sanctum_map_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_map_type_filter, edge_of_the_mists_map_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_map_type_filter, public_mini_map_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_map_type_filter, wvw_lounge_map_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_mount_filter, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_mount_filter, raptor_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_mount_filter, springer_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_mount_filter, skimmer_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_mount_filter, jackal_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_mount_filter, griffon_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_mount_filter, roller_beetle_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_mount_filter, warclaw_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_mount_filter, skyscalee_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_mount_filter, skiff_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_mount_filter, seige_turtle_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_profession_filter, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_profession_filter, guardian_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_profession_filter, warrior_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_profession_filter, engineer_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_profession_filter, ranger_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_profession_filter, thief_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_profession_filter, elementalist_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_profession_filter, mesmer_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_profession_filter, necromancer_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_profession_filter, revenantnt_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, elementalist_tempest_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, engineer_scrapper_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, guardian_dragonhunter_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, mesmer_chronomancer_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, necromancer_reaper_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, ranger_druid_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, revenant_herald_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, thief_daredevil_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, warrior_berserker_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, elementalist_weaver_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, engineer_holosmith_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, guardian_firebrand_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, mesmer_mirage_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, necromancer_scourge_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, ranger_soulbeast_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, revenant_renegade_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, thief_deadeye_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, warrior_spellbreaker_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, elmentalist_catalyst_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, engineer_mechanist_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, guardian_willbender_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, mesmer_virtuoso_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, necromancer_harbinger_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, ranger_untamed_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, revenant_vindicator_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, thief_specter_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, warrior_bladesworn_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, elementalist_air_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, elementalist_arcane_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, elementalist_earth_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, elementalist_fire_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, elementalist_water_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, engineer_alchemy_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, engineer_explosives_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, engineer_firearms_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, engineer_inventions_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, engineer_tools_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, guardian_honor_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, guardian_radiance_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, guardian_valor_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, guardian_virtues_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, guardian_zeal_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, mesmer_chaos_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, mesmer_domination_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, mesmer_dueling_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, mesmer_illusions_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, mesmer_inspiration_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, necromancer_blood_magic_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, necromancer_curses_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, necromancer_death_magic_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, necromancer_soul_reaping_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, necromancer_spite_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, ranger_beastmastery_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, ranger_marksmanship_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, ranger_nature_magic_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, ranger_skirmishing_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, ranger_wilderness_survival_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, revenant_corruption_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, revenant_devastation_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, revenant_invocation_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, revenant_retribution_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, revenant_salvation_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, thief_acrobatics_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, thief_critical_strikes_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, thief_deadly_arts_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, thief_shadow_arts_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, thief_trickery_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, warrior_arms_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, warrior_defense_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, warrior_discipline_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, warrior_strength_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, warrior_tactics_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_species_filter, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_species_filter, asura_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_species_filter, charr_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_species_filter, human_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_species_filter, norn_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_species_filter, sylvari_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_texture, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_texture, path_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_texture, original_token_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_trail_data, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_trail_data, trail_data_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail, achievement_bit_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail, achievement_id_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail, alpha_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail, animation_speed_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail, can_fade_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail, distance_fade_end_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail, distance_fade_start_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail, is_wall_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail, bhdraft__schedule_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail, bhdraft__schedule_duration_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail, scale_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail, category_), + PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail, map_id_), +}; +static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, 7, sizeof(::Proto_Node::Category_ChildrenEntry_DoNotUse)}, + { 9, -1, sizeof(::Proto_Node::Category)}, + { 20, -1, sizeof(::Proto_Node::Icon_texture)}, + { 27, -1, sizeof(::Proto_Node::Icon_position)}, + { 35, -1, sizeof(::Proto_Node::Icon_euler_rotation)}, + { 43, -1, sizeof(::Proto_Node::Icon_trigger_guid)}, + { 49, -1, sizeof(::Proto_Node::Icon_trigger)}, + { 68, -1, sizeof(::Proto_Node::Icon)}, + { 93, -1, sizeof(::Proto_Node::Trail_color)}, + { 99, -1, sizeof(::Proto_Node::Trail_festival_filter)}, + { 111, -1, sizeof(::Proto_Node::Trail_guid)}, + { 117, -1, sizeof(::Proto_Node::Trail_map_type_filter)}, + { 146, -1, sizeof(::Proto_Node::Trail_mount_filter)}, + { 161, -1, sizeof(::Proto_Node::Trail_profession_filter)}, + { 175, -1, sizeof(::Proto_Node::Trail_specialization_filter)}, + { 252, -1, sizeof(::Proto_Node::Trail_species_filter)}, + { 262, -1, sizeof(::Proto_Node::Trail_texture)}, + { 269, -1, sizeof(::Proto_Node::Trail_trail_data)}, + { 275, -1, sizeof(::Proto_Node::Trail)}, +}; + +static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { + reinterpret_cast(&::Proto_Node::_Category_ChildrenEntry_DoNotUse_default_instance_), + reinterpret_cast(&::Proto_Node::_Category_default_instance_), + reinterpret_cast(&::Proto_Node::_Icon_texture_default_instance_), + reinterpret_cast(&::Proto_Node::_Icon_position_default_instance_), + reinterpret_cast(&::Proto_Node::_Icon_euler_rotation_default_instance_), + reinterpret_cast(&::Proto_Node::_Icon_trigger_guid_default_instance_), + reinterpret_cast(&::Proto_Node::_Icon_trigger_default_instance_), + reinterpret_cast(&::Proto_Node::_Icon_default_instance_), + reinterpret_cast(&::Proto_Node::_Trail_color_default_instance_), + reinterpret_cast(&::Proto_Node::_Trail_festival_filter_default_instance_), + reinterpret_cast(&::Proto_Node::_Trail_guid_default_instance_), + reinterpret_cast(&::Proto_Node::_Trail_map_type_filter_default_instance_), + reinterpret_cast(&::Proto_Node::_Trail_mount_filter_default_instance_), + reinterpret_cast(&::Proto_Node::_Trail_profession_filter_default_instance_), + reinterpret_cast(&::Proto_Node::_Trail_specialization_filter_default_instance_), + reinterpret_cast(&::Proto_Node::_Trail_species_filter_default_instance_), + reinterpret_cast(&::Proto_Node::_Trail_texture_default_instance_), + reinterpret_cast(&::Proto_Node::_Trail_trail_data_default_instance_), + reinterpret_cast(&::Proto_Node::_Trail_default_instance_), +}; + +const char descriptor_table_protodef_node_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = + "\n\nnode.proto\022\nProto_Node\032\031google/protobu" + "f/any.proto\"\363\001\n\010Category\022\032\n\022default_visi" + "bility\030\001 \001(\010\022\024\n\014display_name\030\002 \001(\t\022\024\n\014is" + "_separator\030\003 \001(\010\022\014\n\004name\030\004 \001(\t\022\024\n\014toolti" + "p_name\030\005 \001(\t\0224\n\010children\030\006 \003(\0132\".Proto_N" + "ode.Category.ChildrenEntry\032E\n\rChildrenEn" + "try\022\013\n\003key\030\001 \001(\t\022#\n\005value\030\002 \001(\0132\024.Proto_" + "Node.Category:\0028\001\"\312\n\n\004Icon\022\027\n\017achievemen" + "t_bit\030\001 \001(\007\022\026\n\016achievement_id\030\002 \001(\005\022\r\n\005a" + "lpha\030\003 \001(\002\022\020\n\010can_fade\030\004 \001(\010\022\031\n\021distance" + "_fade_end\030\005 \001(\002\022\033\n\023distance_fade_start\030\006" + " \001(\002\022\025\n\rheight_offset\030\007 \001(\002\022\032\n\022__tentati" + "ve__scale\030\010 \001(\002\022\030\n\020map_display_size\030\t \001(" + "\005\022\016\n\006map_id\030\n \001(\005\022\036\n\026maximum_size_on_scr" + "een\030\013 \001(\005\022\036\n\026minimum_size_on_screen\030\014 \001(" + "\005\022\"\n\032__tentative__render_ingame\030\r \001(\010\022\"\n" + "\032__tentative__render_on_map\030\016 \001(\010\022&\n\036__t" + "entative__render_on_minimap\030\017 \001(\010\022\036\n\026sca" + "le_on_map_with_zoom\030\020 \001(\010\022\031\n\021bhdraft__sc" + "hedule\030\021 \001(\t\022\"\n\032bhdraft__schedule_durati" + "on\030\022 \001(\002\022\027\n\017tip_description\030\023 \001(\t\022\020\n\010tip" + "_name\030\024 \001(\t\032E\n\007texture\022\014\n\004path\030\001 \001(\t\022,\n\016" + "original_token\030\002 \001(\0132\024.google.protobuf.A" + "ny\032+\n\010position\022\t\n\001x\030\001 \001(\002\022\t\n\001y\030\002 \001(\002\022\t\n\001" + "z\030\003 \001(\002\0321\n\016euler_rotation\022\t\n\001x\030\001 \001(\002\022\t\n\001" + "y\030\002 \001(\002\022\t\n\001z\030\003 \001(\002\032\371\004\n\007trigger\022\024\n\014auto_t" + "rigger\030\001 \001(\010\022\024\n\014bounce_delay\030\002 \001(\002\022\027\n\017bo" + "unce_duration\030\003 \001(\002\022\025\n\rbounce_height\030\004 \001" + "(\002\022\035\n\025action_copy_clipboard\030\005 \001(\t\022\033\n\023act" + "ion_copy_message\030\006 \001(\t\022\025\n\rhas_countdown\030" + "\007 \001(\010\022\033\n\023action_info_message\030\010 \001(\t\022\026\n\016in" + "vert_display\030\t \001(\010\022\024\n\014reset_length\030\n \001(\002" + "\022\r\n\005range\030\013 \001(\002\0222\n\024action_hide_category\030" + "\014 \001(\0132\024.Proto_Node.Category\0222\n\024action_sh" + "ow_category\030\r \001(\0132\024.Proto_Node.Category\022" + "4\n\026action_toggle_category\030\016 \001(\0132\024.Proto_" + "Node.Category\032\024\n\004guid\022\014\n\004guid\030\001 \001(\005\"\260\001\n\016" + "reset_behavior\022\022\n\016always_visible\020\000\022\016\n\nma" + "p_change\020\001\022\017\n\013daily_reset\020\002\022\t\n\005never\020\003\022\t" + "\n\005timer\020\004\022\r\n\tmap_reset\020\005\022\023\n\017instance_cha" + "nge\020\006\022\035\n\031daily_reset_per_character\020\007\022\020\n\014" + "weekly_reset\020\010\"\350\035\n\005Trail\022\027\n\017achievement_" + "bit\030\001 \001(\007\022\026\n\016achievement_id\030\002 \001(\005\022\r\n\005alp" + "ha\030\003 \001(\002\022\027\n\017animation_speed\030\004 \001(\002\022\020\n\010can" + "_fade\030\005 \001(\010\022\031\n\021distance_fade_end\030\006 \001(\002\022\033" + "\n\023distance_fade_start\030\007 \001(\002\022\017\n\007is_wall\030\010" + " \001(\010\022\031\n\021bhdraft__schedule\030\t \001(\t\022\"\n\032bhdra" + "ft__schedule_duration\030\n \001(\002\022\r\n\005scale\030\013 \001" + "(\002\022&\n\010category\030\014 \001(\0132\024.Proto_Node.Catego" + "ry\022\016\n\006map_id\030\r \001(\005\032\024\n\005color\022\013\n\003hex\030\001 \001(\t" + "\032\270\001\n\017festival_filter\022\022\n\ndragonbash\030\001 \001(\010" + "\022\"\n\032festival_of_the_four_winds\030\002 \001(\010\022\021\n\t" + "halloween\030\003 \001(\010\022\026\n\016lunar_new_year\030\004 \001(\010\022" + " \n\030super_adventure_festival\030\005 \001(\010\022\022\n\nwin" + "tersday\030\006 \001(\010\022\014\n\004none\030\007 \001(\010\032\024\n\004guid\022\014\n\004g" + "uid\030\001 \001(\005\032\350\004\n\017map_type_filter\022\023\n\013unknown" + "_map\030\001 \001(\010\022\024\n\014redirect_map\030\002 \001(\010\022\034\n\024char" + "acter_create_map\030\003 \001(\010\022\017\n\007pvp_map\030\004 \001(\010\022" + "\017\n\007gvg_map\030\005 \001(\010\022\024\n\014instance_map\030\006 \001(\010\022\022" + "\n\npublic_map\030\007 \001(\010\022\026\n\016tournament_map\030\010 \001" + "(\010\022\024\n\014tutorial_map\030\t \001(\010\022\033\n\023user_tournam" + "ent_map\030\n \001(\010\022\022\n\ncenter_map\030\013 \001(\010\022!\n\031ete" + "rnal_battlegrounds_map\030\014 \001(\010\022\024\n\014bluehome" + "_map\030\r \001(\010\022\034\n\024blue_borderlands_map\030\016 \001(\010" + "\022\026\n\016green_home_map\030\017 \001(\010\022\035\n\025green_border" + "lands_map\030\020 \001(\010\022\024\n\014red_home_map\030\021 \001(\010\022\033\n" + "\023red_borderlands_map\030\022 \001(\010\022\031\n\021fortunes_v" + "ale_map\030\023 \001(\010\022\027\n\017jump_puzzle_map\030\024 \001(\010\022\034" + "\n\024obsidian_sanctum_map\030\025 \001(\010\022\035\n\025edge_of_" + "the_mists_map\030\026 \001(\010\022\027\n\017public_mini_map\030\027" + " \001(\010\022\026\n\016wvw_lounge_map\030\030 \001(\010\032\302\001\n\014mount_f" + "ilter\022\016\n\006raptor\030\001 \001(\010\022\020\n\010springer\030\002 \001(\010\022" + "\017\n\007skimmer\030\003 \001(\010\022\016\n\006jackal\030\004 \001(\010\022\017\n\007grif" + "fon\030\005 \001(\010\022\025\n\rroller_beetle\030\006 \001(\010\022\017\n\007warc" + "law\030\007 \001(\010\022\021\n\tskyscalee\030\010 \001(\010\022\r\n\005skiff\030\t " + "\001(\010\022\024\n\014seige_turtle\030\n \001(\010\032\266\001\n\021profession" + "_filter\022\020\n\010guardian\030\001 \001(\010\022\017\n\007warrior\030\002 \001" + "(\010\022\020\n\010engineer\030\003 \001(\010\022\016\n\006ranger\030\004 \001(\010\022\r\n\005" + "thief\030\005 \001(\010\022\024\n\014elementalist\030\006 \001(\010\022\016\n\006mes" + "mer\030\007 \001(\010\022\023\n\013necromancer\030\010 \001(\010\022\022\n\nrevena" + "ntnt\030\t \001(\010\032\313\017\n\025specialization_filter\022\034\n\024" + "elementalist_tempest\0300 \001(\010\022\031\n\021engineer_s" + "crapper\030+ \001(\010\022\035\n\025guardian_dragonhunter\030\033" + " \001(\010\022\033\n\023mesmer_chronomancer\030( \001(\010\022\032\n\022nec" + "romancer_reaper\030\" \001(\010\022\024\n\014ranger_druid\030\005 " + "\001(\010\022\027\n\017revenant_herald\0304 \001(\010\022\027\n\017thief_da" + "redevil\030\007 \001(\010\022\031\n\021warrior_berserker\030\022 \001(\010" + "\022\033\n\023elementalist_weaver\0308 \001(\010\022\032\n\022enginee" + "r_holosmith\0309 \001(\010\022\032\n\022guardian_firebrand\030" + "> \001(\010\022\025\n\rmesmer_mirage\030; \001(\010\022\033\n\023necroman" + "cer_scourge\030< \001(\010\022\030\n\020ranger_soulbeast\0307 " + "\001(\010\022\031\n\021revenant_renegade\030\? \001(\010\022\025\n\rthief_" + "deadeye\030: \001(\010\022\034\n\024warrior_spellbreaker\030= " + "\001(\010\022\034\n\024elmentalist_catalyst\030C \001(\010\022\032\n\022eng" + "ineer_mechanist\030F \001(\010\022\033\n\023guardian_willbe" + "nder\030A \001(\010\022\027\n\017mesmer_virtuoso\030B \001(\010\022\035\n\025n" + "ecromancer_harbinger\030@ \001(\010\022\026\n\016ranger_unt" + "amed\030H \001(\010\022\033\n\023revenant_vindicator\030E \001(\010\022" + "\025\n\rthief_specter\030G \001(\010\022\032\n\022warrior_blades" + "worn\030D \001(\010\022\030\n\020elementalist_air\030) \001(\010\022\033\n\023" + "elementalist_arcane\030% \001(\010\022\032\n\022elementalis" + "t_earth\030\032 \001(\010\022\031\n\021elementalist_fire\030\037 \001(\010" + "\022\032\n\022elementalist_water\030\021 \001(\010\022\030\n\020engineer" + "_alchemy\030\035 \001(\010\022\033\n\023engineer_explosives\030\006 " + "\001(\010\022\031\n\021engineer_firearms\030& \001(\010\022\033\n\023engine" + "er_inventions\030/ \001(\010\022\026\n\016engineer_tools\030\025 " + "\001(\010\022\026\n\016guardian_honor\0301 \001(\010\022\031\n\021guardian_" + "radiance\030\020 \001(\010\022\026\n\016guardian_valor\030\r \001(\010\022\030" + "\n\020guardian_virtues\030. \001(\010\022\025\n\rguardian_zea" + "l\030* \001(\010\022\024\n\014mesmer_chaos\030- \001(\010\022\031\n\021mesmer_" + "domination\030\n \001(\010\022\026\n\016mesmer_dueling\030\001 \001(\010" + "\022\030\n\020mesmer_illusions\030\030 \001(\010\022\032\n\022mesmer_ins" + "piration\030\027 \001(\010\022\037\n\027necromancer_blood_magi" + "c\030\023 \001(\010\022\032\n\022necromancer_curses\030\' \001(\010\022\037\n\027n" + "ecromancer_death_magic\030\002 \001(\010\022 \n\030necroman" + "cer_soul_reaping\0302 \001(\010\022\031\n\021necromancer_sp" + "ite\0305 \001(\010\022\033\n\023ranger_beastmastery\030 \001(\010\022\033" + "\n\023ranger_marksmanship\030\010 \001(\010\022\033\n\023ranger_na" + "ture_magic\030\031 \001(\010\022\032\n\022ranger_skirmishing\030\036" + " \001(\010\022\"\n\032ranger_wilderness_survival\030! \001(\010" + "\022\033\n\023revenant_corruption\030\016 \001(\010\022\034\n\024revenan" + "t_devastation\030\017 \001(\010\022\033\n\023revenant_invocati" + "on\030\003 \001(\010\022\034\n\024revenant_retribution\030\t \001(\010\022\032" + "\n\022revenant_salvation\030\014 \001(\010\022\030\n\020thief_acro" + "batics\0306 \001(\010\022\036\n\026thief_critical_strikes\030#" + " \001(\010\022\031\n\021thief_deadly_arts\030\034 \001(\010\022\031\n\021thief" + "_shadow_arts\030\024 \001(\010\022\026\n\016thief_trickery\030, \001" + "(\010\022\024\n\014warrior_arms\030$ \001(\010\022\027\n\017warrior_defe" + "nse\030\026 \001(\010\022\032\n\022warrior_discipline\0303 \001(\010\022\030\n" + "\020warrior_strength\030\004 \001(\010\022\027\n\017warrior_tacti" + "cs\030\013 \001(\010\032\\\n\016species_filter\022\r\n\005asura\030\001 \001(" + "\010\022\r\n\005charr\030\002 \001(\010\022\r\n\005human\030\003 \001(\010\022\014\n\004norn\030" + "\004 \001(\010\022\017\n\007sylvari\030\005 \001(\010\032E\n\007texture\022\014\n\004pat" + "h\030\001 \001(\t\022,\n\016original_token\030\002 \001(\0132\024.google" + ".protobuf.Any\032 \n\ntrail_data\022\022\n\ntrail_dat" + "a\030\001 \001(\t\"@\n\016cull_chirality\022\010\n\004none\020\000\022\r\n\tc" + "lockwise\020\001\022\025\n\021counter_clockwise\020\002b\006proto" + "3" + ; +static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_node_2eproto_deps[1] = { + &::descriptor_table_google_2fprotobuf_2fany_2eproto, +}; +static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_node_2eproto_sccs[18] = { + &scc_info_Category_node_2eproto.base, + &scc_info_Icon_node_2eproto.base, + &scc_info_Icon_euler_rotation_node_2eproto.base, + &scc_info_Icon_position_node_2eproto.base, + &scc_info_Icon_texture_node_2eproto.base, + &scc_info_Icon_trigger_node_2eproto.base, + &scc_info_Icon_trigger_guid_node_2eproto.base, + &scc_info_Trail_node_2eproto.base, + &scc_info_Trail_color_node_2eproto.base, + &scc_info_Trail_festival_filter_node_2eproto.base, + &scc_info_Trail_guid_node_2eproto.base, + &scc_info_Trail_map_type_filter_node_2eproto.base, + &scc_info_Trail_mount_filter_node_2eproto.base, + &scc_info_Trail_profession_filter_node_2eproto.base, + &scc_info_Trail_specialization_filter_node_2eproto.base, + &scc_info_Trail_species_filter_node_2eproto.base, + &scc_info_Trail_texture_node_2eproto.base, + &scc_info_Trail_trail_data_node_2eproto.base, +}; +static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_node_2eproto_once; +const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_node_2eproto = { + false, false, descriptor_table_protodef_node_2eproto, "node.proto", 5481, + &descriptor_table_node_2eproto_once, descriptor_table_node_2eproto_sccs, descriptor_table_node_2eproto_deps, 18, 1, + schemas, file_default_instances, TableStruct_node_2eproto::offsets, + file_level_metadata_node_2eproto, 19, file_level_enum_descriptors_node_2eproto, file_level_service_descriptors_node_2eproto, +}; + +// Force running AddDescriptors() at dynamic initialization time. +static bool dynamic_init_dummy_node_2eproto = (static_cast(::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_node_2eproto)), true); +namespace Proto_Node { +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* Icon_trigger_reset_behavior_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_node_2eproto); + return file_level_enum_descriptors_node_2eproto[0]; +} +bool Icon_trigger_reset_behavior_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + return true; + default: + return false; + } +} + +#if (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900) +constexpr Icon_trigger_reset_behavior Icon_trigger::always_visible; +constexpr Icon_trigger_reset_behavior Icon_trigger::map_change; +constexpr Icon_trigger_reset_behavior Icon_trigger::daily_reset; +constexpr Icon_trigger_reset_behavior Icon_trigger::never; +constexpr Icon_trigger_reset_behavior Icon_trigger::timer; +constexpr Icon_trigger_reset_behavior Icon_trigger::map_reset; +constexpr Icon_trigger_reset_behavior Icon_trigger::instance_change; +constexpr Icon_trigger_reset_behavior Icon_trigger::daily_reset_per_character; +constexpr Icon_trigger_reset_behavior Icon_trigger::weekly_reset; +constexpr Icon_trigger_reset_behavior Icon_trigger::reset_behavior_MIN; +constexpr Icon_trigger_reset_behavior Icon_trigger::reset_behavior_MAX; +constexpr int Icon_trigger::reset_behavior_ARRAYSIZE; +#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900) +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* Trail_cull_chirality_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_node_2eproto); + return file_level_enum_descriptors_node_2eproto[1]; +} +bool Trail_cull_chirality_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + return true; + default: + return false; + } +} + +#if (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900) +constexpr Trail_cull_chirality Trail::none; +constexpr Trail_cull_chirality Trail::clockwise; +constexpr Trail_cull_chirality Trail::counter_clockwise; +constexpr Trail_cull_chirality Trail::cull_chirality_MIN; +constexpr Trail_cull_chirality Trail::cull_chirality_MAX; +constexpr int Trail::cull_chirality_ARRAYSIZE; +#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900) + +// =================================================================== + +Category_ChildrenEntry_DoNotUse::Category_ChildrenEntry_DoNotUse() {} +Category_ChildrenEntry_DoNotUse::Category_ChildrenEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : SuperType(arena) {} +void Category_ChildrenEntry_DoNotUse::MergeFrom(const Category_ChildrenEntry_DoNotUse& other) { + MergeFromInternal(other); +} +::PROTOBUF_NAMESPACE_ID::Metadata Category_ChildrenEntry_DoNotUse::GetMetadata() const { + return GetMetadataStatic(); +} +void Category_ChildrenEntry_DoNotUse::MergeFrom( + const ::PROTOBUF_NAMESPACE_ID::Message& other) { + ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom(other); +} + + +// =================================================================== + +void Category::InitAsDefaultInstance() { +} +class Category::_Internal { + public: +}; + +Category::Category(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena), + children_(arena) { + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:Proto_Node.Category) +} +Category::Category(const Category& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + children_.MergeFrom(from.children_); + display_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_display_name().empty()) { + display_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_display_name(), + GetArena()); + } + name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_name().empty()) { + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_name(), + GetArena()); + } + tooltip_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_tooltip_name().empty()) { + tooltip_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_tooltip_name(), + GetArena()); + } + ::memcpy(&default_visibility_, &from.default_visibility_, + static_cast(reinterpret_cast(&is_separator_) - + reinterpret_cast(&default_visibility_)) + sizeof(is_separator_)); + // @@protoc_insertion_point(copy_constructor:Proto_Node.Category) +} + +void Category::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Category_node_2eproto.base); + display_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + tooltip_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + ::memset(&default_visibility_, 0, static_cast( + reinterpret_cast(&is_separator_) - + reinterpret_cast(&default_visibility_)) + sizeof(is_separator_)); +} + +Category::~Category() { + // @@protoc_insertion_point(destructor:Proto_Node.Category) + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +void Category::SharedDtor() { + GOOGLE_DCHECK(GetArena() == nullptr); + display_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + tooltip_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void Category::ArenaDtor(void* object) { + Category* _this = reinterpret_cast< Category* >(object); + (void)_this; +} +void Category::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void Category::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const Category& Category::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Category_node_2eproto.base); + return *internal_default_instance(); +} + + +void Category::Clear() { +// @@protoc_insertion_point(message_clear_start:Proto_Node.Category) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + children_.Clear(); + display_name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + tooltip_name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + ::memset(&default_visibility_, 0, static_cast( + reinterpret_cast(&is_separator_) - + reinterpret_cast(&default_visibility_)) + sizeof(is_separator_)); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* Category::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // bool default_visibility = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + default_visibility_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string display_name = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + auto str = _internal_mutable_display_name(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "Proto_Node.Category.display_name")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool is_separator = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { + is_separator_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string name = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { + auto str = _internal_mutable_name(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "Proto_Node.Category.name")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string tooltip_name = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) { + auto str = _internal_mutable_tooltip_name(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "Proto_Node.Category.tooltip_name")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // map children = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(&children_, ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<50>(ptr)); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* Category::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:Proto_Node.Category) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // bool default_visibility = 1; + if (this->default_visibility() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->_internal_default_visibility(), target); + } + + // string display_name = 2; + if (this->display_name().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_display_name().data(), static_cast(this->_internal_display_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "Proto_Node.Category.display_name"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_display_name(), target); + } + + // bool is_separator = 3; + if (this->is_separator() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_is_separator(), target); + } + + // string name = 4; + if (this->name().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_name().data(), static_cast(this->_internal_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "Proto_Node.Category.name"); + target = stream->WriteStringMaybeAliased( + 4, this->_internal_name(), target); + } + + // string tooltip_name = 5; + if (this->tooltip_name().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_tooltip_name().data(), static_cast(this->_internal_tooltip_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "Proto_Node.Category.tooltip_name"); + target = stream->WriteStringMaybeAliased( + 5, this->_internal_tooltip_name(), target); + } + + // map children = 6; + if (!this->_internal_children().empty()) { + typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Proto_Node::Category >::const_pointer + ConstPtr; + typedef ConstPtr SortItem; + typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst Less; + struct Utf8Check { + static void Check(ConstPtr p) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + p->first.data(), static_cast(p->first.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "Proto_Node.Category.ChildrenEntry.key"); + } + }; + + if (stream->IsSerializationDeterministic() && + this->_internal_children().size() > 1) { + ::std::unique_ptr items( + new SortItem[this->_internal_children().size()]); + typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Proto_Node::Category >::size_type size_type; + size_type n = 0; + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Proto_Node::Category >::const_iterator + it = this->_internal_children().begin(); + it != this->_internal_children().end(); ++it, ++n) { + items[static_cast(n)] = SortItem(&*it); + } + ::std::sort(&items[0], &items[static_cast(n)], Less()); + for (size_type i = 0; i < n; i++) { + target = Category_ChildrenEntry_DoNotUse::Funcs::InternalSerialize(6, items[static_cast(i)]->first, items[static_cast(i)]->second, target, stream); + Utf8Check::Check(&(*items[static_cast(i)])); + } + } else { + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Proto_Node::Category >::const_iterator + it = this->_internal_children().begin(); + it != this->_internal_children().end(); ++it) { + target = Category_ChildrenEntry_DoNotUse::Funcs::InternalSerialize(6, it->first, it->second, target, stream); + Utf8Check::Check(&(*it)); + } + } + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:Proto_Node.Category) + return target; +} + +size_t Category::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:Proto_Node.Category) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // map children = 6; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_children_size()); + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Proto_Node::Category >::const_iterator + it = this->_internal_children().begin(); + it != this->_internal_children().end(); ++it) { + total_size += Category_ChildrenEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); + } + + // string display_name = 2; + if (this->display_name().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_display_name()); + } + + // string name = 4; + if (this->name().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_name()); + } + + // string tooltip_name = 5; + if (this->tooltip_name().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_tooltip_name()); + } + + // bool default_visibility = 1; + if (this->default_visibility() != 0) { + total_size += 1 + 1; + } + + // bool is_separator = 3; + if (this->is_separator() != 0) { + total_size += 1 + 1; + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void Category::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:Proto_Node.Category) + GOOGLE_DCHECK_NE(&from, this); + const Category* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:Proto_Node.Category) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:Proto_Node.Category) + MergeFrom(*source); + } +} + +void Category::MergeFrom(const Category& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:Proto_Node.Category) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + children_.MergeFrom(from.children_); + if (from.display_name().size() > 0) { + _internal_set_display_name(from._internal_display_name()); + } + if (from.name().size() > 0) { + _internal_set_name(from._internal_name()); + } + if (from.tooltip_name().size() > 0) { + _internal_set_tooltip_name(from._internal_tooltip_name()); + } + if (from.default_visibility() != 0) { + _internal_set_default_visibility(from._internal_default_visibility()); + } + if (from.is_separator() != 0) { + _internal_set_is_separator(from._internal_is_separator()); + } +} + +void Category::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:Proto_Node.Category) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Category::CopyFrom(const Category& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:Proto_Node.Category) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Category::IsInitialized() const { + return true; +} + +void Category::InternalSwap(Category* other) { + using std::swap; + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + children_.Swap(&other->children_); + display_name_.Swap(&other->display_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + tooltip_name_.Swap(&other->tooltip_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(Category, is_separator_) + + sizeof(Category::is_separator_) + - PROTOBUF_FIELD_OFFSET(Category, default_visibility_)>( + reinterpret_cast(&default_visibility_), + reinterpret_cast(&other->default_visibility_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata Category::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void Icon_texture::InitAsDefaultInstance() { + ::Proto_Node::_Icon_texture_default_instance_._instance.get_mutable()->original_token_ = const_cast< PROTOBUF_NAMESPACE_ID::Any*>( + PROTOBUF_NAMESPACE_ID::Any::internal_default_instance()); +} +class Icon_texture::_Internal { + public: + static const PROTOBUF_NAMESPACE_ID::Any& original_token(const Icon_texture* msg); +}; + +const PROTOBUF_NAMESPACE_ID::Any& +Icon_texture::_Internal::original_token(const Icon_texture* msg) { + return *msg->original_token_; +} +void Icon_texture::clear_original_token() { + if (GetArena() == nullptr && original_token_ != nullptr) { + delete original_token_; + } + original_token_ = nullptr; +} +Icon_texture::Icon_texture(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:Proto_Node.Icon.texture) +} +Icon_texture::Icon_texture(const Icon_texture& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + path_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_path().empty()) { + path_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_path(), + GetArena()); + } + if (from._internal_has_original_token()) { + original_token_ = new PROTOBUF_NAMESPACE_ID::Any(*from.original_token_); + } else { + original_token_ = nullptr; + } + // @@protoc_insertion_point(copy_constructor:Proto_Node.Icon.texture) +} + +void Icon_texture::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Icon_texture_node_2eproto.base); + path_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + original_token_ = nullptr; +} + +Icon_texture::~Icon_texture() { + // @@protoc_insertion_point(destructor:Proto_Node.Icon.texture) + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +void Icon_texture::SharedDtor() { + GOOGLE_DCHECK(GetArena() == nullptr); + path_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (this != internal_default_instance()) delete original_token_; +} + +void Icon_texture::ArenaDtor(void* object) { + Icon_texture* _this = reinterpret_cast< Icon_texture* >(object); + (void)_this; +} +void Icon_texture::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void Icon_texture::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const Icon_texture& Icon_texture::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Icon_texture_node_2eproto.base); + return *internal_default_instance(); +} + + +void Icon_texture::Clear() { +// @@protoc_insertion_point(message_clear_start:Proto_Node.Icon.texture) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + path_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + if (GetArena() == nullptr && original_token_ != nullptr) { + delete original_token_; + } + original_token_ = nullptr; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* Icon_texture::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // string path = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_path(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "Proto_Node.Icon.texture.path")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // .google.protobuf.Any original_token = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr = ctx->ParseMessage(_internal_mutable_original_token(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* Icon_texture::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:Proto_Node.Icon.texture) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string path = 1; + if (this->path().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_path().data(), static_cast(this->_internal_path().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "Proto_Node.Icon.texture.path"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_path(), target); + } + + // .google.protobuf.Any original_token = 2; + if (this->has_original_token()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 2, _Internal::original_token(this), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:Proto_Node.Icon.texture) + return target; +} + +size_t Icon_texture::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:Proto_Node.Icon.texture) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string path = 1; + if (this->path().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_path()); + } + + // .google.protobuf.Any original_token = 2; + if (this->has_original_token()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *original_token_); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void Icon_texture::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:Proto_Node.Icon.texture) + GOOGLE_DCHECK_NE(&from, this); + const Icon_texture* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:Proto_Node.Icon.texture) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:Proto_Node.Icon.texture) + MergeFrom(*source); + } +} + +void Icon_texture::MergeFrom(const Icon_texture& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:Proto_Node.Icon.texture) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.path().size() > 0) { + _internal_set_path(from._internal_path()); + } + if (from.has_original_token()) { + _internal_mutable_original_token()->PROTOBUF_NAMESPACE_ID::Any::MergeFrom(from._internal_original_token()); + } +} + +void Icon_texture::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:Proto_Node.Icon.texture) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Icon_texture::CopyFrom(const Icon_texture& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:Proto_Node.Icon.texture) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Icon_texture::IsInitialized() const { + return true; +} + +void Icon_texture::InternalSwap(Icon_texture* other) { + using std::swap; + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + path_.Swap(&other->path_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + swap(original_token_, other->original_token_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata Icon_texture::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void Icon_position::InitAsDefaultInstance() { +} +class Icon_position::_Internal { + public: +}; + +Icon_position::Icon_position(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:Proto_Node.Icon.position) +} +Icon_position::Icon_position(const Icon_position& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::memcpy(&x_, &from.x_, + static_cast(reinterpret_cast(&z_) - + reinterpret_cast(&x_)) + sizeof(z_)); + // @@protoc_insertion_point(copy_constructor:Proto_Node.Icon.position) +} + +void Icon_position::SharedCtor() { + ::memset(&x_, 0, static_cast( + reinterpret_cast(&z_) - + reinterpret_cast(&x_)) + sizeof(z_)); +} + +Icon_position::~Icon_position() { + // @@protoc_insertion_point(destructor:Proto_Node.Icon.position) + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +void Icon_position::SharedDtor() { + GOOGLE_DCHECK(GetArena() == nullptr); +} + +void Icon_position::ArenaDtor(void* object) { + Icon_position* _this = reinterpret_cast< Icon_position* >(object); + (void)_this; +} +void Icon_position::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void Icon_position::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const Icon_position& Icon_position::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Icon_position_node_2eproto.base); + return *internal_default_instance(); +} + + +void Icon_position::Clear() { +// @@protoc_insertion_point(message_clear_start:Proto_Node.Icon.position) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + ::memset(&x_, 0, static_cast( + reinterpret_cast(&z_) - + reinterpret_cast(&x_)) + sizeof(z_)); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* Icon_position::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // float x = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 13)) { + x_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else goto handle_unusual; + continue; + // float y = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 21)) { + y_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else goto handle_unusual; + continue; + // float z = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 29)) { + z_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* Icon_position::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:Proto_Node.Icon.position) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // float x = 1; + if (!(this->x() <= 0 && this->x() >= 0)) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(1, this->_internal_x(), target); + } + + // float y = 2; + if (!(this->y() <= 0 && this->y() >= 0)) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2, this->_internal_y(), target); + } + + // float z = 3; + if (!(this->z() <= 0 && this->z() >= 0)) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(3, this->_internal_z(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:Proto_Node.Icon.position) + return target; +} + +size_t Icon_position::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:Proto_Node.Icon.position) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // float x = 1; + if (!(this->x() <= 0 && this->x() >= 0)) { + total_size += 1 + 4; + } + + // float y = 2; + if (!(this->y() <= 0 && this->y() >= 0)) { + total_size += 1 + 4; + } + + // float z = 3; + if (!(this->z() <= 0 && this->z() >= 0)) { + total_size += 1 + 4; + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void Icon_position::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:Proto_Node.Icon.position) + GOOGLE_DCHECK_NE(&from, this); + const Icon_position* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:Proto_Node.Icon.position) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:Proto_Node.Icon.position) + MergeFrom(*source); + } +} + +void Icon_position::MergeFrom(const Icon_position& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:Proto_Node.Icon.position) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (!(from.x() <= 0 && from.x() >= 0)) { + _internal_set_x(from._internal_x()); + } + if (!(from.y() <= 0 && from.y() >= 0)) { + _internal_set_y(from._internal_y()); + } + if (!(from.z() <= 0 && from.z() >= 0)) { + _internal_set_z(from._internal_z()); + } +} + +void Icon_position::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:Proto_Node.Icon.position) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Icon_position::CopyFrom(const Icon_position& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:Proto_Node.Icon.position) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Icon_position::IsInitialized() const { + return true; +} + +void Icon_position::InternalSwap(Icon_position* other) { + using std::swap; + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(Icon_position, z_) + + sizeof(Icon_position::z_) + - PROTOBUF_FIELD_OFFSET(Icon_position, x_)>( + reinterpret_cast(&x_), + reinterpret_cast(&other->x_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata Icon_position::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void Icon_euler_rotation::InitAsDefaultInstance() { +} +class Icon_euler_rotation::_Internal { + public: +}; + +Icon_euler_rotation::Icon_euler_rotation(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:Proto_Node.Icon.euler_rotation) +} +Icon_euler_rotation::Icon_euler_rotation(const Icon_euler_rotation& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::memcpy(&x_, &from.x_, + static_cast(reinterpret_cast(&z_) - + reinterpret_cast(&x_)) + sizeof(z_)); + // @@protoc_insertion_point(copy_constructor:Proto_Node.Icon.euler_rotation) +} + +void Icon_euler_rotation::SharedCtor() { + ::memset(&x_, 0, static_cast( + reinterpret_cast(&z_) - + reinterpret_cast(&x_)) + sizeof(z_)); +} + +Icon_euler_rotation::~Icon_euler_rotation() { + // @@protoc_insertion_point(destructor:Proto_Node.Icon.euler_rotation) + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +void Icon_euler_rotation::SharedDtor() { + GOOGLE_DCHECK(GetArena() == nullptr); +} + +void Icon_euler_rotation::ArenaDtor(void* object) { + Icon_euler_rotation* _this = reinterpret_cast< Icon_euler_rotation* >(object); + (void)_this; +} +void Icon_euler_rotation::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void Icon_euler_rotation::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const Icon_euler_rotation& Icon_euler_rotation::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Icon_euler_rotation_node_2eproto.base); + return *internal_default_instance(); +} + + +void Icon_euler_rotation::Clear() { +// @@protoc_insertion_point(message_clear_start:Proto_Node.Icon.euler_rotation) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + ::memset(&x_, 0, static_cast( + reinterpret_cast(&z_) - + reinterpret_cast(&x_)) + sizeof(z_)); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* Icon_euler_rotation::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // float x = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 13)) { + x_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else goto handle_unusual; + continue; + // float y = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 21)) { + y_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else goto handle_unusual; + continue; + // float z = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 29)) { + z_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* Icon_euler_rotation::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:Proto_Node.Icon.euler_rotation) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // float x = 1; + if (!(this->x() <= 0 && this->x() >= 0)) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(1, this->_internal_x(), target); + } + + // float y = 2; + if (!(this->y() <= 0 && this->y() >= 0)) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2, this->_internal_y(), target); + } + + // float z = 3; + if (!(this->z() <= 0 && this->z() >= 0)) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(3, this->_internal_z(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:Proto_Node.Icon.euler_rotation) + return target; +} + +size_t Icon_euler_rotation::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:Proto_Node.Icon.euler_rotation) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // float x = 1; + if (!(this->x() <= 0 && this->x() >= 0)) { + total_size += 1 + 4; + } + + // float y = 2; + if (!(this->y() <= 0 && this->y() >= 0)) { + total_size += 1 + 4; + } + + // float z = 3; + if (!(this->z() <= 0 && this->z() >= 0)) { + total_size += 1 + 4; + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void Icon_euler_rotation::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:Proto_Node.Icon.euler_rotation) + GOOGLE_DCHECK_NE(&from, this); + const Icon_euler_rotation* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:Proto_Node.Icon.euler_rotation) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:Proto_Node.Icon.euler_rotation) + MergeFrom(*source); + } +} + +void Icon_euler_rotation::MergeFrom(const Icon_euler_rotation& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:Proto_Node.Icon.euler_rotation) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (!(from.x() <= 0 && from.x() >= 0)) { + _internal_set_x(from._internal_x()); + } + if (!(from.y() <= 0 && from.y() >= 0)) { + _internal_set_y(from._internal_y()); + } + if (!(from.z() <= 0 && from.z() >= 0)) { + _internal_set_z(from._internal_z()); + } +} + +void Icon_euler_rotation::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:Proto_Node.Icon.euler_rotation) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Icon_euler_rotation::CopyFrom(const Icon_euler_rotation& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:Proto_Node.Icon.euler_rotation) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Icon_euler_rotation::IsInitialized() const { + return true; +} + +void Icon_euler_rotation::InternalSwap(Icon_euler_rotation* other) { + using std::swap; + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(Icon_euler_rotation, z_) + + sizeof(Icon_euler_rotation::z_) + - PROTOBUF_FIELD_OFFSET(Icon_euler_rotation, x_)>( + reinterpret_cast(&x_), + reinterpret_cast(&other->x_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata Icon_euler_rotation::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void Icon_trigger_guid::InitAsDefaultInstance() { +} +class Icon_trigger_guid::_Internal { + public: +}; + +Icon_trigger_guid::Icon_trigger_guid(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:Proto_Node.Icon.trigger.guid) +} +Icon_trigger_guid::Icon_trigger_guid(const Icon_trigger_guid& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + guid_ = from.guid_; + // @@protoc_insertion_point(copy_constructor:Proto_Node.Icon.trigger.guid) +} + +void Icon_trigger_guid::SharedCtor() { + guid_ = 0; +} + +Icon_trigger_guid::~Icon_trigger_guid() { + // @@protoc_insertion_point(destructor:Proto_Node.Icon.trigger.guid) + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +void Icon_trigger_guid::SharedDtor() { + GOOGLE_DCHECK(GetArena() == nullptr); +} + +void Icon_trigger_guid::ArenaDtor(void* object) { + Icon_trigger_guid* _this = reinterpret_cast< Icon_trigger_guid* >(object); + (void)_this; +} +void Icon_trigger_guid::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void Icon_trigger_guid::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const Icon_trigger_guid& Icon_trigger_guid::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Icon_trigger_guid_node_2eproto.base); + return *internal_default_instance(); +} + + +void Icon_trigger_guid::Clear() { +// @@protoc_insertion_point(message_clear_start:Proto_Node.Icon.trigger.guid) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + guid_ = 0; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* Icon_trigger_guid::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // int32 guid = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + guid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* Icon_trigger_guid::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:Proto_Node.Icon.trigger.guid) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // int32 guid = 1; + if (this->guid() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_guid(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:Proto_Node.Icon.trigger.guid) + return target; +} + +size_t Icon_trigger_guid::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:Proto_Node.Icon.trigger.guid) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // int32 guid = 1; + if (this->guid() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + this->_internal_guid()); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void Icon_trigger_guid::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:Proto_Node.Icon.trigger.guid) + GOOGLE_DCHECK_NE(&from, this); + const Icon_trigger_guid* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:Proto_Node.Icon.trigger.guid) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:Proto_Node.Icon.trigger.guid) + MergeFrom(*source); + } +} + +void Icon_trigger_guid::MergeFrom(const Icon_trigger_guid& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:Proto_Node.Icon.trigger.guid) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.guid() != 0) { + _internal_set_guid(from._internal_guid()); + } +} + +void Icon_trigger_guid::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:Proto_Node.Icon.trigger.guid) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Icon_trigger_guid::CopyFrom(const Icon_trigger_guid& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:Proto_Node.Icon.trigger.guid) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Icon_trigger_guid::IsInitialized() const { + return true; +} + +void Icon_trigger_guid::InternalSwap(Icon_trigger_guid* other) { + using std::swap; + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + swap(guid_, other->guid_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata Icon_trigger_guid::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void Icon_trigger::InitAsDefaultInstance() { + ::Proto_Node::_Icon_trigger_default_instance_._instance.get_mutable()->action_hide_category_ = const_cast< ::Proto_Node::Category*>( + ::Proto_Node::Category::internal_default_instance()); + ::Proto_Node::_Icon_trigger_default_instance_._instance.get_mutable()->action_show_category_ = const_cast< ::Proto_Node::Category*>( + ::Proto_Node::Category::internal_default_instance()); + ::Proto_Node::_Icon_trigger_default_instance_._instance.get_mutable()->action_toggle_category_ = const_cast< ::Proto_Node::Category*>( + ::Proto_Node::Category::internal_default_instance()); +} +class Icon_trigger::_Internal { + public: + static const ::Proto_Node::Category& action_hide_category(const Icon_trigger* msg); + static const ::Proto_Node::Category& action_show_category(const Icon_trigger* msg); + static const ::Proto_Node::Category& action_toggle_category(const Icon_trigger* msg); +}; + +const ::Proto_Node::Category& +Icon_trigger::_Internal::action_hide_category(const Icon_trigger* msg) { + return *msg->action_hide_category_; +} +const ::Proto_Node::Category& +Icon_trigger::_Internal::action_show_category(const Icon_trigger* msg) { + return *msg->action_show_category_; +} +const ::Proto_Node::Category& +Icon_trigger::_Internal::action_toggle_category(const Icon_trigger* msg) { + return *msg->action_toggle_category_; +} +Icon_trigger::Icon_trigger(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:Proto_Node.Icon.trigger) +} +Icon_trigger::Icon_trigger(const Icon_trigger& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + action_copy_clipboard_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_action_copy_clipboard().empty()) { + action_copy_clipboard_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_action_copy_clipboard(), + GetArena()); + } + action_copy_message_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_action_copy_message().empty()) { + action_copy_message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_action_copy_message(), + GetArena()); + } + action_info_message_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_action_info_message().empty()) { + action_info_message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_action_info_message(), + GetArena()); + } + if (from._internal_has_action_hide_category()) { + action_hide_category_ = new ::Proto_Node::Category(*from.action_hide_category_); + } else { + action_hide_category_ = nullptr; + } + if (from._internal_has_action_show_category()) { + action_show_category_ = new ::Proto_Node::Category(*from.action_show_category_); + } else { + action_show_category_ = nullptr; + } + if (from._internal_has_action_toggle_category()) { + action_toggle_category_ = new ::Proto_Node::Category(*from.action_toggle_category_); + } else { + action_toggle_category_ = nullptr; + } + ::memcpy(&bounce_delay_, &from.bounce_delay_, + static_cast(reinterpret_cast(&range_) - + reinterpret_cast(&bounce_delay_)) + sizeof(range_)); + // @@protoc_insertion_point(copy_constructor:Proto_Node.Icon.trigger) +} + +void Icon_trigger::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Icon_trigger_node_2eproto.base); + action_copy_clipboard_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + action_copy_message_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + action_info_message_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + ::memset(&action_hide_category_, 0, static_cast( + reinterpret_cast(&range_) - + reinterpret_cast(&action_hide_category_)) + sizeof(range_)); +} + +Icon_trigger::~Icon_trigger() { + // @@protoc_insertion_point(destructor:Proto_Node.Icon.trigger) + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +void Icon_trigger::SharedDtor() { + GOOGLE_DCHECK(GetArena() == nullptr); + action_copy_clipboard_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + action_copy_message_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + action_info_message_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (this != internal_default_instance()) delete action_hide_category_; + if (this != internal_default_instance()) delete action_show_category_; + if (this != internal_default_instance()) delete action_toggle_category_; +} + +void Icon_trigger::ArenaDtor(void* object) { + Icon_trigger* _this = reinterpret_cast< Icon_trigger* >(object); + (void)_this; +} +void Icon_trigger::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void Icon_trigger::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const Icon_trigger& Icon_trigger::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Icon_trigger_node_2eproto.base); + return *internal_default_instance(); +} + + +void Icon_trigger::Clear() { +// @@protoc_insertion_point(message_clear_start:Proto_Node.Icon.trigger) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + action_copy_clipboard_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + action_copy_message_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + action_info_message_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + if (GetArena() == nullptr && action_hide_category_ != nullptr) { + delete action_hide_category_; + } + action_hide_category_ = nullptr; + if (GetArena() == nullptr && action_show_category_ != nullptr) { + delete action_show_category_; + } + action_show_category_ = nullptr; + if (GetArena() == nullptr && action_toggle_category_ != nullptr) { + delete action_toggle_category_; + } + action_toggle_category_ = nullptr; + ::memset(&bounce_delay_, 0, static_cast( + reinterpret_cast(&range_) - + reinterpret_cast(&bounce_delay_)) + sizeof(range_)); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* Icon_trigger::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // bool auto_trigger = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + auto_trigger_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // float bounce_delay = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 21)) { + bounce_delay_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else goto handle_unusual; + continue; + // float bounce_duration = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 29)) { + bounce_duration_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else goto handle_unusual; + continue; + // float bounce_height = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 37)) { + bounce_height_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else goto handle_unusual; + continue; + // string action_copy_clipboard = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) { + auto str = _internal_mutable_action_copy_clipboard(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "Proto_Node.Icon.trigger.action_copy_clipboard")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string action_copy_message = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) { + auto str = _internal_mutable_action_copy_message(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "Proto_Node.Icon.trigger.action_copy_message")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool has_countdown = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) { + has_countdown_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string action_info_message = 8; + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 66)) { + auto str = _internal_mutable_action_info_message(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "Proto_Node.Icon.trigger.action_info_message")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool invert_display = 9; + case 9: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 72)) { + invert_display_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // float reset_length = 10; + case 10: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 85)) { + reset_length_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else goto handle_unusual; + continue; + // float range = 11; + case 11: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 93)) { + range_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else goto handle_unusual; + continue; + // .Proto_Node.Category action_hide_category = 12; + case 12: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 98)) { + ptr = ctx->ParseMessage(_internal_mutable_action_hide_category(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // .Proto_Node.Category action_show_category = 13; + case 13: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 106)) { + ptr = ctx->ParseMessage(_internal_mutable_action_show_category(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // .Proto_Node.Category action_toggle_category = 14; + case 14: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 114)) { + ptr = ctx->ParseMessage(_internal_mutable_action_toggle_category(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* Icon_trigger::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:Proto_Node.Icon.trigger) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // bool auto_trigger = 1; + if (this->auto_trigger() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->_internal_auto_trigger(), target); + } + + // float bounce_delay = 2; + if (!(this->bounce_delay() <= 0 && this->bounce_delay() >= 0)) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2, this->_internal_bounce_delay(), target); + } + + // float bounce_duration = 3; + if (!(this->bounce_duration() <= 0 && this->bounce_duration() >= 0)) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(3, this->_internal_bounce_duration(), target); + } + + // float bounce_height = 4; + if (!(this->bounce_height() <= 0 && this->bounce_height() >= 0)) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(4, this->_internal_bounce_height(), target); + } + + // string action_copy_clipboard = 5; + if (this->action_copy_clipboard().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_action_copy_clipboard().data(), static_cast(this->_internal_action_copy_clipboard().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "Proto_Node.Icon.trigger.action_copy_clipboard"); + target = stream->WriteStringMaybeAliased( + 5, this->_internal_action_copy_clipboard(), target); + } + + // string action_copy_message = 6; + if (this->action_copy_message().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_action_copy_message().data(), static_cast(this->_internal_action_copy_message().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "Proto_Node.Icon.trigger.action_copy_message"); + target = stream->WriteStringMaybeAliased( + 6, this->_internal_action_copy_message(), target); + } + + // bool has_countdown = 7; + if (this->has_countdown() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(7, this->_internal_has_countdown(), target); + } + + // string action_info_message = 8; + if (this->action_info_message().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_action_info_message().data(), static_cast(this->_internal_action_info_message().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "Proto_Node.Icon.trigger.action_info_message"); + target = stream->WriteStringMaybeAliased( + 8, this->_internal_action_info_message(), target); + } + + // bool invert_display = 9; + if (this->invert_display() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(9, this->_internal_invert_display(), target); + } + + // float reset_length = 10; + if (!(this->reset_length() <= 0 && this->reset_length() >= 0)) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(10, this->_internal_reset_length(), target); + } + + // float range = 11; + if (!(this->range() <= 0 && this->range() >= 0)) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(11, this->_internal_range(), target); + } + + // .Proto_Node.Category action_hide_category = 12; + if (this->has_action_hide_category()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 12, _Internal::action_hide_category(this), target, stream); + } + + // .Proto_Node.Category action_show_category = 13; + if (this->has_action_show_category()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 13, _Internal::action_show_category(this), target, stream); + } + + // .Proto_Node.Category action_toggle_category = 14; + if (this->has_action_toggle_category()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 14, _Internal::action_toggle_category(this), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:Proto_Node.Icon.trigger) + return target; +} + +size_t Icon_trigger::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:Proto_Node.Icon.trigger) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string action_copy_clipboard = 5; + if (this->action_copy_clipboard().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_action_copy_clipboard()); + } + + // string action_copy_message = 6; + if (this->action_copy_message().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_action_copy_message()); + } + + // string action_info_message = 8; + if (this->action_info_message().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_action_info_message()); + } + + // .Proto_Node.Category action_hide_category = 12; + if (this->has_action_hide_category()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *action_hide_category_); + } + + // .Proto_Node.Category action_show_category = 13; + if (this->has_action_show_category()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *action_show_category_); + } + + // .Proto_Node.Category action_toggle_category = 14; + if (this->has_action_toggle_category()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *action_toggle_category_); + } + + // float bounce_delay = 2; + if (!(this->bounce_delay() <= 0 && this->bounce_delay() >= 0)) { + total_size += 1 + 4; + } + + // float bounce_duration = 3; + if (!(this->bounce_duration() <= 0 && this->bounce_duration() >= 0)) { + total_size += 1 + 4; + } + + // float bounce_height = 4; + if (!(this->bounce_height() <= 0 && this->bounce_height() >= 0)) { + total_size += 1 + 4; + } + + // bool auto_trigger = 1; + if (this->auto_trigger() != 0) { + total_size += 1 + 1; + } + + // bool has_countdown = 7; + if (this->has_countdown() != 0) { + total_size += 1 + 1; + } + + // bool invert_display = 9; + if (this->invert_display() != 0) { + total_size += 1 + 1; + } + + // float reset_length = 10; + if (!(this->reset_length() <= 0 && this->reset_length() >= 0)) { + total_size += 1 + 4; + } + + // float range = 11; + if (!(this->range() <= 0 && this->range() >= 0)) { + total_size += 1 + 4; + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void Icon_trigger::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:Proto_Node.Icon.trigger) + GOOGLE_DCHECK_NE(&from, this); + const Icon_trigger* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:Proto_Node.Icon.trigger) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:Proto_Node.Icon.trigger) + MergeFrom(*source); + } +} + +void Icon_trigger::MergeFrom(const Icon_trigger& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:Proto_Node.Icon.trigger) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.action_copy_clipboard().size() > 0) { + _internal_set_action_copy_clipboard(from._internal_action_copy_clipboard()); + } + if (from.action_copy_message().size() > 0) { + _internal_set_action_copy_message(from._internal_action_copy_message()); + } + if (from.action_info_message().size() > 0) { + _internal_set_action_info_message(from._internal_action_info_message()); + } + if (from.has_action_hide_category()) { + _internal_mutable_action_hide_category()->::Proto_Node::Category::MergeFrom(from._internal_action_hide_category()); + } + if (from.has_action_show_category()) { + _internal_mutable_action_show_category()->::Proto_Node::Category::MergeFrom(from._internal_action_show_category()); + } + if (from.has_action_toggle_category()) { + _internal_mutable_action_toggle_category()->::Proto_Node::Category::MergeFrom(from._internal_action_toggle_category()); + } + if (!(from.bounce_delay() <= 0 && from.bounce_delay() >= 0)) { + _internal_set_bounce_delay(from._internal_bounce_delay()); + } + if (!(from.bounce_duration() <= 0 && from.bounce_duration() >= 0)) { + _internal_set_bounce_duration(from._internal_bounce_duration()); + } + if (!(from.bounce_height() <= 0 && from.bounce_height() >= 0)) { + _internal_set_bounce_height(from._internal_bounce_height()); + } + if (from.auto_trigger() != 0) { + _internal_set_auto_trigger(from._internal_auto_trigger()); + } + if (from.has_countdown() != 0) { + _internal_set_has_countdown(from._internal_has_countdown()); + } + if (from.invert_display() != 0) { + _internal_set_invert_display(from._internal_invert_display()); + } + if (!(from.reset_length() <= 0 && from.reset_length() >= 0)) { + _internal_set_reset_length(from._internal_reset_length()); + } + if (!(from.range() <= 0 && from.range() >= 0)) { + _internal_set_range(from._internal_range()); + } +} + +void Icon_trigger::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:Proto_Node.Icon.trigger) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Icon_trigger::CopyFrom(const Icon_trigger& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:Proto_Node.Icon.trigger) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Icon_trigger::IsInitialized() const { + return true; +} + +void Icon_trigger::InternalSwap(Icon_trigger* other) { + using std::swap; + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + action_copy_clipboard_.Swap(&other->action_copy_clipboard_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + action_copy_message_.Swap(&other->action_copy_message_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + action_info_message_.Swap(&other->action_info_message_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(Icon_trigger, range_) + + sizeof(Icon_trigger::range_) + - PROTOBUF_FIELD_OFFSET(Icon_trigger, action_hide_category_)>( + reinterpret_cast(&action_hide_category_), + reinterpret_cast(&other->action_hide_category_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata Icon_trigger::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void Icon::InitAsDefaultInstance() { +} +class Icon::_Internal { + public: +}; + +Icon::Icon(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:Proto_Node.Icon) +} +Icon::Icon(const Icon& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + bhdraft__schedule_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_bhdraft__schedule().empty()) { + bhdraft__schedule_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_bhdraft__schedule(), + GetArena()); + } + tip_description_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_tip_description().empty()) { + tip_description_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_tip_description(), + GetArena()); + } + tip_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_tip_name().empty()) { + tip_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_tip_name(), + GetArena()); + } + ::memcpy(&achievement_bit_, &from.achievement_bit_, + static_cast(reinterpret_cast(&bhdraft__schedule_duration_) - + reinterpret_cast(&achievement_bit_)) + sizeof(bhdraft__schedule_duration_)); + // @@protoc_insertion_point(copy_constructor:Proto_Node.Icon) +} + +void Icon::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Icon_node_2eproto.base); + bhdraft__schedule_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + tip_description_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + tip_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + ::memset(&achievement_bit_, 0, static_cast( + reinterpret_cast(&bhdraft__schedule_duration_) - + reinterpret_cast(&achievement_bit_)) + sizeof(bhdraft__schedule_duration_)); +} + +Icon::~Icon() { + // @@protoc_insertion_point(destructor:Proto_Node.Icon) + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +void Icon::SharedDtor() { + GOOGLE_DCHECK(GetArena() == nullptr); + bhdraft__schedule_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + tip_description_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + tip_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void Icon::ArenaDtor(void* object) { + Icon* _this = reinterpret_cast< Icon* >(object); + (void)_this; +} +void Icon::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void Icon::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const Icon& Icon::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Icon_node_2eproto.base); + return *internal_default_instance(); +} + + +void Icon::Clear() { +// @@protoc_insertion_point(message_clear_start:Proto_Node.Icon) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + bhdraft__schedule_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + tip_description_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + tip_name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + ::memset(&achievement_bit_, 0, static_cast( + reinterpret_cast(&bhdraft__schedule_duration_) - + reinterpret_cast(&achievement_bit_)) + sizeof(bhdraft__schedule_duration_)); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* Icon::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // fixed32 achievement_bit = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 13)) { + achievement_bit_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint32>(ptr); + ptr += sizeof(::PROTOBUF_NAMESPACE_ID::uint32); + } else goto handle_unusual; + continue; + // int32 achievement_id = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { + achievement_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // float alpha = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 29)) { + alpha_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else goto handle_unusual; + continue; + // bool can_fade = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { + can_fade_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // float distance_fade_end = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 45)) { + distance_fade_end_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else goto handle_unusual; + continue; + // float distance_fade_start = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 53)) { + distance_fade_start_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else goto handle_unusual; + continue; + // float height_offset = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 61)) { + height_offset_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else goto handle_unusual; + continue; + // float __tentative__scale = 8; + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 69)) { + __tentative__scale_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else goto handle_unusual; + continue; + // int32 map_display_size = 9; + case 9: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 72)) { + map_display_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // int32 map_id = 10; + case 10: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 80)) { + map_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // int32 maximum_size_on_screen = 11; + case 11: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 88)) { + maximum_size_on_screen_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // int32 minimum_size_on_screen = 12; + case 12: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 96)) { + minimum_size_on_screen_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool __tentative__render_ingame = 13; + case 13: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 104)) { + __tentative__render_ingame_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool __tentative__render_on_map = 14; + case 14: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 112)) { + __tentative__render_on_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool __tentative__render_on_minimap = 15; + case 15: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 120)) { + __tentative__render_on_minimap_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool scale_on_map_with_zoom = 16; + case 16: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 128)) { + scale_on_map_with_zoom_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string bhdraft__schedule = 17; + case 17: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 138)) { + auto str = _internal_mutable_bhdraft__schedule(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "Proto_Node.Icon.bhdraft__schedule")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // float bhdraft__schedule_duration = 18; + case 18: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 149)) { + bhdraft__schedule_duration_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else goto handle_unusual; + continue; + // string tip_description = 19; + case 19: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 154)) { + auto str = _internal_mutable_tip_description(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "Proto_Node.Icon.tip_description")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string tip_name = 20; + case 20: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 162)) { + auto str = _internal_mutable_tip_name(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "Proto_Node.Icon.tip_name")); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* Icon::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:Proto_Node.Icon) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // fixed32 achievement_bit = 1; + if (this->achievement_bit() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFixed32ToArray(1, this->_internal_achievement_bit(), target); + } + + // int32 achievement_id = 2; + if (this->achievement_id() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_achievement_id(), target); + } + + // float alpha = 3; + if (!(this->alpha() <= 0 && this->alpha() >= 0)) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(3, this->_internal_alpha(), target); + } + + // bool can_fade = 4; + if (this->can_fade() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->_internal_can_fade(), target); + } + + // float distance_fade_end = 5; + if (!(this->distance_fade_end() <= 0 && this->distance_fade_end() >= 0)) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(5, this->_internal_distance_fade_end(), target); + } + + // float distance_fade_start = 6; + if (!(this->distance_fade_start() <= 0 && this->distance_fade_start() >= 0)) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(6, this->_internal_distance_fade_start(), target); + } + + // float height_offset = 7; + if (!(this->height_offset() <= 0 && this->height_offset() >= 0)) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(7, this->_internal_height_offset(), target); + } + + // float __tentative__scale = 8; + if (!(this->__tentative__scale() <= 0 && this->__tentative__scale() >= 0)) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(8, this->_internal___tentative__scale(), target); + } + + // int32 map_display_size = 9; + if (this->map_display_size() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(9, this->_internal_map_display_size(), target); + } + + // int32 map_id = 10; + if (this->map_id() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(10, this->_internal_map_id(), target); + } + + // int32 maximum_size_on_screen = 11; + if (this->maximum_size_on_screen() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(11, this->_internal_maximum_size_on_screen(), target); + } + + // int32 minimum_size_on_screen = 12; + if (this->minimum_size_on_screen() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(12, this->_internal_minimum_size_on_screen(), target); + } + + // bool __tentative__render_ingame = 13; + if (this->__tentative__render_ingame() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(13, this->_internal___tentative__render_ingame(), target); + } + + // bool __tentative__render_on_map = 14; + if (this->__tentative__render_on_map() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(14, this->_internal___tentative__render_on_map(), target); + } + + // bool __tentative__render_on_minimap = 15; + if (this->__tentative__render_on_minimap() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(15, this->_internal___tentative__render_on_minimap(), target); + } + + // bool scale_on_map_with_zoom = 16; + if (this->scale_on_map_with_zoom() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(16, this->_internal_scale_on_map_with_zoom(), target); + } + + // string bhdraft__schedule = 17; + if (this->bhdraft__schedule().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_bhdraft__schedule().data(), static_cast(this->_internal_bhdraft__schedule().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "Proto_Node.Icon.bhdraft__schedule"); + target = stream->WriteStringMaybeAliased( + 17, this->_internal_bhdraft__schedule(), target); + } + + // float bhdraft__schedule_duration = 18; + if (!(this->bhdraft__schedule_duration() <= 0 && this->bhdraft__schedule_duration() >= 0)) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(18, this->_internal_bhdraft__schedule_duration(), target); + } + + // string tip_description = 19; + if (this->tip_description().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_tip_description().data(), static_cast(this->_internal_tip_description().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "Proto_Node.Icon.tip_description"); + target = stream->WriteStringMaybeAliased( + 19, this->_internal_tip_description(), target); + } + + // string tip_name = 20; + if (this->tip_name().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_tip_name().data(), static_cast(this->_internal_tip_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "Proto_Node.Icon.tip_name"); + target = stream->WriteStringMaybeAliased( + 20, this->_internal_tip_name(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:Proto_Node.Icon) + return target; +} + +size_t Icon::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:Proto_Node.Icon) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string bhdraft__schedule = 17; + if (this->bhdraft__schedule().size() > 0) { + total_size += 2 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_bhdraft__schedule()); + } + + // string tip_description = 19; + if (this->tip_description().size() > 0) { + total_size += 2 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_tip_description()); + } + + // string tip_name = 20; + if (this->tip_name().size() > 0) { + total_size += 2 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_tip_name()); + } + + // fixed32 achievement_bit = 1; + if (this->achievement_bit() != 0) { + total_size += 1 + 4; + } + + // int32 achievement_id = 2; + if (this->achievement_id() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + this->_internal_achievement_id()); + } + + // float alpha = 3; + if (!(this->alpha() <= 0 && this->alpha() >= 0)) { + total_size += 1 + 4; + } + + // float distance_fade_end = 5; + if (!(this->distance_fade_end() <= 0 && this->distance_fade_end() >= 0)) { + total_size += 1 + 4; + } + + // float distance_fade_start = 6; + if (!(this->distance_fade_start() <= 0 && this->distance_fade_start() >= 0)) { + total_size += 1 + 4; + } + + // float height_offset = 7; + if (!(this->height_offset() <= 0 && this->height_offset() >= 0)) { + total_size += 1 + 4; + } + + // float __tentative__scale = 8; + if (!(this->__tentative__scale() <= 0 && this->__tentative__scale() >= 0)) { + total_size += 1 + 4; + } + + // int32 map_display_size = 9; + if (this->map_display_size() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + this->_internal_map_display_size()); + } + + // int32 map_id = 10; + if (this->map_id() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + this->_internal_map_id()); + } + + // int32 maximum_size_on_screen = 11; + if (this->maximum_size_on_screen() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + this->_internal_maximum_size_on_screen()); + } + + // bool can_fade = 4; + if (this->can_fade() != 0) { + total_size += 1 + 1; + } + + // bool __tentative__render_ingame = 13; + if (this->__tentative__render_ingame() != 0) { + total_size += 1 + 1; + } + + // bool __tentative__render_on_map = 14; + if (this->__tentative__render_on_map() != 0) { + total_size += 1 + 1; + } + + // bool __tentative__render_on_minimap = 15; + if (this->__tentative__render_on_minimap() != 0) { + total_size += 1 + 1; + } + + // int32 minimum_size_on_screen = 12; + if (this->minimum_size_on_screen() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + this->_internal_minimum_size_on_screen()); + } + + // bool scale_on_map_with_zoom = 16; + if (this->scale_on_map_with_zoom() != 0) { + total_size += 2 + 1; + } + + // float bhdraft__schedule_duration = 18; + if (!(this->bhdraft__schedule_duration() <= 0 && this->bhdraft__schedule_duration() >= 0)) { + total_size += 2 + 4; + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void Icon::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:Proto_Node.Icon) + GOOGLE_DCHECK_NE(&from, this); + const Icon* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:Proto_Node.Icon) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:Proto_Node.Icon) + MergeFrom(*source); + } +} + +void Icon::MergeFrom(const Icon& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:Proto_Node.Icon) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.bhdraft__schedule().size() > 0) { + _internal_set_bhdraft__schedule(from._internal_bhdraft__schedule()); + } + if (from.tip_description().size() > 0) { + _internal_set_tip_description(from._internal_tip_description()); + } + if (from.tip_name().size() > 0) { + _internal_set_tip_name(from._internal_tip_name()); + } + if (from.achievement_bit() != 0) { + _internal_set_achievement_bit(from._internal_achievement_bit()); + } + if (from.achievement_id() != 0) { + _internal_set_achievement_id(from._internal_achievement_id()); + } + if (!(from.alpha() <= 0 && from.alpha() >= 0)) { + _internal_set_alpha(from._internal_alpha()); + } + if (!(from.distance_fade_end() <= 0 && from.distance_fade_end() >= 0)) { + _internal_set_distance_fade_end(from._internal_distance_fade_end()); + } + if (!(from.distance_fade_start() <= 0 && from.distance_fade_start() >= 0)) { + _internal_set_distance_fade_start(from._internal_distance_fade_start()); + } + if (!(from.height_offset() <= 0 && from.height_offset() >= 0)) { + _internal_set_height_offset(from._internal_height_offset()); + } + if (!(from.__tentative__scale() <= 0 && from.__tentative__scale() >= 0)) { + _internal_set___tentative__scale(from._internal___tentative__scale()); + } + if (from.map_display_size() != 0) { + _internal_set_map_display_size(from._internal_map_display_size()); + } + if (from.map_id() != 0) { + _internal_set_map_id(from._internal_map_id()); + } + if (from.maximum_size_on_screen() != 0) { + _internal_set_maximum_size_on_screen(from._internal_maximum_size_on_screen()); + } + if (from.can_fade() != 0) { + _internal_set_can_fade(from._internal_can_fade()); + } + if (from.__tentative__render_ingame() != 0) { + _internal_set___tentative__render_ingame(from._internal___tentative__render_ingame()); + } + if (from.__tentative__render_on_map() != 0) { + _internal_set___tentative__render_on_map(from._internal___tentative__render_on_map()); + } + if (from.__tentative__render_on_minimap() != 0) { + _internal_set___tentative__render_on_minimap(from._internal___tentative__render_on_minimap()); + } + if (from.minimum_size_on_screen() != 0) { + _internal_set_minimum_size_on_screen(from._internal_minimum_size_on_screen()); + } + if (from.scale_on_map_with_zoom() != 0) { + _internal_set_scale_on_map_with_zoom(from._internal_scale_on_map_with_zoom()); + } + if (!(from.bhdraft__schedule_duration() <= 0 && from.bhdraft__schedule_duration() >= 0)) { + _internal_set_bhdraft__schedule_duration(from._internal_bhdraft__schedule_duration()); + } +} + +void Icon::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:Proto_Node.Icon) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Icon::CopyFrom(const Icon& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:Proto_Node.Icon) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Icon::IsInitialized() const { + return true; +} + +void Icon::InternalSwap(Icon* other) { + using std::swap; + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + bhdraft__schedule_.Swap(&other->bhdraft__schedule_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + tip_description_.Swap(&other->tip_description_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + tip_name_.Swap(&other->tip_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(Icon, bhdraft__schedule_duration_) + + sizeof(Icon::bhdraft__schedule_duration_) + - PROTOBUF_FIELD_OFFSET(Icon, achievement_bit_)>( + reinterpret_cast(&achievement_bit_), + reinterpret_cast(&other->achievement_bit_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata Icon::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void Trail_color::InitAsDefaultInstance() { +} +class Trail_color::_Internal { + public: +}; + +Trail_color::Trail_color(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:Proto_Node.Trail.color) +} +Trail_color::Trail_color(const Trail_color& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + hex_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_hex().empty()) { + hex_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_hex(), + GetArena()); + } + // @@protoc_insertion_point(copy_constructor:Proto_Node.Trail.color) +} + +void Trail_color::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Trail_color_node_2eproto.base); + hex_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +Trail_color::~Trail_color() { + // @@protoc_insertion_point(destructor:Proto_Node.Trail.color) + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +void Trail_color::SharedDtor() { + GOOGLE_DCHECK(GetArena() == nullptr); + hex_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void Trail_color::ArenaDtor(void* object) { + Trail_color* _this = reinterpret_cast< Trail_color* >(object); + (void)_this; +} +void Trail_color::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void Trail_color::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const Trail_color& Trail_color::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Trail_color_node_2eproto.base); + return *internal_default_instance(); +} + + +void Trail_color::Clear() { +// @@protoc_insertion_point(message_clear_start:Proto_Node.Trail.color) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + hex_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* Trail_color::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // string hex = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_hex(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "Proto_Node.Trail.color.hex")); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* Trail_color::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:Proto_Node.Trail.color) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string hex = 1; + if (this->hex().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_hex().data(), static_cast(this->_internal_hex().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "Proto_Node.Trail.color.hex"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_hex(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:Proto_Node.Trail.color) + return target; +} + +size_t Trail_color::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:Proto_Node.Trail.color) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string hex = 1; + if (this->hex().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_hex()); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void Trail_color::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:Proto_Node.Trail.color) + GOOGLE_DCHECK_NE(&from, this); + const Trail_color* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:Proto_Node.Trail.color) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:Proto_Node.Trail.color) + MergeFrom(*source); + } +} + +void Trail_color::MergeFrom(const Trail_color& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:Proto_Node.Trail.color) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.hex().size() > 0) { + _internal_set_hex(from._internal_hex()); + } +} + +void Trail_color::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:Proto_Node.Trail.color) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Trail_color::CopyFrom(const Trail_color& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:Proto_Node.Trail.color) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Trail_color::IsInitialized() const { + return true; +} + +void Trail_color::InternalSwap(Trail_color* other) { + using std::swap; + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + hex_.Swap(&other->hex_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} + +::PROTOBUF_NAMESPACE_ID::Metadata Trail_color::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void Trail_festival_filter::InitAsDefaultInstance() { +} +class Trail_festival_filter::_Internal { + public: +}; + +Trail_festival_filter::Trail_festival_filter(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:Proto_Node.Trail.festival_filter) +} +Trail_festival_filter::Trail_festival_filter(const Trail_festival_filter& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::memcpy(&dragonbash_, &from.dragonbash_, + static_cast(reinterpret_cast(&none_) - + reinterpret_cast(&dragonbash_)) + sizeof(none_)); + // @@protoc_insertion_point(copy_constructor:Proto_Node.Trail.festival_filter) +} + +void Trail_festival_filter::SharedCtor() { + ::memset(&dragonbash_, 0, static_cast( + reinterpret_cast(&none_) - + reinterpret_cast(&dragonbash_)) + sizeof(none_)); +} + +Trail_festival_filter::~Trail_festival_filter() { + // @@protoc_insertion_point(destructor:Proto_Node.Trail.festival_filter) + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +void Trail_festival_filter::SharedDtor() { + GOOGLE_DCHECK(GetArena() == nullptr); +} + +void Trail_festival_filter::ArenaDtor(void* object) { + Trail_festival_filter* _this = reinterpret_cast< Trail_festival_filter* >(object); + (void)_this; +} +void Trail_festival_filter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void Trail_festival_filter::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const Trail_festival_filter& Trail_festival_filter::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Trail_festival_filter_node_2eproto.base); + return *internal_default_instance(); +} + + +void Trail_festival_filter::Clear() { +// @@protoc_insertion_point(message_clear_start:Proto_Node.Trail.festival_filter) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + ::memset(&dragonbash_, 0, static_cast( + reinterpret_cast(&none_) - + reinterpret_cast(&dragonbash_)) + sizeof(none_)); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* Trail_festival_filter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // bool dragonbash = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + dragonbash_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool festival_of_the_four_winds = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { + festival_of_the_four_winds_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool halloween = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { + halloween_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool lunar_new_year = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { + lunar_new_year_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool super_adventure_festival = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { + super_adventure_festival_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool wintersday = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) { + wintersday_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool none = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) { + none_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* Trail_festival_filter::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:Proto_Node.Trail.festival_filter) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // bool dragonbash = 1; + if (this->dragonbash() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->_internal_dragonbash(), target); + } + + // bool festival_of_the_four_winds = 2; + if (this->festival_of_the_four_winds() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_festival_of_the_four_winds(), target); + } + + // bool halloween = 3; + if (this->halloween() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_halloween(), target); + } + + // bool lunar_new_year = 4; + if (this->lunar_new_year() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->_internal_lunar_new_year(), target); + } + + // bool super_adventure_festival = 5; + if (this->super_adventure_festival() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->_internal_super_adventure_festival(), target); + } + + // bool wintersday = 6; + if (this->wintersday() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(6, this->_internal_wintersday(), target); + } + + // bool none = 7; + if (this->none() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(7, this->_internal_none(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:Proto_Node.Trail.festival_filter) + return target; +} + +size_t Trail_festival_filter::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:Proto_Node.Trail.festival_filter) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // bool dragonbash = 1; + if (this->dragonbash() != 0) { + total_size += 1 + 1; + } + + // bool festival_of_the_four_winds = 2; + if (this->festival_of_the_four_winds() != 0) { + total_size += 1 + 1; + } + + // bool halloween = 3; + if (this->halloween() != 0) { + total_size += 1 + 1; + } + + // bool lunar_new_year = 4; + if (this->lunar_new_year() != 0) { + total_size += 1 + 1; + } + + // bool super_adventure_festival = 5; + if (this->super_adventure_festival() != 0) { + total_size += 1 + 1; + } + + // bool wintersday = 6; + if (this->wintersday() != 0) { + total_size += 1 + 1; + } + + // bool none = 7; + if (this->none() != 0) { + total_size += 1 + 1; + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void Trail_festival_filter::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:Proto_Node.Trail.festival_filter) + GOOGLE_DCHECK_NE(&from, this); + const Trail_festival_filter* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:Proto_Node.Trail.festival_filter) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:Proto_Node.Trail.festival_filter) + MergeFrom(*source); + } +} + +void Trail_festival_filter::MergeFrom(const Trail_festival_filter& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:Proto_Node.Trail.festival_filter) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.dragonbash() != 0) { + _internal_set_dragonbash(from._internal_dragonbash()); + } + if (from.festival_of_the_four_winds() != 0) { + _internal_set_festival_of_the_four_winds(from._internal_festival_of_the_four_winds()); + } + if (from.halloween() != 0) { + _internal_set_halloween(from._internal_halloween()); + } + if (from.lunar_new_year() != 0) { + _internal_set_lunar_new_year(from._internal_lunar_new_year()); + } + if (from.super_adventure_festival() != 0) { + _internal_set_super_adventure_festival(from._internal_super_adventure_festival()); + } + if (from.wintersday() != 0) { + _internal_set_wintersday(from._internal_wintersday()); + } + if (from.none() != 0) { + _internal_set_none(from._internal_none()); + } +} + +void Trail_festival_filter::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:Proto_Node.Trail.festival_filter) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Trail_festival_filter::CopyFrom(const Trail_festival_filter& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:Proto_Node.Trail.festival_filter) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Trail_festival_filter::IsInitialized() const { + return true; +} + +void Trail_festival_filter::InternalSwap(Trail_festival_filter* other) { + using std::swap; + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(Trail_festival_filter, none_) + + sizeof(Trail_festival_filter::none_) + - PROTOBUF_FIELD_OFFSET(Trail_festival_filter, dragonbash_)>( + reinterpret_cast(&dragonbash_), + reinterpret_cast(&other->dragonbash_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata Trail_festival_filter::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void Trail_guid::InitAsDefaultInstance() { +} +class Trail_guid::_Internal { + public: +}; + +Trail_guid::Trail_guid(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:Proto_Node.Trail.guid) +} +Trail_guid::Trail_guid(const Trail_guid& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + guid_ = from.guid_; + // @@protoc_insertion_point(copy_constructor:Proto_Node.Trail.guid) +} + +void Trail_guid::SharedCtor() { + guid_ = 0; +} + +Trail_guid::~Trail_guid() { + // @@protoc_insertion_point(destructor:Proto_Node.Trail.guid) + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +void Trail_guid::SharedDtor() { + GOOGLE_DCHECK(GetArena() == nullptr); +} + +void Trail_guid::ArenaDtor(void* object) { + Trail_guid* _this = reinterpret_cast< Trail_guid* >(object); + (void)_this; +} +void Trail_guid::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void Trail_guid::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const Trail_guid& Trail_guid::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Trail_guid_node_2eproto.base); + return *internal_default_instance(); +} + + +void Trail_guid::Clear() { +// @@protoc_insertion_point(message_clear_start:Proto_Node.Trail.guid) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + guid_ = 0; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* Trail_guid::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // int32 guid = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + guid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* Trail_guid::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:Proto_Node.Trail.guid) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // int32 guid = 1; + if (this->guid() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_guid(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:Proto_Node.Trail.guid) + return target; +} + +size_t Trail_guid::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:Proto_Node.Trail.guid) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // int32 guid = 1; + if (this->guid() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + this->_internal_guid()); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void Trail_guid::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:Proto_Node.Trail.guid) + GOOGLE_DCHECK_NE(&from, this); + const Trail_guid* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:Proto_Node.Trail.guid) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:Proto_Node.Trail.guid) + MergeFrom(*source); + } +} + +void Trail_guid::MergeFrom(const Trail_guid& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:Proto_Node.Trail.guid) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.guid() != 0) { + _internal_set_guid(from._internal_guid()); + } +} + +void Trail_guid::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:Proto_Node.Trail.guid) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Trail_guid::CopyFrom(const Trail_guid& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:Proto_Node.Trail.guid) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Trail_guid::IsInitialized() const { + return true; +} + +void Trail_guid::InternalSwap(Trail_guid* other) { + using std::swap; + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + swap(guid_, other->guid_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata Trail_guid::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void Trail_map_type_filter::InitAsDefaultInstance() { +} +class Trail_map_type_filter::_Internal { + public: +}; + +Trail_map_type_filter::Trail_map_type_filter(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:Proto_Node.Trail.map_type_filter) +} +Trail_map_type_filter::Trail_map_type_filter(const Trail_map_type_filter& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::memcpy(&unknown_map_, &from.unknown_map_, + static_cast(reinterpret_cast(&wvw_lounge_map_) - + reinterpret_cast(&unknown_map_)) + sizeof(wvw_lounge_map_)); + // @@protoc_insertion_point(copy_constructor:Proto_Node.Trail.map_type_filter) +} + +void Trail_map_type_filter::SharedCtor() { + ::memset(&unknown_map_, 0, static_cast( + reinterpret_cast(&wvw_lounge_map_) - + reinterpret_cast(&unknown_map_)) + sizeof(wvw_lounge_map_)); +} + +Trail_map_type_filter::~Trail_map_type_filter() { + // @@protoc_insertion_point(destructor:Proto_Node.Trail.map_type_filter) + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +void Trail_map_type_filter::SharedDtor() { + GOOGLE_DCHECK(GetArena() == nullptr); +} + +void Trail_map_type_filter::ArenaDtor(void* object) { + Trail_map_type_filter* _this = reinterpret_cast< Trail_map_type_filter* >(object); + (void)_this; +} +void Trail_map_type_filter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void Trail_map_type_filter::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const Trail_map_type_filter& Trail_map_type_filter::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Trail_map_type_filter_node_2eproto.base); + return *internal_default_instance(); +} + + +void Trail_map_type_filter::Clear() { +// @@protoc_insertion_point(message_clear_start:Proto_Node.Trail.map_type_filter) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + ::memset(&unknown_map_, 0, static_cast( + reinterpret_cast(&wvw_lounge_map_) - + reinterpret_cast(&unknown_map_)) + sizeof(wvw_lounge_map_)); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* Trail_map_type_filter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // bool unknown_map = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + unknown_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool redirect_map = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { + redirect_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool character_create_map = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { + character_create_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool pvp_map = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { + pvp_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool gvg_map = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { + gvg_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool instance_map = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) { + instance_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool public_map = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) { + public_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool tournament_map = 8; + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 64)) { + tournament_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool tutorial_map = 9; + case 9: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 72)) { + tutorial_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool user_tournament_map = 10; + case 10: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 80)) { + user_tournament_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool center_map = 11; + case 11: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 88)) { + center_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool eternal_battlegrounds_map = 12; + case 12: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 96)) { + eternal_battlegrounds_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool bluehome_map = 13; + case 13: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 104)) { + bluehome_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool blue_borderlands_map = 14; + case 14: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 112)) { + blue_borderlands_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool green_home_map = 15; + case 15: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 120)) { + green_home_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool green_borderlands_map = 16; + case 16: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 128)) { + green_borderlands_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool red_home_map = 17; + case 17: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 136)) { + red_home_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool red_borderlands_map = 18; + case 18: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 144)) { + red_borderlands_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool fortunes_vale_map = 19; + case 19: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 152)) { + fortunes_vale_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool jump_puzzle_map = 20; + case 20: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 160)) { + jump_puzzle_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool obsidian_sanctum_map = 21; + case 21: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 168)) { + obsidian_sanctum_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool edge_of_the_mists_map = 22; + case 22: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 176)) { + edge_of_the_mists_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool public_mini_map = 23; + case 23: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 184)) { + public_mini_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool wvw_lounge_map = 24; + case 24: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 192)) { + wvw_lounge_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* Trail_map_type_filter::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:Proto_Node.Trail.map_type_filter) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // bool unknown_map = 1; + if (this->unknown_map() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->_internal_unknown_map(), target); + } + + // bool redirect_map = 2; + if (this->redirect_map() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_redirect_map(), target); + } + + // bool character_create_map = 3; + if (this->character_create_map() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_character_create_map(), target); + } + + // bool pvp_map = 4; + if (this->pvp_map() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->_internal_pvp_map(), target); + } + + // bool gvg_map = 5; + if (this->gvg_map() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->_internal_gvg_map(), target); + } + + // bool instance_map = 6; + if (this->instance_map() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(6, this->_internal_instance_map(), target); + } + + // bool public_map = 7; + if (this->public_map() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(7, this->_internal_public_map(), target); + } + + // bool tournament_map = 8; + if (this->tournament_map() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(8, this->_internal_tournament_map(), target); + } + + // bool tutorial_map = 9; + if (this->tutorial_map() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(9, this->_internal_tutorial_map(), target); + } + + // bool user_tournament_map = 10; + if (this->user_tournament_map() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(10, this->_internal_user_tournament_map(), target); + } + + // bool center_map = 11; + if (this->center_map() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(11, this->_internal_center_map(), target); + } + + // bool eternal_battlegrounds_map = 12; + if (this->eternal_battlegrounds_map() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(12, this->_internal_eternal_battlegrounds_map(), target); + } + + // bool bluehome_map = 13; + if (this->bluehome_map() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(13, this->_internal_bluehome_map(), target); + } + + // bool blue_borderlands_map = 14; + if (this->blue_borderlands_map() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(14, this->_internal_blue_borderlands_map(), target); + } + + // bool green_home_map = 15; + if (this->green_home_map() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(15, this->_internal_green_home_map(), target); + } + + // bool green_borderlands_map = 16; + if (this->green_borderlands_map() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(16, this->_internal_green_borderlands_map(), target); + } + + // bool red_home_map = 17; + if (this->red_home_map() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(17, this->_internal_red_home_map(), target); + } + + // bool red_borderlands_map = 18; + if (this->red_borderlands_map() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(18, this->_internal_red_borderlands_map(), target); + } + + // bool fortunes_vale_map = 19; + if (this->fortunes_vale_map() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(19, this->_internal_fortunes_vale_map(), target); + } + + // bool jump_puzzle_map = 20; + if (this->jump_puzzle_map() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(20, this->_internal_jump_puzzle_map(), target); + } + + // bool obsidian_sanctum_map = 21; + if (this->obsidian_sanctum_map() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(21, this->_internal_obsidian_sanctum_map(), target); + } + + // bool edge_of_the_mists_map = 22; + if (this->edge_of_the_mists_map() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(22, this->_internal_edge_of_the_mists_map(), target); + } + + // bool public_mini_map = 23; + if (this->public_mini_map() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(23, this->_internal_public_mini_map(), target); + } + + // bool wvw_lounge_map = 24; + if (this->wvw_lounge_map() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(24, this->_internal_wvw_lounge_map(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:Proto_Node.Trail.map_type_filter) + return target; +} + +size_t Trail_map_type_filter::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:Proto_Node.Trail.map_type_filter) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // bool unknown_map = 1; + if (this->unknown_map() != 0) { + total_size += 1 + 1; + } + + // bool redirect_map = 2; + if (this->redirect_map() != 0) { + total_size += 1 + 1; + } + + // bool character_create_map = 3; + if (this->character_create_map() != 0) { + total_size += 1 + 1; + } + + // bool pvp_map = 4; + if (this->pvp_map() != 0) { + total_size += 1 + 1; + } + + // bool gvg_map = 5; + if (this->gvg_map() != 0) { + total_size += 1 + 1; + } + + // bool instance_map = 6; + if (this->instance_map() != 0) { + total_size += 1 + 1; + } + + // bool public_map = 7; + if (this->public_map() != 0) { + total_size += 1 + 1; + } + + // bool tournament_map = 8; + if (this->tournament_map() != 0) { + total_size += 1 + 1; + } + + // bool tutorial_map = 9; + if (this->tutorial_map() != 0) { + total_size += 1 + 1; + } + + // bool user_tournament_map = 10; + if (this->user_tournament_map() != 0) { + total_size += 1 + 1; + } + + // bool center_map = 11; + if (this->center_map() != 0) { + total_size += 1 + 1; + } + + // bool eternal_battlegrounds_map = 12; + if (this->eternal_battlegrounds_map() != 0) { + total_size += 1 + 1; + } + + // bool bluehome_map = 13; + if (this->bluehome_map() != 0) { + total_size += 1 + 1; + } + + // bool blue_borderlands_map = 14; + if (this->blue_borderlands_map() != 0) { + total_size += 1 + 1; + } + + // bool green_home_map = 15; + if (this->green_home_map() != 0) { + total_size += 1 + 1; + } + + // bool green_borderlands_map = 16; + if (this->green_borderlands_map() != 0) { + total_size += 2 + 1; + } + + // bool red_home_map = 17; + if (this->red_home_map() != 0) { + total_size += 2 + 1; + } + + // bool red_borderlands_map = 18; + if (this->red_borderlands_map() != 0) { + total_size += 2 + 1; + } + + // bool fortunes_vale_map = 19; + if (this->fortunes_vale_map() != 0) { + total_size += 2 + 1; + } + + // bool jump_puzzle_map = 20; + if (this->jump_puzzle_map() != 0) { + total_size += 2 + 1; + } + + // bool obsidian_sanctum_map = 21; + if (this->obsidian_sanctum_map() != 0) { + total_size += 2 + 1; + } + + // bool edge_of_the_mists_map = 22; + if (this->edge_of_the_mists_map() != 0) { + total_size += 2 + 1; + } + + // bool public_mini_map = 23; + if (this->public_mini_map() != 0) { + total_size += 2 + 1; + } + + // bool wvw_lounge_map = 24; + if (this->wvw_lounge_map() != 0) { + total_size += 2 + 1; + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void Trail_map_type_filter::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:Proto_Node.Trail.map_type_filter) + GOOGLE_DCHECK_NE(&from, this); + const Trail_map_type_filter* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:Proto_Node.Trail.map_type_filter) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:Proto_Node.Trail.map_type_filter) + MergeFrom(*source); + } +} + +void Trail_map_type_filter::MergeFrom(const Trail_map_type_filter& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:Proto_Node.Trail.map_type_filter) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.unknown_map() != 0) { + _internal_set_unknown_map(from._internal_unknown_map()); + } + if (from.redirect_map() != 0) { + _internal_set_redirect_map(from._internal_redirect_map()); + } + if (from.character_create_map() != 0) { + _internal_set_character_create_map(from._internal_character_create_map()); + } + if (from.pvp_map() != 0) { + _internal_set_pvp_map(from._internal_pvp_map()); + } + if (from.gvg_map() != 0) { + _internal_set_gvg_map(from._internal_gvg_map()); + } + if (from.instance_map() != 0) { + _internal_set_instance_map(from._internal_instance_map()); + } + if (from.public_map() != 0) { + _internal_set_public_map(from._internal_public_map()); + } + if (from.tournament_map() != 0) { + _internal_set_tournament_map(from._internal_tournament_map()); + } + if (from.tutorial_map() != 0) { + _internal_set_tutorial_map(from._internal_tutorial_map()); + } + if (from.user_tournament_map() != 0) { + _internal_set_user_tournament_map(from._internal_user_tournament_map()); + } + if (from.center_map() != 0) { + _internal_set_center_map(from._internal_center_map()); + } + if (from.eternal_battlegrounds_map() != 0) { + _internal_set_eternal_battlegrounds_map(from._internal_eternal_battlegrounds_map()); + } + if (from.bluehome_map() != 0) { + _internal_set_bluehome_map(from._internal_bluehome_map()); + } + if (from.blue_borderlands_map() != 0) { + _internal_set_blue_borderlands_map(from._internal_blue_borderlands_map()); + } + if (from.green_home_map() != 0) { + _internal_set_green_home_map(from._internal_green_home_map()); + } + if (from.green_borderlands_map() != 0) { + _internal_set_green_borderlands_map(from._internal_green_borderlands_map()); + } + if (from.red_home_map() != 0) { + _internal_set_red_home_map(from._internal_red_home_map()); + } + if (from.red_borderlands_map() != 0) { + _internal_set_red_borderlands_map(from._internal_red_borderlands_map()); + } + if (from.fortunes_vale_map() != 0) { + _internal_set_fortunes_vale_map(from._internal_fortunes_vale_map()); + } + if (from.jump_puzzle_map() != 0) { + _internal_set_jump_puzzle_map(from._internal_jump_puzzle_map()); + } + if (from.obsidian_sanctum_map() != 0) { + _internal_set_obsidian_sanctum_map(from._internal_obsidian_sanctum_map()); + } + if (from.edge_of_the_mists_map() != 0) { + _internal_set_edge_of_the_mists_map(from._internal_edge_of_the_mists_map()); + } + if (from.public_mini_map() != 0) { + _internal_set_public_mini_map(from._internal_public_mini_map()); + } + if (from.wvw_lounge_map() != 0) { + _internal_set_wvw_lounge_map(from._internal_wvw_lounge_map()); + } +} + +void Trail_map_type_filter::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:Proto_Node.Trail.map_type_filter) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Trail_map_type_filter::CopyFrom(const Trail_map_type_filter& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:Proto_Node.Trail.map_type_filter) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Trail_map_type_filter::IsInitialized() const { + return true; +} + +void Trail_map_type_filter::InternalSwap(Trail_map_type_filter* other) { + using std::swap; + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(Trail_map_type_filter, wvw_lounge_map_) + + sizeof(Trail_map_type_filter::wvw_lounge_map_) + - PROTOBUF_FIELD_OFFSET(Trail_map_type_filter, unknown_map_)>( + reinterpret_cast(&unknown_map_), + reinterpret_cast(&other->unknown_map_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata Trail_map_type_filter::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void Trail_mount_filter::InitAsDefaultInstance() { +} +class Trail_mount_filter::_Internal { + public: +}; + +Trail_mount_filter::Trail_mount_filter(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:Proto_Node.Trail.mount_filter) +} +Trail_mount_filter::Trail_mount_filter(const Trail_mount_filter& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::memcpy(&raptor_, &from.raptor_, + static_cast(reinterpret_cast(&seige_turtle_) - + reinterpret_cast(&raptor_)) + sizeof(seige_turtle_)); + // @@protoc_insertion_point(copy_constructor:Proto_Node.Trail.mount_filter) +} + +void Trail_mount_filter::SharedCtor() { + ::memset(&raptor_, 0, static_cast( + reinterpret_cast(&seige_turtle_) - + reinterpret_cast(&raptor_)) + sizeof(seige_turtle_)); +} + +Trail_mount_filter::~Trail_mount_filter() { + // @@protoc_insertion_point(destructor:Proto_Node.Trail.mount_filter) + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +void Trail_mount_filter::SharedDtor() { + GOOGLE_DCHECK(GetArena() == nullptr); +} + +void Trail_mount_filter::ArenaDtor(void* object) { + Trail_mount_filter* _this = reinterpret_cast< Trail_mount_filter* >(object); + (void)_this; +} +void Trail_mount_filter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void Trail_mount_filter::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const Trail_mount_filter& Trail_mount_filter::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Trail_mount_filter_node_2eproto.base); + return *internal_default_instance(); +} + + +void Trail_mount_filter::Clear() { +// @@protoc_insertion_point(message_clear_start:Proto_Node.Trail.mount_filter) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + ::memset(&raptor_, 0, static_cast( + reinterpret_cast(&seige_turtle_) - + reinterpret_cast(&raptor_)) + sizeof(seige_turtle_)); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* Trail_mount_filter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // bool raptor = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + raptor_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool springer = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { + springer_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool skimmer = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { + skimmer_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool jackal = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { + jackal_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool griffon = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { + griffon_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool roller_beetle = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) { + roller_beetle_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool warclaw = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) { + warclaw_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool skyscalee = 8; + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 64)) { + skyscalee_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool skiff = 9; + case 9: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 72)) { + skiff_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool seige_turtle = 10; + case 10: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 80)) { + seige_turtle_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* Trail_mount_filter::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:Proto_Node.Trail.mount_filter) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // bool raptor = 1; + if (this->raptor() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->_internal_raptor(), target); + } + + // bool springer = 2; + if (this->springer() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_springer(), target); + } + + // bool skimmer = 3; + if (this->skimmer() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_skimmer(), target); + } + + // bool jackal = 4; + if (this->jackal() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->_internal_jackal(), target); + } + + // bool griffon = 5; + if (this->griffon() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->_internal_griffon(), target); + } + + // bool roller_beetle = 6; + if (this->roller_beetle() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(6, this->_internal_roller_beetle(), target); + } + + // bool warclaw = 7; + if (this->warclaw() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(7, this->_internal_warclaw(), target); + } + + // bool skyscalee = 8; + if (this->skyscalee() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(8, this->_internal_skyscalee(), target); + } + + // bool skiff = 9; + if (this->skiff() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(9, this->_internal_skiff(), target); + } + + // bool seige_turtle = 10; + if (this->seige_turtle() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(10, this->_internal_seige_turtle(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:Proto_Node.Trail.mount_filter) + return target; +} + +size_t Trail_mount_filter::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:Proto_Node.Trail.mount_filter) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // bool raptor = 1; + if (this->raptor() != 0) { + total_size += 1 + 1; + } + + // bool springer = 2; + if (this->springer() != 0) { + total_size += 1 + 1; + } + + // bool skimmer = 3; + if (this->skimmer() != 0) { + total_size += 1 + 1; + } + + // bool jackal = 4; + if (this->jackal() != 0) { + total_size += 1 + 1; + } + + // bool griffon = 5; + if (this->griffon() != 0) { + total_size += 1 + 1; + } + + // bool roller_beetle = 6; + if (this->roller_beetle() != 0) { + total_size += 1 + 1; + } + + // bool warclaw = 7; + if (this->warclaw() != 0) { + total_size += 1 + 1; + } + + // bool skyscalee = 8; + if (this->skyscalee() != 0) { + total_size += 1 + 1; + } + + // bool skiff = 9; + if (this->skiff() != 0) { + total_size += 1 + 1; + } + + // bool seige_turtle = 10; + if (this->seige_turtle() != 0) { + total_size += 1 + 1; + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void Trail_mount_filter::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:Proto_Node.Trail.mount_filter) + GOOGLE_DCHECK_NE(&from, this); + const Trail_mount_filter* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:Proto_Node.Trail.mount_filter) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:Proto_Node.Trail.mount_filter) + MergeFrom(*source); + } +} + +void Trail_mount_filter::MergeFrom(const Trail_mount_filter& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:Proto_Node.Trail.mount_filter) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.raptor() != 0) { + _internal_set_raptor(from._internal_raptor()); + } + if (from.springer() != 0) { + _internal_set_springer(from._internal_springer()); + } + if (from.skimmer() != 0) { + _internal_set_skimmer(from._internal_skimmer()); + } + if (from.jackal() != 0) { + _internal_set_jackal(from._internal_jackal()); + } + if (from.griffon() != 0) { + _internal_set_griffon(from._internal_griffon()); + } + if (from.roller_beetle() != 0) { + _internal_set_roller_beetle(from._internal_roller_beetle()); + } + if (from.warclaw() != 0) { + _internal_set_warclaw(from._internal_warclaw()); + } + if (from.skyscalee() != 0) { + _internal_set_skyscalee(from._internal_skyscalee()); + } + if (from.skiff() != 0) { + _internal_set_skiff(from._internal_skiff()); + } + if (from.seige_turtle() != 0) { + _internal_set_seige_turtle(from._internal_seige_turtle()); + } +} + +void Trail_mount_filter::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:Proto_Node.Trail.mount_filter) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Trail_mount_filter::CopyFrom(const Trail_mount_filter& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:Proto_Node.Trail.mount_filter) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Trail_mount_filter::IsInitialized() const { + return true; +} + +void Trail_mount_filter::InternalSwap(Trail_mount_filter* other) { + using std::swap; + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(Trail_mount_filter, seige_turtle_) + + sizeof(Trail_mount_filter::seige_turtle_) + - PROTOBUF_FIELD_OFFSET(Trail_mount_filter, raptor_)>( + reinterpret_cast(&raptor_), + reinterpret_cast(&other->raptor_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata Trail_mount_filter::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void Trail_profession_filter::InitAsDefaultInstance() { +} +class Trail_profession_filter::_Internal { + public: +}; + +Trail_profession_filter::Trail_profession_filter(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:Proto_Node.Trail.profession_filter) +} +Trail_profession_filter::Trail_profession_filter(const Trail_profession_filter& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::memcpy(&guardian_, &from.guardian_, + static_cast(reinterpret_cast(&revenantnt_) - + reinterpret_cast(&guardian_)) + sizeof(revenantnt_)); + // @@protoc_insertion_point(copy_constructor:Proto_Node.Trail.profession_filter) +} + +void Trail_profession_filter::SharedCtor() { + ::memset(&guardian_, 0, static_cast( + reinterpret_cast(&revenantnt_) - + reinterpret_cast(&guardian_)) + sizeof(revenantnt_)); +} + +Trail_profession_filter::~Trail_profession_filter() { + // @@protoc_insertion_point(destructor:Proto_Node.Trail.profession_filter) + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +void Trail_profession_filter::SharedDtor() { + GOOGLE_DCHECK(GetArena() == nullptr); +} + +void Trail_profession_filter::ArenaDtor(void* object) { + Trail_profession_filter* _this = reinterpret_cast< Trail_profession_filter* >(object); + (void)_this; +} +void Trail_profession_filter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void Trail_profession_filter::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const Trail_profession_filter& Trail_profession_filter::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Trail_profession_filter_node_2eproto.base); + return *internal_default_instance(); +} + + +void Trail_profession_filter::Clear() { +// @@protoc_insertion_point(message_clear_start:Proto_Node.Trail.profession_filter) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + ::memset(&guardian_, 0, static_cast( + reinterpret_cast(&revenantnt_) - + reinterpret_cast(&guardian_)) + sizeof(revenantnt_)); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* Trail_profession_filter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // bool guardian = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + guardian_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool warrior = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { + warrior_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool engineer = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { + engineer_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool ranger = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { + ranger_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool thief = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { + thief_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool elementalist = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) { + elementalist_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool mesmer = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) { + mesmer_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool necromancer = 8; + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 64)) { + necromancer_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool revenantnt = 9; + case 9: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 72)) { + revenantnt_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* Trail_profession_filter::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:Proto_Node.Trail.profession_filter) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // bool guardian = 1; + if (this->guardian() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->_internal_guardian(), target); + } + + // bool warrior = 2; + if (this->warrior() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_warrior(), target); + } + + // bool engineer = 3; + if (this->engineer() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_engineer(), target); + } + + // bool ranger = 4; + if (this->ranger() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->_internal_ranger(), target); + } + + // bool thief = 5; + if (this->thief() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->_internal_thief(), target); + } + + // bool elementalist = 6; + if (this->elementalist() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(6, this->_internal_elementalist(), target); + } + + // bool mesmer = 7; + if (this->mesmer() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(7, this->_internal_mesmer(), target); + } + + // bool necromancer = 8; + if (this->necromancer() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(8, this->_internal_necromancer(), target); + } + + // bool revenantnt = 9; + if (this->revenantnt() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(9, this->_internal_revenantnt(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:Proto_Node.Trail.profession_filter) + return target; +} + +size_t Trail_profession_filter::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:Proto_Node.Trail.profession_filter) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // bool guardian = 1; + if (this->guardian() != 0) { + total_size += 1 + 1; + } + + // bool warrior = 2; + if (this->warrior() != 0) { + total_size += 1 + 1; + } + + // bool engineer = 3; + if (this->engineer() != 0) { + total_size += 1 + 1; + } + + // bool ranger = 4; + if (this->ranger() != 0) { + total_size += 1 + 1; + } + + // bool thief = 5; + if (this->thief() != 0) { + total_size += 1 + 1; + } + + // bool elementalist = 6; + if (this->elementalist() != 0) { + total_size += 1 + 1; + } + + // bool mesmer = 7; + if (this->mesmer() != 0) { + total_size += 1 + 1; + } + + // bool necromancer = 8; + if (this->necromancer() != 0) { + total_size += 1 + 1; + } + + // bool revenantnt = 9; + if (this->revenantnt() != 0) { + total_size += 1 + 1; + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void Trail_profession_filter::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:Proto_Node.Trail.profession_filter) + GOOGLE_DCHECK_NE(&from, this); + const Trail_profession_filter* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:Proto_Node.Trail.profession_filter) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:Proto_Node.Trail.profession_filter) + MergeFrom(*source); + } +} + +void Trail_profession_filter::MergeFrom(const Trail_profession_filter& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:Proto_Node.Trail.profession_filter) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.guardian() != 0) { + _internal_set_guardian(from._internal_guardian()); + } + if (from.warrior() != 0) { + _internal_set_warrior(from._internal_warrior()); + } + if (from.engineer() != 0) { + _internal_set_engineer(from._internal_engineer()); + } + if (from.ranger() != 0) { + _internal_set_ranger(from._internal_ranger()); + } + if (from.thief() != 0) { + _internal_set_thief(from._internal_thief()); + } + if (from.elementalist() != 0) { + _internal_set_elementalist(from._internal_elementalist()); + } + if (from.mesmer() != 0) { + _internal_set_mesmer(from._internal_mesmer()); + } + if (from.necromancer() != 0) { + _internal_set_necromancer(from._internal_necromancer()); + } + if (from.revenantnt() != 0) { + _internal_set_revenantnt(from._internal_revenantnt()); + } +} + +void Trail_profession_filter::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:Proto_Node.Trail.profession_filter) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Trail_profession_filter::CopyFrom(const Trail_profession_filter& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:Proto_Node.Trail.profession_filter) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Trail_profession_filter::IsInitialized() const { + return true; +} + +void Trail_profession_filter::InternalSwap(Trail_profession_filter* other) { + using std::swap; + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(Trail_profession_filter, revenantnt_) + + sizeof(Trail_profession_filter::revenantnt_) + - PROTOBUF_FIELD_OFFSET(Trail_profession_filter, guardian_)>( + reinterpret_cast(&guardian_), + reinterpret_cast(&other->guardian_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata Trail_profession_filter::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void Trail_specialization_filter::InitAsDefaultInstance() { +} +class Trail_specialization_filter::_Internal { + public: +}; + +Trail_specialization_filter::Trail_specialization_filter(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:Proto_Node.Trail.specialization_filter) +} +Trail_specialization_filter::Trail_specialization_filter(const Trail_specialization_filter& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::memcpy(&ranger_wilderness_survival_, &from.ranger_wilderness_survival_, + static_cast(reinterpret_cast(&ranger_untamed_) - + reinterpret_cast(&ranger_wilderness_survival_)) + sizeof(ranger_untamed_)); + // @@protoc_insertion_point(copy_constructor:Proto_Node.Trail.specialization_filter) +} + +void Trail_specialization_filter::SharedCtor() { + ::memset(&ranger_wilderness_survival_, 0, static_cast( + reinterpret_cast(&ranger_untamed_) - + reinterpret_cast(&ranger_wilderness_survival_)) + sizeof(ranger_untamed_)); +} + +Trail_specialization_filter::~Trail_specialization_filter() { + // @@protoc_insertion_point(destructor:Proto_Node.Trail.specialization_filter) + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +void Trail_specialization_filter::SharedDtor() { + GOOGLE_DCHECK(GetArena() == nullptr); +} + +void Trail_specialization_filter::ArenaDtor(void* object) { + Trail_specialization_filter* _this = reinterpret_cast< Trail_specialization_filter* >(object); + (void)_this; +} +void Trail_specialization_filter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void Trail_specialization_filter::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const Trail_specialization_filter& Trail_specialization_filter::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Trail_specialization_filter_node_2eproto.base); + return *internal_default_instance(); +} + + +void Trail_specialization_filter::Clear() { +// @@protoc_insertion_point(message_clear_start:Proto_Node.Trail.specialization_filter) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + ::memset(&ranger_wilderness_survival_, 0, static_cast( + reinterpret_cast(&ranger_untamed_) - + reinterpret_cast(&ranger_wilderness_survival_)) + sizeof(ranger_untamed_)); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* Trail_specialization_filter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // bool mesmer_dueling = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + mesmer_dueling_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool necromancer_death_magic = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { + necromancer_death_magic_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool revenant_invocation = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { + revenant_invocation_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool warrior_strength = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { + warrior_strength_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool ranger_druid = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { + ranger_druid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool engineer_explosives = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) { + engineer_explosives_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool thief_daredevil = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) { + thief_daredevil_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool ranger_marksmanship = 8; + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 64)) { + ranger_marksmanship_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool revenant_retribution = 9; + case 9: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 72)) { + revenant_retribution_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool mesmer_domination = 10; + case 10: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 80)) { + mesmer_domination_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool warrior_tactics = 11; + case 11: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 88)) { + warrior_tactics_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool revenant_salvation = 12; + case 12: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 96)) { + revenant_salvation_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool guardian_valor = 13; + case 13: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 104)) { + guardian_valor_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool revenant_corruption = 14; + case 14: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 112)) { + revenant_corruption_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool revenant_devastation = 15; + case 15: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 120)) { + revenant_devastation_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool guardian_radiance = 16; + case 16: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 128)) { + guardian_radiance_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool elementalist_water = 17; + case 17: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 136)) { + elementalist_water_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool warrior_berserker = 18; + case 18: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 144)) { + warrior_berserker_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool necromancer_blood_magic = 19; + case 19: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 152)) { + necromancer_blood_magic_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool thief_shadow_arts = 20; + case 20: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 160)) { + thief_shadow_arts_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool engineer_tools = 21; + case 21: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 168)) { + engineer_tools_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool warrior_defense = 22; + case 22: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 176)) { + warrior_defense_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool mesmer_inspiration = 23; + case 23: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 184)) { + mesmer_inspiration_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool mesmer_illusions = 24; + case 24: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 192)) { + mesmer_illusions_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool ranger_nature_magic = 25; + case 25: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 200)) { + ranger_nature_magic_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool elementalist_earth = 26; + case 26: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 208)) { + elementalist_earth_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool guardian_dragonhunter = 27; + case 27: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 216)) { + guardian_dragonhunter_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool thief_deadly_arts = 28; + case 28: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 224)) { + thief_deadly_arts_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool engineer_alchemy = 29; + case 29: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 232)) { + engineer_alchemy_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool ranger_skirmishing = 30; + case 30: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 240)) { + ranger_skirmishing_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool elementalist_fire = 31; + case 31: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 248)) { + elementalist_fire_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool ranger_beastmastery = 32; + case 32: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 0)) { + ranger_beastmastery_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool ranger_wilderness_survival = 33; + case 33: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + ranger_wilderness_survival_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool necromancer_reaper = 34; + case 34: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { + necromancer_reaper_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool thief_critical_strikes = 35; + case 35: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { + thief_critical_strikes_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool warrior_arms = 36; + case 36: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { + warrior_arms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool elementalist_arcane = 37; + case 37: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { + elementalist_arcane_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool engineer_firearms = 38; + case 38: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) { + engineer_firearms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool necromancer_curses = 39; + case 39: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) { + necromancer_curses_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool mesmer_chronomancer = 40; + case 40: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 64)) { + mesmer_chronomancer_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool elementalist_air = 41; + case 41: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 72)) { + elementalist_air_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool guardian_zeal = 42; + case 42: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 80)) { + guardian_zeal_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool engineer_scrapper = 43; + case 43: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 88)) { + engineer_scrapper_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool thief_trickery = 44; + case 44: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 96)) { + thief_trickery_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool mesmer_chaos = 45; + case 45: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 104)) { + mesmer_chaos_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool guardian_virtues = 46; + case 46: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 112)) { + guardian_virtues_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool engineer_inventions = 47; + case 47: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 120)) { + engineer_inventions_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool elementalist_tempest = 48; + case 48: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 128)) { + elementalist_tempest_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool guardian_honor = 49; + case 49: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 136)) { + guardian_honor_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool necromancer_soul_reaping = 50; + case 50: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 144)) { + necromancer_soul_reaping_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool warrior_discipline = 51; + case 51: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 152)) { + warrior_discipline_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool revenant_herald = 52; + case 52: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 160)) { + revenant_herald_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool necromancer_spite = 53; + case 53: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 168)) { + necromancer_spite_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool thief_acrobatics = 54; + case 54: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 176)) { + thief_acrobatics_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool ranger_soulbeast = 55; + case 55: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 184)) { + ranger_soulbeast_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool elementalist_weaver = 56; + case 56: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 192)) { + elementalist_weaver_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool engineer_holosmith = 57; + case 57: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 200)) { + engineer_holosmith_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool thief_deadeye = 58; + case 58: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 208)) { + thief_deadeye_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool mesmer_mirage = 59; + case 59: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 216)) { + mesmer_mirage_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool necromancer_scourge = 60; + case 60: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 224)) { + necromancer_scourge_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool warrior_spellbreaker = 61; + case 61: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 232)) { + warrior_spellbreaker_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool guardian_firebrand = 62; + case 62: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 240)) { + guardian_firebrand_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool revenant_renegade = 63; + case 63: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 248)) { + revenant_renegade_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool necromancer_harbinger = 64; + case 64: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 0)) { + necromancer_harbinger_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool guardian_willbender = 65; + case 65: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + guardian_willbender_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool mesmer_virtuoso = 66; + case 66: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { + mesmer_virtuoso_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool elmentalist_catalyst = 67; + case 67: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { + elmentalist_catalyst_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool warrior_bladesworn = 68; + case 68: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { + warrior_bladesworn_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool revenant_vindicator = 69; + case 69: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { + revenant_vindicator_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool engineer_mechanist = 70; + case 70: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) { + engineer_mechanist_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool thief_specter = 71; + case 71: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) { + thief_specter_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool ranger_untamed = 72; + case 72: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 64)) { + ranger_untamed_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* Trail_specialization_filter::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:Proto_Node.Trail.specialization_filter) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // bool mesmer_dueling = 1; + if (this->mesmer_dueling() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->_internal_mesmer_dueling(), target); + } + + // bool necromancer_death_magic = 2; + if (this->necromancer_death_magic() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_necromancer_death_magic(), target); + } + + // bool revenant_invocation = 3; + if (this->revenant_invocation() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_revenant_invocation(), target); + } + + // bool warrior_strength = 4; + if (this->warrior_strength() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->_internal_warrior_strength(), target); + } + + // bool ranger_druid = 5; + if (this->ranger_druid() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->_internal_ranger_druid(), target); + } + + // bool engineer_explosives = 6; + if (this->engineer_explosives() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(6, this->_internal_engineer_explosives(), target); + } + + // bool thief_daredevil = 7; + if (this->thief_daredevil() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(7, this->_internal_thief_daredevil(), target); + } + + // bool ranger_marksmanship = 8; + if (this->ranger_marksmanship() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(8, this->_internal_ranger_marksmanship(), target); + } + + // bool revenant_retribution = 9; + if (this->revenant_retribution() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(9, this->_internal_revenant_retribution(), target); + } + + // bool mesmer_domination = 10; + if (this->mesmer_domination() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(10, this->_internal_mesmer_domination(), target); + } + + // bool warrior_tactics = 11; + if (this->warrior_tactics() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(11, this->_internal_warrior_tactics(), target); + } + + // bool revenant_salvation = 12; + if (this->revenant_salvation() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(12, this->_internal_revenant_salvation(), target); + } + + // bool guardian_valor = 13; + if (this->guardian_valor() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(13, this->_internal_guardian_valor(), target); + } + + // bool revenant_corruption = 14; + if (this->revenant_corruption() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(14, this->_internal_revenant_corruption(), target); + } + + // bool revenant_devastation = 15; + if (this->revenant_devastation() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(15, this->_internal_revenant_devastation(), target); + } + + // bool guardian_radiance = 16; + if (this->guardian_radiance() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(16, this->_internal_guardian_radiance(), target); + } + + // bool elementalist_water = 17; + if (this->elementalist_water() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(17, this->_internal_elementalist_water(), target); + } + + // bool warrior_berserker = 18; + if (this->warrior_berserker() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(18, this->_internal_warrior_berserker(), target); + } + + // bool necromancer_blood_magic = 19; + if (this->necromancer_blood_magic() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(19, this->_internal_necromancer_blood_magic(), target); + } + + // bool thief_shadow_arts = 20; + if (this->thief_shadow_arts() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(20, this->_internal_thief_shadow_arts(), target); + } + + // bool engineer_tools = 21; + if (this->engineer_tools() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(21, this->_internal_engineer_tools(), target); + } + + // bool warrior_defense = 22; + if (this->warrior_defense() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(22, this->_internal_warrior_defense(), target); + } + + // bool mesmer_inspiration = 23; + if (this->mesmer_inspiration() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(23, this->_internal_mesmer_inspiration(), target); + } + + // bool mesmer_illusions = 24; + if (this->mesmer_illusions() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(24, this->_internal_mesmer_illusions(), target); + } + + // bool ranger_nature_magic = 25; + if (this->ranger_nature_magic() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(25, this->_internal_ranger_nature_magic(), target); + } + + // bool elementalist_earth = 26; + if (this->elementalist_earth() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(26, this->_internal_elementalist_earth(), target); + } + + // bool guardian_dragonhunter = 27; + if (this->guardian_dragonhunter() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(27, this->_internal_guardian_dragonhunter(), target); + } + + // bool thief_deadly_arts = 28; + if (this->thief_deadly_arts() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(28, this->_internal_thief_deadly_arts(), target); + } + + // bool engineer_alchemy = 29; + if (this->engineer_alchemy() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(29, this->_internal_engineer_alchemy(), target); + } + + // bool ranger_skirmishing = 30; + if (this->ranger_skirmishing() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(30, this->_internal_ranger_skirmishing(), target); + } + + // bool elementalist_fire = 31; + if (this->elementalist_fire() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(31, this->_internal_elementalist_fire(), target); + } + + // bool ranger_beastmastery = 32; + if (this->ranger_beastmastery() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(32, this->_internal_ranger_beastmastery(), target); + } + + // bool ranger_wilderness_survival = 33; + if (this->ranger_wilderness_survival() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(33, this->_internal_ranger_wilderness_survival(), target); + } + + // bool necromancer_reaper = 34; + if (this->necromancer_reaper() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(34, this->_internal_necromancer_reaper(), target); + } + + // bool thief_critical_strikes = 35; + if (this->thief_critical_strikes() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(35, this->_internal_thief_critical_strikes(), target); + } + + // bool warrior_arms = 36; + if (this->warrior_arms() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(36, this->_internal_warrior_arms(), target); + } + + // bool elementalist_arcane = 37; + if (this->elementalist_arcane() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(37, this->_internal_elementalist_arcane(), target); + } + + // bool engineer_firearms = 38; + if (this->engineer_firearms() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(38, this->_internal_engineer_firearms(), target); + } + + // bool necromancer_curses = 39; + if (this->necromancer_curses() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(39, this->_internal_necromancer_curses(), target); + } + + // bool mesmer_chronomancer = 40; + if (this->mesmer_chronomancer() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(40, this->_internal_mesmer_chronomancer(), target); + } + + // bool elementalist_air = 41; + if (this->elementalist_air() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(41, this->_internal_elementalist_air(), target); + } + + // bool guardian_zeal = 42; + if (this->guardian_zeal() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(42, this->_internal_guardian_zeal(), target); + } + + // bool engineer_scrapper = 43; + if (this->engineer_scrapper() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(43, this->_internal_engineer_scrapper(), target); + } + + // bool thief_trickery = 44; + if (this->thief_trickery() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(44, this->_internal_thief_trickery(), target); + } + + // bool mesmer_chaos = 45; + if (this->mesmer_chaos() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(45, this->_internal_mesmer_chaos(), target); + } + + // bool guardian_virtues = 46; + if (this->guardian_virtues() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(46, this->_internal_guardian_virtues(), target); + } + + // bool engineer_inventions = 47; + if (this->engineer_inventions() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(47, this->_internal_engineer_inventions(), target); + } + + // bool elementalist_tempest = 48; + if (this->elementalist_tempest() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(48, this->_internal_elementalist_tempest(), target); + } + + // bool guardian_honor = 49; + if (this->guardian_honor() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(49, this->_internal_guardian_honor(), target); + } + + // bool necromancer_soul_reaping = 50; + if (this->necromancer_soul_reaping() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(50, this->_internal_necromancer_soul_reaping(), target); + } + + // bool warrior_discipline = 51; + if (this->warrior_discipline() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(51, this->_internal_warrior_discipline(), target); + } + + // bool revenant_herald = 52; + if (this->revenant_herald() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(52, this->_internal_revenant_herald(), target); + } + + // bool necromancer_spite = 53; + if (this->necromancer_spite() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(53, this->_internal_necromancer_spite(), target); + } + + // bool thief_acrobatics = 54; + if (this->thief_acrobatics() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(54, this->_internal_thief_acrobatics(), target); + } + + // bool ranger_soulbeast = 55; + if (this->ranger_soulbeast() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(55, this->_internal_ranger_soulbeast(), target); + } + + // bool elementalist_weaver = 56; + if (this->elementalist_weaver() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(56, this->_internal_elementalist_weaver(), target); + } + + // bool engineer_holosmith = 57; + if (this->engineer_holosmith() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(57, this->_internal_engineer_holosmith(), target); + } + + // bool thief_deadeye = 58; + if (this->thief_deadeye() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(58, this->_internal_thief_deadeye(), target); + } + + // bool mesmer_mirage = 59; + if (this->mesmer_mirage() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(59, this->_internal_mesmer_mirage(), target); + } + + // bool necromancer_scourge = 60; + if (this->necromancer_scourge() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(60, this->_internal_necromancer_scourge(), target); + } + + // bool warrior_spellbreaker = 61; + if (this->warrior_spellbreaker() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(61, this->_internal_warrior_spellbreaker(), target); + } + + // bool guardian_firebrand = 62; + if (this->guardian_firebrand() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(62, this->_internal_guardian_firebrand(), target); + } + + // bool revenant_renegade = 63; + if (this->revenant_renegade() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(63, this->_internal_revenant_renegade(), target); + } + + // bool necromancer_harbinger = 64; + if (this->necromancer_harbinger() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(64, this->_internal_necromancer_harbinger(), target); + } + + // bool guardian_willbender = 65; + if (this->guardian_willbender() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(65, this->_internal_guardian_willbender(), target); + } + + // bool mesmer_virtuoso = 66; + if (this->mesmer_virtuoso() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(66, this->_internal_mesmer_virtuoso(), target); + } + + // bool elmentalist_catalyst = 67; + if (this->elmentalist_catalyst() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(67, this->_internal_elmentalist_catalyst(), target); + } + + // bool warrior_bladesworn = 68; + if (this->warrior_bladesworn() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(68, this->_internal_warrior_bladesworn(), target); + } + + // bool revenant_vindicator = 69; + if (this->revenant_vindicator() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(69, this->_internal_revenant_vindicator(), target); + } + + // bool engineer_mechanist = 70; + if (this->engineer_mechanist() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(70, this->_internal_engineer_mechanist(), target); + } + + // bool thief_specter = 71; + if (this->thief_specter() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(71, this->_internal_thief_specter(), target); + } + + // bool ranger_untamed = 72; + if (this->ranger_untamed() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(72, this->_internal_ranger_untamed(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:Proto_Node.Trail.specialization_filter) + return target; +} + +size_t Trail_specialization_filter::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:Proto_Node.Trail.specialization_filter) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // bool ranger_wilderness_survival = 33; + if (this->ranger_wilderness_survival() != 0) { + total_size += 2 + 1; + } + + // bool revenant_corruption = 14; + if (this->revenant_corruption() != 0) { + total_size += 1 + 1; + } + + // bool revenant_devastation = 15; + if (this->revenant_devastation() != 0) { + total_size += 1 + 1; + } + + // bool revenant_invocation = 3; + if (this->revenant_invocation() != 0) { + total_size += 1 + 1; + } + + // bool mesmer_dueling = 1; + if (this->mesmer_dueling() != 0) { + total_size += 1 + 1; + } + + // bool mesmer_illusions = 24; + if (this->mesmer_illusions() != 0) { + total_size += 2 + 1; + } + + // bool mesmer_inspiration = 23; + if (this->mesmer_inspiration() != 0) { + total_size += 2 + 1; + } + + // bool necromancer_blood_magic = 19; + if (this->necromancer_blood_magic() != 0) { + total_size += 2 + 1; + } + + // bool warrior_defense = 22; + if (this->warrior_defense() != 0) { + total_size += 2 + 1; + } + + // bool warrior_discipline = 51; + if (this->warrior_discipline() != 0) { + total_size += 2 + 1; + } + + // bool warrior_strength = 4; + if (this->warrior_strength() != 0) { + total_size += 1 + 1; + } + + // bool warrior_tactics = 11; + if (this->warrior_tactics() != 0) { + total_size += 1 + 1; + } + + // bool ranger_beastmastery = 32; + if (this->ranger_beastmastery() != 0) { + total_size += 2 + 1; + } + + // bool ranger_marksmanship = 8; + if (this->ranger_marksmanship() != 0) { + total_size += 1 + 1; + } + + // bool ranger_nature_magic = 25; + if (this->ranger_nature_magic() != 0) { + total_size += 2 + 1; + } + + // bool ranger_skirmishing = 30; + if (this->ranger_skirmishing() != 0) { + total_size += 2 + 1; + } + + // bool necromancer_reaper = 34; + if (this->necromancer_reaper() != 0) { + total_size += 2 + 1; + } + + // bool ranger_druid = 5; + if (this->ranger_druid() != 0) { + total_size += 1 + 1; + } + + // bool revenant_herald = 52; + if (this->revenant_herald() != 0) { + total_size += 2 + 1; + } + + // bool thief_daredevil = 7; + if (this->thief_daredevil() != 0) { + total_size += 1 + 1; + } + + // bool engineer_tools = 21; + if (this->engineer_tools() != 0) { + total_size += 2 + 1; + } + + // bool guardian_honor = 49; + if (this->guardian_honor() != 0) { + total_size += 2 + 1; + } + + // bool guardian_radiance = 16; + if (this->guardian_radiance() != 0) { + total_size += 2 + 1; + } + + // bool guardian_valor = 13; + if (this->guardian_valor() != 0) { + total_size += 1 + 1; + } + + // bool revenant_retribution = 9; + if (this->revenant_retribution() != 0) { + total_size += 1 + 1; + } + + // bool revenant_salvation = 12; + if (this->revenant_salvation() != 0) { + total_size += 1 + 1; + } + + // bool thief_acrobatics = 54; + if (this->thief_acrobatics() != 0) { + total_size += 2 + 1; + } + + // bool thief_critical_strikes = 35; + if (this->thief_critical_strikes() != 0) { + total_size += 2 + 1; + } + + // bool elementalist_arcane = 37; + if (this->elementalist_arcane() != 0) { + total_size += 2 + 1; + } + + // bool elementalist_earth = 26; + if (this->elementalist_earth() != 0) { + total_size += 2 + 1; + } + + // bool elementalist_fire = 31; + if (this->elementalist_fire() != 0) { + total_size += 2 + 1; + } + + // bool elementalist_water = 17; + if (this->elementalist_water() != 0) { + total_size += 2 + 1; + } + + // bool engineer_alchemy = 29; + if (this->engineer_alchemy() != 0) { + total_size += 2 + 1; + } + + // bool engineer_explosives = 6; + if (this->engineer_explosives() != 0) { + total_size += 1 + 1; + } + + // bool engineer_firearms = 38; + if (this->engineer_firearms() != 0) { + total_size += 2 + 1; + } + + // bool engineer_inventions = 47; + if (this->engineer_inventions() != 0) { + total_size += 2 + 1; + } + + // bool thief_deadly_arts = 28; + if (this->thief_deadly_arts() != 0) { + total_size += 2 + 1; + } + + // bool thief_shadow_arts = 20; + if (this->thief_shadow_arts() != 0) { + total_size += 2 + 1; + } + + // bool thief_trickery = 44; + if (this->thief_trickery() != 0) { + total_size += 2 + 1; + } + + // bool warrior_arms = 36; + if (this->warrior_arms() != 0) { + total_size += 2 + 1; + } + + // bool guardian_virtues = 46; + if (this->guardian_virtues() != 0) { + total_size += 2 + 1; + } + + // bool guardian_zeal = 42; + if (this->guardian_zeal() != 0) { + total_size += 2 + 1; + } + + // bool mesmer_chaos = 45; + if (this->mesmer_chaos() != 0) { + total_size += 2 + 1; + } + + // bool mesmer_domination = 10; + if (this->mesmer_domination() != 0) { + total_size += 1 + 1; + } + + // bool necromancer_curses = 39; + if (this->necromancer_curses() != 0) { + total_size += 2 + 1; + } + + // bool necromancer_death_magic = 2; + if (this->necromancer_death_magic() != 0) { + total_size += 1 + 1; + } + + // bool necromancer_soul_reaping = 50; + if (this->necromancer_soul_reaping() != 0) { + total_size += 2 + 1; + } + + // bool necromancer_spite = 53; + if (this->necromancer_spite() != 0) { + total_size += 2 + 1; + } + + // bool elementalist_tempest = 48; + if (this->elementalist_tempest() != 0) { + total_size += 2 + 1; + } + + // bool engineer_scrapper = 43; + if (this->engineer_scrapper() != 0) { + total_size += 2 + 1; + } + + // bool guardian_dragonhunter = 27; + if (this->guardian_dragonhunter() != 0) { + total_size += 2 + 1; + } + + // bool mesmer_chronomancer = 40; + if (this->mesmer_chronomancer() != 0) { + total_size += 2 + 1; + } + + // bool warrior_berserker = 18; + if (this->warrior_berserker() != 0) { + total_size += 2 + 1; + } + + // bool elementalist_weaver = 56; + if (this->elementalist_weaver() != 0) { + total_size += 2 + 1; + } + + // bool engineer_holosmith = 57; + if (this->engineer_holosmith() != 0) { + total_size += 2 + 1; + } + + // bool guardian_firebrand = 62; + if (this->guardian_firebrand() != 0) { + total_size += 2 + 1; + } + + // bool mesmer_mirage = 59; + if (this->mesmer_mirage() != 0) { + total_size += 2 + 1; + } + + // bool necromancer_scourge = 60; + if (this->necromancer_scourge() != 0) { + total_size += 2 + 1; + } + + // bool ranger_soulbeast = 55; + if (this->ranger_soulbeast() != 0) { + total_size += 2 + 1; + } + + // bool revenant_renegade = 63; + if (this->revenant_renegade() != 0) { + total_size += 2 + 1; + } + + // bool revenant_vindicator = 69; + if (this->revenant_vindicator() != 0) { + total_size += 2 + 1; + } + + // bool thief_specter = 71; + if (this->thief_specter() != 0) { + total_size += 2 + 1; + } + + // bool warrior_bladesworn = 68; + if (this->warrior_bladesworn() != 0) { + total_size += 2 + 1; + } + + // bool elementalist_air = 41; + if (this->elementalist_air() != 0) { + total_size += 2 + 1; + } + + // bool thief_deadeye = 58; + if (this->thief_deadeye() != 0) { + total_size += 2 + 1; + } + + // bool warrior_spellbreaker = 61; + if (this->warrior_spellbreaker() != 0) { + total_size += 2 + 1; + } + + // bool elmentalist_catalyst = 67; + if (this->elmentalist_catalyst() != 0) { + total_size += 2 + 1; + } + + // bool engineer_mechanist = 70; + if (this->engineer_mechanist() != 0) { + total_size += 2 + 1; + } + + // bool guardian_willbender = 65; + if (this->guardian_willbender() != 0) { + total_size += 2 + 1; + } + + // bool mesmer_virtuoso = 66; + if (this->mesmer_virtuoso() != 0) { + total_size += 2 + 1; + } + + // bool necromancer_harbinger = 64; + if (this->necromancer_harbinger() != 0) { + total_size += 2 + 1; + } + + // bool ranger_untamed = 72; + if (this->ranger_untamed() != 0) { + total_size += 2 + 1; + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void Trail_specialization_filter::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:Proto_Node.Trail.specialization_filter) + GOOGLE_DCHECK_NE(&from, this); + const Trail_specialization_filter* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:Proto_Node.Trail.specialization_filter) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:Proto_Node.Trail.specialization_filter) + MergeFrom(*source); + } +} + +void Trail_specialization_filter::MergeFrom(const Trail_specialization_filter& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:Proto_Node.Trail.specialization_filter) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.ranger_wilderness_survival() != 0) { + _internal_set_ranger_wilderness_survival(from._internal_ranger_wilderness_survival()); + } + if (from.revenant_corruption() != 0) { + _internal_set_revenant_corruption(from._internal_revenant_corruption()); + } + if (from.revenant_devastation() != 0) { + _internal_set_revenant_devastation(from._internal_revenant_devastation()); + } + if (from.revenant_invocation() != 0) { + _internal_set_revenant_invocation(from._internal_revenant_invocation()); + } + if (from.mesmer_dueling() != 0) { + _internal_set_mesmer_dueling(from._internal_mesmer_dueling()); + } + if (from.mesmer_illusions() != 0) { + _internal_set_mesmer_illusions(from._internal_mesmer_illusions()); + } + if (from.mesmer_inspiration() != 0) { + _internal_set_mesmer_inspiration(from._internal_mesmer_inspiration()); + } + if (from.necromancer_blood_magic() != 0) { + _internal_set_necromancer_blood_magic(from._internal_necromancer_blood_magic()); + } + if (from.warrior_defense() != 0) { + _internal_set_warrior_defense(from._internal_warrior_defense()); + } + if (from.warrior_discipline() != 0) { + _internal_set_warrior_discipline(from._internal_warrior_discipline()); + } + if (from.warrior_strength() != 0) { + _internal_set_warrior_strength(from._internal_warrior_strength()); + } + if (from.warrior_tactics() != 0) { + _internal_set_warrior_tactics(from._internal_warrior_tactics()); + } + if (from.ranger_beastmastery() != 0) { + _internal_set_ranger_beastmastery(from._internal_ranger_beastmastery()); + } + if (from.ranger_marksmanship() != 0) { + _internal_set_ranger_marksmanship(from._internal_ranger_marksmanship()); + } + if (from.ranger_nature_magic() != 0) { + _internal_set_ranger_nature_magic(from._internal_ranger_nature_magic()); + } + if (from.ranger_skirmishing() != 0) { + _internal_set_ranger_skirmishing(from._internal_ranger_skirmishing()); + } + if (from.necromancer_reaper() != 0) { + _internal_set_necromancer_reaper(from._internal_necromancer_reaper()); + } + if (from.ranger_druid() != 0) { + _internal_set_ranger_druid(from._internal_ranger_druid()); + } + if (from.revenant_herald() != 0) { + _internal_set_revenant_herald(from._internal_revenant_herald()); + } + if (from.thief_daredevil() != 0) { + _internal_set_thief_daredevil(from._internal_thief_daredevil()); + } + if (from.engineer_tools() != 0) { + _internal_set_engineer_tools(from._internal_engineer_tools()); + } + if (from.guardian_honor() != 0) { + _internal_set_guardian_honor(from._internal_guardian_honor()); + } + if (from.guardian_radiance() != 0) { + _internal_set_guardian_radiance(from._internal_guardian_radiance()); + } + if (from.guardian_valor() != 0) { + _internal_set_guardian_valor(from._internal_guardian_valor()); + } + if (from.revenant_retribution() != 0) { + _internal_set_revenant_retribution(from._internal_revenant_retribution()); + } + if (from.revenant_salvation() != 0) { + _internal_set_revenant_salvation(from._internal_revenant_salvation()); + } + if (from.thief_acrobatics() != 0) { + _internal_set_thief_acrobatics(from._internal_thief_acrobatics()); + } + if (from.thief_critical_strikes() != 0) { + _internal_set_thief_critical_strikes(from._internal_thief_critical_strikes()); + } + if (from.elementalist_arcane() != 0) { + _internal_set_elementalist_arcane(from._internal_elementalist_arcane()); + } + if (from.elementalist_earth() != 0) { + _internal_set_elementalist_earth(from._internal_elementalist_earth()); + } + if (from.elementalist_fire() != 0) { + _internal_set_elementalist_fire(from._internal_elementalist_fire()); + } + if (from.elementalist_water() != 0) { + _internal_set_elementalist_water(from._internal_elementalist_water()); + } + if (from.engineer_alchemy() != 0) { + _internal_set_engineer_alchemy(from._internal_engineer_alchemy()); + } + if (from.engineer_explosives() != 0) { + _internal_set_engineer_explosives(from._internal_engineer_explosives()); + } + if (from.engineer_firearms() != 0) { + _internal_set_engineer_firearms(from._internal_engineer_firearms()); + } + if (from.engineer_inventions() != 0) { + _internal_set_engineer_inventions(from._internal_engineer_inventions()); + } + if (from.thief_deadly_arts() != 0) { + _internal_set_thief_deadly_arts(from._internal_thief_deadly_arts()); + } + if (from.thief_shadow_arts() != 0) { + _internal_set_thief_shadow_arts(from._internal_thief_shadow_arts()); + } + if (from.thief_trickery() != 0) { + _internal_set_thief_trickery(from._internal_thief_trickery()); + } + if (from.warrior_arms() != 0) { + _internal_set_warrior_arms(from._internal_warrior_arms()); + } + if (from.guardian_virtues() != 0) { + _internal_set_guardian_virtues(from._internal_guardian_virtues()); + } + if (from.guardian_zeal() != 0) { + _internal_set_guardian_zeal(from._internal_guardian_zeal()); + } + if (from.mesmer_chaos() != 0) { + _internal_set_mesmer_chaos(from._internal_mesmer_chaos()); + } + if (from.mesmer_domination() != 0) { + _internal_set_mesmer_domination(from._internal_mesmer_domination()); + } + if (from.necromancer_curses() != 0) { + _internal_set_necromancer_curses(from._internal_necromancer_curses()); + } + if (from.necromancer_death_magic() != 0) { + _internal_set_necromancer_death_magic(from._internal_necromancer_death_magic()); + } + if (from.necromancer_soul_reaping() != 0) { + _internal_set_necromancer_soul_reaping(from._internal_necromancer_soul_reaping()); + } + if (from.necromancer_spite() != 0) { + _internal_set_necromancer_spite(from._internal_necromancer_spite()); + } + if (from.elementalist_tempest() != 0) { + _internal_set_elementalist_tempest(from._internal_elementalist_tempest()); + } + if (from.engineer_scrapper() != 0) { + _internal_set_engineer_scrapper(from._internal_engineer_scrapper()); + } + if (from.guardian_dragonhunter() != 0) { + _internal_set_guardian_dragonhunter(from._internal_guardian_dragonhunter()); + } + if (from.mesmer_chronomancer() != 0) { + _internal_set_mesmer_chronomancer(from._internal_mesmer_chronomancer()); + } + if (from.warrior_berserker() != 0) { + _internal_set_warrior_berserker(from._internal_warrior_berserker()); + } + if (from.elementalist_weaver() != 0) { + _internal_set_elementalist_weaver(from._internal_elementalist_weaver()); + } + if (from.engineer_holosmith() != 0) { + _internal_set_engineer_holosmith(from._internal_engineer_holosmith()); + } + if (from.guardian_firebrand() != 0) { + _internal_set_guardian_firebrand(from._internal_guardian_firebrand()); + } + if (from.mesmer_mirage() != 0) { + _internal_set_mesmer_mirage(from._internal_mesmer_mirage()); + } + if (from.necromancer_scourge() != 0) { + _internal_set_necromancer_scourge(from._internal_necromancer_scourge()); + } + if (from.ranger_soulbeast() != 0) { + _internal_set_ranger_soulbeast(from._internal_ranger_soulbeast()); + } + if (from.revenant_renegade() != 0) { + _internal_set_revenant_renegade(from._internal_revenant_renegade()); + } + if (from.revenant_vindicator() != 0) { + _internal_set_revenant_vindicator(from._internal_revenant_vindicator()); + } + if (from.thief_specter() != 0) { + _internal_set_thief_specter(from._internal_thief_specter()); + } + if (from.warrior_bladesworn() != 0) { + _internal_set_warrior_bladesworn(from._internal_warrior_bladesworn()); + } + if (from.elementalist_air() != 0) { + _internal_set_elementalist_air(from._internal_elementalist_air()); + } + if (from.thief_deadeye() != 0) { + _internal_set_thief_deadeye(from._internal_thief_deadeye()); + } + if (from.warrior_spellbreaker() != 0) { + _internal_set_warrior_spellbreaker(from._internal_warrior_spellbreaker()); + } + if (from.elmentalist_catalyst() != 0) { + _internal_set_elmentalist_catalyst(from._internal_elmentalist_catalyst()); + } + if (from.engineer_mechanist() != 0) { + _internal_set_engineer_mechanist(from._internal_engineer_mechanist()); + } + if (from.guardian_willbender() != 0) { + _internal_set_guardian_willbender(from._internal_guardian_willbender()); + } + if (from.mesmer_virtuoso() != 0) { + _internal_set_mesmer_virtuoso(from._internal_mesmer_virtuoso()); + } + if (from.necromancer_harbinger() != 0) { + _internal_set_necromancer_harbinger(from._internal_necromancer_harbinger()); + } + if (from.ranger_untamed() != 0) { + _internal_set_ranger_untamed(from._internal_ranger_untamed()); + } +} + +void Trail_specialization_filter::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:Proto_Node.Trail.specialization_filter) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Trail_specialization_filter::CopyFrom(const Trail_specialization_filter& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:Proto_Node.Trail.specialization_filter) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Trail_specialization_filter::IsInitialized() const { + return true; +} + +void Trail_specialization_filter::InternalSwap(Trail_specialization_filter* other) { + using std::swap; + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(Trail_specialization_filter, ranger_untamed_) + + sizeof(Trail_specialization_filter::ranger_untamed_) + - PROTOBUF_FIELD_OFFSET(Trail_specialization_filter, ranger_wilderness_survival_)>( + reinterpret_cast(&ranger_wilderness_survival_), + reinterpret_cast(&other->ranger_wilderness_survival_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata Trail_specialization_filter::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void Trail_species_filter::InitAsDefaultInstance() { +} +class Trail_species_filter::_Internal { + public: +}; + +Trail_species_filter::Trail_species_filter(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:Proto_Node.Trail.species_filter) +} +Trail_species_filter::Trail_species_filter(const Trail_species_filter& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::memcpy(&asura_, &from.asura_, + static_cast(reinterpret_cast(&sylvari_) - + reinterpret_cast(&asura_)) + sizeof(sylvari_)); + // @@protoc_insertion_point(copy_constructor:Proto_Node.Trail.species_filter) +} + +void Trail_species_filter::SharedCtor() { + ::memset(&asura_, 0, static_cast( + reinterpret_cast(&sylvari_) - + reinterpret_cast(&asura_)) + sizeof(sylvari_)); +} + +Trail_species_filter::~Trail_species_filter() { + // @@protoc_insertion_point(destructor:Proto_Node.Trail.species_filter) + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +void Trail_species_filter::SharedDtor() { + GOOGLE_DCHECK(GetArena() == nullptr); +} + +void Trail_species_filter::ArenaDtor(void* object) { + Trail_species_filter* _this = reinterpret_cast< Trail_species_filter* >(object); + (void)_this; +} +void Trail_species_filter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void Trail_species_filter::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const Trail_species_filter& Trail_species_filter::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Trail_species_filter_node_2eproto.base); + return *internal_default_instance(); +} + + +void Trail_species_filter::Clear() { +// @@protoc_insertion_point(message_clear_start:Proto_Node.Trail.species_filter) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + ::memset(&asura_, 0, static_cast( + reinterpret_cast(&sylvari_) - + reinterpret_cast(&asura_)) + sizeof(sylvari_)); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* Trail_species_filter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // bool asura = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + asura_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool charr = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { + charr_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool human = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { + human_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool norn = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { + norn_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool sylvari = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { + sylvari_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* Trail_species_filter::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:Proto_Node.Trail.species_filter) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // bool asura = 1; + if (this->asura() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->_internal_asura(), target); + } + + // bool charr = 2; + if (this->charr() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_charr(), target); + } + + // bool human = 3; + if (this->human() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_human(), target); + } + + // bool norn = 4; + if (this->norn() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->_internal_norn(), target); + } + + // bool sylvari = 5; + if (this->sylvari() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->_internal_sylvari(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:Proto_Node.Trail.species_filter) + return target; +} + +size_t Trail_species_filter::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:Proto_Node.Trail.species_filter) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // bool asura = 1; + if (this->asura() != 0) { + total_size += 1 + 1; + } + + // bool charr = 2; + if (this->charr() != 0) { + total_size += 1 + 1; + } + + // bool human = 3; + if (this->human() != 0) { + total_size += 1 + 1; + } + + // bool norn = 4; + if (this->norn() != 0) { + total_size += 1 + 1; + } + + // bool sylvari = 5; + if (this->sylvari() != 0) { + total_size += 1 + 1; + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void Trail_species_filter::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:Proto_Node.Trail.species_filter) + GOOGLE_DCHECK_NE(&from, this); + const Trail_species_filter* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:Proto_Node.Trail.species_filter) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:Proto_Node.Trail.species_filter) + MergeFrom(*source); + } +} + +void Trail_species_filter::MergeFrom(const Trail_species_filter& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:Proto_Node.Trail.species_filter) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.asura() != 0) { + _internal_set_asura(from._internal_asura()); + } + if (from.charr() != 0) { + _internal_set_charr(from._internal_charr()); + } + if (from.human() != 0) { + _internal_set_human(from._internal_human()); + } + if (from.norn() != 0) { + _internal_set_norn(from._internal_norn()); + } + if (from.sylvari() != 0) { + _internal_set_sylvari(from._internal_sylvari()); + } +} + +void Trail_species_filter::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:Proto_Node.Trail.species_filter) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Trail_species_filter::CopyFrom(const Trail_species_filter& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:Proto_Node.Trail.species_filter) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Trail_species_filter::IsInitialized() const { + return true; +} + +void Trail_species_filter::InternalSwap(Trail_species_filter* other) { + using std::swap; + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(Trail_species_filter, sylvari_) + + sizeof(Trail_species_filter::sylvari_) + - PROTOBUF_FIELD_OFFSET(Trail_species_filter, asura_)>( + reinterpret_cast(&asura_), + reinterpret_cast(&other->asura_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata Trail_species_filter::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void Trail_texture::InitAsDefaultInstance() { + ::Proto_Node::_Trail_texture_default_instance_._instance.get_mutable()->original_token_ = const_cast< PROTOBUF_NAMESPACE_ID::Any*>( + PROTOBUF_NAMESPACE_ID::Any::internal_default_instance()); +} +class Trail_texture::_Internal { + public: + static const PROTOBUF_NAMESPACE_ID::Any& original_token(const Trail_texture* msg); +}; + +const PROTOBUF_NAMESPACE_ID::Any& +Trail_texture::_Internal::original_token(const Trail_texture* msg) { + return *msg->original_token_; +} +void Trail_texture::clear_original_token() { + if (GetArena() == nullptr && original_token_ != nullptr) { + delete original_token_; + } + original_token_ = nullptr; +} +Trail_texture::Trail_texture(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:Proto_Node.Trail.texture) +} +Trail_texture::Trail_texture(const Trail_texture& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + path_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_path().empty()) { + path_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_path(), + GetArena()); + } + if (from._internal_has_original_token()) { + original_token_ = new PROTOBUF_NAMESPACE_ID::Any(*from.original_token_); + } else { + original_token_ = nullptr; + } + // @@protoc_insertion_point(copy_constructor:Proto_Node.Trail.texture) +} + +void Trail_texture::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Trail_texture_node_2eproto.base); + path_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + original_token_ = nullptr; +} + +Trail_texture::~Trail_texture() { + // @@protoc_insertion_point(destructor:Proto_Node.Trail.texture) + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +void Trail_texture::SharedDtor() { + GOOGLE_DCHECK(GetArena() == nullptr); + path_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (this != internal_default_instance()) delete original_token_; +} + +void Trail_texture::ArenaDtor(void* object) { + Trail_texture* _this = reinterpret_cast< Trail_texture* >(object); + (void)_this; +} +void Trail_texture::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void Trail_texture::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const Trail_texture& Trail_texture::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Trail_texture_node_2eproto.base); + return *internal_default_instance(); +} + + +void Trail_texture::Clear() { +// @@protoc_insertion_point(message_clear_start:Proto_Node.Trail.texture) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + path_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + if (GetArena() == nullptr && original_token_ != nullptr) { + delete original_token_; + } + original_token_ = nullptr; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* Trail_texture::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // string path = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_path(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "Proto_Node.Trail.texture.path")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // .google.protobuf.Any original_token = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr = ctx->ParseMessage(_internal_mutable_original_token(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* Trail_texture::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:Proto_Node.Trail.texture) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string path = 1; + if (this->path().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_path().data(), static_cast(this->_internal_path().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "Proto_Node.Trail.texture.path"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_path(), target); + } + + // .google.protobuf.Any original_token = 2; + if (this->has_original_token()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 2, _Internal::original_token(this), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:Proto_Node.Trail.texture) + return target; +} + +size_t Trail_texture::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:Proto_Node.Trail.texture) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string path = 1; + if (this->path().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_path()); + } + + // .google.protobuf.Any original_token = 2; + if (this->has_original_token()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *original_token_); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void Trail_texture::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:Proto_Node.Trail.texture) + GOOGLE_DCHECK_NE(&from, this); + const Trail_texture* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:Proto_Node.Trail.texture) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:Proto_Node.Trail.texture) + MergeFrom(*source); + } +} + +void Trail_texture::MergeFrom(const Trail_texture& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:Proto_Node.Trail.texture) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.path().size() > 0) { + _internal_set_path(from._internal_path()); + } + if (from.has_original_token()) { + _internal_mutable_original_token()->PROTOBUF_NAMESPACE_ID::Any::MergeFrom(from._internal_original_token()); + } +} + +void Trail_texture::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:Proto_Node.Trail.texture) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Trail_texture::CopyFrom(const Trail_texture& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:Proto_Node.Trail.texture) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Trail_texture::IsInitialized() const { + return true; +} + +void Trail_texture::InternalSwap(Trail_texture* other) { + using std::swap; + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + path_.Swap(&other->path_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + swap(original_token_, other->original_token_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata Trail_texture::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void Trail_trail_data::InitAsDefaultInstance() { +} +class Trail_trail_data::_Internal { + public: +}; + +Trail_trail_data::Trail_trail_data(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:Proto_Node.Trail.trail_data) +} +Trail_trail_data::Trail_trail_data(const Trail_trail_data& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + trail_data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_trail_data().empty()) { + trail_data_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_trail_data(), + GetArena()); + } + // @@protoc_insertion_point(copy_constructor:Proto_Node.Trail.trail_data) +} + +void Trail_trail_data::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Trail_trail_data_node_2eproto.base); + trail_data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +Trail_trail_data::~Trail_trail_data() { + // @@protoc_insertion_point(destructor:Proto_Node.Trail.trail_data) + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +void Trail_trail_data::SharedDtor() { + GOOGLE_DCHECK(GetArena() == nullptr); + trail_data_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void Trail_trail_data::ArenaDtor(void* object) { + Trail_trail_data* _this = reinterpret_cast< Trail_trail_data* >(object); + (void)_this; +} +void Trail_trail_data::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void Trail_trail_data::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const Trail_trail_data& Trail_trail_data::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Trail_trail_data_node_2eproto.base); + return *internal_default_instance(); +} + + +void Trail_trail_data::Clear() { +// @@protoc_insertion_point(message_clear_start:Proto_Node.Trail.trail_data) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + trail_data_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* Trail_trail_data::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // string trail_data = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_trail_data(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "Proto_Node.Trail.trail_data.trail_data")); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* Trail_trail_data::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:Proto_Node.Trail.trail_data) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string trail_data = 1; + if (this->trail_data().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_trail_data().data(), static_cast(this->_internal_trail_data().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "Proto_Node.Trail.trail_data.trail_data"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_trail_data(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:Proto_Node.Trail.trail_data) + return target; +} + +size_t Trail_trail_data::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:Proto_Node.Trail.trail_data) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string trail_data = 1; + if (this->trail_data().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_trail_data()); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void Trail_trail_data::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:Proto_Node.Trail.trail_data) + GOOGLE_DCHECK_NE(&from, this); + const Trail_trail_data* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:Proto_Node.Trail.trail_data) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:Proto_Node.Trail.trail_data) + MergeFrom(*source); + } +} + +void Trail_trail_data::MergeFrom(const Trail_trail_data& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:Proto_Node.Trail.trail_data) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.trail_data().size() > 0) { + _internal_set_trail_data(from._internal_trail_data()); + } +} + +void Trail_trail_data::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:Proto_Node.Trail.trail_data) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Trail_trail_data::CopyFrom(const Trail_trail_data& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:Proto_Node.Trail.trail_data) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Trail_trail_data::IsInitialized() const { + return true; +} + +void Trail_trail_data::InternalSwap(Trail_trail_data* other) { + using std::swap; + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + trail_data_.Swap(&other->trail_data_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} + +::PROTOBUF_NAMESPACE_ID::Metadata Trail_trail_data::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void Trail::InitAsDefaultInstance() { + ::Proto_Node::_Trail_default_instance_._instance.get_mutable()->category_ = const_cast< ::Proto_Node::Category*>( + ::Proto_Node::Category::internal_default_instance()); +} +class Trail::_Internal { + public: + static const ::Proto_Node::Category& category(const Trail* msg); +}; + +const ::Proto_Node::Category& +Trail::_Internal::category(const Trail* msg) { + return *msg->category_; +} +Trail::Trail(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:Proto_Node.Trail) +} +Trail::Trail(const Trail& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + bhdraft__schedule_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_bhdraft__schedule().empty()) { + bhdraft__schedule_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_bhdraft__schedule(), + GetArena()); + } + if (from._internal_has_category()) { + category_ = new ::Proto_Node::Category(*from.category_); + } else { + category_ = nullptr; + } + ::memcpy(&achievement_bit_, &from.achievement_bit_, + static_cast(reinterpret_cast(&map_id_) - + reinterpret_cast(&achievement_bit_)) + sizeof(map_id_)); + // @@protoc_insertion_point(copy_constructor:Proto_Node.Trail) +} + +void Trail::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Trail_node_2eproto.base); + bhdraft__schedule_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + ::memset(&category_, 0, static_cast( + reinterpret_cast(&map_id_) - + reinterpret_cast(&category_)) + sizeof(map_id_)); +} + +Trail::~Trail() { + // @@protoc_insertion_point(destructor:Proto_Node.Trail) + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +void Trail::SharedDtor() { + GOOGLE_DCHECK(GetArena() == nullptr); + bhdraft__schedule_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (this != internal_default_instance()) delete category_; +} + +void Trail::ArenaDtor(void* object) { + Trail* _this = reinterpret_cast< Trail* >(object); + (void)_this; +} +void Trail::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void Trail::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const Trail& Trail::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Trail_node_2eproto.base); + return *internal_default_instance(); +} + + +void Trail::Clear() { +// @@protoc_insertion_point(message_clear_start:Proto_Node.Trail) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + bhdraft__schedule_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + if (GetArena() == nullptr && category_ != nullptr) { + delete category_; + } + category_ = nullptr; + ::memset(&achievement_bit_, 0, static_cast( + reinterpret_cast(&map_id_) - + reinterpret_cast(&achievement_bit_)) + sizeof(map_id_)); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* Trail::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // fixed32 achievement_bit = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 13)) { + achievement_bit_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint32>(ptr); + ptr += sizeof(::PROTOBUF_NAMESPACE_ID::uint32); + } else goto handle_unusual; + continue; + // int32 achievement_id = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { + achievement_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // float alpha = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 29)) { + alpha_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else goto handle_unusual; + continue; + // float animation_speed = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 37)) { + animation_speed_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else goto handle_unusual; + continue; + // bool can_fade = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { + can_fade_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // float distance_fade_end = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 53)) { + distance_fade_end_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else goto handle_unusual; + continue; + // float distance_fade_start = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 61)) { + distance_fade_start_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else goto handle_unusual; + continue; + // bool is_wall = 8; + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 64)) { + is_wall_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string bhdraft__schedule = 9; + case 9: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 74)) { + auto str = _internal_mutable_bhdraft__schedule(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "Proto_Node.Trail.bhdraft__schedule")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // float bhdraft__schedule_duration = 10; + case 10: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 85)) { + bhdraft__schedule_duration_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else goto handle_unusual; + continue; + // float scale = 11; + case 11: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 93)) { + scale_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else goto handle_unusual; + continue; + // .Proto_Node.Category category = 12; + case 12: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 98)) { + ptr = ctx->ParseMessage(_internal_mutable_category(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // int32 map_id = 13; + case 13: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 104)) { + map_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* Trail::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:Proto_Node.Trail) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // fixed32 achievement_bit = 1; + if (this->achievement_bit() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFixed32ToArray(1, this->_internal_achievement_bit(), target); + } + + // int32 achievement_id = 2; + if (this->achievement_id() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_achievement_id(), target); + } + + // float alpha = 3; + if (!(this->alpha() <= 0 && this->alpha() >= 0)) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(3, this->_internal_alpha(), target); + } + + // float animation_speed = 4; + if (!(this->animation_speed() <= 0 && this->animation_speed() >= 0)) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(4, this->_internal_animation_speed(), target); + } + + // bool can_fade = 5; + if (this->can_fade() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->_internal_can_fade(), target); + } + + // float distance_fade_end = 6; + if (!(this->distance_fade_end() <= 0 && this->distance_fade_end() >= 0)) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(6, this->_internal_distance_fade_end(), target); + } + + // float distance_fade_start = 7; + if (!(this->distance_fade_start() <= 0 && this->distance_fade_start() >= 0)) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(7, this->_internal_distance_fade_start(), target); + } + + // bool is_wall = 8; + if (this->is_wall() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(8, this->_internal_is_wall(), target); + } + + // string bhdraft__schedule = 9; + if (this->bhdraft__schedule().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_bhdraft__schedule().data(), static_cast(this->_internal_bhdraft__schedule().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "Proto_Node.Trail.bhdraft__schedule"); + target = stream->WriteStringMaybeAliased( + 9, this->_internal_bhdraft__schedule(), target); + } + + // float bhdraft__schedule_duration = 10; + if (!(this->bhdraft__schedule_duration() <= 0 && this->bhdraft__schedule_duration() >= 0)) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(10, this->_internal_bhdraft__schedule_duration(), target); + } + + // float scale = 11; + if (!(this->scale() <= 0 && this->scale() >= 0)) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(11, this->_internal_scale(), target); + } + + // .Proto_Node.Category category = 12; + if (this->has_category()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 12, _Internal::category(this), target, stream); + } + + // int32 map_id = 13; + if (this->map_id() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(13, this->_internal_map_id(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:Proto_Node.Trail) + return target; +} + +size_t Trail::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:Proto_Node.Trail) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string bhdraft__schedule = 9; + if (this->bhdraft__schedule().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_bhdraft__schedule()); + } + + // .Proto_Node.Category category = 12; + if (this->has_category()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *category_); + } + + // fixed32 achievement_bit = 1; + if (this->achievement_bit() != 0) { + total_size += 1 + 4; + } + + // int32 achievement_id = 2; + if (this->achievement_id() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + this->_internal_achievement_id()); + } + + // float alpha = 3; + if (!(this->alpha() <= 0 && this->alpha() >= 0)) { + total_size += 1 + 4; + } + + // float animation_speed = 4; + if (!(this->animation_speed() <= 0 && this->animation_speed() >= 0)) { + total_size += 1 + 4; + } + + // float distance_fade_end = 6; + if (!(this->distance_fade_end() <= 0 && this->distance_fade_end() >= 0)) { + total_size += 1 + 4; + } + + // bool can_fade = 5; + if (this->can_fade() != 0) { + total_size += 1 + 1; + } + + // bool is_wall = 8; + if (this->is_wall() != 0) { + total_size += 1 + 1; + } + + // float distance_fade_start = 7; + if (!(this->distance_fade_start() <= 0 && this->distance_fade_start() >= 0)) { + total_size += 1 + 4; + } + + // float bhdraft__schedule_duration = 10; + if (!(this->bhdraft__schedule_duration() <= 0 && this->bhdraft__schedule_duration() >= 0)) { + total_size += 1 + 4; + } + + // float scale = 11; + if (!(this->scale() <= 0 && this->scale() >= 0)) { + total_size += 1 + 4; + } + + // int32 map_id = 13; + if (this->map_id() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + this->_internal_map_id()); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void Trail::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:Proto_Node.Trail) + GOOGLE_DCHECK_NE(&from, this); + const Trail* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:Proto_Node.Trail) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:Proto_Node.Trail) + MergeFrom(*source); + } +} + +void Trail::MergeFrom(const Trail& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:Proto_Node.Trail) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.bhdraft__schedule().size() > 0) { + _internal_set_bhdraft__schedule(from._internal_bhdraft__schedule()); + } + if (from.has_category()) { + _internal_mutable_category()->::Proto_Node::Category::MergeFrom(from._internal_category()); + } + if (from.achievement_bit() != 0) { + _internal_set_achievement_bit(from._internal_achievement_bit()); + } + if (from.achievement_id() != 0) { + _internal_set_achievement_id(from._internal_achievement_id()); + } + if (!(from.alpha() <= 0 && from.alpha() >= 0)) { + _internal_set_alpha(from._internal_alpha()); + } + if (!(from.animation_speed() <= 0 && from.animation_speed() >= 0)) { + _internal_set_animation_speed(from._internal_animation_speed()); + } + if (!(from.distance_fade_end() <= 0 && from.distance_fade_end() >= 0)) { + _internal_set_distance_fade_end(from._internal_distance_fade_end()); + } + if (from.can_fade() != 0) { + _internal_set_can_fade(from._internal_can_fade()); + } + if (from.is_wall() != 0) { + _internal_set_is_wall(from._internal_is_wall()); + } + if (!(from.distance_fade_start() <= 0 && from.distance_fade_start() >= 0)) { + _internal_set_distance_fade_start(from._internal_distance_fade_start()); + } + if (!(from.bhdraft__schedule_duration() <= 0 && from.bhdraft__schedule_duration() >= 0)) { + _internal_set_bhdraft__schedule_duration(from._internal_bhdraft__schedule_duration()); + } + if (!(from.scale() <= 0 && from.scale() >= 0)) { + _internal_set_scale(from._internal_scale()); + } + if (from.map_id() != 0) { + _internal_set_map_id(from._internal_map_id()); + } +} + +void Trail::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:Proto_Node.Trail) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Trail::CopyFrom(const Trail& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:Proto_Node.Trail) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Trail::IsInitialized() const { + return true; +} + +void Trail::InternalSwap(Trail* other) { + using std::swap; + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + bhdraft__schedule_.Swap(&other->bhdraft__schedule_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(Trail, map_id_) + + sizeof(Trail::map_id_) + - PROTOBUF_FIELD_OFFSET(Trail, category_)>( + reinterpret_cast(&category_), + reinterpret_cast(&other->category_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata Trail::GetMetadata() const { + return GetMetadataStatic(); +} + + +// @@protoc_insertion_point(namespace_scope) +} // namespace Proto_Node +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::Proto_Node::Category_ChildrenEntry_DoNotUse* Arena::CreateMaybeMessage< ::Proto_Node::Category_ChildrenEntry_DoNotUse >(Arena* arena) { + return Arena::CreateMessageInternal< ::Proto_Node::Category_ChildrenEntry_DoNotUse >(arena); +} +template<> PROTOBUF_NOINLINE ::Proto_Node::Category* Arena::CreateMaybeMessage< ::Proto_Node::Category >(Arena* arena) { + return Arena::CreateMessageInternal< ::Proto_Node::Category >(arena); +} +template<> PROTOBUF_NOINLINE ::Proto_Node::Icon_texture* Arena::CreateMaybeMessage< ::Proto_Node::Icon_texture >(Arena* arena) { + return Arena::CreateMessageInternal< ::Proto_Node::Icon_texture >(arena); +} +template<> PROTOBUF_NOINLINE ::Proto_Node::Icon_position* Arena::CreateMaybeMessage< ::Proto_Node::Icon_position >(Arena* arena) { + return Arena::CreateMessageInternal< ::Proto_Node::Icon_position >(arena); +} +template<> PROTOBUF_NOINLINE ::Proto_Node::Icon_euler_rotation* Arena::CreateMaybeMessage< ::Proto_Node::Icon_euler_rotation >(Arena* arena) { + return Arena::CreateMessageInternal< ::Proto_Node::Icon_euler_rotation >(arena); +} +template<> PROTOBUF_NOINLINE ::Proto_Node::Icon_trigger_guid* Arena::CreateMaybeMessage< ::Proto_Node::Icon_trigger_guid >(Arena* arena) { + return Arena::CreateMessageInternal< ::Proto_Node::Icon_trigger_guid >(arena); +} +template<> PROTOBUF_NOINLINE ::Proto_Node::Icon_trigger* Arena::CreateMaybeMessage< ::Proto_Node::Icon_trigger >(Arena* arena) { + return Arena::CreateMessageInternal< ::Proto_Node::Icon_trigger >(arena); +} +template<> PROTOBUF_NOINLINE ::Proto_Node::Icon* Arena::CreateMaybeMessage< ::Proto_Node::Icon >(Arena* arena) { + return Arena::CreateMessageInternal< ::Proto_Node::Icon >(arena); +} +template<> PROTOBUF_NOINLINE ::Proto_Node::Trail_color* Arena::CreateMaybeMessage< ::Proto_Node::Trail_color >(Arena* arena) { + return Arena::CreateMessageInternal< ::Proto_Node::Trail_color >(arena); +} +template<> PROTOBUF_NOINLINE ::Proto_Node::Trail_festival_filter* Arena::CreateMaybeMessage< ::Proto_Node::Trail_festival_filter >(Arena* arena) { + return Arena::CreateMessageInternal< ::Proto_Node::Trail_festival_filter >(arena); +} +template<> PROTOBUF_NOINLINE ::Proto_Node::Trail_guid* Arena::CreateMaybeMessage< ::Proto_Node::Trail_guid >(Arena* arena) { + return Arena::CreateMessageInternal< ::Proto_Node::Trail_guid >(arena); +} +template<> PROTOBUF_NOINLINE ::Proto_Node::Trail_map_type_filter* Arena::CreateMaybeMessage< ::Proto_Node::Trail_map_type_filter >(Arena* arena) { + return Arena::CreateMessageInternal< ::Proto_Node::Trail_map_type_filter >(arena); +} +template<> PROTOBUF_NOINLINE ::Proto_Node::Trail_mount_filter* Arena::CreateMaybeMessage< ::Proto_Node::Trail_mount_filter >(Arena* arena) { + return Arena::CreateMessageInternal< ::Proto_Node::Trail_mount_filter >(arena); +} +template<> PROTOBUF_NOINLINE ::Proto_Node::Trail_profession_filter* Arena::CreateMaybeMessage< ::Proto_Node::Trail_profession_filter >(Arena* arena) { + return Arena::CreateMessageInternal< ::Proto_Node::Trail_profession_filter >(arena); +} +template<> PROTOBUF_NOINLINE ::Proto_Node::Trail_specialization_filter* Arena::CreateMaybeMessage< ::Proto_Node::Trail_specialization_filter >(Arena* arena) { + return Arena::CreateMessageInternal< ::Proto_Node::Trail_specialization_filter >(arena); +} +template<> PROTOBUF_NOINLINE ::Proto_Node::Trail_species_filter* Arena::CreateMaybeMessage< ::Proto_Node::Trail_species_filter >(Arena* arena) { + return Arena::CreateMessageInternal< ::Proto_Node::Trail_species_filter >(arena); +} +template<> PROTOBUF_NOINLINE ::Proto_Node::Trail_texture* Arena::CreateMaybeMessage< ::Proto_Node::Trail_texture >(Arena* arena) { + return Arena::CreateMessageInternal< ::Proto_Node::Trail_texture >(arena); +} +template<> PROTOBUF_NOINLINE ::Proto_Node::Trail_trail_data* Arena::CreateMaybeMessage< ::Proto_Node::Trail_trail_data >(Arena* arena) { + return Arena::CreateMessageInternal< ::Proto_Node::Trail_trail_data >(arena); +} +template<> PROTOBUF_NOINLINE ::Proto_Node::Trail* Arena::CreateMaybeMessage< ::Proto_Node::Trail >(Arena* arena) { + return Arena::CreateMessageInternal< ::Proto_Node::Trail >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/xml_converter/generators/proto_templates/node.pb.h b/xml_converter/generators/proto_templates/node.pb.h new file mode 100644 index 00000000..d465e327 --- /dev/null +++ b/xml_converter/generators/proto_templates/node.pb.h @@ -0,0 +1,10262 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: node.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_node_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_node_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3012000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3012004 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_node_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_node_2eproto { + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[19] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; + static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_node_2eproto; +namespace Proto_Node { +class Category; +class CategoryDefaultTypeInternal; +extern CategoryDefaultTypeInternal _Category_default_instance_; +class Category_ChildrenEntry_DoNotUse; +class Category_ChildrenEntry_DoNotUseDefaultTypeInternal; +extern Category_ChildrenEntry_DoNotUseDefaultTypeInternal _Category_ChildrenEntry_DoNotUse_default_instance_; +class Icon; +class IconDefaultTypeInternal; +extern IconDefaultTypeInternal _Icon_default_instance_; +class Icon_euler_rotation; +class Icon_euler_rotationDefaultTypeInternal; +extern Icon_euler_rotationDefaultTypeInternal _Icon_euler_rotation_default_instance_; +class Icon_position; +class Icon_positionDefaultTypeInternal; +extern Icon_positionDefaultTypeInternal _Icon_position_default_instance_; +class Icon_texture; +class Icon_textureDefaultTypeInternal; +extern Icon_textureDefaultTypeInternal _Icon_texture_default_instance_; +class Icon_trigger; +class Icon_triggerDefaultTypeInternal; +extern Icon_triggerDefaultTypeInternal _Icon_trigger_default_instance_; +class Icon_trigger_guid; +class Icon_trigger_guidDefaultTypeInternal; +extern Icon_trigger_guidDefaultTypeInternal _Icon_trigger_guid_default_instance_; +class Trail; +class TrailDefaultTypeInternal; +extern TrailDefaultTypeInternal _Trail_default_instance_; +class Trail_color; +class Trail_colorDefaultTypeInternal; +extern Trail_colorDefaultTypeInternal _Trail_color_default_instance_; +class Trail_festival_filter; +class Trail_festival_filterDefaultTypeInternal; +extern Trail_festival_filterDefaultTypeInternal _Trail_festival_filter_default_instance_; +class Trail_guid; +class Trail_guidDefaultTypeInternal; +extern Trail_guidDefaultTypeInternal _Trail_guid_default_instance_; +class Trail_map_type_filter; +class Trail_map_type_filterDefaultTypeInternal; +extern Trail_map_type_filterDefaultTypeInternal _Trail_map_type_filter_default_instance_; +class Trail_mount_filter; +class Trail_mount_filterDefaultTypeInternal; +extern Trail_mount_filterDefaultTypeInternal _Trail_mount_filter_default_instance_; +class Trail_profession_filter; +class Trail_profession_filterDefaultTypeInternal; +extern Trail_profession_filterDefaultTypeInternal _Trail_profession_filter_default_instance_; +class Trail_specialization_filter; +class Trail_specialization_filterDefaultTypeInternal; +extern Trail_specialization_filterDefaultTypeInternal _Trail_specialization_filter_default_instance_; +class Trail_species_filter; +class Trail_species_filterDefaultTypeInternal; +extern Trail_species_filterDefaultTypeInternal _Trail_species_filter_default_instance_; +class Trail_texture; +class Trail_textureDefaultTypeInternal; +extern Trail_textureDefaultTypeInternal _Trail_texture_default_instance_; +class Trail_trail_data; +class Trail_trail_dataDefaultTypeInternal; +extern Trail_trail_dataDefaultTypeInternal _Trail_trail_data_default_instance_; +} // namespace Proto_Node +PROTOBUF_NAMESPACE_OPEN +template<> ::Proto_Node::Category* Arena::CreateMaybeMessage<::Proto_Node::Category>(Arena*); +template<> ::Proto_Node::Category_ChildrenEntry_DoNotUse* Arena::CreateMaybeMessage<::Proto_Node::Category_ChildrenEntry_DoNotUse>(Arena*); +template<> ::Proto_Node::Icon* Arena::CreateMaybeMessage<::Proto_Node::Icon>(Arena*); +template<> ::Proto_Node::Icon_euler_rotation* Arena::CreateMaybeMessage<::Proto_Node::Icon_euler_rotation>(Arena*); +template<> ::Proto_Node::Icon_position* Arena::CreateMaybeMessage<::Proto_Node::Icon_position>(Arena*); +template<> ::Proto_Node::Icon_texture* Arena::CreateMaybeMessage<::Proto_Node::Icon_texture>(Arena*); +template<> ::Proto_Node::Icon_trigger* Arena::CreateMaybeMessage<::Proto_Node::Icon_trigger>(Arena*); +template<> ::Proto_Node::Icon_trigger_guid* Arena::CreateMaybeMessage<::Proto_Node::Icon_trigger_guid>(Arena*); +template<> ::Proto_Node::Trail* Arena::CreateMaybeMessage<::Proto_Node::Trail>(Arena*); +template<> ::Proto_Node::Trail_color* Arena::CreateMaybeMessage<::Proto_Node::Trail_color>(Arena*); +template<> ::Proto_Node::Trail_festival_filter* Arena::CreateMaybeMessage<::Proto_Node::Trail_festival_filter>(Arena*); +template<> ::Proto_Node::Trail_guid* Arena::CreateMaybeMessage<::Proto_Node::Trail_guid>(Arena*); +template<> ::Proto_Node::Trail_map_type_filter* Arena::CreateMaybeMessage<::Proto_Node::Trail_map_type_filter>(Arena*); +template<> ::Proto_Node::Trail_mount_filter* Arena::CreateMaybeMessage<::Proto_Node::Trail_mount_filter>(Arena*); +template<> ::Proto_Node::Trail_profession_filter* Arena::CreateMaybeMessage<::Proto_Node::Trail_profession_filter>(Arena*); +template<> ::Proto_Node::Trail_specialization_filter* Arena::CreateMaybeMessage<::Proto_Node::Trail_specialization_filter>(Arena*); +template<> ::Proto_Node::Trail_species_filter* Arena::CreateMaybeMessage<::Proto_Node::Trail_species_filter>(Arena*); +template<> ::Proto_Node::Trail_texture* Arena::CreateMaybeMessage<::Proto_Node::Trail_texture>(Arena*); +template<> ::Proto_Node::Trail_trail_data* Arena::CreateMaybeMessage<::Proto_Node::Trail_trail_data>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace Proto_Node { + +enum Icon_trigger_reset_behavior : int { + Icon_trigger_reset_behavior_always_visible = 0, + Icon_trigger_reset_behavior_map_change = 1, + Icon_trigger_reset_behavior_daily_reset = 2, + Icon_trigger_reset_behavior_never = 3, + Icon_trigger_reset_behavior_timer = 4, + Icon_trigger_reset_behavior_map_reset = 5, + Icon_trigger_reset_behavior_instance_change = 6, + Icon_trigger_reset_behavior_daily_reset_per_character = 7, + Icon_trigger_reset_behavior_weekly_reset = 8, + Icon_trigger_reset_behavior_Icon_trigger_reset_behavior_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(), + Icon_trigger_reset_behavior_Icon_trigger_reset_behavior_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max() +}; +bool Icon_trigger_reset_behavior_IsValid(int value); +constexpr Icon_trigger_reset_behavior Icon_trigger_reset_behavior_reset_behavior_MIN = Icon_trigger_reset_behavior_always_visible; +constexpr Icon_trigger_reset_behavior Icon_trigger_reset_behavior_reset_behavior_MAX = Icon_trigger_reset_behavior_weekly_reset; +constexpr int Icon_trigger_reset_behavior_reset_behavior_ARRAYSIZE = Icon_trigger_reset_behavior_reset_behavior_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* Icon_trigger_reset_behavior_descriptor(); +template +inline const std::string& Icon_trigger_reset_behavior_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function Icon_trigger_reset_behavior_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + Icon_trigger_reset_behavior_descriptor(), enum_t_value); +} +inline bool Icon_trigger_reset_behavior_Parse( + const std::string& name, Icon_trigger_reset_behavior* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + Icon_trigger_reset_behavior_descriptor(), name, value); +} +enum Trail_cull_chirality : int { + Trail_cull_chirality_none = 0, + Trail_cull_chirality_clockwise = 1, + Trail_cull_chirality_counter_clockwise = 2, + Trail_cull_chirality_Trail_cull_chirality_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(), + Trail_cull_chirality_Trail_cull_chirality_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max() +}; +bool Trail_cull_chirality_IsValid(int value); +constexpr Trail_cull_chirality Trail_cull_chirality_cull_chirality_MIN = Trail_cull_chirality_none; +constexpr Trail_cull_chirality Trail_cull_chirality_cull_chirality_MAX = Trail_cull_chirality_counter_clockwise; +constexpr int Trail_cull_chirality_cull_chirality_ARRAYSIZE = Trail_cull_chirality_cull_chirality_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* Trail_cull_chirality_descriptor(); +template +inline const std::string& Trail_cull_chirality_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function Trail_cull_chirality_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + Trail_cull_chirality_descriptor(), enum_t_value); +} +inline bool Trail_cull_chirality_Parse( + const std::string& name, Trail_cull_chirality* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + Trail_cull_chirality_descriptor(), name, value); +} +// =================================================================== + +class Category_ChildrenEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + Category_ChildrenEntry_DoNotUse(); + Category_ChildrenEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const Category_ChildrenEntry_DoNotUse& other); + static const Category_ChildrenEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_Category_ChildrenEntry_DoNotUse_default_instance_); } + static bool ValidateKey(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "Proto_Node.Category.ChildrenEntry.key"); + } + static bool ValidateValue(void*) { return true; } + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& other) final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); + return ::descriptor_table_node_2eproto.file_level_metadata[0]; + } + + public: +}; + +// ------------------------------------------------------------------- + +class Category PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Proto_Node.Category) */ { + public: + inline Category() : Category(nullptr) {}; + virtual ~Category(); + + Category(const Category& from); + Category(Category&& from) noexcept + : Category() { + *this = ::std::move(from); + } + + inline Category& operator=(const Category& from) { + CopyFrom(from); + return *this; + } + inline Category& operator=(Category&& from) noexcept { + if (GetArena() == from.GetArena()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const Category& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const Category* internal_default_instance() { + return reinterpret_cast( + &_Category_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(Category& a, Category& b) { + a.Swap(&b); + } + inline void Swap(Category* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Category* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline Category* New() const final { + return CreateMaybeMessage(nullptr); + } + + Category* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const Category& from); + void MergeFrom(const Category& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Category* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "Proto_Node.Category"; + } + protected: + explicit Category(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); + return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + + // accessors ------------------------------------------------------- + + enum : int { + kChildrenFieldNumber = 6, + kDisplayNameFieldNumber = 2, + kNameFieldNumber = 4, + kTooltipNameFieldNumber = 5, + kDefaultVisibilityFieldNumber = 1, + kIsSeparatorFieldNumber = 3, + }; + // map children = 6; + int children_size() const; + private: + int _internal_children_size() const; + public: + void clear_children(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Proto_Node::Category >& + _internal_children() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Proto_Node::Category >* + _internal_mutable_children(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Proto_Node::Category >& + children() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Proto_Node::Category >* + mutable_children(); + + // string display_name = 2; + void clear_display_name(); + const std::string& display_name() const; + void set_display_name(const std::string& value); + void set_display_name(std::string&& value); + void set_display_name(const char* value); + void set_display_name(const char* value, size_t size); + std::string* mutable_display_name(); + std::string* release_display_name(); + void set_allocated_display_name(std::string* display_name); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_display_name(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_display_name( + std::string* display_name); + private: + const std::string& _internal_display_name() const; + void _internal_set_display_name(const std::string& value); + std::string* _internal_mutable_display_name(); + public: + + // string name = 4; + void clear_name(); + const std::string& name() const; + void set_name(const std::string& value); + void set_name(std::string&& value); + void set_name(const char* value); + void set_name(const char* value, size_t size); + std::string* mutable_name(); + std::string* release_name(); + void set_allocated_name(std::string* name); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_name(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_name( + std::string* name); + private: + const std::string& _internal_name() const; + void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: + + // string tooltip_name = 5; + void clear_tooltip_name(); + const std::string& tooltip_name() const; + void set_tooltip_name(const std::string& value); + void set_tooltip_name(std::string&& value); + void set_tooltip_name(const char* value); + void set_tooltip_name(const char* value, size_t size); + std::string* mutable_tooltip_name(); + std::string* release_tooltip_name(); + void set_allocated_tooltip_name(std::string* tooltip_name); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_tooltip_name(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_tooltip_name( + std::string* tooltip_name); + private: + const std::string& _internal_tooltip_name() const; + void _internal_set_tooltip_name(const std::string& value); + std::string* _internal_mutable_tooltip_name(); + public: + + // bool default_visibility = 1; + void clear_default_visibility(); + bool default_visibility() const; + void set_default_visibility(bool value); + private: + bool _internal_default_visibility() const; + void _internal_set_default_visibility(bool value); + public: + + // bool is_separator = 3; + void clear_is_separator(); + bool is_separator() const; + void set_is_separator(bool value); + private: + bool _internal_is_separator() const; + void _internal_set_is_separator(bool value); + public: + + // @@protoc_insertion_point(class_scope:Proto_Node.Category) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + Category_ChildrenEntry_DoNotUse, + std::string, ::Proto_Node::Category, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE, + 0 > children_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr display_name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr tooltip_name_; + bool default_visibility_; + bool is_separator_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_node_2eproto; +}; +// ------------------------------------------------------------------- + +class Icon_texture PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Proto_Node.Icon.texture) */ { + public: + inline Icon_texture() : Icon_texture(nullptr) {}; + virtual ~Icon_texture(); + + Icon_texture(const Icon_texture& from); + Icon_texture(Icon_texture&& from) noexcept + : Icon_texture() { + *this = ::std::move(from); + } + + inline Icon_texture& operator=(const Icon_texture& from) { + CopyFrom(from); + return *this; + } + inline Icon_texture& operator=(Icon_texture&& from) noexcept { + if (GetArena() == from.GetArena()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const Icon_texture& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const Icon_texture* internal_default_instance() { + return reinterpret_cast( + &_Icon_texture_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(Icon_texture& a, Icon_texture& b) { + a.Swap(&b); + } + inline void Swap(Icon_texture* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Icon_texture* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline Icon_texture* New() const final { + return CreateMaybeMessage(nullptr); + } + + Icon_texture* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const Icon_texture& from); + void MergeFrom(const Icon_texture& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Icon_texture* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "Proto_Node.Icon.texture"; + } + protected: + explicit Icon_texture(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); + return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kPathFieldNumber = 1, + kOriginalTokenFieldNumber = 2, + }; + // string path = 1; + void clear_path(); + const std::string& path() const; + void set_path(const std::string& value); + void set_path(std::string&& value); + void set_path(const char* value); + void set_path(const char* value, size_t size); + std::string* mutable_path(); + std::string* release_path(); + void set_allocated_path(std::string* path); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_path(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_path( + std::string* path); + private: + const std::string& _internal_path() const; + void _internal_set_path(const std::string& value); + std::string* _internal_mutable_path(); + public: + + // .google.protobuf.Any original_token = 2; + bool has_original_token() const; + private: + bool _internal_has_original_token() const; + public: + void clear_original_token(); + const PROTOBUF_NAMESPACE_ID::Any& original_token() const; + PROTOBUF_NAMESPACE_ID::Any* release_original_token(); + PROTOBUF_NAMESPACE_ID::Any* mutable_original_token(); + void set_allocated_original_token(PROTOBUF_NAMESPACE_ID::Any* original_token); + private: + const PROTOBUF_NAMESPACE_ID::Any& _internal_original_token() const; + PROTOBUF_NAMESPACE_ID::Any* _internal_mutable_original_token(); + public: + void unsafe_arena_set_allocated_original_token( + PROTOBUF_NAMESPACE_ID::Any* original_token); + PROTOBUF_NAMESPACE_ID::Any* unsafe_arena_release_original_token(); + + // @@protoc_insertion_point(class_scope:Proto_Node.Icon.texture) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr path_; + PROTOBUF_NAMESPACE_ID::Any* original_token_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_node_2eproto; +}; +// ------------------------------------------------------------------- + +class Icon_position PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Proto_Node.Icon.position) */ { + public: + inline Icon_position() : Icon_position(nullptr) {}; + virtual ~Icon_position(); + + Icon_position(const Icon_position& from); + Icon_position(Icon_position&& from) noexcept + : Icon_position() { + *this = ::std::move(from); + } + + inline Icon_position& operator=(const Icon_position& from) { + CopyFrom(from); + return *this; + } + inline Icon_position& operator=(Icon_position&& from) noexcept { + if (GetArena() == from.GetArena()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const Icon_position& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const Icon_position* internal_default_instance() { + return reinterpret_cast( + &_Icon_position_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(Icon_position& a, Icon_position& b) { + a.Swap(&b); + } + inline void Swap(Icon_position* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Icon_position* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline Icon_position* New() const final { + return CreateMaybeMessage(nullptr); + } + + Icon_position* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const Icon_position& from); + void MergeFrom(const Icon_position& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Icon_position* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "Proto_Node.Icon.position"; + } + protected: + explicit Icon_position(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); + return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kXFieldNumber = 1, + kYFieldNumber = 2, + kZFieldNumber = 3, + }; + // float x = 1; + void clear_x(); + float x() const; + void set_x(float value); + private: + float _internal_x() const; + void _internal_set_x(float value); + public: + + // float y = 2; + void clear_y(); + float y() const; + void set_y(float value); + private: + float _internal_y() const; + void _internal_set_y(float value); + public: + + // float z = 3; + void clear_z(); + float z() const; + void set_z(float value); + private: + float _internal_z() const; + void _internal_set_z(float value); + public: + + // @@protoc_insertion_point(class_scope:Proto_Node.Icon.position) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + float x_; + float y_; + float z_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_node_2eproto; +}; +// ------------------------------------------------------------------- + +class Icon_euler_rotation PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Proto_Node.Icon.euler_rotation) */ { + public: + inline Icon_euler_rotation() : Icon_euler_rotation(nullptr) {}; + virtual ~Icon_euler_rotation(); + + Icon_euler_rotation(const Icon_euler_rotation& from); + Icon_euler_rotation(Icon_euler_rotation&& from) noexcept + : Icon_euler_rotation() { + *this = ::std::move(from); + } + + inline Icon_euler_rotation& operator=(const Icon_euler_rotation& from) { + CopyFrom(from); + return *this; + } + inline Icon_euler_rotation& operator=(Icon_euler_rotation&& from) noexcept { + if (GetArena() == from.GetArena()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const Icon_euler_rotation& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const Icon_euler_rotation* internal_default_instance() { + return reinterpret_cast( + &_Icon_euler_rotation_default_instance_); + } + static constexpr int kIndexInFileMessages = + 4; + + friend void swap(Icon_euler_rotation& a, Icon_euler_rotation& b) { + a.Swap(&b); + } + inline void Swap(Icon_euler_rotation* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Icon_euler_rotation* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline Icon_euler_rotation* New() const final { + return CreateMaybeMessage(nullptr); + } + + Icon_euler_rotation* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const Icon_euler_rotation& from); + void MergeFrom(const Icon_euler_rotation& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Icon_euler_rotation* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "Proto_Node.Icon.euler_rotation"; + } + protected: + explicit Icon_euler_rotation(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); + return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kXFieldNumber = 1, + kYFieldNumber = 2, + kZFieldNumber = 3, + }; + // float x = 1; + void clear_x(); + float x() const; + void set_x(float value); + private: + float _internal_x() const; + void _internal_set_x(float value); + public: + + // float y = 2; + void clear_y(); + float y() const; + void set_y(float value); + private: + float _internal_y() const; + void _internal_set_y(float value); + public: + + // float z = 3; + void clear_z(); + float z() const; + void set_z(float value); + private: + float _internal_z() const; + void _internal_set_z(float value); + public: + + // @@protoc_insertion_point(class_scope:Proto_Node.Icon.euler_rotation) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + float x_; + float y_; + float z_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_node_2eproto; +}; +// ------------------------------------------------------------------- + +class Icon_trigger_guid PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Proto_Node.Icon.trigger.guid) */ { + public: + inline Icon_trigger_guid() : Icon_trigger_guid(nullptr) {}; + virtual ~Icon_trigger_guid(); + + Icon_trigger_guid(const Icon_trigger_guid& from); + Icon_trigger_guid(Icon_trigger_guid&& from) noexcept + : Icon_trigger_guid() { + *this = ::std::move(from); + } + + inline Icon_trigger_guid& operator=(const Icon_trigger_guid& from) { + CopyFrom(from); + return *this; + } + inline Icon_trigger_guid& operator=(Icon_trigger_guid&& from) noexcept { + if (GetArena() == from.GetArena()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const Icon_trigger_guid& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const Icon_trigger_guid* internal_default_instance() { + return reinterpret_cast( + &_Icon_trigger_guid_default_instance_); + } + static constexpr int kIndexInFileMessages = + 5; + + friend void swap(Icon_trigger_guid& a, Icon_trigger_guid& b) { + a.Swap(&b); + } + inline void Swap(Icon_trigger_guid* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Icon_trigger_guid* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline Icon_trigger_guid* New() const final { + return CreateMaybeMessage(nullptr); + } + + Icon_trigger_guid* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const Icon_trigger_guid& from); + void MergeFrom(const Icon_trigger_guid& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Icon_trigger_guid* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "Proto_Node.Icon.trigger.guid"; + } + protected: + explicit Icon_trigger_guid(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); + return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kGuidFieldNumber = 1, + }; + // int32 guid = 1; + void clear_guid(); + ::PROTOBUF_NAMESPACE_ID::int32 guid() const; + void set_guid(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_guid() const; + void _internal_set_guid(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // @@protoc_insertion_point(class_scope:Proto_Node.Icon.trigger.guid) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::int32 guid_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_node_2eproto; +}; +// ------------------------------------------------------------------- + +class Icon_trigger PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Proto_Node.Icon.trigger) */ { + public: + inline Icon_trigger() : Icon_trigger(nullptr) {}; + virtual ~Icon_trigger(); + + Icon_trigger(const Icon_trigger& from); + Icon_trigger(Icon_trigger&& from) noexcept + : Icon_trigger() { + *this = ::std::move(from); + } + + inline Icon_trigger& operator=(const Icon_trigger& from) { + CopyFrom(from); + return *this; + } + inline Icon_trigger& operator=(Icon_trigger&& from) noexcept { + if (GetArena() == from.GetArena()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const Icon_trigger& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const Icon_trigger* internal_default_instance() { + return reinterpret_cast( + &_Icon_trigger_default_instance_); + } + static constexpr int kIndexInFileMessages = + 6; + + friend void swap(Icon_trigger& a, Icon_trigger& b) { + a.Swap(&b); + } + inline void Swap(Icon_trigger* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Icon_trigger* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline Icon_trigger* New() const final { + return CreateMaybeMessage(nullptr); + } + + Icon_trigger* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const Icon_trigger& from); + void MergeFrom(const Icon_trigger& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Icon_trigger* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "Proto_Node.Icon.trigger"; + } + protected: + explicit Icon_trigger(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); + return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + typedef Icon_trigger_guid guid; + + typedef Icon_trigger_reset_behavior reset_behavior; + static constexpr reset_behavior always_visible = + Icon_trigger_reset_behavior_always_visible; + static constexpr reset_behavior map_change = + Icon_trigger_reset_behavior_map_change; + static constexpr reset_behavior daily_reset = + Icon_trigger_reset_behavior_daily_reset; + static constexpr reset_behavior never = + Icon_trigger_reset_behavior_never; + static constexpr reset_behavior timer = + Icon_trigger_reset_behavior_timer; + static constexpr reset_behavior map_reset = + Icon_trigger_reset_behavior_map_reset; + static constexpr reset_behavior instance_change = + Icon_trigger_reset_behavior_instance_change; + static constexpr reset_behavior daily_reset_per_character = + Icon_trigger_reset_behavior_daily_reset_per_character; + static constexpr reset_behavior weekly_reset = + Icon_trigger_reset_behavior_weekly_reset; + static inline bool reset_behavior_IsValid(int value) { + return Icon_trigger_reset_behavior_IsValid(value); + } + static constexpr reset_behavior reset_behavior_MIN = + Icon_trigger_reset_behavior_reset_behavior_MIN; + static constexpr reset_behavior reset_behavior_MAX = + Icon_trigger_reset_behavior_reset_behavior_MAX; + static constexpr int reset_behavior_ARRAYSIZE = + Icon_trigger_reset_behavior_reset_behavior_ARRAYSIZE; + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* + reset_behavior_descriptor() { + return Icon_trigger_reset_behavior_descriptor(); + } + template + static inline const std::string& reset_behavior_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function reset_behavior_Name."); + return Icon_trigger_reset_behavior_Name(enum_t_value); + } + static inline bool reset_behavior_Parse(const std::string& name, + reset_behavior* value) { + return Icon_trigger_reset_behavior_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kActionCopyClipboardFieldNumber = 5, + kActionCopyMessageFieldNumber = 6, + kActionInfoMessageFieldNumber = 8, + kActionHideCategoryFieldNumber = 12, + kActionShowCategoryFieldNumber = 13, + kActionToggleCategoryFieldNumber = 14, + kBounceDelayFieldNumber = 2, + kBounceDurationFieldNumber = 3, + kBounceHeightFieldNumber = 4, + kAutoTriggerFieldNumber = 1, + kHasCountdownFieldNumber = 7, + kInvertDisplayFieldNumber = 9, + kResetLengthFieldNumber = 10, + kRangeFieldNumber = 11, + }; + // string action_copy_clipboard = 5; + void clear_action_copy_clipboard(); + const std::string& action_copy_clipboard() const; + void set_action_copy_clipboard(const std::string& value); + void set_action_copy_clipboard(std::string&& value); + void set_action_copy_clipboard(const char* value); + void set_action_copy_clipboard(const char* value, size_t size); + std::string* mutable_action_copy_clipboard(); + std::string* release_action_copy_clipboard(); + void set_allocated_action_copy_clipboard(std::string* action_copy_clipboard); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_action_copy_clipboard(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_action_copy_clipboard( + std::string* action_copy_clipboard); + private: + const std::string& _internal_action_copy_clipboard() const; + void _internal_set_action_copy_clipboard(const std::string& value); + std::string* _internal_mutable_action_copy_clipboard(); + public: + + // string action_copy_message = 6; + void clear_action_copy_message(); + const std::string& action_copy_message() const; + void set_action_copy_message(const std::string& value); + void set_action_copy_message(std::string&& value); + void set_action_copy_message(const char* value); + void set_action_copy_message(const char* value, size_t size); + std::string* mutable_action_copy_message(); + std::string* release_action_copy_message(); + void set_allocated_action_copy_message(std::string* action_copy_message); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_action_copy_message(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_action_copy_message( + std::string* action_copy_message); + private: + const std::string& _internal_action_copy_message() const; + void _internal_set_action_copy_message(const std::string& value); + std::string* _internal_mutable_action_copy_message(); + public: + + // string action_info_message = 8; + void clear_action_info_message(); + const std::string& action_info_message() const; + void set_action_info_message(const std::string& value); + void set_action_info_message(std::string&& value); + void set_action_info_message(const char* value); + void set_action_info_message(const char* value, size_t size); + std::string* mutable_action_info_message(); + std::string* release_action_info_message(); + void set_allocated_action_info_message(std::string* action_info_message); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_action_info_message(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_action_info_message( + std::string* action_info_message); + private: + const std::string& _internal_action_info_message() const; + void _internal_set_action_info_message(const std::string& value); + std::string* _internal_mutable_action_info_message(); + public: + + // .Proto_Node.Category action_hide_category = 12; + bool has_action_hide_category() const; + private: + bool _internal_has_action_hide_category() const; + public: + void clear_action_hide_category(); + const ::Proto_Node::Category& action_hide_category() const; + ::Proto_Node::Category* release_action_hide_category(); + ::Proto_Node::Category* mutable_action_hide_category(); + void set_allocated_action_hide_category(::Proto_Node::Category* action_hide_category); + private: + const ::Proto_Node::Category& _internal_action_hide_category() const; + ::Proto_Node::Category* _internal_mutable_action_hide_category(); + public: + void unsafe_arena_set_allocated_action_hide_category( + ::Proto_Node::Category* action_hide_category); + ::Proto_Node::Category* unsafe_arena_release_action_hide_category(); + + // .Proto_Node.Category action_show_category = 13; + bool has_action_show_category() const; + private: + bool _internal_has_action_show_category() const; + public: + void clear_action_show_category(); + const ::Proto_Node::Category& action_show_category() const; + ::Proto_Node::Category* release_action_show_category(); + ::Proto_Node::Category* mutable_action_show_category(); + void set_allocated_action_show_category(::Proto_Node::Category* action_show_category); + private: + const ::Proto_Node::Category& _internal_action_show_category() const; + ::Proto_Node::Category* _internal_mutable_action_show_category(); + public: + void unsafe_arena_set_allocated_action_show_category( + ::Proto_Node::Category* action_show_category); + ::Proto_Node::Category* unsafe_arena_release_action_show_category(); + + // .Proto_Node.Category action_toggle_category = 14; + bool has_action_toggle_category() const; + private: + bool _internal_has_action_toggle_category() const; + public: + void clear_action_toggle_category(); + const ::Proto_Node::Category& action_toggle_category() const; + ::Proto_Node::Category* release_action_toggle_category(); + ::Proto_Node::Category* mutable_action_toggle_category(); + void set_allocated_action_toggle_category(::Proto_Node::Category* action_toggle_category); + private: + const ::Proto_Node::Category& _internal_action_toggle_category() const; + ::Proto_Node::Category* _internal_mutable_action_toggle_category(); + public: + void unsafe_arena_set_allocated_action_toggle_category( + ::Proto_Node::Category* action_toggle_category); + ::Proto_Node::Category* unsafe_arena_release_action_toggle_category(); + + // float bounce_delay = 2; + void clear_bounce_delay(); + float bounce_delay() const; + void set_bounce_delay(float value); + private: + float _internal_bounce_delay() const; + void _internal_set_bounce_delay(float value); + public: + + // float bounce_duration = 3; + void clear_bounce_duration(); + float bounce_duration() const; + void set_bounce_duration(float value); + private: + float _internal_bounce_duration() const; + void _internal_set_bounce_duration(float value); + public: + + // float bounce_height = 4; + void clear_bounce_height(); + float bounce_height() const; + void set_bounce_height(float value); + private: + float _internal_bounce_height() const; + void _internal_set_bounce_height(float value); + public: + + // bool auto_trigger = 1; + void clear_auto_trigger(); + bool auto_trigger() const; + void set_auto_trigger(bool value); + private: + bool _internal_auto_trigger() const; + void _internal_set_auto_trigger(bool value); + public: + + // bool has_countdown = 7; + void clear_has_countdown(); + bool has_countdown() const; + void set_has_countdown(bool value); + private: + bool _internal_has_countdown() const; + void _internal_set_has_countdown(bool value); + public: + + // bool invert_display = 9; + void clear_invert_display(); + bool invert_display() const; + void set_invert_display(bool value); + private: + bool _internal_invert_display() const; + void _internal_set_invert_display(bool value); + public: + + // float reset_length = 10; + void clear_reset_length(); + float reset_length() const; + void set_reset_length(float value); + private: + float _internal_reset_length() const; + void _internal_set_reset_length(float value); + public: + + // float range = 11; + void clear_range(); + float range() const; + void set_range(float value); + private: + float _internal_range() const; + void _internal_set_range(float value); + public: + + // @@protoc_insertion_point(class_scope:Proto_Node.Icon.trigger) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr action_copy_clipboard_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr action_copy_message_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr action_info_message_; + ::Proto_Node::Category* action_hide_category_; + ::Proto_Node::Category* action_show_category_; + ::Proto_Node::Category* action_toggle_category_; + float bounce_delay_; + float bounce_duration_; + float bounce_height_; + bool auto_trigger_; + bool has_countdown_; + bool invert_display_; + float reset_length_; + float range_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_node_2eproto; +}; +// ------------------------------------------------------------------- + +class Icon PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Proto_Node.Icon) */ { + public: + inline Icon() : Icon(nullptr) {}; + virtual ~Icon(); + + Icon(const Icon& from); + Icon(Icon&& from) noexcept + : Icon() { + *this = ::std::move(from); + } + + inline Icon& operator=(const Icon& from) { + CopyFrom(from); + return *this; + } + inline Icon& operator=(Icon&& from) noexcept { + if (GetArena() == from.GetArena()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const Icon& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const Icon* internal_default_instance() { + return reinterpret_cast( + &_Icon_default_instance_); + } + static constexpr int kIndexInFileMessages = + 7; + + friend void swap(Icon& a, Icon& b) { + a.Swap(&b); + } + inline void Swap(Icon* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Icon* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline Icon* New() const final { + return CreateMaybeMessage(nullptr); + } + + Icon* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const Icon& from); + void MergeFrom(const Icon& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Icon* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "Proto_Node.Icon"; + } + protected: + explicit Icon(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); + return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + typedef Icon_texture texture; + typedef Icon_position position; + typedef Icon_euler_rotation euler_rotation; + typedef Icon_trigger trigger; + + // accessors ------------------------------------------------------- + + enum : int { + kBhdraftScheduleFieldNumber = 17, + kTipDescriptionFieldNumber = 19, + kTipNameFieldNumber = 20, + kAchievementBitFieldNumber = 1, + kAchievementIdFieldNumber = 2, + kAlphaFieldNumber = 3, + kDistanceFadeEndFieldNumber = 5, + kDistanceFadeStartFieldNumber = 6, + kHeightOffsetFieldNumber = 7, + kTentativeScaleFieldNumber = 8, + kMapDisplaySizeFieldNumber = 9, + kMapIdFieldNumber = 10, + kMaximumSizeOnScreenFieldNumber = 11, + kCanFadeFieldNumber = 4, + kTentativeRenderIngameFieldNumber = 13, + kTentativeRenderOnMapFieldNumber = 14, + kTentativeRenderOnMinimapFieldNumber = 15, + kMinimumSizeOnScreenFieldNumber = 12, + kScaleOnMapWithZoomFieldNumber = 16, + kBhdraftScheduleDurationFieldNumber = 18, + }; + // string bhdraft__schedule = 17; + void clear_bhdraft__schedule(); + const std::string& bhdraft__schedule() const; + void set_bhdraft__schedule(const std::string& value); + void set_bhdraft__schedule(std::string&& value); + void set_bhdraft__schedule(const char* value); + void set_bhdraft__schedule(const char* value, size_t size); + std::string* mutable_bhdraft__schedule(); + std::string* release_bhdraft__schedule(); + void set_allocated_bhdraft__schedule(std::string* bhdraft__schedule); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_bhdraft__schedule(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_bhdraft__schedule( + std::string* bhdraft__schedule); + private: + const std::string& _internal_bhdraft__schedule() const; + void _internal_set_bhdraft__schedule(const std::string& value); + std::string* _internal_mutable_bhdraft__schedule(); + public: + + // string tip_description = 19; + void clear_tip_description(); + const std::string& tip_description() const; + void set_tip_description(const std::string& value); + void set_tip_description(std::string&& value); + void set_tip_description(const char* value); + void set_tip_description(const char* value, size_t size); + std::string* mutable_tip_description(); + std::string* release_tip_description(); + void set_allocated_tip_description(std::string* tip_description); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_tip_description(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_tip_description( + std::string* tip_description); + private: + const std::string& _internal_tip_description() const; + void _internal_set_tip_description(const std::string& value); + std::string* _internal_mutable_tip_description(); + public: + + // string tip_name = 20; + void clear_tip_name(); + const std::string& tip_name() const; + void set_tip_name(const std::string& value); + void set_tip_name(std::string&& value); + void set_tip_name(const char* value); + void set_tip_name(const char* value, size_t size); + std::string* mutable_tip_name(); + std::string* release_tip_name(); + void set_allocated_tip_name(std::string* tip_name); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_tip_name(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_tip_name( + std::string* tip_name); + private: + const std::string& _internal_tip_name() const; + void _internal_set_tip_name(const std::string& value); + std::string* _internal_mutable_tip_name(); + public: + + // fixed32 achievement_bit = 1; + void clear_achievement_bit(); + ::PROTOBUF_NAMESPACE_ID::uint32 achievement_bit() const; + void set_achievement_bit(::PROTOBUF_NAMESPACE_ID::uint32 value); + private: + ::PROTOBUF_NAMESPACE_ID::uint32 _internal_achievement_bit() const; + void _internal_set_achievement_bit(::PROTOBUF_NAMESPACE_ID::uint32 value); + public: + + // int32 achievement_id = 2; + void clear_achievement_id(); + ::PROTOBUF_NAMESPACE_ID::int32 achievement_id() const; + void set_achievement_id(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_achievement_id() const; + void _internal_set_achievement_id(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // float alpha = 3; + void clear_alpha(); + float alpha() const; + void set_alpha(float value); + private: + float _internal_alpha() const; + void _internal_set_alpha(float value); + public: + + // float distance_fade_end = 5; + void clear_distance_fade_end(); + float distance_fade_end() const; + void set_distance_fade_end(float value); + private: + float _internal_distance_fade_end() const; + void _internal_set_distance_fade_end(float value); + public: + + // float distance_fade_start = 6; + void clear_distance_fade_start(); + float distance_fade_start() const; + void set_distance_fade_start(float value); + private: + float _internal_distance_fade_start() const; + void _internal_set_distance_fade_start(float value); + public: + + // float height_offset = 7; + void clear_height_offset(); + float height_offset() const; + void set_height_offset(float value); + private: + float _internal_height_offset() const; + void _internal_set_height_offset(float value); + public: + + // float __tentative__scale = 8; + void clear___tentative__scale(); + float __tentative__scale() const; + void set___tentative__scale(float value); + private: + float _internal___tentative__scale() const; + void _internal_set___tentative__scale(float value); + public: + + // int32 map_display_size = 9; + void clear_map_display_size(); + ::PROTOBUF_NAMESPACE_ID::int32 map_display_size() const; + void set_map_display_size(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_map_display_size() const; + void _internal_set_map_display_size(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // int32 map_id = 10; + void clear_map_id(); + ::PROTOBUF_NAMESPACE_ID::int32 map_id() const; + void set_map_id(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_map_id() const; + void _internal_set_map_id(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // int32 maximum_size_on_screen = 11; + void clear_maximum_size_on_screen(); + ::PROTOBUF_NAMESPACE_ID::int32 maximum_size_on_screen() const; + void set_maximum_size_on_screen(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_maximum_size_on_screen() const; + void _internal_set_maximum_size_on_screen(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // bool can_fade = 4; + void clear_can_fade(); + bool can_fade() const; + void set_can_fade(bool value); + private: + bool _internal_can_fade() const; + void _internal_set_can_fade(bool value); + public: + + // bool __tentative__render_ingame = 13; + void clear___tentative__render_ingame(); + bool __tentative__render_ingame() const; + void set___tentative__render_ingame(bool value); + private: + bool _internal___tentative__render_ingame() const; + void _internal_set___tentative__render_ingame(bool value); + public: + + // bool __tentative__render_on_map = 14; + void clear___tentative__render_on_map(); + bool __tentative__render_on_map() const; + void set___tentative__render_on_map(bool value); + private: + bool _internal___tentative__render_on_map() const; + void _internal_set___tentative__render_on_map(bool value); + public: + + // bool __tentative__render_on_minimap = 15; + void clear___tentative__render_on_minimap(); + bool __tentative__render_on_minimap() const; + void set___tentative__render_on_minimap(bool value); + private: + bool _internal___tentative__render_on_minimap() const; + void _internal_set___tentative__render_on_minimap(bool value); + public: + + // int32 minimum_size_on_screen = 12; + void clear_minimum_size_on_screen(); + ::PROTOBUF_NAMESPACE_ID::int32 minimum_size_on_screen() const; + void set_minimum_size_on_screen(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_minimum_size_on_screen() const; + void _internal_set_minimum_size_on_screen(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // bool scale_on_map_with_zoom = 16; + void clear_scale_on_map_with_zoom(); + bool scale_on_map_with_zoom() const; + void set_scale_on_map_with_zoom(bool value); + private: + bool _internal_scale_on_map_with_zoom() const; + void _internal_set_scale_on_map_with_zoom(bool value); + public: + + // float bhdraft__schedule_duration = 18; + void clear_bhdraft__schedule_duration(); + float bhdraft__schedule_duration() const; + void set_bhdraft__schedule_duration(float value); + private: + float _internal_bhdraft__schedule_duration() const; + void _internal_set_bhdraft__schedule_duration(float value); + public: + + // @@protoc_insertion_point(class_scope:Proto_Node.Icon) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr bhdraft__schedule_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr tip_description_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr tip_name_; + ::PROTOBUF_NAMESPACE_ID::uint32 achievement_bit_; + ::PROTOBUF_NAMESPACE_ID::int32 achievement_id_; + float alpha_; + float distance_fade_end_; + float distance_fade_start_; + float height_offset_; + float __tentative__scale_; + ::PROTOBUF_NAMESPACE_ID::int32 map_display_size_; + ::PROTOBUF_NAMESPACE_ID::int32 map_id_; + ::PROTOBUF_NAMESPACE_ID::int32 maximum_size_on_screen_; + bool can_fade_; + bool __tentative__render_ingame_; + bool __tentative__render_on_map_; + bool __tentative__render_on_minimap_; + ::PROTOBUF_NAMESPACE_ID::int32 minimum_size_on_screen_; + bool scale_on_map_with_zoom_; + float bhdraft__schedule_duration_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_node_2eproto; +}; +// ------------------------------------------------------------------- + +class Trail_color PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Proto_Node.Trail.color) */ { + public: + inline Trail_color() : Trail_color(nullptr) {}; + virtual ~Trail_color(); + + Trail_color(const Trail_color& from); + Trail_color(Trail_color&& from) noexcept + : Trail_color() { + *this = ::std::move(from); + } + + inline Trail_color& operator=(const Trail_color& from) { + CopyFrom(from); + return *this; + } + inline Trail_color& operator=(Trail_color&& from) noexcept { + if (GetArena() == from.GetArena()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const Trail_color& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const Trail_color* internal_default_instance() { + return reinterpret_cast( + &_Trail_color_default_instance_); + } + static constexpr int kIndexInFileMessages = + 8; + + friend void swap(Trail_color& a, Trail_color& b) { + a.Swap(&b); + } + inline void Swap(Trail_color* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Trail_color* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline Trail_color* New() const final { + return CreateMaybeMessage(nullptr); + } + + Trail_color* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const Trail_color& from); + void MergeFrom(const Trail_color& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Trail_color* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "Proto_Node.Trail.color"; + } + protected: + explicit Trail_color(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); + return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kHexFieldNumber = 1, + }; + // string hex = 1; + void clear_hex(); + const std::string& hex() const; + void set_hex(const std::string& value); + void set_hex(std::string&& value); + void set_hex(const char* value); + void set_hex(const char* value, size_t size); + std::string* mutable_hex(); + std::string* release_hex(); + void set_allocated_hex(std::string* hex); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_hex(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_hex( + std::string* hex); + private: + const std::string& _internal_hex() const; + void _internal_set_hex(const std::string& value); + std::string* _internal_mutable_hex(); + public: + + // @@protoc_insertion_point(class_scope:Proto_Node.Trail.color) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr hex_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_node_2eproto; +}; +// ------------------------------------------------------------------- + +class Trail_festival_filter PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Proto_Node.Trail.festival_filter) */ { + public: + inline Trail_festival_filter() : Trail_festival_filter(nullptr) {}; + virtual ~Trail_festival_filter(); + + Trail_festival_filter(const Trail_festival_filter& from); + Trail_festival_filter(Trail_festival_filter&& from) noexcept + : Trail_festival_filter() { + *this = ::std::move(from); + } + + inline Trail_festival_filter& operator=(const Trail_festival_filter& from) { + CopyFrom(from); + return *this; + } + inline Trail_festival_filter& operator=(Trail_festival_filter&& from) noexcept { + if (GetArena() == from.GetArena()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const Trail_festival_filter& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const Trail_festival_filter* internal_default_instance() { + return reinterpret_cast( + &_Trail_festival_filter_default_instance_); + } + static constexpr int kIndexInFileMessages = + 9; + + friend void swap(Trail_festival_filter& a, Trail_festival_filter& b) { + a.Swap(&b); + } + inline void Swap(Trail_festival_filter* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Trail_festival_filter* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline Trail_festival_filter* New() const final { + return CreateMaybeMessage(nullptr); + } + + Trail_festival_filter* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const Trail_festival_filter& from); + void MergeFrom(const Trail_festival_filter& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Trail_festival_filter* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "Proto_Node.Trail.festival_filter"; + } + protected: + explicit Trail_festival_filter(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); + return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kDragonbashFieldNumber = 1, + kFestivalOfTheFourWindsFieldNumber = 2, + kHalloweenFieldNumber = 3, + kLunarNewYearFieldNumber = 4, + kSuperAdventureFestivalFieldNumber = 5, + kWintersdayFieldNumber = 6, + kNoneFieldNumber = 7, + }; + // bool dragonbash = 1; + void clear_dragonbash(); + bool dragonbash() const; + void set_dragonbash(bool value); + private: + bool _internal_dragonbash() const; + void _internal_set_dragonbash(bool value); + public: + + // bool festival_of_the_four_winds = 2; + void clear_festival_of_the_four_winds(); + bool festival_of_the_four_winds() const; + void set_festival_of_the_four_winds(bool value); + private: + bool _internal_festival_of_the_four_winds() const; + void _internal_set_festival_of_the_four_winds(bool value); + public: + + // bool halloween = 3; + void clear_halloween(); + bool halloween() const; + void set_halloween(bool value); + private: + bool _internal_halloween() const; + void _internal_set_halloween(bool value); + public: + + // bool lunar_new_year = 4; + void clear_lunar_new_year(); + bool lunar_new_year() const; + void set_lunar_new_year(bool value); + private: + bool _internal_lunar_new_year() const; + void _internal_set_lunar_new_year(bool value); + public: + + // bool super_adventure_festival = 5; + void clear_super_adventure_festival(); + bool super_adventure_festival() const; + void set_super_adventure_festival(bool value); + private: + bool _internal_super_adventure_festival() const; + void _internal_set_super_adventure_festival(bool value); + public: + + // bool wintersday = 6; + void clear_wintersday(); + bool wintersday() const; + void set_wintersday(bool value); + private: + bool _internal_wintersday() const; + void _internal_set_wintersday(bool value); + public: + + // bool none = 7; + void clear_none(); + bool none() const; + void set_none(bool value); + private: + bool _internal_none() const; + void _internal_set_none(bool value); + public: + + // @@protoc_insertion_point(class_scope:Proto_Node.Trail.festival_filter) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + bool dragonbash_; + bool festival_of_the_four_winds_; + bool halloween_; + bool lunar_new_year_; + bool super_adventure_festival_; + bool wintersday_; + bool none_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_node_2eproto; +}; +// ------------------------------------------------------------------- + +class Trail_guid PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Proto_Node.Trail.guid) */ { + public: + inline Trail_guid() : Trail_guid(nullptr) {}; + virtual ~Trail_guid(); + + Trail_guid(const Trail_guid& from); + Trail_guid(Trail_guid&& from) noexcept + : Trail_guid() { + *this = ::std::move(from); + } + + inline Trail_guid& operator=(const Trail_guid& from) { + CopyFrom(from); + return *this; + } + inline Trail_guid& operator=(Trail_guid&& from) noexcept { + if (GetArena() == from.GetArena()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const Trail_guid& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const Trail_guid* internal_default_instance() { + return reinterpret_cast( + &_Trail_guid_default_instance_); + } + static constexpr int kIndexInFileMessages = + 10; + + friend void swap(Trail_guid& a, Trail_guid& b) { + a.Swap(&b); + } + inline void Swap(Trail_guid* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Trail_guid* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline Trail_guid* New() const final { + return CreateMaybeMessage(nullptr); + } + + Trail_guid* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const Trail_guid& from); + void MergeFrom(const Trail_guid& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Trail_guid* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "Proto_Node.Trail.guid"; + } + protected: + explicit Trail_guid(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); + return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kGuidFieldNumber = 1, + }; + // int32 guid = 1; + void clear_guid(); + ::PROTOBUF_NAMESPACE_ID::int32 guid() const; + void set_guid(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_guid() const; + void _internal_set_guid(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // @@protoc_insertion_point(class_scope:Proto_Node.Trail.guid) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::int32 guid_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_node_2eproto; +}; +// ------------------------------------------------------------------- + +class Trail_map_type_filter PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Proto_Node.Trail.map_type_filter) */ { + public: + inline Trail_map_type_filter() : Trail_map_type_filter(nullptr) {}; + virtual ~Trail_map_type_filter(); + + Trail_map_type_filter(const Trail_map_type_filter& from); + Trail_map_type_filter(Trail_map_type_filter&& from) noexcept + : Trail_map_type_filter() { + *this = ::std::move(from); + } + + inline Trail_map_type_filter& operator=(const Trail_map_type_filter& from) { + CopyFrom(from); + return *this; + } + inline Trail_map_type_filter& operator=(Trail_map_type_filter&& from) noexcept { + if (GetArena() == from.GetArena()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const Trail_map_type_filter& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const Trail_map_type_filter* internal_default_instance() { + return reinterpret_cast( + &_Trail_map_type_filter_default_instance_); + } + static constexpr int kIndexInFileMessages = + 11; + + friend void swap(Trail_map_type_filter& a, Trail_map_type_filter& b) { + a.Swap(&b); + } + inline void Swap(Trail_map_type_filter* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Trail_map_type_filter* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline Trail_map_type_filter* New() const final { + return CreateMaybeMessage(nullptr); + } + + Trail_map_type_filter* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const Trail_map_type_filter& from); + void MergeFrom(const Trail_map_type_filter& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Trail_map_type_filter* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "Proto_Node.Trail.map_type_filter"; + } + protected: + explicit Trail_map_type_filter(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); + return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kUnknownMapFieldNumber = 1, + kRedirectMapFieldNumber = 2, + kCharacterCreateMapFieldNumber = 3, + kPvpMapFieldNumber = 4, + kGvgMapFieldNumber = 5, + kInstanceMapFieldNumber = 6, + kPublicMapFieldNumber = 7, + kTournamentMapFieldNumber = 8, + kTutorialMapFieldNumber = 9, + kUserTournamentMapFieldNumber = 10, + kCenterMapFieldNumber = 11, + kEternalBattlegroundsMapFieldNumber = 12, + kBluehomeMapFieldNumber = 13, + kBlueBorderlandsMapFieldNumber = 14, + kGreenHomeMapFieldNumber = 15, + kGreenBorderlandsMapFieldNumber = 16, + kRedHomeMapFieldNumber = 17, + kRedBorderlandsMapFieldNumber = 18, + kFortunesValeMapFieldNumber = 19, + kJumpPuzzleMapFieldNumber = 20, + kObsidianSanctumMapFieldNumber = 21, + kEdgeOfTheMistsMapFieldNumber = 22, + kPublicMiniMapFieldNumber = 23, + kWvwLoungeMapFieldNumber = 24, + }; + // bool unknown_map = 1; + void clear_unknown_map(); + bool unknown_map() const; + void set_unknown_map(bool value); + private: + bool _internal_unknown_map() const; + void _internal_set_unknown_map(bool value); + public: + + // bool redirect_map = 2; + void clear_redirect_map(); + bool redirect_map() const; + void set_redirect_map(bool value); + private: + bool _internal_redirect_map() const; + void _internal_set_redirect_map(bool value); + public: + + // bool character_create_map = 3; + void clear_character_create_map(); + bool character_create_map() const; + void set_character_create_map(bool value); + private: + bool _internal_character_create_map() const; + void _internal_set_character_create_map(bool value); + public: + + // bool pvp_map = 4; + void clear_pvp_map(); + bool pvp_map() const; + void set_pvp_map(bool value); + private: + bool _internal_pvp_map() const; + void _internal_set_pvp_map(bool value); + public: + + // bool gvg_map = 5; + void clear_gvg_map(); + bool gvg_map() const; + void set_gvg_map(bool value); + private: + bool _internal_gvg_map() const; + void _internal_set_gvg_map(bool value); + public: + + // bool instance_map = 6; + void clear_instance_map(); + bool instance_map() const; + void set_instance_map(bool value); + private: + bool _internal_instance_map() const; + void _internal_set_instance_map(bool value); + public: + + // bool public_map = 7; + void clear_public_map(); + bool public_map() const; + void set_public_map(bool value); + private: + bool _internal_public_map() const; + void _internal_set_public_map(bool value); + public: + + // bool tournament_map = 8; + void clear_tournament_map(); + bool tournament_map() const; + void set_tournament_map(bool value); + private: + bool _internal_tournament_map() const; + void _internal_set_tournament_map(bool value); + public: + + // bool tutorial_map = 9; + void clear_tutorial_map(); + bool tutorial_map() const; + void set_tutorial_map(bool value); + private: + bool _internal_tutorial_map() const; + void _internal_set_tutorial_map(bool value); + public: + + // bool user_tournament_map = 10; + void clear_user_tournament_map(); + bool user_tournament_map() const; + void set_user_tournament_map(bool value); + private: + bool _internal_user_tournament_map() const; + void _internal_set_user_tournament_map(bool value); + public: + + // bool center_map = 11; + void clear_center_map(); + bool center_map() const; + void set_center_map(bool value); + private: + bool _internal_center_map() const; + void _internal_set_center_map(bool value); + public: + + // bool eternal_battlegrounds_map = 12; + void clear_eternal_battlegrounds_map(); + bool eternal_battlegrounds_map() const; + void set_eternal_battlegrounds_map(bool value); + private: + bool _internal_eternal_battlegrounds_map() const; + void _internal_set_eternal_battlegrounds_map(bool value); + public: + + // bool bluehome_map = 13; + void clear_bluehome_map(); + bool bluehome_map() const; + void set_bluehome_map(bool value); + private: + bool _internal_bluehome_map() const; + void _internal_set_bluehome_map(bool value); + public: + + // bool blue_borderlands_map = 14; + void clear_blue_borderlands_map(); + bool blue_borderlands_map() const; + void set_blue_borderlands_map(bool value); + private: + bool _internal_blue_borderlands_map() const; + void _internal_set_blue_borderlands_map(bool value); + public: + + // bool green_home_map = 15; + void clear_green_home_map(); + bool green_home_map() const; + void set_green_home_map(bool value); + private: + bool _internal_green_home_map() const; + void _internal_set_green_home_map(bool value); + public: + + // bool green_borderlands_map = 16; + void clear_green_borderlands_map(); + bool green_borderlands_map() const; + void set_green_borderlands_map(bool value); + private: + bool _internal_green_borderlands_map() const; + void _internal_set_green_borderlands_map(bool value); + public: + + // bool red_home_map = 17; + void clear_red_home_map(); + bool red_home_map() const; + void set_red_home_map(bool value); + private: + bool _internal_red_home_map() const; + void _internal_set_red_home_map(bool value); + public: + + // bool red_borderlands_map = 18; + void clear_red_borderlands_map(); + bool red_borderlands_map() const; + void set_red_borderlands_map(bool value); + private: + bool _internal_red_borderlands_map() const; + void _internal_set_red_borderlands_map(bool value); + public: + + // bool fortunes_vale_map = 19; + void clear_fortunes_vale_map(); + bool fortunes_vale_map() const; + void set_fortunes_vale_map(bool value); + private: + bool _internal_fortunes_vale_map() const; + void _internal_set_fortunes_vale_map(bool value); + public: + + // bool jump_puzzle_map = 20; + void clear_jump_puzzle_map(); + bool jump_puzzle_map() const; + void set_jump_puzzle_map(bool value); + private: + bool _internal_jump_puzzle_map() const; + void _internal_set_jump_puzzle_map(bool value); + public: + + // bool obsidian_sanctum_map = 21; + void clear_obsidian_sanctum_map(); + bool obsidian_sanctum_map() const; + void set_obsidian_sanctum_map(bool value); + private: + bool _internal_obsidian_sanctum_map() const; + void _internal_set_obsidian_sanctum_map(bool value); + public: + + // bool edge_of_the_mists_map = 22; + void clear_edge_of_the_mists_map(); + bool edge_of_the_mists_map() const; + void set_edge_of_the_mists_map(bool value); + private: + bool _internal_edge_of_the_mists_map() const; + void _internal_set_edge_of_the_mists_map(bool value); + public: + + // bool public_mini_map = 23; + void clear_public_mini_map(); + bool public_mini_map() const; + void set_public_mini_map(bool value); + private: + bool _internal_public_mini_map() const; + void _internal_set_public_mini_map(bool value); + public: + + // bool wvw_lounge_map = 24; + void clear_wvw_lounge_map(); + bool wvw_lounge_map() const; + void set_wvw_lounge_map(bool value); + private: + bool _internal_wvw_lounge_map() const; + void _internal_set_wvw_lounge_map(bool value); + public: + + // @@protoc_insertion_point(class_scope:Proto_Node.Trail.map_type_filter) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + bool unknown_map_; + bool redirect_map_; + bool character_create_map_; + bool pvp_map_; + bool gvg_map_; + bool instance_map_; + bool public_map_; + bool tournament_map_; + bool tutorial_map_; + bool user_tournament_map_; + bool center_map_; + bool eternal_battlegrounds_map_; + bool bluehome_map_; + bool blue_borderlands_map_; + bool green_home_map_; + bool green_borderlands_map_; + bool red_home_map_; + bool red_borderlands_map_; + bool fortunes_vale_map_; + bool jump_puzzle_map_; + bool obsidian_sanctum_map_; + bool edge_of_the_mists_map_; + bool public_mini_map_; + bool wvw_lounge_map_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_node_2eproto; +}; +// ------------------------------------------------------------------- + +class Trail_mount_filter PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Proto_Node.Trail.mount_filter) */ { + public: + inline Trail_mount_filter() : Trail_mount_filter(nullptr) {}; + virtual ~Trail_mount_filter(); + + Trail_mount_filter(const Trail_mount_filter& from); + Trail_mount_filter(Trail_mount_filter&& from) noexcept + : Trail_mount_filter() { + *this = ::std::move(from); + } + + inline Trail_mount_filter& operator=(const Trail_mount_filter& from) { + CopyFrom(from); + return *this; + } + inline Trail_mount_filter& operator=(Trail_mount_filter&& from) noexcept { + if (GetArena() == from.GetArena()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const Trail_mount_filter& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const Trail_mount_filter* internal_default_instance() { + return reinterpret_cast( + &_Trail_mount_filter_default_instance_); + } + static constexpr int kIndexInFileMessages = + 12; + + friend void swap(Trail_mount_filter& a, Trail_mount_filter& b) { + a.Swap(&b); + } + inline void Swap(Trail_mount_filter* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Trail_mount_filter* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline Trail_mount_filter* New() const final { + return CreateMaybeMessage(nullptr); + } + + Trail_mount_filter* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const Trail_mount_filter& from); + void MergeFrom(const Trail_mount_filter& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Trail_mount_filter* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "Proto_Node.Trail.mount_filter"; + } + protected: + explicit Trail_mount_filter(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); + return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kRaptorFieldNumber = 1, + kSpringerFieldNumber = 2, + kSkimmerFieldNumber = 3, + kJackalFieldNumber = 4, + kGriffonFieldNumber = 5, + kRollerBeetleFieldNumber = 6, + kWarclawFieldNumber = 7, + kSkyscaleeFieldNumber = 8, + kSkiffFieldNumber = 9, + kSeigeTurtleFieldNumber = 10, + }; + // bool raptor = 1; + void clear_raptor(); + bool raptor() const; + void set_raptor(bool value); + private: + bool _internal_raptor() const; + void _internal_set_raptor(bool value); + public: + + // bool springer = 2; + void clear_springer(); + bool springer() const; + void set_springer(bool value); + private: + bool _internal_springer() const; + void _internal_set_springer(bool value); + public: + + // bool skimmer = 3; + void clear_skimmer(); + bool skimmer() const; + void set_skimmer(bool value); + private: + bool _internal_skimmer() const; + void _internal_set_skimmer(bool value); + public: + + // bool jackal = 4; + void clear_jackal(); + bool jackal() const; + void set_jackal(bool value); + private: + bool _internal_jackal() const; + void _internal_set_jackal(bool value); + public: + + // bool griffon = 5; + void clear_griffon(); + bool griffon() const; + void set_griffon(bool value); + private: + bool _internal_griffon() const; + void _internal_set_griffon(bool value); + public: + + // bool roller_beetle = 6; + void clear_roller_beetle(); + bool roller_beetle() const; + void set_roller_beetle(bool value); + private: + bool _internal_roller_beetle() const; + void _internal_set_roller_beetle(bool value); + public: + + // bool warclaw = 7; + void clear_warclaw(); + bool warclaw() const; + void set_warclaw(bool value); + private: + bool _internal_warclaw() const; + void _internal_set_warclaw(bool value); + public: + + // bool skyscalee = 8; + void clear_skyscalee(); + bool skyscalee() const; + void set_skyscalee(bool value); + private: + bool _internal_skyscalee() const; + void _internal_set_skyscalee(bool value); + public: + + // bool skiff = 9; + void clear_skiff(); + bool skiff() const; + void set_skiff(bool value); + private: + bool _internal_skiff() const; + void _internal_set_skiff(bool value); + public: + + // bool seige_turtle = 10; + void clear_seige_turtle(); + bool seige_turtle() const; + void set_seige_turtle(bool value); + private: + bool _internal_seige_turtle() const; + void _internal_set_seige_turtle(bool value); + public: + + // @@protoc_insertion_point(class_scope:Proto_Node.Trail.mount_filter) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + bool raptor_; + bool springer_; + bool skimmer_; + bool jackal_; + bool griffon_; + bool roller_beetle_; + bool warclaw_; + bool skyscalee_; + bool skiff_; + bool seige_turtle_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_node_2eproto; +}; +// ------------------------------------------------------------------- + +class Trail_profession_filter PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Proto_Node.Trail.profession_filter) */ { + public: + inline Trail_profession_filter() : Trail_profession_filter(nullptr) {}; + virtual ~Trail_profession_filter(); + + Trail_profession_filter(const Trail_profession_filter& from); + Trail_profession_filter(Trail_profession_filter&& from) noexcept + : Trail_profession_filter() { + *this = ::std::move(from); + } + + inline Trail_profession_filter& operator=(const Trail_profession_filter& from) { + CopyFrom(from); + return *this; + } + inline Trail_profession_filter& operator=(Trail_profession_filter&& from) noexcept { + if (GetArena() == from.GetArena()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const Trail_profession_filter& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const Trail_profession_filter* internal_default_instance() { + return reinterpret_cast( + &_Trail_profession_filter_default_instance_); + } + static constexpr int kIndexInFileMessages = + 13; + + friend void swap(Trail_profession_filter& a, Trail_profession_filter& b) { + a.Swap(&b); + } + inline void Swap(Trail_profession_filter* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Trail_profession_filter* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline Trail_profession_filter* New() const final { + return CreateMaybeMessage(nullptr); + } + + Trail_profession_filter* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const Trail_profession_filter& from); + void MergeFrom(const Trail_profession_filter& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Trail_profession_filter* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "Proto_Node.Trail.profession_filter"; + } + protected: + explicit Trail_profession_filter(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); + return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kGuardianFieldNumber = 1, + kWarriorFieldNumber = 2, + kEngineerFieldNumber = 3, + kRangerFieldNumber = 4, + kThiefFieldNumber = 5, + kElementalistFieldNumber = 6, + kMesmerFieldNumber = 7, + kNecromancerFieldNumber = 8, + kRevenantntFieldNumber = 9, + }; + // bool guardian = 1; + void clear_guardian(); + bool guardian() const; + void set_guardian(bool value); + private: + bool _internal_guardian() const; + void _internal_set_guardian(bool value); + public: + + // bool warrior = 2; + void clear_warrior(); + bool warrior() const; + void set_warrior(bool value); + private: + bool _internal_warrior() const; + void _internal_set_warrior(bool value); + public: + + // bool engineer = 3; + void clear_engineer(); + bool engineer() const; + void set_engineer(bool value); + private: + bool _internal_engineer() const; + void _internal_set_engineer(bool value); + public: + + // bool ranger = 4; + void clear_ranger(); + bool ranger() const; + void set_ranger(bool value); + private: + bool _internal_ranger() const; + void _internal_set_ranger(bool value); + public: + + // bool thief = 5; + void clear_thief(); + bool thief() const; + void set_thief(bool value); + private: + bool _internal_thief() const; + void _internal_set_thief(bool value); + public: + + // bool elementalist = 6; + void clear_elementalist(); + bool elementalist() const; + void set_elementalist(bool value); + private: + bool _internal_elementalist() const; + void _internal_set_elementalist(bool value); + public: + + // bool mesmer = 7; + void clear_mesmer(); + bool mesmer() const; + void set_mesmer(bool value); + private: + bool _internal_mesmer() const; + void _internal_set_mesmer(bool value); + public: + + // bool necromancer = 8; + void clear_necromancer(); + bool necromancer() const; + void set_necromancer(bool value); + private: + bool _internal_necromancer() const; + void _internal_set_necromancer(bool value); + public: + + // bool revenantnt = 9; + void clear_revenantnt(); + bool revenantnt() const; + void set_revenantnt(bool value); + private: + bool _internal_revenantnt() const; + void _internal_set_revenantnt(bool value); + public: + + // @@protoc_insertion_point(class_scope:Proto_Node.Trail.profession_filter) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + bool guardian_; + bool warrior_; + bool engineer_; + bool ranger_; + bool thief_; + bool elementalist_; + bool mesmer_; + bool necromancer_; + bool revenantnt_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_node_2eproto; +}; +// ------------------------------------------------------------------- + +class Trail_specialization_filter PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Proto_Node.Trail.specialization_filter) */ { + public: + inline Trail_specialization_filter() : Trail_specialization_filter(nullptr) {}; + virtual ~Trail_specialization_filter(); + + Trail_specialization_filter(const Trail_specialization_filter& from); + Trail_specialization_filter(Trail_specialization_filter&& from) noexcept + : Trail_specialization_filter() { + *this = ::std::move(from); + } + + inline Trail_specialization_filter& operator=(const Trail_specialization_filter& from) { + CopyFrom(from); + return *this; + } + inline Trail_specialization_filter& operator=(Trail_specialization_filter&& from) noexcept { + if (GetArena() == from.GetArena()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const Trail_specialization_filter& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const Trail_specialization_filter* internal_default_instance() { + return reinterpret_cast( + &_Trail_specialization_filter_default_instance_); + } + static constexpr int kIndexInFileMessages = + 14; + + friend void swap(Trail_specialization_filter& a, Trail_specialization_filter& b) { + a.Swap(&b); + } + inline void Swap(Trail_specialization_filter* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Trail_specialization_filter* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline Trail_specialization_filter* New() const final { + return CreateMaybeMessage(nullptr); + } + + Trail_specialization_filter* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const Trail_specialization_filter& from); + void MergeFrom(const Trail_specialization_filter& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Trail_specialization_filter* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "Proto_Node.Trail.specialization_filter"; + } + protected: + explicit Trail_specialization_filter(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); + return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kRangerWildernessSurvivalFieldNumber = 33, + kRevenantCorruptionFieldNumber = 14, + kRevenantDevastationFieldNumber = 15, + kRevenantInvocationFieldNumber = 3, + kMesmerDuelingFieldNumber = 1, + kMesmerIllusionsFieldNumber = 24, + kMesmerInspirationFieldNumber = 23, + kNecromancerBloodMagicFieldNumber = 19, + kWarriorDefenseFieldNumber = 22, + kWarriorDisciplineFieldNumber = 51, + kWarriorStrengthFieldNumber = 4, + kWarriorTacticsFieldNumber = 11, + kRangerBeastmasteryFieldNumber = 32, + kRangerMarksmanshipFieldNumber = 8, + kRangerNatureMagicFieldNumber = 25, + kRangerSkirmishingFieldNumber = 30, + kNecromancerReaperFieldNumber = 34, + kRangerDruidFieldNumber = 5, + kRevenantHeraldFieldNumber = 52, + kThiefDaredevilFieldNumber = 7, + kEngineerToolsFieldNumber = 21, + kGuardianHonorFieldNumber = 49, + kGuardianRadianceFieldNumber = 16, + kGuardianValorFieldNumber = 13, + kRevenantRetributionFieldNumber = 9, + kRevenantSalvationFieldNumber = 12, + kThiefAcrobaticsFieldNumber = 54, + kThiefCriticalStrikesFieldNumber = 35, + kElementalistArcaneFieldNumber = 37, + kElementalistEarthFieldNumber = 26, + kElementalistFireFieldNumber = 31, + kElementalistWaterFieldNumber = 17, + kEngineerAlchemyFieldNumber = 29, + kEngineerExplosivesFieldNumber = 6, + kEngineerFirearmsFieldNumber = 38, + kEngineerInventionsFieldNumber = 47, + kThiefDeadlyArtsFieldNumber = 28, + kThiefShadowArtsFieldNumber = 20, + kThiefTrickeryFieldNumber = 44, + kWarriorArmsFieldNumber = 36, + kGuardianVirtuesFieldNumber = 46, + kGuardianZealFieldNumber = 42, + kMesmerChaosFieldNumber = 45, + kMesmerDominationFieldNumber = 10, + kNecromancerCursesFieldNumber = 39, + kNecromancerDeathMagicFieldNumber = 2, + kNecromancerSoulReapingFieldNumber = 50, + kNecromancerSpiteFieldNumber = 53, + kElementalistTempestFieldNumber = 48, + kEngineerScrapperFieldNumber = 43, + kGuardianDragonhunterFieldNumber = 27, + kMesmerChronomancerFieldNumber = 40, + kWarriorBerserkerFieldNumber = 18, + kElementalistWeaverFieldNumber = 56, + kEngineerHolosmithFieldNumber = 57, + kGuardianFirebrandFieldNumber = 62, + kMesmerMirageFieldNumber = 59, + kNecromancerScourgeFieldNumber = 60, + kRangerSoulbeastFieldNumber = 55, + kRevenantRenegadeFieldNumber = 63, + kRevenantVindicatorFieldNumber = 69, + kThiefSpecterFieldNumber = 71, + kWarriorBladeswornFieldNumber = 68, + kElementalistAirFieldNumber = 41, + kThiefDeadeyeFieldNumber = 58, + kWarriorSpellbreakerFieldNumber = 61, + kElmentalistCatalystFieldNumber = 67, + kEngineerMechanistFieldNumber = 70, + kGuardianWillbenderFieldNumber = 65, + kMesmerVirtuosoFieldNumber = 66, + kNecromancerHarbingerFieldNumber = 64, + kRangerUntamedFieldNumber = 72, + }; + // bool ranger_wilderness_survival = 33; + void clear_ranger_wilderness_survival(); + bool ranger_wilderness_survival() const; + void set_ranger_wilderness_survival(bool value); + private: + bool _internal_ranger_wilderness_survival() const; + void _internal_set_ranger_wilderness_survival(bool value); + public: + + // bool revenant_corruption = 14; + void clear_revenant_corruption(); + bool revenant_corruption() const; + void set_revenant_corruption(bool value); + private: + bool _internal_revenant_corruption() const; + void _internal_set_revenant_corruption(bool value); + public: + + // bool revenant_devastation = 15; + void clear_revenant_devastation(); + bool revenant_devastation() const; + void set_revenant_devastation(bool value); + private: + bool _internal_revenant_devastation() const; + void _internal_set_revenant_devastation(bool value); + public: + + // bool revenant_invocation = 3; + void clear_revenant_invocation(); + bool revenant_invocation() const; + void set_revenant_invocation(bool value); + private: + bool _internal_revenant_invocation() const; + void _internal_set_revenant_invocation(bool value); + public: + + // bool mesmer_dueling = 1; + void clear_mesmer_dueling(); + bool mesmer_dueling() const; + void set_mesmer_dueling(bool value); + private: + bool _internal_mesmer_dueling() const; + void _internal_set_mesmer_dueling(bool value); + public: + + // bool mesmer_illusions = 24; + void clear_mesmer_illusions(); + bool mesmer_illusions() const; + void set_mesmer_illusions(bool value); + private: + bool _internal_mesmer_illusions() const; + void _internal_set_mesmer_illusions(bool value); + public: + + // bool mesmer_inspiration = 23; + void clear_mesmer_inspiration(); + bool mesmer_inspiration() const; + void set_mesmer_inspiration(bool value); + private: + bool _internal_mesmer_inspiration() const; + void _internal_set_mesmer_inspiration(bool value); + public: + + // bool necromancer_blood_magic = 19; + void clear_necromancer_blood_magic(); + bool necromancer_blood_magic() const; + void set_necromancer_blood_magic(bool value); + private: + bool _internal_necromancer_blood_magic() const; + void _internal_set_necromancer_blood_magic(bool value); + public: + + // bool warrior_defense = 22; + void clear_warrior_defense(); + bool warrior_defense() const; + void set_warrior_defense(bool value); + private: + bool _internal_warrior_defense() const; + void _internal_set_warrior_defense(bool value); + public: + + // bool warrior_discipline = 51; + void clear_warrior_discipline(); + bool warrior_discipline() const; + void set_warrior_discipline(bool value); + private: + bool _internal_warrior_discipline() const; + void _internal_set_warrior_discipline(bool value); + public: + + // bool warrior_strength = 4; + void clear_warrior_strength(); + bool warrior_strength() const; + void set_warrior_strength(bool value); + private: + bool _internal_warrior_strength() const; + void _internal_set_warrior_strength(bool value); + public: + + // bool warrior_tactics = 11; + void clear_warrior_tactics(); + bool warrior_tactics() const; + void set_warrior_tactics(bool value); + private: + bool _internal_warrior_tactics() const; + void _internal_set_warrior_tactics(bool value); + public: + + // bool ranger_beastmastery = 32; + void clear_ranger_beastmastery(); + bool ranger_beastmastery() const; + void set_ranger_beastmastery(bool value); + private: + bool _internal_ranger_beastmastery() const; + void _internal_set_ranger_beastmastery(bool value); + public: + + // bool ranger_marksmanship = 8; + void clear_ranger_marksmanship(); + bool ranger_marksmanship() const; + void set_ranger_marksmanship(bool value); + private: + bool _internal_ranger_marksmanship() const; + void _internal_set_ranger_marksmanship(bool value); + public: + + // bool ranger_nature_magic = 25; + void clear_ranger_nature_magic(); + bool ranger_nature_magic() const; + void set_ranger_nature_magic(bool value); + private: + bool _internal_ranger_nature_magic() const; + void _internal_set_ranger_nature_magic(bool value); + public: + + // bool ranger_skirmishing = 30; + void clear_ranger_skirmishing(); + bool ranger_skirmishing() const; + void set_ranger_skirmishing(bool value); + private: + bool _internal_ranger_skirmishing() const; + void _internal_set_ranger_skirmishing(bool value); + public: + + // bool necromancer_reaper = 34; + void clear_necromancer_reaper(); + bool necromancer_reaper() const; + void set_necromancer_reaper(bool value); + private: + bool _internal_necromancer_reaper() const; + void _internal_set_necromancer_reaper(bool value); + public: + + // bool ranger_druid = 5; + void clear_ranger_druid(); + bool ranger_druid() const; + void set_ranger_druid(bool value); + private: + bool _internal_ranger_druid() const; + void _internal_set_ranger_druid(bool value); + public: + + // bool revenant_herald = 52; + void clear_revenant_herald(); + bool revenant_herald() const; + void set_revenant_herald(bool value); + private: + bool _internal_revenant_herald() const; + void _internal_set_revenant_herald(bool value); + public: + + // bool thief_daredevil = 7; + void clear_thief_daredevil(); + bool thief_daredevil() const; + void set_thief_daredevil(bool value); + private: + bool _internal_thief_daredevil() const; + void _internal_set_thief_daredevil(bool value); + public: + + // bool engineer_tools = 21; + void clear_engineer_tools(); + bool engineer_tools() const; + void set_engineer_tools(bool value); + private: + bool _internal_engineer_tools() const; + void _internal_set_engineer_tools(bool value); + public: + + // bool guardian_honor = 49; + void clear_guardian_honor(); + bool guardian_honor() const; + void set_guardian_honor(bool value); + private: + bool _internal_guardian_honor() const; + void _internal_set_guardian_honor(bool value); + public: + + // bool guardian_radiance = 16; + void clear_guardian_radiance(); + bool guardian_radiance() const; + void set_guardian_radiance(bool value); + private: + bool _internal_guardian_radiance() const; + void _internal_set_guardian_radiance(bool value); + public: + + // bool guardian_valor = 13; + void clear_guardian_valor(); + bool guardian_valor() const; + void set_guardian_valor(bool value); + private: + bool _internal_guardian_valor() const; + void _internal_set_guardian_valor(bool value); + public: + + // bool revenant_retribution = 9; + void clear_revenant_retribution(); + bool revenant_retribution() const; + void set_revenant_retribution(bool value); + private: + bool _internal_revenant_retribution() const; + void _internal_set_revenant_retribution(bool value); + public: + + // bool revenant_salvation = 12; + void clear_revenant_salvation(); + bool revenant_salvation() const; + void set_revenant_salvation(bool value); + private: + bool _internal_revenant_salvation() const; + void _internal_set_revenant_salvation(bool value); + public: + + // bool thief_acrobatics = 54; + void clear_thief_acrobatics(); + bool thief_acrobatics() const; + void set_thief_acrobatics(bool value); + private: + bool _internal_thief_acrobatics() const; + void _internal_set_thief_acrobatics(bool value); + public: + + // bool thief_critical_strikes = 35; + void clear_thief_critical_strikes(); + bool thief_critical_strikes() const; + void set_thief_critical_strikes(bool value); + private: + bool _internal_thief_critical_strikes() const; + void _internal_set_thief_critical_strikes(bool value); + public: + + // bool elementalist_arcane = 37; + void clear_elementalist_arcane(); + bool elementalist_arcane() const; + void set_elementalist_arcane(bool value); + private: + bool _internal_elementalist_arcane() const; + void _internal_set_elementalist_arcane(bool value); + public: + + // bool elementalist_earth = 26; + void clear_elementalist_earth(); + bool elementalist_earth() const; + void set_elementalist_earth(bool value); + private: + bool _internal_elementalist_earth() const; + void _internal_set_elementalist_earth(bool value); + public: + + // bool elementalist_fire = 31; + void clear_elementalist_fire(); + bool elementalist_fire() const; + void set_elementalist_fire(bool value); + private: + bool _internal_elementalist_fire() const; + void _internal_set_elementalist_fire(bool value); + public: + + // bool elementalist_water = 17; + void clear_elementalist_water(); + bool elementalist_water() const; + void set_elementalist_water(bool value); + private: + bool _internal_elementalist_water() const; + void _internal_set_elementalist_water(bool value); + public: + + // bool engineer_alchemy = 29; + void clear_engineer_alchemy(); + bool engineer_alchemy() const; + void set_engineer_alchemy(bool value); + private: + bool _internal_engineer_alchemy() const; + void _internal_set_engineer_alchemy(bool value); + public: + + // bool engineer_explosives = 6; + void clear_engineer_explosives(); + bool engineer_explosives() const; + void set_engineer_explosives(bool value); + private: + bool _internal_engineer_explosives() const; + void _internal_set_engineer_explosives(bool value); + public: + + // bool engineer_firearms = 38; + void clear_engineer_firearms(); + bool engineer_firearms() const; + void set_engineer_firearms(bool value); + private: + bool _internal_engineer_firearms() const; + void _internal_set_engineer_firearms(bool value); + public: + + // bool engineer_inventions = 47; + void clear_engineer_inventions(); + bool engineer_inventions() const; + void set_engineer_inventions(bool value); + private: + bool _internal_engineer_inventions() const; + void _internal_set_engineer_inventions(bool value); + public: + + // bool thief_deadly_arts = 28; + void clear_thief_deadly_arts(); + bool thief_deadly_arts() const; + void set_thief_deadly_arts(bool value); + private: + bool _internal_thief_deadly_arts() const; + void _internal_set_thief_deadly_arts(bool value); + public: + + // bool thief_shadow_arts = 20; + void clear_thief_shadow_arts(); + bool thief_shadow_arts() const; + void set_thief_shadow_arts(bool value); + private: + bool _internal_thief_shadow_arts() const; + void _internal_set_thief_shadow_arts(bool value); + public: + + // bool thief_trickery = 44; + void clear_thief_trickery(); + bool thief_trickery() const; + void set_thief_trickery(bool value); + private: + bool _internal_thief_trickery() const; + void _internal_set_thief_trickery(bool value); + public: + + // bool warrior_arms = 36; + void clear_warrior_arms(); + bool warrior_arms() const; + void set_warrior_arms(bool value); + private: + bool _internal_warrior_arms() const; + void _internal_set_warrior_arms(bool value); + public: + + // bool guardian_virtues = 46; + void clear_guardian_virtues(); + bool guardian_virtues() const; + void set_guardian_virtues(bool value); + private: + bool _internal_guardian_virtues() const; + void _internal_set_guardian_virtues(bool value); + public: + + // bool guardian_zeal = 42; + void clear_guardian_zeal(); + bool guardian_zeal() const; + void set_guardian_zeal(bool value); + private: + bool _internal_guardian_zeal() const; + void _internal_set_guardian_zeal(bool value); + public: + + // bool mesmer_chaos = 45; + void clear_mesmer_chaos(); + bool mesmer_chaos() const; + void set_mesmer_chaos(bool value); + private: + bool _internal_mesmer_chaos() const; + void _internal_set_mesmer_chaos(bool value); + public: + + // bool mesmer_domination = 10; + void clear_mesmer_domination(); + bool mesmer_domination() const; + void set_mesmer_domination(bool value); + private: + bool _internal_mesmer_domination() const; + void _internal_set_mesmer_domination(bool value); + public: + + // bool necromancer_curses = 39; + void clear_necromancer_curses(); + bool necromancer_curses() const; + void set_necromancer_curses(bool value); + private: + bool _internal_necromancer_curses() const; + void _internal_set_necromancer_curses(bool value); + public: + + // bool necromancer_death_magic = 2; + void clear_necromancer_death_magic(); + bool necromancer_death_magic() const; + void set_necromancer_death_magic(bool value); + private: + bool _internal_necromancer_death_magic() const; + void _internal_set_necromancer_death_magic(bool value); + public: + + // bool necromancer_soul_reaping = 50; + void clear_necromancer_soul_reaping(); + bool necromancer_soul_reaping() const; + void set_necromancer_soul_reaping(bool value); + private: + bool _internal_necromancer_soul_reaping() const; + void _internal_set_necromancer_soul_reaping(bool value); + public: + + // bool necromancer_spite = 53; + void clear_necromancer_spite(); + bool necromancer_spite() const; + void set_necromancer_spite(bool value); + private: + bool _internal_necromancer_spite() const; + void _internal_set_necromancer_spite(bool value); + public: + + // bool elementalist_tempest = 48; + void clear_elementalist_tempest(); + bool elementalist_tempest() const; + void set_elementalist_tempest(bool value); + private: + bool _internal_elementalist_tempest() const; + void _internal_set_elementalist_tempest(bool value); + public: + + // bool engineer_scrapper = 43; + void clear_engineer_scrapper(); + bool engineer_scrapper() const; + void set_engineer_scrapper(bool value); + private: + bool _internal_engineer_scrapper() const; + void _internal_set_engineer_scrapper(bool value); + public: + + // bool guardian_dragonhunter = 27; + void clear_guardian_dragonhunter(); + bool guardian_dragonhunter() const; + void set_guardian_dragonhunter(bool value); + private: + bool _internal_guardian_dragonhunter() const; + void _internal_set_guardian_dragonhunter(bool value); + public: + + // bool mesmer_chronomancer = 40; + void clear_mesmer_chronomancer(); + bool mesmer_chronomancer() const; + void set_mesmer_chronomancer(bool value); + private: + bool _internal_mesmer_chronomancer() const; + void _internal_set_mesmer_chronomancer(bool value); + public: + + // bool warrior_berserker = 18; + void clear_warrior_berserker(); + bool warrior_berserker() const; + void set_warrior_berserker(bool value); + private: + bool _internal_warrior_berserker() const; + void _internal_set_warrior_berserker(bool value); + public: + + // bool elementalist_weaver = 56; + void clear_elementalist_weaver(); + bool elementalist_weaver() const; + void set_elementalist_weaver(bool value); + private: + bool _internal_elementalist_weaver() const; + void _internal_set_elementalist_weaver(bool value); + public: + + // bool engineer_holosmith = 57; + void clear_engineer_holosmith(); + bool engineer_holosmith() const; + void set_engineer_holosmith(bool value); + private: + bool _internal_engineer_holosmith() const; + void _internal_set_engineer_holosmith(bool value); + public: + + // bool guardian_firebrand = 62; + void clear_guardian_firebrand(); + bool guardian_firebrand() const; + void set_guardian_firebrand(bool value); + private: + bool _internal_guardian_firebrand() const; + void _internal_set_guardian_firebrand(bool value); + public: + + // bool mesmer_mirage = 59; + void clear_mesmer_mirage(); + bool mesmer_mirage() const; + void set_mesmer_mirage(bool value); + private: + bool _internal_mesmer_mirage() const; + void _internal_set_mesmer_mirage(bool value); + public: + + // bool necromancer_scourge = 60; + void clear_necromancer_scourge(); + bool necromancer_scourge() const; + void set_necromancer_scourge(bool value); + private: + bool _internal_necromancer_scourge() const; + void _internal_set_necromancer_scourge(bool value); + public: + + // bool ranger_soulbeast = 55; + void clear_ranger_soulbeast(); + bool ranger_soulbeast() const; + void set_ranger_soulbeast(bool value); + private: + bool _internal_ranger_soulbeast() const; + void _internal_set_ranger_soulbeast(bool value); + public: + + // bool revenant_renegade = 63; + void clear_revenant_renegade(); + bool revenant_renegade() const; + void set_revenant_renegade(bool value); + private: + bool _internal_revenant_renegade() const; + void _internal_set_revenant_renegade(bool value); + public: + + // bool revenant_vindicator = 69; + void clear_revenant_vindicator(); + bool revenant_vindicator() const; + void set_revenant_vindicator(bool value); + private: + bool _internal_revenant_vindicator() const; + void _internal_set_revenant_vindicator(bool value); + public: + + // bool thief_specter = 71; + void clear_thief_specter(); + bool thief_specter() const; + void set_thief_specter(bool value); + private: + bool _internal_thief_specter() const; + void _internal_set_thief_specter(bool value); + public: + + // bool warrior_bladesworn = 68; + void clear_warrior_bladesworn(); + bool warrior_bladesworn() const; + void set_warrior_bladesworn(bool value); + private: + bool _internal_warrior_bladesworn() const; + void _internal_set_warrior_bladesworn(bool value); + public: + + // bool elementalist_air = 41; + void clear_elementalist_air(); + bool elementalist_air() const; + void set_elementalist_air(bool value); + private: + bool _internal_elementalist_air() const; + void _internal_set_elementalist_air(bool value); + public: + + // bool thief_deadeye = 58; + void clear_thief_deadeye(); + bool thief_deadeye() const; + void set_thief_deadeye(bool value); + private: + bool _internal_thief_deadeye() const; + void _internal_set_thief_deadeye(bool value); + public: + + // bool warrior_spellbreaker = 61; + void clear_warrior_spellbreaker(); + bool warrior_spellbreaker() const; + void set_warrior_spellbreaker(bool value); + private: + bool _internal_warrior_spellbreaker() const; + void _internal_set_warrior_spellbreaker(bool value); + public: + + // bool elmentalist_catalyst = 67; + void clear_elmentalist_catalyst(); + bool elmentalist_catalyst() const; + void set_elmentalist_catalyst(bool value); + private: + bool _internal_elmentalist_catalyst() const; + void _internal_set_elmentalist_catalyst(bool value); + public: + + // bool engineer_mechanist = 70; + void clear_engineer_mechanist(); + bool engineer_mechanist() const; + void set_engineer_mechanist(bool value); + private: + bool _internal_engineer_mechanist() const; + void _internal_set_engineer_mechanist(bool value); + public: + + // bool guardian_willbender = 65; + void clear_guardian_willbender(); + bool guardian_willbender() const; + void set_guardian_willbender(bool value); + private: + bool _internal_guardian_willbender() const; + void _internal_set_guardian_willbender(bool value); + public: + + // bool mesmer_virtuoso = 66; + void clear_mesmer_virtuoso(); + bool mesmer_virtuoso() const; + void set_mesmer_virtuoso(bool value); + private: + bool _internal_mesmer_virtuoso() const; + void _internal_set_mesmer_virtuoso(bool value); + public: + + // bool necromancer_harbinger = 64; + void clear_necromancer_harbinger(); + bool necromancer_harbinger() const; + void set_necromancer_harbinger(bool value); + private: + bool _internal_necromancer_harbinger() const; + void _internal_set_necromancer_harbinger(bool value); + public: + + // bool ranger_untamed = 72; + void clear_ranger_untamed(); + bool ranger_untamed() const; + void set_ranger_untamed(bool value); + private: + bool _internal_ranger_untamed() const; + void _internal_set_ranger_untamed(bool value); + public: + + // @@protoc_insertion_point(class_scope:Proto_Node.Trail.specialization_filter) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + bool ranger_wilderness_survival_; + bool revenant_corruption_; + bool revenant_devastation_; + bool revenant_invocation_; + bool mesmer_dueling_; + bool mesmer_illusions_; + bool mesmer_inspiration_; + bool necromancer_blood_magic_; + bool warrior_defense_; + bool warrior_discipline_; + bool warrior_strength_; + bool warrior_tactics_; + bool ranger_beastmastery_; + bool ranger_marksmanship_; + bool ranger_nature_magic_; + bool ranger_skirmishing_; + bool necromancer_reaper_; + bool ranger_druid_; + bool revenant_herald_; + bool thief_daredevil_; + bool engineer_tools_; + bool guardian_honor_; + bool guardian_radiance_; + bool guardian_valor_; + bool revenant_retribution_; + bool revenant_salvation_; + bool thief_acrobatics_; + bool thief_critical_strikes_; + bool elementalist_arcane_; + bool elementalist_earth_; + bool elementalist_fire_; + bool elementalist_water_; + bool engineer_alchemy_; + bool engineer_explosives_; + bool engineer_firearms_; + bool engineer_inventions_; + bool thief_deadly_arts_; + bool thief_shadow_arts_; + bool thief_trickery_; + bool warrior_arms_; + bool guardian_virtues_; + bool guardian_zeal_; + bool mesmer_chaos_; + bool mesmer_domination_; + bool necromancer_curses_; + bool necromancer_death_magic_; + bool necromancer_soul_reaping_; + bool necromancer_spite_; + bool elementalist_tempest_; + bool engineer_scrapper_; + bool guardian_dragonhunter_; + bool mesmer_chronomancer_; + bool warrior_berserker_; + bool elementalist_weaver_; + bool engineer_holosmith_; + bool guardian_firebrand_; + bool mesmer_mirage_; + bool necromancer_scourge_; + bool ranger_soulbeast_; + bool revenant_renegade_; + bool revenant_vindicator_; + bool thief_specter_; + bool warrior_bladesworn_; + bool elementalist_air_; + bool thief_deadeye_; + bool warrior_spellbreaker_; + bool elmentalist_catalyst_; + bool engineer_mechanist_; + bool guardian_willbender_; + bool mesmer_virtuoso_; + bool necromancer_harbinger_; + bool ranger_untamed_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_node_2eproto; +}; +// ------------------------------------------------------------------- + +class Trail_species_filter PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Proto_Node.Trail.species_filter) */ { + public: + inline Trail_species_filter() : Trail_species_filter(nullptr) {}; + virtual ~Trail_species_filter(); + + Trail_species_filter(const Trail_species_filter& from); + Trail_species_filter(Trail_species_filter&& from) noexcept + : Trail_species_filter() { + *this = ::std::move(from); + } + + inline Trail_species_filter& operator=(const Trail_species_filter& from) { + CopyFrom(from); + return *this; + } + inline Trail_species_filter& operator=(Trail_species_filter&& from) noexcept { + if (GetArena() == from.GetArena()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const Trail_species_filter& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const Trail_species_filter* internal_default_instance() { + return reinterpret_cast( + &_Trail_species_filter_default_instance_); + } + static constexpr int kIndexInFileMessages = + 15; + + friend void swap(Trail_species_filter& a, Trail_species_filter& b) { + a.Swap(&b); + } + inline void Swap(Trail_species_filter* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Trail_species_filter* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline Trail_species_filter* New() const final { + return CreateMaybeMessage(nullptr); + } + + Trail_species_filter* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const Trail_species_filter& from); + void MergeFrom(const Trail_species_filter& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Trail_species_filter* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "Proto_Node.Trail.species_filter"; + } + protected: + explicit Trail_species_filter(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); + return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kAsuraFieldNumber = 1, + kCharrFieldNumber = 2, + kHumanFieldNumber = 3, + kNornFieldNumber = 4, + kSylvariFieldNumber = 5, + }; + // bool asura = 1; + void clear_asura(); + bool asura() const; + void set_asura(bool value); + private: + bool _internal_asura() const; + void _internal_set_asura(bool value); + public: + + // bool charr = 2; + void clear_charr(); + bool charr() const; + void set_charr(bool value); + private: + bool _internal_charr() const; + void _internal_set_charr(bool value); + public: + + // bool human = 3; + void clear_human(); + bool human() const; + void set_human(bool value); + private: + bool _internal_human() const; + void _internal_set_human(bool value); + public: + + // bool norn = 4; + void clear_norn(); + bool norn() const; + void set_norn(bool value); + private: + bool _internal_norn() const; + void _internal_set_norn(bool value); + public: + + // bool sylvari = 5; + void clear_sylvari(); + bool sylvari() const; + void set_sylvari(bool value); + private: + bool _internal_sylvari() const; + void _internal_set_sylvari(bool value); + public: + + // @@protoc_insertion_point(class_scope:Proto_Node.Trail.species_filter) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + bool asura_; + bool charr_; + bool human_; + bool norn_; + bool sylvari_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_node_2eproto; +}; +// ------------------------------------------------------------------- + +class Trail_texture PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Proto_Node.Trail.texture) */ { + public: + inline Trail_texture() : Trail_texture(nullptr) {}; + virtual ~Trail_texture(); + + Trail_texture(const Trail_texture& from); + Trail_texture(Trail_texture&& from) noexcept + : Trail_texture() { + *this = ::std::move(from); + } + + inline Trail_texture& operator=(const Trail_texture& from) { + CopyFrom(from); + return *this; + } + inline Trail_texture& operator=(Trail_texture&& from) noexcept { + if (GetArena() == from.GetArena()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const Trail_texture& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const Trail_texture* internal_default_instance() { + return reinterpret_cast( + &_Trail_texture_default_instance_); + } + static constexpr int kIndexInFileMessages = + 16; + + friend void swap(Trail_texture& a, Trail_texture& b) { + a.Swap(&b); + } + inline void Swap(Trail_texture* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Trail_texture* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline Trail_texture* New() const final { + return CreateMaybeMessage(nullptr); + } + + Trail_texture* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const Trail_texture& from); + void MergeFrom(const Trail_texture& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Trail_texture* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "Proto_Node.Trail.texture"; + } + protected: + explicit Trail_texture(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); + return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kPathFieldNumber = 1, + kOriginalTokenFieldNumber = 2, + }; + // string path = 1; + void clear_path(); + const std::string& path() const; + void set_path(const std::string& value); + void set_path(std::string&& value); + void set_path(const char* value); + void set_path(const char* value, size_t size); + std::string* mutable_path(); + std::string* release_path(); + void set_allocated_path(std::string* path); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_path(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_path( + std::string* path); + private: + const std::string& _internal_path() const; + void _internal_set_path(const std::string& value); + std::string* _internal_mutable_path(); + public: + + // .google.protobuf.Any original_token = 2; + bool has_original_token() const; + private: + bool _internal_has_original_token() const; + public: + void clear_original_token(); + const PROTOBUF_NAMESPACE_ID::Any& original_token() const; + PROTOBUF_NAMESPACE_ID::Any* release_original_token(); + PROTOBUF_NAMESPACE_ID::Any* mutable_original_token(); + void set_allocated_original_token(PROTOBUF_NAMESPACE_ID::Any* original_token); + private: + const PROTOBUF_NAMESPACE_ID::Any& _internal_original_token() const; + PROTOBUF_NAMESPACE_ID::Any* _internal_mutable_original_token(); + public: + void unsafe_arena_set_allocated_original_token( + PROTOBUF_NAMESPACE_ID::Any* original_token); + PROTOBUF_NAMESPACE_ID::Any* unsafe_arena_release_original_token(); + + // @@protoc_insertion_point(class_scope:Proto_Node.Trail.texture) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr path_; + PROTOBUF_NAMESPACE_ID::Any* original_token_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_node_2eproto; +}; +// ------------------------------------------------------------------- + +class Trail_trail_data PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Proto_Node.Trail.trail_data) */ { + public: + inline Trail_trail_data() : Trail_trail_data(nullptr) {}; + virtual ~Trail_trail_data(); + + Trail_trail_data(const Trail_trail_data& from); + Trail_trail_data(Trail_trail_data&& from) noexcept + : Trail_trail_data() { + *this = ::std::move(from); + } + + inline Trail_trail_data& operator=(const Trail_trail_data& from) { + CopyFrom(from); + return *this; + } + inline Trail_trail_data& operator=(Trail_trail_data&& from) noexcept { + if (GetArena() == from.GetArena()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const Trail_trail_data& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const Trail_trail_data* internal_default_instance() { + return reinterpret_cast( + &_Trail_trail_data_default_instance_); + } + static constexpr int kIndexInFileMessages = + 17; + + friend void swap(Trail_trail_data& a, Trail_trail_data& b) { + a.Swap(&b); + } + inline void Swap(Trail_trail_data* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Trail_trail_data* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline Trail_trail_data* New() const final { + return CreateMaybeMessage(nullptr); + } + + Trail_trail_data* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const Trail_trail_data& from); + void MergeFrom(const Trail_trail_data& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Trail_trail_data* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "Proto_Node.Trail.trail_data"; + } + protected: + explicit Trail_trail_data(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); + return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kTrailDataFieldNumber = 1, + }; + // string trail_data = 1; + void clear_trail_data(); + const std::string& trail_data() const; + void set_trail_data(const std::string& value); + void set_trail_data(std::string&& value); + void set_trail_data(const char* value); + void set_trail_data(const char* value, size_t size); + std::string* mutable_trail_data(); + std::string* release_trail_data(); + void set_allocated_trail_data(std::string* trail_data); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_trail_data(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_trail_data( + std::string* trail_data); + private: + const std::string& _internal_trail_data() const; + void _internal_set_trail_data(const std::string& value); + std::string* _internal_mutable_trail_data(); + public: + + // @@protoc_insertion_point(class_scope:Proto_Node.Trail.trail_data) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr trail_data_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_node_2eproto; +}; +// ------------------------------------------------------------------- + +class Trail PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Proto_Node.Trail) */ { + public: + inline Trail() : Trail(nullptr) {}; + virtual ~Trail(); + + Trail(const Trail& from); + Trail(Trail&& from) noexcept + : Trail() { + *this = ::std::move(from); + } + + inline Trail& operator=(const Trail& from) { + CopyFrom(from); + return *this; + } + inline Trail& operator=(Trail&& from) noexcept { + if (GetArena() == from.GetArena()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const Trail& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const Trail* internal_default_instance() { + return reinterpret_cast( + &_Trail_default_instance_); + } + static constexpr int kIndexInFileMessages = + 18; + + friend void swap(Trail& a, Trail& b) { + a.Swap(&b); + } + inline void Swap(Trail* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Trail* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline Trail* New() const final { + return CreateMaybeMessage(nullptr); + } + + Trail* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const Trail& from); + void MergeFrom(const Trail& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Trail* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "Proto_Node.Trail"; + } + protected: + explicit Trail(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); + return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + typedef Trail_color color; + typedef Trail_festival_filter festival_filter; + typedef Trail_guid guid; + typedef Trail_map_type_filter map_type_filter; + typedef Trail_mount_filter mount_filter; + typedef Trail_profession_filter profession_filter; + typedef Trail_specialization_filter specialization_filter; + typedef Trail_species_filter species_filter; + typedef Trail_texture texture; + typedef Trail_trail_data trail_data; + + typedef Trail_cull_chirality cull_chirality; + static constexpr cull_chirality none = + Trail_cull_chirality_none; + static constexpr cull_chirality clockwise = + Trail_cull_chirality_clockwise; + static constexpr cull_chirality counter_clockwise = + Trail_cull_chirality_counter_clockwise; + static inline bool cull_chirality_IsValid(int value) { + return Trail_cull_chirality_IsValid(value); + } + static constexpr cull_chirality cull_chirality_MIN = + Trail_cull_chirality_cull_chirality_MIN; + static constexpr cull_chirality cull_chirality_MAX = + Trail_cull_chirality_cull_chirality_MAX; + static constexpr int cull_chirality_ARRAYSIZE = + Trail_cull_chirality_cull_chirality_ARRAYSIZE; + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* + cull_chirality_descriptor() { + return Trail_cull_chirality_descriptor(); + } + template + static inline const std::string& cull_chirality_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function cull_chirality_Name."); + return Trail_cull_chirality_Name(enum_t_value); + } + static inline bool cull_chirality_Parse(const std::string& name, + cull_chirality* value) { + return Trail_cull_chirality_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kBhdraftScheduleFieldNumber = 9, + kCategoryFieldNumber = 12, + kAchievementBitFieldNumber = 1, + kAchievementIdFieldNumber = 2, + kAlphaFieldNumber = 3, + kAnimationSpeedFieldNumber = 4, + kDistanceFadeEndFieldNumber = 6, + kCanFadeFieldNumber = 5, + kIsWallFieldNumber = 8, + kDistanceFadeStartFieldNumber = 7, + kBhdraftScheduleDurationFieldNumber = 10, + kScaleFieldNumber = 11, + kMapIdFieldNumber = 13, + }; + // string bhdraft__schedule = 9; + void clear_bhdraft__schedule(); + const std::string& bhdraft__schedule() const; + void set_bhdraft__schedule(const std::string& value); + void set_bhdraft__schedule(std::string&& value); + void set_bhdraft__schedule(const char* value); + void set_bhdraft__schedule(const char* value, size_t size); + std::string* mutable_bhdraft__schedule(); + std::string* release_bhdraft__schedule(); + void set_allocated_bhdraft__schedule(std::string* bhdraft__schedule); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_bhdraft__schedule(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_bhdraft__schedule( + std::string* bhdraft__schedule); + private: + const std::string& _internal_bhdraft__schedule() const; + void _internal_set_bhdraft__schedule(const std::string& value); + std::string* _internal_mutable_bhdraft__schedule(); + public: + + // .Proto_Node.Category category = 12; + bool has_category() const; + private: + bool _internal_has_category() const; + public: + void clear_category(); + const ::Proto_Node::Category& category() const; + ::Proto_Node::Category* release_category(); + ::Proto_Node::Category* mutable_category(); + void set_allocated_category(::Proto_Node::Category* category); + private: + const ::Proto_Node::Category& _internal_category() const; + ::Proto_Node::Category* _internal_mutable_category(); + public: + void unsafe_arena_set_allocated_category( + ::Proto_Node::Category* category); + ::Proto_Node::Category* unsafe_arena_release_category(); + + // fixed32 achievement_bit = 1; + void clear_achievement_bit(); + ::PROTOBUF_NAMESPACE_ID::uint32 achievement_bit() const; + void set_achievement_bit(::PROTOBUF_NAMESPACE_ID::uint32 value); + private: + ::PROTOBUF_NAMESPACE_ID::uint32 _internal_achievement_bit() const; + void _internal_set_achievement_bit(::PROTOBUF_NAMESPACE_ID::uint32 value); + public: + + // int32 achievement_id = 2; + void clear_achievement_id(); + ::PROTOBUF_NAMESPACE_ID::int32 achievement_id() const; + void set_achievement_id(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_achievement_id() const; + void _internal_set_achievement_id(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // float alpha = 3; + void clear_alpha(); + float alpha() const; + void set_alpha(float value); + private: + float _internal_alpha() const; + void _internal_set_alpha(float value); + public: + + // float animation_speed = 4; + void clear_animation_speed(); + float animation_speed() const; + void set_animation_speed(float value); + private: + float _internal_animation_speed() const; + void _internal_set_animation_speed(float value); + public: + + // float distance_fade_end = 6; + void clear_distance_fade_end(); + float distance_fade_end() const; + void set_distance_fade_end(float value); + private: + float _internal_distance_fade_end() const; + void _internal_set_distance_fade_end(float value); + public: + + // bool can_fade = 5; + void clear_can_fade(); + bool can_fade() const; + void set_can_fade(bool value); + private: + bool _internal_can_fade() const; + void _internal_set_can_fade(bool value); + public: + + // bool is_wall = 8; + void clear_is_wall(); + bool is_wall() const; + void set_is_wall(bool value); + private: + bool _internal_is_wall() const; + void _internal_set_is_wall(bool value); + public: + + // float distance_fade_start = 7; + void clear_distance_fade_start(); + float distance_fade_start() const; + void set_distance_fade_start(float value); + private: + float _internal_distance_fade_start() const; + void _internal_set_distance_fade_start(float value); + public: + + // float bhdraft__schedule_duration = 10; + void clear_bhdraft__schedule_duration(); + float bhdraft__schedule_duration() const; + void set_bhdraft__schedule_duration(float value); + private: + float _internal_bhdraft__schedule_duration() const; + void _internal_set_bhdraft__schedule_duration(float value); + public: + + // float scale = 11; + void clear_scale(); + float scale() const; + void set_scale(float value); + private: + float _internal_scale() const; + void _internal_set_scale(float value); + public: + + // int32 map_id = 13; + void clear_map_id(); + ::PROTOBUF_NAMESPACE_ID::int32 map_id() const; + void set_map_id(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_map_id() const; + void _internal_set_map_id(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // @@protoc_insertion_point(class_scope:Proto_Node.Trail) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr bhdraft__schedule_; + ::Proto_Node::Category* category_; + ::PROTOBUF_NAMESPACE_ID::uint32 achievement_bit_; + ::PROTOBUF_NAMESPACE_ID::int32 achievement_id_; + float alpha_; + float animation_speed_; + float distance_fade_end_; + bool can_fade_; + bool is_wall_; + float distance_fade_start_; + float bhdraft__schedule_duration_; + float scale_; + ::PROTOBUF_NAMESPACE_ID::int32 map_id_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_node_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// Category + +// bool default_visibility = 1; +inline void Category::clear_default_visibility() { + default_visibility_ = false; +} +inline bool Category::_internal_default_visibility() const { + return default_visibility_; +} +inline bool Category::default_visibility() const { + // @@protoc_insertion_point(field_get:Proto_Node.Category.default_visibility) + return _internal_default_visibility(); +} +inline void Category::_internal_set_default_visibility(bool value) { + + default_visibility_ = value; +} +inline void Category::set_default_visibility(bool value) { + _internal_set_default_visibility(value); + // @@protoc_insertion_point(field_set:Proto_Node.Category.default_visibility) +} + +// string display_name = 2; +inline void Category::clear_display_name() { + display_name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline const std::string& Category::display_name() const { + // @@protoc_insertion_point(field_get:Proto_Node.Category.display_name) + return _internal_display_name(); +} +inline void Category::set_display_name(const std::string& value) { + _internal_set_display_name(value); + // @@protoc_insertion_point(field_set:Proto_Node.Category.display_name) +} +inline std::string* Category::mutable_display_name() { + // @@protoc_insertion_point(field_mutable:Proto_Node.Category.display_name) + return _internal_mutable_display_name(); +} +inline const std::string& Category::_internal_display_name() const { + return display_name_.Get(); +} +inline void Category::_internal_set_display_name(const std::string& value) { + + display_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void Category::set_display_name(std::string&& value) { + + display_name_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:Proto_Node.Category.display_name) +} +inline void Category::set_display_name(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + display_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:Proto_Node.Category.display_name) +} +inline void Category::set_display_name(const char* value, + size_t size) { + + display_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:Proto_Node.Category.display_name) +} +inline std::string* Category::_internal_mutable_display_name() { + + return display_name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* Category::release_display_name() { + // @@protoc_insertion_point(field_release:Proto_Node.Category.display_name) + return display_name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void Category::set_allocated_display_name(std::string* display_name) { + if (display_name != nullptr) { + + } else { + + } + display_name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), display_name, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:Proto_Node.Category.display_name) +} +inline std::string* Category::unsafe_arena_release_display_name() { + // @@protoc_insertion_point(field_unsafe_arena_release:Proto_Node.Category.display_name) + GOOGLE_DCHECK(GetArena() != nullptr); + + return display_name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void Category::unsafe_arena_set_allocated_display_name( + std::string* display_name) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (display_name != nullptr) { + + } else { + + } + display_name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + display_name, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Proto_Node.Category.display_name) +} + +// bool is_separator = 3; +inline void Category::clear_is_separator() { + is_separator_ = false; +} +inline bool Category::_internal_is_separator() const { + return is_separator_; +} +inline bool Category::is_separator() const { + // @@protoc_insertion_point(field_get:Proto_Node.Category.is_separator) + return _internal_is_separator(); +} +inline void Category::_internal_set_is_separator(bool value) { + + is_separator_ = value; +} +inline void Category::set_is_separator(bool value) { + _internal_set_is_separator(value); + // @@protoc_insertion_point(field_set:Proto_Node.Category.is_separator) +} + +// string name = 4; +inline void Category::clear_name() { + name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline const std::string& Category::name() const { + // @@protoc_insertion_point(field_get:Proto_Node.Category.name) + return _internal_name(); +} +inline void Category::set_name(const std::string& value) { + _internal_set_name(value); + // @@protoc_insertion_point(field_set:Proto_Node.Category.name) +} +inline std::string* Category::mutable_name() { + // @@protoc_insertion_point(field_mutable:Proto_Node.Category.name) + return _internal_mutable_name(); +} +inline const std::string& Category::_internal_name() const { + return name_.Get(); +} +inline void Category::_internal_set_name(const std::string& value) { + + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void Category::set_name(std::string&& value) { + + name_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:Proto_Node.Category.name) +} +inline void Category::set_name(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:Proto_Node.Category.name) +} +inline void Category::set_name(const char* value, + size_t size) { + + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:Proto_Node.Category.name) +} +inline std::string* Category::_internal_mutable_name() { + + return name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* Category::release_name() { + // @@protoc_insertion_point(field_release:Proto_Node.Category.name) + return name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void Category::set_allocated_name(std::string* name) { + if (name != nullptr) { + + } else { + + } + name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:Proto_Node.Category.name) +} +inline std::string* Category::unsafe_arena_release_name() { + // @@protoc_insertion_point(field_unsafe_arena_release:Proto_Node.Category.name) + GOOGLE_DCHECK(GetArena() != nullptr); + + return name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void Category::unsafe_arena_set_allocated_name( + std::string* name) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (name != nullptr) { + + } else { + + } + name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + name, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Proto_Node.Category.name) +} + +// string tooltip_name = 5; +inline void Category::clear_tooltip_name() { + tooltip_name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline const std::string& Category::tooltip_name() const { + // @@protoc_insertion_point(field_get:Proto_Node.Category.tooltip_name) + return _internal_tooltip_name(); +} +inline void Category::set_tooltip_name(const std::string& value) { + _internal_set_tooltip_name(value); + // @@protoc_insertion_point(field_set:Proto_Node.Category.tooltip_name) +} +inline std::string* Category::mutable_tooltip_name() { + // @@protoc_insertion_point(field_mutable:Proto_Node.Category.tooltip_name) + return _internal_mutable_tooltip_name(); +} +inline const std::string& Category::_internal_tooltip_name() const { + return tooltip_name_.Get(); +} +inline void Category::_internal_set_tooltip_name(const std::string& value) { + + tooltip_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void Category::set_tooltip_name(std::string&& value) { + + tooltip_name_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:Proto_Node.Category.tooltip_name) +} +inline void Category::set_tooltip_name(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + tooltip_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:Proto_Node.Category.tooltip_name) +} +inline void Category::set_tooltip_name(const char* value, + size_t size) { + + tooltip_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:Proto_Node.Category.tooltip_name) +} +inline std::string* Category::_internal_mutable_tooltip_name() { + + return tooltip_name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* Category::release_tooltip_name() { + // @@protoc_insertion_point(field_release:Proto_Node.Category.tooltip_name) + return tooltip_name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void Category::set_allocated_tooltip_name(std::string* tooltip_name) { + if (tooltip_name != nullptr) { + + } else { + + } + tooltip_name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), tooltip_name, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:Proto_Node.Category.tooltip_name) +} +inline std::string* Category::unsafe_arena_release_tooltip_name() { + // @@protoc_insertion_point(field_unsafe_arena_release:Proto_Node.Category.tooltip_name) + GOOGLE_DCHECK(GetArena() != nullptr); + + return tooltip_name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void Category::unsafe_arena_set_allocated_tooltip_name( + std::string* tooltip_name) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (tooltip_name != nullptr) { + + } else { + + } + tooltip_name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + tooltip_name, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Proto_Node.Category.tooltip_name) +} + +// map children = 6; +inline int Category::_internal_children_size() const { + return children_.size(); +} +inline int Category::children_size() const { + return _internal_children_size(); +} +inline void Category::clear_children() { + children_.Clear(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Proto_Node::Category >& +Category::_internal_children() const { + return children_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Proto_Node::Category >& +Category::children() const { + // @@protoc_insertion_point(field_map:Proto_Node.Category.children) + return _internal_children(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Proto_Node::Category >* +Category::_internal_mutable_children() { + return children_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Proto_Node::Category >* +Category::mutable_children() { + // @@protoc_insertion_point(field_mutable_map:Proto_Node.Category.children) + return _internal_mutable_children(); +} + +// ------------------------------------------------------------------- + +// Icon_texture + +// string path = 1; +inline void Icon_texture::clear_path() { + path_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline const std::string& Icon_texture::path() const { + // @@protoc_insertion_point(field_get:Proto_Node.Icon.texture.path) + return _internal_path(); +} +inline void Icon_texture::set_path(const std::string& value) { + _internal_set_path(value); + // @@protoc_insertion_point(field_set:Proto_Node.Icon.texture.path) +} +inline std::string* Icon_texture::mutable_path() { + // @@protoc_insertion_point(field_mutable:Proto_Node.Icon.texture.path) + return _internal_mutable_path(); +} +inline const std::string& Icon_texture::_internal_path() const { + return path_.Get(); +} +inline void Icon_texture::_internal_set_path(const std::string& value) { + + path_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void Icon_texture::set_path(std::string&& value) { + + path_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:Proto_Node.Icon.texture.path) +} +inline void Icon_texture::set_path(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + path_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:Proto_Node.Icon.texture.path) +} +inline void Icon_texture::set_path(const char* value, + size_t size) { + + path_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:Proto_Node.Icon.texture.path) +} +inline std::string* Icon_texture::_internal_mutable_path() { + + return path_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* Icon_texture::release_path() { + // @@protoc_insertion_point(field_release:Proto_Node.Icon.texture.path) + return path_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void Icon_texture::set_allocated_path(std::string* path) { + if (path != nullptr) { + + } else { + + } + path_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), path, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:Proto_Node.Icon.texture.path) +} +inline std::string* Icon_texture::unsafe_arena_release_path() { + // @@protoc_insertion_point(field_unsafe_arena_release:Proto_Node.Icon.texture.path) + GOOGLE_DCHECK(GetArena() != nullptr); + + return path_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void Icon_texture::unsafe_arena_set_allocated_path( + std::string* path) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (path != nullptr) { + + } else { + + } + path_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + path, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Proto_Node.Icon.texture.path) +} + +// .google.protobuf.Any original_token = 2; +inline bool Icon_texture::_internal_has_original_token() const { + return this != internal_default_instance() && original_token_ != nullptr; +} +inline bool Icon_texture::has_original_token() const { + return _internal_has_original_token(); +} +inline const PROTOBUF_NAMESPACE_ID::Any& Icon_texture::_internal_original_token() const { + const PROTOBUF_NAMESPACE_ID::Any* p = original_token_; + return p != nullptr ? *p : *reinterpret_cast( + &PROTOBUF_NAMESPACE_ID::_Any_default_instance_); +} +inline const PROTOBUF_NAMESPACE_ID::Any& Icon_texture::original_token() const { + // @@protoc_insertion_point(field_get:Proto_Node.Icon.texture.original_token) + return _internal_original_token(); +} +inline void Icon_texture::unsafe_arena_set_allocated_original_token( + PROTOBUF_NAMESPACE_ID::Any* original_token) { + if (GetArena() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(original_token_); + } + original_token_ = original_token; + if (original_token) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Proto_Node.Icon.texture.original_token) +} +inline PROTOBUF_NAMESPACE_ID::Any* Icon_texture::release_original_token() { + auto temp = unsafe_arena_release_original_token(); + if (GetArena() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + return temp; +} +inline PROTOBUF_NAMESPACE_ID::Any* Icon_texture::unsafe_arena_release_original_token() { + // @@protoc_insertion_point(field_release:Proto_Node.Icon.texture.original_token) + + PROTOBUF_NAMESPACE_ID::Any* temp = original_token_; + original_token_ = nullptr; + return temp; +} +inline PROTOBUF_NAMESPACE_ID::Any* Icon_texture::_internal_mutable_original_token() { + + if (original_token_ == nullptr) { + auto* p = CreateMaybeMessage(GetArena()); + original_token_ = p; + } + return original_token_; +} +inline PROTOBUF_NAMESPACE_ID::Any* Icon_texture::mutable_original_token() { + // @@protoc_insertion_point(field_mutable:Proto_Node.Icon.texture.original_token) + return _internal_mutable_original_token(); +} +inline void Icon_texture::set_allocated_original_token(PROTOBUF_NAMESPACE_ID::Any* original_token) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(original_token_); + } + if (original_token) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(original_token)->GetArena(); + if (message_arena != submessage_arena) { + original_token = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, original_token, submessage_arena); + } + + } else { + + } + original_token_ = original_token; + // @@protoc_insertion_point(field_set_allocated:Proto_Node.Icon.texture.original_token) +} + +// ------------------------------------------------------------------- + +// Icon_position + +// float x = 1; +inline void Icon_position::clear_x() { + x_ = 0; +} +inline float Icon_position::_internal_x() const { + return x_; +} +inline float Icon_position::x() const { + // @@protoc_insertion_point(field_get:Proto_Node.Icon.position.x) + return _internal_x(); +} +inline void Icon_position::_internal_set_x(float value) { + + x_ = value; +} +inline void Icon_position::set_x(float value) { + _internal_set_x(value); + // @@protoc_insertion_point(field_set:Proto_Node.Icon.position.x) +} + +// float y = 2; +inline void Icon_position::clear_y() { + y_ = 0; +} +inline float Icon_position::_internal_y() const { + return y_; +} +inline float Icon_position::y() const { + // @@protoc_insertion_point(field_get:Proto_Node.Icon.position.y) + return _internal_y(); +} +inline void Icon_position::_internal_set_y(float value) { + + y_ = value; +} +inline void Icon_position::set_y(float value) { + _internal_set_y(value); + // @@protoc_insertion_point(field_set:Proto_Node.Icon.position.y) +} + +// float z = 3; +inline void Icon_position::clear_z() { + z_ = 0; +} +inline float Icon_position::_internal_z() const { + return z_; +} +inline float Icon_position::z() const { + // @@protoc_insertion_point(field_get:Proto_Node.Icon.position.z) + return _internal_z(); +} +inline void Icon_position::_internal_set_z(float value) { + + z_ = value; +} +inline void Icon_position::set_z(float value) { + _internal_set_z(value); + // @@protoc_insertion_point(field_set:Proto_Node.Icon.position.z) +} + +// ------------------------------------------------------------------- + +// Icon_euler_rotation + +// float x = 1; +inline void Icon_euler_rotation::clear_x() { + x_ = 0; +} +inline float Icon_euler_rotation::_internal_x() const { + return x_; +} +inline float Icon_euler_rotation::x() const { + // @@protoc_insertion_point(field_get:Proto_Node.Icon.euler_rotation.x) + return _internal_x(); +} +inline void Icon_euler_rotation::_internal_set_x(float value) { + + x_ = value; +} +inline void Icon_euler_rotation::set_x(float value) { + _internal_set_x(value); + // @@protoc_insertion_point(field_set:Proto_Node.Icon.euler_rotation.x) +} + +// float y = 2; +inline void Icon_euler_rotation::clear_y() { + y_ = 0; +} +inline float Icon_euler_rotation::_internal_y() const { + return y_; +} +inline float Icon_euler_rotation::y() const { + // @@protoc_insertion_point(field_get:Proto_Node.Icon.euler_rotation.y) + return _internal_y(); +} +inline void Icon_euler_rotation::_internal_set_y(float value) { + + y_ = value; +} +inline void Icon_euler_rotation::set_y(float value) { + _internal_set_y(value); + // @@protoc_insertion_point(field_set:Proto_Node.Icon.euler_rotation.y) +} + +// float z = 3; +inline void Icon_euler_rotation::clear_z() { + z_ = 0; +} +inline float Icon_euler_rotation::_internal_z() const { + return z_; +} +inline float Icon_euler_rotation::z() const { + // @@protoc_insertion_point(field_get:Proto_Node.Icon.euler_rotation.z) + return _internal_z(); +} +inline void Icon_euler_rotation::_internal_set_z(float value) { + + z_ = value; +} +inline void Icon_euler_rotation::set_z(float value) { + _internal_set_z(value); + // @@protoc_insertion_point(field_set:Proto_Node.Icon.euler_rotation.z) +} + +// ------------------------------------------------------------------- + +// Icon_trigger_guid + +// int32 guid = 1; +inline void Icon_trigger_guid::clear_guid() { + guid_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 Icon_trigger_guid::_internal_guid() const { + return guid_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 Icon_trigger_guid::guid() const { + // @@protoc_insertion_point(field_get:Proto_Node.Icon.trigger.guid.guid) + return _internal_guid(); +} +inline void Icon_trigger_guid::_internal_set_guid(::PROTOBUF_NAMESPACE_ID::int32 value) { + + guid_ = value; +} +inline void Icon_trigger_guid::set_guid(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_guid(value); + // @@protoc_insertion_point(field_set:Proto_Node.Icon.trigger.guid.guid) +} + +// ------------------------------------------------------------------- + +// Icon_trigger + +// bool auto_trigger = 1; +inline void Icon_trigger::clear_auto_trigger() { + auto_trigger_ = false; +} +inline bool Icon_trigger::_internal_auto_trigger() const { + return auto_trigger_; +} +inline bool Icon_trigger::auto_trigger() const { + // @@protoc_insertion_point(field_get:Proto_Node.Icon.trigger.auto_trigger) + return _internal_auto_trigger(); +} +inline void Icon_trigger::_internal_set_auto_trigger(bool value) { + + auto_trigger_ = value; +} +inline void Icon_trigger::set_auto_trigger(bool value) { + _internal_set_auto_trigger(value); + // @@protoc_insertion_point(field_set:Proto_Node.Icon.trigger.auto_trigger) +} + +// float bounce_delay = 2; +inline void Icon_trigger::clear_bounce_delay() { + bounce_delay_ = 0; +} +inline float Icon_trigger::_internal_bounce_delay() const { + return bounce_delay_; +} +inline float Icon_trigger::bounce_delay() const { + // @@protoc_insertion_point(field_get:Proto_Node.Icon.trigger.bounce_delay) + return _internal_bounce_delay(); +} +inline void Icon_trigger::_internal_set_bounce_delay(float value) { + + bounce_delay_ = value; +} +inline void Icon_trigger::set_bounce_delay(float value) { + _internal_set_bounce_delay(value); + // @@protoc_insertion_point(field_set:Proto_Node.Icon.trigger.bounce_delay) +} + +// float bounce_duration = 3; +inline void Icon_trigger::clear_bounce_duration() { + bounce_duration_ = 0; +} +inline float Icon_trigger::_internal_bounce_duration() const { + return bounce_duration_; +} +inline float Icon_trigger::bounce_duration() const { + // @@protoc_insertion_point(field_get:Proto_Node.Icon.trigger.bounce_duration) + return _internal_bounce_duration(); +} +inline void Icon_trigger::_internal_set_bounce_duration(float value) { + + bounce_duration_ = value; +} +inline void Icon_trigger::set_bounce_duration(float value) { + _internal_set_bounce_duration(value); + // @@protoc_insertion_point(field_set:Proto_Node.Icon.trigger.bounce_duration) +} + +// float bounce_height = 4; +inline void Icon_trigger::clear_bounce_height() { + bounce_height_ = 0; +} +inline float Icon_trigger::_internal_bounce_height() const { + return bounce_height_; +} +inline float Icon_trigger::bounce_height() const { + // @@protoc_insertion_point(field_get:Proto_Node.Icon.trigger.bounce_height) + return _internal_bounce_height(); +} +inline void Icon_trigger::_internal_set_bounce_height(float value) { + + bounce_height_ = value; +} +inline void Icon_trigger::set_bounce_height(float value) { + _internal_set_bounce_height(value); + // @@protoc_insertion_point(field_set:Proto_Node.Icon.trigger.bounce_height) +} + +// string action_copy_clipboard = 5; +inline void Icon_trigger::clear_action_copy_clipboard() { + action_copy_clipboard_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline const std::string& Icon_trigger::action_copy_clipboard() const { + // @@protoc_insertion_point(field_get:Proto_Node.Icon.trigger.action_copy_clipboard) + return _internal_action_copy_clipboard(); +} +inline void Icon_trigger::set_action_copy_clipboard(const std::string& value) { + _internal_set_action_copy_clipboard(value); + // @@protoc_insertion_point(field_set:Proto_Node.Icon.trigger.action_copy_clipboard) +} +inline std::string* Icon_trigger::mutable_action_copy_clipboard() { + // @@protoc_insertion_point(field_mutable:Proto_Node.Icon.trigger.action_copy_clipboard) + return _internal_mutable_action_copy_clipboard(); +} +inline const std::string& Icon_trigger::_internal_action_copy_clipboard() const { + return action_copy_clipboard_.Get(); +} +inline void Icon_trigger::_internal_set_action_copy_clipboard(const std::string& value) { + + action_copy_clipboard_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void Icon_trigger::set_action_copy_clipboard(std::string&& value) { + + action_copy_clipboard_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:Proto_Node.Icon.trigger.action_copy_clipboard) +} +inline void Icon_trigger::set_action_copy_clipboard(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + action_copy_clipboard_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:Proto_Node.Icon.trigger.action_copy_clipboard) +} +inline void Icon_trigger::set_action_copy_clipboard(const char* value, + size_t size) { + + action_copy_clipboard_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:Proto_Node.Icon.trigger.action_copy_clipboard) +} +inline std::string* Icon_trigger::_internal_mutable_action_copy_clipboard() { + + return action_copy_clipboard_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* Icon_trigger::release_action_copy_clipboard() { + // @@protoc_insertion_point(field_release:Proto_Node.Icon.trigger.action_copy_clipboard) + return action_copy_clipboard_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void Icon_trigger::set_allocated_action_copy_clipboard(std::string* action_copy_clipboard) { + if (action_copy_clipboard != nullptr) { + + } else { + + } + action_copy_clipboard_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), action_copy_clipboard, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:Proto_Node.Icon.trigger.action_copy_clipboard) +} +inline std::string* Icon_trigger::unsafe_arena_release_action_copy_clipboard() { + // @@protoc_insertion_point(field_unsafe_arena_release:Proto_Node.Icon.trigger.action_copy_clipboard) + GOOGLE_DCHECK(GetArena() != nullptr); + + return action_copy_clipboard_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void Icon_trigger::unsafe_arena_set_allocated_action_copy_clipboard( + std::string* action_copy_clipboard) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (action_copy_clipboard != nullptr) { + + } else { + + } + action_copy_clipboard_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + action_copy_clipboard, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Proto_Node.Icon.trigger.action_copy_clipboard) +} + +// string action_copy_message = 6; +inline void Icon_trigger::clear_action_copy_message() { + action_copy_message_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline const std::string& Icon_trigger::action_copy_message() const { + // @@protoc_insertion_point(field_get:Proto_Node.Icon.trigger.action_copy_message) + return _internal_action_copy_message(); +} +inline void Icon_trigger::set_action_copy_message(const std::string& value) { + _internal_set_action_copy_message(value); + // @@protoc_insertion_point(field_set:Proto_Node.Icon.trigger.action_copy_message) +} +inline std::string* Icon_trigger::mutable_action_copy_message() { + // @@protoc_insertion_point(field_mutable:Proto_Node.Icon.trigger.action_copy_message) + return _internal_mutable_action_copy_message(); +} +inline const std::string& Icon_trigger::_internal_action_copy_message() const { + return action_copy_message_.Get(); +} +inline void Icon_trigger::_internal_set_action_copy_message(const std::string& value) { + + action_copy_message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void Icon_trigger::set_action_copy_message(std::string&& value) { + + action_copy_message_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:Proto_Node.Icon.trigger.action_copy_message) +} +inline void Icon_trigger::set_action_copy_message(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + action_copy_message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:Proto_Node.Icon.trigger.action_copy_message) +} +inline void Icon_trigger::set_action_copy_message(const char* value, + size_t size) { + + action_copy_message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:Proto_Node.Icon.trigger.action_copy_message) +} +inline std::string* Icon_trigger::_internal_mutable_action_copy_message() { + + return action_copy_message_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* Icon_trigger::release_action_copy_message() { + // @@protoc_insertion_point(field_release:Proto_Node.Icon.trigger.action_copy_message) + return action_copy_message_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void Icon_trigger::set_allocated_action_copy_message(std::string* action_copy_message) { + if (action_copy_message != nullptr) { + + } else { + + } + action_copy_message_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), action_copy_message, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:Proto_Node.Icon.trigger.action_copy_message) +} +inline std::string* Icon_trigger::unsafe_arena_release_action_copy_message() { + // @@protoc_insertion_point(field_unsafe_arena_release:Proto_Node.Icon.trigger.action_copy_message) + GOOGLE_DCHECK(GetArena() != nullptr); + + return action_copy_message_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void Icon_trigger::unsafe_arena_set_allocated_action_copy_message( + std::string* action_copy_message) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (action_copy_message != nullptr) { + + } else { + + } + action_copy_message_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + action_copy_message, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Proto_Node.Icon.trigger.action_copy_message) +} + +// bool has_countdown = 7; +inline void Icon_trigger::clear_has_countdown() { + has_countdown_ = false; +} +inline bool Icon_trigger::_internal_has_countdown() const { + return has_countdown_; +} +inline bool Icon_trigger::has_countdown() const { + // @@protoc_insertion_point(field_get:Proto_Node.Icon.trigger.has_countdown) + return _internal_has_countdown(); +} +inline void Icon_trigger::_internal_set_has_countdown(bool value) { + + has_countdown_ = value; +} +inline void Icon_trigger::set_has_countdown(bool value) { + _internal_set_has_countdown(value); + // @@protoc_insertion_point(field_set:Proto_Node.Icon.trigger.has_countdown) +} + +// string action_info_message = 8; +inline void Icon_trigger::clear_action_info_message() { + action_info_message_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline const std::string& Icon_trigger::action_info_message() const { + // @@protoc_insertion_point(field_get:Proto_Node.Icon.trigger.action_info_message) + return _internal_action_info_message(); +} +inline void Icon_trigger::set_action_info_message(const std::string& value) { + _internal_set_action_info_message(value); + // @@protoc_insertion_point(field_set:Proto_Node.Icon.trigger.action_info_message) +} +inline std::string* Icon_trigger::mutable_action_info_message() { + // @@protoc_insertion_point(field_mutable:Proto_Node.Icon.trigger.action_info_message) + return _internal_mutable_action_info_message(); +} +inline const std::string& Icon_trigger::_internal_action_info_message() const { + return action_info_message_.Get(); +} +inline void Icon_trigger::_internal_set_action_info_message(const std::string& value) { + + action_info_message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void Icon_trigger::set_action_info_message(std::string&& value) { + + action_info_message_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:Proto_Node.Icon.trigger.action_info_message) +} +inline void Icon_trigger::set_action_info_message(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + action_info_message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:Proto_Node.Icon.trigger.action_info_message) +} +inline void Icon_trigger::set_action_info_message(const char* value, + size_t size) { + + action_info_message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:Proto_Node.Icon.trigger.action_info_message) +} +inline std::string* Icon_trigger::_internal_mutable_action_info_message() { + + return action_info_message_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* Icon_trigger::release_action_info_message() { + // @@protoc_insertion_point(field_release:Proto_Node.Icon.trigger.action_info_message) + return action_info_message_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void Icon_trigger::set_allocated_action_info_message(std::string* action_info_message) { + if (action_info_message != nullptr) { + + } else { + + } + action_info_message_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), action_info_message, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:Proto_Node.Icon.trigger.action_info_message) +} +inline std::string* Icon_trigger::unsafe_arena_release_action_info_message() { + // @@protoc_insertion_point(field_unsafe_arena_release:Proto_Node.Icon.trigger.action_info_message) + GOOGLE_DCHECK(GetArena() != nullptr); + + return action_info_message_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void Icon_trigger::unsafe_arena_set_allocated_action_info_message( + std::string* action_info_message) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (action_info_message != nullptr) { + + } else { + + } + action_info_message_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + action_info_message, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Proto_Node.Icon.trigger.action_info_message) +} + +// bool invert_display = 9; +inline void Icon_trigger::clear_invert_display() { + invert_display_ = false; +} +inline bool Icon_trigger::_internal_invert_display() const { + return invert_display_; +} +inline bool Icon_trigger::invert_display() const { + // @@protoc_insertion_point(field_get:Proto_Node.Icon.trigger.invert_display) + return _internal_invert_display(); +} +inline void Icon_trigger::_internal_set_invert_display(bool value) { + + invert_display_ = value; +} +inline void Icon_trigger::set_invert_display(bool value) { + _internal_set_invert_display(value); + // @@protoc_insertion_point(field_set:Proto_Node.Icon.trigger.invert_display) +} + +// float reset_length = 10; +inline void Icon_trigger::clear_reset_length() { + reset_length_ = 0; +} +inline float Icon_trigger::_internal_reset_length() const { + return reset_length_; +} +inline float Icon_trigger::reset_length() const { + // @@protoc_insertion_point(field_get:Proto_Node.Icon.trigger.reset_length) + return _internal_reset_length(); +} +inline void Icon_trigger::_internal_set_reset_length(float value) { + + reset_length_ = value; +} +inline void Icon_trigger::set_reset_length(float value) { + _internal_set_reset_length(value); + // @@protoc_insertion_point(field_set:Proto_Node.Icon.trigger.reset_length) +} + +// float range = 11; +inline void Icon_trigger::clear_range() { + range_ = 0; +} +inline float Icon_trigger::_internal_range() const { + return range_; +} +inline float Icon_trigger::range() const { + // @@protoc_insertion_point(field_get:Proto_Node.Icon.trigger.range) + return _internal_range(); +} +inline void Icon_trigger::_internal_set_range(float value) { + + range_ = value; +} +inline void Icon_trigger::set_range(float value) { + _internal_set_range(value); + // @@protoc_insertion_point(field_set:Proto_Node.Icon.trigger.range) +} + +// .Proto_Node.Category action_hide_category = 12; +inline bool Icon_trigger::_internal_has_action_hide_category() const { + return this != internal_default_instance() && action_hide_category_ != nullptr; +} +inline bool Icon_trigger::has_action_hide_category() const { + return _internal_has_action_hide_category(); +} +inline void Icon_trigger::clear_action_hide_category() { + if (GetArena() == nullptr && action_hide_category_ != nullptr) { + delete action_hide_category_; + } + action_hide_category_ = nullptr; +} +inline const ::Proto_Node::Category& Icon_trigger::_internal_action_hide_category() const { + const ::Proto_Node::Category* p = action_hide_category_; + return p != nullptr ? *p : *reinterpret_cast( + &::Proto_Node::_Category_default_instance_); +} +inline const ::Proto_Node::Category& Icon_trigger::action_hide_category() const { + // @@protoc_insertion_point(field_get:Proto_Node.Icon.trigger.action_hide_category) + return _internal_action_hide_category(); +} +inline void Icon_trigger::unsafe_arena_set_allocated_action_hide_category( + ::Proto_Node::Category* action_hide_category) { + if (GetArena() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(action_hide_category_); + } + action_hide_category_ = action_hide_category; + if (action_hide_category) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Proto_Node.Icon.trigger.action_hide_category) +} +inline ::Proto_Node::Category* Icon_trigger::release_action_hide_category() { + auto temp = unsafe_arena_release_action_hide_category(); + if (GetArena() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + return temp; +} +inline ::Proto_Node::Category* Icon_trigger::unsafe_arena_release_action_hide_category() { + // @@protoc_insertion_point(field_release:Proto_Node.Icon.trigger.action_hide_category) + + ::Proto_Node::Category* temp = action_hide_category_; + action_hide_category_ = nullptr; + return temp; +} +inline ::Proto_Node::Category* Icon_trigger::_internal_mutable_action_hide_category() { + + if (action_hide_category_ == nullptr) { + auto* p = CreateMaybeMessage<::Proto_Node::Category>(GetArena()); + action_hide_category_ = p; + } + return action_hide_category_; +} +inline ::Proto_Node::Category* Icon_trigger::mutable_action_hide_category() { + // @@protoc_insertion_point(field_mutable:Proto_Node.Icon.trigger.action_hide_category) + return _internal_mutable_action_hide_category(); +} +inline void Icon_trigger::set_allocated_action_hide_category(::Proto_Node::Category* action_hide_category) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); + if (message_arena == nullptr) { + delete action_hide_category_; + } + if (action_hide_category) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(action_hide_category); + if (message_arena != submessage_arena) { + action_hide_category = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, action_hide_category, submessage_arena); + } + + } else { + + } + action_hide_category_ = action_hide_category; + // @@protoc_insertion_point(field_set_allocated:Proto_Node.Icon.trigger.action_hide_category) +} + +// .Proto_Node.Category action_show_category = 13; +inline bool Icon_trigger::_internal_has_action_show_category() const { + return this != internal_default_instance() && action_show_category_ != nullptr; +} +inline bool Icon_trigger::has_action_show_category() const { + return _internal_has_action_show_category(); +} +inline void Icon_trigger::clear_action_show_category() { + if (GetArena() == nullptr && action_show_category_ != nullptr) { + delete action_show_category_; + } + action_show_category_ = nullptr; +} +inline const ::Proto_Node::Category& Icon_trigger::_internal_action_show_category() const { + const ::Proto_Node::Category* p = action_show_category_; + return p != nullptr ? *p : *reinterpret_cast( + &::Proto_Node::_Category_default_instance_); +} +inline const ::Proto_Node::Category& Icon_trigger::action_show_category() const { + // @@protoc_insertion_point(field_get:Proto_Node.Icon.trigger.action_show_category) + return _internal_action_show_category(); +} +inline void Icon_trigger::unsafe_arena_set_allocated_action_show_category( + ::Proto_Node::Category* action_show_category) { + if (GetArena() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(action_show_category_); + } + action_show_category_ = action_show_category; + if (action_show_category) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Proto_Node.Icon.trigger.action_show_category) +} +inline ::Proto_Node::Category* Icon_trigger::release_action_show_category() { + auto temp = unsafe_arena_release_action_show_category(); + if (GetArena() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + return temp; +} +inline ::Proto_Node::Category* Icon_trigger::unsafe_arena_release_action_show_category() { + // @@protoc_insertion_point(field_release:Proto_Node.Icon.trigger.action_show_category) + + ::Proto_Node::Category* temp = action_show_category_; + action_show_category_ = nullptr; + return temp; +} +inline ::Proto_Node::Category* Icon_trigger::_internal_mutable_action_show_category() { + + if (action_show_category_ == nullptr) { + auto* p = CreateMaybeMessage<::Proto_Node::Category>(GetArena()); + action_show_category_ = p; + } + return action_show_category_; +} +inline ::Proto_Node::Category* Icon_trigger::mutable_action_show_category() { + // @@protoc_insertion_point(field_mutable:Proto_Node.Icon.trigger.action_show_category) + return _internal_mutable_action_show_category(); +} +inline void Icon_trigger::set_allocated_action_show_category(::Proto_Node::Category* action_show_category) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); + if (message_arena == nullptr) { + delete action_show_category_; + } + if (action_show_category) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(action_show_category); + if (message_arena != submessage_arena) { + action_show_category = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, action_show_category, submessage_arena); + } + + } else { + + } + action_show_category_ = action_show_category; + // @@protoc_insertion_point(field_set_allocated:Proto_Node.Icon.trigger.action_show_category) +} + +// .Proto_Node.Category action_toggle_category = 14; +inline bool Icon_trigger::_internal_has_action_toggle_category() const { + return this != internal_default_instance() && action_toggle_category_ != nullptr; +} +inline bool Icon_trigger::has_action_toggle_category() const { + return _internal_has_action_toggle_category(); +} +inline void Icon_trigger::clear_action_toggle_category() { + if (GetArena() == nullptr && action_toggle_category_ != nullptr) { + delete action_toggle_category_; + } + action_toggle_category_ = nullptr; +} +inline const ::Proto_Node::Category& Icon_trigger::_internal_action_toggle_category() const { + const ::Proto_Node::Category* p = action_toggle_category_; + return p != nullptr ? *p : *reinterpret_cast( + &::Proto_Node::_Category_default_instance_); +} +inline const ::Proto_Node::Category& Icon_trigger::action_toggle_category() const { + // @@protoc_insertion_point(field_get:Proto_Node.Icon.trigger.action_toggle_category) + return _internal_action_toggle_category(); +} +inline void Icon_trigger::unsafe_arena_set_allocated_action_toggle_category( + ::Proto_Node::Category* action_toggle_category) { + if (GetArena() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(action_toggle_category_); + } + action_toggle_category_ = action_toggle_category; + if (action_toggle_category) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Proto_Node.Icon.trigger.action_toggle_category) +} +inline ::Proto_Node::Category* Icon_trigger::release_action_toggle_category() { + auto temp = unsafe_arena_release_action_toggle_category(); + if (GetArena() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + return temp; +} +inline ::Proto_Node::Category* Icon_trigger::unsafe_arena_release_action_toggle_category() { + // @@protoc_insertion_point(field_release:Proto_Node.Icon.trigger.action_toggle_category) + + ::Proto_Node::Category* temp = action_toggle_category_; + action_toggle_category_ = nullptr; + return temp; +} +inline ::Proto_Node::Category* Icon_trigger::_internal_mutable_action_toggle_category() { + + if (action_toggle_category_ == nullptr) { + auto* p = CreateMaybeMessage<::Proto_Node::Category>(GetArena()); + action_toggle_category_ = p; + } + return action_toggle_category_; +} +inline ::Proto_Node::Category* Icon_trigger::mutable_action_toggle_category() { + // @@protoc_insertion_point(field_mutable:Proto_Node.Icon.trigger.action_toggle_category) + return _internal_mutable_action_toggle_category(); +} +inline void Icon_trigger::set_allocated_action_toggle_category(::Proto_Node::Category* action_toggle_category) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); + if (message_arena == nullptr) { + delete action_toggle_category_; + } + if (action_toggle_category) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(action_toggle_category); + if (message_arena != submessage_arena) { + action_toggle_category = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, action_toggle_category, submessage_arena); + } + + } else { + + } + action_toggle_category_ = action_toggle_category; + // @@protoc_insertion_point(field_set_allocated:Proto_Node.Icon.trigger.action_toggle_category) +} + +// ------------------------------------------------------------------- + +// Icon + +// fixed32 achievement_bit = 1; +inline void Icon::clear_achievement_bit() { + achievement_bit_ = 0u; +} +inline ::PROTOBUF_NAMESPACE_ID::uint32 Icon::_internal_achievement_bit() const { + return achievement_bit_; +} +inline ::PROTOBUF_NAMESPACE_ID::uint32 Icon::achievement_bit() const { + // @@protoc_insertion_point(field_get:Proto_Node.Icon.achievement_bit) + return _internal_achievement_bit(); +} +inline void Icon::_internal_set_achievement_bit(::PROTOBUF_NAMESPACE_ID::uint32 value) { + + achievement_bit_ = value; +} +inline void Icon::set_achievement_bit(::PROTOBUF_NAMESPACE_ID::uint32 value) { + _internal_set_achievement_bit(value); + // @@protoc_insertion_point(field_set:Proto_Node.Icon.achievement_bit) +} + +// int32 achievement_id = 2; +inline void Icon::clear_achievement_id() { + achievement_id_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 Icon::_internal_achievement_id() const { + return achievement_id_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 Icon::achievement_id() const { + // @@protoc_insertion_point(field_get:Proto_Node.Icon.achievement_id) + return _internal_achievement_id(); +} +inline void Icon::_internal_set_achievement_id(::PROTOBUF_NAMESPACE_ID::int32 value) { + + achievement_id_ = value; +} +inline void Icon::set_achievement_id(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_achievement_id(value); + // @@protoc_insertion_point(field_set:Proto_Node.Icon.achievement_id) +} + +// float alpha = 3; +inline void Icon::clear_alpha() { + alpha_ = 0; +} +inline float Icon::_internal_alpha() const { + return alpha_; +} +inline float Icon::alpha() const { + // @@protoc_insertion_point(field_get:Proto_Node.Icon.alpha) + return _internal_alpha(); +} +inline void Icon::_internal_set_alpha(float value) { + + alpha_ = value; +} +inline void Icon::set_alpha(float value) { + _internal_set_alpha(value); + // @@protoc_insertion_point(field_set:Proto_Node.Icon.alpha) +} + +// bool can_fade = 4; +inline void Icon::clear_can_fade() { + can_fade_ = false; +} +inline bool Icon::_internal_can_fade() const { + return can_fade_; +} +inline bool Icon::can_fade() const { + // @@protoc_insertion_point(field_get:Proto_Node.Icon.can_fade) + return _internal_can_fade(); +} +inline void Icon::_internal_set_can_fade(bool value) { + + can_fade_ = value; +} +inline void Icon::set_can_fade(bool value) { + _internal_set_can_fade(value); + // @@protoc_insertion_point(field_set:Proto_Node.Icon.can_fade) +} + +// float distance_fade_end = 5; +inline void Icon::clear_distance_fade_end() { + distance_fade_end_ = 0; +} +inline float Icon::_internal_distance_fade_end() const { + return distance_fade_end_; +} +inline float Icon::distance_fade_end() const { + // @@protoc_insertion_point(field_get:Proto_Node.Icon.distance_fade_end) + return _internal_distance_fade_end(); +} +inline void Icon::_internal_set_distance_fade_end(float value) { + + distance_fade_end_ = value; +} +inline void Icon::set_distance_fade_end(float value) { + _internal_set_distance_fade_end(value); + // @@protoc_insertion_point(field_set:Proto_Node.Icon.distance_fade_end) +} + +// float distance_fade_start = 6; +inline void Icon::clear_distance_fade_start() { + distance_fade_start_ = 0; +} +inline float Icon::_internal_distance_fade_start() const { + return distance_fade_start_; +} +inline float Icon::distance_fade_start() const { + // @@protoc_insertion_point(field_get:Proto_Node.Icon.distance_fade_start) + return _internal_distance_fade_start(); +} +inline void Icon::_internal_set_distance_fade_start(float value) { + + distance_fade_start_ = value; +} +inline void Icon::set_distance_fade_start(float value) { + _internal_set_distance_fade_start(value); + // @@protoc_insertion_point(field_set:Proto_Node.Icon.distance_fade_start) +} + +// float height_offset = 7; +inline void Icon::clear_height_offset() { + height_offset_ = 0; +} +inline float Icon::_internal_height_offset() const { + return height_offset_; +} +inline float Icon::height_offset() const { + // @@protoc_insertion_point(field_get:Proto_Node.Icon.height_offset) + return _internal_height_offset(); +} +inline void Icon::_internal_set_height_offset(float value) { + + height_offset_ = value; +} +inline void Icon::set_height_offset(float value) { + _internal_set_height_offset(value); + // @@protoc_insertion_point(field_set:Proto_Node.Icon.height_offset) +} + +// float __tentative__scale = 8; +inline void Icon::clear___tentative__scale() { + __tentative__scale_ = 0; +} +inline float Icon::_internal___tentative__scale() const { + return __tentative__scale_; +} +inline float Icon::__tentative__scale() const { + // @@protoc_insertion_point(field_get:Proto_Node.Icon.__tentative__scale) + return _internal___tentative__scale(); +} +inline void Icon::_internal_set___tentative__scale(float value) { + + __tentative__scale_ = value; +} +inline void Icon::set___tentative__scale(float value) { + _internal_set___tentative__scale(value); + // @@protoc_insertion_point(field_set:Proto_Node.Icon.__tentative__scale) +} + +// int32 map_display_size = 9; +inline void Icon::clear_map_display_size() { + map_display_size_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 Icon::_internal_map_display_size() const { + return map_display_size_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 Icon::map_display_size() const { + // @@protoc_insertion_point(field_get:Proto_Node.Icon.map_display_size) + return _internal_map_display_size(); +} +inline void Icon::_internal_set_map_display_size(::PROTOBUF_NAMESPACE_ID::int32 value) { + + map_display_size_ = value; +} +inline void Icon::set_map_display_size(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_map_display_size(value); + // @@protoc_insertion_point(field_set:Proto_Node.Icon.map_display_size) +} + +// int32 map_id = 10; +inline void Icon::clear_map_id() { + map_id_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 Icon::_internal_map_id() const { + return map_id_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 Icon::map_id() const { + // @@protoc_insertion_point(field_get:Proto_Node.Icon.map_id) + return _internal_map_id(); +} +inline void Icon::_internal_set_map_id(::PROTOBUF_NAMESPACE_ID::int32 value) { + + map_id_ = value; +} +inline void Icon::set_map_id(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_map_id(value); + // @@protoc_insertion_point(field_set:Proto_Node.Icon.map_id) +} + +// int32 maximum_size_on_screen = 11; +inline void Icon::clear_maximum_size_on_screen() { + maximum_size_on_screen_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 Icon::_internal_maximum_size_on_screen() const { + return maximum_size_on_screen_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 Icon::maximum_size_on_screen() const { + // @@protoc_insertion_point(field_get:Proto_Node.Icon.maximum_size_on_screen) + return _internal_maximum_size_on_screen(); +} +inline void Icon::_internal_set_maximum_size_on_screen(::PROTOBUF_NAMESPACE_ID::int32 value) { + + maximum_size_on_screen_ = value; +} +inline void Icon::set_maximum_size_on_screen(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_maximum_size_on_screen(value); + // @@protoc_insertion_point(field_set:Proto_Node.Icon.maximum_size_on_screen) +} + +// int32 minimum_size_on_screen = 12; +inline void Icon::clear_minimum_size_on_screen() { + minimum_size_on_screen_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 Icon::_internal_minimum_size_on_screen() const { + return minimum_size_on_screen_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 Icon::minimum_size_on_screen() const { + // @@protoc_insertion_point(field_get:Proto_Node.Icon.minimum_size_on_screen) + return _internal_minimum_size_on_screen(); +} +inline void Icon::_internal_set_minimum_size_on_screen(::PROTOBUF_NAMESPACE_ID::int32 value) { + + minimum_size_on_screen_ = value; +} +inline void Icon::set_minimum_size_on_screen(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_minimum_size_on_screen(value); + // @@protoc_insertion_point(field_set:Proto_Node.Icon.minimum_size_on_screen) +} + +// bool __tentative__render_ingame = 13; +inline void Icon::clear___tentative__render_ingame() { + __tentative__render_ingame_ = false; +} +inline bool Icon::_internal___tentative__render_ingame() const { + return __tentative__render_ingame_; +} +inline bool Icon::__tentative__render_ingame() const { + // @@protoc_insertion_point(field_get:Proto_Node.Icon.__tentative__render_ingame) + return _internal___tentative__render_ingame(); +} +inline void Icon::_internal_set___tentative__render_ingame(bool value) { + + __tentative__render_ingame_ = value; +} +inline void Icon::set___tentative__render_ingame(bool value) { + _internal_set___tentative__render_ingame(value); + // @@protoc_insertion_point(field_set:Proto_Node.Icon.__tentative__render_ingame) +} + +// bool __tentative__render_on_map = 14; +inline void Icon::clear___tentative__render_on_map() { + __tentative__render_on_map_ = false; +} +inline bool Icon::_internal___tentative__render_on_map() const { + return __tentative__render_on_map_; +} +inline bool Icon::__tentative__render_on_map() const { + // @@protoc_insertion_point(field_get:Proto_Node.Icon.__tentative__render_on_map) + return _internal___tentative__render_on_map(); +} +inline void Icon::_internal_set___tentative__render_on_map(bool value) { + + __tentative__render_on_map_ = value; +} +inline void Icon::set___tentative__render_on_map(bool value) { + _internal_set___tentative__render_on_map(value); + // @@protoc_insertion_point(field_set:Proto_Node.Icon.__tentative__render_on_map) +} + +// bool __tentative__render_on_minimap = 15; +inline void Icon::clear___tentative__render_on_minimap() { + __tentative__render_on_minimap_ = false; +} +inline bool Icon::_internal___tentative__render_on_minimap() const { + return __tentative__render_on_minimap_; +} +inline bool Icon::__tentative__render_on_minimap() const { + // @@protoc_insertion_point(field_get:Proto_Node.Icon.__tentative__render_on_minimap) + return _internal___tentative__render_on_minimap(); +} +inline void Icon::_internal_set___tentative__render_on_minimap(bool value) { + + __tentative__render_on_minimap_ = value; +} +inline void Icon::set___tentative__render_on_minimap(bool value) { + _internal_set___tentative__render_on_minimap(value); + // @@protoc_insertion_point(field_set:Proto_Node.Icon.__tentative__render_on_minimap) +} + +// bool scale_on_map_with_zoom = 16; +inline void Icon::clear_scale_on_map_with_zoom() { + scale_on_map_with_zoom_ = false; +} +inline bool Icon::_internal_scale_on_map_with_zoom() const { + return scale_on_map_with_zoom_; +} +inline bool Icon::scale_on_map_with_zoom() const { + // @@protoc_insertion_point(field_get:Proto_Node.Icon.scale_on_map_with_zoom) + return _internal_scale_on_map_with_zoom(); +} +inline void Icon::_internal_set_scale_on_map_with_zoom(bool value) { + + scale_on_map_with_zoom_ = value; +} +inline void Icon::set_scale_on_map_with_zoom(bool value) { + _internal_set_scale_on_map_with_zoom(value); + // @@protoc_insertion_point(field_set:Proto_Node.Icon.scale_on_map_with_zoom) +} + +// string bhdraft__schedule = 17; +inline void Icon::clear_bhdraft__schedule() { + bhdraft__schedule_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline const std::string& Icon::bhdraft__schedule() const { + // @@protoc_insertion_point(field_get:Proto_Node.Icon.bhdraft__schedule) + return _internal_bhdraft__schedule(); +} +inline void Icon::set_bhdraft__schedule(const std::string& value) { + _internal_set_bhdraft__schedule(value); + // @@protoc_insertion_point(field_set:Proto_Node.Icon.bhdraft__schedule) +} +inline std::string* Icon::mutable_bhdraft__schedule() { + // @@protoc_insertion_point(field_mutable:Proto_Node.Icon.bhdraft__schedule) + return _internal_mutable_bhdraft__schedule(); +} +inline const std::string& Icon::_internal_bhdraft__schedule() const { + return bhdraft__schedule_.Get(); +} +inline void Icon::_internal_set_bhdraft__schedule(const std::string& value) { + + bhdraft__schedule_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void Icon::set_bhdraft__schedule(std::string&& value) { + + bhdraft__schedule_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:Proto_Node.Icon.bhdraft__schedule) +} +inline void Icon::set_bhdraft__schedule(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + bhdraft__schedule_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:Proto_Node.Icon.bhdraft__schedule) +} +inline void Icon::set_bhdraft__schedule(const char* value, + size_t size) { + + bhdraft__schedule_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:Proto_Node.Icon.bhdraft__schedule) +} +inline std::string* Icon::_internal_mutable_bhdraft__schedule() { + + return bhdraft__schedule_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* Icon::release_bhdraft__schedule() { + // @@protoc_insertion_point(field_release:Proto_Node.Icon.bhdraft__schedule) + return bhdraft__schedule_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void Icon::set_allocated_bhdraft__schedule(std::string* bhdraft__schedule) { + if (bhdraft__schedule != nullptr) { + + } else { + + } + bhdraft__schedule_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), bhdraft__schedule, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:Proto_Node.Icon.bhdraft__schedule) +} +inline std::string* Icon::unsafe_arena_release_bhdraft__schedule() { + // @@protoc_insertion_point(field_unsafe_arena_release:Proto_Node.Icon.bhdraft__schedule) + GOOGLE_DCHECK(GetArena() != nullptr); + + return bhdraft__schedule_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void Icon::unsafe_arena_set_allocated_bhdraft__schedule( + std::string* bhdraft__schedule) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (bhdraft__schedule != nullptr) { + + } else { + + } + bhdraft__schedule_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + bhdraft__schedule, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Proto_Node.Icon.bhdraft__schedule) +} + +// float bhdraft__schedule_duration = 18; +inline void Icon::clear_bhdraft__schedule_duration() { + bhdraft__schedule_duration_ = 0; +} +inline float Icon::_internal_bhdraft__schedule_duration() const { + return bhdraft__schedule_duration_; +} +inline float Icon::bhdraft__schedule_duration() const { + // @@protoc_insertion_point(field_get:Proto_Node.Icon.bhdraft__schedule_duration) + return _internal_bhdraft__schedule_duration(); +} +inline void Icon::_internal_set_bhdraft__schedule_duration(float value) { + + bhdraft__schedule_duration_ = value; +} +inline void Icon::set_bhdraft__schedule_duration(float value) { + _internal_set_bhdraft__schedule_duration(value); + // @@protoc_insertion_point(field_set:Proto_Node.Icon.bhdraft__schedule_duration) +} + +// string tip_description = 19; +inline void Icon::clear_tip_description() { + tip_description_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline const std::string& Icon::tip_description() const { + // @@protoc_insertion_point(field_get:Proto_Node.Icon.tip_description) + return _internal_tip_description(); +} +inline void Icon::set_tip_description(const std::string& value) { + _internal_set_tip_description(value); + // @@protoc_insertion_point(field_set:Proto_Node.Icon.tip_description) +} +inline std::string* Icon::mutable_tip_description() { + // @@protoc_insertion_point(field_mutable:Proto_Node.Icon.tip_description) + return _internal_mutable_tip_description(); +} +inline const std::string& Icon::_internal_tip_description() const { + return tip_description_.Get(); +} +inline void Icon::_internal_set_tip_description(const std::string& value) { + + tip_description_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void Icon::set_tip_description(std::string&& value) { + + tip_description_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:Proto_Node.Icon.tip_description) +} +inline void Icon::set_tip_description(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + tip_description_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:Proto_Node.Icon.tip_description) +} +inline void Icon::set_tip_description(const char* value, + size_t size) { + + tip_description_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:Proto_Node.Icon.tip_description) +} +inline std::string* Icon::_internal_mutable_tip_description() { + + return tip_description_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* Icon::release_tip_description() { + // @@protoc_insertion_point(field_release:Proto_Node.Icon.tip_description) + return tip_description_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void Icon::set_allocated_tip_description(std::string* tip_description) { + if (tip_description != nullptr) { + + } else { + + } + tip_description_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), tip_description, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:Proto_Node.Icon.tip_description) +} +inline std::string* Icon::unsafe_arena_release_tip_description() { + // @@protoc_insertion_point(field_unsafe_arena_release:Proto_Node.Icon.tip_description) + GOOGLE_DCHECK(GetArena() != nullptr); + + return tip_description_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void Icon::unsafe_arena_set_allocated_tip_description( + std::string* tip_description) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (tip_description != nullptr) { + + } else { + + } + tip_description_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + tip_description, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Proto_Node.Icon.tip_description) +} + +// string tip_name = 20; +inline void Icon::clear_tip_name() { + tip_name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline const std::string& Icon::tip_name() const { + // @@protoc_insertion_point(field_get:Proto_Node.Icon.tip_name) + return _internal_tip_name(); +} +inline void Icon::set_tip_name(const std::string& value) { + _internal_set_tip_name(value); + // @@protoc_insertion_point(field_set:Proto_Node.Icon.tip_name) +} +inline std::string* Icon::mutable_tip_name() { + // @@protoc_insertion_point(field_mutable:Proto_Node.Icon.tip_name) + return _internal_mutable_tip_name(); +} +inline const std::string& Icon::_internal_tip_name() const { + return tip_name_.Get(); +} +inline void Icon::_internal_set_tip_name(const std::string& value) { + + tip_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void Icon::set_tip_name(std::string&& value) { + + tip_name_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:Proto_Node.Icon.tip_name) +} +inline void Icon::set_tip_name(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + tip_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:Proto_Node.Icon.tip_name) +} +inline void Icon::set_tip_name(const char* value, + size_t size) { + + tip_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:Proto_Node.Icon.tip_name) +} +inline std::string* Icon::_internal_mutable_tip_name() { + + return tip_name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* Icon::release_tip_name() { + // @@protoc_insertion_point(field_release:Proto_Node.Icon.tip_name) + return tip_name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void Icon::set_allocated_tip_name(std::string* tip_name) { + if (tip_name != nullptr) { + + } else { + + } + tip_name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), tip_name, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:Proto_Node.Icon.tip_name) +} +inline std::string* Icon::unsafe_arena_release_tip_name() { + // @@protoc_insertion_point(field_unsafe_arena_release:Proto_Node.Icon.tip_name) + GOOGLE_DCHECK(GetArena() != nullptr); + + return tip_name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void Icon::unsafe_arena_set_allocated_tip_name( + std::string* tip_name) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (tip_name != nullptr) { + + } else { + + } + tip_name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + tip_name, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Proto_Node.Icon.tip_name) +} + +// ------------------------------------------------------------------- + +// Trail_color + +// string hex = 1; +inline void Trail_color::clear_hex() { + hex_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline const std::string& Trail_color::hex() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.color.hex) + return _internal_hex(); +} +inline void Trail_color::set_hex(const std::string& value) { + _internal_set_hex(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.color.hex) +} +inline std::string* Trail_color::mutable_hex() { + // @@protoc_insertion_point(field_mutable:Proto_Node.Trail.color.hex) + return _internal_mutable_hex(); +} +inline const std::string& Trail_color::_internal_hex() const { + return hex_.Get(); +} +inline void Trail_color::_internal_set_hex(const std::string& value) { + + hex_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void Trail_color::set_hex(std::string&& value) { + + hex_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:Proto_Node.Trail.color.hex) +} +inline void Trail_color::set_hex(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + hex_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:Proto_Node.Trail.color.hex) +} +inline void Trail_color::set_hex(const char* value, + size_t size) { + + hex_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:Proto_Node.Trail.color.hex) +} +inline std::string* Trail_color::_internal_mutable_hex() { + + return hex_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* Trail_color::release_hex() { + // @@protoc_insertion_point(field_release:Proto_Node.Trail.color.hex) + return hex_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void Trail_color::set_allocated_hex(std::string* hex) { + if (hex != nullptr) { + + } else { + + } + hex_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), hex, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:Proto_Node.Trail.color.hex) +} +inline std::string* Trail_color::unsafe_arena_release_hex() { + // @@protoc_insertion_point(field_unsafe_arena_release:Proto_Node.Trail.color.hex) + GOOGLE_DCHECK(GetArena() != nullptr); + + return hex_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void Trail_color::unsafe_arena_set_allocated_hex( + std::string* hex) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (hex != nullptr) { + + } else { + + } + hex_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + hex, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Proto_Node.Trail.color.hex) +} + +// ------------------------------------------------------------------- + +// Trail_festival_filter + +// bool dragonbash = 1; +inline void Trail_festival_filter::clear_dragonbash() { + dragonbash_ = false; +} +inline bool Trail_festival_filter::_internal_dragonbash() const { + return dragonbash_; +} +inline bool Trail_festival_filter::dragonbash() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.festival_filter.dragonbash) + return _internal_dragonbash(); +} +inline void Trail_festival_filter::_internal_set_dragonbash(bool value) { + + dragonbash_ = value; +} +inline void Trail_festival_filter::set_dragonbash(bool value) { + _internal_set_dragonbash(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.festival_filter.dragonbash) +} + +// bool festival_of_the_four_winds = 2; +inline void Trail_festival_filter::clear_festival_of_the_four_winds() { + festival_of_the_four_winds_ = false; +} +inline bool Trail_festival_filter::_internal_festival_of_the_four_winds() const { + return festival_of_the_four_winds_; +} +inline bool Trail_festival_filter::festival_of_the_four_winds() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.festival_filter.festival_of_the_four_winds) + return _internal_festival_of_the_four_winds(); +} +inline void Trail_festival_filter::_internal_set_festival_of_the_four_winds(bool value) { + + festival_of_the_four_winds_ = value; +} +inline void Trail_festival_filter::set_festival_of_the_four_winds(bool value) { + _internal_set_festival_of_the_four_winds(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.festival_filter.festival_of_the_four_winds) +} + +// bool halloween = 3; +inline void Trail_festival_filter::clear_halloween() { + halloween_ = false; +} +inline bool Trail_festival_filter::_internal_halloween() const { + return halloween_; +} +inline bool Trail_festival_filter::halloween() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.festival_filter.halloween) + return _internal_halloween(); +} +inline void Trail_festival_filter::_internal_set_halloween(bool value) { + + halloween_ = value; +} +inline void Trail_festival_filter::set_halloween(bool value) { + _internal_set_halloween(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.festival_filter.halloween) +} + +// bool lunar_new_year = 4; +inline void Trail_festival_filter::clear_lunar_new_year() { + lunar_new_year_ = false; +} +inline bool Trail_festival_filter::_internal_lunar_new_year() const { + return lunar_new_year_; +} +inline bool Trail_festival_filter::lunar_new_year() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.festival_filter.lunar_new_year) + return _internal_lunar_new_year(); +} +inline void Trail_festival_filter::_internal_set_lunar_new_year(bool value) { + + lunar_new_year_ = value; +} +inline void Trail_festival_filter::set_lunar_new_year(bool value) { + _internal_set_lunar_new_year(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.festival_filter.lunar_new_year) +} + +// bool super_adventure_festival = 5; +inline void Trail_festival_filter::clear_super_adventure_festival() { + super_adventure_festival_ = false; +} +inline bool Trail_festival_filter::_internal_super_adventure_festival() const { + return super_adventure_festival_; +} +inline bool Trail_festival_filter::super_adventure_festival() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.festival_filter.super_adventure_festival) + return _internal_super_adventure_festival(); +} +inline void Trail_festival_filter::_internal_set_super_adventure_festival(bool value) { + + super_adventure_festival_ = value; +} +inline void Trail_festival_filter::set_super_adventure_festival(bool value) { + _internal_set_super_adventure_festival(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.festival_filter.super_adventure_festival) +} + +// bool wintersday = 6; +inline void Trail_festival_filter::clear_wintersday() { + wintersday_ = false; +} +inline bool Trail_festival_filter::_internal_wintersday() const { + return wintersday_; +} +inline bool Trail_festival_filter::wintersday() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.festival_filter.wintersday) + return _internal_wintersday(); +} +inline void Trail_festival_filter::_internal_set_wintersday(bool value) { + + wintersday_ = value; +} +inline void Trail_festival_filter::set_wintersday(bool value) { + _internal_set_wintersday(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.festival_filter.wintersday) +} + +// bool none = 7; +inline void Trail_festival_filter::clear_none() { + none_ = false; +} +inline bool Trail_festival_filter::_internal_none() const { + return none_; +} +inline bool Trail_festival_filter::none() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.festival_filter.none) + return _internal_none(); +} +inline void Trail_festival_filter::_internal_set_none(bool value) { + + none_ = value; +} +inline void Trail_festival_filter::set_none(bool value) { + _internal_set_none(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.festival_filter.none) +} + +// ------------------------------------------------------------------- + +// Trail_guid + +// int32 guid = 1; +inline void Trail_guid::clear_guid() { + guid_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 Trail_guid::_internal_guid() const { + return guid_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 Trail_guid::guid() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.guid.guid) + return _internal_guid(); +} +inline void Trail_guid::_internal_set_guid(::PROTOBUF_NAMESPACE_ID::int32 value) { + + guid_ = value; +} +inline void Trail_guid::set_guid(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_guid(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.guid.guid) +} + +// ------------------------------------------------------------------- + +// Trail_map_type_filter + +// bool unknown_map = 1; +inline void Trail_map_type_filter::clear_unknown_map() { + unknown_map_ = false; +} +inline bool Trail_map_type_filter::_internal_unknown_map() const { + return unknown_map_; +} +inline bool Trail_map_type_filter::unknown_map() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.map_type_filter.unknown_map) + return _internal_unknown_map(); +} +inline void Trail_map_type_filter::_internal_set_unknown_map(bool value) { + + unknown_map_ = value; +} +inline void Trail_map_type_filter::set_unknown_map(bool value) { + _internal_set_unknown_map(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.map_type_filter.unknown_map) +} + +// bool redirect_map = 2; +inline void Trail_map_type_filter::clear_redirect_map() { + redirect_map_ = false; +} +inline bool Trail_map_type_filter::_internal_redirect_map() const { + return redirect_map_; +} +inline bool Trail_map_type_filter::redirect_map() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.map_type_filter.redirect_map) + return _internal_redirect_map(); +} +inline void Trail_map_type_filter::_internal_set_redirect_map(bool value) { + + redirect_map_ = value; +} +inline void Trail_map_type_filter::set_redirect_map(bool value) { + _internal_set_redirect_map(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.map_type_filter.redirect_map) +} + +// bool character_create_map = 3; +inline void Trail_map_type_filter::clear_character_create_map() { + character_create_map_ = false; +} +inline bool Trail_map_type_filter::_internal_character_create_map() const { + return character_create_map_; +} +inline bool Trail_map_type_filter::character_create_map() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.map_type_filter.character_create_map) + return _internal_character_create_map(); +} +inline void Trail_map_type_filter::_internal_set_character_create_map(bool value) { + + character_create_map_ = value; +} +inline void Trail_map_type_filter::set_character_create_map(bool value) { + _internal_set_character_create_map(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.map_type_filter.character_create_map) +} + +// bool pvp_map = 4; +inline void Trail_map_type_filter::clear_pvp_map() { + pvp_map_ = false; +} +inline bool Trail_map_type_filter::_internal_pvp_map() const { + return pvp_map_; +} +inline bool Trail_map_type_filter::pvp_map() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.map_type_filter.pvp_map) + return _internal_pvp_map(); +} +inline void Trail_map_type_filter::_internal_set_pvp_map(bool value) { + + pvp_map_ = value; +} +inline void Trail_map_type_filter::set_pvp_map(bool value) { + _internal_set_pvp_map(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.map_type_filter.pvp_map) +} + +// bool gvg_map = 5; +inline void Trail_map_type_filter::clear_gvg_map() { + gvg_map_ = false; +} +inline bool Trail_map_type_filter::_internal_gvg_map() const { + return gvg_map_; +} +inline bool Trail_map_type_filter::gvg_map() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.map_type_filter.gvg_map) + return _internal_gvg_map(); +} +inline void Trail_map_type_filter::_internal_set_gvg_map(bool value) { + + gvg_map_ = value; +} +inline void Trail_map_type_filter::set_gvg_map(bool value) { + _internal_set_gvg_map(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.map_type_filter.gvg_map) +} + +// bool instance_map = 6; +inline void Trail_map_type_filter::clear_instance_map() { + instance_map_ = false; +} +inline bool Trail_map_type_filter::_internal_instance_map() const { + return instance_map_; +} +inline bool Trail_map_type_filter::instance_map() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.map_type_filter.instance_map) + return _internal_instance_map(); +} +inline void Trail_map_type_filter::_internal_set_instance_map(bool value) { + + instance_map_ = value; +} +inline void Trail_map_type_filter::set_instance_map(bool value) { + _internal_set_instance_map(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.map_type_filter.instance_map) +} + +// bool public_map = 7; +inline void Trail_map_type_filter::clear_public_map() { + public_map_ = false; +} +inline bool Trail_map_type_filter::_internal_public_map() const { + return public_map_; +} +inline bool Trail_map_type_filter::public_map() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.map_type_filter.public_map) + return _internal_public_map(); +} +inline void Trail_map_type_filter::_internal_set_public_map(bool value) { + + public_map_ = value; +} +inline void Trail_map_type_filter::set_public_map(bool value) { + _internal_set_public_map(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.map_type_filter.public_map) +} + +// bool tournament_map = 8; +inline void Trail_map_type_filter::clear_tournament_map() { + tournament_map_ = false; +} +inline bool Trail_map_type_filter::_internal_tournament_map() const { + return tournament_map_; +} +inline bool Trail_map_type_filter::tournament_map() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.map_type_filter.tournament_map) + return _internal_tournament_map(); +} +inline void Trail_map_type_filter::_internal_set_tournament_map(bool value) { + + tournament_map_ = value; +} +inline void Trail_map_type_filter::set_tournament_map(bool value) { + _internal_set_tournament_map(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.map_type_filter.tournament_map) +} + +// bool tutorial_map = 9; +inline void Trail_map_type_filter::clear_tutorial_map() { + tutorial_map_ = false; +} +inline bool Trail_map_type_filter::_internal_tutorial_map() const { + return tutorial_map_; +} +inline bool Trail_map_type_filter::tutorial_map() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.map_type_filter.tutorial_map) + return _internal_tutorial_map(); +} +inline void Trail_map_type_filter::_internal_set_tutorial_map(bool value) { + + tutorial_map_ = value; +} +inline void Trail_map_type_filter::set_tutorial_map(bool value) { + _internal_set_tutorial_map(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.map_type_filter.tutorial_map) +} + +// bool user_tournament_map = 10; +inline void Trail_map_type_filter::clear_user_tournament_map() { + user_tournament_map_ = false; +} +inline bool Trail_map_type_filter::_internal_user_tournament_map() const { + return user_tournament_map_; +} +inline bool Trail_map_type_filter::user_tournament_map() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.map_type_filter.user_tournament_map) + return _internal_user_tournament_map(); +} +inline void Trail_map_type_filter::_internal_set_user_tournament_map(bool value) { + + user_tournament_map_ = value; +} +inline void Trail_map_type_filter::set_user_tournament_map(bool value) { + _internal_set_user_tournament_map(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.map_type_filter.user_tournament_map) +} + +// bool center_map = 11; +inline void Trail_map_type_filter::clear_center_map() { + center_map_ = false; +} +inline bool Trail_map_type_filter::_internal_center_map() const { + return center_map_; +} +inline bool Trail_map_type_filter::center_map() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.map_type_filter.center_map) + return _internal_center_map(); +} +inline void Trail_map_type_filter::_internal_set_center_map(bool value) { + + center_map_ = value; +} +inline void Trail_map_type_filter::set_center_map(bool value) { + _internal_set_center_map(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.map_type_filter.center_map) +} + +// bool eternal_battlegrounds_map = 12; +inline void Trail_map_type_filter::clear_eternal_battlegrounds_map() { + eternal_battlegrounds_map_ = false; +} +inline bool Trail_map_type_filter::_internal_eternal_battlegrounds_map() const { + return eternal_battlegrounds_map_; +} +inline bool Trail_map_type_filter::eternal_battlegrounds_map() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.map_type_filter.eternal_battlegrounds_map) + return _internal_eternal_battlegrounds_map(); +} +inline void Trail_map_type_filter::_internal_set_eternal_battlegrounds_map(bool value) { + + eternal_battlegrounds_map_ = value; +} +inline void Trail_map_type_filter::set_eternal_battlegrounds_map(bool value) { + _internal_set_eternal_battlegrounds_map(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.map_type_filter.eternal_battlegrounds_map) +} + +// bool bluehome_map = 13; +inline void Trail_map_type_filter::clear_bluehome_map() { + bluehome_map_ = false; +} +inline bool Trail_map_type_filter::_internal_bluehome_map() const { + return bluehome_map_; +} +inline bool Trail_map_type_filter::bluehome_map() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.map_type_filter.bluehome_map) + return _internal_bluehome_map(); +} +inline void Trail_map_type_filter::_internal_set_bluehome_map(bool value) { + + bluehome_map_ = value; +} +inline void Trail_map_type_filter::set_bluehome_map(bool value) { + _internal_set_bluehome_map(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.map_type_filter.bluehome_map) +} + +// bool blue_borderlands_map = 14; +inline void Trail_map_type_filter::clear_blue_borderlands_map() { + blue_borderlands_map_ = false; +} +inline bool Trail_map_type_filter::_internal_blue_borderlands_map() const { + return blue_borderlands_map_; +} +inline bool Trail_map_type_filter::blue_borderlands_map() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.map_type_filter.blue_borderlands_map) + return _internal_blue_borderlands_map(); +} +inline void Trail_map_type_filter::_internal_set_blue_borderlands_map(bool value) { + + blue_borderlands_map_ = value; +} +inline void Trail_map_type_filter::set_blue_borderlands_map(bool value) { + _internal_set_blue_borderlands_map(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.map_type_filter.blue_borderlands_map) +} + +// bool green_home_map = 15; +inline void Trail_map_type_filter::clear_green_home_map() { + green_home_map_ = false; +} +inline bool Trail_map_type_filter::_internal_green_home_map() const { + return green_home_map_; +} +inline bool Trail_map_type_filter::green_home_map() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.map_type_filter.green_home_map) + return _internal_green_home_map(); +} +inline void Trail_map_type_filter::_internal_set_green_home_map(bool value) { + + green_home_map_ = value; +} +inline void Trail_map_type_filter::set_green_home_map(bool value) { + _internal_set_green_home_map(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.map_type_filter.green_home_map) +} + +// bool green_borderlands_map = 16; +inline void Trail_map_type_filter::clear_green_borderlands_map() { + green_borderlands_map_ = false; +} +inline bool Trail_map_type_filter::_internal_green_borderlands_map() const { + return green_borderlands_map_; +} +inline bool Trail_map_type_filter::green_borderlands_map() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.map_type_filter.green_borderlands_map) + return _internal_green_borderlands_map(); +} +inline void Trail_map_type_filter::_internal_set_green_borderlands_map(bool value) { + + green_borderlands_map_ = value; +} +inline void Trail_map_type_filter::set_green_borderlands_map(bool value) { + _internal_set_green_borderlands_map(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.map_type_filter.green_borderlands_map) +} + +// bool red_home_map = 17; +inline void Trail_map_type_filter::clear_red_home_map() { + red_home_map_ = false; +} +inline bool Trail_map_type_filter::_internal_red_home_map() const { + return red_home_map_; +} +inline bool Trail_map_type_filter::red_home_map() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.map_type_filter.red_home_map) + return _internal_red_home_map(); +} +inline void Trail_map_type_filter::_internal_set_red_home_map(bool value) { + + red_home_map_ = value; +} +inline void Trail_map_type_filter::set_red_home_map(bool value) { + _internal_set_red_home_map(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.map_type_filter.red_home_map) +} + +// bool red_borderlands_map = 18; +inline void Trail_map_type_filter::clear_red_borderlands_map() { + red_borderlands_map_ = false; +} +inline bool Trail_map_type_filter::_internal_red_borderlands_map() const { + return red_borderlands_map_; +} +inline bool Trail_map_type_filter::red_borderlands_map() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.map_type_filter.red_borderlands_map) + return _internal_red_borderlands_map(); +} +inline void Trail_map_type_filter::_internal_set_red_borderlands_map(bool value) { + + red_borderlands_map_ = value; +} +inline void Trail_map_type_filter::set_red_borderlands_map(bool value) { + _internal_set_red_borderlands_map(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.map_type_filter.red_borderlands_map) +} + +// bool fortunes_vale_map = 19; +inline void Trail_map_type_filter::clear_fortunes_vale_map() { + fortunes_vale_map_ = false; +} +inline bool Trail_map_type_filter::_internal_fortunes_vale_map() const { + return fortunes_vale_map_; +} +inline bool Trail_map_type_filter::fortunes_vale_map() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.map_type_filter.fortunes_vale_map) + return _internal_fortunes_vale_map(); +} +inline void Trail_map_type_filter::_internal_set_fortunes_vale_map(bool value) { + + fortunes_vale_map_ = value; +} +inline void Trail_map_type_filter::set_fortunes_vale_map(bool value) { + _internal_set_fortunes_vale_map(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.map_type_filter.fortunes_vale_map) +} + +// bool jump_puzzle_map = 20; +inline void Trail_map_type_filter::clear_jump_puzzle_map() { + jump_puzzle_map_ = false; +} +inline bool Trail_map_type_filter::_internal_jump_puzzle_map() const { + return jump_puzzle_map_; +} +inline bool Trail_map_type_filter::jump_puzzle_map() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.map_type_filter.jump_puzzle_map) + return _internal_jump_puzzle_map(); +} +inline void Trail_map_type_filter::_internal_set_jump_puzzle_map(bool value) { + + jump_puzzle_map_ = value; +} +inline void Trail_map_type_filter::set_jump_puzzle_map(bool value) { + _internal_set_jump_puzzle_map(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.map_type_filter.jump_puzzle_map) +} + +// bool obsidian_sanctum_map = 21; +inline void Trail_map_type_filter::clear_obsidian_sanctum_map() { + obsidian_sanctum_map_ = false; +} +inline bool Trail_map_type_filter::_internal_obsidian_sanctum_map() const { + return obsidian_sanctum_map_; +} +inline bool Trail_map_type_filter::obsidian_sanctum_map() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.map_type_filter.obsidian_sanctum_map) + return _internal_obsidian_sanctum_map(); +} +inline void Trail_map_type_filter::_internal_set_obsidian_sanctum_map(bool value) { + + obsidian_sanctum_map_ = value; +} +inline void Trail_map_type_filter::set_obsidian_sanctum_map(bool value) { + _internal_set_obsidian_sanctum_map(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.map_type_filter.obsidian_sanctum_map) +} + +// bool edge_of_the_mists_map = 22; +inline void Trail_map_type_filter::clear_edge_of_the_mists_map() { + edge_of_the_mists_map_ = false; +} +inline bool Trail_map_type_filter::_internal_edge_of_the_mists_map() const { + return edge_of_the_mists_map_; +} +inline bool Trail_map_type_filter::edge_of_the_mists_map() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.map_type_filter.edge_of_the_mists_map) + return _internal_edge_of_the_mists_map(); +} +inline void Trail_map_type_filter::_internal_set_edge_of_the_mists_map(bool value) { + + edge_of_the_mists_map_ = value; +} +inline void Trail_map_type_filter::set_edge_of_the_mists_map(bool value) { + _internal_set_edge_of_the_mists_map(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.map_type_filter.edge_of_the_mists_map) +} + +// bool public_mini_map = 23; +inline void Trail_map_type_filter::clear_public_mini_map() { + public_mini_map_ = false; +} +inline bool Trail_map_type_filter::_internal_public_mini_map() const { + return public_mini_map_; +} +inline bool Trail_map_type_filter::public_mini_map() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.map_type_filter.public_mini_map) + return _internal_public_mini_map(); +} +inline void Trail_map_type_filter::_internal_set_public_mini_map(bool value) { + + public_mini_map_ = value; +} +inline void Trail_map_type_filter::set_public_mini_map(bool value) { + _internal_set_public_mini_map(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.map_type_filter.public_mini_map) +} + +// bool wvw_lounge_map = 24; +inline void Trail_map_type_filter::clear_wvw_lounge_map() { + wvw_lounge_map_ = false; +} +inline bool Trail_map_type_filter::_internal_wvw_lounge_map() const { + return wvw_lounge_map_; +} +inline bool Trail_map_type_filter::wvw_lounge_map() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.map_type_filter.wvw_lounge_map) + return _internal_wvw_lounge_map(); +} +inline void Trail_map_type_filter::_internal_set_wvw_lounge_map(bool value) { + + wvw_lounge_map_ = value; +} +inline void Trail_map_type_filter::set_wvw_lounge_map(bool value) { + _internal_set_wvw_lounge_map(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.map_type_filter.wvw_lounge_map) +} + +// ------------------------------------------------------------------- + +// Trail_mount_filter + +// bool raptor = 1; +inline void Trail_mount_filter::clear_raptor() { + raptor_ = false; +} +inline bool Trail_mount_filter::_internal_raptor() const { + return raptor_; +} +inline bool Trail_mount_filter::raptor() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.mount_filter.raptor) + return _internal_raptor(); +} +inline void Trail_mount_filter::_internal_set_raptor(bool value) { + + raptor_ = value; +} +inline void Trail_mount_filter::set_raptor(bool value) { + _internal_set_raptor(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.mount_filter.raptor) +} + +// bool springer = 2; +inline void Trail_mount_filter::clear_springer() { + springer_ = false; +} +inline bool Trail_mount_filter::_internal_springer() const { + return springer_; +} +inline bool Trail_mount_filter::springer() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.mount_filter.springer) + return _internal_springer(); +} +inline void Trail_mount_filter::_internal_set_springer(bool value) { + + springer_ = value; +} +inline void Trail_mount_filter::set_springer(bool value) { + _internal_set_springer(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.mount_filter.springer) +} + +// bool skimmer = 3; +inline void Trail_mount_filter::clear_skimmer() { + skimmer_ = false; +} +inline bool Trail_mount_filter::_internal_skimmer() const { + return skimmer_; +} +inline bool Trail_mount_filter::skimmer() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.mount_filter.skimmer) + return _internal_skimmer(); +} +inline void Trail_mount_filter::_internal_set_skimmer(bool value) { + + skimmer_ = value; +} +inline void Trail_mount_filter::set_skimmer(bool value) { + _internal_set_skimmer(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.mount_filter.skimmer) +} + +// bool jackal = 4; +inline void Trail_mount_filter::clear_jackal() { + jackal_ = false; +} +inline bool Trail_mount_filter::_internal_jackal() const { + return jackal_; +} +inline bool Trail_mount_filter::jackal() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.mount_filter.jackal) + return _internal_jackal(); +} +inline void Trail_mount_filter::_internal_set_jackal(bool value) { + + jackal_ = value; +} +inline void Trail_mount_filter::set_jackal(bool value) { + _internal_set_jackal(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.mount_filter.jackal) +} + +// bool griffon = 5; +inline void Trail_mount_filter::clear_griffon() { + griffon_ = false; +} +inline bool Trail_mount_filter::_internal_griffon() const { + return griffon_; +} +inline bool Trail_mount_filter::griffon() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.mount_filter.griffon) + return _internal_griffon(); +} +inline void Trail_mount_filter::_internal_set_griffon(bool value) { + + griffon_ = value; +} +inline void Trail_mount_filter::set_griffon(bool value) { + _internal_set_griffon(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.mount_filter.griffon) +} + +// bool roller_beetle = 6; +inline void Trail_mount_filter::clear_roller_beetle() { + roller_beetle_ = false; +} +inline bool Trail_mount_filter::_internal_roller_beetle() const { + return roller_beetle_; +} +inline bool Trail_mount_filter::roller_beetle() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.mount_filter.roller_beetle) + return _internal_roller_beetle(); +} +inline void Trail_mount_filter::_internal_set_roller_beetle(bool value) { + + roller_beetle_ = value; +} +inline void Trail_mount_filter::set_roller_beetle(bool value) { + _internal_set_roller_beetle(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.mount_filter.roller_beetle) +} + +// bool warclaw = 7; +inline void Trail_mount_filter::clear_warclaw() { + warclaw_ = false; +} +inline bool Trail_mount_filter::_internal_warclaw() const { + return warclaw_; +} +inline bool Trail_mount_filter::warclaw() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.mount_filter.warclaw) + return _internal_warclaw(); +} +inline void Trail_mount_filter::_internal_set_warclaw(bool value) { + + warclaw_ = value; +} +inline void Trail_mount_filter::set_warclaw(bool value) { + _internal_set_warclaw(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.mount_filter.warclaw) +} + +// bool skyscalee = 8; +inline void Trail_mount_filter::clear_skyscalee() { + skyscalee_ = false; +} +inline bool Trail_mount_filter::_internal_skyscalee() const { + return skyscalee_; +} +inline bool Trail_mount_filter::skyscalee() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.mount_filter.skyscalee) + return _internal_skyscalee(); +} +inline void Trail_mount_filter::_internal_set_skyscalee(bool value) { + + skyscalee_ = value; +} +inline void Trail_mount_filter::set_skyscalee(bool value) { + _internal_set_skyscalee(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.mount_filter.skyscalee) +} + +// bool skiff = 9; +inline void Trail_mount_filter::clear_skiff() { + skiff_ = false; +} +inline bool Trail_mount_filter::_internal_skiff() const { + return skiff_; +} +inline bool Trail_mount_filter::skiff() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.mount_filter.skiff) + return _internal_skiff(); +} +inline void Trail_mount_filter::_internal_set_skiff(bool value) { + + skiff_ = value; +} +inline void Trail_mount_filter::set_skiff(bool value) { + _internal_set_skiff(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.mount_filter.skiff) +} + +// bool seige_turtle = 10; +inline void Trail_mount_filter::clear_seige_turtle() { + seige_turtle_ = false; +} +inline bool Trail_mount_filter::_internal_seige_turtle() const { + return seige_turtle_; +} +inline bool Trail_mount_filter::seige_turtle() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.mount_filter.seige_turtle) + return _internal_seige_turtle(); +} +inline void Trail_mount_filter::_internal_set_seige_turtle(bool value) { + + seige_turtle_ = value; +} +inline void Trail_mount_filter::set_seige_turtle(bool value) { + _internal_set_seige_turtle(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.mount_filter.seige_turtle) +} + +// ------------------------------------------------------------------- + +// Trail_profession_filter + +// bool guardian = 1; +inline void Trail_profession_filter::clear_guardian() { + guardian_ = false; +} +inline bool Trail_profession_filter::_internal_guardian() const { + return guardian_; +} +inline bool Trail_profession_filter::guardian() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.profession_filter.guardian) + return _internal_guardian(); +} +inline void Trail_profession_filter::_internal_set_guardian(bool value) { + + guardian_ = value; +} +inline void Trail_profession_filter::set_guardian(bool value) { + _internal_set_guardian(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.profession_filter.guardian) +} + +// bool warrior = 2; +inline void Trail_profession_filter::clear_warrior() { + warrior_ = false; +} +inline bool Trail_profession_filter::_internal_warrior() const { + return warrior_; +} +inline bool Trail_profession_filter::warrior() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.profession_filter.warrior) + return _internal_warrior(); +} +inline void Trail_profession_filter::_internal_set_warrior(bool value) { + + warrior_ = value; +} +inline void Trail_profession_filter::set_warrior(bool value) { + _internal_set_warrior(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.profession_filter.warrior) +} + +// bool engineer = 3; +inline void Trail_profession_filter::clear_engineer() { + engineer_ = false; +} +inline bool Trail_profession_filter::_internal_engineer() const { + return engineer_; +} +inline bool Trail_profession_filter::engineer() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.profession_filter.engineer) + return _internal_engineer(); +} +inline void Trail_profession_filter::_internal_set_engineer(bool value) { + + engineer_ = value; +} +inline void Trail_profession_filter::set_engineer(bool value) { + _internal_set_engineer(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.profession_filter.engineer) +} + +// bool ranger = 4; +inline void Trail_profession_filter::clear_ranger() { + ranger_ = false; +} +inline bool Trail_profession_filter::_internal_ranger() const { + return ranger_; +} +inline bool Trail_profession_filter::ranger() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.profession_filter.ranger) + return _internal_ranger(); +} +inline void Trail_profession_filter::_internal_set_ranger(bool value) { + + ranger_ = value; +} +inline void Trail_profession_filter::set_ranger(bool value) { + _internal_set_ranger(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.profession_filter.ranger) +} + +// bool thief = 5; +inline void Trail_profession_filter::clear_thief() { + thief_ = false; +} +inline bool Trail_profession_filter::_internal_thief() const { + return thief_; +} +inline bool Trail_profession_filter::thief() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.profession_filter.thief) + return _internal_thief(); +} +inline void Trail_profession_filter::_internal_set_thief(bool value) { + + thief_ = value; +} +inline void Trail_profession_filter::set_thief(bool value) { + _internal_set_thief(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.profession_filter.thief) +} + +// bool elementalist = 6; +inline void Trail_profession_filter::clear_elementalist() { + elementalist_ = false; +} +inline bool Trail_profession_filter::_internal_elementalist() const { + return elementalist_; +} +inline bool Trail_profession_filter::elementalist() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.profession_filter.elementalist) + return _internal_elementalist(); +} +inline void Trail_profession_filter::_internal_set_elementalist(bool value) { + + elementalist_ = value; +} +inline void Trail_profession_filter::set_elementalist(bool value) { + _internal_set_elementalist(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.profession_filter.elementalist) +} + +// bool mesmer = 7; +inline void Trail_profession_filter::clear_mesmer() { + mesmer_ = false; +} +inline bool Trail_profession_filter::_internal_mesmer() const { + return mesmer_; +} +inline bool Trail_profession_filter::mesmer() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.profession_filter.mesmer) + return _internal_mesmer(); +} +inline void Trail_profession_filter::_internal_set_mesmer(bool value) { + + mesmer_ = value; +} +inline void Trail_profession_filter::set_mesmer(bool value) { + _internal_set_mesmer(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.profession_filter.mesmer) +} + +// bool necromancer = 8; +inline void Trail_profession_filter::clear_necromancer() { + necromancer_ = false; +} +inline bool Trail_profession_filter::_internal_necromancer() const { + return necromancer_; +} +inline bool Trail_profession_filter::necromancer() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.profession_filter.necromancer) + return _internal_necromancer(); +} +inline void Trail_profession_filter::_internal_set_necromancer(bool value) { + + necromancer_ = value; +} +inline void Trail_profession_filter::set_necromancer(bool value) { + _internal_set_necromancer(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.profession_filter.necromancer) +} + +// bool revenantnt = 9; +inline void Trail_profession_filter::clear_revenantnt() { + revenantnt_ = false; +} +inline bool Trail_profession_filter::_internal_revenantnt() const { + return revenantnt_; +} +inline bool Trail_profession_filter::revenantnt() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.profession_filter.revenantnt) + return _internal_revenantnt(); +} +inline void Trail_profession_filter::_internal_set_revenantnt(bool value) { + + revenantnt_ = value; +} +inline void Trail_profession_filter::set_revenantnt(bool value) { + _internal_set_revenantnt(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.profession_filter.revenantnt) +} + +// ------------------------------------------------------------------- + +// Trail_specialization_filter + +// bool elementalist_tempest = 48; +inline void Trail_specialization_filter::clear_elementalist_tempest() { + elementalist_tempest_ = false; +} +inline bool Trail_specialization_filter::_internal_elementalist_tempest() const { + return elementalist_tempest_; +} +inline bool Trail_specialization_filter::elementalist_tempest() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.elementalist_tempest) + return _internal_elementalist_tempest(); +} +inline void Trail_specialization_filter::_internal_set_elementalist_tempest(bool value) { + + elementalist_tempest_ = value; +} +inline void Trail_specialization_filter::set_elementalist_tempest(bool value) { + _internal_set_elementalist_tempest(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.elementalist_tempest) +} + +// bool engineer_scrapper = 43; +inline void Trail_specialization_filter::clear_engineer_scrapper() { + engineer_scrapper_ = false; +} +inline bool Trail_specialization_filter::_internal_engineer_scrapper() const { + return engineer_scrapper_; +} +inline bool Trail_specialization_filter::engineer_scrapper() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.engineer_scrapper) + return _internal_engineer_scrapper(); +} +inline void Trail_specialization_filter::_internal_set_engineer_scrapper(bool value) { + + engineer_scrapper_ = value; +} +inline void Trail_specialization_filter::set_engineer_scrapper(bool value) { + _internal_set_engineer_scrapper(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.engineer_scrapper) +} + +// bool guardian_dragonhunter = 27; +inline void Trail_specialization_filter::clear_guardian_dragonhunter() { + guardian_dragonhunter_ = false; +} +inline bool Trail_specialization_filter::_internal_guardian_dragonhunter() const { + return guardian_dragonhunter_; +} +inline bool Trail_specialization_filter::guardian_dragonhunter() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.guardian_dragonhunter) + return _internal_guardian_dragonhunter(); +} +inline void Trail_specialization_filter::_internal_set_guardian_dragonhunter(bool value) { + + guardian_dragonhunter_ = value; +} +inline void Trail_specialization_filter::set_guardian_dragonhunter(bool value) { + _internal_set_guardian_dragonhunter(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.guardian_dragonhunter) +} + +// bool mesmer_chronomancer = 40; +inline void Trail_specialization_filter::clear_mesmer_chronomancer() { + mesmer_chronomancer_ = false; +} +inline bool Trail_specialization_filter::_internal_mesmer_chronomancer() const { + return mesmer_chronomancer_; +} +inline bool Trail_specialization_filter::mesmer_chronomancer() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.mesmer_chronomancer) + return _internal_mesmer_chronomancer(); +} +inline void Trail_specialization_filter::_internal_set_mesmer_chronomancer(bool value) { + + mesmer_chronomancer_ = value; +} +inline void Trail_specialization_filter::set_mesmer_chronomancer(bool value) { + _internal_set_mesmer_chronomancer(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.mesmer_chronomancer) +} + +// bool necromancer_reaper = 34; +inline void Trail_specialization_filter::clear_necromancer_reaper() { + necromancer_reaper_ = false; +} +inline bool Trail_specialization_filter::_internal_necromancer_reaper() const { + return necromancer_reaper_; +} +inline bool Trail_specialization_filter::necromancer_reaper() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.necromancer_reaper) + return _internal_necromancer_reaper(); +} +inline void Trail_specialization_filter::_internal_set_necromancer_reaper(bool value) { + + necromancer_reaper_ = value; +} +inline void Trail_specialization_filter::set_necromancer_reaper(bool value) { + _internal_set_necromancer_reaper(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.necromancer_reaper) +} + +// bool ranger_druid = 5; +inline void Trail_specialization_filter::clear_ranger_druid() { + ranger_druid_ = false; +} +inline bool Trail_specialization_filter::_internal_ranger_druid() const { + return ranger_druid_; +} +inline bool Trail_specialization_filter::ranger_druid() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.ranger_druid) + return _internal_ranger_druid(); +} +inline void Trail_specialization_filter::_internal_set_ranger_druid(bool value) { + + ranger_druid_ = value; +} +inline void Trail_specialization_filter::set_ranger_druid(bool value) { + _internal_set_ranger_druid(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.ranger_druid) +} + +// bool revenant_herald = 52; +inline void Trail_specialization_filter::clear_revenant_herald() { + revenant_herald_ = false; +} +inline bool Trail_specialization_filter::_internal_revenant_herald() const { + return revenant_herald_; +} +inline bool Trail_specialization_filter::revenant_herald() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.revenant_herald) + return _internal_revenant_herald(); +} +inline void Trail_specialization_filter::_internal_set_revenant_herald(bool value) { + + revenant_herald_ = value; +} +inline void Trail_specialization_filter::set_revenant_herald(bool value) { + _internal_set_revenant_herald(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.revenant_herald) +} + +// bool thief_daredevil = 7; +inline void Trail_specialization_filter::clear_thief_daredevil() { + thief_daredevil_ = false; +} +inline bool Trail_specialization_filter::_internal_thief_daredevil() const { + return thief_daredevil_; +} +inline bool Trail_specialization_filter::thief_daredevil() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.thief_daredevil) + return _internal_thief_daredevil(); +} +inline void Trail_specialization_filter::_internal_set_thief_daredevil(bool value) { + + thief_daredevil_ = value; +} +inline void Trail_specialization_filter::set_thief_daredevil(bool value) { + _internal_set_thief_daredevil(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.thief_daredevil) +} + +// bool warrior_berserker = 18; +inline void Trail_specialization_filter::clear_warrior_berserker() { + warrior_berserker_ = false; +} +inline bool Trail_specialization_filter::_internal_warrior_berserker() const { + return warrior_berserker_; +} +inline bool Trail_specialization_filter::warrior_berserker() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.warrior_berserker) + return _internal_warrior_berserker(); +} +inline void Trail_specialization_filter::_internal_set_warrior_berserker(bool value) { + + warrior_berserker_ = value; +} +inline void Trail_specialization_filter::set_warrior_berserker(bool value) { + _internal_set_warrior_berserker(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.warrior_berserker) +} + +// bool elementalist_weaver = 56; +inline void Trail_specialization_filter::clear_elementalist_weaver() { + elementalist_weaver_ = false; +} +inline bool Trail_specialization_filter::_internal_elementalist_weaver() const { + return elementalist_weaver_; +} +inline bool Trail_specialization_filter::elementalist_weaver() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.elementalist_weaver) + return _internal_elementalist_weaver(); +} +inline void Trail_specialization_filter::_internal_set_elementalist_weaver(bool value) { + + elementalist_weaver_ = value; +} +inline void Trail_specialization_filter::set_elementalist_weaver(bool value) { + _internal_set_elementalist_weaver(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.elementalist_weaver) +} + +// bool engineer_holosmith = 57; +inline void Trail_specialization_filter::clear_engineer_holosmith() { + engineer_holosmith_ = false; +} +inline bool Trail_specialization_filter::_internal_engineer_holosmith() const { + return engineer_holosmith_; +} +inline bool Trail_specialization_filter::engineer_holosmith() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.engineer_holosmith) + return _internal_engineer_holosmith(); +} +inline void Trail_specialization_filter::_internal_set_engineer_holosmith(bool value) { + + engineer_holosmith_ = value; +} +inline void Trail_specialization_filter::set_engineer_holosmith(bool value) { + _internal_set_engineer_holosmith(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.engineer_holosmith) +} + +// bool guardian_firebrand = 62; +inline void Trail_specialization_filter::clear_guardian_firebrand() { + guardian_firebrand_ = false; +} +inline bool Trail_specialization_filter::_internal_guardian_firebrand() const { + return guardian_firebrand_; +} +inline bool Trail_specialization_filter::guardian_firebrand() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.guardian_firebrand) + return _internal_guardian_firebrand(); +} +inline void Trail_specialization_filter::_internal_set_guardian_firebrand(bool value) { + + guardian_firebrand_ = value; +} +inline void Trail_specialization_filter::set_guardian_firebrand(bool value) { + _internal_set_guardian_firebrand(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.guardian_firebrand) +} + +// bool mesmer_mirage = 59; +inline void Trail_specialization_filter::clear_mesmer_mirage() { + mesmer_mirage_ = false; +} +inline bool Trail_specialization_filter::_internal_mesmer_mirage() const { + return mesmer_mirage_; +} +inline bool Trail_specialization_filter::mesmer_mirage() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.mesmer_mirage) + return _internal_mesmer_mirage(); +} +inline void Trail_specialization_filter::_internal_set_mesmer_mirage(bool value) { + + mesmer_mirage_ = value; +} +inline void Trail_specialization_filter::set_mesmer_mirage(bool value) { + _internal_set_mesmer_mirage(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.mesmer_mirage) +} + +// bool necromancer_scourge = 60; +inline void Trail_specialization_filter::clear_necromancer_scourge() { + necromancer_scourge_ = false; +} +inline bool Trail_specialization_filter::_internal_necromancer_scourge() const { + return necromancer_scourge_; +} +inline bool Trail_specialization_filter::necromancer_scourge() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.necromancer_scourge) + return _internal_necromancer_scourge(); +} +inline void Trail_specialization_filter::_internal_set_necromancer_scourge(bool value) { + + necromancer_scourge_ = value; +} +inline void Trail_specialization_filter::set_necromancer_scourge(bool value) { + _internal_set_necromancer_scourge(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.necromancer_scourge) +} + +// bool ranger_soulbeast = 55; +inline void Trail_specialization_filter::clear_ranger_soulbeast() { + ranger_soulbeast_ = false; +} +inline bool Trail_specialization_filter::_internal_ranger_soulbeast() const { + return ranger_soulbeast_; +} +inline bool Trail_specialization_filter::ranger_soulbeast() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.ranger_soulbeast) + return _internal_ranger_soulbeast(); +} +inline void Trail_specialization_filter::_internal_set_ranger_soulbeast(bool value) { + + ranger_soulbeast_ = value; +} +inline void Trail_specialization_filter::set_ranger_soulbeast(bool value) { + _internal_set_ranger_soulbeast(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.ranger_soulbeast) +} + +// bool revenant_renegade = 63; +inline void Trail_specialization_filter::clear_revenant_renegade() { + revenant_renegade_ = false; +} +inline bool Trail_specialization_filter::_internal_revenant_renegade() const { + return revenant_renegade_; +} +inline bool Trail_specialization_filter::revenant_renegade() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.revenant_renegade) + return _internal_revenant_renegade(); +} +inline void Trail_specialization_filter::_internal_set_revenant_renegade(bool value) { + + revenant_renegade_ = value; +} +inline void Trail_specialization_filter::set_revenant_renegade(bool value) { + _internal_set_revenant_renegade(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.revenant_renegade) +} + +// bool thief_deadeye = 58; +inline void Trail_specialization_filter::clear_thief_deadeye() { + thief_deadeye_ = false; +} +inline bool Trail_specialization_filter::_internal_thief_deadeye() const { + return thief_deadeye_; +} +inline bool Trail_specialization_filter::thief_deadeye() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.thief_deadeye) + return _internal_thief_deadeye(); +} +inline void Trail_specialization_filter::_internal_set_thief_deadeye(bool value) { + + thief_deadeye_ = value; +} +inline void Trail_specialization_filter::set_thief_deadeye(bool value) { + _internal_set_thief_deadeye(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.thief_deadeye) +} + +// bool warrior_spellbreaker = 61; +inline void Trail_specialization_filter::clear_warrior_spellbreaker() { + warrior_spellbreaker_ = false; +} +inline bool Trail_specialization_filter::_internal_warrior_spellbreaker() const { + return warrior_spellbreaker_; +} +inline bool Trail_specialization_filter::warrior_spellbreaker() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.warrior_spellbreaker) + return _internal_warrior_spellbreaker(); +} +inline void Trail_specialization_filter::_internal_set_warrior_spellbreaker(bool value) { + + warrior_spellbreaker_ = value; +} +inline void Trail_specialization_filter::set_warrior_spellbreaker(bool value) { + _internal_set_warrior_spellbreaker(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.warrior_spellbreaker) +} + +// bool elmentalist_catalyst = 67; +inline void Trail_specialization_filter::clear_elmentalist_catalyst() { + elmentalist_catalyst_ = false; +} +inline bool Trail_specialization_filter::_internal_elmentalist_catalyst() const { + return elmentalist_catalyst_; +} +inline bool Trail_specialization_filter::elmentalist_catalyst() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.elmentalist_catalyst) + return _internal_elmentalist_catalyst(); +} +inline void Trail_specialization_filter::_internal_set_elmentalist_catalyst(bool value) { + + elmentalist_catalyst_ = value; +} +inline void Trail_specialization_filter::set_elmentalist_catalyst(bool value) { + _internal_set_elmentalist_catalyst(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.elmentalist_catalyst) +} + +// bool engineer_mechanist = 70; +inline void Trail_specialization_filter::clear_engineer_mechanist() { + engineer_mechanist_ = false; +} +inline bool Trail_specialization_filter::_internal_engineer_mechanist() const { + return engineer_mechanist_; +} +inline bool Trail_specialization_filter::engineer_mechanist() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.engineer_mechanist) + return _internal_engineer_mechanist(); +} +inline void Trail_specialization_filter::_internal_set_engineer_mechanist(bool value) { + + engineer_mechanist_ = value; +} +inline void Trail_specialization_filter::set_engineer_mechanist(bool value) { + _internal_set_engineer_mechanist(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.engineer_mechanist) +} + +// bool guardian_willbender = 65; +inline void Trail_specialization_filter::clear_guardian_willbender() { + guardian_willbender_ = false; +} +inline bool Trail_specialization_filter::_internal_guardian_willbender() const { + return guardian_willbender_; +} +inline bool Trail_specialization_filter::guardian_willbender() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.guardian_willbender) + return _internal_guardian_willbender(); +} +inline void Trail_specialization_filter::_internal_set_guardian_willbender(bool value) { + + guardian_willbender_ = value; +} +inline void Trail_specialization_filter::set_guardian_willbender(bool value) { + _internal_set_guardian_willbender(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.guardian_willbender) +} + +// bool mesmer_virtuoso = 66; +inline void Trail_specialization_filter::clear_mesmer_virtuoso() { + mesmer_virtuoso_ = false; +} +inline bool Trail_specialization_filter::_internal_mesmer_virtuoso() const { + return mesmer_virtuoso_; +} +inline bool Trail_specialization_filter::mesmer_virtuoso() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.mesmer_virtuoso) + return _internal_mesmer_virtuoso(); +} +inline void Trail_specialization_filter::_internal_set_mesmer_virtuoso(bool value) { + + mesmer_virtuoso_ = value; +} +inline void Trail_specialization_filter::set_mesmer_virtuoso(bool value) { + _internal_set_mesmer_virtuoso(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.mesmer_virtuoso) +} + +// bool necromancer_harbinger = 64; +inline void Trail_specialization_filter::clear_necromancer_harbinger() { + necromancer_harbinger_ = false; +} +inline bool Trail_specialization_filter::_internal_necromancer_harbinger() const { + return necromancer_harbinger_; +} +inline bool Trail_specialization_filter::necromancer_harbinger() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.necromancer_harbinger) + return _internal_necromancer_harbinger(); +} +inline void Trail_specialization_filter::_internal_set_necromancer_harbinger(bool value) { + + necromancer_harbinger_ = value; +} +inline void Trail_specialization_filter::set_necromancer_harbinger(bool value) { + _internal_set_necromancer_harbinger(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.necromancer_harbinger) +} + +// bool ranger_untamed = 72; +inline void Trail_specialization_filter::clear_ranger_untamed() { + ranger_untamed_ = false; +} +inline bool Trail_specialization_filter::_internal_ranger_untamed() const { + return ranger_untamed_; +} +inline bool Trail_specialization_filter::ranger_untamed() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.ranger_untamed) + return _internal_ranger_untamed(); +} +inline void Trail_specialization_filter::_internal_set_ranger_untamed(bool value) { + + ranger_untamed_ = value; +} +inline void Trail_specialization_filter::set_ranger_untamed(bool value) { + _internal_set_ranger_untamed(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.ranger_untamed) +} + +// bool revenant_vindicator = 69; +inline void Trail_specialization_filter::clear_revenant_vindicator() { + revenant_vindicator_ = false; +} +inline bool Trail_specialization_filter::_internal_revenant_vindicator() const { + return revenant_vindicator_; +} +inline bool Trail_specialization_filter::revenant_vindicator() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.revenant_vindicator) + return _internal_revenant_vindicator(); +} +inline void Trail_specialization_filter::_internal_set_revenant_vindicator(bool value) { + + revenant_vindicator_ = value; +} +inline void Trail_specialization_filter::set_revenant_vindicator(bool value) { + _internal_set_revenant_vindicator(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.revenant_vindicator) +} + +// bool thief_specter = 71; +inline void Trail_specialization_filter::clear_thief_specter() { + thief_specter_ = false; +} +inline bool Trail_specialization_filter::_internal_thief_specter() const { + return thief_specter_; +} +inline bool Trail_specialization_filter::thief_specter() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.thief_specter) + return _internal_thief_specter(); +} +inline void Trail_specialization_filter::_internal_set_thief_specter(bool value) { + + thief_specter_ = value; +} +inline void Trail_specialization_filter::set_thief_specter(bool value) { + _internal_set_thief_specter(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.thief_specter) +} + +// bool warrior_bladesworn = 68; +inline void Trail_specialization_filter::clear_warrior_bladesworn() { + warrior_bladesworn_ = false; +} +inline bool Trail_specialization_filter::_internal_warrior_bladesworn() const { + return warrior_bladesworn_; +} +inline bool Trail_specialization_filter::warrior_bladesworn() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.warrior_bladesworn) + return _internal_warrior_bladesworn(); +} +inline void Trail_specialization_filter::_internal_set_warrior_bladesworn(bool value) { + + warrior_bladesworn_ = value; +} +inline void Trail_specialization_filter::set_warrior_bladesworn(bool value) { + _internal_set_warrior_bladesworn(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.warrior_bladesworn) +} + +// bool elementalist_air = 41; +inline void Trail_specialization_filter::clear_elementalist_air() { + elementalist_air_ = false; +} +inline bool Trail_specialization_filter::_internal_elementalist_air() const { + return elementalist_air_; +} +inline bool Trail_specialization_filter::elementalist_air() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.elementalist_air) + return _internal_elementalist_air(); +} +inline void Trail_specialization_filter::_internal_set_elementalist_air(bool value) { + + elementalist_air_ = value; +} +inline void Trail_specialization_filter::set_elementalist_air(bool value) { + _internal_set_elementalist_air(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.elementalist_air) +} + +// bool elementalist_arcane = 37; +inline void Trail_specialization_filter::clear_elementalist_arcane() { + elementalist_arcane_ = false; +} +inline bool Trail_specialization_filter::_internal_elementalist_arcane() const { + return elementalist_arcane_; +} +inline bool Trail_specialization_filter::elementalist_arcane() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.elementalist_arcane) + return _internal_elementalist_arcane(); +} +inline void Trail_specialization_filter::_internal_set_elementalist_arcane(bool value) { + + elementalist_arcane_ = value; +} +inline void Trail_specialization_filter::set_elementalist_arcane(bool value) { + _internal_set_elementalist_arcane(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.elementalist_arcane) +} + +// bool elementalist_earth = 26; +inline void Trail_specialization_filter::clear_elementalist_earth() { + elementalist_earth_ = false; +} +inline bool Trail_specialization_filter::_internal_elementalist_earth() const { + return elementalist_earth_; +} +inline bool Trail_specialization_filter::elementalist_earth() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.elementalist_earth) + return _internal_elementalist_earth(); +} +inline void Trail_specialization_filter::_internal_set_elementalist_earth(bool value) { + + elementalist_earth_ = value; +} +inline void Trail_specialization_filter::set_elementalist_earth(bool value) { + _internal_set_elementalist_earth(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.elementalist_earth) +} + +// bool elementalist_fire = 31; +inline void Trail_specialization_filter::clear_elementalist_fire() { + elementalist_fire_ = false; +} +inline bool Trail_specialization_filter::_internal_elementalist_fire() const { + return elementalist_fire_; +} +inline bool Trail_specialization_filter::elementalist_fire() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.elementalist_fire) + return _internal_elementalist_fire(); +} +inline void Trail_specialization_filter::_internal_set_elementalist_fire(bool value) { + + elementalist_fire_ = value; +} +inline void Trail_specialization_filter::set_elementalist_fire(bool value) { + _internal_set_elementalist_fire(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.elementalist_fire) +} + +// bool elementalist_water = 17; +inline void Trail_specialization_filter::clear_elementalist_water() { + elementalist_water_ = false; +} +inline bool Trail_specialization_filter::_internal_elementalist_water() const { + return elementalist_water_; +} +inline bool Trail_specialization_filter::elementalist_water() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.elementalist_water) + return _internal_elementalist_water(); +} +inline void Trail_specialization_filter::_internal_set_elementalist_water(bool value) { + + elementalist_water_ = value; +} +inline void Trail_specialization_filter::set_elementalist_water(bool value) { + _internal_set_elementalist_water(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.elementalist_water) +} + +// bool engineer_alchemy = 29; +inline void Trail_specialization_filter::clear_engineer_alchemy() { + engineer_alchemy_ = false; +} +inline bool Trail_specialization_filter::_internal_engineer_alchemy() const { + return engineer_alchemy_; +} +inline bool Trail_specialization_filter::engineer_alchemy() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.engineer_alchemy) + return _internal_engineer_alchemy(); +} +inline void Trail_specialization_filter::_internal_set_engineer_alchemy(bool value) { + + engineer_alchemy_ = value; +} +inline void Trail_specialization_filter::set_engineer_alchemy(bool value) { + _internal_set_engineer_alchemy(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.engineer_alchemy) +} + +// bool engineer_explosives = 6; +inline void Trail_specialization_filter::clear_engineer_explosives() { + engineer_explosives_ = false; +} +inline bool Trail_specialization_filter::_internal_engineer_explosives() const { + return engineer_explosives_; +} +inline bool Trail_specialization_filter::engineer_explosives() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.engineer_explosives) + return _internal_engineer_explosives(); +} +inline void Trail_specialization_filter::_internal_set_engineer_explosives(bool value) { + + engineer_explosives_ = value; +} +inline void Trail_specialization_filter::set_engineer_explosives(bool value) { + _internal_set_engineer_explosives(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.engineer_explosives) +} + +// bool engineer_firearms = 38; +inline void Trail_specialization_filter::clear_engineer_firearms() { + engineer_firearms_ = false; +} +inline bool Trail_specialization_filter::_internal_engineer_firearms() const { + return engineer_firearms_; +} +inline bool Trail_specialization_filter::engineer_firearms() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.engineer_firearms) + return _internal_engineer_firearms(); +} +inline void Trail_specialization_filter::_internal_set_engineer_firearms(bool value) { + + engineer_firearms_ = value; +} +inline void Trail_specialization_filter::set_engineer_firearms(bool value) { + _internal_set_engineer_firearms(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.engineer_firearms) +} + +// bool engineer_inventions = 47; +inline void Trail_specialization_filter::clear_engineer_inventions() { + engineer_inventions_ = false; +} +inline bool Trail_specialization_filter::_internal_engineer_inventions() const { + return engineer_inventions_; +} +inline bool Trail_specialization_filter::engineer_inventions() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.engineer_inventions) + return _internal_engineer_inventions(); +} +inline void Trail_specialization_filter::_internal_set_engineer_inventions(bool value) { + + engineer_inventions_ = value; +} +inline void Trail_specialization_filter::set_engineer_inventions(bool value) { + _internal_set_engineer_inventions(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.engineer_inventions) +} + +// bool engineer_tools = 21; +inline void Trail_specialization_filter::clear_engineer_tools() { + engineer_tools_ = false; +} +inline bool Trail_specialization_filter::_internal_engineer_tools() const { + return engineer_tools_; +} +inline bool Trail_specialization_filter::engineer_tools() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.engineer_tools) + return _internal_engineer_tools(); +} +inline void Trail_specialization_filter::_internal_set_engineer_tools(bool value) { + + engineer_tools_ = value; +} +inline void Trail_specialization_filter::set_engineer_tools(bool value) { + _internal_set_engineer_tools(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.engineer_tools) +} + +// bool guardian_honor = 49; +inline void Trail_specialization_filter::clear_guardian_honor() { + guardian_honor_ = false; +} +inline bool Trail_specialization_filter::_internal_guardian_honor() const { + return guardian_honor_; +} +inline bool Trail_specialization_filter::guardian_honor() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.guardian_honor) + return _internal_guardian_honor(); +} +inline void Trail_specialization_filter::_internal_set_guardian_honor(bool value) { + + guardian_honor_ = value; +} +inline void Trail_specialization_filter::set_guardian_honor(bool value) { + _internal_set_guardian_honor(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.guardian_honor) +} + +// bool guardian_radiance = 16; +inline void Trail_specialization_filter::clear_guardian_radiance() { + guardian_radiance_ = false; +} +inline bool Trail_specialization_filter::_internal_guardian_radiance() const { + return guardian_radiance_; +} +inline bool Trail_specialization_filter::guardian_radiance() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.guardian_radiance) + return _internal_guardian_radiance(); +} +inline void Trail_specialization_filter::_internal_set_guardian_radiance(bool value) { + + guardian_radiance_ = value; +} +inline void Trail_specialization_filter::set_guardian_radiance(bool value) { + _internal_set_guardian_radiance(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.guardian_radiance) +} + +// bool guardian_valor = 13; +inline void Trail_specialization_filter::clear_guardian_valor() { + guardian_valor_ = false; +} +inline bool Trail_specialization_filter::_internal_guardian_valor() const { + return guardian_valor_; +} +inline bool Trail_specialization_filter::guardian_valor() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.guardian_valor) + return _internal_guardian_valor(); +} +inline void Trail_specialization_filter::_internal_set_guardian_valor(bool value) { + + guardian_valor_ = value; +} +inline void Trail_specialization_filter::set_guardian_valor(bool value) { + _internal_set_guardian_valor(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.guardian_valor) +} + +// bool guardian_virtues = 46; +inline void Trail_specialization_filter::clear_guardian_virtues() { + guardian_virtues_ = false; +} +inline bool Trail_specialization_filter::_internal_guardian_virtues() const { + return guardian_virtues_; +} +inline bool Trail_specialization_filter::guardian_virtues() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.guardian_virtues) + return _internal_guardian_virtues(); +} +inline void Trail_specialization_filter::_internal_set_guardian_virtues(bool value) { + + guardian_virtues_ = value; +} +inline void Trail_specialization_filter::set_guardian_virtues(bool value) { + _internal_set_guardian_virtues(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.guardian_virtues) +} + +// bool guardian_zeal = 42; +inline void Trail_specialization_filter::clear_guardian_zeal() { + guardian_zeal_ = false; +} +inline bool Trail_specialization_filter::_internal_guardian_zeal() const { + return guardian_zeal_; +} +inline bool Trail_specialization_filter::guardian_zeal() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.guardian_zeal) + return _internal_guardian_zeal(); +} +inline void Trail_specialization_filter::_internal_set_guardian_zeal(bool value) { + + guardian_zeal_ = value; +} +inline void Trail_specialization_filter::set_guardian_zeal(bool value) { + _internal_set_guardian_zeal(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.guardian_zeal) +} + +// bool mesmer_chaos = 45; +inline void Trail_specialization_filter::clear_mesmer_chaos() { + mesmer_chaos_ = false; +} +inline bool Trail_specialization_filter::_internal_mesmer_chaos() const { + return mesmer_chaos_; +} +inline bool Trail_specialization_filter::mesmer_chaos() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.mesmer_chaos) + return _internal_mesmer_chaos(); +} +inline void Trail_specialization_filter::_internal_set_mesmer_chaos(bool value) { + + mesmer_chaos_ = value; +} +inline void Trail_specialization_filter::set_mesmer_chaos(bool value) { + _internal_set_mesmer_chaos(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.mesmer_chaos) +} + +// bool mesmer_domination = 10; +inline void Trail_specialization_filter::clear_mesmer_domination() { + mesmer_domination_ = false; +} +inline bool Trail_specialization_filter::_internal_mesmer_domination() const { + return mesmer_domination_; +} +inline bool Trail_specialization_filter::mesmer_domination() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.mesmer_domination) + return _internal_mesmer_domination(); +} +inline void Trail_specialization_filter::_internal_set_mesmer_domination(bool value) { + + mesmer_domination_ = value; +} +inline void Trail_specialization_filter::set_mesmer_domination(bool value) { + _internal_set_mesmer_domination(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.mesmer_domination) +} + +// bool mesmer_dueling = 1; +inline void Trail_specialization_filter::clear_mesmer_dueling() { + mesmer_dueling_ = false; +} +inline bool Trail_specialization_filter::_internal_mesmer_dueling() const { + return mesmer_dueling_; +} +inline bool Trail_specialization_filter::mesmer_dueling() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.mesmer_dueling) + return _internal_mesmer_dueling(); +} +inline void Trail_specialization_filter::_internal_set_mesmer_dueling(bool value) { + + mesmer_dueling_ = value; +} +inline void Trail_specialization_filter::set_mesmer_dueling(bool value) { + _internal_set_mesmer_dueling(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.mesmer_dueling) +} + +// bool mesmer_illusions = 24; +inline void Trail_specialization_filter::clear_mesmer_illusions() { + mesmer_illusions_ = false; +} +inline bool Trail_specialization_filter::_internal_mesmer_illusions() const { + return mesmer_illusions_; +} +inline bool Trail_specialization_filter::mesmer_illusions() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.mesmer_illusions) + return _internal_mesmer_illusions(); +} +inline void Trail_specialization_filter::_internal_set_mesmer_illusions(bool value) { + + mesmer_illusions_ = value; +} +inline void Trail_specialization_filter::set_mesmer_illusions(bool value) { + _internal_set_mesmer_illusions(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.mesmer_illusions) +} + +// bool mesmer_inspiration = 23; +inline void Trail_specialization_filter::clear_mesmer_inspiration() { + mesmer_inspiration_ = false; +} +inline bool Trail_specialization_filter::_internal_mesmer_inspiration() const { + return mesmer_inspiration_; +} +inline bool Trail_specialization_filter::mesmer_inspiration() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.mesmer_inspiration) + return _internal_mesmer_inspiration(); +} +inline void Trail_specialization_filter::_internal_set_mesmer_inspiration(bool value) { + + mesmer_inspiration_ = value; +} +inline void Trail_specialization_filter::set_mesmer_inspiration(bool value) { + _internal_set_mesmer_inspiration(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.mesmer_inspiration) +} + +// bool necromancer_blood_magic = 19; +inline void Trail_specialization_filter::clear_necromancer_blood_magic() { + necromancer_blood_magic_ = false; +} +inline bool Trail_specialization_filter::_internal_necromancer_blood_magic() const { + return necromancer_blood_magic_; +} +inline bool Trail_specialization_filter::necromancer_blood_magic() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.necromancer_blood_magic) + return _internal_necromancer_blood_magic(); +} +inline void Trail_specialization_filter::_internal_set_necromancer_blood_magic(bool value) { + + necromancer_blood_magic_ = value; +} +inline void Trail_specialization_filter::set_necromancer_blood_magic(bool value) { + _internal_set_necromancer_blood_magic(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.necromancer_blood_magic) +} + +// bool necromancer_curses = 39; +inline void Trail_specialization_filter::clear_necromancer_curses() { + necromancer_curses_ = false; +} +inline bool Trail_specialization_filter::_internal_necromancer_curses() const { + return necromancer_curses_; +} +inline bool Trail_specialization_filter::necromancer_curses() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.necromancer_curses) + return _internal_necromancer_curses(); +} +inline void Trail_specialization_filter::_internal_set_necromancer_curses(bool value) { + + necromancer_curses_ = value; +} +inline void Trail_specialization_filter::set_necromancer_curses(bool value) { + _internal_set_necromancer_curses(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.necromancer_curses) +} + +// bool necromancer_death_magic = 2; +inline void Trail_specialization_filter::clear_necromancer_death_magic() { + necromancer_death_magic_ = false; +} +inline bool Trail_specialization_filter::_internal_necromancer_death_magic() const { + return necromancer_death_magic_; +} +inline bool Trail_specialization_filter::necromancer_death_magic() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.necromancer_death_magic) + return _internal_necromancer_death_magic(); +} +inline void Trail_specialization_filter::_internal_set_necromancer_death_magic(bool value) { + + necromancer_death_magic_ = value; +} +inline void Trail_specialization_filter::set_necromancer_death_magic(bool value) { + _internal_set_necromancer_death_magic(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.necromancer_death_magic) +} + +// bool necromancer_soul_reaping = 50; +inline void Trail_specialization_filter::clear_necromancer_soul_reaping() { + necromancer_soul_reaping_ = false; +} +inline bool Trail_specialization_filter::_internal_necromancer_soul_reaping() const { + return necromancer_soul_reaping_; +} +inline bool Trail_specialization_filter::necromancer_soul_reaping() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.necromancer_soul_reaping) + return _internal_necromancer_soul_reaping(); +} +inline void Trail_specialization_filter::_internal_set_necromancer_soul_reaping(bool value) { + + necromancer_soul_reaping_ = value; +} +inline void Trail_specialization_filter::set_necromancer_soul_reaping(bool value) { + _internal_set_necromancer_soul_reaping(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.necromancer_soul_reaping) +} + +// bool necromancer_spite = 53; +inline void Trail_specialization_filter::clear_necromancer_spite() { + necromancer_spite_ = false; +} +inline bool Trail_specialization_filter::_internal_necromancer_spite() const { + return necromancer_spite_; +} +inline bool Trail_specialization_filter::necromancer_spite() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.necromancer_spite) + return _internal_necromancer_spite(); +} +inline void Trail_specialization_filter::_internal_set_necromancer_spite(bool value) { + + necromancer_spite_ = value; +} +inline void Trail_specialization_filter::set_necromancer_spite(bool value) { + _internal_set_necromancer_spite(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.necromancer_spite) +} + +// bool ranger_beastmastery = 32; +inline void Trail_specialization_filter::clear_ranger_beastmastery() { + ranger_beastmastery_ = false; +} +inline bool Trail_specialization_filter::_internal_ranger_beastmastery() const { + return ranger_beastmastery_; +} +inline bool Trail_specialization_filter::ranger_beastmastery() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.ranger_beastmastery) + return _internal_ranger_beastmastery(); +} +inline void Trail_specialization_filter::_internal_set_ranger_beastmastery(bool value) { + + ranger_beastmastery_ = value; +} +inline void Trail_specialization_filter::set_ranger_beastmastery(bool value) { + _internal_set_ranger_beastmastery(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.ranger_beastmastery) +} + +// bool ranger_marksmanship = 8; +inline void Trail_specialization_filter::clear_ranger_marksmanship() { + ranger_marksmanship_ = false; +} +inline bool Trail_specialization_filter::_internal_ranger_marksmanship() const { + return ranger_marksmanship_; +} +inline bool Trail_specialization_filter::ranger_marksmanship() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.ranger_marksmanship) + return _internal_ranger_marksmanship(); +} +inline void Trail_specialization_filter::_internal_set_ranger_marksmanship(bool value) { + + ranger_marksmanship_ = value; +} +inline void Trail_specialization_filter::set_ranger_marksmanship(bool value) { + _internal_set_ranger_marksmanship(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.ranger_marksmanship) +} + +// bool ranger_nature_magic = 25; +inline void Trail_specialization_filter::clear_ranger_nature_magic() { + ranger_nature_magic_ = false; +} +inline bool Trail_specialization_filter::_internal_ranger_nature_magic() const { + return ranger_nature_magic_; +} +inline bool Trail_specialization_filter::ranger_nature_magic() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.ranger_nature_magic) + return _internal_ranger_nature_magic(); +} +inline void Trail_specialization_filter::_internal_set_ranger_nature_magic(bool value) { + + ranger_nature_magic_ = value; +} +inline void Trail_specialization_filter::set_ranger_nature_magic(bool value) { + _internal_set_ranger_nature_magic(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.ranger_nature_magic) +} + +// bool ranger_skirmishing = 30; +inline void Trail_specialization_filter::clear_ranger_skirmishing() { + ranger_skirmishing_ = false; +} +inline bool Trail_specialization_filter::_internal_ranger_skirmishing() const { + return ranger_skirmishing_; +} +inline bool Trail_specialization_filter::ranger_skirmishing() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.ranger_skirmishing) + return _internal_ranger_skirmishing(); +} +inline void Trail_specialization_filter::_internal_set_ranger_skirmishing(bool value) { + + ranger_skirmishing_ = value; +} +inline void Trail_specialization_filter::set_ranger_skirmishing(bool value) { + _internal_set_ranger_skirmishing(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.ranger_skirmishing) +} + +// bool ranger_wilderness_survival = 33; +inline void Trail_specialization_filter::clear_ranger_wilderness_survival() { + ranger_wilderness_survival_ = false; +} +inline bool Trail_specialization_filter::_internal_ranger_wilderness_survival() const { + return ranger_wilderness_survival_; +} +inline bool Trail_specialization_filter::ranger_wilderness_survival() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.ranger_wilderness_survival) + return _internal_ranger_wilderness_survival(); +} +inline void Trail_specialization_filter::_internal_set_ranger_wilderness_survival(bool value) { + + ranger_wilderness_survival_ = value; +} +inline void Trail_specialization_filter::set_ranger_wilderness_survival(bool value) { + _internal_set_ranger_wilderness_survival(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.ranger_wilderness_survival) +} + +// bool revenant_corruption = 14; +inline void Trail_specialization_filter::clear_revenant_corruption() { + revenant_corruption_ = false; +} +inline bool Trail_specialization_filter::_internal_revenant_corruption() const { + return revenant_corruption_; +} +inline bool Trail_specialization_filter::revenant_corruption() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.revenant_corruption) + return _internal_revenant_corruption(); +} +inline void Trail_specialization_filter::_internal_set_revenant_corruption(bool value) { + + revenant_corruption_ = value; +} +inline void Trail_specialization_filter::set_revenant_corruption(bool value) { + _internal_set_revenant_corruption(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.revenant_corruption) +} + +// bool revenant_devastation = 15; +inline void Trail_specialization_filter::clear_revenant_devastation() { + revenant_devastation_ = false; +} +inline bool Trail_specialization_filter::_internal_revenant_devastation() const { + return revenant_devastation_; +} +inline bool Trail_specialization_filter::revenant_devastation() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.revenant_devastation) + return _internal_revenant_devastation(); +} +inline void Trail_specialization_filter::_internal_set_revenant_devastation(bool value) { + + revenant_devastation_ = value; +} +inline void Trail_specialization_filter::set_revenant_devastation(bool value) { + _internal_set_revenant_devastation(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.revenant_devastation) +} + +// bool revenant_invocation = 3; +inline void Trail_specialization_filter::clear_revenant_invocation() { + revenant_invocation_ = false; +} +inline bool Trail_specialization_filter::_internal_revenant_invocation() const { + return revenant_invocation_; +} +inline bool Trail_specialization_filter::revenant_invocation() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.revenant_invocation) + return _internal_revenant_invocation(); +} +inline void Trail_specialization_filter::_internal_set_revenant_invocation(bool value) { + + revenant_invocation_ = value; +} +inline void Trail_specialization_filter::set_revenant_invocation(bool value) { + _internal_set_revenant_invocation(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.revenant_invocation) +} + +// bool revenant_retribution = 9; +inline void Trail_specialization_filter::clear_revenant_retribution() { + revenant_retribution_ = false; +} +inline bool Trail_specialization_filter::_internal_revenant_retribution() const { + return revenant_retribution_; +} +inline bool Trail_specialization_filter::revenant_retribution() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.revenant_retribution) + return _internal_revenant_retribution(); +} +inline void Trail_specialization_filter::_internal_set_revenant_retribution(bool value) { + + revenant_retribution_ = value; +} +inline void Trail_specialization_filter::set_revenant_retribution(bool value) { + _internal_set_revenant_retribution(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.revenant_retribution) +} + +// bool revenant_salvation = 12; +inline void Trail_specialization_filter::clear_revenant_salvation() { + revenant_salvation_ = false; +} +inline bool Trail_specialization_filter::_internal_revenant_salvation() const { + return revenant_salvation_; +} +inline bool Trail_specialization_filter::revenant_salvation() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.revenant_salvation) + return _internal_revenant_salvation(); +} +inline void Trail_specialization_filter::_internal_set_revenant_salvation(bool value) { + + revenant_salvation_ = value; +} +inline void Trail_specialization_filter::set_revenant_salvation(bool value) { + _internal_set_revenant_salvation(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.revenant_salvation) +} + +// bool thief_acrobatics = 54; +inline void Trail_specialization_filter::clear_thief_acrobatics() { + thief_acrobatics_ = false; +} +inline bool Trail_specialization_filter::_internal_thief_acrobatics() const { + return thief_acrobatics_; +} +inline bool Trail_specialization_filter::thief_acrobatics() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.thief_acrobatics) + return _internal_thief_acrobatics(); +} +inline void Trail_specialization_filter::_internal_set_thief_acrobatics(bool value) { + + thief_acrobatics_ = value; +} +inline void Trail_specialization_filter::set_thief_acrobatics(bool value) { + _internal_set_thief_acrobatics(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.thief_acrobatics) +} + +// bool thief_critical_strikes = 35; +inline void Trail_specialization_filter::clear_thief_critical_strikes() { + thief_critical_strikes_ = false; +} +inline bool Trail_specialization_filter::_internal_thief_critical_strikes() const { + return thief_critical_strikes_; +} +inline bool Trail_specialization_filter::thief_critical_strikes() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.thief_critical_strikes) + return _internal_thief_critical_strikes(); +} +inline void Trail_specialization_filter::_internal_set_thief_critical_strikes(bool value) { + + thief_critical_strikes_ = value; +} +inline void Trail_specialization_filter::set_thief_critical_strikes(bool value) { + _internal_set_thief_critical_strikes(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.thief_critical_strikes) +} + +// bool thief_deadly_arts = 28; +inline void Trail_specialization_filter::clear_thief_deadly_arts() { + thief_deadly_arts_ = false; +} +inline bool Trail_specialization_filter::_internal_thief_deadly_arts() const { + return thief_deadly_arts_; +} +inline bool Trail_specialization_filter::thief_deadly_arts() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.thief_deadly_arts) + return _internal_thief_deadly_arts(); +} +inline void Trail_specialization_filter::_internal_set_thief_deadly_arts(bool value) { + + thief_deadly_arts_ = value; +} +inline void Trail_specialization_filter::set_thief_deadly_arts(bool value) { + _internal_set_thief_deadly_arts(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.thief_deadly_arts) +} + +// bool thief_shadow_arts = 20; +inline void Trail_specialization_filter::clear_thief_shadow_arts() { + thief_shadow_arts_ = false; +} +inline bool Trail_specialization_filter::_internal_thief_shadow_arts() const { + return thief_shadow_arts_; +} +inline bool Trail_specialization_filter::thief_shadow_arts() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.thief_shadow_arts) + return _internal_thief_shadow_arts(); +} +inline void Trail_specialization_filter::_internal_set_thief_shadow_arts(bool value) { + + thief_shadow_arts_ = value; +} +inline void Trail_specialization_filter::set_thief_shadow_arts(bool value) { + _internal_set_thief_shadow_arts(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.thief_shadow_arts) +} + +// bool thief_trickery = 44; +inline void Trail_specialization_filter::clear_thief_trickery() { + thief_trickery_ = false; +} +inline bool Trail_specialization_filter::_internal_thief_trickery() const { + return thief_trickery_; +} +inline bool Trail_specialization_filter::thief_trickery() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.thief_trickery) + return _internal_thief_trickery(); +} +inline void Trail_specialization_filter::_internal_set_thief_trickery(bool value) { + + thief_trickery_ = value; +} +inline void Trail_specialization_filter::set_thief_trickery(bool value) { + _internal_set_thief_trickery(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.thief_trickery) +} + +// bool warrior_arms = 36; +inline void Trail_specialization_filter::clear_warrior_arms() { + warrior_arms_ = false; +} +inline bool Trail_specialization_filter::_internal_warrior_arms() const { + return warrior_arms_; +} +inline bool Trail_specialization_filter::warrior_arms() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.warrior_arms) + return _internal_warrior_arms(); +} +inline void Trail_specialization_filter::_internal_set_warrior_arms(bool value) { + + warrior_arms_ = value; +} +inline void Trail_specialization_filter::set_warrior_arms(bool value) { + _internal_set_warrior_arms(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.warrior_arms) +} + +// bool warrior_defense = 22; +inline void Trail_specialization_filter::clear_warrior_defense() { + warrior_defense_ = false; +} +inline bool Trail_specialization_filter::_internal_warrior_defense() const { + return warrior_defense_; +} +inline bool Trail_specialization_filter::warrior_defense() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.warrior_defense) + return _internal_warrior_defense(); +} +inline void Trail_specialization_filter::_internal_set_warrior_defense(bool value) { + + warrior_defense_ = value; +} +inline void Trail_specialization_filter::set_warrior_defense(bool value) { + _internal_set_warrior_defense(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.warrior_defense) +} + +// bool warrior_discipline = 51; +inline void Trail_specialization_filter::clear_warrior_discipline() { + warrior_discipline_ = false; +} +inline bool Trail_specialization_filter::_internal_warrior_discipline() const { + return warrior_discipline_; +} +inline bool Trail_specialization_filter::warrior_discipline() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.warrior_discipline) + return _internal_warrior_discipline(); +} +inline void Trail_specialization_filter::_internal_set_warrior_discipline(bool value) { + + warrior_discipline_ = value; +} +inline void Trail_specialization_filter::set_warrior_discipline(bool value) { + _internal_set_warrior_discipline(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.warrior_discipline) +} + +// bool warrior_strength = 4; +inline void Trail_specialization_filter::clear_warrior_strength() { + warrior_strength_ = false; +} +inline bool Trail_specialization_filter::_internal_warrior_strength() const { + return warrior_strength_; +} +inline bool Trail_specialization_filter::warrior_strength() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.warrior_strength) + return _internal_warrior_strength(); +} +inline void Trail_specialization_filter::_internal_set_warrior_strength(bool value) { + + warrior_strength_ = value; +} +inline void Trail_specialization_filter::set_warrior_strength(bool value) { + _internal_set_warrior_strength(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.warrior_strength) +} + +// bool warrior_tactics = 11; +inline void Trail_specialization_filter::clear_warrior_tactics() { + warrior_tactics_ = false; +} +inline bool Trail_specialization_filter::_internal_warrior_tactics() const { + return warrior_tactics_; +} +inline bool Trail_specialization_filter::warrior_tactics() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.warrior_tactics) + return _internal_warrior_tactics(); +} +inline void Trail_specialization_filter::_internal_set_warrior_tactics(bool value) { + + warrior_tactics_ = value; +} +inline void Trail_specialization_filter::set_warrior_tactics(bool value) { + _internal_set_warrior_tactics(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.warrior_tactics) +} + +// ------------------------------------------------------------------- + +// Trail_species_filter + +// bool asura = 1; +inline void Trail_species_filter::clear_asura() { + asura_ = false; +} +inline bool Trail_species_filter::_internal_asura() const { + return asura_; +} +inline bool Trail_species_filter::asura() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.species_filter.asura) + return _internal_asura(); +} +inline void Trail_species_filter::_internal_set_asura(bool value) { + + asura_ = value; +} +inline void Trail_species_filter::set_asura(bool value) { + _internal_set_asura(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.species_filter.asura) +} + +// bool charr = 2; +inline void Trail_species_filter::clear_charr() { + charr_ = false; +} +inline bool Trail_species_filter::_internal_charr() const { + return charr_; +} +inline bool Trail_species_filter::charr() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.species_filter.charr) + return _internal_charr(); +} +inline void Trail_species_filter::_internal_set_charr(bool value) { + + charr_ = value; +} +inline void Trail_species_filter::set_charr(bool value) { + _internal_set_charr(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.species_filter.charr) +} + +// bool human = 3; +inline void Trail_species_filter::clear_human() { + human_ = false; +} +inline bool Trail_species_filter::_internal_human() const { + return human_; +} +inline bool Trail_species_filter::human() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.species_filter.human) + return _internal_human(); +} +inline void Trail_species_filter::_internal_set_human(bool value) { + + human_ = value; +} +inline void Trail_species_filter::set_human(bool value) { + _internal_set_human(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.species_filter.human) +} + +// bool norn = 4; +inline void Trail_species_filter::clear_norn() { + norn_ = false; +} +inline bool Trail_species_filter::_internal_norn() const { + return norn_; +} +inline bool Trail_species_filter::norn() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.species_filter.norn) + return _internal_norn(); +} +inline void Trail_species_filter::_internal_set_norn(bool value) { + + norn_ = value; +} +inline void Trail_species_filter::set_norn(bool value) { + _internal_set_norn(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.species_filter.norn) +} + +// bool sylvari = 5; +inline void Trail_species_filter::clear_sylvari() { + sylvari_ = false; +} +inline bool Trail_species_filter::_internal_sylvari() const { + return sylvari_; +} +inline bool Trail_species_filter::sylvari() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.species_filter.sylvari) + return _internal_sylvari(); +} +inline void Trail_species_filter::_internal_set_sylvari(bool value) { + + sylvari_ = value; +} +inline void Trail_species_filter::set_sylvari(bool value) { + _internal_set_sylvari(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.species_filter.sylvari) +} + +// ------------------------------------------------------------------- + +// Trail_texture + +// string path = 1; +inline void Trail_texture::clear_path() { + path_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline const std::string& Trail_texture::path() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.texture.path) + return _internal_path(); +} +inline void Trail_texture::set_path(const std::string& value) { + _internal_set_path(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.texture.path) +} +inline std::string* Trail_texture::mutable_path() { + // @@protoc_insertion_point(field_mutable:Proto_Node.Trail.texture.path) + return _internal_mutable_path(); +} +inline const std::string& Trail_texture::_internal_path() const { + return path_.Get(); +} +inline void Trail_texture::_internal_set_path(const std::string& value) { + + path_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void Trail_texture::set_path(std::string&& value) { + + path_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:Proto_Node.Trail.texture.path) +} +inline void Trail_texture::set_path(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + path_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:Proto_Node.Trail.texture.path) +} +inline void Trail_texture::set_path(const char* value, + size_t size) { + + path_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:Proto_Node.Trail.texture.path) +} +inline std::string* Trail_texture::_internal_mutable_path() { + + return path_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* Trail_texture::release_path() { + // @@protoc_insertion_point(field_release:Proto_Node.Trail.texture.path) + return path_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void Trail_texture::set_allocated_path(std::string* path) { + if (path != nullptr) { + + } else { + + } + path_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), path, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:Proto_Node.Trail.texture.path) +} +inline std::string* Trail_texture::unsafe_arena_release_path() { + // @@protoc_insertion_point(field_unsafe_arena_release:Proto_Node.Trail.texture.path) + GOOGLE_DCHECK(GetArena() != nullptr); + + return path_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void Trail_texture::unsafe_arena_set_allocated_path( + std::string* path) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (path != nullptr) { + + } else { + + } + path_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + path, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Proto_Node.Trail.texture.path) +} + +// .google.protobuf.Any original_token = 2; +inline bool Trail_texture::_internal_has_original_token() const { + return this != internal_default_instance() && original_token_ != nullptr; +} +inline bool Trail_texture::has_original_token() const { + return _internal_has_original_token(); +} +inline const PROTOBUF_NAMESPACE_ID::Any& Trail_texture::_internal_original_token() const { + const PROTOBUF_NAMESPACE_ID::Any* p = original_token_; + return p != nullptr ? *p : *reinterpret_cast( + &PROTOBUF_NAMESPACE_ID::_Any_default_instance_); +} +inline const PROTOBUF_NAMESPACE_ID::Any& Trail_texture::original_token() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.texture.original_token) + return _internal_original_token(); +} +inline void Trail_texture::unsafe_arena_set_allocated_original_token( + PROTOBUF_NAMESPACE_ID::Any* original_token) { + if (GetArena() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(original_token_); + } + original_token_ = original_token; + if (original_token) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Proto_Node.Trail.texture.original_token) +} +inline PROTOBUF_NAMESPACE_ID::Any* Trail_texture::release_original_token() { + auto temp = unsafe_arena_release_original_token(); + if (GetArena() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + return temp; +} +inline PROTOBUF_NAMESPACE_ID::Any* Trail_texture::unsafe_arena_release_original_token() { + // @@protoc_insertion_point(field_release:Proto_Node.Trail.texture.original_token) + + PROTOBUF_NAMESPACE_ID::Any* temp = original_token_; + original_token_ = nullptr; + return temp; +} +inline PROTOBUF_NAMESPACE_ID::Any* Trail_texture::_internal_mutable_original_token() { + + if (original_token_ == nullptr) { + auto* p = CreateMaybeMessage(GetArena()); + original_token_ = p; + } + return original_token_; +} +inline PROTOBUF_NAMESPACE_ID::Any* Trail_texture::mutable_original_token() { + // @@protoc_insertion_point(field_mutable:Proto_Node.Trail.texture.original_token) + return _internal_mutable_original_token(); +} +inline void Trail_texture::set_allocated_original_token(PROTOBUF_NAMESPACE_ID::Any* original_token) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(original_token_); + } + if (original_token) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(original_token)->GetArena(); + if (message_arena != submessage_arena) { + original_token = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, original_token, submessage_arena); + } + + } else { + + } + original_token_ = original_token; + // @@protoc_insertion_point(field_set_allocated:Proto_Node.Trail.texture.original_token) +} + +// ------------------------------------------------------------------- + +// Trail_trail_data + +// string trail_data = 1; +inline void Trail_trail_data::clear_trail_data() { + trail_data_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline const std::string& Trail_trail_data::trail_data() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.trail_data.trail_data) + return _internal_trail_data(); +} +inline void Trail_trail_data::set_trail_data(const std::string& value) { + _internal_set_trail_data(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.trail_data.trail_data) +} +inline std::string* Trail_trail_data::mutable_trail_data() { + // @@protoc_insertion_point(field_mutable:Proto_Node.Trail.trail_data.trail_data) + return _internal_mutable_trail_data(); +} +inline const std::string& Trail_trail_data::_internal_trail_data() const { + return trail_data_.Get(); +} +inline void Trail_trail_data::_internal_set_trail_data(const std::string& value) { + + trail_data_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void Trail_trail_data::set_trail_data(std::string&& value) { + + trail_data_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:Proto_Node.Trail.trail_data.trail_data) +} +inline void Trail_trail_data::set_trail_data(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + trail_data_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:Proto_Node.Trail.trail_data.trail_data) +} +inline void Trail_trail_data::set_trail_data(const char* value, + size_t size) { + + trail_data_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:Proto_Node.Trail.trail_data.trail_data) +} +inline std::string* Trail_trail_data::_internal_mutable_trail_data() { + + return trail_data_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* Trail_trail_data::release_trail_data() { + // @@protoc_insertion_point(field_release:Proto_Node.Trail.trail_data.trail_data) + return trail_data_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void Trail_trail_data::set_allocated_trail_data(std::string* trail_data) { + if (trail_data != nullptr) { + + } else { + + } + trail_data_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), trail_data, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:Proto_Node.Trail.trail_data.trail_data) +} +inline std::string* Trail_trail_data::unsafe_arena_release_trail_data() { + // @@protoc_insertion_point(field_unsafe_arena_release:Proto_Node.Trail.trail_data.trail_data) + GOOGLE_DCHECK(GetArena() != nullptr); + + return trail_data_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void Trail_trail_data::unsafe_arena_set_allocated_trail_data( + std::string* trail_data) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (trail_data != nullptr) { + + } else { + + } + trail_data_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + trail_data, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Proto_Node.Trail.trail_data.trail_data) +} + +// ------------------------------------------------------------------- + +// Trail + +// fixed32 achievement_bit = 1; +inline void Trail::clear_achievement_bit() { + achievement_bit_ = 0u; +} +inline ::PROTOBUF_NAMESPACE_ID::uint32 Trail::_internal_achievement_bit() const { + return achievement_bit_; +} +inline ::PROTOBUF_NAMESPACE_ID::uint32 Trail::achievement_bit() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.achievement_bit) + return _internal_achievement_bit(); +} +inline void Trail::_internal_set_achievement_bit(::PROTOBUF_NAMESPACE_ID::uint32 value) { + + achievement_bit_ = value; +} +inline void Trail::set_achievement_bit(::PROTOBUF_NAMESPACE_ID::uint32 value) { + _internal_set_achievement_bit(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.achievement_bit) +} + +// int32 achievement_id = 2; +inline void Trail::clear_achievement_id() { + achievement_id_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 Trail::_internal_achievement_id() const { + return achievement_id_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 Trail::achievement_id() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.achievement_id) + return _internal_achievement_id(); +} +inline void Trail::_internal_set_achievement_id(::PROTOBUF_NAMESPACE_ID::int32 value) { + + achievement_id_ = value; +} +inline void Trail::set_achievement_id(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_achievement_id(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.achievement_id) +} + +// float alpha = 3; +inline void Trail::clear_alpha() { + alpha_ = 0; +} +inline float Trail::_internal_alpha() const { + return alpha_; +} +inline float Trail::alpha() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.alpha) + return _internal_alpha(); +} +inline void Trail::_internal_set_alpha(float value) { + + alpha_ = value; +} +inline void Trail::set_alpha(float value) { + _internal_set_alpha(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.alpha) +} + +// float animation_speed = 4; +inline void Trail::clear_animation_speed() { + animation_speed_ = 0; +} +inline float Trail::_internal_animation_speed() const { + return animation_speed_; +} +inline float Trail::animation_speed() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.animation_speed) + return _internal_animation_speed(); +} +inline void Trail::_internal_set_animation_speed(float value) { + + animation_speed_ = value; +} +inline void Trail::set_animation_speed(float value) { + _internal_set_animation_speed(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.animation_speed) +} + +// bool can_fade = 5; +inline void Trail::clear_can_fade() { + can_fade_ = false; +} +inline bool Trail::_internal_can_fade() const { + return can_fade_; +} +inline bool Trail::can_fade() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.can_fade) + return _internal_can_fade(); +} +inline void Trail::_internal_set_can_fade(bool value) { + + can_fade_ = value; +} +inline void Trail::set_can_fade(bool value) { + _internal_set_can_fade(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.can_fade) +} + +// float distance_fade_end = 6; +inline void Trail::clear_distance_fade_end() { + distance_fade_end_ = 0; +} +inline float Trail::_internal_distance_fade_end() const { + return distance_fade_end_; +} +inline float Trail::distance_fade_end() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.distance_fade_end) + return _internal_distance_fade_end(); +} +inline void Trail::_internal_set_distance_fade_end(float value) { + + distance_fade_end_ = value; +} +inline void Trail::set_distance_fade_end(float value) { + _internal_set_distance_fade_end(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.distance_fade_end) +} + +// float distance_fade_start = 7; +inline void Trail::clear_distance_fade_start() { + distance_fade_start_ = 0; +} +inline float Trail::_internal_distance_fade_start() const { + return distance_fade_start_; +} +inline float Trail::distance_fade_start() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.distance_fade_start) + return _internal_distance_fade_start(); +} +inline void Trail::_internal_set_distance_fade_start(float value) { + + distance_fade_start_ = value; +} +inline void Trail::set_distance_fade_start(float value) { + _internal_set_distance_fade_start(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.distance_fade_start) +} + +// bool is_wall = 8; +inline void Trail::clear_is_wall() { + is_wall_ = false; +} +inline bool Trail::_internal_is_wall() const { + return is_wall_; +} +inline bool Trail::is_wall() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.is_wall) + return _internal_is_wall(); +} +inline void Trail::_internal_set_is_wall(bool value) { + + is_wall_ = value; +} +inline void Trail::set_is_wall(bool value) { + _internal_set_is_wall(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.is_wall) +} + +// string bhdraft__schedule = 9; +inline void Trail::clear_bhdraft__schedule() { + bhdraft__schedule_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline const std::string& Trail::bhdraft__schedule() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.bhdraft__schedule) + return _internal_bhdraft__schedule(); +} +inline void Trail::set_bhdraft__schedule(const std::string& value) { + _internal_set_bhdraft__schedule(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.bhdraft__schedule) +} +inline std::string* Trail::mutable_bhdraft__schedule() { + // @@protoc_insertion_point(field_mutable:Proto_Node.Trail.bhdraft__schedule) + return _internal_mutable_bhdraft__schedule(); +} +inline const std::string& Trail::_internal_bhdraft__schedule() const { + return bhdraft__schedule_.Get(); +} +inline void Trail::_internal_set_bhdraft__schedule(const std::string& value) { + + bhdraft__schedule_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void Trail::set_bhdraft__schedule(std::string&& value) { + + bhdraft__schedule_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:Proto_Node.Trail.bhdraft__schedule) +} +inline void Trail::set_bhdraft__schedule(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + bhdraft__schedule_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:Proto_Node.Trail.bhdraft__schedule) +} +inline void Trail::set_bhdraft__schedule(const char* value, + size_t size) { + + bhdraft__schedule_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:Proto_Node.Trail.bhdraft__schedule) +} +inline std::string* Trail::_internal_mutable_bhdraft__schedule() { + + return bhdraft__schedule_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* Trail::release_bhdraft__schedule() { + // @@protoc_insertion_point(field_release:Proto_Node.Trail.bhdraft__schedule) + return bhdraft__schedule_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void Trail::set_allocated_bhdraft__schedule(std::string* bhdraft__schedule) { + if (bhdraft__schedule != nullptr) { + + } else { + + } + bhdraft__schedule_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), bhdraft__schedule, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:Proto_Node.Trail.bhdraft__schedule) +} +inline std::string* Trail::unsafe_arena_release_bhdraft__schedule() { + // @@protoc_insertion_point(field_unsafe_arena_release:Proto_Node.Trail.bhdraft__schedule) + GOOGLE_DCHECK(GetArena() != nullptr); + + return bhdraft__schedule_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void Trail::unsafe_arena_set_allocated_bhdraft__schedule( + std::string* bhdraft__schedule) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (bhdraft__schedule != nullptr) { + + } else { + + } + bhdraft__schedule_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + bhdraft__schedule, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Proto_Node.Trail.bhdraft__schedule) +} + +// float bhdraft__schedule_duration = 10; +inline void Trail::clear_bhdraft__schedule_duration() { + bhdraft__schedule_duration_ = 0; +} +inline float Trail::_internal_bhdraft__schedule_duration() const { + return bhdraft__schedule_duration_; +} +inline float Trail::bhdraft__schedule_duration() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.bhdraft__schedule_duration) + return _internal_bhdraft__schedule_duration(); +} +inline void Trail::_internal_set_bhdraft__schedule_duration(float value) { + + bhdraft__schedule_duration_ = value; +} +inline void Trail::set_bhdraft__schedule_duration(float value) { + _internal_set_bhdraft__schedule_duration(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.bhdraft__schedule_duration) +} + +// float scale = 11; +inline void Trail::clear_scale() { + scale_ = 0; +} +inline float Trail::_internal_scale() const { + return scale_; +} +inline float Trail::scale() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.scale) + return _internal_scale(); +} +inline void Trail::_internal_set_scale(float value) { + + scale_ = value; +} +inline void Trail::set_scale(float value) { + _internal_set_scale(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.scale) +} + +// .Proto_Node.Category category = 12; +inline bool Trail::_internal_has_category() const { + return this != internal_default_instance() && category_ != nullptr; +} +inline bool Trail::has_category() const { + return _internal_has_category(); +} +inline void Trail::clear_category() { + if (GetArena() == nullptr && category_ != nullptr) { + delete category_; + } + category_ = nullptr; +} +inline const ::Proto_Node::Category& Trail::_internal_category() const { + const ::Proto_Node::Category* p = category_; + return p != nullptr ? *p : *reinterpret_cast( + &::Proto_Node::_Category_default_instance_); +} +inline const ::Proto_Node::Category& Trail::category() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.category) + return _internal_category(); +} +inline void Trail::unsafe_arena_set_allocated_category( + ::Proto_Node::Category* category) { + if (GetArena() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(category_); + } + category_ = category; + if (category) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Proto_Node.Trail.category) +} +inline ::Proto_Node::Category* Trail::release_category() { + auto temp = unsafe_arena_release_category(); + if (GetArena() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + return temp; +} +inline ::Proto_Node::Category* Trail::unsafe_arena_release_category() { + // @@protoc_insertion_point(field_release:Proto_Node.Trail.category) + + ::Proto_Node::Category* temp = category_; + category_ = nullptr; + return temp; +} +inline ::Proto_Node::Category* Trail::_internal_mutable_category() { + + if (category_ == nullptr) { + auto* p = CreateMaybeMessage<::Proto_Node::Category>(GetArena()); + category_ = p; + } + return category_; +} +inline ::Proto_Node::Category* Trail::mutable_category() { + // @@protoc_insertion_point(field_mutable:Proto_Node.Trail.category) + return _internal_mutable_category(); +} +inline void Trail::set_allocated_category(::Proto_Node::Category* category) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); + if (message_arena == nullptr) { + delete category_; + } + if (category) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(category); + if (message_arena != submessage_arena) { + category = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, category, submessage_arena); + } + + } else { + + } + category_ = category; + // @@protoc_insertion_point(field_set_allocated:Proto_Node.Trail.category) +} + +// int32 map_id = 13; +inline void Trail::clear_map_id() { + map_id_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 Trail::_internal_map_id() const { + return map_id_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 Trail::map_id() const { + // @@protoc_insertion_point(field_get:Proto_Node.Trail.map_id) + return _internal_map_id(); +} +inline void Trail::_internal_set_map_id(::PROTOBUF_NAMESPACE_ID::int32 value) { + + map_id_ = value; +} +inline void Trail::set_map_id(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_map_id(value); + // @@protoc_insertion_point(field_set:Proto_Node.Trail.map_id) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace Proto_Node + +PROTOBUF_NAMESPACE_OPEN + +template <> struct is_proto_enum< ::Proto_Node::Icon_trigger_reset_behavior> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::Proto_Node::Icon_trigger_reset_behavior>() { + return ::Proto_Node::Icon_trigger_reset_behavior_descriptor(); +} +template <> struct is_proto_enum< ::Proto_Node::Trail_cull_chirality> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::Proto_Node::Trail_cull_chirality>() { + return ::Proto_Node::Trail_cull_chirality_descriptor(); +} + +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_node_2eproto diff --git a/xml_converter/generators/proto_templates/node.proto b/xml_converter/generators/proto_templates/node.proto new file mode 100644 index 00000000..5c12d3e7 --- /dev/null +++ b/xml_converter/generators/proto_templates/node.proto @@ -0,0 +1,274 @@ +syntax = "proto3"; +import "google/protobuf/any.proto"; + +package Proto_Node; + +message Category { + bool default_visibility = 1; + string display_name = 2; + bool is_separator = 3; + string name = 4; + string tooltip_name = 5; + map children = 6; +} + +message Icon { + fixed32 achievement_bit = 1; + int32 achievement_id = 2; + float alpha = 3; + bool can_fade = 4; + float distance_fade_end = 5; + float distance_fade_start = 6; + float height_offset= 7; + float __tentative__scale = 8; + int32 map_display_size = 9; + int32 map_id = 10; + int32 maximum_size_on_screen = 11; + int32 minimum_size_on_screen = 12; + bool __tentative__render_ingame = 13; + bool __tentative__render_on_map = 14; + bool __tentative__render_on_minimap = 15; + bool scale_on_map_with_zoom = 16; + string bhdraft__schedule = 17; + float bhdraft__schedule_duration = 18; + string tip_description = 19; + string tip_name = 20; + + message texture { + string path = 1; + google.protobuf.Any original_token = 2; + } + + message position { + float x = 1; + float y = 2; + float z = 3; + } + + message euler_rotation { + float x = 1; + float y = 2; + float z = 3; + } + + message trigger{ + bool auto_trigger = 1; + float bounce_delay = 2; + float bounce_duration = 3; + float bounce_height = 4; + string action_copy_clipboard = 5; + string action_copy_message = 6; + bool has_countdown = 7; + string action_info_message = 8; + bool invert_display = 9; + float reset_length = 10; + float range = 11; + Category action_hide_category = 12; + Category action_show_category = 13; + Category action_toggle_category = 14; + + message guid{ + int32 guid = 1; + } + + enum reset_behavior { + always_visible = 0; + map_change = 1; + daily_reset = 2; + never = 3; + timer = 4; + map_reset = 5; + instance_change = 6; + daily_reset_per_character = 7; + weekly_reset = 8; + } + } + +} + +message Trail { + fixed32 achievement_bit = 1; + int32 achievement_id = 2; + float alpha = 3; + float animation_speed = 4; + bool can_fade = 5; + float distance_fade_end = 6; + float distance_fade_start = 7; + bool is_wall = 8; + string bhdraft__schedule = 9; + float bhdraft__schedule_duration = 10; + float scale = 11; + Category category = 12; + int32 map_id = 13; + + message color { + string hex = 1; + } + + enum cull_chirality { + none = 0; + clockwise = 1; + counter_clockwise = 2; + } + + message festival_filter { + bool dragonbash = 1; + bool festival_of_the_four_winds = 2; + bool halloween = 3; + bool lunar_new_year = 4; + bool super_adventure_festival = 5; + bool wintersday = 6; + bool none = 7; + } + + message guid{ + int32 guid = 1; + } + + message map_type_filter { + bool unknown_map = 1; + bool redirect_map = 2; + bool character_create_map = 3; + bool pvp_map = 4; + bool gvg_map = 5; + bool instance_map = 6; + bool public_map = 7; + bool tournament_map = 8; + bool tutorial_map = 9; + bool user_tournament_map = 10; + bool center_map = 11; + bool eternal_battlegrounds_map = 12; + bool bluehome_map = 13; + bool blue_borderlands_map = 14; + bool green_home_map = 15; + bool green_borderlands_map = 16; + bool red_home_map = 17; + bool red_borderlands_map = 18; + bool fortunes_vale_map = 19; + bool jump_puzzle_map = 20; + bool obsidian_sanctum_map = 21; + bool edge_of_the_mists_map = 22; + bool public_mini_map = 23; + bool wvw_lounge_map = 24; + } + message mount_filter { + bool raptor = 1; + bool springer = 2; + bool skimmer = 3; + bool jackal = 4; + bool griffon = 5; + bool roller_beetle = 6; + bool warclaw = 7; + bool skyscalee = 8; + bool skiff = 9; + bool seige_turtle = 10; + } + message profession_filter { + bool guardian = 1; + bool warrior = 2; + bool engineer = 3; + bool ranger = 4; + bool thief = 5; + bool elementalist = 6; + bool mesmer = 7; + bool necromancer = 8; + bool revenantnt = 9; + } + message specialization_filter { + // Heart of Thorns Spec + bool elementalist_tempest = 48; + bool engineer_scrapper = 43; + bool guardian_dragonhunter = 27; + bool mesmer_chronomancer = 40; + bool necromancer_reaper = 34; + bool ranger_druid = 5; + bool revenant_herald = 52; + bool thief_daredevil = 7; + bool warrior_berserker = 18; + // Path of Fire Spec + bool elementalist_weaver = 56; + bool engineer_holosmith = 57; + bool guardian_firebrand = 62; + bool mesmer_mirage = 59; + bool necromancer_scourge = 60; + bool ranger_soulbeast = 55; + bool revenant_renegade = 63; + bool thief_deadeye = 58; + bool warrior_spellbreaker = 61; + // End of Dragon Spec + bool elmentalist_catalyst = 67; + bool engineer_mechanist = 70; + bool guardian_willbender = 65; + bool mesmer_virtuoso = 66; + bool necromancer_harbinger = 64; + bool ranger_untamed = 72; + bool revenant_vindicator = 69; + bool thief_specter = 71; + bool warrior_bladesworn = 68; + // Core Spec + bool elementalist_air = 41; + bool elementalist_arcane = 37; + bool elementalist_earth = 26; + bool elementalist_fire = 31; + bool elementalist_water = 17; + bool engineer_alchemy = 29; + bool engineer_explosives = 6; + bool engineer_firearms = 38; + bool engineer_inventions = 47; + bool engineer_tools = 21; + bool guardian_honor = 49; + bool guardian_radiance = 16; + bool guardian_valor = 13; + bool guardian_virtues = 46; + bool guardian_zeal = 42; + bool mesmer_chaos = 45; + bool mesmer_domination = 10; + bool mesmer_dueling = 1; + bool mesmer_illusions = 24; + bool mesmer_inspiration = 23; + bool necromancer_blood_magic = 19; + bool necromancer_curses = 39; + bool necromancer_death_magic = 2; + bool necromancer_soul_reaping = 50; + bool necromancer_spite = 53; + bool ranger_beastmastery = 32; + bool ranger_marksmanship = 8; + bool ranger_nature_magic = 25; + bool ranger_skirmishing = 30; + bool ranger_wilderness_survival = 33; + bool revenant_corruption = 14; + bool revenant_devastation = 15; + bool revenant_invocation = 3; + bool revenant_retribution = 9; + bool revenant_salvation = 12; + bool thief_acrobatics = 54; + bool thief_critical_strikes = 35; + bool thief_deadly_arts = 28; + bool thief_shadow_arts = 20; + bool thief_trickery = 44; + bool warrior_arms = 36; + bool warrior_defense = 22; + bool warrior_discipline = 51; + bool warrior_strength = 4; + bool warrior_tactics = 11; + } + + message species_filter { + bool asura = 1; + bool charr = 2; + bool human = 3; + bool norn = 4; + bool sylvari = 5; + } + + message texture { + string path = 1; + google.protobuf.Any original_token = 2; + } + + message trail_data { + string trail_data = 1; + } + +} + diff --git a/xml_converter/src/attribute/specialization_filter_gen.cpp b/xml_converter/src/attribute/specialization_filter_gen.cpp index 59e9efa8..2ea72b48 100644 --- a/xml_converter/src/attribute/specialization_filter_gen.cpp +++ b/xml_converter/src/attribute/specialization_filter_gen.cpp @@ -193,30 +193,57 @@ SpecializationFilter parse_specialization_filter(rapidxml::xml_attribute<>* inpu else if (normalized_flag_value == "spellbreaker") { specialization_filter.warrior_spellbreaker = true; } + else if (normalized_flag_value == "67") { + specialization_filter.elementalist_catalyst = true; + } else if (normalized_flag_value == "catalyst") { specialization_filter.elementalist_catalyst = true; } + else if (normalized_flag_value == "70") { + specialization_filter.engineer_mechanist = true; + } else if (normalized_flag_value == "mechanist") { specialization_filter.engineer_mechanist = true; } + else if (normalized_flag_value == "65") { + specialization_filter.guardian_willbender = true; + } else if (normalized_flag_value == "willbender") { specialization_filter.guardian_willbender = true; } + else if (normalized_flag_value == "66") { + specialization_filter.mesmer_virtuoso = true; + } else if (normalized_flag_value == "virtuoso") { specialization_filter.mesmer_virtuoso = true; } + else if (normalized_flag_value == "64") { + specialization_filter.necromancer_harbinger = true; + } else if (normalized_flag_value == "harbinger") { specialization_filter.necromancer_harbinger = true; } + else if (normalized_flag_value == "72") { + specialization_filter.ranger_untamed = true; + } else if (normalized_flag_value == "untamed") { specialization_filter.ranger_untamed = true; } + else if (normalized_flag_value == "69") { + specialization_filter.revenant_vindicator = true; + } else if (normalized_flag_value == "vindicator") { specialization_filter.revenant_vindicator = true; } + else if (normalized_flag_value == "71") { + specialization_filter.thief_specter = true; + } else if (normalized_flag_value == "specter") { specialization_filter.thief_specter = true; } + else if (normalized_flag_value == "68") { + specialization_filter.warrior_bladesworn = true; + } else if (normalized_flag_value == "bladesworn") { specialization_filter.warrior_bladesworn = true; } @@ -420,31 +447,31 @@ string stringify_specialization_filter(SpecializationFilter attribute_value){ output = output + "61"; } if (attribute_value.elementalist_catalyst == true){ - output = output + "catalyst"; + output = output + "67"; } if (attribute_value.engineer_mechanist == true){ - output = output + "mechanist"; + output = output + "70"; } if (attribute_value.guardian_willbender == true){ - output = output + "willbender"; + output = output + "65"; } if (attribute_value.mesmer_virtuoso == true){ - output = output + "virtuoso"; + output = output + "66"; } if (attribute_value.necromancer_harbinger == true){ - output = output + "harbinger"; + output = output + "64"; } if (attribute_value.ranger_untamed == true){ - output = output + "untamed"; + output = output + "72"; } if (attribute_value.revenant_vindicator == true){ - output = output + "vindicator"; + output = output + "69"; } if (attribute_value.thief_specter == true){ - output = output + "specter"; + output = output + "71"; } if (attribute_value.warrior_bladesworn == true){ - output = output + "bladesworn"; + output = output + "68"; } if (attribute_value.elementalist_air == true){ output = output + "41"; diff --git a/xml_converter/src/category_gen.hpp b/xml_converter/src/category_gen.hpp index 470ac899..32548c34 100644 --- a/xml_converter/src/category_gen.hpp +++ b/xml_converter/src/category_gen.hpp @@ -14,21 +14,21 @@ using namespace std; class Category: public Parseable { public: bool default_visibility; - bool default_visibility_is_set = false; string display_name; - bool display_name_is_set = false; bool is_separator; - bool is_separator_is_set = false; string name; - bool name_is_set = false; string tooltip_name; + bool default_visibility_is_set = false; + bool display_name_is_set = false; + bool is_separator_is_set = false; + bool name_is_set = false; bool tooltip_name_is_set = false; map children; Icon default_icon; Trail default_trail; + virtual vector as_xml() const; void init_from_xml(rapidxml::xml_node<>* node, vector *errors); virtual string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors); - virtual vector as_xml() const; }; \ No newline at end of file diff --git a/xml_converter/src/icon_gen.hpp b/xml_converter/src/icon_gen.hpp index 22fa6957..bda701d2 100644 --- a/xml_converter/src/icon_gen.hpp +++ b/xml_converter/src/icon_gen.hpp @@ -27,115 +27,115 @@ using namespace std; class Icon: public Parseable { public: int achievement_bitmask; - bool achievement_bitmask_is_set = false; int achievement_id; - bool achievement_id_is_set = false; float alpha; - bool alpha_is_set = false; bool auto_trigger; - bool auto_trigger_is_set = false; float bounce_delay; - bool bounce_delay_is_set = false; float bounce_duration; - bool bounce_duration_is_set = false; float bounce_height; - bool bounce_height_is_set = false; bool can_fade; - bool can_fade_is_set = false; MarkerCategory category; - bool category_is_set = false; Color color; - bool color_is_set = false; string copy_clipboard; - bool copy_clipboard_is_set = false; string copy_message; - bool copy_message_is_set = false; CullChirality cull_chirality; - bool cull_chirality_is_set = false; float distance_fade_end; - bool distance_fade_end_is_set = false; float distance_fade_start; - bool distance_fade_start_is_set = false; EulerRotation euler_rotation; - bool euler_rotation_is_set = false; FestivalFilter festival_filter; - bool festival_filter_is_set = false; UniqueId guid; - bool guid_is_set = false; bool has_countdown; - bool has_countdown_is_set = false; float heightoffset; - bool heightoffset_is_set = false; MarkerCategory hide_category; - bool hide_category_is_set = false; Image icon; - bool icon_is_set = false; float icon_size; - bool icon_size_is_set = false; string info_message; - bool info_message_is_set = false; bool invert_visibility; - bool invert_visibility_is_set = false; int map_display_size; - bool map_display_size_is_set = false; int map_id; - bool map_id_is_set = false; MapTypeFilter map_type_filter; - bool map_type_filter_is_set = false; int maximum_size_on_screen; - bool maximum_size_on_screen_is_set = false; int minimum_size_on_screen; - bool minimum_size_on_screen_is_set = false; MountFilter mount_filter; - bool mount_filter_is_set = false; Position position; - bool position_is_set = false; ProfessionFilter profession_filter; - bool profession_filter_is_set = false; bool render_ingame; - bool render_ingame_is_set = false; bool render_on_map; - bool render_on_map_is_set = false; bool render_on_minimap; - bool render_on_minimap_is_set = false; ResetBehavior reset_behavior; - bool reset_behavior_is_set = false; float reset_length; - bool reset_length_is_set = false; bool scale_on_map_with_zoom; - bool scale_on_map_with_zoom_is_set = false; string schedule; - bool schedule_is_set = false; float schedule_duration; - bool schedule_duration_is_set = false; MarkerCategory show_category; - bool show_category_is_set = false; SpecializationFilter specialization_filter; - bool specialization_filter_is_set = false; SpeciesFilter species_filter; - bool species_filter_is_set = false; MarkerCategory toggle_category; - bool toggle_category_is_set = false; string tooltip_description; - bool tooltip_description_is_set = false; string tooltip_name; - bool tooltip_name_is_set = false; float trigger_range; - bool trigger_range_is_set = false; float x_position; - bool x_position_is_set = false; float x_rotation; - bool x_rotation_is_set = false; float y_position; - bool y_position_is_set = false; float y_rotation; - bool y_rotation_is_set = false; float z_position; - bool z_position_is_set = false; float z_rotation; + bool achievement_bitmask_is_set = false; + bool achievement_id_is_set = false; + bool alpha_is_set = false; + bool auto_trigger_is_set = false; + bool bounce_delay_is_set = false; + bool bounce_duration_is_set = false; + bool bounce_height_is_set = false; + bool can_fade_is_set = false; + bool category_is_set = false; + bool color_is_set = false; + bool copy_clipboard_is_set = false; + bool copy_message_is_set = false; + bool cull_chirality_is_set = false; + bool distance_fade_end_is_set = false; + bool distance_fade_start_is_set = false; + bool euler_rotation_is_set = false; + bool festival_filter_is_set = false; + bool guid_is_set = false; + bool has_countdown_is_set = false; + bool heightoffset_is_set = false; + bool hide_category_is_set = false; + bool icon_is_set = false; + bool icon_size_is_set = false; + bool info_message_is_set = false; + bool invert_visibility_is_set = false; + bool map_display_size_is_set = false; + bool map_id_is_set = false; + bool map_type_filter_is_set = false; + bool maximum_size_on_screen_is_set = false; + bool minimum_size_on_screen_is_set = false; + bool mount_filter_is_set = false; + bool position_is_set = false; + bool profession_filter_is_set = false; + bool render_ingame_is_set = false; + bool render_on_map_is_set = false; + bool render_on_minimap_is_set = false; + bool reset_behavior_is_set = false; + bool reset_length_is_set = false; + bool scale_on_map_with_zoom_is_set = false; + bool schedule_is_set = false; + bool schedule_duration_is_set = false; + bool show_category_is_set = false; + bool specialization_filter_is_set = false; + bool species_filter_is_set = false; + bool toggle_category_is_set = false; + bool tooltip_description_is_set = false; + bool tooltip_name_is_set = false; + bool trigger_range_is_set = false; + bool x_position_is_set = false; + bool x_rotation_is_set = false; + bool y_position_is_set = false; + bool y_rotation_is_set = false; + bool z_position_is_set = false; bool z_rotation_is_set = false; + virtual vector as_xml() const; virtual string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors); - virtual vector as_xml() const; bool validate_attributes_of_type_marker_category(); }; \ No newline at end of file diff --git a/xml_converter/src/trail_gen.hpp b/xml_converter/src/trail_gen.hpp index a9bf3591..88f77594 100644 --- a/xml_converter/src/trail_gen.hpp +++ b/xml_converter/src/trail_gen.hpp @@ -35,63 +35,63 @@ using namespace std; class Trail: public Parseable { public: int achievement_bitmask; - bool achievement_bitmask_is_set = false; int achievement_id; - bool achievement_id_is_set = false; float alpha; - bool alpha_is_set = false; float animation_speed; - bool animation_speed_is_set = false; bool can_fade; - bool can_fade_is_set = false; MarkerCategory category; - bool category_is_set = false; Color color; - bool color_is_set = false; CullChirality cull_chirality; - bool cull_chirality_is_set = false; float distance_fade_end; - bool distance_fade_end_is_set = false; float distance_fade_start; - bool distance_fade_start_is_set = false; FestivalFilter festival_filter; - bool festival_filter_is_set = false; UniqueId guid; - bool guid_is_set = false; bool is_wall; - bool is_wall_is_set = false; int map_display_size; - bool map_display_size_is_set = false; int map_id; - bool map_id_is_set = false; MapTypeFilter map_type_filter; - bool map_type_filter_is_set = false; MountFilter mount_filter; - bool mount_filter_is_set = false; ProfessionFilter profession_filter; - bool profession_filter_is_set = false; bool render_ingame; - bool render_ingame_is_set = false; bool render_on_map; - bool render_on_map_is_set = false; bool render_on_minimap; - bool render_on_minimap_is_set = false; string schedule; - bool schedule_is_set = false; float schedule_duration; - bool schedule_duration_is_set = false; SpecializationFilter specialization_filter; - bool specialization_filter_is_set = false; SpeciesFilter species_filter; - bool species_filter_is_set = false; Image texture; - bool texture_is_set = false; TrailData trail_data; - bool trail_data_is_set = false; float trail_scale; + bool achievement_bitmask_is_set = false; + bool achievement_id_is_set = false; + bool alpha_is_set = false; + bool animation_speed_is_set = false; + bool can_fade_is_set = false; + bool category_is_set = false; + bool color_is_set = false; + bool cull_chirality_is_set = false; + bool distance_fade_end_is_set = false; + bool distance_fade_start_is_set = false; + bool festival_filter_is_set = false; + bool guid_is_set = false; + bool is_wall_is_set = false; + bool map_display_size_is_set = false; + bool map_id_is_set = false; + bool map_type_filter_is_set = false; + bool mount_filter_is_set = false; + bool profession_filter_is_set = false; + bool render_ingame_is_set = false; + bool render_on_map_is_set = false; + bool render_on_minimap_is_set = false; + bool schedule_is_set = false; + bool schedule_duration_is_set = false; + bool specialization_filter_is_set = false; + bool species_filter_is_set = false; + bool texture_is_set = false; + bool trail_data_is_set = false; bool trail_scale_is_set = false; + virtual vector as_xml() const; virtual string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors); - virtual vector as_xml() const; bool validate_attributes_of_type_marker_category(); }; \ No newline at end of file From 86e76803b91b39e5bd8ca0da1693c72bce35441e Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 30 Oct 2022 13:47:03 -0400 Subject: [PATCH 087/539] Reworked proto template to avoid nested messages and renumber indexes --- .../cpp_templates/class_template.hpp | 1 - .../generators/proto_templates/node.proto | 496 +++++++++--------- xml_converter/src/attribute/image.cpp | 1 - xml_converter/src/attribute/image.hpp | 1 - 4 files changed, 256 insertions(+), 243 deletions(-) diff --git a/xml_converter/generators/cpp_templates/class_template.hpp b/xml_converter/generators/cpp_templates/class_template.hpp index 8d194a34..27027d39 100644 --- a/xml_converter/generators/cpp_templates/class_template.hpp +++ b/xml_converter/generators/cpp_templates/class_template.hpp @@ -38,7 +38,6 @@ class {{cpp_class}}: public Parseable { Icon default_icon; Trail default_trail; - virtual vector as_xml() const; void init_from_xml(rapidxml::xml_node<>* node, vector *errors); {%- else %} virtual vector as_xml() const; diff --git a/xml_converter/generators/proto_templates/node.proto b/xml_converter/generators/proto_templates/node.proto index 5c12d3e7..5e1f8793 100644 --- a/xml_converter/generators/proto_templates/node.proto +++ b/xml_converter/generators/proto_templates/node.proto @@ -1,7 +1,4 @@ syntax = "proto3"; -import "google/protobuf/any.proto"; - -package Proto_Node; message Category { bool default_visibility = 1; @@ -13,262 +10,281 @@ message Category { } message Icon { - fixed32 achievement_bit = 1; - int32 achievement_id = 2; - float alpha = 3; - bool can_fade = 4; + Category category = 1; + Texture texture = 2; + GUID guid = 3; + int32 map_id = 4; float distance_fade_end = 5; float distance_fade_start = 6; float height_offset= 7; - float __tentative__scale = 8; - int32 map_display_size = 9; - int32 map_id = 10; - int32 maximum_size_on_screen = 11; - int32 minimum_size_on_screen = 12; - bool __tentative__render_ingame = 13; - bool __tentative__render_on_map = 14; - bool __tentative__render_on_minimap = 15; - bool scale_on_map_with_zoom = 16; - string bhdraft__schedule = 17; - float bhdraft__schedule_duration = 18; - string tip_description = 19; - string tip_name = 20; - - message texture { - string path = 1; - google.protobuf.Any original_token = 2; - } - - message position { - float x = 1; - float y = 2; - float z = 3; - } + Position position = 8; + Reset_behavior = 9; + Trigger trigger = 10; + + fixed32 achievement_bit = 16; + int32 achievement_id = 17; + float alpha = 18; + bool can_fade = 19; + int32 minimum_size_on_screen = 20; + int32 map_display_size = 21; + int32 maximum_size_on_screen = 22; + bool scale_on_map_with_zoom = 23; + string tip_description = 24; + string tip_name = 25; - message euler_rotation { - float x = 1; - float y = 2; - float z = 3; + float __tentative__scale = 2048; + bool __tentative__render_ingame = 2049; + bool __tentative__render_on_map = 2050; + bool __tentative__render_on_minimap = 2051; + string bhdraft__schedule = 2052; + float bhdraft__schedule_duration = 2053; } - message trigger{ - bool auto_trigger = 1; - float bounce_delay = 2; - float bounce_duration = 3; - float bounce_height = 4; - string action_copy_clipboard = 5; - string action_copy_message = 6; - bool has_countdown = 7; - string action_info_message = 8; - bool invert_display = 9; - float reset_length = 10; - float range = 11; - Category action_hide_category = 12; - Category action_show_category = 13; - Category action_toggle_category = 14; +message Trail { + Category category = 1; + Texture texture = 2; + GUID guid = 3; + int32 map_id = 4; + float distance_fade_end = 5; + float distance_fade_start = 6; + Trail_data trail_data = 7; + float animation_speed = 8; + Cull_chirality cull_chirality = 9; - message guid{ - int32 guid = 1; - } + fixed32 achievement_bit = 16; + int32 achievement_id = 17; + float alpha = 18; + bool can_fade = 19; + float distance_fade_end = 20; + float distance_fade_start = 21; + bool is_wall = 22; + string bhdraft__schedule = 23; + float bhdraft__schedule_duration = 24; + float scale = 25; + Color color = 26; + Festival_filter festival_filter = 27; + Map_type_filter map_type_filter = 28; + Mount_filter mount_filter = 29; + Profession_filter profession_filter = 30; + Specialization_filter specialization_filter = 31; + Species_filter species_filter =32; +} + +message Texture { + string path = 1; +} + +message Position { + float x = 1; + float y = 2; + float z = 3; +} - enum reset_behavior { - always_visible = 0; - map_change = 1; - daily_reset = 2; - never = 3; - timer = 4; - map_reset = 5; - instance_change = 6; - daily_reset_per_character = 7; - weekly_reset = 8; - } - } +message Euler_rotation { + float x = 1; + float y = 2; + float z = 3; +} + +message Trigger{ + bool auto_trigger = 1; + float bounce_delay = 2; + float bounce_duration = 3; + float bounce_height = 4; + string action_copy_clipboard = 5; + string action_copy_message = 6; + bool has_countdown = 7; + string action_info_message = 8; + bool invert_display = 9; + float reset_length = 10; + float range = 11; + Category action_hide_category = 12; + Category action_show_category = 13; + Category action_toggle_category = 14; +message GUID{ + int32 guid = 1; } -message Trail { - fixed32 achievement_bit = 1; - int32 achievement_id = 2; - float alpha = 3; - float animation_speed = 4; - bool can_fade = 5; - float distance_fade_end = 6; - float distance_fade_start = 7; - bool is_wall = 8; - string bhdraft__schedule = 9; - float bhdraft__schedule_duration = 10; - float scale = 11; - Category category = 12; - int32 map_id = 13; +message Color { + string hex = 1; +} - message color { - string hex = 1; - } - - enum cull_chirality { +enum Cull_chirality { none = 0; clockwise = 1; counter_clockwise = 2; - } +} +enum reset_behavior { + always_visible = 0; + map_change = 1; + daily_reset = 2; + never = 3; + timer = 4; + map_reset = 5; + instance_change = 6; + daily_reset_per_character = 7; + weekly_reset = 8; +} - message festival_filter { - bool dragonbash = 1; - bool festival_of_the_four_winds = 2; - bool halloween = 3; - bool lunar_new_year = 4; - bool super_adventure_festival = 5; - bool wintersday = 6; - bool none = 7; - } +message Festival_filter { + bool dragonbash = 1; + bool festival_of_the_four_winds = 2; + bool halloween = 3; + bool lunar_new_year = 4; + bool super_adventure_festival = 5; + bool wintersday = 6; + bool none = 7; +} - message guid{ - int32 guid = 1; - } +message Guid{ + int32 guid = 1; +} - message map_type_filter { - bool unknown_map = 1; - bool redirect_map = 2; - bool character_create_map = 3; - bool pvp_map = 4; - bool gvg_map = 5; - bool instance_map = 6; - bool public_map = 7; - bool tournament_map = 8; - bool tutorial_map = 9; - bool user_tournament_map = 10; - bool center_map = 11; - bool eternal_battlegrounds_map = 12; - bool bluehome_map = 13; - bool blue_borderlands_map = 14; - bool green_home_map = 15; - bool green_borderlands_map = 16; - bool red_home_map = 17; - bool red_borderlands_map = 18; - bool fortunes_vale_map = 19; - bool jump_puzzle_map = 20; - bool obsidian_sanctum_map = 21; - bool edge_of_the_mists_map = 22; - bool public_mini_map = 23; - bool wvw_lounge_map = 24; - } - message mount_filter { - bool raptor = 1; - bool springer = 2; - bool skimmer = 3; - bool jackal = 4; - bool griffon = 5; - bool roller_beetle = 6; - bool warclaw = 7; - bool skyscalee = 8; - bool skiff = 9; - bool seige_turtle = 10; - } - message profession_filter { - bool guardian = 1; - bool warrior = 2; - bool engineer = 3; - bool ranger = 4; - bool thief = 5; - bool elementalist = 6; - bool mesmer = 7; - bool necromancer = 8; - bool revenantnt = 9; - } - message specialization_filter { - // Heart of Thorns Spec - bool elementalist_tempest = 48; - bool engineer_scrapper = 43; - bool guardian_dragonhunter = 27; - bool mesmer_chronomancer = 40; - bool necromancer_reaper = 34; - bool ranger_druid = 5; - bool revenant_herald = 52; - bool thief_daredevil = 7; - bool warrior_berserker = 18; - // Path of Fire Spec - bool elementalist_weaver = 56; - bool engineer_holosmith = 57; - bool guardian_firebrand = 62; - bool mesmer_mirage = 59; - bool necromancer_scourge = 60; - bool ranger_soulbeast = 55; - bool revenant_renegade = 63; - bool thief_deadeye = 58; - bool warrior_spellbreaker = 61; - // End of Dragon Spec - bool elmentalist_catalyst = 67; - bool engineer_mechanist = 70; - bool guardian_willbender = 65; - bool mesmer_virtuoso = 66; - bool necromancer_harbinger = 64; - bool ranger_untamed = 72; - bool revenant_vindicator = 69; - bool thief_specter = 71; - bool warrior_bladesworn = 68; - // Core Spec - bool elementalist_air = 41; - bool elementalist_arcane = 37; - bool elementalist_earth = 26; - bool elementalist_fire = 31; - bool elementalist_water = 17; - bool engineer_alchemy = 29; - bool engineer_explosives = 6; - bool engineer_firearms = 38; - bool engineer_inventions = 47; - bool engineer_tools = 21; - bool guardian_honor = 49; - bool guardian_radiance = 16; - bool guardian_valor = 13; - bool guardian_virtues = 46; - bool guardian_zeal = 42; - bool mesmer_chaos = 45; - bool mesmer_domination = 10; - bool mesmer_dueling = 1; - bool mesmer_illusions = 24; - bool mesmer_inspiration = 23; - bool necromancer_blood_magic = 19; - bool necromancer_curses = 39; - bool necromancer_death_magic = 2; - bool necromancer_soul_reaping = 50; - bool necromancer_spite = 53; - bool ranger_beastmastery = 32; - bool ranger_marksmanship = 8; - bool ranger_nature_magic = 25; - bool ranger_skirmishing = 30; - bool ranger_wilderness_survival = 33; - bool revenant_corruption = 14; - bool revenant_devastation = 15; - bool revenant_invocation = 3; - bool revenant_retribution = 9; - bool revenant_salvation = 12; - bool thief_acrobatics = 54; - bool thief_critical_strikes = 35; - bool thief_deadly_arts = 28; - bool thief_shadow_arts = 20; - bool thief_trickery = 44; - bool warrior_arms = 36; - bool warrior_defense = 22; - bool warrior_discipline = 51; - bool warrior_strength = 4; - bool warrior_tactics = 11; - } +message Map_type_filter { + bool unknown_map = 1; + bool redirect_map = 2; + bool character_create_map = 3; + bool pvp_map = 4; + bool gvg_map = 5; + bool instance_map = 6; + bool public_map = 7; + bool tournament_map = 8; + bool tutorial_map = 9; + bool user_tournament_map = 10; + bool center_map = 11; + bool eternal_battlegrounds_map = 12; + bool bluehome_map = 13; + bool blue_borderlands_map = 14; + bool green_home_map = 15; + bool green_borderlands_map = 16; + bool red_home_map = 17; + bool red_borderlands_map = 18; + bool fortunes_vale_map = 19; + bool jump_puzzle_map = 20; + bool obsidian_sanctum_map = 21; + bool edge_of_the_mists_map = 22; + bool public_mini_map = 23; + bool wvw_lounge_map = 24; +} - message species_filter { - bool asura = 1; - bool charr = 2; - bool human = 3; - bool norn = 4; - bool sylvari = 5; - } - - message texture { - string path = 1; - google.protobuf.Any original_token = 2; - } +message Mount_filter { + bool raptor = 1; + bool springer = 2; + bool skimmer = 3; + bool jackal = 4; + bool griffon = 5; + bool roller_beetle = 6; + bool warclaw = 7; + bool skyscalee = 8; + bool skiff = 9; + bool seige_turtle = 10; +} - message trail_data { - string trail_data = 1; - } +message Profession_filter { + bool guardian = 1; + bool warrior = 2; + bool engineer = 3; + bool ranger = 4; + bool thief = 5; + bool elementalist = 6; + bool mesmer = 7; + bool necromancer = 8; + bool revenantnt = 9; +} + +message Specialization_filter { +// Heart of Thorns Spec + bool elementalist_tempest = 1; + bool engineer_scrapper = 2; + bool guardian_dragonhunter = 3; + bool mesmer_chronomancer = 4; + bool necromancer_reaper = 5; + bool ranger_druid = 6; + bool revenant_herald = 7; + bool thief_daredevil = 8; + bool warrior_berserker = 9; +// Path of Fire Spec + bool elementalist_weaver = 10; + bool engineer_holosmith = 11; + bool guardian_firebrand = 12; + bool mesmer_mirage = 13; + bool necromancer_scourge = 14; + bool ranger_soulbeast = 15; + bool revenant_renegade = 16; + bool thief_deadeye = 17; + bool warrior_spellbreaker = 18; +// End of Dragon Spec + bool elmentalist_catalyst = 19; + bool engineer_mechanist = 20; + bool guardian_willbender = 21; + bool mesmer_virtuoso = 22; + bool necromancer_harbinger = 23; + bool ranger_untamed = 24; + bool revenant_vindicator = 25; + bool thief_specter = 26; + bool warrior_bladesworn = 27; +// Core Spec + bool elementalist_air = 28; + bool elementalist_arcane = 29; + bool elementalist_earth = 30; + bool elementalist_fire = 31; + bool elementalist_water = 32; + bool engineer_alchemy = 33; + bool engineer_explosives = 34; + bool engineer_firearms = 35; + bool engineer_inventions = 36; + bool engineer_tools = 37; + bool guardian_honor = 38; + bool guardian_radiance = 39; + bool guardian_valor = 40; + bool guardian_virtues = 41; + bool guardian_zeal = 42; + bool mesmer_chaos = 43; + bool mesmer_domination = 44; + bool mesmer_dueling = 45; + bool mesmer_illusions = 46; + bool mesmer_inspiration = 47; + bool necromancer_blood_magic = 48; + bool necromancer_curses = 49; + bool necromancer_death_magic = 50; + bool necromancer_soul_reaping = 51; + bool necromancer_spite = 52; + bool ranger_beastmastery = 53; + bool ranger_marksmanship = 54; + bool ranger_nature_magic = 55; + bool ranger_skirmishing = 56; + bool ranger_wilderness_survival = 57; + bool revenant_corruption = 58; + bool revenant_devastation = 59; + bool revenant_invocation = 60; + bool revenant_retribution = 61; + bool revenant_salvation = 62; + bool thief_acrobatics = 63; + bool thief_critical_strikes = 64; + bool thief_deadly_arts = 65; + bool thief_shadow_arts = 66; + bool thief_trickery = 67; + bool warrior_arms = 68; + bool warrior_defense = 69; + bool warrior_discipline = 70; + bool warrior_strength = 71; + bool warrior_tactics = 72; +} -} +message Species_filter { + bool asura = 1; + bool charr = 2; + bool human = 3; + bool norn = 4; + bool sylvari = 5; +} + +message Texture { + string path = 1; +} + +message Trail_data { + string trail_data = 1; +} diff --git a/xml_converter/src/attribute/image.cpp b/xml_converter/src/attribute/image.cpp index 738f9cda..380207f9 100644 --- a/xml_converter/src/attribute/image.cpp +++ b/xml_converter/src/attribute/image.cpp @@ -10,7 +10,6 @@ using namespace std; Image parse_image(rapidxml::xml_attribute<>* input, vector *) { Image image; image.path = get_attribute_value(input); - image.original_token = input; return image; } diff --git a/xml_converter/src/attribute/image.hpp b/xml_converter/src/attribute/image.hpp index 591f94d0..4eb1ce1b 100644 --- a/xml_converter/src/attribute/image.hpp +++ b/xml_converter/src/attribute/image.hpp @@ -11,7 +11,6 @@ using namespace std; class Image { public: string path; - rapidxml::xml_attribute<>* original_token; }; Image parse_image(rapidxml::xml_attribute<>* input, vector *errors); From 1bc32fabefb3358b33b89319e6d676b5e80ee031 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 30 Oct 2022 13:48:55 -0400 Subject: [PATCH 088/539] Found typo --- xml_converter/generators/proto_templates/node.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xml_converter/generators/proto_templates/node.proto b/xml_converter/generators/proto_templates/node.proto index 5e1f8793..6dc2e2c1 100644 --- a/xml_converter/generators/proto_templates/node.proto +++ b/xml_converter/generators/proto_templates/node.proto @@ -18,7 +18,7 @@ message Icon { float distance_fade_start = 6; float height_offset= 7; Position position = 8; - Reset_behavior = 9; + Reset_behavior reset_behavior= 9; Trigger trigger = 10; fixed32 achievement_bit = 16; @@ -67,7 +67,7 @@ message Trail { Mount_filter mount_filter = 29; Profession_filter profession_filter = 30; Specialization_filter specialization_filter = 31; - Species_filter species_filter =32; + Species_filter species_filter = 32; } message Texture { From a2a98c4a9e6d55d5cd13eac00483b81e0768a82b Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 30 Oct 2022 20:04:08 -0400 Subject: [PATCH 089/539] Fixed Capitalizations --- .../generators/proto_templates/node.proto | 84 +++++++++---------- 1 file changed, 38 insertions(+), 46 deletions(-) diff --git a/xml_converter/generators/proto_templates/node.proto b/xml_converter/generators/proto_templates/node.proto index 6dc2e2c1..573d9dfd 100644 --- a/xml_converter/generators/proto_templates/node.proto +++ b/xml_converter/generators/proto_templates/node.proto @@ -18,7 +18,7 @@ message Icon { float distance_fade_start = 6; float height_offset= 7; Position position = 8; - Reset_behavior reset_behavior= 9; + ResetBehavior reset_behavior= 9; Trigger trigger = 10; fixed32 achievement_bit = 16; @@ -38,7 +38,7 @@ message Icon { bool __tentative__render_on_minimap = 2051; string bhdraft__schedule = 2052; float bhdraft__schedule_duration = 2053; - } +} message Trail { Category category = 1; @@ -47,9 +47,9 @@ message Trail { int32 map_id = 4; float distance_fade_end = 5; float distance_fade_start = 6; - Trail_data trail_data = 7; + TrailData trail_data = 7; float animation_speed = 8; - Cull_chirality cull_chirality = 9; + CullChirality cull_chirality = 9; fixed32 achievement_bit = 16; int32 achievement_id = 17; @@ -62,12 +62,12 @@ message Trail { float bhdraft__schedule_duration = 24; float scale = 25; Color color = 26; - Festival_filter festival_filter = 27; - Map_type_filter map_type_filter = 28; - Mount_filter mount_filter = 29; - Profession_filter profession_filter = 30; - Specialization_filter specialization_filter = 31; - Species_filter species_filter = 32; + FestivalFilter festival_filter = 27; + MapTypeFilter map_type_filter = 28; + MountFilter mount_filter = 29; + ProfessionFilter profession_filter = 30; + SpecializationFilter specialization_filter = 31; + SpeciesFilter species_filter = 32; } message Texture { @@ -80,13 +80,13 @@ message Position { float z = 3; } -message Euler_rotation { +message EulerRotation { float x = 1; float y = 2; float z = 3; } -message Trigger{ +message Trigger { bool auto_trigger = 1; float bounce_delay = 2; float bounce_duration = 3; @@ -102,7 +102,7 @@ message Trigger{ Category action_show_category = 13; Category action_toggle_category = 14; -message GUID{ +message GUID { int32 guid = 1; } @@ -110,24 +110,24 @@ message Color { string hex = 1; } -enum Cull_chirality { - none = 0; - clockwise = 1; - counter_clockwise = 2; +enum CullChirality { + none = 0; + clockwise = 1; + counter_clockwise = 2; } -enum reset_behavior { - always_visible = 0; - map_change = 1; - daily_reset = 2; - never = 3; - timer = 4; - map_reset = 5; - instance_change = 6; - daily_reset_per_character = 7; - weekly_reset = 8; +enum ResetBehavior { + always_visible = 0; + map_change = 1; + daily_reset = 2; + never = 3; + timer = 4; + map_reset = 5; + instance_change = 6; + daily_reset_per_character = 7; + weekly_reset = 8; } -message Festival_filter { +message FestivalFilter { bool dragonbash = 1; bool festival_of_the_four_winds = 2; bool halloween = 3; @@ -137,11 +137,7 @@ message Festival_filter { bool none = 7; } -message Guid{ - int32 guid = 1; -} - -message Map_type_filter { +message MapTypeFilter { bool unknown_map = 1; bool redirect_map = 2; bool character_create_map = 3; @@ -168,7 +164,7 @@ message Map_type_filter { bool wvw_lounge_map = 24; } -message Mount_filter { +message MountFilter { bool raptor = 1; bool springer = 2; bool skimmer = 3; @@ -181,7 +177,7 @@ message Mount_filter { bool seige_turtle = 10; } -message Profession_filter { +message ProfessionFilter { bool guardian = 1; bool warrior = 2; bool engineer = 3; @@ -193,8 +189,8 @@ message Profession_filter { bool revenantnt = 9; } -message Specialization_filter { -// Heart of Thorns Spec +message SpecializationFilter { + // Heart of Thorns Spec bool elementalist_tempest = 1; bool engineer_scrapper = 2; bool guardian_dragonhunter = 3; @@ -204,7 +200,7 @@ message Specialization_filter { bool revenant_herald = 7; bool thief_daredevil = 8; bool warrior_berserker = 9; -// Path of Fire Spec + // Path of Fire Spec bool elementalist_weaver = 10; bool engineer_holosmith = 11; bool guardian_firebrand = 12; @@ -214,7 +210,7 @@ message Specialization_filter { bool revenant_renegade = 16; bool thief_deadeye = 17; bool warrior_spellbreaker = 18; -// End of Dragon Spec + // End of Dragon Spec bool elmentalist_catalyst = 19; bool engineer_mechanist = 20; bool guardian_willbender = 21; @@ -224,7 +220,7 @@ message Specialization_filter { bool revenant_vindicator = 25; bool thief_specter = 26; bool warrior_bladesworn = 27; -// Core Spec + // Core Spec bool elementalist_air = 28; bool elementalist_arcane = 29; bool elementalist_earth = 30; @@ -272,19 +268,15 @@ message Specialization_filter { bool warrior_tactics = 72; } -message Species_filter { +message SpeciesFilter { bool asura = 1; bool charr = 2; bool human = 3; bool norn = 4; bool sylvari = 5; } - -message Texture { - string path = 1; -} -message Trail_data { +message TrailData { string trail_data = 1; } From 37cf689c396b704b9ca4b5001f11af3821b0fb63 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 30 Oct 2022 20:44:32 -0400 Subject: [PATCH 090/539] Missed end bracket --- xml_converter/generators/proto_templates/node.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xml_converter/generators/proto_templates/node.proto b/xml_converter/generators/proto_templates/node.proto index 573d9dfd..99d2b171 100644 --- a/xml_converter/generators/proto_templates/node.proto +++ b/xml_converter/generators/proto_templates/node.proto @@ -55,8 +55,6 @@ message Trail { int32 achievement_id = 17; float alpha = 18; bool can_fade = 19; - float distance_fade_end = 20; - float distance_fade_start = 21; bool is_wall = 22; string bhdraft__schedule = 23; float bhdraft__schedule_duration = 24; @@ -101,6 +99,7 @@ message Trigger { Category action_hide_category = 12; Category action_show_category = 13; Category action_toggle_category = 14; +} message GUID { int32 guid = 1; @@ -115,6 +114,7 @@ enum CullChirality { clockwise = 1; counter_clockwise = 2; } + enum ResetBehavior { always_visible = 0; map_change = 1; From 9d10ffadbf8263331850a6d068572505c63eb9ba Mon Sep 17 00:00:00 2001 From: klingbolt Date: Wed, 2 Nov 2022 22:30:17 -0400 Subject: [PATCH 091/539] Protoc Dependencies added to CMake file --- .github/workflows/main.yml | 3 + xml_converter/CMakeLists.txt | 6 + .../generators/proto_templates/node.pb.cc | 10970 +++++++-------- .../generators/proto_templates/node.pb.h | 11441 +++++++++------- 4 files changed, 11719 insertions(+), 10701 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d4ad6bf6..7bce03f6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -89,6 +89,9 @@ jobs: cd taco_parser cargo build --release + - name: Install protoc + run: sudo apt-get install protobuf-compiler + - name: Build Burrito Link run: | cd burrito_link diff --git a/xml_converter/CMakeLists.txt b/xml_converter/CMakeLists.txt index eaca0185..76c9e604 100644 --- a/xml_converter/CMakeLists.txt +++ b/xml_converter/CMakeLists.txt @@ -9,6 +9,12 @@ set(TARGET_NAME xml_converter) # Add Dependencies file(GLOB_RECURSE SOURCES "src/*.cpp") +# Add Protobuf +find_package(Protobuf REQUIRED) +include_directories(${Protobuf_INCLUDE_DIRS}) +include_directories(${CMAKE_CURRENT_BINARY_DIR}) +EXECUTE_PROCESS(COMMAND ${PROTOBUF_PROTOC_EXECUTABLE} --cpp_out=. ./generators/proto_templates/node.proto) + # Set output as executable. # TODO: This will eventually become a library when it gets integrated into burrito. add_executable (${TARGET_NAME} ${SOURCES}) diff --git a/xml_converter/generators/proto_templates/node.pb.cc b/xml_converter/generators/proto_templates/node.pb.cc index 95bff400..c05c364b 100644 --- a/xml_converter/generators/proto_templates/node.pb.cc +++ b/xml_converter/generators/proto_templates/node.pb.cc @@ -1,7 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: node.proto +// source: generators/proto_templates/node.proto -#include "node.pb.h" +#include "generators/proto_templates/node.pb.h" #include @@ -14,9 +14,19 @@ #include // @@protoc_insertion_point(includes) #include -extern PROTOBUF_INTERNAL_EXPORT_node_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Category_node_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fany_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Any_google_2fprotobuf_2fany_2eproto; -namespace Proto_Node { +extern PROTOBUF_INTERNAL_EXPORT_generators_2fproto_5ftemplates_2fnode_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Category_generators_2fproto_5ftemplates_2fnode_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_generators_2fproto_5ftemplates_2fnode_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Color_generators_2fproto_5ftemplates_2fnode_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_generators_2fproto_5ftemplates_2fnode_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_FestivalFilter_generators_2fproto_5ftemplates_2fnode_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_generators_2fproto_5ftemplates_2fnode_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_GUID_generators_2fproto_5ftemplates_2fnode_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_generators_2fproto_5ftemplates_2fnode_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_MapTypeFilter_generators_2fproto_5ftemplates_2fnode_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_generators_2fproto_5ftemplates_2fnode_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_MountFilter_generators_2fproto_5ftemplates_2fnode_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_generators_2fproto_5ftemplates_2fnode_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Position_generators_2fproto_5ftemplates_2fnode_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_generators_2fproto_5ftemplates_2fnode_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ProfessionFilter_generators_2fproto_5ftemplates_2fnode_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_generators_2fproto_5ftemplates_2fnode_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_SpecializationFilter_generators_2fproto_5ftemplates_2fnode_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_generators_2fproto_5ftemplates_2fnode_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_SpeciesFilter_generators_2fproto_5ftemplates_2fnode_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_generators_2fproto_5ftemplates_2fnode_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Texture_generators_2fproto_5ftemplates_2fnode_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_generators_2fproto_5ftemplates_2fnode_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_TrailData_generators_2fproto_5ftemplates_2fnode_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_generators_2fproto_5ftemplates_2fnode_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Trigger_generators_2fproto_5ftemplates_2fnode_2eproto; class Category_ChildrenEntry_DoNotUseDefaultTypeInternal { public: ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; @@ -25,911 +35,868 @@ class CategoryDefaultTypeInternal { public: ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _Category_default_instance_; -class Icon_textureDefaultTypeInternal { - public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _Icon_texture_default_instance_; -class Icon_positionDefaultTypeInternal { - public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _Icon_position_default_instance_; -class Icon_euler_rotationDefaultTypeInternal { - public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _Icon_euler_rotation_default_instance_; -class Icon_trigger_guidDefaultTypeInternal { - public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _Icon_trigger_guid_default_instance_; -class Icon_triggerDefaultTypeInternal { - public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _Icon_trigger_default_instance_; class IconDefaultTypeInternal { public: ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _Icon_default_instance_; -class Trail_colorDefaultTypeInternal { +class RICHARDSDefaultTypeInternal { public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _Trail_color_default_instance_; -class Trail_festival_filterDefaultTypeInternal { + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _RICHARDS_default_instance_; +class TextureDefaultTypeInternal { public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _Trail_festival_filter_default_instance_; -class Trail_guidDefaultTypeInternal { + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _Texture_default_instance_; +class PositionDefaultTypeInternal { public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _Trail_guid_default_instance_; -class Trail_map_type_filterDefaultTypeInternal { + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _Position_default_instance_; +class EulerRotationDefaultTypeInternal { public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _Trail_map_type_filter_default_instance_; -class Trail_mount_filterDefaultTypeInternal { + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _EulerRotation_default_instance_; +class TriggerDefaultTypeInternal { public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _Trail_mount_filter_default_instance_; -class Trail_profession_filterDefaultTypeInternal { + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _Trigger_default_instance_; +class GUIDDefaultTypeInternal { public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _Trail_profession_filter_default_instance_; -class Trail_specialization_filterDefaultTypeInternal { + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _GUID_default_instance_; +class ColorDefaultTypeInternal { public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _Trail_specialization_filter_default_instance_; -class Trail_species_filterDefaultTypeInternal { + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _Color_default_instance_; +class FestivalFilterDefaultTypeInternal { public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _Trail_species_filter_default_instance_; -class Trail_textureDefaultTypeInternal { + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _FestivalFilter_default_instance_; +class MapTypeFilterDefaultTypeInternal { public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _Trail_texture_default_instance_; -class Trail_trail_dataDefaultTypeInternal { + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _MapTypeFilter_default_instance_; +class MountFilterDefaultTypeInternal { public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _Trail_trail_data_default_instance_; -class TrailDefaultTypeInternal { + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _MountFilter_default_instance_; +class ProfessionFilterDefaultTypeInternal { public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _Trail_default_instance_; -} // namespace Proto_Node -static void InitDefaultsscc_info_Category_node_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::Proto_Node::_Category_ChildrenEntry_DoNotUse_default_instance_; - new (ptr) ::Proto_Node::Category_ChildrenEntry_DoNotUse(); - } - { - void* ptr = &::Proto_Node::_Category_default_instance_; - new (ptr) ::Proto_Node::Category(); - ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); - } - ::Proto_Node::Category_ChildrenEntry_DoNotUse::InitAsDefaultInstance(); - ::Proto_Node::Category::InitAsDefaultInstance(); -} - -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Category_node_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Category_node_2eproto}, {}}; - -static void InitDefaultsscc_info_Icon_node_2eproto() { + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _ProfessionFilter_default_instance_; +class SpecializationFilterDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _SpecializationFilter_default_instance_; +class SpeciesFilterDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _SpeciesFilter_default_instance_; +class TrailDataDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _TrailData_default_instance_; +static void InitDefaultsscc_info_Category_generators_2fproto_5ftemplates_2fnode_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::Proto_Node::_Icon_default_instance_; - new (ptr) ::Proto_Node::Icon(); - ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &::_Category_ChildrenEntry_DoNotUse_default_instance_; + new (ptr) ::Category_ChildrenEntry_DoNotUse(); } - ::Proto_Node::Icon::InitAsDefaultInstance(); -} - -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Icon_node_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Icon_node_2eproto}, {}}; - -static void InitDefaultsscc_info_Icon_euler_rotation_node_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - { - void* ptr = &::Proto_Node::_Icon_euler_rotation_default_instance_; - new (ptr) ::Proto_Node::Icon_euler_rotation(); + void* ptr = &::_Category_default_instance_; + new (ptr) ::Category(); ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::Proto_Node::Icon_euler_rotation::InitAsDefaultInstance(); + ::Category_ChildrenEntry_DoNotUse::InitAsDefaultInstance(); + ::Category::InitAsDefaultInstance(); } -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Icon_euler_rotation_node_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Icon_euler_rotation_node_2eproto}, {}}; +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Category_generators_2fproto_5ftemplates_2fnode_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Category_generators_2fproto_5ftemplates_2fnode_2eproto}, {}}; -static void InitDefaultsscc_info_Icon_position_node_2eproto() { +static void InitDefaultsscc_info_Color_generators_2fproto_5ftemplates_2fnode_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::Proto_Node::_Icon_position_default_instance_; - new (ptr) ::Proto_Node::Icon_position(); + void* ptr = &::_Color_default_instance_; + new (ptr) ::Color(); ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::Proto_Node::Icon_position::InitAsDefaultInstance(); + ::Color::InitAsDefaultInstance(); } -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Icon_position_node_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Icon_position_node_2eproto}, {}}; +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Color_generators_2fproto_5ftemplates_2fnode_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Color_generators_2fproto_5ftemplates_2fnode_2eproto}, {}}; -static void InitDefaultsscc_info_Icon_texture_node_2eproto() { +static void InitDefaultsscc_info_EulerRotation_generators_2fproto_5ftemplates_2fnode_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::Proto_Node::_Icon_texture_default_instance_; - new (ptr) ::Proto_Node::Icon_texture(); + void* ptr = &::_EulerRotation_default_instance_; + new (ptr) ::EulerRotation(); ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::Proto_Node::Icon_texture::InitAsDefaultInstance(); + ::EulerRotation::InitAsDefaultInstance(); } -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Icon_texture_node_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_Icon_texture_node_2eproto}, { - &scc_info_Any_google_2fprotobuf_2fany_2eproto.base,}}; +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_EulerRotation_generators_2fproto_5ftemplates_2fnode_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_EulerRotation_generators_2fproto_5ftemplates_2fnode_2eproto}, {}}; -static void InitDefaultsscc_info_Icon_trigger_node_2eproto() { +static void InitDefaultsscc_info_FestivalFilter_generators_2fproto_5ftemplates_2fnode_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::Proto_Node::_Icon_trigger_default_instance_; - new (ptr) ::Proto_Node::Icon_trigger(); + void* ptr = &::_FestivalFilter_default_instance_; + new (ptr) ::FestivalFilter(); ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::Proto_Node::Icon_trigger::InitAsDefaultInstance(); + ::FestivalFilter::InitAsDefaultInstance(); } -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Icon_trigger_node_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_Icon_trigger_node_2eproto}, { - &scc_info_Category_node_2eproto.base,}}; +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_FestivalFilter_generators_2fproto_5ftemplates_2fnode_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_FestivalFilter_generators_2fproto_5ftemplates_2fnode_2eproto}, {}}; -static void InitDefaultsscc_info_Icon_trigger_guid_node_2eproto() { +static void InitDefaultsscc_info_GUID_generators_2fproto_5ftemplates_2fnode_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::Proto_Node::_Icon_trigger_guid_default_instance_; - new (ptr) ::Proto_Node::Icon_trigger_guid(); + void* ptr = &::_GUID_default_instance_; + new (ptr) ::GUID(); ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::Proto_Node::Icon_trigger_guid::InitAsDefaultInstance(); + ::GUID::InitAsDefaultInstance(); } -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Icon_trigger_guid_node_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Icon_trigger_guid_node_2eproto}, {}}; +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_GUID_generators_2fproto_5ftemplates_2fnode_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_GUID_generators_2fproto_5ftemplates_2fnode_2eproto}, {}}; -static void InitDefaultsscc_info_Trail_node_2eproto() { +static void InitDefaultsscc_info_Icon_generators_2fproto_5ftemplates_2fnode_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::Proto_Node::_Trail_default_instance_; - new (ptr) ::Proto_Node::Trail(); + void* ptr = &::_Icon_default_instance_; + new (ptr) ::Icon(); ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::Proto_Node::Trail::InitAsDefaultInstance(); + ::Icon::InitAsDefaultInstance(); } -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Trail_node_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_Trail_node_2eproto}, { - &scc_info_Category_node_2eproto.base,}}; +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<5> scc_info_Icon_generators_2fproto_5ftemplates_2fnode_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 5, 0, InitDefaultsscc_info_Icon_generators_2fproto_5ftemplates_2fnode_2eproto}, { + &scc_info_Category_generators_2fproto_5ftemplates_2fnode_2eproto.base, + &scc_info_Texture_generators_2fproto_5ftemplates_2fnode_2eproto.base, + &scc_info_GUID_generators_2fproto_5ftemplates_2fnode_2eproto.base, + &scc_info_Position_generators_2fproto_5ftemplates_2fnode_2eproto.base, + &scc_info_Trigger_generators_2fproto_5ftemplates_2fnode_2eproto.base,}}; -static void InitDefaultsscc_info_Trail_color_node_2eproto() { +static void InitDefaultsscc_info_MapTypeFilter_generators_2fproto_5ftemplates_2fnode_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::Proto_Node::_Trail_color_default_instance_; - new (ptr) ::Proto_Node::Trail_color(); + void* ptr = &::_MapTypeFilter_default_instance_; + new (ptr) ::MapTypeFilter(); ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::Proto_Node::Trail_color::InitAsDefaultInstance(); + ::MapTypeFilter::InitAsDefaultInstance(); } -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Trail_color_node_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Trail_color_node_2eproto}, {}}; +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_MapTypeFilter_generators_2fproto_5ftemplates_2fnode_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_MapTypeFilter_generators_2fproto_5ftemplates_2fnode_2eproto}, {}}; -static void InitDefaultsscc_info_Trail_festival_filter_node_2eproto() { +static void InitDefaultsscc_info_MountFilter_generators_2fproto_5ftemplates_2fnode_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::Proto_Node::_Trail_festival_filter_default_instance_; - new (ptr) ::Proto_Node::Trail_festival_filter(); + void* ptr = &::_MountFilter_default_instance_; + new (ptr) ::MountFilter(); ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::Proto_Node::Trail_festival_filter::InitAsDefaultInstance(); + ::MountFilter::InitAsDefaultInstance(); } -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Trail_festival_filter_node_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Trail_festival_filter_node_2eproto}, {}}; +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_MountFilter_generators_2fproto_5ftemplates_2fnode_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_MountFilter_generators_2fproto_5ftemplates_2fnode_2eproto}, {}}; -static void InitDefaultsscc_info_Trail_guid_node_2eproto() { +static void InitDefaultsscc_info_Position_generators_2fproto_5ftemplates_2fnode_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::Proto_Node::_Trail_guid_default_instance_; - new (ptr) ::Proto_Node::Trail_guid(); + void* ptr = &::_Position_default_instance_; + new (ptr) ::Position(); ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::Proto_Node::Trail_guid::InitAsDefaultInstance(); + ::Position::InitAsDefaultInstance(); } -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Trail_guid_node_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Trail_guid_node_2eproto}, {}}; +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Position_generators_2fproto_5ftemplates_2fnode_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Position_generators_2fproto_5ftemplates_2fnode_2eproto}, {}}; -static void InitDefaultsscc_info_Trail_map_type_filter_node_2eproto() { +static void InitDefaultsscc_info_ProfessionFilter_generators_2fproto_5ftemplates_2fnode_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::Proto_Node::_Trail_map_type_filter_default_instance_; - new (ptr) ::Proto_Node::Trail_map_type_filter(); + void* ptr = &::_ProfessionFilter_default_instance_; + new (ptr) ::ProfessionFilter(); ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::Proto_Node::Trail_map_type_filter::InitAsDefaultInstance(); + ::ProfessionFilter::InitAsDefaultInstance(); } -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Trail_map_type_filter_node_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Trail_map_type_filter_node_2eproto}, {}}; +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ProfessionFilter_generators_2fproto_5ftemplates_2fnode_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_ProfessionFilter_generators_2fproto_5ftemplates_2fnode_2eproto}, {}}; -static void InitDefaultsscc_info_Trail_mount_filter_node_2eproto() { +static void InitDefaultsscc_info_RICHARDS_generators_2fproto_5ftemplates_2fnode_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::Proto_Node::_Trail_mount_filter_default_instance_; - new (ptr) ::Proto_Node::Trail_mount_filter(); + void* ptr = &::_RICHARDS_default_instance_; + new (ptr) ::RICHARDS(); ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::Proto_Node::Trail_mount_filter::InitAsDefaultInstance(); + ::RICHARDS::InitAsDefaultInstance(); } -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Trail_mount_filter_node_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Trail_mount_filter_node_2eproto}, {}}; +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<11> scc_info_RICHARDS_generators_2fproto_5ftemplates_2fnode_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 11, 0, InitDefaultsscc_info_RICHARDS_generators_2fproto_5ftemplates_2fnode_2eproto}, { + &scc_info_Category_generators_2fproto_5ftemplates_2fnode_2eproto.base, + &scc_info_Texture_generators_2fproto_5ftemplates_2fnode_2eproto.base, + &scc_info_GUID_generators_2fproto_5ftemplates_2fnode_2eproto.base, + &scc_info_TrailData_generators_2fproto_5ftemplates_2fnode_2eproto.base, + &scc_info_Color_generators_2fproto_5ftemplates_2fnode_2eproto.base, + &scc_info_FestivalFilter_generators_2fproto_5ftemplates_2fnode_2eproto.base, + &scc_info_MapTypeFilter_generators_2fproto_5ftemplates_2fnode_2eproto.base, + &scc_info_MountFilter_generators_2fproto_5ftemplates_2fnode_2eproto.base, + &scc_info_ProfessionFilter_generators_2fproto_5ftemplates_2fnode_2eproto.base, + &scc_info_SpecializationFilter_generators_2fproto_5ftemplates_2fnode_2eproto.base, + &scc_info_SpeciesFilter_generators_2fproto_5ftemplates_2fnode_2eproto.base,}}; -static void InitDefaultsscc_info_Trail_profession_filter_node_2eproto() { +static void InitDefaultsscc_info_SpecializationFilter_generators_2fproto_5ftemplates_2fnode_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::Proto_Node::_Trail_profession_filter_default_instance_; - new (ptr) ::Proto_Node::Trail_profession_filter(); + void* ptr = &::_SpecializationFilter_default_instance_; + new (ptr) ::SpecializationFilter(); ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::Proto_Node::Trail_profession_filter::InitAsDefaultInstance(); + ::SpecializationFilter::InitAsDefaultInstance(); } -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Trail_profession_filter_node_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Trail_profession_filter_node_2eproto}, {}}; +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_SpecializationFilter_generators_2fproto_5ftemplates_2fnode_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_SpecializationFilter_generators_2fproto_5ftemplates_2fnode_2eproto}, {}}; -static void InitDefaultsscc_info_Trail_specialization_filter_node_2eproto() { +static void InitDefaultsscc_info_SpeciesFilter_generators_2fproto_5ftemplates_2fnode_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::Proto_Node::_Trail_specialization_filter_default_instance_; - new (ptr) ::Proto_Node::Trail_specialization_filter(); + void* ptr = &::_SpeciesFilter_default_instance_; + new (ptr) ::SpeciesFilter(); ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::Proto_Node::Trail_specialization_filter::InitAsDefaultInstance(); + ::SpeciesFilter::InitAsDefaultInstance(); } -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Trail_specialization_filter_node_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Trail_specialization_filter_node_2eproto}, {}}; +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_SpeciesFilter_generators_2fproto_5ftemplates_2fnode_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_SpeciesFilter_generators_2fproto_5ftemplates_2fnode_2eproto}, {}}; -static void InitDefaultsscc_info_Trail_species_filter_node_2eproto() { +static void InitDefaultsscc_info_Texture_generators_2fproto_5ftemplates_2fnode_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::Proto_Node::_Trail_species_filter_default_instance_; - new (ptr) ::Proto_Node::Trail_species_filter(); + void* ptr = &::_Texture_default_instance_; + new (ptr) ::Texture(); ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::Proto_Node::Trail_species_filter::InitAsDefaultInstance(); + ::Texture::InitAsDefaultInstance(); } -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Trail_species_filter_node_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Trail_species_filter_node_2eproto}, {}}; +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Texture_generators_2fproto_5ftemplates_2fnode_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Texture_generators_2fproto_5ftemplates_2fnode_2eproto}, {}}; -static void InitDefaultsscc_info_Trail_texture_node_2eproto() { +static void InitDefaultsscc_info_TrailData_generators_2fproto_5ftemplates_2fnode_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::Proto_Node::_Trail_texture_default_instance_; - new (ptr) ::Proto_Node::Trail_texture(); + void* ptr = &::_TrailData_default_instance_; + new (ptr) ::TrailData(); ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::Proto_Node::Trail_texture::InitAsDefaultInstance(); + ::TrailData::InitAsDefaultInstance(); } -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Trail_texture_node_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_Trail_texture_node_2eproto}, { - &scc_info_Any_google_2fprotobuf_2fany_2eproto.base,}}; +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_TrailData_generators_2fproto_5ftemplates_2fnode_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_TrailData_generators_2fproto_5ftemplates_2fnode_2eproto}, {}}; -static void InitDefaultsscc_info_Trail_trail_data_node_2eproto() { +static void InitDefaultsscc_info_Trigger_generators_2fproto_5ftemplates_2fnode_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::Proto_Node::_Trail_trail_data_default_instance_; - new (ptr) ::Proto_Node::Trail_trail_data(); + void* ptr = &::_Trigger_default_instance_; + new (ptr) ::Trigger(); ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::Proto_Node::Trail_trail_data::InitAsDefaultInstance(); + ::Trigger::InitAsDefaultInstance(); } -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Trail_trail_data_node_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Trail_trail_data_node_2eproto}, {}}; +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Trigger_generators_2fproto_5ftemplates_2fnode_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_Trigger_generators_2fproto_5ftemplates_2fnode_2eproto}, { + &scc_info_Category_generators_2fproto_5ftemplates_2fnode_2eproto.base,}}; -static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_node_2eproto[19]; -static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_node_2eproto[2]; -static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_node_2eproto = nullptr; +static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_generators_2fproto_5ftemplates_2fnode_2eproto[17]; +static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_generators_2fproto_5ftemplates_2fnode_2eproto[2]; +static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_generators_2fproto_5ftemplates_2fnode_2eproto = nullptr; -const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_node_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - PROTOBUF_FIELD_OFFSET(::Proto_Node::Category_ChildrenEntry_DoNotUse, _has_bits_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Category_ChildrenEntry_DoNotUse, _internal_metadata_), +const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_generators_2fproto_5ftemplates_2fnode_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + PROTOBUF_FIELD_OFFSET(::Category_ChildrenEntry_DoNotUse, _has_bits_), + PROTOBUF_FIELD_OFFSET(::Category_ChildrenEntry_DoNotUse, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::Proto_Node::Category_ChildrenEntry_DoNotUse, key_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Category_ChildrenEntry_DoNotUse, value_), + PROTOBUF_FIELD_OFFSET(::Category_ChildrenEntry_DoNotUse, key_), + PROTOBUF_FIELD_OFFSET(::Category_ChildrenEntry_DoNotUse, value_), 0, 1, ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::Proto_Node::Category, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::Proto_Node::Category, default_visibility_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Category, display_name_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Category, is_separator_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Category, name_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Category, tooltip_name_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Category, children_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_texture, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_texture, path_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_texture, original_token_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_position, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(::Category, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_position, x_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_position, y_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_position, z_), + PROTOBUF_FIELD_OFFSET(::Category, default_visibility_), + PROTOBUF_FIELD_OFFSET(::Category, display_name_), + PROTOBUF_FIELD_OFFSET(::Category, is_separator_), + PROTOBUF_FIELD_OFFSET(::Category, name_), + PROTOBUF_FIELD_OFFSET(::Category, tooltip_name_), + PROTOBUF_FIELD_OFFSET(::Category, children_), ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_euler_rotation, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(::Icon, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_euler_rotation, x_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_euler_rotation, y_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_euler_rotation, z_), + PROTOBUF_FIELD_OFFSET(::Icon, category_), + PROTOBUF_FIELD_OFFSET(::Icon, texture_), + PROTOBUF_FIELD_OFFSET(::Icon, guid_), + PROTOBUF_FIELD_OFFSET(::Icon, map_id_), + PROTOBUF_FIELD_OFFSET(::Icon, distance_fade_end_), + PROTOBUF_FIELD_OFFSET(::Icon, distance_fade_start_), + PROTOBUF_FIELD_OFFSET(::Icon, height_offset_), + PROTOBUF_FIELD_OFFSET(::Icon, position_), + PROTOBUF_FIELD_OFFSET(::Icon, reset_behavior_), + PROTOBUF_FIELD_OFFSET(::Icon, trigger_), + PROTOBUF_FIELD_OFFSET(::Icon, achievement_bit_), + PROTOBUF_FIELD_OFFSET(::Icon, achievement_id_), + PROTOBUF_FIELD_OFFSET(::Icon, alpha_), + PROTOBUF_FIELD_OFFSET(::Icon, can_fade_), + PROTOBUF_FIELD_OFFSET(::Icon, minimum_size_on_screen_), + PROTOBUF_FIELD_OFFSET(::Icon, map_display_size_), + PROTOBUF_FIELD_OFFSET(::Icon, maximum_size_on_screen_), + PROTOBUF_FIELD_OFFSET(::Icon, scale_on_map_with_zoom_), + PROTOBUF_FIELD_OFFSET(::Icon, tip_description_), + PROTOBUF_FIELD_OFFSET(::Icon, tip_name_), + PROTOBUF_FIELD_OFFSET(::Icon, __tentative__scale_), + PROTOBUF_FIELD_OFFSET(::Icon, __tentative__render_ingame_), + PROTOBUF_FIELD_OFFSET(::Icon, __tentative__render_on_map_), + PROTOBUF_FIELD_OFFSET(::Icon, __tentative__render_on_minimap_), + PROTOBUF_FIELD_OFFSET(::Icon, bhdraft__schedule_), + PROTOBUF_FIELD_OFFSET(::Icon, bhdraft__schedule_duration_), ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_trigger_guid, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(::RICHARDS, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_trigger_guid, guid_), + PROTOBUF_FIELD_OFFSET(::RICHARDS, category_), + PROTOBUF_FIELD_OFFSET(::RICHARDS, texture_), + PROTOBUF_FIELD_OFFSET(::RICHARDS, guid_), + PROTOBUF_FIELD_OFFSET(::RICHARDS, map_id_), + PROTOBUF_FIELD_OFFSET(::RICHARDS, distance_fade_end_), + PROTOBUF_FIELD_OFFSET(::RICHARDS, distance_fade_start_), + PROTOBUF_FIELD_OFFSET(::RICHARDS, trail_data_), + PROTOBUF_FIELD_OFFSET(::RICHARDS, animation_speed_), + PROTOBUF_FIELD_OFFSET(::RICHARDS, cull_chirality_), + PROTOBUF_FIELD_OFFSET(::RICHARDS, achievement_bit_), + PROTOBUF_FIELD_OFFSET(::RICHARDS, achievement_id_), + PROTOBUF_FIELD_OFFSET(::RICHARDS, alpha_), + PROTOBUF_FIELD_OFFSET(::RICHARDS, can_fade_), + PROTOBUF_FIELD_OFFSET(::RICHARDS, is_wall_), + PROTOBUF_FIELD_OFFSET(::RICHARDS, bhdraft__schedule_), + PROTOBUF_FIELD_OFFSET(::RICHARDS, bhdraft__schedule_duration_), + PROTOBUF_FIELD_OFFSET(::RICHARDS, scale_), + PROTOBUF_FIELD_OFFSET(::RICHARDS, color_), + PROTOBUF_FIELD_OFFSET(::RICHARDS, festival_filter_), + PROTOBUF_FIELD_OFFSET(::RICHARDS, map_type_filter_), + PROTOBUF_FIELD_OFFSET(::RICHARDS, mount_filter_), + PROTOBUF_FIELD_OFFSET(::RICHARDS, profession_filter_), + PROTOBUF_FIELD_OFFSET(::RICHARDS, specialization_filter_), + PROTOBUF_FIELD_OFFSET(::RICHARDS, species_filter_), ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_trigger, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(::Texture, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_trigger, auto_trigger_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_trigger, bounce_delay_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_trigger, bounce_duration_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_trigger, bounce_height_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_trigger, action_copy_clipboard_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_trigger, action_copy_message_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_trigger, has_countdown_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_trigger, action_info_message_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_trigger, invert_display_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_trigger, reset_length_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_trigger, range_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_trigger, action_hide_category_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_trigger, action_show_category_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon_trigger, action_toggle_category_), + PROTOBUF_FIELD_OFFSET(::Texture, path_), ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(::Position, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon, achievement_bit_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon, achievement_id_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon, alpha_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon, can_fade_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon, distance_fade_end_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon, distance_fade_start_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon, height_offset_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon, __tentative__scale_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon, map_display_size_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon, map_id_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon, maximum_size_on_screen_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon, minimum_size_on_screen_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon, __tentative__render_ingame_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon, __tentative__render_on_map_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon, __tentative__render_on_minimap_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon, scale_on_map_with_zoom_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon, bhdraft__schedule_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon, bhdraft__schedule_duration_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon, tip_description_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Icon, tip_name_), + PROTOBUF_FIELD_OFFSET(::Position, x_), + PROTOBUF_FIELD_OFFSET(::Position, y_), + PROTOBUF_FIELD_OFFSET(::Position, z_), ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_color, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(::EulerRotation, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_color, hex_), + PROTOBUF_FIELD_OFFSET(::EulerRotation, x_), + PROTOBUF_FIELD_OFFSET(::EulerRotation, y_), + PROTOBUF_FIELD_OFFSET(::EulerRotation, z_), ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_festival_filter, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(::Trigger, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_festival_filter, dragonbash_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_festival_filter, festival_of_the_four_winds_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_festival_filter, halloween_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_festival_filter, lunar_new_year_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_festival_filter, super_adventure_festival_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_festival_filter, wintersday_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_festival_filter, none_), + PROTOBUF_FIELD_OFFSET(::Trigger, auto_trigger_), + PROTOBUF_FIELD_OFFSET(::Trigger, bounce_delay_), + PROTOBUF_FIELD_OFFSET(::Trigger, bounce_duration_), + PROTOBUF_FIELD_OFFSET(::Trigger, bounce_height_), + PROTOBUF_FIELD_OFFSET(::Trigger, action_copy_clipboard_), + PROTOBUF_FIELD_OFFSET(::Trigger, action_copy_message_), + PROTOBUF_FIELD_OFFSET(::Trigger, has_countdown_), + PROTOBUF_FIELD_OFFSET(::Trigger, action_info_message_), + PROTOBUF_FIELD_OFFSET(::Trigger, invert_display_), + PROTOBUF_FIELD_OFFSET(::Trigger, reset_length_), + PROTOBUF_FIELD_OFFSET(::Trigger, range_), + PROTOBUF_FIELD_OFFSET(::Trigger, action_hide_category_), + PROTOBUF_FIELD_OFFSET(::Trigger, action_show_category_), + PROTOBUF_FIELD_OFFSET(::Trigger, action_toggle_category_), ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_guid, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(::GUID, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_guid, guid_), + PROTOBUF_FIELD_OFFSET(::GUID, guid_), ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_map_type_filter, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(::Color, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_map_type_filter, unknown_map_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_map_type_filter, redirect_map_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_map_type_filter, character_create_map_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_map_type_filter, pvp_map_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_map_type_filter, gvg_map_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_map_type_filter, instance_map_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_map_type_filter, public_map_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_map_type_filter, tournament_map_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_map_type_filter, tutorial_map_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_map_type_filter, user_tournament_map_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_map_type_filter, center_map_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_map_type_filter, eternal_battlegrounds_map_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_map_type_filter, bluehome_map_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_map_type_filter, blue_borderlands_map_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_map_type_filter, green_home_map_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_map_type_filter, green_borderlands_map_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_map_type_filter, red_home_map_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_map_type_filter, red_borderlands_map_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_map_type_filter, fortunes_vale_map_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_map_type_filter, jump_puzzle_map_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_map_type_filter, obsidian_sanctum_map_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_map_type_filter, edge_of_the_mists_map_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_map_type_filter, public_mini_map_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_map_type_filter, wvw_lounge_map_), + PROTOBUF_FIELD_OFFSET(::Color, hex_), ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_mount_filter, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(::FestivalFilter, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_mount_filter, raptor_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_mount_filter, springer_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_mount_filter, skimmer_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_mount_filter, jackal_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_mount_filter, griffon_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_mount_filter, roller_beetle_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_mount_filter, warclaw_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_mount_filter, skyscalee_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_mount_filter, skiff_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_mount_filter, seige_turtle_), + PROTOBUF_FIELD_OFFSET(::FestivalFilter, dragonbash_), + PROTOBUF_FIELD_OFFSET(::FestivalFilter, festival_of_the_four_winds_), + PROTOBUF_FIELD_OFFSET(::FestivalFilter, halloween_), + PROTOBUF_FIELD_OFFSET(::FestivalFilter, lunar_new_year_), + PROTOBUF_FIELD_OFFSET(::FestivalFilter, super_adventure_festival_), + PROTOBUF_FIELD_OFFSET(::FestivalFilter, wintersday_), + PROTOBUF_FIELD_OFFSET(::FestivalFilter, none_), ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_profession_filter, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(::MapTypeFilter, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_profession_filter, guardian_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_profession_filter, warrior_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_profession_filter, engineer_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_profession_filter, ranger_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_profession_filter, thief_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_profession_filter, elementalist_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_profession_filter, mesmer_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_profession_filter, necromancer_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_profession_filter, revenantnt_), + PROTOBUF_FIELD_OFFSET(::MapTypeFilter, unknown_map_), + PROTOBUF_FIELD_OFFSET(::MapTypeFilter, redirect_map_), + PROTOBUF_FIELD_OFFSET(::MapTypeFilter, character_create_map_), + PROTOBUF_FIELD_OFFSET(::MapTypeFilter, pvp_map_), + PROTOBUF_FIELD_OFFSET(::MapTypeFilter, gvg_map_), + PROTOBUF_FIELD_OFFSET(::MapTypeFilter, instance_map_), + PROTOBUF_FIELD_OFFSET(::MapTypeFilter, public_map_), + PROTOBUF_FIELD_OFFSET(::MapTypeFilter, tournament_map_), + PROTOBUF_FIELD_OFFSET(::MapTypeFilter, tutorial_map_), + PROTOBUF_FIELD_OFFSET(::MapTypeFilter, user_tournament_map_), + PROTOBUF_FIELD_OFFSET(::MapTypeFilter, center_map_), + PROTOBUF_FIELD_OFFSET(::MapTypeFilter, eternal_battlegrounds_map_), + PROTOBUF_FIELD_OFFSET(::MapTypeFilter, bluehome_map_), + PROTOBUF_FIELD_OFFSET(::MapTypeFilter, blue_borderlands_map_), + PROTOBUF_FIELD_OFFSET(::MapTypeFilter, green_home_map_), + PROTOBUF_FIELD_OFFSET(::MapTypeFilter, green_borderlands_map_), + PROTOBUF_FIELD_OFFSET(::MapTypeFilter, red_home_map_), + PROTOBUF_FIELD_OFFSET(::MapTypeFilter, red_borderlands_map_), + PROTOBUF_FIELD_OFFSET(::MapTypeFilter, fortunes_vale_map_), + PROTOBUF_FIELD_OFFSET(::MapTypeFilter, jump_puzzle_map_), + PROTOBUF_FIELD_OFFSET(::MapTypeFilter, obsidian_sanctum_map_), + PROTOBUF_FIELD_OFFSET(::MapTypeFilter, edge_of_the_mists_map_), + PROTOBUF_FIELD_OFFSET(::MapTypeFilter, public_mini_map_), + PROTOBUF_FIELD_OFFSET(::MapTypeFilter, wvw_lounge_map_), ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(::MountFilter, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, elementalist_tempest_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, engineer_scrapper_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, guardian_dragonhunter_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, mesmer_chronomancer_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, necromancer_reaper_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, ranger_druid_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, revenant_herald_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, thief_daredevil_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, warrior_berserker_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, elementalist_weaver_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, engineer_holosmith_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, guardian_firebrand_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, mesmer_mirage_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, necromancer_scourge_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, ranger_soulbeast_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, revenant_renegade_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, thief_deadeye_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, warrior_spellbreaker_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, elmentalist_catalyst_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, engineer_mechanist_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, guardian_willbender_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, mesmer_virtuoso_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, necromancer_harbinger_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, ranger_untamed_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, revenant_vindicator_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, thief_specter_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, warrior_bladesworn_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, elementalist_air_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, elementalist_arcane_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, elementalist_earth_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, elementalist_fire_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, elementalist_water_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, engineer_alchemy_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, engineer_explosives_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, engineer_firearms_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, engineer_inventions_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, engineer_tools_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, guardian_honor_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, guardian_radiance_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, guardian_valor_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, guardian_virtues_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, guardian_zeal_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, mesmer_chaos_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, mesmer_domination_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, mesmer_dueling_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, mesmer_illusions_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, mesmer_inspiration_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, necromancer_blood_magic_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, necromancer_curses_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, necromancer_death_magic_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, necromancer_soul_reaping_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, necromancer_spite_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, ranger_beastmastery_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, ranger_marksmanship_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, ranger_nature_magic_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, ranger_skirmishing_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, ranger_wilderness_survival_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, revenant_corruption_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, revenant_devastation_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, revenant_invocation_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, revenant_retribution_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, revenant_salvation_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, thief_acrobatics_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, thief_critical_strikes_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, thief_deadly_arts_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, thief_shadow_arts_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, thief_trickery_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, warrior_arms_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, warrior_defense_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, warrior_discipline_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, warrior_strength_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_specialization_filter, warrior_tactics_), + PROTOBUF_FIELD_OFFSET(::MountFilter, raptor_), + PROTOBUF_FIELD_OFFSET(::MountFilter, springer_), + PROTOBUF_FIELD_OFFSET(::MountFilter, skimmer_), + PROTOBUF_FIELD_OFFSET(::MountFilter, jackal_), + PROTOBUF_FIELD_OFFSET(::MountFilter, griffon_), + PROTOBUF_FIELD_OFFSET(::MountFilter, roller_beetle_), + PROTOBUF_FIELD_OFFSET(::MountFilter, warclaw_), + PROTOBUF_FIELD_OFFSET(::MountFilter, skyscalee_), + PROTOBUF_FIELD_OFFSET(::MountFilter, skiff_), + PROTOBUF_FIELD_OFFSET(::MountFilter, seige_turtle_), ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_species_filter, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(::ProfessionFilter, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_species_filter, asura_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_species_filter, charr_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_species_filter, human_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_species_filter, norn_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_species_filter, sylvari_), + PROTOBUF_FIELD_OFFSET(::ProfessionFilter, guardian_), + PROTOBUF_FIELD_OFFSET(::ProfessionFilter, warrior_), + PROTOBUF_FIELD_OFFSET(::ProfessionFilter, engineer_), + PROTOBUF_FIELD_OFFSET(::ProfessionFilter, ranger_), + PROTOBUF_FIELD_OFFSET(::ProfessionFilter, thief_), + PROTOBUF_FIELD_OFFSET(::ProfessionFilter, elementalist_), + PROTOBUF_FIELD_OFFSET(::ProfessionFilter, mesmer_), + PROTOBUF_FIELD_OFFSET(::ProfessionFilter, necromancer_), + PROTOBUF_FIELD_OFFSET(::ProfessionFilter, revenantnt_), ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_texture, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_texture, path_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_texture, original_token_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, elementalist_tempest_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, engineer_scrapper_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, guardian_dragonhunter_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, mesmer_chronomancer_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, necromancer_reaper_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, ranger_druid_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, revenant_herald_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, thief_daredevil_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, warrior_berserker_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, elementalist_weaver_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, engineer_holosmith_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, guardian_firebrand_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, mesmer_mirage_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, necromancer_scourge_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, ranger_soulbeast_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, revenant_renegade_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, thief_deadeye_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, warrior_spellbreaker_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, elmentalist_catalyst_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, engineer_mechanist_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, guardian_willbender_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, mesmer_virtuoso_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, necromancer_harbinger_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, ranger_untamed_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, revenant_vindicator_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, thief_specter_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, warrior_bladesworn_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, elementalist_air_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, elementalist_arcane_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, elementalist_earth_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, elementalist_fire_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, elementalist_water_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, engineer_alchemy_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, engineer_explosives_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, engineer_firearms_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, engineer_inventions_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, engineer_tools_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, guardian_honor_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, guardian_radiance_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, guardian_valor_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, guardian_virtues_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, guardian_zeal_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, mesmer_chaos_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, mesmer_domination_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, mesmer_dueling_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, mesmer_illusions_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, mesmer_inspiration_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, necromancer_blood_magic_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, necromancer_curses_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, necromancer_death_magic_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, necromancer_soul_reaping_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, necromancer_spite_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, ranger_beastmastery_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, ranger_marksmanship_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, ranger_nature_magic_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, ranger_skirmishing_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, ranger_wilderness_survival_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, revenant_corruption_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, revenant_devastation_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, revenant_invocation_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, revenant_retribution_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, revenant_salvation_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, thief_acrobatics_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, thief_critical_strikes_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, thief_deadly_arts_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, thief_shadow_arts_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, thief_trickery_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, warrior_arms_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, warrior_defense_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, warrior_discipline_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, warrior_strength_), + PROTOBUF_FIELD_OFFSET(::SpecializationFilter, warrior_tactics_), ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_trail_data, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(::SpeciesFilter, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail_trail_data, trail_data_), + PROTOBUF_FIELD_OFFSET(::SpeciesFilter, asura_), + PROTOBUF_FIELD_OFFSET(::SpeciesFilter, charr_), + PROTOBUF_FIELD_OFFSET(::SpeciesFilter, human_), + PROTOBUF_FIELD_OFFSET(::SpeciesFilter, norn_), + PROTOBUF_FIELD_OFFSET(::SpeciesFilter, sylvari_), ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(::TrailData, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail, achievement_bit_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail, achievement_id_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail, alpha_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail, animation_speed_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail, can_fade_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail, distance_fade_end_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail, distance_fade_start_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail, is_wall_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail, bhdraft__schedule_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail, bhdraft__schedule_duration_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail, scale_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail, category_), - PROTOBUF_FIELD_OFFSET(::Proto_Node::Trail, map_id_), + PROTOBUF_FIELD_OFFSET(::TrailData, trail_data_), }; static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - { 0, 7, sizeof(::Proto_Node::Category_ChildrenEntry_DoNotUse)}, - { 9, -1, sizeof(::Proto_Node::Category)}, - { 20, -1, sizeof(::Proto_Node::Icon_texture)}, - { 27, -1, sizeof(::Proto_Node::Icon_position)}, - { 35, -1, sizeof(::Proto_Node::Icon_euler_rotation)}, - { 43, -1, sizeof(::Proto_Node::Icon_trigger_guid)}, - { 49, -1, sizeof(::Proto_Node::Icon_trigger)}, - { 68, -1, sizeof(::Proto_Node::Icon)}, - { 93, -1, sizeof(::Proto_Node::Trail_color)}, - { 99, -1, sizeof(::Proto_Node::Trail_festival_filter)}, - { 111, -1, sizeof(::Proto_Node::Trail_guid)}, - { 117, -1, sizeof(::Proto_Node::Trail_map_type_filter)}, - { 146, -1, sizeof(::Proto_Node::Trail_mount_filter)}, - { 161, -1, sizeof(::Proto_Node::Trail_profession_filter)}, - { 175, -1, sizeof(::Proto_Node::Trail_specialization_filter)}, - { 252, -1, sizeof(::Proto_Node::Trail_species_filter)}, - { 262, -1, sizeof(::Proto_Node::Trail_texture)}, - { 269, -1, sizeof(::Proto_Node::Trail_trail_data)}, - { 275, -1, sizeof(::Proto_Node::Trail)}, + { 0, 7, sizeof(::Category_ChildrenEntry_DoNotUse)}, + { 9, -1, sizeof(::Category)}, + { 20, -1, sizeof(::Icon)}, + { 51, -1, sizeof(::RICHARDS)}, + { 80, -1, sizeof(::Texture)}, + { 86, -1, sizeof(::Position)}, + { 94, -1, sizeof(::EulerRotation)}, + { 102, -1, sizeof(::Trigger)}, + { 121, -1, sizeof(::GUID)}, + { 127, -1, sizeof(::Color)}, + { 133, -1, sizeof(::FestivalFilter)}, + { 145, -1, sizeof(::MapTypeFilter)}, + { 174, -1, sizeof(::MountFilter)}, + { 189, -1, sizeof(::ProfessionFilter)}, + { 203, -1, sizeof(::SpecializationFilter)}, + { 280, -1, sizeof(::SpeciesFilter)}, + { 290, -1, sizeof(::TrailData)}, }; static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { - reinterpret_cast(&::Proto_Node::_Category_ChildrenEntry_DoNotUse_default_instance_), - reinterpret_cast(&::Proto_Node::_Category_default_instance_), - reinterpret_cast(&::Proto_Node::_Icon_texture_default_instance_), - reinterpret_cast(&::Proto_Node::_Icon_position_default_instance_), - reinterpret_cast(&::Proto_Node::_Icon_euler_rotation_default_instance_), - reinterpret_cast(&::Proto_Node::_Icon_trigger_guid_default_instance_), - reinterpret_cast(&::Proto_Node::_Icon_trigger_default_instance_), - reinterpret_cast(&::Proto_Node::_Icon_default_instance_), - reinterpret_cast(&::Proto_Node::_Trail_color_default_instance_), - reinterpret_cast(&::Proto_Node::_Trail_festival_filter_default_instance_), - reinterpret_cast(&::Proto_Node::_Trail_guid_default_instance_), - reinterpret_cast(&::Proto_Node::_Trail_map_type_filter_default_instance_), - reinterpret_cast(&::Proto_Node::_Trail_mount_filter_default_instance_), - reinterpret_cast(&::Proto_Node::_Trail_profession_filter_default_instance_), - reinterpret_cast(&::Proto_Node::_Trail_specialization_filter_default_instance_), - reinterpret_cast(&::Proto_Node::_Trail_species_filter_default_instance_), - reinterpret_cast(&::Proto_Node::_Trail_texture_default_instance_), - reinterpret_cast(&::Proto_Node::_Trail_trail_data_default_instance_), - reinterpret_cast(&::Proto_Node::_Trail_default_instance_), + reinterpret_cast(&::_Category_ChildrenEntry_DoNotUse_default_instance_), + reinterpret_cast(&::_Category_default_instance_), + reinterpret_cast(&::_Icon_default_instance_), + reinterpret_cast(&::_RICHARDS_default_instance_), + reinterpret_cast(&::_Texture_default_instance_), + reinterpret_cast(&::_Position_default_instance_), + reinterpret_cast(&::_EulerRotation_default_instance_), + reinterpret_cast(&::_Trigger_default_instance_), + reinterpret_cast(&::_GUID_default_instance_), + reinterpret_cast(&::_Color_default_instance_), + reinterpret_cast(&::_FestivalFilter_default_instance_), + reinterpret_cast(&::_MapTypeFilter_default_instance_), + reinterpret_cast(&::_MountFilter_default_instance_), + reinterpret_cast(&::_ProfessionFilter_default_instance_), + reinterpret_cast(&::_SpecializationFilter_default_instance_), + reinterpret_cast(&::_SpeciesFilter_default_instance_), + reinterpret_cast(&::_TrailData_default_instance_), }; -const char descriptor_table_protodef_node_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = - "\n\nnode.proto\022\nProto_Node\032\031google/protobu" - "f/any.proto\"\363\001\n\010Category\022\032\n\022default_visi" - "bility\030\001 \001(\010\022\024\n\014display_name\030\002 \001(\t\022\024\n\014is" - "_separator\030\003 \001(\010\022\014\n\004name\030\004 \001(\t\022\024\n\014toolti" - "p_name\030\005 \001(\t\0224\n\010children\030\006 \003(\0132\".Proto_N" - "ode.Category.ChildrenEntry\032E\n\rChildrenEn" - "try\022\013\n\003key\030\001 \001(\t\022#\n\005value\030\002 \001(\0132\024.Proto_" - "Node.Category:\0028\001\"\312\n\n\004Icon\022\027\n\017achievemen" - "t_bit\030\001 \001(\007\022\026\n\016achievement_id\030\002 \001(\005\022\r\n\005a" - "lpha\030\003 \001(\002\022\020\n\010can_fade\030\004 \001(\010\022\031\n\021distance" - "_fade_end\030\005 \001(\002\022\033\n\023distance_fade_start\030\006" - " \001(\002\022\025\n\rheight_offset\030\007 \001(\002\022\032\n\022__tentati" - "ve__scale\030\010 \001(\002\022\030\n\020map_display_size\030\t \001(" - "\005\022\016\n\006map_id\030\n \001(\005\022\036\n\026maximum_size_on_scr" - "een\030\013 \001(\005\022\036\n\026minimum_size_on_screen\030\014 \001(" - "\005\022\"\n\032__tentative__render_ingame\030\r \001(\010\022\"\n" - "\032__tentative__render_on_map\030\016 \001(\010\022&\n\036__t" - "entative__render_on_minimap\030\017 \001(\010\022\036\n\026sca" - "le_on_map_with_zoom\030\020 \001(\010\022\031\n\021bhdraft__sc" - "hedule\030\021 \001(\t\022\"\n\032bhdraft__schedule_durati" - "on\030\022 \001(\002\022\027\n\017tip_description\030\023 \001(\t\022\020\n\010tip" - "_name\030\024 \001(\t\032E\n\007texture\022\014\n\004path\030\001 \001(\t\022,\n\016" - "original_token\030\002 \001(\0132\024.google.protobuf.A" - "ny\032+\n\010position\022\t\n\001x\030\001 \001(\002\022\t\n\001y\030\002 \001(\002\022\t\n\001" - "z\030\003 \001(\002\0321\n\016euler_rotation\022\t\n\001x\030\001 \001(\002\022\t\n\001" - "y\030\002 \001(\002\022\t\n\001z\030\003 \001(\002\032\371\004\n\007trigger\022\024\n\014auto_t" - "rigger\030\001 \001(\010\022\024\n\014bounce_delay\030\002 \001(\002\022\027\n\017bo" - "unce_duration\030\003 \001(\002\022\025\n\rbounce_height\030\004 \001" - "(\002\022\035\n\025action_copy_clipboard\030\005 \001(\t\022\033\n\023act" - "ion_copy_message\030\006 \001(\t\022\025\n\rhas_countdown\030" - "\007 \001(\010\022\033\n\023action_info_message\030\010 \001(\t\022\026\n\016in" - "vert_display\030\t \001(\010\022\024\n\014reset_length\030\n \001(\002" - "\022\r\n\005range\030\013 \001(\002\0222\n\024action_hide_category\030" - "\014 \001(\0132\024.Proto_Node.Category\0222\n\024action_sh" - "ow_category\030\r \001(\0132\024.Proto_Node.Category\022" - "4\n\026action_toggle_category\030\016 \001(\0132\024.Proto_" - "Node.Category\032\024\n\004guid\022\014\n\004guid\030\001 \001(\005\"\260\001\n\016" - "reset_behavior\022\022\n\016always_visible\020\000\022\016\n\nma" - "p_change\020\001\022\017\n\013daily_reset\020\002\022\t\n\005never\020\003\022\t" - "\n\005timer\020\004\022\r\n\tmap_reset\020\005\022\023\n\017instance_cha" - "nge\020\006\022\035\n\031daily_reset_per_character\020\007\022\020\n\014" - "weekly_reset\020\010\"\350\035\n\005Trail\022\027\n\017achievement_" - "bit\030\001 \001(\007\022\026\n\016achievement_id\030\002 \001(\005\022\r\n\005alp" - "ha\030\003 \001(\002\022\027\n\017animation_speed\030\004 \001(\002\022\020\n\010can" - "_fade\030\005 \001(\010\022\031\n\021distance_fade_end\030\006 \001(\002\022\033" - "\n\023distance_fade_start\030\007 \001(\002\022\017\n\007is_wall\030\010" - " \001(\010\022\031\n\021bhdraft__schedule\030\t \001(\t\022\"\n\032bhdra" - "ft__schedule_duration\030\n \001(\002\022\r\n\005scale\030\013 \001" - "(\002\022&\n\010category\030\014 \001(\0132\024.Proto_Node.Catego" - "ry\022\016\n\006map_id\030\r \001(\005\032\024\n\005color\022\013\n\003hex\030\001 \001(\t" - "\032\270\001\n\017festival_filter\022\022\n\ndragonbash\030\001 \001(\010" - "\022\"\n\032festival_of_the_four_winds\030\002 \001(\010\022\021\n\t" - "halloween\030\003 \001(\010\022\026\n\016lunar_new_year\030\004 \001(\010\022" - " \n\030super_adventure_festival\030\005 \001(\010\022\022\n\nwin" - "tersday\030\006 \001(\010\022\014\n\004none\030\007 \001(\010\032\024\n\004guid\022\014\n\004g" - "uid\030\001 \001(\005\032\350\004\n\017map_type_filter\022\023\n\013unknown" - "_map\030\001 \001(\010\022\024\n\014redirect_map\030\002 \001(\010\022\034\n\024char" - "acter_create_map\030\003 \001(\010\022\017\n\007pvp_map\030\004 \001(\010\022" - "\017\n\007gvg_map\030\005 \001(\010\022\024\n\014instance_map\030\006 \001(\010\022\022" - "\n\npublic_map\030\007 \001(\010\022\026\n\016tournament_map\030\010 \001" - "(\010\022\024\n\014tutorial_map\030\t \001(\010\022\033\n\023user_tournam" - "ent_map\030\n \001(\010\022\022\n\ncenter_map\030\013 \001(\010\022!\n\031ete" - "rnal_battlegrounds_map\030\014 \001(\010\022\024\n\014bluehome" - "_map\030\r \001(\010\022\034\n\024blue_borderlands_map\030\016 \001(\010" - "\022\026\n\016green_home_map\030\017 \001(\010\022\035\n\025green_border" - "lands_map\030\020 \001(\010\022\024\n\014red_home_map\030\021 \001(\010\022\033\n" - "\023red_borderlands_map\030\022 \001(\010\022\031\n\021fortunes_v" - "ale_map\030\023 \001(\010\022\027\n\017jump_puzzle_map\030\024 \001(\010\022\034" - "\n\024obsidian_sanctum_map\030\025 \001(\010\022\035\n\025edge_of_" - "the_mists_map\030\026 \001(\010\022\027\n\017public_mini_map\030\027" - " \001(\010\022\026\n\016wvw_lounge_map\030\030 \001(\010\032\302\001\n\014mount_f" - "ilter\022\016\n\006raptor\030\001 \001(\010\022\020\n\010springer\030\002 \001(\010\022" - "\017\n\007skimmer\030\003 \001(\010\022\016\n\006jackal\030\004 \001(\010\022\017\n\007grif" - "fon\030\005 \001(\010\022\025\n\rroller_beetle\030\006 \001(\010\022\017\n\007warc" - "law\030\007 \001(\010\022\021\n\tskyscalee\030\010 \001(\010\022\r\n\005skiff\030\t " - "\001(\010\022\024\n\014seige_turtle\030\n \001(\010\032\266\001\n\021profession" - "_filter\022\020\n\010guardian\030\001 \001(\010\022\017\n\007warrior\030\002 \001" - "(\010\022\020\n\010engineer\030\003 \001(\010\022\016\n\006ranger\030\004 \001(\010\022\r\n\005" - "thief\030\005 \001(\010\022\024\n\014elementalist\030\006 \001(\010\022\016\n\006mes" - "mer\030\007 \001(\010\022\023\n\013necromancer\030\010 \001(\010\022\022\n\nrevena" - "ntnt\030\t \001(\010\032\313\017\n\025specialization_filter\022\034\n\024" - "elementalist_tempest\0300 \001(\010\022\031\n\021engineer_s" - "crapper\030+ \001(\010\022\035\n\025guardian_dragonhunter\030\033" - " \001(\010\022\033\n\023mesmer_chronomancer\030( \001(\010\022\032\n\022nec" - "romancer_reaper\030\" \001(\010\022\024\n\014ranger_druid\030\005 " - "\001(\010\022\027\n\017revenant_herald\0304 \001(\010\022\027\n\017thief_da" - "redevil\030\007 \001(\010\022\031\n\021warrior_berserker\030\022 \001(\010" - "\022\033\n\023elementalist_weaver\0308 \001(\010\022\032\n\022enginee" - "r_holosmith\0309 \001(\010\022\032\n\022guardian_firebrand\030" - "> \001(\010\022\025\n\rmesmer_mirage\030; \001(\010\022\033\n\023necroman" - "cer_scourge\030< \001(\010\022\030\n\020ranger_soulbeast\0307 " - "\001(\010\022\031\n\021revenant_renegade\030\? \001(\010\022\025\n\rthief_" - "deadeye\030: \001(\010\022\034\n\024warrior_spellbreaker\030= " - "\001(\010\022\034\n\024elmentalist_catalyst\030C \001(\010\022\032\n\022eng" - "ineer_mechanist\030F \001(\010\022\033\n\023guardian_willbe" - "nder\030A \001(\010\022\027\n\017mesmer_virtuoso\030B \001(\010\022\035\n\025n" - "ecromancer_harbinger\030@ \001(\010\022\026\n\016ranger_unt" - "amed\030H \001(\010\022\033\n\023revenant_vindicator\030E \001(\010\022" - "\025\n\rthief_specter\030G \001(\010\022\032\n\022warrior_blades" - "worn\030D \001(\010\022\030\n\020elementalist_air\030) \001(\010\022\033\n\023" - "elementalist_arcane\030% \001(\010\022\032\n\022elementalis" - "t_earth\030\032 \001(\010\022\031\n\021elementalist_fire\030\037 \001(\010" - "\022\032\n\022elementalist_water\030\021 \001(\010\022\030\n\020engineer" - "_alchemy\030\035 \001(\010\022\033\n\023engineer_explosives\030\006 " - "\001(\010\022\031\n\021engineer_firearms\030& \001(\010\022\033\n\023engine" - "er_inventions\030/ \001(\010\022\026\n\016engineer_tools\030\025 " - "\001(\010\022\026\n\016guardian_honor\0301 \001(\010\022\031\n\021guardian_" - "radiance\030\020 \001(\010\022\026\n\016guardian_valor\030\r \001(\010\022\030" - "\n\020guardian_virtues\030. \001(\010\022\025\n\rguardian_zea" - "l\030* \001(\010\022\024\n\014mesmer_chaos\030- \001(\010\022\031\n\021mesmer_" - "domination\030\n \001(\010\022\026\n\016mesmer_dueling\030\001 \001(\010" - "\022\030\n\020mesmer_illusions\030\030 \001(\010\022\032\n\022mesmer_ins" - "piration\030\027 \001(\010\022\037\n\027necromancer_blood_magi" - "c\030\023 \001(\010\022\032\n\022necromancer_curses\030\' \001(\010\022\037\n\027n" - "ecromancer_death_magic\030\002 \001(\010\022 \n\030necroman" - "cer_soul_reaping\0302 \001(\010\022\031\n\021necromancer_sp" - "ite\0305 \001(\010\022\033\n\023ranger_beastmastery\030 \001(\010\022\033" - "\n\023ranger_marksmanship\030\010 \001(\010\022\033\n\023ranger_na" - "ture_magic\030\031 \001(\010\022\032\n\022ranger_skirmishing\030\036" - " \001(\010\022\"\n\032ranger_wilderness_survival\030! \001(\010" - "\022\033\n\023revenant_corruption\030\016 \001(\010\022\034\n\024revenan" - "t_devastation\030\017 \001(\010\022\033\n\023revenant_invocati" - "on\030\003 \001(\010\022\034\n\024revenant_retribution\030\t \001(\010\022\032" - "\n\022revenant_salvation\030\014 \001(\010\022\030\n\020thief_acro" - "batics\0306 \001(\010\022\036\n\026thief_critical_strikes\030#" - " \001(\010\022\031\n\021thief_deadly_arts\030\034 \001(\010\022\031\n\021thief" - "_shadow_arts\030\024 \001(\010\022\026\n\016thief_trickery\030, \001" - "(\010\022\024\n\014warrior_arms\030$ \001(\010\022\027\n\017warrior_defe" - "nse\030\026 \001(\010\022\032\n\022warrior_discipline\0303 \001(\010\022\030\n" - "\020warrior_strength\030\004 \001(\010\022\027\n\017warrior_tacti" - "cs\030\013 \001(\010\032\\\n\016species_filter\022\r\n\005asura\030\001 \001(" - "\010\022\r\n\005charr\030\002 \001(\010\022\r\n\005human\030\003 \001(\010\022\014\n\004norn\030" - "\004 \001(\010\022\017\n\007sylvari\030\005 \001(\010\032E\n\007texture\022\014\n\004pat" - "h\030\001 \001(\t\022,\n\016original_token\030\002 \001(\0132\024.google" - ".protobuf.Any\032 \n\ntrail_data\022\022\n\ntrail_dat" - "a\030\001 \001(\t\"@\n\016cull_chirality\022\010\n\004none\020\000\022\r\n\tc" - "lockwise\020\001\022\025\n\021counter_clockwise\020\002b\006proto" - "3" +const char descriptor_table_protodef_generators_2fproto_5ftemplates_2fnode_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = + "\n%generators/proto_templates/node.proto\"" + "\335\001\n\010Category\022\032\n\022default_visibility\030\001 \001(\010" + "\022\024\n\014display_name\030\002 \001(\t\022\024\n\014is_separator\030\003" + " \001(\010\022\014\n\004name\030\004 \001(\t\022\024\n\014tooltip_name\030\005 \001(\t" + "\022)\n\010children\030\006 \003(\0132\027.Category.ChildrenEn" + "try\032:\n\rChildrenEntry\022\013\n\003key\030\001 \001(\t\022\030\n\005val" + "ue\030\002 \001(\0132\t.Category:\0028\001\"\332\005\n\004Icon\022\033\n\010cate" + "gory\030\001 \001(\0132\t.Category\022\031\n\007texture\030\002 \001(\0132\010" + ".Texture\022\023\n\004guid\030\003 \001(\0132\005.GUID\022\016\n\006map_id\030" + "\004 \001(\005\022\031\n\021distance_fade_end\030\005 \001(\002\022\033\n\023dist" + "ance_fade_start\030\006 \001(\002\022\025\n\rheight_offset\030\007" + " \001(\002\022\033\n\010position\030\010 \001(\0132\t.Position\022&\n\016res" + "et_behavior\030\t \001(\0162\016.ResetBehavior\022\031\n\007tri" + "gger\030\n \001(\0132\010.Trigger\022\027\n\017achievement_bit\030" + "\020 \001(\007\022\026\n\016achievement_id\030\021 \001(\005\022\r\n\005alpha\030\022" + " \001(\002\022\020\n\010can_fade\030\023 \001(\010\022\036\n\026minimum_size_o" + "n_screen\030\024 \001(\005\022\030\n\020map_display_size\030\025 \001(\005" + "\022\036\n\026maximum_size_on_screen\030\026 \001(\005\022\036\n\026scal" + "e_on_map_with_zoom\030\027 \001(\010\022\027\n\017tip_descript" + "ion\030\030 \001(\t\022\020\n\010tip_name\030\031 \001(\t\022\033\n\022__tentati" + "ve__scale\030\200\020 \001(\002\022#\n\032__tentative__render_" + "ingame\030\201\020 \001(\010\022#\n\032__tentative__render_on_" + "map\030\202\020 \001(\010\022\'\n\036__tentative__render_on_min" + "imap\030\203\020 \001(\010\022\032\n\021bhdraft__schedule\030\204\020 \001(\t\022" + "#\n\032bhdraft__schedule_duration\030\205\020 \001(\002\"\313\005\n" + "\010RICHARDS\022\033\n\010category\030\001 \001(\0132\t.Category\022\031" + "\n\007texture\030\002 \001(\0132\010.Texture\022\023\n\004guid\030\003 \001(\0132" + "\005.GUID\022\016\n\006map_id\030\004 \001(\005\022\031\n\021distance_fade_" + "end\030\005 \001(\002\022\033\n\023distance_fade_start\030\006 \001(\002\022\036" + "\n\ntrail_data\030\007 \001(\0132\n.TrailData\022\027\n\017animat" + "ion_speed\030\010 \001(\002\022&\n\016cull_chirality\030\t \001(\0162" + "\016.CullChirality\022\027\n\017achievement_bit\030\020 \001(\007" + "\022\026\n\016achievement_id\030\021 \001(\005\022\r\n\005alpha\030\022 \001(\002\022" + "\020\n\010can_fade\030\023 \001(\010\022\017\n\007is_wall\030\026 \001(\010\022\031\n\021bh" + "draft__schedule\030\027 \001(\t\022\"\n\032bhdraft__schedu" + "le_duration\030\030 \001(\002\022\r\n\005scale\030\031 \001(\002\022\025\n\005colo" + "r\030\032 \001(\0132\006.Color\022(\n\017festival_filter\030\033 \001(\013" + "2\017.FestivalFilter\022\'\n\017map_type_filter\030\034 \001" + "(\0132\016.MapTypeFilter\022\"\n\014mount_filter\030\035 \001(\013" + "2\014.MountFilter\022,\n\021profession_filter\030\036 \001(" + "\0132\021.ProfessionFilter\0224\n\025specialization_f" + "ilter\030\037 \001(\0132\025.SpecializationFilter\022&\n\016sp" + "ecies_filter\030 \001(\0132\016.SpeciesFilter\"\027\n\007Te" + "xture\022\014\n\004path\030\001 \001(\t\"+\n\010Position\022\t\n\001x\030\001 \001" + "(\002\022\t\n\001y\030\002 \001(\002\022\t\n\001z\030\003 \001(\002\"0\n\rEulerRotatio" + "n\022\t\n\001x\030\001 \001(\002\022\t\n\001y\030\002 \001(\002\022\t\n\001z\030\003 \001(\002\"\217\003\n\007T" + "rigger\022\024\n\014auto_trigger\030\001 \001(\010\022\024\n\014bounce_d" + "elay\030\002 \001(\002\022\027\n\017bounce_duration\030\003 \001(\002\022\025\n\rb" + "ounce_height\030\004 \001(\002\022\035\n\025action_copy_clipbo" + "ard\030\005 \001(\t\022\033\n\023action_copy_message\030\006 \001(\t\022\025" + "\n\rhas_countdown\030\007 \001(\010\022\033\n\023action_info_mes" + "sage\030\010 \001(\t\022\026\n\016invert_display\030\t \001(\010\022\024\n\014re" + "set_length\030\n \001(\002\022\r\n\005range\030\013 \001(\002\022\'\n\024actio" + "n_hide_category\030\014 \001(\0132\t.Category\022\'\n\024acti" + "on_show_category\030\r \001(\0132\t.Category\022)\n\026act" + "ion_toggle_category\030\016 \001(\0132\t.Category\"\024\n\004" + "GUID\022\014\n\004guid\030\001 \001(\005\"\024\n\005Color\022\013\n\003hex\030\001 \001(\t" + "\"\267\001\n\016FestivalFilter\022\022\n\ndragonbash\030\001 \001(\010\022" + "\"\n\032festival_of_the_four_winds\030\002 \001(\010\022\021\n\th" + "alloween\030\003 \001(\010\022\026\n\016lunar_new_year\030\004 \001(\010\022 " + "\n\030super_adventure_festival\030\005 \001(\010\022\022\n\nwint" + "ersday\030\006 \001(\010\022\014\n\004none\030\007 \001(\010\"\346\004\n\rMapTypeFi" + "lter\022\023\n\013unknown_map\030\001 \001(\010\022\024\n\014redirect_ma" + "p\030\002 \001(\010\022\034\n\024character_create_map\030\003 \001(\010\022\017\n" + "\007pvp_map\030\004 \001(\010\022\017\n\007gvg_map\030\005 \001(\010\022\024\n\014insta" + "nce_map\030\006 \001(\010\022\022\n\npublic_map\030\007 \001(\010\022\026\n\016tou" + "rnament_map\030\010 \001(\010\022\024\n\014tutorial_map\030\t \001(\010\022" + "\033\n\023user_tournament_map\030\n \001(\010\022\022\n\ncenter_m" + "ap\030\013 \001(\010\022!\n\031eternal_battlegrounds_map\030\014 " + "\001(\010\022\024\n\014bluehome_map\030\r \001(\010\022\034\n\024blue_border" + "lands_map\030\016 \001(\010\022\026\n\016green_home_map\030\017 \001(\010\022" + "\035\n\025green_borderlands_map\030\020 \001(\010\022\024\n\014red_ho" + "me_map\030\021 \001(\010\022\033\n\023red_borderlands_map\030\022 \001(" + "\010\022\031\n\021fortunes_vale_map\030\023 \001(\010\022\027\n\017jump_puz" + "zle_map\030\024 \001(\010\022\034\n\024obsidian_sanctum_map\030\025 " + "\001(\010\022\035\n\025edge_of_the_mists_map\030\026 \001(\010\022\027\n\017pu" + "blic_mini_map\030\027 \001(\010\022\026\n\016wvw_lounge_map\030\030 " + "\001(\010\"\301\001\n\013MountFilter\022\016\n\006raptor\030\001 \001(\010\022\020\n\010s" + "pringer\030\002 \001(\010\022\017\n\007skimmer\030\003 \001(\010\022\016\n\006jackal" + "\030\004 \001(\010\022\017\n\007griffon\030\005 \001(\010\022\025\n\rroller_beetle" + "\030\006 \001(\010\022\017\n\007warclaw\030\007 \001(\010\022\021\n\tskyscalee\030\010 \001" + "(\010\022\r\n\005skiff\030\t \001(\010\022\024\n\014seige_turtle\030\n \001(\010\"" + "\265\001\n\020ProfessionFilter\022\020\n\010guardian\030\001 \001(\010\022\017" + "\n\007warrior\030\002 \001(\010\022\020\n\010engineer\030\003 \001(\010\022\016\n\006ran" + "ger\030\004 \001(\010\022\r\n\005thief\030\005 \001(\010\022\024\n\014elementalist" + "\030\006 \001(\010\022\016\n\006mesmer\030\007 \001(\010\022\023\n\013necromancer\030\010 " + "\001(\010\022\022\n\nrevenantnt\030\t \001(\010\"\312\017\n\024Specializati" + "onFilter\022\034\n\024elementalist_tempest\030\001 \001(\010\022\031" + "\n\021engineer_scrapper\030\002 \001(\010\022\035\n\025guardian_dr" + "agonhunter\030\003 \001(\010\022\033\n\023mesmer_chronomancer\030" + "\004 \001(\010\022\032\n\022necromancer_reaper\030\005 \001(\010\022\024\n\014ran" + "ger_druid\030\006 \001(\010\022\027\n\017revenant_herald\030\007 \001(\010" + "\022\027\n\017thief_daredevil\030\010 \001(\010\022\031\n\021warrior_ber" + "serker\030\t \001(\010\022\033\n\023elementalist_weaver\030\n \001(" + "\010\022\032\n\022engineer_holosmith\030\013 \001(\010\022\032\n\022guardia" + "n_firebrand\030\014 \001(\010\022\025\n\rmesmer_mirage\030\r \001(\010" + "\022\033\n\023necromancer_scourge\030\016 \001(\010\022\030\n\020ranger_" + "soulbeast\030\017 \001(\010\022\031\n\021revenant_renegade\030\020 \001" + "(\010\022\025\n\rthief_deadeye\030\021 \001(\010\022\034\n\024warrior_spe" + "llbreaker\030\022 \001(\010\022\034\n\024elmentalist_catalyst\030" + "\023 \001(\010\022\032\n\022engineer_mechanist\030\024 \001(\010\022\033\n\023gua" + "rdian_willbender\030\025 \001(\010\022\027\n\017mesmer_virtuos" + "o\030\026 \001(\010\022\035\n\025necromancer_harbinger\030\027 \001(\010\022\026" + "\n\016ranger_untamed\030\030 \001(\010\022\033\n\023revenant_vindi" + "cator\030\031 \001(\010\022\025\n\rthief_specter\030\032 \001(\010\022\032\n\022wa" + "rrior_bladesworn\030\033 \001(\010\022\030\n\020elementalist_a" + "ir\030\034 \001(\010\022\033\n\023elementalist_arcane\030\035 \001(\010\022\032\n" + "\022elementalist_earth\030\036 \001(\010\022\031\n\021elementalis" + "t_fire\030\037 \001(\010\022\032\n\022elementalist_water\030 \001(\010" + "\022\030\n\020engineer_alchemy\030! \001(\010\022\033\n\023engineer_e" + "xplosives\030\" \001(\010\022\031\n\021engineer_firearms\030# \001" + "(\010\022\033\n\023engineer_inventions\030$ \001(\010\022\026\n\016engin" + "eer_tools\030% \001(\010\022\026\n\016guardian_honor\030& \001(\010\022" + "\031\n\021guardian_radiance\030\' \001(\010\022\026\n\016guardian_v" + "alor\030( \001(\010\022\030\n\020guardian_virtues\030) \001(\010\022\025\n\r" + "guardian_zeal\030* \001(\010\022\024\n\014mesmer_chaos\030+ \001(" + "\010\022\031\n\021mesmer_domination\030, \001(\010\022\026\n\016mesmer_d" + "ueling\030- \001(\010\022\030\n\020mesmer_illusions\030. \001(\010\022\032" + "\n\022mesmer_inspiration\030/ \001(\010\022\037\n\027necromance" + "r_blood_magic\0300 \001(\010\022\032\n\022necromancer_curse" + "s\0301 \001(\010\022\037\n\027necromancer_death_magic\0302 \001(\010" + "\022 \n\030necromancer_soul_reaping\0303 \001(\010\022\031\n\021ne" + "cromancer_spite\0304 \001(\010\022\033\n\023ranger_beastmas" + "tery\0305 \001(\010\022\033\n\023ranger_marksmanship\0306 \001(\010\022" + "\033\n\023ranger_nature_magic\0307 \001(\010\022\032\n\022ranger_s" + "kirmishing\0308 \001(\010\022\"\n\032ranger_wilderness_su" + "rvival\0309 \001(\010\022\033\n\023revenant_corruption\030: \001(" + "\010\022\034\n\024revenant_devastation\030; \001(\010\022\033\n\023reven" + "ant_invocation\030< \001(\010\022\034\n\024revenant_retribu" + "tion\030= \001(\010\022\032\n\022revenant_salvation\030> \001(\010\022\030" + "\n\020thief_acrobatics\030\? \001(\010\022\036\n\026thief_critic" + "al_strikes\030@ \001(\010\022\031\n\021thief_deadly_arts\030A " + "\001(\010\022\031\n\021thief_shadow_arts\030B \001(\010\022\026\n\016thief_" + "trickery\030C \001(\010\022\024\n\014warrior_arms\030D \001(\010\022\027\n\017" + "warrior_defense\030E \001(\010\022\032\n\022warrior_discipl" + "ine\030F \001(\010\022\030\n\020warrior_strength\030G \001(\010\022\027\n\017w" + "arrior_tactics\030H \001(\010\"[\n\rSpeciesFilter\022\r\n" + "\005asura\030\001 \001(\010\022\r\n\005charr\030\002 \001(\010\022\r\n\005human\030\003 \001" + "(\010\022\014\n\004norn\030\004 \001(\010\022\017\n\007sylvari\030\005 \001(\010\"\037\n\tTra" + "ilData\022\022\n\ntrail_data\030\001 \001(\t*\?\n\rCullChiral" + "ity\022\010\n\004none\020\000\022\r\n\tclockwise\020\001\022\025\n\021counter_" + "clockwise\020\002*\257\001\n\rResetBehavior\022\022\n\016always_" + "visible\020\000\022\016\n\nmap_change\020\001\022\017\n\013daily_reset" + "\020\002\022\t\n\005never\020\003\022\t\n\005timer\020\004\022\r\n\tmap_reset\020\005\022" + "\023\n\017instance_change\020\006\022\035\n\031daily_reset_per_" + "character\020\007\022\020\n\014weekly_reset\020\010b\006proto3" ; -static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_node_2eproto_deps[1] = { - &::descriptor_table_google_2fprotobuf_2fany_2eproto, +static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto_deps[1] = { }; -static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_node_2eproto_sccs[18] = { - &scc_info_Category_node_2eproto.base, - &scc_info_Icon_node_2eproto.base, - &scc_info_Icon_euler_rotation_node_2eproto.base, - &scc_info_Icon_position_node_2eproto.base, - &scc_info_Icon_texture_node_2eproto.base, - &scc_info_Icon_trigger_node_2eproto.base, - &scc_info_Icon_trigger_guid_node_2eproto.base, - &scc_info_Trail_node_2eproto.base, - &scc_info_Trail_color_node_2eproto.base, - &scc_info_Trail_festival_filter_node_2eproto.base, - &scc_info_Trail_guid_node_2eproto.base, - &scc_info_Trail_map_type_filter_node_2eproto.base, - &scc_info_Trail_mount_filter_node_2eproto.base, - &scc_info_Trail_profession_filter_node_2eproto.base, - &scc_info_Trail_specialization_filter_node_2eproto.base, - &scc_info_Trail_species_filter_node_2eproto.base, - &scc_info_Trail_texture_node_2eproto.base, - &scc_info_Trail_trail_data_node_2eproto.base, +static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto_sccs[16] = { + &scc_info_Category_generators_2fproto_5ftemplates_2fnode_2eproto.base, + &scc_info_Color_generators_2fproto_5ftemplates_2fnode_2eproto.base, + &scc_info_EulerRotation_generators_2fproto_5ftemplates_2fnode_2eproto.base, + &scc_info_FestivalFilter_generators_2fproto_5ftemplates_2fnode_2eproto.base, + &scc_info_GUID_generators_2fproto_5ftemplates_2fnode_2eproto.base, + &scc_info_Icon_generators_2fproto_5ftemplates_2fnode_2eproto.base, + &scc_info_MapTypeFilter_generators_2fproto_5ftemplates_2fnode_2eproto.base, + &scc_info_MountFilter_generators_2fproto_5ftemplates_2fnode_2eproto.base, + &scc_info_Position_generators_2fproto_5ftemplates_2fnode_2eproto.base, + &scc_info_ProfessionFilter_generators_2fproto_5ftemplates_2fnode_2eproto.base, + &scc_info_RICHARDS_generators_2fproto_5ftemplates_2fnode_2eproto.base, + &scc_info_SpecializationFilter_generators_2fproto_5ftemplates_2fnode_2eproto.base, + &scc_info_SpeciesFilter_generators_2fproto_5ftemplates_2fnode_2eproto.base, + &scc_info_Texture_generators_2fproto_5ftemplates_2fnode_2eproto.base, + &scc_info_TrailData_generators_2fproto_5ftemplates_2fnode_2eproto.base, + &scc_info_Trigger_generators_2fproto_5ftemplates_2fnode_2eproto.base, }; -static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_node_2eproto_once; -const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_node_2eproto = { - false, false, descriptor_table_protodef_node_2eproto, "node.proto", 5481, - &descriptor_table_node_2eproto_once, descriptor_table_node_2eproto_sccs, descriptor_table_node_2eproto_deps, 18, 1, - schemas, file_default_instances, TableStruct_node_2eproto::offsets, - file_level_metadata_node_2eproto, 19, file_level_enum_descriptors_node_2eproto, file_level_service_descriptors_node_2eproto, +static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto_once; +const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto = { + false, false, descriptor_table_protodef_generators_2fproto_5ftemplates_2fnode_2eproto, "generators/proto_templates/node.proto", 5837, + &descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto_once, descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto_sccs, descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto_deps, 16, 0, + schemas, file_default_instances, TableStruct_generators_2fproto_5ftemplates_2fnode_2eproto::offsets, + file_level_metadata_generators_2fproto_5ftemplates_2fnode_2eproto, 17, file_level_enum_descriptors_generators_2fproto_5ftemplates_2fnode_2eproto, file_level_service_descriptors_generators_2fproto_5ftemplates_2fnode_2eproto, }; // Force running AddDescriptors() at dynamic initialization time. -static bool dynamic_init_dummy_node_2eproto = (static_cast(::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_node_2eproto)), true); -namespace Proto_Node { -const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* Icon_trigger_reset_behavior_descriptor() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_node_2eproto); - return file_level_enum_descriptors_node_2eproto[0]; +static bool dynamic_init_dummy_generators_2fproto_5ftemplates_2fnode_2eproto = (static_cast(::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto)), true); +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* CullChirality_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto); + return file_level_enum_descriptors_generators_2fproto_5ftemplates_2fnode_2eproto[0]; } -bool Icon_trigger_reset_behavior_IsValid(int value) { +bool CullChirality_IsValid(int value) { switch (value) { case 0: case 1: case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: return true; default: return false; } } -#if (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900) -constexpr Icon_trigger_reset_behavior Icon_trigger::always_visible; -constexpr Icon_trigger_reset_behavior Icon_trigger::map_change; -constexpr Icon_trigger_reset_behavior Icon_trigger::daily_reset; -constexpr Icon_trigger_reset_behavior Icon_trigger::never; -constexpr Icon_trigger_reset_behavior Icon_trigger::timer; -constexpr Icon_trigger_reset_behavior Icon_trigger::map_reset; -constexpr Icon_trigger_reset_behavior Icon_trigger::instance_change; -constexpr Icon_trigger_reset_behavior Icon_trigger::daily_reset_per_character; -constexpr Icon_trigger_reset_behavior Icon_trigger::weekly_reset; -constexpr Icon_trigger_reset_behavior Icon_trigger::reset_behavior_MIN; -constexpr Icon_trigger_reset_behavior Icon_trigger::reset_behavior_MAX; -constexpr int Icon_trigger::reset_behavior_ARRAYSIZE; -#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900) -const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* Trail_cull_chirality_descriptor() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_node_2eproto); - return file_level_enum_descriptors_node_2eproto[1]; -} -bool Trail_cull_chirality_IsValid(int value) { +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ResetBehavior_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto); + return file_level_enum_descriptors_generators_2fproto_5ftemplates_2fnode_2eproto[1]; +} +bool ResetBehavior_IsValid(int value) { switch (value) { case 0: case 1: case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: return true; default: return false; } } -#if (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900) -constexpr Trail_cull_chirality Trail::none; -constexpr Trail_cull_chirality Trail::clockwise; -constexpr Trail_cull_chirality Trail::counter_clockwise; -constexpr Trail_cull_chirality Trail::cull_chirality_MIN; -constexpr Trail_cull_chirality Trail::cull_chirality_MAX; -constexpr int Trail::cull_chirality_ARRAYSIZE; -#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900) // =================================================================== @@ -961,7 +928,7 @@ Category::Category(::PROTOBUF_NAMESPACE_ID::Arena* arena) children_(arena) { SharedCtor(); RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:Proto_Node.Category) + // @@protoc_insertion_point(arena_constructor:Category) } Category::Category(const Category& from) : ::PROTOBUF_NAMESPACE_ID::Message() { @@ -985,11 +952,11 @@ Category::Category(const Category& from) ::memcpy(&default_visibility_, &from.default_visibility_, static_cast(reinterpret_cast(&is_separator_) - reinterpret_cast(&default_visibility_)) + sizeof(is_separator_)); - // @@protoc_insertion_point(copy_constructor:Proto_Node.Category) + // @@protoc_insertion_point(copy_constructor:Category) } void Category::SharedCtor() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Category_node_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Category_generators_2fproto_5ftemplates_2fnode_2eproto.base); display_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); tooltip_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); @@ -999,7 +966,7 @@ void Category::SharedCtor() { } Category::~Category() { - // @@protoc_insertion_point(destructor:Proto_Node.Category) + // @@protoc_insertion_point(destructor:Category) SharedDtor(); _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -1021,13 +988,13 @@ void Category::SetCachedSize(int size) const { _cached_size_.Set(size); } const Category& Category::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Category_node_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Category_generators_2fproto_5ftemplates_2fnode_2eproto.base); return *internal_default_instance(); } void Category::Clear() { -// @@protoc_insertion_point(message_clear_start:Proto_Node.Category) +// @@protoc_insertion_point(message_clear_start:Category) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -1062,7 +1029,7 @@ const char* Category::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::i if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { auto str = _internal_mutable_display_name(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "Proto_Node.Category.display_name")); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "Category.display_name")); CHK_(ptr); } else goto handle_unusual; continue; @@ -1078,7 +1045,7 @@ const char* Category::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::i if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { auto str = _internal_mutable_name(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "Proto_Node.Category.name")); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "Category.name")); CHK_(ptr); } else goto handle_unusual; continue; @@ -1087,11 +1054,11 @@ const char* Category::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::i if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) { auto str = _internal_mutable_tooltip_name(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "Proto_Node.Category.tooltip_name")); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "Category.tooltip_name")); CHK_(ptr); } else goto handle_unusual; continue; - // map children = 6; + // map children = 6; case 6: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) { ptr -= 1; @@ -1127,7 +1094,7 @@ const char* Category::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::i ::PROTOBUF_NAMESPACE_ID::uint8* Category::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Proto_Node.Category) + // @@protoc_insertion_point(serialize_to_array_start:Category) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -1142,7 +1109,7 @@ ::PROTOBUF_NAMESPACE_ID::uint8* Category::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_display_name().data(), static_cast(this->_internal_display_name().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "Proto_Node.Category.display_name"); + "Category.display_name"); target = stream->WriteStringMaybeAliased( 2, this->_internal_display_name(), target); } @@ -1158,7 +1125,7 @@ ::PROTOBUF_NAMESPACE_ID::uint8* Category::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_name().data(), static_cast(this->_internal_name().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "Proto_Node.Category.name"); + "Category.name"); target = stream->WriteStringMaybeAliased( 4, this->_internal_name(), target); } @@ -1168,14 +1135,14 @@ ::PROTOBUF_NAMESPACE_ID::uint8* Category::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_tooltip_name().data(), static_cast(this->_internal_tooltip_name().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "Proto_Node.Category.tooltip_name"); + "Category.tooltip_name"); target = stream->WriteStringMaybeAliased( 5, this->_internal_tooltip_name(), target); } - // map children = 6; + // map children = 6; if (!this->_internal_children().empty()) { - typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Proto_Node::Category >::const_pointer + typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Category >::const_pointer ConstPtr; typedef ConstPtr SortItem; typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst Less; @@ -1184,7 +1151,7 @@ ::PROTOBUF_NAMESPACE_ID::uint8* Category::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( p->first.data(), static_cast(p->first.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "Proto_Node.Category.ChildrenEntry.key"); + "Category.ChildrenEntry.key"); } }; @@ -1192,9 +1159,9 @@ ::PROTOBUF_NAMESPACE_ID::uint8* Category::_InternalSerialize( this->_internal_children().size() > 1) { ::std::unique_ptr items( new SortItem[this->_internal_children().size()]); - typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Proto_Node::Category >::size_type size_type; + typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Category >::size_type size_type; size_type n = 0; - for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Proto_Node::Category >::const_iterator + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Category >::const_iterator it = this->_internal_children().begin(); it != this->_internal_children().end(); ++it, ++n) { items[static_cast(n)] = SortItem(&*it); @@ -1205,7 +1172,7 @@ ::PROTOBUF_NAMESPACE_ID::uint8* Category::_InternalSerialize( Utf8Check::Check(&(*items[static_cast(i)])); } } else { - for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Proto_Node::Category >::const_iterator + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Category >::const_iterator it = this->_internal_children().begin(); it != this->_internal_children().end(); ++it) { target = Category_ChildrenEntry_DoNotUse::Funcs::InternalSerialize(6, it->first, it->second, target, stream); @@ -1218,22 +1185,22 @@ ::PROTOBUF_NAMESPACE_ID::uint8* Category::_InternalSerialize( target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } - // @@protoc_insertion_point(serialize_to_array_end:Proto_Node.Category) + // @@protoc_insertion_point(serialize_to_array_end:Category) return target; } size_t Category::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Proto_Node.Category) +// @@protoc_insertion_point(message_byte_size_start:Category) size_t total_size = 0; ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // map children = 6; + // map children = 6; total_size += 1 * ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_children_size()); - for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Proto_Node::Category >::const_iterator + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Category >::const_iterator it = this->_internal_children().begin(); it != this->_internal_children().end(); ++it) { total_size += Category_ChildrenEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); @@ -1280,22 +1247,22 @@ size_t Category::ByteSizeLong() const { } void Category::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:Proto_Node.Category) +// @@protoc_insertion_point(generalized_merge_from_start:Category) GOOGLE_DCHECK_NE(&from, this); const Category* source = ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:Proto_Node.Category) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:Category) ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:Proto_Node.Category) + // @@protoc_insertion_point(generalized_merge_from_cast_success:Category) MergeFrom(*source); } } void Category::MergeFrom(const Category& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:Proto_Node.Category) +// @@protoc_insertion_point(class_specific_merge_from_start:Category) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; @@ -1320,14 +1287,14 @@ void Category::MergeFrom(const Category& from) { } void Category::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:Proto_Node.Category) +// @@protoc_insertion_point(generalized_copy_from_start:Category) if (&from == this) return; Clear(); MergeFrom(from); } void Category::CopyFrom(const Category& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Proto_Node.Category) +// @@protoc_insertion_point(class_specific_copy_from_start:Category) if (&from == this) return; Clear(); MergeFrom(from); @@ -1359,95 +1326,181 @@ ::PROTOBUF_NAMESPACE_ID::Metadata Category::GetMetadata() const { // =================================================================== -void Icon_texture::InitAsDefaultInstance() { - ::Proto_Node::_Icon_texture_default_instance_._instance.get_mutable()->original_token_ = const_cast< PROTOBUF_NAMESPACE_ID::Any*>( - PROTOBUF_NAMESPACE_ID::Any::internal_default_instance()); +void Icon::InitAsDefaultInstance() { + ::_Icon_default_instance_._instance.get_mutable()->category_ = const_cast< ::Category*>( + ::Category::internal_default_instance()); + ::_Icon_default_instance_._instance.get_mutable()->texture_ = const_cast< ::Texture*>( + ::Texture::internal_default_instance()); + ::_Icon_default_instance_._instance.get_mutable()->guid_ = const_cast< ::GUID*>( + ::GUID::internal_default_instance()); + ::_Icon_default_instance_._instance.get_mutable()->position_ = const_cast< ::Position*>( + ::Position::internal_default_instance()); + ::_Icon_default_instance_._instance.get_mutable()->trigger_ = const_cast< ::Trigger*>( + ::Trigger::internal_default_instance()); } -class Icon_texture::_Internal { +class Icon::_Internal { public: - static const PROTOBUF_NAMESPACE_ID::Any& original_token(const Icon_texture* msg); + static const ::Category& category(const Icon* msg); + static const ::Texture& texture(const Icon* msg); + static const ::GUID& guid(const Icon* msg); + static const ::Position& position(const Icon* msg); + static const ::Trigger& trigger(const Icon* msg); }; -const PROTOBUF_NAMESPACE_ID::Any& -Icon_texture::_Internal::original_token(const Icon_texture* msg) { - return *msg->original_token_; +const ::Category& +Icon::_Internal::category(const Icon* msg) { + return *msg->category_; } -void Icon_texture::clear_original_token() { - if (GetArena() == nullptr && original_token_ != nullptr) { - delete original_token_; - } - original_token_ = nullptr; +const ::Texture& +Icon::_Internal::texture(const Icon* msg) { + return *msg->texture_; +} +const ::GUID& +Icon::_Internal::guid(const Icon* msg) { + return *msg->guid_; +} +const ::Position& +Icon::_Internal::position(const Icon* msg) { + return *msg->position_; +} +const ::Trigger& +Icon::_Internal::trigger(const Icon* msg) { + return *msg->trigger_; } -Icon_texture::Icon_texture(::PROTOBUF_NAMESPACE_ID::Arena* arena) +Icon::Icon(::PROTOBUF_NAMESPACE_ID::Arena* arena) : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:Proto_Node.Icon.texture) + // @@protoc_insertion_point(arena_constructor:Icon) } -Icon_texture::Icon_texture(const Icon_texture& from) +Icon::Icon(const Icon& from) : ::PROTOBUF_NAMESPACE_ID::Message() { _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - path_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_path().empty()) { - path_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_path(), + tip_description_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_tip_description().empty()) { + tip_description_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_tip_description(), + GetArena()); + } + tip_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_tip_name().empty()) { + tip_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_tip_name(), + GetArena()); + } + bhdraft__schedule_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_bhdraft__schedule().empty()) { + bhdraft__schedule_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_bhdraft__schedule(), GetArena()); } - if (from._internal_has_original_token()) { - original_token_ = new PROTOBUF_NAMESPACE_ID::Any(*from.original_token_); + if (from._internal_has_category()) { + category_ = new ::Category(*from.category_); + } else { + category_ = nullptr; + } + if (from._internal_has_texture()) { + texture_ = new ::Texture(*from.texture_); + } else { + texture_ = nullptr; + } + if (from._internal_has_guid()) { + guid_ = new ::GUID(*from.guid_); + } else { + guid_ = nullptr; + } + if (from._internal_has_position()) { + position_ = new ::Position(*from.position_); + } else { + position_ = nullptr; + } + if (from._internal_has_trigger()) { + trigger_ = new ::Trigger(*from.trigger_); } else { - original_token_ = nullptr; + trigger_ = nullptr; } - // @@protoc_insertion_point(copy_constructor:Proto_Node.Icon.texture) + ::memcpy(&map_id_, &from.map_id_, + static_cast(reinterpret_cast(&__tentative__render_on_minimap_) - + reinterpret_cast(&map_id_)) + sizeof(__tentative__render_on_minimap_)); + // @@protoc_insertion_point(copy_constructor:Icon) } -void Icon_texture::SharedCtor() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Icon_texture_node_2eproto.base); - path_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - original_token_ = nullptr; +void Icon::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Icon_generators_2fproto_5ftemplates_2fnode_2eproto.base); + tip_description_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + tip_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + bhdraft__schedule_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + ::memset(&category_, 0, static_cast( + reinterpret_cast(&__tentative__render_on_minimap_) - + reinterpret_cast(&category_)) + sizeof(__tentative__render_on_minimap_)); } -Icon_texture::~Icon_texture() { - // @@protoc_insertion_point(destructor:Proto_Node.Icon.texture) +Icon::~Icon() { + // @@protoc_insertion_point(destructor:Icon) SharedDtor(); _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -void Icon_texture::SharedDtor() { +void Icon::SharedDtor() { GOOGLE_DCHECK(GetArena() == nullptr); - path_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (this != internal_default_instance()) delete original_token_; + tip_description_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + tip_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + bhdraft__schedule_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (this != internal_default_instance()) delete category_; + if (this != internal_default_instance()) delete texture_; + if (this != internal_default_instance()) delete guid_; + if (this != internal_default_instance()) delete position_; + if (this != internal_default_instance()) delete trigger_; } -void Icon_texture::ArenaDtor(void* object) { - Icon_texture* _this = reinterpret_cast< Icon_texture* >(object); +void Icon::ArenaDtor(void* object) { + Icon* _this = reinterpret_cast< Icon* >(object); (void)_this; } -void Icon_texture::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +void Icon::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } -void Icon_texture::SetCachedSize(int size) const { +void Icon::SetCachedSize(int size) const { _cached_size_.Set(size); } -const Icon_texture& Icon_texture::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Icon_texture_node_2eproto.base); +const Icon& Icon::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Icon_generators_2fproto_5ftemplates_2fnode_2eproto.base); return *internal_default_instance(); } -void Icon_texture::Clear() { -// @@protoc_insertion_point(message_clear_start:Proto_Node.Icon.texture) +void Icon::Clear() { +// @@protoc_insertion_point(message_clear_start:Icon) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - path_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - if (GetArena() == nullptr && original_token_ != nullptr) { - delete original_token_; + tip_description_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + tip_name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + bhdraft__schedule_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + if (GetArena() == nullptr && category_ != nullptr) { + delete category_; + } + category_ = nullptr; + if (GetArena() == nullptr && texture_ != nullptr) { + delete texture_; + } + texture_ = nullptr; + if (GetArena() == nullptr && guid_ != nullptr) { + delete guid_; } - original_token_ = nullptr; + guid_ = nullptr; + if (GetArena() == nullptr && position_ != nullptr) { + delete position_; + } + position_ = nullptr; + if (GetArena() == nullptr && trigger_ != nullptr) { + delete trigger_; + } + trigger_ = nullptr; + ::memset(&map_id_, 0, static_cast( + reinterpret_cast(&__tentative__render_on_minimap_) - + reinterpret_cast(&map_id_)) + sizeof(__tentative__render_on_minimap_)); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -const char* Icon_texture::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +const char* Icon::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { @@ -1455,22 +1508,195 @@ const char* Icon_texture::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_I ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); CHK_(ptr); switch (tag >> 3) { - // string path = 1; + // .Category category = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - auto str = _internal_mutable_path(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "Proto_Node.Icon.texture.path")); + ptr = ctx->ParseMessage(_internal_mutable_category(), ptr); CHK_(ptr); } else goto handle_unusual; continue; - // .google.protobuf.Any original_token = 2; + // .Texture texture = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { - ptr = ctx->ParseMessage(_internal_mutable_original_token(), ptr); + ptr = ctx->ParseMessage(_internal_mutable_texture(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // .GUID guid = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + ptr = ctx->ParseMessage(_internal_mutable_guid(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // int32 map_id = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { + map_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // float distance_fade_end = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 45)) { + distance_fade_end_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else goto handle_unusual; + continue; + // float distance_fade_start = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 53)) { + distance_fade_start_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else goto handle_unusual; + continue; + // float height_offset = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 61)) { + height_offset_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else goto handle_unusual; + continue; + // .Position position = 8; + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 66)) { + ptr = ctx->ParseMessage(_internal_mutable_position(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // .ResetBehavior reset_behavior = 9; + case 9: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 72)) { + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_set_reset_behavior(static_cast<::ResetBehavior>(val)); + } else goto handle_unusual; + continue; + // .Trigger trigger = 10; + case 10: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 82)) { + ptr = ctx->ParseMessage(_internal_mutable_trigger(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // fixed32 achievement_bit = 16; + case 16: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 133)) { + achievement_bit_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint32>(ptr); + ptr += sizeof(::PROTOBUF_NAMESPACE_ID::uint32); + } else goto handle_unusual; + continue; + // int32 achievement_id = 17; + case 17: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 136)) { + achievement_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // float alpha = 18; + case 18: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 149)) { + alpha_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else goto handle_unusual; + continue; + // bool can_fade = 19; + case 19: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 152)) { + can_fade_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // int32 minimum_size_on_screen = 20; + case 20: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 160)) { + minimum_size_on_screen_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // int32 map_display_size = 21; + case 21: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 168)) { + map_display_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // int32 maximum_size_on_screen = 22; + case 22: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 176)) { + maximum_size_on_screen_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool scale_on_map_with_zoom = 23; + case 23: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 184)) { + scale_on_map_with_zoom_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string tip_description = 24; + case 24: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 194)) { + auto str = _internal_mutable_tip_description(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "Icon.tip_description")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string tip_name = 25; + case 25: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 202)) { + auto str = _internal_mutable_tip_name(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "Icon.tip_name")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // float __tentative__scale = 2048; + case 2048: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 5)) { + __tentative__scale_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else goto handle_unusual; + continue; + // bool __tentative__render_ingame = 2049; + case 2049: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + __tentative__render_ingame_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool __tentative__render_on_map = 2050; + case 2050: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { + __tentative__render_on_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool __tentative__render_on_minimap = 2051; + case 2051: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { + __tentative__render_on_minimap_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string bhdraft__schedule = 2052; + case 2052: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { + auto str = _internal_mutable_bhdraft__schedule(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "Icon.bhdraft__schedule")); CHK_(ptr); } else goto handle_unusual; continue; + // float bhdraft__schedule_duration = 2053; + case 2053: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 45)) { + bhdraft__schedule_duration_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else goto handle_unusual; + continue; default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { @@ -1493,301 +1719,364 @@ const char* Icon_texture::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_I #undef CHK_ } -::PROTOBUF_NAMESPACE_ID::uint8* Icon_texture::_InternalSerialize( +::PROTOBUF_NAMESPACE_ID::uint8* Icon::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Proto_Node.Icon.texture) + // @@protoc_insertion_point(serialize_to_array_start:Icon) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - // string path = 1; - if (this->path().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_path().data(), static_cast(this->_internal_path().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "Proto_Node.Icon.texture.path"); - target = stream->WriteStringMaybeAliased( - 1, this->_internal_path(), target); + // .Category category = 1; + if (this->has_category()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 1, _Internal::category(this), target, stream); } - // .google.protobuf.Any original_token = 2; - if (this->has_original_token()) { + // .Texture texture = 2; + if (this->has_texture()) { target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessage( - 2, _Internal::original_token(this), target, stream); + 2, _Internal::texture(this), target, stream); } - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + // .GUID guid = 3; + if (this->has_guid()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 3, _Internal::guid(this), target, stream); } - // @@protoc_insertion_point(serialize_to_array_end:Proto_Node.Icon.texture) - return target; -} - -size_t Icon_texture::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Proto_Node.Icon.texture) - size_t total_size = 0; - - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - // string path = 1; - if (this->path().size() > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_path()); + // int32 map_id = 4; + if (this->map_id() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->_internal_map_id(), target); } - // .google.protobuf.Any original_token = 2; - if (this->has_original_token()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *original_token_); + // float distance_fade_end = 5; + if (!(this->distance_fade_end() <= 0 && this->distance_fade_end() >= 0)) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(5, this->_internal_distance_fade_end(), target); } - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( - _internal_metadata_, total_size, &_cached_size_); + // float distance_fade_start = 6; + if (!(this->distance_fade_start() <= 0 && this->distance_fade_start() >= 0)) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(6, this->_internal_distance_fade_start(), target); } - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} -void Icon_texture::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:Proto_Node.Icon.texture) - GOOGLE_DCHECK_NE(&from, this); - const Icon_texture* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:Proto_Node.Icon.texture) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:Proto_Node.Icon.texture) - MergeFrom(*source); + // float height_offset = 7; + if (!(this->height_offset() <= 0 && this->height_offset() >= 0)) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(7, this->_internal_height_offset(), target); } -} - -void Icon_texture::MergeFrom(const Icon_texture& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:Proto_Node.Icon.texture) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - if (from.path().size() > 0) { - _internal_set_path(from._internal_path()); - } - if (from.has_original_token()) { - _internal_mutable_original_token()->PROTOBUF_NAMESPACE_ID::Any::MergeFrom(from._internal_original_token()); + // .Position position = 8; + if (this->has_position()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 8, _Internal::position(this), target, stream); } -} - -void Icon_texture::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:Proto_Node.Icon.texture) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void Icon_texture::CopyFrom(const Icon_texture& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Proto_Node.Icon.texture) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool Icon_texture::IsInitialized() const { - return true; -} - -void Icon_texture::InternalSwap(Icon_texture* other) { - using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - path_.Swap(&other->path_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - swap(original_token_, other->original_token_); -} -::PROTOBUF_NAMESPACE_ID::Metadata Icon_texture::GetMetadata() const { - return GetMetadataStatic(); -} + // .ResetBehavior reset_behavior = 9; + if (this->reset_behavior() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 9, this->_internal_reset_behavior(), target); + } + // .Trigger trigger = 10; + if (this->has_trigger()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 10, _Internal::trigger(this), target, stream); + } -// =================================================================== + // fixed32 achievement_bit = 16; + if (this->achievement_bit() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFixed32ToArray(16, this->_internal_achievement_bit(), target); + } -void Icon_position::InitAsDefaultInstance() { -} -class Icon_position::_Internal { - public: -}; + // int32 achievement_id = 17; + if (this->achievement_id() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(17, this->_internal_achievement_id(), target); + } -Icon_position::Icon_position(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(); - RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:Proto_Node.Icon.position) -} -Icon_position::Icon_position(const Icon_position& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::memcpy(&x_, &from.x_, - static_cast(reinterpret_cast(&z_) - - reinterpret_cast(&x_)) + sizeof(z_)); - // @@protoc_insertion_point(copy_constructor:Proto_Node.Icon.position) -} + // float alpha = 18; + if (!(this->alpha() <= 0 && this->alpha() >= 0)) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(18, this->_internal_alpha(), target); + } -void Icon_position::SharedCtor() { - ::memset(&x_, 0, static_cast( - reinterpret_cast(&z_) - - reinterpret_cast(&x_)) + sizeof(z_)); -} + // bool can_fade = 19; + if (this->can_fade() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(19, this->_internal_can_fade(), target); + } -Icon_position::~Icon_position() { - // @@protoc_insertion_point(destructor:Proto_Node.Icon.position) - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} + // int32 minimum_size_on_screen = 20; + if (this->minimum_size_on_screen() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(20, this->_internal_minimum_size_on_screen(), target); + } -void Icon_position::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); -} + // int32 map_display_size = 21; + if (this->map_display_size() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(21, this->_internal_map_display_size(), target); + } -void Icon_position::ArenaDtor(void* object) { - Icon_position* _this = reinterpret_cast< Icon_position* >(object); - (void)_this; -} -void Icon_position::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void Icon_position::SetCachedSize(int size) const { - _cached_size_.Set(size); -} -const Icon_position& Icon_position::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Icon_position_node_2eproto.base); - return *internal_default_instance(); -} + // int32 maximum_size_on_screen = 22; + if (this->maximum_size_on_screen() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(22, this->_internal_maximum_size_on_screen(), target); + } + // bool scale_on_map_with_zoom = 23; + if (this->scale_on_map_with_zoom() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(23, this->_internal_scale_on_map_with_zoom(), target); + } -void Icon_position::Clear() { -// @@protoc_insertion_point(message_clear_start:Proto_Node.Icon.position) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; + // string tip_description = 24; + if (this->tip_description().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_tip_description().data(), static_cast(this->_internal_tip_description().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "Icon.tip_description"); + target = stream->WriteStringMaybeAliased( + 24, this->_internal_tip_description(), target); + } - ::memset(&x_, 0, static_cast( - reinterpret_cast(&z_) - - reinterpret_cast(&x_)) + sizeof(z_)); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} + // string tip_name = 25; + if (this->tip_name().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_tip_name().data(), static_cast(this->_internal_tip_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "Icon.tip_name"); + target = stream->WriteStringMaybeAliased( + 25, this->_internal_tip_name(), target); + } -const char* Icon_position::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; - while (!ctx->Done(&ptr)) { - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - CHK_(ptr); - switch (tag >> 3) { - // float x = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 13)) { - x_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - // float y = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 21)) { - y_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - // float z = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 29)) { - z_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - default: { - handle_unusual: - if ((tag & 7) == 4 || tag == 0) { - ctx->SetLastTag(tag); - goto success; - } - ptr = UnknownFieldParse(tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - continue; - } - } // switch - } // while -success: - return ptr; -failure: - ptr = nullptr; - goto success; -#undef CHK_ -} + // float __tentative__scale = 2048; + if (!(this->__tentative__scale() <= 0 && this->__tentative__scale() >= 0)) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2048, this->_internal___tentative__scale(), target); + } -::PROTOBUF_NAMESPACE_ID::uint8* Icon_position::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Proto_Node.Icon.position) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; + // bool __tentative__render_ingame = 2049; + if (this->__tentative__render_ingame() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2049, this->_internal___tentative__render_ingame(), target); + } - // float x = 1; - if (!(this->x() <= 0 && this->x() >= 0)) { + // bool __tentative__render_on_map = 2050; + if (this->__tentative__render_on_map() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(1, this->_internal_x(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2050, this->_internal___tentative__render_on_map(), target); } - // float y = 2; - if (!(this->y() <= 0 && this->y() >= 0)) { + // bool __tentative__render_on_minimap = 2051; + if (this->__tentative__render_on_minimap() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2, this->_internal_y(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2051, this->_internal___tentative__render_on_minimap(), target); } - // float z = 3; - if (!(this->z() <= 0 && this->z() >= 0)) { + // string bhdraft__schedule = 2052; + if (this->bhdraft__schedule().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_bhdraft__schedule().data(), static_cast(this->_internal_bhdraft__schedule().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "Icon.bhdraft__schedule"); + target = stream->WriteStringMaybeAliased( + 2052, this->_internal_bhdraft__schedule(), target); + } + + // float bhdraft__schedule_duration = 2053; + if (!(this->bhdraft__schedule_duration() <= 0 && this->bhdraft__schedule_duration() >= 0)) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(3, this->_internal_z(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2053, this->_internal_bhdraft__schedule_duration(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } - // @@protoc_insertion_point(serialize_to_array_end:Proto_Node.Icon.position) + // @@protoc_insertion_point(serialize_to_array_end:Icon) return target; } -size_t Icon_position::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Proto_Node.Icon.position) +size_t Icon::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:Icon) size_t total_size = 0; ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // float x = 1; - if (!(this->x() <= 0 && this->x() >= 0)) { - total_size += 1 + 4; - } - - // float y = 2; - if (!(this->y() <= 0 && this->y() >= 0)) { - total_size += 1 + 4; + // string tip_description = 24; + if (this->tip_description().size() > 0) { + total_size += 2 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_tip_description()); } - // float z = 3; - if (!(this->z() <= 0 && this->z() >= 0)) { + // string tip_name = 25; + if (this->tip_name().size() > 0) { + total_size += 2 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_tip_name()); + } + + // string bhdraft__schedule = 2052; + if (this->bhdraft__schedule().size() > 0) { + total_size += 3 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_bhdraft__schedule()); + } + + // .Category category = 1; + if (this->has_category()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *category_); + } + + // .Texture texture = 2; + if (this->has_texture()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *texture_); + } + + // .GUID guid = 3; + if (this->has_guid()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *guid_); + } + + // .Position position = 8; + if (this->has_position()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *position_); + } + + // .Trigger trigger = 10; + if (this->has_trigger()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *trigger_); + } + + // int32 map_id = 4; + if (this->map_id() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + this->_internal_map_id()); + } + + // float distance_fade_end = 5; + if (!(this->distance_fade_end() <= 0 && this->distance_fade_end() >= 0)) { + total_size += 1 + 4; + } + + // float distance_fade_start = 6; + if (!(this->distance_fade_start() <= 0 && this->distance_fade_start() >= 0)) { total_size += 1 + 4; } + // float height_offset = 7; + if (!(this->height_offset() <= 0 && this->height_offset() >= 0)) { + total_size += 1 + 4; + } + + // .ResetBehavior reset_behavior = 9; + if (this->reset_behavior() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_reset_behavior()); + } + + // fixed32 achievement_bit = 16; + if (this->achievement_bit() != 0) { + total_size += 2 + 4; + } + + // int32 achievement_id = 17; + if (this->achievement_id() != 0) { + total_size += 2 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + this->_internal_achievement_id()); + } + + // float alpha = 18; + if (!(this->alpha() <= 0 && this->alpha() >= 0)) { + total_size += 2 + 4; + } + + // int32 minimum_size_on_screen = 20; + if (this->minimum_size_on_screen() != 0) { + total_size += 2 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + this->_internal_minimum_size_on_screen()); + } + + // int32 map_display_size = 21; + if (this->map_display_size() != 0) { + total_size += 2 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + this->_internal_map_display_size()); + } + + // float bhdraft__schedule_duration = 2053; + if (!(this->bhdraft__schedule_duration() <= 0 && this->bhdraft__schedule_duration() >= 0)) { + total_size += 3 + 4; + } + + // int32 maximum_size_on_screen = 22; + if (this->maximum_size_on_screen() != 0) { + total_size += 2 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + this->_internal_maximum_size_on_screen()); + } + + // bool can_fade = 19; + if (this->can_fade() != 0) { + total_size += 2 + 1; + } + + // bool scale_on_map_with_zoom = 23; + if (this->scale_on_map_with_zoom() != 0) { + total_size += 2 + 1; + } + + // bool __tentative__render_ingame = 2049; + if (this->__tentative__render_ingame() != 0) { + total_size += 3 + 1; + } + + // bool __tentative__render_on_map = 2050; + if (this->__tentative__render_on_map() != 0) { + total_size += 3 + 1; + } + + // float __tentative__scale = 2048; + if (!(this->__tentative__scale() <= 0 && this->__tentative__scale() >= 0)) { + total_size += 3 + 4; + } + + // bool __tentative__render_on_minimap = 2051; + if (this->__tentative__render_on_minimap() != 0) { + total_size += 3 + 1; + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( _internal_metadata_, total_size, &_cached_size_); @@ -1797,140 +2086,408 @@ size_t Icon_position::ByteSizeLong() const { return total_size; } -void Icon_position::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:Proto_Node.Icon.position) +void Icon::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:Icon) GOOGLE_DCHECK_NE(&from, this); - const Icon_position* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + const Icon* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:Proto_Node.Icon.position) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:Icon) ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:Proto_Node.Icon.position) + // @@protoc_insertion_point(generalized_merge_from_cast_success:Icon) MergeFrom(*source); } } -void Icon_position::MergeFrom(const Icon_position& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:Proto_Node.Icon.position) +void Icon::MergeFrom(const Icon& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:Icon) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - if (!(from.x() <= 0 && from.x() >= 0)) { - _internal_set_x(from._internal_x()); + if (from.tip_description().size() > 0) { + _internal_set_tip_description(from._internal_tip_description()); } - if (!(from.y() <= 0 && from.y() >= 0)) { - _internal_set_y(from._internal_y()); + if (from.tip_name().size() > 0) { + _internal_set_tip_name(from._internal_tip_name()); } - if (!(from.z() <= 0 && from.z() >= 0)) { - _internal_set_z(from._internal_z()); + if (from.bhdraft__schedule().size() > 0) { + _internal_set_bhdraft__schedule(from._internal_bhdraft__schedule()); + } + if (from.has_category()) { + _internal_mutable_category()->::Category::MergeFrom(from._internal_category()); + } + if (from.has_texture()) { + _internal_mutable_texture()->::Texture::MergeFrom(from._internal_texture()); + } + if (from.has_guid()) { + _internal_mutable_guid()->::GUID::MergeFrom(from._internal_guid()); + } + if (from.has_position()) { + _internal_mutable_position()->::Position::MergeFrom(from._internal_position()); + } + if (from.has_trigger()) { + _internal_mutable_trigger()->::Trigger::MergeFrom(from._internal_trigger()); + } + if (from.map_id() != 0) { + _internal_set_map_id(from._internal_map_id()); + } + if (!(from.distance_fade_end() <= 0 && from.distance_fade_end() >= 0)) { + _internal_set_distance_fade_end(from._internal_distance_fade_end()); + } + if (!(from.distance_fade_start() <= 0 && from.distance_fade_start() >= 0)) { + _internal_set_distance_fade_start(from._internal_distance_fade_start()); + } + if (!(from.height_offset() <= 0 && from.height_offset() >= 0)) { + _internal_set_height_offset(from._internal_height_offset()); + } + if (from.reset_behavior() != 0) { + _internal_set_reset_behavior(from._internal_reset_behavior()); + } + if (from.achievement_bit() != 0) { + _internal_set_achievement_bit(from._internal_achievement_bit()); + } + if (from.achievement_id() != 0) { + _internal_set_achievement_id(from._internal_achievement_id()); + } + if (!(from.alpha() <= 0 && from.alpha() >= 0)) { + _internal_set_alpha(from._internal_alpha()); + } + if (from.minimum_size_on_screen() != 0) { + _internal_set_minimum_size_on_screen(from._internal_minimum_size_on_screen()); + } + if (from.map_display_size() != 0) { + _internal_set_map_display_size(from._internal_map_display_size()); + } + if (!(from.bhdraft__schedule_duration() <= 0 && from.bhdraft__schedule_duration() >= 0)) { + _internal_set_bhdraft__schedule_duration(from._internal_bhdraft__schedule_duration()); + } + if (from.maximum_size_on_screen() != 0) { + _internal_set_maximum_size_on_screen(from._internal_maximum_size_on_screen()); + } + if (from.can_fade() != 0) { + _internal_set_can_fade(from._internal_can_fade()); + } + if (from.scale_on_map_with_zoom() != 0) { + _internal_set_scale_on_map_with_zoom(from._internal_scale_on_map_with_zoom()); + } + if (from.__tentative__render_ingame() != 0) { + _internal_set___tentative__render_ingame(from._internal___tentative__render_ingame()); + } + if (from.__tentative__render_on_map() != 0) { + _internal_set___tentative__render_on_map(from._internal___tentative__render_on_map()); + } + if (!(from.__tentative__scale() <= 0 && from.__tentative__scale() >= 0)) { + _internal_set___tentative__scale(from._internal___tentative__scale()); + } + if (from.__tentative__render_on_minimap() != 0) { + _internal_set___tentative__render_on_minimap(from._internal___tentative__render_on_minimap()); } } -void Icon_position::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:Proto_Node.Icon.position) +void Icon::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:Icon) if (&from == this) return; Clear(); MergeFrom(from); } -void Icon_position::CopyFrom(const Icon_position& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Proto_Node.Icon.position) +void Icon::CopyFrom(const Icon& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:Icon) if (&from == this) return; Clear(); MergeFrom(from); } -bool Icon_position::IsInitialized() const { +bool Icon::IsInitialized() const { return true; } -void Icon_position::InternalSwap(Icon_position* other) { +void Icon::InternalSwap(Icon* other) { using std::swap; _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + tip_description_.Swap(&other->tip_description_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + tip_name_.Swap(&other->tip_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + bhdraft__schedule_.Swap(&other->bhdraft__schedule_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(Icon_position, z_) - + sizeof(Icon_position::z_) - - PROTOBUF_FIELD_OFFSET(Icon_position, x_)>( - reinterpret_cast(&x_), - reinterpret_cast(&other->x_)); + PROTOBUF_FIELD_OFFSET(Icon, __tentative__render_on_minimap_) + + sizeof(Icon::__tentative__render_on_minimap_) + - PROTOBUF_FIELD_OFFSET(Icon, category_)>( + reinterpret_cast(&category_), + reinterpret_cast(&other->category_)); } -::PROTOBUF_NAMESPACE_ID::Metadata Icon_position::GetMetadata() const { +::PROTOBUF_NAMESPACE_ID::Metadata Icon::GetMetadata() const { return GetMetadataStatic(); } // =================================================================== -void Icon_euler_rotation::InitAsDefaultInstance() { -} -class Icon_euler_rotation::_Internal { +void RICHARDS::InitAsDefaultInstance() { + ::_RICHARDS_default_instance_._instance.get_mutable()->category_ = const_cast< ::Category*>( + ::Category::internal_default_instance()); + ::_RICHARDS_default_instance_._instance.get_mutable()->texture_ = const_cast< ::Texture*>( + ::Texture::internal_default_instance()); + ::_RICHARDS_default_instance_._instance.get_mutable()->guid_ = const_cast< ::GUID*>( + ::GUID::internal_default_instance()); + ::_RICHARDS_default_instance_._instance.get_mutable()->trail_data_ = const_cast< ::TrailData*>( + ::TrailData::internal_default_instance()); + ::_RICHARDS_default_instance_._instance.get_mutable()->color_ = const_cast< ::Color*>( + ::Color::internal_default_instance()); + ::_RICHARDS_default_instance_._instance.get_mutable()->festival_filter_ = const_cast< ::FestivalFilter*>( + ::FestivalFilter::internal_default_instance()); + ::_RICHARDS_default_instance_._instance.get_mutable()->map_type_filter_ = const_cast< ::MapTypeFilter*>( + ::MapTypeFilter::internal_default_instance()); + ::_RICHARDS_default_instance_._instance.get_mutable()->mount_filter_ = const_cast< ::MountFilter*>( + ::MountFilter::internal_default_instance()); + ::_RICHARDS_default_instance_._instance.get_mutable()->profession_filter_ = const_cast< ::ProfessionFilter*>( + ::ProfessionFilter::internal_default_instance()); + ::_RICHARDS_default_instance_._instance.get_mutable()->specialization_filter_ = const_cast< ::SpecializationFilter*>( + ::SpecializationFilter::internal_default_instance()); + ::_RICHARDS_default_instance_._instance.get_mutable()->species_filter_ = const_cast< ::SpeciesFilter*>( + ::SpeciesFilter::internal_default_instance()); +} +class RICHARDS::_Internal { public: + static const ::Category& category(const RICHARDS* msg); + static const ::Texture& texture(const RICHARDS* msg); + static const ::GUID& guid(const RICHARDS* msg); + static const ::TrailData& trail_data(const RICHARDS* msg); + static const ::Color& color(const RICHARDS* msg); + static const ::FestivalFilter& festival_filter(const RICHARDS* msg); + static const ::MapTypeFilter& map_type_filter(const RICHARDS* msg); + static const ::MountFilter& mount_filter(const RICHARDS* msg); + static const ::ProfessionFilter& profession_filter(const RICHARDS* msg); + static const ::SpecializationFilter& specialization_filter(const RICHARDS* msg); + static const ::SpeciesFilter& species_filter(const RICHARDS* msg); }; -Icon_euler_rotation::Icon_euler_rotation(::PROTOBUF_NAMESPACE_ID::Arena* arena) +const ::Category& +RICHARDS::_Internal::category(const RICHARDS* msg) { + return *msg->category_; +} +const ::Texture& +RICHARDS::_Internal::texture(const RICHARDS* msg) { + return *msg->texture_; +} +const ::GUID& +RICHARDS::_Internal::guid(const RICHARDS* msg) { + return *msg->guid_; +} +const ::TrailData& +RICHARDS::_Internal::trail_data(const RICHARDS* msg) { + return *msg->trail_data_; +} +const ::Color& +RICHARDS::_Internal::color(const RICHARDS* msg) { + return *msg->color_; +} +const ::FestivalFilter& +RICHARDS::_Internal::festival_filter(const RICHARDS* msg) { + return *msg->festival_filter_; +} +const ::MapTypeFilter& +RICHARDS::_Internal::map_type_filter(const RICHARDS* msg) { + return *msg->map_type_filter_; +} +const ::MountFilter& +RICHARDS::_Internal::mount_filter(const RICHARDS* msg) { + return *msg->mount_filter_; +} +const ::ProfessionFilter& +RICHARDS::_Internal::profession_filter(const RICHARDS* msg) { + return *msg->profession_filter_; +} +const ::SpecializationFilter& +RICHARDS::_Internal::specialization_filter(const RICHARDS* msg) { + return *msg->specialization_filter_; +} +const ::SpeciesFilter& +RICHARDS::_Internal::species_filter(const RICHARDS* msg) { + return *msg->species_filter_; +} +RICHARDS::RICHARDS(::PROTOBUF_NAMESPACE_ID::Arena* arena) : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:Proto_Node.Icon.euler_rotation) + // @@protoc_insertion_point(arena_constructor:RICHARDS) } -Icon_euler_rotation::Icon_euler_rotation(const Icon_euler_rotation& from) +RICHARDS::RICHARDS(const RICHARDS& from) : ::PROTOBUF_NAMESPACE_ID::Message() { _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::memcpy(&x_, &from.x_, - static_cast(reinterpret_cast(&z_) - - reinterpret_cast(&x_)) + sizeof(z_)); - // @@protoc_insertion_point(copy_constructor:Proto_Node.Icon.euler_rotation) + bhdraft__schedule_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_bhdraft__schedule().empty()) { + bhdraft__schedule_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_bhdraft__schedule(), + GetArena()); + } + if (from._internal_has_category()) { + category_ = new ::Category(*from.category_); + } else { + category_ = nullptr; + } + if (from._internal_has_texture()) { + texture_ = new ::Texture(*from.texture_); + } else { + texture_ = nullptr; + } + if (from._internal_has_guid()) { + guid_ = new ::GUID(*from.guid_); + } else { + guid_ = nullptr; + } + if (from._internal_has_trail_data()) { + trail_data_ = new ::TrailData(*from.trail_data_); + } else { + trail_data_ = nullptr; + } + if (from._internal_has_color()) { + color_ = new ::Color(*from.color_); + } else { + color_ = nullptr; + } + if (from._internal_has_festival_filter()) { + festival_filter_ = new ::FestivalFilter(*from.festival_filter_); + } else { + festival_filter_ = nullptr; + } + if (from._internal_has_map_type_filter()) { + map_type_filter_ = new ::MapTypeFilter(*from.map_type_filter_); + } else { + map_type_filter_ = nullptr; + } + if (from._internal_has_mount_filter()) { + mount_filter_ = new ::MountFilter(*from.mount_filter_); + } else { + mount_filter_ = nullptr; + } + if (from._internal_has_profession_filter()) { + profession_filter_ = new ::ProfessionFilter(*from.profession_filter_); + } else { + profession_filter_ = nullptr; + } + if (from._internal_has_specialization_filter()) { + specialization_filter_ = new ::SpecializationFilter(*from.specialization_filter_); + } else { + specialization_filter_ = nullptr; + } + if (from._internal_has_species_filter()) { + species_filter_ = new ::SpeciesFilter(*from.species_filter_); + } else { + species_filter_ = nullptr; + } + ::memcpy(&map_id_, &from.map_id_, + static_cast(reinterpret_cast(&scale_) - + reinterpret_cast(&map_id_)) + sizeof(scale_)); + // @@protoc_insertion_point(copy_constructor:RICHARDS) } -void Icon_euler_rotation::SharedCtor() { - ::memset(&x_, 0, static_cast( - reinterpret_cast(&z_) - - reinterpret_cast(&x_)) + sizeof(z_)); +void RICHARDS::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_RICHARDS_generators_2fproto_5ftemplates_2fnode_2eproto.base); + bhdraft__schedule_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + ::memset(&category_, 0, static_cast( + reinterpret_cast(&scale_) - + reinterpret_cast(&category_)) + sizeof(scale_)); } -Icon_euler_rotation::~Icon_euler_rotation() { - // @@protoc_insertion_point(destructor:Proto_Node.Icon.euler_rotation) +RICHARDS::~RICHARDS() { + // @@protoc_insertion_point(destructor:RICHARDS) SharedDtor(); _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -void Icon_euler_rotation::SharedDtor() { +void RICHARDS::SharedDtor() { GOOGLE_DCHECK(GetArena() == nullptr); -} - -void Icon_euler_rotation::ArenaDtor(void* object) { - Icon_euler_rotation* _this = reinterpret_cast< Icon_euler_rotation* >(object); + bhdraft__schedule_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (this != internal_default_instance()) delete category_; + if (this != internal_default_instance()) delete texture_; + if (this != internal_default_instance()) delete guid_; + if (this != internal_default_instance()) delete trail_data_; + if (this != internal_default_instance()) delete color_; + if (this != internal_default_instance()) delete festival_filter_; + if (this != internal_default_instance()) delete map_type_filter_; + if (this != internal_default_instance()) delete mount_filter_; + if (this != internal_default_instance()) delete profession_filter_; + if (this != internal_default_instance()) delete specialization_filter_; + if (this != internal_default_instance()) delete species_filter_; +} + +void RICHARDS::ArenaDtor(void* object) { + RICHARDS* _this = reinterpret_cast< RICHARDS* >(object); (void)_this; } -void Icon_euler_rotation::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +void RICHARDS::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } -void Icon_euler_rotation::SetCachedSize(int size) const { +void RICHARDS::SetCachedSize(int size) const { _cached_size_.Set(size); } -const Icon_euler_rotation& Icon_euler_rotation::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Icon_euler_rotation_node_2eproto.base); +const RICHARDS& RICHARDS::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_RICHARDS_generators_2fproto_5ftemplates_2fnode_2eproto.base); return *internal_default_instance(); } -void Icon_euler_rotation::Clear() { -// @@protoc_insertion_point(message_clear_start:Proto_Node.Icon.euler_rotation) +void RICHARDS::Clear() { +// @@protoc_insertion_point(message_clear_start:RICHARDS) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - ::memset(&x_, 0, static_cast( - reinterpret_cast(&z_) - - reinterpret_cast(&x_)) + sizeof(z_)); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} + bhdraft__schedule_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + if (GetArena() == nullptr && category_ != nullptr) { + delete category_; + } + category_ = nullptr; + if (GetArena() == nullptr && texture_ != nullptr) { + delete texture_; + } + texture_ = nullptr; + if (GetArena() == nullptr && guid_ != nullptr) { + delete guid_; + } + guid_ = nullptr; + if (GetArena() == nullptr && trail_data_ != nullptr) { + delete trail_data_; + } + trail_data_ = nullptr; + if (GetArena() == nullptr && color_ != nullptr) { + delete color_; + } + color_ = nullptr; + if (GetArena() == nullptr && festival_filter_ != nullptr) { + delete festival_filter_; + } + festival_filter_ = nullptr; + if (GetArena() == nullptr && map_type_filter_ != nullptr) { + delete map_type_filter_; + } + map_type_filter_ = nullptr; + if (GetArena() == nullptr && mount_filter_ != nullptr) { + delete mount_filter_; + } + mount_filter_ = nullptr; + if (GetArena() == nullptr && profession_filter_ != nullptr) { + delete profession_filter_; + } + profession_filter_ = nullptr; + if (GetArena() == nullptr && specialization_filter_ != nullptr) { + delete specialization_filter_; + } + specialization_filter_ = nullptr; + if (GetArena() == nullptr && species_filter_ != nullptr) { + delete species_filter_; + } + species_filter_ = nullptr; + ::memset(&map_id_, 0, static_cast( + reinterpret_cast(&scale_) - + reinterpret_cast(&map_id_)) + sizeof(scale_)); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} -const char* Icon_euler_rotation::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +const char* RICHARDS::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { @@ -1938,27 +2495,177 @@ const char* Icon_euler_rotation::_InternalParse(const char* ptr, ::PROTOBUF_NAME ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); CHK_(ptr); switch (tag >> 3) { - // float x = 1; + // .Category category = 1; case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 13)) { - x_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_category(), ptr); + CHK_(ptr); } else goto handle_unusual; continue; - // float y = 2; + // .Texture texture = 2; case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 21)) { - y_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr = ctx->ParseMessage(_internal_mutable_texture(), ptr); + CHK_(ptr); } else goto handle_unusual; continue; - // float z = 3; + // .GUID guid = 3; case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 29)) { - z_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + ptr = ctx->ParseMessage(_internal_mutable_guid(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // int32 map_id = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { + map_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // float distance_fade_end = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 45)) { + distance_fade_end_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else goto handle_unusual; + continue; + // float distance_fade_start = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 53)) { + distance_fade_start_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else goto handle_unusual; + continue; + // .TrailData trail_data = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) { + ptr = ctx->ParseMessage(_internal_mutable_trail_data(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // float animation_speed = 8; + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 69)) { + animation_speed_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else goto handle_unusual; + continue; + // .CullChirality cull_chirality = 9; + case 9: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 72)) { + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_set_cull_chirality(static_cast<::CullChirality>(val)); + } else goto handle_unusual; + continue; + // fixed32 achievement_bit = 16; + case 16: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 133)) { + achievement_bit_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint32>(ptr); + ptr += sizeof(::PROTOBUF_NAMESPACE_ID::uint32); + } else goto handle_unusual; + continue; + // int32 achievement_id = 17; + case 17: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 136)) { + achievement_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // float alpha = 18; + case 18: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 149)) { + alpha_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else goto handle_unusual; + continue; + // bool can_fade = 19; + case 19: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 152)) { + can_fade_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool is_wall = 22; + case 22: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 176)) { + is_wall_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string bhdraft__schedule = 23; + case 23: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 186)) { + auto str = _internal_mutable_bhdraft__schedule(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "RICHARDS.bhdraft__schedule")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // float bhdraft__schedule_duration = 24; + case 24: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 197)) { + bhdraft__schedule_duration_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else goto handle_unusual; + continue; + // float scale = 25; + case 25: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 205)) { + scale_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); ptr += sizeof(float); } else goto handle_unusual; continue; + // .Color color = 26; + case 26: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 210)) { + ptr = ctx->ParseMessage(_internal_mutable_color(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // .FestivalFilter festival_filter = 27; + case 27: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 218)) { + ptr = ctx->ParseMessage(_internal_mutable_festival_filter(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // .MapTypeFilter map_type_filter = 28; + case 28: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 226)) { + ptr = ctx->ParseMessage(_internal_mutable_map_type_filter(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // .MountFilter mount_filter = 29; + case 29: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 234)) { + ptr = ctx->ParseMessage(_internal_mutable_mount_filter(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // .ProfessionFilter profession_filter = 30; + case 30: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 242)) { + ptr = ctx->ParseMessage(_internal_mutable_profession_filter(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // .SpecializationFilter specialization_filter = 31; + case 31: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 250)) { + ptr = ctx->ParseMessage(_internal_mutable_specialization_filter(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // .SpeciesFilter species_filter = 32; + case 32: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 2)) { + ptr = ctx->ParseMessage(_internal_mutable_species_filter(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { @@ -1981,198 +2688,555 @@ const char* Icon_euler_rotation::_InternalParse(const char* ptr, ::PROTOBUF_NAME #undef CHK_ } -::PROTOBUF_NAMESPACE_ID::uint8* Icon_euler_rotation::_InternalSerialize( +::PROTOBUF_NAMESPACE_ID::uint8* RICHARDS::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Proto_Node.Icon.euler_rotation) + // @@protoc_insertion_point(serialize_to_array_start:RICHARDS) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - // float x = 1; - if (!(this->x() <= 0 && this->x() >= 0)) { + // .Category category = 1; + if (this->has_category()) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(1, this->_internal_x(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 1, _Internal::category(this), target, stream); } - // float y = 2; - if (!(this->y() <= 0 && this->y() >= 0)) { + // .Texture texture = 2; + if (this->has_texture()) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2, this->_internal_y(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 2, _Internal::texture(this), target, stream); } - // float z = 3; - if (!(this->z() <= 0 && this->z() >= 0)) { + // .GUID guid = 3; + if (this->has_guid()) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(3, this->_internal_z(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 3, _Internal::guid(this), target, stream); } - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + // int32 map_id = 4; + if (this->map_id() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->_internal_map_id(), target); } - // @@protoc_insertion_point(serialize_to_array_end:Proto_Node.Icon.euler_rotation) - return target; -} -size_t Icon_euler_rotation::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Proto_Node.Icon.euler_rotation) - size_t total_size = 0; + // float distance_fade_end = 5; + if (!(this->distance_fade_end() <= 0 && this->distance_fade_end() >= 0)) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(5, this->_internal_distance_fade_end(), target); + } - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; + // float distance_fade_start = 6; + if (!(this->distance_fade_start() <= 0 && this->distance_fade_start() >= 0)) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(6, this->_internal_distance_fade_start(), target); + } - // float x = 1; - if (!(this->x() <= 0 && this->x() >= 0)) { - total_size += 1 + 4; + // .TrailData trail_data = 7; + if (this->has_trail_data()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 7, _Internal::trail_data(this), target, stream); } - // float y = 2; - if (!(this->y() <= 0 && this->y() >= 0)) { - total_size += 1 + 4; + // float animation_speed = 8; + if (!(this->animation_speed() <= 0 && this->animation_speed() >= 0)) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(8, this->_internal_animation_speed(), target); } - // float z = 3; - if (!(this->z() <= 0 && this->z() >= 0)) { - total_size += 1 + 4; + // .CullChirality cull_chirality = 9; + if (this->cull_chirality() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 9, this->_internal_cull_chirality(), target); } - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( - _internal_metadata_, total_size, &_cached_size_); + // fixed32 achievement_bit = 16; + if (this->achievement_bit() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFixed32ToArray(16, this->_internal_achievement_bit(), target); } - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} -void Icon_euler_rotation::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:Proto_Node.Icon.euler_rotation) - GOOGLE_DCHECK_NE(&from, this); - const Icon_euler_rotation* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:Proto_Node.Icon.euler_rotation) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:Proto_Node.Icon.euler_rotation) - MergeFrom(*source); + // int32 achievement_id = 17; + if (this->achievement_id() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(17, this->_internal_achievement_id(), target); } -} -void Icon_euler_rotation::MergeFrom(const Icon_euler_rotation& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:Proto_Node.Icon.euler_rotation) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; + // float alpha = 18; + if (!(this->alpha() <= 0 && this->alpha() >= 0)) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(18, this->_internal_alpha(), target); + } - if (!(from.x() <= 0 && from.x() >= 0)) { - _internal_set_x(from._internal_x()); + // bool can_fade = 19; + if (this->can_fade() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(19, this->_internal_can_fade(), target); } - if (!(from.y() <= 0 && from.y() >= 0)) { - _internal_set_y(from._internal_y()); + + // bool is_wall = 22; + if (this->is_wall() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(22, this->_internal_is_wall(), target); } - if (!(from.z() <= 0 && from.z() >= 0)) { - _internal_set_z(from._internal_z()); + + // string bhdraft__schedule = 23; + if (this->bhdraft__schedule().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_bhdraft__schedule().data(), static_cast(this->_internal_bhdraft__schedule().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "RICHARDS.bhdraft__schedule"); + target = stream->WriteStringMaybeAliased( + 23, this->_internal_bhdraft__schedule(), target); } -} -void Icon_euler_rotation::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:Proto_Node.Icon.euler_rotation) - if (&from == this) return; - Clear(); - MergeFrom(from); -} + // float bhdraft__schedule_duration = 24; + if (!(this->bhdraft__schedule_duration() <= 0 && this->bhdraft__schedule_duration() >= 0)) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(24, this->_internal_bhdraft__schedule_duration(), target); + } -void Icon_euler_rotation::CopyFrom(const Icon_euler_rotation& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Proto_Node.Icon.euler_rotation) - if (&from == this) return; - Clear(); - MergeFrom(from); -} + // float scale = 25; + if (!(this->scale() <= 0 && this->scale() >= 0)) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(25, this->_internal_scale(), target); + } -bool Icon_euler_rotation::IsInitialized() const { - return true; -} + // .Color color = 26; + if (this->has_color()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 26, _Internal::color(this), target, stream); + } -void Icon_euler_rotation::InternalSwap(Icon_euler_rotation* other) { + // .FestivalFilter festival_filter = 27; + if (this->has_festival_filter()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 27, _Internal::festival_filter(this), target, stream); + } + + // .MapTypeFilter map_type_filter = 28; + if (this->has_map_type_filter()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 28, _Internal::map_type_filter(this), target, stream); + } + + // .MountFilter mount_filter = 29; + if (this->has_mount_filter()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 29, _Internal::mount_filter(this), target, stream); + } + + // .ProfessionFilter profession_filter = 30; + if (this->has_profession_filter()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 30, _Internal::profession_filter(this), target, stream); + } + + // .SpecializationFilter specialization_filter = 31; + if (this->has_specialization_filter()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 31, _Internal::specialization_filter(this), target, stream); + } + + // .SpeciesFilter species_filter = 32; + if (this->has_species_filter()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 32, _Internal::species_filter(this), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:RICHARDS) + return target; +} + +size_t RICHARDS::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:RICHARDS) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string bhdraft__schedule = 23; + if (this->bhdraft__schedule().size() > 0) { + total_size += 2 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_bhdraft__schedule()); + } + + // .Category category = 1; + if (this->has_category()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *category_); + } + + // .Texture texture = 2; + if (this->has_texture()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *texture_); + } + + // .GUID guid = 3; + if (this->has_guid()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *guid_); + } + + // .TrailData trail_data = 7; + if (this->has_trail_data()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *trail_data_); + } + + // .Color color = 26; + if (this->has_color()) { + total_size += 2 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *color_); + } + + // .FestivalFilter festival_filter = 27; + if (this->has_festival_filter()) { + total_size += 2 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *festival_filter_); + } + + // .MapTypeFilter map_type_filter = 28; + if (this->has_map_type_filter()) { + total_size += 2 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *map_type_filter_); + } + + // .MountFilter mount_filter = 29; + if (this->has_mount_filter()) { + total_size += 2 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *mount_filter_); + } + + // .ProfessionFilter profession_filter = 30; + if (this->has_profession_filter()) { + total_size += 2 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *profession_filter_); + } + + // .SpecializationFilter specialization_filter = 31; + if (this->has_specialization_filter()) { + total_size += 2 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *specialization_filter_); + } + + // .SpeciesFilter species_filter = 32; + if (this->has_species_filter()) { + total_size += 2 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *species_filter_); + } + + // int32 map_id = 4; + if (this->map_id() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + this->_internal_map_id()); + } + + // float distance_fade_end = 5; + if (!(this->distance_fade_end() <= 0 && this->distance_fade_end() >= 0)) { + total_size += 1 + 4; + } + + // float distance_fade_start = 6; + if (!(this->distance_fade_start() <= 0 && this->distance_fade_start() >= 0)) { + total_size += 1 + 4; + } + + // float animation_speed = 8; + if (!(this->animation_speed() <= 0 && this->animation_speed() >= 0)) { + total_size += 1 + 4; + } + + // .CullChirality cull_chirality = 9; + if (this->cull_chirality() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_cull_chirality()); + } + + // fixed32 achievement_bit = 16; + if (this->achievement_bit() != 0) { + total_size += 2 + 4; + } + + // int32 achievement_id = 17; + if (this->achievement_id() != 0) { + total_size += 2 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + this->_internal_achievement_id()); + } + + // float alpha = 18; + if (!(this->alpha() <= 0 && this->alpha() >= 0)) { + total_size += 2 + 4; + } + + // bool can_fade = 19; + if (this->can_fade() != 0) { + total_size += 2 + 1; + } + + // bool is_wall = 22; + if (this->is_wall() != 0) { + total_size += 2 + 1; + } + + // float bhdraft__schedule_duration = 24; + if (!(this->bhdraft__schedule_duration() <= 0 && this->bhdraft__schedule_duration() >= 0)) { + total_size += 2 + 4; + } + + // float scale = 25; + if (!(this->scale() <= 0 && this->scale() >= 0)) { + total_size += 2 + 4; + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void RICHARDS::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:RICHARDS) + GOOGLE_DCHECK_NE(&from, this); + const RICHARDS* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:RICHARDS) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:RICHARDS) + MergeFrom(*source); + } +} + +void RICHARDS::MergeFrom(const RICHARDS& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:RICHARDS) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.bhdraft__schedule().size() > 0) { + _internal_set_bhdraft__schedule(from._internal_bhdraft__schedule()); + } + if (from.has_category()) { + _internal_mutable_category()->::Category::MergeFrom(from._internal_category()); + } + if (from.has_texture()) { + _internal_mutable_texture()->::Texture::MergeFrom(from._internal_texture()); + } + if (from.has_guid()) { + _internal_mutable_guid()->::GUID::MergeFrom(from._internal_guid()); + } + if (from.has_trail_data()) { + _internal_mutable_trail_data()->::TrailData::MergeFrom(from._internal_trail_data()); + } + if (from.has_color()) { + _internal_mutable_color()->::Color::MergeFrom(from._internal_color()); + } + if (from.has_festival_filter()) { + _internal_mutable_festival_filter()->::FestivalFilter::MergeFrom(from._internal_festival_filter()); + } + if (from.has_map_type_filter()) { + _internal_mutable_map_type_filter()->::MapTypeFilter::MergeFrom(from._internal_map_type_filter()); + } + if (from.has_mount_filter()) { + _internal_mutable_mount_filter()->::MountFilter::MergeFrom(from._internal_mount_filter()); + } + if (from.has_profession_filter()) { + _internal_mutable_profession_filter()->::ProfessionFilter::MergeFrom(from._internal_profession_filter()); + } + if (from.has_specialization_filter()) { + _internal_mutable_specialization_filter()->::SpecializationFilter::MergeFrom(from._internal_specialization_filter()); + } + if (from.has_species_filter()) { + _internal_mutable_species_filter()->::SpeciesFilter::MergeFrom(from._internal_species_filter()); + } + if (from.map_id() != 0) { + _internal_set_map_id(from._internal_map_id()); + } + if (!(from.distance_fade_end() <= 0 && from.distance_fade_end() >= 0)) { + _internal_set_distance_fade_end(from._internal_distance_fade_end()); + } + if (!(from.distance_fade_start() <= 0 && from.distance_fade_start() >= 0)) { + _internal_set_distance_fade_start(from._internal_distance_fade_start()); + } + if (!(from.animation_speed() <= 0 && from.animation_speed() >= 0)) { + _internal_set_animation_speed(from._internal_animation_speed()); + } + if (from.cull_chirality() != 0) { + _internal_set_cull_chirality(from._internal_cull_chirality()); + } + if (from.achievement_bit() != 0) { + _internal_set_achievement_bit(from._internal_achievement_bit()); + } + if (from.achievement_id() != 0) { + _internal_set_achievement_id(from._internal_achievement_id()); + } + if (!(from.alpha() <= 0 && from.alpha() >= 0)) { + _internal_set_alpha(from._internal_alpha()); + } + if (from.can_fade() != 0) { + _internal_set_can_fade(from._internal_can_fade()); + } + if (from.is_wall() != 0) { + _internal_set_is_wall(from._internal_is_wall()); + } + if (!(from.bhdraft__schedule_duration() <= 0 && from.bhdraft__schedule_duration() >= 0)) { + _internal_set_bhdraft__schedule_duration(from._internal_bhdraft__schedule_duration()); + } + if (!(from.scale() <= 0 && from.scale() >= 0)) { + _internal_set_scale(from._internal_scale()); + } +} + +void RICHARDS::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:RICHARDS) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void RICHARDS::CopyFrom(const RICHARDS& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:RICHARDS) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool RICHARDS::IsInitialized() const { + return true; +} + +void RICHARDS::InternalSwap(RICHARDS* other) { using std::swap; _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + bhdraft__schedule_.Swap(&other->bhdraft__schedule_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(Icon_euler_rotation, z_) - + sizeof(Icon_euler_rotation::z_) - - PROTOBUF_FIELD_OFFSET(Icon_euler_rotation, x_)>( - reinterpret_cast(&x_), - reinterpret_cast(&other->x_)); + PROTOBUF_FIELD_OFFSET(RICHARDS, scale_) + + sizeof(RICHARDS::scale_) + - PROTOBUF_FIELD_OFFSET(RICHARDS, category_)>( + reinterpret_cast(&category_), + reinterpret_cast(&other->category_)); } -::PROTOBUF_NAMESPACE_ID::Metadata Icon_euler_rotation::GetMetadata() const { +::PROTOBUF_NAMESPACE_ID::Metadata RICHARDS::GetMetadata() const { return GetMetadataStatic(); } // =================================================================== -void Icon_trigger_guid::InitAsDefaultInstance() { +void Texture::InitAsDefaultInstance() { } -class Icon_trigger_guid::_Internal { +class Texture::_Internal { public: }; -Icon_trigger_guid::Icon_trigger_guid(::PROTOBUF_NAMESPACE_ID::Arena* arena) +Texture::Texture(::PROTOBUF_NAMESPACE_ID::Arena* arena) : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:Proto_Node.Icon.trigger.guid) + // @@protoc_insertion_point(arena_constructor:Texture) } -Icon_trigger_guid::Icon_trigger_guid(const Icon_trigger_guid& from) +Texture::Texture(const Texture& from) : ::PROTOBUF_NAMESPACE_ID::Message() { _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - guid_ = from.guid_; - // @@protoc_insertion_point(copy_constructor:Proto_Node.Icon.trigger.guid) + path_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_path().empty()) { + path_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_path(), + GetArena()); + } + // @@protoc_insertion_point(copy_constructor:Texture) } -void Icon_trigger_guid::SharedCtor() { - guid_ = 0; +void Texture::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Texture_generators_2fproto_5ftemplates_2fnode_2eproto.base); + path_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -Icon_trigger_guid::~Icon_trigger_guid() { - // @@protoc_insertion_point(destructor:Proto_Node.Icon.trigger.guid) +Texture::~Texture() { + // @@protoc_insertion_point(destructor:Texture) SharedDtor(); _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -void Icon_trigger_guid::SharedDtor() { +void Texture::SharedDtor() { GOOGLE_DCHECK(GetArena() == nullptr); + path_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -void Icon_trigger_guid::ArenaDtor(void* object) { - Icon_trigger_guid* _this = reinterpret_cast< Icon_trigger_guid* >(object); +void Texture::ArenaDtor(void* object) { + Texture* _this = reinterpret_cast< Texture* >(object); (void)_this; } -void Icon_trigger_guid::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +void Texture::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } -void Icon_trigger_guid::SetCachedSize(int size) const { +void Texture::SetCachedSize(int size) const { _cached_size_.Set(size); } -const Icon_trigger_guid& Icon_trigger_guid::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Icon_trigger_guid_node_2eproto.base); +const Texture& Texture::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Texture_generators_2fproto_5ftemplates_2fnode_2eproto.base); return *internal_default_instance(); } -void Icon_trigger_guid::Clear() { -// @@protoc_insertion_point(message_clear_start:Proto_Node.Icon.trigger.guid) +void Texture::Clear() { +// @@protoc_insertion_point(message_clear_start:Texture) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - guid_ = 0; + path_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -const char* Icon_trigger_guid::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +const char* Texture::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { @@ -2180,11 +3244,13 @@ const char* Icon_trigger_guid::_InternalParse(const char* ptr, ::PROTOBUF_NAMESP ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); CHK_(ptr); switch (tag >> 3) { - // int32 guid = 1; + // string path = 1; case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - guid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_path(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "Texture.path")); + CHK_(ptr); } else goto handle_unusual; continue; default: { @@ -2209,39 +3275,43 @@ const char* Icon_trigger_guid::_InternalParse(const char* ptr, ::PROTOBUF_NAMESP #undef CHK_ } -::PROTOBUF_NAMESPACE_ID::uint8* Icon_trigger_guid::_InternalSerialize( +::PROTOBUF_NAMESPACE_ID::uint8* Texture::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Proto_Node.Icon.trigger.guid) + // @@protoc_insertion_point(serialize_to_array_start:Texture) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - // int32 guid = 1; - if (this->guid() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_guid(), target); + // string path = 1; + if (this->path().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_path().data(), static_cast(this->_internal_path().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "Texture.path"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_path(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } - // @@protoc_insertion_point(serialize_to_array_end:Proto_Node.Icon.trigger.guid) + // @@protoc_insertion_point(serialize_to_array_end:Texture) return target; } -size_t Icon_trigger_guid::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Proto_Node.Icon.trigger.guid) +size_t Texture::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:Texture) size_t total_size = 0; ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // int32 guid = 1; - if (this->guid() != 0) { + // string path = 1; + if (this->path().size() > 0) { total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( - this->_internal_guid()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_path()); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { @@ -2253,205 +3323,129 @@ size_t Icon_trigger_guid::ByteSizeLong() const { return total_size; } -void Icon_trigger_guid::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:Proto_Node.Icon.trigger.guid) +void Texture::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:Texture) GOOGLE_DCHECK_NE(&from, this); - const Icon_trigger_guid* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + const Texture* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:Proto_Node.Icon.trigger.guid) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:Texture) ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:Proto_Node.Icon.trigger.guid) + // @@protoc_insertion_point(generalized_merge_from_cast_success:Texture) MergeFrom(*source); } } -void Icon_trigger_guid::MergeFrom(const Icon_trigger_guid& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:Proto_Node.Icon.trigger.guid) +void Texture::MergeFrom(const Texture& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:Texture) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - if (from.guid() != 0) { - _internal_set_guid(from._internal_guid()); + if (from.path().size() > 0) { + _internal_set_path(from._internal_path()); } } -void Icon_trigger_guid::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:Proto_Node.Icon.trigger.guid) +void Texture::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:Texture) if (&from == this) return; Clear(); MergeFrom(from); } -void Icon_trigger_guid::CopyFrom(const Icon_trigger_guid& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Proto_Node.Icon.trigger.guid) +void Texture::CopyFrom(const Texture& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:Texture) if (&from == this) return; Clear(); MergeFrom(from); } -bool Icon_trigger_guid::IsInitialized() const { +bool Texture::IsInitialized() const { return true; } -void Icon_trigger_guid::InternalSwap(Icon_trigger_guid* other) { +void Texture::InternalSwap(Texture* other) { using std::swap; _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - swap(guid_, other->guid_); + path_.Swap(&other->path_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } -::PROTOBUF_NAMESPACE_ID::Metadata Icon_trigger_guid::GetMetadata() const { +::PROTOBUF_NAMESPACE_ID::Metadata Texture::GetMetadata() const { return GetMetadataStatic(); } // =================================================================== -void Icon_trigger::InitAsDefaultInstance() { - ::Proto_Node::_Icon_trigger_default_instance_._instance.get_mutable()->action_hide_category_ = const_cast< ::Proto_Node::Category*>( - ::Proto_Node::Category::internal_default_instance()); - ::Proto_Node::_Icon_trigger_default_instance_._instance.get_mutable()->action_show_category_ = const_cast< ::Proto_Node::Category*>( - ::Proto_Node::Category::internal_default_instance()); - ::Proto_Node::_Icon_trigger_default_instance_._instance.get_mutable()->action_toggle_category_ = const_cast< ::Proto_Node::Category*>( - ::Proto_Node::Category::internal_default_instance()); +void Position::InitAsDefaultInstance() { } -class Icon_trigger::_Internal { +class Position::_Internal { public: - static const ::Proto_Node::Category& action_hide_category(const Icon_trigger* msg); - static const ::Proto_Node::Category& action_show_category(const Icon_trigger* msg); - static const ::Proto_Node::Category& action_toggle_category(const Icon_trigger* msg); }; -const ::Proto_Node::Category& -Icon_trigger::_Internal::action_hide_category(const Icon_trigger* msg) { - return *msg->action_hide_category_; -} -const ::Proto_Node::Category& -Icon_trigger::_Internal::action_show_category(const Icon_trigger* msg) { - return *msg->action_show_category_; -} -const ::Proto_Node::Category& -Icon_trigger::_Internal::action_toggle_category(const Icon_trigger* msg) { - return *msg->action_toggle_category_; -} -Icon_trigger::Icon_trigger(::PROTOBUF_NAMESPACE_ID::Arena* arena) +Position::Position(::PROTOBUF_NAMESPACE_ID::Arena* arena) : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:Proto_Node.Icon.trigger) + // @@protoc_insertion_point(arena_constructor:Position) } -Icon_trigger::Icon_trigger(const Icon_trigger& from) +Position::Position(const Position& from) : ::PROTOBUF_NAMESPACE_ID::Message() { _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - action_copy_clipboard_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_action_copy_clipboard().empty()) { - action_copy_clipboard_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_action_copy_clipboard(), - GetArena()); - } - action_copy_message_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_action_copy_message().empty()) { - action_copy_message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_action_copy_message(), - GetArena()); - } - action_info_message_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_action_info_message().empty()) { - action_info_message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_action_info_message(), - GetArena()); - } - if (from._internal_has_action_hide_category()) { - action_hide_category_ = new ::Proto_Node::Category(*from.action_hide_category_); - } else { - action_hide_category_ = nullptr; - } - if (from._internal_has_action_show_category()) { - action_show_category_ = new ::Proto_Node::Category(*from.action_show_category_); - } else { - action_show_category_ = nullptr; - } - if (from._internal_has_action_toggle_category()) { - action_toggle_category_ = new ::Proto_Node::Category(*from.action_toggle_category_); - } else { - action_toggle_category_ = nullptr; - } - ::memcpy(&bounce_delay_, &from.bounce_delay_, - static_cast(reinterpret_cast(&range_) - - reinterpret_cast(&bounce_delay_)) + sizeof(range_)); - // @@protoc_insertion_point(copy_constructor:Proto_Node.Icon.trigger) + ::memcpy(&x_, &from.x_, + static_cast(reinterpret_cast(&z_) - + reinterpret_cast(&x_)) + sizeof(z_)); + // @@protoc_insertion_point(copy_constructor:Position) } -void Icon_trigger::SharedCtor() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Icon_trigger_node_2eproto.base); - action_copy_clipboard_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - action_copy_message_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - action_info_message_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - ::memset(&action_hide_category_, 0, static_cast( - reinterpret_cast(&range_) - - reinterpret_cast(&action_hide_category_)) + sizeof(range_)); +void Position::SharedCtor() { + ::memset(&x_, 0, static_cast( + reinterpret_cast(&z_) - + reinterpret_cast(&x_)) + sizeof(z_)); } -Icon_trigger::~Icon_trigger() { - // @@protoc_insertion_point(destructor:Proto_Node.Icon.trigger) +Position::~Position() { + // @@protoc_insertion_point(destructor:Position) SharedDtor(); _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -void Icon_trigger::SharedDtor() { +void Position::SharedDtor() { GOOGLE_DCHECK(GetArena() == nullptr); - action_copy_clipboard_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - action_copy_message_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - action_info_message_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (this != internal_default_instance()) delete action_hide_category_; - if (this != internal_default_instance()) delete action_show_category_; - if (this != internal_default_instance()) delete action_toggle_category_; } -void Icon_trigger::ArenaDtor(void* object) { - Icon_trigger* _this = reinterpret_cast< Icon_trigger* >(object); +void Position::ArenaDtor(void* object) { + Position* _this = reinterpret_cast< Position* >(object); (void)_this; } -void Icon_trigger::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +void Position::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } -void Icon_trigger::SetCachedSize(int size) const { +void Position::SetCachedSize(int size) const { _cached_size_.Set(size); } -const Icon_trigger& Icon_trigger::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Icon_trigger_node_2eproto.base); +const Position& Position::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Position_generators_2fproto_5ftemplates_2fnode_2eproto.base); return *internal_default_instance(); } -void Icon_trigger::Clear() { -// @@protoc_insertion_point(message_clear_start:Proto_Node.Icon.trigger) +void Position::Clear() { +// @@protoc_insertion_point(message_clear_start:Position) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - action_copy_clipboard_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - action_copy_message_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - action_info_message_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - if (GetArena() == nullptr && action_hide_category_ != nullptr) { - delete action_hide_category_; - } - action_hide_category_ = nullptr; - if (GetArena() == nullptr && action_show_category_ != nullptr) { - delete action_show_category_; - } - action_show_category_ = nullptr; - if (GetArena() == nullptr && action_toggle_category_ != nullptr) { - delete action_toggle_category_; - } - action_toggle_category_ = nullptr; - ::memset(&bounce_delay_, 0, static_cast( - reinterpret_cast(&range_) - - reinterpret_cast(&bounce_delay_)) + sizeof(range_)); + ::memset(&x_, 0, static_cast( + reinterpret_cast(&z_) - + reinterpret_cast(&x_)) + sizeof(z_)); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -const char* Icon_trigger::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +const char* Position::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { @@ -2459,110 +3453,27 @@ const char* Icon_trigger::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_I ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); CHK_(ptr); switch (tag >> 3) { - // bool auto_trigger = 1; + // float x = 1; case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - auto_trigger_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 13)) { + x_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); } else goto handle_unusual; continue; - // float bounce_delay = 2; + // float y = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 21)) { - bounce_delay_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + y_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); ptr += sizeof(float); } else goto handle_unusual; continue; - // float bounce_duration = 3; + // float z = 3; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 29)) { - bounce_duration_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - // float bounce_height = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 37)) { - bounce_height_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - // string action_copy_clipboard = 5; - case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) { - auto str = _internal_mutable_action_copy_clipboard(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "Proto_Node.Icon.trigger.action_copy_clipboard")); - CHK_(ptr); - } else goto handle_unusual; - continue; - // string action_copy_message = 6; - case 6: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) { - auto str = _internal_mutable_action_copy_message(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "Proto_Node.Icon.trigger.action_copy_message")); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool has_countdown = 7; - case 7: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) { - has_countdown_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // string action_info_message = 8; - case 8: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 66)) { - auto str = _internal_mutable_action_info_message(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "Proto_Node.Icon.trigger.action_info_message")); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool invert_display = 9; - case 9: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 72)) { - invert_display_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // float reset_length = 10; - case 10: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 85)) { - reset_length_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - // float range = 11; - case 11: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 93)) { - range_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + z_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); ptr += sizeof(float); } else goto handle_unusual; continue; - // .Proto_Node.Category action_hide_category = 12; - case 12: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 98)) { - ptr = ctx->ParseMessage(_internal_mutable_action_hide_category(), ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // .Proto_Node.Category action_show_category = 13; - case 13: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 106)) { - ptr = ctx->ParseMessage(_internal_mutable_action_show_category(), ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // .Proto_Node.Category action_toggle_category = 14; - case 14: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 114)) { - ptr = ctx->ParseMessage(_internal_mutable_action_toggle_category(), ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { @@ -2585,209 +3496,58 @@ const char* Icon_trigger::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_I #undef CHK_ } -::PROTOBUF_NAMESPACE_ID::uint8* Icon_trigger::_InternalSerialize( +::PROTOBUF_NAMESPACE_ID::uint8* Position::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Proto_Node.Icon.trigger) + // @@protoc_insertion_point(serialize_to_array_start:Position) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - // bool auto_trigger = 1; - if (this->auto_trigger() != 0) { + // float x = 1; + if (!(this->x() <= 0 && this->x() >= 0)) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->_internal_auto_trigger(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(1, this->_internal_x(), target); } - // float bounce_delay = 2; - if (!(this->bounce_delay() <= 0 && this->bounce_delay() >= 0)) { + // float y = 2; + if (!(this->y() <= 0 && this->y() >= 0)) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2, this->_internal_bounce_delay(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2, this->_internal_y(), target); } - // float bounce_duration = 3; - if (!(this->bounce_duration() <= 0 && this->bounce_duration() >= 0)) { + // float z = 3; + if (!(this->z() <= 0 && this->z() >= 0)) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(3, this->_internal_bounce_duration(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(3, this->_internal_z(), target); } - // float bounce_height = 4; - if (!(this->bounce_height() <= 0 && this->bounce_height() >= 0)) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(4, this->_internal_bounce_height(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } + // @@protoc_insertion_point(serialize_to_array_end:Position) + return target; +} - // string action_copy_clipboard = 5; - if (this->action_copy_clipboard().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_action_copy_clipboard().data(), static_cast(this->_internal_action_copy_clipboard().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "Proto_Node.Icon.trigger.action_copy_clipboard"); - target = stream->WriteStringMaybeAliased( - 5, this->_internal_action_copy_clipboard(), target); - } +size_t Position::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:Position) + size_t total_size = 0; - // string action_copy_message = 6; - if (this->action_copy_message().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_action_copy_message().data(), static_cast(this->_internal_action_copy_message().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "Proto_Node.Icon.trigger.action_copy_message"); - target = stream->WriteStringMaybeAliased( - 6, this->_internal_action_copy_message(), target); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // float x = 1; + if (!(this->x() <= 0 && this->x() >= 0)) { + total_size += 1 + 4; } - // bool has_countdown = 7; - if (this->has_countdown() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(7, this->_internal_has_countdown(), target); + // float y = 2; + if (!(this->y() <= 0 && this->y() >= 0)) { + total_size += 1 + 4; } - // string action_info_message = 8; - if (this->action_info_message().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_action_info_message().data(), static_cast(this->_internal_action_info_message().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "Proto_Node.Icon.trigger.action_info_message"); - target = stream->WriteStringMaybeAliased( - 8, this->_internal_action_info_message(), target); - } - - // bool invert_display = 9; - if (this->invert_display() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(9, this->_internal_invert_display(), target); - } - - // float reset_length = 10; - if (!(this->reset_length() <= 0 && this->reset_length() >= 0)) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(10, this->_internal_reset_length(), target); - } - - // float range = 11; - if (!(this->range() <= 0 && this->range() >= 0)) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(11, this->_internal_range(), target); - } - - // .Proto_Node.Category action_hide_category = 12; - if (this->has_action_hide_category()) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage( - 12, _Internal::action_hide_category(this), target, stream); - } - - // .Proto_Node.Category action_show_category = 13; - if (this->has_action_show_category()) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage( - 13, _Internal::action_show_category(this), target, stream); - } - - // .Proto_Node.Category action_toggle_category = 14; - if (this->has_action_toggle_category()) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage( - 14, _Internal::action_toggle_category(this), target, stream); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:Proto_Node.Icon.trigger) - return target; -} - -size_t Icon_trigger::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Proto_Node.Icon.trigger) - size_t total_size = 0; - - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // string action_copy_clipboard = 5; - if (this->action_copy_clipboard().size() > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_action_copy_clipboard()); - } - - // string action_copy_message = 6; - if (this->action_copy_message().size() > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_action_copy_message()); - } - - // string action_info_message = 8; - if (this->action_info_message().size() > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_action_info_message()); - } - - // .Proto_Node.Category action_hide_category = 12; - if (this->has_action_hide_category()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *action_hide_category_); - } - - // .Proto_Node.Category action_show_category = 13; - if (this->has_action_show_category()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *action_show_category_); - } - - // .Proto_Node.Category action_toggle_category = 14; - if (this->has_action_toggle_category()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *action_toggle_category_); - } - - // float bounce_delay = 2; - if (!(this->bounce_delay() <= 0 && this->bounce_delay() >= 0)) { - total_size += 1 + 4; - } - - // float bounce_duration = 3; - if (!(this->bounce_duration() <= 0 && this->bounce_duration() >= 0)) { - total_size += 1 + 4; - } - - // float bounce_height = 4; - if (!(this->bounce_height() <= 0 && this->bounce_height() >= 0)) { - total_size += 1 + 4; - } - - // bool auto_trigger = 1; - if (this->auto_trigger() != 0) { - total_size += 1 + 1; - } - - // bool has_countdown = 7; - if (this->has_countdown() != 0) { - total_size += 1 + 1; - } - - // bool invert_display = 9; - if (this->invert_display() != 0) { - total_size += 1 + 1; - } - - // float reset_length = 10; - if (!(this->reset_length() <= 0 && this->reset_length() >= 0)) { - total_size += 1 + 4; - } - - // float range = 11; - if (!(this->range() <= 0 && this->range() >= 0)) { + // float z = 3; + if (!(this->z() <= 0 && this->z() >= 0)) { total_size += 1 + 4; } @@ -2800,201 +3560,140 @@ size_t Icon_trigger::ByteSizeLong() const { return total_size; } -void Icon_trigger::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:Proto_Node.Icon.trigger) +void Position::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:Position) GOOGLE_DCHECK_NE(&from, this); - const Icon_trigger* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + const Position* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:Proto_Node.Icon.trigger) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:Position) ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:Proto_Node.Icon.trigger) + // @@protoc_insertion_point(generalized_merge_from_cast_success:Position) MergeFrom(*source); } } -void Icon_trigger::MergeFrom(const Icon_trigger& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:Proto_Node.Icon.trigger) +void Position::MergeFrom(const Position& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:Position) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - if (from.action_copy_clipboard().size() > 0) { - _internal_set_action_copy_clipboard(from._internal_action_copy_clipboard()); - } - if (from.action_copy_message().size() > 0) { - _internal_set_action_copy_message(from._internal_action_copy_message()); - } - if (from.action_info_message().size() > 0) { - _internal_set_action_info_message(from._internal_action_info_message()); - } - if (from.has_action_hide_category()) { - _internal_mutable_action_hide_category()->::Proto_Node::Category::MergeFrom(from._internal_action_hide_category()); - } - if (from.has_action_show_category()) { - _internal_mutable_action_show_category()->::Proto_Node::Category::MergeFrom(from._internal_action_show_category()); - } - if (from.has_action_toggle_category()) { - _internal_mutable_action_toggle_category()->::Proto_Node::Category::MergeFrom(from._internal_action_toggle_category()); - } - if (!(from.bounce_delay() <= 0 && from.bounce_delay() >= 0)) { - _internal_set_bounce_delay(from._internal_bounce_delay()); - } - if (!(from.bounce_duration() <= 0 && from.bounce_duration() >= 0)) { - _internal_set_bounce_duration(from._internal_bounce_duration()); - } - if (!(from.bounce_height() <= 0 && from.bounce_height() >= 0)) { - _internal_set_bounce_height(from._internal_bounce_height()); - } - if (from.auto_trigger() != 0) { - _internal_set_auto_trigger(from._internal_auto_trigger()); - } - if (from.has_countdown() != 0) { - _internal_set_has_countdown(from._internal_has_countdown()); - } - if (from.invert_display() != 0) { - _internal_set_invert_display(from._internal_invert_display()); + if (!(from.x() <= 0 && from.x() >= 0)) { + _internal_set_x(from._internal_x()); } - if (!(from.reset_length() <= 0 && from.reset_length() >= 0)) { - _internal_set_reset_length(from._internal_reset_length()); + if (!(from.y() <= 0 && from.y() >= 0)) { + _internal_set_y(from._internal_y()); } - if (!(from.range() <= 0 && from.range() >= 0)) { - _internal_set_range(from._internal_range()); + if (!(from.z() <= 0 && from.z() >= 0)) { + _internal_set_z(from._internal_z()); } } -void Icon_trigger::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:Proto_Node.Icon.trigger) +void Position::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:Position) if (&from == this) return; Clear(); MergeFrom(from); } -void Icon_trigger::CopyFrom(const Icon_trigger& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Proto_Node.Icon.trigger) +void Position::CopyFrom(const Position& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:Position) if (&from == this) return; Clear(); MergeFrom(from); } -bool Icon_trigger::IsInitialized() const { +bool Position::IsInitialized() const { return true; } -void Icon_trigger::InternalSwap(Icon_trigger* other) { +void Position::InternalSwap(Position* other) { using std::swap; _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - action_copy_clipboard_.Swap(&other->action_copy_clipboard_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - action_copy_message_.Swap(&other->action_copy_message_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - action_info_message_.Swap(&other->action_info_message_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(Icon_trigger, range_) - + sizeof(Icon_trigger::range_) - - PROTOBUF_FIELD_OFFSET(Icon_trigger, action_hide_category_)>( - reinterpret_cast(&action_hide_category_), - reinterpret_cast(&other->action_hide_category_)); + PROTOBUF_FIELD_OFFSET(Position, z_) + + sizeof(Position::z_) + - PROTOBUF_FIELD_OFFSET(Position, x_)>( + reinterpret_cast(&x_), + reinterpret_cast(&other->x_)); } -::PROTOBUF_NAMESPACE_ID::Metadata Icon_trigger::GetMetadata() const { +::PROTOBUF_NAMESPACE_ID::Metadata Position::GetMetadata() const { return GetMetadataStatic(); } // =================================================================== -void Icon::InitAsDefaultInstance() { +void EulerRotation::InitAsDefaultInstance() { } -class Icon::_Internal { +class EulerRotation::_Internal { public: }; -Icon::Icon(::PROTOBUF_NAMESPACE_ID::Arena* arena) +EulerRotation::EulerRotation(::PROTOBUF_NAMESPACE_ID::Arena* arena) : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:Proto_Node.Icon) + // @@protoc_insertion_point(arena_constructor:EulerRotation) } -Icon::Icon(const Icon& from) +EulerRotation::EulerRotation(const EulerRotation& from) : ::PROTOBUF_NAMESPACE_ID::Message() { _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - bhdraft__schedule_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_bhdraft__schedule().empty()) { - bhdraft__schedule_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_bhdraft__schedule(), - GetArena()); - } - tip_description_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_tip_description().empty()) { - tip_description_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_tip_description(), - GetArena()); - } - tip_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_tip_name().empty()) { - tip_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_tip_name(), - GetArena()); - } - ::memcpy(&achievement_bit_, &from.achievement_bit_, - static_cast(reinterpret_cast(&bhdraft__schedule_duration_) - - reinterpret_cast(&achievement_bit_)) + sizeof(bhdraft__schedule_duration_)); - // @@protoc_insertion_point(copy_constructor:Proto_Node.Icon) + ::memcpy(&x_, &from.x_, + static_cast(reinterpret_cast(&z_) - + reinterpret_cast(&x_)) + sizeof(z_)); + // @@protoc_insertion_point(copy_constructor:EulerRotation) } -void Icon::SharedCtor() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Icon_node_2eproto.base); - bhdraft__schedule_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - tip_description_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - tip_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - ::memset(&achievement_bit_, 0, static_cast( - reinterpret_cast(&bhdraft__schedule_duration_) - - reinterpret_cast(&achievement_bit_)) + sizeof(bhdraft__schedule_duration_)); +void EulerRotation::SharedCtor() { + ::memset(&x_, 0, static_cast( + reinterpret_cast(&z_) - + reinterpret_cast(&x_)) + sizeof(z_)); } -Icon::~Icon() { - // @@protoc_insertion_point(destructor:Proto_Node.Icon) +EulerRotation::~EulerRotation() { + // @@protoc_insertion_point(destructor:EulerRotation) SharedDtor(); _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -void Icon::SharedDtor() { +void EulerRotation::SharedDtor() { GOOGLE_DCHECK(GetArena() == nullptr); - bhdraft__schedule_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - tip_description_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - tip_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -void Icon::ArenaDtor(void* object) { - Icon* _this = reinterpret_cast< Icon* >(object); +void EulerRotation::ArenaDtor(void* object) { + EulerRotation* _this = reinterpret_cast< EulerRotation* >(object); (void)_this; } -void Icon::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +void EulerRotation::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } -void Icon::SetCachedSize(int size) const { +void EulerRotation::SetCachedSize(int size) const { _cached_size_.Set(size); } -const Icon& Icon::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Icon_node_2eproto.base); +const EulerRotation& EulerRotation::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_EulerRotation_generators_2fproto_5ftemplates_2fnode_2eproto.base); return *internal_default_instance(); } -void Icon::Clear() { -// @@protoc_insertion_point(message_clear_start:Proto_Node.Icon) +void EulerRotation::Clear() { +// @@protoc_insertion_point(message_clear_start:EulerRotation) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - bhdraft__schedule_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - tip_description_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - tip_name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - ::memset(&achievement_bit_, 0, static_cast( - reinterpret_cast(&bhdraft__schedule_duration_) - - reinterpret_cast(&achievement_bit_)) + sizeof(bhdraft__schedule_duration_)); + ::memset(&x_, 0, static_cast( + reinterpret_cast(&z_) - + reinterpret_cast(&x_)) + sizeof(z_)); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -const char* Icon::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +const char* EulerRotation::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { @@ -3002,152 +3701,27 @@ const char* Icon::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inter ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); CHK_(ptr); switch (tag >> 3) { - // fixed32 achievement_bit = 1; + // float x = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 13)) { - achievement_bit_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint32>(ptr); - ptr += sizeof(::PROTOBUF_NAMESPACE_ID::uint32); + x_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); } else goto handle_unusual; continue; - // int32 achievement_id = 2; + // float y = 2; case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { - achievement_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 21)) { + y_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); } else goto handle_unusual; continue; - // float alpha = 3; + // float z = 3; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 29)) { - alpha_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + z_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); ptr += sizeof(float); } else goto handle_unusual; continue; - // bool can_fade = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { - can_fade_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // float distance_fade_end = 5; - case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 45)) { - distance_fade_end_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - // float distance_fade_start = 6; - case 6: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 53)) { - distance_fade_start_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - // float height_offset = 7; - case 7: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 61)) { - height_offset_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - // float __tentative__scale = 8; - case 8: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 69)) { - __tentative__scale_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - // int32 map_display_size = 9; - case 9: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 72)) { - map_display_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // int32 map_id = 10; - case 10: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 80)) { - map_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // int32 maximum_size_on_screen = 11; - case 11: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 88)) { - maximum_size_on_screen_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // int32 minimum_size_on_screen = 12; - case 12: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 96)) { - minimum_size_on_screen_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool __tentative__render_ingame = 13; - case 13: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 104)) { - __tentative__render_ingame_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool __tentative__render_on_map = 14; - case 14: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 112)) { - __tentative__render_on_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool __tentative__render_on_minimap = 15; - case 15: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 120)) { - __tentative__render_on_minimap_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool scale_on_map_with_zoom = 16; - case 16: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 128)) { - scale_on_map_with_zoom_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // string bhdraft__schedule = 17; - case 17: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 138)) { - auto str = _internal_mutable_bhdraft__schedule(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "Proto_Node.Icon.bhdraft__schedule")); - CHK_(ptr); - } else goto handle_unusual; - continue; - // float bhdraft__schedule_duration = 18; - case 18: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 149)) { - bhdraft__schedule_duration_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - // string tip_description = 19; - case 19: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 154)) { - auto str = _internal_mutable_tip_description(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "Proto_Node.Icon.tip_description")); - CHK_(ptr); - } else goto handle_unusual; - continue; - // string tip_name = 20; - case 20: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 162)) { - auto str = _internal_mutable_tip_name(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "Proto_Node.Icon.tip_name")); - CHK_(ptr); - } else goto handle_unusual; - continue; default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { @@ -3170,473 +3744,280 @@ const char* Icon::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inter #undef CHK_ } -::PROTOBUF_NAMESPACE_ID::uint8* Icon::_InternalSerialize( +::PROTOBUF_NAMESPACE_ID::uint8* EulerRotation::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Proto_Node.Icon) + // @@protoc_insertion_point(serialize_to_array_start:EulerRotation) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - // fixed32 achievement_bit = 1; - if (this->achievement_bit() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFixed32ToArray(1, this->_internal_achievement_bit(), target); - } - - // int32 achievement_id = 2; - if (this->achievement_id() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_achievement_id(), target); - } - - // float alpha = 3; - if (!(this->alpha() <= 0 && this->alpha() >= 0)) { + // float x = 1; + if (!(this->x() <= 0 && this->x() >= 0)) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(3, this->_internal_alpha(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(1, this->_internal_x(), target); } - // bool can_fade = 4; - if (this->can_fade() != 0) { + // float y = 2; + if (!(this->y() <= 0 && this->y() >= 0)) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->_internal_can_fade(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2, this->_internal_y(), target); } - // float distance_fade_end = 5; - if (!(this->distance_fade_end() <= 0 && this->distance_fade_end() >= 0)) { + // float z = 3; + if (!(this->z() <= 0 && this->z() >= 0)) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(5, this->_internal_distance_fade_end(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(3, this->_internal_z(), target); } - // float distance_fade_start = 6; - if (!(this->distance_fade_start() <= 0 && this->distance_fade_start() >= 0)) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(6, this->_internal_distance_fade_start(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } + // @@protoc_insertion_point(serialize_to_array_end:EulerRotation) + return target; +} - // float height_offset = 7; - if (!(this->height_offset() <= 0 && this->height_offset() >= 0)) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(7, this->_internal_height_offset(), target); - } +size_t EulerRotation::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:EulerRotation) + size_t total_size = 0; - // float __tentative__scale = 8; - if (!(this->__tentative__scale() <= 0 && this->__tentative__scale() >= 0)) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(8, this->_internal___tentative__scale(), target); - } + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; - // int32 map_display_size = 9; - if (this->map_display_size() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(9, this->_internal_map_display_size(), target); + // float x = 1; + if (!(this->x() <= 0 && this->x() >= 0)) { + total_size += 1 + 4; } - // int32 map_id = 10; - if (this->map_id() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(10, this->_internal_map_id(), target); + // float y = 2; + if (!(this->y() <= 0 && this->y() >= 0)) { + total_size += 1 + 4; } - // int32 maximum_size_on_screen = 11; - if (this->maximum_size_on_screen() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(11, this->_internal_maximum_size_on_screen(), target); + // float z = 3; + if (!(this->z() <= 0 && this->z() >= 0)) { + total_size += 1 + 4; } - // int32 minimum_size_on_screen = 12; - if (this->minimum_size_on_screen() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(12, this->_internal_minimum_size_on_screen(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} - // bool __tentative__render_ingame = 13; - if (this->__tentative__render_ingame() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(13, this->_internal___tentative__render_ingame(), target); +void EulerRotation::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:EulerRotation) + GOOGLE_DCHECK_NE(&from, this); + const EulerRotation* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:EulerRotation) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:EulerRotation) + MergeFrom(*source); } +} - // bool __tentative__render_on_map = 14; - if (this->__tentative__render_on_map() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(14, this->_internal___tentative__render_on_map(), target); - } +void EulerRotation::MergeFrom(const EulerRotation& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:EulerRotation) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; - // bool __tentative__render_on_minimap = 15; - if (this->__tentative__render_on_minimap() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(15, this->_internal___tentative__render_on_minimap(), target); + if (!(from.x() <= 0 && from.x() >= 0)) { + _internal_set_x(from._internal_x()); } - - // bool scale_on_map_with_zoom = 16; - if (this->scale_on_map_with_zoom() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(16, this->_internal_scale_on_map_with_zoom(), target); + if (!(from.y() <= 0 && from.y() >= 0)) { + _internal_set_y(from._internal_y()); } - - // string bhdraft__schedule = 17; - if (this->bhdraft__schedule().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_bhdraft__schedule().data(), static_cast(this->_internal_bhdraft__schedule().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "Proto_Node.Icon.bhdraft__schedule"); - target = stream->WriteStringMaybeAliased( - 17, this->_internal_bhdraft__schedule(), target); + if (!(from.z() <= 0 && from.z() >= 0)) { + _internal_set_z(from._internal_z()); } +} - // float bhdraft__schedule_duration = 18; - if (!(this->bhdraft__schedule_duration() <= 0 && this->bhdraft__schedule_duration() >= 0)) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(18, this->_internal_bhdraft__schedule_duration(), target); - } +void EulerRotation::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:EulerRotation) + if (&from == this) return; + Clear(); + MergeFrom(from); +} - // string tip_description = 19; - if (this->tip_description().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_tip_description().data(), static_cast(this->_internal_tip_description().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "Proto_Node.Icon.tip_description"); - target = stream->WriteStringMaybeAliased( - 19, this->_internal_tip_description(), target); - } +void EulerRotation::CopyFrom(const EulerRotation& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:EulerRotation) + if (&from == this) return; + Clear(); + MergeFrom(from); +} - // string tip_name = 20; - if (this->tip_name().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_tip_name().data(), static_cast(this->_internal_tip_name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "Proto_Node.Icon.tip_name"); - target = stream->WriteStringMaybeAliased( - 20, this->_internal_tip_name(), target); - } +bool EulerRotation::IsInitialized() const { + return true; +} - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:Proto_Node.Icon) - return target; +void EulerRotation::InternalSwap(EulerRotation* other) { + using std::swap; + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(EulerRotation, z_) + + sizeof(EulerRotation::z_) + - PROTOBUF_FIELD_OFFSET(EulerRotation, x_)>( + reinterpret_cast(&x_), + reinterpret_cast(&other->x_)); } -size_t Icon::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Proto_Node.Icon) - size_t total_size = 0; +::PROTOBUF_NAMESPACE_ID::Metadata EulerRotation::GetMetadata() const { + return GetMetadataStatic(); +} - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - // string bhdraft__schedule = 17; - if (this->bhdraft__schedule().size() > 0) { - total_size += 2 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_bhdraft__schedule()); - } +// =================================================================== - // string tip_description = 19; - if (this->tip_description().size() > 0) { - total_size += 2 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_tip_description()); - } +void Trigger::InitAsDefaultInstance() { + ::_Trigger_default_instance_._instance.get_mutable()->action_hide_category_ = const_cast< ::Category*>( + ::Category::internal_default_instance()); + ::_Trigger_default_instance_._instance.get_mutable()->action_show_category_ = const_cast< ::Category*>( + ::Category::internal_default_instance()); + ::_Trigger_default_instance_._instance.get_mutable()->action_toggle_category_ = const_cast< ::Category*>( + ::Category::internal_default_instance()); +} +class Trigger::_Internal { + public: + static const ::Category& action_hide_category(const Trigger* msg); + static const ::Category& action_show_category(const Trigger* msg); + static const ::Category& action_toggle_category(const Trigger* msg); +}; - // string tip_name = 20; - if (this->tip_name().size() > 0) { - total_size += 2 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_tip_name()); - } - - // fixed32 achievement_bit = 1; - if (this->achievement_bit() != 0) { - total_size += 1 + 4; - } - - // int32 achievement_id = 2; - if (this->achievement_id() != 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( - this->_internal_achievement_id()); - } - - // float alpha = 3; - if (!(this->alpha() <= 0 && this->alpha() >= 0)) { - total_size += 1 + 4; - } - - // float distance_fade_end = 5; - if (!(this->distance_fade_end() <= 0 && this->distance_fade_end() >= 0)) { - total_size += 1 + 4; - } - - // float distance_fade_start = 6; - if (!(this->distance_fade_start() <= 0 && this->distance_fade_start() >= 0)) { - total_size += 1 + 4; - } - - // float height_offset = 7; - if (!(this->height_offset() <= 0 && this->height_offset() >= 0)) { - total_size += 1 + 4; - } - - // float __tentative__scale = 8; - if (!(this->__tentative__scale() <= 0 && this->__tentative__scale() >= 0)) { - total_size += 1 + 4; - } - - // int32 map_display_size = 9; - if (this->map_display_size() != 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( - this->_internal_map_display_size()); - } - - // int32 map_id = 10; - if (this->map_id() != 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( - this->_internal_map_id()); - } - - // int32 maximum_size_on_screen = 11; - if (this->maximum_size_on_screen() != 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( - this->_internal_maximum_size_on_screen()); - } - - // bool can_fade = 4; - if (this->can_fade() != 0) { - total_size += 1 + 1; - } - - // bool __tentative__render_ingame = 13; - if (this->__tentative__render_ingame() != 0) { - total_size += 1 + 1; - } - - // bool __tentative__render_on_map = 14; - if (this->__tentative__render_on_map() != 0) { - total_size += 1 + 1; - } - - // bool __tentative__render_on_minimap = 15; - if (this->__tentative__render_on_minimap() != 0) { - total_size += 1 + 1; - } - - // int32 minimum_size_on_screen = 12; - if (this->minimum_size_on_screen() != 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( - this->_internal_minimum_size_on_screen()); - } - - // bool scale_on_map_with_zoom = 16; - if (this->scale_on_map_with_zoom() != 0) { - total_size += 2 + 1; - } - - // float bhdraft__schedule_duration = 18; - if (!(this->bhdraft__schedule_duration() <= 0 && this->bhdraft__schedule_duration() >= 0)) { - total_size += 2 + 4; - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( - _internal_metadata_, total_size, &_cached_size_); - } - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} - -void Icon::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:Proto_Node.Icon) - GOOGLE_DCHECK_NE(&from, this); - const Icon* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:Proto_Node.Icon) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:Proto_Node.Icon) - MergeFrom(*source); - } -} - -void Icon::MergeFrom(const Icon& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:Proto_Node.Icon) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - if (from.bhdraft__schedule().size() > 0) { - _internal_set_bhdraft__schedule(from._internal_bhdraft__schedule()); - } - if (from.tip_description().size() > 0) { - _internal_set_tip_description(from._internal_tip_description()); - } - if (from.tip_name().size() > 0) { - _internal_set_tip_name(from._internal_tip_name()); - } - if (from.achievement_bit() != 0) { - _internal_set_achievement_bit(from._internal_achievement_bit()); - } - if (from.achievement_id() != 0) { - _internal_set_achievement_id(from._internal_achievement_id()); - } - if (!(from.alpha() <= 0 && from.alpha() >= 0)) { - _internal_set_alpha(from._internal_alpha()); - } - if (!(from.distance_fade_end() <= 0 && from.distance_fade_end() >= 0)) { - _internal_set_distance_fade_end(from._internal_distance_fade_end()); - } - if (!(from.distance_fade_start() <= 0 && from.distance_fade_start() >= 0)) { - _internal_set_distance_fade_start(from._internal_distance_fade_start()); - } - if (!(from.height_offset() <= 0 && from.height_offset() >= 0)) { - _internal_set_height_offset(from._internal_height_offset()); - } - if (!(from.__tentative__scale() <= 0 && from.__tentative__scale() >= 0)) { - _internal_set___tentative__scale(from._internal___tentative__scale()); - } - if (from.map_display_size() != 0) { - _internal_set_map_display_size(from._internal_map_display_size()); - } - if (from.map_id() != 0) { - _internal_set_map_id(from._internal_map_id()); - } - if (from.maximum_size_on_screen() != 0) { - _internal_set_maximum_size_on_screen(from._internal_maximum_size_on_screen()); - } - if (from.can_fade() != 0) { - _internal_set_can_fade(from._internal_can_fade()); - } - if (from.__tentative__render_ingame() != 0) { - _internal_set___tentative__render_ingame(from._internal___tentative__render_ingame()); - } - if (from.__tentative__render_on_map() != 0) { - _internal_set___tentative__render_on_map(from._internal___tentative__render_on_map()); - } - if (from.__tentative__render_on_minimap() != 0) { - _internal_set___tentative__render_on_minimap(from._internal___tentative__render_on_minimap()); - } - if (from.minimum_size_on_screen() != 0) { - _internal_set_minimum_size_on_screen(from._internal_minimum_size_on_screen()); - } - if (from.scale_on_map_with_zoom() != 0) { - _internal_set_scale_on_map_with_zoom(from._internal_scale_on_map_with_zoom()); - } - if (!(from.bhdraft__schedule_duration() <= 0 && from.bhdraft__schedule_duration() >= 0)) { - _internal_set_bhdraft__schedule_duration(from._internal_bhdraft__schedule_duration()); - } -} - -void Icon::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:Proto_Node.Icon) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void Icon::CopyFrom(const Icon& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Proto_Node.Icon) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool Icon::IsInitialized() const { - return true; -} - -void Icon::InternalSwap(Icon* other) { - using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - bhdraft__schedule_.Swap(&other->bhdraft__schedule_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - tip_description_.Swap(&other->tip_description_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - tip_name_.Swap(&other->tip_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(Icon, bhdraft__schedule_duration_) - + sizeof(Icon::bhdraft__schedule_duration_) - - PROTOBUF_FIELD_OFFSET(Icon, achievement_bit_)>( - reinterpret_cast(&achievement_bit_), - reinterpret_cast(&other->achievement_bit_)); +const ::Category& +Trigger::_Internal::action_hide_category(const Trigger* msg) { + return *msg->action_hide_category_; } - -::PROTOBUF_NAMESPACE_ID::Metadata Icon::GetMetadata() const { - return GetMetadataStatic(); +const ::Category& +Trigger::_Internal::action_show_category(const Trigger* msg) { + return *msg->action_show_category_; } - - -// =================================================================== - -void Trail_color::InitAsDefaultInstance() { +const ::Category& +Trigger::_Internal::action_toggle_category(const Trigger* msg) { + return *msg->action_toggle_category_; } -class Trail_color::_Internal { - public: -}; - -Trail_color::Trail_color(::PROTOBUF_NAMESPACE_ID::Arena* arena) +Trigger::Trigger(::PROTOBUF_NAMESPACE_ID::Arena* arena) : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:Proto_Node.Trail.color) + // @@protoc_insertion_point(arena_constructor:Trigger) } -Trail_color::Trail_color(const Trail_color& from) +Trigger::Trigger(const Trigger& from) : ::PROTOBUF_NAMESPACE_ID::Message() { _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - hex_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_hex().empty()) { - hex_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_hex(), + action_copy_clipboard_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_action_copy_clipboard().empty()) { + action_copy_clipboard_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_action_copy_clipboard(), + GetArena()); + } + action_copy_message_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_action_copy_message().empty()) { + action_copy_message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_action_copy_message(), + GetArena()); + } + action_info_message_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_action_info_message().empty()) { + action_info_message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_action_info_message(), GetArena()); } - // @@protoc_insertion_point(copy_constructor:Proto_Node.Trail.color) + if (from._internal_has_action_hide_category()) { + action_hide_category_ = new ::Category(*from.action_hide_category_); + } else { + action_hide_category_ = nullptr; + } + if (from._internal_has_action_show_category()) { + action_show_category_ = new ::Category(*from.action_show_category_); + } else { + action_show_category_ = nullptr; + } + if (from._internal_has_action_toggle_category()) { + action_toggle_category_ = new ::Category(*from.action_toggle_category_); + } else { + action_toggle_category_ = nullptr; + } + ::memcpy(&bounce_delay_, &from.bounce_delay_, + static_cast(reinterpret_cast(&range_) - + reinterpret_cast(&bounce_delay_)) + sizeof(range_)); + // @@protoc_insertion_point(copy_constructor:Trigger) } -void Trail_color::SharedCtor() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Trail_color_node_2eproto.base); - hex_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +void Trigger::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Trigger_generators_2fproto_5ftemplates_2fnode_2eproto.base); + action_copy_clipboard_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + action_copy_message_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + action_info_message_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + ::memset(&action_hide_category_, 0, static_cast( + reinterpret_cast(&range_) - + reinterpret_cast(&action_hide_category_)) + sizeof(range_)); } -Trail_color::~Trail_color() { - // @@protoc_insertion_point(destructor:Proto_Node.Trail.color) +Trigger::~Trigger() { + // @@protoc_insertion_point(destructor:Trigger) SharedDtor(); _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -void Trail_color::SharedDtor() { +void Trigger::SharedDtor() { GOOGLE_DCHECK(GetArena() == nullptr); - hex_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + action_copy_clipboard_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + action_copy_message_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + action_info_message_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (this != internal_default_instance()) delete action_hide_category_; + if (this != internal_default_instance()) delete action_show_category_; + if (this != internal_default_instance()) delete action_toggle_category_; } -void Trail_color::ArenaDtor(void* object) { - Trail_color* _this = reinterpret_cast< Trail_color* >(object); +void Trigger::ArenaDtor(void* object) { + Trigger* _this = reinterpret_cast< Trigger* >(object); (void)_this; } -void Trail_color::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +void Trigger::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } -void Trail_color::SetCachedSize(int size) const { +void Trigger::SetCachedSize(int size) const { _cached_size_.Set(size); } -const Trail_color& Trail_color::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Trail_color_node_2eproto.base); +const Trigger& Trigger::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Trigger_generators_2fproto_5ftemplates_2fnode_2eproto.base); return *internal_default_instance(); } -void Trail_color::Clear() { -// @@protoc_insertion_point(message_clear_start:Proto_Node.Trail.color) +void Trigger::Clear() { +// @@protoc_insertion_point(message_clear_start:Trigger) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - hex_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + action_copy_clipboard_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + action_copy_message_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + action_info_message_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + if (GetArena() == nullptr && action_hide_category_ != nullptr) { + delete action_hide_category_; + } + action_hide_category_ = nullptr; + if (GetArena() == nullptr && action_show_category_ != nullptr) { + delete action_show_category_; + } + action_show_category_ = nullptr; + if (GetArena() == nullptr && action_toggle_category_ != nullptr) { + delete action_toggle_category_; + } + action_toggle_category_ = nullptr; + ::memset(&bounce_delay_, 0, static_cast( + reinterpret_cast(&range_) - + reinterpret_cast(&bounce_delay_)) + sizeof(range_)); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -const char* Trail_color::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +const char* Trigger::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { @@ -3644,12 +4025,107 @@ const char* Trail_color::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); CHK_(ptr); switch (tag >> 3) { - // string hex = 1; + // bool auto_trigger = 1; case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - auto str = _internal_mutable_hex(); + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + auto_trigger_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // float bounce_delay = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 21)) { + bounce_delay_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else goto handle_unusual; + continue; + // float bounce_duration = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 29)) { + bounce_duration_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else goto handle_unusual; + continue; + // float bounce_height = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 37)) { + bounce_height_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else goto handle_unusual; + continue; + // string action_copy_clipboard = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) { + auto str = _internal_mutable_action_copy_clipboard(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "Trigger.action_copy_clipboard")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string action_copy_message = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) { + auto str = _internal_mutable_action_copy_message(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "Trigger.action_copy_message")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool has_countdown = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) { + has_countdown_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string action_info_message = 8; + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 66)) { + auto str = _internal_mutable_action_info_message(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "Proto_Node.Trail.color.hex")); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "Trigger.action_info_message")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool invert_display = 9; + case 9: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 72)) { + invert_display_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // float reset_length = 10; + case 10: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 85)) { + reset_length_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else goto handle_unusual; + continue; + // float range = 11; + case 11: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 93)) { + range_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else goto handle_unusual; + continue; + // .Category action_hide_category = 12; + case 12: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 98)) { + ptr = ctx->ParseMessage(_internal_mutable_action_hide_category(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // .Category action_show_category = 13; + case 13: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 106)) { + ptr = ctx->ParseMessage(_internal_mutable_action_show_category(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // .Category action_toggle_category = 14; + case 14: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 114)) { + ptr = ctx->ParseMessage(_internal_mutable_action_toggle_category(), ptr); CHK_(ptr); } else goto handle_unusual; continue; @@ -3675,177 +4151,385 @@ const char* Trail_color::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID #undef CHK_ } -::PROTOBUF_NAMESPACE_ID::uint8* Trail_color::_InternalSerialize( +::PROTOBUF_NAMESPACE_ID::uint8* Trigger::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Proto_Node.Trail.color) + // @@protoc_insertion_point(serialize_to_array_start:Trigger) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - // string hex = 1; - if (this->hex().size() > 0) { + // bool auto_trigger = 1; + if (this->auto_trigger() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->_internal_auto_trigger(), target); + } + + // float bounce_delay = 2; + if (!(this->bounce_delay() <= 0 && this->bounce_delay() >= 0)) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2, this->_internal_bounce_delay(), target); + } + + // float bounce_duration = 3; + if (!(this->bounce_duration() <= 0 && this->bounce_duration() >= 0)) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(3, this->_internal_bounce_duration(), target); + } + + // float bounce_height = 4; + if (!(this->bounce_height() <= 0 && this->bounce_height() >= 0)) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(4, this->_internal_bounce_height(), target); + } + + // string action_copy_clipboard = 5; + if (this->action_copy_clipboard().size() > 0) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_hex().data(), static_cast(this->_internal_hex().length()), + this->_internal_action_copy_clipboard().data(), static_cast(this->_internal_action_copy_clipboard().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "Proto_Node.Trail.color.hex"); + "Trigger.action_copy_clipboard"); target = stream->WriteStringMaybeAliased( - 1, this->_internal_hex(), target); + 5, this->_internal_action_copy_clipboard(), target); + } + + // string action_copy_message = 6; + if (this->action_copy_message().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_action_copy_message().data(), static_cast(this->_internal_action_copy_message().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "Trigger.action_copy_message"); + target = stream->WriteStringMaybeAliased( + 6, this->_internal_action_copy_message(), target); + } + + // bool has_countdown = 7; + if (this->has_countdown() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(7, this->_internal_has_countdown(), target); + } + + // string action_info_message = 8; + if (this->action_info_message().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_action_info_message().data(), static_cast(this->_internal_action_info_message().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "Trigger.action_info_message"); + target = stream->WriteStringMaybeAliased( + 8, this->_internal_action_info_message(), target); + } + + // bool invert_display = 9; + if (this->invert_display() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(9, this->_internal_invert_display(), target); + } + + // float reset_length = 10; + if (!(this->reset_length() <= 0 && this->reset_length() >= 0)) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(10, this->_internal_reset_length(), target); + } + + // float range = 11; + if (!(this->range() <= 0 && this->range() >= 0)) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(11, this->_internal_range(), target); + } + + // .Category action_hide_category = 12; + if (this->has_action_hide_category()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 12, _Internal::action_hide_category(this), target, stream); + } + + // .Category action_show_category = 13; + if (this->has_action_show_category()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 13, _Internal::action_show_category(this), target, stream); + } + + // .Category action_toggle_category = 14; + if (this->has_action_toggle_category()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 14, _Internal::action_toggle_category(this), target, stream); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } - // @@protoc_insertion_point(serialize_to_array_end:Proto_Node.Trail.color) + // @@protoc_insertion_point(serialize_to_array_end:Trigger) return target; } -size_t Trail_color::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Proto_Node.Trail.color) +size_t Trigger::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:Trigger) size_t total_size = 0; ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // string hex = 1; - if (this->hex().size() > 0) { + // string action_copy_clipboard = 5; + if (this->action_copy_clipboard().size() > 0) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_hex()); + this->_internal_action_copy_clipboard()); } - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( - _internal_metadata_, total_size, &_cached_size_); + // string action_copy_message = 6; + if (this->action_copy_message().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_action_copy_message()); } - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} -void Trail_color::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:Proto_Node.Trail.color) - GOOGLE_DCHECK_NE(&from, this); - const Trail_color* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:Proto_Node.Trail.color) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:Proto_Node.Trail.color) - MergeFrom(*source); + // string action_info_message = 8; + if (this->action_info_message().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_action_info_message()); } -} -void Trail_color::MergeFrom(const Trail_color& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:Proto_Node.Trail.color) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; + // .Category action_hide_category = 12; + if (this->has_action_hide_category()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *action_hide_category_); + } - if (from.hex().size() > 0) { - _internal_set_hex(from._internal_hex()); + // .Category action_show_category = 13; + if (this->has_action_show_category()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *action_show_category_); } -} -void Trail_color::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:Proto_Node.Trail.color) + // .Category action_toggle_category = 14; + if (this->has_action_toggle_category()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *action_toggle_category_); + } + + // float bounce_delay = 2; + if (!(this->bounce_delay() <= 0 && this->bounce_delay() >= 0)) { + total_size += 1 + 4; + } + + // float bounce_duration = 3; + if (!(this->bounce_duration() <= 0 && this->bounce_duration() >= 0)) { + total_size += 1 + 4; + } + + // float bounce_height = 4; + if (!(this->bounce_height() <= 0 && this->bounce_height() >= 0)) { + total_size += 1 + 4; + } + + // bool auto_trigger = 1; + if (this->auto_trigger() != 0) { + total_size += 1 + 1; + } + + // bool has_countdown = 7; + if (this->has_countdown() != 0) { + total_size += 1 + 1; + } + + // bool invert_display = 9; + if (this->invert_display() != 0) { + total_size += 1 + 1; + } + + // float reset_length = 10; + if (!(this->reset_length() <= 0 && this->reset_length() >= 0)) { + total_size += 1 + 4; + } + + // float range = 11; + if (!(this->range() <= 0 && this->range() >= 0)) { + total_size += 1 + 4; + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void Trigger::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:Trigger) + GOOGLE_DCHECK_NE(&from, this); + const Trigger* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:Trigger) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:Trigger) + MergeFrom(*source); + } +} + +void Trigger::MergeFrom(const Trigger& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:Trigger) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.action_copy_clipboard().size() > 0) { + _internal_set_action_copy_clipboard(from._internal_action_copy_clipboard()); + } + if (from.action_copy_message().size() > 0) { + _internal_set_action_copy_message(from._internal_action_copy_message()); + } + if (from.action_info_message().size() > 0) { + _internal_set_action_info_message(from._internal_action_info_message()); + } + if (from.has_action_hide_category()) { + _internal_mutable_action_hide_category()->::Category::MergeFrom(from._internal_action_hide_category()); + } + if (from.has_action_show_category()) { + _internal_mutable_action_show_category()->::Category::MergeFrom(from._internal_action_show_category()); + } + if (from.has_action_toggle_category()) { + _internal_mutable_action_toggle_category()->::Category::MergeFrom(from._internal_action_toggle_category()); + } + if (!(from.bounce_delay() <= 0 && from.bounce_delay() >= 0)) { + _internal_set_bounce_delay(from._internal_bounce_delay()); + } + if (!(from.bounce_duration() <= 0 && from.bounce_duration() >= 0)) { + _internal_set_bounce_duration(from._internal_bounce_duration()); + } + if (!(from.bounce_height() <= 0 && from.bounce_height() >= 0)) { + _internal_set_bounce_height(from._internal_bounce_height()); + } + if (from.auto_trigger() != 0) { + _internal_set_auto_trigger(from._internal_auto_trigger()); + } + if (from.has_countdown() != 0) { + _internal_set_has_countdown(from._internal_has_countdown()); + } + if (from.invert_display() != 0) { + _internal_set_invert_display(from._internal_invert_display()); + } + if (!(from.reset_length() <= 0 && from.reset_length() >= 0)) { + _internal_set_reset_length(from._internal_reset_length()); + } + if (!(from.range() <= 0 && from.range() >= 0)) { + _internal_set_range(from._internal_range()); + } +} + +void Trigger::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:Trigger) if (&from == this) return; Clear(); MergeFrom(from); } -void Trail_color::CopyFrom(const Trail_color& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Proto_Node.Trail.color) +void Trigger::CopyFrom(const Trigger& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:Trigger) if (&from == this) return; Clear(); MergeFrom(from); } -bool Trail_color::IsInitialized() const { +bool Trigger::IsInitialized() const { return true; } -void Trail_color::InternalSwap(Trail_color* other) { +void Trigger::InternalSwap(Trigger* other) { using std::swap; _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - hex_.Swap(&other->hex_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + action_copy_clipboard_.Swap(&other->action_copy_clipboard_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + action_copy_message_.Swap(&other->action_copy_message_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + action_info_message_.Swap(&other->action_info_message_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(Trigger, range_) + + sizeof(Trigger::range_) + - PROTOBUF_FIELD_OFFSET(Trigger, action_hide_category_)>( + reinterpret_cast(&action_hide_category_), + reinterpret_cast(&other->action_hide_category_)); } -::PROTOBUF_NAMESPACE_ID::Metadata Trail_color::GetMetadata() const { +::PROTOBUF_NAMESPACE_ID::Metadata Trigger::GetMetadata() const { return GetMetadataStatic(); } // =================================================================== -void Trail_festival_filter::InitAsDefaultInstance() { +void GUID::InitAsDefaultInstance() { } -class Trail_festival_filter::_Internal { +class GUID::_Internal { public: }; -Trail_festival_filter::Trail_festival_filter(::PROTOBUF_NAMESPACE_ID::Arena* arena) +GUID::GUID(::PROTOBUF_NAMESPACE_ID::Arena* arena) : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:Proto_Node.Trail.festival_filter) + // @@protoc_insertion_point(arena_constructor:GUID) } -Trail_festival_filter::Trail_festival_filter(const Trail_festival_filter& from) +GUID::GUID(const GUID& from) : ::PROTOBUF_NAMESPACE_ID::Message() { _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::memcpy(&dragonbash_, &from.dragonbash_, - static_cast(reinterpret_cast(&none_) - - reinterpret_cast(&dragonbash_)) + sizeof(none_)); - // @@protoc_insertion_point(copy_constructor:Proto_Node.Trail.festival_filter) + guid_ = from.guid_; + // @@protoc_insertion_point(copy_constructor:GUID) } -void Trail_festival_filter::SharedCtor() { - ::memset(&dragonbash_, 0, static_cast( - reinterpret_cast(&none_) - - reinterpret_cast(&dragonbash_)) + sizeof(none_)); +void GUID::SharedCtor() { + guid_ = 0; } -Trail_festival_filter::~Trail_festival_filter() { - // @@protoc_insertion_point(destructor:Proto_Node.Trail.festival_filter) +GUID::~GUID() { + // @@protoc_insertion_point(destructor:GUID) SharedDtor(); _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -void Trail_festival_filter::SharedDtor() { +void GUID::SharedDtor() { GOOGLE_DCHECK(GetArena() == nullptr); } -void Trail_festival_filter::ArenaDtor(void* object) { - Trail_festival_filter* _this = reinterpret_cast< Trail_festival_filter* >(object); +void GUID::ArenaDtor(void* object) { + GUID* _this = reinterpret_cast< GUID* >(object); (void)_this; } -void Trail_festival_filter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +void GUID::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } -void Trail_festival_filter::SetCachedSize(int size) const { +void GUID::SetCachedSize(int size) const { _cached_size_.Set(size); } -const Trail_festival_filter& Trail_festival_filter::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Trail_festival_filter_node_2eproto.base); +const GUID& GUID::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_GUID_generators_2fproto_5ftemplates_2fnode_2eproto.base); return *internal_default_instance(); } -void Trail_festival_filter::Clear() { -// @@protoc_insertion_point(message_clear_start:Proto_Node.Trail.festival_filter) +void GUID::Clear() { +// @@protoc_insertion_point(message_clear_start:GUID) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - ::memset(&dragonbash_, 0, static_cast( - reinterpret_cast(&none_) - - reinterpret_cast(&dragonbash_)) + sizeof(none_)); + guid_ = 0; _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -const char* Trail_festival_filter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +const char* GUID::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { @@ -3853,52 +4537,10 @@ const char* Trail_festival_filter::_InternalParse(const char* ptr, ::PROTOBUF_NA ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); CHK_(ptr); switch (tag >> 3) { - // bool dragonbash = 1; + // int32 guid = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - dragonbash_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool festival_of_the_four_winds = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { - festival_of_the_four_winds_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool halloween = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { - halloween_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool lunar_new_year = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { - lunar_new_year_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool super_adventure_festival = 5; - case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { - super_adventure_festival_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool wintersday = 6; - case 6: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) { - wintersday_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool none = 7; - case 7: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) { - none_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + guid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; @@ -3924,103 +4566,39 @@ const char* Trail_festival_filter::_InternalParse(const char* ptr, ::PROTOBUF_NA #undef CHK_ } -::PROTOBUF_NAMESPACE_ID::uint8* Trail_festival_filter::_InternalSerialize( +::PROTOBUF_NAMESPACE_ID::uint8* GUID::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Proto_Node.Trail.festival_filter) + // @@protoc_insertion_point(serialize_to_array_start:GUID) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - // bool dragonbash = 1; - if (this->dragonbash() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->_internal_dragonbash(), target); - } - - // bool festival_of_the_four_winds = 2; - if (this->festival_of_the_four_winds() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_festival_of_the_four_winds(), target); - } - - // bool halloween = 3; - if (this->halloween() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_halloween(), target); - } - - // bool lunar_new_year = 4; - if (this->lunar_new_year() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->_internal_lunar_new_year(), target); - } - - // bool super_adventure_festival = 5; - if (this->super_adventure_festival() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->_internal_super_adventure_festival(), target); - } - - // bool wintersday = 6; - if (this->wintersday() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(6, this->_internal_wintersday(), target); - } - - // bool none = 7; - if (this->none() != 0) { + // int32 guid = 1; + if (this->guid() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(7, this->_internal_none(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_guid(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } - // @@protoc_insertion_point(serialize_to_array_end:Proto_Node.Trail.festival_filter) + // @@protoc_insertion_point(serialize_to_array_end:GUID) return target; } -size_t Trail_festival_filter::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Proto_Node.Trail.festival_filter) +size_t GUID::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:GUID) size_t total_size = 0; ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // bool dragonbash = 1; - if (this->dragonbash() != 0) { - total_size += 1 + 1; - } - - // bool festival_of_the_four_winds = 2; - if (this->festival_of_the_four_winds() != 0) { - total_size += 1 + 1; - } - - // bool halloween = 3; - if (this->halloween() != 0) { - total_size += 1 + 1; - } - - // bool lunar_new_year = 4; - if (this->lunar_new_year() != 0) { - total_size += 1 + 1; - } - - // bool super_adventure_festival = 5; - if (this->super_adventure_festival() != 0) { - total_size += 1 + 1; - } - - // bool wintersday = 6; - if (this->wintersday() != 0) { - total_size += 1 + 1; - } - - // bool none = 7; - if (this->none() != 0) { - total_size += 1 + 1; + // int32 guid = 1; + if (this->guid() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + this->_internal_guid()); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { @@ -4032,146 +4610,129 @@ size_t Trail_festival_filter::ByteSizeLong() const { return total_size; } -void Trail_festival_filter::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:Proto_Node.Trail.festival_filter) +void GUID::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:GUID) GOOGLE_DCHECK_NE(&from, this); - const Trail_festival_filter* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + const GUID* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:Proto_Node.Trail.festival_filter) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:GUID) ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:Proto_Node.Trail.festival_filter) + // @@protoc_insertion_point(generalized_merge_from_cast_success:GUID) MergeFrom(*source); } } -void Trail_festival_filter::MergeFrom(const Trail_festival_filter& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:Proto_Node.Trail.festival_filter) +void GUID::MergeFrom(const GUID& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:GUID) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - if (from.dragonbash() != 0) { - _internal_set_dragonbash(from._internal_dragonbash()); - } - if (from.festival_of_the_four_winds() != 0) { - _internal_set_festival_of_the_four_winds(from._internal_festival_of_the_four_winds()); - } - if (from.halloween() != 0) { - _internal_set_halloween(from._internal_halloween()); - } - if (from.lunar_new_year() != 0) { - _internal_set_lunar_new_year(from._internal_lunar_new_year()); - } - if (from.super_adventure_festival() != 0) { - _internal_set_super_adventure_festival(from._internal_super_adventure_festival()); - } - if (from.wintersday() != 0) { - _internal_set_wintersday(from._internal_wintersday()); - } - if (from.none() != 0) { - _internal_set_none(from._internal_none()); + if (from.guid() != 0) { + _internal_set_guid(from._internal_guid()); } } -void Trail_festival_filter::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:Proto_Node.Trail.festival_filter) +void GUID::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:GUID) if (&from == this) return; Clear(); MergeFrom(from); } -void Trail_festival_filter::CopyFrom(const Trail_festival_filter& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Proto_Node.Trail.festival_filter) +void GUID::CopyFrom(const GUID& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:GUID) if (&from == this) return; Clear(); MergeFrom(from); } -bool Trail_festival_filter::IsInitialized() const { +bool GUID::IsInitialized() const { return true; } -void Trail_festival_filter::InternalSwap(Trail_festival_filter* other) { +void GUID::InternalSwap(GUID* other) { using std::swap; _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(Trail_festival_filter, none_) - + sizeof(Trail_festival_filter::none_) - - PROTOBUF_FIELD_OFFSET(Trail_festival_filter, dragonbash_)>( - reinterpret_cast(&dragonbash_), - reinterpret_cast(&other->dragonbash_)); + swap(guid_, other->guid_); } -::PROTOBUF_NAMESPACE_ID::Metadata Trail_festival_filter::GetMetadata() const { +::PROTOBUF_NAMESPACE_ID::Metadata GUID::GetMetadata() const { return GetMetadataStatic(); } // =================================================================== -void Trail_guid::InitAsDefaultInstance() { +void Color::InitAsDefaultInstance() { } -class Trail_guid::_Internal { +class Color::_Internal { public: }; -Trail_guid::Trail_guid(::PROTOBUF_NAMESPACE_ID::Arena* arena) +Color::Color(::PROTOBUF_NAMESPACE_ID::Arena* arena) : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:Proto_Node.Trail.guid) + // @@protoc_insertion_point(arena_constructor:Color) } -Trail_guid::Trail_guid(const Trail_guid& from) +Color::Color(const Color& from) : ::PROTOBUF_NAMESPACE_ID::Message() { _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - guid_ = from.guid_; - // @@protoc_insertion_point(copy_constructor:Proto_Node.Trail.guid) + hex_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_hex().empty()) { + hex_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_hex(), + GetArena()); + } + // @@protoc_insertion_point(copy_constructor:Color) } -void Trail_guid::SharedCtor() { - guid_ = 0; +void Color::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Color_generators_2fproto_5ftemplates_2fnode_2eproto.base); + hex_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -Trail_guid::~Trail_guid() { - // @@protoc_insertion_point(destructor:Proto_Node.Trail.guid) +Color::~Color() { + // @@protoc_insertion_point(destructor:Color) SharedDtor(); _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -void Trail_guid::SharedDtor() { +void Color::SharedDtor() { GOOGLE_DCHECK(GetArena() == nullptr); + hex_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -void Trail_guid::ArenaDtor(void* object) { - Trail_guid* _this = reinterpret_cast< Trail_guid* >(object); +void Color::ArenaDtor(void* object) { + Color* _this = reinterpret_cast< Color* >(object); (void)_this; } -void Trail_guid::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +void Color::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } -void Trail_guid::SetCachedSize(int size) const { +void Color::SetCachedSize(int size) const { _cached_size_.Set(size); } -const Trail_guid& Trail_guid::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Trail_guid_node_2eproto.base); +const Color& Color::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Color_generators_2fproto_5ftemplates_2fnode_2eproto.base); return *internal_default_instance(); } -void Trail_guid::Clear() { -// @@protoc_insertion_point(message_clear_start:Proto_Node.Trail.guid) +void Color::Clear() { +// @@protoc_insertion_point(message_clear_start:Color) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - guid_ = 0; + hex_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -const char* Trail_guid::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +const char* Color::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { @@ -4179,10 +4740,12 @@ const char* Trail_guid::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID: ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); CHK_(ptr); switch (tag >> 3) { - // int32 guid = 1; + // string hex = 1; case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - guid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_hex(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "Color.hex")); CHK_(ptr); } else goto handle_unusual; continue; @@ -4208,39 +4771,43 @@ const char* Trail_guid::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID: #undef CHK_ } -::PROTOBUF_NAMESPACE_ID::uint8* Trail_guid::_InternalSerialize( +::PROTOBUF_NAMESPACE_ID::uint8* Color::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Proto_Node.Trail.guid) + // @@protoc_insertion_point(serialize_to_array_start:Color) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - // int32 guid = 1; - if (this->guid() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_guid(), target); + // string hex = 1; + if (this->hex().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_hex().data(), static_cast(this->_internal_hex().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "Color.hex"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_hex(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } - // @@protoc_insertion_point(serialize_to_array_end:Proto_Node.Trail.guid) + // @@protoc_insertion_point(serialize_to_array_end:Color) return target; } -size_t Trail_guid::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Proto_Node.Trail.guid) +size_t Color::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:Color) size_t total_size = 0; ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // int32 guid = 1; - if (this->guid() != 0) { + // string hex = 1; + if (this->hex().size() > 0) { total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( - this->_internal_guid()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_hex()); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { @@ -4252,129 +4819,129 @@ size_t Trail_guid::ByteSizeLong() const { return total_size; } -void Trail_guid::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:Proto_Node.Trail.guid) +void Color::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:Color) GOOGLE_DCHECK_NE(&from, this); - const Trail_guid* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + const Color* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:Proto_Node.Trail.guid) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:Color) ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:Proto_Node.Trail.guid) + // @@protoc_insertion_point(generalized_merge_from_cast_success:Color) MergeFrom(*source); } } -void Trail_guid::MergeFrom(const Trail_guid& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:Proto_Node.Trail.guid) +void Color::MergeFrom(const Color& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:Color) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - if (from.guid() != 0) { - _internal_set_guid(from._internal_guid()); + if (from.hex().size() > 0) { + _internal_set_hex(from._internal_hex()); } } -void Trail_guid::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:Proto_Node.Trail.guid) +void Color::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:Color) if (&from == this) return; Clear(); MergeFrom(from); } -void Trail_guid::CopyFrom(const Trail_guid& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Proto_Node.Trail.guid) +void Color::CopyFrom(const Color& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:Color) if (&from == this) return; Clear(); MergeFrom(from); } -bool Trail_guid::IsInitialized() const { +bool Color::IsInitialized() const { return true; } -void Trail_guid::InternalSwap(Trail_guid* other) { +void Color::InternalSwap(Color* other) { using std::swap; _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - swap(guid_, other->guid_); + hex_.Swap(&other->hex_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } -::PROTOBUF_NAMESPACE_ID::Metadata Trail_guid::GetMetadata() const { +::PROTOBUF_NAMESPACE_ID::Metadata Color::GetMetadata() const { return GetMetadataStatic(); } // =================================================================== -void Trail_map_type_filter::InitAsDefaultInstance() { +void FestivalFilter::InitAsDefaultInstance() { } -class Trail_map_type_filter::_Internal { +class FestivalFilter::_Internal { public: }; -Trail_map_type_filter::Trail_map_type_filter(::PROTOBUF_NAMESPACE_ID::Arena* arena) +FestivalFilter::FestivalFilter(::PROTOBUF_NAMESPACE_ID::Arena* arena) : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:Proto_Node.Trail.map_type_filter) + // @@protoc_insertion_point(arena_constructor:FestivalFilter) } -Trail_map_type_filter::Trail_map_type_filter(const Trail_map_type_filter& from) +FestivalFilter::FestivalFilter(const FestivalFilter& from) : ::PROTOBUF_NAMESPACE_ID::Message() { _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::memcpy(&unknown_map_, &from.unknown_map_, - static_cast(reinterpret_cast(&wvw_lounge_map_) - - reinterpret_cast(&unknown_map_)) + sizeof(wvw_lounge_map_)); - // @@protoc_insertion_point(copy_constructor:Proto_Node.Trail.map_type_filter) + ::memcpy(&dragonbash_, &from.dragonbash_, + static_cast(reinterpret_cast(&none_) - + reinterpret_cast(&dragonbash_)) + sizeof(none_)); + // @@protoc_insertion_point(copy_constructor:FestivalFilter) } -void Trail_map_type_filter::SharedCtor() { - ::memset(&unknown_map_, 0, static_cast( - reinterpret_cast(&wvw_lounge_map_) - - reinterpret_cast(&unknown_map_)) + sizeof(wvw_lounge_map_)); +void FestivalFilter::SharedCtor() { + ::memset(&dragonbash_, 0, static_cast( + reinterpret_cast(&none_) - + reinterpret_cast(&dragonbash_)) + sizeof(none_)); } -Trail_map_type_filter::~Trail_map_type_filter() { - // @@protoc_insertion_point(destructor:Proto_Node.Trail.map_type_filter) +FestivalFilter::~FestivalFilter() { + // @@protoc_insertion_point(destructor:FestivalFilter) SharedDtor(); _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -void Trail_map_type_filter::SharedDtor() { +void FestivalFilter::SharedDtor() { GOOGLE_DCHECK(GetArena() == nullptr); } -void Trail_map_type_filter::ArenaDtor(void* object) { - Trail_map_type_filter* _this = reinterpret_cast< Trail_map_type_filter* >(object); +void FestivalFilter::ArenaDtor(void* object) { + FestivalFilter* _this = reinterpret_cast< FestivalFilter* >(object); (void)_this; } -void Trail_map_type_filter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +void FestivalFilter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } -void Trail_map_type_filter::SetCachedSize(int size) const { +void FestivalFilter::SetCachedSize(int size) const { _cached_size_.Set(size); } -const Trail_map_type_filter& Trail_map_type_filter::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Trail_map_type_filter_node_2eproto.base); +const FestivalFilter& FestivalFilter::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_FestivalFilter_generators_2fproto_5ftemplates_2fnode_2eproto.base); return *internal_default_instance(); } -void Trail_map_type_filter::Clear() { -// @@protoc_insertion_point(message_clear_start:Proto_Node.Trail.map_type_filter) +void FestivalFilter::Clear() { +// @@protoc_insertion_point(message_clear_start:FestivalFilter) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - ::memset(&unknown_map_, 0, static_cast( - reinterpret_cast(&wvw_lounge_map_) - - reinterpret_cast(&unknown_map_)) + sizeof(wvw_lounge_map_)); + ::memset(&dragonbash_, 0, static_cast( + reinterpret_cast(&none_) - + reinterpret_cast(&dragonbash_)) + sizeof(none_)); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -const char* Trail_map_type_filter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +const char* FestivalFilter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { @@ -4382,171 +4949,52 @@ const char* Trail_map_type_filter::_InternalParse(const char* ptr, ::PROTOBUF_NA ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); CHK_(ptr); switch (tag >> 3) { - // bool unknown_map = 1; + // bool dragonbash = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - unknown_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + dragonbash_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; - // bool redirect_map = 2; + // bool festival_of_the_four_winds = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { - redirect_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + festival_of_the_four_winds_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; - // bool character_create_map = 3; + // bool halloween = 3; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { - character_create_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + halloween_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; - // bool pvp_map = 4; + // bool lunar_new_year = 4; case 4: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { - pvp_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + lunar_new_year_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; - // bool gvg_map = 5; + // bool super_adventure_festival = 5; case 5: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { - gvg_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + super_adventure_festival_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; - // bool instance_map = 6; + // bool wintersday = 6; case 6: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) { - instance_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + wintersday_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; - // bool public_map = 7; + // bool none = 7; case 7: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) { - public_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool tournament_map = 8; - case 8: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 64)) { - tournament_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool tutorial_map = 9; - case 9: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 72)) { - tutorial_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool user_tournament_map = 10; - case 10: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 80)) { - user_tournament_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool center_map = 11; - case 11: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 88)) { - center_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool eternal_battlegrounds_map = 12; - case 12: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 96)) { - eternal_battlegrounds_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool bluehome_map = 13; - case 13: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 104)) { - bluehome_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool blue_borderlands_map = 14; - case 14: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 112)) { - blue_borderlands_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool green_home_map = 15; - case 15: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 120)) { - green_home_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool green_borderlands_map = 16; - case 16: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 128)) { - green_borderlands_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool red_home_map = 17; - case 17: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 136)) { - red_home_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool red_borderlands_map = 18; - case 18: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 144)) { - red_borderlands_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool fortunes_vale_map = 19; - case 19: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 152)) { - fortunes_vale_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool jump_puzzle_map = 20; - case 20: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 160)) { - jump_puzzle_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool obsidian_sanctum_map = 21; - case 21: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 168)) { - obsidian_sanctum_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool edge_of_the_mists_map = 22; - case 22: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 176)) { - edge_of_the_mists_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool public_mini_map = 23; - case 23: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 184)) { - public_mini_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool wvw_lounge_map = 24; - case 24: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 192)) { - wvw_lounge_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + none_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; @@ -4572,292 +5020,105 @@ const char* Trail_map_type_filter::_InternalParse(const char* ptr, ::PROTOBUF_NA #undef CHK_ } -::PROTOBUF_NAMESPACE_ID::uint8* Trail_map_type_filter::_InternalSerialize( +::PROTOBUF_NAMESPACE_ID::uint8* FestivalFilter::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Proto_Node.Trail.map_type_filter) + // @@protoc_insertion_point(serialize_to_array_start:FestivalFilter) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - // bool unknown_map = 1; - if (this->unknown_map() != 0) { + // bool dragonbash = 1; + if (this->dragonbash() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->_internal_unknown_map(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->_internal_dragonbash(), target); } - // bool redirect_map = 2; - if (this->redirect_map() != 0) { + // bool festival_of_the_four_winds = 2; + if (this->festival_of_the_four_winds() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_redirect_map(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_festival_of_the_four_winds(), target); } - // bool character_create_map = 3; - if (this->character_create_map() != 0) { + // bool halloween = 3; + if (this->halloween() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_character_create_map(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_halloween(), target); } - // bool pvp_map = 4; - if (this->pvp_map() != 0) { + // bool lunar_new_year = 4; + if (this->lunar_new_year() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->_internal_pvp_map(), target); - } - - // bool gvg_map = 5; - if (this->gvg_map() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->_internal_gvg_map(), target); - } - - // bool instance_map = 6; - if (this->instance_map() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(6, this->_internal_instance_map(), target); - } - - // bool public_map = 7; - if (this->public_map() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(7, this->_internal_public_map(), target); - } - - // bool tournament_map = 8; - if (this->tournament_map() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(8, this->_internal_tournament_map(), target); - } - - // bool tutorial_map = 9; - if (this->tutorial_map() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(9, this->_internal_tutorial_map(), target); - } - - // bool user_tournament_map = 10; - if (this->user_tournament_map() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(10, this->_internal_user_tournament_map(), target); - } - - // bool center_map = 11; - if (this->center_map() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(11, this->_internal_center_map(), target); - } - - // bool eternal_battlegrounds_map = 12; - if (this->eternal_battlegrounds_map() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(12, this->_internal_eternal_battlegrounds_map(), target); - } - - // bool bluehome_map = 13; - if (this->bluehome_map() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(13, this->_internal_bluehome_map(), target); - } - - // bool blue_borderlands_map = 14; - if (this->blue_borderlands_map() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(14, this->_internal_blue_borderlands_map(), target); - } - - // bool green_home_map = 15; - if (this->green_home_map() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(15, this->_internal_green_home_map(), target); - } - - // bool green_borderlands_map = 16; - if (this->green_borderlands_map() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(16, this->_internal_green_borderlands_map(), target); - } - - // bool red_home_map = 17; - if (this->red_home_map() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(17, this->_internal_red_home_map(), target); - } - - // bool red_borderlands_map = 18; - if (this->red_borderlands_map() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(18, this->_internal_red_borderlands_map(), target); - } - - // bool fortunes_vale_map = 19; - if (this->fortunes_vale_map() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(19, this->_internal_fortunes_vale_map(), target); - } - - // bool jump_puzzle_map = 20; - if (this->jump_puzzle_map() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(20, this->_internal_jump_puzzle_map(), target); - } - - // bool obsidian_sanctum_map = 21; - if (this->obsidian_sanctum_map() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(21, this->_internal_obsidian_sanctum_map(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->_internal_lunar_new_year(), target); } - // bool edge_of_the_mists_map = 22; - if (this->edge_of_the_mists_map() != 0) { + // bool super_adventure_festival = 5; + if (this->super_adventure_festival() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(22, this->_internal_edge_of_the_mists_map(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->_internal_super_adventure_festival(), target); } - // bool public_mini_map = 23; - if (this->public_mini_map() != 0) { + // bool wintersday = 6; + if (this->wintersday() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(23, this->_internal_public_mini_map(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(6, this->_internal_wintersday(), target); } - // bool wvw_lounge_map = 24; - if (this->wvw_lounge_map() != 0) { + // bool none = 7; + if (this->none() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(24, this->_internal_wvw_lounge_map(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(7, this->_internal_none(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } - // @@protoc_insertion_point(serialize_to_array_end:Proto_Node.Trail.map_type_filter) + // @@protoc_insertion_point(serialize_to_array_end:FestivalFilter) return target; } -size_t Trail_map_type_filter::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Proto_Node.Trail.map_type_filter) +size_t FestivalFilter::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:FestivalFilter) size_t total_size = 0; ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // bool unknown_map = 1; - if (this->unknown_map() != 0) { - total_size += 1 + 1; - } - - // bool redirect_map = 2; - if (this->redirect_map() != 0) { - total_size += 1 + 1; - } - - // bool character_create_map = 3; - if (this->character_create_map() != 0) { - total_size += 1 + 1; - } - - // bool pvp_map = 4; - if (this->pvp_map() != 0) { - total_size += 1 + 1; - } - - // bool gvg_map = 5; - if (this->gvg_map() != 0) { - total_size += 1 + 1; - } - - // bool instance_map = 6; - if (this->instance_map() != 0) { - total_size += 1 + 1; - } - - // bool public_map = 7; - if (this->public_map() != 0) { - total_size += 1 + 1; - } - - // bool tournament_map = 8; - if (this->tournament_map() != 0) { - total_size += 1 + 1; - } - - // bool tutorial_map = 9; - if (this->tutorial_map() != 0) { + // bool dragonbash = 1; + if (this->dragonbash() != 0) { total_size += 1 + 1; } - // bool user_tournament_map = 10; - if (this->user_tournament_map() != 0) { + // bool festival_of_the_four_winds = 2; + if (this->festival_of_the_four_winds() != 0) { total_size += 1 + 1; } - // bool center_map = 11; - if (this->center_map() != 0) { + // bool halloween = 3; + if (this->halloween() != 0) { total_size += 1 + 1; } - // bool eternal_battlegrounds_map = 12; - if (this->eternal_battlegrounds_map() != 0) { + // bool lunar_new_year = 4; + if (this->lunar_new_year() != 0) { total_size += 1 + 1; } - // bool bluehome_map = 13; - if (this->bluehome_map() != 0) { + // bool super_adventure_festival = 5; + if (this->super_adventure_festival() != 0) { total_size += 1 + 1; } - // bool blue_borderlands_map = 14; - if (this->blue_borderlands_map() != 0) { + // bool wintersday = 6; + if (this->wintersday() != 0) { total_size += 1 + 1; } - // bool green_home_map = 15; - if (this->green_home_map() != 0) { + // bool none = 7; + if (this->none() != 0) { total_size += 1 + 1; } - // bool green_borderlands_map = 16; - if (this->green_borderlands_map() != 0) { - total_size += 2 + 1; - } - - // bool red_home_map = 17; - if (this->red_home_map() != 0) { - total_size += 2 + 1; - } - - // bool red_borderlands_map = 18; - if (this->red_borderlands_map() != 0) { - total_size += 2 + 1; - } - - // bool fortunes_vale_map = 19; - if (this->fortunes_vale_map() != 0) { - total_size += 2 + 1; - } - - // bool jump_puzzle_map = 20; - if (this->jump_puzzle_map() != 0) { - total_size += 2 + 1; - } - - // bool obsidian_sanctum_map = 21; - if (this->obsidian_sanctum_map() != 0) { - total_size += 2 + 1; - } - - // bool edge_of_the_mists_map = 22; - if (this->edge_of_the_mists_map() != 0) { - total_size += 2 + 1; - } - - // bool public_mini_map = 23; - if (this->public_mini_map() != 0) { - total_size += 2 + 1; - } - - // bool wvw_lounge_map = 24; - if (this->wvw_lounge_map() != 0) { - total_size += 2 + 1; - } - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( _internal_metadata_, total_size, &_cached_size_); @@ -4867,203 +5128,152 @@ size_t Trail_map_type_filter::ByteSizeLong() const { return total_size; } -void Trail_map_type_filter::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:Proto_Node.Trail.map_type_filter) +void FestivalFilter::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:FestivalFilter) GOOGLE_DCHECK_NE(&from, this); - const Trail_map_type_filter* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + const FestivalFilter* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:Proto_Node.Trail.map_type_filter) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:FestivalFilter) ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:Proto_Node.Trail.map_type_filter) + // @@protoc_insertion_point(generalized_merge_from_cast_success:FestivalFilter) MergeFrom(*source); } } -void Trail_map_type_filter::MergeFrom(const Trail_map_type_filter& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:Proto_Node.Trail.map_type_filter) +void FestivalFilter::MergeFrom(const FestivalFilter& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:FestivalFilter) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - if (from.unknown_map() != 0) { - _internal_set_unknown_map(from._internal_unknown_map()); + if (from.dragonbash() != 0) { + _internal_set_dragonbash(from._internal_dragonbash()); } - if (from.redirect_map() != 0) { - _internal_set_redirect_map(from._internal_redirect_map()); + if (from.festival_of_the_four_winds() != 0) { + _internal_set_festival_of_the_four_winds(from._internal_festival_of_the_four_winds()); } - if (from.character_create_map() != 0) { - _internal_set_character_create_map(from._internal_character_create_map()); + if (from.halloween() != 0) { + _internal_set_halloween(from._internal_halloween()); } - if (from.pvp_map() != 0) { - _internal_set_pvp_map(from._internal_pvp_map()); + if (from.lunar_new_year() != 0) { + _internal_set_lunar_new_year(from._internal_lunar_new_year()); } - if (from.gvg_map() != 0) { - _internal_set_gvg_map(from._internal_gvg_map()); + if (from.super_adventure_festival() != 0) { + _internal_set_super_adventure_festival(from._internal_super_adventure_festival()); } - if (from.instance_map() != 0) { - _internal_set_instance_map(from._internal_instance_map()); - } - if (from.public_map() != 0) { - _internal_set_public_map(from._internal_public_map()); - } - if (from.tournament_map() != 0) { - _internal_set_tournament_map(from._internal_tournament_map()); - } - if (from.tutorial_map() != 0) { - _internal_set_tutorial_map(from._internal_tutorial_map()); - } - if (from.user_tournament_map() != 0) { - _internal_set_user_tournament_map(from._internal_user_tournament_map()); - } - if (from.center_map() != 0) { - _internal_set_center_map(from._internal_center_map()); - } - if (from.eternal_battlegrounds_map() != 0) { - _internal_set_eternal_battlegrounds_map(from._internal_eternal_battlegrounds_map()); - } - if (from.bluehome_map() != 0) { - _internal_set_bluehome_map(from._internal_bluehome_map()); - } - if (from.blue_borderlands_map() != 0) { - _internal_set_blue_borderlands_map(from._internal_blue_borderlands_map()); - } - if (from.green_home_map() != 0) { - _internal_set_green_home_map(from._internal_green_home_map()); - } - if (from.green_borderlands_map() != 0) { - _internal_set_green_borderlands_map(from._internal_green_borderlands_map()); - } - if (from.red_home_map() != 0) { - _internal_set_red_home_map(from._internal_red_home_map()); - } - if (from.red_borderlands_map() != 0) { - _internal_set_red_borderlands_map(from._internal_red_borderlands_map()); - } - if (from.fortunes_vale_map() != 0) { - _internal_set_fortunes_vale_map(from._internal_fortunes_vale_map()); - } - if (from.jump_puzzle_map() != 0) { - _internal_set_jump_puzzle_map(from._internal_jump_puzzle_map()); - } - if (from.obsidian_sanctum_map() != 0) { - _internal_set_obsidian_sanctum_map(from._internal_obsidian_sanctum_map()); - } - if (from.edge_of_the_mists_map() != 0) { - _internal_set_edge_of_the_mists_map(from._internal_edge_of_the_mists_map()); - } - if (from.public_mini_map() != 0) { - _internal_set_public_mini_map(from._internal_public_mini_map()); + if (from.wintersday() != 0) { + _internal_set_wintersday(from._internal_wintersday()); } - if (from.wvw_lounge_map() != 0) { - _internal_set_wvw_lounge_map(from._internal_wvw_lounge_map()); + if (from.none() != 0) { + _internal_set_none(from._internal_none()); } } -void Trail_map_type_filter::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:Proto_Node.Trail.map_type_filter) +void FestivalFilter::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:FestivalFilter) if (&from == this) return; Clear(); MergeFrom(from); } -void Trail_map_type_filter::CopyFrom(const Trail_map_type_filter& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Proto_Node.Trail.map_type_filter) +void FestivalFilter::CopyFrom(const FestivalFilter& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:FestivalFilter) if (&from == this) return; Clear(); MergeFrom(from); } -bool Trail_map_type_filter::IsInitialized() const { +bool FestivalFilter::IsInitialized() const { return true; } -void Trail_map_type_filter::InternalSwap(Trail_map_type_filter* other) { +void FestivalFilter::InternalSwap(FestivalFilter* other) { using std::swap; _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(Trail_map_type_filter, wvw_lounge_map_) - + sizeof(Trail_map_type_filter::wvw_lounge_map_) - - PROTOBUF_FIELD_OFFSET(Trail_map_type_filter, unknown_map_)>( - reinterpret_cast(&unknown_map_), - reinterpret_cast(&other->unknown_map_)); + PROTOBUF_FIELD_OFFSET(FestivalFilter, none_) + + sizeof(FestivalFilter::none_) + - PROTOBUF_FIELD_OFFSET(FestivalFilter, dragonbash_)>( + reinterpret_cast(&dragonbash_), + reinterpret_cast(&other->dragonbash_)); } -::PROTOBUF_NAMESPACE_ID::Metadata Trail_map_type_filter::GetMetadata() const { +::PROTOBUF_NAMESPACE_ID::Metadata FestivalFilter::GetMetadata() const { return GetMetadataStatic(); } // =================================================================== -void Trail_mount_filter::InitAsDefaultInstance() { +void MapTypeFilter::InitAsDefaultInstance() { } -class Trail_mount_filter::_Internal { +class MapTypeFilter::_Internal { public: }; -Trail_mount_filter::Trail_mount_filter(::PROTOBUF_NAMESPACE_ID::Arena* arena) +MapTypeFilter::MapTypeFilter(::PROTOBUF_NAMESPACE_ID::Arena* arena) : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:Proto_Node.Trail.mount_filter) + // @@protoc_insertion_point(arena_constructor:MapTypeFilter) } -Trail_mount_filter::Trail_mount_filter(const Trail_mount_filter& from) +MapTypeFilter::MapTypeFilter(const MapTypeFilter& from) : ::PROTOBUF_NAMESPACE_ID::Message() { _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::memcpy(&raptor_, &from.raptor_, - static_cast(reinterpret_cast(&seige_turtle_) - - reinterpret_cast(&raptor_)) + sizeof(seige_turtle_)); - // @@protoc_insertion_point(copy_constructor:Proto_Node.Trail.mount_filter) + ::memcpy(&unknown_map_, &from.unknown_map_, + static_cast(reinterpret_cast(&wvw_lounge_map_) - + reinterpret_cast(&unknown_map_)) + sizeof(wvw_lounge_map_)); + // @@protoc_insertion_point(copy_constructor:MapTypeFilter) } -void Trail_mount_filter::SharedCtor() { - ::memset(&raptor_, 0, static_cast( - reinterpret_cast(&seige_turtle_) - - reinterpret_cast(&raptor_)) + sizeof(seige_turtle_)); +void MapTypeFilter::SharedCtor() { + ::memset(&unknown_map_, 0, static_cast( + reinterpret_cast(&wvw_lounge_map_) - + reinterpret_cast(&unknown_map_)) + sizeof(wvw_lounge_map_)); } -Trail_mount_filter::~Trail_mount_filter() { - // @@protoc_insertion_point(destructor:Proto_Node.Trail.mount_filter) +MapTypeFilter::~MapTypeFilter() { + // @@protoc_insertion_point(destructor:MapTypeFilter) SharedDtor(); _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -void Trail_mount_filter::SharedDtor() { +void MapTypeFilter::SharedDtor() { GOOGLE_DCHECK(GetArena() == nullptr); } -void Trail_mount_filter::ArenaDtor(void* object) { - Trail_mount_filter* _this = reinterpret_cast< Trail_mount_filter* >(object); +void MapTypeFilter::ArenaDtor(void* object) { + MapTypeFilter* _this = reinterpret_cast< MapTypeFilter* >(object); (void)_this; } -void Trail_mount_filter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +void MapTypeFilter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } -void Trail_mount_filter::SetCachedSize(int size) const { +void MapTypeFilter::SetCachedSize(int size) const { _cached_size_.Set(size); } -const Trail_mount_filter& Trail_mount_filter::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Trail_mount_filter_node_2eproto.base); +const MapTypeFilter& MapTypeFilter::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_MapTypeFilter_generators_2fproto_5ftemplates_2fnode_2eproto.base); return *internal_default_instance(); } -void Trail_mount_filter::Clear() { -// @@protoc_insertion_point(message_clear_start:Proto_Node.Trail.mount_filter) +void MapTypeFilter::Clear() { +// @@protoc_insertion_point(message_clear_start:MapTypeFilter) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - ::memset(&raptor_, 0, static_cast( - reinterpret_cast(&seige_turtle_) - - reinterpret_cast(&raptor_)) + sizeof(seige_turtle_)); + ::memset(&unknown_map_, 0, static_cast( + reinterpret_cast(&wvw_lounge_map_) - + reinterpret_cast(&unknown_map_)) + sizeof(wvw_lounge_map_)); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -const char* Trail_mount_filter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +const char* MapTypeFilter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { @@ -5071,73 +5281,171 @@ const char* Trail_mount_filter::_InternalParse(const char* ptr, ::PROTOBUF_NAMES ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); CHK_(ptr); switch (tag >> 3) { - // bool raptor = 1; + // bool unknown_map = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - raptor_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + unknown_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; - // bool springer = 2; + // bool redirect_map = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { - springer_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + redirect_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; - // bool skimmer = 3; + // bool character_create_map = 3; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { - skimmer_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + character_create_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; - // bool jackal = 4; + // bool pvp_map = 4; case 4: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { - jackal_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + pvp_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; - // bool griffon = 5; + // bool gvg_map = 5; case 5: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { - griffon_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + gvg_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; - // bool roller_beetle = 6; + // bool instance_map = 6; case 6: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) { - roller_beetle_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + instance_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; - // bool warclaw = 7; + // bool public_map = 7; case 7: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) { - warclaw_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + public_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; - // bool skyscalee = 8; + // bool tournament_map = 8; case 8: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 64)) { - skyscalee_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + tournament_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; - // bool skiff = 9; + // bool tutorial_map = 9; case 9: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 72)) { - skiff_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + tutorial_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; - // bool seige_turtle = 10; + // bool user_tournament_map = 10; case 10: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 80)) { - seige_turtle_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + user_tournament_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool center_map = 11; + case 11: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 88)) { + center_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool eternal_battlegrounds_map = 12; + case 12: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 96)) { + eternal_battlegrounds_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool bluehome_map = 13; + case 13: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 104)) { + bluehome_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool blue_borderlands_map = 14; + case 14: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 112)) { + blue_borderlands_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool green_home_map = 15; + case 15: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 120)) { + green_home_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool green_borderlands_map = 16; + case 16: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 128)) { + green_borderlands_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool red_home_map = 17; + case 17: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 136)) { + red_home_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool red_borderlands_map = 18; + case 18: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 144)) { + red_borderlands_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool fortunes_vale_map = 19; + case 19: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 152)) { + fortunes_vale_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool jump_puzzle_map = 20; + case 20: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 160)) { + jump_puzzle_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool obsidian_sanctum_map = 21; + case 21: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 168)) { + obsidian_sanctum_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool edge_of_the_mists_map = 22; + case 22: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 176)) { + edge_of_the_mists_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool public_mini_map = 23; + case 23: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 184)) { + public_mini_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool wvw_lounge_map = 24; + case 24: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 192)) { + wvw_lounge_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; @@ -5163,138 +5471,292 @@ const char* Trail_mount_filter::_InternalParse(const char* ptr, ::PROTOBUF_NAMES #undef CHK_ } -::PROTOBUF_NAMESPACE_ID::uint8* Trail_mount_filter::_InternalSerialize( +::PROTOBUF_NAMESPACE_ID::uint8* MapTypeFilter::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Proto_Node.Trail.mount_filter) + // @@protoc_insertion_point(serialize_to_array_start:MapTypeFilter) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - // bool raptor = 1; - if (this->raptor() != 0) { + // bool unknown_map = 1; + if (this->unknown_map() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->_internal_raptor(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->_internal_unknown_map(), target); } - // bool springer = 2; - if (this->springer() != 0) { + // bool redirect_map = 2; + if (this->redirect_map() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_springer(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_redirect_map(), target); } - // bool skimmer = 3; - if (this->skimmer() != 0) { + // bool character_create_map = 3; + if (this->character_create_map() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_skimmer(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_character_create_map(), target); } - // bool jackal = 4; - if (this->jackal() != 0) { + // bool pvp_map = 4; + if (this->pvp_map() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->_internal_jackal(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->_internal_pvp_map(), target); } - // bool griffon = 5; - if (this->griffon() != 0) { + // bool gvg_map = 5; + if (this->gvg_map() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->_internal_griffon(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->_internal_gvg_map(), target); } - // bool roller_beetle = 6; - if (this->roller_beetle() != 0) { + // bool instance_map = 6; + if (this->instance_map() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(6, this->_internal_roller_beetle(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(6, this->_internal_instance_map(), target); } - // bool warclaw = 7; - if (this->warclaw() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(7, this->_internal_warclaw(), target); + // bool public_map = 7; + if (this->public_map() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(7, this->_internal_public_map(), target); } - // bool skyscalee = 8; - if (this->skyscalee() != 0) { + // bool tournament_map = 8; + if (this->tournament_map() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(8, this->_internal_skyscalee(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(8, this->_internal_tournament_map(), target); } - // bool skiff = 9; - if (this->skiff() != 0) { + // bool tutorial_map = 9; + if (this->tutorial_map() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(9, this->_internal_skiff(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(9, this->_internal_tutorial_map(), target); } - // bool seige_turtle = 10; - if (this->seige_turtle() != 0) { + // bool user_tournament_map = 10; + if (this->user_tournament_map() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(10, this->_internal_seige_turtle(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(10, this->_internal_user_tournament_map(), target); + } + + // bool center_map = 11; + if (this->center_map() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(11, this->_internal_center_map(), target); + } + + // bool eternal_battlegrounds_map = 12; + if (this->eternal_battlegrounds_map() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(12, this->_internal_eternal_battlegrounds_map(), target); + } + + // bool bluehome_map = 13; + if (this->bluehome_map() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(13, this->_internal_bluehome_map(), target); + } + + // bool blue_borderlands_map = 14; + if (this->blue_borderlands_map() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(14, this->_internal_blue_borderlands_map(), target); + } + + // bool green_home_map = 15; + if (this->green_home_map() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(15, this->_internal_green_home_map(), target); + } + + // bool green_borderlands_map = 16; + if (this->green_borderlands_map() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(16, this->_internal_green_borderlands_map(), target); + } + + // bool red_home_map = 17; + if (this->red_home_map() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(17, this->_internal_red_home_map(), target); + } + + // bool red_borderlands_map = 18; + if (this->red_borderlands_map() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(18, this->_internal_red_borderlands_map(), target); + } + + // bool fortunes_vale_map = 19; + if (this->fortunes_vale_map() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(19, this->_internal_fortunes_vale_map(), target); + } + + // bool jump_puzzle_map = 20; + if (this->jump_puzzle_map() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(20, this->_internal_jump_puzzle_map(), target); + } + + // bool obsidian_sanctum_map = 21; + if (this->obsidian_sanctum_map() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(21, this->_internal_obsidian_sanctum_map(), target); + } + + // bool edge_of_the_mists_map = 22; + if (this->edge_of_the_mists_map() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(22, this->_internal_edge_of_the_mists_map(), target); + } + + // bool public_mini_map = 23; + if (this->public_mini_map() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(23, this->_internal_public_mini_map(), target); + } + + // bool wvw_lounge_map = 24; + if (this->wvw_lounge_map() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(24, this->_internal_wvw_lounge_map(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } - // @@protoc_insertion_point(serialize_to_array_end:Proto_Node.Trail.mount_filter) + // @@protoc_insertion_point(serialize_to_array_end:MapTypeFilter) return target; } -size_t Trail_mount_filter::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Proto_Node.Trail.mount_filter) +size_t MapTypeFilter::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:MapTypeFilter) size_t total_size = 0; ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // bool raptor = 1; - if (this->raptor() != 0) { + // bool unknown_map = 1; + if (this->unknown_map() != 0) { total_size += 1 + 1; } - // bool springer = 2; - if (this->springer() != 0) { + // bool redirect_map = 2; + if (this->redirect_map() != 0) { total_size += 1 + 1; } - // bool skimmer = 3; - if (this->skimmer() != 0) { + // bool character_create_map = 3; + if (this->character_create_map() != 0) { total_size += 1 + 1; } - // bool jackal = 4; - if (this->jackal() != 0) { + // bool pvp_map = 4; + if (this->pvp_map() != 0) { total_size += 1 + 1; } - // bool griffon = 5; - if (this->griffon() != 0) { + // bool gvg_map = 5; + if (this->gvg_map() != 0) { total_size += 1 + 1; } - // bool roller_beetle = 6; - if (this->roller_beetle() != 0) { + // bool instance_map = 6; + if (this->instance_map() != 0) { total_size += 1 + 1; } - // bool warclaw = 7; - if (this->warclaw() != 0) { + // bool public_map = 7; + if (this->public_map() != 0) { total_size += 1 + 1; } - // bool skyscalee = 8; - if (this->skyscalee() != 0) { + // bool tournament_map = 8; + if (this->tournament_map() != 0) { total_size += 1 + 1; } - // bool skiff = 9; - if (this->skiff() != 0) { + // bool tutorial_map = 9; + if (this->tutorial_map() != 0) { total_size += 1 + 1; } - // bool seige_turtle = 10; - if (this->seige_turtle() != 0) { + // bool user_tournament_map = 10; + if (this->user_tournament_map() != 0) { + total_size += 1 + 1; + } + + // bool center_map = 11; + if (this->center_map() != 0) { + total_size += 1 + 1; + } + + // bool eternal_battlegrounds_map = 12; + if (this->eternal_battlegrounds_map() != 0) { + total_size += 1 + 1; + } + + // bool bluehome_map = 13; + if (this->bluehome_map() != 0) { + total_size += 1 + 1; + } + + // bool blue_borderlands_map = 14; + if (this->blue_borderlands_map() != 0) { + total_size += 1 + 1; + } + + // bool green_home_map = 15; + if (this->green_home_map() != 0) { total_size += 1 + 1; } + // bool green_borderlands_map = 16; + if (this->green_borderlands_map() != 0) { + total_size += 2 + 1; + } + + // bool red_home_map = 17; + if (this->red_home_map() != 0) { + total_size += 2 + 1; + } + + // bool red_borderlands_map = 18; + if (this->red_borderlands_map() != 0) { + total_size += 2 + 1; + } + + // bool fortunes_vale_map = 19; + if (this->fortunes_vale_map() != 0) { + total_size += 2 + 1; + } + + // bool jump_puzzle_map = 20; + if (this->jump_puzzle_map() != 0) { + total_size += 2 + 1; + } + + // bool obsidian_sanctum_map = 21; + if (this->obsidian_sanctum_map() != 0) { + total_size += 2 + 1; + } + + // bool edge_of_the_mists_map = 22; + if (this->edge_of_the_mists_map() != 0) { + total_size += 2 + 1; + } + + // bool public_mini_map = 23; + if (this->public_mini_map() != 0) { + total_size += 2 + 1; + } + + // bool wvw_lounge_map = 24; + if (this->wvw_lounge_map() != 0) { + total_size += 2 + 1; + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( _internal_metadata_, total_size, &_cached_size_); @@ -5304,161 +5766,203 @@ size_t Trail_mount_filter::ByteSizeLong() const { return total_size; } -void Trail_mount_filter::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:Proto_Node.Trail.mount_filter) +void MapTypeFilter::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:MapTypeFilter) GOOGLE_DCHECK_NE(&from, this); - const Trail_mount_filter* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + const MapTypeFilter* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:Proto_Node.Trail.mount_filter) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:MapTypeFilter) ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:Proto_Node.Trail.mount_filter) + // @@protoc_insertion_point(generalized_merge_from_cast_success:MapTypeFilter) MergeFrom(*source); } } -void Trail_mount_filter::MergeFrom(const Trail_mount_filter& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:Proto_Node.Trail.mount_filter) +void MapTypeFilter::MergeFrom(const MapTypeFilter& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:MapTypeFilter) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - if (from.raptor() != 0) { - _internal_set_raptor(from._internal_raptor()); - } - if (from.springer() != 0) { - _internal_set_springer(from._internal_springer()); + if (from.unknown_map() != 0) { + _internal_set_unknown_map(from._internal_unknown_map()); } - if (from.skimmer() != 0) { - _internal_set_skimmer(from._internal_skimmer()); + if (from.redirect_map() != 0) { + _internal_set_redirect_map(from._internal_redirect_map()); } - if (from.jackal() != 0) { - _internal_set_jackal(from._internal_jackal()); + if (from.character_create_map() != 0) { + _internal_set_character_create_map(from._internal_character_create_map()); } - if (from.griffon() != 0) { - _internal_set_griffon(from._internal_griffon()); + if (from.pvp_map() != 0) { + _internal_set_pvp_map(from._internal_pvp_map()); } - if (from.roller_beetle() != 0) { - _internal_set_roller_beetle(from._internal_roller_beetle()); + if (from.gvg_map() != 0) { + _internal_set_gvg_map(from._internal_gvg_map()); } - if (from.warclaw() != 0) { - _internal_set_warclaw(from._internal_warclaw()); + if (from.instance_map() != 0) { + _internal_set_instance_map(from._internal_instance_map()); } - if (from.skyscalee() != 0) { - _internal_set_skyscalee(from._internal_skyscalee()); + if (from.public_map() != 0) { + _internal_set_public_map(from._internal_public_map()); } - if (from.skiff() != 0) { - _internal_set_skiff(from._internal_skiff()); + if (from.tournament_map() != 0) { + _internal_set_tournament_map(from._internal_tournament_map()); } - if (from.seige_turtle() != 0) { - _internal_set_seige_turtle(from._internal_seige_turtle()); + if (from.tutorial_map() != 0) { + _internal_set_tutorial_map(from._internal_tutorial_map()); + } + if (from.user_tournament_map() != 0) { + _internal_set_user_tournament_map(from._internal_user_tournament_map()); + } + if (from.center_map() != 0) { + _internal_set_center_map(from._internal_center_map()); + } + if (from.eternal_battlegrounds_map() != 0) { + _internal_set_eternal_battlegrounds_map(from._internal_eternal_battlegrounds_map()); + } + if (from.bluehome_map() != 0) { + _internal_set_bluehome_map(from._internal_bluehome_map()); + } + if (from.blue_borderlands_map() != 0) { + _internal_set_blue_borderlands_map(from._internal_blue_borderlands_map()); + } + if (from.green_home_map() != 0) { + _internal_set_green_home_map(from._internal_green_home_map()); + } + if (from.green_borderlands_map() != 0) { + _internal_set_green_borderlands_map(from._internal_green_borderlands_map()); + } + if (from.red_home_map() != 0) { + _internal_set_red_home_map(from._internal_red_home_map()); + } + if (from.red_borderlands_map() != 0) { + _internal_set_red_borderlands_map(from._internal_red_borderlands_map()); + } + if (from.fortunes_vale_map() != 0) { + _internal_set_fortunes_vale_map(from._internal_fortunes_vale_map()); + } + if (from.jump_puzzle_map() != 0) { + _internal_set_jump_puzzle_map(from._internal_jump_puzzle_map()); + } + if (from.obsidian_sanctum_map() != 0) { + _internal_set_obsidian_sanctum_map(from._internal_obsidian_sanctum_map()); + } + if (from.edge_of_the_mists_map() != 0) { + _internal_set_edge_of_the_mists_map(from._internal_edge_of_the_mists_map()); + } + if (from.public_mini_map() != 0) { + _internal_set_public_mini_map(from._internal_public_mini_map()); + } + if (from.wvw_lounge_map() != 0) { + _internal_set_wvw_lounge_map(from._internal_wvw_lounge_map()); } } -void Trail_mount_filter::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:Proto_Node.Trail.mount_filter) +void MapTypeFilter::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:MapTypeFilter) if (&from == this) return; Clear(); MergeFrom(from); } -void Trail_mount_filter::CopyFrom(const Trail_mount_filter& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Proto_Node.Trail.mount_filter) +void MapTypeFilter::CopyFrom(const MapTypeFilter& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:MapTypeFilter) if (&from == this) return; Clear(); MergeFrom(from); } -bool Trail_mount_filter::IsInitialized() const { +bool MapTypeFilter::IsInitialized() const { return true; } -void Trail_mount_filter::InternalSwap(Trail_mount_filter* other) { +void MapTypeFilter::InternalSwap(MapTypeFilter* other) { using std::swap; _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(Trail_mount_filter, seige_turtle_) - + sizeof(Trail_mount_filter::seige_turtle_) - - PROTOBUF_FIELD_OFFSET(Trail_mount_filter, raptor_)>( - reinterpret_cast(&raptor_), - reinterpret_cast(&other->raptor_)); + PROTOBUF_FIELD_OFFSET(MapTypeFilter, wvw_lounge_map_) + + sizeof(MapTypeFilter::wvw_lounge_map_) + - PROTOBUF_FIELD_OFFSET(MapTypeFilter, unknown_map_)>( + reinterpret_cast(&unknown_map_), + reinterpret_cast(&other->unknown_map_)); } -::PROTOBUF_NAMESPACE_ID::Metadata Trail_mount_filter::GetMetadata() const { +::PROTOBUF_NAMESPACE_ID::Metadata MapTypeFilter::GetMetadata() const { return GetMetadataStatic(); } // =================================================================== -void Trail_profession_filter::InitAsDefaultInstance() { +void MountFilter::InitAsDefaultInstance() { } -class Trail_profession_filter::_Internal { +class MountFilter::_Internal { public: }; -Trail_profession_filter::Trail_profession_filter(::PROTOBUF_NAMESPACE_ID::Arena* arena) +MountFilter::MountFilter(::PROTOBUF_NAMESPACE_ID::Arena* arena) : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:Proto_Node.Trail.profession_filter) + // @@protoc_insertion_point(arena_constructor:MountFilter) } -Trail_profession_filter::Trail_profession_filter(const Trail_profession_filter& from) +MountFilter::MountFilter(const MountFilter& from) : ::PROTOBUF_NAMESPACE_ID::Message() { _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::memcpy(&guardian_, &from.guardian_, - static_cast(reinterpret_cast(&revenantnt_) - - reinterpret_cast(&guardian_)) + sizeof(revenantnt_)); - // @@protoc_insertion_point(copy_constructor:Proto_Node.Trail.profession_filter) + ::memcpy(&raptor_, &from.raptor_, + static_cast(reinterpret_cast(&seige_turtle_) - + reinterpret_cast(&raptor_)) + sizeof(seige_turtle_)); + // @@protoc_insertion_point(copy_constructor:MountFilter) } -void Trail_profession_filter::SharedCtor() { - ::memset(&guardian_, 0, static_cast( - reinterpret_cast(&revenantnt_) - - reinterpret_cast(&guardian_)) + sizeof(revenantnt_)); +void MountFilter::SharedCtor() { + ::memset(&raptor_, 0, static_cast( + reinterpret_cast(&seige_turtle_) - + reinterpret_cast(&raptor_)) + sizeof(seige_turtle_)); } -Trail_profession_filter::~Trail_profession_filter() { - // @@protoc_insertion_point(destructor:Proto_Node.Trail.profession_filter) +MountFilter::~MountFilter() { + // @@protoc_insertion_point(destructor:MountFilter) SharedDtor(); _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -void Trail_profession_filter::SharedDtor() { +void MountFilter::SharedDtor() { GOOGLE_DCHECK(GetArena() == nullptr); } -void Trail_profession_filter::ArenaDtor(void* object) { - Trail_profession_filter* _this = reinterpret_cast< Trail_profession_filter* >(object); +void MountFilter::ArenaDtor(void* object) { + MountFilter* _this = reinterpret_cast< MountFilter* >(object); (void)_this; } -void Trail_profession_filter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +void MountFilter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } -void Trail_profession_filter::SetCachedSize(int size) const { +void MountFilter::SetCachedSize(int size) const { _cached_size_.Set(size); } -const Trail_profession_filter& Trail_profession_filter::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Trail_profession_filter_node_2eproto.base); +const MountFilter& MountFilter::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_MountFilter_generators_2fproto_5ftemplates_2fnode_2eproto.base); return *internal_default_instance(); } -void Trail_profession_filter::Clear() { -// @@protoc_insertion_point(message_clear_start:Proto_Node.Trail.profession_filter) +void MountFilter::Clear() { +// @@protoc_insertion_point(message_clear_start:MountFilter) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - ::memset(&guardian_, 0, static_cast( - reinterpret_cast(&revenantnt_) - - reinterpret_cast(&guardian_)) + sizeof(revenantnt_)); + ::memset(&raptor_, 0, static_cast( + reinterpret_cast(&seige_turtle_) - + reinterpret_cast(&raptor_)) + sizeof(seige_turtle_)); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -const char* Trail_profession_filter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +const char* MountFilter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { @@ -5466,66 +5970,73 @@ const char* Trail_profession_filter::_InternalParse(const char* ptr, ::PROTOBUF_ ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); CHK_(ptr); switch (tag >> 3) { - // bool guardian = 1; + // bool raptor = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - guardian_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + raptor_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; - // bool warrior = 2; + // bool springer = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { - warrior_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + springer_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; - // bool engineer = 3; + // bool skimmer = 3; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { - engineer_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + skimmer_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; - // bool ranger = 4; + // bool jackal = 4; case 4: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { - ranger_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + jackal_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; - // bool thief = 5; + // bool griffon = 5; case 5: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { - thief_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + griffon_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; - // bool elementalist = 6; + // bool roller_beetle = 6; case 6: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) { - elementalist_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + roller_beetle_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; - // bool mesmer = 7; + // bool warclaw = 7; case 7: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) { - mesmer_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + warclaw_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; - // bool necromancer = 8; + // bool skyscalee = 8; case 8: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 64)) { - necromancer_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + skyscalee_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; - // bool revenantnt = 9; + // bool skiff = 9; case 9: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 72)) { - revenantnt_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + skiff_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool seige_turtle = 10; + case 10: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 80)) { + seige_turtle_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; @@ -5551,124 +6062,135 @@ const char* Trail_profession_filter::_InternalParse(const char* ptr, ::PROTOBUF_ #undef CHK_ } -::PROTOBUF_NAMESPACE_ID::uint8* Trail_profession_filter::_InternalSerialize( +::PROTOBUF_NAMESPACE_ID::uint8* MountFilter::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Proto_Node.Trail.profession_filter) + // @@protoc_insertion_point(serialize_to_array_start:MountFilter) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - // bool guardian = 1; - if (this->guardian() != 0) { + // bool raptor = 1; + if (this->raptor() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->_internal_guardian(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->_internal_raptor(), target); } - // bool warrior = 2; - if (this->warrior() != 0) { + // bool springer = 2; + if (this->springer() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_warrior(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_springer(), target); } - // bool engineer = 3; - if (this->engineer() != 0) { + // bool skimmer = 3; + if (this->skimmer() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_engineer(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_skimmer(), target); } - // bool ranger = 4; - if (this->ranger() != 0) { + // bool jackal = 4; + if (this->jackal() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->_internal_ranger(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->_internal_jackal(), target); } - // bool thief = 5; - if (this->thief() != 0) { + // bool griffon = 5; + if (this->griffon() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->_internal_thief(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->_internal_griffon(), target); } - // bool elementalist = 6; - if (this->elementalist() != 0) { + // bool roller_beetle = 6; + if (this->roller_beetle() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(6, this->_internal_elementalist(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(6, this->_internal_roller_beetle(), target); } - // bool mesmer = 7; - if (this->mesmer() != 0) { + // bool warclaw = 7; + if (this->warclaw() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(7, this->_internal_mesmer(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(7, this->_internal_warclaw(), target); } - // bool necromancer = 8; - if (this->necromancer() != 0) { + // bool skyscalee = 8; + if (this->skyscalee() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(8, this->_internal_necromancer(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(8, this->_internal_skyscalee(), target); } - // bool revenantnt = 9; - if (this->revenantnt() != 0) { + // bool skiff = 9; + if (this->skiff() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(9, this->_internal_revenantnt(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(9, this->_internal_skiff(), target); + } + + // bool seige_turtle = 10; + if (this->seige_turtle() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(10, this->_internal_seige_turtle(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } - // @@protoc_insertion_point(serialize_to_array_end:Proto_Node.Trail.profession_filter) + // @@protoc_insertion_point(serialize_to_array_end:MountFilter) return target; } -size_t Trail_profession_filter::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Proto_Node.Trail.profession_filter) +size_t MountFilter::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:MountFilter) size_t total_size = 0; ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // bool guardian = 1; - if (this->guardian() != 0) { + // bool raptor = 1; + if (this->raptor() != 0) { total_size += 1 + 1; } - // bool warrior = 2; - if (this->warrior() != 0) { + // bool springer = 2; + if (this->springer() != 0) { total_size += 1 + 1; } - // bool engineer = 3; - if (this->engineer() != 0) { + // bool skimmer = 3; + if (this->skimmer() != 0) { total_size += 1 + 1; } - // bool ranger = 4; - if (this->ranger() != 0) { + // bool jackal = 4; + if (this->jackal() != 0) { total_size += 1 + 1; } - // bool thief = 5; - if (this->thief() != 0) { + // bool griffon = 5; + if (this->griffon() != 0) { total_size += 1 + 1; } - // bool elementalist = 6; - if (this->elementalist() != 0) { + // bool roller_beetle = 6; + if (this->roller_beetle() != 0) { total_size += 1 + 1; } - // bool mesmer = 7; - if (this->mesmer() != 0) { + // bool warclaw = 7; + if (this->warclaw() != 0) { total_size += 1 + 1; } - // bool necromancer = 8; - if (this->necromancer() != 0) { + // bool skyscalee = 8; + if (this->skyscalee() != 0) { total_size += 1 + 1; } - // bool revenantnt = 9; - if (this->revenantnt() != 0) { + // bool skiff = 9; + if (this->skiff() != 0) { + total_size += 1 + 1; + } + + // bool seige_turtle = 10; + if (this->seige_turtle() != 0) { total_size += 1 + 1; } @@ -5681,158 +6203,161 @@ size_t Trail_profession_filter::ByteSizeLong() const { return total_size; } -void Trail_profession_filter::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:Proto_Node.Trail.profession_filter) +void MountFilter::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:MountFilter) GOOGLE_DCHECK_NE(&from, this); - const Trail_profession_filter* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + const MountFilter* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:Proto_Node.Trail.profession_filter) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:MountFilter) ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:Proto_Node.Trail.profession_filter) + // @@protoc_insertion_point(generalized_merge_from_cast_success:MountFilter) MergeFrom(*source); } } -void Trail_profession_filter::MergeFrom(const Trail_profession_filter& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:Proto_Node.Trail.profession_filter) +void MountFilter::MergeFrom(const MountFilter& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:MountFilter) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - if (from.guardian() != 0) { - _internal_set_guardian(from._internal_guardian()); + if (from.raptor() != 0) { + _internal_set_raptor(from._internal_raptor()); } - if (from.warrior() != 0) { - _internal_set_warrior(from._internal_warrior()); + if (from.springer() != 0) { + _internal_set_springer(from._internal_springer()); } - if (from.engineer() != 0) { - _internal_set_engineer(from._internal_engineer()); + if (from.skimmer() != 0) { + _internal_set_skimmer(from._internal_skimmer()); } - if (from.ranger() != 0) { - _internal_set_ranger(from._internal_ranger()); + if (from.jackal() != 0) { + _internal_set_jackal(from._internal_jackal()); } - if (from.thief() != 0) { - _internal_set_thief(from._internal_thief()); + if (from.griffon() != 0) { + _internal_set_griffon(from._internal_griffon()); } - if (from.elementalist() != 0) { - _internal_set_elementalist(from._internal_elementalist()); + if (from.roller_beetle() != 0) { + _internal_set_roller_beetle(from._internal_roller_beetle()); } - if (from.mesmer() != 0) { - _internal_set_mesmer(from._internal_mesmer()); + if (from.warclaw() != 0) { + _internal_set_warclaw(from._internal_warclaw()); } - if (from.necromancer() != 0) { - _internal_set_necromancer(from._internal_necromancer()); + if (from.skyscalee() != 0) { + _internal_set_skyscalee(from._internal_skyscalee()); } - if (from.revenantnt() != 0) { - _internal_set_revenantnt(from._internal_revenantnt()); + if (from.skiff() != 0) { + _internal_set_skiff(from._internal_skiff()); + } + if (from.seige_turtle() != 0) { + _internal_set_seige_turtle(from._internal_seige_turtle()); } } -void Trail_profession_filter::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:Proto_Node.Trail.profession_filter) +void MountFilter::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:MountFilter) if (&from == this) return; Clear(); MergeFrom(from); } -void Trail_profession_filter::CopyFrom(const Trail_profession_filter& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Proto_Node.Trail.profession_filter) +void MountFilter::CopyFrom(const MountFilter& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:MountFilter) if (&from == this) return; Clear(); MergeFrom(from); } -bool Trail_profession_filter::IsInitialized() const { +bool MountFilter::IsInitialized() const { return true; } -void Trail_profession_filter::InternalSwap(Trail_profession_filter* other) { +void MountFilter::InternalSwap(MountFilter* other) { using std::swap; _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(Trail_profession_filter, revenantnt_) - + sizeof(Trail_profession_filter::revenantnt_) - - PROTOBUF_FIELD_OFFSET(Trail_profession_filter, guardian_)>( - reinterpret_cast(&guardian_), - reinterpret_cast(&other->guardian_)); + PROTOBUF_FIELD_OFFSET(MountFilter, seige_turtle_) + + sizeof(MountFilter::seige_turtle_) + - PROTOBUF_FIELD_OFFSET(MountFilter, raptor_)>( + reinterpret_cast(&raptor_), + reinterpret_cast(&other->raptor_)); } -::PROTOBUF_NAMESPACE_ID::Metadata Trail_profession_filter::GetMetadata() const { +::PROTOBUF_NAMESPACE_ID::Metadata MountFilter::GetMetadata() const { return GetMetadataStatic(); } // =================================================================== -void Trail_specialization_filter::InitAsDefaultInstance() { +void ProfessionFilter::InitAsDefaultInstance() { } -class Trail_specialization_filter::_Internal { +class ProfessionFilter::_Internal { public: }; -Trail_specialization_filter::Trail_specialization_filter(::PROTOBUF_NAMESPACE_ID::Arena* arena) +ProfessionFilter::ProfessionFilter(::PROTOBUF_NAMESPACE_ID::Arena* arena) : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:Proto_Node.Trail.specialization_filter) + // @@protoc_insertion_point(arena_constructor:ProfessionFilter) } -Trail_specialization_filter::Trail_specialization_filter(const Trail_specialization_filter& from) +ProfessionFilter::ProfessionFilter(const ProfessionFilter& from) : ::PROTOBUF_NAMESPACE_ID::Message() { _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::memcpy(&ranger_wilderness_survival_, &from.ranger_wilderness_survival_, - static_cast(reinterpret_cast(&ranger_untamed_) - - reinterpret_cast(&ranger_wilderness_survival_)) + sizeof(ranger_untamed_)); - // @@protoc_insertion_point(copy_constructor:Proto_Node.Trail.specialization_filter) -} - -void Trail_specialization_filter::SharedCtor() { - ::memset(&ranger_wilderness_survival_, 0, static_cast( - reinterpret_cast(&ranger_untamed_) - - reinterpret_cast(&ranger_wilderness_survival_)) + sizeof(ranger_untamed_)); + ::memcpy(&guardian_, &from.guardian_, + static_cast(reinterpret_cast(&revenantnt_) - + reinterpret_cast(&guardian_)) + sizeof(revenantnt_)); + // @@protoc_insertion_point(copy_constructor:ProfessionFilter) +} + +void ProfessionFilter::SharedCtor() { + ::memset(&guardian_, 0, static_cast( + reinterpret_cast(&revenantnt_) - + reinterpret_cast(&guardian_)) + sizeof(revenantnt_)); } -Trail_specialization_filter::~Trail_specialization_filter() { - // @@protoc_insertion_point(destructor:Proto_Node.Trail.specialization_filter) +ProfessionFilter::~ProfessionFilter() { + // @@protoc_insertion_point(destructor:ProfessionFilter) SharedDtor(); _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -void Trail_specialization_filter::SharedDtor() { +void ProfessionFilter::SharedDtor() { GOOGLE_DCHECK(GetArena() == nullptr); } -void Trail_specialization_filter::ArenaDtor(void* object) { - Trail_specialization_filter* _this = reinterpret_cast< Trail_specialization_filter* >(object); +void ProfessionFilter::ArenaDtor(void* object) { + ProfessionFilter* _this = reinterpret_cast< ProfessionFilter* >(object); (void)_this; } -void Trail_specialization_filter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +void ProfessionFilter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } -void Trail_specialization_filter::SetCachedSize(int size) const { +void ProfessionFilter::SetCachedSize(int size) const { _cached_size_.Set(size); } -const Trail_specialization_filter& Trail_specialization_filter::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Trail_specialization_filter_node_2eproto.base); +const ProfessionFilter& ProfessionFilter::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ProfessionFilter_generators_2fproto_5ftemplates_2fnode_2eproto.base); return *internal_default_instance(); } -void Trail_specialization_filter::Clear() { -// @@protoc_insertion_point(message_clear_start:Proto_Node.Trail.specialization_filter) +void ProfessionFilter::Clear() { +// @@protoc_insertion_point(message_clear_start:ProfessionFilter) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - ::memset(&ranger_wilderness_survival_, 0, static_cast( - reinterpret_cast(&ranger_untamed_) - - reinterpret_cast(&ranger_wilderness_survival_)) + sizeof(ranger_untamed_)); + ::memset(&guardian_, 0, static_cast( + reinterpret_cast(&revenantnt_) - + reinterpret_cast(&guardian_)) + sizeof(revenantnt_)); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -const char* Trail_specialization_filter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +const char* ProfessionFilter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { @@ -5840,520 +6365,79 @@ const char* Trail_specialization_filter::_InternalParse(const char* ptr, ::PROTO ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); CHK_(ptr); switch (tag >> 3) { - // bool mesmer_dueling = 1; + // bool guardian = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - mesmer_dueling_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + guardian_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; - // bool necromancer_death_magic = 2; + // bool warrior = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { - necromancer_death_magic_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + warrior_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; - // bool revenant_invocation = 3; + // bool engineer = 3; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { - revenant_invocation_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + engineer_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; - // bool warrior_strength = 4; + // bool ranger = 4; case 4: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { - warrior_strength_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + ranger_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; - // bool ranger_druid = 5; + // bool thief = 5; case 5: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { - ranger_druid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + thief_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; - // bool engineer_explosives = 6; + // bool elementalist = 6; case 6: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) { - engineer_explosives_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + elementalist_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; - // bool thief_daredevil = 7; + // bool mesmer = 7; case 7: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) { - thief_daredevil_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + mesmer_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; - // bool ranger_marksmanship = 8; + // bool necromancer = 8; case 8: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 64)) { - ranger_marksmanship_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + necromancer_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; - // bool revenant_retribution = 9; + // bool revenantnt = 9; case 9: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 72)) { - revenant_retribution_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool mesmer_domination = 10; - case 10: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 80)) { - mesmer_domination_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool warrior_tactics = 11; - case 11: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 88)) { - warrior_tactics_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool revenant_salvation = 12; - case 12: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 96)) { - revenant_salvation_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool guardian_valor = 13; - case 13: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 104)) { - guardian_valor_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool revenant_corruption = 14; - case 14: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 112)) { - revenant_corruption_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool revenant_devastation = 15; - case 15: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 120)) { - revenant_devastation_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool guardian_radiance = 16; - case 16: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 128)) { - guardian_radiance_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool elementalist_water = 17; - case 17: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 136)) { - elementalist_water_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool warrior_berserker = 18; - case 18: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 144)) { - warrior_berserker_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool necromancer_blood_magic = 19; - case 19: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 152)) { - necromancer_blood_magic_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool thief_shadow_arts = 20; - case 20: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 160)) { - thief_shadow_arts_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool engineer_tools = 21; - case 21: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 168)) { - engineer_tools_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool warrior_defense = 22; - case 22: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 176)) { - warrior_defense_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool mesmer_inspiration = 23; - case 23: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 184)) { - mesmer_inspiration_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool mesmer_illusions = 24; - case 24: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 192)) { - mesmer_illusions_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool ranger_nature_magic = 25; - case 25: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 200)) { - ranger_nature_magic_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool elementalist_earth = 26; - case 26: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 208)) { - elementalist_earth_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool guardian_dragonhunter = 27; - case 27: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 216)) { - guardian_dragonhunter_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool thief_deadly_arts = 28; - case 28: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 224)) { - thief_deadly_arts_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool engineer_alchemy = 29; - case 29: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 232)) { - engineer_alchemy_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool ranger_skirmishing = 30; - case 30: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 240)) { - ranger_skirmishing_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool elementalist_fire = 31; - case 31: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 248)) { - elementalist_fire_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool ranger_beastmastery = 32; - case 32: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 0)) { - ranger_beastmastery_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool ranger_wilderness_survival = 33; - case 33: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - ranger_wilderness_survival_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool necromancer_reaper = 34; - case 34: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { - necromancer_reaper_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool thief_critical_strikes = 35; - case 35: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { - thief_critical_strikes_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool warrior_arms = 36; - case 36: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { - warrior_arms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool elementalist_arcane = 37; - case 37: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { - elementalist_arcane_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool engineer_firearms = 38; - case 38: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) { - engineer_firearms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool necromancer_curses = 39; - case 39: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) { - necromancer_curses_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool mesmer_chronomancer = 40; - case 40: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 64)) { - mesmer_chronomancer_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool elementalist_air = 41; - case 41: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 72)) { - elementalist_air_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool guardian_zeal = 42; - case 42: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 80)) { - guardian_zeal_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + revenantnt_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; - // bool engineer_scrapper = 43; - case 43: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 88)) { - engineer_scrapper_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool thief_trickery = 44; - case 44: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 96)) { - thief_trickery_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool mesmer_chaos = 45; - case 45: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 104)) { - mesmer_chaos_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool guardian_virtues = 46; - case 46: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 112)) { - guardian_virtues_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool engineer_inventions = 47; - case 47: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 120)) { - engineer_inventions_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool elementalist_tempest = 48; - case 48: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 128)) { - elementalist_tempest_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool guardian_honor = 49; - case 49: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 136)) { - guardian_honor_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool necromancer_soul_reaping = 50; - case 50: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 144)) { - necromancer_soul_reaping_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool warrior_discipline = 51; - case 51: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 152)) { - warrior_discipline_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool revenant_herald = 52; - case 52: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 160)) { - revenant_herald_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool necromancer_spite = 53; - case 53: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 168)) { - necromancer_spite_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool thief_acrobatics = 54; - case 54: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 176)) { - thief_acrobatics_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool ranger_soulbeast = 55; - case 55: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 184)) { - ranger_soulbeast_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool elementalist_weaver = 56; - case 56: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 192)) { - elementalist_weaver_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool engineer_holosmith = 57; - case 57: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 200)) { - engineer_holosmith_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool thief_deadeye = 58; - case 58: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 208)) { - thief_deadeye_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool mesmer_mirage = 59; - case 59: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 216)) { - mesmer_mirage_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool necromancer_scourge = 60; - case 60: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 224)) { - necromancer_scourge_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool warrior_spellbreaker = 61; - case 61: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 232)) { - warrior_spellbreaker_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool guardian_firebrand = 62; - case 62: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 240)) { - guardian_firebrand_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool revenant_renegade = 63; - case 63: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 248)) { - revenant_renegade_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool necromancer_harbinger = 64; - case 64: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 0)) { - necromancer_harbinger_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool guardian_willbender = 65; - case 65: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - guardian_willbender_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool mesmer_virtuoso = 66; - case 66: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { - mesmer_virtuoso_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool elmentalist_catalyst = 67; - case 67: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { - elmentalist_catalyst_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool warrior_bladesworn = 68; - case 68: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { - warrior_bladesworn_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool revenant_vindicator = 69; - case 69: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { - revenant_vindicator_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool engineer_mechanist = 70; - case 70: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) { - engineer_mechanist_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool thief_specter = 71; - case 71: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) { - thief_specter_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool ranger_untamed = 72; - case 72: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 64)) { - ranger_untamed_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - default: { - handle_unusual: - if ((tag & 7) == 4 || tag == 0) { - ctx->SetLastTag(tag); - goto success; - } - ptr = UnknownFieldParse(tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); continue; } } // switch @@ -6366,995 +6450,1666 @@ const char* Trail_specialization_filter::_InternalParse(const char* ptr, ::PROTO #undef CHK_ } -::PROTOBUF_NAMESPACE_ID::uint8* Trail_specialization_filter::_InternalSerialize( +::PROTOBUF_NAMESPACE_ID::uint8* ProfessionFilter::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Proto_Node.Trail.specialization_filter) + // @@protoc_insertion_point(serialize_to_array_start:ProfessionFilter) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - // bool mesmer_dueling = 1; - if (this->mesmer_dueling() != 0) { + // bool guardian = 1; + if (this->guardian() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->_internal_mesmer_dueling(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->_internal_guardian(), target); } - // bool necromancer_death_magic = 2; - if (this->necromancer_death_magic() != 0) { + // bool warrior = 2; + if (this->warrior() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_necromancer_death_magic(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_warrior(), target); } - // bool revenant_invocation = 3; - if (this->revenant_invocation() != 0) { + // bool engineer = 3; + if (this->engineer() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_revenant_invocation(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_engineer(), target); } - // bool warrior_strength = 4; - if (this->warrior_strength() != 0) { + // bool ranger = 4; + if (this->ranger() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->_internal_warrior_strength(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->_internal_ranger(), target); } - // bool ranger_druid = 5; - if (this->ranger_druid() != 0) { + // bool thief = 5; + if (this->thief() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->_internal_ranger_druid(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->_internal_thief(), target); } - // bool engineer_explosives = 6; - if (this->engineer_explosives() != 0) { + // bool elementalist = 6; + if (this->elementalist() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(6, this->_internal_engineer_explosives(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(6, this->_internal_elementalist(), target); } - // bool thief_daredevil = 7; - if (this->thief_daredevil() != 0) { + // bool mesmer = 7; + if (this->mesmer() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(7, this->_internal_thief_daredevil(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(7, this->_internal_mesmer(), target); } - // bool ranger_marksmanship = 8; - if (this->ranger_marksmanship() != 0) { + // bool necromancer = 8; + if (this->necromancer() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(8, this->_internal_ranger_marksmanship(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(8, this->_internal_necromancer(), target); } - // bool revenant_retribution = 9; - if (this->revenant_retribution() != 0) { + // bool revenantnt = 9; + if (this->revenantnt() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(9, this->_internal_revenant_retribution(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(9, this->_internal_revenantnt(), target); } - // bool mesmer_domination = 10; - if (this->mesmer_domination() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(10, this->_internal_mesmer_domination(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } + // @@protoc_insertion_point(serialize_to_array_end:ProfessionFilter) + return target; +} - // bool warrior_tactics = 11; - if (this->warrior_tactics() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(11, this->_internal_warrior_tactics(), target); - } +size_t ProfessionFilter::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:ProfessionFilter) + size_t total_size = 0; - // bool revenant_salvation = 12; - if (this->revenant_salvation() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(12, this->_internal_revenant_salvation(), target); - } + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; - // bool guardian_valor = 13; - if (this->guardian_valor() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(13, this->_internal_guardian_valor(), target); + // bool guardian = 1; + if (this->guardian() != 0) { + total_size += 1 + 1; } - // bool revenant_corruption = 14; - if (this->revenant_corruption() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(14, this->_internal_revenant_corruption(), target); + // bool warrior = 2; + if (this->warrior() != 0) { + total_size += 1 + 1; } - // bool revenant_devastation = 15; - if (this->revenant_devastation() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(15, this->_internal_revenant_devastation(), target); + // bool engineer = 3; + if (this->engineer() != 0) { + total_size += 1 + 1; } - // bool guardian_radiance = 16; - if (this->guardian_radiance() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(16, this->_internal_guardian_radiance(), target); + // bool ranger = 4; + if (this->ranger() != 0) { + total_size += 1 + 1; } - // bool elementalist_water = 17; - if (this->elementalist_water() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(17, this->_internal_elementalist_water(), target); - } - - // bool warrior_berserker = 18; - if (this->warrior_berserker() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(18, this->_internal_warrior_berserker(), target); - } - - // bool necromancer_blood_magic = 19; - if (this->necromancer_blood_magic() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(19, this->_internal_necromancer_blood_magic(), target); - } - - // bool thief_shadow_arts = 20; - if (this->thief_shadow_arts() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(20, this->_internal_thief_shadow_arts(), target); - } - - // bool engineer_tools = 21; - if (this->engineer_tools() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(21, this->_internal_engineer_tools(), target); - } - - // bool warrior_defense = 22; - if (this->warrior_defense() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(22, this->_internal_warrior_defense(), target); - } - - // bool mesmer_inspiration = 23; - if (this->mesmer_inspiration() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(23, this->_internal_mesmer_inspiration(), target); - } - - // bool mesmer_illusions = 24; - if (this->mesmer_illusions() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(24, this->_internal_mesmer_illusions(), target); - } - - // bool ranger_nature_magic = 25; - if (this->ranger_nature_magic() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(25, this->_internal_ranger_nature_magic(), target); - } - - // bool elementalist_earth = 26; - if (this->elementalist_earth() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(26, this->_internal_elementalist_earth(), target); - } - - // bool guardian_dragonhunter = 27; - if (this->guardian_dragonhunter() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(27, this->_internal_guardian_dragonhunter(), target); - } - - // bool thief_deadly_arts = 28; - if (this->thief_deadly_arts() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(28, this->_internal_thief_deadly_arts(), target); - } - - // bool engineer_alchemy = 29; - if (this->engineer_alchemy() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(29, this->_internal_engineer_alchemy(), target); - } - - // bool ranger_skirmishing = 30; - if (this->ranger_skirmishing() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(30, this->_internal_ranger_skirmishing(), target); - } - - // bool elementalist_fire = 31; - if (this->elementalist_fire() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(31, this->_internal_elementalist_fire(), target); - } - - // bool ranger_beastmastery = 32; - if (this->ranger_beastmastery() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(32, this->_internal_ranger_beastmastery(), target); + // bool thief = 5; + if (this->thief() != 0) { + total_size += 1 + 1; } - // bool ranger_wilderness_survival = 33; - if (this->ranger_wilderness_survival() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(33, this->_internal_ranger_wilderness_survival(), target); + // bool elementalist = 6; + if (this->elementalist() != 0) { + total_size += 1 + 1; } - // bool necromancer_reaper = 34; - if (this->necromancer_reaper() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(34, this->_internal_necromancer_reaper(), target); + // bool mesmer = 7; + if (this->mesmer() != 0) { + total_size += 1 + 1; } - // bool thief_critical_strikes = 35; - if (this->thief_critical_strikes() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(35, this->_internal_thief_critical_strikes(), target); + // bool necromancer = 8; + if (this->necromancer() != 0) { + total_size += 1 + 1; } - // bool warrior_arms = 36; - if (this->warrior_arms() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(36, this->_internal_warrior_arms(), target); + // bool revenantnt = 9; + if (this->revenantnt() != 0) { + total_size += 1 + 1; } - // bool elementalist_arcane = 37; - if (this->elementalist_arcane() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(37, this->_internal_elementalist_arcane(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} - // bool engineer_firearms = 38; - if (this->engineer_firearms() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(38, this->_internal_engineer_firearms(), target); +void ProfessionFilter::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:ProfessionFilter) + GOOGLE_DCHECK_NE(&from, this); + const ProfessionFilter* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:ProfessionFilter) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:ProfessionFilter) + MergeFrom(*source); } +} - // bool necromancer_curses = 39; - if (this->necromancer_curses() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(39, this->_internal_necromancer_curses(), target); - } +void ProfessionFilter::MergeFrom(const ProfessionFilter& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:ProfessionFilter) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; - // bool mesmer_chronomancer = 40; - if (this->mesmer_chronomancer() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(40, this->_internal_mesmer_chronomancer(), target); + if (from.guardian() != 0) { + _internal_set_guardian(from._internal_guardian()); } - - // bool elementalist_air = 41; - if (this->elementalist_air() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(41, this->_internal_elementalist_air(), target); + if (from.warrior() != 0) { + _internal_set_warrior(from._internal_warrior()); } - - // bool guardian_zeal = 42; - if (this->guardian_zeal() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(42, this->_internal_guardian_zeal(), target); + if (from.engineer() != 0) { + _internal_set_engineer(from._internal_engineer()); } - - // bool engineer_scrapper = 43; - if (this->engineer_scrapper() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(43, this->_internal_engineer_scrapper(), target); + if (from.ranger() != 0) { + _internal_set_ranger(from._internal_ranger()); } - - // bool thief_trickery = 44; - if (this->thief_trickery() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(44, this->_internal_thief_trickery(), target); + if (from.thief() != 0) { + _internal_set_thief(from._internal_thief()); } - - // bool mesmer_chaos = 45; - if (this->mesmer_chaos() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(45, this->_internal_mesmer_chaos(), target); + if (from.elementalist() != 0) { + _internal_set_elementalist(from._internal_elementalist()); } - - // bool guardian_virtues = 46; - if (this->guardian_virtues() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(46, this->_internal_guardian_virtues(), target); + if (from.mesmer() != 0) { + _internal_set_mesmer(from._internal_mesmer()); } - - // bool engineer_inventions = 47; - if (this->engineer_inventions() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(47, this->_internal_engineer_inventions(), target); + if (from.necromancer() != 0) { + _internal_set_necromancer(from._internal_necromancer()); } - - // bool elementalist_tempest = 48; - if (this->elementalist_tempest() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(48, this->_internal_elementalist_tempest(), target); + if (from.revenantnt() != 0) { + _internal_set_revenantnt(from._internal_revenantnt()); } +} - // bool guardian_honor = 49; - if (this->guardian_honor() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(49, this->_internal_guardian_honor(), target); - } +void ProfessionFilter::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:ProfessionFilter) + if (&from == this) return; + Clear(); + MergeFrom(from); +} - // bool necromancer_soul_reaping = 50; - if (this->necromancer_soul_reaping() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(50, this->_internal_necromancer_soul_reaping(), target); - } +void ProfessionFilter::CopyFrom(const ProfessionFilter& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:ProfessionFilter) + if (&from == this) return; + Clear(); + MergeFrom(from); +} - // bool warrior_discipline = 51; - if (this->warrior_discipline() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(51, this->_internal_warrior_discipline(), target); - } +bool ProfessionFilter::IsInitialized() const { + return true; +} - // bool revenant_herald = 52; - if (this->revenant_herald() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(52, this->_internal_revenant_herald(), target); - } +void ProfessionFilter::InternalSwap(ProfessionFilter* other) { + using std::swap; + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(ProfessionFilter, revenantnt_) + + sizeof(ProfessionFilter::revenantnt_) + - PROTOBUF_FIELD_OFFSET(ProfessionFilter, guardian_)>( + reinterpret_cast(&guardian_), + reinterpret_cast(&other->guardian_)); +} - // bool necromancer_spite = 53; - if (this->necromancer_spite() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(53, this->_internal_necromancer_spite(), target); - } +::PROTOBUF_NAMESPACE_ID::Metadata ProfessionFilter::GetMetadata() const { + return GetMetadataStatic(); +} - // bool thief_acrobatics = 54; - if (this->thief_acrobatics() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(54, this->_internal_thief_acrobatics(), target); - } - // bool ranger_soulbeast = 55; - if (this->ranger_soulbeast() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(55, this->_internal_ranger_soulbeast(), target); - } +// =================================================================== - // bool elementalist_weaver = 56; - if (this->elementalist_weaver() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(56, this->_internal_elementalist_weaver(), target); - } +void SpecializationFilter::InitAsDefaultInstance() { +} +class SpecializationFilter::_Internal { + public: +}; - // bool engineer_holosmith = 57; - if (this->engineer_holosmith() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(57, this->_internal_engineer_holosmith(), target); - } +SpecializationFilter::SpecializationFilter(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:SpecializationFilter) +} +SpecializationFilter::SpecializationFilter(const SpecializationFilter& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::memcpy(&elementalist_tempest_, &from.elementalist_tempest_, + static_cast(reinterpret_cast(&warrior_tactics_) - + reinterpret_cast(&elementalist_tempest_)) + sizeof(warrior_tactics_)); + // @@protoc_insertion_point(copy_constructor:SpecializationFilter) +} - // bool thief_deadeye = 58; - if (this->thief_deadeye() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(58, this->_internal_thief_deadeye(), target); - } +void SpecializationFilter::SharedCtor() { + ::memset(&elementalist_tempest_, 0, static_cast( + reinterpret_cast(&warrior_tactics_) - + reinterpret_cast(&elementalist_tempest_)) + sizeof(warrior_tactics_)); +} - // bool mesmer_mirage = 59; - if (this->mesmer_mirage() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(59, this->_internal_mesmer_mirage(), target); - } +SpecializationFilter::~SpecializationFilter() { + // @@protoc_insertion_point(destructor:SpecializationFilter) + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} - // bool necromancer_scourge = 60; - if (this->necromancer_scourge() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(60, this->_internal_necromancer_scourge(), target); - } +void SpecializationFilter::SharedDtor() { + GOOGLE_DCHECK(GetArena() == nullptr); +} - // bool warrior_spellbreaker = 61; - if (this->warrior_spellbreaker() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(61, this->_internal_warrior_spellbreaker(), target); - } +void SpecializationFilter::ArenaDtor(void* object) { + SpecializationFilter* _this = reinterpret_cast< SpecializationFilter* >(object); + (void)_this; +} +void SpecializationFilter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void SpecializationFilter::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const SpecializationFilter& SpecializationFilter::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_SpecializationFilter_generators_2fproto_5ftemplates_2fnode_2eproto.base); + return *internal_default_instance(); +} - // bool guardian_firebrand = 62; - if (this->guardian_firebrand() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(62, this->_internal_guardian_firebrand(), target); - } - // bool revenant_renegade = 63; - if (this->revenant_renegade() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(63, this->_internal_revenant_renegade(), target); - } +void SpecializationFilter::Clear() { +// @@protoc_insertion_point(message_clear_start:SpecializationFilter) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; - // bool necromancer_harbinger = 64; - if (this->necromancer_harbinger() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(64, this->_internal_necromancer_harbinger(), target); - } + ::memset(&elementalist_tempest_, 0, static_cast( + reinterpret_cast(&warrior_tactics_) - + reinterpret_cast(&elementalist_tempest_)) + sizeof(warrior_tactics_)); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} - // bool guardian_willbender = 65; - if (this->guardian_willbender() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(65, this->_internal_guardian_willbender(), target); - } +const char* SpecializationFilter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // bool elementalist_tempest = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + elementalist_tempest_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool engineer_scrapper = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { + engineer_scrapper_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool guardian_dragonhunter = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { + guardian_dragonhunter_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool mesmer_chronomancer = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { + mesmer_chronomancer_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool necromancer_reaper = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { + necromancer_reaper_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool ranger_druid = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) { + ranger_druid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool revenant_herald = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) { + revenant_herald_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool thief_daredevil = 8; + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 64)) { + thief_daredevil_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool warrior_berserker = 9; + case 9: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 72)) { + warrior_berserker_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool elementalist_weaver = 10; + case 10: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 80)) { + elementalist_weaver_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool engineer_holosmith = 11; + case 11: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 88)) { + engineer_holosmith_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool guardian_firebrand = 12; + case 12: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 96)) { + guardian_firebrand_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool mesmer_mirage = 13; + case 13: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 104)) { + mesmer_mirage_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool necromancer_scourge = 14; + case 14: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 112)) { + necromancer_scourge_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool ranger_soulbeast = 15; + case 15: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 120)) { + ranger_soulbeast_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool revenant_renegade = 16; + case 16: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 128)) { + revenant_renegade_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool thief_deadeye = 17; + case 17: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 136)) { + thief_deadeye_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool warrior_spellbreaker = 18; + case 18: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 144)) { + warrior_spellbreaker_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool elmentalist_catalyst = 19; + case 19: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 152)) { + elmentalist_catalyst_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool engineer_mechanist = 20; + case 20: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 160)) { + engineer_mechanist_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool guardian_willbender = 21; + case 21: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 168)) { + guardian_willbender_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool mesmer_virtuoso = 22; + case 22: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 176)) { + mesmer_virtuoso_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool necromancer_harbinger = 23; + case 23: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 184)) { + necromancer_harbinger_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool ranger_untamed = 24; + case 24: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 192)) { + ranger_untamed_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool revenant_vindicator = 25; + case 25: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 200)) { + revenant_vindicator_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool thief_specter = 26; + case 26: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 208)) { + thief_specter_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool warrior_bladesworn = 27; + case 27: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 216)) { + warrior_bladesworn_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool elementalist_air = 28; + case 28: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 224)) { + elementalist_air_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool elementalist_arcane = 29; + case 29: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 232)) { + elementalist_arcane_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool elementalist_earth = 30; + case 30: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 240)) { + elementalist_earth_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool elementalist_fire = 31; + case 31: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 248)) { + elementalist_fire_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool elementalist_water = 32; + case 32: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 0)) { + elementalist_water_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool engineer_alchemy = 33; + case 33: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + engineer_alchemy_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool engineer_explosives = 34; + case 34: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { + engineer_explosives_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool engineer_firearms = 35; + case 35: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { + engineer_firearms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool engineer_inventions = 36; + case 36: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { + engineer_inventions_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool engineer_tools = 37; + case 37: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { + engineer_tools_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool guardian_honor = 38; + case 38: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) { + guardian_honor_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool guardian_radiance = 39; + case 39: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) { + guardian_radiance_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool guardian_valor = 40; + case 40: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 64)) { + guardian_valor_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool guardian_virtues = 41; + case 41: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 72)) { + guardian_virtues_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool guardian_zeal = 42; + case 42: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 80)) { + guardian_zeal_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool mesmer_chaos = 43; + case 43: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 88)) { + mesmer_chaos_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool mesmer_domination = 44; + case 44: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 96)) { + mesmer_domination_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool mesmer_dueling = 45; + case 45: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 104)) { + mesmer_dueling_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool mesmer_illusions = 46; + case 46: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 112)) { + mesmer_illusions_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool mesmer_inspiration = 47; + case 47: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 120)) { + mesmer_inspiration_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool necromancer_blood_magic = 48; + case 48: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 128)) { + necromancer_blood_magic_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool necromancer_curses = 49; + case 49: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 136)) { + necromancer_curses_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool necromancer_death_magic = 50; + case 50: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 144)) { + necromancer_death_magic_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool necromancer_soul_reaping = 51; + case 51: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 152)) { + necromancer_soul_reaping_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool necromancer_spite = 52; + case 52: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 160)) { + necromancer_spite_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool ranger_beastmastery = 53; + case 53: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 168)) { + ranger_beastmastery_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool ranger_marksmanship = 54; + case 54: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 176)) { + ranger_marksmanship_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool ranger_nature_magic = 55; + case 55: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 184)) { + ranger_nature_magic_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool ranger_skirmishing = 56; + case 56: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 192)) { + ranger_skirmishing_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool ranger_wilderness_survival = 57; + case 57: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 200)) { + ranger_wilderness_survival_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool revenant_corruption = 58; + case 58: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 208)) { + revenant_corruption_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool revenant_devastation = 59; + case 59: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 216)) { + revenant_devastation_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool revenant_invocation = 60; + case 60: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 224)) { + revenant_invocation_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool revenant_retribution = 61; + case 61: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 232)) { + revenant_retribution_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool revenant_salvation = 62; + case 62: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 240)) { + revenant_salvation_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool thief_acrobatics = 63; + case 63: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 248)) { + thief_acrobatics_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool thief_critical_strikes = 64; + case 64: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 0)) { + thief_critical_strikes_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool thief_deadly_arts = 65; + case 65: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + thief_deadly_arts_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool thief_shadow_arts = 66; + case 66: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { + thief_shadow_arts_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool thief_trickery = 67; + case 67: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { + thief_trickery_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool warrior_arms = 68; + case 68: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { + warrior_arms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool warrior_defense = 69; + case 69: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { + warrior_defense_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool warrior_discipline = 70; + case 70: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) { + warrior_discipline_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool warrior_strength = 71; + case 71: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) { + warrior_strength_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool warrior_tactics = 72; + case 72: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 64)) { + warrior_tactics_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* SpecializationFilter::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:SpecializationFilter) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // bool elementalist_tempest = 1; + if (this->elementalist_tempest() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->_internal_elementalist_tempest(), target); + } + + // bool engineer_scrapper = 2; + if (this->engineer_scrapper() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_engineer_scrapper(), target); + } + + // bool guardian_dragonhunter = 3; + if (this->guardian_dragonhunter() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_guardian_dragonhunter(), target); + } + + // bool mesmer_chronomancer = 4; + if (this->mesmer_chronomancer() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->_internal_mesmer_chronomancer(), target); + } + + // bool necromancer_reaper = 5; + if (this->necromancer_reaper() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->_internal_necromancer_reaper(), target); + } + + // bool ranger_druid = 6; + if (this->ranger_druid() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(6, this->_internal_ranger_druid(), target); + } + + // bool revenant_herald = 7; + if (this->revenant_herald() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(7, this->_internal_revenant_herald(), target); + } + + // bool thief_daredevil = 8; + if (this->thief_daredevil() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(8, this->_internal_thief_daredevil(), target); + } - // bool mesmer_virtuoso = 66; - if (this->mesmer_virtuoso() != 0) { + // bool warrior_berserker = 9; + if (this->warrior_berserker() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(66, this->_internal_mesmer_virtuoso(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(9, this->_internal_warrior_berserker(), target); } - // bool elmentalist_catalyst = 67; - if (this->elmentalist_catalyst() != 0) { + // bool elementalist_weaver = 10; + if (this->elementalist_weaver() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(67, this->_internal_elmentalist_catalyst(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(10, this->_internal_elementalist_weaver(), target); } - // bool warrior_bladesworn = 68; - if (this->warrior_bladesworn() != 0) { + // bool engineer_holosmith = 11; + if (this->engineer_holosmith() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(68, this->_internal_warrior_bladesworn(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(11, this->_internal_engineer_holosmith(), target); } - // bool revenant_vindicator = 69; - if (this->revenant_vindicator() != 0) { + // bool guardian_firebrand = 12; + if (this->guardian_firebrand() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(12, this->_internal_guardian_firebrand(), target); + } + + // bool mesmer_mirage = 13; + if (this->mesmer_mirage() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(13, this->_internal_mesmer_mirage(), target); + } + + // bool necromancer_scourge = 14; + if (this->necromancer_scourge() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(14, this->_internal_necromancer_scourge(), target); + } + + // bool ranger_soulbeast = 15; + if (this->ranger_soulbeast() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(15, this->_internal_ranger_soulbeast(), target); + } + + // bool revenant_renegade = 16; + if (this->revenant_renegade() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(16, this->_internal_revenant_renegade(), target); + } + + // bool thief_deadeye = 17; + if (this->thief_deadeye() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(17, this->_internal_thief_deadeye(), target); + } + + // bool warrior_spellbreaker = 18; + if (this->warrior_spellbreaker() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(69, this->_internal_revenant_vindicator(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(18, this->_internal_warrior_spellbreaker(), target); } - // bool engineer_mechanist = 70; + // bool elmentalist_catalyst = 19; + if (this->elmentalist_catalyst() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(19, this->_internal_elmentalist_catalyst(), target); + } + + // bool engineer_mechanist = 20; if (this->engineer_mechanist() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(70, this->_internal_engineer_mechanist(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(20, this->_internal_engineer_mechanist(), target); } - // bool thief_specter = 71; - if (this->thief_specter() != 0) { + // bool guardian_willbender = 21; + if (this->guardian_willbender() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(21, this->_internal_guardian_willbender(), target); + } + + // bool mesmer_virtuoso = 22; + if (this->mesmer_virtuoso() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(22, this->_internal_mesmer_virtuoso(), target); + } + + // bool necromancer_harbinger = 23; + if (this->necromancer_harbinger() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(71, this->_internal_thief_specter(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(23, this->_internal_necromancer_harbinger(), target); } - // bool ranger_untamed = 72; + // bool ranger_untamed = 24; if (this->ranger_untamed() != 0) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(72, this->_internal_ranger_untamed(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(24, this->_internal_ranger_untamed(), target); } - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + // bool revenant_vindicator = 25; + if (this->revenant_vindicator() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(25, this->_internal_revenant_vindicator(), target); } - // @@protoc_insertion_point(serialize_to_array_end:Proto_Node.Trail.specialization_filter) - return target; -} -size_t Trail_specialization_filter::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Proto_Node.Trail.specialization_filter) - size_t total_size = 0; + // bool thief_specter = 26; + if (this->thief_specter() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(26, this->_internal_thief_specter(), target); + } - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; + // bool warrior_bladesworn = 27; + if (this->warrior_bladesworn() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(27, this->_internal_warrior_bladesworn(), target); + } - // bool ranger_wilderness_survival = 33; - if (this->ranger_wilderness_survival() != 0) { - total_size += 2 + 1; + // bool elementalist_air = 28; + if (this->elementalist_air() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(28, this->_internal_elementalist_air(), target); } - // bool revenant_corruption = 14; - if (this->revenant_corruption() != 0) { - total_size += 1 + 1; + // bool elementalist_arcane = 29; + if (this->elementalist_arcane() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(29, this->_internal_elementalist_arcane(), target); } - // bool revenant_devastation = 15; - if (this->revenant_devastation() != 0) { - total_size += 1 + 1; + // bool elementalist_earth = 30; + if (this->elementalist_earth() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(30, this->_internal_elementalist_earth(), target); } - // bool revenant_invocation = 3; - if (this->revenant_invocation() != 0) { - total_size += 1 + 1; + // bool elementalist_fire = 31; + if (this->elementalist_fire() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(31, this->_internal_elementalist_fire(), target); + } + + // bool elementalist_water = 32; + if (this->elementalist_water() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(32, this->_internal_elementalist_water(), target); + } + + // bool engineer_alchemy = 33; + if (this->engineer_alchemy() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(33, this->_internal_engineer_alchemy(), target); + } + + // bool engineer_explosives = 34; + if (this->engineer_explosives() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(34, this->_internal_engineer_explosives(), target); + } + + // bool engineer_firearms = 35; + if (this->engineer_firearms() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(35, this->_internal_engineer_firearms(), target); + } + + // bool engineer_inventions = 36; + if (this->engineer_inventions() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(36, this->_internal_engineer_inventions(), target); + } + + // bool engineer_tools = 37; + if (this->engineer_tools() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(37, this->_internal_engineer_tools(), target); + } + + // bool guardian_honor = 38; + if (this->guardian_honor() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(38, this->_internal_guardian_honor(), target); + } + + // bool guardian_radiance = 39; + if (this->guardian_radiance() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(39, this->_internal_guardian_radiance(), target); + } + + // bool guardian_valor = 40; + if (this->guardian_valor() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(40, this->_internal_guardian_valor(), target); + } + + // bool guardian_virtues = 41; + if (this->guardian_virtues() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(41, this->_internal_guardian_virtues(), target); + } + + // bool guardian_zeal = 42; + if (this->guardian_zeal() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(42, this->_internal_guardian_zeal(), target); + } + + // bool mesmer_chaos = 43; + if (this->mesmer_chaos() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(43, this->_internal_mesmer_chaos(), target); + } + + // bool mesmer_domination = 44; + if (this->mesmer_domination() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(44, this->_internal_mesmer_domination(), target); } - // bool mesmer_dueling = 1; + // bool mesmer_dueling = 45; if (this->mesmer_dueling() != 0) { - total_size += 1 + 1; + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(45, this->_internal_mesmer_dueling(), target); } - // bool mesmer_illusions = 24; + // bool mesmer_illusions = 46; if (this->mesmer_illusions() != 0) { - total_size += 2 + 1; + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(46, this->_internal_mesmer_illusions(), target); } - // bool mesmer_inspiration = 23; + // bool mesmer_inspiration = 47; if (this->mesmer_inspiration() != 0) { - total_size += 2 + 1; + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(47, this->_internal_mesmer_inspiration(), target); } - // bool necromancer_blood_magic = 19; + // bool necromancer_blood_magic = 48; if (this->necromancer_blood_magic() != 0) { - total_size += 2 + 1; + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(48, this->_internal_necromancer_blood_magic(), target); + } + + // bool necromancer_curses = 49; + if (this->necromancer_curses() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(49, this->_internal_necromancer_curses(), target); + } + + // bool necromancer_death_magic = 50; + if (this->necromancer_death_magic() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(50, this->_internal_necromancer_death_magic(), target); + } + + // bool necromancer_soul_reaping = 51; + if (this->necromancer_soul_reaping() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(51, this->_internal_necromancer_soul_reaping(), target); + } + + // bool necromancer_spite = 52; + if (this->necromancer_spite() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(52, this->_internal_necromancer_spite(), target); + } + + // bool ranger_beastmastery = 53; + if (this->ranger_beastmastery() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(53, this->_internal_ranger_beastmastery(), target); + } + + // bool ranger_marksmanship = 54; + if (this->ranger_marksmanship() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(54, this->_internal_ranger_marksmanship(), target); + } + + // bool ranger_nature_magic = 55; + if (this->ranger_nature_magic() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(55, this->_internal_ranger_nature_magic(), target); + } + + // bool ranger_skirmishing = 56; + if (this->ranger_skirmishing() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(56, this->_internal_ranger_skirmishing(), target); + } + + // bool ranger_wilderness_survival = 57; + if (this->ranger_wilderness_survival() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(57, this->_internal_ranger_wilderness_survival(), target); + } + + // bool revenant_corruption = 58; + if (this->revenant_corruption() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(58, this->_internal_revenant_corruption(), target); + } + + // bool revenant_devastation = 59; + if (this->revenant_devastation() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(59, this->_internal_revenant_devastation(), target); + } + + // bool revenant_invocation = 60; + if (this->revenant_invocation() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(60, this->_internal_revenant_invocation(), target); + } + + // bool revenant_retribution = 61; + if (this->revenant_retribution() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(61, this->_internal_revenant_retribution(), target); + } + + // bool revenant_salvation = 62; + if (this->revenant_salvation() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(62, this->_internal_revenant_salvation(), target); + } + + // bool thief_acrobatics = 63; + if (this->thief_acrobatics() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(63, this->_internal_thief_acrobatics(), target); + } + + // bool thief_critical_strikes = 64; + if (this->thief_critical_strikes() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(64, this->_internal_thief_critical_strikes(), target); + } + + // bool thief_deadly_arts = 65; + if (this->thief_deadly_arts() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(65, this->_internal_thief_deadly_arts(), target); + } + + // bool thief_shadow_arts = 66; + if (this->thief_shadow_arts() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(66, this->_internal_thief_shadow_arts(), target); + } + + // bool thief_trickery = 67; + if (this->thief_trickery() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(67, this->_internal_thief_trickery(), target); + } + + // bool warrior_arms = 68; + if (this->warrior_arms() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(68, this->_internal_warrior_arms(), target); } - // bool warrior_defense = 22; + // bool warrior_defense = 69; if (this->warrior_defense() != 0) { - total_size += 2 + 1; + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(69, this->_internal_warrior_defense(), target); } - // bool warrior_discipline = 51; + // bool warrior_discipline = 70; if (this->warrior_discipline() != 0) { - total_size += 2 + 1; + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(70, this->_internal_warrior_discipline(), target); } - // bool warrior_strength = 4; + // bool warrior_strength = 71; if (this->warrior_strength() != 0) { - total_size += 1 + 1; + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(71, this->_internal_warrior_strength(), target); } - // bool warrior_tactics = 11; + // bool warrior_tactics = 72; if (this->warrior_tactics() != 0) { - total_size += 1 + 1; + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(72, this->_internal_warrior_tactics(), target); } - // bool ranger_beastmastery = 32; - if (this->ranger_beastmastery() != 0) { - total_size += 2 + 1; + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } + // @@protoc_insertion_point(serialize_to_array_end:SpecializationFilter) + return target; +} - // bool ranger_marksmanship = 8; - if (this->ranger_marksmanship() != 0) { +size_t SpecializationFilter::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:SpecializationFilter) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // bool elementalist_tempest = 1; + if (this->elementalist_tempest() != 0) { total_size += 1 + 1; } - // bool ranger_nature_magic = 25; - if (this->ranger_nature_magic() != 0) { - total_size += 2 + 1; + // bool engineer_scrapper = 2; + if (this->engineer_scrapper() != 0) { + total_size += 1 + 1; } - // bool ranger_skirmishing = 30; - if (this->ranger_skirmishing() != 0) { - total_size += 2 + 1; + // bool guardian_dragonhunter = 3; + if (this->guardian_dragonhunter() != 0) { + total_size += 1 + 1; + } + + // bool mesmer_chronomancer = 4; + if (this->mesmer_chronomancer() != 0) { + total_size += 1 + 1; } - // bool necromancer_reaper = 34; + // bool necromancer_reaper = 5; if (this->necromancer_reaper() != 0) { - total_size += 2 + 1; + total_size += 1 + 1; } - // bool ranger_druid = 5; + // bool ranger_druid = 6; if (this->ranger_druid() != 0) { total_size += 1 + 1; } - // bool revenant_herald = 52; + // bool revenant_herald = 7; if (this->revenant_herald() != 0) { - total_size += 2 + 1; + total_size += 1 + 1; } - // bool thief_daredevil = 7; + // bool thief_daredevil = 8; if (this->thief_daredevil() != 0) { total_size += 1 + 1; } - // bool engineer_tools = 21; - if (this->engineer_tools() != 0) { - total_size += 2 + 1; + // bool warrior_berserker = 9; + if (this->warrior_berserker() != 0) { + total_size += 1 + 1; } - // bool guardian_honor = 49; - if (this->guardian_honor() != 0) { - total_size += 2 + 1; + // bool elementalist_weaver = 10; + if (this->elementalist_weaver() != 0) { + total_size += 1 + 1; } - // bool guardian_radiance = 16; - if (this->guardian_radiance() != 0) { - total_size += 2 + 1; + // bool engineer_holosmith = 11; + if (this->engineer_holosmith() != 0) { + total_size += 1 + 1; } - // bool guardian_valor = 13; - if (this->guardian_valor() != 0) { + // bool guardian_firebrand = 12; + if (this->guardian_firebrand() != 0) { total_size += 1 + 1; } - // bool revenant_retribution = 9; - if (this->revenant_retribution() != 0) { + // bool mesmer_mirage = 13; + if (this->mesmer_mirage() != 0) { total_size += 1 + 1; } - // bool revenant_salvation = 12; - if (this->revenant_salvation() != 0) { + // bool necromancer_scourge = 14; + if (this->necromancer_scourge() != 0) { total_size += 1 + 1; } - // bool thief_acrobatics = 54; - if (this->thief_acrobatics() != 0) { - total_size += 2 + 1; + // bool ranger_soulbeast = 15; + if (this->ranger_soulbeast() != 0) { + total_size += 1 + 1; } - // bool thief_critical_strikes = 35; - if (this->thief_critical_strikes() != 0) { + // bool revenant_renegade = 16; + if (this->revenant_renegade() != 0) { total_size += 2 + 1; } - // bool elementalist_arcane = 37; - if (this->elementalist_arcane() != 0) { + // bool thief_deadeye = 17; + if (this->thief_deadeye() != 0) { total_size += 2 + 1; } - // bool elementalist_earth = 26; - if (this->elementalist_earth() != 0) { + // bool warrior_spellbreaker = 18; + if (this->warrior_spellbreaker() != 0) { total_size += 2 + 1; } - // bool elementalist_fire = 31; - if (this->elementalist_fire() != 0) { + // bool elmentalist_catalyst = 19; + if (this->elmentalist_catalyst() != 0) { total_size += 2 + 1; } - // bool elementalist_water = 17; - if (this->elementalist_water() != 0) { + // bool engineer_mechanist = 20; + if (this->engineer_mechanist() != 0) { total_size += 2 + 1; } - // bool engineer_alchemy = 29; - if (this->engineer_alchemy() != 0) { + // bool guardian_willbender = 21; + if (this->guardian_willbender() != 0) { total_size += 2 + 1; } - // bool engineer_explosives = 6; - if (this->engineer_explosives() != 0) { - total_size += 1 + 1; - } - - // bool engineer_firearms = 38; - if (this->engineer_firearms() != 0) { + // bool mesmer_virtuoso = 22; + if (this->mesmer_virtuoso() != 0) { total_size += 2 + 1; } - // bool engineer_inventions = 47; - if (this->engineer_inventions() != 0) { + // bool necromancer_harbinger = 23; + if (this->necromancer_harbinger() != 0) { total_size += 2 + 1; } - // bool thief_deadly_arts = 28; - if (this->thief_deadly_arts() != 0) { + // bool ranger_untamed = 24; + if (this->ranger_untamed() != 0) { total_size += 2 + 1; } - // bool thief_shadow_arts = 20; - if (this->thief_shadow_arts() != 0) { + // bool revenant_vindicator = 25; + if (this->revenant_vindicator() != 0) { total_size += 2 + 1; } - // bool thief_trickery = 44; - if (this->thief_trickery() != 0) { + // bool thief_specter = 26; + if (this->thief_specter() != 0) { total_size += 2 + 1; } - // bool warrior_arms = 36; - if (this->warrior_arms() != 0) { + // bool warrior_bladesworn = 27; + if (this->warrior_bladesworn() != 0) { total_size += 2 + 1; } - // bool guardian_virtues = 46; - if (this->guardian_virtues() != 0) { + // bool elementalist_air = 28; + if (this->elementalist_air() != 0) { total_size += 2 + 1; } - // bool guardian_zeal = 42; - if (this->guardian_zeal() != 0) { + // bool elementalist_arcane = 29; + if (this->elementalist_arcane() != 0) { total_size += 2 + 1; } - // bool mesmer_chaos = 45; - if (this->mesmer_chaos() != 0) { + // bool elementalist_earth = 30; + if (this->elementalist_earth() != 0) { total_size += 2 + 1; } - // bool mesmer_domination = 10; - if (this->mesmer_domination() != 0) { - total_size += 1 + 1; - } - - // bool necromancer_curses = 39; - if (this->necromancer_curses() != 0) { + // bool elementalist_fire = 31; + if (this->elementalist_fire() != 0) { total_size += 2 + 1; } - // bool necromancer_death_magic = 2; - if (this->necromancer_death_magic() != 0) { - total_size += 1 + 1; - } - - // bool necromancer_soul_reaping = 50; - if (this->necromancer_soul_reaping() != 0) { + // bool elementalist_water = 32; + if (this->elementalist_water() != 0) { total_size += 2 + 1; } - // bool necromancer_spite = 53; - if (this->necromancer_spite() != 0) { + // bool engineer_alchemy = 33; + if (this->engineer_alchemy() != 0) { total_size += 2 + 1; } - // bool elementalist_tempest = 48; - if (this->elementalist_tempest() != 0) { + // bool engineer_explosives = 34; + if (this->engineer_explosives() != 0) { total_size += 2 + 1; } - // bool engineer_scrapper = 43; - if (this->engineer_scrapper() != 0) { + // bool engineer_firearms = 35; + if (this->engineer_firearms() != 0) { total_size += 2 + 1; } - // bool guardian_dragonhunter = 27; - if (this->guardian_dragonhunter() != 0) { + // bool engineer_inventions = 36; + if (this->engineer_inventions() != 0) { total_size += 2 + 1; } - // bool mesmer_chronomancer = 40; - if (this->mesmer_chronomancer() != 0) { + // bool engineer_tools = 37; + if (this->engineer_tools() != 0) { total_size += 2 + 1; } - // bool warrior_berserker = 18; - if (this->warrior_berserker() != 0) { + // bool guardian_honor = 38; + if (this->guardian_honor() != 0) { total_size += 2 + 1; } - // bool elementalist_weaver = 56; - if (this->elementalist_weaver() != 0) { + // bool guardian_radiance = 39; + if (this->guardian_radiance() != 0) { total_size += 2 + 1; } - // bool engineer_holosmith = 57; - if (this->engineer_holosmith() != 0) { + // bool guardian_valor = 40; + if (this->guardian_valor() != 0) { total_size += 2 + 1; } - // bool guardian_firebrand = 62; - if (this->guardian_firebrand() != 0) { + // bool guardian_virtues = 41; + if (this->guardian_virtues() != 0) { total_size += 2 + 1; } - // bool mesmer_mirage = 59; - if (this->mesmer_mirage() != 0) { + // bool guardian_zeal = 42; + if (this->guardian_zeal() != 0) { total_size += 2 + 1; } - // bool necromancer_scourge = 60; - if (this->necromancer_scourge() != 0) { + // bool mesmer_chaos = 43; + if (this->mesmer_chaos() != 0) { total_size += 2 + 1; } - // bool ranger_soulbeast = 55; - if (this->ranger_soulbeast() != 0) { + // bool mesmer_domination = 44; + if (this->mesmer_domination() != 0) { total_size += 2 + 1; } - // bool revenant_renegade = 63; - if (this->revenant_renegade() != 0) { + // bool mesmer_dueling = 45; + if (this->mesmer_dueling() != 0) { total_size += 2 + 1; } - // bool revenant_vindicator = 69; - if (this->revenant_vindicator() != 0) { + // bool mesmer_illusions = 46; + if (this->mesmer_illusions() != 0) { total_size += 2 + 1; } - // bool thief_specter = 71; - if (this->thief_specter() != 0) { + // bool mesmer_inspiration = 47; + if (this->mesmer_inspiration() != 0) { total_size += 2 + 1; } - // bool warrior_bladesworn = 68; - if (this->warrior_bladesworn() != 0) { + // bool necromancer_blood_magic = 48; + if (this->necromancer_blood_magic() != 0) { total_size += 2 + 1; } - // bool elementalist_air = 41; - if (this->elementalist_air() != 0) { + // bool necromancer_curses = 49; + if (this->necromancer_curses() != 0) { total_size += 2 + 1; } - // bool thief_deadeye = 58; - if (this->thief_deadeye() != 0) { + // bool necromancer_death_magic = 50; + if (this->necromancer_death_magic() != 0) { total_size += 2 + 1; } - // bool warrior_spellbreaker = 61; - if (this->warrior_spellbreaker() != 0) { + // bool necromancer_soul_reaping = 51; + if (this->necromancer_soul_reaping() != 0) { total_size += 2 + 1; } - // bool elmentalist_catalyst = 67; - if (this->elmentalist_catalyst() != 0) { + // bool necromancer_spite = 52; + if (this->necromancer_spite() != 0) { total_size += 2 + 1; } - // bool engineer_mechanist = 70; - if (this->engineer_mechanist() != 0) { + // bool ranger_beastmastery = 53; + if (this->ranger_beastmastery() != 0) { total_size += 2 + 1; } - // bool guardian_willbender = 65; - if (this->guardian_willbender() != 0) { + // bool ranger_marksmanship = 54; + if (this->ranger_marksmanship() != 0) { total_size += 2 + 1; } - // bool mesmer_virtuoso = 66; - if (this->mesmer_virtuoso() != 0) { + // bool ranger_nature_magic = 55; + if (this->ranger_nature_magic() != 0) { total_size += 2 + 1; } - // bool necromancer_harbinger = 64; - if (this->necromancer_harbinger() != 0) { + // bool ranger_skirmishing = 56; + if (this->ranger_skirmishing() != 0) { total_size += 2 + 1; } - // bool ranger_untamed = 72; - if (this->ranger_untamed() != 0) { + // bool ranger_wilderness_survival = 57; + if (this->ranger_wilderness_survival() != 0) { total_size += 2 + 1; } - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( - _internal_metadata_, total_size, &_cached_size_); + // bool revenant_corruption = 58; + if (this->revenant_corruption() != 0) { + total_size += 2 + 1; } - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} -void Trail_specialization_filter::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:Proto_Node.Trail.specialization_filter) - GOOGLE_DCHECK_NE(&from, this); - const Trail_specialization_filter* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:Proto_Node.Trail.specialization_filter) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:Proto_Node.Trail.specialization_filter) - MergeFrom(*source); + // bool revenant_devastation = 59; + if (this->revenant_devastation() != 0) { + total_size += 2 + 1; } -} - -void Trail_specialization_filter::MergeFrom(const Trail_specialization_filter& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:Proto_Node.Trail.specialization_filter) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - if (from.ranger_wilderness_survival() != 0) { - _internal_set_ranger_wilderness_survival(from._internal_ranger_wilderness_survival()); - } - if (from.revenant_corruption() != 0) { - _internal_set_revenant_corruption(from._internal_revenant_corruption()); - } - if (from.revenant_devastation() != 0) { - _internal_set_revenant_devastation(from._internal_revenant_devastation()); - } - if (from.revenant_invocation() != 0) { - _internal_set_revenant_invocation(from._internal_revenant_invocation()); - } - if (from.mesmer_dueling() != 0) { - _internal_set_mesmer_dueling(from._internal_mesmer_dueling()); - } - if (from.mesmer_illusions() != 0) { - _internal_set_mesmer_illusions(from._internal_mesmer_illusions()); - } - if (from.mesmer_inspiration() != 0) { - _internal_set_mesmer_inspiration(from._internal_mesmer_inspiration()); - } - if (from.necromancer_blood_magic() != 0) { - _internal_set_necromancer_blood_magic(from._internal_necromancer_blood_magic()); - } - if (from.warrior_defense() != 0) { - _internal_set_warrior_defense(from._internal_warrior_defense()); - } - if (from.warrior_discipline() != 0) { - _internal_set_warrior_discipline(from._internal_warrior_discipline()); - } - if (from.warrior_strength() != 0) { - _internal_set_warrior_strength(from._internal_warrior_strength()); - } - if (from.warrior_tactics() != 0) { - _internal_set_warrior_tactics(from._internal_warrior_tactics()); - } - if (from.ranger_beastmastery() != 0) { - _internal_set_ranger_beastmastery(from._internal_ranger_beastmastery()); - } - if (from.ranger_marksmanship() != 0) { - _internal_set_ranger_marksmanship(from._internal_ranger_marksmanship()); - } - if (from.ranger_nature_magic() != 0) { - _internal_set_ranger_nature_magic(from._internal_ranger_nature_magic()); - } - if (from.ranger_skirmishing() != 0) { - _internal_set_ranger_skirmishing(from._internal_ranger_skirmishing()); - } - if (from.necromancer_reaper() != 0) { - _internal_set_necromancer_reaper(from._internal_necromancer_reaper()); - } - if (from.ranger_druid() != 0) { - _internal_set_ranger_druid(from._internal_ranger_druid()); - } - if (from.revenant_herald() != 0) { - _internal_set_revenant_herald(from._internal_revenant_herald()); - } - if (from.thief_daredevil() != 0) { - _internal_set_thief_daredevil(from._internal_thief_daredevil()); - } - if (from.engineer_tools() != 0) { - _internal_set_engineer_tools(from._internal_engineer_tools()); - } - if (from.guardian_honor() != 0) { - _internal_set_guardian_honor(from._internal_guardian_honor()); - } - if (from.guardian_radiance() != 0) { - _internal_set_guardian_radiance(from._internal_guardian_radiance()); - } - if (from.guardian_valor() != 0) { - _internal_set_guardian_valor(from._internal_guardian_valor()); - } - if (from.revenant_retribution() != 0) { - _internal_set_revenant_retribution(from._internal_revenant_retribution()); - } - if (from.revenant_salvation() != 0) { - _internal_set_revenant_salvation(from._internal_revenant_salvation()); - } - if (from.thief_acrobatics() != 0) { - _internal_set_thief_acrobatics(from._internal_thief_acrobatics()); - } - if (from.thief_critical_strikes() != 0) { - _internal_set_thief_critical_strikes(from._internal_thief_critical_strikes()); - } - if (from.elementalist_arcane() != 0) { - _internal_set_elementalist_arcane(from._internal_elementalist_arcane()); - } - if (from.elementalist_earth() != 0) { - _internal_set_elementalist_earth(from._internal_elementalist_earth()); - } - if (from.elementalist_fire() != 0) { - _internal_set_elementalist_fire(from._internal_elementalist_fire()); - } - if (from.elementalist_water() != 0) { - _internal_set_elementalist_water(from._internal_elementalist_water()); - } - if (from.engineer_alchemy() != 0) { - _internal_set_engineer_alchemy(from._internal_engineer_alchemy()); - } - if (from.engineer_explosives() != 0) { - _internal_set_engineer_explosives(from._internal_engineer_explosives()); + // bool revenant_invocation = 60; + if (this->revenant_invocation() != 0) { + total_size += 2 + 1; } - if (from.engineer_firearms() != 0) { - _internal_set_engineer_firearms(from._internal_engineer_firearms()); + + // bool revenant_retribution = 61; + if (this->revenant_retribution() != 0) { + total_size += 2 + 1; } - if (from.engineer_inventions() != 0) { - _internal_set_engineer_inventions(from._internal_engineer_inventions()); + + // bool revenant_salvation = 62; + if (this->revenant_salvation() != 0) { + total_size += 2 + 1; } - if (from.thief_deadly_arts() != 0) { - _internal_set_thief_deadly_arts(from._internal_thief_deadly_arts()); + + // bool thief_acrobatics = 63; + if (this->thief_acrobatics() != 0) { + total_size += 2 + 1; } - if (from.thief_shadow_arts() != 0) { - _internal_set_thief_shadow_arts(from._internal_thief_shadow_arts()); + + // bool thief_critical_strikes = 64; + if (this->thief_critical_strikes() != 0) { + total_size += 2 + 1; } - if (from.thief_trickery() != 0) { - _internal_set_thief_trickery(from._internal_thief_trickery()); + + // bool thief_deadly_arts = 65; + if (this->thief_deadly_arts() != 0) { + total_size += 2 + 1; } - if (from.warrior_arms() != 0) { - _internal_set_warrior_arms(from._internal_warrior_arms()); + + // bool thief_shadow_arts = 66; + if (this->thief_shadow_arts() != 0) { + total_size += 2 + 1; } - if (from.guardian_virtues() != 0) { - _internal_set_guardian_virtues(from._internal_guardian_virtues()); + + // bool thief_trickery = 67; + if (this->thief_trickery() != 0) { + total_size += 2 + 1; } - if (from.guardian_zeal() != 0) { - _internal_set_guardian_zeal(from._internal_guardian_zeal()); + + // bool warrior_arms = 68; + if (this->warrior_arms() != 0) { + total_size += 2 + 1; } - if (from.mesmer_chaos() != 0) { - _internal_set_mesmer_chaos(from._internal_mesmer_chaos()); + + // bool warrior_defense = 69; + if (this->warrior_defense() != 0) { + total_size += 2 + 1; } - if (from.mesmer_domination() != 0) { - _internal_set_mesmer_domination(from._internal_mesmer_domination()); + + // bool warrior_discipline = 70; + if (this->warrior_discipline() != 0) { + total_size += 2 + 1; } - if (from.necromancer_curses() != 0) { - _internal_set_necromancer_curses(from._internal_necromancer_curses()); + + // bool warrior_strength = 71; + if (this->warrior_strength() != 0) { + total_size += 2 + 1; } - if (from.necromancer_death_magic() != 0) { - _internal_set_necromancer_death_magic(from._internal_necromancer_death_magic()); + + // bool warrior_tactics = 72; + if (this->warrior_tactics() != 0) { + total_size += 2 + 1; } - if (from.necromancer_soul_reaping() != 0) { - _internal_set_necromancer_soul_reaping(from._internal_necromancer_soul_reaping()); + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); } - if (from.necromancer_spite() != 0) { - _internal_set_necromancer_spite(from._internal_necromancer_spite()); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void SpecializationFilter::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:SpecializationFilter) + GOOGLE_DCHECK_NE(&from, this); + const SpecializationFilter* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:SpecializationFilter) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:SpecializationFilter) + MergeFrom(*source); } +} + +void SpecializationFilter::MergeFrom(const SpecializationFilter& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:SpecializationFilter) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + if (from.elementalist_tempest() != 0) { _internal_set_elementalist_tempest(from._internal_elementalist_tempest()); } @@ -7367,6 +8122,18 @@ void Trail_specialization_filter::MergeFrom(const Trail_specialization_filter& f if (from.mesmer_chronomancer() != 0) { _internal_set_mesmer_chronomancer(from._internal_mesmer_chronomancer()); } + if (from.necromancer_reaper() != 0) { + _internal_set_necromancer_reaper(from._internal_necromancer_reaper()); + } + if (from.ranger_druid() != 0) { + _internal_set_ranger_druid(from._internal_ranger_druid()); + } + if (from.revenant_herald() != 0) { + _internal_set_revenant_herald(from._internal_revenant_herald()); + } + if (from.thief_daredevil() != 0) { + _internal_set_thief_daredevil(from._internal_thief_daredevil()); + } if (from.warrior_berserker() != 0) { _internal_set_warrior_berserker(from._internal_warrior_berserker()); } @@ -7391,18 +8158,6 @@ void Trail_specialization_filter::MergeFrom(const Trail_specialization_filter& f if (from.revenant_renegade() != 0) { _internal_set_revenant_renegade(from._internal_revenant_renegade()); } - if (from.revenant_vindicator() != 0) { - _internal_set_revenant_vindicator(from._internal_revenant_vindicator()); - } - if (from.thief_specter() != 0) { - _internal_set_thief_specter(from._internal_thief_specter()); - } - if (from.warrior_bladesworn() != 0) { - _internal_set_warrior_bladesworn(from._internal_warrior_bladesworn()); - } - if (from.elementalist_air() != 0) { - _internal_set_elementalist_air(from._internal_elementalist_air()); - } if (from.thief_deadeye() != 0) { _internal_set_thief_deadeye(from._internal_thief_deadeye()); } @@ -7427,658 +8182,253 @@ void Trail_specialization_filter::MergeFrom(const Trail_specialization_filter& f if (from.ranger_untamed() != 0) { _internal_set_ranger_untamed(from._internal_ranger_untamed()); } -} - -void Trail_specialization_filter::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:Proto_Node.Trail.specialization_filter) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void Trail_specialization_filter::CopyFrom(const Trail_specialization_filter& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Proto_Node.Trail.specialization_filter) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool Trail_specialization_filter::IsInitialized() const { - return true; -} - -void Trail_specialization_filter::InternalSwap(Trail_specialization_filter* other) { - using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(Trail_specialization_filter, ranger_untamed_) - + sizeof(Trail_specialization_filter::ranger_untamed_) - - PROTOBUF_FIELD_OFFSET(Trail_specialization_filter, ranger_wilderness_survival_)>( - reinterpret_cast(&ranger_wilderness_survival_), - reinterpret_cast(&other->ranger_wilderness_survival_)); -} - -::PROTOBUF_NAMESPACE_ID::Metadata Trail_specialization_filter::GetMetadata() const { - return GetMetadataStatic(); -} - - -// =================================================================== - -void Trail_species_filter::InitAsDefaultInstance() { -} -class Trail_species_filter::_Internal { - public: -}; - -Trail_species_filter::Trail_species_filter(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(); - RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:Proto_Node.Trail.species_filter) -} -Trail_species_filter::Trail_species_filter(const Trail_species_filter& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::memcpy(&asura_, &from.asura_, - static_cast(reinterpret_cast(&sylvari_) - - reinterpret_cast(&asura_)) + sizeof(sylvari_)); - // @@protoc_insertion_point(copy_constructor:Proto_Node.Trail.species_filter) -} - -void Trail_species_filter::SharedCtor() { - ::memset(&asura_, 0, static_cast( - reinterpret_cast(&sylvari_) - - reinterpret_cast(&asura_)) + sizeof(sylvari_)); -} - -Trail_species_filter::~Trail_species_filter() { - // @@protoc_insertion_point(destructor:Proto_Node.Trail.species_filter) - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -void Trail_species_filter::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); -} - -void Trail_species_filter::ArenaDtor(void* object) { - Trail_species_filter* _this = reinterpret_cast< Trail_species_filter* >(object); - (void)_this; -} -void Trail_species_filter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void Trail_species_filter::SetCachedSize(int size) const { - _cached_size_.Set(size); -} -const Trail_species_filter& Trail_species_filter::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Trail_species_filter_node_2eproto.base); - return *internal_default_instance(); -} - - -void Trail_species_filter::Clear() { -// @@protoc_insertion_point(message_clear_start:Proto_Node.Trail.species_filter) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - ::memset(&asura_, 0, static_cast( - reinterpret_cast(&sylvari_) - - reinterpret_cast(&asura_)) + sizeof(sylvari_)); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* Trail_species_filter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; - while (!ctx->Done(&ptr)) { - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - CHK_(ptr); - switch (tag >> 3) { - // bool asura = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - asura_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool charr = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { - charr_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool human = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { - human_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool norn = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { - norn_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool sylvari = 5; - case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { - sylvari_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - default: { - handle_unusual: - if ((tag & 7) == 4 || tag == 0) { - ctx->SetLastTag(tag); - goto success; - } - ptr = UnknownFieldParse(tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - continue; - } - } // switch - } // while -success: - return ptr; -failure: - ptr = nullptr; - goto success; -#undef CHK_ -} - -::PROTOBUF_NAMESPACE_ID::uint8* Trail_species_filter::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Proto_Node.Trail.species_filter) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // bool asura = 1; - if (this->asura() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->_internal_asura(), target); + if (from.revenant_vindicator() != 0) { + _internal_set_revenant_vindicator(from._internal_revenant_vindicator()); + } + if (from.thief_specter() != 0) { + _internal_set_thief_specter(from._internal_thief_specter()); } - - // bool charr = 2; - if (this->charr() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_charr(), target); + if (from.warrior_bladesworn() != 0) { + _internal_set_warrior_bladesworn(from._internal_warrior_bladesworn()); } - - // bool human = 3; - if (this->human() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_human(), target); + if (from.elementalist_air() != 0) { + _internal_set_elementalist_air(from._internal_elementalist_air()); } - - // bool norn = 4; - if (this->norn() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->_internal_norn(), target); + if (from.elementalist_arcane() != 0) { + _internal_set_elementalist_arcane(from._internal_elementalist_arcane()); } - - // bool sylvari = 5; - if (this->sylvari() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->_internal_sylvari(), target); + if (from.elementalist_earth() != 0) { + _internal_set_elementalist_earth(from._internal_elementalist_earth()); } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + if (from.elementalist_fire() != 0) { + _internal_set_elementalist_fire(from._internal_elementalist_fire()); } - // @@protoc_insertion_point(serialize_to_array_end:Proto_Node.Trail.species_filter) - return target; -} - -size_t Trail_species_filter::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Proto_Node.Trail.species_filter) - size_t total_size = 0; - - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // bool asura = 1; - if (this->asura() != 0) { - total_size += 1 + 1; + if (from.elementalist_water() != 0) { + _internal_set_elementalist_water(from._internal_elementalist_water()); } - - // bool charr = 2; - if (this->charr() != 0) { - total_size += 1 + 1; + if (from.engineer_alchemy() != 0) { + _internal_set_engineer_alchemy(from._internal_engineer_alchemy()); } - - // bool human = 3; - if (this->human() != 0) { - total_size += 1 + 1; + if (from.engineer_explosives() != 0) { + _internal_set_engineer_explosives(from._internal_engineer_explosives()); } - - // bool norn = 4; - if (this->norn() != 0) { - total_size += 1 + 1; + if (from.engineer_firearms() != 0) { + _internal_set_engineer_firearms(from._internal_engineer_firearms()); } - - // bool sylvari = 5; - if (this->sylvari() != 0) { - total_size += 1 + 1; + if (from.engineer_inventions() != 0) { + _internal_set_engineer_inventions(from._internal_engineer_inventions()); } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( - _internal_metadata_, total_size, &_cached_size_); + if (from.engineer_tools() != 0) { + _internal_set_engineer_tools(from._internal_engineer_tools()); } - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} - -void Trail_species_filter::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:Proto_Node.Trail.species_filter) - GOOGLE_DCHECK_NE(&from, this); - const Trail_species_filter* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:Proto_Node.Trail.species_filter) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:Proto_Node.Trail.species_filter) - MergeFrom(*source); + if (from.guardian_honor() != 0) { + _internal_set_guardian_honor(from._internal_guardian_honor()); } -} - -void Trail_species_filter::MergeFrom(const Trail_species_filter& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:Proto_Node.Trail.species_filter) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - if (from.asura() != 0) { - _internal_set_asura(from._internal_asura()); + if (from.guardian_radiance() != 0) { + _internal_set_guardian_radiance(from._internal_guardian_radiance()); } - if (from.charr() != 0) { - _internal_set_charr(from._internal_charr()); + if (from.guardian_valor() != 0) { + _internal_set_guardian_valor(from._internal_guardian_valor()); } - if (from.human() != 0) { - _internal_set_human(from._internal_human()); + if (from.guardian_virtues() != 0) { + _internal_set_guardian_virtues(from._internal_guardian_virtues()); } - if (from.norn() != 0) { - _internal_set_norn(from._internal_norn()); + if (from.guardian_zeal() != 0) { + _internal_set_guardian_zeal(from._internal_guardian_zeal()); } - if (from.sylvari() != 0) { - _internal_set_sylvari(from._internal_sylvari()); + if (from.mesmer_chaos() != 0) { + _internal_set_mesmer_chaos(from._internal_mesmer_chaos()); } -} - -void Trail_species_filter::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:Proto_Node.Trail.species_filter) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void Trail_species_filter::CopyFrom(const Trail_species_filter& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Proto_Node.Trail.species_filter) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool Trail_species_filter::IsInitialized() const { - return true; -} - -void Trail_species_filter::InternalSwap(Trail_species_filter* other) { - using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(Trail_species_filter, sylvari_) - + sizeof(Trail_species_filter::sylvari_) - - PROTOBUF_FIELD_OFFSET(Trail_species_filter, asura_)>( - reinterpret_cast(&asura_), - reinterpret_cast(&other->asura_)); -} - -::PROTOBUF_NAMESPACE_ID::Metadata Trail_species_filter::GetMetadata() const { - return GetMetadataStatic(); -} - - -// =================================================================== - -void Trail_texture::InitAsDefaultInstance() { - ::Proto_Node::_Trail_texture_default_instance_._instance.get_mutable()->original_token_ = const_cast< PROTOBUF_NAMESPACE_ID::Any*>( - PROTOBUF_NAMESPACE_ID::Any::internal_default_instance()); -} -class Trail_texture::_Internal { - public: - static const PROTOBUF_NAMESPACE_ID::Any& original_token(const Trail_texture* msg); -}; - -const PROTOBUF_NAMESPACE_ID::Any& -Trail_texture::_Internal::original_token(const Trail_texture* msg) { - return *msg->original_token_; -} -void Trail_texture::clear_original_token() { - if (GetArena() == nullptr && original_token_ != nullptr) { - delete original_token_; + if (from.mesmer_domination() != 0) { + _internal_set_mesmer_domination(from._internal_mesmer_domination()); } - original_token_ = nullptr; -} -Trail_texture::Trail_texture(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(); - RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:Proto_Node.Trail.texture) -} -Trail_texture::Trail_texture(const Trail_texture& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - path_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_path().empty()) { - path_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_path(), - GetArena()); + if (from.mesmer_dueling() != 0) { + _internal_set_mesmer_dueling(from._internal_mesmer_dueling()); } - if (from._internal_has_original_token()) { - original_token_ = new PROTOBUF_NAMESPACE_ID::Any(*from.original_token_); - } else { - original_token_ = nullptr; + if (from.mesmer_illusions() != 0) { + _internal_set_mesmer_illusions(from._internal_mesmer_illusions()); } - // @@protoc_insertion_point(copy_constructor:Proto_Node.Trail.texture) -} - -void Trail_texture::SharedCtor() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Trail_texture_node_2eproto.base); - path_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - original_token_ = nullptr; -} - -Trail_texture::~Trail_texture() { - // @@protoc_insertion_point(destructor:Proto_Node.Trail.texture) - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -void Trail_texture::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); - path_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (this != internal_default_instance()) delete original_token_; -} - -void Trail_texture::ArenaDtor(void* object) { - Trail_texture* _this = reinterpret_cast< Trail_texture* >(object); - (void)_this; -} -void Trail_texture::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void Trail_texture::SetCachedSize(int size) const { - _cached_size_.Set(size); -} -const Trail_texture& Trail_texture::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Trail_texture_node_2eproto.base); - return *internal_default_instance(); -} - - -void Trail_texture::Clear() { -// @@protoc_insertion_point(message_clear_start:Proto_Node.Trail.texture) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - path_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - if (GetArena() == nullptr && original_token_ != nullptr) { - delete original_token_; + if (from.mesmer_inspiration() != 0) { + _internal_set_mesmer_inspiration(from._internal_mesmer_inspiration()); } - original_token_ = nullptr; - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* Trail_texture::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; - while (!ctx->Done(&ptr)) { - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - CHK_(ptr); - switch (tag >> 3) { - // string path = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - auto str = _internal_mutable_path(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "Proto_Node.Trail.texture.path")); - CHK_(ptr); - } else goto handle_unusual; - continue; - // .google.protobuf.Any original_token = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { - ptr = ctx->ParseMessage(_internal_mutable_original_token(), ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - default: { - handle_unusual: - if ((tag & 7) == 4 || tag == 0) { - ctx->SetLastTag(tag); - goto success; - } - ptr = UnknownFieldParse(tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - continue; - } - } // switch - } // while -success: - return ptr; -failure: - ptr = nullptr; - goto success; -#undef CHK_ -} - -::PROTOBUF_NAMESPACE_ID::uint8* Trail_texture::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Proto_Node.Trail.texture) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // string path = 1; - if (this->path().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_path().data(), static_cast(this->_internal_path().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "Proto_Node.Trail.texture.path"); - target = stream->WriteStringMaybeAliased( - 1, this->_internal_path(), target); + if (from.necromancer_blood_magic() != 0) { + _internal_set_necromancer_blood_magic(from._internal_necromancer_blood_magic()); } - - // .google.protobuf.Any original_token = 2; - if (this->has_original_token()) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage( - 2, _Internal::original_token(this), target, stream); + if (from.necromancer_curses() != 0) { + _internal_set_necromancer_curses(from._internal_necromancer_curses()); } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + if (from.necromancer_death_magic() != 0) { + _internal_set_necromancer_death_magic(from._internal_necromancer_death_magic()); } - // @@protoc_insertion_point(serialize_to_array_end:Proto_Node.Trail.texture) - return target; -} - -size_t Trail_texture::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Proto_Node.Trail.texture) - size_t total_size = 0; - - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // string path = 1; - if (this->path().size() > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_path()); + if (from.necromancer_soul_reaping() != 0) { + _internal_set_necromancer_soul_reaping(from._internal_necromancer_soul_reaping()); } - - // .google.protobuf.Any original_token = 2; - if (this->has_original_token()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *original_token_); + if (from.necromancer_spite() != 0) { + _internal_set_necromancer_spite(from._internal_necromancer_spite()); } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( - _internal_metadata_, total_size, &_cached_size_); + if (from.ranger_beastmastery() != 0) { + _internal_set_ranger_beastmastery(from._internal_ranger_beastmastery()); } - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} - -void Trail_texture::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:Proto_Node.Trail.texture) - GOOGLE_DCHECK_NE(&from, this); - const Trail_texture* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:Proto_Node.Trail.texture) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:Proto_Node.Trail.texture) - MergeFrom(*source); + if (from.ranger_marksmanship() != 0) { + _internal_set_ranger_marksmanship(from._internal_ranger_marksmanship()); } -} - -void Trail_texture::MergeFrom(const Trail_texture& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:Proto_Node.Trail.texture) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - if (from.path().size() > 0) { - _internal_set_path(from._internal_path()); + if (from.ranger_nature_magic() != 0) { + _internal_set_ranger_nature_magic(from._internal_ranger_nature_magic()); } - if (from.has_original_token()) { - _internal_mutable_original_token()->PROTOBUF_NAMESPACE_ID::Any::MergeFrom(from._internal_original_token()); + if (from.ranger_skirmishing() != 0) { + _internal_set_ranger_skirmishing(from._internal_ranger_skirmishing()); + } + if (from.ranger_wilderness_survival() != 0) { + _internal_set_ranger_wilderness_survival(from._internal_ranger_wilderness_survival()); + } + if (from.revenant_corruption() != 0) { + _internal_set_revenant_corruption(from._internal_revenant_corruption()); + } + if (from.revenant_devastation() != 0) { + _internal_set_revenant_devastation(from._internal_revenant_devastation()); + } + if (from.revenant_invocation() != 0) { + _internal_set_revenant_invocation(from._internal_revenant_invocation()); + } + if (from.revenant_retribution() != 0) { + _internal_set_revenant_retribution(from._internal_revenant_retribution()); + } + if (from.revenant_salvation() != 0) { + _internal_set_revenant_salvation(from._internal_revenant_salvation()); + } + if (from.thief_acrobatics() != 0) { + _internal_set_thief_acrobatics(from._internal_thief_acrobatics()); + } + if (from.thief_critical_strikes() != 0) { + _internal_set_thief_critical_strikes(from._internal_thief_critical_strikes()); + } + if (from.thief_deadly_arts() != 0) { + _internal_set_thief_deadly_arts(from._internal_thief_deadly_arts()); + } + if (from.thief_shadow_arts() != 0) { + _internal_set_thief_shadow_arts(from._internal_thief_shadow_arts()); + } + if (from.thief_trickery() != 0) { + _internal_set_thief_trickery(from._internal_thief_trickery()); + } + if (from.warrior_arms() != 0) { + _internal_set_warrior_arms(from._internal_warrior_arms()); + } + if (from.warrior_defense() != 0) { + _internal_set_warrior_defense(from._internal_warrior_defense()); + } + if (from.warrior_discipline() != 0) { + _internal_set_warrior_discipline(from._internal_warrior_discipline()); + } + if (from.warrior_strength() != 0) { + _internal_set_warrior_strength(from._internal_warrior_strength()); + } + if (from.warrior_tactics() != 0) { + _internal_set_warrior_tactics(from._internal_warrior_tactics()); } } -void Trail_texture::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:Proto_Node.Trail.texture) +void SpecializationFilter::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:SpecializationFilter) if (&from == this) return; Clear(); MergeFrom(from); } -void Trail_texture::CopyFrom(const Trail_texture& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Proto_Node.Trail.texture) +void SpecializationFilter::CopyFrom(const SpecializationFilter& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:SpecializationFilter) if (&from == this) return; Clear(); MergeFrom(from); } -bool Trail_texture::IsInitialized() const { +bool SpecializationFilter::IsInitialized() const { return true; } -void Trail_texture::InternalSwap(Trail_texture* other) { +void SpecializationFilter::InternalSwap(SpecializationFilter* other) { using std::swap; _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - path_.Swap(&other->path_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - swap(original_token_, other->original_token_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(SpecializationFilter, warrior_tactics_) + + sizeof(SpecializationFilter::warrior_tactics_) + - PROTOBUF_FIELD_OFFSET(SpecializationFilter, elementalist_tempest_)>( + reinterpret_cast(&elementalist_tempest_), + reinterpret_cast(&other->elementalist_tempest_)); } -::PROTOBUF_NAMESPACE_ID::Metadata Trail_texture::GetMetadata() const { +::PROTOBUF_NAMESPACE_ID::Metadata SpecializationFilter::GetMetadata() const { return GetMetadataStatic(); } // =================================================================== -void Trail_trail_data::InitAsDefaultInstance() { +void SpeciesFilter::InitAsDefaultInstance() { } -class Trail_trail_data::_Internal { +class SpeciesFilter::_Internal { public: }; -Trail_trail_data::Trail_trail_data(::PROTOBUF_NAMESPACE_ID::Arena* arena) +SpeciesFilter::SpeciesFilter(::PROTOBUF_NAMESPACE_ID::Arena* arena) : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:Proto_Node.Trail.trail_data) + // @@protoc_insertion_point(arena_constructor:SpeciesFilter) } -Trail_trail_data::Trail_trail_data(const Trail_trail_data& from) +SpeciesFilter::SpeciesFilter(const SpeciesFilter& from) : ::PROTOBUF_NAMESPACE_ID::Message() { _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - trail_data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_trail_data().empty()) { - trail_data_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_trail_data(), - GetArena()); - } - // @@protoc_insertion_point(copy_constructor:Proto_Node.Trail.trail_data) + ::memcpy(&asura_, &from.asura_, + static_cast(reinterpret_cast(&sylvari_) - + reinterpret_cast(&asura_)) + sizeof(sylvari_)); + // @@protoc_insertion_point(copy_constructor:SpeciesFilter) } -void Trail_trail_data::SharedCtor() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Trail_trail_data_node_2eproto.base); - trail_data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +void SpeciesFilter::SharedCtor() { + ::memset(&asura_, 0, static_cast( + reinterpret_cast(&sylvari_) - + reinterpret_cast(&asura_)) + sizeof(sylvari_)); } -Trail_trail_data::~Trail_trail_data() { - // @@protoc_insertion_point(destructor:Proto_Node.Trail.trail_data) +SpeciesFilter::~SpeciesFilter() { + // @@protoc_insertion_point(destructor:SpeciesFilter) SharedDtor(); _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -void Trail_trail_data::SharedDtor() { +void SpeciesFilter::SharedDtor() { GOOGLE_DCHECK(GetArena() == nullptr); - trail_data_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -void Trail_trail_data::ArenaDtor(void* object) { - Trail_trail_data* _this = reinterpret_cast< Trail_trail_data* >(object); +void SpeciesFilter::ArenaDtor(void* object) { + SpeciesFilter* _this = reinterpret_cast< SpeciesFilter* >(object); (void)_this; } -void Trail_trail_data::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +void SpeciesFilter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } -void Trail_trail_data::SetCachedSize(int size) const { +void SpeciesFilter::SetCachedSize(int size) const { _cached_size_.Set(size); } -const Trail_trail_data& Trail_trail_data::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Trail_trail_data_node_2eproto.base); +const SpeciesFilter& SpeciesFilter::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_SpeciesFilter_generators_2fproto_5ftemplates_2fnode_2eproto.base); return *internal_default_instance(); } -void Trail_trail_data::Clear() { -// @@protoc_insertion_point(message_clear_start:Proto_Node.Trail.trail_data) +void SpeciesFilter::Clear() { +// @@protoc_insertion_point(message_clear_start:SpeciesFilter) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - trail_data_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + ::memset(&asura_, 0, static_cast( + reinterpret_cast(&sylvari_) - + reinterpret_cast(&asura_)) + sizeof(sylvari_)); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -const char* Trail_trail_data::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +const char* SpeciesFilter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { @@ -8086,12 +8436,38 @@ const char* Trail_trail_data::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPA ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); CHK_(ptr); switch (tag >> 3) { - // string trail_data = 1; + // bool asura = 1; case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - auto str = _internal_mutable_trail_data(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "Proto_Node.Trail.trail_data.trail_data")); + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + asura_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool charr = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { + charr_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool human = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { + human_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool norn = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { + norn_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bool sylvari = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { + sylvari_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; @@ -8117,43 +8493,81 @@ const char* Trail_trail_data::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPA #undef CHK_ } -::PROTOBUF_NAMESPACE_ID::uint8* Trail_trail_data::_InternalSerialize( +::PROTOBUF_NAMESPACE_ID::uint8* SpeciesFilter::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Proto_Node.Trail.trail_data) + // @@protoc_insertion_point(serialize_to_array_start:SpeciesFilter) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - // string trail_data = 1; - if (this->trail_data().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_trail_data().data(), static_cast(this->_internal_trail_data().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "Proto_Node.Trail.trail_data.trail_data"); - target = stream->WriteStringMaybeAliased( - 1, this->_internal_trail_data(), target); + // bool asura = 1; + if (this->asura() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->_internal_asura(), target); + } + + // bool charr = 2; + if (this->charr() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_charr(), target); + } + + // bool human = 3; + if (this->human() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_human(), target); + } + + // bool norn = 4; + if (this->norn() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->_internal_norn(), target); + } + + // bool sylvari = 5; + if (this->sylvari() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->_internal_sylvari(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } - // @@protoc_insertion_point(serialize_to_array_end:Proto_Node.Trail.trail_data) + // @@protoc_insertion_point(serialize_to_array_end:SpeciesFilter) return target; } -size_t Trail_trail_data::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Proto_Node.Trail.trail_data) +size_t SpeciesFilter::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:SpeciesFilter) size_t total_size = 0; ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // string trail_data = 1; - if (this->trail_data().size() > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_trail_data()); + // bool asura = 1; + if (this->asura() != 0) { + total_size += 1 + 1; + } + + // bool charr = 2; + if (this->charr() != 0) { + total_size += 1 + 1; + } + + // bool human = 3; + if (this->human() != 0) { + total_size += 1 + 1; + } + + // bool norn = 4; + if (this->norn() != 0) { + total_size += 1 + 1; + } + + // bool sylvari = 5; + if (this->sylvari() != 0) { + total_size += 1 + 1; } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { @@ -8165,155 +8579,146 @@ size_t Trail_trail_data::ByteSizeLong() const { return total_size; } -void Trail_trail_data::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:Proto_Node.Trail.trail_data) +void SpeciesFilter::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:SpeciesFilter) GOOGLE_DCHECK_NE(&from, this); - const Trail_trail_data* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + const SpeciesFilter* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:Proto_Node.Trail.trail_data) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:SpeciesFilter) ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:Proto_Node.Trail.trail_data) + // @@protoc_insertion_point(generalized_merge_from_cast_success:SpeciesFilter) MergeFrom(*source); } } -void Trail_trail_data::MergeFrom(const Trail_trail_data& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:Proto_Node.Trail.trail_data) +void SpeciesFilter::MergeFrom(const SpeciesFilter& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:SpeciesFilter) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - if (from.trail_data().size() > 0) { - _internal_set_trail_data(from._internal_trail_data()); + if (from.asura() != 0) { + _internal_set_asura(from._internal_asura()); + } + if (from.charr() != 0) { + _internal_set_charr(from._internal_charr()); + } + if (from.human() != 0) { + _internal_set_human(from._internal_human()); + } + if (from.norn() != 0) { + _internal_set_norn(from._internal_norn()); + } + if (from.sylvari() != 0) { + _internal_set_sylvari(from._internal_sylvari()); } } -void Trail_trail_data::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:Proto_Node.Trail.trail_data) +void SpeciesFilter::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:SpeciesFilter) if (&from == this) return; Clear(); MergeFrom(from); } -void Trail_trail_data::CopyFrom(const Trail_trail_data& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Proto_Node.Trail.trail_data) +void SpeciesFilter::CopyFrom(const SpeciesFilter& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:SpeciesFilter) if (&from == this) return; Clear(); MergeFrom(from); } -bool Trail_trail_data::IsInitialized() const { +bool SpeciesFilter::IsInitialized() const { return true; } -void Trail_trail_data::InternalSwap(Trail_trail_data* other) { +void SpeciesFilter::InternalSwap(SpeciesFilter* other) { using std::swap; _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - trail_data_.Swap(&other->trail_data_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(SpeciesFilter, sylvari_) + + sizeof(SpeciesFilter::sylvari_) + - PROTOBUF_FIELD_OFFSET(SpeciesFilter, asura_)>( + reinterpret_cast(&asura_), + reinterpret_cast(&other->asura_)); } -::PROTOBUF_NAMESPACE_ID::Metadata Trail_trail_data::GetMetadata() const { +::PROTOBUF_NAMESPACE_ID::Metadata SpeciesFilter::GetMetadata() const { return GetMetadataStatic(); } // =================================================================== -void Trail::InitAsDefaultInstance() { - ::Proto_Node::_Trail_default_instance_._instance.get_mutable()->category_ = const_cast< ::Proto_Node::Category*>( - ::Proto_Node::Category::internal_default_instance()); +void TrailData::InitAsDefaultInstance() { } -class Trail::_Internal { +class TrailData::_Internal { public: - static const ::Proto_Node::Category& category(const Trail* msg); }; -const ::Proto_Node::Category& -Trail::_Internal::category(const Trail* msg) { - return *msg->category_; -} -Trail::Trail(::PROTOBUF_NAMESPACE_ID::Arena* arena) +TrailData::TrailData(::PROTOBUF_NAMESPACE_ID::Arena* arena) : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:Proto_Node.Trail) + // @@protoc_insertion_point(arena_constructor:TrailData) } -Trail::Trail(const Trail& from) +TrailData::TrailData(const TrailData& from) : ::PROTOBUF_NAMESPACE_ID::Message() { _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - bhdraft__schedule_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_bhdraft__schedule().empty()) { - bhdraft__schedule_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_bhdraft__schedule(), + trail_data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_trail_data().empty()) { + trail_data_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_trail_data(), GetArena()); } - if (from._internal_has_category()) { - category_ = new ::Proto_Node::Category(*from.category_); - } else { - category_ = nullptr; - } - ::memcpy(&achievement_bit_, &from.achievement_bit_, - static_cast(reinterpret_cast(&map_id_) - - reinterpret_cast(&achievement_bit_)) + sizeof(map_id_)); - // @@protoc_insertion_point(copy_constructor:Proto_Node.Trail) + // @@protoc_insertion_point(copy_constructor:TrailData) } -void Trail::SharedCtor() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Trail_node_2eproto.base); - bhdraft__schedule_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - ::memset(&category_, 0, static_cast( - reinterpret_cast(&map_id_) - - reinterpret_cast(&category_)) + sizeof(map_id_)); +void TrailData::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_TrailData_generators_2fproto_5ftemplates_2fnode_2eproto.base); + trail_data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -Trail::~Trail() { - // @@protoc_insertion_point(destructor:Proto_Node.Trail) +TrailData::~TrailData() { + // @@protoc_insertion_point(destructor:TrailData) SharedDtor(); _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -void Trail::SharedDtor() { +void TrailData::SharedDtor() { GOOGLE_DCHECK(GetArena() == nullptr); - bhdraft__schedule_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (this != internal_default_instance()) delete category_; + trail_data_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -void Trail::ArenaDtor(void* object) { - Trail* _this = reinterpret_cast< Trail* >(object); +void TrailData::ArenaDtor(void* object) { + TrailData* _this = reinterpret_cast< TrailData* >(object); (void)_this; } -void Trail::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +void TrailData::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } -void Trail::SetCachedSize(int size) const { +void TrailData::SetCachedSize(int size) const { _cached_size_.Set(size); } -const Trail& Trail::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Trail_node_2eproto.base); +const TrailData& TrailData::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_TrailData_generators_2fproto_5ftemplates_2fnode_2eproto.base); return *internal_default_instance(); } -void Trail::Clear() { -// @@protoc_insertion_point(message_clear_start:Proto_Node.Trail) +void TrailData::Clear() { +// @@protoc_insertion_point(message_clear_start:TrailData) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - bhdraft__schedule_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - if (GetArena() == nullptr && category_ != nullptr) { - delete category_; - } - category_ = nullptr; - ::memset(&achievement_bit_, 0, static_cast( - reinterpret_cast(&map_id_) - - reinterpret_cast(&achievement_bit_)) + sizeof(map_id_)); + trail_data_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -const char* Trail::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +const char* TrailData::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { @@ -8321,96 +8726,12 @@ const char* Trail::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inte ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); CHK_(ptr); switch (tag >> 3) { - // fixed32 achievement_bit = 1; + // string trail_data = 1; case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 13)) { - achievement_bit_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint32>(ptr); - ptr += sizeof(::PROTOBUF_NAMESPACE_ID::uint32); - } else goto handle_unusual; - continue; - // int32 achievement_id = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { - achievement_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // float alpha = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 29)) { - alpha_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - // float animation_speed = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 37)) { - animation_speed_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - // bool can_fade = 5; - case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { - can_fade_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // float distance_fade_end = 6; - case 6: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 53)) { - distance_fade_end_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - // float distance_fade_start = 7; - case 7: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 61)) { - distance_fade_start_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - // bool is_wall = 8; - case 8: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 64)) { - is_wall_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // string bhdraft__schedule = 9; - case 9: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 74)) { - auto str = _internal_mutable_bhdraft__schedule(); + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_trail_data(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "Proto_Node.Trail.bhdraft__schedule")); - CHK_(ptr); - } else goto handle_unusual; - continue; - // float bhdraft__schedule_duration = 10; - case 10: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 85)) { - bhdraft__schedule_duration_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - // float scale = 11; - case 11: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 93)) { - scale_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - // .Proto_Node.Category category = 12; - case 12: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 98)) { - ptr = ctx->ParseMessage(_internal_mutable_category(), ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // int32 map_id = 13; - case 13: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 104)) { - map_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "TrailData.trail_data")); CHK_(ptr); } else goto handle_unusual; continue; @@ -8436,183 +8757,43 @@ const char* Trail::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inte #undef CHK_ } -::PROTOBUF_NAMESPACE_ID::uint8* Trail::_InternalSerialize( +::PROTOBUF_NAMESPACE_ID::uint8* TrailData::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Proto_Node.Trail) + // @@protoc_insertion_point(serialize_to_array_start:TrailData) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - // fixed32 achievement_bit = 1; - if (this->achievement_bit() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFixed32ToArray(1, this->_internal_achievement_bit(), target); - } - - // int32 achievement_id = 2; - if (this->achievement_id() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_achievement_id(), target); - } - - // float alpha = 3; - if (!(this->alpha() <= 0 && this->alpha() >= 0)) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(3, this->_internal_alpha(), target); - } - - // float animation_speed = 4; - if (!(this->animation_speed() <= 0 && this->animation_speed() >= 0)) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(4, this->_internal_animation_speed(), target); - } - - // bool can_fade = 5; - if (this->can_fade() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->_internal_can_fade(), target); - } - - // float distance_fade_end = 6; - if (!(this->distance_fade_end() <= 0 && this->distance_fade_end() >= 0)) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(6, this->_internal_distance_fade_end(), target); - } - - // float distance_fade_start = 7; - if (!(this->distance_fade_start() <= 0 && this->distance_fade_start() >= 0)) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(7, this->_internal_distance_fade_start(), target); - } - - // bool is_wall = 8; - if (this->is_wall() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(8, this->_internal_is_wall(), target); - } - - // string bhdraft__schedule = 9; - if (this->bhdraft__schedule().size() > 0) { + // string trail_data = 1; + if (this->trail_data().size() > 0) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_bhdraft__schedule().data(), static_cast(this->_internal_bhdraft__schedule().length()), + this->_internal_trail_data().data(), static_cast(this->_internal_trail_data().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "Proto_Node.Trail.bhdraft__schedule"); + "TrailData.trail_data"); target = stream->WriteStringMaybeAliased( - 9, this->_internal_bhdraft__schedule(), target); - } - - // float bhdraft__schedule_duration = 10; - if (!(this->bhdraft__schedule_duration() <= 0 && this->bhdraft__schedule_duration() >= 0)) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(10, this->_internal_bhdraft__schedule_duration(), target); - } - - // float scale = 11; - if (!(this->scale() <= 0 && this->scale() >= 0)) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(11, this->_internal_scale(), target); - } - - // .Proto_Node.Category category = 12; - if (this->has_category()) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage( - 12, _Internal::category(this), target, stream); - } - - // int32 map_id = 13; - if (this->map_id() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(13, this->_internal_map_id(), target); + 1, this->_internal_trail_data(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } - // @@protoc_insertion_point(serialize_to_array_end:Proto_Node.Trail) + // @@protoc_insertion_point(serialize_to_array_end:TrailData) return target; } -size_t Trail::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Proto_Node.Trail) +size_t TrailData::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:TrailData) size_t total_size = 0; ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // string bhdraft__schedule = 9; - if (this->bhdraft__schedule().size() > 0) { + // string trail_data = 1; + if (this->trail_data().size() > 0) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_bhdraft__schedule()); - } - - // .Proto_Node.Category category = 12; - if (this->has_category()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *category_); - } - - // fixed32 achievement_bit = 1; - if (this->achievement_bit() != 0) { - total_size += 1 + 4; - } - - // int32 achievement_id = 2; - if (this->achievement_id() != 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( - this->_internal_achievement_id()); - } - - // float alpha = 3; - if (!(this->alpha() <= 0 && this->alpha() >= 0)) { - total_size += 1 + 4; - } - - // float animation_speed = 4; - if (!(this->animation_speed() <= 0 && this->animation_speed() >= 0)) { - total_size += 1 + 4; - } - - // float distance_fade_end = 6; - if (!(this->distance_fade_end() <= 0 && this->distance_fade_end() >= 0)) { - total_size += 1 + 4; - } - - // bool can_fade = 5; - if (this->can_fade() != 0) { - total_size += 1 + 1; - } - - // bool is_wall = 8; - if (this->is_wall() != 0) { - total_size += 1 + 1; - } - - // float distance_fade_start = 7; - if (!(this->distance_fade_start() <= 0 && this->distance_fade_start() >= 0)) { - total_size += 1 + 4; - } - - // float bhdraft__schedule_duration = 10; - if (!(this->bhdraft__schedule_duration() <= 0 && this->bhdraft__schedule_duration() >= 0)) { - total_size += 1 + 4; - } - - // float scale = 11; - if (!(this->scale() <= 0 && this->scale() >= 0)) { - total_size += 1 + 4; - } - - // int32 map_id = 13; - if (this->map_id() != 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( - this->_internal_map_id()); + this->_internal_trail_data()); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { @@ -8624,163 +8805,114 @@ size_t Trail::ByteSizeLong() const { return total_size; } -void Trail::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:Proto_Node.Trail) +void TrailData::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:TrailData) GOOGLE_DCHECK_NE(&from, this); - const Trail* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + const TrailData* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:Proto_Node.Trail) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:TrailData) ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:Proto_Node.Trail) + // @@protoc_insertion_point(generalized_merge_from_cast_success:TrailData) MergeFrom(*source); } } -void Trail::MergeFrom(const Trail& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:Proto_Node.Trail) +void TrailData::MergeFrom(const TrailData& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:TrailData) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - if (from.bhdraft__schedule().size() > 0) { - _internal_set_bhdraft__schedule(from._internal_bhdraft__schedule()); - } - if (from.has_category()) { - _internal_mutable_category()->::Proto_Node::Category::MergeFrom(from._internal_category()); - } - if (from.achievement_bit() != 0) { - _internal_set_achievement_bit(from._internal_achievement_bit()); - } - if (from.achievement_id() != 0) { - _internal_set_achievement_id(from._internal_achievement_id()); - } - if (!(from.alpha() <= 0 && from.alpha() >= 0)) { - _internal_set_alpha(from._internal_alpha()); - } - if (!(from.animation_speed() <= 0 && from.animation_speed() >= 0)) { - _internal_set_animation_speed(from._internal_animation_speed()); - } - if (!(from.distance_fade_end() <= 0 && from.distance_fade_end() >= 0)) { - _internal_set_distance_fade_end(from._internal_distance_fade_end()); - } - if (from.can_fade() != 0) { - _internal_set_can_fade(from._internal_can_fade()); - } - if (from.is_wall() != 0) { - _internal_set_is_wall(from._internal_is_wall()); - } - if (!(from.distance_fade_start() <= 0 && from.distance_fade_start() >= 0)) { - _internal_set_distance_fade_start(from._internal_distance_fade_start()); - } - if (!(from.bhdraft__schedule_duration() <= 0 && from.bhdraft__schedule_duration() >= 0)) { - _internal_set_bhdraft__schedule_duration(from._internal_bhdraft__schedule_duration()); - } - if (!(from.scale() <= 0 && from.scale() >= 0)) { - _internal_set_scale(from._internal_scale()); - } - if (from.map_id() != 0) { - _internal_set_map_id(from._internal_map_id()); + if (from.trail_data().size() > 0) { + _internal_set_trail_data(from._internal_trail_data()); } } -void Trail::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:Proto_Node.Trail) +void TrailData::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:TrailData) if (&from == this) return; Clear(); MergeFrom(from); } -void Trail::CopyFrom(const Trail& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Proto_Node.Trail) +void TrailData::CopyFrom(const TrailData& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:TrailData) if (&from == this) return; Clear(); MergeFrom(from); } -bool Trail::IsInitialized() const { +bool TrailData::IsInitialized() const { return true; } -void Trail::InternalSwap(Trail* other) { +void TrailData::InternalSwap(TrailData* other) { using std::swap; _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - bhdraft__schedule_.Swap(&other->bhdraft__schedule_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(Trail, map_id_) - + sizeof(Trail::map_id_) - - PROTOBUF_FIELD_OFFSET(Trail, category_)>( - reinterpret_cast(&category_), - reinterpret_cast(&other->category_)); + trail_data_.Swap(&other->trail_data_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } -::PROTOBUF_NAMESPACE_ID::Metadata Trail::GetMetadata() const { +::PROTOBUF_NAMESPACE_ID::Metadata TrailData::GetMetadata() const { return GetMetadataStatic(); } // @@protoc_insertion_point(namespace_scope) -} // namespace Proto_Node PROTOBUF_NAMESPACE_OPEN -template<> PROTOBUF_NOINLINE ::Proto_Node::Category_ChildrenEntry_DoNotUse* Arena::CreateMaybeMessage< ::Proto_Node::Category_ChildrenEntry_DoNotUse >(Arena* arena) { - return Arena::CreateMessageInternal< ::Proto_Node::Category_ChildrenEntry_DoNotUse >(arena); -} -template<> PROTOBUF_NOINLINE ::Proto_Node::Category* Arena::CreateMaybeMessage< ::Proto_Node::Category >(Arena* arena) { - return Arena::CreateMessageInternal< ::Proto_Node::Category >(arena); -} -template<> PROTOBUF_NOINLINE ::Proto_Node::Icon_texture* Arena::CreateMaybeMessage< ::Proto_Node::Icon_texture >(Arena* arena) { - return Arena::CreateMessageInternal< ::Proto_Node::Icon_texture >(arena); +template<> PROTOBUF_NOINLINE ::Category_ChildrenEntry_DoNotUse* Arena::CreateMaybeMessage< ::Category_ChildrenEntry_DoNotUse >(Arena* arena) { + return Arena::CreateMessageInternal< ::Category_ChildrenEntry_DoNotUse >(arena); } -template<> PROTOBUF_NOINLINE ::Proto_Node::Icon_position* Arena::CreateMaybeMessage< ::Proto_Node::Icon_position >(Arena* arena) { - return Arena::CreateMessageInternal< ::Proto_Node::Icon_position >(arena); +template<> PROTOBUF_NOINLINE ::Category* Arena::CreateMaybeMessage< ::Category >(Arena* arena) { + return Arena::CreateMessageInternal< ::Category >(arena); } -template<> PROTOBUF_NOINLINE ::Proto_Node::Icon_euler_rotation* Arena::CreateMaybeMessage< ::Proto_Node::Icon_euler_rotation >(Arena* arena) { - return Arena::CreateMessageInternal< ::Proto_Node::Icon_euler_rotation >(arena); +template<> PROTOBUF_NOINLINE ::Icon* Arena::CreateMaybeMessage< ::Icon >(Arena* arena) { + return Arena::CreateMessageInternal< ::Icon >(arena); } -template<> PROTOBUF_NOINLINE ::Proto_Node::Icon_trigger_guid* Arena::CreateMaybeMessage< ::Proto_Node::Icon_trigger_guid >(Arena* arena) { - return Arena::CreateMessageInternal< ::Proto_Node::Icon_trigger_guid >(arena); +template<> PROTOBUF_NOINLINE ::RICHARDS* Arena::CreateMaybeMessage< ::RICHARDS >(Arena* arena) { + return Arena::CreateMessageInternal< ::RICHARDS >(arena); } -template<> PROTOBUF_NOINLINE ::Proto_Node::Icon_trigger* Arena::CreateMaybeMessage< ::Proto_Node::Icon_trigger >(Arena* arena) { - return Arena::CreateMessageInternal< ::Proto_Node::Icon_trigger >(arena); +template<> PROTOBUF_NOINLINE ::Texture* Arena::CreateMaybeMessage< ::Texture >(Arena* arena) { + return Arena::CreateMessageInternal< ::Texture >(arena); } -template<> PROTOBUF_NOINLINE ::Proto_Node::Icon* Arena::CreateMaybeMessage< ::Proto_Node::Icon >(Arena* arena) { - return Arena::CreateMessageInternal< ::Proto_Node::Icon >(arena); +template<> PROTOBUF_NOINLINE ::Position* Arena::CreateMaybeMessage< ::Position >(Arena* arena) { + return Arena::CreateMessageInternal< ::Position >(arena); } -template<> PROTOBUF_NOINLINE ::Proto_Node::Trail_color* Arena::CreateMaybeMessage< ::Proto_Node::Trail_color >(Arena* arena) { - return Arena::CreateMessageInternal< ::Proto_Node::Trail_color >(arena); +template<> PROTOBUF_NOINLINE ::EulerRotation* Arena::CreateMaybeMessage< ::EulerRotation >(Arena* arena) { + return Arena::CreateMessageInternal< ::EulerRotation >(arena); } -template<> PROTOBUF_NOINLINE ::Proto_Node::Trail_festival_filter* Arena::CreateMaybeMessage< ::Proto_Node::Trail_festival_filter >(Arena* arena) { - return Arena::CreateMessageInternal< ::Proto_Node::Trail_festival_filter >(arena); +template<> PROTOBUF_NOINLINE ::Trigger* Arena::CreateMaybeMessage< ::Trigger >(Arena* arena) { + return Arena::CreateMessageInternal< ::Trigger >(arena); } -template<> PROTOBUF_NOINLINE ::Proto_Node::Trail_guid* Arena::CreateMaybeMessage< ::Proto_Node::Trail_guid >(Arena* arena) { - return Arena::CreateMessageInternal< ::Proto_Node::Trail_guid >(arena); +template<> PROTOBUF_NOINLINE ::GUID* Arena::CreateMaybeMessage< ::GUID >(Arena* arena) { + return Arena::CreateMessageInternal< ::GUID >(arena); } -template<> PROTOBUF_NOINLINE ::Proto_Node::Trail_map_type_filter* Arena::CreateMaybeMessage< ::Proto_Node::Trail_map_type_filter >(Arena* arena) { - return Arena::CreateMessageInternal< ::Proto_Node::Trail_map_type_filter >(arena); +template<> PROTOBUF_NOINLINE ::Color* Arena::CreateMaybeMessage< ::Color >(Arena* arena) { + return Arena::CreateMessageInternal< ::Color >(arena); } -template<> PROTOBUF_NOINLINE ::Proto_Node::Trail_mount_filter* Arena::CreateMaybeMessage< ::Proto_Node::Trail_mount_filter >(Arena* arena) { - return Arena::CreateMessageInternal< ::Proto_Node::Trail_mount_filter >(arena); +template<> PROTOBUF_NOINLINE ::FestivalFilter* Arena::CreateMaybeMessage< ::FestivalFilter >(Arena* arena) { + return Arena::CreateMessageInternal< ::FestivalFilter >(arena); } -template<> PROTOBUF_NOINLINE ::Proto_Node::Trail_profession_filter* Arena::CreateMaybeMessage< ::Proto_Node::Trail_profession_filter >(Arena* arena) { - return Arena::CreateMessageInternal< ::Proto_Node::Trail_profession_filter >(arena); +template<> PROTOBUF_NOINLINE ::MapTypeFilter* Arena::CreateMaybeMessage< ::MapTypeFilter >(Arena* arena) { + return Arena::CreateMessageInternal< ::MapTypeFilter >(arena); } -template<> PROTOBUF_NOINLINE ::Proto_Node::Trail_specialization_filter* Arena::CreateMaybeMessage< ::Proto_Node::Trail_specialization_filter >(Arena* arena) { - return Arena::CreateMessageInternal< ::Proto_Node::Trail_specialization_filter >(arena); +template<> PROTOBUF_NOINLINE ::MountFilter* Arena::CreateMaybeMessage< ::MountFilter >(Arena* arena) { + return Arena::CreateMessageInternal< ::MountFilter >(arena); } -template<> PROTOBUF_NOINLINE ::Proto_Node::Trail_species_filter* Arena::CreateMaybeMessage< ::Proto_Node::Trail_species_filter >(Arena* arena) { - return Arena::CreateMessageInternal< ::Proto_Node::Trail_species_filter >(arena); +template<> PROTOBUF_NOINLINE ::ProfessionFilter* Arena::CreateMaybeMessage< ::ProfessionFilter >(Arena* arena) { + return Arena::CreateMessageInternal< ::ProfessionFilter >(arena); } -template<> PROTOBUF_NOINLINE ::Proto_Node::Trail_texture* Arena::CreateMaybeMessage< ::Proto_Node::Trail_texture >(Arena* arena) { - return Arena::CreateMessageInternal< ::Proto_Node::Trail_texture >(arena); +template<> PROTOBUF_NOINLINE ::SpecializationFilter* Arena::CreateMaybeMessage< ::SpecializationFilter >(Arena* arena) { + return Arena::CreateMessageInternal< ::SpecializationFilter >(arena); } -template<> PROTOBUF_NOINLINE ::Proto_Node::Trail_trail_data* Arena::CreateMaybeMessage< ::Proto_Node::Trail_trail_data >(Arena* arena) { - return Arena::CreateMessageInternal< ::Proto_Node::Trail_trail_data >(arena); +template<> PROTOBUF_NOINLINE ::SpeciesFilter* Arena::CreateMaybeMessage< ::SpeciesFilter >(Arena* arena) { + return Arena::CreateMessageInternal< ::SpeciesFilter >(arena); } -template<> PROTOBUF_NOINLINE ::Proto_Node::Trail* Arena::CreateMaybeMessage< ::Proto_Node::Trail >(Arena* arena) { - return Arena::CreateMessageInternal< ::Proto_Node::Trail >(arena); +template<> PROTOBUF_NOINLINE ::TrailData* Arena::CreateMaybeMessage< ::TrailData >(Arena* arena) { + return Arena::CreateMessageInternal< ::TrailData >(arena); } PROTOBUF_NAMESPACE_CLOSE diff --git a/xml_converter/generators/proto_templates/node.pb.h b/xml_converter/generators/proto_templates/node.pb.h index d465e327..84aeeb28 100644 --- a/xml_converter/generators/proto_templates/node.pb.h +++ b/xml_converter/generators/proto_templates/node.pb.h @@ -1,8 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: node.proto +// source: generators/proto_templates/node.proto -#ifndef GOOGLE_PROTOBUF_INCLUDED_node_2eproto -#define GOOGLE_PROTOBUF_INCLUDED_node_2eproto +#ifndef GOOGLE_PROTOBUF_INCLUDED_generators_2fproto_5ftemplates_2fnode_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_generators_2fproto_5ftemplates_2fnode_2eproto #include #include @@ -36,10 +36,9 @@ #include #include #include -#include // @@protoc_insertion_point(includes) #include -#define PROTOBUF_INTERNAL_EXPORT_node_2eproto +#define PROTOBUF_INTERNAL_EXPORT_generators_2fproto_5ftemplates_2fnode_2eproto PROTOBUF_NAMESPACE_OPEN namespace internal { class AnyMetadata; @@ -47,168 +46,157 @@ class AnyMetadata; PROTOBUF_NAMESPACE_CLOSE // Internal implementation detail -- do not use these members. -struct TableStruct_node_2eproto { +struct TableStruct_generators_2fproto_5ftemplates_2fnode_2eproto { static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] PROTOBUF_SECTION_VARIABLE(protodesc_cold); static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[] PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[19] + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[17] PROTOBUF_SECTION_VARIABLE(protodesc_cold); static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[]; }; -extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_node_2eproto; -namespace Proto_Node { +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto; class Category; class CategoryDefaultTypeInternal; extern CategoryDefaultTypeInternal _Category_default_instance_; class Category_ChildrenEntry_DoNotUse; class Category_ChildrenEntry_DoNotUseDefaultTypeInternal; extern Category_ChildrenEntry_DoNotUseDefaultTypeInternal _Category_ChildrenEntry_DoNotUse_default_instance_; +class Color; +class ColorDefaultTypeInternal; +extern ColorDefaultTypeInternal _Color_default_instance_; +class EulerRotation; +class EulerRotationDefaultTypeInternal; +extern EulerRotationDefaultTypeInternal _EulerRotation_default_instance_; +class FestivalFilter; +class FestivalFilterDefaultTypeInternal; +extern FestivalFilterDefaultTypeInternal _FestivalFilter_default_instance_; +class GUID; +class GUIDDefaultTypeInternal; +extern GUIDDefaultTypeInternal _GUID_default_instance_; class Icon; class IconDefaultTypeInternal; extern IconDefaultTypeInternal _Icon_default_instance_; -class Icon_euler_rotation; -class Icon_euler_rotationDefaultTypeInternal; -extern Icon_euler_rotationDefaultTypeInternal _Icon_euler_rotation_default_instance_; -class Icon_position; -class Icon_positionDefaultTypeInternal; -extern Icon_positionDefaultTypeInternal _Icon_position_default_instance_; -class Icon_texture; -class Icon_textureDefaultTypeInternal; -extern Icon_textureDefaultTypeInternal _Icon_texture_default_instance_; -class Icon_trigger; -class Icon_triggerDefaultTypeInternal; -extern Icon_triggerDefaultTypeInternal _Icon_trigger_default_instance_; -class Icon_trigger_guid; -class Icon_trigger_guidDefaultTypeInternal; -extern Icon_trigger_guidDefaultTypeInternal _Icon_trigger_guid_default_instance_; -class Trail; -class TrailDefaultTypeInternal; -extern TrailDefaultTypeInternal _Trail_default_instance_; -class Trail_color; -class Trail_colorDefaultTypeInternal; -extern Trail_colorDefaultTypeInternal _Trail_color_default_instance_; -class Trail_festival_filter; -class Trail_festival_filterDefaultTypeInternal; -extern Trail_festival_filterDefaultTypeInternal _Trail_festival_filter_default_instance_; -class Trail_guid; -class Trail_guidDefaultTypeInternal; -extern Trail_guidDefaultTypeInternal _Trail_guid_default_instance_; -class Trail_map_type_filter; -class Trail_map_type_filterDefaultTypeInternal; -extern Trail_map_type_filterDefaultTypeInternal _Trail_map_type_filter_default_instance_; -class Trail_mount_filter; -class Trail_mount_filterDefaultTypeInternal; -extern Trail_mount_filterDefaultTypeInternal _Trail_mount_filter_default_instance_; -class Trail_profession_filter; -class Trail_profession_filterDefaultTypeInternal; -extern Trail_profession_filterDefaultTypeInternal _Trail_profession_filter_default_instance_; -class Trail_specialization_filter; -class Trail_specialization_filterDefaultTypeInternal; -extern Trail_specialization_filterDefaultTypeInternal _Trail_specialization_filter_default_instance_; -class Trail_species_filter; -class Trail_species_filterDefaultTypeInternal; -extern Trail_species_filterDefaultTypeInternal _Trail_species_filter_default_instance_; -class Trail_texture; -class Trail_textureDefaultTypeInternal; -extern Trail_textureDefaultTypeInternal _Trail_texture_default_instance_; -class Trail_trail_data; -class Trail_trail_dataDefaultTypeInternal; -extern Trail_trail_dataDefaultTypeInternal _Trail_trail_data_default_instance_; -} // namespace Proto_Node +class MapTypeFilter; +class MapTypeFilterDefaultTypeInternal; +extern MapTypeFilterDefaultTypeInternal _MapTypeFilter_default_instance_; +class MountFilter; +class MountFilterDefaultTypeInternal; +extern MountFilterDefaultTypeInternal _MountFilter_default_instance_; +class Position; +class PositionDefaultTypeInternal; +extern PositionDefaultTypeInternal _Position_default_instance_; +class ProfessionFilter; +class ProfessionFilterDefaultTypeInternal; +extern ProfessionFilterDefaultTypeInternal _ProfessionFilter_default_instance_; +class RICHARDS; +class RICHARDSDefaultTypeInternal; +extern RICHARDSDefaultTypeInternal _RICHARDS_default_instance_; +class SpecializationFilter; +class SpecializationFilterDefaultTypeInternal; +extern SpecializationFilterDefaultTypeInternal _SpecializationFilter_default_instance_; +class SpeciesFilter; +class SpeciesFilterDefaultTypeInternal; +extern SpeciesFilterDefaultTypeInternal _SpeciesFilter_default_instance_; +class Texture; +class TextureDefaultTypeInternal; +extern TextureDefaultTypeInternal _Texture_default_instance_; +class TrailData; +class TrailDataDefaultTypeInternal; +extern TrailDataDefaultTypeInternal _TrailData_default_instance_; +class Trigger; +class TriggerDefaultTypeInternal; +extern TriggerDefaultTypeInternal _Trigger_default_instance_; PROTOBUF_NAMESPACE_OPEN -template<> ::Proto_Node::Category* Arena::CreateMaybeMessage<::Proto_Node::Category>(Arena*); -template<> ::Proto_Node::Category_ChildrenEntry_DoNotUse* Arena::CreateMaybeMessage<::Proto_Node::Category_ChildrenEntry_DoNotUse>(Arena*); -template<> ::Proto_Node::Icon* Arena::CreateMaybeMessage<::Proto_Node::Icon>(Arena*); -template<> ::Proto_Node::Icon_euler_rotation* Arena::CreateMaybeMessage<::Proto_Node::Icon_euler_rotation>(Arena*); -template<> ::Proto_Node::Icon_position* Arena::CreateMaybeMessage<::Proto_Node::Icon_position>(Arena*); -template<> ::Proto_Node::Icon_texture* Arena::CreateMaybeMessage<::Proto_Node::Icon_texture>(Arena*); -template<> ::Proto_Node::Icon_trigger* Arena::CreateMaybeMessage<::Proto_Node::Icon_trigger>(Arena*); -template<> ::Proto_Node::Icon_trigger_guid* Arena::CreateMaybeMessage<::Proto_Node::Icon_trigger_guid>(Arena*); -template<> ::Proto_Node::Trail* Arena::CreateMaybeMessage<::Proto_Node::Trail>(Arena*); -template<> ::Proto_Node::Trail_color* Arena::CreateMaybeMessage<::Proto_Node::Trail_color>(Arena*); -template<> ::Proto_Node::Trail_festival_filter* Arena::CreateMaybeMessage<::Proto_Node::Trail_festival_filter>(Arena*); -template<> ::Proto_Node::Trail_guid* Arena::CreateMaybeMessage<::Proto_Node::Trail_guid>(Arena*); -template<> ::Proto_Node::Trail_map_type_filter* Arena::CreateMaybeMessage<::Proto_Node::Trail_map_type_filter>(Arena*); -template<> ::Proto_Node::Trail_mount_filter* Arena::CreateMaybeMessage<::Proto_Node::Trail_mount_filter>(Arena*); -template<> ::Proto_Node::Trail_profession_filter* Arena::CreateMaybeMessage<::Proto_Node::Trail_profession_filter>(Arena*); -template<> ::Proto_Node::Trail_specialization_filter* Arena::CreateMaybeMessage<::Proto_Node::Trail_specialization_filter>(Arena*); -template<> ::Proto_Node::Trail_species_filter* Arena::CreateMaybeMessage<::Proto_Node::Trail_species_filter>(Arena*); -template<> ::Proto_Node::Trail_texture* Arena::CreateMaybeMessage<::Proto_Node::Trail_texture>(Arena*); -template<> ::Proto_Node::Trail_trail_data* Arena::CreateMaybeMessage<::Proto_Node::Trail_trail_data>(Arena*); +template<> ::Category* Arena::CreateMaybeMessage<::Category>(Arena*); +template<> ::Category_ChildrenEntry_DoNotUse* Arena::CreateMaybeMessage<::Category_ChildrenEntry_DoNotUse>(Arena*); +template<> ::Color* Arena::CreateMaybeMessage<::Color>(Arena*); +template<> ::EulerRotation* Arena::CreateMaybeMessage<::EulerRotation>(Arena*); +template<> ::FestivalFilter* Arena::CreateMaybeMessage<::FestivalFilter>(Arena*); +template<> ::GUID* Arena::CreateMaybeMessage<::GUID>(Arena*); +template<> ::Icon* Arena::CreateMaybeMessage<::Icon>(Arena*); +template<> ::MapTypeFilter* Arena::CreateMaybeMessage<::MapTypeFilter>(Arena*); +template<> ::MountFilter* Arena::CreateMaybeMessage<::MountFilter>(Arena*); +template<> ::Position* Arena::CreateMaybeMessage<::Position>(Arena*); +template<> ::ProfessionFilter* Arena::CreateMaybeMessage<::ProfessionFilter>(Arena*); +template<> ::RICHARDS* Arena::CreateMaybeMessage<::RICHARDS>(Arena*); +template<> ::SpecializationFilter* Arena::CreateMaybeMessage<::SpecializationFilter>(Arena*); +template<> ::SpeciesFilter* Arena::CreateMaybeMessage<::SpeciesFilter>(Arena*); +template<> ::Texture* Arena::CreateMaybeMessage<::Texture>(Arena*); +template<> ::TrailData* Arena::CreateMaybeMessage<::TrailData>(Arena*); +template<> ::Trigger* Arena::CreateMaybeMessage<::Trigger>(Arena*); PROTOBUF_NAMESPACE_CLOSE -namespace Proto_Node { - -enum Icon_trigger_reset_behavior : int { - Icon_trigger_reset_behavior_always_visible = 0, - Icon_trigger_reset_behavior_map_change = 1, - Icon_trigger_reset_behavior_daily_reset = 2, - Icon_trigger_reset_behavior_never = 3, - Icon_trigger_reset_behavior_timer = 4, - Icon_trigger_reset_behavior_map_reset = 5, - Icon_trigger_reset_behavior_instance_change = 6, - Icon_trigger_reset_behavior_daily_reset_per_character = 7, - Icon_trigger_reset_behavior_weekly_reset = 8, - Icon_trigger_reset_behavior_Icon_trigger_reset_behavior_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(), - Icon_trigger_reset_behavior_Icon_trigger_reset_behavior_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max() + +enum CullChirality : int { + none = 0, + clockwise = 1, + counter_clockwise = 2, + CullChirality_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(), + CullChirality_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max() }; -bool Icon_trigger_reset_behavior_IsValid(int value); -constexpr Icon_trigger_reset_behavior Icon_trigger_reset_behavior_reset_behavior_MIN = Icon_trigger_reset_behavior_always_visible; -constexpr Icon_trigger_reset_behavior Icon_trigger_reset_behavior_reset_behavior_MAX = Icon_trigger_reset_behavior_weekly_reset; -constexpr int Icon_trigger_reset_behavior_reset_behavior_ARRAYSIZE = Icon_trigger_reset_behavior_reset_behavior_MAX + 1; +bool CullChirality_IsValid(int value); +constexpr CullChirality CullChirality_MIN = none; +constexpr CullChirality CullChirality_MAX = counter_clockwise; +constexpr int CullChirality_ARRAYSIZE = CullChirality_MAX + 1; -const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* Icon_trigger_reset_behavior_descriptor(); +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* CullChirality_descriptor(); template -inline const std::string& Icon_trigger_reset_behavior_Name(T enum_t_value) { - static_assert(::std::is_same::value || +inline const std::string& CullChirality_Name(T enum_t_value) { + static_assert(::std::is_same::value || ::std::is_integral::value, - "Incorrect type passed to function Icon_trigger_reset_behavior_Name."); + "Incorrect type passed to function CullChirality_Name."); return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( - Icon_trigger_reset_behavior_descriptor(), enum_t_value); -} -inline bool Icon_trigger_reset_behavior_Parse( - const std::string& name, Icon_trigger_reset_behavior* value) { - return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( - Icon_trigger_reset_behavior_descriptor(), name, value); -} -enum Trail_cull_chirality : int { - Trail_cull_chirality_none = 0, - Trail_cull_chirality_clockwise = 1, - Trail_cull_chirality_counter_clockwise = 2, - Trail_cull_chirality_Trail_cull_chirality_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(), - Trail_cull_chirality_Trail_cull_chirality_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max() + CullChirality_descriptor(), enum_t_value); +} +inline bool CullChirality_Parse( + const std::string& name, CullChirality* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + CullChirality_descriptor(), name, value); +} +enum ResetBehavior : int { + always_visible = 0, + map_change = 1, + daily_reset = 2, + never = 3, + timer = 4, + map_reset = 5, + instance_change = 6, + daily_reset_per_character = 7, + weekly_reset = 8, + ResetBehavior_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(), + ResetBehavior_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max() }; -bool Trail_cull_chirality_IsValid(int value); -constexpr Trail_cull_chirality Trail_cull_chirality_cull_chirality_MIN = Trail_cull_chirality_none; -constexpr Trail_cull_chirality Trail_cull_chirality_cull_chirality_MAX = Trail_cull_chirality_counter_clockwise; -constexpr int Trail_cull_chirality_cull_chirality_ARRAYSIZE = Trail_cull_chirality_cull_chirality_MAX + 1; +bool ResetBehavior_IsValid(int value); +constexpr ResetBehavior ResetBehavior_MIN = always_visible; +constexpr ResetBehavior ResetBehavior_MAX = weekly_reset; +constexpr int ResetBehavior_ARRAYSIZE = ResetBehavior_MAX + 1; -const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* Trail_cull_chirality_descriptor(); +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ResetBehavior_descriptor(); template -inline const std::string& Trail_cull_chirality_Name(T enum_t_value) { - static_assert(::std::is_same::value || +inline const std::string& ResetBehavior_Name(T enum_t_value) { + static_assert(::std::is_same::value || ::std::is_integral::value, - "Incorrect type passed to function Trail_cull_chirality_Name."); + "Incorrect type passed to function ResetBehavior_Name."); return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( - Trail_cull_chirality_descriptor(), enum_t_value); + ResetBehavior_descriptor(), enum_t_value); } -inline bool Trail_cull_chirality_Parse( - const std::string& name, Trail_cull_chirality* value) { - return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( - Trail_cull_chirality_descriptor(), name, value); +inline bool ResetBehavior_Parse( + const std::string& name, ResetBehavior* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + ResetBehavior_descriptor(), name, value); } // =================================================================== class Category_ChildrenEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { public: typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; @@ -217,15 +205,15 @@ class Category_ChildrenEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal void MergeFrom(const Category_ChildrenEntry_DoNotUse& other); static const Category_ChildrenEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_Category_ChildrenEntry_DoNotUse_default_instance_); } static bool ValidateKey(std::string* s) { - return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "Proto_Node.Category.ChildrenEntry.key"); + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "Category.ChildrenEntry.key"); } static bool ValidateValue(void*) { return true; } void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& other) final; ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; private: static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); - return ::descriptor_table_node_2eproto.file_level_metadata[0]; + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto); + return ::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto.file_level_metadata[0]; } public: @@ -234,7 +222,7 @@ class Category_ChildrenEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal // ------------------------------------------------------------------- class Category PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Proto_Node.Category) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Category) */ { public: inline Category() : Category(nullptr) {}; virtual ~Category(); @@ -323,7 +311,7 @@ class Category PROTOBUF_FINAL : void InternalSwap(Category* other); friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Proto_Node.Category"; + return "Category"; } protected: explicit Category(::PROTOBUF_NAMESPACE_ID::Arena* arena); @@ -335,8 +323,8 @@ class Category PROTOBUF_FINAL : ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; private: static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); - return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto); + return ::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto.file_level_metadata[kIndexInFileMessages]; } public: @@ -354,21 +342,21 @@ class Category PROTOBUF_FINAL : kDefaultVisibilityFieldNumber = 1, kIsSeparatorFieldNumber = 3, }; - // map children = 6; + // map children = 6; int children_size() const; private: int _internal_children_size() const; public: void clear_children(); private: - const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Proto_Node::Category >& + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Category >& _internal_children() const; - ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Proto_Node::Category >* + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Category >* _internal_mutable_children(); public: - const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Proto_Node::Category >& + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Category >& children() const; - ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Proto_Node::Category >* + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Category >* mutable_children(); // string display_name = 2; @@ -464,7 +452,7 @@ class Category PROTOBUF_FINAL : void _internal_set_is_separator(bool value); public: - // @@protoc_insertion_point(class_scope:Proto_Node.Category) + // @@protoc_insertion_point(class_scope:Category) private: class _Internal; @@ -473,7 +461,7 @@ class Category PROTOBUF_FINAL : typedef void DestructorSkippable_; ::PROTOBUF_NAMESPACE_ID::internal::MapField< Category_ChildrenEntry_DoNotUse, - std::string, ::Proto_Node::Category, + std::string, ::Category, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE, 0 > children_; @@ -483,27 +471,27 @@ class Category PROTOBUF_FINAL : bool default_visibility_; bool is_separator_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_node_2eproto; + friend struct ::TableStruct_generators_2fproto_5ftemplates_2fnode_2eproto; }; // ------------------------------------------------------------------- -class Icon_texture PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Proto_Node.Icon.texture) */ { +class Icon PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Icon) */ { public: - inline Icon_texture() : Icon_texture(nullptr) {}; - virtual ~Icon_texture(); + inline Icon() : Icon(nullptr) {}; + virtual ~Icon(); - Icon_texture(const Icon_texture& from); - Icon_texture(Icon_texture&& from) noexcept - : Icon_texture() { + Icon(const Icon& from); + Icon(Icon&& from) noexcept + : Icon() { *this = ::std::move(from); } - inline Icon_texture& operator=(const Icon_texture& from) { + inline Icon& operator=(const Icon& from) { CopyFrom(from); return *this; } - inline Icon_texture& operator=(Icon_texture&& from) noexcept { + inline Icon& operator=(Icon&& from) noexcept { if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { @@ -521,20 +509,20 @@ class Icon_texture PROTOBUF_FINAL : static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { return GetMetadataStatic().reflection; } - static const Icon_texture& default_instance(); + static const Icon& default_instance(); static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const Icon_texture* internal_default_instance() { - return reinterpret_cast( - &_Icon_texture_default_instance_); + static inline const Icon* internal_default_instance() { + return reinterpret_cast( + &_Icon_default_instance_); } static constexpr int kIndexInFileMessages = 2; - friend void swap(Icon_texture& a, Icon_texture& b) { + friend void swap(Icon& a, Icon& b) { a.Swap(&b); } - inline void Swap(Icon_texture* other) { + inline void Swap(Icon* other) { if (other == this) return; if (GetArena() == other->GetArena()) { InternalSwap(other); @@ -542,7 +530,7 @@ class Icon_texture PROTOBUF_FINAL : ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(Icon_texture* other) { + void UnsafeArenaSwap(Icon* other) { if (other == this) return; GOOGLE_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); @@ -550,17 +538,17 @@ class Icon_texture PROTOBUF_FINAL : // implements Message ---------------------------------------------- - inline Icon_texture* New() const final { - return CreateMaybeMessage(nullptr); + inline Icon* New() const final { + return CreateMaybeMessage(nullptr); } - Icon_texture* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); + Icon* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); } void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const Icon_texture& from); - void MergeFrom(const Icon_texture& from); + void CopyFrom(const Icon& from); + void MergeFrom(const Icon& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; @@ -574,13 +562,13 @@ class Icon_texture PROTOBUF_FINAL : inline void SharedCtor(); inline void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(Icon_texture* other); + void InternalSwap(Icon* other); friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Proto_Node.Icon.texture"; + return "Icon"; } protected: - explicit Icon_texture(::PROTOBUF_NAMESPACE_ID::Arena* arena); + explicit Icon(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); @@ -589,8 +577,8 @@ class Icon_texture PROTOBUF_FINAL : ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; private: static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); - return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto); + return ::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto.file_level_metadata[kIndexInFileMessages]; } public: @@ -600,401 +588,415 @@ class Icon_texture PROTOBUF_FINAL : // accessors ------------------------------------------------------- enum : int { - kPathFieldNumber = 1, - kOriginalTokenFieldNumber = 2, + kTipDescriptionFieldNumber = 24, + kTipNameFieldNumber = 25, + kBhdraftScheduleFieldNumber = 2052, + kCategoryFieldNumber = 1, + kTextureFieldNumber = 2, + kGuidFieldNumber = 3, + kPositionFieldNumber = 8, + kTriggerFieldNumber = 10, + kMapIdFieldNumber = 4, + kDistanceFadeEndFieldNumber = 5, + kDistanceFadeStartFieldNumber = 6, + kHeightOffsetFieldNumber = 7, + kResetBehaviorFieldNumber = 9, + kAchievementBitFieldNumber = 16, + kAchievementIdFieldNumber = 17, + kAlphaFieldNumber = 18, + kMinimumSizeOnScreenFieldNumber = 20, + kMapDisplaySizeFieldNumber = 21, + kBhdraftScheduleDurationFieldNumber = 2053, + kMaximumSizeOnScreenFieldNumber = 22, + kCanFadeFieldNumber = 19, + kScaleOnMapWithZoomFieldNumber = 23, + kTentativeRenderIngameFieldNumber = 2049, + kTentativeRenderOnMapFieldNumber = 2050, + kTentativeScaleFieldNumber = 2048, + kTentativeRenderOnMinimapFieldNumber = 2051, }; - // string path = 1; - void clear_path(); - const std::string& path() const; - void set_path(const std::string& value); - void set_path(std::string&& value); - void set_path(const char* value); - void set_path(const char* value, size_t size); - std::string* mutable_path(); - std::string* release_path(); - void set_allocated_path(std::string* path); + // string tip_description = 24; + void clear_tip_description(); + const std::string& tip_description() const; + void set_tip_description(const std::string& value); + void set_tip_description(std::string&& value); + void set_tip_description(const char* value); + void set_tip_description(const char* value, size_t size); + std::string* mutable_tip_description(); + std::string* release_tip_description(); + void set_allocated_tip_description(std::string* tip_description); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") - std::string* unsafe_arena_release_path(); + std::string* unsafe_arena_release_tip_description(); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") - void unsafe_arena_set_allocated_path( - std::string* path); + void unsafe_arena_set_allocated_tip_description( + std::string* tip_description); private: - const std::string& _internal_path() const; - void _internal_set_path(const std::string& value); - std::string* _internal_mutable_path(); + const std::string& _internal_tip_description() const; + void _internal_set_tip_description(const std::string& value); + std::string* _internal_mutable_tip_description(); public: - // .google.protobuf.Any original_token = 2; - bool has_original_token() const; + // string tip_name = 25; + void clear_tip_name(); + const std::string& tip_name() const; + void set_tip_name(const std::string& value); + void set_tip_name(std::string&& value); + void set_tip_name(const char* value); + void set_tip_name(const char* value, size_t size); + std::string* mutable_tip_name(); + std::string* release_tip_name(); + void set_allocated_tip_name(std::string* tip_name); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_tip_name(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_tip_name( + std::string* tip_name); private: - bool _internal_has_original_token() const; + const std::string& _internal_tip_name() const; + void _internal_set_tip_name(const std::string& value); + std::string* _internal_mutable_tip_name(); public: - void clear_original_token(); - const PROTOBUF_NAMESPACE_ID::Any& original_token() const; - PROTOBUF_NAMESPACE_ID::Any* release_original_token(); - PROTOBUF_NAMESPACE_ID::Any* mutable_original_token(); - void set_allocated_original_token(PROTOBUF_NAMESPACE_ID::Any* original_token); + + // string bhdraft__schedule = 2052; + void clear_bhdraft__schedule(); + const std::string& bhdraft__schedule() const; + void set_bhdraft__schedule(const std::string& value); + void set_bhdraft__schedule(std::string&& value); + void set_bhdraft__schedule(const char* value); + void set_bhdraft__schedule(const char* value, size_t size); + std::string* mutable_bhdraft__schedule(); + std::string* release_bhdraft__schedule(); + void set_allocated_bhdraft__schedule(std::string* bhdraft__schedule); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_bhdraft__schedule(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_bhdraft__schedule( + std::string* bhdraft__schedule); private: - const PROTOBUF_NAMESPACE_ID::Any& _internal_original_token() const; - PROTOBUF_NAMESPACE_ID::Any* _internal_mutable_original_token(); + const std::string& _internal_bhdraft__schedule() const; + void _internal_set_bhdraft__schedule(const std::string& value); + std::string* _internal_mutable_bhdraft__schedule(); public: - void unsafe_arena_set_allocated_original_token( - PROTOBUF_NAMESPACE_ID::Any* original_token); - PROTOBUF_NAMESPACE_ID::Any* unsafe_arena_release_original_token(); - - // @@protoc_insertion_point(class_scope:Proto_Node.Icon.texture) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr path_; - PROTOBUF_NAMESPACE_ID::Any* original_token_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_node_2eproto; -}; -// ------------------------------------------------------------------- - -class Icon_position PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Proto_Node.Icon.position) */ { - public: - inline Icon_position() : Icon_position(nullptr) {}; - virtual ~Icon_position(); - - Icon_position(const Icon_position& from); - Icon_position(Icon_position&& from) noexcept - : Icon_position() { - *this = ::std::move(from); - } - - inline Icon_position& operator=(const Icon_position& from) { - CopyFrom(from); - return *this; - } - inline Icon_position& operator=(Icon_position&& from) noexcept { - if (GetArena() == from.GetArena()) { - if (this != &from) InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return GetMetadataStatic().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return GetMetadataStatic().reflection; - } - static const Icon_position& default_instance(); - - static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const Icon_position* internal_default_instance() { - return reinterpret_cast( - &_Icon_position_default_instance_); - } - static constexpr int kIndexInFileMessages = - 3; - - friend void swap(Icon_position& a, Icon_position& b) { - a.Swap(&b); - } - inline void Swap(Icon_position* other) { - if (other == this) return; - if (GetArena() == other->GetArena()) { - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(Icon_position* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - inline Icon_position* New() const final { - return CreateMaybeMessage(nullptr); - } - - Icon_position* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const Icon_position& from); - void MergeFrom(const Icon_position& from); - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; + // .Category category = 1; + bool has_category() const; + private: + bool _internal_has_category() const; + public: + void clear_category(); + const ::Category& category() const; + ::Category* release_category(); + ::Category* mutable_category(); + void set_allocated_category(::Category* category); + private: + const ::Category& _internal_category() const; + ::Category* _internal_mutable_category(); + public: + void unsafe_arena_set_allocated_category( + ::Category* category); + ::Category* unsafe_arena_release_category(); - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } + // .Texture texture = 2; + bool has_texture() const; + private: + bool _internal_has_texture() const; + public: + void clear_texture(); + const ::Texture& texture() const; + ::Texture* release_texture(); + ::Texture* mutable_texture(); + void set_allocated_texture(::Texture* texture); + private: + const ::Texture& _internal_texture() const; + ::Texture* _internal_mutable_texture(); + public: + void unsafe_arena_set_allocated_texture( + ::Texture* texture); + ::Texture* unsafe_arena_release_texture(); + // .GUID guid = 3; + bool has_guid() const; private: - inline void SharedCtor(); - inline void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(Icon_position* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Proto_Node.Icon.position"; - } - protected: - explicit Icon_position(::PROTOBUF_NAMESPACE_ID::Arena* arena); + bool _internal_has_guid() const; + public: + void clear_guid(); + const ::GUID& guid() const; + ::GUID* release_guid(); + ::GUID* mutable_guid(); + void set_allocated_guid(::GUID* guid); private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + const ::GUID& _internal_guid() const; + ::GUID* _internal_mutable_guid(); public: + void unsafe_arena_set_allocated_guid( + ::GUID* guid); + ::GUID* unsafe_arena_release_guid(); - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + // .Position position = 8; + bool has_position() const; private: - static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); - return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; - } + bool _internal_has_position() const; + public: + void clear_position(); + const ::Position& position() const; + ::Position* release_position(); + ::Position* mutable_position(); + void set_allocated_position(::Position* position); + private: + const ::Position& _internal_position() const; + ::Position* _internal_mutable_position(); + public: + void unsafe_arena_set_allocated_position( + ::Position* position); + ::Position* unsafe_arena_release_position(); + // .Trigger trigger = 10; + bool has_trigger() const; + private: + bool _internal_has_trigger() const; + public: + void clear_trigger(); + const ::Trigger& trigger() const; + ::Trigger* release_trigger(); + ::Trigger* mutable_trigger(); + void set_allocated_trigger(::Trigger* trigger); + private: + const ::Trigger& _internal_trigger() const; + ::Trigger* _internal_mutable_trigger(); public: + void unsafe_arena_set_allocated_trigger( + ::Trigger* trigger); + ::Trigger* unsafe_arena_release_trigger(); - // nested types ---------------------------------------------------- + // int32 map_id = 4; + void clear_map_id(); + ::PROTOBUF_NAMESPACE_ID::int32 map_id() const; + void set_map_id(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_map_id() const; + void _internal_set_map_id(::PROTOBUF_NAMESPACE_ID::int32 value); + public: - // accessors ------------------------------------------------------- + // float distance_fade_end = 5; + void clear_distance_fade_end(); + float distance_fade_end() const; + void set_distance_fade_end(float value); + private: + float _internal_distance_fade_end() const; + void _internal_set_distance_fade_end(float value); + public: - enum : int { - kXFieldNumber = 1, - kYFieldNumber = 2, - kZFieldNumber = 3, - }; - // float x = 1; - void clear_x(); - float x() const; - void set_x(float value); + // float distance_fade_start = 6; + void clear_distance_fade_start(); + float distance_fade_start() const; + void set_distance_fade_start(float value); private: - float _internal_x() const; - void _internal_set_x(float value); + float _internal_distance_fade_start() const; + void _internal_set_distance_fade_start(float value); public: - // float y = 2; - void clear_y(); - float y() const; - void set_y(float value); + // float height_offset = 7; + void clear_height_offset(); + float height_offset() const; + void set_height_offset(float value); private: - float _internal_y() const; - void _internal_set_y(float value); + float _internal_height_offset() const; + void _internal_set_height_offset(float value); public: - // float z = 3; - void clear_z(); - float z() const; - void set_z(float value); + // .ResetBehavior reset_behavior = 9; + void clear_reset_behavior(); + ::ResetBehavior reset_behavior() const; + void set_reset_behavior(::ResetBehavior value); private: - float _internal_z() const; - void _internal_set_z(float value); + ::ResetBehavior _internal_reset_behavior() const; + void _internal_set_reset_behavior(::ResetBehavior value); public: - // @@protoc_insertion_point(class_scope:Proto_Node.Icon.position) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - float x_; - float y_; - float z_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_node_2eproto; -}; -// ------------------------------------------------------------------- - -class Icon_euler_rotation PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Proto_Node.Icon.euler_rotation) */ { - public: - inline Icon_euler_rotation() : Icon_euler_rotation(nullptr) {}; - virtual ~Icon_euler_rotation(); - - Icon_euler_rotation(const Icon_euler_rotation& from); - Icon_euler_rotation(Icon_euler_rotation&& from) noexcept - : Icon_euler_rotation() { - *this = ::std::move(from); - } - - inline Icon_euler_rotation& operator=(const Icon_euler_rotation& from) { - CopyFrom(from); - return *this; - } - inline Icon_euler_rotation& operator=(Icon_euler_rotation&& from) noexcept { - if (GetArena() == from.GetArena()) { - if (this != &from) InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return GetMetadataStatic().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return GetMetadataStatic().reflection; - } - static const Icon_euler_rotation& default_instance(); - - static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const Icon_euler_rotation* internal_default_instance() { - return reinterpret_cast( - &_Icon_euler_rotation_default_instance_); - } - static constexpr int kIndexInFileMessages = - 4; - - friend void swap(Icon_euler_rotation& a, Icon_euler_rotation& b) { - a.Swap(&b); - } - inline void Swap(Icon_euler_rotation* other) { - if (other == this) return; - if (GetArena() == other->GetArena()) { - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(Icon_euler_rotation* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- + // fixed32 achievement_bit = 16; + void clear_achievement_bit(); + ::PROTOBUF_NAMESPACE_ID::uint32 achievement_bit() const; + void set_achievement_bit(::PROTOBUF_NAMESPACE_ID::uint32 value); + private: + ::PROTOBUF_NAMESPACE_ID::uint32 _internal_achievement_bit() const; + void _internal_set_achievement_bit(::PROTOBUF_NAMESPACE_ID::uint32 value); + public: - inline Icon_euler_rotation* New() const final { - return CreateMaybeMessage(nullptr); - } + // int32 achievement_id = 17; + void clear_achievement_id(); + ::PROTOBUF_NAMESPACE_ID::int32 achievement_id() const; + void set_achievement_id(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_achievement_id() const; + void _internal_set_achievement_id(::PROTOBUF_NAMESPACE_ID::int32 value); + public: - Icon_euler_rotation* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const Icon_euler_rotation& from); - void MergeFrom(const Icon_euler_rotation& from); - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; + // float alpha = 18; + void clear_alpha(); + float alpha() const; + void set_alpha(float value); + private: + float _internal_alpha() const; + void _internal_set_alpha(float value); + public: - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } + // int32 minimum_size_on_screen = 20; + void clear_minimum_size_on_screen(); + ::PROTOBUF_NAMESPACE_ID::int32 minimum_size_on_screen() const; + void set_minimum_size_on_screen(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_minimum_size_on_screen() const; + void _internal_set_minimum_size_on_screen(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + // int32 map_display_size = 21; + void clear_map_display_size(); + ::PROTOBUF_NAMESPACE_ID::int32 map_display_size() const; + void set_map_display_size(::PROTOBUF_NAMESPACE_ID::int32 value); private: - inline void SharedCtor(); - inline void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(Icon_euler_rotation* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Proto_Node.Icon.euler_rotation"; - } - protected: - explicit Icon_euler_rotation(::PROTOBUF_NAMESPACE_ID::Arena* arena); + ::PROTOBUF_NAMESPACE_ID::int32 _internal_map_display_size() const; + void _internal_set_map_display_size(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // float bhdraft__schedule_duration = 2053; + void clear_bhdraft__schedule_duration(); + float bhdraft__schedule_duration() const; + void set_bhdraft__schedule_duration(float value); private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + float _internal_bhdraft__schedule_duration() const; + void _internal_set_bhdraft__schedule_duration(float value); public: - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + // int32 maximum_size_on_screen = 22; + void clear_maximum_size_on_screen(); + ::PROTOBUF_NAMESPACE_ID::int32 maximum_size_on_screen() const; + void set_maximum_size_on_screen(::PROTOBUF_NAMESPACE_ID::int32 value); private: - static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); - return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; - } + ::PROTOBUF_NAMESPACE_ID::int32 _internal_maximum_size_on_screen() const; + void _internal_set_maximum_size_on_screen(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + // bool can_fade = 19; + void clear_can_fade(); + bool can_fade() const; + void set_can_fade(bool value); + private: + bool _internal_can_fade() const; + void _internal_set_can_fade(bool value); public: - // nested types ---------------------------------------------------- + // bool scale_on_map_with_zoom = 23; + void clear_scale_on_map_with_zoom(); + bool scale_on_map_with_zoom() const; + void set_scale_on_map_with_zoom(bool value); + private: + bool _internal_scale_on_map_with_zoom() const; + void _internal_set_scale_on_map_with_zoom(bool value); + public: - // accessors ------------------------------------------------------- + // bool __tentative__render_ingame = 2049; + void clear___tentative__render_ingame(); + bool __tentative__render_ingame() const; + void set___tentative__render_ingame(bool value); + private: + bool _internal___tentative__render_ingame() const; + void _internal_set___tentative__render_ingame(bool value); + public: - enum : int { - kXFieldNumber = 1, - kYFieldNumber = 2, - kZFieldNumber = 3, - }; - // float x = 1; - void clear_x(); - float x() const; - void set_x(float value); + // bool __tentative__render_on_map = 2050; + void clear___tentative__render_on_map(); + bool __tentative__render_on_map() const; + void set___tentative__render_on_map(bool value); private: - float _internal_x() const; - void _internal_set_x(float value); + bool _internal___tentative__render_on_map() const; + void _internal_set___tentative__render_on_map(bool value); public: - // float y = 2; - void clear_y(); - float y() const; - void set_y(float value); + // float __tentative__scale = 2048; + void clear___tentative__scale(); + float __tentative__scale() const; + void set___tentative__scale(float value); private: - float _internal_y() const; - void _internal_set_y(float value); + float _internal___tentative__scale() const; + void _internal_set___tentative__scale(float value); public: - // float z = 3; - void clear_z(); - float z() const; - void set_z(float value); + // bool __tentative__render_on_minimap = 2051; + void clear___tentative__render_on_minimap(); + bool __tentative__render_on_minimap() const; + void set___tentative__render_on_minimap(bool value); private: - float _internal_z() const; - void _internal_set_z(float value); + bool _internal___tentative__render_on_minimap() const; + void _internal_set___tentative__render_on_minimap(bool value); public: - // @@protoc_insertion_point(class_scope:Proto_Node.Icon.euler_rotation) + // @@protoc_insertion_point(class_scope:Icon) private: class _Internal; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - float x_; - float y_; - float z_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr tip_description_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr tip_name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr bhdraft__schedule_; + ::Category* category_; + ::Texture* texture_; + ::GUID* guid_; + ::Position* position_; + ::Trigger* trigger_; + ::PROTOBUF_NAMESPACE_ID::int32 map_id_; + float distance_fade_end_; + float distance_fade_start_; + float height_offset_; + int reset_behavior_; + ::PROTOBUF_NAMESPACE_ID::uint32 achievement_bit_; + ::PROTOBUF_NAMESPACE_ID::int32 achievement_id_; + float alpha_; + ::PROTOBUF_NAMESPACE_ID::int32 minimum_size_on_screen_; + ::PROTOBUF_NAMESPACE_ID::int32 map_display_size_; + float bhdraft__schedule_duration_; + ::PROTOBUF_NAMESPACE_ID::int32 maximum_size_on_screen_; + bool can_fade_; + bool scale_on_map_with_zoom_; + bool __tentative__render_ingame_; + bool __tentative__render_on_map_; + float __tentative__scale_; + bool __tentative__render_on_minimap_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_node_2eproto; + friend struct ::TableStruct_generators_2fproto_5ftemplates_2fnode_2eproto; }; // ------------------------------------------------------------------- -class Icon_trigger_guid PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Proto_Node.Icon.trigger.guid) */ { +class RICHARDS PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:RICHARDS) */ { public: - inline Icon_trigger_guid() : Icon_trigger_guid(nullptr) {}; - virtual ~Icon_trigger_guid(); + inline RICHARDS() : RICHARDS(nullptr) {}; + virtual ~RICHARDS(); - Icon_trigger_guid(const Icon_trigger_guid& from); - Icon_trigger_guid(Icon_trigger_guid&& from) noexcept - : Icon_trigger_guid() { + RICHARDS(const RICHARDS& from); + RICHARDS(RICHARDS&& from) noexcept + : RICHARDS() { *this = ::std::move(from); } - inline Icon_trigger_guid& operator=(const Icon_trigger_guid& from) { + inline RICHARDS& operator=(const RICHARDS& from) { CopyFrom(from); return *this; } - inline Icon_trigger_guid& operator=(Icon_trigger_guid&& from) noexcept { + inline RICHARDS& operator=(RICHARDS&& from) noexcept { if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { @@ -1012,20 +1014,20 @@ class Icon_trigger_guid PROTOBUF_FINAL : static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { return GetMetadataStatic().reflection; } - static const Icon_trigger_guid& default_instance(); + static const RICHARDS& default_instance(); static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const Icon_trigger_guid* internal_default_instance() { - return reinterpret_cast( - &_Icon_trigger_guid_default_instance_); + static inline const RICHARDS* internal_default_instance() { + return reinterpret_cast( + &_RICHARDS_default_instance_); } static constexpr int kIndexInFileMessages = - 5; + 3; - friend void swap(Icon_trigger_guid& a, Icon_trigger_guid& b) { + friend void swap(RICHARDS& a, RICHARDS& b) { a.Swap(&b); } - inline void Swap(Icon_trigger_guid* other) { + inline void Swap(RICHARDS* other) { if (other == this) return; if (GetArena() == other->GetArena()) { InternalSwap(other); @@ -1033,7 +1035,7 @@ class Icon_trigger_guid PROTOBUF_FINAL : ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(Icon_trigger_guid* other) { + void UnsafeArenaSwap(RICHARDS* other) { if (other == this) return; GOOGLE_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); @@ -1041,17 +1043,17 @@ class Icon_trigger_guid PROTOBUF_FINAL : // implements Message ---------------------------------------------- - inline Icon_trigger_guid* New() const final { - return CreateMaybeMessage(nullptr); + inline RICHARDS* New() const final { + return CreateMaybeMessage(nullptr); } - Icon_trigger_guid* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); + RICHARDS* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); } void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const Icon_trigger_guid& from); - void MergeFrom(const Icon_trigger_guid& from); + void CopyFrom(const RICHARDS& from); + void MergeFrom(const RICHARDS& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; @@ -1065,13 +1067,13 @@ class Icon_trigger_guid PROTOBUF_FINAL : inline void SharedCtor(); inline void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(Icon_trigger_guid* other); + void InternalSwap(RICHARDS* other); friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Proto_Node.Icon.trigger.guid"; + return "RICHARDS"; } protected: - explicit Icon_trigger_guid(::PROTOBUF_NAMESPACE_ID::Arena* arena); + explicit RICHARDS(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); @@ -1080,8 +1082,8 @@ class Icon_trigger_guid PROTOBUF_FINAL : ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; private: static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); - return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto); + return ::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto.file_level_metadata[kIndexInFileMessages]; } public: @@ -1091,47 +1093,415 @@ class Icon_trigger_guid PROTOBUF_FINAL : // accessors ------------------------------------------------------- enum : int { - kGuidFieldNumber = 1, + kBhdraftScheduleFieldNumber = 23, + kCategoryFieldNumber = 1, + kTextureFieldNumber = 2, + kGuidFieldNumber = 3, + kTrailDataFieldNumber = 7, + kColorFieldNumber = 26, + kFestivalFilterFieldNumber = 27, + kMapTypeFilterFieldNumber = 28, + kMountFilterFieldNumber = 29, + kProfessionFilterFieldNumber = 30, + kSpecializationFilterFieldNumber = 31, + kSpeciesFilterFieldNumber = 32, + kMapIdFieldNumber = 4, + kDistanceFadeEndFieldNumber = 5, + kDistanceFadeStartFieldNumber = 6, + kAnimationSpeedFieldNumber = 8, + kCullChiralityFieldNumber = 9, + kAchievementBitFieldNumber = 16, + kAchievementIdFieldNumber = 17, + kAlphaFieldNumber = 18, + kCanFadeFieldNumber = 19, + kIsWallFieldNumber = 22, + kBhdraftScheduleDurationFieldNumber = 24, + kScaleFieldNumber = 25, }; - // int32 guid = 1; - void clear_guid(); - ::PROTOBUF_NAMESPACE_ID::int32 guid() const; - void set_guid(::PROTOBUF_NAMESPACE_ID::int32 value); + // string bhdraft__schedule = 23; + void clear_bhdraft__schedule(); + const std::string& bhdraft__schedule() const; + void set_bhdraft__schedule(const std::string& value); + void set_bhdraft__schedule(std::string&& value); + void set_bhdraft__schedule(const char* value); + void set_bhdraft__schedule(const char* value, size_t size); + std::string* mutable_bhdraft__schedule(); + std::string* release_bhdraft__schedule(); + void set_allocated_bhdraft__schedule(std::string* bhdraft__schedule); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_bhdraft__schedule(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_bhdraft__schedule( + std::string* bhdraft__schedule); private: - ::PROTOBUF_NAMESPACE_ID::int32 _internal_guid() const; - void _internal_set_guid(::PROTOBUF_NAMESPACE_ID::int32 value); + const std::string& _internal_bhdraft__schedule() const; + void _internal_set_bhdraft__schedule(const std::string& value); + std::string* _internal_mutable_bhdraft__schedule(); public: - // @@protoc_insertion_point(class_scope:Proto_Node.Icon.trigger.guid) - private: - class _Internal; + // .Category category = 1; + bool has_category() const; + private: + bool _internal_has_category() const; + public: + void clear_category(); + const ::Category& category() const; + ::Category* release_category(); + ::Category* mutable_category(); + void set_allocated_category(::Category* category); + private: + const ::Category& _internal_category() const; + ::Category* _internal_mutable_category(); + public: + void unsafe_arena_set_allocated_category( + ::Category* category); + ::Category* unsafe_arena_release_category(); - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::int32 guid_; + // .Texture texture = 2; + bool has_texture() const; + private: + bool _internal_has_texture() const; + public: + void clear_texture(); + const ::Texture& texture() const; + ::Texture* release_texture(); + ::Texture* mutable_texture(); + void set_allocated_texture(::Texture* texture); + private: + const ::Texture& _internal_texture() const; + ::Texture* _internal_mutable_texture(); + public: + void unsafe_arena_set_allocated_texture( + ::Texture* texture); + ::Texture* unsafe_arena_release_texture(); + + // .GUID guid = 3; + bool has_guid() const; + private: + bool _internal_has_guid() const; + public: + void clear_guid(); + const ::GUID& guid() const; + ::GUID* release_guid(); + ::GUID* mutable_guid(); + void set_allocated_guid(::GUID* guid); + private: + const ::GUID& _internal_guid() const; + ::GUID* _internal_mutable_guid(); + public: + void unsafe_arena_set_allocated_guid( + ::GUID* guid); + ::GUID* unsafe_arena_release_guid(); + + // .TrailData trail_data = 7; + bool has_trail_data() const; + private: + bool _internal_has_trail_data() const; + public: + void clear_trail_data(); + const ::TrailData& trail_data() const; + ::TrailData* release_trail_data(); + ::TrailData* mutable_trail_data(); + void set_allocated_trail_data(::TrailData* trail_data); + private: + const ::TrailData& _internal_trail_data() const; + ::TrailData* _internal_mutable_trail_data(); + public: + void unsafe_arena_set_allocated_trail_data( + ::TrailData* trail_data); + ::TrailData* unsafe_arena_release_trail_data(); + + // .Color color = 26; + bool has_color() const; + private: + bool _internal_has_color() const; + public: + void clear_color(); + const ::Color& color() const; + ::Color* release_color(); + ::Color* mutable_color(); + void set_allocated_color(::Color* color); + private: + const ::Color& _internal_color() const; + ::Color* _internal_mutable_color(); + public: + void unsafe_arena_set_allocated_color( + ::Color* color); + ::Color* unsafe_arena_release_color(); + + // .FestivalFilter festival_filter = 27; + bool has_festival_filter() const; + private: + bool _internal_has_festival_filter() const; + public: + void clear_festival_filter(); + const ::FestivalFilter& festival_filter() const; + ::FestivalFilter* release_festival_filter(); + ::FestivalFilter* mutable_festival_filter(); + void set_allocated_festival_filter(::FestivalFilter* festival_filter); + private: + const ::FestivalFilter& _internal_festival_filter() const; + ::FestivalFilter* _internal_mutable_festival_filter(); + public: + void unsafe_arena_set_allocated_festival_filter( + ::FestivalFilter* festival_filter); + ::FestivalFilter* unsafe_arena_release_festival_filter(); + + // .MapTypeFilter map_type_filter = 28; + bool has_map_type_filter() const; + private: + bool _internal_has_map_type_filter() const; + public: + void clear_map_type_filter(); + const ::MapTypeFilter& map_type_filter() const; + ::MapTypeFilter* release_map_type_filter(); + ::MapTypeFilter* mutable_map_type_filter(); + void set_allocated_map_type_filter(::MapTypeFilter* map_type_filter); + private: + const ::MapTypeFilter& _internal_map_type_filter() const; + ::MapTypeFilter* _internal_mutable_map_type_filter(); + public: + void unsafe_arena_set_allocated_map_type_filter( + ::MapTypeFilter* map_type_filter); + ::MapTypeFilter* unsafe_arena_release_map_type_filter(); + + // .MountFilter mount_filter = 29; + bool has_mount_filter() const; + private: + bool _internal_has_mount_filter() const; + public: + void clear_mount_filter(); + const ::MountFilter& mount_filter() const; + ::MountFilter* release_mount_filter(); + ::MountFilter* mutable_mount_filter(); + void set_allocated_mount_filter(::MountFilter* mount_filter); + private: + const ::MountFilter& _internal_mount_filter() const; + ::MountFilter* _internal_mutable_mount_filter(); + public: + void unsafe_arena_set_allocated_mount_filter( + ::MountFilter* mount_filter); + ::MountFilter* unsafe_arena_release_mount_filter(); + + // .ProfessionFilter profession_filter = 30; + bool has_profession_filter() const; + private: + bool _internal_has_profession_filter() const; + public: + void clear_profession_filter(); + const ::ProfessionFilter& profession_filter() const; + ::ProfessionFilter* release_profession_filter(); + ::ProfessionFilter* mutable_profession_filter(); + void set_allocated_profession_filter(::ProfessionFilter* profession_filter); + private: + const ::ProfessionFilter& _internal_profession_filter() const; + ::ProfessionFilter* _internal_mutable_profession_filter(); + public: + void unsafe_arena_set_allocated_profession_filter( + ::ProfessionFilter* profession_filter); + ::ProfessionFilter* unsafe_arena_release_profession_filter(); + + // .SpecializationFilter specialization_filter = 31; + bool has_specialization_filter() const; + private: + bool _internal_has_specialization_filter() const; + public: + void clear_specialization_filter(); + const ::SpecializationFilter& specialization_filter() const; + ::SpecializationFilter* release_specialization_filter(); + ::SpecializationFilter* mutable_specialization_filter(); + void set_allocated_specialization_filter(::SpecializationFilter* specialization_filter); + private: + const ::SpecializationFilter& _internal_specialization_filter() const; + ::SpecializationFilter* _internal_mutable_specialization_filter(); + public: + void unsafe_arena_set_allocated_specialization_filter( + ::SpecializationFilter* specialization_filter); + ::SpecializationFilter* unsafe_arena_release_specialization_filter(); + + // .SpeciesFilter species_filter = 32; + bool has_species_filter() const; + private: + bool _internal_has_species_filter() const; + public: + void clear_species_filter(); + const ::SpeciesFilter& species_filter() const; + ::SpeciesFilter* release_species_filter(); + ::SpeciesFilter* mutable_species_filter(); + void set_allocated_species_filter(::SpeciesFilter* species_filter); + private: + const ::SpeciesFilter& _internal_species_filter() const; + ::SpeciesFilter* _internal_mutable_species_filter(); + public: + void unsafe_arena_set_allocated_species_filter( + ::SpeciesFilter* species_filter); + ::SpeciesFilter* unsafe_arena_release_species_filter(); + + // int32 map_id = 4; + void clear_map_id(); + ::PROTOBUF_NAMESPACE_ID::int32 map_id() const; + void set_map_id(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_map_id() const; + void _internal_set_map_id(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // float distance_fade_end = 5; + void clear_distance_fade_end(); + float distance_fade_end() const; + void set_distance_fade_end(float value); + private: + float _internal_distance_fade_end() const; + void _internal_set_distance_fade_end(float value); + public: + + // float distance_fade_start = 6; + void clear_distance_fade_start(); + float distance_fade_start() const; + void set_distance_fade_start(float value); + private: + float _internal_distance_fade_start() const; + void _internal_set_distance_fade_start(float value); + public: + + // float animation_speed = 8; + void clear_animation_speed(); + float animation_speed() const; + void set_animation_speed(float value); + private: + float _internal_animation_speed() const; + void _internal_set_animation_speed(float value); + public: + + // .CullChirality cull_chirality = 9; + void clear_cull_chirality(); + ::CullChirality cull_chirality() const; + void set_cull_chirality(::CullChirality value); + private: + ::CullChirality _internal_cull_chirality() const; + void _internal_set_cull_chirality(::CullChirality value); + public: + + // fixed32 achievement_bit = 16; + void clear_achievement_bit(); + ::PROTOBUF_NAMESPACE_ID::uint32 achievement_bit() const; + void set_achievement_bit(::PROTOBUF_NAMESPACE_ID::uint32 value); + private: + ::PROTOBUF_NAMESPACE_ID::uint32 _internal_achievement_bit() const; + void _internal_set_achievement_bit(::PROTOBUF_NAMESPACE_ID::uint32 value); + public: + + // int32 achievement_id = 17; + void clear_achievement_id(); + ::PROTOBUF_NAMESPACE_ID::int32 achievement_id() const; + void set_achievement_id(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_achievement_id() const; + void _internal_set_achievement_id(::PROTOBUF_NAMESPACE_ID::int32 value); + public: + + // float alpha = 18; + void clear_alpha(); + float alpha() const; + void set_alpha(float value); + private: + float _internal_alpha() const; + void _internal_set_alpha(float value); + public: + + // bool can_fade = 19; + void clear_can_fade(); + bool can_fade() const; + void set_can_fade(bool value); + private: + bool _internal_can_fade() const; + void _internal_set_can_fade(bool value); + public: + + // bool is_wall = 22; + void clear_is_wall(); + bool is_wall() const; + void set_is_wall(bool value); + private: + bool _internal_is_wall() const; + void _internal_set_is_wall(bool value); + public: + + // float bhdraft__schedule_duration = 24; + void clear_bhdraft__schedule_duration(); + float bhdraft__schedule_duration() const; + void set_bhdraft__schedule_duration(float value); + private: + float _internal_bhdraft__schedule_duration() const; + void _internal_set_bhdraft__schedule_duration(float value); + public: + + // float scale = 25; + void clear_scale(); + float scale() const; + void set_scale(float value); + private: + float _internal_scale() const; + void _internal_set_scale(float value); + public: + + // @@protoc_insertion_point(class_scope:RICHARDS) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr bhdraft__schedule_; + ::Category* category_; + ::Texture* texture_; + ::GUID* guid_; + ::TrailData* trail_data_; + ::Color* color_; + ::FestivalFilter* festival_filter_; + ::MapTypeFilter* map_type_filter_; + ::MountFilter* mount_filter_; + ::ProfessionFilter* profession_filter_; + ::SpecializationFilter* specialization_filter_; + ::SpeciesFilter* species_filter_; + ::PROTOBUF_NAMESPACE_ID::int32 map_id_; + float distance_fade_end_; + float distance_fade_start_; + float animation_speed_; + int cull_chirality_; + ::PROTOBUF_NAMESPACE_ID::uint32 achievement_bit_; + ::PROTOBUF_NAMESPACE_ID::int32 achievement_id_; + float alpha_; + bool can_fade_; + bool is_wall_; + float bhdraft__schedule_duration_; + float scale_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_node_2eproto; + friend struct ::TableStruct_generators_2fproto_5ftemplates_2fnode_2eproto; }; // ------------------------------------------------------------------- -class Icon_trigger PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Proto_Node.Icon.trigger) */ { +class Texture PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Texture) */ { public: - inline Icon_trigger() : Icon_trigger(nullptr) {}; - virtual ~Icon_trigger(); + inline Texture() : Texture(nullptr) {}; + virtual ~Texture(); - Icon_trigger(const Icon_trigger& from); - Icon_trigger(Icon_trigger&& from) noexcept - : Icon_trigger() { + Texture(const Texture& from); + Texture(Texture&& from) noexcept + : Texture() { *this = ::std::move(from); } - inline Icon_trigger& operator=(const Icon_trigger& from) { + inline Texture& operator=(const Texture& from) { CopyFrom(from); return *this; } - inline Icon_trigger& operator=(Icon_trigger&& from) noexcept { + inline Texture& operator=(Texture&& from) noexcept { if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { @@ -1149,20 +1519,20 @@ class Icon_trigger PROTOBUF_FINAL : static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { return GetMetadataStatic().reflection; } - static const Icon_trigger& default_instance(); + static const Texture& default_instance(); static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const Icon_trigger* internal_default_instance() { - return reinterpret_cast( - &_Icon_trigger_default_instance_); + static inline const Texture* internal_default_instance() { + return reinterpret_cast( + &_Texture_default_instance_); } static constexpr int kIndexInFileMessages = - 6; + 4; - friend void swap(Icon_trigger& a, Icon_trigger& b) { + friend void swap(Texture& a, Texture& b) { a.Swap(&b); } - inline void Swap(Icon_trigger* other) { + inline void Swap(Texture* other) { if (other == this) return; if (GetArena() == other->GetArena()) { InternalSwap(other); @@ -1170,7 +1540,7 @@ class Icon_trigger PROTOBUF_FINAL : ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(Icon_trigger* other) { + void UnsafeArenaSwap(Texture* other) { if (other == this) return; GOOGLE_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); @@ -1178,17 +1548,17 @@ class Icon_trigger PROTOBUF_FINAL : // implements Message ---------------------------------------------- - inline Icon_trigger* New() const final { - return CreateMaybeMessage(nullptr); + inline Texture* New() const final { + return CreateMaybeMessage(nullptr); } - Icon_trigger* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); + Texture* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); } void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const Icon_trigger& from); - void MergeFrom(const Icon_trigger& from); + void CopyFrom(const Texture& from); + void MergeFrom(const Texture& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; @@ -1202,13 +1572,13 @@ class Icon_trigger PROTOBUF_FINAL : inline void SharedCtor(); inline void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(Icon_trigger* other); + void InternalSwap(Texture* other); friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Proto_Node.Icon.trigger"; + return "Texture"; } protected: - explicit Icon_trigger(::PROTOBUF_NAMESPACE_ID::Arena* arena); + explicit Texture(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); @@ -1217,322 +1587,233 @@ class Icon_trigger PROTOBUF_FINAL : ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; private: static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); - return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto); + return ::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto.file_level_metadata[kIndexInFileMessages]; } public: // nested types ---------------------------------------------------- - typedef Icon_trigger_guid guid; - - typedef Icon_trigger_reset_behavior reset_behavior; - static constexpr reset_behavior always_visible = - Icon_trigger_reset_behavior_always_visible; - static constexpr reset_behavior map_change = - Icon_trigger_reset_behavior_map_change; - static constexpr reset_behavior daily_reset = - Icon_trigger_reset_behavior_daily_reset; - static constexpr reset_behavior never = - Icon_trigger_reset_behavior_never; - static constexpr reset_behavior timer = - Icon_trigger_reset_behavior_timer; - static constexpr reset_behavior map_reset = - Icon_trigger_reset_behavior_map_reset; - static constexpr reset_behavior instance_change = - Icon_trigger_reset_behavior_instance_change; - static constexpr reset_behavior daily_reset_per_character = - Icon_trigger_reset_behavior_daily_reset_per_character; - static constexpr reset_behavior weekly_reset = - Icon_trigger_reset_behavior_weekly_reset; - static inline bool reset_behavior_IsValid(int value) { - return Icon_trigger_reset_behavior_IsValid(value); - } - static constexpr reset_behavior reset_behavior_MIN = - Icon_trigger_reset_behavior_reset_behavior_MIN; - static constexpr reset_behavior reset_behavior_MAX = - Icon_trigger_reset_behavior_reset_behavior_MAX; - static constexpr int reset_behavior_ARRAYSIZE = - Icon_trigger_reset_behavior_reset_behavior_ARRAYSIZE; - static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* - reset_behavior_descriptor() { - return Icon_trigger_reset_behavior_descriptor(); - } - template - static inline const std::string& reset_behavior_Name(T enum_t_value) { - static_assert(::std::is_same::value || - ::std::is_integral::value, - "Incorrect type passed to function reset_behavior_Name."); - return Icon_trigger_reset_behavior_Name(enum_t_value); - } - static inline bool reset_behavior_Parse(const std::string& name, - reset_behavior* value) { - return Icon_trigger_reset_behavior_Parse(name, value); - } - // accessors ------------------------------------------------------- enum : int { - kActionCopyClipboardFieldNumber = 5, - kActionCopyMessageFieldNumber = 6, - kActionInfoMessageFieldNumber = 8, - kActionHideCategoryFieldNumber = 12, - kActionShowCategoryFieldNumber = 13, - kActionToggleCategoryFieldNumber = 14, - kBounceDelayFieldNumber = 2, - kBounceDurationFieldNumber = 3, - kBounceHeightFieldNumber = 4, - kAutoTriggerFieldNumber = 1, - kHasCountdownFieldNumber = 7, - kInvertDisplayFieldNumber = 9, - kResetLengthFieldNumber = 10, - kRangeFieldNumber = 11, + kPathFieldNumber = 1, }; - // string action_copy_clipboard = 5; - void clear_action_copy_clipboard(); - const std::string& action_copy_clipboard() const; - void set_action_copy_clipboard(const std::string& value); - void set_action_copy_clipboard(std::string&& value); - void set_action_copy_clipboard(const char* value); - void set_action_copy_clipboard(const char* value, size_t size); - std::string* mutable_action_copy_clipboard(); - std::string* release_action_copy_clipboard(); - void set_allocated_action_copy_clipboard(std::string* action_copy_clipboard); + // string path = 1; + void clear_path(); + const std::string& path() const; + void set_path(const std::string& value); + void set_path(std::string&& value); + void set_path(const char* value); + void set_path(const char* value, size_t size); + std::string* mutable_path(); + std::string* release_path(); + void set_allocated_path(std::string* path); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") - std::string* unsafe_arena_release_action_copy_clipboard(); + std::string* unsafe_arena_release_path(); GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") - void unsafe_arena_set_allocated_action_copy_clipboard( - std::string* action_copy_clipboard); + void unsafe_arena_set_allocated_path( + std::string* path); private: - const std::string& _internal_action_copy_clipboard() const; - void _internal_set_action_copy_clipboard(const std::string& value); - std::string* _internal_mutable_action_copy_clipboard(); + const std::string& _internal_path() const; + void _internal_set_path(const std::string& value); + std::string* _internal_mutable_path(); public: - // string action_copy_message = 6; - void clear_action_copy_message(); - const std::string& action_copy_message() const; - void set_action_copy_message(const std::string& value); - void set_action_copy_message(std::string&& value); - void set_action_copy_message(const char* value); - void set_action_copy_message(const char* value, size_t size); - std::string* mutable_action_copy_message(); - std::string* release_action_copy_message(); - void set_allocated_action_copy_message(std::string* action_copy_message); - GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" - " string fields are deprecated and will be removed in a" - " future release.") - std::string* unsafe_arena_release_action_copy_message(); - GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" - " string fields are deprecated and will be removed in a" - " future release.") - void unsafe_arena_set_allocated_action_copy_message( - std::string* action_copy_message); - private: - const std::string& _internal_action_copy_message() const; - void _internal_set_action_copy_message(const std::string& value); - std::string* _internal_mutable_action_copy_message(); - public: + // @@protoc_insertion_point(class_scope:Texture) + private: + class _Internal; - // string action_info_message = 8; - void clear_action_info_message(); - const std::string& action_info_message() const; - void set_action_info_message(const std::string& value); - void set_action_info_message(std::string&& value); - void set_action_info_message(const char* value); - void set_action_info_message(const char* value, size_t size); - std::string* mutable_action_info_message(); - std::string* release_action_info_message(); - void set_allocated_action_info_message(std::string* action_info_message); - GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" - " string fields are deprecated and will be removed in a" - " future release.") - std::string* unsafe_arena_release_action_info_message(); - GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" - " string fields are deprecated and will be removed in a" - " future release.") - void unsafe_arena_set_allocated_action_info_message( - std::string* action_info_message); - private: - const std::string& _internal_action_info_message() const; - void _internal_set_action_info_message(const std::string& value); - std::string* _internal_mutable_action_info_message(); - public: + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr path_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_generators_2fproto_5ftemplates_2fnode_2eproto; +}; +// ------------------------------------------------------------------- - // .Proto_Node.Category action_hide_category = 12; - bool has_action_hide_category() const; - private: - bool _internal_has_action_hide_category() const; - public: - void clear_action_hide_category(); - const ::Proto_Node::Category& action_hide_category() const; - ::Proto_Node::Category* release_action_hide_category(); - ::Proto_Node::Category* mutable_action_hide_category(); - void set_allocated_action_hide_category(::Proto_Node::Category* action_hide_category); - private: - const ::Proto_Node::Category& _internal_action_hide_category() const; - ::Proto_Node::Category* _internal_mutable_action_hide_category(); - public: - void unsafe_arena_set_allocated_action_hide_category( - ::Proto_Node::Category* action_hide_category); - ::Proto_Node::Category* unsafe_arena_release_action_hide_category(); +class Position PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Position) */ { + public: + inline Position() : Position(nullptr) {}; + virtual ~Position(); - // .Proto_Node.Category action_show_category = 13; - bool has_action_show_category() const; - private: - bool _internal_has_action_show_category() const; - public: - void clear_action_show_category(); - const ::Proto_Node::Category& action_show_category() const; - ::Proto_Node::Category* release_action_show_category(); - ::Proto_Node::Category* mutable_action_show_category(); - void set_allocated_action_show_category(::Proto_Node::Category* action_show_category); - private: - const ::Proto_Node::Category& _internal_action_show_category() const; - ::Proto_Node::Category* _internal_mutable_action_show_category(); - public: - void unsafe_arena_set_allocated_action_show_category( - ::Proto_Node::Category* action_show_category); - ::Proto_Node::Category* unsafe_arena_release_action_show_category(); + Position(const Position& from); + Position(Position&& from) noexcept + : Position() { + *this = ::std::move(from); + } - // .Proto_Node.Category action_toggle_category = 14; - bool has_action_toggle_category() const; - private: - bool _internal_has_action_toggle_category() const; - public: - void clear_action_toggle_category(); - const ::Proto_Node::Category& action_toggle_category() const; - ::Proto_Node::Category* release_action_toggle_category(); - ::Proto_Node::Category* mutable_action_toggle_category(); - void set_allocated_action_toggle_category(::Proto_Node::Category* action_toggle_category); - private: - const ::Proto_Node::Category& _internal_action_toggle_category() const; - ::Proto_Node::Category* _internal_mutable_action_toggle_category(); - public: - void unsafe_arena_set_allocated_action_toggle_category( - ::Proto_Node::Category* action_toggle_category); - ::Proto_Node::Category* unsafe_arena_release_action_toggle_category(); + inline Position& operator=(const Position& from) { + CopyFrom(from); + return *this; + } + inline Position& operator=(Position&& from) noexcept { + if (GetArena() == from.GetArena()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } - // float bounce_delay = 2; - void clear_bounce_delay(); - float bounce_delay() const; - void set_bounce_delay(float value); - private: - float _internal_bounce_delay() const; - void _internal_set_bounce_delay(float value); - public: + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const Position& default_instance(); - // float bounce_duration = 3; - void clear_bounce_duration(); - float bounce_duration() const; - void set_bounce_duration(float value); - private: - float _internal_bounce_duration() const; - void _internal_set_bounce_duration(float value); - public: + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const Position* internal_default_instance() { + return reinterpret_cast( + &_Position_default_instance_); + } + static constexpr int kIndexInFileMessages = + 5; - // float bounce_height = 4; - void clear_bounce_height(); - float bounce_height() const; - void set_bounce_height(float value); - private: - float _internal_bounce_height() const; - void _internal_set_bounce_height(float value); - public: + friend void swap(Position& a, Position& b) { + a.Swap(&b); + } + inline void Swap(Position* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Position* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline Position* New() const final { + return CreateMaybeMessage(nullptr); + } + + Position* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const Position& from); + void MergeFrom(const Position& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } - // bool auto_trigger = 1; - void clear_auto_trigger(); - bool auto_trigger() const; - void set_auto_trigger(bool value); private: - bool _internal_auto_trigger() const; - void _internal_set_auto_trigger(bool value); + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Position* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "Position"; + } + protected: + explicit Position(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: - // bool has_countdown = 7; - void clear_has_countdown(); - bool has_countdown() const; - void set_has_countdown(bool value); + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; private: - bool _internal_has_countdown() const; - void _internal_set_has_countdown(bool value); + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto); + return ::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto.file_level_metadata[kIndexInFileMessages]; + } + public: - // bool invert_display = 9; - void clear_invert_display(); - bool invert_display() const; - void set_invert_display(bool value); + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kXFieldNumber = 1, + kYFieldNumber = 2, + kZFieldNumber = 3, + }; + // float x = 1; + void clear_x(); + float x() const; + void set_x(float value); private: - bool _internal_invert_display() const; - void _internal_set_invert_display(bool value); + float _internal_x() const; + void _internal_set_x(float value); public: - // float reset_length = 10; - void clear_reset_length(); - float reset_length() const; - void set_reset_length(float value); + // float y = 2; + void clear_y(); + float y() const; + void set_y(float value); private: - float _internal_reset_length() const; - void _internal_set_reset_length(float value); + float _internal_y() const; + void _internal_set_y(float value); public: - // float range = 11; - void clear_range(); - float range() const; - void set_range(float value); + // float z = 3; + void clear_z(); + float z() const; + void set_z(float value); private: - float _internal_range() const; - void _internal_set_range(float value); + float _internal_z() const; + void _internal_set_z(float value); public: - // @@protoc_insertion_point(class_scope:Proto_Node.Icon.trigger) + // @@protoc_insertion_point(class_scope:Position) private: class _Internal; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr action_copy_clipboard_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr action_copy_message_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr action_info_message_; - ::Proto_Node::Category* action_hide_category_; - ::Proto_Node::Category* action_show_category_; - ::Proto_Node::Category* action_toggle_category_; - float bounce_delay_; - float bounce_duration_; - float bounce_height_; - bool auto_trigger_; - bool has_countdown_; - bool invert_display_; - float reset_length_; - float range_; + float x_; + float y_; + float z_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_node_2eproto; + friend struct ::TableStruct_generators_2fproto_5ftemplates_2fnode_2eproto; }; // ------------------------------------------------------------------- -class Icon PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Proto_Node.Icon) */ { +class EulerRotation PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:EulerRotation) */ { public: - inline Icon() : Icon(nullptr) {}; - virtual ~Icon(); + inline EulerRotation() : EulerRotation(nullptr) {}; + virtual ~EulerRotation(); - Icon(const Icon& from); - Icon(Icon&& from) noexcept - : Icon() { + EulerRotation(const EulerRotation& from); + EulerRotation(EulerRotation&& from) noexcept + : EulerRotation() { *this = ::std::move(from); } - inline Icon& operator=(const Icon& from) { + inline EulerRotation& operator=(const EulerRotation& from) { CopyFrom(from); return *this; } - inline Icon& operator=(Icon&& from) noexcept { + inline EulerRotation& operator=(EulerRotation&& from) noexcept { if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { @@ -1550,20 +1831,20 @@ class Icon PROTOBUF_FINAL : static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { return GetMetadataStatic().reflection; } - static const Icon& default_instance(); + static const EulerRotation& default_instance(); static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const Icon* internal_default_instance() { - return reinterpret_cast( - &_Icon_default_instance_); + static inline const EulerRotation* internal_default_instance() { + return reinterpret_cast( + &_EulerRotation_default_instance_); } static constexpr int kIndexInFileMessages = - 7; + 6; - friend void swap(Icon& a, Icon& b) { + friend void swap(EulerRotation& a, EulerRotation& b) { a.Swap(&b); } - inline void Swap(Icon* other) { + inline void Swap(EulerRotation* other) { if (other == this) return; if (GetArena() == other->GetArena()) { InternalSwap(other); @@ -1571,7 +1852,7 @@ class Icon PROTOBUF_FINAL : ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(Icon* other) { + void UnsafeArenaSwap(EulerRotation* other) { if (other == this) return; GOOGLE_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); @@ -1579,17 +1860,17 @@ class Icon PROTOBUF_FINAL : // implements Message ---------------------------------------------- - inline Icon* New() const final { - return CreateMaybeMessage(nullptr); + inline EulerRotation* New() const final { + return CreateMaybeMessage(nullptr); } - Icon* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); + EulerRotation* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); } void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const Icon& from); - void MergeFrom(const Icon& from); + void CopyFrom(const EulerRotation& from); + void MergeFrom(const EulerRotation& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; @@ -1603,13 +1884,13 @@ class Icon PROTOBUF_FINAL : inline void SharedCtor(); inline void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(Icon* other); + void InternalSwap(EulerRotation* other); friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Proto_Node.Icon"; + return "EulerRotation"; } protected: - explicit Icon(::PROTOBUF_NAMESPACE_ID::Arena* arena); + explicit EulerRotation(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); @@ -1618,320 +1899,80 @@ class Icon PROTOBUF_FINAL : ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; private: static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); - return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto); + return ::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto.file_level_metadata[kIndexInFileMessages]; } public: // nested types ---------------------------------------------------- - typedef Icon_texture texture; - typedef Icon_position position; - typedef Icon_euler_rotation euler_rotation; - typedef Icon_trigger trigger; - // accessors ------------------------------------------------------- enum : int { - kBhdraftScheduleFieldNumber = 17, - kTipDescriptionFieldNumber = 19, - kTipNameFieldNumber = 20, - kAchievementBitFieldNumber = 1, - kAchievementIdFieldNumber = 2, - kAlphaFieldNumber = 3, - kDistanceFadeEndFieldNumber = 5, - kDistanceFadeStartFieldNumber = 6, - kHeightOffsetFieldNumber = 7, - kTentativeScaleFieldNumber = 8, - kMapDisplaySizeFieldNumber = 9, - kMapIdFieldNumber = 10, - kMaximumSizeOnScreenFieldNumber = 11, - kCanFadeFieldNumber = 4, - kTentativeRenderIngameFieldNumber = 13, - kTentativeRenderOnMapFieldNumber = 14, - kTentativeRenderOnMinimapFieldNumber = 15, - kMinimumSizeOnScreenFieldNumber = 12, - kScaleOnMapWithZoomFieldNumber = 16, - kBhdraftScheduleDurationFieldNumber = 18, + kXFieldNumber = 1, + kYFieldNumber = 2, + kZFieldNumber = 3, }; - // string bhdraft__schedule = 17; - void clear_bhdraft__schedule(); - const std::string& bhdraft__schedule() const; - void set_bhdraft__schedule(const std::string& value); - void set_bhdraft__schedule(std::string&& value); - void set_bhdraft__schedule(const char* value); - void set_bhdraft__schedule(const char* value, size_t size); - std::string* mutable_bhdraft__schedule(); - std::string* release_bhdraft__schedule(); - void set_allocated_bhdraft__schedule(std::string* bhdraft__schedule); - GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" - " string fields are deprecated and will be removed in a" - " future release.") - std::string* unsafe_arena_release_bhdraft__schedule(); - GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" - " string fields are deprecated and will be removed in a" - " future release.") - void unsafe_arena_set_allocated_bhdraft__schedule( - std::string* bhdraft__schedule); - private: - const std::string& _internal_bhdraft__schedule() const; - void _internal_set_bhdraft__schedule(const std::string& value); - std::string* _internal_mutable_bhdraft__schedule(); - public: - - // string tip_description = 19; - void clear_tip_description(); - const std::string& tip_description() const; - void set_tip_description(const std::string& value); - void set_tip_description(std::string&& value); - void set_tip_description(const char* value); - void set_tip_description(const char* value, size_t size); - std::string* mutable_tip_description(); - std::string* release_tip_description(); - void set_allocated_tip_description(std::string* tip_description); - GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" - " string fields are deprecated and will be removed in a" - " future release.") - std::string* unsafe_arena_release_tip_description(); - GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" - " string fields are deprecated and will be removed in a" - " future release.") - void unsafe_arena_set_allocated_tip_description( - std::string* tip_description); - private: - const std::string& _internal_tip_description() const; - void _internal_set_tip_description(const std::string& value); - std::string* _internal_mutable_tip_description(); - public: - - // string tip_name = 20; - void clear_tip_name(); - const std::string& tip_name() const; - void set_tip_name(const std::string& value); - void set_tip_name(std::string&& value); - void set_tip_name(const char* value); - void set_tip_name(const char* value, size_t size); - std::string* mutable_tip_name(); - std::string* release_tip_name(); - void set_allocated_tip_name(std::string* tip_name); - GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" - " string fields are deprecated and will be removed in a" - " future release.") - std::string* unsafe_arena_release_tip_name(); - GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" - " string fields are deprecated and will be removed in a" - " future release.") - void unsafe_arena_set_allocated_tip_name( - std::string* tip_name); - private: - const std::string& _internal_tip_name() const; - void _internal_set_tip_name(const std::string& value); - std::string* _internal_mutable_tip_name(); - public: - - // fixed32 achievement_bit = 1; - void clear_achievement_bit(); - ::PROTOBUF_NAMESPACE_ID::uint32 achievement_bit() const; - void set_achievement_bit(::PROTOBUF_NAMESPACE_ID::uint32 value); - private: - ::PROTOBUF_NAMESPACE_ID::uint32 _internal_achievement_bit() const; - void _internal_set_achievement_bit(::PROTOBUF_NAMESPACE_ID::uint32 value); - public: - - // int32 achievement_id = 2; - void clear_achievement_id(); - ::PROTOBUF_NAMESPACE_ID::int32 achievement_id() const; - void set_achievement_id(::PROTOBUF_NAMESPACE_ID::int32 value); - private: - ::PROTOBUF_NAMESPACE_ID::int32 _internal_achievement_id() const; - void _internal_set_achievement_id(::PROTOBUF_NAMESPACE_ID::int32 value); - public: - - // float alpha = 3; - void clear_alpha(); - float alpha() const; - void set_alpha(float value); - private: - float _internal_alpha() const; - void _internal_set_alpha(float value); - public: - - // float distance_fade_end = 5; - void clear_distance_fade_end(); - float distance_fade_end() const; - void set_distance_fade_end(float value); - private: - float _internal_distance_fade_end() const; - void _internal_set_distance_fade_end(float value); - public: - - // float distance_fade_start = 6; - void clear_distance_fade_start(); - float distance_fade_start() const; - void set_distance_fade_start(float value); - private: - float _internal_distance_fade_start() const; - void _internal_set_distance_fade_start(float value); - public: - - // float height_offset = 7; - void clear_height_offset(); - float height_offset() const; - void set_height_offset(float value); - private: - float _internal_height_offset() const; - void _internal_set_height_offset(float value); - public: - - // float __tentative__scale = 8; - void clear___tentative__scale(); - float __tentative__scale() const; - void set___tentative__scale(float value); - private: - float _internal___tentative__scale() const; - void _internal_set___tentative__scale(float value); - public: - - // int32 map_display_size = 9; - void clear_map_display_size(); - ::PROTOBUF_NAMESPACE_ID::int32 map_display_size() const; - void set_map_display_size(::PROTOBUF_NAMESPACE_ID::int32 value); - private: - ::PROTOBUF_NAMESPACE_ID::int32 _internal_map_display_size() const; - void _internal_set_map_display_size(::PROTOBUF_NAMESPACE_ID::int32 value); - public: - - // int32 map_id = 10; - void clear_map_id(); - ::PROTOBUF_NAMESPACE_ID::int32 map_id() const; - void set_map_id(::PROTOBUF_NAMESPACE_ID::int32 value); - private: - ::PROTOBUF_NAMESPACE_ID::int32 _internal_map_id() const; - void _internal_set_map_id(::PROTOBUF_NAMESPACE_ID::int32 value); - public: - - // int32 maximum_size_on_screen = 11; - void clear_maximum_size_on_screen(); - ::PROTOBUF_NAMESPACE_ID::int32 maximum_size_on_screen() const; - void set_maximum_size_on_screen(::PROTOBUF_NAMESPACE_ID::int32 value); - private: - ::PROTOBUF_NAMESPACE_ID::int32 _internal_maximum_size_on_screen() const; - void _internal_set_maximum_size_on_screen(::PROTOBUF_NAMESPACE_ID::int32 value); - public: - - // bool can_fade = 4; - void clear_can_fade(); - bool can_fade() const; - void set_can_fade(bool value); - private: - bool _internal_can_fade() const; - void _internal_set_can_fade(bool value); - public: - - // bool __tentative__render_ingame = 13; - void clear___tentative__render_ingame(); - bool __tentative__render_ingame() const; - void set___tentative__render_ingame(bool value); - private: - bool _internal___tentative__render_ingame() const; - void _internal_set___tentative__render_ingame(bool value); - public: - - // bool __tentative__render_on_map = 14; - void clear___tentative__render_on_map(); - bool __tentative__render_on_map() const; - void set___tentative__render_on_map(bool value); - private: - bool _internal___tentative__render_on_map() const; - void _internal_set___tentative__render_on_map(bool value); - public: - - // bool __tentative__render_on_minimap = 15; - void clear___tentative__render_on_minimap(); - bool __tentative__render_on_minimap() const; - void set___tentative__render_on_minimap(bool value); - private: - bool _internal___tentative__render_on_minimap() const; - void _internal_set___tentative__render_on_minimap(bool value); - public: - - // int32 minimum_size_on_screen = 12; - void clear_minimum_size_on_screen(); - ::PROTOBUF_NAMESPACE_ID::int32 minimum_size_on_screen() const; - void set_minimum_size_on_screen(::PROTOBUF_NAMESPACE_ID::int32 value); + // float x = 1; + void clear_x(); + float x() const; + void set_x(float value); private: - ::PROTOBUF_NAMESPACE_ID::int32 _internal_minimum_size_on_screen() const; - void _internal_set_minimum_size_on_screen(::PROTOBUF_NAMESPACE_ID::int32 value); + float _internal_x() const; + void _internal_set_x(float value); public: - // bool scale_on_map_with_zoom = 16; - void clear_scale_on_map_with_zoom(); - bool scale_on_map_with_zoom() const; - void set_scale_on_map_with_zoom(bool value); + // float y = 2; + void clear_y(); + float y() const; + void set_y(float value); private: - bool _internal_scale_on_map_with_zoom() const; - void _internal_set_scale_on_map_with_zoom(bool value); + float _internal_y() const; + void _internal_set_y(float value); public: - // float bhdraft__schedule_duration = 18; - void clear_bhdraft__schedule_duration(); - float bhdraft__schedule_duration() const; - void set_bhdraft__schedule_duration(float value); + // float z = 3; + void clear_z(); + float z() const; + void set_z(float value); private: - float _internal_bhdraft__schedule_duration() const; - void _internal_set_bhdraft__schedule_duration(float value); + float _internal_z() const; + void _internal_set_z(float value); public: - // @@protoc_insertion_point(class_scope:Proto_Node.Icon) + // @@protoc_insertion_point(class_scope:EulerRotation) private: class _Internal; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr bhdraft__schedule_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr tip_description_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr tip_name_; - ::PROTOBUF_NAMESPACE_ID::uint32 achievement_bit_; - ::PROTOBUF_NAMESPACE_ID::int32 achievement_id_; - float alpha_; - float distance_fade_end_; - float distance_fade_start_; - float height_offset_; - float __tentative__scale_; - ::PROTOBUF_NAMESPACE_ID::int32 map_display_size_; - ::PROTOBUF_NAMESPACE_ID::int32 map_id_; - ::PROTOBUF_NAMESPACE_ID::int32 maximum_size_on_screen_; - bool can_fade_; - bool __tentative__render_ingame_; - bool __tentative__render_on_map_; - bool __tentative__render_on_minimap_; - ::PROTOBUF_NAMESPACE_ID::int32 minimum_size_on_screen_; - bool scale_on_map_with_zoom_; - float bhdraft__schedule_duration_; + float x_; + float y_; + float z_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_node_2eproto; + friend struct ::TableStruct_generators_2fproto_5ftemplates_2fnode_2eproto; }; // ------------------------------------------------------------------- -class Trail_color PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Proto_Node.Trail.color) */ { +class Trigger PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Trigger) */ { public: - inline Trail_color() : Trail_color(nullptr) {}; - virtual ~Trail_color(); + inline Trigger() : Trigger(nullptr) {}; + virtual ~Trigger(); - Trail_color(const Trail_color& from); - Trail_color(Trail_color&& from) noexcept - : Trail_color() { + Trigger(const Trigger& from); + Trigger(Trigger&& from) noexcept + : Trigger() { *this = ::std::move(from); } - inline Trail_color& operator=(const Trail_color& from) { + inline Trigger& operator=(const Trigger& from) { CopyFrom(from); return *this; } - inline Trail_color& operator=(Trail_color&& from) noexcept { + inline Trigger& operator=(Trigger&& from) noexcept { if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { @@ -1949,20 +1990,20 @@ class Trail_color PROTOBUF_FINAL : static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { return GetMetadataStatic().reflection; } - static const Trail_color& default_instance(); + static const Trigger& default_instance(); static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const Trail_color* internal_default_instance() { - return reinterpret_cast( - &_Trail_color_default_instance_); + static inline const Trigger* internal_default_instance() { + return reinterpret_cast( + &_Trigger_default_instance_); } static constexpr int kIndexInFileMessages = - 8; + 7; - friend void swap(Trail_color& a, Trail_color& b) { + friend void swap(Trigger& a, Trigger& b) { a.Swap(&b); } - inline void Swap(Trail_color* other) { + inline void Swap(Trigger* other) { if (other == this) return; if (GetArena() == other->GetArena()) { InternalSwap(other); @@ -1970,7 +2011,7 @@ class Trail_color PROTOBUF_FINAL : ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(Trail_color* other) { + void UnsafeArenaSwap(Trigger* other) { if (other == this) return; GOOGLE_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); @@ -1978,17 +2019,17 @@ class Trail_color PROTOBUF_FINAL : // implements Message ---------------------------------------------- - inline Trail_color* New() const final { - return CreateMaybeMessage(nullptr); + inline Trigger* New() const final { + return CreateMaybeMessage(nullptr); } - Trail_color* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); + Trigger* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); } void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const Trail_color& from); - void MergeFrom(const Trail_color& from); + void CopyFrom(const Trigger& from); + void MergeFrom(const Trigger& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; @@ -2002,13 +2043,13 @@ class Trail_color PROTOBUF_FINAL : inline void SharedCtor(); inline void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(Trail_color* other); + void InternalSwap(Trigger* other); friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Proto_Node.Trail.color"; + return "Trigger"; } protected: - explicit Trail_color(::PROTOBUF_NAMESPACE_ID::Arena* arena); + explicit Trigger(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); @@ -2017,8 +2058,8 @@ class Trail_color PROTOBUF_FINAL : ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; private: static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); - return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto); + return ::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto.file_level_metadata[kIndexInFileMessages]; } public: @@ -2028,63 +2069,265 @@ class Trail_color PROTOBUF_FINAL : // accessors ------------------------------------------------------- enum : int { - kHexFieldNumber = 1, + kActionCopyClipboardFieldNumber = 5, + kActionCopyMessageFieldNumber = 6, + kActionInfoMessageFieldNumber = 8, + kActionHideCategoryFieldNumber = 12, + kActionShowCategoryFieldNumber = 13, + kActionToggleCategoryFieldNumber = 14, + kBounceDelayFieldNumber = 2, + kBounceDurationFieldNumber = 3, + kBounceHeightFieldNumber = 4, + kAutoTriggerFieldNumber = 1, + kHasCountdownFieldNumber = 7, + kInvertDisplayFieldNumber = 9, + kResetLengthFieldNumber = 10, + kRangeFieldNumber = 11, }; - // string hex = 1; - void clear_hex(); - const std::string& hex() const; - void set_hex(const std::string& value); - void set_hex(std::string&& value); - void set_hex(const char* value); - void set_hex(const char* value, size_t size); - std::string* mutable_hex(); - std::string* release_hex(); - void set_allocated_hex(std::string* hex); - GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" - " string fields are deprecated and will be removed in a" - " future release.") - std::string* unsafe_arena_release_hex(); - GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + // string action_copy_clipboard = 5; + void clear_action_copy_clipboard(); + const std::string& action_copy_clipboard() const; + void set_action_copy_clipboard(const std::string& value); + void set_action_copy_clipboard(std::string&& value); + void set_action_copy_clipboard(const char* value); + void set_action_copy_clipboard(const char* value, size_t size); + std::string* mutable_action_copy_clipboard(); + std::string* release_action_copy_clipboard(); + void set_allocated_action_copy_clipboard(std::string* action_copy_clipboard); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" " string fields are deprecated and will be removed in a" " future release.") - void unsafe_arena_set_allocated_hex( - std::string* hex); + std::string* unsafe_arena_release_action_copy_clipboard(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_action_copy_clipboard( + std::string* action_copy_clipboard); private: - const std::string& _internal_hex() const; - void _internal_set_hex(const std::string& value); - std::string* _internal_mutable_hex(); + const std::string& _internal_action_copy_clipboard() const; + void _internal_set_action_copy_clipboard(const std::string& value); + std::string* _internal_mutable_action_copy_clipboard(); + public: + + // string action_copy_message = 6; + void clear_action_copy_message(); + const std::string& action_copy_message() const; + void set_action_copy_message(const std::string& value); + void set_action_copy_message(std::string&& value); + void set_action_copy_message(const char* value); + void set_action_copy_message(const char* value, size_t size); + std::string* mutable_action_copy_message(); + std::string* release_action_copy_message(); + void set_allocated_action_copy_message(std::string* action_copy_message); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_action_copy_message(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_action_copy_message( + std::string* action_copy_message); + private: + const std::string& _internal_action_copy_message() const; + void _internal_set_action_copy_message(const std::string& value); + std::string* _internal_mutable_action_copy_message(); + public: + + // string action_info_message = 8; + void clear_action_info_message(); + const std::string& action_info_message() const; + void set_action_info_message(const std::string& value); + void set_action_info_message(std::string&& value); + void set_action_info_message(const char* value); + void set_action_info_message(const char* value, size_t size); + std::string* mutable_action_info_message(); + std::string* release_action_info_message(); + void set_allocated_action_info_message(std::string* action_info_message); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_action_info_message(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_action_info_message( + std::string* action_info_message); + private: + const std::string& _internal_action_info_message() const; + void _internal_set_action_info_message(const std::string& value); + std::string* _internal_mutable_action_info_message(); + public: + + // .Category action_hide_category = 12; + bool has_action_hide_category() const; + private: + bool _internal_has_action_hide_category() const; + public: + void clear_action_hide_category(); + const ::Category& action_hide_category() const; + ::Category* release_action_hide_category(); + ::Category* mutable_action_hide_category(); + void set_allocated_action_hide_category(::Category* action_hide_category); + private: + const ::Category& _internal_action_hide_category() const; + ::Category* _internal_mutable_action_hide_category(); + public: + void unsafe_arena_set_allocated_action_hide_category( + ::Category* action_hide_category); + ::Category* unsafe_arena_release_action_hide_category(); + + // .Category action_show_category = 13; + bool has_action_show_category() const; + private: + bool _internal_has_action_show_category() const; + public: + void clear_action_show_category(); + const ::Category& action_show_category() const; + ::Category* release_action_show_category(); + ::Category* mutable_action_show_category(); + void set_allocated_action_show_category(::Category* action_show_category); + private: + const ::Category& _internal_action_show_category() const; + ::Category* _internal_mutable_action_show_category(); + public: + void unsafe_arena_set_allocated_action_show_category( + ::Category* action_show_category); + ::Category* unsafe_arena_release_action_show_category(); + + // .Category action_toggle_category = 14; + bool has_action_toggle_category() const; + private: + bool _internal_has_action_toggle_category() const; + public: + void clear_action_toggle_category(); + const ::Category& action_toggle_category() const; + ::Category* release_action_toggle_category(); + ::Category* mutable_action_toggle_category(); + void set_allocated_action_toggle_category(::Category* action_toggle_category); + private: + const ::Category& _internal_action_toggle_category() const; + ::Category* _internal_mutable_action_toggle_category(); + public: + void unsafe_arena_set_allocated_action_toggle_category( + ::Category* action_toggle_category); + ::Category* unsafe_arena_release_action_toggle_category(); + + // float bounce_delay = 2; + void clear_bounce_delay(); + float bounce_delay() const; + void set_bounce_delay(float value); + private: + float _internal_bounce_delay() const; + void _internal_set_bounce_delay(float value); + public: + + // float bounce_duration = 3; + void clear_bounce_duration(); + float bounce_duration() const; + void set_bounce_duration(float value); + private: + float _internal_bounce_duration() const; + void _internal_set_bounce_duration(float value); + public: + + // float bounce_height = 4; + void clear_bounce_height(); + float bounce_height() const; + void set_bounce_height(float value); + private: + float _internal_bounce_height() const; + void _internal_set_bounce_height(float value); + public: + + // bool auto_trigger = 1; + void clear_auto_trigger(); + bool auto_trigger() const; + void set_auto_trigger(bool value); + private: + bool _internal_auto_trigger() const; + void _internal_set_auto_trigger(bool value); + public: + + // bool has_countdown = 7; + void clear_has_countdown(); + bool has_countdown() const; + void set_has_countdown(bool value); + private: + bool _internal_has_countdown() const; + void _internal_set_has_countdown(bool value); + public: + + // bool invert_display = 9; + void clear_invert_display(); + bool invert_display() const; + void set_invert_display(bool value); + private: + bool _internal_invert_display() const; + void _internal_set_invert_display(bool value); + public: + + // float reset_length = 10; + void clear_reset_length(); + float reset_length() const; + void set_reset_length(float value); + private: + float _internal_reset_length() const; + void _internal_set_reset_length(float value); + public: + + // float range = 11; + void clear_range(); + float range() const; + void set_range(float value); + private: + float _internal_range() const; + void _internal_set_range(float value); public: - // @@protoc_insertion_point(class_scope:Proto_Node.Trail.color) + // @@protoc_insertion_point(class_scope:Trigger) private: class _Internal; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr hex_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr action_copy_clipboard_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr action_copy_message_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr action_info_message_; + ::Category* action_hide_category_; + ::Category* action_show_category_; + ::Category* action_toggle_category_; + float bounce_delay_; + float bounce_duration_; + float bounce_height_; + bool auto_trigger_; + bool has_countdown_; + bool invert_display_; + float reset_length_; + float range_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_node_2eproto; + friend struct ::TableStruct_generators_2fproto_5ftemplates_2fnode_2eproto; }; // ------------------------------------------------------------------- -class Trail_festival_filter PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Proto_Node.Trail.festival_filter) */ { +class GUID PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:GUID) */ { public: - inline Trail_festival_filter() : Trail_festival_filter(nullptr) {}; - virtual ~Trail_festival_filter(); + inline GUID() : GUID(nullptr) {}; + virtual ~GUID(); - Trail_festival_filter(const Trail_festival_filter& from); - Trail_festival_filter(Trail_festival_filter&& from) noexcept - : Trail_festival_filter() { + GUID(const GUID& from); + GUID(GUID&& from) noexcept + : GUID() { *this = ::std::move(from); } - inline Trail_festival_filter& operator=(const Trail_festival_filter& from) { + inline GUID& operator=(const GUID& from) { CopyFrom(from); return *this; } - inline Trail_festival_filter& operator=(Trail_festival_filter&& from) noexcept { + inline GUID& operator=(GUID&& from) noexcept { if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { @@ -2102,20 +2345,20 @@ class Trail_festival_filter PROTOBUF_FINAL : static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { return GetMetadataStatic().reflection; } - static const Trail_festival_filter& default_instance(); + static const GUID& default_instance(); static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const Trail_festival_filter* internal_default_instance() { - return reinterpret_cast( - &_Trail_festival_filter_default_instance_); + static inline const GUID* internal_default_instance() { + return reinterpret_cast( + &_GUID_default_instance_); } static constexpr int kIndexInFileMessages = - 9; + 8; - friend void swap(Trail_festival_filter& a, Trail_festival_filter& b) { + friend void swap(GUID& a, GUID& b) { a.Swap(&b); } - inline void Swap(Trail_festival_filter* other) { + inline void Swap(GUID* other) { if (other == this) return; if (GetArena() == other->GetArena()) { InternalSwap(other); @@ -2123,7 +2366,7 @@ class Trail_festival_filter PROTOBUF_FINAL : ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(Trail_festival_filter* other) { + void UnsafeArenaSwap(GUID* other) { if (other == this) return; GOOGLE_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); @@ -2131,17 +2374,17 @@ class Trail_festival_filter PROTOBUF_FINAL : // implements Message ---------------------------------------------- - inline Trail_festival_filter* New() const final { - return CreateMaybeMessage(nullptr); + inline GUID* New() const final { + return CreateMaybeMessage(nullptr); } - Trail_festival_filter* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); + GUID* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); } void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const Trail_festival_filter& from); - void MergeFrom(const Trail_festival_filter& from); + void CopyFrom(const GUID& from); + void MergeFrom(const GUID& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; @@ -2155,13 +2398,13 @@ class Trail_festival_filter PROTOBUF_FINAL : inline void SharedCtor(); inline void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(Trail_festival_filter* other); + void InternalSwap(GUID* other); friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Proto_Node.Trail.festival_filter"; + return "GUID"; } protected: - explicit Trail_festival_filter(::PROTOBUF_NAMESPACE_ID::Arena* arena); + explicit GUID(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); @@ -2170,8 +2413,8 @@ class Trail_festival_filter PROTOBUF_FINAL : ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; private: static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); - return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto); + return ::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto.file_level_metadata[kIndexInFileMessages]; } public: @@ -2181,113 +2424,200 @@ class Trail_festival_filter PROTOBUF_FINAL : // accessors ------------------------------------------------------- enum : int { - kDragonbashFieldNumber = 1, - kFestivalOfTheFourWindsFieldNumber = 2, - kHalloweenFieldNumber = 3, - kLunarNewYearFieldNumber = 4, - kSuperAdventureFestivalFieldNumber = 5, - kWintersdayFieldNumber = 6, - kNoneFieldNumber = 7, + kGuidFieldNumber = 1, }; - // bool dragonbash = 1; - void clear_dragonbash(); - bool dragonbash() const; - void set_dragonbash(bool value); + // int32 guid = 1; + void clear_guid(); + ::PROTOBUF_NAMESPACE_ID::int32 guid() const; + void set_guid(::PROTOBUF_NAMESPACE_ID::int32 value); private: - bool _internal_dragonbash() const; - void _internal_set_dragonbash(bool value); + ::PROTOBUF_NAMESPACE_ID::int32 _internal_guid() const; + void _internal_set_guid(::PROTOBUF_NAMESPACE_ID::int32 value); public: - // bool festival_of_the_four_winds = 2; - void clear_festival_of_the_four_winds(); - bool festival_of_the_four_winds() const; - void set_festival_of_the_four_winds(bool value); - private: - bool _internal_festival_of_the_four_winds() const; - void _internal_set_festival_of_the_four_winds(bool value); - public: + // @@protoc_insertion_point(class_scope:GUID) + private: + class _Internal; - // bool halloween = 3; - void clear_halloween(); - bool halloween() const; - void set_halloween(bool value); - private: - bool _internal_halloween() const; - void _internal_set_halloween(bool value); - public: + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::int32 guid_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_generators_2fproto_5ftemplates_2fnode_2eproto; +}; +// ------------------------------------------------------------------- - // bool lunar_new_year = 4; - void clear_lunar_new_year(); - bool lunar_new_year() const; - void set_lunar_new_year(bool value); - private: - bool _internal_lunar_new_year() const; - void _internal_set_lunar_new_year(bool value); - public: +class Color PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Color) */ { + public: + inline Color() : Color(nullptr) {}; + virtual ~Color(); - // bool super_adventure_festival = 5; - void clear_super_adventure_festival(); - bool super_adventure_festival() const; - void set_super_adventure_festival(bool value); - private: - bool _internal_super_adventure_festival() const; - void _internal_set_super_adventure_festival(bool value); - public: + Color(const Color& from); + Color(Color&& from) noexcept + : Color() { + *this = ::std::move(from); + } + + inline Color& operator=(const Color& from) { + CopyFrom(from); + return *this; + } + inline Color& operator=(Color&& from) noexcept { + if (GetArena() == from.GetArena()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const Color& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const Color* internal_default_instance() { + return reinterpret_cast( + &_Color_default_instance_); + } + static constexpr int kIndexInFileMessages = + 9; + + friend void swap(Color& a, Color& b) { + a.Swap(&b); + } + inline void Swap(Color* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Color* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline Color* New() const final { + return CreateMaybeMessage(nullptr); + } + + Color* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const Color& from); + void MergeFrom(const Color& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } - // bool wintersday = 6; - void clear_wintersday(); - bool wintersday() const; - void set_wintersday(bool value); private: - bool _internal_wintersday() const; - void _internal_set_wintersday(bool value); + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Color* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "Color"; + } + protected: + explicit Color(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: - // bool none = 7; - void clear_none(); - bool none() const; - void set_none(bool value); + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; private: - bool _internal_none() const; - void _internal_set_none(bool value); + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto); + return ::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kHexFieldNumber = 1, + }; + // string hex = 1; + void clear_hex(); + const std::string& hex() const; + void set_hex(const std::string& value); + void set_hex(std::string&& value); + void set_hex(const char* value); + void set_hex(const char* value, size_t size); + std::string* mutable_hex(); + std::string* release_hex(); + void set_allocated_hex(std::string* hex); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_hex(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_hex( + std::string* hex); + private: + const std::string& _internal_hex() const; + void _internal_set_hex(const std::string& value); + std::string* _internal_mutable_hex(); public: - // @@protoc_insertion_point(class_scope:Proto_Node.Trail.festival_filter) + // @@protoc_insertion_point(class_scope:Color) private: class _Internal; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - bool dragonbash_; - bool festival_of_the_four_winds_; - bool halloween_; - bool lunar_new_year_; - bool super_adventure_festival_; - bool wintersday_; - bool none_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr hex_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_node_2eproto; + friend struct ::TableStruct_generators_2fproto_5ftemplates_2fnode_2eproto; }; // ------------------------------------------------------------------- -class Trail_guid PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Proto_Node.Trail.guid) */ { +class FestivalFilter PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:FestivalFilter) */ { public: - inline Trail_guid() : Trail_guid(nullptr) {}; - virtual ~Trail_guid(); + inline FestivalFilter() : FestivalFilter(nullptr) {}; + virtual ~FestivalFilter(); - Trail_guid(const Trail_guid& from); - Trail_guid(Trail_guid&& from) noexcept - : Trail_guid() { + FestivalFilter(const FestivalFilter& from); + FestivalFilter(FestivalFilter&& from) noexcept + : FestivalFilter() { *this = ::std::move(from); } - inline Trail_guid& operator=(const Trail_guid& from) { + inline FestivalFilter& operator=(const FestivalFilter& from) { CopyFrom(from); return *this; } - inline Trail_guid& operator=(Trail_guid&& from) noexcept { + inline FestivalFilter& operator=(FestivalFilter&& from) noexcept { if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { @@ -2305,20 +2635,20 @@ class Trail_guid PROTOBUF_FINAL : static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { return GetMetadataStatic().reflection; } - static const Trail_guid& default_instance(); + static const FestivalFilter& default_instance(); static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const Trail_guid* internal_default_instance() { - return reinterpret_cast( - &_Trail_guid_default_instance_); + static inline const FestivalFilter* internal_default_instance() { + return reinterpret_cast( + &_FestivalFilter_default_instance_); } static constexpr int kIndexInFileMessages = 10; - friend void swap(Trail_guid& a, Trail_guid& b) { + friend void swap(FestivalFilter& a, FestivalFilter& b) { a.Swap(&b); } - inline void Swap(Trail_guid* other) { + inline void Swap(FestivalFilter* other) { if (other == this) return; if (GetArena() == other->GetArena()) { InternalSwap(other); @@ -2326,7 +2656,7 @@ class Trail_guid PROTOBUF_FINAL : ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(Trail_guid* other) { + void UnsafeArenaSwap(FestivalFilter* other) { if (other == this) return; GOOGLE_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); @@ -2334,17 +2664,17 @@ class Trail_guid PROTOBUF_FINAL : // implements Message ---------------------------------------------- - inline Trail_guid* New() const final { - return CreateMaybeMessage(nullptr); + inline FestivalFilter* New() const final { + return CreateMaybeMessage(nullptr); } - Trail_guid* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); + FestivalFilter* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); } void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const Trail_guid& from); - void MergeFrom(const Trail_guid& from); + void CopyFrom(const FestivalFilter& from); + void MergeFrom(const FestivalFilter& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; @@ -2358,13 +2688,13 @@ class Trail_guid PROTOBUF_FINAL : inline void SharedCtor(); inline void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(Trail_guid* other); + void InternalSwap(FestivalFilter* other); friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Proto_Node.Trail.guid"; + return "FestivalFilter"; } protected: - explicit Trail_guid(::PROTOBUF_NAMESPACE_ID::Arena* arena); + explicit FestivalFilter(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); @@ -2373,8 +2703,8 @@ class Trail_guid PROTOBUF_FINAL : ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; private: static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); - return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto); + return ::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto.file_level_metadata[kIndexInFileMessages]; } public: @@ -2384,47 +2714,113 @@ class Trail_guid PROTOBUF_FINAL : // accessors ------------------------------------------------------- enum : int { - kGuidFieldNumber = 1, + kDragonbashFieldNumber = 1, + kFestivalOfTheFourWindsFieldNumber = 2, + kHalloweenFieldNumber = 3, + kLunarNewYearFieldNumber = 4, + kSuperAdventureFestivalFieldNumber = 5, + kWintersdayFieldNumber = 6, + kNoneFieldNumber = 7, }; - // int32 guid = 1; - void clear_guid(); - ::PROTOBUF_NAMESPACE_ID::int32 guid() const; - void set_guid(::PROTOBUF_NAMESPACE_ID::int32 value); + // bool dragonbash = 1; + void clear_dragonbash(); + bool dragonbash() const; + void set_dragonbash(bool value); private: - ::PROTOBUF_NAMESPACE_ID::int32 _internal_guid() const; - void _internal_set_guid(::PROTOBUF_NAMESPACE_ID::int32 value); + bool _internal_dragonbash() const; + void _internal_set_dragonbash(bool value); + public: + + // bool festival_of_the_four_winds = 2; + void clear_festival_of_the_four_winds(); + bool festival_of_the_four_winds() const; + void set_festival_of_the_four_winds(bool value); + private: + bool _internal_festival_of_the_four_winds() const; + void _internal_set_festival_of_the_four_winds(bool value); + public: + + // bool halloween = 3; + void clear_halloween(); + bool halloween() const; + void set_halloween(bool value); + private: + bool _internal_halloween() const; + void _internal_set_halloween(bool value); + public: + + // bool lunar_new_year = 4; + void clear_lunar_new_year(); + bool lunar_new_year() const; + void set_lunar_new_year(bool value); + private: + bool _internal_lunar_new_year() const; + void _internal_set_lunar_new_year(bool value); + public: + + // bool super_adventure_festival = 5; + void clear_super_adventure_festival(); + bool super_adventure_festival() const; + void set_super_adventure_festival(bool value); + private: + bool _internal_super_adventure_festival() const; + void _internal_set_super_adventure_festival(bool value); + public: + + // bool wintersday = 6; + void clear_wintersday(); + bool wintersday() const; + void set_wintersday(bool value); + private: + bool _internal_wintersday() const; + void _internal_set_wintersday(bool value); + public: + + // bool none = 7; + void clear_none(); + bool none() const; + void set_none(bool value); + private: + bool _internal_none() const; + void _internal_set_none(bool value); public: - // @@protoc_insertion_point(class_scope:Proto_Node.Trail.guid) + // @@protoc_insertion_point(class_scope:FestivalFilter) private: class _Internal; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::int32 guid_; + bool dragonbash_; + bool festival_of_the_four_winds_; + bool halloween_; + bool lunar_new_year_; + bool super_adventure_festival_; + bool wintersday_; + bool none_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_node_2eproto; + friend struct ::TableStruct_generators_2fproto_5ftemplates_2fnode_2eproto; }; // ------------------------------------------------------------------- -class Trail_map_type_filter PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Proto_Node.Trail.map_type_filter) */ { +class MapTypeFilter PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:MapTypeFilter) */ { public: - inline Trail_map_type_filter() : Trail_map_type_filter(nullptr) {}; - virtual ~Trail_map_type_filter(); + inline MapTypeFilter() : MapTypeFilter(nullptr) {}; + virtual ~MapTypeFilter(); - Trail_map_type_filter(const Trail_map_type_filter& from); - Trail_map_type_filter(Trail_map_type_filter&& from) noexcept - : Trail_map_type_filter() { + MapTypeFilter(const MapTypeFilter& from); + MapTypeFilter(MapTypeFilter&& from) noexcept + : MapTypeFilter() { *this = ::std::move(from); } - inline Trail_map_type_filter& operator=(const Trail_map_type_filter& from) { + inline MapTypeFilter& operator=(const MapTypeFilter& from) { CopyFrom(from); return *this; } - inline Trail_map_type_filter& operator=(Trail_map_type_filter&& from) noexcept { + inline MapTypeFilter& operator=(MapTypeFilter&& from) noexcept { if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { @@ -2442,20 +2838,20 @@ class Trail_map_type_filter PROTOBUF_FINAL : static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { return GetMetadataStatic().reflection; } - static const Trail_map_type_filter& default_instance(); + static const MapTypeFilter& default_instance(); static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const Trail_map_type_filter* internal_default_instance() { - return reinterpret_cast( - &_Trail_map_type_filter_default_instance_); + static inline const MapTypeFilter* internal_default_instance() { + return reinterpret_cast( + &_MapTypeFilter_default_instance_); } static constexpr int kIndexInFileMessages = 11; - friend void swap(Trail_map_type_filter& a, Trail_map_type_filter& b) { + friend void swap(MapTypeFilter& a, MapTypeFilter& b) { a.Swap(&b); } - inline void Swap(Trail_map_type_filter* other) { + inline void Swap(MapTypeFilter* other) { if (other == this) return; if (GetArena() == other->GetArena()) { InternalSwap(other); @@ -2463,7 +2859,7 @@ class Trail_map_type_filter PROTOBUF_FINAL : ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(Trail_map_type_filter* other) { + void UnsafeArenaSwap(MapTypeFilter* other) { if (other == this) return; GOOGLE_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); @@ -2471,17 +2867,17 @@ class Trail_map_type_filter PROTOBUF_FINAL : // implements Message ---------------------------------------------- - inline Trail_map_type_filter* New() const final { - return CreateMaybeMessage(nullptr); + inline MapTypeFilter* New() const final { + return CreateMaybeMessage(nullptr); } - Trail_map_type_filter* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); + MapTypeFilter* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); } void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const Trail_map_type_filter& from); - void MergeFrom(const Trail_map_type_filter& from); + void CopyFrom(const MapTypeFilter& from); + void MergeFrom(const MapTypeFilter& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; @@ -2495,13 +2891,13 @@ class Trail_map_type_filter PROTOBUF_FINAL : inline void SharedCtor(); inline void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(Trail_map_type_filter* other); + void InternalSwap(MapTypeFilter* other); friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Proto_Node.Trail.map_type_filter"; + return "MapTypeFilter"; } protected: - explicit Trail_map_type_filter(::PROTOBUF_NAMESPACE_ID::Arena* arena); + explicit MapTypeFilter(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); @@ -2510,8 +2906,8 @@ class Trail_map_type_filter PROTOBUF_FINAL : ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; private: static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); - return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto); + return ::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto.file_level_metadata[kIndexInFileMessages]; } public: @@ -2762,7 +3158,7 @@ class Trail_map_type_filter PROTOBUF_FINAL : void _internal_set_wvw_lounge_map(bool value); public: - // @@protoc_insertion_point(class_scope:Proto_Node.Trail.map_type_filter) + // @@protoc_insertion_point(class_scope:MapTypeFilter) private: class _Internal; @@ -2794,27 +3190,27 @@ class Trail_map_type_filter PROTOBUF_FINAL : bool public_mini_map_; bool wvw_lounge_map_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_node_2eproto; + friend struct ::TableStruct_generators_2fproto_5ftemplates_2fnode_2eproto; }; // ------------------------------------------------------------------- -class Trail_mount_filter PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Proto_Node.Trail.mount_filter) */ { +class MountFilter PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:MountFilter) */ { public: - inline Trail_mount_filter() : Trail_mount_filter(nullptr) {}; - virtual ~Trail_mount_filter(); + inline MountFilter() : MountFilter(nullptr) {}; + virtual ~MountFilter(); - Trail_mount_filter(const Trail_mount_filter& from); - Trail_mount_filter(Trail_mount_filter&& from) noexcept - : Trail_mount_filter() { + MountFilter(const MountFilter& from); + MountFilter(MountFilter&& from) noexcept + : MountFilter() { *this = ::std::move(from); } - inline Trail_mount_filter& operator=(const Trail_mount_filter& from) { + inline MountFilter& operator=(const MountFilter& from) { CopyFrom(from); return *this; } - inline Trail_mount_filter& operator=(Trail_mount_filter&& from) noexcept { + inline MountFilter& operator=(MountFilter&& from) noexcept { if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { @@ -2832,20 +3228,20 @@ class Trail_mount_filter PROTOBUF_FINAL : static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { return GetMetadataStatic().reflection; } - static const Trail_mount_filter& default_instance(); + static const MountFilter& default_instance(); static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const Trail_mount_filter* internal_default_instance() { - return reinterpret_cast( - &_Trail_mount_filter_default_instance_); + static inline const MountFilter* internal_default_instance() { + return reinterpret_cast( + &_MountFilter_default_instance_); } static constexpr int kIndexInFileMessages = 12; - friend void swap(Trail_mount_filter& a, Trail_mount_filter& b) { + friend void swap(MountFilter& a, MountFilter& b) { a.Swap(&b); } - inline void Swap(Trail_mount_filter* other) { + inline void Swap(MountFilter* other) { if (other == this) return; if (GetArena() == other->GetArena()) { InternalSwap(other); @@ -2853,7 +3249,7 @@ class Trail_mount_filter PROTOBUF_FINAL : ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(Trail_mount_filter* other) { + void UnsafeArenaSwap(MountFilter* other) { if (other == this) return; GOOGLE_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); @@ -2861,17 +3257,17 @@ class Trail_mount_filter PROTOBUF_FINAL : // implements Message ---------------------------------------------- - inline Trail_mount_filter* New() const final { - return CreateMaybeMessage(nullptr); + inline MountFilter* New() const final { + return CreateMaybeMessage(nullptr); } - Trail_mount_filter* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); + MountFilter* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); } void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const Trail_mount_filter& from); - void MergeFrom(const Trail_mount_filter& from); + void CopyFrom(const MountFilter& from); + void MergeFrom(const MountFilter& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; @@ -2885,13 +3281,13 @@ class Trail_mount_filter PROTOBUF_FINAL : inline void SharedCtor(); inline void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(Trail_mount_filter* other); + void InternalSwap(MountFilter* other); friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Proto_Node.Trail.mount_filter"; + return "MountFilter"; } protected: - explicit Trail_mount_filter(::PROTOBUF_NAMESPACE_ID::Arena* arena); + explicit MountFilter(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); @@ -2900,8 +3296,8 @@ class Trail_mount_filter PROTOBUF_FINAL : ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; private: static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); - return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto); + return ::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto.file_level_metadata[kIndexInFileMessages]; } public: @@ -3012,7 +3408,7 @@ class Trail_mount_filter PROTOBUF_FINAL : void _internal_set_seige_turtle(bool value); public: - // @@protoc_insertion_point(class_scope:Proto_Node.Trail.mount_filter) + // @@protoc_insertion_point(class_scope:MountFilter) private: class _Internal; @@ -3030,27 +3426,27 @@ class Trail_mount_filter PROTOBUF_FINAL : bool skiff_; bool seige_turtle_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_node_2eproto; + friend struct ::TableStruct_generators_2fproto_5ftemplates_2fnode_2eproto; }; // ------------------------------------------------------------------- -class Trail_profession_filter PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Proto_Node.Trail.profession_filter) */ { +class ProfessionFilter PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:ProfessionFilter) */ { public: - inline Trail_profession_filter() : Trail_profession_filter(nullptr) {}; - virtual ~Trail_profession_filter(); + inline ProfessionFilter() : ProfessionFilter(nullptr) {}; + virtual ~ProfessionFilter(); - Trail_profession_filter(const Trail_profession_filter& from); - Trail_profession_filter(Trail_profession_filter&& from) noexcept - : Trail_profession_filter() { + ProfessionFilter(const ProfessionFilter& from); + ProfessionFilter(ProfessionFilter&& from) noexcept + : ProfessionFilter() { *this = ::std::move(from); } - inline Trail_profession_filter& operator=(const Trail_profession_filter& from) { + inline ProfessionFilter& operator=(const ProfessionFilter& from) { CopyFrom(from); return *this; } - inline Trail_profession_filter& operator=(Trail_profession_filter&& from) noexcept { + inline ProfessionFilter& operator=(ProfessionFilter&& from) noexcept { if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { @@ -3068,20 +3464,20 @@ class Trail_profession_filter PROTOBUF_FINAL : static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { return GetMetadataStatic().reflection; } - static const Trail_profession_filter& default_instance(); + static const ProfessionFilter& default_instance(); static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const Trail_profession_filter* internal_default_instance() { - return reinterpret_cast( - &_Trail_profession_filter_default_instance_); + static inline const ProfessionFilter* internal_default_instance() { + return reinterpret_cast( + &_ProfessionFilter_default_instance_); } static constexpr int kIndexInFileMessages = 13; - friend void swap(Trail_profession_filter& a, Trail_profession_filter& b) { + friend void swap(ProfessionFilter& a, ProfessionFilter& b) { a.Swap(&b); } - inline void Swap(Trail_profession_filter* other) { + inline void Swap(ProfessionFilter* other) { if (other == this) return; if (GetArena() == other->GetArena()) { InternalSwap(other); @@ -3089,7 +3485,7 @@ class Trail_profession_filter PROTOBUF_FINAL : ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(Trail_profession_filter* other) { + void UnsafeArenaSwap(ProfessionFilter* other) { if (other == this) return; GOOGLE_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); @@ -3097,17 +3493,17 @@ class Trail_profession_filter PROTOBUF_FINAL : // implements Message ---------------------------------------------- - inline Trail_profession_filter* New() const final { - return CreateMaybeMessage(nullptr); + inline ProfessionFilter* New() const final { + return CreateMaybeMessage(nullptr); } - Trail_profession_filter* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); + ProfessionFilter* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); } void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const Trail_profession_filter& from); - void MergeFrom(const Trail_profession_filter& from); + void CopyFrom(const ProfessionFilter& from); + void MergeFrom(const ProfessionFilter& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; @@ -3121,13 +3517,13 @@ class Trail_profession_filter PROTOBUF_FINAL : inline void SharedCtor(); inline void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(Trail_profession_filter* other); + void InternalSwap(ProfessionFilter* other); friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Proto_Node.Trail.profession_filter"; + return "ProfessionFilter"; } protected: - explicit Trail_profession_filter(::PROTOBUF_NAMESPACE_ID::Arena* arena); + explicit ProfessionFilter(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); @@ -3136,8 +3532,8 @@ class Trail_profession_filter PROTOBUF_FINAL : ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; private: static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); - return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto); + return ::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto.file_level_metadata[kIndexInFileMessages]; } public: @@ -3238,7 +3634,7 @@ class Trail_profession_filter PROTOBUF_FINAL : void _internal_set_revenantnt(bool value); public: - // @@protoc_insertion_point(class_scope:Proto_Node.Trail.profession_filter) + // @@protoc_insertion_point(class_scope:ProfessionFilter) private: class _Internal; @@ -3255,27 +3651,27 @@ class Trail_profession_filter PROTOBUF_FINAL : bool necromancer_; bool revenantnt_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_node_2eproto; + friend struct ::TableStruct_generators_2fproto_5ftemplates_2fnode_2eproto; }; // ------------------------------------------------------------------- -class Trail_specialization_filter PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Proto_Node.Trail.specialization_filter) */ { +class SpecializationFilter PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:SpecializationFilter) */ { public: - inline Trail_specialization_filter() : Trail_specialization_filter(nullptr) {}; - virtual ~Trail_specialization_filter(); + inline SpecializationFilter() : SpecializationFilter(nullptr) {}; + virtual ~SpecializationFilter(); - Trail_specialization_filter(const Trail_specialization_filter& from); - Trail_specialization_filter(Trail_specialization_filter&& from) noexcept - : Trail_specialization_filter() { + SpecializationFilter(const SpecializationFilter& from); + SpecializationFilter(SpecializationFilter&& from) noexcept + : SpecializationFilter() { *this = ::std::move(from); } - inline Trail_specialization_filter& operator=(const Trail_specialization_filter& from) { + inline SpecializationFilter& operator=(const SpecializationFilter& from) { CopyFrom(from); return *this; } - inline Trail_specialization_filter& operator=(Trail_specialization_filter&& from) noexcept { + inline SpecializationFilter& operator=(SpecializationFilter&& from) noexcept { if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { @@ -3293,20 +3689,20 @@ class Trail_specialization_filter PROTOBUF_FINAL : static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { return GetMetadataStatic().reflection; } - static const Trail_specialization_filter& default_instance(); + static const SpecializationFilter& default_instance(); static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const Trail_specialization_filter* internal_default_instance() { - return reinterpret_cast( - &_Trail_specialization_filter_default_instance_); + static inline const SpecializationFilter* internal_default_instance() { + return reinterpret_cast( + &_SpecializationFilter_default_instance_); } static constexpr int kIndexInFileMessages = 14; - friend void swap(Trail_specialization_filter& a, Trail_specialization_filter& b) { + friend void swap(SpecializationFilter& a, SpecializationFilter& b) { a.Swap(&b); } - inline void Swap(Trail_specialization_filter* other) { + inline void Swap(SpecializationFilter* other) { if (other == this) return; if (GetArena() == other->GetArena()) { InternalSwap(other); @@ -3314,7 +3710,7 @@ class Trail_specialization_filter PROTOBUF_FINAL : ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(Trail_specialization_filter* other) { + void UnsafeArenaSwap(SpecializationFilter* other) { if (other == this) return; GOOGLE_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); @@ -3322,17 +3718,17 @@ class Trail_specialization_filter PROTOBUF_FINAL : // implements Message ---------------------------------------------- - inline Trail_specialization_filter* New() const final { - return CreateMaybeMessage(nullptr); + inline SpecializationFilter* New() const final { + return CreateMaybeMessage(nullptr); } - Trail_specialization_filter* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); + SpecializationFilter* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); } void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const Trail_specialization_filter& from); - void MergeFrom(const Trail_specialization_filter& from); + void CopyFrom(const SpecializationFilter& from); + void MergeFrom(const SpecializationFilter& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; @@ -3346,13 +3742,13 @@ class Trail_specialization_filter PROTOBUF_FINAL : inline void SharedCtor(); inline void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(Trail_specialization_filter* other); + void InternalSwap(SpecializationFilter* other); friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Proto_Node.Trail.specialization_filter"; + return "SpecializationFilter"; } protected: - explicit Trail_specialization_filter(::PROTOBUF_NAMESPACE_ID::Arena* arena); + explicit SpecializationFilter(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); @@ -3361,8 +3757,8 @@ class Trail_specialization_filter PROTOBUF_FINAL : ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; private: static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); - return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto); + return ::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto.file_level_metadata[kIndexInFileMessages]; } public: @@ -3372,332 +3768,332 @@ class Trail_specialization_filter PROTOBUF_FINAL : // accessors ------------------------------------------------------- enum : int { - kRangerWildernessSurvivalFieldNumber = 33, - kRevenantCorruptionFieldNumber = 14, - kRevenantDevastationFieldNumber = 15, - kRevenantInvocationFieldNumber = 3, - kMesmerDuelingFieldNumber = 1, - kMesmerIllusionsFieldNumber = 24, - kMesmerInspirationFieldNumber = 23, - kNecromancerBloodMagicFieldNumber = 19, - kWarriorDefenseFieldNumber = 22, - kWarriorDisciplineFieldNumber = 51, - kWarriorStrengthFieldNumber = 4, - kWarriorTacticsFieldNumber = 11, - kRangerBeastmasteryFieldNumber = 32, - kRangerMarksmanshipFieldNumber = 8, - kRangerNatureMagicFieldNumber = 25, - kRangerSkirmishingFieldNumber = 30, - kNecromancerReaperFieldNumber = 34, - kRangerDruidFieldNumber = 5, - kRevenantHeraldFieldNumber = 52, - kThiefDaredevilFieldNumber = 7, - kEngineerToolsFieldNumber = 21, - kGuardianHonorFieldNumber = 49, - kGuardianRadianceFieldNumber = 16, - kGuardianValorFieldNumber = 13, - kRevenantRetributionFieldNumber = 9, - kRevenantSalvationFieldNumber = 12, - kThiefAcrobaticsFieldNumber = 54, - kThiefCriticalStrikesFieldNumber = 35, - kElementalistArcaneFieldNumber = 37, - kElementalistEarthFieldNumber = 26, + kElementalistTempestFieldNumber = 1, + kEngineerScrapperFieldNumber = 2, + kGuardianDragonhunterFieldNumber = 3, + kMesmerChronomancerFieldNumber = 4, + kNecromancerReaperFieldNumber = 5, + kRangerDruidFieldNumber = 6, + kRevenantHeraldFieldNumber = 7, + kThiefDaredevilFieldNumber = 8, + kWarriorBerserkerFieldNumber = 9, + kElementalistWeaverFieldNumber = 10, + kEngineerHolosmithFieldNumber = 11, + kGuardianFirebrandFieldNumber = 12, + kMesmerMirageFieldNumber = 13, + kNecromancerScourgeFieldNumber = 14, + kRangerSoulbeastFieldNumber = 15, + kRevenantRenegadeFieldNumber = 16, + kThiefDeadeyeFieldNumber = 17, + kWarriorSpellbreakerFieldNumber = 18, + kElmentalistCatalystFieldNumber = 19, + kEngineerMechanistFieldNumber = 20, + kGuardianWillbenderFieldNumber = 21, + kMesmerVirtuosoFieldNumber = 22, + kNecromancerHarbingerFieldNumber = 23, + kRangerUntamedFieldNumber = 24, + kRevenantVindicatorFieldNumber = 25, + kThiefSpecterFieldNumber = 26, + kWarriorBladeswornFieldNumber = 27, + kElementalistAirFieldNumber = 28, + kElementalistArcaneFieldNumber = 29, + kElementalistEarthFieldNumber = 30, kElementalistFireFieldNumber = 31, - kElementalistWaterFieldNumber = 17, - kEngineerAlchemyFieldNumber = 29, - kEngineerExplosivesFieldNumber = 6, - kEngineerFirearmsFieldNumber = 38, - kEngineerInventionsFieldNumber = 47, - kThiefDeadlyArtsFieldNumber = 28, - kThiefShadowArtsFieldNumber = 20, - kThiefTrickeryFieldNumber = 44, - kWarriorArmsFieldNumber = 36, - kGuardianVirtuesFieldNumber = 46, + kElementalistWaterFieldNumber = 32, + kEngineerAlchemyFieldNumber = 33, + kEngineerExplosivesFieldNumber = 34, + kEngineerFirearmsFieldNumber = 35, + kEngineerInventionsFieldNumber = 36, + kEngineerToolsFieldNumber = 37, + kGuardianHonorFieldNumber = 38, + kGuardianRadianceFieldNumber = 39, + kGuardianValorFieldNumber = 40, + kGuardianVirtuesFieldNumber = 41, kGuardianZealFieldNumber = 42, - kMesmerChaosFieldNumber = 45, - kMesmerDominationFieldNumber = 10, - kNecromancerCursesFieldNumber = 39, - kNecromancerDeathMagicFieldNumber = 2, - kNecromancerSoulReapingFieldNumber = 50, - kNecromancerSpiteFieldNumber = 53, - kElementalistTempestFieldNumber = 48, - kEngineerScrapperFieldNumber = 43, - kGuardianDragonhunterFieldNumber = 27, - kMesmerChronomancerFieldNumber = 40, - kWarriorBerserkerFieldNumber = 18, - kElementalistWeaverFieldNumber = 56, - kEngineerHolosmithFieldNumber = 57, - kGuardianFirebrandFieldNumber = 62, - kMesmerMirageFieldNumber = 59, - kNecromancerScourgeFieldNumber = 60, - kRangerSoulbeastFieldNumber = 55, - kRevenantRenegadeFieldNumber = 63, - kRevenantVindicatorFieldNumber = 69, - kThiefSpecterFieldNumber = 71, - kWarriorBladeswornFieldNumber = 68, - kElementalistAirFieldNumber = 41, - kThiefDeadeyeFieldNumber = 58, - kWarriorSpellbreakerFieldNumber = 61, - kElmentalistCatalystFieldNumber = 67, - kEngineerMechanistFieldNumber = 70, - kGuardianWillbenderFieldNumber = 65, - kMesmerVirtuosoFieldNumber = 66, - kNecromancerHarbingerFieldNumber = 64, - kRangerUntamedFieldNumber = 72, + kMesmerChaosFieldNumber = 43, + kMesmerDominationFieldNumber = 44, + kMesmerDuelingFieldNumber = 45, + kMesmerIllusionsFieldNumber = 46, + kMesmerInspirationFieldNumber = 47, + kNecromancerBloodMagicFieldNumber = 48, + kNecromancerCursesFieldNumber = 49, + kNecromancerDeathMagicFieldNumber = 50, + kNecromancerSoulReapingFieldNumber = 51, + kNecromancerSpiteFieldNumber = 52, + kRangerBeastmasteryFieldNumber = 53, + kRangerMarksmanshipFieldNumber = 54, + kRangerNatureMagicFieldNumber = 55, + kRangerSkirmishingFieldNumber = 56, + kRangerWildernessSurvivalFieldNumber = 57, + kRevenantCorruptionFieldNumber = 58, + kRevenantDevastationFieldNumber = 59, + kRevenantInvocationFieldNumber = 60, + kRevenantRetributionFieldNumber = 61, + kRevenantSalvationFieldNumber = 62, + kThiefAcrobaticsFieldNumber = 63, + kThiefCriticalStrikesFieldNumber = 64, + kThiefDeadlyArtsFieldNumber = 65, + kThiefShadowArtsFieldNumber = 66, + kThiefTrickeryFieldNumber = 67, + kWarriorArmsFieldNumber = 68, + kWarriorDefenseFieldNumber = 69, + kWarriorDisciplineFieldNumber = 70, + kWarriorStrengthFieldNumber = 71, + kWarriorTacticsFieldNumber = 72, }; - // bool ranger_wilderness_survival = 33; - void clear_ranger_wilderness_survival(); - bool ranger_wilderness_survival() const; - void set_ranger_wilderness_survival(bool value); + // bool elementalist_tempest = 1; + void clear_elementalist_tempest(); + bool elementalist_tempest() const; + void set_elementalist_tempest(bool value); private: - bool _internal_ranger_wilderness_survival() const; - void _internal_set_ranger_wilderness_survival(bool value); + bool _internal_elementalist_tempest() const; + void _internal_set_elementalist_tempest(bool value); public: - // bool revenant_corruption = 14; - void clear_revenant_corruption(); - bool revenant_corruption() const; - void set_revenant_corruption(bool value); + // bool engineer_scrapper = 2; + void clear_engineer_scrapper(); + bool engineer_scrapper() const; + void set_engineer_scrapper(bool value); private: - bool _internal_revenant_corruption() const; - void _internal_set_revenant_corruption(bool value); + bool _internal_engineer_scrapper() const; + void _internal_set_engineer_scrapper(bool value); public: - // bool revenant_devastation = 15; - void clear_revenant_devastation(); - bool revenant_devastation() const; - void set_revenant_devastation(bool value); + // bool guardian_dragonhunter = 3; + void clear_guardian_dragonhunter(); + bool guardian_dragonhunter() const; + void set_guardian_dragonhunter(bool value); private: - bool _internal_revenant_devastation() const; - void _internal_set_revenant_devastation(bool value); + bool _internal_guardian_dragonhunter() const; + void _internal_set_guardian_dragonhunter(bool value); public: - // bool revenant_invocation = 3; - void clear_revenant_invocation(); - bool revenant_invocation() const; - void set_revenant_invocation(bool value); + // bool mesmer_chronomancer = 4; + void clear_mesmer_chronomancer(); + bool mesmer_chronomancer() const; + void set_mesmer_chronomancer(bool value); private: - bool _internal_revenant_invocation() const; - void _internal_set_revenant_invocation(bool value); + bool _internal_mesmer_chronomancer() const; + void _internal_set_mesmer_chronomancer(bool value); public: - // bool mesmer_dueling = 1; - void clear_mesmer_dueling(); - bool mesmer_dueling() const; - void set_mesmer_dueling(bool value); + // bool necromancer_reaper = 5; + void clear_necromancer_reaper(); + bool necromancer_reaper() const; + void set_necromancer_reaper(bool value); private: - bool _internal_mesmer_dueling() const; - void _internal_set_mesmer_dueling(bool value); + bool _internal_necromancer_reaper() const; + void _internal_set_necromancer_reaper(bool value); public: - // bool mesmer_illusions = 24; - void clear_mesmer_illusions(); - bool mesmer_illusions() const; - void set_mesmer_illusions(bool value); + // bool ranger_druid = 6; + void clear_ranger_druid(); + bool ranger_druid() const; + void set_ranger_druid(bool value); private: - bool _internal_mesmer_illusions() const; - void _internal_set_mesmer_illusions(bool value); + bool _internal_ranger_druid() const; + void _internal_set_ranger_druid(bool value); public: - // bool mesmer_inspiration = 23; - void clear_mesmer_inspiration(); - bool mesmer_inspiration() const; - void set_mesmer_inspiration(bool value); + // bool revenant_herald = 7; + void clear_revenant_herald(); + bool revenant_herald() const; + void set_revenant_herald(bool value); private: - bool _internal_mesmer_inspiration() const; - void _internal_set_mesmer_inspiration(bool value); + bool _internal_revenant_herald() const; + void _internal_set_revenant_herald(bool value); public: - // bool necromancer_blood_magic = 19; - void clear_necromancer_blood_magic(); - bool necromancer_blood_magic() const; - void set_necromancer_blood_magic(bool value); + // bool thief_daredevil = 8; + void clear_thief_daredevil(); + bool thief_daredevil() const; + void set_thief_daredevil(bool value); private: - bool _internal_necromancer_blood_magic() const; - void _internal_set_necromancer_blood_magic(bool value); + bool _internal_thief_daredevil() const; + void _internal_set_thief_daredevil(bool value); public: - // bool warrior_defense = 22; - void clear_warrior_defense(); - bool warrior_defense() const; - void set_warrior_defense(bool value); + // bool warrior_berserker = 9; + void clear_warrior_berserker(); + bool warrior_berserker() const; + void set_warrior_berserker(bool value); private: - bool _internal_warrior_defense() const; - void _internal_set_warrior_defense(bool value); + bool _internal_warrior_berserker() const; + void _internal_set_warrior_berserker(bool value); public: - // bool warrior_discipline = 51; - void clear_warrior_discipline(); - bool warrior_discipline() const; - void set_warrior_discipline(bool value); + // bool elementalist_weaver = 10; + void clear_elementalist_weaver(); + bool elementalist_weaver() const; + void set_elementalist_weaver(bool value); private: - bool _internal_warrior_discipline() const; - void _internal_set_warrior_discipline(bool value); + bool _internal_elementalist_weaver() const; + void _internal_set_elementalist_weaver(bool value); public: - // bool warrior_strength = 4; - void clear_warrior_strength(); - bool warrior_strength() const; - void set_warrior_strength(bool value); + // bool engineer_holosmith = 11; + void clear_engineer_holosmith(); + bool engineer_holosmith() const; + void set_engineer_holosmith(bool value); private: - bool _internal_warrior_strength() const; - void _internal_set_warrior_strength(bool value); + bool _internal_engineer_holosmith() const; + void _internal_set_engineer_holosmith(bool value); public: - // bool warrior_tactics = 11; - void clear_warrior_tactics(); - bool warrior_tactics() const; - void set_warrior_tactics(bool value); + // bool guardian_firebrand = 12; + void clear_guardian_firebrand(); + bool guardian_firebrand() const; + void set_guardian_firebrand(bool value); private: - bool _internal_warrior_tactics() const; - void _internal_set_warrior_tactics(bool value); + bool _internal_guardian_firebrand() const; + void _internal_set_guardian_firebrand(bool value); public: - // bool ranger_beastmastery = 32; - void clear_ranger_beastmastery(); - bool ranger_beastmastery() const; - void set_ranger_beastmastery(bool value); + // bool mesmer_mirage = 13; + void clear_mesmer_mirage(); + bool mesmer_mirage() const; + void set_mesmer_mirage(bool value); private: - bool _internal_ranger_beastmastery() const; - void _internal_set_ranger_beastmastery(bool value); + bool _internal_mesmer_mirage() const; + void _internal_set_mesmer_mirage(bool value); public: - // bool ranger_marksmanship = 8; - void clear_ranger_marksmanship(); - bool ranger_marksmanship() const; - void set_ranger_marksmanship(bool value); + // bool necromancer_scourge = 14; + void clear_necromancer_scourge(); + bool necromancer_scourge() const; + void set_necromancer_scourge(bool value); private: - bool _internal_ranger_marksmanship() const; - void _internal_set_ranger_marksmanship(bool value); + bool _internal_necromancer_scourge() const; + void _internal_set_necromancer_scourge(bool value); public: - // bool ranger_nature_magic = 25; - void clear_ranger_nature_magic(); - bool ranger_nature_magic() const; - void set_ranger_nature_magic(bool value); + // bool ranger_soulbeast = 15; + void clear_ranger_soulbeast(); + bool ranger_soulbeast() const; + void set_ranger_soulbeast(bool value); private: - bool _internal_ranger_nature_magic() const; - void _internal_set_ranger_nature_magic(bool value); + bool _internal_ranger_soulbeast() const; + void _internal_set_ranger_soulbeast(bool value); public: - // bool ranger_skirmishing = 30; - void clear_ranger_skirmishing(); - bool ranger_skirmishing() const; - void set_ranger_skirmishing(bool value); + // bool revenant_renegade = 16; + void clear_revenant_renegade(); + bool revenant_renegade() const; + void set_revenant_renegade(bool value); private: - bool _internal_ranger_skirmishing() const; - void _internal_set_ranger_skirmishing(bool value); + bool _internal_revenant_renegade() const; + void _internal_set_revenant_renegade(bool value); public: - // bool necromancer_reaper = 34; - void clear_necromancer_reaper(); - bool necromancer_reaper() const; - void set_necromancer_reaper(bool value); + // bool thief_deadeye = 17; + void clear_thief_deadeye(); + bool thief_deadeye() const; + void set_thief_deadeye(bool value); private: - bool _internal_necromancer_reaper() const; - void _internal_set_necromancer_reaper(bool value); + bool _internal_thief_deadeye() const; + void _internal_set_thief_deadeye(bool value); public: - // bool ranger_druid = 5; - void clear_ranger_druid(); - bool ranger_druid() const; - void set_ranger_druid(bool value); + // bool warrior_spellbreaker = 18; + void clear_warrior_spellbreaker(); + bool warrior_spellbreaker() const; + void set_warrior_spellbreaker(bool value); private: - bool _internal_ranger_druid() const; - void _internal_set_ranger_druid(bool value); + bool _internal_warrior_spellbreaker() const; + void _internal_set_warrior_spellbreaker(bool value); public: - // bool revenant_herald = 52; - void clear_revenant_herald(); - bool revenant_herald() const; - void set_revenant_herald(bool value); + // bool elmentalist_catalyst = 19; + void clear_elmentalist_catalyst(); + bool elmentalist_catalyst() const; + void set_elmentalist_catalyst(bool value); private: - bool _internal_revenant_herald() const; - void _internal_set_revenant_herald(bool value); + bool _internal_elmentalist_catalyst() const; + void _internal_set_elmentalist_catalyst(bool value); public: - // bool thief_daredevil = 7; - void clear_thief_daredevil(); - bool thief_daredevil() const; - void set_thief_daredevil(bool value); + // bool engineer_mechanist = 20; + void clear_engineer_mechanist(); + bool engineer_mechanist() const; + void set_engineer_mechanist(bool value); private: - bool _internal_thief_daredevil() const; - void _internal_set_thief_daredevil(bool value); + bool _internal_engineer_mechanist() const; + void _internal_set_engineer_mechanist(bool value); public: - // bool engineer_tools = 21; - void clear_engineer_tools(); - bool engineer_tools() const; - void set_engineer_tools(bool value); + // bool guardian_willbender = 21; + void clear_guardian_willbender(); + bool guardian_willbender() const; + void set_guardian_willbender(bool value); private: - bool _internal_engineer_tools() const; - void _internal_set_engineer_tools(bool value); + bool _internal_guardian_willbender() const; + void _internal_set_guardian_willbender(bool value); public: - // bool guardian_honor = 49; - void clear_guardian_honor(); - bool guardian_honor() const; - void set_guardian_honor(bool value); + // bool mesmer_virtuoso = 22; + void clear_mesmer_virtuoso(); + bool mesmer_virtuoso() const; + void set_mesmer_virtuoso(bool value); private: - bool _internal_guardian_honor() const; - void _internal_set_guardian_honor(bool value); + bool _internal_mesmer_virtuoso() const; + void _internal_set_mesmer_virtuoso(bool value); public: - // bool guardian_radiance = 16; - void clear_guardian_radiance(); - bool guardian_radiance() const; - void set_guardian_radiance(bool value); + // bool necromancer_harbinger = 23; + void clear_necromancer_harbinger(); + bool necromancer_harbinger() const; + void set_necromancer_harbinger(bool value); private: - bool _internal_guardian_radiance() const; - void _internal_set_guardian_radiance(bool value); + bool _internal_necromancer_harbinger() const; + void _internal_set_necromancer_harbinger(bool value); public: - // bool guardian_valor = 13; - void clear_guardian_valor(); - bool guardian_valor() const; - void set_guardian_valor(bool value); + // bool ranger_untamed = 24; + void clear_ranger_untamed(); + bool ranger_untamed() const; + void set_ranger_untamed(bool value); private: - bool _internal_guardian_valor() const; - void _internal_set_guardian_valor(bool value); + bool _internal_ranger_untamed() const; + void _internal_set_ranger_untamed(bool value); public: - // bool revenant_retribution = 9; - void clear_revenant_retribution(); - bool revenant_retribution() const; - void set_revenant_retribution(bool value); + // bool revenant_vindicator = 25; + void clear_revenant_vindicator(); + bool revenant_vindicator() const; + void set_revenant_vindicator(bool value); private: - bool _internal_revenant_retribution() const; - void _internal_set_revenant_retribution(bool value); + bool _internal_revenant_vindicator() const; + void _internal_set_revenant_vindicator(bool value); public: - // bool revenant_salvation = 12; - void clear_revenant_salvation(); - bool revenant_salvation() const; - void set_revenant_salvation(bool value); + // bool thief_specter = 26; + void clear_thief_specter(); + bool thief_specter() const; + void set_thief_specter(bool value); private: - bool _internal_revenant_salvation() const; - void _internal_set_revenant_salvation(bool value); + bool _internal_thief_specter() const; + void _internal_set_thief_specter(bool value); public: - // bool thief_acrobatics = 54; - void clear_thief_acrobatics(); - bool thief_acrobatics() const; - void set_thief_acrobatics(bool value); + // bool warrior_bladesworn = 27; + void clear_warrior_bladesworn(); + bool warrior_bladesworn() const; + void set_warrior_bladesworn(bool value); private: - bool _internal_thief_acrobatics() const; - void _internal_set_thief_acrobatics(bool value); + bool _internal_warrior_bladesworn() const; + void _internal_set_warrior_bladesworn(bool value); public: - // bool thief_critical_strikes = 35; - void clear_thief_critical_strikes(); - bool thief_critical_strikes() const; - void set_thief_critical_strikes(bool value); + // bool elementalist_air = 28; + void clear_elementalist_air(); + bool elementalist_air() const; + void set_elementalist_air(bool value); private: - bool _internal_thief_critical_strikes() const; - void _internal_set_thief_critical_strikes(bool value); + bool _internal_elementalist_air() const; + void _internal_set_elementalist_air(bool value); public: - // bool elementalist_arcane = 37; + // bool elementalist_arcane = 29; void clear_elementalist_arcane(); bool elementalist_arcane() const; void set_elementalist_arcane(bool value); @@ -3706,7 +4102,7 @@ class Trail_specialization_filter PROTOBUF_FINAL : void _internal_set_elementalist_arcane(bool value); public: - // bool elementalist_earth = 26; + // bool elementalist_earth = 30; void clear_elementalist_earth(); bool elementalist_earth() const; void set_elementalist_earth(bool value); @@ -3724,7 +4120,7 @@ class Trail_specialization_filter PROTOBUF_FINAL : void _internal_set_elementalist_fire(bool value); public: - // bool elementalist_water = 17; + // bool elementalist_water = 32; void clear_elementalist_water(); bool elementalist_water() const; void set_elementalist_water(bool value); @@ -3733,7 +4129,7 @@ class Trail_specialization_filter PROTOBUF_FINAL : void _internal_set_elementalist_water(bool value); public: - // bool engineer_alchemy = 29; + // bool engineer_alchemy = 33; void clear_engineer_alchemy(); bool engineer_alchemy() const; void set_engineer_alchemy(bool value); @@ -3742,7 +4138,7 @@ class Trail_specialization_filter PROTOBUF_FINAL : void _internal_set_engineer_alchemy(bool value); public: - // bool engineer_explosives = 6; + // bool engineer_explosives = 34; void clear_engineer_explosives(); bool engineer_explosives() const; void set_engineer_explosives(bool value); @@ -3751,7 +4147,7 @@ class Trail_specialization_filter PROTOBUF_FINAL : void _internal_set_engineer_explosives(bool value); public: - // bool engineer_firearms = 38; + // bool engineer_firearms = 35; void clear_engineer_firearms(); bool engineer_firearms() const; void set_engineer_firearms(bool value); @@ -3760,7 +4156,7 @@ class Trail_specialization_filter PROTOBUF_FINAL : void _internal_set_engineer_firearms(bool value); public: - // bool engineer_inventions = 47; + // bool engineer_inventions = 36; void clear_engineer_inventions(); bool engineer_inventions() const; void set_engineer_inventions(bool value); @@ -3769,43 +4165,43 @@ class Trail_specialization_filter PROTOBUF_FINAL : void _internal_set_engineer_inventions(bool value); public: - // bool thief_deadly_arts = 28; - void clear_thief_deadly_arts(); - bool thief_deadly_arts() const; - void set_thief_deadly_arts(bool value); + // bool engineer_tools = 37; + void clear_engineer_tools(); + bool engineer_tools() const; + void set_engineer_tools(bool value); private: - bool _internal_thief_deadly_arts() const; - void _internal_set_thief_deadly_arts(bool value); + bool _internal_engineer_tools() const; + void _internal_set_engineer_tools(bool value); public: - // bool thief_shadow_arts = 20; - void clear_thief_shadow_arts(); - bool thief_shadow_arts() const; - void set_thief_shadow_arts(bool value); + // bool guardian_honor = 38; + void clear_guardian_honor(); + bool guardian_honor() const; + void set_guardian_honor(bool value); private: - bool _internal_thief_shadow_arts() const; - void _internal_set_thief_shadow_arts(bool value); + bool _internal_guardian_honor() const; + void _internal_set_guardian_honor(bool value); public: - // bool thief_trickery = 44; - void clear_thief_trickery(); - bool thief_trickery() const; - void set_thief_trickery(bool value); + // bool guardian_radiance = 39; + void clear_guardian_radiance(); + bool guardian_radiance() const; + void set_guardian_radiance(bool value); private: - bool _internal_thief_trickery() const; - void _internal_set_thief_trickery(bool value); + bool _internal_guardian_radiance() const; + void _internal_set_guardian_radiance(bool value); public: - // bool warrior_arms = 36; - void clear_warrior_arms(); - bool warrior_arms() const; - void set_warrior_arms(bool value); + // bool guardian_valor = 40; + void clear_guardian_valor(); + bool guardian_valor() const; + void set_guardian_valor(bool value); private: - bool _internal_warrior_arms() const; - void _internal_set_warrior_arms(bool value); + bool _internal_guardian_valor() const; + void _internal_set_guardian_valor(bool value); public: - // bool guardian_virtues = 46; + // bool guardian_virtues = 41; void clear_guardian_virtues(); bool guardian_virtues() const; void set_guardian_virtues(bool value); @@ -3823,7 +4219,7 @@ class Trail_specialization_filter PROTOBUF_FINAL : void _internal_set_guardian_zeal(bool value); public: - // bool mesmer_chaos = 45; + // bool mesmer_chaos = 43; void clear_mesmer_chaos(); bool mesmer_chaos() const; void set_mesmer_chaos(bool value); @@ -3832,7 +4228,7 @@ class Trail_specialization_filter PROTOBUF_FINAL : void _internal_set_mesmer_chaos(bool value); public: - // bool mesmer_domination = 10; + // bool mesmer_domination = 44; void clear_mesmer_domination(); bool mesmer_domination() const; void set_mesmer_domination(bool value); @@ -3841,7 +4237,43 @@ class Trail_specialization_filter PROTOBUF_FINAL : void _internal_set_mesmer_domination(bool value); public: - // bool necromancer_curses = 39; + // bool mesmer_dueling = 45; + void clear_mesmer_dueling(); + bool mesmer_dueling() const; + void set_mesmer_dueling(bool value); + private: + bool _internal_mesmer_dueling() const; + void _internal_set_mesmer_dueling(bool value); + public: + + // bool mesmer_illusions = 46; + void clear_mesmer_illusions(); + bool mesmer_illusions() const; + void set_mesmer_illusions(bool value); + private: + bool _internal_mesmer_illusions() const; + void _internal_set_mesmer_illusions(bool value); + public: + + // bool mesmer_inspiration = 47; + void clear_mesmer_inspiration(); + bool mesmer_inspiration() const; + void set_mesmer_inspiration(bool value); + private: + bool _internal_mesmer_inspiration() const; + void _internal_set_mesmer_inspiration(bool value); + public: + + // bool necromancer_blood_magic = 48; + void clear_necromancer_blood_magic(); + bool necromancer_blood_magic() const; + void set_necromancer_blood_magic(bool value); + private: + bool _internal_necromancer_blood_magic() const; + void _internal_set_necromancer_blood_magic(bool value); + public: + + // bool necromancer_curses = 49; void clear_necromancer_curses(); bool necromancer_curses() const; void set_necromancer_curses(bool value); @@ -3850,7 +4282,7 @@ class Trail_specialization_filter PROTOBUF_FINAL : void _internal_set_necromancer_curses(bool value); public: - // bool necromancer_death_magic = 2; + // bool necromancer_death_magic = 50; void clear_necromancer_death_magic(); bool necromancer_death_magic() const; void set_necromancer_death_magic(bool value); @@ -3859,7 +4291,7 @@ class Trail_specialization_filter PROTOBUF_FINAL : void _internal_set_necromancer_death_magic(bool value); public: - // bool necromancer_soul_reaping = 50; + // bool necromancer_soul_reaping = 51; void clear_necromancer_soul_reaping(); bool necromancer_soul_reaping() const; void set_necromancer_soul_reaping(bool value); @@ -3868,7 +4300,7 @@ class Trail_specialization_filter PROTOBUF_FINAL : void _internal_set_necromancer_soul_reaping(bool value); public: - // bool necromancer_spite = 53; + // bool necromancer_spite = 52; void clear_necromancer_spite(); bool necromancer_spite() const; void set_necromancer_spite(bool value); @@ -3877,281 +4309,201 @@ class Trail_specialization_filter PROTOBUF_FINAL : void _internal_set_necromancer_spite(bool value); public: - // bool elementalist_tempest = 48; - void clear_elementalist_tempest(); - bool elementalist_tempest() const; - void set_elementalist_tempest(bool value); + // bool ranger_beastmastery = 53; + void clear_ranger_beastmastery(); + bool ranger_beastmastery() const; + void set_ranger_beastmastery(bool value); private: - bool _internal_elementalist_tempest() const; - void _internal_set_elementalist_tempest(bool value); + bool _internal_ranger_beastmastery() const; + void _internal_set_ranger_beastmastery(bool value); public: - // bool engineer_scrapper = 43; - void clear_engineer_scrapper(); - bool engineer_scrapper() const; - void set_engineer_scrapper(bool value); + // bool ranger_marksmanship = 54; + void clear_ranger_marksmanship(); + bool ranger_marksmanship() const; + void set_ranger_marksmanship(bool value); private: - bool _internal_engineer_scrapper() const; - void _internal_set_engineer_scrapper(bool value); + bool _internal_ranger_marksmanship() const; + void _internal_set_ranger_marksmanship(bool value); public: - // bool guardian_dragonhunter = 27; - void clear_guardian_dragonhunter(); - bool guardian_dragonhunter() const; - void set_guardian_dragonhunter(bool value); + // bool ranger_nature_magic = 55; + void clear_ranger_nature_magic(); + bool ranger_nature_magic() const; + void set_ranger_nature_magic(bool value); private: - bool _internal_guardian_dragonhunter() const; - void _internal_set_guardian_dragonhunter(bool value); + bool _internal_ranger_nature_magic() const; + void _internal_set_ranger_nature_magic(bool value); public: - // bool mesmer_chronomancer = 40; - void clear_mesmer_chronomancer(); - bool mesmer_chronomancer() const; - void set_mesmer_chronomancer(bool value); + // bool ranger_skirmishing = 56; + void clear_ranger_skirmishing(); + bool ranger_skirmishing() const; + void set_ranger_skirmishing(bool value); private: - bool _internal_mesmer_chronomancer() const; - void _internal_set_mesmer_chronomancer(bool value); + bool _internal_ranger_skirmishing() const; + void _internal_set_ranger_skirmishing(bool value); public: - // bool warrior_berserker = 18; - void clear_warrior_berserker(); - bool warrior_berserker() const; - void set_warrior_berserker(bool value); + // bool ranger_wilderness_survival = 57; + void clear_ranger_wilderness_survival(); + bool ranger_wilderness_survival() const; + void set_ranger_wilderness_survival(bool value); private: - bool _internal_warrior_berserker() const; - void _internal_set_warrior_berserker(bool value); + bool _internal_ranger_wilderness_survival() const; + void _internal_set_ranger_wilderness_survival(bool value); public: - // bool elementalist_weaver = 56; - void clear_elementalist_weaver(); - bool elementalist_weaver() const; - void set_elementalist_weaver(bool value); + // bool revenant_corruption = 58; + void clear_revenant_corruption(); + bool revenant_corruption() const; + void set_revenant_corruption(bool value); private: - bool _internal_elementalist_weaver() const; - void _internal_set_elementalist_weaver(bool value); + bool _internal_revenant_corruption() const; + void _internal_set_revenant_corruption(bool value); public: - // bool engineer_holosmith = 57; - void clear_engineer_holosmith(); - bool engineer_holosmith() const; - void set_engineer_holosmith(bool value); + // bool revenant_devastation = 59; + void clear_revenant_devastation(); + bool revenant_devastation() const; + void set_revenant_devastation(bool value); private: - bool _internal_engineer_holosmith() const; - void _internal_set_engineer_holosmith(bool value); + bool _internal_revenant_devastation() const; + void _internal_set_revenant_devastation(bool value); public: - // bool guardian_firebrand = 62; - void clear_guardian_firebrand(); - bool guardian_firebrand() const; - void set_guardian_firebrand(bool value); + // bool revenant_invocation = 60; + void clear_revenant_invocation(); + bool revenant_invocation() const; + void set_revenant_invocation(bool value); private: - bool _internal_guardian_firebrand() const; - void _internal_set_guardian_firebrand(bool value); + bool _internal_revenant_invocation() const; + void _internal_set_revenant_invocation(bool value); public: - // bool mesmer_mirage = 59; - void clear_mesmer_mirage(); - bool mesmer_mirage() const; - void set_mesmer_mirage(bool value); + // bool revenant_retribution = 61; + void clear_revenant_retribution(); + bool revenant_retribution() const; + void set_revenant_retribution(bool value); private: - bool _internal_mesmer_mirage() const; - void _internal_set_mesmer_mirage(bool value); + bool _internal_revenant_retribution() const; + void _internal_set_revenant_retribution(bool value); public: - // bool necromancer_scourge = 60; - void clear_necromancer_scourge(); - bool necromancer_scourge() const; - void set_necromancer_scourge(bool value); + // bool revenant_salvation = 62; + void clear_revenant_salvation(); + bool revenant_salvation() const; + void set_revenant_salvation(bool value); private: - bool _internal_necromancer_scourge() const; - void _internal_set_necromancer_scourge(bool value); + bool _internal_revenant_salvation() const; + void _internal_set_revenant_salvation(bool value); public: - // bool ranger_soulbeast = 55; - void clear_ranger_soulbeast(); - bool ranger_soulbeast() const; - void set_ranger_soulbeast(bool value); + // bool thief_acrobatics = 63; + void clear_thief_acrobatics(); + bool thief_acrobatics() const; + void set_thief_acrobatics(bool value); private: - bool _internal_ranger_soulbeast() const; - void _internal_set_ranger_soulbeast(bool value); + bool _internal_thief_acrobatics() const; + void _internal_set_thief_acrobatics(bool value); public: - // bool revenant_renegade = 63; - void clear_revenant_renegade(); - bool revenant_renegade() const; - void set_revenant_renegade(bool value); + // bool thief_critical_strikes = 64; + void clear_thief_critical_strikes(); + bool thief_critical_strikes() const; + void set_thief_critical_strikes(bool value); private: - bool _internal_revenant_renegade() const; - void _internal_set_revenant_renegade(bool value); + bool _internal_thief_critical_strikes() const; + void _internal_set_thief_critical_strikes(bool value); public: - // bool revenant_vindicator = 69; - void clear_revenant_vindicator(); - bool revenant_vindicator() const; - void set_revenant_vindicator(bool value); + // bool thief_deadly_arts = 65; + void clear_thief_deadly_arts(); + bool thief_deadly_arts() const; + void set_thief_deadly_arts(bool value); private: - bool _internal_revenant_vindicator() const; - void _internal_set_revenant_vindicator(bool value); + bool _internal_thief_deadly_arts() const; + void _internal_set_thief_deadly_arts(bool value); public: - // bool thief_specter = 71; - void clear_thief_specter(); - bool thief_specter() const; - void set_thief_specter(bool value); + // bool thief_shadow_arts = 66; + void clear_thief_shadow_arts(); + bool thief_shadow_arts() const; + void set_thief_shadow_arts(bool value); private: - bool _internal_thief_specter() const; - void _internal_set_thief_specter(bool value); + bool _internal_thief_shadow_arts() const; + void _internal_set_thief_shadow_arts(bool value); public: - // bool warrior_bladesworn = 68; - void clear_warrior_bladesworn(); - bool warrior_bladesworn() const; - void set_warrior_bladesworn(bool value); + // bool thief_trickery = 67; + void clear_thief_trickery(); + bool thief_trickery() const; + void set_thief_trickery(bool value); private: - bool _internal_warrior_bladesworn() const; - void _internal_set_warrior_bladesworn(bool value); + bool _internal_thief_trickery() const; + void _internal_set_thief_trickery(bool value); public: - // bool elementalist_air = 41; - void clear_elementalist_air(); - bool elementalist_air() const; - void set_elementalist_air(bool value); + // bool warrior_arms = 68; + void clear_warrior_arms(); + bool warrior_arms() const; + void set_warrior_arms(bool value); private: - bool _internal_elementalist_air() const; - void _internal_set_elementalist_air(bool value); + bool _internal_warrior_arms() const; + void _internal_set_warrior_arms(bool value); public: - // bool thief_deadeye = 58; - void clear_thief_deadeye(); - bool thief_deadeye() const; - void set_thief_deadeye(bool value); + // bool warrior_defense = 69; + void clear_warrior_defense(); + bool warrior_defense() const; + void set_warrior_defense(bool value); private: - bool _internal_thief_deadeye() const; - void _internal_set_thief_deadeye(bool value); + bool _internal_warrior_defense() const; + void _internal_set_warrior_defense(bool value); public: - // bool warrior_spellbreaker = 61; - void clear_warrior_spellbreaker(); - bool warrior_spellbreaker() const; - void set_warrior_spellbreaker(bool value); + // bool warrior_discipline = 70; + void clear_warrior_discipline(); + bool warrior_discipline() const; + void set_warrior_discipline(bool value); private: - bool _internal_warrior_spellbreaker() const; - void _internal_set_warrior_spellbreaker(bool value); + bool _internal_warrior_discipline() const; + void _internal_set_warrior_discipline(bool value); public: - // bool elmentalist_catalyst = 67; - void clear_elmentalist_catalyst(); - bool elmentalist_catalyst() const; - void set_elmentalist_catalyst(bool value); + // bool warrior_strength = 71; + void clear_warrior_strength(); + bool warrior_strength() const; + void set_warrior_strength(bool value); private: - bool _internal_elmentalist_catalyst() const; - void _internal_set_elmentalist_catalyst(bool value); + bool _internal_warrior_strength() const; + void _internal_set_warrior_strength(bool value); public: - // bool engineer_mechanist = 70; - void clear_engineer_mechanist(); - bool engineer_mechanist() const; - void set_engineer_mechanist(bool value); + // bool warrior_tactics = 72; + void clear_warrior_tactics(); + bool warrior_tactics() const; + void set_warrior_tactics(bool value); private: - bool _internal_engineer_mechanist() const; - void _internal_set_engineer_mechanist(bool value); + bool _internal_warrior_tactics() const; + void _internal_set_warrior_tactics(bool value); public: - // bool guardian_willbender = 65; - void clear_guardian_willbender(); - bool guardian_willbender() const; - void set_guardian_willbender(bool value); - private: - bool _internal_guardian_willbender() const; - void _internal_set_guardian_willbender(bool value); - public: - - // bool mesmer_virtuoso = 66; - void clear_mesmer_virtuoso(); - bool mesmer_virtuoso() const; - void set_mesmer_virtuoso(bool value); - private: - bool _internal_mesmer_virtuoso() const; - void _internal_set_mesmer_virtuoso(bool value); - public: - - // bool necromancer_harbinger = 64; - void clear_necromancer_harbinger(); - bool necromancer_harbinger() const; - void set_necromancer_harbinger(bool value); - private: - bool _internal_necromancer_harbinger() const; - void _internal_set_necromancer_harbinger(bool value); - public: - - // bool ranger_untamed = 72; - void clear_ranger_untamed(); - bool ranger_untamed() const; - void set_ranger_untamed(bool value); - private: - bool _internal_ranger_untamed() const; - void _internal_set_ranger_untamed(bool value); - public: - - // @@protoc_insertion_point(class_scope:Proto_Node.Trail.specialization_filter) - private: - class _Internal; + // @@protoc_insertion_point(class_scope:SpecializationFilter) + private: + class _Internal; template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - bool ranger_wilderness_survival_; - bool revenant_corruption_; - bool revenant_devastation_; - bool revenant_invocation_; - bool mesmer_dueling_; - bool mesmer_illusions_; - bool mesmer_inspiration_; - bool necromancer_blood_magic_; - bool warrior_defense_; - bool warrior_discipline_; - bool warrior_strength_; - bool warrior_tactics_; - bool ranger_beastmastery_; - bool ranger_marksmanship_; - bool ranger_nature_magic_; - bool ranger_skirmishing_; - bool necromancer_reaper_; - bool ranger_druid_; - bool revenant_herald_; - bool thief_daredevil_; - bool engineer_tools_; - bool guardian_honor_; - bool guardian_radiance_; - bool guardian_valor_; - bool revenant_retribution_; - bool revenant_salvation_; - bool thief_acrobatics_; - bool thief_critical_strikes_; - bool elementalist_arcane_; - bool elementalist_earth_; - bool elementalist_fire_; - bool elementalist_water_; - bool engineer_alchemy_; - bool engineer_explosives_; - bool engineer_firearms_; - bool engineer_inventions_; - bool thief_deadly_arts_; - bool thief_shadow_arts_; - bool thief_trickery_; - bool warrior_arms_; - bool guardian_virtues_; - bool guardian_zeal_; - bool mesmer_chaos_; - bool mesmer_domination_; - bool necromancer_curses_; - bool necromancer_death_magic_; - bool necromancer_soul_reaping_; - bool necromancer_spite_; bool elementalist_tempest_; bool engineer_scrapper_; bool guardian_dragonhunter_; bool mesmer_chronomancer_; + bool necromancer_reaper_; + bool ranger_druid_; + bool revenant_herald_; + bool thief_daredevil_; bool warrior_berserker_; bool elementalist_weaver_; bool engineer_holosmith_; @@ -4160,10 +4512,6 @@ class Trail_specialization_filter PROTOBUF_FINAL : bool necromancer_scourge_; bool ranger_soulbeast_; bool revenant_renegade_; - bool revenant_vindicator_; - bool thief_specter_; - bool warrior_bladesworn_; - bool elementalist_air_; bool thief_deadeye_; bool warrior_spellbreaker_; bool elmentalist_catalyst_; @@ -4172,28 +4520,76 @@ class Trail_specialization_filter PROTOBUF_FINAL : bool mesmer_virtuoso_; bool necromancer_harbinger_; bool ranger_untamed_; + bool revenant_vindicator_; + bool thief_specter_; + bool warrior_bladesworn_; + bool elementalist_air_; + bool elementalist_arcane_; + bool elementalist_earth_; + bool elementalist_fire_; + bool elementalist_water_; + bool engineer_alchemy_; + bool engineer_explosives_; + bool engineer_firearms_; + bool engineer_inventions_; + bool engineer_tools_; + bool guardian_honor_; + bool guardian_radiance_; + bool guardian_valor_; + bool guardian_virtues_; + bool guardian_zeal_; + bool mesmer_chaos_; + bool mesmer_domination_; + bool mesmer_dueling_; + bool mesmer_illusions_; + bool mesmer_inspiration_; + bool necromancer_blood_magic_; + bool necromancer_curses_; + bool necromancer_death_magic_; + bool necromancer_soul_reaping_; + bool necromancer_spite_; + bool ranger_beastmastery_; + bool ranger_marksmanship_; + bool ranger_nature_magic_; + bool ranger_skirmishing_; + bool ranger_wilderness_survival_; + bool revenant_corruption_; + bool revenant_devastation_; + bool revenant_invocation_; + bool revenant_retribution_; + bool revenant_salvation_; + bool thief_acrobatics_; + bool thief_critical_strikes_; + bool thief_deadly_arts_; + bool thief_shadow_arts_; + bool thief_trickery_; + bool warrior_arms_; + bool warrior_defense_; + bool warrior_discipline_; + bool warrior_strength_; + bool warrior_tactics_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_node_2eproto; + friend struct ::TableStruct_generators_2fproto_5ftemplates_2fnode_2eproto; }; // ------------------------------------------------------------------- -class Trail_species_filter PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Proto_Node.Trail.species_filter) */ { +class SpeciesFilter PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:SpeciesFilter) */ { public: - inline Trail_species_filter() : Trail_species_filter(nullptr) {}; - virtual ~Trail_species_filter(); + inline SpeciesFilter() : SpeciesFilter(nullptr) {}; + virtual ~SpeciesFilter(); - Trail_species_filter(const Trail_species_filter& from); - Trail_species_filter(Trail_species_filter&& from) noexcept - : Trail_species_filter() { + SpeciesFilter(const SpeciesFilter& from); + SpeciesFilter(SpeciesFilter&& from) noexcept + : SpeciesFilter() { *this = ::std::move(from); } - inline Trail_species_filter& operator=(const Trail_species_filter& from) { + inline SpeciesFilter& operator=(const SpeciesFilter& from) { CopyFrom(from); return *this; } - inline Trail_species_filter& operator=(Trail_species_filter&& from) noexcept { + inline SpeciesFilter& operator=(SpeciesFilter&& from) noexcept { if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { @@ -4211,20 +4607,20 @@ class Trail_species_filter PROTOBUF_FINAL : static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { return GetMetadataStatic().reflection; } - static const Trail_species_filter& default_instance(); + static const SpeciesFilter& default_instance(); static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const Trail_species_filter* internal_default_instance() { - return reinterpret_cast( - &_Trail_species_filter_default_instance_); + static inline const SpeciesFilter* internal_default_instance() { + return reinterpret_cast( + &_SpeciesFilter_default_instance_); } static constexpr int kIndexInFileMessages = 15; - friend void swap(Trail_species_filter& a, Trail_species_filter& b) { + friend void swap(SpeciesFilter& a, SpeciesFilter& b) { a.Swap(&b); } - inline void Swap(Trail_species_filter* other) { + inline void Swap(SpeciesFilter* other) { if (other == this) return; if (GetArena() == other->GetArena()) { InternalSwap(other); @@ -4232,7 +4628,7 @@ class Trail_species_filter PROTOBUF_FINAL : ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(Trail_species_filter* other) { + void UnsafeArenaSwap(SpeciesFilter* other) { if (other == this) return; GOOGLE_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); @@ -4240,17 +4636,17 @@ class Trail_species_filter PROTOBUF_FINAL : // implements Message ---------------------------------------------- - inline Trail_species_filter* New() const final { - return CreateMaybeMessage(nullptr); + inline SpeciesFilter* New() const final { + return CreateMaybeMessage(nullptr); } - Trail_species_filter* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); + SpeciesFilter* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); } void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const Trail_species_filter& from); - void MergeFrom(const Trail_species_filter& from); + void CopyFrom(const SpeciesFilter& from); + void MergeFrom(const SpeciesFilter& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; @@ -4264,13 +4660,13 @@ class Trail_species_filter PROTOBUF_FINAL : inline void SharedCtor(); inline void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(Trail_species_filter* other); + void InternalSwap(SpeciesFilter* other); friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Proto_Node.Trail.species_filter"; + return "SpeciesFilter"; } protected: - explicit Trail_species_filter(::PROTOBUF_NAMESPACE_ID::Arena* arena); + explicit SpeciesFilter(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); @@ -4279,8 +4675,8 @@ class Trail_species_filter PROTOBUF_FINAL : ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; private: static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); - return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto); + return ::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto.file_level_metadata[kIndexInFileMessages]; } public: @@ -4341,7 +4737,7 @@ class Trail_species_filter PROTOBUF_FINAL : void _internal_set_sylvari(bool value); public: - // @@protoc_insertion_point(class_scope:Proto_Node.Trail.species_filter) + // @@protoc_insertion_point(class_scope:SpeciesFilter) private: class _Internal; @@ -4354,27 +4750,27 @@ class Trail_species_filter PROTOBUF_FINAL : bool norn_; bool sylvari_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_node_2eproto; + friend struct ::TableStruct_generators_2fproto_5ftemplates_2fnode_2eproto; }; // ------------------------------------------------------------------- -class Trail_texture PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Proto_Node.Trail.texture) */ { +class TrailData PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:TrailData) */ { public: - inline Trail_texture() : Trail_texture(nullptr) {}; - virtual ~Trail_texture(); + inline TrailData() : TrailData(nullptr) {}; + virtual ~TrailData(); - Trail_texture(const Trail_texture& from); - Trail_texture(Trail_texture&& from) noexcept - : Trail_texture() { + TrailData(const TrailData& from); + TrailData(TrailData&& from) noexcept + : TrailData() { *this = ::std::move(from); } - inline Trail_texture& operator=(const Trail_texture& from) { + inline TrailData& operator=(const TrailData& from) { CopyFrom(from); return *this; } - inline Trail_texture& operator=(Trail_texture&& from) noexcept { + inline TrailData& operator=(TrailData&& from) noexcept { if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { @@ -4392,193 +4788,20 @@ class Trail_texture PROTOBUF_FINAL : static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { return GetMetadataStatic().reflection; } - static const Trail_texture& default_instance(); + static const TrailData& default_instance(); static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const Trail_texture* internal_default_instance() { - return reinterpret_cast( - &_Trail_texture_default_instance_); + static inline const TrailData* internal_default_instance() { + return reinterpret_cast( + &_TrailData_default_instance_); } static constexpr int kIndexInFileMessages = 16; - friend void swap(Trail_texture& a, Trail_texture& b) { - a.Swap(&b); - } - inline void Swap(Trail_texture* other) { - if (other == this) return; - if (GetArena() == other->GetArena()) { - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(Trail_texture* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline Trail_texture* New() const final { - return CreateMaybeMessage(nullptr); - } - - Trail_texture* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const Trail_texture& from); - void MergeFrom(const Trail_texture& from); - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - inline void SharedCtor(); - inline void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(Trail_texture* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Proto_Node.Trail.texture"; - } - protected: - explicit Trail_texture(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - public: - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - private: - static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); - return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; - } - - public: - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kPathFieldNumber = 1, - kOriginalTokenFieldNumber = 2, - }; - // string path = 1; - void clear_path(); - const std::string& path() const; - void set_path(const std::string& value); - void set_path(std::string&& value); - void set_path(const char* value); - void set_path(const char* value, size_t size); - std::string* mutable_path(); - std::string* release_path(); - void set_allocated_path(std::string* path); - GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" - " string fields are deprecated and will be removed in a" - " future release.") - std::string* unsafe_arena_release_path(); - GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" - " string fields are deprecated and will be removed in a" - " future release.") - void unsafe_arena_set_allocated_path( - std::string* path); - private: - const std::string& _internal_path() const; - void _internal_set_path(const std::string& value); - std::string* _internal_mutable_path(); - public: - - // .google.protobuf.Any original_token = 2; - bool has_original_token() const; - private: - bool _internal_has_original_token() const; - public: - void clear_original_token(); - const PROTOBUF_NAMESPACE_ID::Any& original_token() const; - PROTOBUF_NAMESPACE_ID::Any* release_original_token(); - PROTOBUF_NAMESPACE_ID::Any* mutable_original_token(); - void set_allocated_original_token(PROTOBUF_NAMESPACE_ID::Any* original_token); - private: - const PROTOBUF_NAMESPACE_ID::Any& _internal_original_token() const; - PROTOBUF_NAMESPACE_ID::Any* _internal_mutable_original_token(); - public: - void unsafe_arena_set_allocated_original_token( - PROTOBUF_NAMESPACE_ID::Any* original_token); - PROTOBUF_NAMESPACE_ID::Any* unsafe_arena_release_original_token(); - - // @@protoc_insertion_point(class_scope:Proto_Node.Trail.texture) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr path_; - PROTOBUF_NAMESPACE_ID::Any* original_token_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_node_2eproto; -}; -// ------------------------------------------------------------------- - -class Trail_trail_data PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Proto_Node.Trail.trail_data) */ { - public: - inline Trail_trail_data() : Trail_trail_data(nullptr) {}; - virtual ~Trail_trail_data(); - - Trail_trail_data(const Trail_trail_data& from); - Trail_trail_data(Trail_trail_data&& from) noexcept - : Trail_trail_data() { - *this = ::std::move(from); - } - - inline Trail_trail_data& operator=(const Trail_trail_data& from) { - CopyFrom(from); - return *this; - } - inline Trail_trail_data& operator=(Trail_trail_data&& from) noexcept { - if (GetArena() == from.GetArena()) { - if (this != &from) InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return GetMetadataStatic().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return GetMetadataStatic().reflection; - } - static const Trail_trail_data& default_instance(); - - static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const Trail_trail_data* internal_default_instance() { - return reinterpret_cast( - &_Trail_trail_data_default_instance_); - } - static constexpr int kIndexInFileMessages = - 17; - - friend void swap(Trail_trail_data& a, Trail_trail_data& b) { + friend void swap(TrailData& a, TrailData& b) { a.Swap(&b); } - inline void Swap(Trail_trail_data* other) { + inline void Swap(TrailData* other) { if (other == this) return; if (GetArena() == other->GetArena()) { InternalSwap(other); @@ -4586,7 +4809,7 @@ class Trail_trail_data PROTOBUF_FINAL : ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(Trail_trail_data* other) { + void UnsafeArenaSwap(TrailData* other) { if (other == this) return; GOOGLE_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); @@ -4594,17 +4817,17 @@ class Trail_trail_data PROTOBUF_FINAL : // implements Message ---------------------------------------------- - inline Trail_trail_data* New() const final { - return CreateMaybeMessage(nullptr); + inline TrailData* New() const final { + return CreateMaybeMessage(nullptr); } - Trail_trail_data* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); + TrailData* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); } void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const Trail_trail_data& from); - void MergeFrom(const Trail_trail_data& from); + void CopyFrom(const TrailData& from); + void MergeFrom(const TrailData& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; @@ -4618,13 +4841,13 @@ class Trail_trail_data PROTOBUF_FINAL : inline void SharedCtor(); inline void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(Trail_trail_data* other); + void InternalSwap(TrailData* other); friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Proto_Node.Trail.trail_data"; + return "TrailData"; } protected: - explicit Trail_trail_data(::PROTOBUF_NAMESPACE_ID::Arena* arena); + explicit TrailData(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); @@ -4633,8 +4856,8 @@ class Trail_trail_data PROTOBUF_FINAL : ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; private: static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); - return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto); + return ::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto.file_level_metadata[kIndexInFileMessages]; } public: @@ -4671,7 +4894,7 @@ class Trail_trail_data PROTOBUF_FINAL : std::string* _internal_mutable_trail_data(); public: - // @@protoc_insertion_point(class_scope:Proto_Node.Trail.trail_data) + // @@protoc_insertion_point(class_scope:TrailData) private: class _Internal; @@ -4680,346 +4903,9 @@ class Trail_trail_data PROTOBUF_FINAL : typedef void DestructorSkippable_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr trail_data_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_node_2eproto; + friend struct ::TableStruct_generators_2fproto_5ftemplates_2fnode_2eproto; }; -// ------------------------------------------------------------------- - -class Trail PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Proto_Node.Trail) */ { - public: - inline Trail() : Trail(nullptr) {}; - virtual ~Trail(); - - Trail(const Trail& from); - Trail(Trail&& from) noexcept - : Trail() { - *this = ::std::move(from); - } - - inline Trail& operator=(const Trail& from) { - CopyFrom(from); - return *this; - } - inline Trail& operator=(Trail&& from) noexcept { - if (GetArena() == from.GetArena()) { - if (this != &from) InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return GetMetadataStatic().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return GetMetadataStatic().reflection; - } - static const Trail& default_instance(); - - static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const Trail* internal_default_instance() { - return reinterpret_cast( - &_Trail_default_instance_); - } - static constexpr int kIndexInFileMessages = - 18; - - friend void swap(Trail& a, Trail& b) { - a.Swap(&b); - } - inline void Swap(Trail* other) { - if (other == this) return; - if (GetArena() == other->GetArena()) { - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(Trail* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline Trail* New() const final { - return CreateMaybeMessage(nullptr); - } - - Trail* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const Trail& from); - void MergeFrom(const Trail& from); - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - inline void SharedCtor(); - inline void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(Trail* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Proto_Node.Trail"; - } - protected: - explicit Trail(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - public: - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - private: - static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_node_2eproto); - return ::descriptor_table_node_2eproto.file_level_metadata[kIndexInFileMessages]; - } - - public: - - // nested types ---------------------------------------------------- - - typedef Trail_color color; - typedef Trail_festival_filter festival_filter; - typedef Trail_guid guid; - typedef Trail_map_type_filter map_type_filter; - typedef Trail_mount_filter mount_filter; - typedef Trail_profession_filter profession_filter; - typedef Trail_specialization_filter specialization_filter; - typedef Trail_species_filter species_filter; - typedef Trail_texture texture; - typedef Trail_trail_data trail_data; - - typedef Trail_cull_chirality cull_chirality; - static constexpr cull_chirality none = - Trail_cull_chirality_none; - static constexpr cull_chirality clockwise = - Trail_cull_chirality_clockwise; - static constexpr cull_chirality counter_clockwise = - Trail_cull_chirality_counter_clockwise; - static inline bool cull_chirality_IsValid(int value) { - return Trail_cull_chirality_IsValid(value); - } - static constexpr cull_chirality cull_chirality_MIN = - Trail_cull_chirality_cull_chirality_MIN; - static constexpr cull_chirality cull_chirality_MAX = - Trail_cull_chirality_cull_chirality_MAX; - static constexpr int cull_chirality_ARRAYSIZE = - Trail_cull_chirality_cull_chirality_ARRAYSIZE; - static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* - cull_chirality_descriptor() { - return Trail_cull_chirality_descriptor(); - } - template - static inline const std::string& cull_chirality_Name(T enum_t_value) { - static_assert(::std::is_same::value || - ::std::is_integral::value, - "Incorrect type passed to function cull_chirality_Name."); - return Trail_cull_chirality_Name(enum_t_value); - } - static inline bool cull_chirality_Parse(const std::string& name, - cull_chirality* value) { - return Trail_cull_chirality_Parse(name, value); - } - - // accessors ------------------------------------------------------- - - enum : int { - kBhdraftScheduleFieldNumber = 9, - kCategoryFieldNumber = 12, - kAchievementBitFieldNumber = 1, - kAchievementIdFieldNumber = 2, - kAlphaFieldNumber = 3, - kAnimationSpeedFieldNumber = 4, - kDistanceFadeEndFieldNumber = 6, - kCanFadeFieldNumber = 5, - kIsWallFieldNumber = 8, - kDistanceFadeStartFieldNumber = 7, - kBhdraftScheduleDurationFieldNumber = 10, - kScaleFieldNumber = 11, - kMapIdFieldNumber = 13, - }; - // string bhdraft__schedule = 9; - void clear_bhdraft__schedule(); - const std::string& bhdraft__schedule() const; - void set_bhdraft__schedule(const std::string& value); - void set_bhdraft__schedule(std::string&& value); - void set_bhdraft__schedule(const char* value); - void set_bhdraft__schedule(const char* value, size_t size); - std::string* mutable_bhdraft__schedule(); - std::string* release_bhdraft__schedule(); - void set_allocated_bhdraft__schedule(std::string* bhdraft__schedule); - GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" - " string fields are deprecated and will be removed in a" - " future release.") - std::string* unsafe_arena_release_bhdraft__schedule(); - GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" - " string fields are deprecated and will be removed in a" - " future release.") - void unsafe_arena_set_allocated_bhdraft__schedule( - std::string* bhdraft__schedule); - private: - const std::string& _internal_bhdraft__schedule() const; - void _internal_set_bhdraft__schedule(const std::string& value); - std::string* _internal_mutable_bhdraft__schedule(); - public: - - // .Proto_Node.Category category = 12; - bool has_category() const; - private: - bool _internal_has_category() const; - public: - void clear_category(); - const ::Proto_Node::Category& category() const; - ::Proto_Node::Category* release_category(); - ::Proto_Node::Category* mutable_category(); - void set_allocated_category(::Proto_Node::Category* category); - private: - const ::Proto_Node::Category& _internal_category() const; - ::Proto_Node::Category* _internal_mutable_category(); - public: - void unsafe_arena_set_allocated_category( - ::Proto_Node::Category* category); - ::Proto_Node::Category* unsafe_arena_release_category(); - - // fixed32 achievement_bit = 1; - void clear_achievement_bit(); - ::PROTOBUF_NAMESPACE_ID::uint32 achievement_bit() const; - void set_achievement_bit(::PROTOBUF_NAMESPACE_ID::uint32 value); - private: - ::PROTOBUF_NAMESPACE_ID::uint32 _internal_achievement_bit() const; - void _internal_set_achievement_bit(::PROTOBUF_NAMESPACE_ID::uint32 value); - public: - - // int32 achievement_id = 2; - void clear_achievement_id(); - ::PROTOBUF_NAMESPACE_ID::int32 achievement_id() const; - void set_achievement_id(::PROTOBUF_NAMESPACE_ID::int32 value); - private: - ::PROTOBUF_NAMESPACE_ID::int32 _internal_achievement_id() const; - void _internal_set_achievement_id(::PROTOBUF_NAMESPACE_ID::int32 value); - public: - - // float alpha = 3; - void clear_alpha(); - float alpha() const; - void set_alpha(float value); - private: - float _internal_alpha() const; - void _internal_set_alpha(float value); - public: - - // float animation_speed = 4; - void clear_animation_speed(); - float animation_speed() const; - void set_animation_speed(float value); - private: - float _internal_animation_speed() const; - void _internal_set_animation_speed(float value); - public: - - // float distance_fade_end = 6; - void clear_distance_fade_end(); - float distance_fade_end() const; - void set_distance_fade_end(float value); - private: - float _internal_distance_fade_end() const; - void _internal_set_distance_fade_end(float value); - public: - - // bool can_fade = 5; - void clear_can_fade(); - bool can_fade() const; - void set_can_fade(bool value); - private: - bool _internal_can_fade() const; - void _internal_set_can_fade(bool value); - public: - - // bool is_wall = 8; - void clear_is_wall(); - bool is_wall() const; - void set_is_wall(bool value); - private: - bool _internal_is_wall() const; - void _internal_set_is_wall(bool value); - public: - - // float distance_fade_start = 7; - void clear_distance_fade_start(); - float distance_fade_start() const; - void set_distance_fade_start(float value); - private: - float _internal_distance_fade_start() const; - void _internal_set_distance_fade_start(float value); - public: - - // float bhdraft__schedule_duration = 10; - void clear_bhdraft__schedule_duration(); - float bhdraft__schedule_duration() const; - void set_bhdraft__schedule_duration(float value); - private: - float _internal_bhdraft__schedule_duration() const; - void _internal_set_bhdraft__schedule_duration(float value); - public: - - // float scale = 11; - void clear_scale(); - float scale() const; - void set_scale(float value); - private: - float _internal_scale() const; - void _internal_set_scale(float value); - public: - - // int32 map_id = 13; - void clear_map_id(); - ::PROTOBUF_NAMESPACE_ID::int32 map_id() const; - void set_map_id(::PROTOBUF_NAMESPACE_ID::int32 value); - private: - ::PROTOBUF_NAMESPACE_ID::int32 _internal_map_id() const; - void _internal_set_map_id(::PROTOBUF_NAMESPACE_ID::int32 value); - public: - - // @@protoc_insertion_point(class_scope:Proto_Node.Trail) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr bhdraft__schedule_; - ::Proto_Node::Category* category_; - ::PROTOBUF_NAMESPACE_ID::uint32 achievement_bit_; - ::PROTOBUF_NAMESPACE_ID::int32 achievement_id_; - float alpha_; - float animation_speed_; - float distance_fade_end_; - bool can_fade_; - bool is_wall_; - float distance_fade_start_; - float bhdraft__schedule_duration_; - float scale_; - ::PROTOBUF_NAMESPACE_ID::int32 map_id_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_node_2eproto; -}; -// =================================================================== +// =================================================================== // =================================================================== @@ -5040,7 +4926,7 @@ inline bool Category::_internal_default_visibility() const { return default_visibility_; } inline bool Category::default_visibility() const { - // @@protoc_insertion_point(field_get:Proto_Node.Category.default_visibility) + // @@protoc_insertion_point(field_get:Category.default_visibility) return _internal_default_visibility(); } inline void Category::_internal_set_default_visibility(bool value) { @@ -5049,7 +4935,7 @@ inline void Category::_internal_set_default_visibility(bool value) { } inline void Category::set_default_visibility(bool value) { _internal_set_default_visibility(value); - // @@protoc_insertion_point(field_set:Proto_Node.Category.default_visibility) + // @@protoc_insertion_point(field_set:Category.default_visibility) } // string display_name = 2; @@ -5057,15 +4943,15 @@ inline void Category::clear_display_name() { display_name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline const std::string& Category::display_name() const { - // @@protoc_insertion_point(field_get:Proto_Node.Category.display_name) + // @@protoc_insertion_point(field_get:Category.display_name) return _internal_display_name(); } inline void Category::set_display_name(const std::string& value) { _internal_set_display_name(value); - // @@protoc_insertion_point(field_set:Proto_Node.Category.display_name) + // @@protoc_insertion_point(field_set:Category.display_name) } inline std::string* Category::mutable_display_name() { - // @@protoc_insertion_point(field_mutable:Proto_Node.Category.display_name) + // @@protoc_insertion_point(field_mutable:Category.display_name) return _internal_mutable_display_name(); } inline const std::string& Category::_internal_display_name() const { @@ -5079,28 +4965,28 @@ inline void Category::set_display_name(std::string&& value) { display_name_.Set( &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:Proto_Node.Category.display_name) + // @@protoc_insertion_point(field_set_rvalue:Category.display_name) } inline void Category::set_display_name(const char* value) { GOOGLE_DCHECK(value != nullptr); display_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:Proto_Node.Category.display_name) + // @@protoc_insertion_point(field_set_char:Category.display_name) } inline void Category::set_display_name(const char* value, size_t size) { display_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:Proto_Node.Category.display_name) + // @@protoc_insertion_point(field_set_pointer:Category.display_name) } inline std::string* Category::_internal_mutable_display_name() { return display_name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* Category::release_display_name() { - // @@protoc_insertion_point(field_release:Proto_Node.Category.display_name) + // @@protoc_insertion_point(field_release:Category.display_name) return display_name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void Category::set_allocated_display_name(std::string* display_name) { @@ -5111,10 +4997,10 @@ inline void Category::set_allocated_display_name(std::string* display_name) { } display_name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), display_name, GetArena()); - // @@protoc_insertion_point(field_set_allocated:Proto_Node.Category.display_name) + // @@protoc_insertion_point(field_set_allocated:Category.display_name) } inline std::string* Category::unsafe_arena_release_display_name() { - // @@protoc_insertion_point(field_unsafe_arena_release:Proto_Node.Category.display_name) + // @@protoc_insertion_point(field_unsafe_arena_release:Category.display_name) GOOGLE_DCHECK(GetArena() != nullptr); return display_name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), @@ -5130,7 +5016,7 @@ inline void Category::unsafe_arena_set_allocated_display_name( } display_name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), display_name, GetArena()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Proto_Node.Category.display_name) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Category.display_name) } // bool is_separator = 3; @@ -5141,7 +5027,7 @@ inline bool Category::_internal_is_separator() const { return is_separator_; } inline bool Category::is_separator() const { - // @@protoc_insertion_point(field_get:Proto_Node.Category.is_separator) + // @@protoc_insertion_point(field_get:Category.is_separator) return _internal_is_separator(); } inline void Category::_internal_set_is_separator(bool value) { @@ -5150,7 +5036,7 @@ inline void Category::_internal_set_is_separator(bool value) { } inline void Category::set_is_separator(bool value) { _internal_set_is_separator(value); - // @@protoc_insertion_point(field_set:Proto_Node.Category.is_separator) + // @@protoc_insertion_point(field_set:Category.is_separator) } // string name = 4; @@ -5158,15 +5044,15 @@ inline void Category::clear_name() { name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline const std::string& Category::name() const { - // @@protoc_insertion_point(field_get:Proto_Node.Category.name) + // @@protoc_insertion_point(field_get:Category.name) return _internal_name(); } inline void Category::set_name(const std::string& value) { _internal_set_name(value); - // @@protoc_insertion_point(field_set:Proto_Node.Category.name) + // @@protoc_insertion_point(field_set:Category.name) } inline std::string* Category::mutable_name() { - // @@protoc_insertion_point(field_mutable:Proto_Node.Category.name) + // @@protoc_insertion_point(field_mutable:Category.name) return _internal_mutable_name(); } inline const std::string& Category::_internal_name() const { @@ -5180,28 +5066,28 @@ inline void Category::set_name(std::string&& value) { name_.Set( &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:Proto_Node.Category.name) + // @@protoc_insertion_point(field_set_rvalue:Category.name) } inline void Category::set_name(const char* value) { GOOGLE_DCHECK(value != nullptr); name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:Proto_Node.Category.name) + // @@protoc_insertion_point(field_set_char:Category.name) } inline void Category::set_name(const char* value, size_t size) { name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:Proto_Node.Category.name) + // @@protoc_insertion_point(field_set_pointer:Category.name) } inline std::string* Category::_internal_mutable_name() { return name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* Category::release_name() { - // @@protoc_insertion_point(field_release:Proto_Node.Category.name) + // @@protoc_insertion_point(field_release:Category.name) return name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void Category::set_allocated_name(std::string* name) { @@ -5212,10 +5098,10 @@ inline void Category::set_allocated_name(std::string* name) { } name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name, GetArena()); - // @@protoc_insertion_point(field_set_allocated:Proto_Node.Category.name) + // @@protoc_insertion_point(field_set_allocated:Category.name) } inline std::string* Category::unsafe_arena_release_name() { - // @@protoc_insertion_point(field_unsafe_arena_release:Proto_Node.Category.name) + // @@protoc_insertion_point(field_unsafe_arena_release:Category.name) GOOGLE_DCHECK(GetArena() != nullptr); return name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), @@ -5231,7 +5117,7 @@ inline void Category::unsafe_arena_set_allocated_name( } name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name, GetArena()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Proto_Node.Category.name) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Category.name) } // string tooltip_name = 5; @@ -5239,15 +5125,15 @@ inline void Category::clear_tooltip_name() { tooltip_name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline const std::string& Category::tooltip_name() const { - // @@protoc_insertion_point(field_get:Proto_Node.Category.tooltip_name) + // @@protoc_insertion_point(field_get:Category.tooltip_name) return _internal_tooltip_name(); } inline void Category::set_tooltip_name(const std::string& value) { _internal_set_tooltip_name(value); - // @@protoc_insertion_point(field_set:Proto_Node.Category.tooltip_name) + // @@protoc_insertion_point(field_set:Category.tooltip_name) } inline std::string* Category::mutable_tooltip_name() { - // @@protoc_insertion_point(field_mutable:Proto_Node.Category.tooltip_name) + // @@protoc_insertion_point(field_mutable:Category.tooltip_name) return _internal_mutable_tooltip_name(); } inline const std::string& Category::_internal_tooltip_name() const { @@ -5261,28 +5147,28 @@ inline void Category::set_tooltip_name(std::string&& value) { tooltip_name_.Set( &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:Proto_Node.Category.tooltip_name) + // @@protoc_insertion_point(field_set_rvalue:Category.tooltip_name) } inline void Category::set_tooltip_name(const char* value) { GOOGLE_DCHECK(value != nullptr); tooltip_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:Proto_Node.Category.tooltip_name) + // @@protoc_insertion_point(field_set_char:Category.tooltip_name) } inline void Category::set_tooltip_name(const char* value, size_t size) { tooltip_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:Proto_Node.Category.tooltip_name) + // @@protoc_insertion_point(field_set_pointer:Category.tooltip_name) } inline std::string* Category::_internal_mutable_tooltip_name() { return tooltip_name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* Category::release_tooltip_name() { - // @@protoc_insertion_point(field_release:Proto_Node.Category.tooltip_name) + // @@protoc_insertion_point(field_release:Category.tooltip_name) return tooltip_name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void Category::set_allocated_tooltip_name(std::string* tooltip_name) { @@ -5293,10 +5179,10 @@ inline void Category::set_allocated_tooltip_name(std::string* tooltip_name) { } tooltip_name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), tooltip_name, GetArena()); - // @@protoc_insertion_point(field_set_allocated:Proto_Node.Category.tooltip_name) + // @@protoc_insertion_point(field_set_allocated:Category.tooltip_name) } inline std::string* Category::unsafe_arena_release_tooltip_name() { - // @@protoc_insertion_point(field_unsafe_arena_release:Proto_Node.Category.tooltip_name) + // @@protoc_insertion_point(field_unsafe_arena_release:Category.tooltip_name) GOOGLE_DCHECK(GetArena() != nullptr); return tooltip_name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), @@ -5312,10 +5198,10 @@ inline void Category::unsafe_arena_set_allocated_tooltip_name( } tooltip_name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), tooltip_name, GetArena()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Proto_Node.Category.tooltip_name) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Category.tooltip_name) } -// map children = 6; +// map children = 6; inline int Category::_internal_children_size() const { return children_.size(); } @@ -5325,1363 +5211,1617 @@ inline int Category::children_size() const { inline void Category::clear_children() { children_.Clear(); } -inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Proto_Node::Category >& +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Category >& Category::_internal_children() const { return children_.GetMap(); } -inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Proto_Node::Category >& +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Category >& Category::children() const { - // @@protoc_insertion_point(field_map:Proto_Node.Category.children) + // @@protoc_insertion_point(field_map:Category.children) return _internal_children(); } -inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Proto_Node::Category >* +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Category >* Category::_internal_mutable_children() { return children_.MutableMap(); } -inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Proto_Node::Category >* +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Category >* Category::mutable_children() { - // @@protoc_insertion_point(field_mutable_map:Proto_Node.Category.children) + // @@protoc_insertion_point(field_mutable_map:Category.children) return _internal_mutable_children(); } // ------------------------------------------------------------------- -// Icon_texture +// Icon -// string path = 1; -inline void Icon_texture::clear_path() { - path_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +// .Category category = 1; +inline bool Icon::_internal_has_category() const { + return this != internal_default_instance() && category_ != nullptr; } -inline const std::string& Icon_texture::path() const { - // @@protoc_insertion_point(field_get:Proto_Node.Icon.texture.path) - return _internal_path(); +inline bool Icon::has_category() const { + return _internal_has_category(); } -inline void Icon_texture::set_path(const std::string& value) { - _internal_set_path(value); - // @@protoc_insertion_point(field_set:Proto_Node.Icon.texture.path) +inline void Icon::clear_category() { + if (GetArena() == nullptr && category_ != nullptr) { + delete category_; + } + category_ = nullptr; } -inline std::string* Icon_texture::mutable_path() { - // @@protoc_insertion_point(field_mutable:Proto_Node.Icon.texture.path) - return _internal_mutable_path(); +inline const ::Category& Icon::_internal_category() const { + const ::Category* p = category_; + return p != nullptr ? *p : *reinterpret_cast( + &::_Category_default_instance_); } -inline const std::string& Icon_texture::_internal_path() const { - return path_.Get(); +inline const ::Category& Icon::category() const { + // @@protoc_insertion_point(field_get:Icon.category) + return _internal_category(); } -inline void Icon_texture::_internal_set_path(const std::string& value) { - - path_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +inline void Icon::unsafe_arena_set_allocated_category( + ::Category* category) { + if (GetArena() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(category_); + } + category_ = category; + if (category) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Icon.category) } -inline void Icon_texture::set_path(std::string&& value) { - - path_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:Proto_Node.Icon.texture.path) +inline ::Category* Icon::release_category() { + auto temp = unsafe_arena_release_category(); + if (GetArena() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + return temp; } -inline void Icon_texture::set_path(const char* value) { - GOOGLE_DCHECK(value != nullptr); +inline ::Category* Icon::unsafe_arena_release_category() { + // @@protoc_insertion_point(field_release:Icon.category) - path_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArena()); - // @@protoc_insertion_point(field_set_char:Proto_Node.Icon.texture.path) + ::Category* temp = category_; + category_ = nullptr; + return temp; } -inline void Icon_texture::set_path(const char* value, - size_t size) { +inline ::Category* Icon::_internal_mutable_category() { - path_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:Proto_Node.Icon.texture.path) + if (category_ == nullptr) { + auto* p = CreateMaybeMessage<::Category>(GetArena()); + category_ = p; + } + return category_; } -inline std::string* Icon_texture::_internal_mutable_path() { - - return path_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +inline ::Category* Icon::mutable_category() { + // @@protoc_insertion_point(field_mutable:Icon.category) + return _internal_mutable_category(); } -inline std::string* Icon_texture::release_path() { - // @@protoc_insertion_point(field_release:Proto_Node.Icon.texture.path) - return path_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +inline void Icon::set_allocated_category(::Category* category) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); + if (message_arena == nullptr) { + delete category_; + } + if (category) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(category); + if (message_arena != submessage_arena) { + category = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, category, submessage_arena); + } + + } else { + + } + category_ = category; + // @@protoc_insertion_point(field_set_allocated:Icon.category) } -inline void Icon_texture::set_allocated_path(std::string* path) { - if (path != nullptr) { + +// .Texture texture = 2; +inline bool Icon::_internal_has_texture() const { + return this != internal_default_instance() && texture_ != nullptr; +} +inline bool Icon::has_texture() const { + return _internal_has_texture(); +} +inline void Icon::clear_texture() { + if (GetArena() == nullptr && texture_ != nullptr) { + delete texture_; + } + texture_ = nullptr; +} +inline const ::Texture& Icon::_internal_texture() const { + const ::Texture* p = texture_; + return p != nullptr ? *p : *reinterpret_cast( + &::_Texture_default_instance_); +} +inline const ::Texture& Icon::texture() const { + // @@protoc_insertion_point(field_get:Icon.texture) + return _internal_texture(); +} +inline void Icon::unsafe_arena_set_allocated_texture( + ::Texture* texture) { + if (GetArena() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(texture_); + } + texture_ = texture; + if (texture) { } else { } - path_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), path, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:Proto_Node.Icon.texture.path) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Icon.texture) } -inline std::string* Icon_texture::unsafe_arena_release_path() { - // @@protoc_insertion_point(field_unsafe_arena_release:Proto_Node.Icon.texture.path) - GOOGLE_DCHECK(GetArena() != nullptr); +inline ::Texture* Icon::release_texture() { + auto temp = unsafe_arena_release_texture(); + if (GetArena() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + return temp; +} +inline ::Texture* Icon::unsafe_arena_release_texture() { + // @@protoc_insertion_point(field_release:Icon.texture) - return path_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArena()); + ::Texture* temp = texture_; + texture_ = nullptr; + return temp; } -inline void Icon_texture::unsafe_arena_set_allocated_path( - std::string* path) { - GOOGLE_DCHECK(GetArena() != nullptr); - if (path != nullptr) { +inline ::Texture* Icon::_internal_mutable_texture() { + + if (texture_ == nullptr) { + auto* p = CreateMaybeMessage<::Texture>(GetArena()); + texture_ = p; + } + return texture_; +} +inline ::Texture* Icon::mutable_texture() { + // @@protoc_insertion_point(field_mutable:Icon.texture) + return _internal_mutable_texture(); +} +inline void Icon::set_allocated_texture(::Texture* texture) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); + if (message_arena == nullptr) { + delete texture_; + } + if (texture) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(texture); + if (message_arena != submessage_arena) { + texture = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, texture, submessage_arena); + } } else { } - path_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - path, GetArena()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Proto_Node.Icon.texture.path) + texture_ = texture; + // @@protoc_insertion_point(field_set_allocated:Icon.texture) } -// .google.protobuf.Any original_token = 2; -inline bool Icon_texture::_internal_has_original_token() const { - return this != internal_default_instance() && original_token_ != nullptr; +// .GUID guid = 3; +inline bool Icon::_internal_has_guid() const { + return this != internal_default_instance() && guid_ != nullptr; } -inline bool Icon_texture::has_original_token() const { - return _internal_has_original_token(); +inline bool Icon::has_guid() const { + return _internal_has_guid(); +} +inline void Icon::clear_guid() { + if (GetArena() == nullptr && guid_ != nullptr) { + delete guid_; + } + guid_ = nullptr; } -inline const PROTOBUF_NAMESPACE_ID::Any& Icon_texture::_internal_original_token() const { - const PROTOBUF_NAMESPACE_ID::Any* p = original_token_; - return p != nullptr ? *p : *reinterpret_cast( - &PROTOBUF_NAMESPACE_ID::_Any_default_instance_); +inline const ::GUID& Icon::_internal_guid() const { + const ::GUID* p = guid_; + return p != nullptr ? *p : *reinterpret_cast( + &::_GUID_default_instance_); } -inline const PROTOBUF_NAMESPACE_ID::Any& Icon_texture::original_token() const { - // @@protoc_insertion_point(field_get:Proto_Node.Icon.texture.original_token) - return _internal_original_token(); +inline const ::GUID& Icon::guid() const { + // @@protoc_insertion_point(field_get:Icon.guid) + return _internal_guid(); } -inline void Icon_texture::unsafe_arena_set_allocated_original_token( - PROTOBUF_NAMESPACE_ID::Any* original_token) { +inline void Icon::unsafe_arena_set_allocated_guid( + ::GUID* guid) { if (GetArena() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(original_token_); + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(guid_); } - original_token_ = original_token; - if (original_token) { + guid_ = guid; + if (guid) { } else { } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Proto_Node.Icon.texture.original_token) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Icon.guid) } -inline PROTOBUF_NAMESPACE_ID::Any* Icon_texture::release_original_token() { - auto temp = unsafe_arena_release_original_token(); +inline ::GUID* Icon::release_guid() { + auto temp = unsafe_arena_release_guid(); if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } return temp; } -inline PROTOBUF_NAMESPACE_ID::Any* Icon_texture::unsafe_arena_release_original_token() { - // @@protoc_insertion_point(field_release:Proto_Node.Icon.texture.original_token) +inline ::GUID* Icon::unsafe_arena_release_guid() { + // @@protoc_insertion_point(field_release:Icon.guid) - PROTOBUF_NAMESPACE_ID::Any* temp = original_token_; - original_token_ = nullptr; + ::GUID* temp = guid_; + guid_ = nullptr; return temp; } -inline PROTOBUF_NAMESPACE_ID::Any* Icon_texture::_internal_mutable_original_token() { +inline ::GUID* Icon::_internal_mutable_guid() { - if (original_token_ == nullptr) { - auto* p = CreateMaybeMessage(GetArena()); - original_token_ = p; + if (guid_ == nullptr) { + auto* p = CreateMaybeMessage<::GUID>(GetArena()); + guid_ = p; } - return original_token_; + return guid_; } -inline PROTOBUF_NAMESPACE_ID::Any* Icon_texture::mutable_original_token() { - // @@protoc_insertion_point(field_mutable:Proto_Node.Icon.texture.original_token) - return _internal_mutable_original_token(); +inline ::GUID* Icon::mutable_guid() { + // @@protoc_insertion_point(field_mutable:Icon.guid) + return _internal_mutable_guid(); } -inline void Icon_texture::set_allocated_original_token(PROTOBUF_NAMESPACE_ID::Any* original_token) { +inline void Icon::set_allocated_guid(::GUID* guid) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(original_token_); + delete guid_; } - if (original_token) { + if (guid) { ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(original_token)->GetArena(); + ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(guid); if (message_arena != submessage_arena) { - original_token = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, original_token, submessage_arena); + guid = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, guid, submessage_arena); } } else { } - original_token_ = original_token; - // @@protoc_insertion_point(field_set_allocated:Proto_Node.Icon.texture.original_token) + guid_ = guid; + // @@protoc_insertion_point(field_set_allocated:Icon.guid) } -// ------------------------------------------------------------------- - -// Icon_position - -// float x = 1; -inline void Icon_position::clear_x() { - x_ = 0; +// int32 map_id = 4; +inline void Icon::clear_map_id() { + map_id_ = 0; } -inline float Icon_position::_internal_x() const { - return x_; +inline ::PROTOBUF_NAMESPACE_ID::int32 Icon::_internal_map_id() const { + return map_id_; } -inline float Icon_position::x() const { - // @@protoc_insertion_point(field_get:Proto_Node.Icon.position.x) - return _internal_x(); +inline ::PROTOBUF_NAMESPACE_ID::int32 Icon::map_id() const { + // @@protoc_insertion_point(field_get:Icon.map_id) + return _internal_map_id(); } -inline void Icon_position::_internal_set_x(float value) { +inline void Icon::_internal_set_map_id(::PROTOBUF_NAMESPACE_ID::int32 value) { - x_ = value; + map_id_ = value; } -inline void Icon_position::set_x(float value) { - _internal_set_x(value); - // @@protoc_insertion_point(field_set:Proto_Node.Icon.position.x) +inline void Icon::set_map_id(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_map_id(value); + // @@protoc_insertion_point(field_set:Icon.map_id) } -// float y = 2; -inline void Icon_position::clear_y() { - y_ = 0; +// float distance_fade_end = 5; +inline void Icon::clear_distance_fade_end() { + distance_fade_end_ = 0; } -inline float Icon_position::_internal_y() const { - return y_; +inline float Icon::_internal_distance_fade_end() const { + return distance_fade_end_; } -inline float Icon_position::y() const { - // @@protoc_insertion_point(field_get:Proto_Node.Icon.position.y) - return _internal_y(); +inline float Icon::distance_fade_end() const { + // @@protoc_insertion_point(field_get:Icon.distance_fade_end) + return _internal_distance_fade_end(); } -inline void Icon_position::_internal_set_y(float value) { +inline void Icon::_internal_set_distance_fade_end(float value) { - y_ = value; + distance_fade_end_ = value; } -inline void Icon_position::set_y(float value) { - _internal_set_y(value); - // @@protoc_insertion_point(field_set:Proto_Node.Icon.position.y) +inline void Icon::set_distance_fade_end(float value) { + _internal_set_distance_fade_end(value); + // @@protoc_insertion_point(field_set:Icon.distance_fade_end) } -// float z = 3; -inline void Icon_position::clear_z() { - z_ = 0; +// float distance_fade_start = 6; +inline void Icon::clear_distance_fade_start() { + distance_fade_start_ = 0; } -inline float Icon_position::_internal_z() const { - return z_; +inline float Icon::_internal_distance_fade_start() const { + return distance_fade_start_; } -inline float Icon_position::z() const { - // @@protoc_insertion_point(field_get:Proto_Node.Icon.position.z) - return _internal_z(); +inline float Icon::distance_fade_start() const { + // @@protoc_insertion_point(field_get:Icon.distance_fade_start) + return _internal_distance_fade_start(); } -inline void Icon_position::_internal_set_z(float value) { +inline void Icon::_internal_set_distance_fade_start(float value) { - z_ = value; + distance_fade_start_ = value; } -inline void Icon_position::set_z(float value) { - _internal_set_z(value); - // @@protoc_insertion_point(field_set:Proto_Node.Icon.position.z) +inline void Icon::set_distance_fade_start(float value) { + _internal_set_distance_fade_start(value); + // @@protoc_insertion_point(field_set:Icon.distance_fade_start) } -// ------------------------------------------------------------------- - -// Icon_euler_rotation - -// float x = 1; -inline void Icon_euler_rotation::clear_x() { - x_ = 0; +// float height_offset = 7; +inline void Icon::clear_height_offset() { + height_offset_ = 0; } -inline float Icon_euler_rotation::_internal_x() const { - return x_; +inline float Icon::_internal_height_offset() const { + return height_offset_; } -inline float Icon_euler_rotation::x() const { - // @@protoc_insertion_point(field_get:Proto_Node.Icon.euler_rotation.x) - return _internal_x(); +inline float Icon::height_offset() const { + // @@protoc_insertion_point(field_get:Icon.height_offset) + return _internal_height_offset(); } -inline void Icon_euler_rotation::_internal_set_x(float value) { +inline void Icon::_internal_set_height_offset(float value) { - x_ = value; + height_offset_ = value; } -inline void Icon_euler_rotation::set_x(float value) { - _internal_set_x(value); - // @@protoc_insertion_point(field_set:Proto_Node.Icon.euler_rotation.x) +inline void Icon::set_height_offset(float value) { + _internal_set_height_offset(value); + // @@protoc_insertion_point(field_set:Icon.height_offset) } -// float y = 2; -inline void Icon_euler_rotation::clear_y() { - y_ = 0; +// .Position position = 8; +inline bool Icon::_internal_has_position() const { + return this != internal_default_instance() && position_ != nullptr; } -inline float Icon_euler_rotation::_internal_y() const { - return y_; +inline bool Icon::has_position() const { + return _internal_has_position(); } -inline float Icon_euler_rotation::y() const { - // @@protoc_insertion_point(field_get:Proto_Node.Icon.euler_rotation.y) - return _internal_y(); +inline void Icon::clear_position() { + if (GetArena() == nullptr && position_ != nullptr) { + delete position_; + } + position_ = nullptr; } -inline void Icon_euler_rotation::_internal_set_y(float value) { - - y_ = value; +inline const ::Position& Icon::_internal_position() const { + const ::Position* p = position_; + return p != nullptr ? *p : *reinterpret_cast( + &::_Position_default_instance_); } -inline void Icon_euler_rotation::set_y(float value) { - _internal_set_y(value); - // @@protoc_insertion_point(field_set:Proto_Node.Icon.euler_rotation.y) +inline const ::Position& Icon::position() const { + // @@protoc_insertion_point(field_get:Icon.position) + return _internal_position(); } - -// float z = 3; -inline void Icon_euler_rotation::clear_z() { - z_ = 0; +inline void Icon::unsafe_arena_set_allocated_position( + ::Position* position) { + if (GetArena() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(position_); + } + position_ = position; + if (position) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Icon.position) } -inline float Icon_euler_rotation::_internal_z() const { - return z_; +inline ::Position* Icon::release_position() { + auto temp = unsafe_arena_release_position(); + if (GetArena() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + return temp; } -inline float Icon_euler_rotation::z() const { - // @@protoc_insertion_point(field_get:Proto_Node.Icon.euler_rotation.z) - return _internal_z(); +inline ::Position* Icon::unsafe_arena_release_position() { + // @@protoc_insertion_point(field_release:Icon.position) + + ::Position* temp = position_; + position_ = nullptr; + return temp; } -inline void Icon_euler_rotation::_internal_set_z(float value) { +inline ::Position* Icon::_internal_mutable_position() { - z_ = value; + if (position_ == nullptr) { + auto* p = CreateMaybeMessage<::Position>(GetArena()); + position_ = p; + } + return position_; } -inline void Icon_euler_rotation::set_z(float value) { - _internal_set_z(value); - // @@protoc_insertion_point(field_set:Proto_Node.Icon.euler_rotation.z) +inline ::Position* Icon::mutable_position() { + // @@protoc_insertion_point(field_mutable:Icon.position) + return _internal_mutable_position(); +} +inline void Icon::set_allocated_position(::Position* position) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); + if (message_arena == nullptr) { + delete position_; + } + if (position) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(position); + if (message_arena != submessage_arena) { + position = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, position, submessage_arena); + } + + } else { + + } + position_ = position; + // @@protoc_insertion_point(field_set_allocated:Icon.position) } -// ------------------------------------------------------------------- - -// Icon_trigger_guid - -// int32 guid = 1; -inline void Icon_trigger_guid::clear_guid() { - guid_ = 0; +// .ResetBehavior reset_behavior = 9; +inline void Icon::clear_reset_behavior() { + reset_behavior_ = 0; } -inline ::PROTOBUF_NAMESPACE_ID::int32 Icon_trigger_guid::_internal_guid() const { - return guid_; +inline ::ResetBehavior Icon::_internal_reset_behavior() const { + return static_cast< ::ResetBehavior >(reset_behavior_); } -inline ::PROTOBUF_NAMESPACE_ID::int32 Icon_trigger_guid::guid() const { - // @@protoc_insertion_point(field_get:Proto_Node.Icon.trigger.guid.guid) - return _internal_guid(); +inline ::ResetBehavior Icon::reset_behavior() const { + // @@protoc_insertion_point(field_get:Icon.reset_behavior) + return _internal_reset_behavior(); } -inline void Icon_trigger_guid::_internal_set_guid(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline void Icon::_internal_set_reset_behavior(::ResetBehavior value) { - guid_ = value; + reset_behavior_ = value; } -inline void Icon_trigger_guid::set_guid(::PROTOBUF_NAMESPACE_ID::int32 value) { - _internal_set_guid(value); - // @@protoc_insertion_point(field_set:Proto_Node.Icon.trigger.guid.guid) +inline void Icon::set_reset_behavior(::ResetBehavior value) { + _internal_set_reset_behavior(value); + // @@protoc_insertion_point(field_set:Icon.reset_behavior) } -// ------------------------------------------------------------------- - -// Icon_trigger - -// bool auto_trigger = 1; -inline void Icon_trigger::clear_auto_trigger() { - auto_trigger_ = false; +// .Trigger trigger = 10; +inline bool Icon::_internal_has_trigger() const { + return this != internal_default_instance() && trigger_ != nullptr; } -inline bool Icon_trigger::_internal_auto_trigger() const { - return auto_trigger_; +inline bool Icon::has_trigger() const { + return _internal_has_trigger(); } -inline bool Icon_trigger::auto_trigger() const { - // @@protoc_insertion_point(field_get:Proto_Node.Icon.trigger.auto_trigger) - return _internal_auto_trigger(); +inline void Icon::clear_trigger() { + if (GetArena() == nullptr && trigger_ != nullptr) { + delete trigger_; + } + trigger_ = nullptr; } -inline void Icon_trigger::_internal_set_auto_trigger(bool value) { - - auto_trigger_ = value; +inline const ::Trigger& Icon::_internal_trigger() const { + const ::Trigger* p = trigger_; + return p != nullptr ? *p : *reinterpret_cast( + &::_Trigger_default_instance_); } -inline void Icon_trigger::set_auto_trigger(bool value) { - _internal_set_auto_trigger(value); - // @@protoc_insertion_point(field_set:Proto_Node.Icon.trigger.auto_trigger) +inline const ::Trigger& Icon::trigger() const { + // @@protoc_insertion_point(field_get:Icon.trigger) + return _internal_trigger(); } - -// float bounce_delay = 2; -inline void Icon_trigger::clear_bounce_delay() { - bounce_delay_ = 0; +inline void Icon::unsafe_arena_set_allocated_trigger( + ::Trigger* trigger) { + if (GetArena() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(trigger_); + } + trigger_ = trigger; + if (trigger) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Icon.trigger) } -inline float Icon_trigger::_internal_bounce_delay() const { - return bounce_delay_; +inline ::Trigger* Icon::release_trigger() { + auto temp = unsafe_arena_release_trigger(); + if (GetArena() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + return temp; } -inline float Icon_trigger::bounce_delay() const { - // @@protoc_insertion_point(field_get:Proto_Node.Icon.trigger.bounce_delay) - return _internal_bounce_delay(); +inline ::Trigger* Icon::unsafe_arena_release_trigger() { + // @@protoc_insertion_point(field_release:Icon.trigger) + + ::Trigger* temp = trigger_; + trigger_ = nullptr; + return temp; } -inline void Icon_trigger::_internal_set_bounce_delay(float value) { +inline ::Trigger* Icon::_internal_mutable_trigger() { - bounce_delay_ = value; + if (trigger_ == nullptr) { + auto* p = CreateMaybeMessage<::Trigger>(GetArena()); + trigger_ = p; + } + return trigger_; } -inline void Icon_trigger::set_bounce_delay(float value) { - _internal_set_bounce_delay(value); - // @@protoc_insertion_point(field_set:Proto_Node.Icon.trigger.bounce_delay) +inline ::Trigger* Icon::mutable_trigger() { + // @@protoc_insertion_point(field_mutable:Icon.trigger) + return _internal_mutable_trigger(); +} +inline void Icon::set_allocated_trigger(::Trigger* trigger) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); + if (message_arena == nullptr) { + delete trigger_; + } + if (trigger) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(trigger); + if (message_arena != submessage_arena) { + trigger = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, trigger, submessage_arena); + } + + } else { + + } + trigger_ = trigger; + // @@protoc_insertion_point(field_set_allocated:Icon.trigger) } -// float bounce_duration = 3; -inline void Icon_trigger::clear_bounce_duration() { - bounce_duration_ = 0; +// fixed32 achievement_bit = 16; +inline void Icon::clear_achievement_bit() { + achievement_bit_ = 0u; } -inline float Icon_trigger::_internal_bounce_duration() const { - return bounce_duration_; +inline ::PROTOBUF_NAMESPACE_ID::uint32 Icon::_internal_achievement_bit() const { + return achievement_bit_; } -inline float Icon_trigger::bounce_duration() const { - // @@protoc_insertion_point(field_get:Proto_Node.Icon.trigger.bounce_duration) - return _internal_bounce_duration(); +inline ::PROTOBUF_NAMESPACE_ID::uint32 Icon::achievement_bit() const { + // @@protoc_insertion_point(field_get:Icon.achievement_bit) + return _internal_achievement_bit(); } -inline void Icon_trigger::_internal_set_bounce_duration(float value) { +inline void Icon::_internal_set_achievement_bit(::PROTOBUF_NAMESPACE_ID::uint32 value) { - bounce_duration_ = value; -} -inline void Icon_trigger::set_bounce_duration(float value) { - _internal_set_bounce_duration(value); - // @@protoc_insertion_point(field_set:Proto_Node.Icon.trigger.bounce_duration) + achievement_bit_ = value; +} +inline void Icon::set_achievement_bit(::PROTOBUF_NAMESPACE_ID::uint32 value) { + _internal_set_achievement_bit(value); + // @@protoc_insertion_point(field_set:Icon.achievement_bit) } -// float bounce_height = 4; -inline void Icon_trigger::clear_bounce_height() { - bounce_height_ = 0; +// int32 achievement_id = 17; +inline void Icon::clear_achievement_id() { + achievement_id_ = 0; } -inline float Icon_trigger::_internal_bounce_height() const { - return bounce_height_; +inline ::PROTOBUF_NAMESPACE_ID::int32 Icon::_internal_achievement_id() const { + return achievement_id_; } -inline float Icon_trigger::bounce_height() const { - // @@protoc_insertion_point(field_get:Proto_Node.Icon.trigger.bounce_height) - return _internal_bounce_height(); +inline ::PROTOBUF_NAMESPACE_ID::int32 Icon::achievement_id() const { + // @@protoc_insertion_point(field_get:Icon.achievement_id) + return _internal_achievement_id(); } -inline void Icon_trigger::_internal_set_bounce_height(float value) { +inline void Icon::_internal_set_achievement_id(::PROTOBUF_NAMESPACE_ID::int32 value) { - bounce_height_ = value; + achievement_id_ = value; } -inline void Icon_trigger::set_bounce_height(float value) { - _internal_set_bounce_height(value); - // @@protoc_insertion_point(field_set:Proto_Node.Icon.trigger.bounce_height) +inline void Icon::set_achievement_id(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_achievement_id(value); + // @@protoc_insertion_point(field_set:Icon.achievement_id) } -// string action_copy_clipboard = 5; -inline void Icon_trigger::clear_action_copy_clipboard() { - action_copy_clipboard_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +// float alpha = 18; +inline void Icon::clear_alpha() { + alpha_ = 0; } -inline const std::string& Icon_trigger::action_copy_clipboard() const { - // @@protoc_insertion_point(field_get:Proto_Node.Icon.trigger.action_copy_clipboard) - return _internal_action_copy_clipboard(); +inline float Icon::_internal_alpha() const { + return alpha_; } -inline void Icon_trigger::set_action_copy_clipboard(const std::string& value) { - _internal_set_action_copy_clipboard(value); - // @@protoc_insertion_point(field_set:Proto_Node.Icon.trigger.action_copy_clipboard) +inline float Icon::alpha() const { + // @@protoc_insertion_point(field_get:Icon.alpha) + return _internal_alpha(); } -inline std::string* Icon_trigger::mutable_action_copy_clipboard() { - // @@protoc_insertion_point(field_mutable:Proto_Node.Icon.trigger.action_copy_clipboard) - return _internal_mutable_action_copy_clipboard(); +inline void Icon::_internal_set_alpha(float value) { + + alpha_ = value; } -inline const std::string& Icon_trigger::_internal_action_copy_clipboard() const { - return action_copy_clipboard_.Get(); +inline void Icon::set_alpha(float value) { + _internal_set_alpha(value); + // @@protoc_insertion_point(field_set:Icon.alpha) } -inline void Icon_trigger::_internal_set_action_copy_clipboard(const std::string& value) { - - action_copy_clipboard_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); + +// bool can_fade = 19; +inline void Icon::clear_can_fade() { + can_fade_ = false; +} +inline bool Icon::_internal_can_fade() const { + return can_fade_; } -inline void Icon_trigger::set_action_copy_clipboard(std::string&& value) { +inline bool Icon::can_fade() const { + // @@protoc_insertion_point(field_get:Icon.can_fade) + return _internal_can_fade(); +} +inline void Icon::_internal_set_can_fade(bool value) { - action_copy_clipboard_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:Proto_Node.Icon.trigger.action_copy_clipboard) + can_fade_ = value; } -inline void Icon_trigger::set_action_copy_clipboard(const char* value) { - GOOGLE_DCHECK(value != nullptr); +inline void Icon::set_can_fade(bool value) { + _internal_set_can_fade(value); + // @@protoc_insertion_point(field_set:Icon.can_fade) +} + +// int32 minimum_size_on_screen = 20; +inline void Icon::clear_minimum_size_on_screen() { + minimum_size_on_screen_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 Icon::_internal_minimum_size_on_screen() const { + return minimum_size_on_screen_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 Icon::minimum_size_on_screen() const { + // @@protoc_insertion_point(field_get:Icon.minimum_size_on_screen) + return _internal_minimum_size_on_screen(); +} +inline void Icon::_internal_set_minimum_size_on_screen(::PROTOBUF_NAMESPACE_ID::int32 value) { - action_copy_clipboard_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArena()); - // @@protoc_insertion_point(field_set_char:Proto_Node.Icon.trigger.action_copy_clipboard) + minimum_size_on_screen_ = value; } -inline void Icon_trigger::set_action_copy_clipboard(const char* value, - size_t size) { +inline void Icon::set_minimum_size_on_screen(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_minimum_size_on_screen(value); + // @@protoc_insertion_point(field_set:Icon.minimum_size_on_screen) +} + +// int32 map_display_size = 21; +inline void Icon::clear_map_display_size() { + map_display_size_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 Icon::_internal_map_display_size() const { + return map_display_size_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 Icon::map_display_size() const { + // @@protoc_insertion_point(field_get:Icon.map_display_size) + return _internal_map_display_size(); +} +inline void Icon::_internal_set_map_display_size(::PROTOBUF_NAMESPACE_ID::int32 value) { - action_copy_clipboard_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:Proto_Node.Icon.trigger.action_copy_clipboard) + map_display_size_ = value; +} +inline void Icon::set_map_display_size(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_map_display_size(value); + // @@protoc_insertion_point(field_set:Icon.map_display_size) +} + +// int32 maximum_size_on_screen = 22; +inline void Icon::clear_maximum_size_on_screen() { + maximum_size_on_screen_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 Icon::_internal_maximum_size_on_screen() const { + return maximum_size_on_screen_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 Icon::maximum_size_on_screen() const { + // @@protoc_insertion_point(field_get:Icon.maximum_size_on_screen) + return _internal_maximum_size_on_screen(); } -inline std::string* Icon_trigger::_internal_mutable_action_copy_clipboard() { +inline void Icon::_internal_set_maximum_size_on_screen(::PROTOBUF_NAMESPACE_ID::int32 value) { - return action_copy_clipboard_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + maximum_size_on_screen_ = value; } -inline std::string* Icon_trigger::release_action_copy_clipboard() { - // @@protoc_insertion_point(field_release:Proto_Node.Icon.trigger.action_copy_clipboard) - return action_copy_clipboard_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +inline void Icon::set_maximum_size_on_screen(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_maximum_size_on_screen(value); + // @@protoc_insertion_point(field_set:Icon.maximum_size_on_screen) } -inline void Icon_trigger::set_allocated_action_copy_clipboard(std::string* action_copy_clipboard) { - if (action_copy_clipboard != nullptr) { - - } else { - - } - action_copy_clipboard_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), action_copy_clipboard, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:Proto_Node.Icon.trigger.action_copy_clipboard) + +// bool scale_on_map_with_zoom = 23; +inline void Icon::clear_scale_on_map_with_zoom() { + scale_on_map_with_zoom_ = false; } -inline std::string* Icon_trigger::unsafe_arena_release_action_copy_clipboard() { - // @@protoc_insertion_point(field_unsafe_arena_release:Proto_Node.Icon.trigger.action_copy_clipboard) - GOOGLE_DCHECK(GetArena() != nullptr); +inline bool Icon::_internal_scale_on_map_with_zoom() const { + return scale_on_map_with_zoom_; +} +inline bool Icon::scale_on_map_with_zoom() const { + // @@protoc_insertion_point(field_get:Icon.scale_on_map_with_zoom) + return _internal_scale_on_map_with_zoom(); +} +inline void Icon::_internal_set_scale_on_map_with_zoom(bool value) { - return action_copy_clipboard_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArena()); + scale_on_map_with_zoom_ = value; } -inline void Icon_trigger::unsafe_arena_set_allocated_action_copy_clipboard( - std::string* action_copy_clipboard) { - GOOGLE_DCHECK(GetArena() != nullptr); - if (action_copy_clipboard != nullptr) { - - } else { - - } - action_copy_clipboard_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - action_copy_clipboard, GetArena()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Proto_Node.Icon.trigger.action_copy_clipboard) +inline void Icon::set_scale_on_map_with_zoom(bool value) { + _internal_set_scale_on_map_with_zoom(value); + // @@protoc_insertion_point(field_set:Icon.scale_on_map_with_zoom) } -// string action_copy_message = 6; -inline void Icon_trigger::clear_action_copy_message() { - action_copy_message_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +// string tip_description = 24; +inline void Icon::clear_tip_description() { + tip_description_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } -inline const std::string& Icon_trigger::action_copy_message() const { - // @@protoc_insertion_point(field_get:Proto_Node.Icon.trigger.action_copy_message) - return _internal_action_copy_message(); +inline const std::string& Icon::tip_description() const { + // @@protoc_insertion_point(field_get:Icon.tip_description) + return _internal_tip_description(); } -inline void Icon_trigger::set_action_copy_message(const std::string& value) { - _internal_set_action_copy_message(value); - // @@protoc_insertion_point(field_set:Proto_Node.Icon.trigger.action_copy_message) +inline void Icon::set_tip_description(const std::string& value) { + _internal_set_tip_description(value); + // @@protoc_insertion_point(field_set:Icon.tip_description) } -inline std::string* Icon_trigger::mutable_action_copy_message() { - // @@protoc_insertion_point(field_mutable:Proto_Node.Icon.trigger.action_copy_message) - return _internal_mutable_action_copy_message(); +inline std::string* Icon::mutable_tip_description() { + // @@protoc_insertion_point(field_mutable:Icon.tip_description) + return _internal_mutable_tip_description(); } -inline const std::string& Icon_trigger::_internal_action_copy_message() const { - return action_copy_message_.Get(); +inline const std::string& Icon::_internal_tip_description() const { + return tip_description_.Get(); } -inline void Icon_trigger::_internal_set_action_copy_message(const std::string& value) { +inline void Icon::_internal_set_tip_description(const std::string& value) { - action_copy_message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); + tip_description_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); } -inline void Icon_trigger::set_action_copy_message(std::string&& value) { +inline void Icon::set_tip_description(std::string&& value) { - action_copy_message_.Set( + tip_description_.Set( &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:Proto_Node.Icon.trigger.action_copy_message) + // @@protoc_insertion_point(field_set_rvalue:Icon.tip_description) } -inline void Icon_trigger::set_action_copy_message(const char* value) { +inline void Icon::set_tip_description(const char* value) { GOOGLE_DCHECK(value != nullptr); - action_copy_message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + tip_description_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:Proto_Node.Icon.trigger.action_copy_message) + // @@protoc_insertion_point(field_set_char:Icon.tip_description) } -inline void Icon_trigger::set_action_copy_message(const char* value, +inline void Icon::set_tip_description(const char* value, size_t size) { - action_copy_message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + tip_description_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:Proto_Node.Icon.trigger.action_copy_message) + // @@protoc_insertion_point(field_set_pointer:Icon.tip_description) } -inline std::string* Icon_trigger::_internal_mutable_action_copy_message() { +inline std::string* Icon::_internal_mutable_tip_description() { - return action_copy_message_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + return tip_description_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } -inline std::string* Icon_trigger::release_action_copy_message() { - // @@protoc_insertion_point(field_release:Proto_Node.Icon.trigger.action_copy_message) - return action_copy_message_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +inline std::string* Icon::release_tip_description() { + // @@protoc_insertion_point(field_release:Icon.tip_description) + return tip_description_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } -inline void Icon_trigger::set_allocated_action_copy_message(std::string* action_copy_message) { - if (action_copy_message != nullptr) { +inline void Icon::set_allocated_tip_description(std::string* tip_description) { + if (tip_description != nullptr) { } else { } - action_copy_message_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), action_copy_message, + tip_description_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), tip_description, GetArena()); - // @@protoc_insertion_point(field_set_allocated:Proto_Node.Icon.trigger.action_copy_message) + // @@protoc_insertion_point(field_set_allocated:Icon.tip_description) } -inline std::string* Icon_trigger::unsafe_arena_release_action_copy_message() { - // @@protoc_insertion_point(field_unsafe_arena_release:Proto_Node.Icon.trigger.action_copy_message) +inline std::string* Icon::unsafe_arena_release_tip_description() { + // @@protoc_insertion_point(field_unsafe_arena_release:Icon.tip_description) GOOGLE_DCHECK(GetArena() != nullptr); - return action_copy_message_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + return tip_description_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } -inline void Icon_trigger::unsafe_arena_set_allocated_action_copy_message( - std::string* action_copy_message) { +inline void Icon::unsafe_arena_set_allocated_tip_description( + std::string* tip_description) { GOOGLE_DCHECK(GetArena() != nullptr); - if (action_copy_message != nullptr) { + if (tip_description != nullptr) { } else { } - action_copy_message_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - action_copy_message, GetArena()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Proto_Node.Icon.trigger.action_copy_message) -} - -// bool has_countdown = 7; -inline void Icon_trigger::clear_has_countdown() { - has_countdown_ = false; -} -inline bool Icon_trigger::_internal_has_countdown() const { - return has_countdown_; -} -inline bool Icon_trigger::has_countdown() const { - // @@protoc_insertion_point(field_get:Proto_Node.Icon.trigger.has_countdown) - return _internal_has_countdown(); -} -inline void Icon_trigger::_internal_set_has_countdown(bool value) { - - has_countdown_ = value; -} -inline void Icon_trigger::set_has_countdown(bool value) { - _internal_set_has_countdown(value); - // @@protoc_insertion_point(field_set:Proto_Node.Icon.trigger.has_countdown) + tip_description_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + tip_description, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Icon.tip_description) } -// string action_info_message = 8; -inline void Icon_trigger::clear_action_info_message() { - action_info_message_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +// string tip_name = 25; +inline void Icon::clear_tip_name() { + tip_name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } -inline const std::string& Icon_trigger::action_info_message() const { - // @@protoc_insertion_point(field_get:Proto_Node.Icon.trigger.action_info_message) - return _internal_action_info_message(); +inline const std::string& Icon::tip_name() const { + // @@protoc_insertion_point(field_get:Icon.tip_name) + return _internal_tip_name(); } -inline void Icon_trigger::set_action_info_message(const std::string& value) { - _internal_set_action_info_message(value); - // @@protoc_insertion_point(field_set:Proto_Node.Icon.trigger.action_info_message) +inline void Icon::set_tip_name(const std::string& value) { + _internal_set_tip_name(value); + // @@protoc_insertion_point(field_set:Icon.tip_name) } -inline std::string* Icon_trigger::mutable_action_info_message() { - // @@protoc_insertion_point(field_mutable:Proto_Node.Icon.trigger.action_info_message) - return _internal_mutable_action_info_message(); +inline std::string* Icon::mutable_tip_name() { + // @@protoc_insertion_point(field_mutable:Icon.tip_name) + return _internal_mutable_tip_name(); } -inline const std::string& Icon_trigger::_internal_action_info_message() const { - return action_info_message_.Get(); +inline const std::string& Icon::_internal_tip_name() const { + return tip_name_.Get(); } -inline void Icon_trigger::_internal_set_action_info_message(const std::string& value) { +inline void Icon::_internal_set_tip_name(const std::string& value) { - action_info_message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); + tip_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); } -inline void Icon_trigger::set_action_info_message(std::string&& value) { +inline void Icon::set_tip_name(std::string&& value) { - action_info_message_.Set( + tip_name_.Set( &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:Proto_Node.Icon.trigger.action_info_message) + // @@protoc_insertion_point(field_set_rvalue:Icon.tip_name) } -inline void Icon_trigger::set_action_info_message(const char* value) { +inline void Icon::set_tip_name(const char* value) { GOOGLE_DCHECK(value != nullptr); - action_info_message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + tip_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:Proto_Node.Icon.trigger.action_info_message) + // @@protoc_insertion_point(field_set_char:Icon.tip_name) } -inline void Icon_trigger::set_action_info_message(const char* value, +inline void Icon::set_tip_name(const char* value, size_t size) { - action_info_message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + tip_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:Proto_Node.Icon.trigger.action_info_message) + // @@protoc_insertion_point(field_set_pointer:Icon.tip_name) } -inline std::string* Icon_trigger::_internal_mutable_action_info_message() { +inline std::string* Icon::_internal_mutable_tip_name() { - return action_info_message_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + return tip_name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } -inline std::string* Icon_trigger::release_action_info_message() { - // @@protoc_insertion_point(field_release:Proto_Node.Icon.trigger.action_info_message) - return action_info_message_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +inline std::string* Icon::release_tip_name() { + // @@protoc_insertion_point(field_release:Icon.tip_name) + return tip_name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } -inline void Icon_trigger::set_allocated_action_info_message(std::string* action_info_message) { - if (action_info_message != nullptr) { +inline void Icon::set_allocated_tip_name(std::string* tip_name) { + if (tip_name != nullptr) { } else { } - action_info_message_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), action_info_message, + tip_name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), tip_name, GetArena()); - // @@protoc_insertion_point(field_set_allocated:Proto_Node.Icon.trigger.action_info_message) + // @@protoc_insertion_point(field_set_allocated:Icon.tip_name) } -inline std::string* Icon_trigger::unsafe_arena_release_action_info_message() { - // @@protoc_insertion_point(field_unsafe_arena_release:Proto_Node.Icon.trigger.action_info_message) +inline std::string* Icon::unsafe_arena_release_tip_name() { + // @@protoc_insertion_point(field_unsafe_arena_release:Icon.tip_name) GOOGLE_DCHECK(GetArena() != nullptr); - return action_info_message_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + return tip_name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } -inline void Icon_trigger::unsafe_arena_set_allocated_action_info_message( - std::string* action_info_message) { +inline void Icon::unsafe_arena_set_allocated_tip_name( + std::string* tip_name) { GOOGLE_DCHECK(GetArena() != nullptr); - if (action_info_message != nullptr) { + if (tip_name != nullptr) { } else { } - action_info_message_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - action_info_message, GetArena()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Proto_Node.Icon.trigger.action_info_message) + tip_name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + tip_name, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Icon.tip_name) } -// bool invert_display = 9; -inline void Icon_trigger::clear_invert_display() { - invert_display_ = false; -} -inline bool Icon_trigger::_internal_invert_display() const { - return invert_display_; +// float __tentative__scale = 2048; +inline void Icon::clear___tentative__scale() { + __tentative__scale_ = 0; } -inline bool Icon_trigger::invert_display() const { - // @@protoc_insertion_point(field_get:Proto_Node.Icon.trigger.invert_display) - return _internal_invert_display(); +inline float Icon::_internal___tentative__scale() const { + return __tentative__scale_; +} +inline float Icon::__tentative__scale() const { + // @@protoc_insertion_point(field_get:Icon.__tentative__scale) + return _internal___tentative__scale(); } -inline void Icon_trigger::_internal_set_invert_display(bool value) { +inline void Icon::_internal_set___tentative__scale(float value) { - invert_display_ = value; + __tentative__scale_ = value; } -inline void Icon_trigger::set_invert_display(bool value) { - _internal_set_invert_display(value); - // @@protoc_insertion_point(field_set:Proto_Node.Icon.trigger.invert_display) +inline void Icon::set___tentative__scale(float value) { + _internal_set___tentative__scale(value); + // @@protoc_insertion_point(field_set:Icon.__tentative__scale) } -// float reset_length = 10; -inline void Icon_trigger::clear_reset_length() { - reset_length_ = 0; +// bool __tentative__render_ingame = 2049; +inline void Icon::clear___tentative__render_ingame() { + __tentative__render_ingame_ = false; } -inline float Icon_trigger::_internal_reset_length() const { - return reset_length_; +inline bool Icon::_internal___tentative__render_ingame() const { + return __tentative__render_ingame_; } -inline float Icon_trigger::reset_length() const { - // @@protoc_insertion_point(field_get:Proto_Node.Icon.trigger.reset_length) - return _internal_reset_length(); +inline bool Icon::__tentative__render_ingame() const { + // @@protoc_insertion_point(field_get:Icon.__tentative__render_ingame) + return _internal___tentative__render_ingame(); } -inline void Icon_trigger::_internal_set_reset_length(float value) { +inline void Icon::_internal_set___tentative__render_ingame(bool value) { - reset_length_ = value; + __tentative__render_ingame_ = value; } -inline void Icon_trigger::set_reset_length(float value) { - _internal_set_reset_length(value); - // @@protoc_insertion_point(field_set:Proto_Node.Icon.trigger.reset_length) +inline void Icon::set___tentative__render_ingame(bool value) { + _internal_set___tentative__render_ingame(value); + // @@protoc_insertion_point(field_set:Icon.__tentative__render_ingame) } -// float range = 11; -inline void Icon_trigger::clear_range() { - range_ = 0; +// bool __tentative__render_on_map = 2050; +inline void Icon::clear___tentative__render_on_map() { + __tentative__render_on_map_ = false; } -inline float Icon_trigger::_internal_range() const { - return range_; +inline bool Icon::_internal___tentative__render_on_map() const { + return __tentative__render_on_map_; } -inline float Icon_trigger::range() const { - // @@protoc_insertion_point(field_get:Proto_Node.Icon.trigger.range) - return _internal_range(); +inline bool Icon::__tentative__render_on_map() const { + // @@protoc_insertion_point(field_get:Icon.__tentative__render_on_map) + return _internal___tentative__render_on_map(); } -inline void Icon_trigger::_internal_set_range(float value) { +inline void Icon::_internal_set___tentative__render_on_map(bool value) { - range_ = value; + __tentative__render_on_map_ = value; } -inline void Icon_trigger::set_range(float value) { - _internal_set_range(value); - // @@protoc_insertion_point(field_set:Proto_Node.Icon.trigger.range) +inline void Icon::set___tentative__render_on_map(bool value) { + _internal_set___tentative__render_on_map(value); + // @@protoc_insertion_point(field_set:Icon.__tentative__render_on_map) } -// .Proto_Node.Category action_hide_category = 12; -inline bool Icon_trigger::_internal_has_action_hide_category() const { - return this != internal_default_instance() && action_hide_category_ != nullptr; +// bool __tentative__render_on_minimap = 2051; +inline void Icon::clear___tentative__render_on_minimap() { + __tentative__render_on_minimap_ = false; } -inline bool Icon_trigger::has_action_hide_category() const { - return _internal_has_action_hide_category(); +inline bool Icon::_internal___tentative__render_on_minimap() const { + return __tentative__render_on_minimap_; } -inline void Icon_trigger::clear_action_hide_category() { - if (GetArena() == nullptr && action_hide_category_ != nullptr) { - delete action_hide_category_; +inline bool Icon::__tentative__render_on_minimap() const { + // @@protoc_insertion_point(field_get:Icon.__tentative__render_on_minimap) + return _internal___tentative__render_on_minimap(); +} +inline void Icon::_internal_set___tentative__render_on_minimap(bool value) { + + __tentative__render_on_minimap_ = value; +} +inline void Icon::set___tentative__render_on_minimap(bool value) { + _internal_set___tentative__render_on_minimap(value); + // @@protoc_insertion_point(field_set:Icon.__tentative__render_on_minimap) +} + +// string bhdraft__schedule = 2052; +inline void Icon::clear_bhdraft__schedule() { + bhdraft__schedule_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline const std::string& Icon::bhdraft__schedule() const { + // @@protoc_insertion_point(field_get:Icon.bhdraft__schedule) + return _internal_bhdraft__schedule(); +} +inline void Icon::set_bhdraft__schedule(const std::string& value) { + _internal_set_bhdraft__schedule(value); + // @@protoc_insertion_point(field_set:Icon.bhdraft__schedule) +} +inline std::string* Icon::mutable_bhdraft__schedule() { + // @@protoc_insertion_point(field_mutable:Icon.bhdraft__schedule) + return _internal_mutable_bhdraft__schedule(); +} +inline const std::string& Icon::_internal_bhdraft__schedule() const { + return bhdraft__schedule_.Get(); +} +inline void Icon::_internal_set_bhdraft__schedule(const std::string& value) { + + bhdraft__schedule_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void Icon::set_bhdraft__schedule(std::string&& value) { + + bhdraft__schedule_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:Icon.bhdraft__schedule) +} +inline void Icon::set_bhdraft__schedule(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + bhdraft__schedule_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:Icon.bhdraft__schedule) +} +inline void Icon::set_bhdraft__schedule(const char* value, + size_t size) { + + bhdraft__schedule_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:Icon.bhdraft__schedule) +} +inline std::string* Icon::_internal_mutable_bhdraft__schedule() { + + return bhdraft__schedule_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* Icon::release_bhdraft__schedule() { + // @@protoc_insertion_point(field_release:Icon.bhdraft__schedule) + return bhdraft__schedule_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void Icon::set_allocated_bhdraft__schedule(std::string* bhdraft__schedule) { + if (bhdraft__schedule != nullptr) { + + } else { + } - action_hide_category_ = nullptr; + bhdraft__schedule_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), bhdraft__schedule, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:Icon.bhdraft__schedule) } -inline const ::Proto_Node::Category& Icon_trigger::_internal_action_hide_category() const { - const ::Proto_Node::Category* p = action_hide_category_; - return p != nullptr ? *p : *reinterpret_cast( - &::Proto_Node::_Category_default_instance_); +inline std::string* Icon::unsafe_arena_release_bhdraft__schedule() { + // @@protoc_insertion_point(field_unsafe_arena_release:Icon.bhdraft__schedule) + GOOGLE_DCHECK(GetArena() != nullptr); + + return bhdraft__schedule_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); } -inline const ::Proto_Node::Category& Icon_trigger::action_hide_category() const { - // @@protoc_insertion_point(field_get:Proto_Node.Icon.trigger.action_hide_category) - return _internal_action_hide_category(); +inline void Icon::unsafe_arena_set_allocated_bhdraft__schedule( + std::string* bhdraft__schedule) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (bhdraft__schedule != nullptr) { + + } else { + + } + bhdraft__schedule_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + bhdraft__schedule, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Icon.bhdraft__schedule) +} + +// float bhdraft__schedule_duration = 2053; +inline void Icon::clear_bhdraft__schedule_duration() { + bhdraft__schedule_duration_ = 0; +} +inline float Icon::_internal_bhdraft__schedule_duration() const { + return bhdraft__schedule_duration_; +} +inline float Icon::bhdraft__schedule_duration() const { + // @@protoc_insertion_point(field_get:Icon.bhdraft__schedule_duration) + return _internal_bhdraft__schedule_duration(); +} +inline void Icon::_internal_set_bhdraft__schedule_duration(float value) { + + bhdraft__schedule_duration_ = value; +} +inline void Icon::set_bhdraft__schedule_duration(float value) { + _internal_set_bhdraft__schedule_duration(value); + // @@protoc_insertion_point(field_set:Icon.bhdraft__schedule_duration) +} + +// ------------------------------------------------------------------- + +// RICHARDS + +// .Category category = 1; +inline bool RICHARDS::_internal_has_category() const { + return this != internal_default_instance() && category_ != nullptr; +} +inline bool RICHARDS::has_category() const { + return _internal_has_category(); +} +inline void RICHARDS::clear_category() { + if (GetArena() == nullptr && category_ != nullptr) { + delete category_; + } + category_ = nullptr; +} +inline const ::Category& RICHARDS::_internal_category() const { + const ::Category* p = category_; + return p != nullptr ? *p : *reinterpret_cast( + &::_Category_default_instance_); } -inline void Icon_trigger::unsafe_arena_set_allocated_action_hide_category( - ::Proto_Node::Category* action_hide_category) { +inline const ::Category& RICHARDS::category() const { + // @@protoc_insertion_point(field_get:RICHARDS.category) + return _internal_category(); +} +inline void RICHARDS::unsafe_arena_set_allocated_category( + ::Category* category) { if (GetArena() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(action_hide_category_); + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(category_); } - action_hide_category_ = action_hide_category; - if (action_hide_category) { + category_ = category; + if (category) { } else { } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Proto_Node.Icon.trigger.action_hide_category) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:RICHARDS.category) } -inline ::Proto_Node::Category* Icon_trigger::release_action_hide_category() { - auto temp = unsafe_arena_release_action_hide_category(); +inline ::Category* RICHARDS::release_category() { + auto temp = unsafe_arena_release_category(); if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } return temp; } -inline ::Proto_Node::Category* Icon_trigger::unsafe_arena_release_action_hide_category() { - // @@protoc_insertion_point(field_release:Proto_Node.Icon.trigger.action_hide_category) +inline ::Category* RICHARDS::unsafe_arena_release_category() { + // @@protoc_insertion_point(field_release:RICHARDS.category) - ::Proto_Node::Category* temp = action_hide_category_; - action_hide_category_ = nullptr; + ::Category* temp = category_; + category_ = nullptr; return temp; } -inline ::Proto_Node::Category* Icon_trigger::_internal_mutable_action_hide_category() { +inline ::Category* RICHARDS::_internal_mutable_category() { - if (action_hide_category_ == nullptr) { - auto* p = CreateMaybeMessage<::Proto_Node::Category>(GetArena()); - action_hide_category_ = p; + if (category_ == nullptr) { + auto* p = CreateMaybeMessage<::Category>(GetArena()); + category_ = p; } - return action_hide_category_; + return category_; } -inline ::Proto_Node::Category* Icon_trigger::mutable_action_hide_category() { - // @@protoc_insertion_point(field_mutable:Proto_Node.Icon.trigger.action_hide_category) - return _internal_mutable_action_hide_category(); +inline ::Category* RICHARDS::mutable_category() { + // @@protoc_insertion_point(field_mutable:RICHARDS.category) + return _internal_mutable_category(); } -inline void Icon_trigger::set_allocated_action_hide_category(::Proto_Node::Category* action_hide_category) { +inline void RICHARDS::set_allocated_category(::Category* category) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); if (message_arena == nullptr) { - delete action_hide_category_; + delete category_; } - if (action_hide_category) { + if (category) { ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(action_hide_category); + ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(category); if (message_arena != submessage_arena) { - action_hide_category = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, action_hide_category, submessage_arena); + category = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, category, submessage_arena); } } else { } - action_hide_category_ = action_hide_category; - // @@protoc_insertion_point(field_set_allocated:Proto_Node.Icon.trigger.action_hide_category) + category_ = category; + // @@protoc_insertion_point(field_set_allocated:RICHARDS.category) } -// .Proto_Node.Category action_show_category = 13; -inline bool Icon_trigger::_internal_has_action_show_category() const { - return this != internal_default_instance() && action_show_category_ != nullptr; +// .Texture texture = 2; +inline bool RICHARDS::_internal_has_texture() const { + return this != internal_default_instance() && texture_ != nullptr; } -inline bool Icon_trigger::has_action_show_category() const { - return _internal_has_action_show_category(); +inline bool RICHARDS::has_texture() const { + return _internal_has_texture(); } -inline void Icon_trigger::clear_action_show_category() { - if (GetArena() == nullptr && action_show_category_ != nullptr) { - delete action_show_category_; +inline void RICHARDS::clear_texture() { + if (GetArena() == nullptr && texture_ != nullptr) { + delete texture_; } - action_show_category_ = nullptr; + texture_ = nullptr; } -inline const ::Proto_Node::Category& Icon_trigger::_internal_action_show_category() const { - const ::Proto_Node::Category* p = action_show_category_; - return p != nullptr ? *p : *reinterpret_cast( - &::Proto_Node::_Category_default_instance_); +inline const ::Texture& RICHARDS::_internal_texture() const { + const ::Texture* p = texture_; + return p != nullptr ? *p : *reinterpret_cast( + &::_Texture_default_instance_); } -inline const ::Proto_Node::Category& Icon_trigger::action_show_category() const { - // @@protoc_insertion_point(field_get:Proto_Node.Icon.trigger.action_show_category) - return _internal_action_show_category(); +inline const ::Texture& RICHARDS::texture() const { + // @@protoc_insertion_point(field_get:RICHARDS.texture) + return _internal_texture(); } -inline void Icon_trigger::unsafe_arena_set_allocated_action_show_category( - ::Proto_Node::Category* action_show_category) { +inline void RICHARDS::unsafe_arena_set_allocated_texture( + ::Texture* texture) { if (GetArena() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(action_show_category_); + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(texture_); } - action_show_category_ = action_show_category; - if (action_show_category) { + texture_ = texture; + if (texture) { } else { } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Proto_Node.Icon.trigger.action_show_category) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:RICHARDS.texture) } -inline ::Proto_Node::Category* Icon_trigger::release_action_show_category() { - auto temp = unsafe_arena_release_action_show_category(); +inline ::Texture* RICHARDS::release_texture() { + auto temp = unsafe_arena_release_texture(); if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } return temp; } -inline ::Proto_Node::Category* Icon_trigger::unsafe_arena_release_action_show_category() { - // @@protoc_insertion_point(field_release:Proto_Node.Icon.trigger.action_show_category) +inline ::Texture* RICHARDS::unsafe_arena_release_texture() { + // @@protoc_insertion_point(field_release:RICHARDS.texture) - ::Proto_Node::Category* temp = action_show_category_; - action_show_category_ = nullptr; + ::Texture* temp = texture_; + texture_ = nullptr; return temp; } -inline ::Proto_Node::Category* Icon_trigger::_internal_mutable_action_show_category() { +inline ::Texture* RICHARDS::_internal_mutable_texture() { - if (action_show_category_ == nullptr) { - auto* p = CreateMaybeMessage<::Proto_Node::Category>(GetArena()); - action_show_category_ = p; + if (texture_ == nullptr) { + auto* p = CreateMaybeMessage<::Texture>(GetArena()); + texture_ = p; } - return action_show_category_; + return texture_; } -inline ::Proto_Node::Category* Icon_trigger::mutable_action_show_category() { - // @@protoc_insertion_point(field_mutable:Proto_Node.Icon.trigger.action_show_category) - return _internal_mutable_action_show_category(); +inline ::Texture* RICHARDS::mutable_texture() { + // @@protoc_insertion_point(field_mutable:RICHARDS.texture) + return _internal_mutable_texture(); } -inline void Icon_trigger::set_allocated_action_show_category(::Proto_Node::Category* action_show_category) { +inline void RICHARDS::set_allocated_texture(::Texture* texture) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); if (message_arena == nullptr) { - delete action_show_category_; + delete texture_; } - if (action_show_category) { + if (texture) { ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(action_show_category); + ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(texture); if (message_arena != submessage_arena) { - action_show_category = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, action_show_category, submessage_arena); + texture = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, texture, submessage_arena); } } else { } - action_show_category_ = action_show_category; - // @@protoc_insertion_point(field_set_allocated:Proto_Node.Icon.trigger.action_show_category) + texture_ = texture; + // @@protoc_insertion_point(field_set_allocated:RICHARDS.texture) } -// .Proto_Node.Category action_toggle_category = 14; -inline bool Icon_trigger::_internal_has_action_toggle_category() const { - return this != internal_default_instance() && action_toggle_category_ != nullptr; +// .GUID guid = 3; +inline bool RICHARDS::_internal_has_guid() const { + return this != internal_default_instance() && guid_ != nullptr; } -inline bool Icon_trigger::has_action_toggle_category() const { - return _internal_has_action_toggle_category(); +inline bool RICHARDS::has_guid() const { + return _internal_has_guid(); } -inline void Icon_trigger::clear_action_toggle_category() { - if (GetArena() == nullptr && action_toggle_category_ != nullptr) { - delete action_toggle_category_; +inline void RICHARDS::clear_guid() { + if (GetArena() == nullptr && guid_ != nullptr) { + delete guid_; } - action_toggle_category_ = nullptr; + guid_ = nullptr; } -inline const ::Proto_Node::Category& Icon_trigger::_internal_action_toggle_category() const { - const ::Proto_Node::Category* p = action_toggle_category_; - return p != nullptr ? *p : *reinterpret_cast( - &::Proto_Node::_Category_default_instance_); +inline const ::GUID& RICHARDS::_internal_guid() const { + const ::GUID* p = guid_; + return p != nullptr ? *p : *reinterpret_cast( + &::_GUID_default_instance_); } -inline const ::Proto_Node::Category& Icon_trigger::action_toggle_category() const { - // @@protoc_insertion_point(field_get:Proto_Node.Icon.trigger.action_toggle_category) - return _internal_action_toggle_category(); +inline const ::GUID& RICHARDS::guid() const { + // @@protoc_insertion_point(field_get:RICHARDS.guid) + return _internal_guid(); } -inline void Icon_trigger::unsafe_arena_set_allocated_action_toggle_category( - ::Proto_Node::Category* action_toggle_category) { +inline void RICHARDS::unsafe_arena_set_allocated_guid( + ::GUID* guid) { if (GetArena() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(action_toggle_category_); + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(guid_); } - action_toggle_category_ = action_toggle_category; - if (action_toggle_category) { + guid_ = guid; + if (guid) { } else { } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Proto_Node.Icon.trigger.action_toggle_category) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:RICHARDS.guid) } -inline ::Proto_Node::Category* Icon_trigger::release_action_toggle_category() { - auto temp = unsafe_arena_release_action_toggle_category(); +inline ::GUID* RICHARDS::release_guid() { + auto temp = unsafe_arena_release_guid(); if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } return temp; } -inline ::Proto_Node::Category* Icon_trigger::unsafe_arena_release_action_toggle_category() { - // @@protoc_insertion_point(field_release:Proto_Node.Icon.trigger.action_toggle_category) +inline ::GUID* RICHARDS::unsafe_arena_release_guid() { + // @@protoc_insertion_point(field_release:RICHARDS.guid) - ::Proto_Node::Category* temp = action_toggle_category_; - action_toggle_category_ = nullptr; + ::GUID* temp = guid_; + guid_ = nullptr; return temp; } -inline ::Proto_Node::Category* Icon_trigger::_internal_mutable_action_toggle_category() { +inline ::GUID* RICHARDS::_internal_mutable_guid() { - if (action_toggle_category_ == nullptr) { - auto* p = CreateMaybeMessage<::Proto_Node::Category>(GetArena()); - action_toggle_category_ = p; + if (guid_ == nullptr) { + auto* p = CreateMaybeMessage<::GUID>(GetArena()); + guid_ = p; } - return action_toggle_category_; + return guid_; } -inline ::Proto_Node::Category* Icon_trigger::mutable_action_toggle_category() { - // @@protoc_insertion_point(field_mutable:Proto_Node.Icon.trigger.action_toggle_category) - return _internal_mutable_action_toggle_category(); +inline ::GUID* RICHARDS::mutable_guid() { + // @@protoc_insertion_point(field_mutable:RICHARDS.guid) + return _internal_mutable_guid(); } -inline void Icon_trigger::set_allocated_action_toggle_category(::Proto_Node::Category* action_toggle_category) { +inline void RICHARDS::set_allocated_guid(::GUID* guid) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); if (message_arena == nullptr) { - delete action_toggle_category_; + delete guid_; } - if (action_toggle_category) { + if (guid) { ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(action_toggle_category); + ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(guid); if (message_arena != submessage_arena) { - action_toggle_category = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, action_toggle_category, submessage_arena); + guid = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, guid, submessage_arena); } } else { } - action_toggle_category_ = action_toggle_category; - // @@protoc_insertion_point(field_set_allocated:Proto_Node.Icon.trigger.action_toggle_category) + guid_ = guid; + // @@protoc_insertion_point(field_set_allocated:RICHARDS.guid) } -// ------------------------------------------------------------------- - -// Icon - -// fixed32 achievement_bit = 1; -inline void Icon::clear_achievement_bit() { - achievement_bit_ = 0u; +// int32 map_id = 4; +inline void RICHARDS::clear_map_id() { + map_id_ = 0; } -inline ::PROTOBUF_NAMESPACE_ID::uint32 Icon::_internal_achievement_bit() const { - return achievement_bit_; +inline ::PROTOBUF_NAMESPACE_ID::int32 RICHARDS::_internal_map_id() const { + return map_id_; } -inline ::PROTOBUF_NAMESPACE_ID::uint32 Icon::achievement_bit() const { - // @@protoc_insertion_point(field_get:Proto_Node.Icon.achievement_bit) - return _internal_achievement_bit(); +inline ::PROTOBUF_NAMESPACE_ID::int32 RICHARDS::map_id() const { + // @@protoc_insertion_point(field_get:RICHARDS.map_id) + return _internal_map_id(); } -inline void Icon::_internal_set_achievement_bit(::PROTOBUF_NAMESPACE_ID::uint32 value) { +inline void RICHARDS::_internal_set_map_id(::PROTOBUF_NAMESPACE_ID::int32 value) { - achievement_bit_ = value; + map_id_ = value; } -inline void Icon::set_achievement_bit(::PROTOBUF_NAMESPACE_ID::uint32 value) { - _internal_set_achievement_bit(value); - // @@protoc_insertion_point(field_set:Proto_Node.Icon.achievement_bit) -} - -// int32 achievement_id = 2; -inline void Icon::clear_achievement_id() { - achievement_id_ = 0; -} -inline ::PROTOBUF_NAMESPACE_ID::int32 Icon::_internal_achievement_id() const { - return achievement_id_; -} -inline ::PROTOBUF_NAMESPACE_ID::int32 Icon::achievement_id() const { - // @@protoc_insertion_point(field_get:Proto_Node.Icon.achievement_id) - return _internal_achievement_id(); -} -inline void Icon::_internal_set_achievement_id(::PROTOBUF_NAMESPACE_ID::int32 value) { - - achievement_id_ = value; -} -inline void Icon::set_achievement_id(::PROTOBUF_NAMESPACE_ID::int32 value) { - _internal_set_achievement_id(value); - // @@protoc_insertion_point(field_set:Proto_Node.Icon.achievement_id) -} - -// float alpha = 3; -inline void Icon::clear_alpha() { - alpha_ = 0; -} -inline float Icon::_internal_alpha() const { - return alpha_; -} -inline float Icon::alpha() const { - // @@protoc_insertion_point(field_get:Proto_Node.Icon.alpha) - return _internal_alpha(); -} -inline void Icon::_internal_set_alpha(float value) { - - alpha_ = value; -} -inline void Icon::set_alpha(float value) { - _internal_set_alpha(value); - // @@protoc_insertion_point(field_set:Proto_Node.Icon.alpha) -} - -// bool can_fade = 4; -inline void Icon::clear_can_fade() { - can_fade_ = false; -} -inline bool Icon::_internal_can_fade() const { - return can_fade_; -} -inline bool Icon::can_fade() const { - // @@protoc_insertion_point(field_get:Proto_Node.Icon.can_fade) - return _internal_can_fade(); -} -inline void Icon::_internal_set_can_fade(bool value) { - - can_fade_ = value; -} -inline void Icon::set_can_fade(bool value) { - _internal_set_can_fade(value); - // @@protoc_insertion_point(field_set:Proto_Node.Icon.can_fade) +inline void RICHARDS::set_map_id(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_map_id(value); + // @@protoc_insertion_point(field_set:RICHARDS.map_id) } // float distance_fade_end = 5; -inline void Icon::clear_distance_fade_end() { +inline void RICHARDS::clear_distance_fade_end() { distance_fade_end_ = 0; } -inline float Icon::_internal_distance_fade_end() const { +inline float RICHARDS::_internal_distance_fade_end() const { return distance_fade_end_; } -inline float Icon::distance_fade_end() const { - // @@protoc_insertion_point(field_get:Proto_Node.Icon.distance_fade_end) +inline float RICHARDS::distance_fade_end() const { + // @@protoc_insertion_point(field_get:RICHARDS.distance_fade_end) return _internal_distance_fade_end(); } -inline void Icon::_internal_set_distance_fade_end(float value) { +inline void RICHARDS::_internal_set_distance_fade_end(float value) { distance_fade_end_ = value; } -inline void Icon::set_distance_fade_end(float value) { +inline void RICHARDS::set_distance_fade_end(float value) { _internal_set_distance_fade_end(value); - // @@protoc_insertion_point(field_set:Proto_Node.Icon.distance_fade_end) + // @@protoc_insertion_point(field_set:RICHARDS.distance_fade_end) } // float distance_fade_start = 6; -inline void Icon::clear_distance_fade_start() { +inline void RICHARDS::clear_distance_fade_start() { distance_fade_start_ = 0; } -inline float Icon::_internal_distance_fade_start() const { +inline float RICHARDS::_internal_distance_fade_start() const { return distance_fade_start_; } -inline float Icon::distance_fade_start() const { - // @@protoc_insertion_point(field_get:Proto_Node.Icon.distance_fade_start) +inline float RICHARDS::distance_fade_start() const { + // @@protoc_insertion_point(field_get:RICHARDS.distance_fade_start) return _internal_distance_fade_start(); } -inline void Icon::_internal_set_distance_fade_start(float value) { +inline void RICHARDS::_internal_set_distance_fade_start(float value) { distance_fade_start_ = value; } -inline void Icon::set_distance_fade_start(float value) { +inline void RICHARDS::set_distance_fade_start(float value) { _internal_set_distance_fade_start(value); - // @@protoc_insertion_point(field_set:Proto_Node.Icon.distance_fade_start) + // @@protoc_insertion_point(field_set:RICHARDS.distance_fade_start) } -// float height_offset = 7; -inline void Icon::clear_height_offset() { - height_offset_ = 0; -} -inline float Icon::_internal_height_offset() const { - return height_offset_; +// .TrailData trail_data = 7; +inline bool RICHARDS::_internal_has_trail_data() const { + return this != internal_default_instance() && trail_data_ != nullptr; } -inline float Icon::height_offset() const { - // @@protoc_insertion_point(field_get:Proto_Node.Icon.height_offset) - return _internal_height_offset(); +inline bool RICHARDS::has_trail_data() const { + return _internal_has_trail_data(); } -inline void Icon::_internal_set_height_offset(float value) { - - height_offset_ = value; +inline void RICHARDS::clear_trail_data() { + if (GetArena() == nullptr && trail_data_ != nullptr) { + delete trail_data_; + } + trail_data_ = nullptr; } -inline void Icon::set_height_offset(float value) { - _internal_set_height_offset(value); - // @@protoc_insertion_point(field_set:Proto_Node.Icon.height_offset) +inline const ::TrailData& RICHARDS::_internal_trail_data() const { + const ::TrailData* p = trail_data_; + return p != nullptr ? *p : *reinterpret_cast( + &::_TrailData_default_instance_); } - -// float __tentative__scale = 8; -inline void Icon::clear___tentative__scale() { - __tentative__scale_ = 0; +inline const ::TrailData& RICHARDS::trail_data() const { + // @@protoc_insertion_point(field_get:RICHARDS.trail_data) + return _internal_trail_data(); } -inline float Icon::_internal___tentative__scale() const { - return __tentative__scale_; +inline void RICHARDS::unsafe_arena_set_allocated_trail_data( + ::TrailData* trail_data) { + if (GetArena() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(trail_data_); + } + trail_data_ = trail_data; + if (trail_data) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:RICHARDS.trail_data) } -inline float Icon::__tentative__scale() const { - // @@protoc_insertion_point(field_get:Proto_Node.Icon.__tentative__scale) - return _internal___tentative__scale(); +inline ::TrailData* RICHARDS::release_trail_data() { + auto temp = unsafe_arena_release_trail_data(); + if (GetArena() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + return temp; } -inline void Icon::_internal_set___tentative__scale(float value) { +inline ::TrailData* RICHARDS::unsafe_arena_release_trail_data() { + // @@protoc_insertion_point(field_release:RICHARDS.trail_data) - __tentative__scale_ = value; -} -inline void Icon::set___tentative__scale(float value) { - _internal_set___tentative__scale(value); - // @@protoc_insertion_point(field_set:Proto_Node.Icon.__tentative__scale) -} - -// int32 map_display_size = 9; -inline void Icon::clear_map_display_size() { - map_display_size_ = 0; -} -inline ::PROTOBUF_NAMESPACE_ID::int32 Icon::_internal_map_display_size() const { - return map_display_size_; -} -inline ::PROTOBUF_NAMESPACE_ID::int32 Icon::map_display_size() const { - // @@protoc_insertion_point(field_get:Proto_Node.Icon.map_display_size) - return _internal_map_display_size(); + ::TrailData* temp = trail_data_; + trail_data_ = nullptr; + return temp; } -inline void Icon::_internal_set_map_display_size(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline ::TrailData* RICHARDS::_internal_mutable_trail_data() { - map_display_size_ = value; + if (trail_data_ == nullptr) { + auto* p = CreateMaybeMessage<::TrailData>(GetArena()); + trail_data_ = p; + } + return trail_data_; } -inline void Icon::set_map_display_size(::PROTOBUF_NAMESPACE_ID::int32 value) { - _internal_set_map_display_size(value); - // @@protoc_insertion_point(field_set:Proto_Node.Icon.map_display_size) +inline ::TrailData* RICHARDS::mutable_trail_data() { + // @@protoc_insertion_point(field_mutable:RICHARDS.trail_data) + return _internal_mutable_trail_data(); +} +inline void RICHARDS::set_allocated_trail_data(::TrailData* trail_data) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); + if (message_arena == nullptr) { + delete trail_data_; + } + if (trail_data) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(trail_data); + if (message_arena != submessage_arena) { + trail_data = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, trail_data, submessage_arena); + } + + } else { + + } + trail_data_ = trail_data; + // @@protoc_insertion_point(field_set_allocated:RICHARDS.trail_data) } -// int32 map_id = 10; -inline void Icon::clear_map_id() { - map_id_ = 0; +// float animation_speed = 8; +inline void RICHARDS::clear_animation_speed() { + animation_speed_ = 0; } -inline ::PROTOBUF_NAMESPACE_ID::int32 Icon::_internal_map_id() const { - return map_id_; +inline float RICHARDS::_internal_animation_speed() const { + return animation_speed_; } -inline ::PROTOBUF_NAMESPACE_ID::int32 Icon::map_id() const { - // @@protoc_insertion_point(field_get:Proto_Node.Icon.map_id) - return _internal_map_id(); +inline float RICHARDS::animation_speed() const { + // @@protoc_insertion_point(field_get:RICHARDS.animation_speed) + return _internal_animation_speed(); } -inline void Icon::_internal_set_map_id(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline void RICHARDS::_internal_set_animation_speed(float value) { - map_id_ = value; + animation_speed_ = value; } -inline void Icon::set_map_id(::PROTOBUF_NAMESPACE_ID::int32 value) { - _internal_set_map_id(value); - // @@protoc_insertion_point(field_set:Proto_Node.Icon.map_id) +inline void RICHARDS::set_animation_speed(float value) { + _internal_set_animation_speed(value); + // @@protoc_insertion_point(field_set:RICHARDS.animation_speed) } -// int32 maximum_size_on_screen = 11; -inline void Icon::clear_maximum_size_on_screen() { - maximum_size_on_screen_ = 0; +// .CullChirality cull_chirality = 9; +inline void RICHARDS::clear_cull_chirality() { + cull_chirality_ = 0; } -inline ::PROTOBUF_NAMESPACE_ID::int32 Icon::_internal_maximum_size_on_screen() const { - return maximum_size_on_screen_; +inline ::CullChirality RICHARDS::_internal_cull_chirality() const { + return static_cast< ::CullChirality >(cull_chirality_); } -inline ::PROTOBUF_NAMESPACE_ID::int32 Icon::maximum_size_on_screen() const { - // @@protoc_insertion_point(field_get:Proto_Node.Icon.maximum_size_on_screen) - return _internal_maximum_size_on_screen(); +inline ::CullChirality RICHARDS::cull_chirality() const { + // @@protoc_insertion_point(field_get:RICHARDS.cull_chirality) + return _internal_cull_chirality(); } -inline void Icon::_internal_set_maximum_size_on_screen(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline void RICHARDS::_internal_set_cull_chirality(::CullChirality value) { - maximum_size_on_screen_ = value; + cull_chirality_ = value; } -inline void Icon::set_maximum_size_on_screen(::PROTOBUF_NAMESPACE_ID::int32 value) { - _internal_set_maximum_size_on_screen(value); - // @@protoc_insertion_point(field_set:Proto_Node.Icon.maximum_size_on_screen) +inline void RICHARDS::set_cull_chirality(::CullChirality value) { + _internal_set_cull_chirality(value); + // @@protoc_insertion_point(field_set:RICHARDS.cull_chirality) } -// int32 minimum_size_on_screen = 12; -inline void Icon::clear_minimum_size_on_screen() { - minimum_size_on_screen_ = 0; +// fixed32 achievement_bit = 16; +inline void RICHARDS::clear_achievement_bit() { + achievement_bit_ = 0u; } -inline ::PROTOBUF_NAMESPACE_ID::int32 Icon::_internal_minimum_size_on_screen() const { - return minimum_size_on_screen_; +inline ::PROTOBUF_NAMESPACE_ID::uint32 RICHARDS::_internal_achievement_bit() const { + return achievement_bit_; } -inline ::PROTOBUF_NAMESPACE_ID::int32 Icon::minimum_size_on_screen() const { - // @@protoc_insertion_point(field_get:Proto_Node.Icon.minimum_size_on_screen) - return _internal_minimum_size_on_screen(); +inline ::PROTOBUF_NAMESPACE_ID::uint32 RICHARDS::achievement_bit() const { + // @@protoc_insertion_point(field_get:RICHARDS.achievement_bit) + return _internal_achievement_bit(); } -inline void Icon::_internal_set_minimum_size_on_screen(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline void RICHARDS::_internal_set_achievement_bit(::PROTOBUF_NAMESPACE_ID::uint32 value) { - minimum_size_on_screen_ = value; + achievement_bit_ = value; } -inline void Icon::set_minimum_size_on_screen(::PROTOBUF_NAMESPACE_ID::int32 value) { - _internal_set_minimum_size_on_screen(value); - // @@protoc_insertion_point(field_set:Proto_Node.Icon.minimum_size_on_screen) +inline void RICHARDS::set_achievement_bit(::PROTOBUF_NAMESPACE_ID::uint32 value) { + _internal_set_achievement_bit(value); + // @@protoc_insertion_point(field_set:RICHARDS.achievement_bit) } -// bool __tentative__render_ingame = 13; -inline void Icon::clear___tentative__render_ingame() { - __tentative__render_ingame_ = false; +// int32 achievement_id = 17; +inline void RICHARDS::clear_achievement_id() { + achievement_id_ = 0; } -inline bool Icon::_internal___tentative__render_ingame() const { - return __tentative__render_ingame_; +inline ::PROTOBUF_NAMESPACE_ID::int32 RICHARDS::_internal_achievement_id() const { + return achievement_id_; } -inline bool Icon::__tentative__render_ingame() const { - // @@protoc_insertion_point(field_get:Proto_Node.Icon.__tentative__render_ingame) - return _internal___tentative__render_ingame(); +inline ::PROTOBUF_NAMESPACE_ID::int32 RICHARDS::achievement_id() const { + // @@protoc_insertion_point(field_get:RICHARDS.achievement_id) + return _internal_achievement_id(); } -inline void Icon::_internal_set___tentative__render_ingame(bool value) { +inline void RICHARDS::_internal_set_achievement_id(::PROTOBUF_NAMESPACE_ID::int32 value) { - __tentative__render_ingame_ = value; + achievement_id_ = value; } -inline void Icon::set___tentative__render_ingame(bool value) { - _internal_set___tentative__render_ingame(value); - // @@protoc_insertion_point(field_set:Proto_Node.Icon.__tentative__render_ingame) +inline void RICHARDS::set_achievement_id(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_achievement_id(value); + // @@protoc_insertion_point(field_set:RICHARDS.achievement_id) } -// bool __tentative__render_on_map = 14; -inline void Icon::clear___tentative__render_on_map() { - __tentative__render_on_map_ = false; +// float alpha = 18; +inline void RICHARDS::clear_alpha() { + alpha_ = 0; } -inline bool Icon::_internal___tentative__render_on_map() const { - return __tentative__render_on_map_; +inline float RICHARDS::_internal_alpha() const { + return alpha_; } -inline bool Icon::__tentative__render_on_map() const { - // @@protoc_insertion_point(field_get:Proto_Node.Icon.__tentative__render_on_map) - return _internal___tentative__render_on_map(); +inline float RICHARDS::alpha() const { + // @@protoc_insertion_point(field_get:RICHARDS.alpha) + return _internal_alpha(); } -inline void Icon::_internal_set___tentative__render_on_map(bool value) { +inline void RICHARDS::_internal_set_alpha(float value) { - __tentative__render_on_map_ = value; + alpha_ = value; } -inline void Icon::set___tentative__render_on_map(bool value) { - _internal_set___tentative__render_on_map(value); - // @@protoc_insertion_point(field_set:Proto_Node.Icon.__tentative__render_on_map) +inline void RICHARDS::set_alpha(float value) { + _internal_set_alpha(value); + // @@protoc_insertion_point(field_set:RICHARDS.alpha) } -// bool __tentative__render_on_minimap = 15; -inline void Icon::clear___tentative__render_on_minimap() { - __tentative__render_on_minimap_ = false; +// bool can_fade = 19; +inline void RICHARDS::clear_can_fade() { + can_fade_ = false; } -inline bool Icon::_internal___tentative__render_on_minimap() const { - return __tentative__render_on_minimap_; +inline bool RICHARDS::_internal_can_fade() const { + return can_fade_; } -inline bool Icon::__tentative__render_on_minimap() const { - // @@protoc_insertion_point(field_get:Proto_Node.Icon.__tentative__render_on_minimap) - return _internal___tentative__render_on_minimap(); +inline bool RICHARDS::can_fade() const { + // @@protoc_insertion_point(field_get:RICHARDS.can_fade) + return _internal_can_fade(); } -inline void Icon::_internal_set___tentative__render_on_minimap(bool value) { +inline void RICHARDS::_internal_set_can_fade(bool value) { - __tentative__render_on_minimap_ = value; + can_fade_ = value; } -inline void Icon::set___tentative__render_on_minimap(bool value) { - _internal_set___tentative__render_on_minimap(value); - // @@protoc_insertion_point(field_set:Proto_Node.Icon.__tentative__render_on_minimap) +inline void RICHARDS::set_can_fade(bool value) { + _internal_set_can_fade(value); + // @@protoc_insertion_point(field_set:RICHARDS.can_fade) } -// bool scale_on_map_with_zoom = 16; -inline void Icon::clear_scale_on_map_with_zoom() { - scale_on_map_with_zoom_ = false; +// bool is_wall = 22; +inline void RICHARDS::clear_is_wall() { + is_wall_ = false; } -inline bool Icon::_internal_scale_on_map_with_zoom() const { - return scale_on_map_with_zoom_; +inline bool RICHARDS::_internal_is_wall() const { + return is_wall_; } -inline bool Icon::scale_on_map_with_zoom() const { - // @@protoc_insertion_point(field_get:Proto_Node.Icon.scale_on_map_with_zoom) - return _internal_scale_on_map_with_zoom(); +inline bool RICHARDS::is_wall() const { + // @@protoc_insertion_point(field_get:RICHARDS.is_wall) + return _internal_is_wall(); } -inline void Icon::_internal_set_scale_on_map_with_zoom(bool value) { +inline void RICHARDS::_internal_set_is_wall(bool value) { - scale_on_map_with_zoom_ = value; + is_wall_ = value; } -inline void Icon::set_scale_on_map_with_zoom(bool value) { - _internal_set_scale_on_map_with_zoom(value); - // @@protoc_insertion_point(field_set:Proto_Node.Icon.scale_on_map_with_zoom) +inline void RICHARDS::set_is_wall(bool value) { + _internal_set_is_wall(value); + // @@protoc_insertion_point(field_set:RICHARDS.is_wall) } -// string bhdraft__schedule = 17; -inline void Icon::clear_bhdraft__schedule() { +// string bhdraft__schedule = 23; +inline void RICHARDS::clear_bhdraft__schedule() { bhdraft__schedule_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } -inline const std::string& Icon::bhdraft__schedule() const { - // @@protoc_insertion_point(field_get:Proto_Node.Icon.bhdraft__schedule) +inline const std::string& RICHARDS::bhdraft__schedule() const { + // @@protoc_insertion_point(field_get:RICHARDS.bhdraft__schedule) return _internal_bhdraft__schedule(); } -inline void Icon::set_bhdraft__schedule(const std::string& value) { +inline void RICHARDS::set_bhdraft__schedule(const std::string& value) { _internal_set_bhdraft__schedule(value); - // @@protoc_insertion_point(field_set:Proto_Node.Icon.bhdraft__schedule) + // @@protoc_insertion_point(field_set:RICHARDS.bhdraft__schedule) } -inline std::string* Icon::mutable_bhdraft__schedule() { - // @@protoc_insertion_point(field_mutable:Proto_Node.Icon.bhdraft__schedule) +inline std::string* RICHARDS::mutable_bhdraft__schedule() { + // @@protoc_insertion_point(field_mutable:RICHARDS.bhdraft__schedule) return _internal_mutable_bhdraft__schedule(); } -inline const std::string& Icon::_internal_bhdraft__schedule() const { +inline const std::string& RICHARDS::_internal_bhdraft__schedule() const { return bhdraft__schedule_.Get(); } -inline void Icon::_internal_set_bhdraft__schedule(const std::string& value) { +inline void RICHARDS::_internal_set_bhdraft__schedule(const std::string& value) { bhdraft__schedule_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); } -inline void Icon::set_bhdraft__schedule(std::string&& value) { +inline void RICHARDS::set_bhdraft__schedule(std::string&& value) { bhdraft__schedule_.Set( &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:Proto_Node.Icon.bhdraft__schedule) + // @@protoc_insertion_point(field_set_rvalue:RICHARDS.bhdraft__schedule) } -inline void Icon::set_bhdraft__schedule(const char* value) { +inline void RICHARDS::set_bhdraft__schedule(const char* value) { GOOGLE_DCHECK(value != nullptr); bhdraft__schedule_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:Proto_Node.Icon.bhdraft__schedule) + // @@protoc_insertion_point(field_set_char:RICHARDS.bhdraft__schedule) } -inline void Icon::set_bhdraft__schedule(const char* value, +inline void RICHARDS::set_bhdraft__schedule(const char* value, size_t size) { bhdraft__schedule_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:Proto_Node.Icon.bhdraft__schedule) + // @@protoc_insertion_point(field_set_pointer:RICHARDS.bhdraft__schedule) } -inline std::string* Icon::_internal_mutable_bhdraft__schedule() { +inline std::string* RICHARDS::_internal_mutable_bhdraft__schedule() { return bhdraft__schedule_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } -inline std::string* Icon::release_bhdraft__schedule() { - // @@protoc_insertion_point(field_release:Proto_Node.Icon.bhdraft__schedule) +inline std::string* RICHARDS::release_bhdraft__schedule() { + // @@protoc_insertion_point(field_release:RICHARDS.bhdraft__schedule) return bhdraft__schedule_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } -inline void Icon::set_allocated_bhdraft__schedule(std::string* bhdraft__schedule) { +inline void RICHARDS::set_allocated_bhdraft__schedule(std::string* bhdraft__schedule) { if (bhdraft__schedule != nullptr) { } else { @@ -6689,16 +6829,16 @@ inline void Icon::set_allocated_bhdraft__schedule(std::string* bhdraft__schedule } bhdraft__schedule_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), bhdraft__schedule, GetArena()); - // @@protoc_insertion_point(field_set_allocated:Proto_Node.Icon.bhdraft__schedule) + // @@protoc_insertion_point(field_set_allocated:RICHARDS.bhdraft__schedule) } -inline std::string* Icon::unsafe_arena_release_bhdraft__schedule() { - // @@protoc_insertion_point(field_unsafe_arena_release:Proto_Node.Icon.bhdraft__schedule) +inline std::string* RICHARDS::unsafe_arena_release_bhdraft__schedule() { + // @@protoc_insertion_point(field_unsafe_arena_release:RICHARDS.bhdraft__schedule) GOOGLE_DCHECK(GetArena() != nullptr); return bhdraft__schedule_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } -inline void Icon::unsafe_arena_set_allocated_bhdraft__schedule( +inline void RICHARDS::unsafe_arena_set_allocated_bhdraft__schedule( std::string* bhdraft__schedule) { GOOGLE_DCHECK(GetArena() != nullptr); if (bhdraft__schedule != nullptr) { @@ -6706,249 +6846,1561 @@ inline void Icon::unsafe_arena_set_allocated_bhdraft__schedule( } else { } - bhdraft__schedule_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - bhdraft__schedule, GetArena()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Proto_Node.Icon.bhdraft__schedule) -} - -// float bhdraft__schedule_duration = 18; -inline void Icon::clear_bhdraft__schedule_duration() { - bhdraft__schedule_duration_ = 0; + bhdraft__schedule_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + bhdraft__schedule, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:RICHARDS.bhdraft__schedule) +} + +// float bhdraft__schedule_duration = 24; +inline void RICHARDS::clear_bhdraft__schedule_duration() { + bhdraft__schedule_duration_ = 0; +} +inline float RICHARDS::_internal_bhdraft__schedule_duration() const { + return bhdraft__schedule_duration_; +} +inline float RICHARDS::bhdraft__schedule_duration() const { + // @@protoc_insertion_point(field_get:RICHARDS.bhdraft__schedule_duration) + return _internal_bhdraft__schedule_duration(); +} +inline void RICHARDS::_internal_set_bhdraft__schedule_duration(float value) { + + bhdraft__schedule_duration_ = value; +} +inline void RICHARDS::set_bhdraft__schedule_duration(float value) { + _internal_set_bhdraft__schedule_duration(value); + // @@protoc_insertion_point(field_set:RICHARDS.bhdraft__schedule_duration) +} + +// float scale = 25; +inline void RICHARDS::clear_scale() { + scale_ = 0; +} +inline float RICHARDS::_internal_scale() const { + return scale_; +} +inline float RICHARDS::scale() const { + // @@protoc_insertion_point(field_get:RICHARDS.scale) + return _internal_scale(); +} +inline void RICHARDS::_internal_set_scale(float value) { + + scale_ = value; +} +inline void RICHARDS::set_scale(float value) { + _internal_set_scale(value); + // @@protoc_insertion_point(field_set:RICHARDS.scale) +} + +// .Color color = 26; +inline bool RICHARDS::_internal_has_color() const { + return this != internal_default_instance() && color_ != nullptr; +} +inline bool RICHARDS::has_color() const { + return _internal_has_color(); +} +inline void RICHARDS::clear_color() { + if (GetArena() == nullptr && color_ != nullptr) { + delete color_; + } + color_ = nullptr; +} +inline const ::Color& RICHARDS::_internal_color() const { + const ::Color* p = color_; + return p != nullptr ? *p : *reinterpret_cast( + &::_Color_default_instance_); +} +inline const ::Color& RICHARDS::color() const { + // @@protoc_insertion_point(field_get:RICHARDS.color) + return _internal_color(); +} +inline void RICHARDS::unsafe_arena_set_allocated_color( + ::Color* color) { + if (GetArena() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(color_); + } + color_ = color; + if (color) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:RICHARDS.color) +} +inline ::Color* RICHARDS::release_color() { + auto temp = unsafe_arena_release_color(); + if (GetArena() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + return temp; +} +inline ::Color* RICHARDS::unsafe_arena_release_color() { + // @@protoc_insertion_point(field_release:RICHARDS.color) + + ::Color* temp = color_; + color_ = nullptr; + return temp; +} +inline ::Color* RICHARDS::_internal_mutable_color() { + + if (color_ == nullptr) { + auto* p = CreateMaybeMessage<::Color>(GetArena()); + color_ = p; + } + return color_; +} +inline ::Color* RICHARDS::mutable_color() { + // @@protoc_insertion_point(field_mutable:RICHARDS.color) + return _internal_mutable_color(); +} +inline void RICHARDS::set_allocated_color(::Color* color) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); + if (message_arena == nullptr) { + delete color_; + } + if (color) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(color); + if (message_arena != submessage_arena) { + color = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, color, submessage_arena); + } + + } else { + + } + color_ = color; + // @@protoc_insertion_point(field_set_allocated:RICHARDS.color) +} + +// .FestivalFilter festival_filter = 27; +inline bool RICHARDS::_internal_has_festival_filter() const { + return this != internal_default_instance() && festival_filter_ != nullptr; +} +inline bool RICHARDS::has_festival_filter() const { + return _internal_has_festival_filter(); +} +inline void RICHARDS::clear_festival_filter() { + if (GetArena() == nullptr && festival_filter_ != nullptr) { + delete festival_filter_; + } + festival_filter_ = nullptr; +} +inline const ::FestivalFilter& RICHARDS::_internal_festival_filter() const { + const ::FestivalFilter* p = festival_filter_; + return p != nullptr ? *p : *reinterpret_cast( + &::_FestivalFilter_default_instance_); +} +inline const ::FestivalFilter& RICHARDS::festival_filter() const { + // @@protoc_insertion_point(field_get:RICHARDS.festival_filter) + return _internal_festival_filter(); +} +inline void RICHARDS::unsafe_arena_set_allocated_festival_filter( + ::FestivalFilter* festival_filter) { + if (GetArena() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(festival_filter_); + } + festival_filter_ = festival_filter; + if (festival_filter) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:RICHARDS.festival_filter) +} +inline ::FestivalFilter* RICHARDS::release_festival_filter() { + auto temp = unsafe_arena_release_festival_filter(); + if (GetArena() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + return temp; +} +inline ::FestivalFilter* RICHARDS::unsafe_arena_release_festival_filter() { + // @@protoc_insertion_point(field_release:RICHARDS.festival_filter) + + ::FestivalFilter* temp = festival_filter_; + festival_filter_ = nullptr; + return temp; +} +inline ::FestivalFilter* RICHARDS::_internal_mutable_festival_filter() { + + if (festival_filter_ == nullptr) { + auto* p = CreateMaybeMessage<::FestivalFilter>(GetArena()); + festival_filter_ = p; + } + return festival_filter_; +} +inline ::FestivalFilter* RICHARDS::mutable_festival_filter() { + // @@protoc_insertion_point(field_mutable:RICHARDS.festival_filter) + return _internal_mutable_festival_filter(); +} +inline void RICHARDS::set_allocated_festival_filter(::FestivalFilter* festival_filter) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); + if (message_arena == nullptr) { + delete festival_filter_; + } + if (festival_filter) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(festival_filter); + if (message_arena != submessage_arena) { + festival_filter = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, festival_filter, submessage_arena); + } + + } else { + + } + festival_filter_ = festival_filter; + // @@protoc_insertion_point(field_set_allocated:RICHARDS.festival_filter) +} + +// .MapTypeFilter map_type_filter = 28; +inline bool RICHARDS::_internal_has_map_type_filter() const { + return this != internal_default_instance() && map_type_filter_ != nullptr; +} +inline bool RICHARDS::has_map_type_filter() const { + return _internal_has_map_type_filter(); +} +inline void RICHARDS::clear_map_type_filter() { + if (GetArena() == nullptr && map_type_filter_ != nullptr) { + delete map_type_filter_; + } + map_type_filter_ = nullptr; +} +inline const ::MapTypeFilter& RICHARDS::_internal_map_type_filter() const { + const ::MapTypeFilter* p = map_type_filter_; + return p != nullptr ? *p : *reinterpret_cast( + &::_MapTypeFilter_default_instance_); +} +inline const ::MapTypeFilter& RICHARDS::map_type_filter() const { + // @@protoc_insertion_point(field_get:RICHARDS.map_type_filter) + return _internal_map_type_filter(); +} +inline void RICHARDS::unsafe_arena_set_allocated_map_type_filter( + ::MapTypeFilter* map_type_filter) { + if (GetArena() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(map_type_filter_); + } + map_type_filter_ = map_type_filter; + if (map_type_filter) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:RICHARDS.map_type_filter) +} +inline ::MapTypeFilter* RICHARDS::release_map_type_filter() { + auto temp = unsafe_arena_release_map_type_filter(); + if (GetArena() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + return temp; +} +inline ::MapTypeFilter* RICHARDS::unsafe_arena_release_map_type_filter() { + // @@protoc_insertion_point(field_release:RICHARDS.map_type_filter) + + ::MapTypeFilter* temp = map_type_filter_; + map_type_filter_ = nullptr; + return temp; +} +inline ::MapTypeFilter* RICHARDS::_internal_mutable_map_type_filter() { + + if (map_type_filter_ == nullptr) { + auto* p = CreateMaybeMessage<::MapTypeFilter>(GetArena()); + map_type_filter_ = p; + } + return map_type_filter_; +} +inline ::MapTypeFilter* RICHARDS::mutable_map_type_filter() { + // @@protoc_insertion_point(field_mutable:RICHARDS.map_type_filter) + return _internal_mutable_map_type_filter(); +} +inline void RICHARDS::set_allocated_map_type_filter(::MapTypeFilter* map_type_filter) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); + if (message_arena == nullptr) { + delete map_type_filter_; + } + if (map_type_filter) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(map_type_filter); + if (message_arena != submessage_arena) { + map_type_filter = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, map_type_filter, submessage_arena); + } + + } else { + + } + map_type_filter_ = map_type_filter; + // @@protoc_insertion_point(field_set_allocated:RICHARDS.map_type_filter) +} + +// .MountFilter mount_filter = 29; +inline bool RICHARDS::_internal_has_mount_filter() const { + return this != internal_default_instance() && mount_filter_ != nullptr; +} +inline bool RICHARDS::has_mount_filter() const { + return _internal_has_mount_filter(); +} +inline void RICHARDS::clear_mount_filter() { + if (GetArena() == nullptr && mount_filter_ != nullptr) { + delete mount_filter_; + } + mount_filter_ = nullptr; +} +inline const ::MountFilter& RICHARDS::_internal_mount_filter() const { + const ::MountFilter* p = mount_filter_; + return p != nullptr ? *p : *reinterpret_cast( + &::_MountFilter_default_instance_); +} +inline const ::MountFilter& RICHARDS::mount_filter() const { + // @@protoc_insertion_point(field_get:RICHARDS.mount_filter) + return _internal_mount_filter(); +} +inline void RICHARDS::unsafe_arena_set_allocated_mount_filter( + ::MountFilter* mount_filter) { + if (GetArena() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(mount_filter_); + } + mount_filter_ = mount_filter; + if (mount_filter) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:RICHARDS.mount_filter) +} +inline ::MountFilter* RICHARDS::release_mount_filter() { + auto temp = unsafe_arena_release_mount_filter(); + if (GetArena() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + return temp; +} +inline ::MountFilter* RICHARDS::unsafe_arena_release_mount_filter() { + // @@protoc_insertion_point(field_release:RICHARDS.mount_filter) + + ::MountFilter* temp = mount_filter_; + mount_filter_ = nullptr; + return temp; +} +inline ::MountFilter* RICHARDS::_internal_mutable_mount_filter() { + + if (mount_filter_ == nullptr) { + auto* p = CreateMaybeMessage<::MountFilter>(GetArena()); + mount_filter_ = p; + } + return mount_filter_; +} +inline ::MountFilter* RICHARDS::mutable_mount_filter() { + // @@protoc_insertion_point(field_mutable:RICHARDS.mount_filter) + return _internal_mutable_mount_filter(); +} +inline void RICHARDS::set_allocated_mount_filter(::MountFilter* mount_filter) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); + if (message_arena == nullptr) { + delete mount_filter_; + } + if (mount_filter) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(mount_filter); + if (message_arena != submessage_arena) { + mount_filter = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, mount_filter, submessage_arena); + } + + } else { + + } + mount_filter_ = mount_filter; + // @@protoc_insertion_point(field_set_allocated:RICHARDS.mount_filter) +} + +// .ProfessionFilter profession_filter = 30; +inline bool RICHARDS::_internal_has_profession_filter() const { + return this != internal_default_instance() && profession_filter_ != nullptr; +} +inline bool RICHARDS::has_profession_filter() const { + return _internal_has_profession_filter(); +} +inline void RICHARDS::clear_profession_filter() { + if (GetArena() == nullptr && profession_filter_ != nullptr) { + delete profession_filter_; + } + profession_filter_ = nullptr; +} +inline const ::ProfessionFilter& RICHARDS::_internal_profession_filter() const { + const ::ProfessionFilter* p = profession_filter_; + return p != nullptr ? *p : *reinterpret_cast( + &::_ProfessionFilter_default_instance_); +} +inline const ::ProfessionFilter& RICHARDS::profession_filter() const { + // @@protoc_insertion_point(field_get:RICHARDS.profession_filter) + return _internal_profession_filter(); +} +inline void RICHARDS::unsafe_arena_set_allocated_profession_filter( + ::ProfessionFilter* profession_filter) { + if (GetArena() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(profession_filter_); + } + profession_filter_ = profession_filter; + if (profession_filter) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:RICHARDS.profession_filter) +} +inline ::ProfessionFilter* RICHARDS::release_profession_filter() { + auto temp = unsafe_arena_release_profession_filter(); + if (GetArena() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + return temp; +} +inline ::ProfessionFilter* RICHARDS::unsafe_arena_release_profession_filter() { + // @@protoc_insertion_point(field_release:RICHARDS.profession_filter) + + ::ProfessionFilter* temp = profession_filter_; + profession_filter_ = nullptr; + return temp; +} +inline ::ProfessionFilter* RICHARDS::_internal_mutable_profession_filter() { + + if (profession_filter_ == nullptr) { + auto* p = CreateMaybeMessage<::ProfessionFilter>(GetArena()); + profession_filter_ = p; + } + return profession_filter_; +} +inline ::ProfessionFilter* RICHARDS::mutable_profession_filter() { + // @@protoc_insertion_point(field_mutable:RICHARDS.profession_filter) + return _internal_mutable_profession_filter(); +} +inline void RICHARDS::set_allocated_profession_filter(::ProfessionFilter* profession_filter) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); + if (message_arena == nullptr) { + delete profession_filter_; + } + if (profession_filter) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(profession_filter); + if (message_arena != submessage_arena) { + profession_filter = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, profession_filter, submessage_arena); + } + + } else { + + } + profession_filter_ = profession_filter; + // @@protoc_insertion_point(field_set_allocated:RICHARDS.profession_filter) +} + +// .SpecializationFilter specialization_filter = 31; +inline bool RICHARDS::_internal_has_specialization_filter() const { + return this != internal_default_instance() && specialization_filter_ != nullptr; +} +inline bool RICHARDS::has_specialization_filter() const { + return _internal_has_specialization_filter(); +} +inline void RICHARDS::clear_specialization_filter() { + if (GetArena() == nullptr && specialization_filter_ != nullptr) { + delete specialization_filter_; + } + specialization_filter_ = nullptr; +} +inline const ::SpecializationFilter& RICHARDS::_internal_specialization_filter() const { + const ::SpecializationFilter* p = specialization_filter_; + return p != nullptr ? *p : *reinterpret_cast( + &::_SpecializationFilter_default_instance_); +} +inline const ::SpecializationFilter& RICHARDS::specialization_filter() const { + // @@protoc_insertion_point(field_get:RICHARDS.specialization_filter) + return _internal_specialization_filter(); +} +inline void RICHARDS::unsafe_arena_set_allocated_specialization_filter( + ::SpecializationFilter* specialization_filter) { + if (GetArena() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(specialization_filter_); + } + specialization_filter_ = specialization_filter; + if (specialization_filter) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:RICHARDS.specialization_filter) +} +inline ::SpecializationFilter* RICHARDS::release_specialization_filter() { + auto temp = unsafe_arena_release_specialization_filter(); + if (GetArena() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + return temp; +} +inline ::SpecializationFilter* RICHARDS::unsafe_arena_release_specialization_filter() { + // @@protoc_insertion_point(field_release:RICHARDS.specialization_filter) + + ::SpecializationFilter* temp = specialization_filter_; + specialization_filter_ = nullptr; + return temp; +} +inline ::SpecializationFilter* RICHARDS::_internal_mutable_specialization_filter() { + + if (specialization_filter_ == nullptr) { + auto* p = CreateMaybeMessage<::SpecializationFilter>(GetArena()); + specialization_filter_ = p; + } + return specialization_filter_; +} +inline ::SpecializationFilter* RICHARDS::mutable_specialization_filter() { + // @@protoc_insertion_point(field_mutable:RICHARDS.specialization_filter) + return _internal_mutable_specialization_filter(); +} +inline void RICHARDS::set_allocated_specialization_filter(::SpecializationFilter* specialization_filter) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); + if (message_arena == nullptr) { + delete specialization_filter_; + } + if (specialization_filter) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(specialization_filter); + if (message_arena != submessage_arena) { + specialization_filter = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, specialization_filter, submessage_arena); + } + + } else { + + } + specialization_filter_ = specialization_filter; + // @@protoc_insertion_point(field_set_allocated:RICHARDS.specialization_filter) +} + +// .SpeciesFilter species_filter = 32; +inline bool RICHARDS::_internal_has_species_filter() const { + return this != internal_default_instance() && species_filter_ != nullptr; +} +inline bool RICHARDS::has_species_filter() const { + return _internal_has_species_filter(); +} +inline void RICHARDS::clear_species_filter() { + if (GetArena() == nullptr && species_filter_ != nullptr) { + delete species_filter_; + } + species_filter_ = nullptr; +} +inline const ::SpeciesFilter& RICHARDS::_internal_species_filter() const { + const ::SpeciesFilter* p = species_filter_; + return p != nullptr ? *p : *reinterpret_cast( + &::_SpeciesFilter_default_instance_); +} +inline const ::SpeciesFilter& RICHARDS::species_filter() const { + // @@protoc_insertion_point(field_get:RICHARDS.species_filter) + return _internal_species_filter(); +} +inline void RICHARDS::unsafe_arena_set_allocated_species_filter( + ::SpeciesFilter* species_filter) { + if (GetArena() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(species_filter_); + } + species_filter_ = species_filter; + if (species_filter) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:RICHARDS.species_filter) +} +inline ::SpeciesFilter* RICHARDS::release_species_filter() { + auto temp = unsafe_arena_release_species_filter(); + if (GetArena() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + return temp; +} +inline ::SpeciesFilter* RICHARDS::unsafe_arena_release_species_filter() { + // @@protoc_insertion_point(field_release:RICHARDS.species_filter) + + ::SpeciesFilter* temp = species_filter_; + species_filter_ = nullptr; + return temp; +} +inline ::SpeciesFilter* RICHARDS::_internal_mutable_species_filter() { + + if (species_filter_ == nullptr) { + auto* p = CreateMaybeMessage<::SpeciesFilter>(GetArena()); + species_filter_ = p; + } + return species_filter_; +} +inline ::SpeciesFilter* RICHARDS::mutable_species_filter() { + // @@protoc_insertion_point(field_mutable:RICHARDS.species_filter) + return _internal_mutable_species_filter(); +} +inline void RICHARDS::set_allocated_species_filter(::SpeciesFilter* species_filter) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); + if (message_arena == nullptr) { + delete species_filter_; + } + if (species_filter) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(species_filter); + if (message_arena != submessage_arena) { + species_filter = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, species_filter, submessage_arena); + } + + } else { + + } + species_filter_ = species_filter; + // @@protoc_insertion_point(field_set_allocated:RICHARDS.species_filter) +} + +// ------------------------------------------------------------------- + +// Texture + +// string path = 1; +inline void Texture::clear_path() { + path_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline const std::string& Texture::path() const { + // @@protoc_insertion_point(field_get:Texture.path) + return _internal_path(); +} +inline void Texture::set_path(const std::string& value) { + _internal_set_path(value); + // @@protoc_insertion_point(field_set:Texture.path) +} +inline std::string* Texture::mutable_path() { + // @@protoc_insertion_point(field_mutable:Texture.path) + return _internal_mutable_path(); +} +inline const std::string& Texture::_internal_path() const { + return path_.Get(); +} +inline void Texture::_internal_set_path(const std::string& value) { + + path_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void Texture::set_path(std::string&& value) { + + path_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:Texture.path) +} +inline void Texture::set_path(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + path_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:Texture.path) +} +inline void Texture::set_path(const char* value, + size_t size) { + + path_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:Texture.path) +} +inline std::string* Texture::_internal_mutable_path() { + + return path_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* Texture::release_path() { + // @@protoc_insertion_point(field_release:Texture.path) + return path_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void Texture::set_allocated_path(std::string* path) { + if (path != nullptr) { + + } else { + + } + path_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), path, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:Texture.path) +} +inline std::string* Texture::unsafe_arena_release_path() { + // @@protoc_insertion_point(field_unsafe_arena_release:Texture.path) + GOOGLE_DCHECK(GetArena() != nullptr); + + return path_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void Texture::unsafe_arena_set_allocated_path( + std::string* path) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (path != nullptr) { + + } else { + + } + path_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + path, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Texture.path) +} + +// ------------------------------------------------------------------- + +// Position + +// float x = 1; +inline void Position::clear_x() { + x_ = 0; +} +inline float Position::_internal_x() const { + return x_; +} +inline float Position::x() const { + // @@protoc_insertion_point(field_get:Position.x) + return _internal_x(); +} +inline void Position::_internal_set_x(float value) { + + x_ = value; +} +inline void Position::set_x(float value) { + _internal_set_x(value); + // @@protoc_insertion_point(field_set:Position.x) +} + +// float y = 2; +inline void Position::clear_y() { + y_ = 0; +} +inline float Position::_internal_y() const { + return y_; +} +inline float Position::y() const { + // @@protoc_insertion_point(field_get:Position.y) + return _internal_y(); +} +inline void Position::_internal_set_y(float value) { + + y_ = value; +} +inline void Position::set_y(float value) { + _internal_set_y(value); + // @@protoc_insertion_point(field_set:Position.y) +} + +// float z = 3; +inline void Position::clear_z() { + z_ = 0; +} +inline float Position::_internal_z() const { + return z_; +} +inline float Position::z() const { + // @@protoc_insertion_point(field_get:Position.z) + return _internal_z(); +} +inline void Position::_internal_set_z(float value) { + + z_ = value; +} +inline void Position::set_z(float value) { + _internal_set_z(value); + // @@protoc_insertion_point(field_set:Position.z) +} + +// ------------------------------------------------------------------- + +// EulerRotation + +// float x = 1; +inline void EulerRotation::clear_x() { + x_ = 0; +} +inline float EulerRotation::_internal_x() const { + return x_; +} +inline float EulerRotation::x() const { + // @@protoc_insertion_point(field_get:EulerRotation.x) + return _internal_x(); +} +inline void EulerRotation::_internal_set_x(float value) { + + x_ = value; +} +inline void EulerRotation::set_x(float value) { + _internal_set_x(value); + // @@protoc_insertion_point(field_set:EulerRotation.x) +} + +// float y = 2; +inline void EulerRotation::clear_y() { + y_ = 0; +} +inline float EulerRotation::_internal_y() const { + return y_; +} +inline float EulerRotation::y() const { + // @@protoc_insertion_point(field_get:EulerRotation.y) + return _internal_y(); +} +inline void EulerRotation::_internal_set_y(float value) { + + y_ = value; +} +inline void EulerRotation::set_y(float value) { + _internal_set_y(value); + // @@protoc_insertion_point(field_set:EulerRotation.y) +} + +// float z = 3; +inline void EulerRotation::clear_z() { + z_ = 0; +} +inline float EulerRotation::_internal_z() const { + return z_; +} +inline float EulerRotation::z() const { + // @@protoc_insertion_point(field_get:EulerRotation.z) + return _internal_z(); +} +inline void EulerRotation::_internal_set_z(float value) { + + z_ = value; +} +inline void EulerRotation::set_z(float value) { + _internal_set_z(value); + // @@protoc_insertion_point(field_set:EulerRotation.z) +} + +// ------------------------------------------------------------------- + +// Trigger + +// bool auto_trigger = 1; +inline void Trigger::clear_auto_trigger() { + auto_trigger_ = false; +} +inline bool Trigger::_internal_auto_trigger() const { + return auto_trigger_; +} +inline bool Trigger::auto_trigger() const { + // @@protoc_insertion_point(field_get:Trigger.auto_trigger) + return _internal_auto_trigger(); +} +inline void Trigger::_internal_set_auto_trigger(bool value) { + + auto_trigger_ = value; +} +inline void Trigger::set_auto_trigger(bool value) { + _internal_set_auto_trigger(value); + // @@protoc_insertion_point(field_set:Trigger.auto_trigger) +} + +// float bounce_delay = 2; +inline void Trigger::clear_bounce_delay() { + bounce_delay_ = 0; +} +inline float Trigger::_internal_bounce_delay() const { + return bounce_delay_; +} +inline float Trigger::bounce_delay() const { + // @@protoc_insertion_point(field_get:Trigger.bounce_delay) + return _internal_bounce_delay(); +} +inline void Trigger::_internal_set_bounce_delay(float value) { + + bounce_delay_ = value; +} +inline void Trigger::set_bounce_delay(float value) { + _internal_set_bounce_delay(value); + // @@protoc_insertion_point(field_set:Trigger.bounce_delay) +} + +// float bounce_duration = 3; +inline void Trigger::clear_bounce_duration() { + bounce_duration_ = 0; +} +inline float Trigger::_internal_bounce_duration() const { + return bounce_duration_; +} +inline float Trigger::bounce_duration() const { + // @@protoc_insertion_point(field_get:Trigger.bounce_duration) + return _internal_bounce_duration(); +} +inline void Trigger::_internal_set_bounce_duration(float value) { + + bounce_duration_ = value; +} +inline void Trigger::set_bounce_duration(float value) { + _internal_set_bounce_duration(value); + // @@protoc_insertion_point(field_set:Trigger.bounce_duration) +} + +// float bounce_height = 4; +inline void Trigger::clear_bounce_height() { + bounce_height_ = 0; +} +inline float Trigger::_internal_bounce_height() const { + return bounce_height_; +} +inline float Trigger::bounce_height() const { + // @@protoc_insertion_point(field_get:Trigger.bounce_height) + return _internal_bounce_height(); +} +inline void Trigger::_internal_set_bounce_height(float value) { + + bounce_height_ = value; +} +inline void Trigger::set_bounce_height(float value) { + _internal_set_bounce_height(value); + // @@protoc_insertion_point(field_set:Trigger.bounce_height) +} + +// string action_copy_clipboard = 5; +inline void Trigger::clear_action_copy_clipboard() { + action_copy_clipboard_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline const std::string& Trigger::action_copy_clipboard() const { + // @@protoc_insertion_point(field_get:Trigger.action_copy_clipboard) + return _internal_action_copy_clipboard(); +} +inline void Trigger::set_action_copy_clipboard(const std::string& value) { + _internal_set_action_copy_clipboard(value); + // @@protoc_insertion_point(field_set:Trigger.action_copy_clipboard) +} +inline std::string* Trigger::mutable_action_copy_clipboard() { + // @@protoc_insertion_point(field_mutable:Trigger.action_copy_clipboard) + return _internal_mutable_action_copy_clipboard(); +} +inline const std::string& Trigger::_internal_action_copy_clipboard() const { + return action_copy_clipboard_.Get(); +} +inline void Trigger::_internal_set_action_copy_clipboard(const std::string& value) { + + action_copy_clipboard_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void Trigger::set_action_copy_clipboard(std::string&& value) { + + action_copy_clipboard_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:Trigger.action_copy_clipboard) +} +inline void Trigger::set_action_copy_clipboard(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + action_copy_clipboard_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:Trigger.action_copy_clipboard) +} +inline void Trigger::set_action_copy_clipboard(const char* value, + size_t size) { + + action_copy_clipboard_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:Trigger.action_copy_clipboard) +} +inline std::string* Trigger::_internal_mutable_action_copy_clipboard() { + + return action_copy_clipboard_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* Trigger::release_action_copy_clipboard() { + // @@protoc_insertion_point(field_release:Trigger.action_copy_clipboard) + return action_copy_clipboard_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void Trigger::set_allocated_action_copy_clipboard(std::string* action_copy_clipboard) { + if (action_copy_clipboard != nullptr) { + + } else { + + } + action_copy_clipboard_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), action_copy_clipboard, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:Trigger.action_copy_clipboard) +} +inline std::string* Trigger::unsafe_arena_release_action_copy_clipboard() { + // @@protoc_insertion_point(field_unsafe_arena_release:Trigger.action_copy_clipboard) + GOOGLE_DCHECK(GetArena() != nullptr); + + return action_copy_clipboard_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void Trigger::unsafe_arena_set_allocated_action_copy_clipboard( + std::string* action_copy_clipboard) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (action_copy_clipboard != nullptr) { + + } else { + + } + action_copy_clipboard_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + action_copy_clipboard, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Trigger.action_copy_clipboard) +} + +// string action_copy_message = 6; +inline void Trigger::clear_action_copy_message() { + action_copy_message_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline const std::string& Trigger::action_copy_message() const { + // @@protoc_insertion_point(field_get:Trigger.action_copy_message) + return _internal_action_copy_message(); +} +inline void Trigger::set_action_copy_message(const std::string& value) { + _internal_set_action_copy_message(value); + // @@protoc_insertion_point(field_set:Trigger.action_copy_message) +} +inline std::string* Trigger::mutable_action_copy_message() { + // @@protoc_insertion_point(field_mutable:Trigger.action_copy_message) + return _internal_mutable_action_copy_message(); +} +inline const std::string& Trigger::_internal_action_copy_message() const { + return action_copy_message_.Get(); +} +inline void Trigger::_internal_set_action_copy_message(const std::string& value) { + + action_copy_message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void Trigger::set_action_copy_message(std::string&& value) { + + action_copy_message_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:Trigger.action_copy_message) +} +inline void Trigger::set_action_copy_message(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + action_copy_message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:Trigger.action_copy_message) +} +inline void Trigger::set_action_copy_message(const char* value, + size_t size) { + + action_copy_message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:Trigger.action_copy_message) +} +inline std::string* Trigger::_internal_mutable_action_copy_message() { + + return action_copy_message_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* Trigger::release_action_copy_message() { + // @@protoc_insertion_point(field_release:Trigger.action_copy_message) + return action_copy_message_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void Trigger::set_allocated_action_copy_message(std::string* action_copy_message) { + if (action_copy_message != nullptr) { + + } else { + + } + action_copy_message_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), action_copy_message, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:Trigger.action_copy_message) +} +inline std::string* Trigger::unsafe_arena_release_action_copy_message() { + // @@protoc_insertion_point(field_unsafe_arena_release:Trigger.action_copy_message) + GOOGLE_DCHECK(GetArena() != nullptr); + + return action_copy_message_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void Trigger::unsafe_arena_set_allocated_action_copy_message( + std::string* action_copy_message) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (action_copy_message != nullptr) { + + } else { + + } + action_copy_message_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + action_copy_message, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Trigger.action_copy_message) +} + +// bool has_countdown = 7; +inline void Trigger::clear_has_countdown() { + has_countdown_ = false; +} +inline bool Trigger::_internal_has_countdown() const { + return has_countdown_; +} +inline bool Trigger::has_countdown() const { + // @@protoc_insertion_point(field_get:Trigger.has_countdown) + return _internal_has_countdown(); +} +inline void Trigger::_internal_set_has_countdown(bool value) { + + has_countdown_ = value; +} +inline void Trigger::set_has_countdown(bool value) { + _internal_set_has_countdown(value); + // @@protoc_insertion_point(field_set:Trigger.has_countdown) +} + +// string action_info_message = 8; +inline void Trigger::clear_action_info_message() { + action_info_message_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline const std::string& Trigger::action_info_message() const { + // @@protoc_insertion_point(field_get:Trigger.action_info_message) + return _internal_action_info_message(); +} +inline void Trigger::set_action_info_message(const std::string& value) { + _internal_set_action_info_message(value); + // @@protoc_insertion_point(field_set:Trigger.action_info_message) +} +inline std::string* Trigger::mutable_action_info_message() { + // @@protoc_insertion_point(field_mutable:Trigger.action_info_message) + return _internal_mutable_action_info_message(); +} +inline const std::string& Trigger::_internal_action_info_message() const { + return action_info_message_.Get(); +} +inline void Trigger::_internal_set_action_info_message(const std::string& value) { + + action_info_message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void Trigger::set_action_info_message(std::string&& value) { + + action_info_message_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:Trigger.action_info_message) +} +inline void Trigger::set_action_info_message(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + action_info_message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:Trigger.action_info_message) +} +inline void Trigger::set_action_info_message(const char* value, + size_t size) { + + action_info_message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:Trigger.action_info_message) +} +inline std::string* Trigger::_internal_mutable_action_info_message() { + + return action_info_message_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* Trigger::release_action_info_message() { + // @@protoc_insertion_point(field_release:Trigger.action_info_message) + return action_info_message_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void Trigger::set_allocated_action_info_message(std::string* action_info_message) { + if (action_info_message != nullptr) { + + } else { + + } + action_info_message_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), action_info_message, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:Trigger.action_info_message) +} +inline std::string* Trigger::unsafe_arena_release_action_info_message() { + // @@protoc_insertion_point(field_unsafe_arena_release:Trigger.action_info_message) + GOOGLE_DCHECK(GetArena() != nullptr); + + return action_info_message_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void Trigger::unsafe_arena_set_allocated_action_info_message( + std::string* action_info_message) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (action_info_message != nullptr) { + + } else { + + } + action_info_message_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + action_info_message, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Trigger.action_info_message) +} + +// bool invert_display = 9; +inline void Trigger::clear_invert_display() { + invert_display_ = false; +} +inline bool Trigger::_internal_invert_display() const { + return invert_display_; +} +inline bool Trigger::invert_display() const { + // @@protoc_insertion_point(field_get:Trigger.invert_display) + return _internal_invert_display(); +} +inline void Trigger::_internal_set_invert_display(bool value) { + + invert_display_ = value; +} +inline void Trigger::set_invert_display(bool value) { + _internal_set_invert_display(value); + // @@protoc_insertion_point(field_set:Trigger.invert_display) +} + +// float reset_length = 10; +inline void Trigger::clear_reset_length() { + reset_length_ = 0; +} +inline float Trigger::_internal_reset_length() const { + return reset_length_; +} +inline float Trigger::reset_length() const { + // @@protoc_insertion_point(field_get:Trigger.reset_length) + return _internal_reset_length(); +} +inline void Trigger::_internal_set_reset_length(float value) { + + reset_length_ = value; +} +inline void Trigger::set_reset_length(float value) { + _internal_set_reset_length(value); + // @@protoc_insertion_point(field_set:Trigger.reset_length) +} + +// float range = 11; +inline void Trigger::clear_range() { + range_ = 0; +} +inline float Trigger::_internal_range() const { + return range_; +} +inline float Trigger::range() const { + // @@protoc_insertion_point(field_get:Trigger.range) + return _internal_range(); +} +inline void Trigger::_internal_set_range(float value) { + + range_ = value; +} +inline void Trigger::set_range(float value) { + _internal_set_range(value); + // @@protoc_insertion_point(field_set:Trigger.range) +} + +// .Category action_hide_category = 12; +inline bool Trigger::_internal_has_action_hide_category() const { + return this != internal_default_instance() && action_hide_category_ != nullptr; +} +inline bool Trigger::has_action_hide_category() const { + return _internal_has_action_hide_category(); +} +inline void Trigger::clear_action_hide_category() { + if (GetArena() == nullptr && action_hide_category_ != nullptr) { + delete action_hide_category_; + } + action_hide_category_ = nullptr; +} +inline const ::Category& Trigger::_internal_action_hide_category() const { + const ::Category* p = action_hide_category_; + return p != nullptr ? *p : *reinterpret_cast( + &::_Category_default_instance_); +} +inline const ::Category& Trigger::action_hide_category() const { + // @@protoc_insertion_point(field_get:Trigger.action_hide_category) + return _internal_action_hide_category(); +} +inline void Trigger::unsafe_arena_set_allocated_action_hide_category( + ::Category* action_hide_category) { + if (GetArena() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(action_hide_category_); + } + action_hide_category_ = action_hide_category; + if (action_hide_category) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Trigger.action_hide_category) } -inline float Icon::_internal_bhdraft__schedule_duration() const { - return bhdraft__schedule_duration_; +inline ::Category* Trigger::release_action_hide_category() { + auto temp = unsafe_arena_release_action_hide_category(); + if (GetArena() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + return temp; } -inline float Icon::bhdraft__schedule_duration() const { - // @@protoc_insertion_point(field_get:Proto_Node.Icon.bhdraft__schedule_duration) - return _internal_bhdraft__schedule_duration(); +inline ::Category* Trigger::unsafe_arena_release_action_hide_category() { + // @@protoc_insertion_point(field_release:Trigger.action_hide_category) + + ::Category* temp = action_hide_category_; + action_hide_category_ = nullptr; + return temp; } -inline void Icon::_internal_set_bhdraft__schedule_duration(float value) { +inline ::Category* Trigger::_internal_mutable_action_hide_category() { - bhdraft__schedule_duration_ = value; + if (action_hide_category_ == nullptr) { + auto* p = CreateMaybeMessage<::Category>(GetArena()); + action_hide_category_ = p; + } + return action_hide_category_; } -inline void Icon::set_bhdraft__schedule_duration(float value) { - _internal_set_bhdraft__schedule_duration(value); - // @@protoc_insertion_point(field_set:Proto_Node.Icon.bhdraft__schedule_duration) +inline ::Category* Trigger::mutable_action_hide_category() { + // @@protoc_insertion_point(field_mutable:Trigger.action_hide_category) + return _internal_mutable_action_hide_category(); } - -// string tip_description = 19; -inline void Icon::clear_tip_description() { - tip_description_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +inline void Trigger::set_allocated_action_hide_category(::Category* action_hide_category) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); + if (message_arena == nullptr) { + delete action_hide_category_; + } + if (action_hide_category) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(action_hide_category); + if (message_arena != submessage_arena) { + action_hide_category = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, action_hide_category, submessage_arena); + } + + } else { + + } + action_hide_category_ = action_hide_category; + // @@protoc_insertion_point(field_set_allocated:Trigger.action_hide_category) } -inline const std::string& Icon::tip_description() const { - // @@protoc_insertion_point(field_get:Proto_Node.Icon.tip_description) - return _internal_tip_description(); + +// .Category action_show_category = 13; +inline bool Trigger::_internal_has_action_show_category() const { + return this != internal_default_instance() && action_show_category_ != nullptr; } -inline void Icon::set_tip_description(const std::string& value) { - _internal_set_tip_description(value); - // @@protoc_insertion_point(field_set:Proto_Node.Icon.tip_description) +inline bool Trigger::has_action_show_category() const { + return _internal_has_action_show_category(); } -inline std::string* Icon::mutable_tip_description() { - // @@protoc_insertion_point(field_mutable:Proto_Node.Icon.tip_description) - return _internal_mutable_tip_description(); +inline void Trigger::clear_action_show_category() { + if (GetArena() == nullptr && action_show_category_ != nullptr) { + delete action_show_category_; + } + action_show_category_ = nullptr; } -inline const std::string& Icon::_internal_tip_description() const { - return tip_description_.Get(); +inline const ::Category& Trigger::_internal_action_show_category() const { + const ::Category* p = action_show_category_; + return p != nullptr ? *p : *reinterpret_cast( + &::_Category_default_instance_); } -inline void Icon::_internal_set_tip_description(const std::string& value) { - - tip_description_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +inline const ::Category& Trigger::action_show_category() const { + // @@protoc_insertion_point(field_get:Trigger.action_show_category) + return _internal_action_show_category(); } -inline void Icon::set_tip_description(std::string&& value) { - - tip_description_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:Proto_Node.Icon.tip_description) +inline void Trigger::unsafe_arena_set_allocated_action_show_category( + ::Category* action_show_category) { + if (GetArena() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(action_show_category_); + } + action_show_category_ = action_show_category; + if (action_show_category) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Trigger.action_show_category) } -inline void Icon::set_tip_description(const char* value) { - GOOGLE_DCHECK(value != nullptr); - - tip_description_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArena()); - // @@protoc_insertion_point(field_set_char:Proto_Node.Icon.tip_description) +inline ::Category* Trigger::release_action_show_category() { + auto temp = unsafe_arena_release_action_show_category(); + if (GetArena() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + return temp; } -inline void Icon::set_tip_description(const char* value, - size_t size) { +inline ::Category* Trigger::unsafe_arena_release_action_show_category() { + // @@protoc_insertion_point(field_release:Trigger.action_show_category) - tip_description_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:Proto_Node.Icon.tip_description) + ::Category* temp = action_show_category_; + action_show_category_ = nullptr; + return temp; } -inline std::string* Icon::_internal_mutable_tip_description() { +inline ::Category* Trigger::_internal_mutable_action_show_category() { - return tip_description_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline std::string* Icon::release_tip_description() { - // @@protoc_insertion_point(field_release:Proto_Node.Icon.tip_description) - return tip_description_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void Icon::set_allocated_tip_description(std::string* tip_description) { - if (tip_description != nullptr) { - - } else { - + if (action_show_category_ == nullptr) { + auto* p = CreateMaybeMessage<::Category>(GetArena()); + action_show_category_ = p; } - tip_description_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), tip_description, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:Proto_Node.Icon.tip_description) + return action_show_category_; } -inline std::string* Icon::unsafe_arena_release_tip_description() { - // @@protoc_insertion_point(field_unsafe_arena_release:Proto_Node.Icon.tip_description) - GOOGLE_DCHECK(GetArena() != nullptr); - - return tip_description_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArena()); +inline ::Category* Trigger::mutable_action_show_category() { + // @@protoc_insertion_point(field_mutable:Trigger.action_show_category) + return _internal_mutable_action_show_category(); } -inline void Icon::unsafe_arena_set_allocated_tip_description( - std::string* tip_description) { - GOOGLE_DCHECK(GetArena() != nullptr); - if (tip_description != nullptr) { +inline void Trigger::set_allocated_action_show_category(::Category* action_show_category) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); + if (message_arena == nullptr) { + delete action_show_category_; + } + if (action_show_category) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(action_show_category); + if (message_arena != submessage_arena) { + action_show_category = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, action_show_category, submessage_arena); + } } else { } - tip_description_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - tip_description, GetArena()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Proto_Node.Icon.tip_description) + action_show_category_ = action_show_category; + // @@protoc_insertion_point(field_set_allocated:Trigger.action_show_category) } -// string tip_name = 20; -inline void Icon::clear_tip_name() { - tip_name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline const std::string& Icon::tip_name() const { - // @@protoc_insertion_point(field_get:Proto_Node.Icon.tip_name) - return _internal_tip_name(); +// .Category action_toggle_category = 14; +inline bool Trigger::_internal_has_action_toggle_category() const { + return this != internal_default_instance() && action_toggle_category_ != nullptr; } -inline void Icon::set_tip_name(const std::string& value) { - _internal_set_tip_name(value); - // @@protoc_insertion_point(field_set:Proto_Node.Icon.tip_name) +inline bool Trigger::has_action_toggle_category() const { + return _internal_has_action_toggle_category(); } -inline std::string* Icon::mutable_tip_name() { - // @@protoc_insertion_point(field_mutable:Proto_Node.Icon.tip_name) - return _internal_mutable_tip_name(); +inline void Trigger::clear_action_toggle_category() { + if (GetArena() == nullptr && action_toggle_category_ != nullptr) { + delete action_toggle_category_; + } + action_toggle_category_ = nullptr; } -inline const std::string& Icon::_internal_tip_name() const { - return tip_name_.Get(); +inline const ::Category& Trigger::_internal_action_toggle_category() const { + const ::Category* p = action_toggle_category_; + return p != nullptr ? *p : *reinterpret_cast( + &::_Category_default_instance_); } -inline void Icon::_internal_set_tip_name(const std::string& value) { - - tip_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +inline const ::Category& Trigger::action_toggle_category() const { + // @@protoc_insertion_point(field_get:Trigger.action_toggle_category) + return _internal_action_toggle_category(); } -inline void Icon::set_tip_name(std::string&& value) { - - tip_name_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:Proto_Node.Icon.tip_name) +inline void Trigger::unsafe_arena_set_allocated_action_toggle_category( + ::Category* action_toggle_category) { + if (GetArena() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(action_toggle_category_); + } + action_toggle_category_ = action_toggle_category; + if (action_toggle_category) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Trigger.action_toggle_category) } -inline void Icon::set_tip_name(const char* value) { - GOOGLE_DCHECK(value != nullptr); - - tip_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArena()); - // @@protoc_insertion_point(field_set_char:Proto_Node.Icon.tip_name) +inline ::Category* Trigger::release_action_toggle_category() { + auto temp = unsafe_arena_release_action_toggle_category(); + if (GetArena() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + return temp; } -inline void Icon::set_tip_name(const char* value, - size_t size) { +inline ::Category* Trigger::unsafe_arena_release_action_toggle_category() { + // @@protoc_insertion_point(field_release:Trigger.action_toggle_category) - tip_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:Proto_Node.Icon.tip_name) + ::Category* temp = action_toggle_category_; + action_toggle_category_ = nullptr; + return temp; } -inline std::string* Icon::_internal_mutable_tip_name() { +inline ::Category* Trigger::_internal_mutable_action_toggle_category() { - return tip_name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + if (action_toggle_category_ == nullptr) { + auto* p = CreateMaybeMessage<::Category>(GetArena()); + action_toggle_category_ = p; + } + return action_toggle_category_; } -inline std::string* Icon::release_tip_name() { - // @@protoc_insertion_point(field_release:Proto_Node.Icon.tip_name) - return tip_name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +inline ::Category* Trigger::mutable_action_toggle_category() { + // @@protoc_insertion_point(field_mutable:Trigger.action_toggle_category) + return _internal_mutable_action_toggle_category(); } -inline void Icon::set_allocated_tip_name(std::string* tip_name) { - if (tip_name != nullptr) { +inline void Trigger::set_allocated_action_toggle_category(::Category* action_toggle_category) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); + if (message_arena == nullptr) { + delete action_toggle_category_; + } + if (action_toggle_category) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(action_toggle_category); + if (message_arena != submessage_arena) { + action_toggle_category = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, action_toggle_category, submessage_arena); + } } else { } - tip_name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), tip_name, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:Proto_Node.Icon.tip_name) + action_toggle_category_ = action_toggle_category; + // @@protoc_insertion_point(field_set_allocated:Trigger.action_toggle_category) } -inline std::string* Icon::unsafe_arena_release_tip_name() { - // @@protoc_insertion_point(field_unsafe_arena_release:Proto_Node.Icon.tip_name) - GOOGLE_DCHECK(GetArena() != nullptr); + +// ------------------------------------------------------------------- + +// GUID + +// int32 guid = 1; +inline void GUID::clear_guid() { + guid_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 GUID::_internal_guid() const { + return guid_; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 GUID::guid() const { + // @@protoc_insertion_point(field_get:GUID.guid) + return _internal_guid(); +} +inline void GUID::_internal_set_guid(::PROTOBUF_NAMESPACE_ID::int32 value) { - return tip_name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArena()); + guid_ = value; } -inline void Icon::unsafe_arena_set_allocated_tip_name( - std::string* tip_name) { - GOOGLE_DCHECK(GetArena() != nullptr); - if (tip_name != nullptr) { - - } else { - - } - tip_name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - tip_name, GetArena()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Proto_Node.Icon.tip_name) +inline void GUID::set_guid(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_guid(value); + // @@protoc_insertion_point(field_set:GUID.guid) } // ------------------------------------------------------------------- -// Trail_color +// Color // string hex = 1; -inline void Trail_color::clear_hex() { +inline void Color::clear_hex() { hex_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } -inline const std::string& Trail_color::hex() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.color.hex) +inline const std::string& Color::hex() const { + // @@protoc_insertion_point(field_get:Color.hex) return _internal_hex(); } -inline void Trail_color::set_hex(const std::string& value) { +inline void Color::set_hex(const std::string& value) { _internal_set_hex(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.color.hex) + // @@protoc_insertion_point(field_set:Color.hex) } -inline std::string* Trail_color::mutable_hex() { - // @@protoc_insertion_point(field_mutable:Proto_Node.Trail.color.hex) +inline std::string* Color::mutable_hex() { + // @@protoc_insertion_point(field_mutable:Color.hex) return _internal_mutable_hex(); } -inline const std::string& Trail_color::_internal_hex() const { +inline const std::string& Color::_internal_hex() const { return hex_.Get(); } -inline void Trail_color::_internal_set_hex(const std::string& value) { +inline void Color::_internal_set_hex(const std::string& value) { hex_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); } -inline void Trail_color::set_hex(std::string&& value) { +inline void Color::set_hex(std::string&& value) { hex_.Set( &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:Proto_Node.Trail.color.hex) + // @@protoc_insertion_point(field_set_rvalue:Color.hex) } -inline void Trail_color::set_hex(const char* value) { +inline void Color::set_hex(const char* value) { GOOGLE_DCHECK(value != nullptr); hex_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:Proto_Node.Trail.color.hex) + // @@protoc_insertion_point(field_set_char:Color.hex) } -inline void Trail_color::set_hex(const char* value, +inline void Color::set_hex(const char* value, size_t size) { hex_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:Proto_Node.Trail.color.hex) + // @@protoc_insertion_point(field_set_pointer:Color.hex) } -inline std::string* Trail_color::_internal_mutable_hex() { +inline std::string* Color::_internal_mutable_hex() { return hex_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } -inline std::string* Trail_color::release_hex() { - // @@protoc_insertion_point(field_release:Proto_Node.Trail.color.hex) +inline std::string* Color::release_hex() { + // @@protoc_insertion_point(field_release:Color.hex) return hex_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } -inline void Trail_color::set_allocated_hex(std::string* hex) { +inline void Color::set_allocated_hex(std::string* hex) { if (hex != nullptr) { } else { @@ -6956,16 +8408,16 @@ inline void Trail_color::set_allocated_hex(std::string* hex) { } hex_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), hex, GetArena()); - // @@protoc_insertion_point(field_set_allocated:Proto_Node.Trail.color.hex) + // @@protoc_insertion_point(field_set_allocated:Color.hex) } -inline std::string* Trail_color::unsafe_arena_release_hex() { - // @@protoc_insertion_point(field_unsafe_arena_release:Proto_Node.Trail.color.hex) +inline std::string* Color::unsafe_arena_release_hex() { + // @@protoc_insertion_point(field_unsafe_arena_release:Color.hex) GOOGLE_DCHECK(GetArena() != nullptr); return hex_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } -inline void Trail_color::unsafe_arena_set_allocated_hex( +inline void Color::unsafe_arena_set_allocated_hex( std::string* hex) { GOOGLE_DCHECK(GetArena() != nullptr); if (hex != nullptr) { @@ -6975,3226 +8427,2656 @@ inline void Trail_color::unsafe_arena_set_allocated_hex( } hex_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), hex, GetArena()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Proto_Node.Trail.color.hex) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Color.hex) } // ------------------------------------------------------------------- -// Trail_festival_filter +// FestivalFilter // bool dragonbash = 1; -inline void Trail_festival_filter::clear_dragonbash() { +inline void FestivalFilter::clear_dragonbash() { dragonbash_ = false; } -inline bool Trail_festival_filter::_internal_dragonbash() const { +inline bool FestivalFilter::_internal_dragonbash() const { return dragonbash_; } -inline bool Trail_festival_filter::dragonbash() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.festival_filter.dragonbash) +inline bool FestivalFilter::dragonbash() const { + // @@protoc_insertion_point(field_get:FestivalFilter.dragonbash) return _internal_dragonbash(); } -inline void Trail_festival_filter::_internal_set_dragonbash(bool value) { +inline void FestivalFilter::_internal_set_dragonbash(bool value) { dragonbash_ = value; } -inline void Trail_festival_filter::set_dragonbash(bool value) { +inline void FestivalFilter::set_dragonbash(bool value) { _internal_set_dragonbash(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.festival_filter.dragonbash) + // @@protoc_insertion_point(field_set:FestivalFilter.dragonbash) } // bool festival_of_the_four_winds = 2; -inline void Trail_festival_filter::clear_festival_of_the_four_winds() { +inline void FestivalFilter::clear_festival_of_the_four_winds() { festival_of_the_four_winds_ = false; } -inline bool Trail_festival_filter::_internal_festival_of_the_four_winds() const { +inline bool FestivalFilter::_internal_festival_of_the_four_winds() const { return festival_of_the_four_winds_; } -inline bool Trail_festival_filter::festival_of_the_four_winds() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.festival_filter.festival_of_the_four_winds) +inline bool FestivalFilter::festival_of_the_four_winds() const { + // @@protoc_insertion_point(field_get:FestivalFilter.festival_of_the_four_winds) return _internal_festival_of_the_four_winds(); } -inline void Trail_festival_filter::_internal_set_festival_of_the_four_winds(bool value) { +inline void FestivalFilter::_internal_set_festival_of_the_four_winds(bool value) { festival_of_the_four_winds_ = value; } -inline void Trail_festival_filter::set_festival_of_the_four_winds(bool value) { +inline void FestivalFilter::set_festival_of_the_four_winds(bool value) { _internal_set_festival_of_the_four_winds(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.festival_filter.festival_of_the_four_winds) + // @@protoc_insertion_point(field_set:FestivalFilter.festival_of_the_four_winds) } // bool halloween = 3; -inline void Trail_festival_filter::clear_halloween() { +inline void FestivalFilter::clear_halloween() { halloween_ = false; } -inline bool Trail_festival_filter::_internal_halloween() const { +inline bool FestivalFilter::_internal_halloween() const { return halloween_; } -inline bool Trail_festival_filter::halloween() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.festival_filter.halloween) +inline bool FestivalFilter::halloween() const { + // @@protoc_insertion_point(field_get:FestivalFilter.halloween) return _internal_halloween(); } -inline void Trail_festival_filter::_internal_set_halloween(bool value) { +inline void FestivalFilter::_internal_set_halloween(bool value) { halloween_ = value; } -inline void Trail_festival_filter::set_halloween(bool value) { +inline void FestivalFilter::set_halloween(bool value) { _internal_set_halloween(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.festival_filter.halloween) + // @@protoc_insertion_point(field_set:FestivalFilter.halloween) } // bool lunar_new_year = 4; -inline void Trail_festival_filter::clear_lunar_new_year() { +inline void FestivalFilter::clear_lunar_new_year() { lunar_new_year_ = false; } -inline bool Trail_festival_filter::_internal_lunar_new_year() const { +inline bool FestivalFilter::_internal_lunar_new_year() const { return lunar_new_year_; } -inline bool Trail_festival_filter::lunar_new_year() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.festival_filter.lunar_new_year) +inline bool FestivalFilter::lunar_new_year() const { + // @@protoc_insertion_point(field_get:FestivalFilter.lunar_new_year) return _internal_lunar_new_year(); } -inline void Trail_festival_filter::_internal_set_lunar_new_year(bool value) { +inline void FestivalFilter::_internal_set_lunar_new_year(bool value) { lunar_new_year_ = value; } -inline void Trail_festival_filter::set_lunar_new_year(bool value) { +inline void FestivalFilter::set_lunar_new_year(bool value) { _internal_set_lunar_new_year(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.festival_filter.lunar_new_year) + // @@protoc_insertion_point(field_set:FestivalFilter.lunar_new_year) } // bool super_adventure_festival = 5; -inline void Trail_festival_filter::clear_super_adventure_festival() { +inline void FestivalFilter::clear_super_adventure_festival() { super_adventure_festival_ = false; } -inline bool Trail_festival_filter::_internal_super_adventure_festival() const { +inline bool FestivalFilter::_internal_super_adventure_festival() const { return super_adventure_festival_; } -inline bool Trail_festival_filter::super_adventure_festival() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.festival_filter.super_adventure_festival) +inline bool FestivalFilter::super_adventure_festival() const { + // @@protoc_insertion_point(field_get:FestivalFilter.super_adventure_festival) return _internal_super_adventure_festival(); } -inline void Trail_festival_filter::_internal_set_super_adventure_festival(bool value) { +inline void FestivalFilter::_internal_set_super_adventure_festival(bool value) { super_adventure_festival_ = value; } -inline void Trail_festival_filter::set_super_adventure_festival(bool value) { +inline void FestivalFilter::set_super_adventure_festival(bool value) { _internal_set_super_adventure_festival(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.festival_filter.super_adventure_festival) + // @@protoc_insertion_point(field_set:FestivalFilter.super_adventure_festival) } // bool wintersday = 6; -inline void Trail_festival_filter::clear_wintersday() { +inline void FestivalFilter::clear_wintersday() { wintersday_ = false; } -inline bool Trail_festival_filter::_internal_wintersday() const { +inline bool FestivalFilter::_internal_wintersday() const { return wintersday_; } -inline bool Trail_festival_filter::wintersday() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.festival_filter.wintersday) +inline bool FestivalFilter::wintersday() const { + // @@protoc_insertion_point(field_get:FestivalFilter.wintersday) return _internal_wintersday(); } -inline void Trail_festival_filter::_internal_set_wintersday(bool value) { +inline void FestivalFilter::_internal_set_wintersday(bool value) { wintersday_ = value; } -inline void Trail_festival_filter::set_wintersday(bool value) { +inline void FestivalFilter::set_wintersday(bool value) { _internal_set_wintersday(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.festival_filter.wintersday) + // @@protoc_insertion_point(field_set:FestivalFilter.wintersday) } // bool none = 7; -inline void Trail_festival_filter::clear_none() { +inline void FestivalFilter::clear_none() { none_ = false; } -inline bool Trail_festival_filter::_internal_none() const { +inline bool FestivalFilter::_internal_none() const { return none_; } -inline bool Trail_festival_filter::none() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.festival_filter.none) +inline bool FestivalFilter::none() const { + // @@protoc_insertion_point(field_get:FestivalFilter.none) return _internal_none(); } -inline void Trail_festival_filter::_internal_set_none(bool value) { - - none_ = value; -} -inline void Trail_festival_filter::set_none(bool value) { - _internal_set_none(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.festival_filter.none) -} - -// ------------------------------------------------------------------- - -// Trail_guid - -// int32 guid = 1; -inline void Trail_guid::clear_guid() { - guid_ = 0; -} -inline ::PROTOBUF_NAMESPACE_ID::int32 Trail_guid::_internal_guid() const { - return guid_; -} -inline ::PROTOBUF_NAMESPACE_ID::int32 Trail_guid::guid() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.guid.guid) - return _internal_guid(); -} -inline void Trail_guid::_internal_set_guid(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline void FestivalFilter::_internal_set_none(bool value) { - guid_ = value; + none_ = value; } -inline void Trail_guid::set_guid(::PROTOBUF_NAMESPACE_ID::int32 value) { - _internal_set_guid(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.guid.guid) +inline void FestivalFilter::set_none(bool value) { + _internal_set_none(value); + // @@protoc_insertion_point(field_set:FestivalFilter.none) } // ------------------------------------------------------------------- -// Trail_map_type_filter +// MapTypeFilter // bool unknown_map = 1; -inline void Trail_map_type_filter::clear_unknown_map() { +inline void MapTypeFilter::clear_unknown_map() { unknown_map_ = false; } -inline bool Trail_map_type_filter::_internal_unknown_map() const { +inline bool MapTypeFilter::_internal_unknown_map() const { return unknown_map_; } -inline bool Trail_map_type_filter::unknown_map() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.map_type_filter.unknown_map) +inline bool MapTypeFilter::unknown_map() const { + // @@protoc_insertion_point(field_get:MapTypeFilter.unknown_map) return _internal_unknown_map(); } -inline void Trail_map_type_filter::_internal_set_unknown_map(bool value) { +inline void MapTypeFilter::_internal_set_unknown_map(bool value) { unknown_map_ = value; } -inline void Trail_map_type_filter::set_unknown_map(bool value) { +inline void MapTypeFilter::set_unknown_map(bool value) { _internal_set_unknown_map(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.map_type_filter.unknown_map) + // @@protoc_insertion_point(field_set:MapTypeFilter.unknown_map) } // bool redirect_map = 2; -inline void Trail_map_type_filter::clear_redirect_map() { +inline void MapTypeFilter::clear_redirect_map() { redirect_map_ = false; } -inline bool Trail_map_type_filter::_internal_redirect_map() const { +inline bool MapTypeFilter::_internal_redirect_map() const { return redirect_map_; } -inline bool Trail_map_type_filter::redirect_map() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.map_type_filter.redirect_map) +inline bool MapTypeFilter::redirect_map() const { + // @@protoc_insertion_point(field_get:MapTypeFilter.redirect_map) return _internal_redirect_map(); } -inline void Trail_map_type_filter::_internal_set_redirect_map(bool value) { +inline void MapTypeFilter::_internal_set_redirect_map(bool value) { redirect_map_ = value; } -inline void Trail_map_type_filter::set_redirect_map(bool value) { +inline void MapTypeFilter::set_redirect_map(bool value) { _internal_set_redirect_map(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.map_type_filter.redirect_map) + // @@protoc_insertion_point(field_set:MapTypeFilter.redirect_map) } // bool character_create_map = 3; -inline void Trail_map_type_filter::clear_character_create_map() { +inline void MapTypeFilter::clear_character_create_map() { character_create_map_ = false; } -inline bool Trail_map_type_filter::_internal_character_create_map() const { +inline bool MapTypeFilter::_internal_character_create_map() const { return character_create_map_; } -inline bool Trail_map_type_filter::character_create_map() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.map_type_filter.character_create_map) +inline bool MapTypeFilter::character_create_map() const { + // @@protoc_insertion_point(field_get:MapTypeFilter.character_create_map) return _internal_character_create_map(); } -inline void Trail_map_type_filter::_internal_set_character_create_map(bool value) { +inline void MapTypeFilter::_internal_set_character_create_map(bool value) { character_create_map_ = value; } -inline void Trail_map_type_filter::set_character_create_map(bool value) { +inline void MapTypeFilter::set_character_create_map(bool value) { _internal_set_character_create_map(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.map_type_filter.character_create_map) + // @@protoc_insertion_point(field_set:MapTypeFilter.character_create_map) } // bool pvp_map = 4; -inline void Trail_map_type_filter::clear_pvp_map() { +inline void MapTypeFilter::clear_pvp_map() { pvp_map_ = false; } -inline bool Trail_map_type_filter::_internal_pvp_map() const { +inline bool MapTypeFilter::_internal_pvp_map() const { return pvp_map_; } -inline bool Trail_map_type_filter::pvp_map() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.map_type_filter.pvp_map) +inline bool MapTypeFilter::pvp_map() const { + // @@protoc_insertion_point(field_get:MapTypeFilter.pvp_map) return _internal_pvp_map(); } -inline void Trail_map_type_filter::_internal_set_pvp_map(bool value) { +inline void MapTypeFilter::_internal_set_pvp_map(bool value) { pvp_map_ = value; } -inline void Trail_map_type_filter::set_pvp_map(bool value) { +inline void MapTypeFilter::set_pvp_map(bool value) { _internal_set_pvp_map(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.map_type_filter.pvp_map) + // @@protoc_insertion_point(field_set:MapTypeFilter.pvp_map) } // bool gvg_map = 5; -inline void Trail_map_type_filter::clear_gvg_map() { +inline void MapTypeFilter::clear_gvg_map() { gvg_map_ = false; } -inline bool Trail_map_type_filter::_internal_gvg_map() const { +inline bool MapTypeFilter::_internal_gvg_map() const { return gvg_map_; } -inline bool Trail_map_type_filter::gvg_map() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.map_type_filter.gvg_map) +inline bool MapTypeFilter::gvg_map() const { + // @@protoc_insertion_point(field_get:MapTypeFilter.gvg_map) return _internal_gvg_map(); } -inline void Trail_map_type_filter::_internal_set_gvg_map(bool value) { +inline void MapTypeFilter::_internal_set_gvg_map(bool value) { gvg_map_ = value; } -inline void Trail_map_type_filter::set_gvg_map(bool value) { +inline void MapTypeFilter::set_gvg_map(bool value) { _internal_set_gvg_map(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.map_type_filter.gvg_map) + // @@protoc_insertion_point(field_set:MapTypeFilter.gvg_map) } // bool instance_map = 6; -inline void Trail_map_type_filter::clear_instance_map() { +inline void MapTypeFilter::clear_instance_map() { instance_map_ = false; } -inline bool Trail_map_type_filter::_internal_instance_map() const { +inline bool MapTypeFilter::_internal_instance_map() const { return instance_map_; } -inline bool Trail_map_type_filter::instance_map() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.map_type_filter.instance_map) +inline bool MapTypeFilter::instance_map() const { + // @@protoc_insertion_point(field_get:MapTypeFilter.instance_map) return _internal_instance_map(); } -inline void Trail_map_type_filter::_internal_set_instance_map(bool value) { +inline void MapTypeFilter::_internal_set_instance_map(bool value) { instance_map_ = value; } -inline void Trail_map_type_filter::set_instance_map(bool value) { +inline void MapTypeFilter::set_instance_map(bool value) { _internal_set_instance_map(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.map_type_filter.instance_map) + // @@protoc_insertion_point(field_set:MapTypeFilter.instance_map) } // bool public_map = 7; -inline void Trail_map_type_filter::clear_public_map() { +inline void MapTypeFilter::clear_public_map() { public_map_ = false; } -inline bool Trail_map_type_filter::_internal_public_map() const { +inline bool MapTypeFilter::_internal_public_map() const { return public_map_; } -inline bool Trail_map_type_filter::public_map() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.map_type_filter.public_map) +inline bool MapTypeFilter::public_map() const { + // @@protoc_insertion_point(field_get:MapTypeFilter.public_map) return _internal_public_map(); } -inline void Trail_map_type_filter::_internal_set_public_map(bool value) { +inline void MapTypeFilter::_internal_set_public_map(bool value) { public_map_ = value; } -inline void Trail_map_type_filter::set_public_map(bool value) { +inline void MapTypeFilter::set_public_map(bool value) { _internal_set_public_map(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.map_type_filter.public_map) + // @@protoc_insertion_point(field_set:MapTypeFilter.public_map) } // bool tournament_map = 8; -inline void Trail_map_type_filter::clear_tournament_map() { +inline void MapTypeFilter::clear_tournament_map() { tournament_map_ = false; } -inline bool Trail_map_type_filter::_internal_tournament_map() const { +inline bool MapTypeFilter::_internal_tournament_map() const { return tournament_map_; } -inline bool Trail_map_type_filter::tournament_map() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.map_type_filter.tournament_map) +inline bool MapTypeFilter::tournament_map() const { + // @@protoc_insertion_point(field_get:MapTypeFilter.tournament_map) return _internal_tournament_map(); } -inline void Trail_map_type_filter::_internal_set_tournament_map(bool value) { +inline void MapTypeFilter::_internal_set_tournament_map(bool value) { tournament_map_ = value; } -inline void Trail_map_type_filter::set_tournament_map(bool value) { +inline void MapTypeFilter::set_tournament_map(bool value) { _internal_set_tournament_map(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.map_type_filter.tournament_map) + // @@protoc_insertion_point(field_set:MapTypeFilter.tournament_map) } // bool tutorial_map = 9; -inline void Trail_map_type_filter::clear_tutorial_map() { +inline void MapTypeFilter::clear_tutorial_map() { tutorial_map_ = false; } -inline bool Trail_map_type_filter::_internal_tutorial_map() const { +inline bool MapTypeFilter::_internal_tutorial_map() const { return tutorial_map_; } -inline bool Trail_map_type_filter::tutorial_map() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.map_type_filter.tutorial_map) +inline bool MapTypeFilter::tutorial_map() const { + // @@protoc_insertion_point(field_get:MapTypeFilter.tutorial_map) return _internal_tutorial_map(); } -inline void Trail_map_type_filter::_internal_set_tutorial_map(bool value) { +inline void MapTypeFilter::_internal_set_tutorial_map(bool value) { tutorial_map_ = value; } -inline void Trail_map_type_filter::set_tutorial_map(bool value) { +inline void MapTypeFilter::set_tutorial_map(bool value) { _internal_set_tutorial_map(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.map_type_filter.tutorial_map) + // @@protoc_insertion_point(field_set:MapTypeFilter.tutorial_map) } // bool user_tournament_map = 10; -inline void Trail_map_type_filter::clear_user_tournament_map() { +inline void MapTypeFilter::clear_user_tournament_map() { user_tournament_map_ = false; } -inline bool Trail_map_type_filter::_internal_user_tournament_map() const { +inline bool MapTypeFilter::_internal_user_tournament_map() const { return user_tournament_map_; } -inline bool Trail_map_type_filter::user_tournament_map() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.map_type_filter.user_tournament_map) +inline bool MapTypeFilter::user_tournament_map() const { + // @@protoc_insertion_point(field_get:MapTypeFilter.user_tournament_map) return _internal_user_tournament_map(); } -inline void Trail_map_type_filter::_internal_set_user_tournament_map(bool value) { +inline void MapTypeFilter::_internal_set_user_tournament_map(bool value) { user_tournament_map_ = value; } -inline void Trail_map_type_filter::set_user_tournament_map(bool value) { +inline void MapTypeFilter::set_user_tournament_map(bool value) { _internal_set_user_tournament_map(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.map_type_filter.user_tournament_map) + // @@protoc_insertion_point(field_set:MapTypeFilter.user_tournament_map) } // bool center_map = 11; -inline void Trail_map_type_filter::clear_center_map() { +inline void MapTypeFilter::clear_center_map() { center_map_ = false; } -inline bool Trail_map_type_filter::_internal_center_map() const { +inline bool MapTypeFilter::_internal_center_map() const { return center_map_; } -inline bool Trail_map_type_filter::center_map() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.map_type_filter.center_map) +inline bool MapTypeFilter::center_map() const { + // @@protoc_insertion_point(field_get:MapTypeFilter.center_map) return _internal_center_map(); } -inline void Trail_map_type_filter::_internal_set_center_map(bool value) { +inline void MapTypeFilter::_internal_set_center_map(bool value) { center_map_ = value; } -inline void Trail_map_type_filter::set_center_map(bool value) { +inline void MapTypeFilter::set_center_map(bool value) { _internal_set_center_map(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.map_type_filter.center_map) + // @@protoc_insertion_point(field_set:MapTypeFilter.center_map) } // bool eternal_battlegrounds_map = 12; -inline void Trail_map_type_filter::clear_eternal_battlegrounds_map() { +inline void MapTypeFilter::clear_eternal_battlegrounds_map() { eternal_battlegrounds_map_ = false; } -inline bool Trail_map_type_filter::_internal_eternal_battlegrounds_map() const { +inline bool MapTypeFilter::_internal_eternal_battlegrounds_map() const { return eternal_battlegrounds_map_; } -inline bool Trail_map_type_filter::eternal_battlegrounds_map() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.map_type_filter.eternal_battlegrounds_map) +inline bool MapTypeFilter::eternal_battlegrounds_map() const { + // @@protoc_insertion_point(field_get:MapTypeFilter.eternal_battlegrounds_map) return _internal_eternal_battlegrounds_map(); } -inline void Trail_map_type_filter::_internal_set_eternal_battlegrounds_map(bool value) { +inline void MapTypeFilter::_internal_set_eternal_battlegrounds_map(bool value) { eternal_battlegrounds_map_ = value; } -inline void Trail_map_type_filter::set_eternal_battlegrounds_map(bool value) { +inline void MapTypeFilter::set_eternal_battlegrounds_map(bool value) { _internal_set_eternal_battlegrounds_map(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.map_type_filter.eternal_battlegrounds_map) + // @@protoc_insertion_point(field_set:MapTypeFilter.eternal_battlegrounds_map) } // bool bluehome_map = 13; -inline void Trail_map_type_filter::clear_bluehome_map() { +inline void MapTypeFilter::clear_bluehome_map() { bluehome_map_ = false; } -inline bool Trail_map_type_filter::_internal_bluehome_map() const { +inline bool MapTypeFilter::_internal_bluehome_map() const { return bluehome_map_; } -inline bool Trail_map_type_filter::bluehome_map() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.map_type_filter.bluehome_map) +inline bool MapTypeFilter::bluehome_map() const { + // @@protoc_insertion_point(field_get:MapTypeFilter.bluehome_map) return _internal_bluehome_map(); } -inline void Trail_map_type_filter::_internal_set_bluehome_map(bool value) { +inline void MapTypeFilter::_internal_set_bluehome_map(bool value) { bluehome_map_ = value; } -inline void Trail_map_type_filter::set_bluehome_map(bool value) { +inline void MapTypeFilter::set_bluehome_map(bool value) { _internal_set_bluehome_map(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.map_type_filter.bluehome_map) + // @@protoc_insertion_point(field_set:MapTypeFilter.bluehome_map) } // bool blue_borderlands_map = 14; -inline void Trail_map_type_filter::clear_blue_borderlands_map() { +inline void MapTypeFilter::clear_blue_borderlands_map() { blue_borderlands_map_ = false; } -inline bool Trail_map_type_filter::_internal_blue_borderlands_map() const { +inline bool MapTypeFilter::_internal_blue_borderlands_map() const { return blue_borderlands_map_; } -inline bool Trail_map_type_filter::blue_borderlands_map() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.map_type_filter.blue_borderlands_map) +inline bool MapTypeFilter::blue_borderlands_map() const { + // @@protoc_insertion_point(field_get:MapTypeFilter.blue_borderlands_map) return _internal_blue_borderlands_map(); } -inline void Trail_map_type_filter::_internal_set_blue_borderlands_map(bool value) { +inline void MapTypeFilter::_internal_set_blue_borderlands_map(bool value) { blue_borderlands_map_ = value; } -inline void Trail_map_type_filter::set_blue_borderlands_map(bool value) { +inline void MapTypeFilter::set_blue_borderlands_map(bool value) { _internal_set_blue_borderlands_map(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.map_type_filter.blue_borderlands_map) + // @@protoc_insertion_point(field_set:MapTypeFilter.blue_borderlands_map) } // bool green_home_map = 15; -inline void Trail_map_type_filter::clear_green_home_map() { +inline void MapTypeFilter::clear_green_home_map() { green_home_map_ = false; } -inline bool Trail_map_type_filter::_internal_green_home_map() const { +inline bool MapTypeFilter::_internal_green_home_map() const { return green_home_map_; } -inline bool Trail_map_type_filter::green_home_map() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.map_type_filter.green_home_map) +inline bool MapTypeFilter::green_home_map() const { + // @@protoc_insertion_point(field_get:MapTypeFilter.green_home_map) return _internal_green_home_map(); } -inline void Trail_map_type_filter::_internal_set_green_home_map(bool value) { +inline void MapTypeFilter::_internal_set_green_home_map(bool value) { green_home_map_ = value; } -inline void Trail_map_type_filter::set_green_home_map(bool value) { +inline void MapTypeFilter::set_green_home_map(bool value) { _internal_set_green_home_map(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.map_type_filter.green_home_map) + // @@protoc_insertion_point(field_set:MapTypeFilter.green_home_map) } // bool green_borderlands_map = 16; -inline void Trail_map_type_filter::clear_green_borderlands_map() { +inline void MapTypeFilter::clear_green_borderlands_map() { green_borderlands_map_ = false; } -inline bool Trail_map_type_filter::_internal_green_borderlands_map() const { +inline bool MapTypeFilter::_internal_green_borderlands_map() const { return green_borderlands_map_; } -inline bool Trail_map_type_filter::green_borderlands_map() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.map_type_filter.green_borderlands_map) +inline bool MapTypeFilter::green_borderlands_map() const { + // @@protoc_insertion_point(field_get:MapTypeFilter.green_borderlands_map) return _internal_green_borderlands_map(); } -inline void Trail_map_type_filter::_internal_set_green_borderlands_map(bool value) { +inline void MapTypeFilter::_internal_set_green_borderlands_map(bool value) { green_borderlands_map_ = value; } -inline void Trail_map_type_filter::set_green_borderlands_map(bool value) { +inline void MapTypeFilter::set_green_borderlands_map(bool value) { _internal_set_green_borderlands_map(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.map_type_filter.green_borderlands_map) + // @@protoc_insertion_point(field_set:MapTypeFilter.green_borderlands_map) } // bool red_home_map = 17; -inline void Trail_map_type_filter::clear_red_home_map() { +inline void MapTypeFilter::clear_red_home_map() { red_home_map_ = false; } -inline bool Trail_map_type_filter::_internal_red_home_map() const { +inline bool MapTypeFilter::_internal_red_home_map() const { return red_home_map_; } -inline bool Trail_map_type_filter::red_home_map() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.map_type_filter.red_home_map) +inline bool MapTypeFilter::red_home_map() const { + // @@protoc_insertion_point(field_get:MapTypeFilter.red_home_map) return _internal_red_home_map(); } -inline void Trail_map_type_filter::_internal_set_red_home_map(bool value) { +inline void MapTypeFilter::_internal_set_red_home_map(bool value) { red_home_map_ = value; } -inline void Trail_map_type_filter::set_red_home_map(bool value) { +inline void MapTypeFilter::set_red_home_map(bool value) { _internal_set_red_home_map(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.map_type_filter.red_home_map) + // @@protoc_insertion_point(field_set:MapTypeFilter.red_home_map) } // bool red_borderlands_map = 18; -inline void Trail_map_type_filter::clear_red_borderlands_map() { +inline void MapTypeFilter::clear_red_borderlands_map() { red_borderlands_map_ = false; } -inline bool Trail_map_type_filter::_internal_red_borderlands_map() const { +inline bool MapTypeFilter::_internal_red_borderlands_map() const { return red_borderlands_map_; } -inline bool Trail_map_type_filter::red_borderlands_map() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.map_type_filter.red_borderlands_map) +inline bool MapTypeFilter::red_borderlands_map() const { + // @@protoc_insertion_point(field_get:MapTypeFilter.red_borderlands_map) return _internal_red_borderlands_map(); } -inline void Trail_map_type_filter::_internal_set_red_borderlands_map(bool value) { +inline void MapTypeFilter::_internal_set_red_borderlands_map(bool value) { red_borderlands_map_ = value; } -inline void Trail_map_type_filter::set_red_borderlands_map(bool value) { +inline void MapTypeFilter::set_red_borderlands_map(bool value) { _internal_set_red_borderlands_map(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.map_type_filter.red_borderlands_map) + // @@protoc_insertion_point(field_set:MapTypeFilter.red_borderlands_map) } // bool fortunes_vale_map = 19; -inline void Trail_map_type_filter::clear_fortunes_vale_map() { +inline void MapTypeFilter::clear_fortunes_vale_map() { fortunes_vale_map_ = false; } -inline bool Trail_map_type_filter::_internal_fortunes_vale_map() const { +inline bool MapTypeFilter::_internal_fortunes_vale_map() const { return fortunes_vale_map_; } -inline bool Trail_map_type_filter::fortunes_vale_map() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.map_type_filter.fortunes_vale_map) +inline bool MapTypeFilter::fortunes_vale_map() const { + // @@protoc_insertion_point(field_get:MapTypeFilter.fortunes_vale_map) return _internal_fortunes_vale_map(); } -inline void Trail_map_type_filter::_internal_set_fortunes_vale_map(bool value) { +inline void MapTypeFilter::_internal_set_fortunes_vale_map(bool value) { fortunes_vale_map_ = value; } -inline void Trail_map_type_filter::set_fortunes_vale_map(bool value) { +inline void MapTypeFilter::set_fortunes_vale_map(bool value) { _internal_set_fortunes_vale_map(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.map_type_filter.fortunes_vale_map) + // @@protoc_insertion_point(field_set:MapTypeFilter.fortunes_vale_map) } // bool jump_puzzle_map = 20; -inline void Trail_map_type_filter::clear_jump_puzzle_map() { +inline void MapTypeFilter::clear_jump_puzzle_map() { jump_puzzle_map_ = false; } -inline bool Trail_map_type_filter::_internal_jump_puzzle_map() const { +inline bool MapTypeFilter::_internal_jump_puzzle_map() const { return jump_puzzle_map_; } -inline bool Trail_map_type_filter::jump_puzzle_map() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.map_type_filter.jump_puzzle_map) +inline bool MapTypeFilter::jump_puzzle_map() const { + // @@protoc_insertion_point(field_get:MapTypeFilter.jump_puzzle_map) return _internal_jump_puzzle_map(); } -inline void Trail_map_type_filter::_internal_set_jump_puzzle_map(bool value) { +inline void MapTypeFilter::_internal_set_jump_puzzle_map(bool value) { jump_puzzle_map_ = value; } -inline void Trail_map_type_filter::set_jump_puzzle_map(bool value) { +inline void MapTypeFilter::set_jump_puzzle_map(bool value) { _internal_set_jump_puzzle_map(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.map_type_filter.jump_puzzle_map) + // @@protoc_insertion_point(field_set:MapTypeFilter.jump_puzzle_map) } // bool obsidian_sanctum_map = 21; -inline void Trail_map_type_filter::clear_obsidian_sanctum_map() { +inline void MapTypeFilter::clear_obsidian_sanctum_map() { obsidian_sanctum_map_ = false; } -inline bool Trail_map_type_filter::_internal_obsidian_sanctum_map() const { +inline bool MapTypeFilter::_internal_obsidian_sanctum_map() const { return obsidian_sanctum_map_; } -inline bool Trail_map_type_filter::obsidian_sanctum_map() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.map_type_filter.obsidian_sanctum_map) +inline bool MapTypeFilter::obsidian_sanctum_map() const { + // @@protoc_insertion_point(field_get:MapTypeFilter.obsidian_sanctum_map) return _internal_obsidian_sanctum_map(); } -inline void Trail_map_type_filter::_internal_set_obsidian_sanctum_map(bool value) { +inline void MapTypeFilter::_internal_set_obsidian_sanctum_map(bool value) { obsidian_sanctum_map_ = value; } -inline void Trail_map_type_filter::set_obsidian_sanctum_map(bool value) { +inline void MapTypeFilter::set_obsidian_sanctum_map(bool value) { _internal_set_obsidian_sanctum_map(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.map_type_filter.obsidian_sanctum_map) + // @@protoc_insertion_point(field_set:MapTypeFilter.obsidian_sanctum_map) } // bool edge_of_the_mists_map = 22; -inline void Trail_map_type_filter::clear_edge_of_the_mists_map() { +inline void MapTypeFilter::clear_edge_of_the_mists_map() { edge_of_the_mists_map_ = false; } -inline bool Trail_map_type_filter::_internal_edge_of_the_mists_map() const { +inline bool MapTypeFilter::_internal_edge_of_the_mists_map() const { return edge_of_the_mists_map_; } -inline bool Trail_map_type_filter::edge_of_the_mists_map() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.map_type_filter.edge_of_the_mists_map) +inline bool MapTypeFilter::edge_of_the_mists_map() const { + // @@protoc_insertion_point(field_get:MapTypeFilter.edge_of_the_mists_map) return _internal_edge_of_the_mists_map(); } -inline void Trail_map_type_filter::_internal_set_edge_of_the_mists_map(bool value) { +inline void MapTypeFilter::_internal_set_edge_of_the_mists_map(bool value) { edge_of_the_mists_map_ = value; } -inline void Trail_map_type_filter::set_edge_of_the_mists_map(bool value) { +inline void MapTypeFilter::set_edge_of_the_mists_map(bool value) { _internal_set_edge_of_the_mists_map(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.map_type_filter.edge_of_the_mists_map) + // @@protoc_insertion_point(field_set:MapTypeFilter.edge_of_the_mists_map) } // bool public_mini_map = 23; -inline void Trail_map_type_filter::clear_public_mini_map() { +inline void MapTypeFilter::clear_public_mini_map() { public_mini_map_ = false; } -inline bool Trail_map_type_filter::_internal_public_mini_map() const { +inline bool MapTypeFilter::_internal_public_mini_map() const { return public_mini_map_; } -inline bool Trail_map_type_filter::public_mini_map() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.map_type_filter.public_mini_map) +inline bool MapTypeFilter::public_mini_map() const { + // @@protoc_insertion_point(field_get:MapTypeFilter.public_mini_map) return _internal_public_mini_map(); } -inline void Trail_map_type_filter::_internal_set_public_mini_map(bool value) { +inline void MapTypeFilter::_internal_set_public_mini_map(bool value) { public_mini_map_ = value; } -inline void Trail_map_type_filter::set_public_mini_map(bool value) { +inline void MapTypeFilter::set_public_mini_map(bool value) { _internal_set_public_mini_map(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.map_type_filter.public_mini_map) + // @@protoc_insertion_point(field_set:MapTypeFilter.public_mini_map) } // bool wvw_lounge_map = 24; -inline void Trail_map_type_filter::clear_wvw_lounge_map() { +inline void MapTypeFilter::clear_wvw_lounge_map() { wvw_lounge_map_ = false; } -inline bool Trail_map_type_filter::_internal_wvw_lounge_map() const { +inline bool MapTypeFilter::_internal_wvw_lounge_map() const { return wvw_lounge_map_; } -inline bool Trail_map_type_filter::wvw_lounge_map() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.map_type_filter.wvw_lounge_map) +inline bool MapTypeFilter::wvw_lounge_map() const { + // @@protoc_insertion_point(field_get:MapTypeFilter.wvw_lounge_map) return _internal_wvw_lounge_map(); } -inline void Trail_map_type_filter::_internal_set_wvw_lounge_map(bool value) { +inline void MapTypeFilter::_internal_set_wvw_lounge_map(bool value) { wvw_lounge_map_ = value; } -inline void Trail_map_type_filter::set_wvw_lounge_map(bool value) { +inline void MapTypeFilter::set_wvw_lounge_map(bool value) { _internal_set_wvw_lounge_map(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.map_type_filter.wvw_lounge_map) + // @@protoc_insertion_point(field_set:MapTypeFilter.wvw_lounge_map) } // ------------------------------------------------------------------- -// Trail_mount_filter +// MountFilter // bool raptor = 1; -inline void Trail_mount_filter::clear_raptor() { +inline void MountFilter::clear_raptor() { raptor_ = false; } -inline bool Trail_mount_filter::_internal_raptor() const { +inline bool MountFilter::_internal_raptor() const { return raptor_; } -inline bool Trail_mount_filter::raptor() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.mount_filter.raptor) +inline bool MountFilter::raptor() const { + // @@protoc_insertion_point(field_get:MountFilter.raptor) return _internal_raptor(); } -inline void Trail_mount_filter::_internal_set_raptor(bool value) { +inline void MountFilter::_internal_set_raptor(bool value) { raptor_ = value; } -inline void Trail_mount_filter::set_raptor(bool value) { +inline void MountFilter::set_raptor(bool value) { _internal_set_raptor(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.mount_filter.raptor) + // @@protoc_insertion_point(field_set:MountFilter.raptor) } // bool springer = 2; -inline void Trail_mount_filter::clear_springer() { +inline void MountFilter::clear_springer() { springer_ = false; } -inline bool Trail_mount_filter::_internal_springer() const { +inline bool MountFilter::_internal_springer() const { return springer_; } -inline bool Trail_mount_filter::springer() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.mount_filter.springer) +inline bool MountFilter::springer() const { + // @@protoc_insertion_point(field_get:MountFilter.springer) return _internal_springer(); } -inline void Trail_mount_filter::_internal_set_springer(bool value) { +inline void MountFilter::_internal_set_springer(bool value) { springer_ = value; } -inline void Trail_mount_filter::set_springer(bool value) { +inline void MountFilter::set_springer(bool value) { _internal_set_springer(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.mount_filter.springer) + // @@protoc_insertion_point(field_set:MountFilter.springer) } // bool skimmer = 3; -inline void Trail_mount_filter::clear_skimmer() { +inline void MountFilter::clear_skimmer() { skimmer_ = false; } -inline bool Trail_mount_filter::_internal_skimmer() const { +inline bool MountFilter::_internal_skimmer() const { return skimmer_; } -inline bool Trail_mount_filter::skimmer() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.mount_filter.skimmer) +inline bool MountFilter::skimmer() const { + // @@protoc_insertion_point(field_get:MountFilter.skimmer) return _internal_skimmer(); } -inline void Trail_mount_filter::_internal_set_skimmer(bool value) { +inline void MountFilter::_internal_set_skimmer(bool value) { skimmer_ = value; } -inline void Trail_mount_filter::set_skimmer(bool value) { +inline void MountFilter::set_skimmer(bool value) { _internal_set_skimmer(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.mount_filter.skimmer) + // @@protoc_insertion_point(field_set:MountFilter.skimmer) } // bool jackal = 4; -inline void Trail_mount_filter::clear_jackal() { +inline void MountFilter::clear_jackal() { jackal_ = false; } -inline bool Trail_mount_filter::_internal_jackal() const { +inline bool MountFilter::_internal_jackal() const { return jackal_; } -inline bool Trail_mount_filter::jackal() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.mount_filter.jackal) +inline bool MountFilter::jackal() const { + // @@protoc_insertion_point(field_get:MountFilter.jackal) return _internal_jackal(); } -inline void Trail_mount_filter::_internal_set_jackal(bool value) { +inline void MountFilter::_internal_set_jackal(bool value) { jackal_ = value; } -inline void Trail_mount_filter::set_jackal(bool value) { +inline void MountFilter::set_jackal(bool value) { _internal_set_jackal(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.mount_filter.jackal) + // @@protoc_insertion_point(field_set:MountFilter.jackal) } // bool griffon = 5; -inline void Trail_mount_filter::clear_griffon() { +inline void MountFilter::clear_griffon() { griffon_ = false; } -inline bool Trail_mount_filter::_internal_griffon() const { +inline bool MountFilter::_internal_griffon() const { return griffon_; } -inline bool Trail_mount_filter::griffon() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.mount_filter.griffon) +inline bool MountFilter::griffon() const { + // @@protoc_insertion_point(field_get:MountFilter.griffon) return _internal_griffon(); } -inline void Trail_mount_filter::_internal_set_griffon(bool value) { +inline void MountFilter::_internal_set_griffon(bool value) { griffon_ = value; } -inline void Trail_mount_filter::set_griffon(bool value) { +inline void MountFilter::set_griffon(bool value) { _internal_set_griffon(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.mount_filter.griffon) + // @@protoc_insertion_point(field_set:MountFilter.griffon) } // bool roller_beetle = 6; -inline void Trail_mount_filter::clear_roller_beetle() { +inline void MountFilter::clear_roller_beetle() { roller_beetle_ = false; } -inline bool Trail_mount_filter::_internal_roller_beetle() const { +inline bool MountFilter::_internal_roller_beetle() const { return roller_beetle_; } -inline bool Trail_mount_filter::roller_beetle() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.mount_filter.roller_beetle) +inline bool MountFilter::roller_beetle() const { + // @@protoc_insertion_point(field_get:MountFilter.roller_beetle) return _internal_roller_beetle(); } -inline void Trail_mount_filter::_internal_set_roller_beetle(bool value) { +inline void MountFilter::_internal_set_roller_beetle(bool value) { roller_beetle_ = value; } -inline void Trail_mount_filter::set_roller_beetle(bool value) { +inline void MountFilter::set_roller_beetle(bool value) { _internal_set_roller_beetle(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.mount_filter.roller_beetle) + // @@protoc_insertion_point(field_set:MountFilter.roller_beetle) } // bool warclaw = 7; -inline void Trail_mount_filter::clear_warclaw() { +inline void MountFilter::clear_warclaw() { warclaw_ = false; } -inline bool Trail_mount_filter::_internal_warclaw() const { +inline bool MountFilter::_internal_warclaw() const { return warclaw_; } -inline bool Trail_mount_filter::warclaw() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.mount_filter.warclaw) +inline bool MountFilter::warclaw() const { + // @@protoc_insertion_point(field_get:MountFilter.warclaw) return _internal_warclaw(); } -inline void Trail_mount_filter::_internal_set_warclaw(bool value) { +inline void MountFilter::_internal_set_warclaw(bool value) { warclaw_ = value; } -inline void Trail_mount_filter::set_warclaw(bool value) { +inline void MountFilter::set_warclaw(bool value) { _internal_set_warclaw(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.mount_filter.warclaw) + // @@protoc_insertion_point(field_set:MountFilter.warclaw) } // bool skyscalee = 8; -inline void Trail_mount_filter::clear_skyscalee() { +inline void MountFilter::clear_skyscalee() { skyscalee_ = false; } -inline bool Trail_mount_filter::_internal_skyscalee() const { +inline bool MountFilter::_internal_skyscalee() const { return skyscalee_; } -inline bool Trail_mount_filter::skyscalee() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.mount_filter.skyscalee) +inline bool MountFilter::skyscalee() const { + // @@protoc_insertion_point(field_get:MountFilter.skyscalee) return _internal_skyscalee(); } -inline void Trail_mount_filter::_internal_set_skyscalee(bool value) { +inline void MountFilter::_internal_set_skyscalee(bool value) { skyscalee_ = value; } -inline void Trail_mount_filter::set_skyscalee(bool value) { +inline void MountFilter::set_skyscalee(bool value) { _internal_set_skyscalee(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.mount_filter.skyscalee) + // @@protoc_insertion_point(field_set:MountFilter.skyscalee) } // bool skiff = 9; -inline void Trail_mount_filter::clear_skiff() { +inline void MountFilter::clear_skiff() { skiff_ = false; } -inline bool Trail_mount_filter::_internal_skiff() const { +inline bool MountFilter::_internal_skiff() const { return skiff_; } -inline bool Trail_mount_filter::skiff() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.mount_filter.skiff) +inline bool MountFilter::skiff() const { + // @@protoc_insertion_point(field_get:MountFilter.skiff) return _internal_skiff(); } -inline void Trail_mount_filter::_internal_set_skiff(bool value) { +inline void MountFilter::_internal_set_skiff(bool value) { skiff_ = value; } -inline void Trail_mount_filter::set_skiff(bool value) { +inline void MountFilter::set_skiff(bool value) { _internal_set_skiff(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.mount_filter.skiff) + // @@protoc_insertion_point(field_set:MountFilter.skiff) } // bool seige_turtle = 10; -inline void Trail_mount_filter::clear_seige_turtle() { +inline void MountFilter::clear_seige_turtle() { seige_turtle_ = false; } -inline bool Trail_mount_filter::_internal_seige_turtle() const { +inline bool MountFilter::_internal_seige_turtle() const { return seige_turtle_; } -inline bool Trail_mount_filter::seige_turtle() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.mount_filter.seige_turtle) +inline bool MountFilter::seige_turtle() const { + // @@protoc_insertion_point(field_get:MountFilter.seige_turtle) return _internal_seige_turtle(); } -inline void Trail_mount_filter::_internal_set_seige_turtle(bool value) { +inline void MountFilter::_internal_set_seige_turtle(bool value) { seige_turtle_ = value; } -inline void Trail_mount_filter::set_seige_turtle(bool value) { +inline void MountFilter::set_seige_turtle(bool value) { _internal_set_seige_turtle(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.mount_filter.seige_turtle) + // @@protoc_insertion_point(field_set:MountFilter.seige_turtle) } // ------------------------------------------------------------------- -// Trail_profession_filter +// ProfessionFilter // bool guardian = 1; -inline void Trail_profession_filter::clear_guardian() { +inline void ProfessionFilter::clear_guardian() { guardian_ = false; } -inline bool Trail_profession_filter::_internal_guardian() const { +inline bool ProfessionFilter::_internal_guardian() const { return guardian_; } -inline bool Trail_profession_filter::guardian() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.profession_filter.guardian) +inline bool ProfessionFilter::guardian() const { + // @@protoc_insertion_point(field_get:ProfessionFilter.guardian) return _internal_guardian(); } -inline void Trail_profession_filter::_internal_set_guardian(bool value) { +inline void ProfessionFilter::_internal_set_guardian(bool value) { guardian_ = value; } -inline void Trail_profession_filter::set_guardian(bool value) { +inline void ProfessionFilter::set_guardian(bool value) { _internal_set_guardian(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.profession_filter.guardian) + // @@protoc_insertion_point(field_set:ProfessionFilter.guardian) } // bool warrior = 2; -inline void Trail_profession_filter::clear_warrior() { +inline void ProfessionFilter::clear_warrior() { warrior_ = false; } -inline bool Trail_profession_filter::_internal_warrior() const { +inline bool ProfessionFilter::_internal_warrior() const { return warrior_; } -inline bool Trail_profession_filter::warrior() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.profession_filter.warrior) +inline bool ProfessionFilter::warrior() const { + // @@protoc_insertion_point(field_get:ProfessionFilter.warrior) return _internal_warrior(); } -inline void Trail_profession_filter::_internal_set_warrior(bool value) { +inline void ProfessionFilter::_internal_set_warrior(bool value) { warrior_ = value; } -inline void Trail_profession_filter::set_warrior(bool value) { +inline void ProfessionFilter::set_warrior(bool value) { _internal_set_warrior(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.profession_filter.warrior) + // @@protoc_insertion_point(field_set:ProfessionFilter.warrior) } // bool engineer = 3; -inline void Trail_profession_filter::clear_engineer() { +inline void ProfessionFilter::clear_engineer() { engineer_ = false; } -inline bool Trail_profession_filter::_internal_engineer() const { +inline bool ProfessionFilter::_internal_engineer() const { return engineer_; } -inline bool Trail_profession_filter::engineer() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.profession_filter.engineer) +inline bool ProfessionFilter::engineer() const { + // @@protoc_insertion_point(field_get:ProfessionFilter.engineer) return _internal_engineer(); } -inline void Trail_profession_filter::_internal_set_engineer(bool value) { +inline void ProfessionFilter::_internal_set_engineer(bool value) { engineer_ = value; } -inline void Trail_profession_filter::set_engineer(bool value) { +inline void ProfessionFilter::set_engineer(bool value) { _internal_set_engineer(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.profession_filter.engineer) + // @@protoc_insertion_point(field_set:ProfessionFilter.engineer) } // bool ranger = 4; -inline void Trail_profession_filter::clear_ranger() { +inline void ProfessionFilter::clear_ranger() { ranger_ = false; } -inline bool Trail_profession_filter::_internal_ranger() const { +inline bool ProfessionFilter::_internal_ranger() const { return ranger_; } -inline bool Trail_profession_filter::ranger() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.profession_filter.ranger) +inline bool ProfessionFilter::ranger() const { + // @@protoc_insertion_point(field_get:ProfessionFilter.ranger) return _internal_ranger(); } -inline void Trail_profession_filter::_internal_set_ranger(bool value) { +inline void ProfessionFilter::_internal_set_ranger(bool value) { ranger_ = value; } -inline void Trail_profession_filter::set_ranger(bool value) { +inline void ProfessionFilter::set_ranger(bool value) { _internal_set_ranger(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.profession_filter.ranger) + // @@protoc_insertion_point(field_set:ProfessionFilter.ranger) } // bool thief = 5; -inline void Trail_profession_filter::clear_thief() { +inline void ProfessionFilter::clear_thief() { thief_ = false; } -inline bool Trail_profession_filter::_internal_thief() const { +inline bool ProfessionFilter::_internal_thief() const { return thief_; } -inline bool Trail_profession_filter::thief() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.profession_filter.thief) +inline bool ProfessionFilter::thief() const { + // @@protoc_insertion_point(field_get:ProfessionFilter.thief) return _internal_thief(); } -inline void Trail_profession_filter::_internal_set_thief(bool value) { +inline void ProfessionFilter::_internal_set_thief(bool value) { thief_ = value; } -inline void Trail_profession_filter::set_thief(bool value) { +inline void ProfessionFilter::set_thief(bool value) { _internal_set_thief(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.profession_filter.thief) + // @@protoc_insertion_point(field_set:ProfessionFilter.thief) } // bool elementalist = 6; -inline void Trail_profession_filter::clear_elementalist() { +inline void ProfessionFilter::clear_elementalist() { elementalist_ = false; } -inline bool Trail_profession_filter::_internal_elementalist() const { +inline bool ProfessionFilter::_internal_elementalist() const { return elementalist_; } -inline bool Trail_profession_filter::elementalist() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.profession_filter.elementalist) +inline bool ProfessionFilter::elementalist() const { + // @@protoc_insertion_point(field_get:ProfessionFilter.elementalist) return _internal_elementalist(); } -inline void Trail_profession_filter::_internal_set_elementalist(bool value) { +inline void ProfessionFilter::_internal_set_elementalist(bool value) { elementalist_ = value; } -inline void Trail_profession_filter::set_elementalist(bool value) { +inline void ProfessionFilter::set_elementalist(bool value) { _internal_set_elementalist(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.profession_filter.elementalist) + // @@protoc_insertion_point(field_set:ProfessionFilter.elementalist) } // bool mesmer = 7; -inline void Trail_profession_filter::clear_mesmer() { +inline void ProfessionFilter::clear_mesmer() { mesmer_ = false; } -inline bool Trail_profession_filter::_internal_mesmer() const { +inline bool ProfessionFilter::_internal_mesmer() const { return mesmer_; } -inline bool Trail_profession_filter::mesmer() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.profession_filter.mesmer) +inline bool ProfessionFilter::mesmer() const { + // @@protoc_insertion_point(field_get:ProfessionFilter.mesmer) return _internal_mesmer(); } -inline void Trail_profession_filter::_internal_set_mesmer(bool value) { +inline void ProfessionFilter::_internal_set_mesmer(bool value) { mesmer_ = value; } -inline void Trail_profession_filter::set_mesmer(bool value) { +inline void ProfessionFilter::set_mesmer(bool value) { _internal_set_mesmer(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.profession_filter.mesmer) + // @@protoc_insertion_point(field_set:ProfessionFilter.mesmer) } // bool necromancer = 8; -inline void Trail_profession_filter::clear_necromancer() { +inline void ProfessionFilter::clear_necromancer() { necromancer_ = false; } -inline bool Trail_profession_filter::_internal_necromancer() const { +inline bool ProfessionFilter::_internal_necromancer() const { return necromancer_; } -inline bool Trail_profession_filter::necromancer() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.profession_filter.necromancer) +inline bool ProfessionFilter::necromancer() const { + // @@protoc_insertion_point(field_get:ProfessionFilter.necromancer) return _internal_necromancer(); } -inline void Trail_profession_filter::_internal_set_necromancer(bool value) { +inline void ProfessionFilter::_internal_set_necromancer(bool value) { necromancer_ = value; } -inline void Trail_profession_filter::set_necromancer(bool value) { +inline void ProfessionFilter::set_necromancer(bool value) { _internal_set_necromancer(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.profession_filter.necromancer) + // @@protoc_insertion_point(field_set:ProfessionFilter.necromancer) } // bool revenantnt = 9; -inline void Trail_profession_filter::clear_revenantnt() { +inline void ProfessionFilter::clear_revenantnt() { revenantnt_ = false; } -inline bool Trail_profession_filter::_internal_revenantnt() const { +inline bool ProfessionFilter::_internal_revenantnt() const { return revenantnt_; } -inline bool Trail_profession_filter::revenantnt() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.profession_filter.revenantnt) +inline bool ProfessionFilter::revenantnt() const { + // @@protoc_insertion_point(field_get:ProfessionFilter.revenantnt) return _internal_revenantnt(); } -inline void Trail_profession_filter::_internal_set_revenantnt(bool value) { +inline void ProfessionFilter::_internal_set_revenantnt(bool value) { revenantnt_ = value; } -inline void Trail_profession_filter::set_revenantnt(bool value) { +inline void ProfessionFilter::set_revenantnt(bool value) { _internal_set_revenantnt(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.profession_filter.revenantnt) + // @@protoc_insertion_point(field_set:ProfessionFilter.revenantnt) } // ------------------------------------------------------------------- -// Trail_specialization_filter +// SpecializationFilter -// bool elementalist_tempest = 48; -inline void Trail_specialization_filter::clear_elementalist_tempest() { +// bool elementalist_tempest = 1; +inline void SpecializationFilter::clear_elementalist_tempest() { elementalist_tempest_ = false; } -inline bool Trail_specialization_filter::_internal_elementalist_tempest() const { +inline bool SpecializationFilter::_internal_elementalist_tempest() const { return elementalist_tempest_; } -inline bool Trail_specialization_filter::elementalist_tempest() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.elementalist_tempest) +inline bool SpecializationFilter::elementalist_tempest() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.elementalist_tempest) return _internal_elementalist_tempest(); } -inline void Trail_specialization_filter::_internal_set_elementalist_tempest(bool value) { +inline void SpecializationFilter::_internal_set_elementalist_tempest(bool value) { elementalist_tempest_ = value; } -inline void Trail_specialization_filter::set_elementalist_tempest(bool value) { +inline void SpecializationFilter::set_elementalist_tempest(bool value) { _internal_set_elementalist_tempest(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.elementalist_tempest) + // @@protoc_insertion_point(field_set:SpecializationFilter.elementalist_tempest) } -// bool engineer_scrapper = 43; -inline void Trail_specialization_filter::clear_engineer_scrapper() { +// bool engineer_scrapper = 2; +inline void SpecializationFilter::clear_engineer_scrapper() { engineer_scrapper_ = false; } -inline bool Trail_specialization_filter::_internal_engineer_scrapper() const { +inline bool SpecializationFilter::_internal_engineer_scrapper() const { return engineer_scrapper_; } -inline bool Trail_specialization_filter::engineer_scrapper() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.engineer_scrapper) +inline bool SpecializationFilter::engineer_scrapper() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.engineer_scrapper) return _internal_engineer_scrapper(); } -inline void Trail_specialization_filter::_internal_set_engineer_scrapper(bool value) { +inline void SpecializationFilter::_internal_set_engineer_scrapper(bool value) { engineer_scrapper_ = value; } -inline void Trail_specialization_filter::set_engineer_scrapper(bool value) { +inline void SpecializationFilter::set_engineer_scrapper(bool value) { _internal_set_engineer_scrapper(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.engineer_scrapper) + // @@protoc_insertion_point(field_set:SpecializationFilter.engineer_scrapper) } -// bool guardian_dragonhunter = 27; -inline void Trail_specialization_filter::clear_guardian_dragonhunter() { +// bool guardian_dragonhunter = 3; +inline void SpecializationFilter::clear_guardian_dragonhunter() { guardian_dragonhunter_ = false; } -inline bool Trail_specialization_filter::_internal_guardian_dragonhunter() const { +inline bool SpecializationFilter::_internal_guardian_dragonhunter() const { return guardian_dragonhunter_; } -inline bool Trail_specialization_filter::guardian_dragonhunter() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.guardian_dragonhunter) +inline bool SpecializationFilter::guardian_dragonhunter() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.guardian_dragonhunter) return _internal_guardian_dragonhunter(); } -inline void Trail_specialization_filter::_internal_set_guardian_dragonhunter(bool value) { +inline void SpecializationFilter::_internal_set_guardian_dragonhunter(bool value) { guardian_dragonhunter_ = value; } -inline void Trail_specialization_filter::set_guardian_dragonhunter(bool value) { +inline void SpecializationFilter::set_guardian_dragonhunter(bool value) { _internal_set_guardian_dragonhunter(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.guardian_dragonhunter) + // @@protoc_insertion_point(field_set:SpecializationFilter.guardian_dragonhunter) } -// bool mesmer_chronomancer = 40; -inline void Trail_specialization_filter::clear_mesmer_chronomancer() { +// bool mesmer_chronomancer = 4; +inline void SpecializationFilter::clear_mesmer_chronomancer() { mesmer_chronomancer_ = false; } -inline bool Trail_specialization_filter::_internal_mesmer_chronomancer() const { +inline bool SpecializationFilter::_internal_mesmer_chronomancer() const { return mesmer_chronomancer_; } -inline bool Trail_specialization_filter::mesmer_chronomancer() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.mesmer_chronomancer) +inline bool SpecializationFilter::mesmer_chronomancer() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.mesmer_chronomancer) return _internal_mesmer_chronomancer(); } -inline void Trail_specialization_filter::_internal_set_mesmer_chronomancer(bool value) { +inline void SpecializationFilter::_internal_set_mesmer_chronomancer(bool value) { mesmer_chronomancer_ = value; } -inline void Trail_specialization_filter::set_mesmer_chronomancer(bool value) { +inline void SpecializationFilter::set_mesmer_chronomancer(bool value) { _internal_set_mesmer_chronomancer(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.mesmer_chronomancer) + // @@protoc_insertion_point(field_set:SpecializationFilter.mesmer_chronomancer) } -// bool necromancer_reaper = 34; -inline void Trail_specialization_filter::clear_necromancer_reaper() { +// bool necromancer_reaper = 5; +inline void SpecializationFilter::clear_necromancer_reaper() { necromancer_reaper_ = false; } -inline bool Trail_specialization_filter::_internal_necromancer_reaper() const { +inline bool SpecializationFilter::_internal_necromancer_reaper() const { return necromancer_reaper_; } -inline bool Trail_specialization_filter::necromancer_reaper() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.necromancer_reaper) +inline bool SpecializationFilter::necromancer_reaper() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.necromancer_reaper) return _internal_necromancer_reaper(); } -inline void Trail_specialization_filter::_internal_set_necromancer_reaper(bool value) { +inline void SpecializationFilter::_internal_set_necromancer_reaper(bool value) { necromancer_reaper_ = value; } -inline void Trail_specialization_filter::set_necromancer_reaper(bool value) { +inline void SpecializationFilter::set_necromancer_reaper(bool value) { _internal_set_necromancer_reaper(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.necromancer_reaper) + // @@protoc_insertion_point(field_set:SpecializationFilter.necromancer_reaper) } -// bool ranger_druid = 5; -inline void Trail_specialization_filter::clear_ranger_druid() { +// bool ranger_druid = 6; +inline void SpecializationFilter::clear_ranger_druid() { ranger_druid_ = false; } -inline bool Trail_specialization_filter::_internal_ranger_druid() const { +inline bool SpecializationFilter::_internal_ranger_druid() const { return ranger_druid_; } -inline bool Trail_specialization_filter::ranger_druid() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.ranger_druid) +inline bool SpecializationFilter::ranger_druid() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.ranger_druid) return _internal_ranger_druid(); } -inline void Trail_specialization_filter::_internal_set_ranger_druid(bool value) { +inline void SpecializationFilter::_internal_set_ranger_druid(bool value) { ranger_druid_ = value; } -inline void Trail_specialization_filter::set_ranger_druid(bool value) { +inline void SpecializationFilter::set_ranger_druid(bool value) { _internal_set_ranger_druid(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.ranger_druid) + // @@protoc_insertion_point(field_set:SpecializationFilter.ranger_druid) } -// bool revenant_herald = 52; -inline void Trail_specialization_filter::clear_revenant_herald() { +// bool revenant_herald = 7; +inline void SpecializationFilter::clear_revenant_herald() { revenant_herald_ = false; } -inline bool Trail_specialization_filter::_internal_revenant_herald() const { +inline bool SpecializationFilter::_internal_revenant_herald() const { return revenant_herald_; } -inline bool Trail_specialization_filter::revenant_herald() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.revenant_herald) +inline bool SpecializationFilter::revenant_herald() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.revenant_herald) return _internal_revenant_herald(); } -inline void Trail_specialization_filter::_internal_set_revenant_herald(bool value) { +inline void SpecializationFilter::_internal_set_revenant_herald(bool value) { revenant_herald_ = value; } -inline void Trail_specialization_filter::set_revenant_herald(bool value) { +inline void SpecializationFilter::set_revenant_herald(bool value) { _internal_set_revenant_herald(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.revenant_herald) + // @@protoc_insertion_point(field_set:SpecializationFilter.revenant_herald) } -// bool thief_daredevil = 7; -inline void Trail_specialization_filter::clear_thief_daredevil() { +// bool thief_daredevil = 8; +inline void SpecializationFilter::clear_thief_daredevil() { thief_daredevil_ = false; } -inline bool Trail_specialization_filter::_internal_thief_daredevil() const { +inline bool SpecializationFilter::_internal_thief_daredevil() const { return thief_daredevil_; } -inline bool Trail_specialization_filter::thief_daredevil() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.thief_daredevil) +inline bool SpecializationFilter::thief_daredevil() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.thief_daredevil) return _internal_thief_daredevil(); } -inline void Trail_specialization_filter::_internal_set_thief_daredevil(bool value) { +inline void SpecializationFilter::_internal_set_thief_daredevil(bool value) { thief_daredevil_ = value; } -inline void Trail_specialization_filter::set_thief_daredevil(bool value) { +inline void SpecializationFilter::set_thief_daredevil(bool value) { _internal_set_thief_daredevil(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.thief_daredevil) + // @@protoc_insertion_point(field_set:SpecializationFilter.thief_daredevil) } -// bool warrior_berserker = 18; -inline void Trail_specialization_filter::clear_warrior_berserker() { +// bool warrior_berserker = 9; +inline void SpecializationFilter::clear_warrior_berserker() { warrior_berserker_ = false; } -inline bool Trail_specialization_filter::_internal_warrior_berserker() const { +inline bool SpecializationFilter::_internal_warrior_berserker() const { return warrior_berserker_; } -inline bool Trail_specialization_filter::warrior_berserker() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.warrior_berserker) +inline bool SpecializationFilter::warrior_berserker() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.warrior_berserker) return _internal_warrior_berserker(); } -inline void Trail_specialization_filter::_internal_set_warrior_berserker(bool value) { +inline void SpecializationFilter::_internal_set_warrior_berserker(bool value) { warrior_berserker_ = value; } -inline void Trail_specialization_filter::set_warrior_berserker(bool value) { +inline void SpecializationFilter::set_warrior_berserker(bool value) { _internal_set_warrior_berserker(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.warrior_berserker) + // @@protoc_insertion_point(field_set:SpecializationFilter.warrior_berserker) } -// bool elementalist_weaver = 56; -inline void Trail_specialization_filter::clear_elementalist_weaver() { +// bool elementalist_weaver = 10; +inline void SpecializationFilter::clear_elementalist_weaver() { elementalist_weaver_ = false; } -inline bool Trail_specialization_filter::_internal_elementalist_weaver() const { +inline bool SpecializationFilter::_internal_elementalist_weaver() const { return elementalist_weaver_; } -inline bool Trail_specialization_filter::elementalist_weaver() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.elementalist_weaver) +inline bool SpecializationFilter::elementalist_weaver() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.elementalist_weaver) return _internal_elementalist_weaver(); } -inline void Trail_specialization_filter::_internal_set_elementalist_weaver(bool value) { +inline void SpecializationFilter::_internal_set_elementalist_weaver(bool value) { elementalist_weaver_ = value; } -inline void Trail_specialization_filter::set_elementalist_weaver(bool value) { +inline void SpecializationFilter::set_elementalist_weaver(bool value) { _internal_set_elementalist_weaver(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.elementalist_weaver) + // @@protoc_insertion_point(field_set:SpecializationFilter.elementalist_weaver) } -// bool engineer_holosmith = 57; -inline void Trail_specialization_filter::clear_engineer_holosmith() { +// bool engineer_holosmith = 11; +inline void SpecializationFilter::clear_engineer_holosmith() { engineer_holosmith_ = false; } -inline bool Trail_specialization_filter::_internal_engineer_holosmith() const { +inline bool SpecializationFilter::_internal_engineer_holosmith() const { return engineer_holosmith_; } -inline bool Trail_specialization_filter::engineer_holosmith() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.engineer_holosmith) +inline bool SpecializationFilter::engineer_holosmith() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.engineer_holosmith) return _internal_engineer_holosmith(); } -inline void Trail_specialization_filter::_internal_set_engineer_holosmith(bool value) { +inline void SpecializationFilter::_internal_set_engineer_holosmith(bool value) { engineer_holosmith_ = value; } -inline void Trail_specialization_filter::set_engineer_holosmith(bool value) { +inline void SpecializationFilter::set_engineer_holosmith(bool value) { _internal_set_engineer_holosmith(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.engineer_holosmith) + // @@protoc_insertion_point(field_set:SpecializationFilter.engineer_holosmith) } -// bool guardian_firebrand = 62; -inline void Trail_specialization_filter::clear_guardian_firebrand() { +// bool guardian_firebrand = 12; +inline void SpecializationFilter::clear_guardian_firebrand() { guardian_firebrand_ = false; } -inline bool Trail_specialization_filter::_internal_guardian_firebrand() const { +inline bool SpecializationFilter::_internal_guardian_firebrand() const { return guardian_firebrand_; } -inline bool Trail_specialization_filter::guardian_firebrand() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.guardian_firebrand) +inline bool SpecializationFilter::guardian_firebrand() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.guardian_firebrand) return _internal_guardian_firebrand(); } -inline void Trail_specialization_filter::_internal_set_guardian_firebrand(bool value) { +inline void SpecializationFilter::_internal_set_guardian_firebrand(bool value) { guardian_firebrand_ = value; } -inline void Trail_specialization_filter::set_guardian_firebrand(bool value) { +inline void SpecializationFilter::set_guardian_firebrand(bool value) { _internal_set_guardian_firebrand(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.guardian_firebrand) + // @@protoc_insertion_point(field_set:SpecializationFilter.guardian_firebrand) } -// bool mesmer_mirage = 59; -inline void Trail_specialization_filter::clear_mesmer_mirage() { +// bool mesmer_mirage = 13; +inline void SpecializationFilter::clear_mesmer_mirage() { mesmer_mirage_ = false; } -inline bool Trail_specialization_filter::_internal_mesmer_mirage() const { +inline bool SpecializationFilter::_internal_mesmer_mirage() const { return mesmer_mirage_; } -inline bool Trail_specialization_filter::mesmer_mirage() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.mesmer_mirage) +inline bool SpecializationFilter::mesmer_mirage() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.mesmer_mirage) return _internal_mesmer_mirage(); } -inline void Trail_specialization_filter::_internal_set_mesmer_mirage(bool value) { +inline void SpecializationFilter::_internal_set_mesmer_mirage(bool value) { mesmer_mirage_ = value; } -inline void Trail_specialization_filter::set_mesmer_mirage(bool value) { +inline void SpecializationFilter::set_mesmer_mirage(bool value) { _internal_set_mesmer_mirage(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.mesmer_mirage) + // @@protoc_insertion_point(field_set:SpecializationFilter.mesmer_mirage) } -// bool necromancer_scourge = 60; -inline void Trail_specialization_filter::clear_necromancer_scourge() { +// bool necromancer_scourge = 14; +inline void SpecializationFilter::clear_necromancer_scourge() { necromancer_scourge_ = false; } -inline bool Trail_specialization_filter::_internal_necromancer_scourge() const { +inline bool SpecializationFilter::_internal_necromancer_scourge() const { return necromancer_scourge_; } -inline bool Trail_specialization_filter::necromancer_scourge() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.necromancer_scourge) +inline bool SpecializationFilter::necromancer_scourge() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.necromancer_scourge) return _internal_necromancer_scourge(); } -inline void Trail_specialization_filter::_internal_set_necromancer_scourge(bool value) { +inline void SpecializationFilter::_internal_set_necromancer_scourge(bool value) { necromancer_scourge_ = value; } -inline void Trail_specialization_filter::set_necromancer_scourge(bool value) { +inline void SpecializationFilter::set_necromancer_scourge(bool value) { _internal_set_necromancer_scourge(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.necromancer_scourge) + // @@protoc_insertion_point(field_set:SpecializationFilter.necromancer_scourge) } -// bool ranger_soulbeast = 55; -inline void Trail_specialization_filter::clear_ranger_soulbeast() { +// bool ranger_soulbeast = 15; +inline void SpecializationFilter::clear_ranger_soulbeast() { ranger_soulbeast_ = false; } -inline bool Trail_specialization_filter::_internal_ranger_soulbeast() const { +inline bool SpecializationFilter::_internal_ranger_soulbeast() const { return ranger_soulbeast_; } -inline bool Trail_specialization_filter::ranger_soulbeast() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.ranger_soulbeast) +inline bool SpecializationFilter::ranger_soulbeast() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.ranger_soulbeast) return _internal_ranger_soulbeast(); } -inline void Trail_specialization_filter::_internal_set_ranger_soulbeast(bool value) { +inline void SpecializationFilter::_internal_set_ranger_soulbeast(bool value) { ranger_soulbeast_ = value; } -inline void Trail_specialization_filter::set_ranger_soulbeast(bool value) { +inline void SpecializationFilter::set_ranger_soulbeast(bool value) { _internal_set_ranger_soulbeast(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.ranger_soulbeast) + // @@protoc_insertion_point(field_set:SpecializationFilter.ranger_soulbeast) } -// bool revenant_renegade = 63; -inline void Trail_specialization_filter::clear_revenant_renegade() { +// bool revenant_renegade = 16; +inline void SpecializationFilter::clear_revenant_renegade() { revenant_renegade_ = false; } -inline bool Trail_specialization_filter::_internal_revenant_renegade() const { +inline bool SpecializationFilter::_internal_revenant_renegade() const { return revenant_renegade_; } -inline bool Trail_specialization_filter::revenant_renegade() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.revenant_renegade) +inline bool SpecializationFilter::revenant_renegade() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.revenant_renegade) return _internal_revenant_renegade(); } -inline void Trail_specialization_filter::_internal_set_revenant_renegade(bool value) { +inline void SpecializationFilter::_internal_set_revenant_renegade(bool value) { revenant_renegade_ = value; } -inline void Trail_specialization_filter::set_revenant_renegade(bool value) { +inline void SpecializationFilter::set_revenant_renegade(bool value) { _internal_set_revenant_renegade(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.revenant_renegade) + // @@protoc_insertion_point(field_set:SpecializationFilter.revenant_renegade) } -// bool thief_deadeye = 58; -inline void Trail_specialization_filter::clear_thief_deadeye() { +// bool thief_deadeye = 17; +inline void SpecializationFilter::clear_thief_deadeye() { thief_deadeye_ = false; } -inline bool Trail_specialization_filter::_internal_thief_deadeye() const { +inline bool SpecializationFilter::_internal_thief_deadeye() const { return thief_deadeye_; } -inline bool Trail_specialization_filter::thief_deadeye() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.thief_deadeye) +inline bool SpecializationFilter::thief_deadeye() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.thief_deadeye) return _internal_thief_deadeye(); } -inline void Trail_specialization_filter::_internal_set_thief_deadeye(bool value) { +inline void SpecializationFilter::_internal_set_thief_deadeye(bool value) { thief_deadeye_ = value; } -inline void Trail_specialization_filter::set_thief_deadeye(bool value) { +inline void SpecializationFilter::set_thief_deadeye(bool value) { _internal_set_thief_deadeye(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.thief_deadeye) + // @@protoc_insertion_point(field_set:SpecializationFilter.thief_deadeye) } -// bool warrior_spellbreaker = 61; -inline void Trail_specialization_filter::clear_warrior_spellbreaker() { +// bool warrior_spellbreaker = 18; +inline void SpecializationFilter::clear_warrior_spellbreaker() { warrior_spellbreaker_ = false; } -inline bool Trail_specialization_filter::_internal_warrior_spellbreaker() const { +inline bool SpecializationFilter::_internal_warrior_spellbreaker() const { return warrior_spellbreaker_; } -inline bool Trail_specialization_filter::warrior_spellbreaker() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.warrior_spellbreaker) +inline bool SpecializationFilter::warrior_spellbreaker() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.warrior_spellbreaker) return _internal_warrior_spellbreaker(); } -inline void Trail_specialization_filter::_internal_set_warrior_spellbreaker(bool value) { +inline void SpecializationFilter::_internal_set_warrior_spellbreaker(bool value) { warrior_spellbreaker_ = value; } -inline void Trail_specialization_filter::set_warrior_spellbreaker(bool value) { +inline void SpecializationFilter::set_warrior_spellbreaker(bool value) { _internal_set_warrior_spellbreaker(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.warrior_spellbreaker) + // @@protoc_insertion_point(field_set:SpecializationFilter.warrior_spellbreaker) } -// bool elmentalist_catalyst = 67; -inline void Trail_specialization_filter::clear_elmentalist_catalyst() { +// bool elmentalist_catalyst = 19; +inline void SpecializationFilter::clear_elmentalist_catalyst() { elmentalist_catalyst_ = false; } -inline bool Trail_specialization_filter::_internal_elmentalist_catalyst() const { +inline bool SpecializationFilter::_internal_elmentalist_catalyst() const { return elmentalist_catalyst_; } -inline bool Trail_specialization_filter::elmentalist_catalyst() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.elmentalist_catalyst) +inline bool SpecializationFilter::elmentalist_catalyst() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.elmentalist_catalyst) return _internal_elmentalist_catalyst(); } -inline void Trail_specialization_filter::_internal_set_elmentalist_catalyst(bool value) { +inline void SpecializationFilter::_internal_set_elmentalist_catalyst(bool value) { elmentalist_catalyst_ = value; } -inline void Trail_specialization_filter::set_elmentalist_catalyst(bool value) { +inline void SpecializationFilter::set_elmentalist_catalyst(bool value) { _internal_set_elmentalist_catalyst(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.elmentalist_catalyst) + // @@protoc_insertion_point(field_set:SpecializationFilter.elmentalist_catalyst) } -// bool engineer_mechanist = 70; -inline void Trail_specialization_filter::clear_engineer_mechanist() { +// bool engineer_mechanist = 20; +inline void SpecializationFilter::clear_engineer_mechanist() { engineer_mechanist_ = false; } -inline bool Trail_specialization_filter::_internal_engineer_mechanist() const { +inline bool SpecializationFilter::_internal_engineer_mechanist() const { return engineer_mechanist_; } -inline bool Trail_specialization_filter::engineer_mechanist() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.engineer_mechanist) +inline bool SpecializationFilter::engineer_mechanist() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.engineer_mechanist) return _internal_engineer_mechanist(); } -inline void Trail_specialization_filter::_internal_set_engineer_mechanist(bool value) { +inline void SpecializationFilter::_internal_set_engineer_mechanist(bool value) { engineer_mechanist_ = value; } -inline void Trail_specialization_filter::set_engineer_mechanist(bool value) { +inline void SpecializationFilter::set_engineer_mechanist(bool value) { _internal_set_engineer_mechanist(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.engineer_mechanist) + // @@protoc_insertion_point(field_set:SpecializationFilter.engineer_mechanist) } -// bool guardian_willbender = 65; -inline void Trail_specialization_filter::clear_guardian_willbender() { +// bool guardian_willbender = 21; +inline void SpecializationFilter::clear_guardian_willbender() { guardian_willbender_ = false; } -inline bool Trail_specialization_filter::_internal_guardian_willbender() const { +inline bool SpecializationFilter::_internal_guardian_willbender() const { return guardian_willbender_; } -inline bool Trail_specialization_filter::guardian_willbender() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.guardian_willbender) +inline bool SpecializationFilter::guardian_willbender() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.guardian_willbender) return _internal_guardian_willbender(); } -inline void Trail_specialization_filter::_internal_set_guardian_willbender(bool value) { +inline void SpecializationFilter::_internal_set_guardian_willbender(bool value) { guardian_willbender_ = value; } -inline void Trail_specialization_filter::set_guardian_willbender(bool value) { +inline void SpecializationFilter::set_guardian_willbender(bool value) { _internal_set_guardian_willbender(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.guardian_willbender) + // @@protoc_insertion_point(field_set:SpecializationFilter.guardian_willbender) } -// bool mesmer_virtuoso = 66; -inline void Trail_specialization_filter::clear_mesmer_virtuoso() { +// bool mesmer_virtuoso = 22; +inline void SpecializationFilter::clear_mesmer_virtuoso() { mesmer_virtuoso_ = false; } -inline bool Trail_specialization_filter::_internal_mesmer_virtuoso() const { +inline bool SpecializationFilter::_internal_mesmer_virtuoso() const { return mesmer_virtuoso_; } -inline bool Trail_specialization_filter::mesmer_virtuoso() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.mesmer_virtuoso) +inline bool SpecializationFilter::mesmer_virtuoso() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.mesmer_virtuoso) return _internal_mesmer_virtuoso(); } -inline void Trail_specialization_filter::_internal_set_mesmer_virtuoso(bool value) { +inline void SpecializationFilter::_internal_set_mesmer_virtuoso(bool value) { mesmer_virtuoso_ = value; } -inline void Trail_specialization_filter::set_mesmer_virtuoso(bool value) { +inline void SpecializationFilter::set_mesmer_virtuoso(bool value) { _internal_set_mesmer_virtuoso(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.mesmer_virtuoso) + // @@protoc_insertion_point(field_set:SpecializationFilter.mesmer_virtuoso) } -// bool necromancer_harbinger = 64; -inline void Trail_specialization_filter::clear_necromancer_harbinger() { +// bool necromancer_harbinger = 23; +inline void SpecializationFilter::clear_necromancer_harbinger() { necromancer_harbinger_ = false; } -inline bool Trail_specialization_filter::_internal_necromancer_harbinger() const { +inline bool SpecializationFilter::_internal_necromancer_harbinger() const { return necromancer_harbinger_; } -inline bool Trail_specialization_filter::necromancer_harbinger() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.necromancer_harbinger) +inline bool SpecializationFilter::necromancer_harbinger() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.necromancer_harbinger) return _internal_necromancer_harbinger(); } -inline void Trail_specialization_filter::_internal_set_necromancer_harbinger(bool value) { +inline void SpecializationFilter::_internal_set_necromancer_harbinger(bool value) { necromancer_harbinger_ = value; } -inline void Trail_specialization_filter::set_necromancer_harbinger(bool value) { +inline void SpecializationFilter::set_necromancer_harbinger(bool value) { _internal_set_necromancer_harbinger(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.necromancer_harbinger) + // @@protoc_insertion_point(field_set:SpecializationFilter.necromancer_harbinger) } -// bool ranger_untamed = 72; -inline void Trail_specialization_filter::clear_ranger_untamed() { +// bool ranger_untamed = 24; +inline void SpecializationFilter::clear_ranger_untamed() { ranger_untamed_ = false; } -inline bool Trail_specialization_filter::_internal_ranger_untamed() const { +inline bool SpecializationFilter::_internal_ranger_untamed() const { return ranger_untamed_; } -inline bool Trail_specialization_filter::ranger_untamed() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.ranger_untamed) +inline bool SpecializationFilter::ranger_untamed() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.ranger_untamed) return _internal_ranger_untamed(); } -inline void Trail_specialization_filter::_internal_set_ranger_untamed(bool value) { +inline void SpecializationFilter::_internal_set_ranger_untamed(bool value) { ranger_untamed_ = value; } -inline void Trail_specialization_filter::set_ranger_untamed(bool value) { +inline void SpecializationFilter::set_ranger_untamed(bool value) { _internal_set_ranger_untamed(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.ranger_untamed) + // @@protoc_insertion_point(field_set:SpecializationFilter.ranger_untamed) } -// bool revenant_vindicator = 69; -inline void Trail_specialization_filter::clear_revenant_vindicator() { +// bool revenant_vindicator = 25; +inline void SpecializationFilter::clear_revenant_vindicator() { revenant_vindicator_ = false; } -inline bool Trail_specialization_filter::_internal_revenant_vindicator() const { +inline bool SpecializationFilter::_internal_revenant_vindicator() const { return revenant_vindicator_; } -inline bool Trail_specialization_filter::revenant_vindicator() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.revenant_vindicator) +inline bool SpecializationFilter::revenant_vindicator() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.revenant_vindicator) return _internal_revenant_vindicator(); } -inline void Trail_specialization_filter::_internal_set_revenant_vindicator(bool value) { +inline void SpecializationFilter::_internal_set_revenant_vindicator(bool value) { revenant_vindicator_ = value; } -inline void Trail_specialization_filter::set_revenant_vindicator(bool value) { +inline void SpecializationFilter::set_revenant_vindicator(bool value) { _internal_set_revenant_vindicator(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.revenant_vindicator) + // @@protoc_insertion_point(field_set:SpecializationFilter.revenant_vindicator) } -// bool thief_specter = 71; -inline void Trail_specialization_filter::clear_thief_specter() { +// bool thief_specter = 26; +inline void SpecializationFilter::clear_thief_specter() { thief_specter_ = false; } -inline bool Trail_specialization_filter::_internal_thief_specter() const { +inline bool SpecializationFilter::_internal_thief_specter() const { return thief_specter_; } -inline bool Trail_specialization_filter::thief_specter() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.thief_specter) +inline bool SpecializationFilter::thief_specter() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.thief_specter) return _internal_thief_specter(); } -inline void Trail_specialization_filter::_internal_set_thief_specter(bool value) { +inline void SpecializationFilter::_internal_set_thief_specter(bool value) { thief_specter_ = value; } -inline void Trail_specialization_filter::set_thief_specter(bool value) { +inline void SpecializationFilter::set_thief_specter(bool value) { _internal_set_thief_specter(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.thief_specter) + // @@protoc_insertion_point(field_set:SpecializationFilter.thief_specter) } -// bool warrior_bladesworn = 68; -inline void Trail_specialization_filter::clear_warrior_bladesworn() { +// bool warrior_bladesworn = 27; +inline void SpecializationFilter::clear_warrior_bladesworn() { warrior_bladesworn_ = false; } -inline bool Trail_specialization_filter::_internal_warrior_bladesworn() const { +inline bool SpecializationFilter::_internal_warrior_bladesworn() const { return warrior_bladesworn_; } -inline bool Trail_specialization_filter::warrior_bladesworn() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.warrior_bladesworn) +inline bool SpecializationFilter::warrior_bladesworn() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.warrior_bladesworn) return _internal_warrior_bladesworn(); } -inline void Trail_specialization_filter::_internal_set_warrior_bladesworn(bool value) { +inline void SpecializationFilter::_internal_set_warrior_bladesworn(bool value) { warrior_bladesworn_ = value; } -inline void Trail_specialization_filter::set_warrior_bladesworn(bool value) { +inline void SpecializationFilter::set_warrior_bladesworn(bool value) { _internal_set_warrior_bladesworn(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.warrior_bladesworn) + // @@protoc_insertion_point(field_set:SpecializationFilter.warrior_bladesworn) } -// bool elementalist_air = 41; -inline void Trail_specialization_filter::clear_elementalist_air() { +// bool elementalist_air = 28; +inline void SpecializationFilter::clear_elementalist_air() { elementalist_air_ = false; } -inline bool Trail_specialization_filter::_internal_elementalist_air() const { +inline bool SpecializationFilter::_internal_elementalist_air() const { return elementalist_air_; } -inline bool Trail_specialization_filter::elementalist_air() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.elementalist_air) +inline bool SpecializationFilter::elementalist_air() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.elementalist_air) return _internal_elementalist_air(); } -inline void Trail_specialization_filter::_internal_set_elementalist_air(bool value) { +inline void SpecializationFilter::_internal_set_elementalist_air(bool value) { elementalist_air_ = value; } -inline void Trail_specialization_filter::set_elementalist_air(bool value) { +inline void SpecializationFilter::set_elementalist_air(bool value) { _internal_set_elementalist_air(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.elementalist_air) + // @@protoc_insertion_point(field_set:SpecializationFilter.elementalist_air) } -// bool elementalist_arcane = 37; -inline void Trail_specialization_filter::clear_elementalist_arcane() { +// bool elementalist_arcane = 29; +inline void SpecializationFilter::clear_elementalist_arcane() { elementalist_arcane_ = false; } -inline bool Trail_specialization_filter::_internal_elementalist_arcane() const { +inline bool SpecializationFilter::_internal_elementalist_arcane() const { return elementalist_arcane_; } -inline bool Trail_specialization_filter::elementalist_arcane() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.elementalist_arcane) +inline bool SpecializationFilter::elementalist_arcane() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.elementalist_arcane) return _internal_elementalist_arcane(); } -inline void Trail_specialization_filter::_internal_set_elementalist_arcane(bool value) { +inline void SpecializationFilter::_internal_set_elementalist_arcane(bool value) { elementalist_arcane_ = value; } -inline void Trail_specialization_filter::set_elementalist_arcane(bool value) { +inline void SpecializationFilter::set_elementalist_arcane(bool value) { _internal_set_elementalist_arcane(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.elementalist_arcane) + // @@protoc_insertion_point(field_set:SpecializationFilter.elementalist_arcane) } -// bool elementalist_earth = 26; -inline void Trail_specialization_filter::clear_elementalist_earth() { +// bool elementalist_earth = 30; +inline void SpecializationFilter::clear_elementalist_earth() { elementalist_earth_ = false; } -inline bool Trail_specialization_filter::_internal_elementalist_earth() const { +inline bool SpecializationFilter::_internal_elementalist_earth() const { return elementalist_earth_; } -inline bool Trail_specialization_filter::elementalist_earth() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.elementalist_earth) +inline bool SpecializationFilter::elementalist_earth() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.elementalist_earth) return _internal_elementalist_earth(); } -inline void Trail_specialization_filter::_internal_set_elementalist_earth(bool value) { +inline void SpecializationFilter::_internal_set_elementalist_earth(bool value) { elementalist_earth_ = value; } -inline void Trail_specialization_filter::set_elementalist_earth(bool value) { +inline void SpecializationFilter::set_elementalist_earth(bool value) { _internal_set_elementalist_earth(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.elementalist_earth) + // @@protoc_insertion_point(field_set:SpecializationFilter.elementalist_earth) } // bool elementalist_fire = 31; -inline void Trail_specialization_filter::clear_elementalist_fire() { +inline void SpecializationFilter::clear_elementalist_fire() { elementalist_fire_ = false; } -inline bool Trail_specialization_filter::_internal_elementalist_fire() const { +inline bool SpecializationFilter::_internal_elementalist_fire() const { return elementalist_fire_; } -inline bool Trail_specialization_filter::elementalist_fire() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.elementalist_fire) +inline bool SpecializationFilter::elementalist_fire() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.elementalist_fire) return _internal_elementalist_fire(); } -inline void Trail_specialization_filter::_internal_set_elementalist_fire(bool value) { +inline void SpecializationFilter::_internal_set_elementalist_fire(bool value) { elementalist_fire_ = value; } -inline void Trail_specialization_filter::set_elementalist_fire(bool value) { +inline void SpecializationFilter::set_elementalist_fire(bool value) { _internal_set_elementalist_fire(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.elementalist_fire) + // @@protoc_insertion_point(field_set:SpecializationFilter.elementalist_fire) } -// bool elementalist_water = 17; -inline void Trail_specialization_filter::clear_elementalist_water() { +// bool elementalist_water = 32; +inline void SpecializationFilter::clear_elementalist_water() { elementalist_water_ = false; } -inline bool Trail_specialization_filter::_internal_elementalist_water() const { +inline bool SpecializationFilter::_internal_elementalist_water() const { return elementalist_water_; } -inline bool Trail_specialization_filter::elementalist_water() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.elementalist_water) +inline bool SpecializationFilter::elementalist_water() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.elementalist_water) return _internal_elementalist_water(); } -inline void Trail_specialization_filter::_internal_set_elementalist_water(bool value) { +inline void SpecializationFilter::_internal_set_elementalist_water(bool value) { elementalist_water_ = value; } -inline void Trail_specialization_filter::set_elementalist_water(bool value) { +inline void SpecializationFilter::set_elementalist_water(bool value) { _internal_set_elementalist_water(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.elementalist_water) + // @@protoc_insertion_point(field_set:SpecializationFilter.elementalist_water) } -// bool engineer_alchemy = 29; -inline void Trail_specialization_filter::clear_engineer_alchemy() { +// bool engineer_alchemy = 33; +inline void SpecializationFilter::clear_engineer_alchemy() { engineer_alchemy_ = false; } -inline bool Trail_specialization_filter::_internal_engineer_alchemy() const { +inline bool SpecializationFilter::_internal_engineer_alchemy() const { return engineer_alchemy_; } -inline bool Trail_specialization_filter::engineer_alchemy() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.engineer_alchemy) +inline bool SpecializationFilter::engineer_alchemy() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.engineer_alchemy) return _internal_engineer_alchemy(); } -inline void Trail_specialization_filter::_internal_set_engineer_alchemy(bool value) { +inline void SpecializationFilter::_internal_set_engineer_alchemy(bool value) { engineer_alchemy_ = value; } -inline void Trail_specialization_filter::set_engineer_alchemy(bool value) { +inline void SpecializationFilter::set_engineer_alchemy(bool value) { _internal_set_engineer_alchemy(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.engineer_alchemy) + // @@protoc_insertion_point(field_set:SpecializationFilter.engineer_alchemy) } -// bool engineer_explosives = 6; -inline void Trail_specialization_filter::clear_engineer_explosives() { +// bool engineer_explosives = 34; +inline void SpecializationFilter::clear_engineer_explosives() { engineer_explosives_ = false; } -inline bool Trail_specialization_filter::_internal_engineer_explosives() const { +inline bool SpecializationFilter::_internal_engineer_explosives() const { return engineer_explosives_; } -inline bool Trail_specialization_filter::engineer_explosives() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.engineer_explosives) +inline bool SpecializationFilter::engineer_explosives() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.engineer_explosives) return _internal_engineer_explosives(); } -inline void Trail_specialization_filter::_internal_set_engineer_explosives(bool value) { +inline void SpecializationFilter::_internal_set_engineer_explosives(bool value) { engineer_explosives_ = value; } -inline void Trail_specialization_filter::set_engineer_explosives(bool value) { +inline void SpecializationFilter::set_engineer_explosives(bool value) { _internal_set_engineer_explosives(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.engineer_explosives) + // @@protoc_insertion_point(field_set:SpecializationFilter.engineer_explosives) } -// bool engineer_firearms = 38; -inline void Trail_specialization_filter::clear_engineer_firearms() { +// bool engineer_firearms = 35; +inline void SpecializationFilter::clear_engineer_firearms() { engineer_firearms_ = false; } -inline bool Trail_specialization_filter::_internal_engineer_firearms() const { +inline bool SpecializationFilter::_internal_engineer_firearms() const { return engineer_firearms_; } -inline bool Trail_specialization_filter::engineer_firearms() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.engineer_firearms) +inline bool SpecializationFilter::engineer_firearms() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.engineer_firearms) return _internal_engineer_firearms(); } -inline void Trail_specialization_filter::_internal_set_engineer_firearms(bool value) { +inline void SpecializationFilter::_internal_set_engineer_firearms(bool value) { engineer_firearms_ = value; } -inline void Trail_specialization_filter::set_engineer_firearms(bool value) { +inline void SpecializationFilter::set_engineer_firearms(bool value) { _internal_set_engineer_firearms(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.engineer_firearms) + // @@protoc_insertion_point(field_set:SpecializationFilter.engineer_firearms) } -// bool engineer_inventions = 47; -inline void Trail_specialization_filter::clear_engineer_inventions() { +// bool engineer_inventions = 36; +inline void SpecializationFilter::clear_engineer_inventions() { engineer_inventions_ = false; } -inline bool Trail_specialization_filter::_internal_engineer_inventions() const { +inline bool SpecializationFilter::_internal_engineer_inventions() const { return engineer_inventions_; } -inline bool Trail_specialization_filter::engineer_inventions() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.engineer_inventions) +inline bool SpecializationFilter::engineer_inventions() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.engineer_inventions) return _internal_engineer_inventions(); } -inline void Trail_specialization_filter::_internal_set_engineer_inventions(bool value) { +inline void SpecializationFilter::_internal_set_engineer_inventions(bool value) { engineer_inventions_ = value; } -inline void Trail_specialization_filter::set_engineer_inventions(bool value) { +inline void SpecializationFilter::set_engineer_inventions(bool value) { _internal_set_engineer_inventions(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.engineer_inventions) + // @@protoc_insertion_point(field_set:SpecializationFilter.engineer_inventions) } -// bool engineer_tools = 21; -inline void Trail_specialization_filter::clear_engineer_tools() { +// bool engineer_tools = 37; +inline void SpecializationFilter::clear_engineer_tools() { engineer_tools_ = false; } -inline bool Trail_specialization_filter::_internal_engineer_tools() const { +inline bool SpecializationFilter::_internal_engineer_tools() const { return engineer_tools_; } -inline bool Trail_specialization_filter::engineer_tools() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.engineer_tools) +inline bool SpecializationFilter::engineer_tools() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.engineer_tools) return _internal_engineer_tools(); } -inline void Trail_specialization_filter::_internal_set_engineer_tools(bool value) { +inline void SpecializationFilter::_internal_set_engineer_tools(bool value) { engineer_tools_ = value; } -inline void Trail_specialization_filter::set_engineer_tools(bool value) { +inline void SpecializationFilter::set_engineer_tools(bool value) { _internal_set_engineer_tools(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.engineer_tools) + // @@protoc_insertion_point(field_set:SpecializationFilter.engineer_tools) } -// bool guardian_honor = 49; -inline void Trail_specialization_filter::clear_guardian_honor() { +// bool guardian_honor = 38; +inline void SpecializationFilter::clear_guardian_honor() { guardian_honor_ = false; } -inline bool Trail_specialization_filter::_internal_guardian_honor() const { +inline bool SpecializationFilter::_internal_guardian_honor() const { return guardian_honor_; } -inline bool Trail_specialization_filter::guardian_honor() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.guardian_honor) +inline bool SpecializationFilter::guardian_honor() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.guardian_honor) return _internal_guardian_honor(); } -inline void Trail_specialization_filter::_internal_set_guardian_honor(bool value) { +inline void SpecializationFilter::_internal_set_guardian_honor(bool value) { guardian_honor_ = value; } -inline void Trail_specialization_filter::set_guardian_honor(bool value) { +inline void SpecializationFilter::set_guardian_honor(bool value) { _internal_set_guardian_honor(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.guardian_honor) + // @@protoc_insertion_point(field_set:SpecializationFilter.guardian_honor) } -// bool guardian_radiance = 16; -inline void Trail_specialization_filter::clear_guardian_radiance() { +// bool guardian_radiance = 39; +inline void SpecializationFilter::clear_guardian_radiance() { guardian_radiance_ = false; } -inline bool Trail_specialization_filter::_internal_guardian_radiance() const { +inline bool SpecializationFilter::_internal_guardian_radiance() const { return guardian_radiance_; } -inline bool Trail_specialization_filter::guardian_radiance() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.guardian_radiance) +inline bool SpecializationFilter::guardian_radiance() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.guardian_radiance) return _internal_guardian_radiance(); } -inline void Trail_specialization_filter::_internal_set_guardian_radiance(bool value) { +inline void SpecializationFilter::_internal_set_guardian_radiance(bool value) { guardian_radiance_ = value; } -inline void Trail_specialization_filter::set_guardian_radiance(bool value) { +inline void SpecializationFilter::set_guardian_radiance(bool value) { _internal_set_guardian_radiance(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.guardian_radiance) + // @@protoc_insertion_point(field_set:SpecializationFilter.guardian_radiance) } -// bool guardian_valor = 13; -inline void Trail_specialization_filter::clear_guardian_valor() { +// bool guardian_valor = 40; +inline void SpecializationFilter::clear_guardian_valor() { guardian_valor_ = false; } -inline bool Trail_specialization_filter::_internal_guardian_valor() const { +inline bool SpecializationFilter::_internal_guardian_valor() const { return guardian_valor_; } -inline bool Trail_specialization_filter::guardian_valor() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.guardian_valor) +inline bool SpecializationFilter::guardian_valor() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.guardian_valor) return _internal_guardian_valor(); } -inline void Trail_specialization_filter::_internal_set_guardian_valor(bool value) { +inline void SpecializationFilter::_internal_set_guardian_valor(bool value) { guardian_valor_ = value; } -inline void Trail_specialization_filter::set_guardian_valor(bool value) { +inline void SpecializationFilter::set_guardian_valor(bool value) { _internal_set_guardian_valor(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.guardian_valor) + // @@protoc_insertion_point(field_set:SpecializationFilter.guardian_valor) } -// bool guardian_virtues = 46; -inline void Trail_specialization_filter::clear_guardian_virtues() { +// bool guardian_virtues = 41; +inline void SpecializationFilter::clear_guardian_virtues() { guardian_virtues_ = false; } -inline bool Trail_specialization_filter::_internal_guardian_virtues() const { +inline bool SpecializationFilter::_internal_guardian_virtues() const { return guardian_virtues_; } -inline bool Trail_specialization_filter::guardian_virtues() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.guardian_virtues) +inline bool SpecializationFilter::guardian_virtues() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.guardian_virtues) return _internal_guardian_virtues(); } -inline void Trail_specialization_filter::_internal_set_guardian_virtues(bool value) { +inline void SpecializationFilter::_internal_set_guardian_virtues(bool value) { guardian_virtues_ = value; } -inline void Trail_specialization_filter::set_guardian_virtues(bool value) { +inline void SpecializationFilter::set_guardian_virtues(bool value) { _internal_set_guardian_virtues(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.guardian_virtues) + // @@protoc_insertion_point(field_set:SpecializationFilter.guardian_virtues) } // bool guardian_zeal = 42; -inline void Trail_specialization_filter::clear_guardian_zeal() { +inline void SpecializationFilter::clear_guardian_zeal() { guardian_zeal_ = false; } -inline bool Trail_specialization_filter::_internal_guardian_zeal() const { +inline bool SpecializationFilter::_internal_guardian_zeal() const { return guardian_zeal_; } -inline bool Trail_specialization_filter::guardian_zeal() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.guardian_zeal) +inline bool SpecializationFilter::guardian_zeal() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.guardian_zeal) return _internal_guardian_zeal(); } -inline void Trail_specialization_filter::_internal_set_guardian_zeal(bool value) { +inline void SpecializationFilter::_internal_set_guardian_zeal(bool value) { guardian_zeal_ = value; } -inline void Trail_specialization_filter::set_guardian_zeal(bool value) { +inline void SpecializationFilter::set_guardian_zeal(bool value) { _internal_set_guardian_zeal(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.guardian_zeal) + // @@protoc_insertion_point(field_set:SpecializationFilter.guardian_zeal) } -// bool mesmer_chaos = 45; -inline void Trail_specialization_filter::clear_mesmer_chaos() { +// bool mesmer_chaos = 43; +inline void SpecializationFilter::clear_mesmer_chaos() { mesmer_chaos_ = false; } -inline bool Trail_specialization_filter::_internal_mesmer_chaos() const { +inline bool SpecializationFilter::_internal_mesmer_chaos() const { return mesmer_chaos_; } -inline bool Trail_specialization_filter::mesmer_chaos() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.mesmer_chaos) +inline bool SpecializationFilter::mesmer_chaos() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.mesmer_chaos) return _internal_mesmer_chaos(); } -inline void Trail_specialization_filter::_internal_set_mesmer_chaos(bool value) { +inline void SpecializationFilter::_internal_set_mesmer_chaos(bool value) { mesmer_chaos_ = value; } -inline void Trail_specialization_filter::set_mesmer_chaos(bool value) { +inline void SpecializationFilter::set_mesmer_chaos(bool value) { _internal_set_mesmer_chaos(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.mesmer_chaos) + // @@protoc_insertion_point(field_set:SpecializationFilter.mesmer_chaos) } -// bool mesmer_domination = 10; -inline void Trail_specialization_filter::clear_mesmer_domination() { +// bool mesmer_domination = 44; +inline void SpecializationFilter::clear_mesmer_domination() { mesmer_domination_ = false; } -inline bool Trail_specialization_filter::_internal_mesmer_domination() const { +inline bool SpecializationFilter::_internal_mesmer_domination() const { return mesmer_domination_; } -inline bool Trail_specialization_filter::mesmer_domination() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.mesmer_domination) +inline bool SpecializationFilter::mesmer_domination() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.mesmer_domination) return _internal_mesmer_domination(); } -inline void Trail_specialization_filter::_internal_set_mesmer_domination(bool value) { +inline void SpecializationFilter::_internal_set_mesmer_domination(bool value) { mesmer_domination_ = value; } -inline void Trail_specialization_filter::set_mesmer_domination(bool value) { +inline void SpecializationFilter::set_mesmer_domination(bool value) { _internal_set_mesmer_domination(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.mesmer_domination) + // @@protoc_insertion_point(field_set:SpecializationFilter.mesmer_domination) } -// bool mesmer_dueling = 1; -inline void Trail_specialization_filter::clear_mesmer_dueling() { +// bool mesmer_dueling = 45; +inline void SpecializationFilter::clear_mesmer_dueling() { mesmer_dueling_ = false; } -inline bool Trail_specialization_filter::_internal_mesmer_dueling() const { +inline bool SpecializationFilter::_internal_mesmer_dueling() const { return mesmer_dueling_; } -inline bool Trail_specialization_filter::mesmer_dueling() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.mesmer_dueling) +inline bool SpecializationFilter::mesmer_dueling() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.mesmer_dueling) return _internal_mesmer_dueling(); } -inline void Trail_specialization_filter::_internal_set_mesmer_dueling(bool value) { +inline void SpecializationFilter::_internal_set_mesmer_dueling(bool value) { mesmer_dueling_ = value; } -inline void Trail_specialization_filter::set_mesmer_dueling(bool value) { +inline void SpecializationFilter::set_mesmer_dueling(bool value) { _internal_set_mesmer_dueling(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.mesmer_dueling) + // @@protoc_insertion_point(field_set:SpecializationFilter.mesmer_dueling) } -// bool mesmer_illusions = 24; -inline void Trail_specialization_filter::clear_mesmer_illusions() { +// bool mesmer_illusions = 46; +inline void SpecializationFilter::clear_mesmer_illusions() { mesmer_illusions_ = false; } -inline bool Trail_specialization_filter::_internal_mesmer_illusions() const { +inline bool SpecializationFilter::_internal_mesmer_illusions() const { return mesmer_illusions_; } -inline bool Trail_specialization_filter::mesmer_illusions() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.mesmer_illusions) +inline bool SpecializationFilter::mesmer_illusions() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.mesmer_illusions) return _internal_mesmer_illusions(); } -inline void Trail_specialization_filter::_internal_set_mesmer_illusions(bool value) { +inline void SpecializationFilter::_internal_set_mesmer_illusions(bool value) { mesmer_illusions_ = value; } -inline void Trail_specialization_filter::set_mesmer_illusions(bool value) { +inline void SpecializationFilter::set_mesmer_illusions(bool value) { _internal_set_mesmer_illusions(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.mesmer_illusions) + // @@protoc_insertion_point(field_set:SpecializationFilter.mesmer_illusions) } -// bool mesmer_inspiration = 23; -inline void Trail_specialization_filter::clear_mesmer_inspiration() { +// bool mesmer_inspiration = 47; +inline void SpecializationFilter::clear_mesmer_inspiration() { mesmer_inspiration_ = false; } -inline bool Trail_specialization_filter::_internal_mesmer_inspiration() const { +inline bool SpecializationFilter::_internal_mesmer_inspiration() const { return mesmer_inspiration_; } -inline bool Trail_specialization_filter::mesmer_inspiration() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.mesmer_inspiration) +inline bool SpecializationFilter::mesmer_inspiration() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.mesmer_inspiration) return _internal_mesmer_inspiration(); } -inline void Trail_specialization_filter::_internal_set_mesmer_inspiration(bool value) { +inline void SpecializationFilter::_internal_set_mesmer_inspiration(bool value) { mesmer_inspiration_ = value; } -inline void Trail_specialization_filter::set_mesmer_inspiration(bool value) { +inline void SpecializationFilter::set_mesmer_inspiration(bool value) { _internal_set_mesmer_inspiration(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.mesmer_inspiration) + // @@protoc_insertion_point(field_set:SpecializationFilter.mesmer_inspiration) } -// bool necromancer_blood_magic = 19; -inline void Trail_specialization_filter::clear_necromancer_blood_magic() { +// bool necromancer_blood_magic = 48; +inline void SpecializationFilter::clear_necromancer_blood_magic() { necromancer_blood_magic_ = false; } -inline bool Trail_specialization_filter::_internal_necromancer_blood_magic() const { +inline bool SpecializationFilter::_internal_necromancer_blood_magic() const { return necromancer_blood_magic_; } -inline bool Trail_specialization_filter::necromancer_blood_magic() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.necromancer_blood_magic) +inline bool SpecializationFilter::necromancer_blood_magic() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.necromancer_blood_magic) return _internal_necromancer_blood_magic(); } -inline void Trail_specialization_filter::_internal_set_necromancer_blood_magic(bool value) { +inline void SpecializationFilter::_internal_set_necromancer_blood_magic(bool value) { necromancer_blood_magic_ = value; } -inline void Trail_specialization_filter::set_necromancer_blood_magic(bool value) { - _internal_set_necromancer_blood_magic(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.necromancer_blood_magic) -} - -// bool necromancer_curses = 39; -inline void Trail_specialization_filter::clear_necromancer_curses() { - necromancer_curses_ = false; -} -inline bool Trail_specialization_filter::_internal_necromancer_curses() const { - return necromancer_curses_; -} -inline bool Trail_specialization_filter::necromancer_curses() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.necromancer_curses) - return _internal_necromancer_curses(); -} -inline void Trail_specialization_filter::_internal_set_necromancer_curses(bool value) { - - necromancer_curses_ = value; -} -inline void Trail_specialization_filter::set_necromancer_curses(bool value) { - _internal_set_necromancer_curses(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.necromancer_curses) -} - -// bool necromancer_death_magic = 2; -inline void Trail_specialization_filter::clear_necromancer_death_magic() { - necromancer_death_magic_ = false; -} -inline bool Trail_specialization_filter::_internal_necromancer_death_magic() const { - return necromancer_death_magic_; -} -inline bool Trail_specialization_filter::necromancer_death_magic() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.necromancer_death_magic) - return _internal_necromancer_death_magic(); -} -inline void Trail_specialization_filter::_internal_set_necromancer_death_magic(bool value) { - - necromancer_death_magic_ = value; -} -inline void Trail_specialization_filter::set_necromancer_death_magic(bool value) { - _internal_set_necromancer_death_magic(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.necromancer_death_magic) -} - -// bool necromancer_soul_reaping = 50; -inline void Trail_specialization_filter::clear_necromancer_soul_reaping() { - necromancer_soul_reaping_ = false; -} -inline bool Trail_specialization_filter::_internal_necromancer_soul_reaping() const { - return necromancer_soul_reaping_; -} -inline bool Trail_specialization_filter::necromancer_soul_reaping() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.necromancer_soul_reaping) - return _internal_necromancer_soul_reaping(); -} -inline void Trail_specialization_filter::_internal_set_necromancer_soul_reaping(bool value) { - - necromancer_soul_reaping_ = value; -} -inline void Trail_specialization_filter::set_necromancer_soul_reaping(bool value) { - _internal_set_necromancer_soul_reaping(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.necromancer_soul_reaping) -} - -// bool necromancer_spite = 53; -inline void Trail_specialization_filter::clear_necromancer_spite() { - necromancer_spite_ = false; -} -inline bool Trail_specialization_filter::_internal_necromancer_spite() const { - return necromancer_spite_; -} -inline bool Trail_specialization_filter::necromancer_spite() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.necromancer_spite) - return _internal_necromancer_spite(); -} -inline void Trail_specialization_filter::_internal_set_necromancer_spite(bool value) { - - necromancer_spite_ = value; -} -inline void Trail_specialization_filter::set_necromancer_spite(bool value) { - _internal_set_necromancer_spite(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.necromancer_spite) -} - -// bool ranger_beastmastery = 32; -inline void Trail_specialization_filter::clear_ranger_beastmastery() { - ranger_beastmastery_ = false; -} -inline bool Trail_specialization_filter::_internal_ranger_beastmastery() const { - return ranger_beastmastery_; -} -inline bool Trail_specialization_filter::ranger_beastmastery() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.ranger_beastmastery) - return _internal_ranger_beastmastery(); -} -inline void Trail_specialization_filter::_internal_set_ranger_beastmastery(bool value) { - - ranger_beastmastery_ = value; -} -inline void Trail_specialization_filter::set_ranger_beastmastery(bool value) { - _internal_set_ranger_beastmastery(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.ranger_beastmastery) -} - -// bool ranger_marksmanship = 8; -inline void Trail_specialization_filter::clear_ranger_marksmanship() { - ranger_marksmanship_ = false; -} -inline bool Trail_specialization_filter::_internal_ranger_marksmanship() const { - return ranger_marksmanship_; -} -inline bool Trail_specialization_filter::ranger_marksmanship() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.ranger_marksmanship) - return _internal_ranger_marksmanship(); -} -inline void Trail_specialization_filter::_internal_set_ranger_marksmanship(bool value) { - - ranger_marksmanship_ = value; -} -inline void Trail_specialization_filter::set_ranger_marksmanship(bool value) { - _internal_set_ranger_marksmanship(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.ranger_marksmanship) -} - -// bool ranger_nature_magic = 25; -inline void Trail_specialization_filter::clear_ranger_nature_magic() { - ranger_nature_magic_ = false; -} -inline bool Trail_specialization_filter::_internal_ranger_nature_magic() const { - return ranger_nature_magic_; -} -inline bool Trail_specialization_filter::ranger_nature_magic() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.ranger_nature_magic) - return _internal_ranger_nature_magic(); -} -inline void Trail_specialization_filter::_internal_set_ranger_nature_magic(bool value) { - - ranger_nature_magic_ = value; -} -inline void Trail_specialization_filter::set_ranger_nature_magic(bool value) { - _internal_set_ranger_nature_magic(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.ranger_nature_magic) -} - -// bool ranger_skirmishing = 30; -inline void Trail_specialization_filter::clear_ranger_skirmishing() { - ranger_skirmishing_ = false; -} -inline bool Trail_specialization_filter::_internal_ranger_skirmishing() const { - return ranger_skirmishing_; -} -inline bool Trail_specialization_filter::ranger_skirmishing() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.ranger_skirmishing) - return _internal_ranger_skirmishing(); -} -inline void Trail_specialization_filter::_internal_set_ranger_skirmishing(bool value) { - - ranger_skirmishing_ = value; -} -inline void Trail_specialization_filter::set_ranger_skirmishing(bool value) { - _internal_set_ranger_skirmishing(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.ranger_skirmishing) -} - -// bool ranger_wilderness_survival = 33; -inline void Trail_specialization_filter::clear_ranger_wilderness_survival() { - ranger_wilderness_survival_ = false; -} -inline bool Trail_specialization_filter::_internal_ranger_wilderness_survival() const { - return ranger_wilderness_survival_; -} -inline bool Trail_specialization_filter::ranger_wilderness_survival() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.ranger_wilderness_survival) - return _internal_ranger_wilderness_survival(); -} -inline void Trail_specialization_filter::_internal_set_ranger_wilderness_survival(bool value) { - - ranger_wilderness_survival_ = value; -} -inline void Trail_specialization_filter::set_ranger_wilderness_survival(bool value) { - _internal_set_ranger_wilderness_survival(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.ranger_wilderness_survival) -} - -// bool revenant_corruption = 14; -inline void Trail_specialization_filter::clear_revenant_corruption() { - revenant_corruption_ = false; -} -inline bool Trail_specialization_filter::_internal_revenant_corruption() const { - return revenant_corruption_; -} -inline bool Trail_specialization_filter::revenant_corruption() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.revenant_corruption) - return _internal_revenant_corruption(); -} -inline void Trail_specialization_filter::_internal_set_revenant_corruption(bool value) { - - revenant_corruption_ = value; -} -inline void Trail_specialization_filter::set_revenant_corruption(bool value) { - _internal_set_revenant_corruption(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.revenant_corruption) -} - -// bool revenant_devastation = 15; -inline void Trail_specialization_filter::clear_revenant_devastation() { - revenant_devastation_ = false; -} -inline bool Trail_specialization_filter::_internal_revenant_devastation() const { - return revenant_devastation_; -} -inline bool Trail_specialization_filter::revenant_devastation() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.revenant_devastation) - return _internal_revenant_devastation(); -} -inline void Trail_specialization_filter::_internal_set_revenant_devastation(bool value) { - - revenant_devastation_ = value; -} -inline void Trail_specialization_filter::set_revenant_devastation(bool value) { - _internal_set_revenant_devastation(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.revenant_devastation) -} - -// bool revenant_invocation = 3; -inline void Trail_specialization_filter::clear_revenant_invocation() { - revenant_invocation_ = false; -} -inline bool Trail_specialization_filter::_internal_revenant_invocation() const { - return revenant_invocation_; -} -inline bool Trail_specialization_filter::revenant_invocation() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.revenant_invocation) - return _internal_revenant_invocation(); -} -inline void Trail_specialization_filter::_internal_set_revenant_invocation(bool value) { - - revenant_invocation_ = value; -} -inline void Trail_specialization_filter::set_revenant_invocation(bool value) { - _internal_set_revenant_invocation(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.revenant_invocation) -} - -// bool revenant_retribution = 9; -inline void Trail_specialization_filter::clear_revenant_retribution() { - revenant_retribution_ = false; -} -inline bool Trail_specialization_filter::_internal_revenant_retribution() const { - return revenant_retribution_; -} -inline bool Trail_specialization_filter::revenant_retribution() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.revenant_retribution) - return _internal_revenant_retribution(); -} -inline void Trail_specialization_filter::_internal_set_revenant_retribution(bool value) { - - revenant_retribution_ = value; -} -inline void Trail_specialization_filter::set_revenant_retribution(bool value) { - _internal_set_revenant_retribution(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.revenant_retribution) -} - -// bool revenant_salvation = 12; -inline void Trail_specialization_filter::clear_revenant_salvation() { - revenant_salvation_ = false; -} -inline bool Trail_specialization_filter::_internal_revenant_salvation() const { - return revenant_salvation_; -} -inline bool Trail_specialization_filter::revenant_salvation() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.revenant_salvation) - return _internal_revenant_salvation(); -} -inline void Trail_specialization_filter::_internal_set_revenant_salvation(bool value) { - - revenant_salvation_ = value; -} -inline void Trail_specialization_filter::set_revenant_salvation(bool value) { - _internal_set_revenant_salvation(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.revenant_salvation) -} - -// bool thief_acrobatics = 54; -inline void Trail_specialization_filter::clear_thief_acrobatics() { - thief_acrobatics_ = false; -} -inline bool Trail_specialization_filter::_internal_thief_acrobatics() const { - return thief_acrobatics_; -} -inline bool Trail_specialization_filter::thief_acrobatics() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.thief_acrobatics) - return _internal_thief_acrobatics(); -} -inline void Trail_specialization_filter::_internal_set_thief_acrobatics(bool value) { - - thief_acrobatics_ = value; -} -inline void Trail_specialization_filter::set_thief_acrobatics(bool value) { - _internal_set_thief_acrobatics(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.thief_acrobatics) -} - -// bool thief_critical_strikes = 35; -inline void Trail_specialization_filter::clear_thief_critical_strikes() { - thief_critical_strikes_ = false; -} -inline bool Trail_specialization_filter::_internal_thief_critical_strikes() const { - return thief_critical_strikes_; -} -inline bool Trail_specialization_filter::thief_critical_strikes() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.thief_critical_strikes) - return _internal_thief_critical_strikes(); -} -inline void Trail_specialization_filter::_internal_set_thief_critical_strikes(bool value) { - - thief_critical_strikes_ = value; -} -inline void Trail_specialization_filter::set_thief_critical_strikes(bool value) { - _internal_set_thief_critical_strikes(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.thief_critical_strikes) -} - -// bool thief_deadly_arts = 28; -inline void Trail_specialization_filter::clear_thief_deadly_arts() { - thief_deadly_arts_ = false; -} -inline bool Trail_specialization_filter::_internal_thief_deadly_arts() const { - return thief_deadly_arts_; -} -inline bool Trail_specialization_filter::thief_deadly_arts() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.thief_deadly_arts) - return _internal_thief_deadly_arts(); -} -inline void Trail_specialization_filter::_internal_set_thief_deadly_arts(bool value) { - - thief_deadly_arts_ = value; -} -inline void Trail_specialization_filter::set_thief_deadly_arts(bool value) { - _internal_set_thief_deadly_arts(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.thief_deadly_arts) -} - -// bool thief_shadow_arts = 20; -inline void Trail_specialization_filter::clear_thief_shadow_arts() { - thief_shadow_arts_ = false; -} -inline bool Trail_specialization_filter::_internal_thief_shadow_arts() const { - return thief_shadow_arts_; -} -inline bool Trail_specialization_filter::thief_shadow_arts() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.thief_shadow_arts) - return _internal_thief_shadow_arts(); -} -inline void Trail_specialization_filter::_internal_set_thief_shadow_arts(bool value) { - - thief_shadow_arts_ = value; -} -inline void Trail_specialization_filter::set_thief_shadow_arts(bool value) { - _internal_set_thief_shadow_arts(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.thief_shadow_arts) -} - -// bool thief_trickery = 44; -inline void Trail_specialization_filter::clear_thief_trickery() { - thief_trickery_ = false; -} -inline bool Trail_specialization_filter::_internal_thief_trickery() const { - return thief_trickery_; -} -inline bool Trail_specialization_filter::thief_trickery() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.thief_trickery) - return _internal_thief_trickery(); -} -inline void Trail_specialization_filter::_internal_set_thief_trickery(bool value) { - - thief_trickery_ = value; -} -inline void Trail_specialization_filter::set_thief_trickery(bool value) { - _internal_set_thief_trickery(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.thief_trickery) -} - -// bool warrior_arms = 36; -inline void Trail_specialization_filter::clear_warrior_arms() { - warrior_arms_ = false; -} -inline bool Trail_specialization_filter::_internal_warrior_arms() const { - return warrior_arms_; -} -inline bool Trail_specialization_filter::warrior_arms() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.warrior_arms) - return _internal_warrior_arms(); -} -inline void Trail_specialization_filter::_internal_set_warrior_arms(bool value) { - - warrior_arms_ = value; -} -inline void Trail_specialization_filter::set_warrior_arms(bool value) { - _internal_set_warrior_arms(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.warrior_arms) -} - -// bool warrior_defense = 22; -inline void Trail_specialization_filter::clear_warrior_defense() { - warrior_defense_ = false; -} -inline bool Trail_specialization_filter::_internal_warrior_defense() const { - return warrior_defense_; -} -inline bool Trail_specialization_filter::warrior_defense() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.warrior_defense) - return _internal_warrior_defense(); -} -inline void Trail_specialization_filter::_internal_set_warrior_defense(bool value) { - - warrior_defense_ = value; -} -inline void Trail_specialization_filter::set_warrior_defense(bool value) { - _internal_set_warrior_defense(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.warrior_defense) +inline void SpecializationFilter::set_necromancer_blood_magic(bool value) { + _internal_set_necromancer_blood_magic(value); + // @@protoc_insertion_point(field_set:SpecializationFilter.necromancer_blood_magic) } -// bool warrior_discipline = 51; -inline void Trail_specialization_filter::clear_warrior_discipline() { - warrior_discipline_ = false; +// bool necromancer_curses = 49; +inline void SpecializationFilter::clear_necromancer_curses() { + necromancer_curses_ = false; } -inline bool Trail_specialization_filter::_internal_warrior_discipline() const { - return warrior_discipline_; +inline bool SpecializationFilter::_internal_necromancer_curses() const { + return necromancer_curses_; } -inline bool Trail_specialization_filter::warrior_discipline() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.warrior_discipline) - return _internal_warrior_discipline(); +inline bool SpecializationFilter::necromancer_curses() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.necromancer_curses) + return _internal_necromancer_curses(); } -inline void Trail_specialization_filter::_internal_set_warrior_discipline(bool value) { +inline void SpecializationFilter::_internal_set_necromancer_curses(bool value) { - warrior_discipline_ = value; + necromancer_curses_ = value; } -inline void Trail_specialization_filter::set_warrior_discipline(bool value) { - _internal_set_warrior_discipline(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.warrior_discipline) +inline void SpecializationFilter::set_necromancer_curses(bool value) { + _internal_set_necromancer_curses(value); + // @@protoc_insertion_point(field_set:SpecializationFilter.necromancer_curses) } -// bool warrior_strength = 4; -inline void Trail_specialization_filter::clear_warrior_strength() { - warrior_strength_ = false; +// bool necromancer_death_magic = 50; +inline void SpecializationFilter::clear_necromancer_death_magic() { + necromancer_death_magic_ = false; } -inline bool Trail_specialization_filter::_internal_warrior_strength() const { - return warrior_strength_; +inline bool SpecializationFilter::_internal_necromancer_death_magic() const { + return necromancer_death_magic_; } -inline bool Trail_specialization_filter::warrior_strength() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.warrior_strength) - return _internal_warrior_strength(); +inline bool SpecializationFilter::necromancer_death_magic() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.necromancer_death_magic) + return _internal_necromancer_death_magic(); } -inline void Trail_specialization_filter::_internal_set_warrior_strength(bool value) { +inline void SpecializationFilter::_internal_set_necromancer_death_magic(bool value) { - warrior_strength_ = value; + necromancer_death_magic_ = value; } -inline void Trail_specialization_filter::set_warrior_strength(bool value) { - _internal_set_warrior_strength(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.warrior_strength) +inline void SpecializationFilter::set_necromancer_death_magic(bool value) { + _internal_set_necromancer_death_magic(value); + // @@protoc_insertion_point(field_set:SpecializationFilter.necromancer_death_magic) } -// bool warrior_tactics = 11; -inline void Trail_specialization_filter::clear_warrior_tactics() { - warrior_tactics_ = false; +// bool necromancer_soul_reaping = 51; +inline void SpecializationFilter::clear_necromancer_soul_reaping() { + necromancer_soul_reaping_ = false; } -inline bool Trail_specialization_filter::_internal_warrior_tactics() const { - return warrior_tactics_; +inline bool SpecializationFilter::_internal_necromancer_soul_reaping() const { + return necromancer_soul_reaping_; } -inline bool Trail_specialization_filter::warrior_tactics() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.specialization_filter.warrior_tactics) - return _internal_warrior_tactics(); +inline bool SpecializationFilter::necromancer_soul_reaping() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.necromancer_soul_reaping) + return _internal_necromancer_soul_reaping(); } -inline void Trail_specialization_filter::_internal_set_warrior_tactics(bool value) { +inline void SpecializationFilter::_internal_set_necromancer_soul_reaping(bool value) { - warrior_tactics_ = value; + necromancer_soul_reaping_ = value; } -inline void Trail_specialization_filter::set_warrior_tactics(bool value) { - _internal_set_warrior_tactics(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.specialization_filter.warrior_tactics) +inline void SpecializationFilter::set_necromancer_soul_reaping(bool value) { + _internal_set_necromancer_soul_reaping(value); + // @@protoc_insertion_point(field_set:SpecializationFilter.necromancer_soul_reaping) } -// ------------------------------------------------------------------- - -// Trail_species_filter - -// bool asura = 1; -inline void Trail_species_filter::clear_asura() { - asura_ = false; +// bool necromancer_spite = 52; +inline void SpecializationFilter::clear_necromancer_spite() { + necromancer_spite_ = false; } -inline bool Trail_species_filter::_internal_asura() const { - return asura_; +inline bool SpecializationFilter::_internal_necromancer_spite() const { + return necromancer_spite_; } -inline bool Trail_species_filter::asura() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.species_filter.asura) - return _internal_asura(); +inline bool SpecializationFilter::necromancer_spite() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.necromancer_spite) + return _internal_necromancer_spite(); } -inline void Trail_species_filter::_internal_set_asura(bool value) { +inline void SpecializationFilter::_internal_set_necromancer_spite(bool value) { - asura_ = value; + necromancer_spite_ = value; } -inline void Trail_species_filter::set_asura(bool value) { - _internal_set_asura(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.species_filter.asura) +inline void SpecializationFilter::set_necromancer_spite(bool value) { + _internal_set_necromancer_spite(value); + // @@protoc_insertion_point(field_set:SpecializationFilter.necromancer_spite) } -// bool charr = 2; -inline void Trail_species_filter::clear_charr() { - charr_ = false; +// bool ranger_beastmastery = 53; +inline void SpecializationFilter::clear_ranger_beastmastery() { + ranger_beastmastery_ = false; } -inline bool Trail_species_filter::_internal_charr() const { - return charr_; +inline bool SpecializationFilter::_internal_ranger_beastmastery() const { + return ranger_beastmastery_; } -inline bool Trail_species_filter::charr() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.species_filter.charr) - return _internal_charr(); +inline bool SpecializationFilter::ranger_beastmastery() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.ranger_beastmastery) + return _internal_ranger_beastmastery(); } -inline void Trail_species_filter::_internal_set_charr(bool value) { +inline void SpecializationFilter::_internal_set_ranger_beastmastery(bool value) { - charr_ = value; + ranger_beastmastery_ = value; } -inline void Trail_species_filter::set_charr(bool value) { - _internal_set_charr(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.species_filter.charr) +inline void SpecializationFilter::set_ranger_beastmastery(bool value) { + _internal_set_ranger_beastmastery(value); + // @@protoc_insertion_point(field_set:SpecializationFilter.ranger_beastmastery) } -// bool human = 3; -inline void Trail_species_filter::clear_human() { - human_ = false; +// bool ranger_marksmanship = 54; +inline void SpecializationFilter::clear_ranger_marksmanship() { + ranger_marksmanship_ = false; } -inline bool Trail_species_filter::_internal_human() const { - return human_; +inline bool SpecializationFilter::_internal_ranger_marksmanship() const { + return ranger_marksmanship_; } -inline bool Trail_species_filter::human() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.species_filter.human) - return _internal_human(); +inline bool SpecializationFilter::ranger_marksmanship() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.ranger_marksmanship) + return _internal_ranger_marksmanship(); } -inline void Trail_species_filter::_internal_set_human(bool value) { +inline void SpecializationFilter::_internal_set_ranger_marksmanship(bool value) { - human_ = value; + ranger_marksmanship_ = value; } -inline void Trail_species_filter::set_human(bool value) { - _internal_set_human(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.species_filter.human) +inline void SpecializationFilter::set_ranger_marksmanship(bool value) { + _internal_set_ranger_marksmanship(value); + // @@protoc_insertion_point(field_set:SpecializationFilter.ranger_marksmanship) } -// bool norn = 4; -inline void Trail_species_filter::clear_norn() { - norn_ = false; +// bool ranger_nature_magic = 55; +inline void SpecializationFilter::clear_ranger_nature_magic() { + ranger_nature_magic_ = false; } -inline bool Trail_species_filter::_internal_norn() const { - return norn_; +inline bool SpecializationFilter::_internal_ranger_nature_magic() const { + return ranger_nature_magic_; } -inline bool Trail_species_filter::norn() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.species_filter.norn) - return _internal_norn(); +inline bool SpecializationFilter::ranger_nature_magic() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.ranger_nature_magic) + return _internal_ranger_nature_magic(); } -inline void Trail_species_filter::_internal_set_norn(bool value) { +inline void SpecializationFilter::_internal_set_ranger_nature_magic(bool value) { - norn_ = value; + ranger_nature_magic_ = value; } -inline void Trail_species_filter::set_norn(bool value) { - _internal_set_norn(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.species_filter.norn) +inline void SpecializationFilter::set_ranger_nature_magic(bool value) { + _internal_set_ranger_nature_magic(value); + // @@protoc_insertion_point(field_set:SpecializationFilter.ranger_nature_magic) } -// bool sylvari = 5; -inline void Trail_species_filter::clear_sylvari() { - sylvari_ = false; +// bool ranger_skirmishing = 56; +inline void SpecializationFilter::clear_ranger_skirmishing() { + ranger_skirmishing_ = false; } -inline bool Trail_species_filter::_internal_sylvari() const { - return sylvari_; +inline bool SpecializationFilter::_internal_ranger_skirmishing() const { + return ranger_skirmishing_; } -inline bool Trail_species_filter::sylvari() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.species_filter.sylvari) - return _internal_sylvari(); +inline bool SpecializationFilter::ranger_skirmishing() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.ranger_skirmishing) + return _internal_ranger_skirmishing(); } -inline void Trail_species_filter::_internal_set_sylvari(bool value) { +inline void SpecializationFilter::_internal_set_ranger_skirmishing(bool value) { - sylvari_ = value; + ranger_skirmishing_ = value; } -inline void Trail_species_filter::set_sylvari(bool value) { - _internal_set_sylvari(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.species_filter.sylvari) +inline void SpecializationFilter::set_ranger_skirmishing(bool value) { + _internal_set_ranger_skirmishing(value); + // @@protoc_insertion_point(field_set:SpecializationFilter.ranger_skirmishing) } -// ------------------------------------------------------------------- - -// Trail_texture - -// string path = 1; -inline void Trail_texture::clear_path() { - path_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +// bool ranger_wilderness_survival = 57; +inline void SpecializationFilter::clear_ranger_wilderness_survival() { + ranger_wilderness_survival_ = false; } -inline const std::string& Trail_texture::path() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.texture.path) - return _internal_path(); +inline bool SpecializationFilter::_internal_ranger_wilderness_survival() const { + return ranger_wilderness_survival_; } -inline void Trail_texture::set_path(const std::string& value) { - _internal_set_path(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.texture.path) +inline bool SpecializationFilter::ranger_wilderness_survival() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.ranger_wilderness_survival) + return _internal_ranger_wilderness_survival(); } -inline std::string* Trail_texture::mutable_path() { - // @@protoc_insertion_point(field_mutable:Proto_Node.Trail.texture.path) - return _internal_mutable_path(); +inline void SpecializationFilter::_internal_set_ranger_wilderness_survival(bool value) { + + ranger_wilderness_survival_ = value; } -inline const std::string& Trail_texture::_internal_path() const { - return path_.Get(); +inline void SpecializationFilter::set_ranger_wilderness_survival(bool value) { + _internal_set_ranger_wilderness_survival(value); + // @@protoc_insertion_point(field_set:SpecializationFilter.ranger_wilderness_survival) } -inline void Trail_texture::_internal_set_path(const std::string& value) { - - path_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); + +// bool revenant_corruption = 58; +inline void SpecializationFilter::clear_revenant_corruption() { + revenant_corruption_ = false; } -inline void Trail_texture::set_path(std::string&& value) { - - path_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:Proto_Node.Trail.texture.path) +inline bool SpecializationFilter::_internal_revenant_corruption() const { + return revenant_corruption_; } -inline void Trail_texture::set_path(const char* value) { - GOOGLE_DCHECK(value != nullptr); - - path_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArena()); - // @@protoc_insertion_point(field_set_char:Proto_Node.Trail.texture.path) +inline bool SpecializationFilter::revenant_corruption() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.revenant_corruption) + return _internal_revenant_corruption(); } -inline void Trail_texture::set_path(const char* value, - size_t size) { +inline void SpecializationFilter::_internal_set_revenant_corruption(bool value) { - path_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:Proto_Node.Trail.texture.path) + revenant_corruption_ = value; } -inline std::string* Trail_texture::_internal_mutable_path() { - - return path_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +inline void SpecializationFilter::set_revenant_corruption(bool value) { + _internal_set_revenant_corruption(value); + // @@protoc_insertion_point(field_set:SpecializationFilter.revenant_corruption) } -inline std::string* Trail_texture::release_path() { - // @@protoc_insertion_point(field_release:Proto_Node.Trail.texture.path) - return path_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + +// bool revenant_devastation = 59; +inline void SpecializationFilter::clear_revenant_devastation() { + revenant_devastation_ = false; } -inline void Trail_texture::set_allocated_path(std::string* path) { - if (path != nullptr) { - - } else { - - } - path_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), path, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:Proto_Node.Trail.texture.path) +inline bool SpecializationFilter::_internal_revenant_devastation() const { + return revenant_devastation_; } -inline std::string* Trail_texture::unsafe_arena_release_path() { - // @@protoc_insertion_point(field_unsafe_arena_release:Proto_Node.Trail.texture.path) - GOOGLE_DCHECK(GetArena() != nullptr); +inline bool SpecializationFilter::revenant_devastation() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.revenant_devastation) + return _internal_revenant_devastation(); +} +inline void SpecializationFilter::_internal_set_revenant_devastation(bool value) { - return path_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArena()); + revenant_devastation_ = value; } -inline void Trail_texture::unsafe_arena_set_allocated_path( - std::string* path) { - GOOGLE_DCHECK(GetArena() != nullptr); - if (path != nullptr) { - - } else { - - } - path_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - path, GetArena()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Proto_Node.Trail.texture.path) +inline void SpecializationFilter::set_revenant_devastation(bool value) { + _internal_set_revenant_devastation(value); + // @@protoc_insertion_point(field_set:SpecializationFilter.revenant_devastation) } -// .google.protobuf.Any original_token = 2; -inline bool Trail_texture::_internal_has_original_token() const { - return this != internal_default_instance() && original_token_ != nullptr; +// bool revenant_invocation = 60; +inline void SpecializationFilter::clear_revenant_invocation() { + revenant_invocation_ = false; } -inline bool Trail_texture::has_original_token() const { - return _internal_has_original_token(); +inline bool SpecializationFilter::_internal_revenant_invocation() const { + return revenant_invocation_; } -inline const PROTOBUF_NAMESPACE_ID::Any& Trail_texture::_internal_original_token() const { - const PROTOBUF_NAMESPACE_ID::Any* p = original_token_; - return p != nullptr ? *p : *reinterpret_cast( - &PROTOBUF_NAMESPACE_ID::_Any_default_instance_); +inline bool SpecializationFilter::revenant_invocation() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.revenant_invocation) + return _internal_revenant_invocation(); } -inline const PROTOBUF_NAMESPACE_ID::Any& Trail_texture::original_token() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.texture.original_token) - return _internal_original_token(); +inline void SpecializationFilter::_internal_set_revenant_invocation(bool value) { + + revenant_invocation_ = value; } -inline void Trail_texture::unsafe_arena_set_allocated_original_token( - PROTOBUF_NAMESPACE_ID::Any* original_token) { - if (GetArena() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(original_token_); - } - original_token_ = original_token; - if (original_token) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Proto_Node.Trail.texture.original_token) +inline void SpecializationFilter::set_revenant_invocation(bool value) { + _internal_set_revenant_invocation(value); + // @@protoc_insertion_point(field_set:SpecializationFilter.revenant_invocation) } -inline PROTOBUF_NAMESPACE_ID::Any* Trail_texture::release_original_token() { - auto temp = unsafe_arena_release_original_token(); - if (GetArena() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } - return temp; + +// bool revenant_retribution = 61; +inline void SpecializationFilter::clear_revenant_retribution() { + revenant_retribution_ = false; } -inline PROTOBUF_NAMESPACE_ID::Any* Trail_texture::unsafe_arena_release_original_token() { - // @@protoc_insertion_point(field_release:Proto_Node.Trail.texture.original_token) - - PROTOBUF_NAMESPACE_ID::Any* temp = original_token_; - original_token_ = nullptr; - return temp; +inline bool SpecializationFilter::_internal_revenant_retribution() const { + return revenant_retribution_; } -inline PROTOBUF_NAMESPACE_ID::Any* Trail_texture::_internal_mutable_original_token() { - - if (original_token_ == nullptr) { - auto* p = CreateMaybeMessage(GetArena()); - original_token_ = p; - } - return original_token_; +inline bool SpecializationFilter::revenant_retribution() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.revenant_retribution) + return _internal_revenant_retribution(); } -inline PROTOBUF_NAMESPACE_ID::Any* Trail_texture::mutable_original_token() { - // @@protoc_insertion_point(field_mutable:Proto_Node.Trail.texture.original_token) - return _internal_mutable_original_token(); +inline void SpecializationFilter::_internal_set_revenant_retribution(bool value) { + + revenant_retribution_ = value; } -inline void Trail_texture::set_allocated_original_token(PROTOBUF_NAMESPACE_ID::Any* original_token) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); - if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(original_token_); - } - if (original_token) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(original_token)->GetArena(); - if (message_arena != submessage_arena) { - original_token = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, original_token, submessage_arena); - } - - } else { - - } - original_token_ = original_token; - // @@protoc_insertion_point(field_set_allocated:Proto_Node.Trail.texture.original_token) +inline void SpecializationFilter::set_revenant_retribution(bool value) { + _internal_set_revenant_retribution(value); + // @@protoc_insertion_point(field_set:SpecializationFilter.revenant_retribution) } -// ------------------------------------------------------------------- - -// Trail_trail_data - -// string trail_data = 1; -inline void Trail_trail_data::clear_trail_data() { - trail_data_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +// bool revenant_salvation = 62; +inline void SpecializationFilter::clear_revenant_salvation() { + revenant_salvation_ = false; } -inline const std::string& Trail_trail_data::trail_data() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.trail_data.trail_data) - return _internal_trail_data(); +inline bool SpecializationFilter::_internal_revenant_salvation() const { + return revenant_salvation_; } -inline void Trail_trail_data::set_trail_data(const std::string& value) { - _internal_set_trail_data(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.trail_data.trail_data) +inline bool SpecializationFilter::revenant_salvation() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.revenant_salvation) + return _internal_revenant_salvation(); } -inline std::string* Trail_trail_data::mutable_trail_data() { - // @@protoc_insertion_point(field_mutable:Proto_Node.Trail.trail_data.trail_data) - return _internal_mutable_trail_data(); +inline void SpecializationFilter::_internal_set_revenant_salvation(bool value) { + + revenant_salvation_ = value; } -inline const std::string& Trail_trail_data::_internal_trail_data() const { - return trail_data_.Get(); +inline void SpecializationFilter::set_revenant_salvation(bool value) { + _internal_set_revenant_salvation(value); + // @@protoc_insertion_point(field_set:SpecializationFilter.revenant_salvation) } -inline void Trail_trail_data::_internal_set_trail_data(const std::string& value) { - - trail_data_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); + +// bool thief_acrobatics = 63; +inline void SpecializationFilter::clear_thief_acrobatics() { + thief_acrobatics_ = false; } -inline void Trail_trail_data::set_trail_data(std::string&& value) { - - trail_data_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:Proto_Node.Trail.trail_data.trail_data) +inline bool SpecializationFilter::_internal_thief_acrobatics() const { + return thief_acrobatics_; } -inline void Trail_trail_data::set_trail_data(const char* value) { - GOOGLE_DCHECK(value != nullptr); - - trail_data_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArena()); - // @@protoc_insertion_point(field_set_char:Proto_Node.Trail.trail_data.trail_data) +inline bool SpecializationFilter::thief_acrobatics() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.thief_acrobatics) + return _internal_thief_acrobatics(); } -inline void Trail_trail_data::set_trail_data(const char* value, - size_t size) { +inline void SpecializationFilter::_internal_set_thief_acrobatics(bool value) { - trail_data_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:Proto_Node.Trail.trail_data.trail_data) + thief_acrobatics_ = value; } -inline std::string* Trail_trail_data::_internal_mutable_trail_data() { - - return trail_data_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +inline void SpecializationFilter::set_thief_acrobatics(bool value) { + _internal_set_thief_acrobatics(value); + // @@protoc_insertion_point(field_set:SpecializationFilter.thief_acrobatics) } -inline std::string* Trail_trail_data::release_trail_data() { - // @@protoc_insertion_point(field_release:Proto_Node.Trail.trail_data.trail_data) - return trail_data_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + +// bool thief_critical_strikes = 64; +inline void SpecializationFilter::clear_thief_critical_strikes() { + thief_critical_strikes_ = false; } -inline void Trail_trail_data::set_allocated_trail_data(std::string* trail_data) { - if (trail_data != nullptr) { - - } else { - - } - trail_data_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), trail_data, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:Proto_Node.Trail.trail_data.trail_data) +inline bool SpecializationFilter::_internal_thief_critical_strikes() const { + return thief_critical_strikes_; } -inline std::string* Trail_trail_data::unsafe_arena_release_trail_data() { - // @@protoc_insertion_point(field_unsafe_arena_release:Proto_Node.Trail.trail_data.trail_data) - GOOGLE_DCHECK(GetArena() != nullptr); +inline bool SpecializationFilter::thief_critical_strikes() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.thief_critical_strikes) + return _internal_thief_critical_strikes(); +} +inline void SpecializationFilter::_internal_set_thief_critical_strikes(bool value) { - return trail_data_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArena()); + thief_critical_strikes_ = value; } -inline void Trail_trail_data::unsafe_arena_set_allocated_trail_data( - std::string* trail_data) { - GOOGLE_DCHECK(GetArena() != nullptr); - if (trail_data != nullptr) { - - } else { - - } - trail_data_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - trail_data, GetArena()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Proto_Node.Trail.trail_data.trail_data) +inline void SpecializationFilter::set_thief_critical_strikes(bool value) { + _internal_set_thief_critical_strikes(value); + // @@protoc_insertion_point(field_set:SpecializationFilter.thief_critical_strikes) } -// ------------------------------------------------------------------- - -// Trail - -// fixed32 achievement_bit = 1; -inline void Trail::clear_achievement_bit() { - achievement_bit_ = 0u; +// bool thief_deadly_arts = 65; +inline void SpecializationFilter::clear_thief_deadly_arts() { + thief_deadly_arts_ = false; } -inline ::PROTOBUF_NAMESPACE_ID::uint32 Trail::_internal_achievement_bit() const { - return achievement_bit_; +inline bool SpecializationFilter::_internal_thief_deadly_arts() const { + return thief_deadly_arts_; } -inline ::PROTOBUF_NAMESPACE_ID::uint32 Trail::achievement_bit() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.achievement_bit) - return _internal_achievement_bit(); +inline bool SpecializationFilter::thief_deadly_arts() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.thief_deadly_arts) + return _internal_thief_deadly_arts(); } -inline void Trail::_internal_set_achievement_bit(::PROTOBUF_NAMESPACE_ID::uint32 value) { +inline void SpecializationFilter::_internal_set_thief_deadly_arts(bool value) { - achievement_bit_ = value; + thief_deadly_arts_ = value; } -inline void Trail::set_achievement_bit(::PROTOBUF_NAMESPACE_ID::uint32 value) { - _internal_set_achievement_bit(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.achievement_bit) +inline void SpecializationFilter::set_thief_deadly_arts(bool value) { + _internal_set_thief_deadly_arts(value); + // @@protoc_insertion_point(field_set:SpecializationFilter.thief_deadly_arts) } -// int32 achievement_id = 2; -inline void Trail::clear_achievement_id() { - achievement_id_ = 0; +// bool thief_shadow_arts = 66; +inline void SpecializationFilter::clear_thief_shadow_arts() { + thief_shadow_arts_ = false; } -inline ::PROTOBUF_NAMESPACE_ID::int32 Trail::_internal_achievement_id() const { - return achievement_id_; +inline bool SpecializationFilter::_internal_thief_shadow_arts() const { + return thief_shadow_arts_; } -inline ::PROTOBUF_NAMESPACE_ID::int32 Trail::achievement_id() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.achievement_id) - return _internal_achievement_id(); +inline bool SpecializationFilter::thief_shadow_arts() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.thief_shadow_arts) + return _internal_thief_shadow_arts(); } -inline void Trail::_internal_set_achievement_id(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline void SpecializationFilter::_internal_set_thief_shadow_arts(bool value) { - achievement_id_ = value; + thief_shadow_arts_ = value; } -inline void Trail::set_achievement_id(::PROTOBUF_NAMESPACE_ID::int32 value) { - _internal_set_achievement_id(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.achievement_id) +inline void SpecializationFilter::set_thief_shadow_arts(bool value) { + _internal_set_thief_shadow_arts(value); + // @@protoc_insertion_point(field_set:SpecializationFilter.thief_shadow_arts) } -// float alpha = 3; -inline void Trail::clear_alpha() { - alpha_ = 0; +// bool thief_trickery = 67; +inline void SpecializationFilter::clear_thief_trickery() { + thief_trickery_ = false; } -inline float Trail::_internal_alpha() const { - return alpha_; +inline bool SpecializationFilter::_internal_thief_trickery() const { + return thief_trickery_; } -inline float Trail::alpha() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.alpha) - return _internal_alpha(); +inline bool SpecializationFilter::thief_trickery() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.thief_trickery) + return _internal_thief_trickery(); } -inline void Trail::_internal_set_alpha(float value) { +inline void SpecializationFilter::_internal_set_thief_trickery(bool value) { - alpha_ = value; + thief_trickery_ = value; } -inline void Trail::set_alpha(float value) { - _internal_set_alpha(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.alpha) +inline void SpecializationFilter::set_thief_trickery(bool value) { + _internal_set_thief_trickery(value); + // @@protoc_insertion_point(field_set:SpecializationFilter.thief_trickery) } -// float animation_speed = 4; -inline void Trail::clear_animation_speed() { - animation_speed_ = 0; +// bool warrior_arms = 68; +inline void SpecializationFilter::clear_warrior_arms() { + warrior_arms_ = false; } -inline float Trail::_internal_animation_speed() const { - return animation_speed_; +inline bool SpecializationFilter::_internal_warrior_arms() const { + return warrior_arms_; } -inline float Trail::animation_speed() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.animation_speed) - return _internal_animation_speed(); +inline bool SpecializationFilter::warrior_arms() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.warrior_arms) + return _internal_warrior_arms(); } -inline void Trail::_internal_set_animation_speed(float value) { +inline void SpecializationFilter::_internal_set_warrior_arms(bool value) { - animation_speed_ = value; + warrior_arms_ = value; } -inline void Trail::set_animation_speed(float value) { - _internal_set_animation_speed(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.animation_speed) +inline void SpecializationFilter::set_warrior_arms(bool value) { + _internal_set_warrior_arms(value); + // @@protoc_insertion_point(field_set:SpecializationFilter.warrior_arms) } -// bool can_fade = 5; -inline void Trail::clear_can_fade() { - can_fade_ = false; +// bool warrior_defense = 69; +inline void SpecializationFilter::clear_warrior_defense() { + warrior_defense_ = false; } -inline bool Trail::_internal_can_fade() const { - return can_fade_; +inline bool SpecializationFilter::_internal_warrior_defense() const { + return warrior_defense_; } -inline bool Trail::can_fade() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.can_fade) - return _internal_can_fade(); +inline bool SpecializationFilter::warrior_defense() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.warrior_defense) + return _internal_warrior_defense(); } -inline void Trail::_internal_set_can_fade(bool value) { +inline void SpecializationFilter::_internal_set_warrior_defense(bool value) { - can_fade_ = value; + warrior_defense_ = value; } -inline void Trail::set_can_fade(bool value) { - _internal_set_can_fade(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.can_fade) +inline void SpecializationFilter::set_warrior_defense(bool value) { + _internal_set_warrior_defense(value); + // @@protoc_insertion_point(field_set:SpecializationFilter.warrior_defense) } -// float distance_fade_end = 6; -inline void Trail::clear_distance_fade_end() { - distance_fade_end_ = 0; +// bool warrior_discipline = 70; +inline void SpecializationFilter::clear_warrior_discipline() { + warrior_discipline_ = false; } -inline float Trail::_internal_distance_fade_end() const { - return distance_fade_end_; +inline bool SpecializationFilter::_internal_warrior_discipline() const { + return warrior_discipline_; } -inline float Trail::distance_fade_end() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.distance_fade_end) - return _internal_distance_fade_end(); +inline bool SpecializationFilter::warrior_discipline() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.warrior_discipline) + return _internal_warrior_discipline(); } -inline void Trail::_internal_set_distance_fade_end(float value) { +inline void SpecializationFilter::_internal_set_warrior_discipline(bool value) { - distance_fade_end_ = value; + warrior_discipline_ = value; } -inline void Trail::set_distance_fade_end(float value) { - _internal_set_distance_fade_end(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.distance_fade_end) +inline void SpecializationFilter::set_warrior_discipline(bool value) { + _internal_set_warrior_discipline(value); + // @@protoc_insertion_point(field_set:SpecializationFilter.warrior_discipline) } -// float distance_fade_start = 7; -inline void Trail::clear_distance_fade_start() { - distance_fade_start_ = 0; +// bool warrior_strength = 71; +inline void SpecializationFilter::clear_warrior_strength() { + warrior_strength_ = false; } -inline float Trail::_internal_distance_fade_start() const { - return distance_fade_start_; +inline bool SpecializationFilter::_internal_warrior_strength() const { + return warrior_strength_; } -inline float Trail::distance_fade_start() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.distance_fade_start) - return _internal_distance_fade_start(); +inline bool SpecializationFilter::warrior_strength() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.warrior_strength) + return _internal_warrior_strength(); } -inline void Trail::_internal_set_distance_fade_start(float value) { +inline void SpecializationFilter::_internal_set_warrior_strength(bool value) { - distance_fade_start_ = value; + warrior_strength_ = value; } -inline void Trail::set_distance_fade_start(float value) { - _internal_set_distance_fade_start(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.distance_fade_start) +inline void SpecializationFilter::set_warrior_strength(bool value) { + _internal_set_warrior_strength(value); + // @@protoc_insertion_point(field_set:SpecializationFilter.warrior_strength) } -// bool is_wall = 8; -inline void Trail::clear_is_wall() { - is_wall_ = false; +// bool warrior_tactics = 72; +inline void SpecializationFilter::clear_warrior_tactics() { + warrior_tactics_ = false; } -inline bool Trail::_internal_is_wall() const { - return is_wall_; +inline bool SpecializationFilter::_internal_warrior_tactics() const { + return warrior_tactics_; } -inline bool Trail::is_wall() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.is_wall) - return _internal_is_wall(); +inline bool SpecializationFilter::warrior_tactics() const { + // @@protoc_insertion_point(field_get:SpecializationFilter.warrior_tactics) + return _internal_warrior_tactics(); } -inline void Trail::_internal_set_is_wall(bool value) { +inline void SpecializationFilter::_internal_set_warrior_tactics(bool value) { - is_wall_ = value; + warrior_tactics_ = value; } -inline void Trail::set_is_wall(bool value) { - _internal_set_is_wall(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.is_wall) +inline void SpecializationFilter::set_warrior_tactics(bool value) { + _internal_set_warrior_tactics(value); + // @@protoc_insertion_point(field_set:SpecializationFilter.warrior_tactics) } -// string bhdraft__schedule = 9; -inline void Trail::clear_bhdraft__schedule() { - bhdraft__schedule_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +// ------------------------------------------------------------------- + +// SpeciesFilter + +// bool asura = 1; +inline void SpeciesFilter::clear_asura() { + asura_ = false; } -inline const std::string& Trail::bhdraft__schedule() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.bhdraft__schedule) - return _internal_bhdraft__schedule(); +inline bool SpeciesFilter::_internal_asura() const { + return asura_; } -inline void Trail::set_bhdraft__schedule(const std::string& value) { - _internal_set_bhdraft__schedule(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.bhdraft__schedule) +inline bool SpeciesFilter::asura() const { + // @@protoc_insertion_point(field_get:SpeciesFilter.asura) + return _internal_asura(); } -inline std::string* Trail::mutable_bhdraft__schedule() { - // @@protoc_insertion_point(field_mutable:Proto_Node.Trail.bhdraft__schedule) - return _internal_mutable_bhdraft__schedule(); +inline void SpeciesFilter::_internal_set_asura(bool value) { + + asura_ = value; } -inline const std::string& Trail::_internal_bhdraft__schedule() const { - return bhdraft__schedule_.Get(); +inline void SpeciesFilter::set_asura(bool value) { + _internal_set_asura(value); + // @@protoc_insertion_point(field_set:SpeciesFilter.asura) } -inline void Trail::_internal_set_bhdraft__schedule(const std::string& value) { - - bhdraft__schedule_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); + +// bool charr = 2; +inline void SpeciesFilter::clear_charr() { + charr_ = false; } -inline void Trail::set_bhdraft__schedule(std::string&& value) { - - bhdraft__schedule_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:Proto_Node.Trail.bhdraft__schedule) +inline bool SpeciesFilter::_internal_charr() const { + return charr_; } -inline void Trail::set_bhdraft__schedule(const char* value) { - GOOGLE_DCHECK(value != nullptr); - - bhdraft__schedule_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArena()); - // @@protoc_insertion_point(field_set_char:Proto_Node.Trail.bhdraft__schedule) +inline bool SpeciesFilter::charr() const { + // @@protoc_insertion_point(field_get:SpeciesFilter.charr) + return _internal_charr(); } -inline void Trail::set_bhdraft__schedule(const char* value, - size_t size) { +inline void SpeciesFilter::_internal_set_charr(bool value) { - bhdraft__schedule_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:Proto_Node.Trail.bhdraft__schedule) + charr_ = value; } -inline std::string* Trail::_internal_mutable_bhdraft__schedule() { - - return bhdraft__schedule_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +inline void SpeciesFilter::set_charr(bool value) { + _internal_set_charr(value); + // @@protoc_insertion_point(field_set:SpeciesFilter.charr) } -inline std::string* Trail::release_bhdraft__schedule() { - // @@protoc_insertion_point(field_release:Proto_Node.Trail.bhdraft__schedule) - return bhdraft__schedule_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + +// bool human = 3; +inline void SpeciesFilter::clear_human() { + human_ = false; } -inline void Trail::set_allocated_bhdraft__schedule(std::string* bhdraft__schedule) { - if (bhdraft__schedule != nullptr) { - - } else { - - } - bhdraft__schedule_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), bhdraft__schedule, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:Proto_Node.Trail.bhdraft__schedule) +inline bool SpeciesFilter::_internal_human() const { + return human_; } -inline std::string* Trail::unsafe_arena_release_bhdraft__schedule() { - // @@protoc_insertion_point(field_unsafe_arena_release:Proto_Node.Trail.bhdraft__schedule) - GOOGLE_DCHECK(GetArena() != nullptr); +inline bool SpeciesFilter::human() const { + // @@protoc_insertion_point(field_get:SpeciesFilter.human) + return _internal_human(); +} +inline void SpeciesFilter::_internal_set_human(bool value) { - return bhdraft__schedule_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArena()); + human_ = value; } -inline void Trail::unsafe_arena_set_allocated_bhdraft__schedule( - std::string* bhdraft__schedule) { - GOOGLE_DCHECK(GetArena() != nullptr); - if (bhdraft__schedule != nullptr) { - - } else { - - } - bhdraft__schedule_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - bhdraft__schedule, GetArena()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Proto_Node.Trail.bhdraft__schedule) +inline void SpeciesFilter::set_human(bool value) { + _internal_set_human(value); + // @@protoc_insertion_point(field_set:SpeciesFilter.human) } -// float bhdraft__schedule_duration = 10; -inline void Trail::clear_bhdraft__schedule_duration() { - bhdraft__schedule_duration_ = 0; +// bool norn = 4; +inline void SpeciesFilter::clear_norn() { + norn_ = false; } -inline float Trail::_internal_bhdraft__schedule_duration() const { - return bhdraft__schedule_duration_; +inline bool SpeciesFilter::_internal_norn() const { + return norn_; } -inline float Trail::bhdraft__schedule_duration() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.bhdraft__schedule_duration) - return _internal_bhdraft__schedule_duration(); +inline bool SpeciesFilter::norn() const { + // @@protoc_insertion_point(field_get:SpeciesFilter.norn) + return _internal_norn(); } -inline void Trail::_internal_set_bhdraft__schedule_duration(float value) { +inline void SpeciesFilter::_internal_set_norn(bool value) { - bhdraft__schedule_duration_ = value; + norn_ = value; } -inline void Trail::set_bhdraft__schedule_duration(float value) { - _internal_set_bhdraft__schedule_duration(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.bhdraft__schedule_duration) +inline void SpeciesFilter::set_norn(bool value) { + _internal_set_norn(value); + // @@protoc_insertion_point(field_set:SpeciesFilter.norn) } -// float scale = 11; -inline void Trail::clear_scale() { - scale_ = 0; +// bool sylvari = 5; +inline void SpeciesFilter::clear_sylvari() { + sylvari_ = false; } -inline float Trail::_internal_scale() const { - return scale_; +inline bool SpeciesFilter::_internal_sylvari() const { + return sylvari_; } -inline float Trail::scale() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.scale) - return _internal_scale(); +inline bool SpeciesFilter::sylvari() const { + // @@protoc_insertion_point(field_get:SpeciesFilter.sylvari) + return _internal_sylvari(); } -inline void Trail::_internal_set_scale(float value) { +inline void SpeciesFilter::_internal_set_sylvari(bool value) { - scale_ = value; + sylvari_ = value; } -inline void Trail::set_scale(float value) { - _internal_set_scale(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.scale) +inline void SpeciesFilter::set_sylvari(bool value) { + _internal_set_sylvari(value); + // @@protoc_insertion_point(field_set:SpeciesFilter.sylvari) } -// .Proto_Node.Category category = 12; -inline bool Trail::_internal_has_category() const { - return this != internal_default_instance() && category_ != nullptr; +// ------------------------------------------------------------------- + +// TrailData + +// string trail_data = 1; +inline void TrailData::clear_trail_data() { + trail_data_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } -inline bool Trail::has_category() const { - return _internal_has_category(); +inline const std::string& TrailData::trail_data() const { + // @@protoc_insertion_point(field_get:TrailData.trail_data) + return _internal_trail_data(); } -inline void Trail::clear_category() { - if (GetArena() == nullptr && category_ != nullptr) { - delete category_; - } - category_ = nullptr; +inline void TrailData::set_trail_data(const std::string& value) { + _internal_set_trail_data(value); + // @@protoc_insertion_point(field_set:TrailData.trail_data) } -inline const ::Proto_Node::Category& Trail::_internal_category() const { - const ::Proto_Node::Category* p = category_; - return p != nullptr ? *p : *reinterpret_cast( - &::Proto_Node::_Category_default_instance_); +inline std::string* TrailData::mutable_trail_data() { + // @@protoc_insertion_point(field_mutable:TrailData.trail_data) + return _internal_mutable_trail_data(); } -inline const ::Proto_Node::Category& Trail::category() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.category) - return _internal_category(); +inline const std::string& TrailData::_internal_trail_data() const { + return trail_data_.Get(); } -inline void Trail::unsafe_arena_set_allocated_category( - ::Proto_Node::Category* category) { - if (GetArena() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(category_); - } - category_ = category; - if (category) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Proto_Node.Trail.category) +inline void TrailData::_internal_set_trail_data(const std::string& value) { + + trail_data_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); } -inline ::Proto_Node::Category* Trail::release_category() { - auto temp = unsafe_arena_release_category(); - if (GetArena() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } - return temp; +inline void TrailData::set_trail_data(std::string&& value) { + + trail_data_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:TrailData.trail_data) } -inline ::Proto_Node::Category* Trail::unsafe_arena_release_category() { - // @@protoc_insertion_point(field_release:Proto_Node.Trail.category) +inline void TrailData::set_trail_data(const char* value) { + GOOGLE_DCHECK(value != nullptr); - ::Proto_Node::Category* temp = category_; - category_ = nullptr; - return temp; + trail_data_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:TrailData.trail_data) } -inline ::Proto_Node::Category* Trail::_internal_mutable_category() { +inline void TrailData::set_trail_data(const char* value, + size_t size) { - if (category_ == nullptr) { - auto* p = CreateMaybeMessage<::Proto_Node::Category>(GetArena()); - category_ = p; - } - return category_; + trail_data_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:TrailData.trail_data) } -inline ::Proto_Node::Category* Trail::mutable_category() { - // @@protoc_insertion_point(field_mutable:Proto_Node.Trail.category) - return _internal_mutable_category(); +inline std::string* TrailData::_internal_mutable_trail_data() { + + return trail_data_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } -inline void Trail::set_allocated_category(::Proto_Node::Category* category) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); - if (message_arena == nullptr) { - delete category_; - } - if (category) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(category); - if (message_arena != submessage_arena) { - category = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, category, submessage_arena); - } +inline std::string* TrailData::release_trail_data() { + // @@protoc_insertion_point(field_release:TrailData.trail_data) + return trail_data_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void TrailData::set_allocated_trail_data(std::string* trail_data) { + if (trail_data != nullptr) { } else { } - category_ = category; - // @@protoc_insertion_point(field_set_allocated:Proto_Node.Trail.category) -} - -// int32 map_id = 13; -inline void Trail::clear_map_id() { - map_id_ = 0; -} -inline ::PROTOBUF_NAMESPACE_ID::int32 Trail::_internal_map_id() const { - return map_id_; -} -inline ::PROTOBUF_NAMESPACE_ID::int32 Trail::map_id() const { - // @@protoc_insertion_point(field_get:Proto_Node.Trail.map_id) - return _internal_map_id(); + trail_data_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), trail_data, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:TrailData.trail_data) } -inline void Trail::_internal_set_map_id(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline std::string* TrailData::unsafe_arena_release_trail_data() { + // @@protoc_insertion_point(field_unsafe_arena_release:TrailData.trail_data) + GOOGLE_DCHECK(GetArena() != nullptr); - map_id_ = value; + return trail_data_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); } -inline void Trail::set_map_id(::PROTOBUF_NAMESPACE_ID::int32 value) { - _internal_set_map_id(value); - // @@protoc_insertion_point(field_set:Proto_Node.Trail.map_id) +inline void TrailData::unsafe_arena_set_allocated_trail_data( + std::string* trail_data) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (trail_data != nullptr) { + + } else { + + } + trail_data_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + trail_data, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:TrailData.trail_data) } #ifdef __GNUC__ @@ -10232,26 +11114,21 @@ inline void Trail::set_map_id(::PROTOBUF_NAMESPACE_ID::int32 value) { // ------------------------------------------------------------------- -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - // @@protoc_insertion_point(namespace_scope) -} // namespace Proto_Node PROTOBUF_NAMESPACE_OPEN -template <> struct is_proto_enum< ::Proto_Node::Icon_trigger_reset_behavior> : ::std::true_type {}; +template <> struct is_proto_enum< ::CullChirality> : ::std::true_type {}; template <> -inline const EnumDescriptor* GetEnumDescriptor< ::Proto_Node::Icon_trigger_reset_behavior>() { - return ::Proto_Node::Icon_trigger_reset_behavior_descriptor(); +inline const EnumDescriptor* GetEnumDescriptor< ::CullChirality>() { + return ::CullChirality_descriptor(); } -template <> struct is_proto_enum< ::Proto_Node::Trail_cull_chirality> : ::std::true_type {}; +template <> struct is_proto_enum< ::ResetBehavior> : ::std::true_type {}; template <> -inline const EnumDescriptor* GetEnumDescriptor< ::Proto_Node::Trail_cull_chirality>() { - return ::Proto_Node::Trail_cull_chirality_descriptor(); +inline const EnumDescriptor* GetEnumDescriptor< ::ResetBehavior>() { + return ::ResetBehavior_descriptor(); } PROTOBUF_NAMESPACE_CLOSE @@ -10259,4 +11136,4 @@ PROTOBUF_NAMESPACE_CLOSE // @@protoc_insertion_point(global_scope) #include -#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_node_2eproto +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_generators_2fproto_5ftemplates_2fnode_2eproto From 79729c4bab1e0c38c1f900adcc4181e4fd3d7f7d Mon Sep 17 00:00:00 2001 From: klingbolt Date: Wed, 2 Nov 2022 22:57:50 -0400 Subject: [PATCH 092/539] Added make xml_converter --- .github/workflows/main.yml | 6 + .../generators/proto_templates/node.pb.cc | 518 +++++++------- .../generators/proto_templates/node.pb.h | 630 +++++++++--------- 3 files changed, 580 insertions(+), 574 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7bce03f6..04f03fbe 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -92,6 +92,12 @@ jobs: - name: Install protoc run: sudo apt-get install protobuf-compiler + - name: Make xml_converter + run: | + cd xml_converter + make + mv xml_converter ../output + - name: Build Burrito Link run: | cd burrito_link diff --git a/xml_converter/generators/proto_templates/node.pb.cc b/xml_converter/generators/proto_templates/node.pb.cc index c05c364b..7a0849a6 100644 --- a/xml_converter/generators/proto_templates/node.pb.cc +++ b/xml_converter/generators/proto_templates/node.pb.cc @@ -39,10 +39,10 @@ class IconDefaultTypeInternal { public: ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _Icon_default_instance_; -class RICHARDSDefaultTypeInternal { +class TrailDefaultTypeInternal { public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _RICHARDS_default_instance_; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _Trail_default_instance_; class TextureDefaultTypeInternal { public: ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; @@ -245,31 +245,6 @@ static void InitDefaultsscc_info_ProfessionFilter_generators_2fproto_5ftemplates ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ProfessionFilter_generators_2fproto_5ftemplates_2fnode_2eproto = {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_ProfessionFilter_generators_2fproto_5ftemplates_2fnode_2eproto}, {}}; -static void InitDefaultsscc_info_RICHARDS_generators_2fproto_5ftemplates_2fnode_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::_RICHARDS_default_instance_; - new (ptr) ::RICHARDS(); - ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); - } - ::RICHARDS::InitAsDefaultInstance(); -} - -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<11> scc_info_RICHARDS_generators_2fproto_5ftemplates_2fnode_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 11, 0, InitDefaultsscc_info_RICHARDS_generators_2fproto_5ftemplates_2fnode_2eproto}, { - &scc_info_Category_generators_2fproto_5ftemplates_2fnode_2eproto.base, - &scc_info_Texture_generators_2fproto_5ftemplates_2fnode_2eproto.base, - &scc_info_GUID_generators_2fproto_5ftemplates_2fnode_2eproto.base, - &scc_info_TrailData_generators_2fproto_5ftemplates_2fnode_2eproto.base, - &scc_info_Color_generators_2fproto_5ftemplates_2fnode_2eproto.base, - &scc_info_FestivalFilter_generators_2fproto_5ftemplates_2fnode_2eproto.base, - &scc_info_MapTypeFilter_generators_2fproto_5ftemplates_2fnode_2eproto.base, - &scc_info_MountFilter_generators_2fproto_5ftemplates_2fnode_2eproto.base, - &scc_info_ProfessionFilter_generators_2fproto_5ftemplates_2fnode_2eproto.base, - &scc_info_SpecializationFilter_generators_2fproto_5ftemplates_2fnode_2eproto.base, - &scc_info_SpeciesFilter_generators_2fproto_5ftemplates_2fnode_2eproto.base,}}; - static void InitDefaultsscc_info_SpecializationFilter_generators_2fproto_5ftemplates_2fnode_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -312,6 +287,31 @@ static void InitDefaultsscc_info_Texture_generators_2fproto_5ftemplates_2fnode_2 ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Texture_generators_2fproto_5ftemplates_2fnode_2eproto = {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Texture_generators_2fproto_5ftemplates_2fnode_2eproto}, {}}; +static void InitDefaultsscc_info_Trail_generators_2fproto_5ftemplates_2fnode_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::_Trail_default_instance_; + new (ptr) ::Trail(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::Trail::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<11> scc_info_Trail_generators_2fproto_5ftemplates_2fnode_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 11, 0, InitDefaultsscc_info_Trail_generators_2fproto_5ftemplates_2fnode_2eproto}, { + &scc_info_Category_generators_2fproto_5ftemplates_2fnode_2eproto.base, + &scc_info_Texture_generators_2fproto_5ftemplates_2fnode_2eproto.base, + &scc_info_GUID_generators_2fproto_5ftemplates_2fnode_2eproto.base, + &scc_info_TrailData_generators_2fproto_5ftemplates_2fnode_2eproto.base, + &scc_info_Color_generators_2fproto_5ftemplates_2fnode_2eproto.base, + &scc_info_FestivalFilter_generators_2fproto_5ftemplates_2fnode_2eproto.base, + &scc_info_MapTypeFilter_generators_2fproto_5ftemplates_2fnode_2eproto.base, + &scc_info_MountFilter_generators_2fproto_5ftemplates_2fnode_2eproto.base, + &scc_info_ProfessionFilter_generators_2fproto_5ftemplates_2fnode_2eproto.base, + &scc_info_SpecializationFilter_generators_2fproto_5ftemplates_2fnode_2eproto.base, + &scc_info_SpeciesFilter_generators_2fproto_5ftemplates_2fnode_2eproto.base,}}; + static void InitDefaultsscc_info_TrailData_generators_2fproto_5ftemplates_2fnode_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -398,34 +398,34 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_generators_2fproto_5ftemplates PROTOBUF_FIELD_OFFSET(::Icon, bhdraft__schedule_), PROTOBUF_FIELD_OFFSET(::Icon, bhdraft__schedule_duration_), ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::RICHARDS, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(::Trail, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::RICHARDS, category_), - PROTOBUF_FIELD_OFFSET(::RICHARDS, texture_), - PROTOBUF_FIELD_OFFSET(::RICHARDS, guid_), - PROTOBUF_FIELD_OFFSET(::RICHARDS, map_id_), - PROTOBUF_FIELD_OFFSET(::RICHARDS, distance_fade_end_), - PROTOBUF_FIELD_OFFSET(::RICHARDS, distance_fade_start_), - PROTOBUF_FIELD_OFFSET(::RICHARDS, trail_data_), - PROTOBUF_FIELD_OFFSET(::RICHARDS, animation_speed_), - PROTOBUF_FIELD_OFFSET(::RICHARDS, cull_chirality_), - PROTOBUF_FIELD_OFFSET(::RICHARDS, achievement_bit_), - PROTOBUF_FIELD_OFFSET(::RICHARDS, achievement_id_), - PROTOBUF_FIELD_OFFSET(::RICHARDS, alpha_), - PROTOBUF_FIELD_OFFSET(::RICHARDS, can_fade_), - PROTOBUF_FIELD_OFFSET(::RICHARDS, is_wall_), - PROTOBUF_FIELD_OFFSET(::RICHARDS, bhdraft__schedule_), - PROTOBUF_FIELD_OFFSET(::RICHARDS, bhdraft__schedule_duration_), - PROTOBUF_FIELD_OFFSET(::RICHARDS, scale_), - PROTOBUF_FIELD_OFFSET(::RICHARDS, color_), - PROTOBUF_FIELD_OFFSET(::RICHARDS, festival_filter_), - PROTOBUF_FIELD_OFFSET(::RICHARDS, map_type_filter_), - PROTOBUF_FIELD_OFFSET(::RICHARDS, mount_filter_), - PROTOBUF_FIELD_OFFSET(::RICHARDS, profession_filter_), - PROTOBUF_FIELD_OFFSET(::RICHARDS, specialization_filter_), - PROTOBUF_FIELD_OFFSET(::RICHARDS, species_filter_), + PROTOBUF_FIELD_OFFSET(::Trail, category_), + PROTOBUF_FIELD_OFFSET(::Trail, texture_), + PROTOBUF_FIELD_OFFSET(::Trail, guid_), + PROTOBUF_FIELD_OFFSET(::Trail, map_id_), + PROTOBUF_FIELD_OFFSET(::Trail, distance_fade_end_), + PROTOBUF_FIELD_OFFSET(::Trail, distance_fade_start_), + PROTOBUF_FIELD_OFFSET(::Trail, trail_data_), + PROTOBUF_FIELD_OFFSET(::Trail, animation_speed_), + PROTOBUF_FIELD_OFFSET(::Trail, cull_chirality_), + PROTOBUF_FIELD_OFFSET(::Trail, achievement_bit_), + PROTOBUF_FIELD_OFFSET(::Trail, achievement_id_), + PROTOBUF_FIELD_OFFSET(::Trail, alpha_), + PROTOBUF_FIELD_OFFSET(::Trail, can_fade_), + PROTOBUF_FIELD_OFFSET(::Trail, is_wall_), + PROTOBUF_FIELD_OFFSET(::Trail, bhdraft__schedule_), + PROTOBUF_FIELD_OFFSET(::Trail, bhdraft__schedule_duration_), + PROTOBUF_FIELD_OFFSET(::Trail, scale_), + PROTOBUF_FIELD_OFFSET(::Trail, color_), + PROTOBUF_FIELD_OFFSET(::Trail, festival_filter_), + PROTOBUF_FIELD_OFFSET(::Trail, map_type_filter_), + PROTOBUF_FIELD_OFFSET(::Trail, mount_filter_), + PROTOBUF_FIELD_OFFSET(::Trail, profession_filter_), + PROTOBUF_FIELD_OFFSET(::Trail, specialization_filter_), + PROTOBUF_FIELD_OFFSET(::Trail, species_filter_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::Texture, _internal_metadata_), ~0u, // no _extensions_ @@ -647,7 +647,7 @@ static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOB { 0, 7, sizeof(::Category_ChildrenEntry_DoNotUse)}, { 9, -1, sizeof(::Category)}, { 20, -1, sizeof(::Icon)}, - { 51, -1, sizeof(::RICHARDS)}, + { 51, -1, sizeof(::Trail)}, { 80, -1, sizeof(::Texture)}, { 86, -1, sizeof(::Position)}, { 94, -1, sizeof(::EulerRotation)}, @@ -667,7 +667,7 @@ static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = reinterpret_cast(&::_Category_ChildrenEntry_DoNotUse_default_instance_), reinterpret_cast(&::_Category_default_instance_), reinterpret_cast(&::_Icon_default_instance_), - reinterpret_cast(&::_RICHARDS_default_instance_), + reinterpret_cast(&::_Trail_default_instance_), reinterpret_cast(&::_Texture_default_instance_), reinterpret_cast(&::_Position_default_instance_), reinterpret_cast(&::_EulerRotation_default_instance_), @@ -708,128 +708,128 @@ const char descriptor_table_protodef_generators_2fproto_5ftemplates_2fnode_2epro "ingame\030\201\020 \001(\010\022#\n\032__tentative__render_on_" "map\030\202\020 \001(\010\022\'\n\036__tentative__render_on_min" "imap\030\203\020 \001(\010\022\032\n\021bhdraft__schedule\030\204\020 \001(\t\022" - "#\n\032bhdraft__schedule_duration\030\205\020 \001(\002\"\313\005\n" - "\010RICHARDS\022\033\n\010category\030\001 \001(\0132\t.Category\022\031" - "\n\007texture\030\002 \001(\0132\010.Texture\022\023\n\004guid\030\003 \001(\0132" - "\005.GUID\022\016\n\006map_id\030\004 \001(\005\022\031\n\021distance_fade_" - "end\030\005 \001(\002\022\033\n\023distance_fade_start\030\006 \001(\002\022\036" - "\n\ntrail_data\030\007 \001(\0132\n.TrailData\022\027\n\017animat" - "ion_speed\030\010 \001(\002\022&\n\016cull_chirality\030\t \001(\0162" - "\016.CullChirality\022\027\n\017achievement_bit\030\020 \001(\007" - "\022\026\n\016achievement_id\030\021 \001(\005\022\r\n\005alpha\030\022 \001(\002\022" - "\020\n\010can_fade\030\023 \001(\010\022\017\n\007is_wall\030\026 \001(\010\022\031\n\021bh" - "draft__schedule\030\027 \001(\t\022\"\n\032bhdraft__schedu" - "le_duration\030\030 \001(\002\022\r\n\005scale\030\031 \001(\002\022\025\n\005colo" - "r\030\032 \001(\0132\006.Color\022(\n\017festival_filter\030\033 \001(\013" - "2\017.FestivalFilter\022\'\n\017map_type_filter\030\034 \001" - "(\0132\016.MapTypeFilter\022\"\n\014mount_filter\030\035 \001(\013" - "2\014.MountFilter\022,\n\021profession_filter\030\036 \001(" - "\0132\021.ProfessionFilter\0224\n\025specialization_f" - "ilter\030\037 \001(\0132\025.SpecializationFilter\022&\n\016sp" - "ecies_filter\030 \001(\0132\016.SpeciesFilter\"\027\n\007Te" - "xture\022\014\n\004path\030\001 \001(\t\"+\n\010Position\022\t\n\001x\030\001 \001" - "(\002\022\t\n\001y\030\002 \001(\002\022\t\n\001z\030\003 \001(\002\"0\n\rEulerRotatio" - "n\022\t\n\001x\030\001 \001(\002\022\t\n\001y\030\002 \001(\002\022\t\n\001z\030\003 \001(\002\"\217\003\n\007T" - "rigger\022\024\n\014auto_trigger\030\001 \001(\010\022\024\n\014bounce_d" - "elay\030\002 \001(\002\022\027\n\017bounce_duration\030\003 \001(\002\022\025\n\rb" - "ounce_height\030\004 \001(\002\022\035\n\025action_copy_clipbo" - "ard\030\005 \001(\t\022\033\n\023action_copy_message\030\006 \001(\t\022\025" - "\n\rhas_countdown\030\007 \001(\010\022\033\n\023action_info_mes" - "sage\030\010 \001(\t\022\026\n\016invert_display\030\t \001(\010\022\024\n\014re" - "set_length\030\n \001(\002\022\r\n\005range\030\013 \001(\002\022\'\n\024actio" - "n_hide_category\030\014 \001(\0132\t.Category\022\'\n\024acti" - "on_show_category\030\r \001(\0132\t.Category\022)\n\026act" - "ion_toggle_category\030\016 \001(\0132\t.Category\"\024\n\004" - "GUID\022\014\n\004guid\030\001 \001(\005\"\024\n\005Color\022\013\n\003hex\030\001 \001(\t" - "\"\267\001\n\016FestivalFilter\022\022\n\ndragonbash\030\001 \001(\010\022" - "\"\n\032festival_of_the_four_winds\030\002 \001(\010\022\021\n\th" - "alloween\030\003 \001(\010\022\026\n\016lunar_new_year\030\004 \001(\010\022 " - "\n\030super_adventure_festival\030\005 \001(\010\022\022\n\nwint" - "ersday\030\006 \001(\010\022\014\n\004none\030\007 \001(\010\"\346\004\n\rMapTypeFi" - "lter\022\023\n\013unknown_map\030\001 \001(\010\022\024\n\014redirect_ma" - "p\030\002 \001(\010\022\034\n\024character_create_map\030\003 \001(\010\022\017\n" - "\007pvp_map\030\004 \001(\010\022\017\n\007gvg_map\030\005 \001(\010\022\024\n\014insta" - "nce_map\030\006 \001(\010\022\022\n\npublic_map\030\007 \001(\010\022\026\n\016tou" - "rnament_map\030\010 \001(\010\022\024\n\014tutorial_map\030\t \001(\010\022" - "\033\n\023user_tournament_map\030\n \001(\010\022\022\n\ncenter_m" - "ap\030\013 \001(\010\022!\n\031eternal_battlegrounds_map\030\014 " - "\001(\010\022\024\n\014bluehome_map\030\r \001(\010\022\034\n\024blue_border" - "lands_map\030\016 \001(\010\022\026\n\016green_home_map\030\017 \001(\010\022" - "\035\n\025green_borderlands_map\030\020 \001(\010\022\024\n\014red_ho" - "me_map\030\021 \001(\010\022\033\n\023red_borderlands_map\030\022 \001(" - "\010\022\031\n\021fortunes_vale_map\030\023 \001(\010\022\027\n\017jump_puz" - "zle_map\030\024 \001(\010\022\034\n\024obsidian_sanctum_map\030\025 " - "\001(\010\022\035\n\025edge_of_the_mists_map\030\026 \001(\010\022\027\n\017pu" - "blic_mini_map\030\027 \001(\010\022\026\n\016wvw_lounge_map\030\030 " - "\001(\010\"\301\001\n\013MountFilter\022\016\n\006raptor\030\001 \001(\010\022\020\n\010s" - "pringer\030\002 \001(\010\022\017\n\007skimmer\030\003 \001(\010\022\016\n\006jackal" - "\030\004 \001(\010\022\017\n\007griffon\030\005 \001(\010\022\025\n\rroller_beetle" - "\030\006 \001(\010\022\017\n\007warclaw\030\007 \001(\010\022\021\n\tskyscalee\030\010 \001" - "(\010\022\r\n\005skiff\030\t \001(\010\022\024\n\014seige_turtle\030\n \001(\010\"" - "\265\001\n\020ProfessionFilter\022\020\n\010guardian\030\001 \001(\010\022\017" - "\n\007warrior\030\002 \001(\010\022\020\n\010engineer\030\003 \001(\010\022\016\n\006ran" - "ger\030\004 \001(\010\022\r\n\005thief\030\005 \001(\010\022\024\n\014elementalist" - "\030\006 \001(\010\022\016\n\006mesmer\030\007 \001(\010\022\023\n\013necromancer\030\010 " - "\001(\010\022\022\n\nrevenantnt\030\t \001(\010\"\312\017\n\024Specializati" - "onFilter\022\034\n\024elementalist_tempest\030\001 \001(\010\022\031" - "\n\021engineer_scrapper\030\002 \001(\010\022\035\n\025guardian_dr" - "agonhunter\030\003 \001(\010\022\033\n\023mesmer_chronomancer\030" - "\004 \001(\010\022\032\n\022necromancer_reaper\030\005 \001(\010\022\024\n\014ran" - "ger_druid\030\006 \001(\010\022\027\n\017revenant_herald\030\007 \001(\010" - "\022\027\n\017thief_daredevil\030\010 \001(\010\022\031\n\021warrior_ber" - "serker\030\t \001(\010\022\033\n\023elementalist_weaver\030\n \001(" - "\010\022\032\n\022engineer_holosmith\030\013 \001(\010\022\032\n\022guardia" - "n_firebrand\030\014 \001(\010\022\025\n\rmesmer_mirage\030\r \001(\010" - "\022\033\n\023necromancer_scourge\030\016 \001(\010\022\030\n\020ranger_" - "soulbeast\030\017 \001(\010\022\031\n\021revenant_renegade\030\020 \001" - "(\010\022\025\n\rthief_deadeye\030\021 \001(\010\022\034\n\024warrior_spe" - "llbreaker\030\022 \001(\010\022\034\n\024elmentalist_catalyst\030" - "\023 \001(\010\022\032\n\022engineer_mechanist\030\024 \001(\010\022\033\n\023gua" - "rdian_willbender\030\025 \001(\010\022\027\n\017mesmer_virtuos" - "o\030\026 \001(\010\022\035\n\025necromancer_harbinger\030\027 \001(\010\022\026" - "\n\016ranger_untamed\030\030 \001(\010\022\033\n\023revenant_vindi" - "cator\030\031 \001(\010\022\025\n\rthief_specter\030\032 \001(\010\022\032\n\022wa" - "rrior_bladesworn\030\033 \001(\010\022\030\n\020elementalist_a" - "ir\030\034 \001(\010\022\033\n\023elementalist_arcane\030\035 \001(\010\022\032\n" - "\022elementalist_earth\030\036 \001(\010\022\031\n\021elementalis" - "t_fire\030\037 \001(\010\022\032\n\022elementalist_water\030 \001(\010" - "\022\030\n\020engineer_alchemy\030! \001(\010\022\033\n\023engineer_e" - "xplosives\030\" \001(\010\022\031\n\021engineer_firearms\030# \001" - "(\010\022\033\n\023engineer_inventions\030$ \001(\010\022\026\n\016engin" - "eer_tools\030% \001(\010\022\026\n\016guardian_honor\030& \001(\010\022" - "\031\n\021guardian_radiance\030\' \001(\010\022\026\n\016guardian_v" - "alor\030( \001(\010\022\030\n\020guardian_virtues\030) \001(\010\022\025\n\r" - "guardian_zeal\030* \001(\010\022\024\n\014mesmer_chaos\030+ \001(" - "\010\022\031\n\021mesmer_domination\030, \001(\010\022\026\n\016mesmer_d" - "ueling\030- \001(\010\022\030\n\020mesmer_illusions\030. \001(\010\022\032" - "\n\022mesmer_inspiration\030/ \001(\010\022\037\n\027necromance" - "r_blood_magic\0300 \001(\010\022\032\n\022necromancer_curse" - "s\0301 \001(\010\022\037\n\027necromancer_death_magic\0302 \001(\010" - "\022 \n\030necromancer_soul_reaping\0303 \001(\010\022\031\n\021ne" - "cromancer_spite\0304 \001(\010\022\033\n\023ranger_beastmas" - "tery\0305 \001(\010\022\033\n\023ranger_marksmanship\0306 \001(\010\022" - "\033\n\023ranger_nature_magic\0307 \001(\010\022\032\n\022ranger_s" - "kirmishing\0308 \001(\010\022\"\n\032ranger_wilderness_su" - "rvival\0309 \001(\010\022\033\n\023revenant_corruption\030: \001(" - "\010\022\034\n\024revenant_devastation\030; \001(\010\022\033\n\023reven" - "ant_invocation\030< \001(\010\022\034\n\024revenant_retribu" - "tion\030= \001(\010\022\032\n\022revenant_salvation\030> \001(\010\022\030" - "\n\020thief_acrobatics\030\? \001(\010\022\036\n\026thief_critic" - "al_strikes\030@ \001(\010\022\031\n\021thief_deadly_arts\030A " - "\001(\010\022\031\n\021thief_shadow_arts\030B \001(\010\022\026\n\016thief_" - "trickery\030C \001(\010\022\024\n\014warrior_arms\030D \001(\010\022\027\n\017" - "warrior_defense\030E \001(\010\022\032\n\022warrior_discipl" - "ine\030F \001(\010\022\030\n\020warrior_strength\030G \001(\010\022\027\n\017w" - "arrior_tactics\030H \001(\010\"[\n\rSpeciesFilter\022\r\n" - "\005asura\030\001 \001(\010\022\r\n\005charr\030\002 \001(\010\022\r\n\005human\030\003 \001" - "(\010\022\014\n\004norn\030\004 \001(\010\022\017\n\007sylvari\030\005 \001(\010\"\037\n\tTra" - "ilData\022\022\n\ntrail_data\030\001 \001(\t*\?\n\rCullChiral" - "ity\022\010\n\004none\020\000\022\r\n\tclockwise\020\001\022\025\n\021counter_" - "clockwise\020\002*\257\001\n\rResetBehavior\022\022\n\016always_" - "visible\020\000\022\016\n\nmap_change\020\001\022\017\n\013daily_reset" - "\020\002\022\t\n\005never\020\003\022\t\n\005timer\020\004\022\r\n\tmap_reset\020\005\022" - "\023\n\017instance_change\020\006\022\035\n\031daily_reset_per_" - "character\020\007\022\020\n\014weekly_reset\020\010b\006proto3" + "#\n\032bhdraft__schedule_duration\030\205\020 \001(\002\"\310\005\n" + "\005Trail\022\033\n\010category\030\001 \001(\0132\t.Category\022\031\n\007t" + "exture\030\002 \001(\0132\010.Texture\022\023\n\004guid\030\003 \001(\0132\005.G" + "UID\022\016\n\006map_id\030\004 \001(\005\022\031\n\021distance_fade_end" + "\030\005 \001(\002\022\033\n\023distance_fade_start\030\006 \001(\002\022\036\n\nt" + "rail_data\030\007 \001(\0132\n.TrailData\022\027\n\017animation" + "_speed\030\010 \001(\002\022&\n\016cull_chirality\030\t \001(\0162\016.C" + "ullChirality\022\027\n\017achievement_bit\030\020 \001(\007\022\026\n" + "\016achievement_id\030\021 \001(\005\022\r\n\005alpha\030\022 \001(\002\022\020\n\010" + "can_fade\030\023 \001(\010\022\017\n\007is_wall\030\026 \001(\010\022\031\n\021bhdra" + "ft__schedule\030\027 \001(\t\022\"\n\032bhdraft__schedule_" + "duration\030\030 \001(\002\022\r\n\005scale\030\031 \001(\002\022\025\n\005color\030\032" + " \001(\0132\006.Color\022(\n\017festival_filter\030\033 \001(\0132\017." + "FestivalFilter\022\'\n\017map_type_filter\030\034 \001(\0132" + "\016.MapTypeFilter\022\"\n\014mount_filter\030\035 \001(\0132\014." + "MountFilter\022,\n\021profession_filter\030\036 \001(\0132\021" + ".ProfessionFilter\0224\n\025specialization_filt" + "er\030\037 \001(\0132\025.SpecializationFilter\022&\n\016speci" + "es_filter\030 \001(\0132\016.SpeciesFilter\"\027\n\007Textu" + "re\022\014\n\004path\030\001 \001(\t\"+\n\010Position\022\t\n\001x\030\001 \001(\002\022" + "\t\n\001y\030\002 \001(\002\022\t\n\001z\030\003 \001(\002\"0\n\rEulerRotation\022\t" + "\n\001x\030\001 \001(\002\022\t\n\001y\030\002 \001(\002\022\t\n\001z\030\003 \001(\002\"\217\003\n\007Trig" + "ger\022\024\n\014auto_trigger\030\001 \001(\010\022\024\n\014bounce_dela" + "y\030\002 \001(\002\022\027\n\017bounce_duration\030\003 \001(\002\022\025\n\rboun" + "ce_height\030\004 \001(\002\022\035\n\025action_copy_clipboard" + "\030\005 \001(\t\022\033\n\023action_copy_message\030\006 \001(\t\022\025\n\rh" + "as_countdown\030\007 \001(\010\022\033\n\023action_info_messag" + "e\030\010 \001(\t\022\026\n\016invert_display\030\t \001(\010\022\024\n\014reset" + "_length\030\n \001(\002\022\r\n\005range\030\013 \001(\002\022\'\n\024action_h" + "ide_category\030\014 \001(\0132\t.Category\022\'\n\024action_" + "show_category\030\r \001(\0132\t.Category\022)\n\026action" + "_toggle_category\030\016 \001(\0132\t.Category\"\024\n\004GUI" + "D\022\014\n\004guid\030\001 \001(\005\"\024\n\005Color\022\013\n\003hex\030\001 \001(\t\"\267\001" + "\n\016FestivalFilter\022\022\n\ndragonbash\030\001 \001(\010\022\"\n\032" + "festival_of_the_four_winds\030\002 \001(\010\022\021\n\thall" + "oween\030\003 \001(\010\022\026\n\016lunar_new_year\030\004 \001(\010\022 \n\030s" + "uper_adventure_festival\030\005 \001(\010\022\022\n\nwinters" + "day\030\006 \001(\010\022\014\n\004none\030\007 \001(\010\"\346\004\n\rMapTypeFilte" + "r\022\023\n\013unknown_map\030\001 \001(\010\022\024\n\014redirect_map\030\002" + " \001(\010\022\034\n\024character_create_map\030\003 \001(\010\022\017\n\007pv" + "p_map\030\004 \001(\010\022\017\n\007gvg_map\030\005 \001(\010\022\024\n\014instance" + "_map\030\006 \001(\010\022\022\n\npublic_map\030\007 \001(\010\022\026\n\016tourna" + "ment_map\030\010 \001(\010\022\024\n\014tutorial_map\030\t \001(\010\022\033\n\023" + "user_tournament_map\030\n \001(\010\022\022\n\ncenter_map\030" + "\013 \001(\010\022!\n\031eternal_battlegrounds_map\030\014 \001(\010" + "\022\024\n\014bluehome_map\030\r \001(\010\022\034\n\024blue_borderlan" + "ds_map\030\016 \001(\010\022\026\n\016green_home_map\030\017 \001(\010\022\035\n\025" + "green_borderlands_map\030\020 \001(\010\022\024\n\014red_home_" + "map\030\021 \001(\010\022\033\n\023red_borderlands_map\030\022 \001(\010\022\031" + "\n\021fortunes_vale_map\030\023 \001(\010\022\027\n\017jump_puzzle" + "_map\030\024 \001(\010\022\034\n\024obsidian_sanctum_map\030\025 \001(\010" + "\022\035\n\025edge_of_the_mists_map\030\026 \001(\010\022\027\n\017publi" + "c_mini_map\030\027 \001(\010\022\026\n\016wvw_lounge_map\030\030 \001(\010" + "\"\301\001\n\013MountFilter\022\016\n\006raptor\030\001 \001(\010\022\020\n\010spri" + "nger\030\002 \001(\010\022\017\n\007skimmer\030\003 \001(\010\022\016\n\006jackal\030\004 " + "\001(\010\022\017\n\007griffon\030\005 \001(\010\022\025\n\rroller_beetle\030\006 " + "\001(\010\022\017\n\007warclaw\030\007 \001(\010\022\021\n\tskyscalee\030\010 \001(\010\022" + "\r\n\005skiff\030\t \001(\010\022\024\n\014seige_turtle\030\n \001(\010\"\265\001\n" + "\020ProfessionFilter\022\020\n\010guardian\030\001 \001(\010\022\017\n\007w" + "arrior\030\002 \001(\010\022\020\n\010engineer\030\003 \001(\010\022\016\n\006ranger" + "\030\004 \001(\010\022\r\n\005thief\030\005 \001(\010\022\024\n\014elementalist\030\006 " + "\001(\010\022\016\n\006mesmer\030\007 \001(\010\022\023\n\013necromancer\030\010 \001(\010" + "\022\022\n\nrevenantnt\030\t \001(\010\"\312\017\n\024SpecializationF" + "ilter\022\034\n\024elementalist_tempest\030\001 \001(\010\022\031\n\021e" + "ngineer_scrapper\030\002 \001(\010\022\035\n\025guardian_drago" + "nhunter\030\003 \001(\010\022\033\n\023mesmer_chronomancer\030\004 \001" + "(\010\022\032\n\022necromancer_reaper\030\005 \001(\010\022\024\n\014ranger" + "_druid\030\006 \001(\010\022\027\n\017revenant_herald\030\007 \001(\010\022\027\n" + "\017thief_daredevil\030\010 \001(\010\022\031\n\021warrior_berser" + "ker\030\t \001(\010\022\033\n\023elementalist_weaver\030\n \001(\010\022\032" + "\n\022engineer_holosmith\030\013 \001(\010\022\032\n\022guardian_f" + "irebrand\030\014 \001(\010\022\025\n\rmesmer_mirage\030\r \001(\010\022\033\n" + "\023necromancer_scourge\030\016 \001(\010\022\030\n\020ranger_sou" + "lbeast\030\017 \001(\010\022\031\n\021revenant_renegade\030\020 \001(\010\022" + "\025\n\rthief_deadeye\030\021 \001(\010\022\034\n\024warrior_spellb" + "reaker\030\022 \001(\010\022\034\n\024elmentalist_catalyst\030\023 \001" + "(\010\022\032\n\022engineer_mechanist\030\024 \001(\010\022\033\n\023guardi" + "an_willbender\030\025 \001(\010\022\027\n\017mesmer_virtuoso\030\026" + " \001(\010\022\035\n\025necromancer_harbinger\030\027 \001(\010\022\026\n\016r" + "anger_untamed\030\030 \001(\010\022\033\n\023revenant_vindicat" + "or\030\031 \001(\010\022\025\n\rthief_specter\030\032 \001(\010\022\032\n\022warri" + "or_bladesworn\030\033 \001(\010\022\030\n\020elementalist_air\030" + "\034 \001(\010\022\033\n\023elementalist_arcane\030\035 \001(\010\022\032\n\022el" + "ementalist_earth\030\036 \001(\010\022\031\n\021elementalist_f" + "ire\030\037 \001(\010\022\032\n\022elementalist_water\030 \001(\010\022\030\n" + "\020engineer_alchemy\030! \001(\010\022\033\n\023engineer_expl" + "osives\030\" \001(\010\022\031\n\021engineer_firearms\030# \001(\010\022" + "\033\n\023engineer_inventions\030$ \001(\010\022\026\n\016engineer" + "_tools\030% \001(\010\022\026\n\016guardian_honor\030& \001(\010\022\031\n\021" + "guardian_radiance\030\' \001(\010\022\026\n\016guardian_valo" + "r\030( \001(\010\022\030\n\020guardian_virtues\030) \001(\010\022\025\n\rgua" + "rdian_zeal\030* \001(\010\022\024\n\014mesmer_chaos\030+ \001(\010\022\031" + "\n\021mesmer_domination\030, \001(\010\022\026\n\016mesmer_duel" + "ing\030- \001(\010\022\030\n\020mesmer_illusions\030. \001(\010\022\032\n\022m" + "esmer_inspiration\030/ \001(\010\022\037\n\027necromancer_b" + "lood_magic\0300 \001(\010\022\032\n\022necromancer_curses\0301" + " \001(\010\022\037\n\027necromancer_death_magic\0302 \001(\010\022 \n" + "\030necromancer_soul_reaping\0303 \001(\010\022\031\n\021necro" + "mancer_spite\0304 \001(\010\022\033\n\023ranger_beastmaster" + "y\0305 \001(\010\022\033\n\023ranger_marksmanship\0306 \001(\010\022\033\n\023" + "ranger_nature_magic\0307 \001(\010\022\032\n\022ranger_skir" + "mishing\0308 \001(\010\022\"\n\032ranger_wilderness_survi" + "val\0309 \001(\010\022\033\n\023revenant_corruption\030: \001(\010\022\034" + "\n\024revenant_devastation\030; \001(\010\022\033\n\023revenant" + "_invocation\030< \001(\010\022\034\n\024revenant_retributio" + "n\030= \001(\010\022\032\n\022revenant_salvation\030> \001(\010\022\030\n\020t" + "hief_acrobatics\030\? \001(\010\022\036\n\026thief_critical_" + "strikes\030@ \001(\010\022\031\n\021thief_deadly_arts\030A \001(\010" + "\022\031\n\021thief_shadow_arts\030B \001(\010\022\026\n\016thief_tri" + "ckery\030C \001(\010\022\024\n\014warrior_arms\030D \001(\010\022\027\n\017war" + "rior_defense\030E \001(\010\022\032\n\022warrior_discipline" + "\030F \001(\010\022\030\n\020warrior_strength\030G \001(\010\022\027\n\017warr" + "ior_tactics\030H \001(\010\"[\n\rSpeciesFilter\022\r\n\005as" + "ura\030\001 \001(\010\022\r\n\005charr\030\002 \001(\010\022\r\n\005human\030\003 \001(\010\022" + "\014\n\004norn\030\004 \001(\010\022\017\n\007sylvari\030\005 \001(\010\"\037\n\tTrailD" + "ata\022\022\n\ntrail_data\030\001 \001(\t*\?\n\rCullChirality" + "\022\010\n\004none\020\000\022\r\n\tclockwise\020\001\022\025\n\021counter_clo" + "ckwise\020\002*\257\001\n\rResetBehavior\022\022\n\016always_vis" + "ible\020\000\022\016\n\nmap_change\020\001\022\017\n\013daily_reset\020\002\022" + "\t\n\005never\020\003\022\t\n\005timer\020\004\022\r\n\tmap_reset\020\005\022\023\n\017" + "instance_change\020\006\022\035\n\031daily_reset_per_cha" + "racter\020\007\022\020\n\014weekly_reset\020\010b\006proto3" ; static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto_deps[1] = { }; @@ -844,16 +844,16 @@ static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_gen &scc_info_MountFilter_generators_2fproto_5ftemplates_2fnode_2eproto.base, &scc_info_Position_generators_2fproto_5ftemplates_2fnode_2eproto.base, &scc_info_ProfessionFilter_generators_2fproto_5ftemplates_2fnode_2eproto.base, - &scc_info_RICHARDS_generators_2fproto_5ftemplates_2fnode_2eproto.base, &scc_info_SpecializationFilter_generators_2fproto_5ftemplates_2fnode_2eproto.base, &scc_info_SpeciesFilter_generators_2fproto_5ftemplates_2fnode_2eproto.base, &scc_info_Texture_generators_2fproto_5ftemplates_2fnode_2eproto.base, + &scc_info_Trail_generators_2fproto_5ftemplates_2fnode_2eproto.base, &scc_info_TrailData_generators_2fproto_5ftemplates_2fnode_2eproto.base, &scc_info_Trigger_generators_2fproto_5ftemplates_2fnode_2eproto.base, }; static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto_once; const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto = { - false, false, descriptor_table_protodef_generators_2fproto_5ftemplates_2fnode_2eproto, "generators/proto_templates/node.proto", 5837, + false, false, descriptor_table_protodef_generators_2fproto_5ftemplates_2fnode_2eproto, "generators/proto_templates/node.proto", 5834, &descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto_once, descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto_sccs, descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto_deps, 16, 0, schemas, file_default_instances, TableStruct_generators_2fproto_5ftemplates_2fnode_2eproto::offsets, file_level_metadata_generators_2fproto_5ftemplates_2fnode_2eproto, 17, file_level_enum_descriptors_generators_2fproto_5ftemplates_2fnode_2eproto, file_level_service_descriptors_generators_2fproto_5ftemplates_2fnode_2eproto, @@ -2227,96 +2227,96 @@ ::PROTOBUF_NAMESPACE_ID::Metadata Icon::GetMetadata() const { // =================================================================== -void RICHARDS::InitAsDefaultInstance() { - ::_RICHARDS_default_instance_._instance.get_mutable()->category_ = const_cast< ::Category*>( +void Trail::InitAsDefaultInstance() { + ::_Trail_default_instance_._instance.get_mutable()->category_ = const_cast< ::Category*>( ::Category::internal_default_instance()); - ::_RICHARDS_default_instance_._instance.get_mutable()->texture_ = const_cast< ::Texture*>( + ::_Trail_default_instance_._instance.get_mutable()->texture_ = const_cast< ::Texture*>( ::Texture::internal_default_instance()); - ::_RICHARDS_default_instance_._instance.get_mutable()->guid_ = const_cast< ::GUID*>( + ::_Trail_default_instance_._instance.get_mutable()->guid_ = const_cast< ::GUID*>( ::GUID::internal_default_instance()); - ::_RICHARDS_default_instance_._instance.get_mutable()->trail_data_ = const_cast< ::TrailData*>( + ::_Trail_default_instance_._instance.get_mutable()->trail_data_ = const_cast< ::TrailData*>( ::TrailData::internal_default_instance()); - ::_RICHARDS_default_instance_._instance.get_mutable()->color_ = const_cast< ::Color*>( + ::_Trail_default_instance_._instance.get_mutable()->color_ = const_cast< ::Color*>( ::Color::internal_default_instance()); - ::_RICHARDS_default_instance_._instance.get_mutable()->festival_filter_ = const_cast< ::FestivalFilter*>( + ::_Trail_default_instance_._instance.get_mutable()->festival_filter_ = const_cast< ::FestivalFilter*>( ::FestivalFilter::internal_default_instance()); - ::_RICHARDS_default_instance_._instance.get_mutable()->map_type_filter_ = const_cast< ::MapTypeFilter*>( + ::_Trail_default_instance_._instance.get_mutable()->map_type_filter_ = const_cast< ::MapTypeFilter*>( ::MapTypeFilter::internal_default_instance()); - ::_RICHARDS_default_instance_._instance.get_mutable()->mount_filter_ = const_cast< ::MountFilter*>( + ::_Trail_default_instance_._instance.get_mutable()->mount_filter_ = const_cast< ::MountFilter*>( ::MountFilter::internal_default_instance()); - ::_RICHARDS_default_instance_._instance.get_mutable()->profession_filter_ = const_cast< ::ProfessionFilter*>( + ::_Trail_default_instance_._instance.get_mutable()->profession_filter_ = const_cast< ::ProfessionFilter*>( ::ProfessionFilter::internal_default_instance()); - ::_RICHARDS_default_instance_._instance.get_mutable()->specialization_filter_ = const_cast< ::SpecializationFilter*>( + ::_Trail_default_instance_._instance.get_mutable()->specialization_filter_ = const_cast< ::SpecializationFilter*>( ::SpecializationFilter::internal_default_instance()); - ::_RICHARDS_default_instance_._instance.get_mutable()->species_filter_ = const_cast< ::SpeciesFilter*>( + ::_Trail_default_instance_._instance.get_mutable()->species_filter_ = const_cast< ::SpeciesFilter*>( ::SpeciesFilter::internal_default_instance()); } -class RICHARDS::_Internal { +class Trail::_Internal { public: - static const ::Category& category(const RICHARDS* msg); - static const ::Texture& texture(const RICHARDS* msg); - static const ::GUID& guid(const RICHARDS* msg); - static const ::TrailData& trail_data(const RICHARDS* msg); - static const ::Color& color(const RICHARDS* msg); - static const ::FestivalFilter& festival_filter(const RICHARDS* msg); - static const ::MapTypeFilter& map_type_filter(const RICHARDS* msg); - static const ::MountFilter& mount_filter(const RICHARDS* msg); - static const ::ProfessionFilter& profession_filter(const RICHARDS* msg); - static const ::SpecializationFilter& specialization_filter(const RICHARDS* msg); - static const ::SpeciesFilter& species_filter(const RICHARDS* msg); + static const ::Category& category(const Trail* msg); + static const ::Texture& texture(const Trail* msg); + static const ::GUID& guid(const Trail* msg); + static const ::TrailData& trail_data(const Trail* msg); + static const ::Color& color(const Trail* msg); + static const ::FestivalFilter& festival_filter(const Trail* msg); + static const ::MapTypeFilter& map_type_filter(const Trail* msg); + static const ::MountFilter& mount_filter(const Trail* msg); + static const ::ProfessionFilter& profession_filter(const Trail* msg); + static const ::SpecializationFilter& specialization_filter(const Trail* msg); + static const ::SpeciesFilter& species_filter(const Trail* msg); }; const ::Category& -RICHARDS::_Internal::category(const RICHARDS* msg) { +Trail::_Internal::category(const Trail* msg) { return *msg->category_; } const ::Texture& -RICHARDS::_Internal::texture(const RICHARDS* msg) { +Trail::_Internal::texture(const Trail* msg) { return *msg->texture_; } const ::GUID& -RICHARDS::_Internal::guid(const RICHARDS* msg) { +Trail::_Internal::guid(const Trail* msg) { return *msg->guid_; } const ::TrailData& -RICHARDS::_Internal::trail_data(const RICHARDS* msg) { +Trail::_Internal::trail_data(const Trail* msg) { return *msg->trail_data_; } const ::Color& -RICHARDS::_Internal::color(const RICHARDS* msg) { +Trail::_Internal::color(const Trail* msg) { return *msg->color_; } const ::FestivalFilter& -RICHARDS::_Internal::festival_filter(const RICHARDS* msg) { +Trail::_Internal::festival_filter(const Trail* msg) { return *msg->festival_filter_; } const ::MapTypeFilter& -RICHARDS::_Internal::map_type_filter(const RICHARDS* msg) { +Trail::_Internal::map_type_filter(const Trail* msg) { return *msg->map_type_filter_; } const ::MountFilter& -RICHARDS::_Internal::mount_filter(const RICHARDS* msg) { +Trail::_Internal::mount_filter(const Trail* msg) { return *msg->mount_filter_; } const ::ProfessionFilter& -RICHARDS::_Internal::profession_filter(const RICHARDS* msg) { +Trail::_Internal::profession_filter(const Trail* msg) { return *msg->profession_filter_; } const ::SpecializationFilter& -RICHARDS::_Internal::specialization_filter(const RICHARDS* msg) { +Trail::_Internal::specialization_filter(const Trail* msg) { return *msg->specialization_filter_; } const ::SpeciesFilter& -RICHARDS::_Internal::species_filter(const RICHARDS* msg) { +Trail::_Internal::species_filter(const Trail* msg) { return *msg->species_filter_; } -RICHARDS::RICHARDS(::PROTOBUF_NAMESPACE_ID::Arena* arena) +Trail::Trail(::PROTOBUF_NAMESPACE_ID::Arena* arena) : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:RICHARDS) + // @@protoc_insertion_point(arena_constructor:Trail) } -RICHARDS::RICHARDS(const RICHARDS& from) +Trail::Trail(const Trail& from) : ::PROTOBUF_NAMESPACE_ID::Message() { _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); bhdraft__schedule_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); @@ -2382,24 +2382,24 @@ RICHARDS::RICHARDS(const RICHARDS& from) ::memcpy(&map_id_, &from.map_id_, static_cast(reinterpret_cast(&scale_) - reinterpret_cast(&map_id_)) + sizeof(scale_)); - // @@protoc_insertion_point(copy_constructor:RICHARDS) + // @@protoc_insertion_point(copy_constructor:Trail) } -void RICHARDS::SharedCtor() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_RICHARDS_generators_2fproto_5ftemplates_2fnode_2eproto.base); +void Trail::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Trail_generators_2fproto_5ftemplates_2fnode_2eproto.base); bhdraft__schedule_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); ::memset(&category_, 0, static_cast( reinterpret_cast(&scale_) - reinterpret_cast(&category_)) + sizeof(scale_)); } -RICHARDS::~RICHARDS() { - // @@protoc_insertion_point(destructor:RICHARDS) +Trail::~Trail() { + // @@protoc_insertion_point(destructor:Trail) SharedDtor(); _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -void RICHARDS::SharedDtor() { +void Trail::SharedDtor() { GOOGLE_DCHECK(GetArena() == nullptr); bhdraft__schedule_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (this != internal_default_instance()) delete category_; @@ -2415,23 +2415,23 @@ void RICHARDS::SharedDtor() { if (this != internal_default_instance()) delete species_filter_; } -void RICHARDS::ArenaDtor(void* object) { - RICHARDS* _this = reinterpret_cast< RICHARDS* >(object); +void Trail::ArenaDtor(void* object) { + Trail* _this = reinterpret_cast< Trail* >(object); (void)_this; } -void RICHARDS::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +void Trail::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { } -void RICHARDS::SetCachedSize(int size) const { +void Trail::SetCachedSize(int size) const { _cached_size_.Set(size); } -const RICHARDS& RICHARDS::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_RICHARDS_generators_2fproto_5ftemplates_2fnode_2eproto.base); +const Trail& Trail::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Trail_generators_2fproto_5ftemplates_2fnode_2eproto.base); return *internal_default_instance(); } -void RICHARDS::Clear() { -// @@protoc_insertion_point(message_clear_start:RICHARDS) +void Trail::Clear() { +// @@protoc_insertion_point(message_clear_start:Trail) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -2487,7 +2487,7 @@ void RICHARDS::Clear() { _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } -const char* RICHARDS::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +const char* Trail::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; while (!ctx->Done(&ptr)) { @@ -2599,7 +2599,7 @@ const char* RICHARDS::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::i if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 186)) { auto str = _internal_mutable_bhdraft__schedule(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "RICHARDS.bhdraft__schedule")); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "Trail.bhdraft__schedule")); CHK_(ptr); } else goto handle_unusual; continue; @@ -2688,9 +2688,9 @@ const char* RICHARDS::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::i #undef CHK_ } -::PROTOBUF_NAMESPACE_ID::uint8* RICHARDS::_InternalSerialize( +::PROTOBUF_NAMESPACE_ID::uint8* Trail::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:RICHARDS) + // @@protoc_insertion_point(serialize_to_array_start:Trail) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -2792,7 +2792,7 @@ ::PROTOBUF_NAMESPACE_ID::uint8* RICHARDS::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_bhdraft__schedule().data(), static_cast(this->_internal_bhdraft__schedule().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "RICHARDS.bhdraft__schedule"); + "Trail.bhdraft__schedule"); target = stream->WriteStringMaybeAliased( 23, this->_internal_bhdraft__schedule(), target); } @@ -2869,12 +2869,12 @@ ::PROTOBUF_NAMESPACE_ID::uint8* RICHARDS::_InternalSerialize( target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } - // @@protoc_insertion_point(serialize_to_array_end:RICHARDS) + // @@protoc_insertion_point(serialize_to_array_end:Trail) return target; } -size_t RICHARDS::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:RICHARDS) +size_t Trail::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:Trail) size_t total_size = 0; ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; @@ -3039,23 +3039,23 @@ size_t RICHARDS::ByteSizeLong() const { return total_size; } -void RICHARDS::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:RICHARDS) +void Trail::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:Trail) GOOGLE_DCHECK_NE(&from, this); - const RICHARDS* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + const Trail* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:RICHARDS) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:Trail) ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:RICHARDS) + // @@protoc_insertion_point(generalized_merge_from_cast_success:Trail) MergeFrom(*source); } } -void RICHARDS::MergeFrom(const RICHARDS& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:RICHARDS) +void Trail::MergeFrom(const Trail& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:Trail) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; @@ -3135,37 +3135,37 @@ void RICHARDS::MergeFrom(const RICHARDS& from) { } } -void RICHARDS::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:RICHARDS) +void Trail::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:Trail) if (&from == this) return; Clear(); MergeFrom(from); } -void RICHARDS::CopyFrom(const RICHARDS& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:RICHARDS) +void Trail::CopyFrom(const Trail& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:Trail) if (&from == this) return; Clear(); MergeFrom(from); } -bool RICHARDS::IsInitialized() const { +bool Trail::IsInitialized() const { return true; } -void RICHARDS::InternalSwap(RICHARDS* other) { +void Trail::InternalSwap(Trail* other) { using std::swap; _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); bhdraft__schedule_.Swap(&other->bhdraft__schedule_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(RICHARDS, scale_) - + sizeof(RICHARDS::scale_) - - PROTOBUF_FIELD_OFFSET(RICHARDS, category_)>( + PROTOBUF_FIELD_OFFSET(Trail, scale_) + + sizeof(Trail::scale_) + - PROTOBUF_FIELD_OFFSET(Trail, category_)>( reinterpret_cast(&category_), reinterpret_cast(&other->category_)); } -::PROTOBUF_NAMESPACE_ID::Metadata RICHARDS::GetMetadata() const { +::PROTOBUF_NAMESPACE_ID::Metadata Trail::GetMetadata() const { return GetMetadataStatic(); } @@ -8872,8 +8872,8 @@ template<> PROTOBUF_NOINLINE ::Category* Arena::CreateMaybeMessage< ::Category > template<> PROTOBUF_NOINLINE ::Icon* Arena::CreateMaybeMessage< ::Icon >(Arena* arena) { return Arena::CreateMessageInternal< ::Icon >(arena); } -template<> PROTOBUF_NOINLINE ::RICHARDS* Arena::CreateMaybeMessage< ::RICHARDS >(Arena* arena) { - return Arena::CreateMessageInternal< ::RICHARDS >(arena); +template<> PROTOBUF_NOINLINE ::Trail* Arena::CreateMaybeMessage< ::Trail >(Arena* arena) { + return Arena::CreateMessageInternal< ::Trail >(arena); } template<> PROTOBUF_NOINLINE ::Texture* Arena::CreateMaybeMessage< ::Texture >(Arena* arena) { return Arena::CreateMessageInternal< ::Texture >(arena); diff --git a/xml_converter/generators/proto_templates/node.pb.h b/xml_converter/generators/proto_templates/node.pb.h index 84aeeb28..4c218eca 100644 --- a/xml_converter/generators/proto_templates/node.pb.h +++ b/xml_converter/generators/proto_templates/node.pb.h @@ -91,9 +91,6 @@ extern PositionDefaultTypeInternal _Position_default_instance_; class ProfessionFilter; class ProfessionFilterDefaultTypeInternal; extern ProfessionFilterDefaultTypeInternal _ProfessionFilter_default_instance_; -class RICHARDS; -class RICHARDSDefaultTypeInternal; -extern RICHARDSDefaultTypeInternal _RICHARDS_default_instance_; class SpecializationFilter; class SpecializationFilterDefaultTypeInternal; extern SpecializationFilterDefaultTypeInternal _SpecializationFilter_default_instance_; @@ -103,6 +100,9 @@ extern SpeciesFilterDefaultTypeInternal _SpeciesFilter_default_instance_; class Texture; class TextureDefaultTypeInternal; extern TextureDefaultTypeInternal _Texture_default_instance_; +class Trail; +class TrailDefaultTypeInternal; +extern TrailDefaultTypeInternal _Trail_default_instance_; class TrailData; class TrailDataDefaultTypeInternal; extern TrailDataDefaultTypeInternal _TrailData_default_instance_; @@ -121,10 +121,10 @@ template<> ::MapTypeFilter* Arena::CreateMaybeMessage<::MapTypeFilter>(Arena*); template<> ::MountFilter* Arena::CreateMaybeMessage<::MountFilter>(Arena*); template<> ::Position* Arena::CreateMaybeMessage<::Position>(Arena*); template<> ::ProfessionFilter* Arena::CreateMaybeMessage<::ProfessionFilter>(Arena*); -template<> ::RICHARDS* Arena::CreateMaybeMessage<::RICHARDS>(Arena*); template<> ::SpecializationFilter* Arena::CreateMaybeMessage<::SpecializationFilter>(Arena*); template<> ::SpeciesFilter* Arena::CreateMaybeMessage<::SpeciesFilter>(Arena*); template<> ::Texture* Arena::CreateMaybeMessage<::Texture>(Arena*); +template<> ::Trail* Arena::CreateMaybeMessage<::Trail>(Arena*); template<> ::TrailData* Arena::CreateMaybeMessage<::TrailData>(Arena*); template<> ::Trigger* Arena::CreateMaybeMessage<::Trigger>(Arena*); PROTOBUF_NAMESPACE_CLOSE @@ -980,23 +980,23 @@ class Icon PROTOBUF_FINAL : }; // ------------------------------------------------------------------- -class RICHARDS PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:RICHARDS) */ { +class Trail PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Trail) */ { public: - inline RICHARDS() : RICHARDS(nullptr) {}; - virtual ~RICHARDS(); + inline Trail() : Trail(nullptr) {}; + virtual ~Trail(); - RICHARDS(const RICHARDS& from); - RICHARDS(RICHARDS&& from) noexcept - : RICHARDS() { + Trail(const Trail& from); + Trail(Trail&& from) noexcept + : Trail() { *this = ::std::move(from); } - inline RICHARDS& operator=(const RICHARDS& from) { + inline Trail& operator=(const Trail& from) { CopyFrom(from); return *this; } - inline RICHARDS& operator=(RICHARDS&& from) noexcept { + inline Trail& operator=(Trail&& from) noexcept { if (GetArena() == from.GetArena()) { if (this != &from) InternalSwap(&from); } else { @@ -1014,20 +1014,20 @@ class RICHARDS PROTOBUF_FINAL : static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { return GetMetadataStatic().reflection; } - static const RICHARDS& default_instance(); + static const Trail& default_instance(); static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const RICHARDS* internal_default_instance() { - return reinterpret_cast( - &_RICHARDS_default_instance_); + static inline const Trail* internal_default_instance() { + return reinterpret_cast( + &_Trail_default_instance_); } static constexpr int kIndexInFileMessages = 3; - friend void swap(RICHARDS& a, RICHARDS& b) { + friend void swap(Trail& a, Trail& b) { a.Swap(&b); } - inline void Swap(RICHARDS* other) { + inline void Swap(Trail* other) { if (other == this) return; if (GetArena() == other->GetArena()) { InternalSwap(other); @@ -1035,7 +1035,7 @@ class RICHARDS PROTOBUF_FINAL : ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(RICHARDS* other) { + void UnsafeArenaSwap(Trail* other) { if (other == this) return; GOOGLE_DCHECK(GetArena() == other->GetArena()); InternalSwap(other); @@ -1043,17 +1043,17 @@ class RICHARDS PROTOBUF_FINAL : // implements Message ---------------------------------------------- - inline RICHARDS* New() const final { - return CreateMaybeMessage(nullptr); + inline Trail* New() const final { + return CreateMaybeMessage(nullptr); } - RICHARDS* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); + Trail* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); } void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const RICHARDS& from); - void MergeFrom(const RICHARDS& from); + void CopyFrom(const Trail& from); + void MergeFrom(const Trail& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; @@ -1067,13 +1067,13 @@ class RICHARDS PROTOBUF_FINAL : inline void SharedCtor(); inline void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(RICHARDS* other); + void InternalSwap(Trail* other); friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "RICHARDS"; + return "Trail"; } protected: - explicit RICHARDS(::PROTOBUF_NAMESPACE_ID::Arena* arena); + explicit Trail(::PROTOBUF_NAMESPACE_ID::Arena* arena); private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); @@ -1449,7 +1449,7 @@ class RICHARDS PROTOBUF_FINAL : void _internal_set_scale(float value); public: - // @@protoc_insertion_point(class_scope:RICHARDS) + // @@protoc_insertion_point(class_scope:Trail) private: class _Internal; @@ -6244,31 +6244,31 @@ inline void Icon::set_bhdraft__schedule_duration(float value) { // ------------------------------------------------------------------- -// RICHARDS +// Trail // .Category category = 1; -inline bool RICHARDS::_internal_has_category() const { +inline bool Trail::_internal_has_category() const { return this != internal_default_instance() && category_ != nullptr; } -inline bool RICHARDS::has_category() const { +inline bool Trail::has_category() const { return _internal_has_category(); } -inline void RICHARDS::clear_category() { +inline void Trail::clear_category() { if (GetArena() == nullptr && category_ != nullptr) { delete category_; } category_ = nullptr; } -inline const ::Category& RICHARDS::_internal_category() const { +inline const ::Category& Trail::_internal_category() const { const ::Category* p = category_; return p != nullptr ? *p : *reinterpret_cast( &::_Category_default_instance_); } -inline const ::Category& RICHARDS::category() const { - // @@protoc_insertion_point(field_get:RICHARDS.category) +inline const ::Category& Trail::category() const { + // @@protoc_insertion_point(field_get:Trail.category) return _internal_category(); } -inline void RICHARDS::unsafe_arena_set_allocated_category( +inline void Trail::unsafe_arena_set_allocated_category( ::Category* category) { if (GetArena() == nullptr) { delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(category_); @@ -6279,23 +6279,23 @@ inline void RICHARDS::unsafe_arena_set_allocated_category( } else { } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:RICHARDS.category) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Trail.category) } -inline ::Category* RICHARDS::release_category() { +inline ::Category* Trail::release_category() { auto temp = unsafe_arena_release_category(); if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } return temp; } -inline ::Category* RICHARDS::unsafe_arena_release_category() { - // @@protoc_insertion_point(field_release:RICHARDS.category) +inline ::Category* Trail::unsafe_arena_release_category() { + // @@protoc_insertion_point(field_release:Trail.category) ::Category* temp = category_; category_ = nullptr; return temp; } -inline ::Category* RICHARDS::_internal_mutable_category() { +inline ::Category* Trail::_internal_mutable_category() { if (category_ == nullptr) { auto* p = CreateMaybeMessage<::Category>(GetArena()); @@ -6303,11 +6303,11 @@ inline ::Category* RICHARDS::_internal_mutable_category() { } return category_; } -inline ::Category* RICHARDS::mutable_category() { - // @@protoc_insertion_point(field_mutable:RICHARDS.category) +inline ::Category* Trail::mutable_category() { + // @@protoc_insertion_point(field_mutable:Trail.category) return _internal_mutable_category(); } -inline void RICHARDS::set_allocated_category(::Category* category) { +inline void Trail::set_allocated_category(::Category* category) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); if (message_arena == nullptr) { delete category_; @@ -6324,32 +6324,32 @@ inline void RICHARDS::set_allocated_category(::Category* category) { } category_ = category; - // @@protoc_insertion_point(field_set_allocated:RICHARDS.category) + // @@protoc_insertion_point(field_set_allocated:Trail.category) } // .Texture texture = 2; -inline bool RICHARDS::_internal_has_texture() const { +inline bool Trail::_internal_has_texture() const { return this != internal_default_instance() && texture_ != nullptr; } -inline bool RICHARDS::has_texture() const { +inline bool Trail::has_texture() const { return _internal_has_texture(); } -inline void RICHARDS::clear_texture() { +inline void Trail::clear_texture() { if (GetArena() == nullptr && texture_ != nullptr) { delete texture_; } texture_ = nullptr; } -inline const ::Texture& RICHARDS::_internal_texture() const { +inline const ::Texture& Trail::_internal_texture() const { const ::Texture* p = texture_; return p != nullptr ? *p : *reinterpret_cast( &::_Texture_default_instance_); } -inline const ::Texture& RICHARDS::texture() const { - // @@protoc_insertion_point(field_get:RICHARDS.texture) +inline const ::Texture& Trail::texture() const { + // @@protoc_insertion_point(field_get:Trail.texture) return _internal_texture(); } -inline void RICHARDS::unsafe_arena_set_allocated_texture( +inline void Trail::unsafe_arena_set_allocated_texture( ::Texture* texture) { if (GetArena() == nullptr) { delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(texture_); @@ -6360,23 +6360,23 @@ inline void RICHARDS::unsafe_arena_set_allocated_texture( } else { } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:RICHARDS.texture) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Trail.texture) } -inline ::Texture* RICHARDS::release_texture() { +inline ::Texture* Trail::release_texture() { auto temp = unsafe_arena_release_texture(); if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } return temp; } -inline ::Texture* RICHARDS::unsafe_arena_release_texture() { - // @@protoc_insertion_point(field_release:RICHARDS.texture) +inline ::Texture* Trail::unsafe_arena_release_texture() { + // @@protoc_insertion_point(field_release:Trail.texture) ::Texture* temp = texture_; texture_ = nullptr; return temp; } -inline ::Texture* RICHARDS::_internal_mutable_texture() { +inline ::Texture* Trail::_internal_mutable_texture() { if (texture_ == nullptr) { auto* p = CreateMaybeMessage<::Texture>(GetArena()); @@ -6384,11 +6384,11 @@ inline ::Texture* RICHARDS::_internal_mutable_texture() { } return texture_; } -inline ::Texture* RICHARDS::mutable_texture() { - // @@protoc_insertion_point(field_mutable:RICHARDS.texture) +inline ::Texture* Trail::mutable_texture() { + // @@protoc_insertion_point(field_mutable:Trail.texture) return _internal_mutable_texture(); } -inline void RICHARDS::set_allocated_texture(::Texture* texture) { +inline void Trail::set_allocated_texture(::Texture* texture) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); if (message_arena == nullptr) { delete texture_; @@ -6405,32 +6405,32 @@ inline void RICHARDS::set_allocated_texture(::Texture* texture) { } texture_ = texture; - // @@protoc_insertion_point(field_set_allocated:RICHARDS.texture) + // @@protoc_insertion_point(field_set_allocated:Trail.texture) } // .GUID guid = 3; -inline bool RICHARDS::_internal_has_guid() const { +inline bool Trail::_internal_has_guid() const { return this != internal_default_instance() && guid_ != nullptr; } -inline bool RICHARDS::has_guid() const { +inline bool Trail::has_guid() const { return _internal_has_guid(); } -inline void RICHARDS::clear_guid() { +inline void Trail::clear_guid() { if (GetArena() == nullptr && guid_ != nullptr) { delete guid_; } guid_ = nullptr; } -inline const ::GUID& RICHARDS::_internal_guid() const { +inline const ::GUID& Trail::_internal_guid() const { const ::GUID* p = guid_; return p != nullptr ? *p : *reinterpret_cast( &::_GUID_default_instance_); } -inline const ::GUID& RICHARDS::guid() const { - // @@protoc_insertion_point(field_get:RICHARDS.guid) +inline const ::GUID& Trail::guid() const { + // @@protoc_insertion_point(field_get:Trail.guid) return _internal_guid(); } -inline void RICHARDS::unsafe_arena_set_allocated_guid( +inline void Trail::unsafe_arena_set_allocated_guid( ::GUID* guid) { if (GetArena() == nullptr) { delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(guid_); @@ -6441,23 +6441,23 @@ inline void RICHARDS::unsafe_arena_set_allocated_guid( } else { } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:RICHARDS.guid) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Trail.guid) } -inline ::GUID* RICHARDS::release_guid() { +inline ::GUID* Trail::release_guid() { auto temp = unsafe_arena_release_guid(); if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } return temp; } -inline ::GUID* RICHARDS::unsafe_arena_release_guid() { - // @@protoc_insertion_point(field_release:RICHARDS.guid) +inline ::GUID* Trail::unsafe_arena_release_guid() { + // @@protoc_insertion_point(field_release:Trail.guid) ::GUID* temp = guid_; guid_ = nullptr; return temp; } -inline ::GUID* RICHARDS::_internal_mutable_guid() { +inline ::GUID* Trail::_internal_mutable_guid() { if (guid_ == nullptr) { auto* p = CreateMaybeMessage<::GUID>(GetArena()); @@ -6465,11 +6465,11 @@ inline ::GUID* RICHARDS::_internal_mutable_guid() { } return guid_; } -inline ::GUID* RICHARDS::mutable_guid() { - // @@protoc_insertion_point(field_mutable:RICHARDS.guid) +inline ::GUID* Trail::mutable_guid() { + // @@protoc_insertion_point(field_mutable:Trail.guid) return _internal_mutable_guid(); } -inline void RICHARDS::set_allocated_guid(::GUID* guid) { +inline void Trail::set_allocated_guid(::GUID* guid) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); if (message_arena == nullptr) { delete guid_; @@ -6486,92 +6486,92 @@ inline void RICHARDS::set_allocated_guid(::GUID* guid) { } guid_ = guid; - // @@protoc_insertion_point(field_set_allocated:RICHARDS.guid) + // @@protoc_insertion_point(field_set_allocated:Trail.guid) } // int32 map_id = 4; -inline void RICHARDS::clear_map_id() { +inline void Trail::clear_map_id() { map_id_ = 0; } -inline ::PROTOBUF_NAMESPACE_ID::int32 RICHARDS::_internal_map_id() const { +inline ::PROTOBUF_NAMESPACE_ID::int32 Trail::_internal_map_id() const { return map_id_; } -inline ::PROTOBUF_NAMESPACE_ID::int32 RICHARDS::map_id() const { - // @@protoc_insertion_point(field_get:RICHARDS.map_id) +inline ::PROTOBUF_NAMESPACE_ID::int32 Trail::map_id() const { + // @@protoc_insertion_point(field_get:Trail.map_id) return _internal_map_id(); } -inline void RICHARDS::_internal_set_map_id(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline void Trail::_internal_set_map_id(::PROTOBUF_NAMESPACE_ID::int32 value) { map_id_ = value; } -inline void RICHARDS::set_map_id(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline void Trail::set_map_id(::PROTOBUF_NAMESPACE_ID::int32 value) { _internal_set_map_id(value); - // @@protoc_insertion_point(field_set:RICHARDS.map_id) + // @@protoc_insertion_point(field_set:Trail.map_id) } // float distance_fade_end = 5; -inline void RICHARDS::clear_distance_fade_end() { +inline void Trail::clear_distance_fade_end() { distance_fade_end_ = 0; } -inline float RICHARDS::_internal_distance_fade_end() const { +inline float Trail::_internal_distance_fade_end() const { return distance_fade_end_; } -inline float RICHARDS::distance_fade_end() const { - // @@protoc_insertion_point(field_get:RICHARDS.distance_fade_end) +inline float Trail::distance_fade_end() const { + // @@protoc_insertion_point(field_get:Trail.distance_fade_end) return _internal_distance_fade_end(); } -inline void RICHARDS::_internal_set_distance_fade_end(float value) { +inline void Trail::_internal_set_distance_fade_end(float value) { distance_fade_end_ = value; } -inline void RICHARDS::set_distance_fade_end(float value) { +inline void Trail::set_distance_fade_end(float value) { _internal_set_distance_fade_end(value); - // @@protoc_insertion_point(field_set:RICHARDS.distance_fade_end) + // @@protoc_insertion_point(field_set:Trail.distance_fade_end) } // float distance_fade_start = 6; -inline void RICHARDS::clear_distance_fade_start() { +inline void Trail::clear_distance_fade_start() { distance_fade_start_ = 0; } -inline float RICHARDS::_internal_distance_fade_start() const { +inline float Trail::_internal_distance_fade_start() const { return distance_fade_start_; } -inline float RICHARDS::distance_fade_start() const { - // @@protoc_insertion_point(field_get:RICHARDS.distance_fade_start) +inline float Trail::distance_fade_start() const { + // @@protoc_insertion_point(field_get:Trail.distance_fade_start) return _internal_distance_fade_start(); } -inline void RICHARDS::_internal_set_distance_fade_start(float value) { +inline void Trail::_internal_set_distance_fade_start(float value) { distance_fade_start_ = value; } -inline void RICHARDS::set_distance_fade_start(float value) { +inline void Trail::set_distance_fade_start(float value) { _internal_set_distance_fade_start(value); - // @@protoc_insertion_point(field_set:RICHARDS.distance_fade_start) + // @@protoc_insertion_point(field_set:Trail.distance_fade_start) } // .TrailData trail_data = 7; -inline bool RICHARDS::_internal_has_trail_data() const { +inline bool Trail::_internal_has_trail_data() const { return this != internal_default_instance() && trail_data_ != nullptr; } -inline bool RICHARDS::has_trail_data() const { +inline bool Trail::has_trail_data() const { return _internal_has_trail_data(); } -inline void RICHARDS::clear_trail_data() { +inline void Trail::clear_trail_data() { if (GetArena() == nullptr && trail_data_ != nullptr) { delete trail_data_; } trail_data_ = nullptr; } -inline const ::TrailData& RICHARDS::_internal_trail_data() const { +inline const ::TrailData& Trail::_internal_trail_data() const { const ::TrailData* p = trail_data_; return p != nullptr ? *p : *reinterpret_cast( &::_TrailData_default_instance_); } -inline const ::TrailData& RICHARDS::trail_data() const { - // @@protoc_insertion_point(field_get:RICHARDS.trail_data) +inline const ::TrailData& Trail::trail_data() const { + // @@protoc_insertion_point(field_get:Trail.trail_data) return _internal_trail_data(); } -inline void RICHARDS::unsafe_arena_set_allocated_trail_data( +inline void Trail::unsafe_arena_set_allocated_trail_data( ::TrailData* trail_data) { if (GetArena() == nullptr) { delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(trail_data_); @@ -6582,23 +6582,23 @@ inline void RICHARDS::unsafe_arena_set_allocated_trail_data( } else { } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:RICHARDS.trail_data) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Trail.trail_data) } -inline ::TrailData* RICHARDS::release_trail_data() { +inline ::TrailData* Trail::release_trail_data() { auto temp = unsafe_arena_release_trail_data(); if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } return temp; } -inline ::TrailData* RICHARDS::unsafe_arena_release_trail_data() { - // @@protoc_insertion_point(field_release:RICHARDS.trail_data) +inline ::TrailData* Trail::unsafe_arena_release_trail_data() { + // @@protoc_insertion_point(field_release:Trail.trail_data) ::TrailData* temp = trail_data_; trail_data_ = nullptr; return temp; } -inline ::TrailData* RICHARDS::_internal_mutable_trail_data() { +inline ::TrailData* Trail::_internal_mutable_trail_data() { if (trail_data_ == nullptr) { auto* p = CreateMaybeMessage<::TrailData>(GetArena()); @@ -6606,11 +6606,11 @@ inline ::TrailData* RICHARDS::_internal_mutable_trail_data() { } return trail_data_; } -inline ::TrailData* RICHARDS::mutable_trail_data() { - // @@protoc_insertion_point(field_mutable:RICHARDS.trail_data) +inline ::TrailData* Trail::mutable_trail_data() { + // @@protoc_insertion_point(field_mutable:Trail.trail_data) return _internal_mutable_trail_data(); } -inline void RICHARDS::set_allocated_trail_data(::TrailData* trail_data) { +inline void Trail::set_allocated_trail_data(::TrailData* trail_data) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); if (message_arena == nullptr) { delete trail_data_; @@ -6627,201 +6627,201 @@ inline void RICHARDS::set_allocated_trail_data(::TrailData* trail_data) { } trail_data_ = trail_data; - // @@protoc_insertion_point(field_set_allocated:RICHARDS.trail_data) + // @@protoc_insertion_point(field_set_allocated:Trail.trail_data) } // float animation_speed = 8; -inline void RICHARDS::clear_animation_speed() { +inline void Trail::clear_animation_speed() { animation_speed_ = 0; } -inline float RICHARDS::_internal_animation_speed() const { +inline float Trail::_internal_animation_speed() const { return animation_speed_; } -inline float RICHARDS::animation_speed() const { - // @@protoc_insertion_point(field_get:RICHARDS.animation_speed) +inline float Trail::animation_speed() const { + // @@protoc_insertion_point(field_get:Trail.animation_speed) return _internal_animation_speed(); } -inline void RICHARDS::_internal_set_animation_speed(float value) { +inline void Trail::_internal_set_animation_speed(float value) { animation_speed_ = value; } -inline void RICHARDS::set_animation_speed(float value) { +inline void Trail::set_animation_speed(float value) { _internal_set_animation_speed(value); - // @@protoc_insertion_point(field_set:RICHARDS.animation_speed) + // @@protoc_insertion_point(field_set:Trail.animation_speed) } // .CullChirality cull_chirality = 9; -inline void RICHARDS::clear_cull_chirality() { +inline void Trail::clear_cull_chirality() { cull_chirality_ = 0; } -inline ::CullChirality RICHARDS::_internal_cull_chirality() const { +inline ::CullChirality Trail::_internal_cull_chirality() const { return static_cast< ::CullChirality >(cull_chirality_); } -inline ::CullChirality RICHARDS::cull_chirality() const { - // @@protoc_insertion_point(field_get:RICHARDS.cull_chirality) +inline ::CullChirality Trail::cull_chirality() const { + // @@protoc_insertion_point(field_get:Trail.cull_chirality) return _internal_cull_chirality(); } -inline void RICHARDS::_internal_set_cull_chirality(::CullChirality value) { +inline void Trail::_internal_set_cull_chirality(::CullChirality value) { cull_chirality_ = value; } -inline void RICHARDS::set_cull_chirality(::CullChirality value) { +inline void Trail::set_cull_chirality(::CullChirality value) { _internal_set_cull_chirality(value); - // @@protoc_insertion_point(field_set:RICHARDS.cull_chirality) + // @@protoc_insertion_point(field_set:Trail.cull_chirality) } // fixed32 achievement_bit = 16; -inline void RICHARDS::clear_achievement_bit() { +inline void Trail::clear_achievement_bit() { achievement_bit_ = 0u; } -inline ::PROTOBUF_NAMESPACE_ID::uint32 RICHARDS::_internal_achievement_bit() const { +inline ::PROTOBUF_NAMESPACE_ID::uint32 Trail::_internal_achievement_bit() const { return achievement_bit_; } -inline ::PROTOBUF_NAMESPACE_ID::uint32 RICHARDS::achievement_bit() const { - // @@protoc_insertion_point(field_get:RICHARDS.achievement_bit) +inline ::PROTOBUF_NAMESPACE_ID::uint32 Trail::achievement_bit() const { + // @@protoc_insertion_point(field_get:Trail.achievement_bit) return _internal_achievement_bit(); } -inline void RICHARDS::_internal_set_achievement_bit(::PROTOBUF_NAMESPACE_ID::uint32 value) { +inline void Trail::_internal_set_achievement_bit(::PROTOBUF_NAMESPACE_ID::uint32 value) { achievement_bit_ = value; } -inline void RICHARDS::set_achievement_bit(::PROTOBUF_NAMESPACE_ID::uint32 value) { +inline void Trail::set_achievement_bit(::PROTOBUF_NAMESPACE_ID::uint32 value) { _internal_set_achievement_bit(value); - // @@protoc_insertion_point(field_set:RICHARDS.achievement_bit) + // @@protoc_insertion_point(field_set:Trail.achievement_bit) } // int32 achievement_id = 17; -inline void RICHARDS::clear_achievement_id() { +inline void Trail::clear_achievement_id() { achievement_id_ = 0; } -inline ::PROTOBUF_NAMESPACE_ID::int32 RICHARDS::_internal_achievement_id() const { +inline ::PROTOBUF_NAMESPACE_ID::int32 Trail::_internal_achievement_id() const { return achievement_id_; } -inline ::PROTOBUF_NAMESPACE_ID::int32 RICHARDS::achievement_id() const { - // @@protoc_insertion_point(field_get:RICHARDS.achievement_id) +inline ::PROTOBUF_NAMESPACE_ID::int32 Trail::achievement_id() const { + // @@protoc_insertion_point(field_get:Trail.achievement_id) return _internal_achievement_id(); } -inline void RICHARDS::_internal_set_achievement_id(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline void Trail::_internal_set_achievement_id(::PROTOBUF_NAMESPACE_ID::int32 value) { achievement_id_ = value; } -inline void RICHARDS::set_achievement_id(::PROTOBUF_NAMESPACE_ID::int32 value) { +inline void Trail::set_achievement_id(::PROTOBUF_NAMESPACE_ID::int32 value) { _internal_set_achievement_id(value); - // @@protoc_insertion_point(field_set:RICHARDS.achievement_id) + // @@protoc_insertion_point(field_set:Trail.achievement_id) } // float alpha = 18; -inline void RICHARDS::clear_alpha() { +inline void Trail::clear_alpha() { alpha_ = 0; } -inline float RICHARDS::_internal_alpha() const { +inline float Trail::_internal_alpha() const { return alpha_; } -inline float RICHARDS::alpha() const { - // @@protoc_insertion_point(field_get:RICHARDS.alpha) +inline float Trail::alpha() const { + // @@protoc_insertion_point(field_get:Trail.alpha) return _internal_alpha(); } -inline void RICHARDS::_internal_set_alpha(float value) { +inline void Trail::_internal_set_alpha(float value) { alpha_ = value; } -inline void RICHARDS::set_alpha(float value) { +inline void Trail::set_alpha(float value) { _internal_set_alpha(value); - // @@protoc_insertion_point(field_set:RICHARDS.alpha) + // @@protoc_insertion_point(field_set:Trail.alpha) } // bool can_fade = 19; -inline void RICHARDS::clear_can_fade() { +inline void Trail::clear_can_fade() { can_fade_ = false; } -inline bool RICHARDS::_internal_can_fade() const { +inline bool Trail::_internal_can_fade() const { return can_fade_; } -inline bool RICHARDS::can_fade() const { - // @@protoc_insertion_point(field_get:RICHARDS.can_fade) +inline bool Trail::can_fade() const { + // @@protoc_insertion_point(field_get:Trail.can_fade) return _internal_can_fade(); } -inline void RICHARDS::_internal_set_can_fade(bool value) { +inline void Trail::_internal_set_can_fade(bool value) { can_fade_ = value; } -inline void RICHARDS::set_can_fade(bool value) { +inline void Trail::set_can_fade(bool value) { _internal_set_can_fade(value); - // @@protoc_insertion_point(field_set:RICHARDS.can_fade) + // @@protoc_insertion_point(field_set:Trail.can_fade) } // bool is_wall = 22; -inline void RICHARDS::clear_is_wall() { +inline void Trail::clear_is_wall() { is_wall_ = false; } -inline bool RICHARDS::_internal_is_wall() const { +inline bool Trail::_internal_is_wall() const { return is_wall_; } -inline bool RICHARDS::is_wall() const { - // @@protoc_insertion_point(field_get:RICHARDS.is_wall) +inline bool Trail::is_wall() const { + // @@protoc_insertion_point(field_get:Trail.is_wall) return _internal_is_wall(); } -inline void RICHARDS::_internal_set_is_wall(bool value) { +inline void Trail::_internal_set_is_wall(bool value) { is_wall_ = value; } -inline void RICHARDS::set_is_wall(bool value) { +inline void Trail::set_is_wall(bool value) { _internal_set_is_wall(value); - // @@protoc_insertion_point(field_set:RICHARDS.is_wall) + // @@protoc_insertion_point(field_set:Trail.is_wall) } // string bhdraft__schedule = 23; -inline void RICHARDS::clear_bhdraft__schedule() { +inline void Trail::clear_bhdraft__schedule() { bhdraft__schedule_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } -inline const std::string& RICHARDS::bhdraft__schedule() const { - // @@protoc_insertion_point(field_get:RICHARDS.bhdraft__schedule) +inline const std::string& Trail::bhdraft__schedule() const { + // @@protoc_insertion_point(field_get:Trail.bhdraft__schedule) return _internal_bhdraft__schedule(); } -inline void RICHARDS::set_bhdraft__schedule(const std::string& value) { +inline void Trail::set_bhdraft__schedule(const std::string& value) { _internal_set_bhdraft__schedule(value); - // @@protoc_insertion_point(field_set:RICHARDS.bhdraft__schedule) + // @@protoc_insertion_point(field_set:Trail.bhdraft__schedule) } -inline std::string* RICHARDS::mutable_bhdraft__schedule() { - // @@protoc_insertion_point(field_mutable:RICHARDS.bhdraft__schedule) +inline std::string* Trail::mutable_bhdraft__schedule() { + // @@protoc_insertion_point(field_mutable:Trail.bhdraft__schedule) return _internal_mutable_bhdraft__schedule(); } -inline const std::string& RICHARDS::_internal_bhdraft__schedule() const { +inline const std::string& Trail::_internal_bhdraft__schedule() const { return bhdraft__schedule_.Get(); } -inline void RICHARDS::_internal_set_bhdraft__schedule(const std::string& value) { +inline void Trail::_internal_set_bhdraft__schedule(const std::string& value) { bhdraft__schedule_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); } -inline void RICHARDS::set_bhdraft__schedule(std::string&& value) { +inline void Trail::set_bhdraft__schedule(std::string&& value) { bhdraft__schedule_.Set( &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:RICHARDS.bhdraft__schedule) + // @@protoc_insertion_point(field_set_rvalue:Trail.bhdraft__schedule) } -inline void RICHARDS::set_bhdraft__schedule(const char* value) { +inline void Trail::set_bhdraft__schedule(const char* value) { GOOGLE_DCHECK(value != nullptr); bhdraft__schedule_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:RICHARDS.bhdraft__schedule) + // @@protoc_insertion_point(field_set_char:Trail.bhdraft__schedule) } -inline void RICHARDS::set_bhdraft__schedule(const char* value, +inline void Trail::set_bhdraft__schedule(const char* value, size_t size) { bhdraft__schedule_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:RICHARDS.bhdraft__schedule) + // @@protoc_insertion_point(field_set_pointer:Trail.bhdraft__schedule) } -inline std::string* RICHARDS::_internal_mutable_bhdraft__schedule() { +inline std::string* Trail::_internal_mutable_bhdraft__schedule() { return bhdraft__schedule_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } -inline std::string* RICHARDS::release_bhdraft__schedule() { - // @@protoc_insertion_point(field_release:RICHARDS.bhdraft__schedule) +inline std::string* Trail::release_bhdraft__schedule() { + // @@protoc_insertion_point(field_release:Trail.bhdraft__schedule) return bhdraft__schedule_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } -inline void RICHARDS::set_allocated_bhdraft__schedule(std::string* bhdraft__schedule) { +inline void Trail::set_allocated_bhdraft__schedule(std::string* bhdraft__schedule) { if (bhdraft__schedule != nullptr) { } else { @@ -6829,16 +6829,16 @@ inline void RICHARDS::set_allocated_bhdraft__schedule(std::string* bhdraft__sche } bhdraft__schedule_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), bhdraft__schedule, GetArena()); - // @@protoc_insertion_point(field_set_allocated:RICHARDS.bhdraft__schedule) + // @@protoc_insertion_point(field_set_allocated:Trail.bhdraft__schedule) } -inline std::string* RICHARDS::unsafe_arena_release_bhdraft__schedule() { - // @@protoc_insertion_point(field_unsafe_arena_release:RICHARDS.bhdraft__schedule) +inline std::string* Trail::unsafe_arena_release_bhdraft__schedule() { + // @@protoc_insertion_point(field_unsafe_arena_release:Trail.bhdraft__schedule) GOOGLE_DCHECK(GetArena() != nullptr); return bhdraft__schedule_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } -inline void RICHARDS::unsafe_arena_set_allocated_bhdraft__schedule( +inline void Trail::unsafe_arena_set_allocated_bhdraft__schedule( std::string* bhdraft__schedule) { GOOGLE_DCHECK(GetArena() != nullptr); if (bhdraft__schedule != nullptr) { @@ -6848,72 +6848,72 @@ inline void RICHARDS::unsafe_arena_set_allocated_bhdraft__schedule( } bhdraft__schedule_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), bhdraft__schedule, GetArena()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:RICHARDS.bhdraft__schedule) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Trail.bhdraft__schedule) } // float bhdraft__schedule_duration = 24; -inline void RICHARDS::clear_bhdraft__schedule_duration() { +inline void Trail::clear_bhdraft__schedule_duration() { bhdraft__schedule_duration_ = 0; } -inline float RICHARDS::_internal_bhdraft__schedule_duration() const { +inline float Trail::_internal_bhdraft__schedule_duration() const { return bhdraft__schedule_duration_; } -inline float RICHARDS::bhdraft__schedule_duration() const { - // @@protoc_insertion_point(field_get:RICHARDS.bhdraft__schedule_duration) +inline float Trail::bhdraft__schedule_duration() const { + // @@protoc_insertion_point(field_get:Trail.bhdraft__schedule_duration) return _internal_bhdraft__schedule_duration(); } -inline void RICHARDS::_internal_set_bhdraft__schedule_duration(float value) { +inline void Trail::_internal_set_bhdraft__schedule_duration(float value) { bhdraft__schedule_duration_ = value; } -inline void RICHARDS::set_bhdraft__schedule_duration(float value) { +inline void Trail::set_bhdraft__schedule_duration(float value) { _internal_set_bhdraft__schedule_duration(value); - // @@protoc_insertion_point(field_set:RICHARDS.bhdraft__schedule_duration) + // @@protoc_insertion_point(field_set:Trail.bhdraft__schedule_duration) } // float scale = 25; -inline void RICHARDS::clear_scale() { +inline void Trail::clear_scale() { scale_ = 0; } -inline float RICHARDS::_internal_scale() const { +inline float Trail::_internal_scale() const { return scale_; } -inline float RICHARDS::scale() const { - // @@protoc_insertion_point(field_get:RICHARDS.scale) +inline float Trail::scale() const { + // @@protoc_insertion_point(field_get:Trail.scale) return _internal_scale(); } -inline void RICHARDS::_internal_set_scale(float value) { +inline void Trail::_internal_set_scale(float value) { scale_ = value; } -inline void RICHARDS::set_scale(float value) { +inline void Trail::set_scale(float value) { _internal_set_scale(value); - // @@protoc_insertion_point(field_set:RICHARDS.scale) + // @@protoc_insertion_point(field_set:Trail.scale) } // .Color color = 26; -inline bool RICHARDS::_internal_has_color() const { +inline bool Trail::_internal_has_color() const { return this != internal_default_instance() && color_ != nullptr; } -inline bool RICHARDS::has_color() const { +inline bool Trail::has_color() const { return _internal_has_color(); } -inline void RICHARDS::clear_color() { +inline void Trail::clear_color() { if (GetArena() == nullptr && color_ != nullptr) { delete color_; } color_ = nullptr; } -inline const ::Color& RICHARDS::_internal_color() const { +inline const ::Color& Trail::_internal_color() const { const ::Color* p = color_; return p != nullptr ? *p : *reinterpret_cast( &::_Color_default_instance_); } -inline const ::Color& RICHARDS::color() const { - // @@protoc_insertion_point(field_get:RICHARDS.color) +inline const ::Color& Trail::color() const { + // @@protoc_insertion_point(field_get:Trail.color) return _internal_color(); } -inline void RICHARDS::unsafe_arena_set_allocated_color( +inline void Trail::unsafe_arena_set_allocated_color( ::Color* color) { if (GetArena() == nullptr) { delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(color_); @@ -6924,23 +6924,23 @@ inline void RICHARDS::unsafe_arena_set_allocated_color( } else { } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:RICHARDS.color) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Trail.color) } -inline ::Color* RICHARDS::release_color() { +inline ::Color* Trail::release_color() { auto temp = unsafe_arena_release_color(); if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } return temp; } -inline ::Color* RICHARDS::unsafe_arena_release_color() { - // @@protoc_insertion_point(field_release:RICHARDS.color) +inline ::Color* Trail::unsafe_arena_release_color() { + // @@protoc_insertion_point(field_release:Trail.color) ::Color* temp = color_; color_ = nullptr; return temp; } -inline ::Color* RICHARDS::_internal_mutable_color() { +inline ::Color* Trail::_internal_mutable_color() { if (color_ == nullptr) { auto* p = CreateMaybeMessage<::Color>(GetArena()); @@ -6948,11 +6948,11 @@ inline ::Color* RICHARDS::_internal_mutable_color() { } return color_; } -inline ::Color* RICHARDS::mutable_color() { - // @@protoc_insertion_point(field_mutable:RICHARDS.color) +inline ::Color* Trail::mutable_color() { + // @@protoc_insertion_point(field_mutable:Trail.color) return _internal_mutable_color(); } -inline void RICHARDS::set_allocated_color(::Color* color) { +inline void Trail::set_allocated_color(::Color* color) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); if (message_arena == nullptr) { delete color_; @@ -6969,32 +6969,32 @@ inline void RICHARDS::set_allocated_color(::Color* color) { } color_ = color; - // @@protoc_insertion_point(field_set_allocated:RICHARDS.color) + // @@protoc_insertion_point(field_set_allocated:Trail.color) } // .FestivalFilter festival_filter = 27; -inline bool RICHARDS::_internal_has_festival_filter() const { +inline bool Trail::_internal_has_festival_filter() const { return this != internal_default_instance() && festival_filter_ != nullptr; } -inline bool RICHARDS::has_festival_filter() const { +inline bool Trail::has_festival_filter() const { return _internal_has_festival_filter(); } -inline void RICHARDS::clear_festival_filter() { +inline void Trail::clear_festival_filter() { if (GetArena() == nullptr && festival_filter_ != nullptr) { delete festival_filter_; } festival_filter_ = nullptr; } -inline const ::FestivalFilter& RICHARDS::_internal_festival_filter() const { +inline const ::FestivalFilter& Trail::_internal_festival_filter() const { const ::FestivalFilter* p = festival_filter_; return p != nullptr ? *p : *reinterpret_cast( &::_FestivalFilter_default_instance_); } -inline const ::FestivalFilter& RICHARDS::festival_filter() const { - // @@protoc_insertion_point(field_get:RICHARDS.festival_filter) +inline const ::FestivalFilter& Trail::festival_filter() const { + // @@protoc_insertion_point(field_get:Trail.festival_filter) return _internal_festival_filter(); } -inline void RICHARDS::unsafe_arena_set_allocated_festival_filter( +inline void Trail::unsafe_arena_set_allocated_festival_filter( ::FestivalFilter* festival_filter) { if (GetArena() == nullptr) { delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(festival_filter_); @@ -7005,23 +7005,23 @@ inline void RICHARDS::unsafe_arena_set_allocated_festival_filter( } else { } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:RICHARDS.festival_filter) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Trail.festival_filter) } -inline ::FestivalFilter* RICHARDS::release_festival_filter() { +inline ::FestivalFilter* Trail::release_festival_filter() { auto temp = unsafe_arena_release_festival_filter(); if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } return temp; } -inline ::FestivalFilter* RICHARDS::unsafe_arena_release_festival_filter() { - // @@protoc_insertion_point(field_release:RICHARDS.festival_filter) +inline ::FestivalFilter* Trail::unsafe_arena_release_festival_filter() { + // @@protoc_insertion_point(field_release:Trail.festival_filter) ::FestivalFilter* temp = festival_filter_; festival_filter_ = nullptr; return temp; } -inline ::FestivalFilter* RICHARDS::_internal_mutable_festival_filter() { +inline ::FestivalFilter* Trail::_internal_mutable_festival_filter() { if (festival_filter_ == nullptr) { auto* p = CreateMaybeMessage<::FestivalFilter>(GetArena()); @@ -7029,11 +7029,11 @@ inline ::FestivalFilter* RICHARDS::_internal_mutable_festival_filter() { } return festival_filter_; } -inline ::FestivalFilter* RICHARDS::mutable_festival_filter() { - // @@protoc_insertion_point(field_mutable:RICHARDS.festival_filter) +inline ::FestivalFilter* Trail::mutable_festival_filter() { + // @@protoc_insertion_point(field_mutable:Trail.festival_filter) return _internal_mutable_festival_filter(); } -inline void RICHARDS::set_allocated_festival_filter(::FestivalFilter* festival_filter) { +inline void Trail::set_allocated_festival_filter(::FestivalFilter* festival_filter) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); if (message_arena == nullptr) { delete festival_filter_; @@ -7050,32 +7050,32 @@ inline void RICHARDS::set_allocated_festival_filter(::FestivalFilter* festival_f } festival_filter_ = festival_filter; - // @@protoc_insertion_point(field_set_allocated:RICHARDS.festival_filter) + // @@protoc_insertion_point(field_set_allocated:Trail.festival_filter) } // .MapTypeFilter map_type_filter = 28; -inline bool RICHARDS::_internal_has_map_type_filter() const { +inline bool Trail::_internal_has_map_type_filter() const { return this != internal_default_instance() && map_type_filter_ != nullptr; } -inline bool RICHARDS::has_map_type_filter() const { +inline bool Trail::has_map_type_filter() const { return _internal_has_map_type_filter(); } -inline void RICHARDS::clear_map_type_filter() { +inline void Trail::clear_map_type_filter() { if (GetArena() == nullptr && map_type_filter_ != nullptr) { delete map_type_filter_; } map_type_filter_ = nullptr; } -inline const ::MapTypeFilter& RICHARDS::_internal_map_type_filter() const { +inline const ::MapTypeFilter& Trail::_internal_map_type_filter() const { const ::MapTypeFilter* p = map_type_filter_; return p != nullptr ? *p : *reinterpret_cast( &::_MapTypeFilter_default_instance_); } -inline const ::MapTypeFilter& RICHARDS::map_type_filter() const { - // @@protoc_insertion_point(field_get:RICHARDS.map_type_filter) +inline const ::MapTypeFilter& Trail::map_type_filter() const { + // @@protoc_insertion_point(field_get:Trail.map_type_filter) return _internal_map_type_filter(); } -inline void RICHARDS::unsafe_arena_set_allocated_map_type_filter( +inline void Trail::unsafe_arena_set_allocated_map_type_filter( ::MapTypeFilter* map_type_filter) { if (GetArena() == nullptr) { delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(map_type_filter_); @@ -7086,23 +7086,23 @@ inline void RICHARDS::unsafe_arena_set_allocated_map_type_filter( } else { } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:RICHARDS.map_type_filter) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Trail.map_type_filter) } -inline ::MapTypeFilter* RICHARDS::release_map_type_filter() { +inline ::MapTypeFilter* Trail::release_map_type_filter() { auto temp = unsafe_arena_release_map_type_filter(); if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } return temp; } -inline ::MapTypeFilter* RICHARDS::unsafe_arena_release_map_type_filter() { - // @@protoc_insertion_point(field_release:RICHARDS.map_type_filter) +inline ::MapTypeFilter* Trail::unsafe_arena_release_map_type_filter() { + // @@protoc_insertion_point(field_release:Trail.map_type_filter) ::MapTypeFilter* temp = map_type_filter_; map_type_filter_ = nullptr; return temp; } -inline ::MapTypeFilter* RICHARDS::_internal_mutable_map_type_filter() { +inline ::MapTypeFilter* Trail::_internal_mutable_map_type_filter() { if (map_type_filter_ == nullptr) { auto* p = CreateMaybeMessage<::MapTypeFilter>(GetArena()); @@ -7110,11 +7110,11 @@ inline ::MapTypeFilter* RICHARDS::_internal_mutable_map_type_filter() { } return map_type_filter_; } -inline ::MapTypeFilter* RICHARDS::mutable_map_type_filter() { - // @@protoc_insertion_point(field_mutable:RICHARDS.map_type_filter) +inline ::MapTypeFilter* Trail::mutable_map_type_filter() { + // @@protoc_insertion_point(field_mutable:Trail.map_type_filter) return _internal_mutable_map_type_filter(); } -inline void RICHARDS::set_allocated_map_type_filter(::MapTypeFilter* map_type_filter) { +inline void Trail::set_allocated_map_type_filter(::MapTypeFilter* map_type_filter) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); if (message_arena == nullptr) { delete map_type_filter_; @@ -7131,32 +7131,32 @@ inline void RICHARDS::set_allocated_map_type_filter(::MapTypeFilter* map_type_fi } map_type_filter_ = map_type_filter; - // @@protoc_insertion_point(field_set_allocated:RICHARDS.map_type_filter) + // @@protoc_insertion_point(field_set_allocated:Trail.map_type_filter) } // .MountFilter mount_filter = 29; -inline bool RICHARDS::_internal_has_mount_filter() const { +inline bool Trail::_internal_has_mount_filter() const { return this != internal_default_instance() && mount_filter_ != nullptr; } -inline bool RICHARDS::has_mount_filter() const { +inline bool Trail::has_mount_filter() const { return _internal_has_mount_filter(); } -inline void RICHARDS::clear_mount_filter() { +inline void Trail::clear_mount_filter() { if (GetArena() == nullptr && mount_filter_ != nullptr) { delete mount_filter_; } mount_filter_ = nullptr; } -inline const ::MountFilter& RICHARDS::_internal_mount_filter() const { +inline const ::MountFilter& Trail::_internal_mount_filter() const { const ::MountFilter* p = mount_filter_; return p != nullptr ? *p : *reinterpret_cast( &::_MountFilter_default_instance_); } -inline const ::MountFilter& RICHARDS::mount_filter() const { - // @@protoc_insertion_point(field_get:RICHARDS.mount_filter) +inline const ::MountFilter& Trail::mount_filter() const { + // @@protoc_insertion_point(field_get:Trail.mount_filter) return _internal_mount_filter(); } -inline void RICHARDS::unsafe_arena_set_allocated_mount_filter( +inline void Trail::unsafe_arena_set_allocated_mount_filter( ::MountFilter* mount_filter) { if (GetArena() == nullptr) { delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(mount_filter_); @@ -7167,23 +7167,23 @@ inline void RICHARDS::unsafe_arena_set_allocated_mount_filter( } else { } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:RICHARDS.mount_filter) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Trail.mount_filter) } -inline ::MountFilter* RICHARDS::release_mount_filter() { +inline ::MountFilter* Trail::release_mount_filter() { auto temp = unsafe_arena_release_mount_filter(); if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } return temp; } -inline ::MountFilter* RICHARDS::unsafe_arena_release_mount_filter() { - // @@protoc_insertion_point(field_release:RICHARDS.mount_filter) +inline ::MountFilter* Trail::unsafe_arena_release_mount_filter() { + // @@protoc_insertion_point(field_release:Trail.mount_filter) ::MountFilter* temp = mount_filter_; mount_filter_ = nullptr; return temp; } -inline ::MountFilter* RICHARDS::_internal_mutable_mount_filter() { +inline ::MountFilter* Trail::_internal_mutable_mount_filter() { if (mount_filter_ == nullptr) { auto* p = CreateMaybeMessage<::MountFilter>(GetArena()); @@ -7191,11 +7191,11 @@ inline ::MountFilter* RICHARDS::_internal_mutable_mount_filter() { } return mount_filter_; } -inline ::MountFilter* RICHARDS::mutable_mount_filter() { - // @@protoc_insertion_point(field_mutable:RICHARDS.mount_filter) +inline ::MountFilter* Trail::mutable_mount_filter() { + // @@protoc_insertion_point(field_mutable:Trail.mount_filter) return _internal_mutable_mount_filter(); } -inline void RICHARDS::set_allocated_mount_filter(::MountFilter* mount_filter) { +inline void Trail::set_allocated_mount_filter(::MountFilter* mount_filter) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); if (message_arena == nullptr) { delete mount_filter_; @@ -7212,32 +7212,32 @@ inline void RICHARDS::set_allocated_mount_filter(::MountFilter* mount_filter) { } mount_filter_ = mount_filter; - // @@protoc_insertion_point(field_set_allocated:RICHARDS.mount_filter) + // @@protoc_insertion_point(field_set_allocated:Trail.mount_filter) } // .ProfessionFilter profession_filter = 30; -inline bool RICHARDS::_internal_has_profession_filter() const { +inline bool Trail::_internal_has_profession_filter() const { return this != internal_default_instance() && profession_filter_ != nullptr; } -inline bool RICHARDS::has_profession_filter() const { +inline bool Trail::has_profession_filter() const { return _internal_has_profession_filter(); } -inline void RICHARDS::clear_profession_filter() { +inline void Trail::clear_profession_filter() { if (GetArena() == nullptr && profession_filter_ != nullptr) { delete profession_filter_; } profession_filter_ = nullptr; } -inline const ::ProfessionFilter& RICHARDS::_internal_profession_filter() const { +inline const ::ProfessionFilter& Trail::_internal_profession_filter() const { const ::ProfessionFilter* p = profession_filter_; return p != nullptr ? *p : *reinterpret_cast( &::_ProfessionFilter_default_instance_); } -inline const ::ProfessionFilter& RICHARDS::profession_filter() const { - // @@protoc_insertion_point(field_get:RICHARDS.profession_filter) +inline const ::ProfessionFilter& Trail::profession_filter() const { + // @@protoc_insertion_point(field_get:Trail.profession_filter) return _internal_profession_filter(); } -inline void RICHARDS::unsafe_arena_set_allocated_profession_filter( +inline void Trail::unsafe_arena_set_allocated_profession_filter( ::ProfessionFilter* profession_filter) { if (GetArena() == nullptr) { delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(profession_filter_); @@ -7248,23 +7248,23 @@ inline void RICHARDS::unsafe_arena_set_allocated_profession_filter( } else { } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:RICHARDS.profession_filter) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Trail.profession_filter) } -inline ::ProfessionFilter* RICHARDS::release_profession_filter() { +inline ::ProfessionFilter* Trail::release_profession_filter() { auto temp = unsafe_arena_release_profession_filter(); if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } return temp; } -inline ::ProfessionFilter* RICHARDS::unsafe_arena_release_profession_filter() { - // @@protoc_insertion_point(field_release:RICHARDS.profession_filter) +inline ::ProfessionFilter* Trail::unsafe_arena_release_profession_filter() { + // @@protoc_insertion_point(field_release:Trail.profession_filter) ::ProfessionFilter* temp = profession_filter_; profession_filter_ = nullptr; return temp; } -inline ::ProfessionFilter* RICHARDS::_internal_mutable_profession_filter() { +inline ::ProfessionFilter* Trail::_internal_mutable_profession_filter() { if (profession_filter_ == nullptr) { auto* p = CreateMaybeMessage<::ProfessionFilter>(GetArena()); @@ -7272,11 +7272,11 @@ inline ::ProfessionFilter* RICHARDS::_internal_mutable_profession_filter() { } return profession_filter_; } -inline ::ProfessionFilter* RICHARDS::mutable_profession_filter() { - // @@protoc_insertion_point(field_mutable:RICHARDS.profession_filter) +inline ::ProfessionFilter* Trail::mutable_profession_filter() { + // @@protoc_insertion_point(field_mutable:Trail.profession_filter) return _internal_mutable_profession_filter(); } -inline void RICHARDS::set_allocated_profession_filter(::ProfessionFilter* profession_filter) { +inline void Trail::set_allocated_profession_filter(::ProfessionFilter* profession_filter) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); if (message_arena == nullptr) { delete profession_filter_; @@ -7293,32 +7293,32 @@ inline void RICHARDS::set_allocated_profession_filter(::ProfessionFilter* profes } profession_filter_ = profession_filter; - // @@protoc_insertion_point(field_set_allocated:RICHARDS.profession_filter) + // @@protoc_insertion_point(field_set_allocated:Trail.profession_filter) } // .SpecializationFilter specialization_filter = 31; -inline bool RICHARDS::_internal_has_specialization_filter() const { +inline bool Trail::_internal_has_specialization_filter() const { return this != internal_default_instance() && specialization_filter_ != nullptr; } -inline bool RICHARDS::has_specialization_filter() const { +inline bool Trail::has_specialization_filter() const { return _internal_has_specialization_filter(); } -inline void RICHARDS::clear_specialization_filter() { +inline void Trail::clear_specialization_filter() { if (GetArena() == nullptr && specialization_filter_ != nullptr) { delete specialization_filter_; } specialization_filter_ = nullptr; } -inline const ::SpecializationFilter& RICHARDS::_internal_specialization_filter() const { +inline const ::SpecializationFilter& Trail::_internal_specialization_filter() const { const ::SpecializationFilter* p = specialization_filter_; return p != nullptr ? *p : *reinterpret_cast( &::_SpecializationFilter_default_instance_); } -inline const ::SpecializationFilter& RICHARDS::specialization_filter() const { - // @@protoc_insertion_point(field_get:RICHARDS.specialization_filter) +inline const ::SpecializationFilter& Trail::specialization_filter() const { + // @@protoc_insertion_point(field_get:Trail.specialization_filter) return _internal_specialization_filter(); } -inline void RICHARDS::unsafe_arena_set_allocated_specialization_filter( +inline void Trail::unsafe_arena_set_allocated_specialization_filter( ::SpecializationFilter* specialization_filter) { if (GetArena() == nullptr) { delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(specialization_filter_); @@ -7329,23 +7329,23 @@ inline void RICHARDS::unsafe_arena_set_allocated_specialization_filter( } else { } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:RICHARDS.specialization_filter) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Trail.specialization_filter) } -inline ::SpecializationFilter* RICHARDS::release_specialization_filter() { +inline ::SpecializationFilter* Trail::release_specialization_filter() { auto temp = unsafe_arena_release_specialization_filter(); if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } return temp; } -inline ::SpecializationFilter* RICHARDS::unsafe_arena_release_specialization_filter() { - // @@protoc_insertion_point(field_release:RICHARDS.specialization_filter) +inline ::SpecializationFilter* Trail::unsafe_arena_release_specialization_filter() { + // @@protoc_insertion_point(field_release:Trail.specialization_filter) ::SpecializationFilter* temp = specialization_filter_; specialization_filter_ = nullptr; return temp; } -inline ::SpecializationFilter* RICHARDS::_internal_mutable_specialization_filter() { +inline ::SpecializationFilter* Trail::_internal_mutable_specialization_filter() { if (specialization_filter_ == nullptr) { auto* p = CreateMaybeMessage<::SpecializationFilter>(GetArena()); @@ -7353,11 +7353,11 @@ inline ::SpecializationFilter* RICHARDS::_internal_mutable_specialization_filter } return specialization_filter_; } -inline ::SpecializationFilter* RICHARDS::mutable_specialization_filter() { - // @@protoc_insertion_point(field_mutable:RICHARDS.specialization_filter) +inline ::SpecializationFilter* Trail::mutable_specialization_filter() { + // @@protoc_insertion_point(field_mutable:Trail.specialization_filter) return _internal_mutable_specialization_filter(); } -inline void RICHARDS::set_allocated_specialization_filter(::SpecializationFilter* specialization_filter) { +inline void Trail::set_allocated_specialization_filter(::SpecializationFilter* specialization_filter) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); if (message_arena == nullptr) { delete specialization_filter_; @@ -7374,32 +7374,32 @@ inline void RICHARDS::set_allocated_specialization_filter(::SpecializationFilter } specialization_filter_ = specialization_filter; - // @@protoc_insertion_point(field_set_allocated:RICHARDS.specialization_filter) + // @@protoc_insertion_point(field_set_allocated:Trail.specialization_filter) } // .SpeciesFilter species_filter = 32; -inline bool RICHARDS::_internal_has_species_filter() const { +inline bool Trail::_internal_has_species_filter() const { return this != internal_default_instance() && species_filter_ != nullptr; } -inline bool RICHARDS::has_species_filter() const { +inline bool Trail::has_species_filter() const { return _internal_has_species_filter(); } -inline void RICHARDS::clear_species_filter() { +inline void Trail::clear_species_filter() { if (GetArena() == nullptr && species_filter_ != nullptr) { delete species_filter_; } species_filter_ = nullptr; } -inline const ::SpeciesFilter& RICHARDS::_internal_species_filter() const { +inline const ::SpeciesFilter& Trail::_internal_species_filter() const { const ::SpeciesFilter* p = species_filter_; return p != nullptr ? *p : *reinterpret_cast( &::_SpeciesFilter_default_instance_); } -inline const ::SpeciesFilter& RICHARDS::species_filter() const { - // @@protoc_insertion_point(field_get:RICHARDS.species_filter) +inline const ::SpeciesFilter& Trail::species_filter() const { + // @@protoc_insertion_point(field_get:Trail.species_filter) return _internal_species_filter(); } -inline void RICHARDS::unsafe_arena_set_allocated_species_filter( +inline void Trail::unsafe_arena_set_allocated_species_filter( ::SpeciesFilter* species_filter) { if (GetArena() == nullptr) { delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(species_filter_); @@ -7410,23 +7410,23 @@ inline void RICHARDS::unsafe_arena_set_allocated_species_filter( } else { } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:RICHARDS.species_filter) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Trail.species_filter) } -inline ::SpeciesFilter* RICHARDS::release_species_filter() { +inline ::SpeciesFilter* Trail::release_species_filter() { auto temp = unsafe_arena_release_species_filter(); if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } return temp; } -inline ::SpeciesFilter* RICHARDS::unsafe_arena_release_species_filter() { - // @@protoc_insertion_point(field_release:RICHARDS.species_filter) +inline ::SpeciesFilter* Trail::unsafe_arena_release_species_filter() { + // @@protoc_insertion_point(field_release:Trail.species_filter) ::SpeciesFilter* temp = species_filter_; species_filter_ = nullptr; return temp; } -inline ::SpeciesFilter* RICHARDS::_internal_mutable_species_filter() { +inline ::SpeciesFilter* Trail::_internal_mutable_species_filter() { if (species_filter_ == nullptr) { auto* p = CreateMaybeMessage<::SpeciesFilter>(GetArena()); @@ -7434,11 +7434,11 @@ inline ::SpeciesFilter* RICHARDS::_internal_mutable_species_filter() { } return species_filter_; } -inline ::SpeciesFilter* RICHARDS::mutable_species_filter() { - // @@protoc_insertion_point(field_mutable:RICHARDS.species_filter) +inline ::SpeciesFilter* Trail::mutable_species_filter() { + // @@protoc_insertion_point(field_mutable:Trail.species_filter) return _internal_mutable_species_filter(); } -inline void RICHARDS::set_allocated_species_filter(::SpeciesFilter* species_filter) { +inline void Trail::set_allocated_species_filter(::SpeciesFilter* species_filter) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); if (message_arena == nullptr) { delete species_filter_; @@ -7455,7 +7455,7 @@ inline void RICHARDS::set_allocated_species_filter(::SpeciesFilter* species_filt } species_filter_ = species_filter; - // @@protoc_insertion_point(field_set_allocated:RICHARDS.species_filter) + // @@protoc_insertion_point(field_set_allocated:Trail.species_filter) } // ------------------------------------------------------------------- From e529aee98666809392dc2809ea26c8f9e9f1be67 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sat, 5 Nov 2022 17:13:36 -0400 Subject: [PATCH 093/539] Cmake file now correctly adds protoc libraries --- .github/workflows/main.yml | 1 + xml_converter/CMakeLists.txt | 13 +- .../{node.proto => waypoint.proto} | 2 + .../node.pb.cc => src/waypoint.pb.cc} | 2111 +++++++-------- .../node.pb.h => src/waypoint.pb.h} | 2394 +++++++++-------- 5 files changed, 2270 insertions(+), 2251 deletions(-) rename xml_converter/generators/proto_templates/{node.proto => waypoint.proto} (99%) rename xml_converter/{generators/proto_templates/node.pb.cc => src/waypoint.pb.cc} (79%) rename xml_converter/{generators/proto_templates/node.pb.h => src/waypoint.pb.h} (78%) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 04f03fbe..166270de 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -95,6 +95,7 @@ jobs: - name: Make xml_converter run: | cd xml_converter + cmake ./ make mv xml_converter ../output diff --git a/xml_converter/CMakeLists.txt b/xml_converter/CMakeLists.txt index 76c9e604..7f3de30a 100644 --- a/xml_converter/CMakeLists.txt +++ b/xml_converter/CMakeLists.txt @@ -6,19 +6,22 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON) # Name Output File set(TARGET_NAME xml_converter) -# Add Dependencies -file(GLOB_RECURSE SOURCES "src/*.cpp") - # Add Protobuf find_package(Protobuf REQUIRED) include_directories(${Protobuf_INCLUDE_DIRS}) -include_directories(${CMAKE_CURRENT_BINARY_DIR}) -EXECUTE_PROCESS(COMMAND ${PROTOBUF_PROTOC_EXECUTABLE} --cpp_out=. ./generators/proto_templates/node.proto) +# include_directories() +EXECUTE_PROCESS(COMMAND ${PROTOBUF_PROTOC_EXECUTABLE} --proto_path=generators/proto_templates --cpp_out=src/ generators/proto_templates/waypoint.proto) + +# Add Dependencies +file(GLOB_RECURSE SOURCES "src/*.cpp" "src/*.cc") # Set output as executable. # TODO: This will eventually become a library when it gets integrated into burrito. add_executable (${TARGET_NAME} ${SOURCES}) +# include libraies +target_link_libraries(${TARGET_NAME} ${Protobuf_LIBRARIES}) + # Require C++ 17 or newer. target_compile_features(${TARGET_NAME} PRIVATE cxx_std_17) diff --git a/xml_converter/generators/proto_templates/node.proto b/xml_converter/generators/proto_templates/waypoint.proto similarity index 99% rename from xml_converter/generators/proto_templates/node.proto rename to xml_converter/generators/proto_templates/waypoint.proto index 99d2b171..f9ac53ba 100644 --- a/xml_converter/generators/proto_templates/node.proto +++ b/xml_converter/generators/proto_templates/waypoint.proto @@ -1,5 +1,7 @@ syntax = "proto3"; +package waypoint; + message Category { bool default_visibility = 1; string display_name = 2; diff --git a/xml_converter/generators/proto_templates/node.pb.cc b/xml_converter/src/waypoint.pb.cc similarity index 79% rename from xml_converter/generators/proto_templates/node.pb.cc rename to xml_converter/src/waypoint.pb.cc index 7a0849a6..b1b8d4a3 100644 --- a/xml_converter/generators/proto_templates/node.pb.cc +++ b/xml_converter/src/waypoint.pb.cc @@ -1,7 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: generators/proto_templates/node.proto +// source: waypoint.proto -#include "generators/proto_templates/node.pb.h" +#include "waypoint.pb.h" #include @@ -14,19 +14,20 @@ #include // @@protoc_insertion_point(includes) #include -extern PROTOBUF_INTERNAL_EXPORT_generators_2fproto_5ftemplates_2fnode_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Category_generators_2fproto_5ftemplates_2fnode_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_generators_2fproto_5ftemplates_2fnode_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Color_generators_2fproto_5ftemplates_2fnode_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_generators_2fproto_5ftemplates_2fnode_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_FestivalFilter_generators_2fproto_5ftemplates_2fnode_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_generators_2fproto_5ftemplates_2fnode_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_GUID_generators_2fproto_5ftemplates_2fnode_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_generators_2fproto_5ftemplates_2fnode_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_MapTypeFilter_generators_2fproto_5ftemplates_2fnode_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_generators_2fproto_5ftemplates_2fnode_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_MountFilter_generators_2fproto_5ftemplates_2fnode_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_generators_2fproto_5ftemplates_2fnode_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Position_generators_2fproto_5ftemplates_2fnode_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_generators_2fproto_5ftemplates_2fnode_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ProfessionFilter_generators_2fproto_5ftemplates_2fnode_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_generators_2fproto_5ftemplates_2fnode_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_SpecializationFilter_generators_2fproto_5ftemplates_2fnode_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_generators_2fproto_5ftemplates_2fnode_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_SpeciesFilter_generators_2fproto_5ftemplates_2fnode_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_generators_2fproto_5ftemplates_2fnode_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Texture_generators_2fproto_5ftemplates_2fnode_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_generators_2fproto_5ftemplates_2fnode_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_TrailData_generators_2fproto_5ftemplates_2fnode_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_generators_2fproto_5ftemplates_2fnode_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Trigger_generators_2fproto_5ftemplates_2fnode_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_waypoint_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Category_waypoint_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_waypoint_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Color_waypoint_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_waypoint_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_FestivalFilter_waypoint_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_waypoint_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_GUID_waypoint_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_waypoint_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_MapTypeFilter_waypoint_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_waypoint_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_MountFilter_waypoint_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_waypoint_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Position_waypoint_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_waypoint_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ProfessionFilter_waypoint_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_waypoint_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_SpecializationFilter_waypoint_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_waypoint_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_SpeciesFilter_waypoint_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_waypoint_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Texture_waypoint_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_waypoint_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_TrailData_waypoint_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_waypoint_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Trigger_waypoint_2eproto; +namespace waypoint { class Category_ChildrenEntry_DoNotUseDefaultTypeInternal { public: ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; @@ -95,775 +96,782 @@ class TrailDataDefaultTypeInternal { public: ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _TrailData_default_instance_; -static void InitDefaultsscc_info_Category_generators_2fproto_5ftemplates_2fnode_2eproto() { +} // namespace waypoint +static void InitDefaultsscc_info_Category_waypoint_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::_Category_ChildrenEntry_DoNotUse_default_instance_; - new (ptr) ::Category_ChildrenEntry_DoNotUse(); + void* ptr = &::waypoint::_Category_ChildrenEntry_DoNotUse_default_instance_; + new (ptr) ::waypoint::Category_ChildrenEntry_DoNotUse(); } { - void* ptr = &::_Category_default_instance_; - new (ptr) ::Category(); + void* ptr = &::waypoint::_Category_default_instance_; + new (ptr) ::waypoint::Category(); ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::Category_ChildrenEntry_DoNotUse::InitAsDefaultInstance(); - ::Category::InitAsDefaultInstance(); + ::waypoint::Category_ChildrenEntry_DoNotUse::InitAsDefaultInstance(); + ::waypoint::Category::InitAsDefaultInstance(); } -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Category_generators_2fproto_5ftemplates_2fnode_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Category_generators_2fproto_5ftemplates_2fnode_2eproto}, {}}; +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Category_waypoint_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Category_waypoint_2eproto}, {}}; -static void InitDefaultsscc_info_Color_generators_2fproto_5ftemplates_2fnode_2eproto() { +static void InitDefaultsscc_info_Color_waypoint_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::_Color_default_instance_; - new (ptr) ::Color(); + void* ptr = &::waypoint::_Color_default_instance_; + new (ptr) ::waypoint::Color(); ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::Color::InitAsDefaultInstance(); + ::waypoint::Color::InitAsDefaultInstance(); } -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Color_generators_2fproto_5ftemplates_2fnode_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Color_generators_2fproto_5ftemplates_2fnode_2eproto}, {}}; +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Color_waypoint_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Color_waypoint_2eproto}, {}}; -static void InitDefaultsscc_info_EulerRotation_generators_2fproto_5ftemplates_2fnode_2eproto() { +static void InitDefaultsscc_info_EulerRotation_waypoint_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::_EulerRotation_default_instance_; - new (ptr) ::EulerRotation(); + void* ptr = &::waypoint::_EulerRotation_default_instance_; + new (ptr) ::waypoint::EulerRotation(); ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::EulerRotation::InitAsDefaultInstance(); + ::waypoint::EulerRotation::InitAsDefaultInstance(); } -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_EulerRotation_generators_2fproto_5ftemplates_2fnode_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_EulerRotation_generators_2fproto_5ftemplates_2fnode_2eproto}, {}}; +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_EulerRotation_waypoint_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_EulerRotation_waypoint_2eproto}, {}}; -static void InitDefaultsscc_info_FestivalFilter_generators_2fproto_5ftemplates_2fnode_2eproto() { +static void InitDefaultsscc_info_FestivalFilter_waypoint_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::_FestivalFilter_default_instance_; - new (ptr) ::FestivalFilter(); + void* ptr = &::waypoint::_FestivalFilter_default_instance_; + new (ptr) ::waypoint::FestivalFilter(); ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::FestivalFilter::InitAsDefaultInstance(); + ::waypoint::FestivalFilter::InitAsDefaultInstance(); } -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_FestivalFilter_generators_2fproto_5ftemplates_2fnode_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_FestivalFilter_generators_2fproto_5ftemplates_2fnode_2eproto}, {}}; +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_FestivalFilter_waypoint_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_FestivalFilter_waypoint_2eproto}, {}}; -static void InitDefaultsscc_info_GUID_generators_2fproto_5ftemplates_2fnode_2eproto() { +static void InitDefaultsscc_info_GUID_waypoint_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::_GUID_default_instance_; - new (ptr) ::GUID(); + void* ptr = &::waypoint::_GUID_default_instance_; + new (ptr) ::waypoint::GUID(); ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::GUID::InitAsDefaultInstance(); + ::waypoint::GUID::InitAsDefaultInstance(); } -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_GUID_generators_2fproto_5ftemplates_2fnode_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_GUID_generators_2fproto_5ftemplates_2fnode_2eproto}, {}}; +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_GUID_waypoint_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_GUID_waypoint_2eproto}, {}}; -static void InitDefaultsscc_info_Icon_generators_2fproto_5ftemplates_2fnode_2eproto() { +static void InitDefaultsscc_info_Icon_waypoint_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::_Icon_default_instance_; - new (ptr) ::Icon(); + void* ptr = &::waypoint::_Icon_default_instance_; + new (ptr) ::waypoint::Icon(); ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::Icon::InitAsDefaultInstance(); + ::waypoint::Icon::InitAsDefaultInstance(); } -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<5> scc_info_Icon_generators_2fproto_5ftemplates_2fnode_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 5, 0, InitDefaultsscc_info_Icon_generators_2fproto_5ftemplates_2fnode_2eproto}, { - &scc_info_Category_generators_2fproto_5ftemplates_2fnode_2eproto.base, - &scc_info_Texture_generators_2fproto_5ftemplates_2fnode_2eproto.base, - &scc_info_GUID_generators_2fproto_5ftemplates_2fnode_2eproto.base, - &scc_info_Position_generators_2fproto_5ftemplates_2fnode_2eproto.base, - &scc_info_Trigger_generators_2fproto_5ftemplates_2fnode_2eproto.base,}}; +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<5> scc_info_Icon_waypoint_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 5, 0, InitDefaultsscc_info_Icon_waypoint_2eproto}, { + &scc_info_Category_waypoint_2eproto.base, + &scc_info_Texture_waypoint_2eproto.base, + &scc_info_GUID_waypoint_2eproto.base, + &scc_info_Position_waypoint_2eproto.base, + &scc_info_Trigger_waypoint_2eproto.base,}}; -static void InitDefaultsscc_info_MapTypeFilter_generators_2fproto_5ftemplates_2fnode_2eproto() { +static void InitDefaultsscc_info_MapTypeFilter_waypoint_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::_MapTypeFilter_default_instance_; - new (ptr) ::MapTypeFilter(); + void* ptr = &::waypoint::_MapTypeFilter_default_instance_; + new (ptr) ::waypoint::MapTypeFilter(); ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::MapTypeFilter::InitAsDefaultInstance(); + ::waypoint::MapTypeFilter::InitAsDefaultInstance(); } -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_MapTypeFilter_generators_2fproto_5ftemplates_2fnode_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_MapTypeFilter_generators_2fproto_5ftemplates_2fnode_2eproto}, {}}; +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_MapTypeFilter_waypoint_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_MapTypeFilter_waypoint_2eproto}, {}}; -static void InitDefaultsscc_info_MountFilter_generators_2fproto_5ftemplates_2fnode_2eproto() { +static void InitDefaultsscc_info_MountFilter_waypoint_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::_MountFilter_default_instance_; - new (ptr) ::MountFilter(); + void* ptr = &::waypoint::_MountFilter_default_instance_; + new (ptr) ::waypoint::MountFilter(); ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::MountFilter::InitAsDefaultInstance(); + ::waypoint::MountFilter::InitAsDefaultInstance(); } -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_MountFilter_generators_2fproto_5ftemplates_2fnode_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_MountFilter_generators_2fproto_5ftemplates_2fnode_2eproto}, {}}; +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_MountFilter_waypoint_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_MountFilter_waypoint_2eproto}, {}}; -static void InitDefaultsscc_info_Position_generators_2fproto_5ftemplates_2fnode_2eproto() { +static void InitDefaultsscc_info_Position_waypoint_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::_Position_default_instance_; - new (ptr) ::Position(); + void* ptr = &::waypoint::_Position_default_instance_; + new (ptr) ::waypoint::Position(); ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::Position::InitAsDefaultInstance(); + ::waypoint::Position::InitAsDefaultInstance(); } -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Position_generators_2fproto_5ftemplates_2fnode_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Position_generators_2fproto_5ftemplates_2fnode_2eproto}, {}}; +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Position_waypoint_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Position_waypoint_2eproto}, {}}; -static void InitDefaultsscc_info_ProfessionFilter_generators_2fproto_5ftemplates_2fnode_2eproto() { +static void InitDefaultsscc_info_ProfessionFilter_waypoint_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::_ProfessionFilter_default_instance_; - new (ptr) ::ProfessionFilter(); + void* ptr = &::waypoint::_ProfessionFilter_default_instance_; + new (ptr) ::waypoint::ProfessionFilter(); ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::ProfessionFilter::InitAsDefaultInstance(); + ::waypoint::ProfessionFilter::InitAsDefaultInstance(); } -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ProfessionFilter_generators_2fproto_5ftemplates_2fnode_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_ProfessionFilter_generators_2fproto_5ftemplates_2fnode_2eproto}, {}}; +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ProfessionFilter_waypoint_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_ProfessionFilter_waypoint_2eproto}, {}}; -static void InitDefaultsscc_info_SpecializationFilter_generators_2fproto_5ftemplates_2fnode_2eproto() { +static void InitDefaultsscc_info_SpecializationFilter_waypoint_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::_SpecializationFilter_default_instance_; - new (ptr) ::SpecializationFilter(); + void* ptr = &::waypoint::_SpecializationFilter_default_instance_; + new (ptr) ::waypoint::SpecializationFilter(); ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::SpecializationFilter::InitAsDefaultInstance(); + ::waypoint::SpecializationFilter::InitAsDefaultInstance(); } -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_SpecializationFilter_generators_2fproto_5ftemplates_2fnode_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_SpecializationFilter_generators_2fproto_5ftemplates_2fnode_2eproto}, {}}; +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_SpecializationFilter_waypoint_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_SpecializationFilter_waypoint_2eproto}, {}}; -static void InitDefaultsscc_info_SpeciesFilter_generators_2fproto_5ftemplates_2fnode_2eproto() { +static void InitDefaultsscc_info_SpeciesFilter_waypoint_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::_SpeciesFilter_default_instance_; - new (ptr) ::SpeciesFilter(); + void* ptr = &::waypoint::_SpeciesFilter_default_instance_; + new (ptr) ::waypoint::SpeciesFilter(); ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::SpeciesFilter::InitAsDefaultInstance(); + ::waypoint::SpeciesFilter::InitAsDefaultInstance(); } -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_SpeciesFilter_generators_2fproto_5ftemplates_2fnode_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_SpeciesFilter_generators_2fproto_5ftemplates_2fnode_2eproto}, {}}; +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_SpeciesFilter_waypoint_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_SpeciesFilter_waypoint_2eproto}, {}}; -static void InitDefaultsscc_info_Texture_generators_2fproto_5ftemplates_2fnode_2eproto() { +static void InitDefaultsscc_info_Texture_waypoint_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::_Texture_default_instance_; - new (ptr) ::Texture(); + void* ptr = &::waypoint::_Texture_default_instance_; + new (ptr) ::waypoint::Texture(); ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::Texture::InitAsDefaultInstance(); + ::waypoint::Texture::InitAsDefaultInstance(); } -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Texture_generators_2fproto_5ftemplates_2fnode_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Texture_generators_2fproto_5ftemplates_2fnode_2eproto}, {}}; +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Texture_waypoint_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Texture_waypoint_2eproto}, {}}; -static void InitDefaultsscc_info_Trail_generators_2fproto_5ftemplates_2fnode_2eproto() { +static void InitDefaultsscc_info_Trail_waypoint_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::_Trail_default_instance_; - new (ptr) ::Trail(); + void* ptr = &::waypoint::_Trail_default_instance_; + new (ptr) ::waypoint::Trail(); ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::Trail::InitAsDefaultInstance(); + ::waypoint::Trail::InitAsDefaultInstance(); } -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<11> scc_info_Trail_generators_2fproto_5ftemplates_2fnode_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 11, 0, InitDefaultsscc_info_Trail_generators_2fproto_5ftemplates_2fnode_2eproto}, { - &scc_info_Category_generators_2fproto_5ftemplates_2fnode_2eproto.base, - &scc_info_Texture_generators_2fproto_5ftemplates_2fnode_2eproto.base, - &scc_info_GUID_generators_2fproto_5ftemplates_2fnode_2eproto.base, - &scc_info_TrailData_generators_2fproto_5ftemplates_2fnode_2eproto.base, - &scc_info_Color_generators_2fproto_5ftemplates_2fnode_2eproto.base, - &scc_info_FestivalFilter_generators_2fproto_5ftemplates_2fnode_2eproto.base, - &scc_info_MapTypeFilter_generators_2fproto_5ftemplates_2fnode_2eproto.base, - &scc_info_MountFilter_generators_2fproto_5ftemplates_2fnode_2eproto.base, - &scc_info_ProfessionFilter_generators_2fproto_5ftemplates_2fnode_2eproto.base, - &scc_info_SpecializationFilter_generators_2fproto_5ftemplates_2fnode_2eproto.base, - &scc_info_SpeciesFilter_generators_2fproto_5ftemplates_2fnode_2eproto.base,}}; +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<11> scc_info_Trail_waypoint_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 11, 0, InitDefaultsscc_info_Trail_waypoint_2eproto}, { + &scc_info_Category_waypoint_2eproto.base, + &scc_info_Texture_waypoint_2eproto.base, + &scc_info_GUID_waypoint_2eproto.base, + &scc_info_TrailData_waypoint_2eproto.base, + &scc_info_Color_waypoint_2eproto.base, + &scc_info_FestivalFilter_waypoint_2eproto.base, + &scc_info_MapTypeFilter_waypoint_2eproto.base, + &scc_info_MountFilter_waypoint_2eproto.base, + &scc_info_ProfessionFilter_waypoint_2eproto.base, + &scc_info_SpecializationFilter_waypoint_2eproto.base, + &scc_info_SpeciesFilter_waypoint_2eproto.base,}}; -static void InitDefaultsscc_info_TrailData_generators_2fproto_5ftemplates_2fnode_2eproto() { +static void InitDefaultsscc_info_TrailData_waypoint_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::_TrailData_default_instance_; - new (ptr) ::TrailData(); + void* ptr = &::waypoint::_TrailData_default_instance_; + new (ptr) ::waypoint::TrailData(); ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::TrailData::InitAsDefaultInstance(); + ::waypoint::TrailData::InitAsDefaultInstance(); } -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_TrailData_generators_2fproto_5ftemplates_2fnode_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_TrailData_generators_2fproto_5ftemplates_2fnode_2eproto}, {}}; +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_TrailData_waypoint_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_TrailData_waypoint_2eproto}, {}}; -static void InitDefaultsscc_info_Trigger_generators_2fproto_5ftemplates_2fnode_2eproto() { +static void InitDefaultsscc_info_Trigger_waypoint_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::_Trigger_default_instance_; - new (ptr) ::Trigger(); + void* ptr = &::waypoint::_Trigger_default_instance_; + new (ptr) ::waypoint::Trigger(); ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::Trigger::InitAsDefaultInstance(); + ::waypoint::Trigger::InitAsDefaultInstance(); } -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Trigger_generators_2fproto_5ftemplates_2fnode_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_Trigger_generators_2fproto_5ftemplates_2fnode_2eproto}, { - &scc_info_Category_generators_2fproto_5ftemplates_2fnode_2eproto.base,}}; +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Trigger_waypoint_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_Trigger_waypoint_2eproto}, { + &scc_info_Category_waypoint_2eproto.base,}}; -static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_generators_2fproto_5ftemplates_2fnode_2eproto[17]; -static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_generators_2fproto_5ftemplates_2fnode_2eproto[2]; -static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_generators_2fproto_5ftemplates_2fnode_2eproto = nullptr; +static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_waypoint_2eproto[17]; +static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_waypoint_2eproto[2]; +static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_waypoint_2eproto = nullptr; -const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_generators_2fproto_5ftemplates_2fnode_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - PROTOBUF_FIELD_OFFSET(::Category_ChildrenEntry_DoNotUse, _has_bits_), - PROTOBUF_FIELD_OFFSET(::Category_ChildrenEntry_DoNotUse, _internal_metadata_), +const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_waypoint_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + PROTOBUF_FIELD_OFFSET(::waypoint::Category_ChildrenEntry_DoNotUse, _has_bits_), + PROTOBUF_FIELD_OFFSET(::waypoint::Category_ChildrenEntry_DoNotUse, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::Category_ChildrenEntry_DoNotUse, key_), - PROTOBUF_FIELD_OFFSET(::Category_ChildrenEntry_DoNotUse, value_), + PROTOBUF_FIELD_OFFSET(::waypoint::Category_ChildrenEntry_DoNotUse, key_), + PROTOBUF_FIELD_OFFSET(::waypoint::Category_ChildrenEntry_DoNotUse, value_), 0, 1, ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::Category, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(::waypoint::Category, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::Category, default_visibility_), - PROTOBUF_FIELD_OFFSET(::Category, display_name_), - PROTOBUF_FIELD_OFFSET(::Category, is_separator_), - PROTOBUF_FIELD_OFFSET(::Category, name_), - PROTOBUF_FIELD_OFFSET(::Category, tooltip_name_), - PROTOBUF_FIELD_OFFSET(::Category, children_), + PROTOBUF_FIELD_OFFSET(::waypoint::Category, default_visibility_), + PROTOBUF_FIELD_OFFSET(::waypoint::Category, display_name_), + PROTOBUF_FIELD_OFFSET(::waypoint::Category, is_separator_), + PROTOBUF_FIELD_OFFSET(::waypoint::Category, name_), + PROTOBUF_FIELD_OFFSET(::waypoint::Category, tooltip_name_), + PROTOBUF_FIELD_OFFSET(::waypoint::Category, children_), ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::Icon, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(::waypoint::Icon, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::Icon, category_), - PROTOBUF_FIELD_OFFSET(::Icon, texture_), - PROTOBUF_FIELD_OFFSET(::Icon, guid_), - PROTOBUF_FIELD_OFFSET(::Icon, map_id_), - PROTOBUF_FIELD_OFFSET(::Icon, distance_fade_end_), - PROTOBUF_FIELD_OFFSET(::Icon, distance_fade_start_), - PROTOBUF_FIELD_OFFSET(::Icon, height_offset_), - PROTOBUF_FIELD_OFFSET(::Icon, position_), - PROTOBUF_FIELD_OFFSET(::Icon, reset_behavior_), - PROTOBUF_FIELD_OFFSET(::Icon, trigger_), - PROTOBUF_FIELD_OFFSET(::Icon, achievement_bit_), - PROTOBUF_FIELD_OFFSET(::Icon, achievement_id_), - PROTOBUF_FIELD_OFFSET(::Icon, alpha_), - PROTOBUF_FIELD_OFFSET(::Icon, can_fade_), - PROTOBUF_FIELD_OFFSET(::Icon, minimum_size_on_screen_), - PROTOBUF_FIELD_OFFSET(::Icon, map_display_size_), - PROTOBUF_FIELD_OFFSET(::Icon, maximum_size_on_screen_), - PROTOBUF_FIELD_OFFSET(::Icon, scale_on_map_with_zoom_), - PROTOBUF_FIELD_OFFSET(::Icon, tip_description_), - PROTOBUF_FIELD_OFFSET(::Icon, tip_name_), - PROTOBUF_FIELD_OFFSET(::Icon, __tentative__scale_), - PROTOBUF_FIELD_OFFSET(::Icon, __tentative__render_ingame_), - PROTOBUF_FIELD_OFFSET(::Icon, __tentative__render_on_map_), - PROTOBUF_FIELD_OFFSET(::Icon, __tentative__render_on_minimap_), - PROTOBUF_FIELD_OFFSET(::Icon, bhdraft__schedule_), - PROTOBUF_FIELD_OFFSET(::Icon, bhdraft__schedule_duration_), + PROTOBUF_FIELD_OFFSET(::waypoint::Icon, category_), + PROTOBUF_FIELD_OFFSET(::waypoint::Icon, texture_), + PROTOBUF_FIELD_OFFSET(::waypoint::Icon, guid_), + PROTOBUF_FIELD_OFFSET(::waypoint::Icon, map_id_), + PROTOBUF_FIELD_OFFSET(::waypoint::Icon, distance_fade_end_), + PROTOBUF_FIELD_OFFSET(::waypoint::Icon, distance_fade_start_), + PROTOBUF_FIELD_OFFSET(::waypoint::Icon, height_offset_), + PROTOBUF_FIELD_OFFSET(::waypoint::Icon, position_), + PROTOBUF_FIELD_OFFSET(::waypoint::Icon, reset_behavior_), + PROTOBUF_FIELD_OFFSET(::waypoint::Icon, trigger_), + PROTOBUF_FIELD_OFFSET(::waypoint::Icon, achievement_bit_), + PROTOBUF_FIELD_OFFSET(::waypoint::Icon, achievement_id_), + PROTOBUF_FIELD_OFFSET(::waypoint::Icon, alpha_), + PROTOBUF_FIELD_OFFSET(::waypoint::Icon, can_fade_), + PROTOBUF_FIELD_OFFSET(::waypoint::Icon, minimum_size_on_screen_), + PROTOBUF_FIELD_OFFSET(::waypoint::Icon, map_display_size_), + PROTOBUF_FIELD_OFFSET(::waypoint::Icon, maximum_size_on_screen_), + PROTOBUF_FIELD_OFFSET(::waypoint::Icon, scale_on_map_with_zoom_), + PROTOBUF_FIELD_OFFSET(::waypoint::Icon, tip_description_), + PROTOBUF_FIELD_OFFSET(::waypoint::Icon, tip_name_), + PROTOBUF_FIELD_OFFSET(::waypoint::Icon, __tentative__scale_), + PROTOBUF_FIELD_OFFSET(::waypoint::Icon, __tentative__render_ingame_), + PROTOBUF_FIELD_OFFSET(::waypoint::Icon, __tentative__render_on_map_), + PROTOBUF_FIELD_OFFSET(::waypoint::Icon, __tentative__render_on_minimap_), + PROTOBUF_FIELD_OFFSET(::waypoint::Icon, bhdraft__schedule_), + PROTOBUF_FIELD_OFFSET(::waypoint::Icon, bhdraft__schedule_duration_), ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::Trail, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(::waypoint::Trail, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::Trail, category_), - PROTOBUF_FIELD_OFFSET(::Trail, texture_), - PROTOBUF_FIELD_OFFSET(::Trail, guid_), - PROTOBUF_FIELD_OFFSET(::Trail, map_id_), - PROTOBUF_FIELD_OFFSET(::Trail, distance_fade_end_), - PROTOBUF_FIELD_OFFSET(::Trail, distance_fade_start_), - PROTOBUF_FIELD_OFFSET(::Trail, trail_data_), - PROTOBUF_FIELD_OFFSET(::Trail, animation_speed_), - PROTOBUF_FIELD_OFFSET(::Trail, cull_chirality_), - PROTOBUF_FIELD_OFFSET(::Trail, achievement_bit_), - PROTOBUF_FIELD_OFFSET(::Trail, achievement_id_), - PROTOBUF_FIELD_OFFSET(::Trail, alpha_), - PROTOBUF_FIELD_OFFSET(::Trail, can_fade_), - PROTOBUF_FIELD_OFFSET(::Trail, is_wall_), - PROTOBUF_FIELD_OFFSET(::Trail, bhdraft__schedule_), - PROTOBUF_FIELD_OFFSET(::Trail, bhdraft__schedule_duration_), - PROTOBUF_FIELD_OFFSET(::Trail, scale_), - PROTOBUF_FIELD_OFFSET(::Trail, color_), - PROTOBUF_FIELD_OFFSET(::Trail, festival_filter_), - PROTOBUF_FIELD_OFFSET(::Trail, map_type_filter_), - PROTOBUF_FIELD_OFFSET(::Trail, mount_filter_), - PROTOBUF_FIELD_OFFSET(::Trail, profession_filter_), - PROTOBUF_FIELD_OFFSET(::Trail, specialization_filter_), - PROTOBUF_FIELD_OFFSET(::Trail, species_filter_), + PROTOBUF_FIELD_OFFSET(::waypoint::Trail, category_), + PROTOBUF_FIELD_OFFSET(::waypoint::Trail, texture_), + PROTOBUF_FIELD_OFFSET(::waypoint::Trail, guid_), + PROTOBUF_FIELD_OFFSET(::waypoint::Trail, map_id_), + PROTOBUF_FIELD_OFFSET(::waypoint::Trail, distance_fade_end_), + PROTOBUF_FIELD_OFFSET(::waypoint::Trail, distance_fade_start_), + PROTOBUF_FIELD_OFFSET(::waypoint::Trail, trail_data_), + PROTOBUF_FIELD_OFFSET(::waypoint::Trail, animation_speed_), + PROTOBUF_FIELD_OFFSET(::waypoint::Trail, cull_chirality_), + PROTOBUF_FIELD_OFFSET(::waypoint::Trail, achievement_bit_), + PROTOBUF_FIELD_OFFSET(::waypoint::Trail, achievement_id_), + PROTOBUF_FIELD_OFFSET(::waypoint::Trail, alpha_), + PROTOBUF_FIELD_OFFSET(::waypoint::Trail, can_fade_), + PROTOBUF_FIELD_OFFSET(::waypoint::Trail, is_wall_), + PROTOBUF_FIELD_OFFSET(::waypoint::Trail, bhdraft__schedule_), + PROTOBUF_FIELD_OFFSET(::waypoint::Trail, bhdraft__schedule_duration_), + PROTOBUF_FIELD_OFFSET(::waypoint::Trail, scale_), + PROTOBUF_FIELD_OFFSET(::waypoint::Trail, color_), + PROTOBUF_FIELD_OFFSET(::waypoint::Trail, festival_filter_), + PROTOBUF_FIELD_OFFSET(::waypoint::Trail, map_type_filter_), + PROTOBUF_FIELD_OFFSET(::waypoint::Trail, mount_filter_), + PROTOBUF_FIELD_OFFSET(::waypoint::Trail, profession_filter_), + PROTOBUF_FIELD_OFFSET(::waypoint::Trail, specialization_filter_), + PROTOBUF_FIELD_OFFSET(::waypoint::Trail, species_filter_), ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::Texture, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(::waypoint::Texture, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::Texture, path_), + PROTOBUF_FIELD_OFFSET(::waypoint::Texture, path_), ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::Position, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(::waypoint::Position, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::Position, x_), - PROTOBUF_FIELD_OFFSET(::Position, y_), - PROTOBUF_FIELD_OFFSET(::Position, z_), + PROTOBUF_FIELD_OFFSET(::waypoint::Position, x_), + PROTOBUF_FIELD_OFFSET(::waypoint::Position, y_), + PROTOBUF_FIELD_OFFSET(::waypoint::Position, z_), ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::EulerRotation, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(::waypoint::EulerRotation, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::EulerRotation, x_), - PROTOBUF_FIELD_OFFSET(::EulerRotation, y_), - PROTOBUF_FIELD_OFFSET(::EulerRotation, z_), + PROTOBUF_FIELD_OFFSET(::waypoint::EulerRotation, x_), + PROTOBUF_FIELD_OFFSET(::waypoint::EulerRotation, y_), + PROTOBUF_FIELD_OFFSET(::waypoint::EulerRotation, z_), ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::Trigger, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(::waypoint::Trigger, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::Trigger, auto_trigger_), - PROTOBUF_FIELD_OFFSET(::Trigger, bounce_delay_), - PROTOBUF_FIELD_OFFSET(::Trigger, bounce_duration_), - PROTOBUF_FIELD_OFFSET(::Trigger, bounce_height_), - PROTOBUF_FIELD_OFFSET(::Trigger, action_copy_clipboard_), - PROTOBUF_FIELD_OFFSET(::Trigger, action_copy_message_), - PROTOBUF_FIELD_OFFSET(::Trigger, has_countdown_), - PROTOBUF_FIELD_OFFSET(::Trigger, action_info_message_), - PROTOBUF_FIELD_OFFSET(::Trigger, invert_display_), - PROTOBUF_FIELD_OFFSET(::Trigger, reset_length_), - PROTOBUF_FIELD_OFFSET(::Trigger, range_), - PROTOBUF_FIELD_OFFSET(::Trigger, action_hide_category_), - PROTOBUF_FIELD_OFFSET(::Trigger, action_show_category_), - PROTOBUF_FIELD_OFFSET(::Trigger, action_toggle_category_), + PROTOBUF_FIELD_OFFSET(::waypoint::Trigger, auto_trigger_), + PROTOBUF_FIELD_OFFSET(::waypoint::Trigger, bounce_delay_), + PROTOBUF_FIELD_OFFSET(::waypoint::Trigger, bounce_duration_), + PROTOBUF_FIELD_OFFSET(::waypoint::Trigger, bounce_height_), + PROTOBUF_FIELD_OFFSET(::waypoint::Trigger, action_copy_clipboard_), + PROTOBUF_FIELD_OFFSET(::waypoint::Trigger, action_copy_message_), + PROTOBUF_FIELD_OFFSET(::waypoint::Trigger, has_countdown_), + PROTOBUF_FIELD_OFFSET(::waypoint::Trigger, action_info_message_), + PROTOBUF_FIELD_OFFSET(::waypoint::Trigger, invert_display_), + PROTOBUF_FIELD_OFFSET(::waypoint::Trigger, reset_length_), + PROTOBUF_FIELD_OFFSET(::waypoint::Trigger, range_), + PROTOBUF_FIELD_OFFSET(::waypoint::Trigger, action_hide_category_), + PROTOBUF_FIELD_OFFSET(::waypoint::Trigger, action_show_category_), + PROTOBUF_FIELD_OFFSET(::waypoint::Trigger, action_toggle_category_), ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::GUID, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(::waypoint::GUID, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::GUID, guid_), + PROTOBUF_FIELD_OFFSET(::waypoint::GUID, guid_), ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::Color, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(::waypoint::Color, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::Color, hex_), + PROTOBUF_FIELD_OFFSET(::waypoint::Color, hex_), ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::FestivalFilter, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(::waypoint::FestivalFilter, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::FestivalFilter, dragonbash_), - PROTOBUF_FIELD_OFFSET(::FestivalFilter, festival_of_the_four_winds_), - PROTOBUF_FIELD_OFFSET(::FestivalFilter, halloween_), - PROTOBUF_FIELD_OFFSET(::FestivalFilter, lunar_new_year_), - PROTOBUF_FIELD_OFFSET(::FestivalFilter, super_adventure_festival_), - PROTOBUF_FIELD_OFFSET(::FestivalFilter, wintersday_), - PROTOBUF_FIELD_OFFSET(::FestivalFilter, none_), + PROTOBUF_FIELD_OFFSET(::waypoint::FestivalFilter, dragonbash_), + PROTOBUF_FIELD_OFFSET(::waypoint::FestivalFilter, festival_of_the_four_winds_), + PROTOBUF_FIELD_OFFSET(::waypoint::FestivalFilter, halloween_), + PROTOBUF_FIELD_OFFSET(::waypoint::FestivalFilter, lunar_new_year_), + PROTOBUF_FIELD_OFFSET(::waypoint::FestivalFilter, super_adventure_festival_), + PROTOBUF_FIELD_OFFSET(::waypoint::FestivalFilter, wintersday_), + PROTOBUF_FIELD_OFFSET(::waypoint::FestivalFilter, none_), ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::MapTypeFilter, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(::waypoint::MapTypeFilter, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::MapTypeFilter, unknown_map_), - PROTOBUF_FIELD_OFFSET(::MapTypeFilter, redirect_map_), - PROTOBUF_FIELD_OFFSET(::MapTypeFilter, character_create_map_), - PROTOBUF_FIELD_OFFSET(::MapTypeFilter, pvp_map_), - PROTOBUF_FIELD_OFFSET(::MapTypeFilter, gvg_map_), - PROTOBUF_FIELD_OFFSET(::MapTypeFilter, instance_map_), - PROTOBUF_FIELD_OFFSET(::MapTypeFilter, public_map_), - PROTOBUF_FIELD_OFFSET(::MapTypeFilter, tournament_map_), - PROTOBUF_FIELD_OFFSET(::MapTypeFilter, tutorial_map_), - PROTOBUF_FIELD_OFFSET(::MapTypeFilter, user_tournament_map_), - PROTOBUF_FIELD_OFFSET(::MapTypeFilter, center_map_), - PROTOBUF_FIELD_OFFSET(::MapTypeFilter, eternal_battlegrounds_map_), - PROTOBUF_FIELD_OFFSET(::MapTypeFilter, bluehome_map_), - PROTOBUF_FIELD_OFFSET(::MapTypeFilter, blue_borderlands_map_), - PROTOBUF_FIELD_OFFSET(::MapTypeFilter, green_home_map_), - PROTOBUF_FIELD_OFFSET(::MapTypeFilter, green_borderlands_map_), - PROTOBUF_FIELD_OFFSET(::MapTypeFilter, red_home_map_), - PROTOBUF_FIELD_OFFSET(::MapTypeFilter, red_borderlands_map_), - PROTOBUF_FIELD_OFFSET(::MapTypeFilter, fortunes_vale_map_), - PROTOBUF_FIELD_OFFSET(::MapTypeFilter, jump_puzzle_map_), - PROTOBUF_FIELD_OFFSET(::MapTypeFilter, obsidian_sanctum_map_), - PROTOBUF_FIELD_OFFSET(::MapTypeFilter, edge_of_the_mists_map_), - PROTOBUF_FIELD_OFFSET(::MapTypeFilter, public_mini_map_), - PROTOBUF_FIELD_OFFSET(::MapTypeFilter, wvw_lounge_map_), + PROTOBUF_FIELD_OFFSET(::waypoint::MapTypeFilter, unknown_map_), + PROTOBUF_FIELD_OFFSET(::waypoint::MapTypeFilter, redirect_map_), + PROTOBUF_FIELD_OFFSET(::waypoint::MapTypeFilter, character_create_map_), + PROTOBUF_FIELD_OFFSET(::waypoint::MapTypeFilter, pvp_map_), + PROTOBUF_FIELD_OFFSET(::waypoint::MapTypeFilter, gvg_map_), + PROTOBUF_FIELD_OFFSET(::waypoint::MapTypeFilter, instance_map_), + PROTOBUF_FIELD_OFFSET(::waypoint::MapTypeFilter, public_map_), + PROTOBUF_FIELD_OFFSET(::waypoint::MapTypeFilter, tournament_map_), + PROTOBUF_FIELD_OFFSET(::waypoint::MapTypeFilter, tutorial_map_), + PROTOBUF_FIELD_OFFSET(::waypoint::MapTypeFilter, user_tournament_map_), + PROTOBUF_FIELD_OFFSET(::waypoint::MapTypeFilter, center_map_), + PROTOBUF_FIELD_OFFSET(::waypoint::MapTypeFilter, eternal_battlegrounds_map_), + PROTOBUF_FIELD_OFFSET(::waypoint::MapTypeFilter, bluehome_map_), + PROTOBUF_FIELD_OFFSET(::waypoint::MapTypeFilter, blue_borderlands_map_), + PROTOBUF_FIELD_OFFSET(::waypoint::MapTypeFilter, green_home_map_), + PROTOBUF_FIELD_OFFSET(::waypoint::MapTypeFilter, green_borderlands_map_), + PROTOBUF_FIELD_OFFSET(::waypoint::MapTypeFilter, red_home_map_), + PROTOBUF_FIELD_OFFSET(::waypoint::MapTypeFilter, red_borderlands_map_), + PROTOBUF_FIELD_OFFSET(::waypoint::MapTypeFilter, fortunes_vale_map_), + PROTOBUF_FIELD_OFFSET(::waypoint::MapTypeFilter, jump_puzzle_map_), + PROTOBUF_FIELD_OFFSET(::waypoint::MapTypeFilter, obsidian_sanctum_map_), + PROTOBUF_FIELD_OFFSET(::waypoint::MapTypeFilter, edge_of_the_mists_map_), + PROTOBUF_FIELD_OFFSET(::waypoint::MapTypeFilter, public_mini_map_), + PROTOBUF_FIELD_OFFSET(::waypoint::MapTypeFilter, wvw_lounge_map_), ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::MountFilter, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(::waypoint::MountFilter, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::MountFilter, raptor_), - PROTOBUF_FIELD_OFFSET(::MountFilter, springer_), - PROTOBUF_FIELD_OFFSET(::MountFilter, skimmer_), - PROTOBUF_FIELD_OFFSET(::MountFilter, jackal_), - PROTOBUF_FIELD_OFFSET(::MountFilter, griffon_), - PROTOBUF_FIELD_OFFSET(::MountFilter, roller_beetle_), - PROTOBUF_FIELD_OFFSET(::MountFilter, warclaw_), - PROTOBUF_FIELD_OFFSET(::MountFilter, skyscalee_), - PROTOBUF_FIELD_OFFSET(::MountFilter, skiff_), - PROTOBUF_FIELD_OFFSET(::MountFilter, seige_turtle_), + PROTOBUF_FIELD_OFFSET(::waypoint::MountFilter, raptor_), + PROTOBUF_FIELD_OFFSET(::waypoint::MountFilter, springer_), + PROTOBUF_FIELD_OFFSET(::waypoint::MountFilter, skimmer_), + PROTOBUF_FIELD_OFFSET(::waypoint::MountFilter, jackal_), + PROTOBUF_FIELD_OFFSET(::waypoint::MountFilter, griffon_), + PROTOBUF_FIELD_OFFSET(::waypoint::MountFilter, roller_beetle_), + PROTOBUF_FIELD_OFFSET(::waypoint::MountFilter, warclaw_), + PROTOBUF_FIELD_OFFSET(::waypoint::MountFilter, skyscalee_), + PROTOBUF_FIELD_OFFSET(::waypoint::MountFilter, skiff_), + PROTOBUF_FIELD_OFFSET(::waypoint::MountFilter, seige_turtle_), ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::ProfessionFilter, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(::waypoint::ProfessionFilter, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::ProfessionFilter, guardian_), - PROTOBUF_FIELD_OFFSET(::ProfessionFilter, warrior_), - PROTOBUF_FIELD_OFFSET(::ProfessionFilter, engineer_), - PROTOBUF_FIELD_OFFSET(::ProfessionFilter, ranger_), - PROTOBUF_FIELD_OFFSET(::ProfessionFilter, thief_), - PROTOBUF_FIELD_OFFSET(::ProfessionFilter, elementalist_), - PROTOBUF_FIELD_OFFSET(::ProfessionFilter, mesmer_), - PROTOBUF_FIELD_OFFSET(::ProfessionFilter, necromancer_), - PROTOBUF_FIELD_OFFSET(::ProfessionFilter, revenantnt_), + PROTOBUF_FIELD_OFFSET(::waypoint::ProfessionFilter, guardian_), + PROTOBUF_FIELD_OFFSET(::waypoint::ProfessionFilter, warrior_), + PROTOBUF_FIELD_OFFSET(::waypoint::ProfessionFilter, engineer_), + PROTOBUF_FIELD_OFFSET(::waypoint::ProfessionFilter, ranger_), + PROTOBUF_FIELD_OFFSET(::waypoint::ProfessionFilter, thief_), + PROTOBUF_FIELD_OFFSET(::waypoint::ProfessionFilter, elementalist_), + PROTOBUF_FIELD_OFFSET(::waypoint::ProfessionFilter, mesmer_), + PROTOBUF_FIELD_OFFSET(::waypoint::ProfessionFilter, necromancer_), + PROTOBUF_FIELD_OFFSET(::waypoint::ProfessionFilter, revenantnt_), ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, elementalist_tempest_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, engineer_scrapper_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, guardian_dragonhunter_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, mesmer_chronomancer_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, necromancer_reaper_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, ranger_druid_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, revenant_herald_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, thief_daredevil_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, warrior_berserker_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, elementalist_weaver_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, engineer_holosmith_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, guardian_firebrand_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, mesmer_mirage_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, necromancer_scourge_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, ranger_soulbeast_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, revenant_renegade_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, thief_deadeye_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, warrior_spellbreaker_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, elmentalist_catalyst_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, engineer_mechanist_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, guardian_willbender_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, mesmer_virtuoso_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, necromancer_harbinger_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, ranger_untamed_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, revenant_vindicator_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, thief_specter_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, warrior_bladesworn_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, elementalist_air_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, elementalist_arcane_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, elementalist_earth_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, elementalist_fire_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, elementalist_water_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, engineer_alchemy_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, engineer_explosives_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, engineer_firearms_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, engineer_inventions_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, engineer_tools_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, guardian_honor_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, guardian_radiance_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, guardian_valor_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, guardian_virtues_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, guardian_zeal_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, mesmer_chaos_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, mesmer_domination_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, mesmer_dueling_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, mesmer_illusions_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, mesmer_inspiration_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, necromancer_blood_magic_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, necromancer_curses_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, necromancer_death_magic_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, necromancer_soul_reaping_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, necromancer_spite_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, ranger_beastmastery_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, ranger_marksmanship_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, ranger_nature_magic_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, ranger_skirmishing_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, ranger_wilderness_survival_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, revenant_corruption_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, revenant_devastation_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, revenant_invocation_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, revenant_retribution_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, revenant_salvation_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, thief_acrobatics_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, thief_critical_strikes_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, thief_deadly_arts_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, thief_shadow_arts_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, thief_trickery_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, warrior_arms_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, warrior_defense_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, warrior_discipline_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, warrior_strength_), - PROTOBUF_FIELD_OFFSET(::SpecializationFilter, warrior_tactics_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, elementalist_tempest_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, engineer_scrapper_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, guardian_dragonhunter_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, mesmer_chronomancer_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, necromancer_reaper_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, ranger_druid_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, revenant_herald_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, thief_daredevil_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, warrior_berserker_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, elementalist_weaver_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, engineer_holosmith_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, guardian_firebrand_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, mesmer_mirage_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, necromancer_scourge_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, ranger_soulbeast_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, revenant_renegade_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, thief_deadeye_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, warrior_spellbreaker_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, elmentalist_catalyst_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, engineer_mechanist_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, guardian_willbender_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, mesmer_virtuoso_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, necromancer_harbinger_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, ranger_untamed_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, revenant_vindicator_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, thief_specter_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, warrior_bladesworn_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, elementalist_air_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, elementalist_arcane_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, elementalist_earth_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, elementalist_fire_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, elementalist_water_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, engineer_alchemy_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, engineer_explosives_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, engineer_firearms_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, engineer_inventions_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, engineer_tools_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, guardian_honor_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, guardian_radiance_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, guardian_valor_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, guardian_virtues_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, guardian_zeal_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, mesmer_chaos_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, mesmer_domination_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, mesmer_dueling_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, mesmer_illusions_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, mesmer_inspiration_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, necromancer_blood_magic_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, necromancer_curses_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, necromancer_death_magic_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, necromancer_soul_reaping_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, necromancer_spite_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, ranger_beastmastery_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, ranger_marksmanship_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, ranger_nature_magic_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, ranger_skirmishing_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, ranger_wilderness_survival_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, revenant_corruption_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, revenant_devastation_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, revenant_invocation_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, revenant_retribution_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, revenant_salvation_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, thief_acrobatics_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, thief_critical_strikes_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, thief_deadly_arts_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, thief_shadow_arts_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, thief_trickery_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, warrior_arms_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, warrior_defense_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, warrior_discipline_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, warrior_strength_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, warrior_tactics_), ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::SpeciesFilter, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpeciesFilter, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::SpeciesFilter, asura_), - PROTOBUF_FIELD_OFFSET(::SpeciesFilter, charr_), - PROTOBUF_FIELD_OFFSET(::SpeciesFilter, human_), - PROTOBUF_FIELD_OFFSET(::SpeciesFilter, norn_), - PROTOBUF_FIELD_OFFSET(::SpeciesFilter, sylvari_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpeciesFilter, asura_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpeciesFilter, charr_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpeciesFilter, human_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpeciesFilter, norn_), + PROTOBUF_FIELD_OFFSET(::waypoint::SpeciesFilter, sylvari_), ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::TrailData, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(::waypoint::TrailData, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::TrailData, trail_data_), + PROTOBUF_FIELD_OFFSET(::waypoint::TrailData, trail_data_), }; static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - { 0, 7, sizeof(::Category_ChildrenEntry_DoNotUse)}, - { 9, -1, sizeof(::Category)}, - { 20, -1, sizeof(::Icon)}, - { 51, -1, sizeof(::Trail)}, - { 80, -1, sizeof(::Texture)}, - { 86, -1, sizeof(::Position)}, - { 94, -1, sizeof(::EulerRotation)}, - { 102, -1, sizeof(::Trigger)}, - { 121, -1, sizeof(::GUID)}, - { 127, -1, sizeof(::Color)}, - { 133, -1, sizeof(::FestivalFilter)}, - { 145, -1, sizeof(::MapTypeFilter)}, - { 174, -1, sizeof(::MountFilter)}, - { 189, -1, sizeof(::ProfessionFilter)}, - { 203, -1, sizeof(::SpecializationFilter)}, - { 280, -1, sizeof(::SpeciesFilter)}, - { 290, -1, sizeof(::TrailData)}, + { 0, 7, sizeof(::waypoint::Category_ChildrenEntry_DoNotUse)}, + { 9, -1, sizeof(::waypoint::Category)}, + { 20, -1, sizeof(::waypoint::Icon)}, + { 51, -1, sizeof(::waypoint::Trail)}, + { 80, -1, sizeof(::waypoint::Texture)}, + { 86, -1, sizeof(::waypoint::Position)}, + { 94, -1, sizeof(::waypoint::EulerRotation)}, + { 102, -1, sizeof(::waypoint::Trigger)}, + { 121, -1, sizeof(::waypoint::GUID)}, + { 127, -1, sizeof(::waypoint::Color)}, + { 133, -1, sizeof(::waypoint::FestivalFilter)}, + { 145, -1, sizeof(::waypoint::MapTypeFilter)}, + { 174, -1, sizeof(::waypoint::MountFilter)}, + { 189, -1, sizeof(::waypoint::ProfessionFilter)}, + { 203, -1, sizeof(::waypoint::SpecializationFilter)}, + { 280, -1, sizeof(::waypoint::SpeciesFilter)}, + { 290, -1, sizeof(::waypoint::TrailData)}, }; static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { - reinterpret_cast(&::_Category_ChildrenEntry_DoNotUse_default_instance_), - reinterpret_cast(&::_Category_default_instance_), - reinterpret_cast(&::_Icon_default_instance_), - reinterpret_cast(&::_Trail_default_instance_), - reinterpret_cast(&::_Texture_default_instance_), - reinterpret_cast(&::_Position_default_instance_), - reinterpret_cast(&::_EulerRotation_default_instance_), - reinterpret_cast(&::_Trigger_default_instance_), - reinterpret_cast(&::_GUID_default_instance_), - reinterpret_cast(&::_Color_default_instance_), - reinterpret_cast(&::_FestivalFilter_default_instance_), - reinterpret_cast(&::_MapTypeFilter_default_instance_), - reinterpret_cast(&::_MountFilter_default_instance_), - reinterpret_cast(&::_ProfessionFilter_default_instance_), - reinterpret_cast(&::_SpecializationFilter_default_instance_), - reinterpret_cast(&::_SpeciesFilter_default_instance_), - reinterpret_cast(&::_TrailData_default_instance_), + reinterpret_cast(&::waypoint::_Category_ChildrenEntry_DoNotUse_default_instance_), + reinterpret_cast(&::waypoint::_Category_default_instance_), + reinterpret_cast(&::waypoint::_Icon_default_instance_), + reinterpret_cast(&::waypoint::_Trail_default_instance_), + reinterpret_cast(&::waypoint::_Texture_default_instance_), + reinterpret_cast(&::waypoint::_Position_default_instance_), + reinterpret_cast(&::waypoint::_EulerRotation_default_instance_), + reinterpret_cast(&::waypoint::_Trigger_default_instance_), + reinterpret_cast(&::waypoint::_GUID_default_instance_), + reinterpret_cast(&::waypoint::_Color_default_instance_), + reinterpret_cast(&::waypoint::_FestivalFilter_default_instance_), + reinterpret_cast(&::waypoint::_MapTypeFilter_default_instance_), + reinterpret_cast(&::waypoint::_MountFilter_default_instance_), + reinterpret_cast(&::waypoint::_ProfessionFilter_default_instance_), + reinterpret_cast(&::waypoint::_SpecializationFilter_default_instance_), + reinterpret_cast(&::waypoint::_SpeciesFilter_default_instance_), + reinterpret_cast(&::waypoint::_TrailData_default_instance_), }; -const char descriptor_table_protodef_generators_2fproto_5ftemplates_2fnode_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = - "\n%generators/proto_templates/node.proto\"" - "\335\001\n\010Category\022\032\n\022default_visibility\030\001 \001(\010" - "\022\024\n\014display_name\030\002 \001(\t\022\024\n\014is_separator\030\003" - " \001(\010\022\014\n\004name\030\004 \001(\t\022\024\n\014tooltip_name\030\005 \001(\t" - "\022)\n\010children\030\006 \003(\0132\027.Category.ChildrenEn" - "try\032:\n\rChildrenEntry\022\013\n\003key\030\001 \001(\t\022\030\n\005val" - "ue\030\002 \001(\0132\t.Category:\0028\001\"\332\005\n\004Icon\022\033\n\010cate" - "gory\030\001 \001(\0132\t.Category\022\031\n\007texture\030\002 \001(\0132\010" - ".Texture\022\023\n\004guid\030\003 \001(\0132\005.GUID\022\016\n\006map_id\030" - "\004 \001(\005\022\031\n\021distance_fade_end\030\005 \001(\002\022\033\n\023dist" - "ance_fade_start\030\006 \001(\002\022\025\n\rheight_offset\030\007" - " \001(\002\022\033\n\010position\030\010 \001(\0132\t.Position\022&\n\016res" - "et_behavior\030\t \001(\0162\016.ResetBehavior\022\031\n\007tri" - "gger\030\n \001(\0132\010.Trigger\022\027\n\017achievement_bit\030" - "\020 \001(\007\022\026\n\016achievement_id\030\021 \001(\005\022\r\n\005alpha\030\022" - " \001(\002\022\020\n\010can_fade\030\023 \001(\010\022\036\n\026minimum_size_o" - "n_screen\030\024 \001(\005\022\030\n\020map_display_size\030\025 \001(\005" - "\022\036\n\026maximum_size_on_screen\030\026 \001(\005\022\036\n\026scal" - "e_on_map_with_zoom\030\027 \001(\010\022\027\n\017tip_descript" - "ion\030\030 \001(\t\022\020\n\010tip_name\030\031 \001(\t\022\033\n\022__tentati" - "ve__scale\030\200\020 \001(\002\022#\n\032__tentative__render_" - "ingame\030\201\020 \001(\010\022#\n\032__tentative__render_on_" - "map\030\202\020 \001(\010\022\'\n\036__tentative__render_on_min" - "imap\030\203\020 \001(\010\022\032\n\021bhdraft__schedule\030\204\020 \001(\t\022" - "#\n\032bhdraft__schedule_duration\030\205\020 \001(\002\"\310\005\n" - "\005Trail\022\033\n\010category\030\001 \001(\0132\t.Category\022\031\n\007t" - "exture\030\002 \001(\0132\010.Texture\022\023\n\004guid\030\003 \001(\0132\005.G" - "UID\022\016\n\006map_id\030\004 \001(\005\022\031\n\021distance_fade_end" - "\030\005 \001(\002\022\033\n\023distance_fade_start\030\006 \001(\002\022\036\n\nt" - "rail_data\030\007 \001(\0132\n.TrailData\022\027\n\017animation" - "_speed\030\010 \001(\002\022&\n\016cull_chirality\030\t \001(\0162\016.C" - "ullChirality\022\027\n\017achievement_bit\030\020 \001(\007\022\026\n" - "\016achievement_id\030\021 \001(\005\022\r\n\005alpha\030\022 \001(\002\022\020\n\010" - "can_fade\030\023 \001(\010\022\017\n\007is_wall\030\026 \001(\010\022\031\n\021bhdra" - "ft__schedule\030\027 \001(\t\022\"\n\032bhdraft__schedule_" - "duration\030\030 \001(\002\022\r\n\005scale\030\031 \001(\002\022\025\n\005color\030\032" - " \001(\0132\006.Color\022(\n\017festival_filter\030\033 \001(\0132\017." - "FestivalFilter\022\'\n\017map_type_filter\030\034 \001(\0132" - "\016.MapTypeFilter\022\"\n\014mount_filter\030\035 \001(\0132\014." - "MountFilter\022,\n\021profession_filter\030\036 \001(\0132\021" - ".ProfessionFilter\0224\n\025specialization_filt" - "er\030\037 \001(\0132\025.SpecializationFilter\022&\n\016speci" - "es_filter\030 \001(\0132\016.SpeciesFilter\"\027\n\007Textu" - "re\022\014\n\004path\030\001 \001(\t\"+\n\010Position\022\t\n\001x\030\001 \001(\002\022" - "\t\n\001y\030\002 \001(\002\022\t\n\001z\030\003 \001(\002\"0\n\rEulerRotation\022\t" - "\n\001x\030\001 \001(\002\022\t\n\001y\030\002 \001(\002\022\t\n\001z\030\003 \001(\002\"\217\003\n\007Trig" - "ger\022\024\n\014auto_trigger\030\001 \001(\010\022\024\n\014bounce_dela" - "y\030\002 \001(\002\022\027\n\017bounce_duration\030\003 \001(\002\022\025\n\rboun" - "ce_height\030\004 \001(\002\022\035\n\025action_copy_clipboard" - "\030\005 \001(\t\022\033\n\023action_copy_message\030\006 \001(\t\022\025\n\rh" - "as_countdown\030\007 \001(\010\022\033\n\023action_info_messag" - "e\030\010 \001(\t\022\026\n\016invert_display\030\t \001(\010\022\024\n\014reset" - "_length\030\n \001(\002\022\r\n\005range\030\013 \001(\002\022\'\n\024action_h" - "ide_category\030\014 \001(\0132\t.Category\022\'\n\024action_" - "show_category\030\r \001(\0132\t.Category\022)\n\026action" - "_toggle_category\030\016 \001(\0132\t.Category\"\024\n\004GUI" - "D\022\014\n\004guid\030\001 \001(\005\"\024\n\005Color\022\013\n\003hex\030\001 \001(\t\"\267\001" - "\n\016FestivalFilter\022\022\n\ndragonbash\030\001 \001(\010\022\"\n\032" - "festival_of_the_four_winds\030\002 \001(\010\022\021\n\thall" - "oween\030\003 \001(\010\022\026\n\016lunar_new_year\030\004 \001(\010\022 \n\030s" - "uper_adventure_festival\030\005 \001(\010\022\022\n\nwinters" - "day\030\006 \001(\010\022\014\n\004none\030\007 \001(\010\"\346\004\n\rMapTypeFilte" - "r\022\023\n\013unknown_map\030\001 \001(\010\022\024\n\014redirect_map\030\002" - " \001(\010\022\034\n\024character_create_map\030\003 \001(\010\022\017\n\007pv" - "p_map\030\004 \001(\010\022\017\n\007gvg_map\030\005 \001(\010\022\024\n\014instance" - "_map\030\006 \001(\010\022\022\n\npublic_map\030\007 \001(\010\022\026\n\016tourna" - "ment_map\030\010 \001(\010\022\024\n\014tutorial_map\030\t \001(\010\022\033\n\023" - "user_tournament_map\030\n \001(\010\022\022\n\ncenter_map\030" - "\013 \001(\010\022!\n\031eternal_battlegrounds_map\030\014 \001(\010" - "\022\024\n\014bluehome_map\030\r \001(\010\022\034\n\024blue_borderlan" - "ds_map\030\016 \001(\010\022\026\n\016green_home_map\030\017 \001(\010\022\035\n\025" - "green_borderlands_map\030\020 \001(\010\022\024\n\014red_home_" - "map\030\021 \001(\010\022\033\n\023red_borderlands_map\030\022 \001(\010\022\031" - "\n\021fortunes_vale_map\030\023 \001(\010\022\027\n\017jump_puzzle" - "_map\030\024 \001(\010\022\034\n\024obsidian_sanctum_map\030\025 \001(\010" - "\022\035\n\025edge_of_the_mists_map\030\026 \001(\010\022\027\n\017publi" - "c_mini_map\030\027 \001(\010\022\026\n\016wvw_lounge_map\030\030 \001(\010" - "\"\301\001\n\013MountFilter\022\016\n\006raptor\030\001 \001(\010\022\020\n\010spri" - "nger\030\002 \001(\010\022\017\n\007skimmer\030\003 \001(\010\022\016\n\006jackal\030\004 " - "\001(\010\022\017\n\007griffon\030\005 \001(\010\022\025\n\rroller_beetle\030\006 " - "\001(\010\022\017\n\007warclaw\030\007 \001(\010\022\021\n\tskyscalee\030\010 \001(\010\022" - "\r\n\005skiff\030\t \001(\010\022\024\n\014seige_turtle\030\n \001(\010\"\265\001\n" - "\020ProfessionFilter\022\020\n\010guardian\030\001 \001(\010\022\017\n\007w" - "arrior\030\002 \001(\010\022\020\n\010engineer\030\003 \001(\010\022\016\n\006ranger" - "\030\004 \001(\010\022\r\n\005thief\030\005 \001(\010\022\024\n\014elementalist\030\006 " - "\001(\010\022\016\n\006mesmer\030\007 \001(\010\022\023\n\013necromancer\030\010 \001(\010" - "\022\022\n\nrevenantnt\030\t \001(\010\"\312\017\n\024SpecializationF" - "ilter\022\034\n\024elementalist_tempest\030\001 \001(\010\022\031\n\021e" - "ngineer_scrapper\030\002 \001(\010\022\035\n\025guardian_drago" - "nhunter\030\003 \001(\010\022\033\n\023mesmer_chronomancer\030\004 \001" - "(\010\022\032\n\022necromancer_reaper\030\005 \001(\010\022\024\n\014ranger" - "_druid\030\006 \001(\010\022\027\n\017revenant_herald\030\007 \001(\010\022\027\n" - "\017thief_daredevil\030\010 \001(\010\022\031\n\021warrior_berser" - "ker\030\t \001(\010\022\033\n\023elementalist_weaver\030\n \001(\010\022\032" - "\n\022engineer_holosmith\030\013 \001(\010\022\032\n\022guardian_f" - "irebrand\030\014 \001(\010\022\025\n\rmesmer_mirage\030\r \001(\010\022\033\n" - "\023necromancer_scourge\030\016 \001(\010\022\030\n\020ranger_sou" - "lbeast\030\017 \001(\010\022\031\n\021revenant_renegade\030\020 \001(\010\022" - "\025\n\rthief_deadeye\030\021 \001(\010\022\034\n\024warrior_spellb" - "reaker\030\022 \001(\010\022\034\n\024elmentalist_catalyst\030\023 \001" - "(\010\022\032\n\022engineer_mechanist\030\024 \001(\010\022\033\n\023guardi" - "an_willbender\030\025 \001(\010\022\027\n\017mesmer_virtuoso\030\026" - " \001(\010\022\035\n\025necromancer_harbinger\030\027 \001(\010\022\026\n\016r" - "anger_untamed\030\030 \001(\010\022\033\n\023revenant_vindicat" - "or\030\031 \001(\010\022\025\n\rthief_specter\030\032 \001(\010\022\032\n\022warri" - "or_bladesworn\030\033 \001(\010\022\030\n\020elementalist_air\030" - "\034 \001(\010\022\033\n\023elementalist_arcane\030\035 \001(\010\022\032\n\022el" - "ementalist_earth\030\036 \001(\010\022\031\n\021elementalist_f" - "ire\030\037 \001(\010\022\032\n\022elementalist_water\030 \001(\010\022\030\n" - "\020engineer_alchemy\030! \001(\010\022\033\n\023engineer_expl" - "osives\030\" \001(\010\022\031\n\021engineer_firearms\030# \001(\010\022" - "\033\n\023engineer_inventions\030$ \001(\010\022\026\n\016engineer" - "_tools\030% \001(\010\022\026\n\016guardian_honor\030& \001(\010\022\031\n\021" - "guardian_radiance\030\' \001(\010\022\026\n\016guardian_valo" - "r\030( \001(\010\022\030\n\020guardian_virtues\030) \001(\010\022\025\n\rgua" - "rdian_zeal\030* \001(\010\022\024\n\014mesmer_chaos\030+ \001(\010\022\031" - "\n\021mesmer_domination\030, \001(\010\022\026\n\016mesmer_duel" - "ing\030- \001(\010\022\030\n\020mesmer_illusions\030. \001(\010\022\032\n\022m" - "esmer_inspiration\030/ \001(\010\022\037\n\027necromancer_b" - "lood_magic\0300 \001(\010\022\032\n\022necromancer_curses\0301" - " \001(\010\022\037\n\027necromancer_death_magic\0302 \001(\010\022 \n" - "\030necromancer_soul_reaping\0303 \001(\010\022\031\n\021necro" - "mancer_spite\0304 \001(\010\022\033\n\023ranger_beastmaster" - "y\0305 \001(\010\022\033\n\023ranger_marksmanship\0306 \001(\010\022\033\n\023" - "ranger_nature_magic\0307 \001(\010\022\032\n\022ranger_skir" - "mishing\0308 \001(\010\022\"\n\032ranger_wilderness_survi" - "val\0309 \001(\010\022\033\n\023revenant_corruption\030: \001(\010\022\034" - "\n\024revenant_devastation\030; \001(\010\022\033\n\023revenant" - "_invocation\030< \001(\010\022\034\n\024revenant_retributio" - "n\030= \001(\010\022\032\n\022revenant_salvation\030> \001(\010\022\030\n\020t" - "hief_acrobatics\030\? \001(\010\022\036\n\026thief_critical_" - "strikes\030@ \001(\010\022\031\n\021thief_deadly_arts\030A \001(\010" - "\022\031\n\021thief_shadow_arts\030B \001(\010\022\026\n\016thief_tri" - "ckery\030C \001(\010\022\024\n\014warrior_arms\030D \001(\010\022\027\n\017war" - "rior_defense\030E \001(\010\022\032\n\022warrior_discipline" - "\030F \001(\010\022\030\n\020warrior_strength\030G \001(\010\022\027\n\017warr" - "ior_tactics\030H \001(\010\"[\n\rSpeciesFilter\022\r\n\005as" - "ura\030\001 \001(\010\022\r\n\005charr\030\002 \001(\010\022\r\n\005human\030\003 \001(\010\022" - "\014\n\004norn\030\004 \001(\010\022\017\n\007sylvari\030\005 \001(\010\"\037\n\tTrailD" - "ata\022\022\n\ntrail_data\030\001 \001(\t*\?\n\rCullChirality" - "\022\010\n\004none\020\000\022\r\n\tclockwise\020\001\022\025\n\021counter_clo" - "ckwise\020\002*\257\001\n\rResetBehavior\022\022\n\016always_vis" - "ible\020\000\022\016\n\nmap_change\020\001\022\017\n\013daily_reset\020\002\022" - "\t\n\005never\020\003\022\t\n\005timer\020\004\022\r\n\tmap_reset\020\005\022\023\n\017" - "instance_change\020\006\022\035\n\031daily_reset_per_cha" - "racter\020\007\022\020\n\014weekly_reset\020\010b\006proto3" +const char descriptor_table_protodef_waypoint_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = + "\n\016waypoint.proto\022\010waypoint\"\357\001\n\010Category\022" + "\032\n\022default_visibility\030\001 \001(\010\022\024\n\014display_n" + "ame\030\002 \001(\t\022\024\n\014is_separator\030\003 \001(\010\022\014\n\004name\030" + "\004 \001(\t\022\024\n\014tooltip_name\030\005 \001(\t\0222\n\010children\030" + "\006 \003(\0132 .waypoint.Category.ChildrenEntry\032" + "C\n\rChildrenEntry\022\013\n\003key\030\001 \001(\t\022!\n\005value\030\002" + " \001(\0132\022.waypoint.Category:\0028\001\"\220\006\n\004Icon\022$\n" + "\010category\030\001 \001(\0132\022.waypoint.Category\022\"\n\007t" + "exture\030\002 \001(\0132\021.waypoint.Texture\022\034\n\004guid\030" + "\003 \001(\0132\016.waypoint.GUID\022\016\n\006map_id\030\004 \001(\005\022\031\n" + "\021distance_fade_end\030\005 \001(\002\022\033\n\023distance_fad" + "e_start\030\006 \001(\002\022\025\n\rheight_offset\030\007 \001(\002\022$\n\010" + "position\030\010 \001(\0132\022.waypoint.Position\022/\n\016re" + "set_behavior\030\t \001(\0162\027.waypoint.ResetBehav" + "ior\022\"\n\007trigger\030\n \001(\0132\021.waypoint.Trigger\022" + "\027\n\017achievement_bit\030\020 \001(\007\022\026\n\016achievement_" + "id\030\021 \001(\005\022\r\n\005alpha\030\022 \001(\002\022\020\n\010can_fade\030\023 \001(" + "\010\022\036\n\026minimum_size_on_screen\030\024 \001(\005\022\030\n\020map" + "_display_size\030\025 \001(\005\022\036\n\026maximum_size_on_s" + "creen\030\026 \001(\005\022\036\n\026scale_on_map_with_zoom\030\027 " + "\001(\010\022\027\n\017tip_description\030\030 \001(\t\022\020\n\010tip_name" + "\030\031 \001(\t\022\033\n\022__tentative__scale\030\200\020 \001(\002\022#\n\032_" + "_tentative__render_ingame\030\201\020 \001(\010\022#\n\032__te" + "ntative__render_on_map\030\202\020 \001(\010\022\'\n\036__tenta" + "tive__render_on_minimap\030\203\020 \001(\010\022\032\n\021bhdraf" + "t__schedule\030\204\020 \001(\t\022#\n\032bhdraft__schedule_" + "duration\030\205\020 \001(\002\"\264\006\n\005Trail\022$\n\010category\030\001 " + "\001(\0132\022.waypoint.Category\022\"\n\007texture\030\002 \001(\013" + "2\021.waypoint.Texture\022\034\n\004guid\030\003 \001(\0132\016.wayp" + "oint.GUID\022\016\n\006map_id\030\004 \001(\005\022\031\n\021distance_fa" + "de_end\030\005 \001(\002\022\033\n\023distance_fade_start\030\006 \001(" + "\002\022\'\n\ntrail_data\030\007 \001(\0132\023.waypoint.TrailDa" + "ta\022\027\n\017animation_speed\030\010 \001(\002\022/\n\016cull_chir" + "ality\030\t \001(\0162\027.waypoint.CullChirality\022\027\n\017" + "achievement_bit\030\020 \001(\007\022\026\n\016achievement_id\030" + "\021 \001(\005\022\r\n\005alpha\030\022 \001(\002\022\020\n\010can_fade\030\023 \001(\010\022\017" + "\n\007is_wall\030\026 \001(\010\022\031\n\021bhdraft__schedule\030\027 \001" + "(\t\022\"\n\032bhdraft__schedule_duration\030\030 \001(\002\022\r" + "\n\005scale\030\031 \001(\002\022\036\n\005color\030\032 \001(\0132\017.waypoint." + "Color\0221\n\017festival_filter\030\033 \001(\0132\030.waypoin" + "t.FestivalFilter\0220\n\017map_type_filter\030\034 \001(" + "\0132\027.waypoint.MapTypeFilter\022+\n\014mount_filt" + "er\030\035 \001(\0132\025.waypoint.MountFilter\0225\n\021profe" + "ssion_filter\030\036 \001(\0132\032.waypoint.Profession" + "Filter\022=\n\025specialization_filter\030\037 \001(\0132\036." + "waypoint.SpecializationFilter\022/\n\016species" + "_filter\030 \001(\0132\027.waypoint.SpeciesFilter\"\027" + "\n\007Texture\022\014\n\004path\030\001 \001(\t\"+\n\010Position\022\t\n\001x" + "\030\001 \001(\002\022\t\n\001y\030\002 \001(\002\022\t\n\001z\030\003 \001(\002\"0\n\rEulerRot" + "ation\022\t\n\001x\030\001 \001(\002\022\t\n\001y\030\002 \001(\002\022\t\n\001z\030\003 \001(\002\"\252" + "\003\n\007Trigger\022\024\n\014auto_trigger\030\001 \001(\010\022\024\n\014boun" + "ce_delay\030\002 \001(\002\022\027\n\017bounce_duration\030\003 \001(\002\022" + "\025\n\rbounce_height\030\004 \001(\002\022\035\n\025action_copy_cl" + "ipboard\030\005 \001(\t\022\033\n\023action_copy_message\030\006 \001" + "(\t\022\025\n\rhas_countdown\030\007 \001(\010\022\033\n\023action_info" + "_message\030\010 \001(\t\022\026\n\016invert_display\030\t \001(\010\022\024" + "\n\014reset_length\030\n \001(\002\022\r\n\005range\030\013 \001(\002\0220\n\024a" + "ction_hide_category\030\014 \001(\0132\022.waypoint.Cat" + "egory\0220\n\024action_show_category\030\r \001(\0132\022.wa" + "ypoint.Category\0222\n\026action_toggle_categor" + "y\030\016 \001(\0132\022.waypoint.Category\"\024\n\004GUID\022\014\n\004g" + "uid\030\001 \001(\005\"\024\n\005Color\022\013\n\003hex\030\001 \001(\t\"\267\001\n\016Fest" + "ivalFilter\022\022\n\ndragonbash\030\001 \001(\010\022\"\n\032festiv" + "al_of_the_four_winds\030\002 \001(\010\022\021\n\thalloween\030" + "\003 \001(\010\022\026\n\016lunar_new_year\030\004 \001(\010\022 \n\030super_a" + "dventure_festival\030\005 \001(\010\022\022\n\nwintersday\030\006 " + "\001(\010\022\014\n\004none\030\007 \001(\010\"\346\004\n\rMapTypeFilter\022\023\n\013u" + "nknown_map\030\001 \001(\010\022\024\n\014redirect_map\030\002 \001(\010\022\034" + "\n\024character_create_map\030\003 \001(\010\022\017\n\007pvp_map\030" + "\004 \001(\010\022\017\n\007gvg_map\030\005 \001(\010\022\024\n\014instance_map\030\006" + " \001(\010\022\022\n\npublic_map\030\007 \001(\010\022\026\n\016tournament_m" + "ap\030\010 \001(\010\022\024\n\014tutorial_map\030\t \001(\010\022\033\n\023user_t" + "ournament_map\030\n \001(\010\022\022\n\ncenter_map\030\013 \001(\010\022" + "!\n\031eternal_battlegrounds_map\030\014 \001(\010\022\024\n\014bl" + "uehome_map\030\r \001(\010\022\034\n\024blue_borderlands_map" + "\030\016 \001(\010\022\026\n\016green_home_map\030\017 \001(\010\022\035\n\025green_" + "borderlands_map\030\020 \001(\010\022\024\n\014red_home_map\030\021 " + "\001(\010\022\033\n\023red_borderlands_map\030\022 \001(\010\022\031\n\021fort" + "unes_vale_map\030\023 \001(\010\022\027\n\017jump_puzzle_map\030\024" + " \001(\010\022\034\n\024obsidian_sanctum_map\030\025 \001(\010\022\035\n\025ed" + "ge_of_the_mists_map\030\026 \001(\010\022\027\n\017public_mini" + "_map\030\027 \001(\010\022\026\n\016wvw_lounge_map\030\030 \001(\010\"\301\001\n\013M" + "ountFilter\022\016\n\006raptor\030\001 \001(\010\022\020\n\010springer\030\002" + " \001(\010\022\017\n\007skimmer\030\003 \001(\010\022\016\n\006jackal\030\004 \001(\010\022\017\n" + "\007griffon\030\005 \001(\010\022\025\n\rroller_beetle\030\006 \001(\010\022\017\n" + "\007warclaw\030\007 \001(\010\022\021\n\tskyscalee\030\010 \001(\010\022\r\n\005ski" + "ff\030\t \001(\010\022\024\n\014seige_turtle\030\n \001(\010\"\265\001\n\020Profe" + "ssionFilter\022\020\n\010guardian\030\001 \001(\010\022\017\n\007warrior" + "\030\002 \001(\010\022\020\n\010engineer\030\003 \001(\010\022\016\n\006ranger\030\004 \001(\010" + "\022\r\n\005thief\030\005 \001(\010\022\024\n\014elementalist\030\006 \001(\010\022\016\n" + "\006mesmer\030\007 \001(\010\022\023\n\013necromancer\030\010 \001(\010\022\022\n\nre" + "venantnt\030\t \001(\010\"\312\017\n\024SpecializationFilter\022" + "\034\n\024elementalist_tempest\030\001 \001(\010\022\031\n\021enginee" + "r_scrapper\030\002 \001(\010\022\035\n\025guardian_dragonhunte" + "r\030\003 \001(\010\022\033\n\023mesmer_chronomancer\030\004 \001(\010\022\032\n\022" + "necromancer_reaper\030\005 \001(\010\022\024\n\014ranger_druid" + "\030\006 \001(\010\022\027\n\017revenant_herald\030\007 \001(\010\022\027\n\017thief" + "_daredevil\030\010 \001(\010\022\031\n\021warrior_berserker\030\t " + "\001(\010\022\033\n\023elementalist_weaver\030\n \001(\010\022\032\n\022engi" + "neer_holosmith\030\013 \001(\010\022\032\n\022guardian_firebra" + "nd\030\014 \001(\010\022\025\n\rmesmer_mirage\030\r \001(\010\022\033\n\023necro" + "mancer_scourge\030\016 \001(\010\022\030\n\020ranger_soulbeast" + "\030\017 \001(\010\022\031\n\021revenant_renegade\030\020 \001(\010\022\025\n\rthi" + "ef_deadeye\030\021 \001(\010\022\034\n\024warrior_spellbreaker" + "\030\022 \001(\010\022\034\n\024elmentalist_catalyst\030\023 \001(\010\022\032\n\022" + "engineer_mechanist\030\024 \001(\010\022\033\n\023guardian_wil" + "lbender\030\025 \001(\010\022\027\n\017mesmer_virtuoso\030\026 \001(\010\022\035" + "\n\025necromancer_harbinger\030\027 \001(\010\022\026\n\016ranger_" + "untamed\030\030 \001(\010\022\033\n\023revenant_vindicator\030\031 \001" + "(\010\022\025\n\rthief_specter\030\032 \001(\010\022\032\n\022warrior_bla" + "desworn\030\033 \001(\010\022\030\n\020elementalist_air\030\034 \001(\010\022" + "\033\n\023elementalist_arcane\030\035 \001(\010\022\032\n\022elementa" + "list_earth\030\036 \001(\010\022\031\n\021elementalist_fire\030\037 " + "\001(\010\022\032\n\022elementalist_water\030 \001(\010\022\030\n\020engin" + "eer_alchemy\030! \001(\010\022\033\n\023engineer_explosives" + "\030\" \001(\010\022\031\n\021engineer_firearms\030# \001(\010\022\033\n\023eng" + "ineer_inventions\030$ \001(\010\022\026\n\016engineer_tools" + "\030% \001(\010\022\026\n\016guardian_honor\030& \001(\010\022\031\n\021guardi" + "an_radiance\030\' \001(\010\022\026\n\016guardian_valor\030( \001(" + "\010\022\030\n\020guardian_virtues\030) \001(\010\022\025\n\rguardian_" + "zeal\030* \001(\010\022\024\n\014mesmer_chaos\030+ \001(\010\022\031\n\021mesm" + "er_domination\030, \001(\010\022\026\n\016mesmer_dueling\030- " + "\001(\010\022\030\n\020mesmer_illusions\030. \001(\010\022\032\n\022mesmer_" + "inspiration\030/ \001(\010\022\037\n\027necromancer_blood_m" + "agic\0300 \001(\010\022\032\n\022necromancer_curses\0301 \001(\010\022\037" + "\n\027necromancer_death_magic\0302 \001(\010\022 \n\030necro" + "mancer_soul_reaping\0303 \001(\010\022\031\n\021necromancer" + "_spite\0304 \001(\010\022\033\n\023ranger_beastmastery\0305 \001(" + "\010\022\033\n\023ranger_marksmanship\0306 \001(\010\022\033\n\023ranger" + "_nature_magic\0307 \001(\010\022\032\n\022ranger_skirmishin" + "g\0308 \001(\010\022\"\n\032ranger_wilderness_survival\0309 " + "\001(\010\022\033\n\023revenant_corruption\030: \001(\010\022\034\n\024reve" + "nant_devastation\030; \001(\010\022\033\n\023revenant_invoc" + "ation\030< \001(\010\022\034\n\024revenant_retribution\030= \001(" + "\010\022\032\n\022revenant_salvation\030> \001(\010\022\030\n\020thief_a" + "crobatics\030\? \001(\010\022\036\n\026thief_critical_strike" + "s\030@ \001(\010\022\031\n\021thief_deadly_arts\030A \001(\010\022\031\n\021th" + "ief_shadow_arts\030B \001(\010\022\026\n\016thief_trickery\030" + "C \001(\010\022\024\n\014warrior_arms\030D \001(\010\022\027\n\017warrior_d" + "efense\030E \001(\010\022\032\n\022warrior_discipline\030F \001(\010" + "\022\030\n\020warrior_strength\030G \001(\010\022\027\n\017warrior_ta" + "ctics\030H \001(\010\"[\n\rSpeciesFilter\022\r\n\005asura\030\001 " + "\001(\010\022\r\n\005charr\030\002 \001(\010\022\r\n\005human\030\003 \001(\010\022\014\n\004nor" + "n\030\004 \001(\010\022\017\n\007sylvari\030\005 \001(\010\"\037\n\tTrailData\022\022\n" + "\ntrail_data\030\001 \001(\t*\?\n\rCullChirality\022\010\n\004no" + "ne\020\000\022\r\n\tclockwise\020\001\022\025\n\021counter_clockwise" + "\020\002*\257\001\n\rResetBehavior\022\022\n\016always_visible\020\000" + "\022\016\n\nmap_change\020\001\022\017\n\013daily_reset\020\002\022\t\n\005nev" + "er\020\003\022\t\n\005timer\020\004\022\r\n\tmap_reset\020\005\022\023\n\017instan" + "ce_change\020\006\022\035\n\031daily_reset_per_character" + "\020\007\022\020\n\014weekly_reset\020\010b\006proto3" ; -static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto_deps[1] = { +static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_waypoint_2eproto_deps[1] = { }; -static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto_sccs[16] = { - &scc_info_Category_generators_2fproto_5ftemplates_2fnode_2eproto.base, - &scc_info_Color_generators_2fproto_5ftemplates_2fnode_2eproto.base, - &scc_info_EulerRotation_generators_2fproto_5ftemplates_2fnode_2eproto.base, - &scc_info_FestivalFilter_generators_2fproto_5ftemplates_2fnode_2eproto.base, - &scc_info_GUID_generators_2fproto_5ftemplates_2fnode_2eproto.base, - &scc_info_Icon_generators_2fproto_5ftemplates_2fnode_2eproto.base, - &scc_info_MapTypeFilter_generators_2fproto_5ftemplates_2fnode_2eproto.base, - &scc_info_MountFilter_generators_2fproto_5ftemplates_2fnode_2eproto.base, - &scc_info_Position_generators_2fproto_5ftemplates_2fnode_2eproto.base, - &scc_info_ProfessionFilter_generators_2fproto_5ftemplates_2fnode_2eproto.base, - &scc_info_SpecializationFilter_generators_2fproto_5ftemplates_2fnode_2eproto.base, - &scc_info_SpeciesFilter_generators_2fproto_5ftemplates_2fnode_2eproto.base, - &scc_info_Texture_generators_2fproto_5ftemplates_2fnode_2eproto.base, - &scc_info_Trail_generators_2fproto_5ftemplates_2fnode_2eproto.base, - &scc_info_TrailData_generators_2fproto_5ftemplates_2fnode_2eproto.base, - &scc_info_Trigger_generators_2fproto_5ftemplates_2fnode_2eproto.base, +static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_waypoint_2eproto_sccs[16] = { + &scc_info_Category_waypoint_2eproto.base, + &scc_info_Color_waypoint_2eproto.base, + &scc_info_EulerRotation_waypoint_2eproto.base, + &scc_info_FestivalFilter_waypoint_2eproto.base, + &scc_info_GUID_waypoint_2eproto.base, + &scc_info_Icon_waypoint_2eproto.base, + &scc_info_MapTypeFilter_waypoint_2eproto.base, + &scc_info_MountFilter_waypoint_2eproto.base, + &scc_info_Position_waypoint_2eproto.base, + &scc_info_ProfessionFilter_waypoint_2eproto.base, + &scc_info_SpecializationFilter_waypoint_2eproto.base, + &scc_info_SpeciesFilter_waypoint_2eproto.base, + &scc_info_Texture_waypoint_2eproto.base, + &scc_info_Trail_waypoint_2eproto.base, + &scc_info_TrailData_waypoint_2eproto.base, + &scc_info_Trigger_waypoint_2eproto.base, }; -static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto_once; -const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto = { - false, false, descriptor_table_protodef_generators_2fproto_5ftemplates_2fnode_2eproto, "generators/proto_templates/node.proto", 5834, - &descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto_once, descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto_sccs, descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto_deps, 16, 0, - schemas, file_default_instances, TableStruct_generators_2fproto_5ftemplates_2fnode_2eproto::offsets, - file_level_metadata_generators_2fproto_5ftemplates_2fnode_2eproto, 17, file_level_enum_descriptors_generators_2fproto_5ftemplates_2fnode_2eproto, file_level_service_descriptors_generators_2fproto_5ftemplates_2fnode_2eproto, +static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_waypoint_2eproto_once; +const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_waypoint_2eproto = { + false, false, descriptor_table_protodef_waypoint_2eproto, "waypoint.proto", 6028, + &descriptor_table_waypoint_2eproto_once, descriptor_table_waypoint_2eproto_sccs, descriptor_table_waypoint_2eproto_deps, 16, 0, + schemas, file_default_instances, TableStruct_waypoint_2eproto::offsets, + file_level_metadata_waypoint_2eproto, 17, file_level_enum_descriptors_waypoint_2eproto, file_level_service_descriptors_waypoint_2eproto, }; // Force running AddDescriptors() at dynamic initialization time. -static bool dynamic_init_dummy_generators_2fproto_5ftemplates_2fnode_2eproto = (static_cast(::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto)), true); +static bool dynamic_init_dummy_waypoint_2eproto = (static_cast(::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_waypoint_2eproto)), true); +namespace waypoint { const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* CullChirality_descriptor() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto); - return file_level_enum_descriptors_generators_2fproto_5ftemplates_2fnode_2eproto[0]; + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_waypoint_2eproto); + return file_level_enum_descriptors_waypoint_2eproto[0]; } bool CullChirality_IsValid(int value) { switch (value) { @@ -877,8 +885,8 @@ bool CullChirality_IsValid(int value) { } const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ResetBehavior_descriptor() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto); - return file_level_enum_descriptors_generators_2fproto_5ftemplates_2fnode_2eproto[1]; + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_waypoint_2eproto); + return file_level_enum_descriptors_waypoint_2eproto[1]; } bool ResetBehavior_IsValid(int value) { switch (value) { @@ -928,7 +936,7 @@ Category::Category(::PROTOBUF_NAMESPACE_ID::Arena* arena) children_(arena) { SharedCtor(); RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:Category) + // @@protoc_insertion_point(arena_constructor:waypoint.Category) } Category::Category(const Category& from) : ::PROTOBUF_NAMESPACE_ID::Message() { @@ -952,11 +960,11 @@ Category::Category(const Category& from) ::memcpy(&default_visibility_, &from.default_visibility_, static_cast(reinterpret_cast(&is_separator_) - reinterpret_cast(&default_visibility_)) + sizeof(is_separator_)); - // @@protoc_insertion_point(copy_constructor:Category) + // @@protoc_insertion_point(copy_constructor:waypoint.Category) } void Category::SharedCtor() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Category_generators_2fproto_5ftemplates_2fnode_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Category_waypoint_2eproto.base); display_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); tooltip_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); @@ -966,7 +974,7 @@ void Category::SharedCtor() { } Category::~Category() { - // @@protoc_insertion_point(destructor:Category) + // @@protoc_insertion_point(destructor:waypoint.Category) SharedDtor(); _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -988,13 +996,13 @@ void Category::SetCachedSize(int size) const { _cached_size_.Set(size); } const Category& Category::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Category_generators_2fproto_5ftemplates_2fnode_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Category_waypoint_2eproto.base); return *internal_default_instance(); } void Category::Clear() { -// @@protoc_insertion_point(message_clear_start:Category) +// @@protoc_insertion_point(message_clear_start:waypoint.Category) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -1029,7 +1037,7 @@ const char* Category::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::i if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { auto str = _internal_mutable_display_name(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "Category.display_name")); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "waypoint.Category.display_name")); CHK_(ptr); } else goto handle_unusual; continue; @@ -1045,7 +1053,7 @@ const char* Category::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::i if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { auto str = _internal_mutable_name(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "Category.name")); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "waypoint.Category.name")); CHK_(ptr); } else goto handle_unusual; continue; @@ -1054,11 +1062,11 @@ const char* Category::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::i if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) { auto str = _internal_mutable_tooltip_name(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "Category.tooltip_name")); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "waypoint.Category.tooltip_name")); CHK_(ptr); } else goto handle_unusual; continue; - // map children = 6; + // map children = 6; case 6: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) { ptr -= 1; @@ -1094,7 +1102,7 @@ const char* Category::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::i ::PROTOBUF_NAMESPACE_ID::uint8* Category::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Category) + // @@protoc_insertion_point(serialize_to_array_start:waypoint.Category) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -1109,7 +1117,7 @@ ::PROTOBUF_NAMESPACE_ID::uint8* Category::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_display_name().data(), static_cast(this->_internal_display_name().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "Category.display_name"); + "waypoint.Category.display_name"); target = stream->WriteStringMaybeAliased( 2, this->_internal_display_name(), target); } @@ -1125,7 +1133,7 @@ ::PROTOBUF_NAMESPACE_ID::uint8* Category::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_name().data(), static_cast(this->_internal_name().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "Category.name"); + "waypoint.Category.name"); target = stream->WriteStringMaybeAliased( 4, this->_internal_name(), target); } @@ -1135,14 +1143,14 @@ ::PROTOBUF_NAMESPACE_ID::uint8* Category::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_tooltip_name().data(), static_cast(this->_internal_tooltip_name().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "Category.tooltip_name"); + "waypoint.Category.tooltip_name"); target = stream->WriteStringMaybeAliased( 5, this->_internal_tooltip_name(), target); } - // map children = 6; + // map children = 6; if (!this->_internal_children().empty()) { - typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Category >::const_pointer + typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::waypoint::Category >::const_pointer ConstPtr; typedef ConstPtr SortItem; typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst Less; @@ -1151,7 +1159,7 @@ ::PROTOBUF_NAMESPACE_ID::uint8* Category::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( p->first.data(), static_cast(p->first.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "Category.ChildrenEntry.key"); + "waypoint.Category.ChildrenEntry.key"); } }; @@ -1159,9 +1167,9 @@ ::PROTOBUF_NAMESPACE_ID::uint8* Category::_InternalSerialize( this->_internal_children().size() > 1) { ::std::unique_ptr items( new SortItem[this->_internal_children().size()]); - typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Category >::size_type size_type; + typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::waypoint::Category >::size_type size_type; size_type n = 0; - for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Category >::const_iterator + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::waypoint::Category >::const_iterator it = this->_internal_children().begin(); it != this->_internal_children().end(); ++it, ++n) { items[static_cast(n)] = SortItem(&*it); @@ -1172,7 +1180,7 @@ ::PROTOBUF_NAMESPACE_ID::uint8* Category::_InternalSerialize( Utf8Check::Check(&(*items[static_cast(i)])); } } else { - for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Category >::const_iterator + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::waypoint::Category >::const_iterator it = this->_internal_children().begin(); it != this->_internal_children().end(); ++it) { target = Category_ChildrenEntry_DoNotUse::Funcs::InternalSerialize(6, it->first, it->second, target, stream); @@ -1185,22 +1193,22 @@ ::PROTOBUF_NAMESPACE_ID::uint8* Category::_InternalSerialize( target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } - // @@protoc_insertion_point(serialize_to_array_end:Category) + // @@protoc_insertion_point(serialize_to_array_end:waypoint.Category) return target; } size_t Category::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Category) +// @@protoc_insertion_point(message_byte_size_start:waypoint.Category) size_t total_size = 0; ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // map children = 6; + // map children = 6; total_size += 1 * ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_children_size()); - for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Category >::const_iterator + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::waypoint::Category >::const_iterator it = this->_internal_children().begin(); it != this->_internal_children().end(); ++it) { total_size += Category_ChildrenEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); @@ -1247,22 +1255,22 @@ size_t Category::ByteSizeLong() const { } void Category::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:Category) +// @@protoc_insertion_point(generalized_merge_from_start:waypoint.Category) GOOGLE_DCHECK_NE(&from, this); const Category* source = ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:Category) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:waypoint.Category) ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:Category) + // @@protoc_insertion_point(generalized_merge_from_cast_success:waypoint.Category) MergeFrom(*source); } } void Category::MergeFrom(const Category& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:Category) +// @@protoc_insertion_point(class_specific_merge_from_start:waypoint.Category) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; @@ -1287,14 +1295,14 @@ void Category::MergeFrom(const Category& from) { } void Category::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:Category) +// @@protoc_insertion_point(generalized_copy_from_start:waypoint.Category) if (&from == this) return; Clear(); MergeFrom(from); } void Category::CopyFrom(const Category& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Category) +// @@protoc_insertion_point(class_specific_copy_from_start:waypoint.Category) if (&from == this) return; Clear(); MergeFrom(from); @@ -1327,43 +1335,43 @@ ::PROTOBUF_NAMESPACE_ID::Metadata Category::GetMetadata() const { // =================================================================== void Icon::InitAsDefaultInstance() { - ::_Icon_default_instance_._instance.get_mutable()->category_ = const_cast< ::Category*>( - ::Category::internal_default_instance()); - ::_Icon_default_instance_._instance.get_mutable()->texture_ = const_cast< ::Texture*>( - ::Texture::internal_default_instance()); - ::_Icon_default_instance_._instance.get_mutable()->guid_ = const_cast< ::GUID*>( - ::GUID::internal_default_instance()); - ::_Icon_default_instance_._instance.get_mutable()->position_ = const_cast< ::Position*>( - ::Position::internal_default_instance()); - ::_Icon_default_instance_._instance.get_mutable()->trigger_ = const_cast< ::Trigger*>( - ::Trigger::internal_default_instance()); + ::waypoint::_Icon_default_instance_._instance.get_mutable()->category_ = const_cast< ::waypoint::Category*>( + ::waypoint::Category::internal_default_instance()); + ::waypoint::_Icon_default_instance_._instance.get_mutable()->texture_ = const_cast< ::waypoint::Texture*>( + ::waypoint::Texture::internal_default_instance()); + ::waypoint::_Icon_default_instance_._instance.get_mutable()->guid_ = const_cast< ::waypoint::GUID*>( + ::waypoint::GUID::internal_default_instance()); + ::waypoint::_Icon_default_instance_._instance.get_mutable()->position_ = const_cast< ::waypoint::Position*>( + ::waypoint::Position::internal_default_instance()); + ::waypoint::_Icon_default_instance_._instance.get_mutable()->trigger_ = const_cast< ::waypoint::Trigger*>( + ::waypoint::Trigger::internal_default_instance()); } class Icon::_Internal { public: - static const ::Category& category(const Icon* msg); - static const ::Texture& texture(const Icon* msg); - static const ::GUID& guid(const Icon* msg); - static const ::Position& position(const Icon* msg); - static const ::Trigger& trigger(const Icon* msg); + static const ::waypoint::Category& category(const Icon* msg); + static const ::waypoint::Texture& texture(const Icon* msg); + static const ::waypoint::GUID& guid(const Icon* msg); + static const ::waypoint::Position& position(const Icon* msg); + static const ::waypoint::Trigger& trigger(const Icon* msg); }; -const ::Category& +const ::waypoint::Category& Icon::_Internal::category(const Icon* msg) { return *msg->category_; } -const ::Texture& +const ::waypoint::Texture& Icon::_Internal::texture(const Icon* msg) { return *msg->texture_; } -const ::GUID& +const ::waypoint::GUID& Icon::_Internal::guid(const Icon* msg) { return *msg->guid_; } -const ::Position& +const ::waypoint::Position& Icon::_Internal::position(const Icon* msg) { return *msg->position_; } -const ::Trigger& +const ::waypoint::Trigger& Icon::_Internal::trigger(const Icon* msg) { return *msg->trigger_; } @@ -1371,7 +1379,7 @@ Icon::Icon(::PROTOBUF_NAMESPACE_ID::Arena* arena) : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:Icon) + // @@protoc_insertion_point(arena_constructor:waypoint.Icon) } Icon::Icon(const Icon& from) : ::PROTOBUF_NAMESPACE_ID::Message() { @@ -1392,38 +1400,38 @@ Icon::Icon(const Icon& from) GetArena()); } if (from._internal_has_category()) { - category_ = new ::Category(*from.category_); + category_ = new ::waypoint::Category(*from.category_); } else { category_ = nullptr; } if (from._internal_has_texture()) { - texture_ = new ::Texture(*from.texture_); + texture_ = new ::waypoint::Texture(*from.texture_); } else { texture_ = nullptr; } if (from._internal_has_guid()) { - guid_ = new ::GUID(*from.guid_); + guid_ = new ::waypoint::GUID(*from.guid_); } else { guid_ = nullptr; } if (from._internal_has_position()) { - position_ = new ::Position(*from.position_); + position_ = new ::waypoint::Position(*from.position_); } else { position_ = nullptr; } if (from._internal_has_trigger()) { - trigger_ = new ::Trigger(*from.trigger_); + trigger_ = new ::waypoint::Trigger(*from.trigger_); } else { trigger_ = nullptr; } ::memcpy(&map_id_, &from.map_id_, static_cast(reinterpret_cast(&__tentative__render_on_minimap_) - reinterpret_cast(&map_id_)) + sizeof(__tentative__render_on_minimap_)); - // @@protoc_insertion_point(copy_constructor:Icon) + // @@protoc_insertion_point(copy_constructor:waypoint.Icon) } void Icon::SharedCtor() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Icon_generators_2fproto_5ftemplates_2fnode_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Icon_waypoint_2eproto.base); tip_description_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); tip_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); bhdraft__schedule_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); @@ -1433,7 +1441,7 @@ void Icon::SharedCtor() { } Icon::~Icon() { - // @@protoc_insertion_point(destructor:Icon) + // @@protoc_insertion_point(destructor:waypoint.Icon) SharedDtor(); _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -1460,13 +1468,13 @@ void Icon::SetCachedSize(int size) const { _cached_size_.Set(size); } const Icon& Icon::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Icon_generators_2fproto_5ftemplates_2fnode_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Icon_waypoint_2eproto.base); return *internal_default_instance(); } void Icon::Clear() { -// @@protoc_insertion_point(message_clear_start:Icon) +// @@protoc_insertion_point(message_clear_start:waypoint.Icon) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -1508,21 +1516,21 @@ const char* Icon::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inter ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); CHK_(ptr); switch (tag >> 3) { - // .Category category = 1; + // .waypoint.Category category = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { ptr = ctx->ParseMessage(_internal_mutable_category(), ptr); CHK_(ptr); } else goto handle_unusual; continue; - // .Texture texture = 2; + // .waypoint.Texture texture = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { ptr = ctx->ParseMessage(_internal_mutable_texture(), ptr); CHK_(ptr); } else goto handle_unusual; continue; - // .GUID guid = 3; + // .waypoint.GUID guid = 3; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { ptr = ctx->ParseMessage(_internal_mutable_guid(), ptr); @@ -1557,22 +1565,22 @@ const char* Icon::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inter ptr += sizeof(float); } else goto handle_unusual; continue; - // .Position position = 8; + // .waypoint.Position position = 8; case 8: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 66)) { ptr = ctx->ParseMessage(_internal_mutable_position(), ptr); CHK_(ptr); } else goto handle_unusual; continue; - // .ResetBehavior reset_behavior = 9; + // .waypoint.ResetBehavior reset_behavior = 9; case 9: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 72)) { ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); - _internal_set_reset_behavior(static_cast<::ResetBehavior>(val)); + _internal_set_reset_behavior(static_cast<::waypoint::ResetBehavior>(val)); } else goto handle_unusual; continue; - // .Trigger trigger = 10; + // .waypoint.Trigger trigger = 10; case 10: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 82)) { ptr = ctx->ParseMessage(_internal_mutable_trigger(), ptr); @@ -1640,7 +1648,7 @@ const char* Icon::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inter if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 194)) { auto str = _internal_mutable_tip_description(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "Icon.tip_description")); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "waypoint.Icon.tip_description")); CHK_(ptr); } else goto handle_unusual; continue; @@ -1649,7 +1657,7 @@ const char* Icon::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inter if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 202)) { auto str = _internal_mutable_tip_name(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "Icon.tip_name")); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "waypoint.Icon.tip_name")); CHK_(ptr); } else goto handle_unusual; continue; @@ -1686,7 +1694,7 @@ const char* Icon::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inter if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { auto str = _internal_mutable_bhdraft__schedule(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "Icon.bhdraft__schedule")); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "waypoint.Icon.bhdraft__schedule")); CHK_(ptr); } else goto handle_unusual; continue; @@ -1721,11 +1729,11 @@ const char* Icon::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inter ::PROTOBUF_NAMESPACE_ID::uint8* Icon::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Icon) + // @@protoc_insertion_point(serialize_to_array_start:waypoint.Icon) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .Category category = 1; + // .waypoint.Category category = 1; if (this->has_category()) { target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: @@ -1733,7 +1741,7 @@ ::PROTOBUF_NAMESPACE_ID::uint8* Icon::_InternalSerialize( 1, _Internal::category(this), target, stream); } - // .Texture texture = 2; + // .waypoint.Texture texture = 2; if (this->has_texture()) { target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: @@ -1741,7 +1749,7 @@ ::PROTOBUF_NAMESPACE_ID::uint8* Icon::_InternalSerialize( 2, _Internal::texture(this), target, stream); } - // .GUID guid = 3; + // .waypoint.GUID guid = 3; if (this->has_guid()) { target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: @@ -1773,7 +1781,7 @@ ::PROTOBUF_NAMESPACE_ID::uint8* Icon::_InternalSerialize( target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(7, this->_internal_height_offset(), target); } - // .Position position = 8; + // .waypoint.Position position = 8; if (this->has_position()) { target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: @@ -1781,14 +1789,14 @@ ::PROTOBUF_NAMESPACE_ID::uint8* Icon::_InternalSerialize( 8, _Internal::position(this), target, stream); } - // .ResetBehavior reset_behavior = 9; + // .waypoint.ResetBehavior reset_behavior = 9; if (this->reset_behavior() != 0) { target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( 9, this->_internal_reset_behavior(), target); } - // .Trigger trigger = 10; + // .waypoint.Trigger trigger = 10; if (this->has_trigger()) { target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: @@ -1849,7 +1857,7 @@ ::PROTOBUF_NAMESPACE_ID::uint8* Icon::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_tip_description().data(), static_cast(this->_internal_tip_description().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "Icon.tip_description"); + "waypoint.Icon.tip_description"); target = stream->WriteStringMaybeAliased( 24, this->_internal_tip_description(), target); } @@ -1859,7 +1867,7 @@ ::PROTOBUF_NAMESPACE_ID::uint8* Icon::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_tip_name().data(), static_cast(this->_internal_tip_name().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "Icon.tip_name"); + "waypoint.Icon.tip_name"); target = stream->WriteStringMaybeAliased( 25, this->_internal_tip_name(), target); } @@ -1893,7 +1901,7 @@ ::PROTOBUF_NAMESPACE_ID::uint8* Icon::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_bhdraft__schedule().data(), static_cast(this->_internal_bhdraft__schedule().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "Icon.bhdraft__schedule"); + "waypoint.Icon.bhdraft__schedule"); target = stream->WriteStringMaybeAliased( 2052, this->_internal_bhdraft__schedule(), target); } @@ -1908,12 +1916,12 @@ ::PROTOBUF_NAMESPACE_ID::uint8* Icon::_InternalSerialize( target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } - // @@protoc_insertion_point(serialize_to_array_end:Icon) + // @@protoc_insertion_point(serialize_to_array_end:waypoint.Icon) return target; } size_t Icon::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Icon) +// @@protoc_insertion_point(message_byte_size_start:waypoint.Icon) size_t total_size = 0; ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; @@ -1941,35 +1949,35 @@ size_t Icon::ByteSizeLong() const { this->_internal_bhdraft__schedule()); } - // .Category category = 1; + // .waypoint.Category category = 1; if (this->has_category()) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( *category_); } - // .Texture texture = 2; + // .waypoint.Texture texture = 2; if (this->has_texture()) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( *texture_); } - // .GUID guid = 3; + // .waypoint.GUID guid = 3; if (this->has_guid()) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( *guid_); } - // .Position position = 8; + // .waypoint.Position position = 8; if (this->has_position()) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( *position_); } - // .Trigger trigger = 10; + // .waypoint.Trigger trigger = 10; if (this->has_trigger()) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( @@ -1998,7 +2006,7 @@ size_t Icon::ByteSizeLong() const { total_size += 1 + 4; } - // .ResetBehavior reset_behavior = 9; + // .waypoint.ResetBehavior reset_behavior = 9; if (this->reset_behavior() != 0) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_reset_behavior()); @@ -2087,22 +2095,22 @@ size_t Icon::ByteSizeLong() const { } void Icon::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:Icon) +// @@protoc_insertion_point(generalized_merge_from_start:waypoint.Icon) GOOGLE_DCHECK_NE(&from, this); const Icon* source = ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:Icon) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:waypoint.Icon) ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:Icon) + // @@protoc_insertion_point(generalized_merge_from_cast_success:waypoint.Icon) MergeFrom(*source); } } void Icon::MergeFrom(const Icon& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:Icon) +// @@protoc_insertion_point(class_specific_merge_from_start:waypoint.Icon) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; @@ -2118,19 +2126,19 @@ void Icon::MergeFrom(const Icon& from) { _internal_set_bhdraft__schedule(from._internal_bhdraft__schedule()); } if (from.has_category()) { - _internal_mutable_category()->::Category::MergeFrom(from._internal_category()); + _internal_mutable_category()->::waypoint::Category::MergeFrom(from._internal_category()); } if (from.has_texture()) { - _internal_mutable_texture()->::Texture::MergeFrom(from._internal_texture()); + _internal_mutable_texture()->::waypoint::Texture::MergeFrom(from._internal_texture()); } if (from.has_guid()) { - _internal_mutable_guid()->::GUID::MergeFrom(from._internal_guid()); + _internal_mutable_guid()->::waypoint::GUID::MergeFrom(from._internal_guid()); } if (from.has_position()) { - _internal_mutable_position()->::Position::MergeFrom(from._internal_position()); + _internal_mutable_position()->::waypoint::Position::MergeFrom(from._internal_position()); } if (from.has_trigger()) { - _internal_mutable_trigger()->::Trigger::MergeFrom(from._internal_trigger()); + _internal_mutable_trigger()->::waypoint::Trigger::MergeFrom(from._internal_trigger()); } if (from.map_id() != 0) { _internal_set_map_id(from._internal_map_id()); @@ -2189,14 +2197,14 @@ void Icon::MergeFrom(const Icon& from) { } void Icon::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:Icon) +// @@protoc_insertion_point(generalized_copy_from_start:waypoint.Icon) if (&from == this) return; Clear(); MergeFrom(from); } void Icon::CopyFrom(const Icon& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Icon) +// @@protoc_insertion_point(class_specific_copy_from_start:waypoint.Icon) if (&from == this) return; Clear(); MergeFrom(from); @@ -2228,85 +2236,85 @@ ::PROTOBUF_NAMESPACE_ID::Metadata Icon::GetMetadata() const { // =================================================================== void Trail::InitAsDefaultInstance() { - ::_Trail_default_instance_._instance.get_mutable()->category_ = const_cast< ::Category*>( - ::Category::internal_default_instance()); - ::_Trail_default_instance_._instance.get_mutable()->texture_ = const_cast< ::Texture*>( - ::Texture::internal_default_instance()); - ::_Trail_default_instance_._instance.get_mutable()->guid_ = const_cast< ::GUID*>( - ::GUID::internal_default_instance()); - ::_Trail_default_instance_._instance.get_mutable()->trail_data_ = const_cast< ::TrailData*>( - ::TrailData::internal_default_instance()); - ::_Trail_default_instance_._instance.get_mutable()->color_ = const_cast< ::Color*>( - ::Color::internal_default_instance()); - ::_Trail_default_instance_._instance.get_mutable()->festival_filter_ = const_cast< ::FestivalFilter*>( - ::FestivalFilter::internal_default_instance()); - ::_Trail_default_instance_._instance.get_mutable()->map_type_filter_ = const_cast< ::MapTypeFilter*>( - ::MapTypeFilter::internal_default_instance()); - ::_Trail_default_instance_._instance.get_mutable()->mount_filter_ = const_cast< ::MountFilter*>( - ::MountFilter::internal_default_instance()); - ::_Trail_default_instance_._instance.get_mutable()->profession_filter_ = const_cast< ::ProfessionFilter*>( - ::ProfessionFilter::internal_default_instance()); - ::_Trail_default_instance_._instance.get_mutable()->specialization_filter_ = const_cast< ::SpecializationFilter*>( - ::SpecializationFilter::internal_default_instance()); - ::_Trail_default_instance_._instance.get_mutable()->species_filter_ = const_cast< ::SpeciesFilter*>( - ::SpeciesFilter::internal_default_instance()); + ::waypoint::_Trail_default_instance_._instance.get_mutable()->category_ = const_cast< ::waypoint::Category*>( + ::waypoint::Category::internal_default_instance()); + ::waypoint::_Trail_default_instance_._instance.get_mutable()->texture_ = const_cast< ::waypoint::Texture*>( + ::waypoint::Texture::internal_default_instance()); + ::waypoint::_Trail_default_instance_._instance.get_mutable()->guid_ = const_cast< ::waypoint::GUID*>( + ::waypoint::GUID::internal_default_instance()); + ::waypoint::_Trail_default_instance_._instance.get_mutable()->trail_data_ = const_cast< ::waypoint::TrailData*>( + ::waypoint::TrailData::internal_default_instance()); + ::waypoint::_Trail_default_instance_._instance.get_mutable()->color_ = const_cast< ::waypoint::Color*>( + ::waypoint::Color::internal_default_instance()); + ::waypoint::_Trail_default_instance_._instance.get_mutable()->festival_filter_ = const_cast< ::waypoint::FestivalFilter*>( + ::waypoint::FestivalFilter::internal_default_instance()); + ::waypoint::_Trail_default_instance_._instance.get_mutable()->map_type_filter_ = const_cast< ::waypoint::MapTypeFilter*>( + ::waypoint::MapTypeFilter::internal_default_instance()); + ::waypoint::_Trail_default_instance_._instance.get_mutable()->mount_filter_ = const_cast< ::waypoint::MountFilter*>( + ::waypoint::MountFilter::internal_default_instance()); + ::waypoint::_Trail_default_instance_._instance.get_mutable()->profession_filter_ = const_cast< ::waypoint::ProfessionFilter*>( + ::waypoint::ProfessionFilter::internal_default_instance()); + ::waypoint::_Trail_default_instance_._instance.get_mutable()->specialization_filter_ = const_cast< ::waypoint::SpecializationFilter*>( + ::waypoint::SpecializationFilter::internal_default_instance()); + ::waypoint::_Trail_default_instance_._instance.get_mutable()->species_filter_ = const_cast< ::waypoint::SpeciesFilter*>( + ::waypoint::SpeciesFilter::internal_default_instance()); } class Trail::_Internal { public: - static const ::Category& category(const Trail* msg); - static const ::Texture& texture(const Trail* msg); - static const ::GUID& guid(const Trail* msg); - static const ::TrailData& trail_data(const Trail* msg); - static const ::Color& color(const Trail* msg); - static const ::FestivalFilter& festival_filter(const Trail* msg); - static const ::MapTypeFilter& map_type_filter(const Trail* msg); - static const ::MountFilter& mount_filter(const Trail* msg); - static const ::ProfessionFilter& profession_filter(const Trail* msg); - static const ::SpecializationFilter& specialization_filter(const Trail* msg); - static const ::SpeciesFilter& species_filter(const Trail* msg); + static const ::waypoint::Category& category(const Trail* msg); + static const ::waypoint::Texture& texture(const Trail* msg); + static const ::waypoint::GUID& guid(const Trail* msg); + static const ::waypoint::TrailData& trail_data(const Trail* msg); + static const ::waypoint::Color& color(const Trail* msg); + static const ::waypoint::FestivalFilter& festival_filter(const Trail* msg); + static const ::waypoint::MapTypeFilter& map_type_filter(const Trail* msg); + static const ::waypoint::MountFilter& mount_filter(const Trail* msg); + static const ::waypoint::ProfessionFilter& profession_filter(const Trail* msg); + static const ::waypoint::SpecializationFilter& specialization_filter(const Trail* msg); + static const ::waypoint::SpeciesFilter& species_filter(const Trail* msg); }; -const ::Category& +const ::waypoint::Category& Trail::_Internal::category(const Trail* msg) { return *msg->category_; } -const ::Texture& +const ::waypoint::Texture& Trail::_Internal::texture(const Trail* msg) { return *msg->texture_; } -const ::GUID& +const ::waypoint::GUID& Trail::_Internal::guid(const Trail* msg) { return *msg->guid_; } -const ::TrailData& +const ::waypoint::TrailData& Trail::_Internal::trail_data(const Trail* msg) { return *msg->trail_data_; } -const ::Color& +const ::waypoint::Color& Trail::_Internal::color(const Trail* msg) { return *msg->color_; } -const ::FestivalFilter& +const ::waypoint::FestivalFilter& Trail::_Internal::festival_filter(const Trail* msg) { return *msg->festival_filter_; } -const ::MapTypeFilter& +const ::waypoint::MapTypeFilter& Trail::_Internal::map_type_filter(const Trail* msg) { return *msg->map_type_filter_; } -const ::MountFilter& +const ::waypoint::MountFilter& Trail::_Internal::mount_filter(const Trail* msg) { return *msg->mount_filter_; } -const ::ProfessionFilter& +const ::waypoint::ProfessionFilter& Trail::_Internal::profession_filter(const Trail* msg) { return *msg->profession_filter_; } -const ::SpecializationFilter& +const ::waypoint::SpecializationFilter& Trail::_Internal::specialization_filter(const Trail* msg) { return *msg->specialization_filter_; } -const ::SpeciesFilter& +const ::waypoint::SpeciesFilter& Trail::_Internal::species_filter(const Trail* msg) { return *msg->species_filter_; } @@ -2314,7 +2322,7 @@ Trail::Trail(::PROTOBUF_NAMESPACE_ID::Arena* arena) : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:Trail) + // @@protoc_insertion_point(arena_constructor:waypoint.Trail) } Trail::Trail(const Trail& from) : ::PROTOBUF_NAMESPACE_ID::Message() { @@ -2325,68 +2333,68 @@ Trail::Trail(const Trail& from) GetArena()); } if (from._internal_has_category()) { - category_ = new ::Category(*from.category_); + category_ = new ::waypoint::Category(*from.category_); } else { category_ = nullptr; } if (from._internal_has_texture()) { - texture_ = new ::Texture(*from.texture_); + texture_ = new ::waypoint::Texture(*from.texture_); } else { texture_ = nullptr; } if (from._internal_has_guid()) { - guid_ = new ::GUID(*from.guid_); + guid_ = new ::waypoint::GUID(*from.guid_); } else { guid_ = nullptr; } if (from._internal_has_trail_data()) { - trail_data_ = new ::TrailData(*from.trail_data_); + trail_data_ = new ::waypoint::TrailData(*from.trail_data_); } else { trail_data_ = nullptr; } if (from._internal_has_color()) { - color_ = new ::Color(*from.color_); + color_ = new ::waypoint::Color(*from.color_); } else { color_ = nullptr; } if (from._internal_has_festival_filter()) { - festival_filter_ = new ::FestivalFilter(*from.festival_filter_); + festival_filter_ = new ::waypoint::FestivalFilter(*from.festival_filter_); } else { festival_filter_ = nullptr; } if (from._internal_has_map_type_filter()) { - map_type_filter_ = new ::MapTypeFilter(*from.map_type_filter_); + map_type_filter_ = new ::waypoint::MapTypeFilter(*from.map_type_filter_); } else { map_type_filter_ = nullptr; } if (from._internal_has_mount_filter()) { - mount_filter_ = new ::MountFilter(*from.mount_filter_); + mount_filter_ = new ::waypoint::MountFilter(*from.mount_filter_); } else { mount_filter_ = nullptr; } if (from._internal_has_profession_filter()) { - profession_filter_ = new ::ProfessionFilter(*from.profession_filter_); + profession_filter_ = new ::waypoint::ProfessionFilter(*from.profession_filter_); } else { profession_filter_ = nullptr; } if (from._internal_has_specialization_filter()) { - specialization_filter_ = new ::SpecializationFilter(*from.specialization_filter_); + specialization_filter_ = new ::waypoint::SpecializationFilter(*from.specialization_filter_); } else { specialization_filter_ = nullptr; } if (from._internal_has_species_filter()) { - species_filter_ = new ::SpeciesFilter(*from.species_filter_); + species_filter_ = new ::waypoint::SpeciesFilter(*from.species_filter_); } else { species_filter_ = nullptr; } ::memcpy(&map_id_, &from.map_id_, static_cast(reinterpret_cast(&scale_) - reinterpret_cast(&map_id_)) + sizeof(scale_)); - // @@protoc_insertion_point(copy_constructor:Trail) + // @@protoc_insertion_point(copy_constructor:waypoint.Trail) } void Trail::SharedCtor() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Trail_generators_2fproto_5ftemplates_2fnode_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Trail_waypoint_2eproto.base); bhdraft__schedule_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); ::memset(&category_, 0, static_cast( reinterpret_cast(&scale_) - @@ -2394,7 +2402,7 @@ void Trail::SharedCtor() { } Trail::~Trail() { - // @@protoc_insertion_point(destructor:Trail) + // @@protoc_insertion_point(destructor:waypoint.Trail) SharedDtor(); _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -2425,13 +2433,13 @@ void Trail::SetCachedSize(int size) const { _cached_size_.Set(size); } const Trail& Trail::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Trail_generators_2fproto_5ftemplates_2fnode_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Trail_waypoint_2eproto.base); return *internal_default_instance(); } void Trail::Clear() { -// @@protoc_insertion_point(message_clear_start:Trail) +// @@protoc_insertion_point(message_clear_start:waypoint.Trail) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -2495,21 +2503,21 @@ const char* Trail::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inte ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); CHK_(ptr); switch (tag >> 3) { - // .Category category = 1; + // .waypoint.Category category = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { ptr = ctx->ParseMessage(_internal_mutable_category(), ptr); CHK_(ptr); } else goto handle_unusual; continue; - // .Texture texture = 2; + // .waypoint.Texture texture = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { ptr = ctx->ParseMessage(_internal_mutable_texture(), ptr); CHK_(ptr); } else goto handle_unusual; continue; - // .GUID guid = 3; + // .waypoint.GUID guid = 3; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { ptr = ctx->ParseMessage(_internal_mutable_guid(), ptr); @@ -2537,7 +2545,7 @@ const char* Trail::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inte ptr += sizeof(float); } else goto handle_unusual; continue; - // .TrailData trail_data = 7; + // .waypoint.TrailData trail_data = 7; case 7: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) { ptr = ctx->ParseMessage(_internal_mutable_trail_data(), ptr); @@ -2551,12 +2559,12 @@ const char* Trail::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inte ptr += sizeof(float); } else goto handle_unusual; continue; - // .CullChirality cull_chirality = 9; + // .waypoint.CullChirality cull_chirality = 9; case 9: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 72)) { ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); - _internal_set_cull_chirality(static_cast<::CullChirality>(val)); + _internal_set_cull_chirality(static_cast<::waypoint::CullChirality>(val)); } else goto handle_unusual; continue; // fixed32 achievement_bit = 16; @@ -2599,7 +2607,7 @@ const char* Trail::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inte if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 186)) { auto str = _internal_mutable_bhdraft__schedule(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "Trail.bhdraft__schedule")); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "waypoint.Trail.bhdraft__schedule")); CHK_(ptr); } else goto handle_unusual; continue; @@ -2617,49 +2625,49 @@ const char* Trail::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inte ptr += sizeof(float); } else goto handle_unusual; continue; - // .Color color = 26; + // .waypoint.Color color = 26; case 26: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 210)) { ptr = ctx->ParseMessage(_internal_mutable_color(), ptr); CHK_(ptr); } else goto handle_unusual; continue; - // .FestivalFilter festival_filter = 27; + // .waypoint.FestivalFilter festival_filter = 27; case 27: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 218)) { ptr = ctx->ParseMessage(_internal_mutable_festival_filter(), ptr); CHK_(ptr); } else goto handle_unusual; continue; - // .MapTypeFilter map_type_filter = 28; + // .waypoint.MapTypeFilter map_type_filter = 28; case 28: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 226)) { ptr = ctx->ParseMessage(_internal_mutable_map_type_filter(), ptr); CHK_(ptr); } else goto handle_unusual; continue; - // .MountFilter mount_filter = 29; + // .waypoint.MountFilter mount_filter = 29; case 29: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 234)) { ptr = ctx->ParseMessage(_internal_mutable_mount_filter(), ptr); CHK_(ptr); } else goto handle_unusual; continue; - // .ProfessionFilter profession_filter = 30; + // .waypoint.ProfessionFilter profession_filter = 30; case 30: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 242)) { ptr = ctx->ParseMessage(_internal_mutable_profession_filter(), ptr); CHK_(ptr); } else goto handle_unusual; continue; - // .SpecializationFilter specialization_filter = 31; + // .waypoint.SpecializationFilter specialization_filter = 31; case 31: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 250)) { ptr = ctx->ParseMessage(_internal_mutable_specialization_filter(), ptr); CHK_(ptr); } else goto handle_unusual; continue; - // .SpeciesFilter species_filter = 32; + // .waypoint.SpeciesFilter species_filter = 32; case 32: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 2)) { ptr = ctx->ParseMessage(_internal_mutable_species_filter(), ptr); @@ -2690,11 +2698,11 @@ const char* Trail::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inte ::PROTOBUF_NAMESPACE_ID::uint8* Trail::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Trail) + // @@protoc_insertion_point(serialize_to_array_start:waypoint.Trail) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .Category category = 1; + // .waypoint.Category category = 1; if (this->has_category()) { target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: @@ -2702,7 +2710,7 @@ ::PROTOBUF_NAMESPACE_ID::uint8* Trail::_InternalSerialize( 1, _Internal::category(this), target, stream); } - // .Texture texture = 2; + // .waypoint.Texture texture = 2; if (this->has_texture()) { target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: @@ -2710,7 +2718,7 @@ ::PROTOBUF_NAMESPACE_ID::uint8* Trail::_InternalSerialize( 2, _Internal::texture(this), target, stream); } - // .GUID guid = 3; + // .waypoint.GUID guid = 3; if (this->has_guid()) { target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: @@ -2736,7 +2744,7 @@ ::PROTOBUF_NAMESPACE_ID::uint8* Trail::_InternalSerialize( target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(6, this->_internal_distance_fade_start(), target); } - // .TrailData trail_data = 7; + // .waypoint.TrailData trail_data = 7; if (this->has_trail_data()) { target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: @@ -2750,7 +2758,7 @@ ::PROTOBUF_NAMESPACE_ID::uint8* Trail::_InternalSerialize( target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(8, this->_internal_animation_speed(), target); } - // .CullChirality cull_chirality = 9; + // .waypoint.CullChirality cull_chirality = 9; if (this->cull_chirality() != 0) { target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( @@ -2792,7 +2800,7 @@ ::PROTOBUF_NAMESPACE_ID::uint8* Trail::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_bhdraft__schedule().data(), static_cast(this->_internal_bhdraft__schedule().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "Trail.bhdraft__schedule"); + "waypoint.Trail.bhdraft__schedule"); target = stream->WriteStringMaybeAliased( 23, this->_internal_bhdraft__schedule(), target); } @@ -2809,7 +2817,7 @@ ::PROTOBUF_NAMESPACE_ID::uint8* Trail::_InternalSerialize( target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(25, this->_internal_scale(), target); } - // .Color color = 26; + // .waypoint.Color color = 26; if (this->has_color()) { target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: @@ -2817,7 +2825,7 @@ ::PROTOBUF_NAMESPACE_ID::uint8* Trail::_InternalSerialize( 26, _Internal::color(this), target, stream); } - // .FestivalFilter festival_filter = 27; + // .waypoint.FestivalFilter festival_filter = 27; if (this->has_festival_filter()) { target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: @@ -2825,7 +2833,7 @@ ::PROTOBUF_NAMESPACE_ID::uint8* Trail::_InternalSerialize( 27, _Internal::festival_filter(this), target, stream); } - // .MapTypeFilter map_type_filter = 28; + // .waypoint.MapTypeFilter map_type_filter = 28; if (this->has_map_type_filter()) { target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: @@ -2833,7 +2841,7 @@ ::PROTOBUF_NAMESPACE_ID::uint8* Trail::_InternalSerialize( 28, _Internal::map_type_filter(this), target, stream); } - // .MountFilter mount_filter = 29; + // .waypoint.MountFilter mount_filter = 29; if (this->has_mount_filter()) { target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: @@ -2841,7 +2849,7 @@ ::PROTOBUF_NAMESPACE_ID::uint8* Trail::_InternalSerialize( 29, _Internal::mount_filter(this), target, stream); } - // .ProfessionFilter profession_filter = 30; + // .waypoint.ProfessionFilter profession_filter = 30; if (this->has_profession_filter()) { target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: @@ -2849,7 +2857,7 @@ ::PROTOBUF_NAMESPACE_ID::uint8* Trail::_InternalSerialize( 30, _Internal::profession_filter(this), target, stream); } - // .SpecializationFilter specialization_filter = 31; + // .waypoint.SpecializationFilter specialization_filter = 31; if (this->has_specialization_filter()) { target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: @@ -2857,7 +2865,7 @@ ::PROTOBUF_NAMESPACE_ID::uint8* Trail::_InternalSerialize( 31, _Internal::specialization_filter(this), target, stream); } - // .SpeciesFilter species_filter = 32; + // .waypoint.SpeciesFilter species_filter = 32; if (this->has_species_filter()) { target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: @@ -2869,12 +2877,12 @@ ::PROTOBUF_NAMESPACE_ID::uint8* Trail::_InternalSerialize( target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } - // @@protoc_insertion_point(serialize_to_array_end:Trail) + // @@protoc_insertion_point(serialize_to_array_end:waypoint.Trail) return target; } size_t Trail::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Trail) +// @@protoc_insertion_point(message_byte_size_start:waypoint.Trail) size_t total_size = 0; ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; @@ -2888,77 +2896,77 @@ size_t Trail::ByteSizeLong() const { this->_internal_bhdraft__schedule()); } - // .Category category = 1; + // .waypoint.Category category = 1; if (this->has_category()) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( *category_); } - // .Texture texture = 2; + // .waypoint.Texture texture = 2; if (this->has_texture()) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( *texture_); } - // .GUID guid = 3; + // .waypoint.GUID guid = 3; if (this->has_guid()) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( *guid_); } - // .TrailData trail_data = 7; + // .waypoint.TrailData trail_data = 7; if (this->has_trail_data()) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( *trail_data_); } - // .Color color = 26; + // .waypoint.Color color = 26; if (this->has_color()) { total_size += 2 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( *color_); } - // .FestivalFilter festival_filter = 27; + // .waypoint.FestivalFilter festival_filter = 27; if (this->has_festival_filter()) { total_size += 2 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( *festival_filter_); } - // .MapTypeFilter map_type_filter = 28; + // .waypoint.MapTypeFilter map_type_filter = 28; if (this->has_map_type_filter()) { total_size += 2 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( *map_type_filter_); } - // .MountFilter mount_filter = 29; + // .waypoint.MountFilter mount_filter = 29; if (this->has_mount_filter()) { total_size += 2 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( *mount_filter_); } - // .ProfessionFilter profession_filter = 30; + // .waypoint.ProfessionFilter profession_filter = 30; if (this->has_profession_filter()) { total_size += 2 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( *profession_filter_); } - // .SpecializationFilter specialization_filter = 31; + // .waypoint.SpecializationFilter specialization_filter = 31; if (this->has_specialization_filter()) { total_size += 2 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( *specialization_filter_); } - // .SpeciesFilter species_filter = 32; + // .waypoint.SpeciesFilter species_filter = 32; if (this->has_species_filter()) { total_size += 2 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( @@ -2987,7 +2995,7 @@ size_t Trail::ByteSizeLong() const { total_size += 1 + 4; } - // .CullChirality cull_chirality = 9; + // .waypoint.CullChirality cull_chirality = 9; if (this->cull_chirality() != 0) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_cull_chirality()); @@ -3040,22 +3048,22 @@ size_t Trail::ByteSizeLong() const { } void Trail::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:Trail) +// @@protoc_insertion_point(generalized_merge_from_start:waypoint.Trail) GOOGLE_DCHECK_NE(&from, this); const Trail* source = ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:Trail) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:waypoint.Trail) ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:Trail) + // @@protoc_insertion_point(generalized_merge_from_cast_success:waypoint.Trail) MergeFrom(*source); } } void Trail::MergeFrom(const Trail& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:Trail) +// @@protoc_insertion_point(class_specific_merge_from_start:waypoint.Trail) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; @@ -3065,37 +3073,37 @@ void Trail::MergeFrom(const Trail& from) { _internal_set_bhdraft__schedule(from._internal_bhdraft__schedule()); } if (from.has_category()) { - _internal_mutable_category()->::Category::MergeFrom(from._internal_category()); + _internal_mutable_category()->::waypoint::Category::MergeFrom(from._internal_category()); } if (from.has_texture()) { - _internal_mutable_texture()->::Texture::MergeFrom(from._internal_texture()); + _internal_mutable_texture()->::waypoint::Texture::MergeFrom(from._internal_texture()); } if (from.has_guid()) { - _internal_mutable_guid()->::GUID::MergeFrom(from._internal_guid()); + _internal_mutable_guid()->::waypoint::GUID::MergeFrom(from._internal_guid()); } if (from.has_trail_data()) { - _internal_mutable_trail_data()->::TrailData::MergeFrom(from._internal_trail_data()); + _internal_mutable_trail_data()->::waypoint::TrailData::MergeFrom(from._internal_trail_data()); } if (from.has_color()) { - _internal_mutable_color()->::Color::MergeFrom(from._internal_color()); + _internal_mutable_color()->::waypoint::Color::MergeFrom(from._internal_color()); } if (from.has_festival_filter()) { - _internal_mutable_festival_filter()->::FestivalFilter::MergeFrom(from._internal_festival_filter()); + _internal_mutable_festival_filter()->::waypoint::FestivalFilter::MergeFrom(from._internal_festival_filter()); } if (from.has_map_type_filter()) { - _internal_mutable_map_type_filter()->::MapTypeFilter::MergeFrom(from._internal_map_type_filter()); + _internal_mutable_map_type_filter()->::waypoint::MapTypeFilter::MergeFrom(from._internal_map_type_filter()); } if (from.has_mount_filter()) { - _internal_mutable_mount_filter()->::MountFilter::MergeFrom(from._internal_mount_filter()); + _internal_mutable_mount_filter()->::waypoint::MountFilter::MergeFrom(from._internal_mount_filter()); } if (from.has_profession_filter()) { - _internal_mutable_profession_filter()->::ProfessionFilter::MergeFrom(from._internal_profession_filter()); + _internal_mutable_profession_filter()->::waypoint::ProfessionFilter::MergeFrom(from._internal_profession_filter()); } if (from.has_specialization_filter()) { - _internal_mutable_specialization_filter()->::SpecializationFilter::MergeFrom(from._internal_specialization_filter()); + _internal_mutable_specialization_filter()->::waypoint::SpecializationFilter::MergeFrom(from._internal_specialization_filter()); } if (from.has_species_filter()) { - _internal_mutable_species_filter()->::SpeciesFilter::MergeFrom(from._internal_species_filter()); + _internal_mutable_species_filter()->::waypoint::SpeciesFilter::MergeFrom(from._internal_species_filter()); } if (from.map_id() != 0) { _internal_set_map_id(from._internal_map_id()); @@ -3136,14 +3144,14 @@ void Trail::MergeFrom(const Trail& from) { } void Trail::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:Trail) +// @@protoc_insertion_point(generalized_copy_from_start:waypoint.Trail) if (&from == this) return; Clear(); MergeFrom(from); } void Trail::CopyFrom(const Trail& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Trail) +// @@protoc_insertion_point(class_specific_copy_from_start:waypoint.Trail) if (&from == this) return; Clear(); MergeFrom(from); @@ -3182,7 +3190,7 @@ Texture::Texture(::PROTOBUF_NAMESPACE_ID::Arena* arena) : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:Texture) + // @@protoc_insertion_point(arena_constructor:waypoint.Texture) } Texture::Texture(const Texture& from) : ::PROTOBUF_NAMESPACE_ID::Message() { @@ -3192,16 +3200,16 @@ Texture::Texture(const Texture& from) path_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_path(), GetArena()); } - // @@protoc_insertion_point(copy_constructor:Texture) + // @@protoc_insertion_point(copy_constructor:waypoint.Texture) } void Texture::SharedCtor() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Texture_generators_2fproto_5ftemplates_2fnode_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Texture_waypoint_2eproto.base); path_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } Texture::~Texture() { - // @@protoc_insertion_point(destructor:Texture) + // @@protoc_insertion_point(destructor:waypoint.Texture) SharedDtor(); _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -3221,13 +3229,13 @@ void Texture::SetCachedSize(int size) const { _cached_size_.Set(size); } const Texture& Texture::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Texture_generators_2fproto_5ftemplates_2fnode_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Texture_waypoint_2eproto.base); return *internal_default_instance(); } void Texture::Clear() { -// @@protoc_insertion_point(message_clear_start:Texture) +// @@protoc_insertion_point(message_clear_start:waypoint.Texture) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -3249,7 +3257,7 @@ const char* Texture::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::in if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { auto str = _internal_mutable_path(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "Texture.path")); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "waypoint.Texture.path")); CHK_(ptr); } else goto handle_unusual; continue; @@ -3277,7 +3285,7 @@ const char* Texture::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::in ::PROTOBUF_NAMESPACE_ID::uint8* Texture::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Texture) + // @@protoc_insertion_point(serialize_to_array_start:waypoint.Texture) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -3286,7 +3294,7 @@ ::PROTOBUF_NAMESPACE_ID::uint8* Texture::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_path().data(), static_cast(this->_internal_path().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "Texture.path"); + "waypoint.Texture.path"); target = stream->WriteStringMaybeAliased( 1, this->_internal_path(), target); } @@ -3295,12 +3303,12 @@ ::PROTOBUF_NAMESPACE_ID::uint8* Texture::_InternalSerialize( target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } - // @@protoc_insertion_point(serialize_to_array_end:Texture) + // @@protoc_insertion_point(serialize_to_array_end:waypoint.Texture) return target; } size_t Texture::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Texture) +// @@protoc_insertion_point(message_byte_size_start:waypoint.Texture) size_t total_size = 0; ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; @@ -3324,22 +3332,22 @@ size_t Texture::ByteSizeLong() const { } void Texture::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:Texture) +// @@protoc_insertion_point(generalized_merge_from_start:waypoint.Texture) GOOGLE_DCHECK_NE(&from, this); const Texture* source = ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:Texture) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:waypoint.Texture) ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:Texture) + // @@protoc_insertion_point(generalized_merge_from_cast_success:waypoint.Texture) MergeFrom(*source); } } void Texture::MergeFrom(const Texture& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:Texture) +// @@protoc_insertion_point(class_specific_merge_from_start:waypoint.Texture) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; @@ -3351,14 +3359,14 @@ void Texture::MergeFrom(const Texture& from) { } void Texture::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:Texture) +// @@protoc_insertion_point(generalized_copy_from_start:waypoint.Texture) if (&from == this) return; Clear(); MergeFrom(from); } void Texture::CopyFrom(const Texture& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Texture) +// @@protoc_insertion_point(class_specific_copy_from_start:waypoint.Texture) if (&from == this) return; Clear(); MergeFrom(from); @@ -3391,7 +3399,7 @@ Position::Position(::PROTOBUF_NAMESPACE_ID::Arena* arena) : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:Position) + // @@protoc_insertion_point(arena_constructor:waypoint.Position) } Position::Position(const Position& from) : ::PROTOBUF_NAMESPACE_ID::Message() { @@ -3399,7 +3407,7 @@ Position::Position(const Position& from) ::memcpy(&x_, &from.x_, static_cast(reinterpret_cast(&z_) - reinterpret_cast(&x_)) + sizeof(z_)); - // @@protoc_insertion_point(copy_constructor:Position) + // @@protoc_insertion_point(copy_constructor:waypoint.Position) } void Position::SharedCtor() { @@ -3409,7 +3417,7 @@ void Position::SharedCtor() { } Position::~Position() { - // @@protoc_insertion_point(destructor:Position) + // @@protoc_insertion_point(destructor:waypoint.Position) SharedDtor(); _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -3428,13 +3436,13 @@ void Position::SetCachedSize(int size) const { _cached_size_.Set(size); } const Position& Position::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Position_generators_2fproto_5ftemplates_2fnode_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Position_waypoint_2eproto.base); return *internal_default_instance(); } void Position::Clear() { -// @@protoc_insertion_point(message_clear_start:Position) +// @@protoc_insertion_point(message_clear_start:waypoint.Position) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -3498,7 +3506,7 @@ const char* Position::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::i ::PROTOBUF_NAMESPACE_ID::uint8* Position::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Position) + // @@protoc_insertion_point(serialize_to_array_start:waypoint.Position) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -3524,12 +3532,12 @@ ::PROTOBUF_NAMESPACE_ID::uint8* Position::_InternalSerialize( target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } - // @@protoc_insertion_point(serialize_to_array_end:Position) + // @@protoc_insertion_point(serialize_to_array_end:waypoint.Position) return target; } size_t Position::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Position) +// @@protoc_insertion_point(message_byte_size_start:waypoint.Position) size_t total_size = 0; ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; @@ -3561,22 +3569,22 @@ size_t Position::ByteSizeLong() const { } void Position::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:Position) +// @@protoc_insertion_point(generalized_merge_from_start:waypoint.Position) GOOGLE_DCHECK_NE(&from, this); const Position* source = ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:Position) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:waypoint.Position) ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:Position) + // @@protoc_insertion_point(generalized_merge_from_cast_success:waypoint.Position) MergeFrom(*source); } } void Position::MergeFrom(const Position& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:Position) +// @@protoc_insertion_point(class_specific_merge_from_start:waypoint.Position) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; @@ -3594,14 +3602,14 @@ void Position::MergeFrom(const Position& from) { } void Position::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:Position) +// @@protoc_insertion_point(generalized_copy_from_start:waypoint.Position) if (&from == this) return; Clear(); MergeFrom(from); } void Position::CopyFrom(const Position& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Position) +// @@protoc_insertion_point(class_specific_copy_from_start:waypoint.Position) if (&from == this) return; Clear(); MergeFrom(from); @@ -3639,7 +3647,7 @@ EulerRotation::EulerRotation(::PROTOBUF_NAMESPACE_ID::Arena* arena) : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:EulerRotation) + // @@protoc_insertion_point(arena_constructor:waypoint.EulerRotation) } EulerRotation::EulerRotation(const EulerRotation& from) : ::PROTOBUF_NAMESPACE_ID::Message() { @@ -3647,7 +3655,7 @@ EulerRotation::EulerRotation(const EulerRotation& from) ::memcpy(&x_, &from.x_, static_cast(reinterpret_cast(&z_) - reinterpret_cast(&x_)) + sizeof(z_)); - // @@protoc_insertion_point(copy_constructor:EulerRotation) + // @@protoc_insertion_point(copy_constructor:waypoint.EulerRotation) } void EulerRotation::SharedCtor() { @@ -3657,7 +3665,7 @@ void EulerRotation::SharedCtor() { } EulerRotation::~EulerRotation() { - // @@protoc_insertion_point(destructor:EulerRotation) + // @@protoc_insertion_point(destructor:waypoint.EulerRotation) SharedDtor(); _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -3676,13 +3684,13 @@ void EulerRotation::SetCachedSize(int size) const { _cached_size_.Set(size); } const EulerRotation& EulerRotation::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_EulerRotation_generators_2fproto_5ftemplates_2fnode_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_EulerRotation_waypoint_2eproto.base); return *internal_default_instance(); } void EulerRotation::Clear() { -// @@protoc_insertion_point(message_clear_start:EulerRotation) +// @@protoc_insertion_point(message_clear_start:waypoint.EulerRotation) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -3746,7 +3754,7 @@ const char* EulerRotation::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ ::PROTOBUF_NAMESPACE_ID::uint8* EulerRotation::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:EulerRotation) + // @@protoc_insertion_point(serialize_to_array_start:waypoint.EulerRotation) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -3772,12 +3780,12 @@ ::PROTOBUF_NAMESPACE_ID::uint8* EulerRotation::_InternalSerialize( target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } - // @@protoc_insertion_point(serialize_to_array_end:EulerRotation) + // @@protoc_insertion_point(serialize_to_array_end:waypoint.EulerRotation) return target; } size_t EulerRotation::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:EulerRotation) +// @@protoc_insertion_point(message_byte_size_start:waypoint.EulerRotation) size_t total_size = 0; ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; @@ -3809,22 +3817,22 @@ size_t EulerRotation::ByteSizeLong() const { } void EulerRotation::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:EulerRotation) +// @@protoc_insertion_point(generalized_merge_from_start:waypoint.EulerRotation) GOOGLE_DCHECK_NE(&from, this); const EulerRotation* source = ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:EulerRotation) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:waypoint.EulerRotation) ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:EulerRotation) + // @@protoc_insertion_point(generalized_merge_from_cast_success:waypoint.EulerRotation) MergeFrom(*source); } } void EulerRotation::MergeFrom(const EulerRotation& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:EulerRotation) +// @@protoc_insertion_point(class_specific_merge_from_start:waypoint.EulerRotation) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; @@ -3842,14 +3850,14 @@ void EulerRotation::MergeFrom(const EulerRotation& from) { } void EulerRotation::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:EulerRotation) +// @@protoc_insertion_point(generalized_copy_from_start:waypoint.EulerRotation) if (&from == this) return; Clear(); MergeFrom(from); } void EulerRotation::CopyFrom(const EulerRotation& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:EulerRotation) +// @@protoc_insertion_point(class_specific_copy_from_start:waypoint.EulerRotation) if (&from == this) return; Clear(); MergeFrom(from); @@ -3878,29 +3886,29 @@ ::PROTOBUF_NAMESPACE_ID::Metadata EulerRotation::GetMetadata() const { // =================================================================== void Trigger::InitAsDefaultInstance() { - ::_Trigger_default_instance_._instance.get_mutable()->action_hide_category_ = const_cast< ::Category*>( - ::Category::internal_default_instance()); - ::_Trigger_default_instance_._instance.get_mutable()->action_show_category_ = const_cast< ::Category*>( - ::Category::internal_default_instance()); - ::_Trigger_default_instance_._instance.get_mutable()->action_toggle_category_ = const_cast< ::Category*>( - ::Category::internal_default_instance()); + ::waypoint::_Trigger_default_instance_._instance.get_mutable()->action_hide_category_ = const_cast< ::waypoint::Category*>( + ::waypoint::Category::internal_default_instance()); + ::waypoint::_Trigger_default_instance_._instance.get_mutable()->action_show_category_ = const_cast< ::waypoint::Category*>( + ::waypoint::Category::internal_default_instance()); + ::waypoint::_Trigger_default_instance_._instance.get_mutable()->action_toggle_category_ = const_cast< ::waypoint::Category*>( + ::waypoint::Category::internal_default_instance()); } class Trigger::_Internal { public: - static const ::Category& action_hide_category(const Trigger* msg); - static const ::Category& action_show_category(const Trigger* msg); - static const ::Category& action_toggle_category(const Trigger* msg); + static const ::waypoint::Category& action_hide_category(const Trigger* msg); + static const ::waypoint::Category& action_show_category(const Trigger* msg); + static const ::waypoint::Category& action_toggle_category(const Trigger* msg); }; -const ::Category& +const ::waypoint::Category& Trigger::_Internal::action_hide_category(const Trigger* msg) { return *msg->action_hide_category_; } -const ::Category& +const ::waypoint::Category& Trigger::_Internal::action_show_category(const Trigger* msg) { return *msg->action_show_category_; } -const ::Category& +const ::waypoint::Category& Trigger::_Internal::action_toggle_category(const Trigger* msg) { return *msg->action_toggle_category_; } @@ -3908,7 +3916,7 @@ Trigger::Trigger(::PROTOBUF_NAMESPACE_ID::Arena* arena) : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:Trigger) + // @@protoc_insertion_point(arena_constructor:waypoint.Trigger) } Trigger::Trigger(const Trigger& from) : ::PROTOBUF_NAMESPACE_ID::Message() { @@ -3929,28 +3937,28 @@ Trigger::Trigger(const Trigger& from) GetArena()); } if (from._internal_has_action_hide_category()) { - action_hide_category_ = new ::Category(*from.action_hide_category_); + action_hide_category_ = new ::waypoint::Category(*from.action_hide_category_); } else { action_hide_category_ = nullptr; } if (from._internal_has_action_show_category()) { - action_show_category_ = new ::Category(*from.action_show_category_); + action_show_category_ = new ::waypoint::Category(*from.action_show_category_); } else { action_show_category_ = nullptr; } if (from._internal_has_action_toggle_category()) { - action_toggle_category_ = new ::Category(*from.action_toggle_category_); + action_toggle_category_ = new ::waypoint::Category(*from.action_toggle_category_); } else { action_toggle_category_ = nullptr; } ::memcpy(&bounce_delay_, &from.bounce_delay_, static_cast(reinterpret_cast(&range_) - reinterpret_cast(&bounce_delay_)) + sizeof(range_)); - // @@protoc_insertion_point(copy_constructor:Trigger) + // @@protoc_insertion_point(copy_constructor:waypoint.Trigger) } void Trigger::SharedCtor() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Trigger_generators_2fproto_5ftemplates_2fnode_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Trigger_waypoint_2eproto.base); action_copy_clipboard_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); action_copy_message_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); action_info_message_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); @@ -3960,7 +3968,7 @@ void Trigger::SharedCtor() { } Trigger::~Trigger() { - // @@protoc_insertion_point(destructor:Trigger) + // @@protoc_insertion_point(destructor:waypoint.Trigger) SharedDtor(); _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -3985,13 +3993,13 @@ void Trigger::SetCachedSize(int size) const { _cached_size_.Set(size); } const Trigger& Trigger::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Trigger_generators_2fproto_5ftemplates_2fnode_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Trigger_waypoint_2eproto.base); return *internal_default_instance(); } void Trigger::Clear() { -// @@protoc_insertion_point(message_clear_start:Trigger) +// @@protoc_insertion_point(message_clear_start:waypoint.Trigger) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -4058,7 +4066,7 @@ const char* Trigger::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::in if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) { auto str = _internal_mutable_action_copy_clipboard(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "Trigger.action_copy_clipboard")); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "waypoint.Trigger.action_copy_clipboard")); CHK_(ptr); } else goto handle_unusual; continue; @@ -4067,7 +4075,7 @@ const char* Trigger::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::in if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) { auto str = _internal_mutable_action_copy_message(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "Trigger.action_copy_message")); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "waypoint.Trigger.action_copy_message")); CHK_(ptr); } else goto handle_unusual; continue; @@ -4083,7 +4091,7 @@ const char* Trigger::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::in if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 66)) { auto str = _internal_mutable_action_info_message(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "Trigger.action_info_message")); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "waypoint.Trigger.action_info_message")); CHK_(ptr); } else goto handle_unusual; continue; @@ -4108,21 +4116,21 @@ const char* Trigger::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::in ptr += sizeof(float); } else goto handle_unusual; continue; - // .Category action_hide_category = 12; + // .waypoint.Category action_hide_category = 12; case 12: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 98)) { ptr = ctx->ParseMessage(_internal_mutable_action_hide_category(), ptr); CHK_(ptr); } else goto handle_unusual; continue; - // .Category action_show_category = 13; + // .waypoint.Category action_show_category = 13; case 13: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 106)) { ptr = ctx->ParseMessage(_internal_mutable_action_show_category(), ptr); CHK_(ptr); } else goto handle_unusual; continue; - // .Category action_toggle_category = 14; + // .waypoint.Category action_toggle_category = 14; case 14: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 114)) { ptr = ctx->ParseMessage(_internal_mutable_action_toggle_category(), ptr); @@ -4153,7 +4161,7 @@ const char* Trigger::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::in ::PROTOBUF_NAMESPACE_ID::uint8* Trigger::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Trigger) + // @@protoc_insertion_point(serialize_to_array_start:waypoint.Trigger) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -4186,7 +4194,7 @@ ::PROTOBUF_NAMESPACE_ID::uint8* Trigger::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_action_copy_clipboard().data(), static_cast(this->_internal_action_copy_clipboard().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "Trigger.action_copy_clipboard"); + "waypoint.Trigger.action_copy_clipboard"); target = stream->WriteStringMaybeAliased( 5, this->_internal_action_copy_clipboard(), target); } @@ -4196,7 +4204,7 @@ ::PROTOBUF_NAMESPACE_ID::uint8* Trigger::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_action_copy_message().data(), static_cast(this->_internal_action_copy_message().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "Trigger.action_copy_message"); + "waypoint.Trigger.action_copy_message"); target = stream->WriteStringMaybeAliased( 6, this->_internal_action_copy_message(), target); } @@ -4212,7 +4220,7 @@ ::PROTOBUF_NAMESPACE_ID::uint8* Trigger::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_action_info_message().data(), static_cast(this->_internal_action_info_message().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "Trigger.action_info_message"); + "waypoint.Trigger.action_info_message"); target = stream->WriteStringMaybeAliased( 8, this->_internal_action_info_message(), target); } @@ -4235,7 +4243,7 @@ ::PROTOBUF_NAMESPACE_ID::uint8* Trigger::_InternalSerialize( target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(11, this->_internal_range(), target); } - // .Category action_hide_category = 12; + // .waypoint.Category action_hide_category = 12; if (this->has_action_hide_category()) { target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: @@ -4243,7 +4251,7 @@ ::PROTOBUF_NAMESPACE_ID::uint8* Trigger::_InternalSerialize( 12, _Internal::action_hide_category(this), target, stream); } - // .Category action_show_category = 13; + // .waypoint.Category action_show_category = 13; if (this->has_action_show_category()) { target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: @@ -4251,7 +4259,7 @@ ::PROTOBUF_NAMESPACE_ID::uint8* Trigger::_InternalSerialize( 13, _Internal::action_show_category(this), target, stream); } - // .Category action_toggle_category = 14; + // .waypoint.Category action_toggle_category = 14; if (this->has_action_toggle_category()) { target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: @@ -4263,12 +4271,12 @@ ::PROTOBUF_NAMESPACE_ID::uint8* Trigger::_InternalSerialize( target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } - // @@protoc_insertion_point(serialize_to_array_end:Trigger) + // @@protoc_insertion_point(serialize_to_array_end:waypoint.Trigger) return target; } size_t Trigger::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Trigger) +// @@protoc_insertion_point(message_byte_size_start:waypoint.Trigger) size_t total_size = 0; ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; @@ -4296,21 +4304,21 @@ size_t Trigger::ByteSizeLong() const { this->_internal_action_info_message()); } - // .Category action_hide_category = 12; + // .waypoint.Category action_hide_category = 12; if (this->has_action_hide_category()) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( *action_hide_category_); } - // .Category action_show_category = 13; + // .waypoint.Category action_show_category = 13; if (this->has_action_show_category()) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( *action_show_category_); } - // .Category action_toggle_category = 14; + // .waypoint.Category action_toggle_category = 14; if (this->has_action_toggle_category()) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( @@ -4367,22 +4375,22 @@ size_t Trigger::ByteSizeLong() const { } void Trigger::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:Trigger) +// @@protoc_insertion_point(generalized_merge_from_start:waypoint.Trigger) GOOGLE_DCHECK_NE(&from, this); const Trigger* source = ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:Trigger) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:waypoint.Trigger) ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:Trigger) + // @@protoc_insertion_point(generalized_merge_from_cast_success:waypoint.Trigger) MergeFrom(*source); } } void Trigger::MergeFrom(const Trigger& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:Trigger) +// @@protoc_insertion_point(class_specific_merge_from_start:waypoint.Trigger) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; @@ -4398,13 +4406,13 @@ void Trigger::MergeFrom(const Trigger& from) { _internal_set_action_info_message(from._internal_action_info_message()); } if (from.has_action_hide_category()) { - _internal_mutable_action_hide_category()->::Category::MergeFrom(from._internal_action_hide_category()); + _internal_mutable_action_hide_category()->::waypoint::Category::MergeFrom(from._internal_action_hide_category()); } if (from.has_action_show_category()) { - _internal_mutable_action_show_category()->::Category::MergeFrom(from._internal_action_show_category()); + _internal_mutable_action_show_category()->::waypoint::Category::MergeFrom(from._internal_action_show_category()); } if (from.has_action_toggle_category()) { - _internal_mutable_action_toggle_category()->::Category::MergeFrom(from._internal_action_toggle_category()); + _internal_mutable_action_toggle_category()->::waypoint::Category::MergeFrom(from._internal_action_toggle_category()); } if (!(from.bounce_delay() <= 0 && from.bounce_delay() >= 0)) { _internal_set_bounce_delay(from._internal_bounce_delay()); @@ -4433,14 +4441,14 @@ void Trigger::MergeFrom(const Trigger& from) { } void Trigger::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:Trigger) +// @@protoc_insertion_point(generalized_copy_from_start:waypoint.Trigger) if (&from == this) return; Clear(); MergeFrom(from); } void Trigger::CopyFrom(const Trigger& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Trigger) +// @@protoc_insertion_point(class_specific_copy_from_start:waypoint.Trigger) if (&from == this) return; Clear(); MergeFrom(from); @@ -4481,13 +4489,13 @@ GUID::GUID(::PROTOBUF_NAMESPACE_ID::Arena* arena) : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:GUID) + // @@protoc_insertion_point(arena_constructor:waypoint.GUID) } GUID::GUID(const GUID& from) : ::PROTOBUF_NAMESPACE_ID::Message() { _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); guid_ = from.guid_; - // @@protoc_insertion_point(copy_constructor:GUID) + // @@protoc_insertion_point(copy_constructor:waypoint.GUID) } void GUID::SharedCtor() { @@ -4495,7 +4503,7 @@ void GUID::SharedCtor() { } GUID::~GUID() { - // @@protoc_insertion_point(destructor:GUID) + // @@protoc_insertion_point(destructor:waypoint.GUID) SharedDtor(); _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -4514,13 +4522,13 @@ void GUID::SetCachedSize(int size) const { _cached_size_.Set(size); } const GUID& GUID::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_GUID_generators_2fproto_5ftemplates_2fnode_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_GUID_waypoint_2eproto.base); return *internal_default_instance(); } void GUID::Clear() { -// @@protoc_insertion_point(message_clear_start:GUID) +// @@protoc_insertion_point(message_clear_start:waypoint.GUID) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -4568,7 +4576,7 @@ const char* GUID::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inter ::PROTOBUF_NAMESPACE_ID::uint8* GUID::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:GUID) + // @@protoc_insertion_point(serialize_to_array_start:waypoint.GUID) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -4582,12 +4590,12 @@ ::PROTOBUF_NAMESPACE_ID::uint8* GUID::_InternalSerialize( target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } - // @@protoc_insertion_point(serialize_to_array_end:GUID) + // @@protoc_insertion_point(serialize_to_array_end:waypoint.GUID) return target; } size_t GUID::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:GUID) +// @@protoc_insertion_point(message_byte_size_start:waypoint.GUID) size_t total_size = 0; ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; @@ -4611,22 +4619,22 @@ size_t GUID::ByteSizeLong() const { } void GUID::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:GUID) +// @@protoc_insertion_point(generalized_merge_from_start:waypoint.GUID) GOOGLE_DCHECK_NE(&from, this); const GUID* source = ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:GUID) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:waypoint.GUID) ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:GUID) + // @@protoc_insertion_point(generalized_merge_from_cast_success:waypoint.GUID) MergeFrom(*source); } } void GUID::MergeFrom(const GUID& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:GUID) +// @@protoc_insertion_point(class_specific_merge_from_start:waypoint.GUID) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; @@ -4638,14 +4646,14 @@ void GUID::MergeFrom(const GUID& from) { } void GUID::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:GUID) +// @@protoc_insertion_point(generalized_copy_from_start:waypoint.GUID) if (&from == this) return; Clear(); MergeFrom(from); } void GUID::CopyFrom(const GUID& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:GUID) +// @@protoc_insertion_point(class_specific_copy_from_start:waypoint.GUID) if (&from == this) return; Clear(); MergeFrom(from); @@ -4678,7 +4686,7 @@ Color::Color(::PROTOBUF_NAMESPACE_ID::Arena* arena) : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:Color) + // @@protoc_insertion_point(arena_constructor:waypoint.Color) } Color::Color(const Color& from) : ::PROTOBUF_NAMESPACE_ID::Message() { @@ -4688,16 +4696,16 @@ Color::Color(const Color& from) hex_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_hex(), GetArena()); } - // @@protoc_insertion_point(copy_constructor:Color) + // @@protoc_insertion_point(copy_constructor:waypoint.Color) } void Color::SharedCtor() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Color_generators_2fproto_5ftemplates_2fnode_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Color_waypoint_2eproto.base); hex_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } Color::~Color() { - // @@protoc_insertion_point(destructor:Color) + // @@protoc_insertion_point(destructor:waypoint.Color) SharedDtor(); _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -4717,13 +4725,13 @@ void Color::SetCachedSize(int size) const { _cached_size_.Set(size); } const Color& Color::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Color_generators_2fproto_5ftemplates_2fnode_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Color_waypoint_2eproto.base); return *internal_default_instance(); } void Color::Clear() { -// @@protoc_insertion_point(message_clear_start:Color) +// @@protoc_insertion_point(message_clear_start:waypoint.Color) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -4745,7 +4753,7 @@ const char* Color::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inte if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { auto str = _internal_mutable_hex(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "Color.hex")); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "waypoint.Color.hex")); CHK_(ptr); } else goto handle_unusual; continue; @@ -4773,7 +4781,7 @@ const char* Color::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::inte ::PROTOBUF_NAMESPACE_ID::uint8* Color::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Color) + // @@protoc_insertion_point(serialize_to_array_start:waypoint.Color) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -4782,7 +4790,7 @@ ::PROTOBUF_NAMESPACE_ID::uint8* Color::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_hex().data(), static_cast(this->_internal_hex().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "Color.hex"); + "waypoint.Color.hex"); target = stream->WriteStringMaybeAliased( 1, this->_internal_hex(), target); } @@ -4791,12 +4799,12 @@ ::PROTOBUF_NAMESPACE_ID::uint8* Color::_InternalSerialize( target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } - // @@protoc_insertion_point(serialize_to_array_end:Color) + // @@protoc_insertion_point(serialize_to_array_end:waypoint.Color) return target; } size_t Color::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Color) +// @@protoc_insertion_point(message_byte_size_start:waypoint.Color) size_t total_size = 0; ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; @@ -4820,22 +4828,22 @@ size_t Color::ByteSizeLong() const { } void Color::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:Color) +// @@protoc_insertion_point(generalized_merge_from_start:waypoint.Color) GOOGLE_DCHECK_NE(&from, this); const Color* source = ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:Color) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:waypoint.Color) ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:Color) + // @@protoc_insertion_point(generalized_merge_from_cast_success:waypoint.Color) MergeFrom(*source); } } void Color::MergeFrom(const Color& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:Color) +// @@protoc_insertion_point(class_specific_merge_from_start:waypoint.Color) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; @@ -4847,14 +4855,14 @@ void Color::MergeFrom(const Color& from) { } void Color::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:Color) +// @@protoc_insertion_point(generalized_copy_from_start:waypoint.Color) if (&from == this) return; Clear(); MergeFrom(from); } void Color::CopyFrom(const Color& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Color) +// @@protoc_insertion_point(class_specific_copy_from_start:waypoint.Color) if (&from == this) return; Clear(); MergeFrom(from); @@ -4887,7 +4895,7 @@ FestivalFilter::FestivalFilter(::PROTOBUF_NAMESPACE_ID::Arena* arena) : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:FestivalFilter) + // @@protoc_insertion_point(arena_constructor:waypoint.FestivalFilter) } FestivalFilter::FestivalFilter(const FestivalFilter& from) : ::PROTOBUF_NAMESPACE_ID::Message() { @@ -4895,7 +4903,7 @@ FestivalFilter::FestivalFilter(const FestivalFilter& from) ::memcpy(&dragonbash_, &from.dragonbash_, static_cast(reinterpret_cast(&none_) - reinterpret_cast(&dragonbash_)) + sizeof(none_)); - // @@protoc_insertion_point(copy_constructor:FestivalFilter) + // @@protoc_insertion_point(copy_constructor:waypoint.FestivalFilter) } void FestivalFilter::SharedCtor() { @@ -4905,7 +4913,7 @@ void FestivalFilter::SharedCtor() { } FestivalFilter::~FestivalFilter() { - // @@protoc_insertion_point(destructor:FestivalFilter) + // @@protoc_insertion_point(destructor:waypoint.FestivalFilter) SharedDtor(); _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -4924,13 +4932,13 @@ void FestivalFilter::SetCachedSize(int size) const { _cached_size_.Set(size); } const FestivalFilter& FestivalFilter::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_FestivalFilter_generators_2fproto_5ftemplates_2fnode_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_FestivalFilter_waypoint_2eproto.base); return *internal_default_instance(); } void FestivalFilter::Clear() { -// @@protoc_insertion_point(message_clear_start:FestivalFilter) +// @@protoc_insertion_point(message_clear_start:waypoint.FestivalFilter) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -5022,7 +5030,7 @@ const char* FestivalFilter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE ::PROTOBUF_NAMESPACE_ID::uint8* FestivalFilter::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:FestivalFilter) + // @@protoc_insertion_point(serialize_to_array_start:waypoint.FestivalFilter) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -5072,12 +5080,12 @@ ::PROTOBUF_NAMESPACE_ID::uint8* FestivalFilter::_InternalSerialize( target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } - // @@protoc_insertion_point(serialize_to_array_end:FestivalFilter) + // @@protoc_insertion_point(serialize_to_array_end:waypoint.FestivalFilter) return target; } size_t FestivalFilter::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:FestivalFilter) +// @@protoc_insertion_point(message_byte_size_start:waypoint.FestivalFilter) size_t total_size = 0; ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; @@ -5129,22 +5137,22 @@ size_t FestivalFilter::ByteSizeLong() const { } void FestivalFilter::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:FestivalFilter) +// @@protoc_insertion_point(generalized_merge_from_start:waypoint.FestivalFilter) GOOGLE_DCHECK_NE(&from, this); const FestivalFilter* source = ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:FestivalFilter) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:waypoint.FestivalFilter) ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:FestivalFilter) + // @@protoc_insertion_point(generalized_merge_from_cast_success:waypoint.FestivalFilter) MergeFrom(*source); } } void FestivalFilter::MergeFrom(const FestivalFilter& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:FestivalFilter) +// @@protoc_insertion_point(class_specific_merge_from_start:waypoint.FestivalFilter) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; @@ -5174,14 +5182,14 @@ void FestivalFilter::MergeFrom(const FestivalFilter& from) { } void FestivalFilter::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:FestivalFilter) +// @@protoc_insertion_point(generalized_copy_from_start:waypoint.FestivalFilter) if (&from == this) return; Clear(); MergeFrom(from); } void FestivalFilter::CopyFrom(const FestivalFilter& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:FestivalFilter) +// @@protoc_insertion_point(class_specific_copy_from_start:waypoint.FestivalFilter) if (&from == this) return; Clear(); MergeFrom(from); @@ -5219,7 +5227,7 @@ MapTypeFilter::MapTypeFilter(::PROTOBUF_NAMESPACE_ID::Arena* arena) : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:MapTypeFilter) + // @@protoc_insertion_point(arena_constructor:waypoint.MapTypeFilter) } MapTypeFilter::MapTypeFilter(const MapTypeFilter& from) : ::PROTOBUF_NAMESPACE_ID::Message() { @@ -5227,7 +5235,7 @@ MapTypeFilter::MapTypeFilter(const MapTypeFilter& from) ::memcpy(&unknown_map_, &from.unknown_map_, static_cast(reinterpret_cast(&wvw_lounge_map_) - reinterpret_cast(&unknown_map_)) + sizeof(wvw_lounge_map_)); - // @@protoc_insertion_point(copy_constructor:MapTypeFilter) + // @@protoc_insertion_point(copy_constructor:waypoint.MapTypeFilter) } void MapTypeFilter::SharedCtor() { @@ -5237,7 +5245,7 @@ void MapTypeFilter::SharedCtor() { } MapTypeFilter::~MapTypeFilter() { - // @@protoc_insertion_point(destructor:MapTypeFilter) + // @@protoc_insertion_point(destructor:waypoint.MapTypeFilter) SharedDtor(); _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -5256,13 +5264,13 @@ void MapTypeFilter::SetCachedSize(int size) const { _cached_size_.Set(size); } const MapTypeFilter& MapTypeFilter::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_MapTypeFilter_generators_2fproto_5ftemplates_2fnode_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_MapTypeFilter_waypoint_2eproto.base); return *internal_default_instance(); } void MapTypeFilter::Clear() { -// @@protoc_insertion_point(message_clear_start:MapTypeFilter) +// @@protoc_insertion_point(message_clear_start:waypoint.MapTypeFilter) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -5473,7 +5481,7 @@ const char* MapTypeFilter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ ::PROTOBUF_NAMESPACE_ID::uint8* MapTypeFilter::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:MapTypeFilter) + // @@protoc_insertion_point(serialize_to_array_start:waypoint.MapTypeFilter) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -5625,12 +5633,12 @@ ::PROTOBUF_NAMESPACE_ID::uint8* MapTypeFilter::_InternalSerialize( target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } - // @@protoc_insertion_point(serialize_to_array_end:MapTypeFilter) + // @@protoc_insertion_point(serialize_to_array_end:waypoint.MapTypeFilter) return target; } size_t MapTypeFilter::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:MapTypeFilter) +// @@protoc_insertion_point(message_byte_size_start:waypoint.MapTypeFilter) size_t total_size = 0; ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; @@ -5767,22 +5775,22 @@ size_t MapTypeFilter::ByteSizeLong() const { } void MapTypeFilter::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:MapTypeFilter) +// @@protoc_insertion_point(generalized_merge_from_start:waypoint.MapTypeFilter) GOOGLE_DCHECK_NE(&from, this); const MapTypeFilter* source = ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:MapTypeFilter) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:waypoint.MapTypeFilter) ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:MapTypeFilter) + // @@protoc_insertion_point(generalized_merge_from_cast_success:waypoint.MapTypeFilter) MergeFrom(*source); } } void MapTypeFilter::MergeFrom(const MapTypeFilter& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:MapTypeFilter) +// @@protoc_insertion_point(class_specific_merge_from_start:waypoint.MapTypeFilter) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; @@ -5863,14 +5871,14 @@ void MapTypeFilter::MergeFrom(const MapTypeFilter& from) { } void MapTypeFilter::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:MapTypeFilter) +// @@protoc_insertion_point(generalized_copy_from_start:waypoint.MapTypeFilter) if (&from == this) return; Clear(); MergeFrom(from); } void MapTypeFilter::CopyFrom(const MapTypeFilter& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:MapTypeFilter) +// @@protoc_insertion_point(class_specific_copy_from_start:waypoint.MapTypeFilter) if (&from == this) return; Clear(); MergeFrom(from); @@ -5908,7 +5916,7 @@ MountFilter::MountFilter(::PROTOBUF_NAMESPACE_ID::Arena* arena) : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:MountFilter) + // @@protoc_insertion_point(arena_constructor:waypoint.MountFilter) } MountFilter::MountFilter(const MountFilter& from) : ::PROTOBUF_NAMESPACE_ID::Message() { @@ -5916,7 +5924,7 @@ MountFilter::MountFilter(const MountFilter& from) ::memcpy(&raptor_, &from.raptor_, static_cast(reinterpret_cast(&seige_turtle_) - reinterpret_cast(&raptor_)) + sizeof(seige_turtle_)); - // @@protoc_insertion_point(copy_constructor:MountFilter) + // @@protoc_insertion_point(copy_constructor:waypoint.MountFilter) } void MountFilter::SharedCtor() { @@ -5926,7 +5934,7 @@ void MountFilter::SharedCtor() { } MountFilter::~MountFilter() { - // @@protoc_insertion_point(destructor:MountFilter) + // @@protoc_insertion_point(destructor:waypoint.MountFilter) SharedDtor(); _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -5945,13 +5953,13 @@ void MountFilter::SetCachedSize(int size) const { _cached_size_.Set(size); } const MountFilter& MountFilter::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_MountFilter_generators_2fproto_5ftemplates_2fnode_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_MountFilter_waypoint_2eproto.base); return *internal_default_instance(); } void MountFilter::Clear() { -// @@protoc_insertion_point(message_clear_start:MountFilter) +// @@protoc_insertion_point(message_clear_start:waypoint.MountFilter) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -6064,7 +6072,7 @@ const char* MountFilter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID ::PROTOBUF_NAMESPACE_ID::uint8* MountFilter::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:MountFilter) + // @@protoc_insertion_point(serialize_to_array_start:waypoint.MountFilter) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -6132,12 +6140,12 @@ ::PROTOBUF_NAMESPACE_ID::uint8* MountFilter::_InternalSerialize( target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } - // @@protoc_insertion_point(serialize_to_array_end:MountFilter) + // @@protoc_insertion_point(serialize_to_array_end:waypoint.MountFilter) return target; } size_t MountFilter::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:MountFilter) +// @@protoc_insertion_point(message_byte_size_start:waypoint.MountFilter) size_t total_size = 0; ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; @@ -6204,22 +6212,22 @@ size_t MountFilter::ByteSizeLong() const { } void MountFilter::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:MountFilter) +// @@protoc_insertion_point(generalized_merge_from_start:waypoint.MountFilter) GOOGLE_DCHECK_NE(&from, this); const MountFilter* source = ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:MountFilter) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:waypoint.MountFilter) ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:MountFilter) + // @@protoc_insertion_point(generalized_merge_from_cast_success:waypoint.MountFilter) MergeFrom(*source); } } void MountFilter::MergeFrom(const MountFilter& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:MountFilter) +// @@protoc_insertion_point(class_specific_merge_from_start:waypoint.MountFilter) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; @@ -6258,14 +6266,14 @@ void MountFilter::MergeFrom(const MountFilter& from) { } void MountFilter::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:MountFilter) +// @@protoc_insertion_point(generalized_copy_from_start:waypoint.MountFilter) if (&from == this) return; Clear(); MergeFrom(from); } void MountFilter::CopyFrom(const MountFilter& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:MountFilter) +// @@protoc_insertion_point(class_specific_copy_from_start:waypoint.MountFilter) if (&from == this) return; Clear(); MergeFrom(from); @@ -6303,7 +6311,7 @@ ProfessionFilter::ProfessionFilter(::PROTOBUF_NAMESPACE_ID::Arena* arena) : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:ProfessionFilter) + // @@protoc_insertion_point(arena_constructor:waypoint.ProfessionFilter) } ProfessionFilter::ProfessionFilter(const ProfessionFilter& from) : ::PROTOBUF_NAMESPACE_ID::Message() { @@ -6311,7 +6319,7 @@ ProfessionFilter::ProfessionFilter(const ProfessionFilter& from) ::memcpy(&guardian_, &from.guardian_, static_cast(reinterpret_cast(&revenantnt_) - reinterpret_cast(&guardian_)) + sizeof(revenantnt_)); - // @@protoc_insertion_point(copy_constructor:ProfessionFilter) + // @@protoc_insertion_point(copy_constructor:waypoint.ProfessionFilter) } void ProfessionFilter::SharedCtor() { @@ -6321,7 +6329,7 @@ void ProfessionFilter::SharedCtor() { } ProfessionFilter::~ProfessionFilter() { - // @@protoc_insertion_point(destructor:ProfessionFilter) + // @@protoc_insertion_point(destructor:waypoint.ProfessionFilter) SharedDtor(); _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -6340,13 +6348,13 @@ void ProfessionFilter::SetCachedSize(int size) const { _cached_size_.Set(size); } const ProfessionFilter& ProfessionFilter::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ProfessionFilter_generators_2fproto_5ftemplates_2fnode_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ProfessionFilter_waypoint_2eproto.base); return *internal_default_instance(); } void ProfessionFilter::Clear() { -// @@protoc_insertion_point(message_clear_start:ProfessionFilter) +// @@protoc_insertion_point(message_clear_start:waypoint.ProfessionFilter) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -6452,7 +6460,7 @@ const char* ProfessionFilter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPA ::PROTOBUF_NAMESPACE_ID::uint8* ProfessionFilter::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:ProfessionFilter) + // @@protoc_insertion_point(serialize_to_array_start:waypoint.ProfessionFilter) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -6514,12 +6522,12 @@ ::PROTOBUF_NAMESPACE_ID::uint8* ProfessionFilter::_InternalSerialize( target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } - // @@protoc_insertion_point(serialize_to_array_end:ProfessionFilter) + // @@protoc_insertion_point(serialize_to_array_end:waypoint.ProfessionFilter) return target; } size_t ProfessionFilter::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:ProfessionFilter) +// @@protoc_insertion_point(message_byte_size_start:waypoint.ProfessionFilter) size_t total_size = 0; ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; @@ -6581,22 +6589,22 @@ size_t ProfessionFilter::ByteSizeLong() const { } void ProfessionFilter::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:ProfessionFilter) +// @@protoc_insertion_point(generalized_merge_from_start:waypoint.ProfessionFilter) GOOGLE_DCHECK_NE(&from, this); const ProfessionFilter* source = ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:ProfessionFilter) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:waypoint.ProfessionFilter) ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:ProfessionFilter) + // @@protoc_insertion_point(generalized_merge_from_cast_success:waypoint.ProfessionFilter) MergeFrom(*source); } } void ProfessionFilter::MergeFrom(const ProfessionFilter& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:ProfessionFilter) +// @@protoc_insertion_point(class_specific_merge_from_start:waypoint.ProfessionFilter) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; @@ -6632,14 +6640,14 @@ void ProfessionFilter::MergeFrom(const ProfessionFilter& from) { } void ProfessionFilter::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:ProfessionFilter) +// @@protoc_insertion_point(generalized_copy_from_start:waypoint.ProfessionFilter) if (&from == this) return; Clear(); MergeFrom(from); } void ProfessionFilter::CopyFrom(const ProfessionFilter& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:ProfessionFilter) +// @@protoc_insertion_point(class_specific_copy_from_start:waypoint.ProfessionFilter) if (&from == this) return; Clear(); MergeFrom(from); @@ -6677,7 +6685,7 @@ SpecializationFilter::SpecializationFilter(::PROTOBUF_NAMESPACE_ID::Arena* arena : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:SpecializationFilter) + // @@protoc_insertion_point(arena_constructor:waypoint.SpecializationFilter) } SpecializationFilter::SpecializationFilter(const SpecializationFilter& from) : ::PROTOBUF_NAMESPACE_ID::Message() { @@ -6685,7 +6693,7 @@ SpecializationFilter::SpecializationFilter(const SpecializationFilter& from) ::memcpy(&elementalist_tempest_, &from.elementalist_tempest_, static_cast(reinterpret_cast(&warrior_tactics_) - reinterpret_cast(&elementalist_tempest_)) + sizeof(warrior_tactics_)); - // @@protoc_insertion_point(copy_constructor:SpecializationFilter) + // @@protoc_insertion_point(copy_constructor:waypoint.SpecializationFilter) } void SpecializationFilter::SharedCtor() { @@ -6695,7 +6703,7 @@ void SpecializationFilter::SharedCtor() { } SpecializationFilter::~SpecializationFilter() { - // @@protoc_insertion_point(destructor:SpecializationFilter) + // @@protoc_insertion_point(destructor:waypoint.SpecializationFilter) SharedDtor(); _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -6714,13 +6722,13 @@ void SpecializationFilter::SetCachedSize(int size) const { _cached_size_.Set(size); } const SpecializationFilter& SpecializationFilter::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_SpecializationFilter_generators_2fproto_5ftemplates_2fnode_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_SpecializationFilter_waypoint_2eproto.base); return *internal_default_instance(); } void SpecializationFilter::Clear() { -// @@protoc_insertion_point(message_clear_start:SpecializationFilter) +// @@protoc_insertion_point(message_clear_start:waypoint.SpecializationFilter) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -7267,7 +7275,7 @@ const char* SpecializationFilter::_InternalParse(const char* ptr, ::PROTOBUF_NAM ::PROTOBUF_NAMESPACE_ID::uint8* SpecializationFilter::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:SpecializationFilter) + // @@protoc_insertion_point(serialize_to_array_start:waypoint.SpecializationFilter) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -7707,12 +7715,12 @@ ::PROTOBUF_NAMESPACE_ID::uint8* SpecializationFilter::_InternalSerialize( target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } - // @@protoc_insertion_point(serialize_to_array_end:SpecializationFilter) + // @@protoc_insertion_point(serialize_to_array_end:waypoint.SpecializationFilter) return target; } size_t SpecializationFilter::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:SpecializationFilter) +// @@protoc_insertion_point(message_byte_size_start:waypoint.SpecializationFilter) size_t total_size = 0; ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; @@ -8089,22 +8097,22 @@ size_t SpecializationFilter::ByteSizeLong() const { } void SpecializationFilter::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:SpecializationFilter) +// @@protoc_insertion_point(generalized_merge_from_start:waypoint.SpecializationFilter) GOOGLE_DCHECK_NE(&from, this); const SpecializationFilter* source = ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:SpecializationFilter) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:waypoint.SpecializationFilter) ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:SpecializationFilter) + // @@protoc_insertion_point(generalized_merge_from_cast_success:waypoint.SpecializationFilter) MergeFrom(*source); } } void SpecializationFilter::MergeFrom(const SpecializationFilter& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:SpecializationFilter) +// @@protoc_insertion_point(class_specific_merge_from_start:waypoint.SpecializationFilter) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; @@ -8329,14 +8337,14 @@ void SpecializationFilter::MergeFrom(const SpecializationFilter& from) { } void SpecializationFilter::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:SpecializationFilter) +// @@protoc_insertion_point(generalized_copy_from_start:waypoint.SpecializationFilter) if (&from == this) return; Clear(); MergeFrom(from); } void SpecializationFilter::CopyFrom(const SpecializationFilter& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:SpecializationFilter) +// @@protoc_insertion_point(class_specific_copy_from_start:waypoint.SpecializationFilter) if (&from == this) return; Clear(); MergeFrom(from); @@ -8374,7 +8382,7 @@ SpeciesFilter::SpeciesFilter(::PROTOBUF_NAMESPACE_ID::Arena* arena) : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:SpeciesFilter) + // @@protoc_insertion_point(arena_constructor:waypoint.SpeciesFilter) } SpeciesFilter::SpeciesFilter(const SpeciesFilter& from) : ::PROTOBUF_NAMESPACE_ID::Message() { @@ -8382,7 +8390,7 @@ SpeciesFilter::SpeciesFilter(const SpeciesFilter& from) ::memcpy(&asura_, &from.asura_, static_cast(reinterpret_cast(&sylvari_) - reinterpret_cast(&asura_)) + sizeof(sylvari_)); - // @@protoc_insertion_point(copy_constructor:SpeciesFilter) + // @@protoc_insertion_point(copy_constructor:waypoint.SpeciesFilter) } void SpeciesFilter::SharedCtor() { @@ -8392,7 +8400,7 @@ void SpeciesFilter::SharedCtor() { } SpeciesFilter::~SpeciesFilter() { - // @@protoc_insertion_point(destructor:SpeciesFilter) + // @@protoc_insertion_point(destructor:waypoint.SpeciesFilter) SharedDtor(); _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -8411,13 +8419,13 @@ void SpeciesFilter::SetCachedSize(int size) const { _cached_size_.Set(size); } const SpeciesFilter& SpeciesFilter::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_SpeciesFilter_generators_2fproto_5ftemplates_2fnode_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_SpeciesFilter_waypoint_2eproto.base); return *internal_default_instance(); } void SpeciesFilter::Clear() { -// @@protoc_insertion_point(message_clear_start:SpeciesFilter) +// @@protoc_insertion_point(message_clear_start:waypoint.SpeciesFilter) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -8495,7 +8503,7 @@ const char* SpeciesFilter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ ::PROTOBUF_NAMESPACE_ID::uint8* SpeciesFilter::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:SpeciesFilter) + // @@protoc_insertion_point(serialize_to_array_start:waypoint.SpeciesFilter) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -8533,12 +8541,12 @@ ::PROTOBUF_NAMESPACE_ID::uint8* SpeciesFilter::_InternalSerialize( target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } - // @@protoc_insertion_point(serialize_to_array_end:SpeciesFilter) + // @@protoc_insertion_point(serialize_to_array_end:waypoint.SpeciesFilter) return target; } size_t SpeciesFilter::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:SpeciesFilter) +// @@protoc_insertion_point(message_byte_size_start:waypoint.SpeciesFilter) size_t total_size = 0; ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; @@ -8580,22 +8588,22 @@ size_t SpeciesFilter::ByteSizeLong() const { } void SpeciesFilter::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:SpeciesFilter) +// @@protoc_insertion_point(generalized_merge_from_start:waypoint.SpeciesFilter) GOOGLE_DCHECK_NE(&from, this); const SpeciesFilter* source = ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:SpeciesFilter) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:waypoint.SpeciesFilter) ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:SpeciesFilter) + // @@protoc_insertion_point(generalized_merge_from_cast_success:waypoint.SpeciesFilter) MergeFrom(*source); } } void SpeciesFilter::MergeFrom(const SpeciesFilter& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:SpeciesFilter) +// @@protoc_insertion_point(class_specific_merge_from_start:waypoint.SpeciesFilter) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; @@ -8619,14 +8627,14 @@ void SpeciesFilter::MergeFrom(const SpeciesFilter& from) { } void SpeciesFilter::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:SpeciesFilter) +// @@protoc_insertion_point(generalized_copy_from_start:waypoint.SpeciesFilter) if (&from == this) return; Clear(); MergeFrom(from); } void SpeciesFilter::CopyFrom(const SpeciesFilter& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:SpeciesFilter) +// @@protoc_insertion_point(class_specific_copy_from_start:waypoint.SpeciesFilter) if (&from == this) return; Clear(); MergeFrom(from); @@ -8664,7 +8672,7 @@ TrailData::TrailData(::PROTOBUF_NAMESPACE_ID::Arena* arena) : ::PROTOBUF_NAMESPACE_ID::Message(arena) { SharedCtor(); RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:TrailData) + // @@protoc_insertion_point(arena_constructor:waypoint.TrailData) } TrailData::TrailData(const TrailData& from) : ::PROTOBUF_NAMESPACE_ID::Message() { @@ -8674,16 +8682,16 @@ TrailData::TrailData(const TrailData& from) trail_data_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_trail_data(), GetArena()); } - // @@protoc_insertion_point(copy_constructor:TrailData) + // @@protoc_insertion_point(copy_constructor:waypoint.TrailData) } void TrailData::SharedCtor() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_TrailData_generators_2fproto_5ftemplates_2fnode_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_TrailData_waypoint_2eproto.base); trail_data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } TrailData::~TrailData() { - // @@protoc_insertion_point(destructor:TrailData) + // @@protoc_insertion_point(destructor:waypoint.TrailData) SharedDtor(); _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -8703,13 +8711,13 @@ void TrailData::SetCachedSize(int size) const { _cached_size_.Set(size); } const TrailData& TrailData::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_TrailData_generators_2fproto_5ftemplates_2fnode_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_TrailData_waypoint_2eproto.base); return *internal_default_instance(); } void TrailData::Clear() { -// @@protoc_insertion_point(message_clear_start:TrailData) +// @@protoc_insertion_point(message_clear_start:waypoint.TrailData) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -8731,7 +8739,7 @@ const char* TrailData::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID:: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { auto str = _internal_mutable_trail_data(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "TrailData.trail_data")); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "waypoint.TrailData.trail_data")); CHK_(ptr); } else goto handle_unusual; continue; @@ -8759,7 +8767,7 @@ const char* TrailData::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID:: ::PROTOBUF_NAMESPACE_ID::uint8* TrailData::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:TrailData) + // @@protoc_insertion_point(serialize_to_array_start:waypoint.TrailData) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -8768,7 +8776,7 @@ ::PROTOBUF_NAMESPACE_ID::uint8* TrailData::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_trail_data().data(), static_cast(this->_internal_trail_data().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "TrailData.trail_data"); + "waypoint.TrailData.trail_data"); target = stream->WriteStringMaybeAliased( 1, this->_internal_trail_data(), target); } @@ -8777,12 +8785,12 @@ ::PROTOBUF_NAMESPACE_ID::uint8* TrailData::_InternalSerialize( target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } - // @@protoc_insertion_point(serialize_to_array_end:TrailData) + // @@protoc_insertion_point(serialize_to_array_end:waypoint.TrailData) return target; } size_t TrailData::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:TrailData) +// @@protoc_insertion_point(message_byte_size_start:waypoint.TrailData) size_t total_size = 0; ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; @@ -8806,22 +8814,22 @@ size_t TrailData::ByteSizeLong() const { } void TrailData::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:TrailData) +// @@protoc_insertion_point(generalized_merge_from_start:waypoint.TrailData) GOOGLE_DCHECK_NE(&from, this); const TrailData* source = ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:TrailData) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:waypoint.TrailData) ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:TrailData) + // @@protoc_insertion_point(generalized_merge_from_cast_success:waypoint.TrailData) MergeFrom(*source); } } void TrailData::MergeFrom(const TrailData& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:TrailData) +// @@protoc_insertion_point(class_specific_merge_from_start:waypoint.TrailData) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; @@ -8833,14 +8841,14 @@ void TrailData::MergeFrom(const TrailData& from) { } void TrailData::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:TrailData) +// @@protoc_insertion_point(generalized_copy_from_start:waypoint.TrailData) if (&from == this) return; Clear(); MergeFrom(from); } void TrailData::CopyFrom(const TrailData& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:TrailData) +// @@protoc_insertion_point(class_specific_copy_from_start:waypoint.TrailData) if (&from == this) return; Clear(); MergeFrom(from); @@ -8862,57 +8870,58 @@ ::PROTOBUF_NAMESPACE_ID::Metadata TrailData::GetMetadata() const { // @@protoc_insertion_point(namespace_scope) +} // namespace waypoint PROTOBUF_NAMESPACE_OPEN -template<> PROTOBUF_NOINLINE ::Category_ChildrenEntry_DoNotUse* Arena::CreateMaybeMessage< ::Category_ChildrenEntry_DoNotUse >(Arena* arena) { - return Arena::CreateMessageInternal< ::Category_ChildrenEntry_DoNotUse >(arena); +template<> PROTOBUF_NOINLINE ::waypoint::Category_ChildrenEntry_DoNotUse* Arena::CreateMaybeMessage< ::waypoint::Category_ChildrenEntry_DoNotUse >(Arena* arena) { + return Arena::CreateMessageInternal< ::waypoint::Category_ChildrenEntry_DoNotUse >(arena); } -template<> PROTOBUF_NOINLINE ::Category* Arena::CreateMaybeMessage< ::Category >(Arena* arena) { - return Arena::CreateMessageInternal< ::Category >(arena); +template<> PROTOBUF_NOINLINE ::waypoint::Category* Arena::CreateMaybeMessage< ::waypoint::Category >(Arena* arena) { + return Arena::CreateMessageInternal< ::waypoint::Category >(arena); } -template<> PROTOBUF_NOINLINE ::Icon* Arena::CreateMaybeMessage< ::Icon >(Arena* arena) { - return Arena::CreateMessageInternal< ::Icon >(arena); +template<> PROTOBUF_NOINLINE ::waypoint::Icon* Arena::CreateMaybeMessage< ::waypoint::Icon >(Arena* arena) { + return Arena::CreateMessageInternal< ::waypoint::Icon >(arena); } -template<> PROTOBUF_NOINLINE ::Trail* Arena::CreateMaybeMessage< ::Trail >(Arena* arena) { - return Arena::CreateMessageInternal< ::Trail >(arena); +template<> PROTOBUF_NOINLINE ::waypoint::Trail* Arena::CreateMaybeMessage< ::waypoint::Trail >(Arena* arena) { + return Arena::CreateMessageInternal< ::waypoint::Trail >(arena); } -template<> PROTOBUF_NOINLINE ::Texture* Arena::CreateMaybeMessage< ::Texture >(Arena* arena) { - return Arena::CreateMessageInternal< ::Texture >(arena); +template<> PROTOBUF_NOINLINE ::waypoint::Texture* Arena::CreateMaybeMessage< ::waypoint::Texture >(Arena* arena) { + return Arena::CreateMessageInternal< ::waypoint::Texture >(arena); } -template<> PROTOBUF_NOINLINE ::Position* Arena::CreateMaybeMessage< ::Position >(Arena* arena) { - return Arena::CreateMessageInternal< ::Position >(arena); +template<> PROTOBUF_NOINLINE ::waypoint::Position* Arena::CreateMaybeMessage< ::waypoint::Position >(Arena* arena) { + return Arena::CreateMessageInternal< ::waypoint::Position >(arena); } -template<> PROTOBUF_NOINLINE ::EulerRotation* Arena::CreateMaybeMessage< ::EulerRotation >(Arena* arena) { - return Arena::CreateMessageInternal< ::EulerRotation >(arena); +template<> PROTOBUF_NOINLINE ::waypoint::EulerRotation* Arena::CreateMaybeMessage< ::waypoint::EulerRotation >(Arena* arena) { + return Arena::CreateMessageInternal< ::waypoint::EulerRotation >(arena); } -template<> PROTOBUF_NOINLINE ::Trigger* Arena::CreateMaybeMessage< ::Trigger >(Arena* arena) { - return Arena::CreateMessageInternal< ::Trigger >(arena); +template<> PROTOBUF_NOINLINE ::waypoint::Trigger* Arena::CreateMaybeMessage< ::waypoint::Trigger >(Arena* arena) { + return Arena::CreateMessageInternal< ::waypoint::Trigger >(arena); } -template<> PROTOBUF_NOINLINE ::GUID* Arena::CreateMaybeMessage< ::GUID >(Arena* arena) { - return Arena::CreateMessageInternal< ::GUID >(arena); +template<> PROTOBUF_NOINLINE ::waypoint::GUID* Arena::CreateMaybeMessage< ::waypoint::GUID >(Arena* arena) { + return Arena::CreateMessageInternal< ::waypoint::GUID >(arena); } -template<> PROTOBUF_NOINLINE ::Color* Arena::CreateMaybeMessage< ::Color >(Arena* arena) { - return Arena::CreateMessageInternal< ::Color >(arena); +template<> PROTOBUF_NOINLINE ::waypoint::Color* Arena::CreateMaybeMessage< ::waypoint::Color >(Arena* arena) { + return Arena::CreateMessageInternal< ::waypoint::Color >(arena); } -template<> PROTOBUF_NOINLINE ::FestivalFilter* Arena::CreateMaybeMessage< ::FestivalFilter >(Arena* arena) { - return Arena::CreateMessageInternal< ::FestivalFilter >(arena); +template<> PROTOBUF_NOINLINE ::waypoint::FestivalFilter* Arena::CreateMaybeMessage< ::waypoint::FestivalFilter >(Arena* arena) { + return Arena::CreateMessageInternal< ::waypoint::FestivalFilter >(arena); } -template<> PROTOBUF_NOINLINE ::MapTypeFilter* Arena::CreateMaybeMessage< ::MapTypeFilter >(Arena* arena) { - return Arena::CreateMessageInternal< ::MapTypeFilter >(arena); +template<> PROTOBUF_NOINLINE ::waypoint::MapTypeFilter* Arena::CreateMaybeMessage< ::waypoint::MapTypeFilter >(Arena* arena) { + return Arena::CreateMessageInternal< ::waypoint::MapTypeFilter >(arena); } -template<> PROTOBUF_NOINLINE ::MountFilter* Arena::CreateMaybeMessage< ::MountFilter >(Arena* arena) { - return Arena::CreateMessageInternal< ::MountFilter >(arena); +template<> PROTOBUF_NOINLINE ::waypoint::MountFilter* Arena::CreateMaybeMessage< ::waypoint::MountFilter >(Arena* arena) { + return Arena::CreateMessageInternal< ::waypoint::MountFilter >(arena); } -template<> PROTOBUF_NOINLINE ::ProfessionFilter* Arena::CreateMaybeMessage< ::ProfessionFilter >(Arena* arena) { - return Arena::CreateMessageInternal< ::ProfessionFilter >(arena); +template<> PROTOBUF_NOINLINE ::waypoint::ProfessionFilter* Arena::CreateMaybeMessage< ::waypoint::ProfessionFilter >(Arena* arena) { + return Arena::CreateMessageInternal< ::waypoint::ProfessionFilter >(arena); } -template<> PROTOBUF_NOINLINE ::SpecializationFilter* Arena::CreateMaybeMessage< ::SpecializationFilter >(Arena* arena) { - return Arena::CreateMessageInternal< ::SpecializationFilter >(arena); +template<> PROTOBUF_NOINLINE ::waypoint::SpecializationFilter* Arena::CreateMaybeMessage< ::waypoint::SpecializationFilter >(Arena* arena) { + return Arena::CreateMessageInternal< ::waypoint::SpecializationFilter >(arena); } -template<> PROTOBUF_NOINLINE ::SpeciesFilter* Arena::CreateMaybeMessage< ::SpeciesFilter >(Arena* arena) { - return Arena::CreateMessageInternal< ::SpeciesFilter >(arena); +template<> PROTOBUF_NOINLINE ::waypoint::SpeciesFilter* Arena::CreateMaybeMessage< ::waypoint::SpeciesFilter >(Arena* arena) { + return Arena::CreateMessageInternal< ::waypoint::SpeciesFilter >(arena); } -template<> PROTOBUF_NOINLINE ::TrailData* Arena::CreateMaybeMessage< ::TrailData >(Arena* arena) { - return Arena::CreateMessageInternal< ::TrailData >(arena); +template<> PROTOBUF_NOINLINE ::waypoint::TrailData* Arena::CreateMaybeMessage< ::waypoint::TrailData >(Arena* arena) { + return Arena::CreateMessageInternal< ::waypoint::TrailData >(arena); } PROTOBUF_NAMESPACE_CLOSE diff --git a/xml_converter/generators/proto_templates/node.pb.h b/xml_converter/src/waypoint.pb.h similarity index 78% rename from xml_converter/generators/proto_templates/node.pb.h rename to xml_converter/src/waypoint.pb.h index 4c218eca..d629cd43 100644 --- a/xml_converter/generators/proto_templates/node.pb.h +++ b/xml_converter/src/waypoint.pb.h @@ -1,8 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: generators/proto_templates/node.proto +// source: waypoint.proto -#ifndef GOOGLE_PROTOBUF_INCLUDED_generators_2fproto_5ftemplates_2fnode_2eproto -#define GOOGLE_PROTOBUF_INCLUDED_generators_2fproto_5ftemplates_2fnode_2eproto +#ifndef GOOGLE_PROTOBUF_INCLUDED_waypoint_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_waypoint_2eproto #include #include @@ -38,7 +38,7 @@ #include // @@protoc_insertion_point(includes) #include -#define PROTOBUF_INTERNAL_EXPORT_generators_2fproto_5ftemplates_2fnode_2eproto +#define PROTOBUF_INTERNAL_EXPORT_waypoint_2eproto PROTOBUF_NAMESPACE_OPEN namespace internal { class AnyMetadata; @@ -46,7 +46,7 @@ class AnyMetadata; PROTOBUF_NAMESPACE_CLOSE // Internal implementation detail -- do not use these members. -struct TableStruct_generators_2fproto_5ftemplates_2fnode_2eproto { +struct TableStruct_waypoint_2eproto { static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] PROTOBUF_SECTION_VARIABLE(protodesc_cold); static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[] @@ -57,7 +57,8 @@ struct TableStruct_generators_2fproto_5ftemplates_2fnode_2eproto { static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[]; }; -extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_waypoint_2eproto; +namespace waypoint { class Category; class CategoryDefaultTypeInternal; extern CategoryDefaultTypeInternal _Category_default_instance_; @@ -109,25 +110,27 @@ extern TrailDataDefaultTypeInternal _TrailData_default_instance_; class Trigger; class TriggerDefaultTypeInternal; extern TriggerDefaultTypeInternal _Trigger_default_instance_; +} // namespace waypoint PROTOBUF_NAMESPACE_OPEN -template<> ::Category* Arena::CreateMaybeMessage<::Category>(Arena*); -template<> ::Category_ChildrenEntry_DoNotUse* Arena::CreateMaybeMessage<::Category_ChildrenEntry_DoNotUse>(Arena*); -template<> ::Color* Arena::CreateMaybeMessage<::Color>(Arena*); -template<> ::EulerRotation* Arena::CreateMaybeMessage<::EulerRotation>(Arena*); -template<> ::FestivalFilter* Arena::CreateMaybeMessage<::FestivalFilter>(Arena*); -template<> ::GUID* Arena::CreateMaybeMessage<::GUID>(Arena*); -template<> ::Icon* Arena::CreateMaybeMessage<::Icon>(Arena*); -template<> ::MapTypeFilter* Arena::CreateMaybeMessage<::MapTypeFilter>(Arena*); -template<> ::MountFilter* Arena::CreateMaybeMessage<::MountFilter>(Arena*); -template<> ::Position* Arena::CreateMaybeMessage<::Position>(Arena*); -template<> ::ProfessionFilter* Arena::CreateMaybeMessage<::ProfessionFilter>(Arena*); -template<> ::SpecializationFilter* Arena::CreateMaybeMessage<::SpecializationFilter>(Arena*); -template<> ::SpeciesFilter* Arena::CreateMaybeMessage<::SpeciesFilter>(Arena*); -template<> ::Texture* Arena::CreateMaybeMessage<::Texture>(Arena*); -template<> ::Trail* Arena::CreateMaybeMessage<::Trail>(Arena*); -template<> ::TrailData* Arena::CreateMaybeMessage<::TrailData>(Arena*); -template<> ::Trigger* Arena::CreateMaybeMessage<::Trigger>(Arena*); +template<> ::waypoint::Category* Arena::CreateMaybeMessage<::waypoint::Category>(Arena*); +template<> ::waypoint::Category_ChildrenEntry_DoNotUse* Arena::CreateMaybeMessage<::waypoint::Category_ChildrenEntry_DoNotUse>(Arena*); +template<> ::waypoint::Color* Arena::CreateMaybeMessage<::waypoint::Color>(Arena*); +template<> ::waypoint::EulerRotation* Arena::CreateMaybeMessage<::waypoint::EulerRotation>(Arena*); +template<> ::waypoint::FestivalFilter* Arena::CreateMaybeMessage<::waypoint::FestivalFilter>(Arena*); +template<> ::waypoint::GUID* Arena::CreateMaybeMessage<::waypoint::GUID>(Arena*); +template<> ::waypoint::Icon* Arena::CreateMaybeMessage<::waypoint::Icon>(Arena*); +template<> ::waypoint::MapTypeFilter* Arena::CreateMaybeMessage<::waypoint::MapTypeFilter>(Arena*); +template<> ::waypoint::MountFilter* Arena::CreateMaybeMessage<::waypoint::MountFilter>(Arena*); +template<> ::waypoint::Position* Arena::CreateMaybeMessage<::waypoint::Position>(Arena*); +template<> ::waypoint::ProfessionFilter* Arena::CreateMaybeMessage<::waypoint::ProfessionFilter>(Arena*); +template<> ::waypoint::SpecializationFilter* Arena::CreateMaybeMessage<::waypoint::SpecializationFilter>(Arena*); +template<> ::waypoint::SpeciesFilter* Arena::CreateMaybeMessage<::waypoint::SpeciesFilter>(Arena*); +template<> ::waypoint::Texture* Arena::CreateMaybeMessage<::waypoint::Texture>(Arena*); +template<> ::waypoint::Trail* Arena::CreateMaybeMessage<::waypoint::Trail>(Arena*); +template<> ::waypoint::TrailData* Arena::CreateMaybeMessage<::waypoint::TrailData>(Arena*); +template<> ::waypoint::Trigger* Arena::CreateMaybeMessage<::waypoint::Trigger>(Arena*); PROTOBUF_NAMESPACE_CLOSE +namespace waypoint { enum CullChirality : int { none = 0, @@ -190,13 +193,13 @@ inline bool ResetBehavior_Parse( // =================================================================== class Category_ChildrenEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { public: typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; @@ -205,15 +208,15 @@ class Category_ChildrenEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal void MergeFrom(const Category_ChildrenEntry_DoNotUse& other); static const Category_ChildrenEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_Category_ChildrenEntry_DoNotUse_default_instance_); } static bool ValidateKey(std::string* s) { - return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "Category.ChildrenEntry.key"); + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "waypoint.Category.ChildrenEntry.key"); } static bool ValidateValue(void*) { return true; } void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& other) final; ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; private: static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto); - return ::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto.file_level_metadata[0]; + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_waypoint_2eproto); + return ::descriptor_table_waypoint_2eproto.file_level_metadata[0]; } public: @@ -222,7 +225,7 @@ class Category_ChildrenEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal // ------------------------------------------------------------------- class Category PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Category) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:waypoint.Category) */ { public: inline Category() : Category(nullptr) {}; virtual ~Category(); @@ -311,7 +314,7 @@ class Category PROTOBUF_FINAL : void InternalSwap(Category* other); friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Category"; + return "waypoint.Category"; } protected: explicit Category(::PROTOBUF_NAMESPACE_ID::Arena* arena); @@ -323,8 +326,8 @@ class Category PROTOBUF_FINAL : ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; private: static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto); - return ::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto.file_level_metadata[kIndexInFileMessages]; + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_waypoint_2eproto); + return ::descriptor_table_waypoint_2eproto.file_level_metadata[kIndexInFileMessages]; } public: @@ -342,21 +345,21 @@ class Category PROTOBUF_FINAL : kDefaultVisibilityFieldNumber = 1, kIsSeparatorFieldNumber = 3, }; - // map children = 6; + // map children = 6; int children_size() const; private: int _internal_children_size() const; public: void clear_children(); private: - const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Category >& + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::waypoint::Category >& _internal_children() const; - ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Category >* + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::waypoint::Category >* _internal_mutable_children(); public: - const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Category >& + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::waypoint::Category >& children() const; - ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Category >* + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::waypoint::Category >* mutable_children(); // string display_name = 2; @@ -452,7 +455,7 @@ class Category PROTOBUF_FINAL : void _internal_set_is_separator(bool value); public: - // @@protoc_insertion_point(class_scope:Category) + // @@protoc_insertion_point(class_scope:waypoint.Category) private: class _Internal; @@ -461,7 +464,7 @@ class Category PROTOBUF_FINAL : typedef void DestructorSkippable_; ::PROTOBUF_NAMESPACE_ID::internal::MapField< Category_ChildrenEntry_DoNotUse, - std::string, ::Category, + std::string, ::waypoint::Category, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE, 0 > children_; @@ -471,12 +474,12 @@ class Category PROTOBUF_FINAL : bool default_visibility_; bool is_separator_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_generators_2fproto_5ftemplates_2fnode_2eproto; + friend struct ::TableStruct_waypoint_2eproto; }; // ------------------------------------------------------------------- class Icon PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Icon) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:waypoint.Icon) */ { public: inline Icon() : Icon(nullptr) {}; virtual ~Icon(); @@ -565,7 +568,7 @@ class Icon PROTOBUF_FINAL : void InternalSwap(Icon* other); friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Icon"; + return "waypoint.Icon"; } protected: explicit Icon(::PROTOBUF_NAMESPACE_ID::Arena* arena); @@ -577,8 +580,8 @@ class Icon PROTOBUF_FINAL : ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; private: static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto); - return ::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto.file_level_metadata[kIndexInFileMessages]; + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_waypoint_2eproto); + return ::descriptor_table_waypoint_2eproto.file_level_metadata[kIndexInFileMessages]; } public: @@ -690,95 +693,95 @@ class Icon PROTOBUF_FINAL : std::string* _internal_mutable_bhdraft__schedule(); public: - // .Category category = 1; + // .waypoint.Category category = 1; bool has_category() const; private: bool _internal_has_category() const; public: void clear_category(); - const ::Category& category() const; - ::Category* release_category(); - ::Category* mutable_category(); - void set_allocated_category(::Category* category); + const ::waypoint::Category& category() const; + ::waypoint::Category* release_category(); + ::waypoint::Category* mutable_category(); + void set_allocated_category(::waypoint::Category* category); private: - const ::Category& _internal_category() const; - ::Category* _internal_mutable_category(); + const ::waypoint::Category& _internal_category() const; + ::waypoint::Category* _internal_mutable_category(); public: void unsafe_arena_set_allocated_category( - ::Category* category); - ::Category* unsafe_arena_release_category(); + ::waypoint::Category* category); + ::waypoint::Category* unsafe_arena_release_category(); - // .Texture texture = 2; + // .waypoint.Texture texture = 2; bool has_texture() const; private: bool _internal_has_texture() const; public: void clear_texture(); - const ::Texture& texture() const; - ::Texture* release_texture(); - ::Texture* mutable_texture(); - void set_allocated_texture(::Texture* texture); + const ::waypoint::Texture& texture() const; + ::waypoint::Texture* release_texture(); + ::waypoint::Texture* mutable_texture(); + void set_allocated_texture(::waypoint::Texture* texture); private: - const ::Texture& _internal_texture() const; - ::Texture* _internal_mutable_texture(); + const ::waypoint::Texture& _internal_texture() const; + ::waypoint::Texture* _internal_mutable_texture(); public: void unsafe_arena_set_allocated_texture( - ::Texture* texture); - ::Texture* unsafe_arena_release_texture(); + ::waypoint::Texture* texture); + ::waypoint::Texture* unsafe_arena_release_texture(); - // .GUID guid = 3; + // .waypoint.GUID guid = 3; bool has_guid() const; private: bool _internal_has_guid() const; public: void clear_guid(); - const ::GUID& guid() const; - ::GUID* release_guid(); - ::GUID* mutable_guid(); - void set_allocated_guid(::GUID* guid); + const ::waypoint::GUID& guid() const; + ::waypoint::GUID* release_guid(); + ::waypoint::GUID* mutable_guid(); + void set_allocated_guid(::waypoint::GUID* guid); private: - const ::GUID& _internal_guid() const; - ::GUID* _internal_mutable_guid(); + const ::waypoint::GUID& _internal_guid() const; + ::waypoint::GUID* _internal_mutable_guid(); public: void unsafe_arena_set_allocated_guid( - ::GUID* guid); - ::GUID* unsafe_arena_release_guid(); + ::waypoint::GUID* guid); + ::waypoint::GUID* unsafe_arena_release_guid(); - // .Position position = 8; + // .waypoint.Position position = 8; bool has_position() const; private: bool _internal_has_position() const; public: void clear_position(); - const ::Position& position() const; - ::Position* release_position(); - ::Position* mutable_position(); - void set_allocated_position(::Position* position); + const ::waypoint::Position& position() const; + ::waypoint::Position* release_position(); + ::waypoint::Position* mutable_position(); + void set_allocated_position(::waypoint::Position* position); private: - const ::Position& _internal_position() const; - ::Position* _internal_mutable_position(); + const ::waypoint::Position& _internal_position() const; + ::waypoint::Position* _internal_mutable_position(); public: void unsafe_arena_set_allocated_position( - ::Position* position); - ::Position* unsafe_arena_release_position(); + ::waypoint::Position* position); + ::waypoint::Position* unsafe_arena_release_position(); - // .Trigger trigger = 10; + // .waypoint.Trigger trigger = 10; bool has_trigger() const; private: bool _internal_has_trigger() const; public: void clear_trigger(); - const ::Trigger& trigger() const; - ::Trigger* release_trigger(); - ::Trigger* mutable_trigger(); - void set_allocated_trigger(::Trigger* trigger); + const ::waypoint::Trigger& trigger() const; + ::waypoint::Trigger* release_trigger(); + ::waypoint::Trigger* mutable_trigger(); + void set_allocated_trigger(::waypoint::Trigger* trigger); private: - const ::Trigger& _internal_trigger() const; - ::Trigger* _internal_mutable_trigger(); + const ::waypoint::Trigger& _internal_trigger() const; + ::waypoint::Trigger* _internal_mutable_trigger(); public: void unsafe_arena_set_allocated_trigger( - ::Trigger* trigger); - ::Trigger* unsafe_arena_release_trigger(); + ::waypoint::Trigger* trigger); + ::waypoint::Trigger* unsafe_arena_release_trigger(); // int32 map_id = 4; void clear_map_id(); @@ -816,13 +819,13 @@ class Icon PROTOBUF_FINAL : void _internal_set_height_offset(float value); public: - // .ResetBehavior reset_behavior = 9; + // .waypoint.ResetBehavior reset_behavior = 9; void clear_reset_behavior(); - ::ResetBehavior reset_behavior() const; - void set_reset_behavior(::ResetBehavior value); + ::waypoint::ResetBehavior reset_behavior() const; + void set_reset_behavior(::waypoint::ResetBehavior value); private: - ::ResetBehavior _internal_reset_behavior() const; - void _internal_set_reset_behavior(::ResetBehavior value); + ::waypoint::ResetBehavior _internal_reset_behavior() const; + void _internal_set_reset_behavior(::waypoint::ResetBehavior value); public: // fixed32 achievement_bit = 16; @@ -942,7 +945,7 @@ class Icon PROTOBUF_FINAL : void _internal_set___tentative__render_on_minimap(bool value); public: - // @@protoc_insertion_point(class_scope:Icon) + // @@protoc_insertion_point(class_scope:waypoint.Icon) private: class _Internal; @@ -952,11 +955,11 @@ class Icon PROTOBUF_FINAL : ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr tip_description_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr tip_name_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr bhdraft__schedule_; - ::Category* category_; - ::Texture* texture_; - ::GUID* guid_; - ::Position* position_; - ::Trigger* trigger_; + ::waypoint::Category* category_; + ::waypoint::Texture* texture_; + ::waypoint::GUID* guid_; + ::waypoint::Position* position_; + ::waypoint::Trigger* trigger_; ::PROTOBUF_NAMESPACE_ID::int32 map_id_; float distance_fade_end_; float distance_fade_start_; @@ -976,12 +979,12 @@ class Icon PROTOBUF_FINAL : float __tentative__scale_; bool __tentative__render_on_minimap_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_generators_2fproto_5ftemplates_2fnode_2eproto; + friend struct ::TableStruct_waypoint_2eproto; }; // ------------------------------------------------------------------- class Trail PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Trail) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:waypoint.Trail) */ { public: inline Trail() : Trail(nullptr) {}; virtual ~Trail(); @@ -1070,7 +1073,7 @@ class Trail PROTOBUF_FINAL : void InternalSwap(Trail* other); friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Trail"; + return "waypoint.Trail"; } protected: explicit Trail(::PROTOBUF_NAMESPACE_ID::Arena* arena); @@ -1082,8 +1085,8 @@ class Trail PROTOBUF_FINAL : ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; private: static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto); - return ::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto.file_level_metadata[kIndexInFileMessages]; + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_waypoint_2eproto); + return ::descriptor_table_waypoint_2eproto.file_level_metadata[kIndexInFileMessages]; } public: @@ -1143,203 +1146,203 @@ class Trail PROTOBUF_FINAL : std::string* _internal_mutable_bhdraft__schedule(); public: - // .Category category = 1; + // .waypoint.Category category = 1; bool has_category() const; private: bool _internal_has_category() const; public: void clear_category(); - const ::Category& category() const; - ::Category* release_category(); - ::Category* mutable_category(); - void set_allocated_category(::Category* category); + const ::waypoint::Category& category() const; + ::waypoint::Category* release_category(); + ::waypoint::Category* mutable_category(); + void set_allocated_category(::waypoint::Category* category); private: - const ::Category& _internal_category() const; - ::Category* _internal_mutable_category(); + const ::waypoint::Category& _internal_category() const; + ::waypoint::Category* _internal_mutable_category(); public: void unsafe_arena_set_allocated_category( - ::Category* category); - ::Category* unsafe_arena_release_category(); + ::waypoint::Category* category); + ::waypoint::Category* unsafe_arena_release_category(); - // .Texture texture = 2; + // .waypoint.Texture texture = 2; bool has_texture() const; private: bool _internal_has_texture() const; public: void clear_texture(); - const ::Texture& texture() const; - ::Texture* release_texture(); - ::Texture* mutable_texture(); - void set_allocated_texture(::Texture* texture); + const ::waypoint::Texture& texture() const; + ::waypoint::Texture* release_texture(); + ::waypoint::Texture* mutable_texture(); + void set_allocated_texture(::waypoint::Texture* texture); private: - const ::Texture& _internal_texture() const; - ::Texture* _internal_mutable_texture(); + const ::waypoint::Texture& _internal_texture() const; + ::waypoint::Texture* _internal_mutable_texture(); public: void unsafe_arena_set_allocated_texture( - ::Texture* texture); - ::Texture* unsafe_arena_release_texture(); + ::waypoint::Texture* texture); + ::waypoint::Texture* unsafe_arena_release_texture(); - // .GUID guid = 3; + // .waypoint.GUID guid = 3; bool has_guid() const; private: bool _internal_has_guid() const; public: void clear_guid(); - const ::GUID& guid() const; - ::GUID* release_guid(); - ::GUID* mutable_guid(); - void set_allocated_guid(::GUID* guid); + const ::waypoint::GUID& guid() const; + ::waypoint::GUID* release_guid(); + ::waypoint::GUID* mutable_guid(); + void set_allocated_guid(::waypoint::GUID* guid); private: - const ::GUID& _internal_guid() const; - ::GUID* _internal_mutable_guid(); + const ::waypoint::GUID& _internal_guid() const; + ::waypoint::GUID* _internal_mutable_guid(); public: void unsafe_arena_set_allocated_guid( - ::GUID* guid); - ::GUID* unsafe_arena_release_guid(); + ::waypoint::GUID* guid); + ::waypoint::GUID* unsafe_arena_release_guid(); - // .TrailData trail_data = 7; + // .waypoint.TrailData trail_data = 7; bool has_trail_data() const; private: bool _internal_has_trail_data() const; public: void clear_trail_data(); - const ::TrailData& trail_data() const; - ::TrailData* release_trail_data(); - ::TrailData* mutable_trail_data(); - void set_allocated_trail_data(::TrailData* trail_data); + const ::waypoint::TrailData& trail_data() const; + ::waypoint::TrailData* release_trail_data(); + ::waypoint::TrailData* mutable_trail_data(); + void set_allocated_trail_data(::waypoint::TrailData* trail_data); private: - const ::TrailData& _internal_trail_data() const; - ::TrailData* _internal_mutable_trail_data(); + const ::waypoint::TrailData& _internal_trail_data() const; + ::waypoint::TrailData* _internal_mutable_trail_data(); public: void unsafe_arena_set_allocated_trail_data( - ::TrailData* trail_data); - ::TrailData* unsafe_arena_release_trail_data(); + ::waypoint::TrailData* trail_data); + ::waypoint::TrailData* unsafe_arena_release_trail_data(); - // .Color color = 26; + // .waypoint.Color color = 26; bool has_color() const; private: bool _internal_has_color() const; public: void clear_color(); - const ::Color& color() const; - ::Color* release_color(); - ::Color* mutable_color(); - void set_allocated_color(::Color* color); + const ::waypoint::Color& color() const; + ::waypoint::Color* release_color(); + ::waypoint::Color* mutable_color(); + void set_allocated_color(::waypoint::Color* color); private: - const ::Color& _internal_color() const; - ::Color* _internal_mutable_color(); + const ::waypoint::Color& _internal_color() const; + ::waypoint::Color* _internal_mutable_color(); public: void unsafe_arena_set_allocated_color( - ::Color* color); - ::Color* unsafe_arena_release_color(); + ::waypoint::Color* color); + ::waypoint::Color* unsafe_arena_release_color(); - // .FestivalFilter festival_filter = 27; + // .waypoint.FestivalFilter festival_filter = 27; bool has_festival_filter() const; private: bool _internal_has_festival_filter() const; public: void clear_festival_filter(); - const ::FestivalFilter& festival_filter() const; - ::FestivalFilter* release_festival_filter(); - ::FestivalFilter* mutable_festival_filter(); - void set_allocated_festival_filter(::FestivalFilter* festival_filter); + const ::waypoint::FestivalFilter& festival_filter() const; + ::waypoint::FestivalFilter* release_festival_filter(); + ::waypoint::FestivalFilter* mutable_festival_filter(); + void set_allocated_festival_filter(::waypoint::FestivalFilter* festival_filter); private: - const ::FestivalFilter& _internal_festival_filter() const; - ::FestivalFilter* _internal_mutable_festival_filter(); + const ::waypoint::FestivalFilter& _internal_festival_filter() const; + ::waypoint::FestivalFilter* _internal_mutable_festival_filter(); public: void unsafe_arena_set_allocated_festival_filter( - ::FestivalFilter* festival_filter); - ::FestivalFilter* unsafe_arena_release_festival_filter(); + ::waypoint::FestivalFilter* festival_filter); + ::waypoint::FestivalFilter* unsafe_arena_release_festival_filter(); - // .MapTypeFilter map_type_filter = 28; + // .waypoint.MapTypeFilter map_type_filter = 28; bool has_map_type_filter() const; private: bool _internal_has_map_type_filter() const; public: void clear_map_type_filter(); - const ::MapTypeFilter& map_type_filter() const; - ::MapTypeFilter* release_map_type_filter(); - ::MapTypeFilter* mutable_map_type_filter(); - void set_allocated_map_type_filter(::MapTypeFilter* map_type_filter); + const ::waypoint::MapTypeFilter& map_type_filter() const; + ::waypoint::MapTypeFilter* release_map_type_filter(); + ::waypoint::MapTypeFilter* mutable_map_type_filter(); + void set_allocated_map_type_filter(::waypoint::MapTypeFilter* map_type_filter); private: - const ::MapTypeFilter& _internal_map_type_filter() const; - ::MapTypeFilter* _internal_mutable_map_type_filter(); + const ::waypoint::MapTypeFilter& _internal_map_type_filter() const; + ::waypoint::MapTypeFilter* _internal_mutable_map_type_filter(); public: void unsafe_arena_set_allocated_map_type_filter( - ::MapTypeFilter* map_type_filter); - ::MapTypeFilter* unsafe_arena_release_map_type_filter(); + ::waypoint::MapTypeFilter* map_type_filter); + ::waypoint::MapTypeFilter* unsafe_arena_release_map_type_filter(); - // .MountFilter mount_filter = 29; + // .waypoint.MountFilter mount_filter = 29; bool has_mount_filter() const; private: bool _internal_has_mount_filter() const; public: void clear_mount_filter(); - const ::MountFilter& mount_filter() const; - ::MountFilter* release_mount_filter(); - ::MountFilter* mutable_mount_filter(); - void set_allocated_mount_filter(::MountFilter* mount_filter); + const ::waypoint::MountFilter& mount_filter() const; + ::waypoint::MountFilter* release_mount_filter(); + ::waypoint::MountFilter* mutable_mount_filter(); + void set_allocated_mount_filter(::waypoint::MountFilter* mount_filter); private: - const ::MountFilter& _internal_mount_filter() const; - ::MountFilter* _internal_mutable_mount_filter(); + const ::waypoint::MountFilter& _internal_mount_filter() const; + ::waypoint::MountFilter* _internal_mutable_mount_filter(); public: void unsafe_arena_set_allocated_mount_filter( - ::MountFilter* mount_filter); - ::MountFilter* unsafe_arena_release_mount_filter(); + ::waypoint::MountFilter* mount_filter); + ::waypoint::MountFilter* unsafe_arena_release_mount_filter(); - // .ProfessionFilter profession_filter = 30; + // .waypoint.ProfessionFilter profession_filter = 30; bool has_profession_filter() const; private: bool _internal_has_profession_filter() const; public: void clear_profession_filter(); - const ::ProfessionFilter& profession_filter() const; - ::ProfessionFilter* release_profession_filter(); - ::ProfessionFilter* mutable_profession_filter(); - void set_allocated_profession_filter(::ProfessionFilter* profession_filter); + const ::waypoint::ProfessionFilter& profession_filter() const; + ::waypoint::ProfessionFilter* release_profession_filter(); + ::waypoint::ProfessionFilter* mutable_profession_filter(); + void set_allocated_profession_filter(::waypoint::ProfessionFilter* profession_filter); private: - const ::ProfessionFilter& _internal_profession_filter() const; - ::ProfessionFilter* _internal_mutable_profession_filter(); + const ::waypoint::ProfessionFilter& _internal_profession_filter() const; + ::waypoint::ProfessionFilter* _internal_mutable_profession_filter(); public: void unsafe_arena_set_allocated_profession_filter( - ::ProfessionFilter* profession_filter); - ::ProfessionFilter* unsafe_arena_release_profession_filter(); + ::waypoint::ProfessionFilter* profession_filter); + ::waypoint::ProfessionFilter* unsafe_arena_release_profession_filter(); - // .SpecializationFilter specialization_filter = 31; + // .waypoint.SpecializationFilter specialization_filter = 31; bool has_specialization_filter() const; private: bool _internal_has_specialization_filter() const; public: void clear_specialization_filter(); - const ::SpecializationFilter& specialization_filter() const; - ::SpecializationFilter* release_specialization_filter(); - ::SpecializationFilter* mutable_specialization_filter(); - void set_allocated_specialization_filter(::SpecializationFilter* specialization_filter); + const ::waypoint::SpecializationFilter& specialization_filter() const; + ::waypoint::SpecializationFilter* release_specialization_filter(); + ::waypoint::SpecializationFilter* mutable_specialization_filter(); + void set_allocated_specialization_filter(::waypoint::SpecializationFilter* specialization_filter); private: - const ::SpecializationFilter& _internal_specialization_filter() const; - ::SpecializationFilter* _internal_mutable_specialization_filter(); + const ::waypoint::SpecializationFilter& _internal_specialization_filter() const; + ::waypoint::SpecializationFilter* _internal_mutable_specialization_filter(); public: void unsafe_arena_set_allocated_specialization_filter( - ::SpecializationFilter* specialization_filter); - ::SpecializationFilter* unsafe_arena_release_specialization_filter(); + ::waypoint::SpecializationFilter* specialization_filter); + ::waypoint::SpecializationFilter* unsafe_arena_release_specialization_filter(); - // .SpeciesFilter species_filter = 32; + // .waypoint.SpeciesFilter species_filter = 32; bool has_species_filter() const; private: bool _internal_has_species_filter() const; public: void clear_species_filter(); - const ::SpeciesFilter& species_filter() const; - ::SpeciesFilter* release_species_filter(); - ::SpeciesFilter* mutable_species_filter(); - void set_allocated_species_filter(::SpeciesFilter* species_filter); + const ::waypoint::SpeciesFilter& species_filter() const; + ::waypoint::SpeciesFilter* release_species_filter(); + ::waypoint::SpeciesFilter* mutable_species_filter(); + void set_allocated_species_filter(::waypoint::SpeciesFilter* species_filter); private: - const ::SpeciesFilter& _internal_species_filter() const; - ::SpeciesFilter* _internal_mutable_species_filter(); + const ::waypoint::SpeciesFilter& _internal_species_filter() const; + ::waypoint::SpeciesFilter* _internal_mutable_species_filter(); public: void unsafe_arena_set_allocated_species_filter( - ::SpeciesFilter* species_filter); - ::SpeciesFilter* unsafe_arena_release_species_filter(); + ::waypoint::SpeciesFilter* species_filter); + ::waypoint::SpeciesFilter* unsafe_arena_release_species_filter(); // int32 map_id = 4; void clear_map_id(); @@ -1377,13 +1380,13 @@ class Trail PROTOBUF_FINAL : void _internal_set_animation_speed(float value); public: - // .CullChirality cull_chirality = 9; + // .waypoint.CullChirality cull_chirality = 9; void clear_cull_chirality(); - ::CullChirality cull_chirality() const; - void set_cull_chirality(::CullChirality value); + ::waypoint::CullChirality cull_chirality() const; + void set_cull_chirality(::waypoint::CullChirality value); private: - ::CullChirality _internal_cull_chirality() const; - void _internal_set_cull_chirality(::CullChirality value); + ::waypoint::CullChirality _internal_cull_chirality() const; + void _internal_set_cull_chirality(::waypoint::CullChirality value); public: // fixed32 achievement_bit = 16; @@ -1449,7 +1452,7 @@ class Trail PROTOBUF_FINAL : void _internal_set_scale(float value); public: - // @@protoc_insertion_point(class_scope:Trail) + // @@protoc_insertion_point(class_scope:waypoint.Trail) private: class _Internal; @@ -1457,17 +1460,17 @@ class Trail PROTOBUF_FINAL : typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr bhdraft__schedule_; - ::Category* category_; - ::Texture* texture_; - ::GUID* guid_; - ::TrailData* trail_data_; - ::Color* color_; - ::FestivalFilter* festival_filter_; - ::MapTypeFilter* map_type_filter_; - ::MountFilter* mount_filter_; - ::ProfessionFilter* profession_filter_; - ::SpecializationFilter* specialization_filter_; - ::SpeciesFilter* species_filter_; + ::waypoint::Category* category_; + ::waypoint::Texture* texture_; + ::waypoint::GUID* guid_; + ::waypoint::TrailData* trail_data_; + ::waypoint::Color* color_; + ::waypoint::FestivalFilter* festival_filter_; + ::waypoint::MapTypeFilter* map_type_filter_; + ::waypoint::MountFilter* mount_filter_; + ::waypoint::ProfessionFilter* profession_filter_; + ::waypoint::SpecializationFilter* specialization_filter_; + ::waypoint::SpeciesFilter* species_filter_; ::PROTOBUF_NAMESPACE_ID::int32 map_id_; float distance_fade_end_; float distance_fade_start_; @@ -1481,12 +1484,12 @@ class Trail PROTOBUF_FINAL : float bhdraft__schedule_duration_; float scale_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_generators_2fproto_5ftemplates_2fnode_2eproto; + friend struct ::TableStruct_waypoint_2eproto; }; // ------------------------------------------------------------------- class Texture PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Texture) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:waypoint.Texture) */ { public: inline Texture() : Texture(nullptr) {}; virtual ~Texture(); @@ -1575,7 +1578,7 @@ class Texture PROTOBUF_FINAL : void InternalSwap(Texture* other); friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Texture"; + return "waypoint.Texture"; } protected: explicit Texture(::PROTOBUF_NAMESPACE_ID::Arena* arena); @@ -1587,8 +1590,8 @@ class Texture PROTOBUF_FINAL : ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; private: static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto); - return ::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto.file_level_metadata[kIndexInFileMessages]; + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_waypoint_2eproto); + return ::descriptor_table_waypoint_2eproto.file_level_metadata[kIndexInFileMessages]; } public: @@ -1625,7 +1628,7 @@ class Texture PROTOBUF_FINAL : std::string* _internal_mutable_path(); public: - // @@protoc_insertion_point(class_scope:Texture) + // @@protoc_insertion_point(class_scope:waypoint.Texture) private: class _Internal; @@ -1634,12 +1637,12 @@ class Texture PROTOBUF_FINAL : typedef void DestructorSkippable_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr path_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_generators_2fproto_5ftemplates_2fnode_2eproto; + friend struct ::TableStruct_waypoint_2eproto; }; // ------------------------------------------------------------------- class Position PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Position) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:waypoint.Position) */ { public: inline Position() : Position(nullptr) {}; virtual ~Position(); @@ -1728,7 +1731,7 @@ class Position PROTOBUF_FINAL : void InternalSwap(Position* other); friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Position"; + return "waypoint.Position"; } protected: explicit Position(::PROTOBUF_NAMESPACE_ID::Arena* arena); @@ -1740,8 +1743,8 @@ class Position PROTOBUF_FINAL : ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; private: static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto); - return ::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto.file_level_metadata[kIndexInFileMessages]; + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_waypoint_2eproto); + return ::descriptor_table_waypoint_2eproto.file_level_metadata[kIndexInFileMessages]; } public: @@ -1782,7 +1785,7 @@ class Position PROTOBUF_FINAL : void _internal_set_z(float value); public: - // @@protoc_insertion_point(class_scope:Position) + // @@protoc_insertion_point(class_scope:waypoint.Position) private: class _Internal; @@ -1793,12 +1796,12 @@ class Position PROTOBUF_FINAL : float y_; float z_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_generators_2fproto_5ftemplates_2fnode_2eproto; + friend struct ::TableStruct_waypoint_2eproto; }; // ------------------------------------------------------------------- class EulerRotation PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:EulerRotation) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:waypoint.EulerRotation) */ { public: inline EulerRotation() : EulerRotation(nullptr) {}; virtual ~EulerRotation(); @@ -1887,7 +1890,7 @@ class EulerRotation PROTOBUF_FINAL : void InternalSwap(EulerRotation* other); friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "EulerRotation"; + return "waypoint.EulerRotation"; } protected: explicit EulerRotation(::PROTOBUF_NAMESPACE_ID::Arena* arena); @@ -1899,8 +1902,8 @@ class EulerRotation PROTOBUF_FINAL : ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; private: static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto); - return ::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto.file_level_metadata[kIndexInFileMessages]; + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_waypoint_2eproto); + return ::descriptor_table_waypoint_2eproto.file_level_metadata[kIndexInFileMessages]; } public: @@ -1941,7 +1944,7 @@ class EulerRotation PROTOBUF_FINAL : void _internal_set_z(float value); public: - // @@protoc_insertion_point(class_scope:EulerRotation) + // @@protoc_insertion_point(class_scope:waypoint.EulerRotation) private: class _Internal; @@ -1952,12 +1955,12 @@ class EulerRotation PROTOBUF_FINAL : float y_; float z_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_generators_2fproto_5ftemplates_2fnode_2eproto; + friend struct ::TableStruct_waypoint_2eproto; }; // ------------------------------------------------------------------- class Trigger PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Trigger) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:waypoint.Trigger) */ { public: inline Trigger() : Trigger(nullptr) {}; virtual ~Trigger(); @@ -2046,7 +2049,7 @@ class Trigger PROTOBUF_FINAL : void InternalSwap(Trigger* other); friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Trigger"; + return "waypoint.Trigger"; } protected: explicit Trigger(::PROTOBUF_NAMESPACE_ID::Arena* arena); @@ -2058,8 +2061,8 @@ class Trigger PROTOBUF_FINAL : ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; private: static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto); - return ::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto.file_level_metadata[kIndexInFileMessages]; + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_waypoint_2eproto); + return ::descriptor_table_waypoint_2eproto.file_level_metadata[kIndexInFileMessages]; } public: @@ -2159,59 +2162,59 @@ class Trigger PROTOBUF_FINAL : std::string* _internal_mutable_action_info_message(); public: - // .Category action_hide_category = 12; + // .waypoint.Category action_hide_category = 12; bool has_action_hide_category() const; private: bool _internal_has_action_hide_category() const; public: void clear_action_hide_category(); - const ::Category& action_hide_category() const; - ::Category* release_action_hide_category(); - ::Category* mutable_action_hide_category(); - void set_allocated_action_hide_category(::Category* action_hide_category); + const ::waypoint::Category& action_hide_category() const; + ::waypoint::Category* release_action_hide_category(); + ::waypoint::Category* mutable_action_hide_category(); + void set_allocated_action_hide_category(::waypoint::Category* action_hide_category); private: - const ::Category& _internal_action_hide_category() const; - ::Category* _internal_mutable_action_hide_category(); + const ::waypoint::Category& _internal_action_hide_category() const; + ::waypoint::Category* _internal_mutable_action_hide_category(); public: void unsafe_arena_set_allocated_action_hide_category( - ::Category* action_hide_category); - ::Category* unsafe_arena_release_action_hide_category(); + ::waypoint::Category* action_hide_category); + ::waypoint::Category* unsafe_arena_release_action_hide_category(); - // .Category action_show_category = 13; + // .waypoint.Category action_show_category = 13; bool has_action_show_category() const; private: bool _internal_has_action_show_category() const; public: void clear_action_show_category(); - const ::Category& action_show_category() const; - ::Category* release_action_show_category(); - ::Category* mutable_action_show_category(); - void set_allocated_action_show_category(::Category* action_show_category); + const ::waypoint::Category& action_show_category() const; + ::waypoint::Category* release_action_show_category(); + ::waypoint::Category* mutable_action_show_category(); + void set_allocated_action_show_category(::waypoint::Category* action_show_category); private: - const ::Category& _internal_action_show_category() const; - ::Category* _internal_mutable_action_show_category(); + const ::waypoint::Category& _internal_action_show_category() const; + ::waypoint::Category* _internal_mutable_action_show_category(); public: void unsafe_arena_set_allocated_action_show_category( - ::Category* action_show_category); - ::Category* unsafe_arena_release_action_show_category(); + ::waypoint::Category* action_show_category); + ::waypoint::Category* unsafe_arena_release_action_show_category(); - // .Category action_toggle_category = 14; + // .waypoint.Category action_toggle_category = 14; bool has_action_toggle_category() const; private: bool _internal_has_action_toggle_category() const; public: void clear_action_toggle_category(); - const ::Category& action_toggle_category() const; - ::Category* release_action_toggle_category(); - ::Category* mutable_action_toggle_category(); - void set_allocated_action_toggle_category(::Category* action_toggle_category); + const ::waypoint::Category& action_toggle_category() const; + ::waypoint::Category* release_action_toggle_category(); + ::waypoint::Category* mutable_action_toggle_category(); + void set_allocated_action_toggle_category(::waypoint::Category* action_toggle_category); private: - const ::Category& _internal_action_toggle_category() const; - ::Category* _internal_mutable_action_toggle_category(); + const ::waypoint::Category& _internal_action_toggle_category() const; + ::waypoint::Category* _internal_mutable_action_toggle_category(); public: void unsafe_arena_set_allocated_action_toggle_category( - ::Category* action_toggle_category); - ::Category* unsafe_arena_release_action_toggle_category(); + ::waypoint::Category* action_toggle_category); + ::waypoint::Category* unsafe_arena_release_action_toggle_category(); // float bounce_delay = 2; void clear_bounce_delay(); @@ -2285,7 +2288,7 @@ class Trigger PROTOBUF_FINAL : void _internal_set_range(float value); public: - // @@protoc_insertion_point(class_scope:Trigger) + // @@protoc_insertion_point(class_scope:waypoint.Trigger) private: class _Internal; @@ -2295,9 +2298,9 @@ class Trigger PROTOBUF_FINAL : ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr action_copy_clipboard_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr action_copy_message_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr action_info_message_; - ::Category* action_hide_category_; - ::Category* action_show_category_; - ::Category* action_toggle_category_; + ::waypoint::Category* action_hide_category_; + ::waypoint::Category* action_show_category_; + ::waypoint::Category* action_toggle_category_; float bounce_delay_; float bounce_duration_; float bounce_height_; @@ -2307,12 +2310,12 @@ class Trigger PROTOBUF_FINAL : float reset_length_; float range_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_generators_2fproto_5ftemplates_2fnode_2eproto; + friend struct ::TableStruct_waypoint_2eproto; }; // ------------------------------------------------------------------- class GUID PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:GUID) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:waypoint.GUID) */ { public: inline GUID() : GUID(nullptr) {}; virtual ~GUID(); @@ -2401,7 +2404,7 @@ class GUID PROTOBUF_FINAL : void InternalSwap(GUID* other); friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "GUID"; + return "waypoint.GUID"; } protected: explicit GUID(::PROTOBUF_NAMESPACE_ID::Arena* arena); @@ -2413,8 +2416,8 @@ class GUID PROTOBUF_FINAL : ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; private: static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto); - return ::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto.file_level_metadata[kIndexInFileMessages]; + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_waypoint_2eproto); + return ::descriptor_table_waypoint_2eproto.file_level_metadata[kIndexInFileMessages]; } public: @@ -2435,7 +2438,7 @@ class GUID PROTOBUF_FINAL : void _internal_set_guid(::PROTOBUF_NAMESPACE_ID::int32 value); public: - // @@protoc_insertion_point(class_scope:GUID) + // @@protoc_insertion_point(class_scope:waypoint.GUID) private: class _Internal; @@ -2444,12 +2447,12 @@ class GUID PROTOBUF_FINAL : typedef void DestructorSkippable_; ::PROTOBUF_NAMESPACE_ID::int32 guid_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_generators_2fproto_5ftemplates_2fnode_2eproto; + friend struct ::TableStruct_waypoint_2eproto; }; // ------------------------------------------------------------------- class Color PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Color) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:waypoint.Color) */ { public: inline Color() : Color(nullptr) {}; virtual ~Color(); @@ -2538,7 +2541,7 @@ class Color PROTOBUF_FINAL : void InternalSwap(Color* other); friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Color"; + return "waypoint.Color"; } protected: explicit Color(::PROTOBUF_NAMESPACE_ID::Arena* arena); @@ -2550,8 +2553,8 @@ class Color PROTOBUF_FINAL : ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; private: static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto); - return ::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto.file_level_metadata[kIndexInFileMessages]; + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_waypoint_2eproto); + return ::descriptor_table_waypoint_2eproto.file_level_metadata[kIndexInFileMessages]; } public: @@ -2588,7 +2591,7 @@ class Color PROTOBUF_FINAL : std::string* _internal_mutable_hex(); public: - // @@protoc_insertion_point(class_scope:Color) + // @@protoc_insertion_point(class_scope:waypoint.Color) private: class _Internal; @@ -2597,12 +2600,12 @@ class Color PROTOBUF_FINAL : typedef void DestructorSkippable_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr hex_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_generators_2fproto_5ftemplates_2fnode_2eproto; + friend struct ::TableStruct_waypoint_2eproto; }; // ------------------------------------------------------------------- class FestivalFilter PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:FestivalFilter) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:waypoint.FestivalFilter) */ { public: inline FestivalFilter() : FestivalFilter(nullptr) {}; virtual ~FestivalFilter(); @@ -2691,7 +2694,7 @@ class FestivalFilter PROTOBUF_FINAL : void InternalSwap(FestivalFilter* other); friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "FestivalFilter"; + return "waypoint.FestivalFilter"; } protected: explicit FestivalFilter(::PROTOBUF_NAMESPACE_ID::Arena* arena); @@ -2703,8 +2706,8 @@ class FestivalFilter PROTOBUF_FINAL : ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; private: static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto); - return ::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto.file_level_metadata[kIndexInFileMessages]; + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_waypoint_2eproto); + return ::descriptor_table_waypoint_2eproto.file_level_metadata[kIndexInFileMessages]; } public: @@ -2785,7 +2788,7 @@ class FestivalFilter PROTOBUF_FINAL : void _internal_set_none(bool value); public: - // @@protoc_insertion_point(class_scope:FestivalFilter) + // @@protoc_insertion_point(class_scope:waypoint.FestivalFilter) private: class _Internal; @@ -2800,12 +2803,12 @@ class FestivalFilter PROTOBUF_FINAL : bool wintersday_; bool none_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_generators_2fproto_5ftemplates_2fnode_2eproto; + friend struct ::TableStruct_waypoint_2eproto; }; // ------------------------------------------------------------------- class MapTypeFilter PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:MapTypeFilter) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:waypoint.MapTypeFilter) */ { public: inline MapTypeFilter() : MapTypeFilter(nullptr) {}; virtual ~MapTypeFilter(); @@ -2894,7 +2897,7 @@ class MapTypeFilter PROTOBUF_FINAL : void InternalSwap(MapTypeFilter* other); friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "MapTypeFilter"; + return "waypoint.MapTypeFilter"; } protected: explicit MapTypeFilter(::PROTOBUF_NAMESPACE_ID::Arena* arena); @@ -2906,8 +2909,8 @@ class MapTypeFilter PROTOBUF_FINAL : ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; private: static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto); - return ::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto.file_level_metadata[kIndexInFileMessages]; + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_waypoint_2eproto); + return ::descriptor_table_waypoint_2eproto.file_level_metadata[kIndexInFileMessages]; } public: @@ -3158,7 +3161,7 @@ class MapTypeFilter PROTOBUF_FINAL : void _internal_set_wvw_lounge_map(bool value); public: - // @@protoc_insertion_point(class_scope:MapTypeFilter) + // @@protoc_insertion_point(class_scope:waypoint.MapTypeFilter) private: class _Internal; @@ -3190,12 +3193,12 @@ class MapTypeFilter PROTOBUF_FINAL : bool public_mini_map_; bool wvw_lounge_map_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_generators_2fproto_5ftemplates_2fnode_2eproto; + friend struct ::TableStruct_waypoint_2eproto; }; // ------------------------------------------------------------------- class MountFilter PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:MountFilter) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:waypoint.MountFilter) */ { public: inline MountFilter() : MountFilter(nullptr) {}; virtual ~MountFilter(); @@ -3284,7 +3287,7 @@ class MountFilter PROTOBUF_FINAL : void InternalSwap(MountFilter* other); friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "MountFilter"; + return "waypoint.MountFilter"; } protected: explicit MountFilter(::PROTOBUF_NAMESPACE_ID::Arena* arena); @@ -3296,8 +3299,8 @@ class MountFilter PROTOBUF_FINAL : ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; private: static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto); - return ::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto.file_level_metadata[kIndexInFileMessages]; + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_waypoint_2eproto); + return ::descriptor_table_waypoint_2eproto.file_level_metadata[kIndexInFileMessages]; } public: @@ -3408,7 +3411,7 @@ class MountFilter PROTOBUF_FINAL : void _internal_set_seige_turtle(bool value); public: - // @@protoc_insertion_point(class_scope:MountFilter) + // @@protoc_insertion_point(class_scope:waypoint.MountFilter) private: class _Internal; @@ -3426,12 +3429,12 @@ class MountFilter PROTOBUF_FINAL : bool skiff_; bool seige_turtle_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_generators_2fproto_5ftemplates_2fnode_2eproto; + friend struct ::TableStruct_waypoint_2eproto; }; // ------------------------------------------------------------------- class ProfessionFilter PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:ProfessionFilter) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:waypoint.ProfessionFilter) */ { public: inline ProfessionFilter() : ProfessionFilter(nullptr) {}; virtual ~ProfessionFilter(); @@ -3520,7 +3523,7 @@ class ProfessionFilter PROTOBUF_FINAL : void InternalSwap(ProfessionFilter* other); friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "ProfessionFilter"; + return "waypoint.ProfessionFilter"; } protected: explicit ProfessionFilter(::PROTOBUF_NAMESPACE_ID::Arena* arena); @@ -3532,8 +3535,8 @@ class ProfessionFilter PROTOBUF_FINAL : ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; private: static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto); - return ::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto.file_level_metadata[kIndexInFileMessages]; + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_waypoint_2eproto); + return ::descriptor_table_waypoint_2eproto.file_level_metadata[kIndexInFileMessages]; } public: @@ -3634,7 +3637,7 @@ class ProfessionFilter PROTOBUF_FINAL : void _internal_set_revenantnt(bool value); public: - // @@protoc_insertion_point(class_scope:ProfessionFilter) + // @@protoc_insertion_point(class_scope:waypoint.ProfessionFilter) private: class _Internal; @@ -3651,12 +3654,12 @@ class ProfessionFilter PROTOBUF_FINAL : bool necromancer_; bool revenantnt_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_generators_2fproto_5ftemplates_2fnode_2eproto; + friend struct ::TableStruct_waypoint_2eproto; }; // ------------------------------------------------------------------- class SpecializationFilter PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:SpecializationFilter) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:waypoint.SpecializationFilter) */ { public: inline SpecializationFilter() : SpecializationFilter(nullptr) {}; virtual ~SpecializationFilter(); @@ -3745,7 +3748,7 @@ class SpecializationFilter PROTOBUF_FINAL : void InternalSwap(SpecializationFilter* other); friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "SpecializationFilter"; + return "waypoint.SpecializationFilter"; } protected: explicit SpecializationFilter(::PROTOBUF_NAMESPACE_ID::Arena* arena); @@ -3757,8 +3760,8 @@ class SpecializationFilter PROTOBUF_FINAL : ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; private: static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto); - return ::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto.file_level_metadata[kIndexInFileMessages]; + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_waypoint_2eproto); + return ::descriptor_table_waypoint_2eproto.file_level_metadata[kIndexInFileMessages]; } public: @@ -4489,7 +4492,7 @@ class SpecializationFilter PROTOBUF_FINAL : void _internal_set_warrior_tactics(bool value); public: - // @@protoc_insertion_point(class_scope:SpecializationFilter) + // @@protoc_insertion_point(class_scope:waypoint.SpecializationFilter) private: class _Internal; @@ -4569,12 +4572,12 @@ class SpecializationFilter PROTOBUF_FINAL : bool warrior_strength_; bool warrior_tactics_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_generators_2fproto_5ftemplates_2fnode_2eproto; + friend struct ::TableStruct_waypoint_2eproto; }; // ------------------------------------------------------------------- class SpeciesFilter PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:SpeciesFilter) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:waypoint.SpeciesFilter) */ { public: inline SpeciesFilter() : SpeciesFilter(nullptr) {}; virtual ~SpeciesFilter(); @@ -4663,7 +4666,7 @@ class SpeciesFilter PROTOBUF_FINAL : void InternalSwap(SpeciesFilter* other); friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "SpeciesFilter"; + return "waypoint.SpeciesFilter"; } protected: explicit SpeciesFilter(::PROTOBUF_NAMESPACE_ID::Arena* arena); @@ -4675,8 +4678,8 @@ class SpeciesFilter PROTOBUF_FINAL : ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; private: static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto); - return ::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto.file_level_metadata[kIndexInFileMessages]; + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_waypoint_2eproto); + return ::descriptor_table_waypoint_2eproto.file_level_metadata[kIndexInFileMessages]; } public: @@ -4737,7 +4740,7 @@ class SpeciesFilter PROTOBUF_FINAL : void _internal_set_sylvari(bool value); public: - // @@protoc_insertion_point(class_scope:SpeciesFilter) + // @@protoc_insertion_point(class_scope:waypoint.SpeciesFilter) private: class _Internal; @@ -4750,12 +4753,12 @@ class SpeciesFilter PROTOBUF_FINAL : bool norn_; bool sylvari_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_generators_2fproto_5ftemplates_2fnode_2eproto; + friend struct ::TableStruct_waypoint_2eproto; }; // ------------------------------------------------------------------- class TrailData PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:TrailData) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:waypoint.TrailData) */ { public: inline TrailData() : TrailData(nullptr) {}; virtual ~TrailData(); @@ -4844,7 +4847,7 @@ class TrailData PROTOBUF_FINAL : void InternalSwap(TrailData* other); friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "TrailData"; + return "waypoint.TrailData"; } protected: explicit TrailData(::PROTOBUF_NAMESPACE_ID::Arena* arena); @@ -4856,8 +4859,8 @@ class TrailData PROTOBUF_FINAL : ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; private: static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto); - return ::descriptor_table_generators_2fproto_5ftemplates_2fnode_2eproto.file_level_metadata[kIndexInFileMessages]; + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_waypoint_2eproto); + return ::descriptor_table_waypoint_2eproto.file_level_metadata[kIndexInFileMessages]; } public: @@ -4894,7 +4897,7 @@ class TrailData PROTOBUF_FINAL : std::string* _internal_mutable_trail_data(); public: - // @@protoc_insertion_point(class_scope:TrailData) + // @@protoc_insertion_point(class_scope:waypoint.TrailData) private: class _Internal; @@ -4903,7 +4906,7 @@ class TrailData PROTOBUF_FINAL : typedef void DestructorSkippable_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr trail_data_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_generators_2fproto_5ftemplates_2fnode_2eproto; + friend struct ::TableStruct_waypoint_2eproto; }; // =================================================================== @@ -4926,7 +4929,7 @@ inline bool Category::_internal_default_visibility() const { return default_visibility_; } inline bool Category::default_visibility() const { - // @@protoc_insertion_point(field_get:Category.default_visibility) + // @@protoc_insertion_point(field_get:waypoint.Category.default_visibility) return _internal_default_visibility(); } inline void Category::_internal_set_default_visibility(bool value) { @@ -4935,7 +4938,7 @@ inline void Category::_internal_set_default_visibility(bool value) { } inline void Category::set_default_visibility(bool value) { _internal_set_default_visibility(value); - // @@protoc_insertion_point(field_set:Category.default_visibility) + // @@protoc_insertion_point(field_set:waypoint.Category.default_visibility) } // string display_name = 2; @@ -4943,15 +4946,15 @@ inline void Category::clear_display_name() { display_name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline const std::string& Category::display_name() const { - // @@protoc_insertion_point(field_get:Category.display_name) + // @@protoc_insertion_point(field_get:waypoint.Category.display_name) return _internal_display_name(); } inline void Category::set_display_name(const std::string& value) { _internal_set_display_name(value); - // @@protoc_insertion_point(field_set:Category.display_name) + // @@protoc_insertion_point(field_set:waypoint.Category.display_name) } inline std::string* Category::mutable_display_name() { - // @@protoc_insertion_point(field_mutable:Category.display_name) + // @@protoc_insertion_point(field_mutable:waypoint.Category.display_name) return _internal_mutable_display_name(); } inline const std::string& Category::_internal_display_name() const { @@ -4965,28 +4968,28 @@ inline void Category::set_display_name(std::string&& value) { display_name_.Set( &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:Category.display_name) + // @@protoc_insertion_point(field_set_rvalue:waypoint.Category.display_name) } inline void Category::set_display_name(const char* value) { GOOGLE_DCHECK(value != nullptr); display_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:Category.display_name) + // @@protoc_insertion_point(field_set_char:waypoint.Category.display_name) } inline void Category::set_display_name(const char* value, size_t size) { display_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:Category.display_name) + // @@protoc_insertion_point(field_set_pointer:waypoint.Category.display_name) } inline std::string* Category::_internal_mutable_display_name() { return display_name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* Category::release_display_name() { - // @@protoc_insertion_point(field_release:Category.display_name) + // @@protoc_insertion_point(field_release:waypoint.Category.display_name) return display_name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void Category::set_allocated_display_name(std::string* display_name) { @@ -4997,10 +5000,10 @@ inline void Category::set_allocated_display_name(std::string* display_name) { } display_name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), display_name, GetArena()); - // @@protoc_insertion_point(field_set_allocated:Category.display_name) + // @@protoc_insertion_point(field_set_allocated:waypoint.Category.display_name) } inline std::string* Category::unsafe_arena_release_display_name() { - // @@protoc_insertion_point(field_unsafe_arena_release:Category.display_name) + // @@protoc_insertion_point(field_unsafe_arena_release:waypoint.Category.display_name) GOOGLE_DCHECK(GetArena() != nullptr); return display_name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), @@ -5016,7 +5019,7 @@ inline void Category::unsafe_arena_set_allocated_display_name( } display_name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), display_name, GetArena()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Category.display_name) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Category.display_name) } // bool is_separator = 3; @@ -5027,7 +5030,7 @@ inline bool Category::_internal_is_separator() const { return is_separator_; } inline bool Category::is_separator() const { - // @@protoc_insertion_point(field_get:Category.is_separator) + // @@protoc_insertion_point(field_get:waypoint.Category.is_separator) return _internal_is_separator(); } inline void Category::_internal_set_is_separator(bool value) { @@ -5036,7 +5039,7 @@ inline void Category::_internal_set_is_separator(bool value) { } inline void Category::set_is_separator(bool value) { _internal_set_is_separator(value); - // @@protoc_insertion_point(field_set:Category.is_separator) + // @@protoc_insertion_point(field_set:waypoint.Category.is_separator) } // string name = 4; @@ -5044,15 +5047,15 @@ inline void Category::clear_name() { name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline const std::string& Category::name() const { - // @@protoc_insertion_point(field_get:Category.name) + // @@protoc_insertion_point(field_get:waypoint.Category.name) return _internal_name(); } inline void Category::set_name(const std::string& value) { _internal_set_name(value); - // @@protoc_insertion_point(field_set:Category.name) + // @@protoc_insertion_point(field_set:waypoint.Category.name) } inline std::string* Category::mutable_name() { - // @@protoc_insertion_point(field_mutable:Category.name) + // @@protoc_insertion_point(field_mutable:waypoint.Category.name) return _internal_mutable_name(); } inline const std::string& Category::_internal_name() const { @@ -5066,28 +5069,28 @@ inline void Category::set_name(std::string&& value) { name_.Set( &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:Category.name) + // @@protoc_insertion_point(field_set_rvalue:waypoint.Category.name) } inline void Category::set_name(const char* value) { GOOGLE_DCHECK(value != nullptr); name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:Category.name) + // @@protoc_insertion_point(field_set_char:waypoint.Category.name) } inline void Category::set_name(const char* value, size_t size) { name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:Category.name) + // @@protoc_insertion_point(field_set_pointer:waypoint.Category.name) } inline std::string* Category::_internal_mutable_name() { return name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* Category::release_name() { - // @@protoc_insertion_point(field_release:Category.name) + // @@protoc_insertion_point(field_release:waypoint.Category.name) return name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void Category::set_allocated_name(std::string* name) { @@ -5098,10 +5101,10 @@ inline void Category::set_allocated_name(std::string* name) { } name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name, GetArena()); - // @@protoc_insertion_point(field_set_allocated:Category.name) + // @@protoc_insertion_point(field_set_allocated:waypoint.Category.name) } inline std::string* Category::unsafe_arena_release_name() { - // @@protoc_insertion_point(field_unsafe_arena_release:Category.name) + // @@protoc_insertion_point(field_unsafe_arena_release:waypoint.Category.name) GOOGLE_DCHECK(GetArena() != nullptr); return name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), @@ -5117,7 +5120,7 @@ inline void Category::unsafe_arena_set_allocated_name( } name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name, GetArena()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Category.name) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Category.name) } // string tooltip_name = 5; @@ -5125,15 +5128,15 @@ inline void Category::clear_tooltip_name() { tooltip_name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline const std::string& Category::tooltip_name() const { - // @@protoc_insertion_point(field_get:Category.tooltip_name) + // @@protoc_insertion_point(field_get:waypoint.Category.tooltip_name) return _internal_tooltip_name(); } inline void Category::set_tooltip_name(const std::string& value) { _internal_set_tooltip_name(value); - // @@protoc_insertion_point(field_set:Category.tooltip_name) + // @@protoc_insertion_point(field_set:waypoint.Category.tooltip_name) } inline std::string* Category::mutable_tooltip_name() { - // @@protoc_insertion_point(field_mutable:Category.tooltip_name) + // @@protoc_insertion_point(field_mutable:waypoint.Category.tooltip_name) return _internal_mutable_tooltip_name(); } inline const std::string& Category::_internal_tooltip_name() const { @@ -5147,28 +5150,28 @@ inline void Category::set_tooltip_name(std::string&& value) { tooltip_name_.Set( &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:Category.tooltip_name) + // @@protoc_insertion_point(field_set_rvalue:waypoint.Category.tooltip_name) } inline void Category::set_tooltip_name(const char* value) { GOOGLE_DCHECK(value != nullptr); tooltip_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:Category.tooltip_name) + // @@protoc_insertion_point(field_set_char:waypoint.Category.tooltip_name) } inline void Category::set_tooltip_name(const char* value, size_t size) { tooltip_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:Category.tooltip_name) + // @@protoc_insertion_point(field_set_pointer:waypoint.Category.tooltip_name) } inline std::string* Category::_internal_mutable_tooltip_name() { return tooltip_name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* Category::release_tooltip_name() { - // @@protoc_insertion_point(field_release:Category.tooltip_name) + // @@protoc_insertion_point(field_release:waypoint.Category.tooltip_name) return tooltip_name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void Category::set_allocated_tooltip_name(std::string* tooltip_name) { @@ -5179,10 +5182,10 @@ inline void Category::set_allocated_tooltip_name(std::string* tooltip_name) { } tooltip_name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), tooltip_name, GetArena()); - // @@protoc_insertion_point(field_set_allocated:Category.tooltip_name) + // @@protoc_insertion_point(field_set_allocated:waypoint.Category.tooltip_name) } inline std::string* Category::unsafe_arena_release_tooltip_name() { - // @@protoc_insertion_point(field_unsafe_arena_release:Category.tooltip_name) + // @@protoc_insertion_point(field_unsafe_arena_release:waypoint.Category.tooltip_name) GOOGLE_DCHECK(GetArena() != nullptr); return tooltip_name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), @@ -5198,10 +5201,10 @@ inline void Category::unsafe_arena_set_allocated_tooltip_name( } tooltip_name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), tooltip_name, GetArena()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Category.tooltip_name) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Category.tooltip_name) } -// map children = 6; +// map children = 6; inline int Category::_internal_children_size() const { return children_.size(); } @@ -5211,22 +5214,22 @@ inline int Category::children_size() const { inline void Category::clear_children() { children_.Clear(); } -inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Category >& +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::waypoint::Category >& Category::_internal_children() const { return children_.GetMap(); } -inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Category >& +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::waypoint::Category >& Category::children() const { - // @@protoc_insertion_point(field_map:Category.children) + // @@protoc_insertion_point(field_map:waypoint.Category.children) return _internal_children(); } -inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Category >* +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::waypoint::Category >* Category::_internal_mutable_children() { return children_.MutableMap(); } -inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Category >* +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::waypoint::Category >* Category::mutable_children() { - // @@protoc_insertion_point(field_mutable_map:Category.children) + // @@protoc_insertion_point(field_mutable_map:waypoint.Category.children) return _internal_mutable_children(); } @@ -5234,7 +5237,7 @@ Category::mutable_children() { // Icon -// .Category category = 1; +// .waypoint.Category category = 1; inline bool Icon::_internal_has_category() const { return this != internal_default_instance() && category_ != nullptr; } @@ -5247,17 +5250,17 @@ inline void Icon::clear_category() { } category_ = nullptr; } -inline const ::Category& Icon::_internal_category() const { - const ::Category* p = category_; - return p != nullptr ? *p : *reinterpret_cast( - &::_Category_default_instance_); +inline const ::waypoint::Category& Icon::_internal_category() const { + const ::waypoint::Category* p = category_; + return p != nullptr ? *p : *reinterpret_cast( + &::waypoint::_Category_default_instance_); } -inline const ::Category& Icon::category() const { - // @@protoc_insertion_point(field_get:Icon.category) +inline const ::waypoint::Category& Icon::category() const { + // @@protoc_insertion_point(field_get:waypoint.Icon.category) return _internal_category(); } inline void Icon::unsafe_arena_set_allocated_category( - ::Category* category) { + ::waypoint::Category* category) { if (GetArena() == nullptr) { delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(category_); } @@ -5267,35 +5270,35 @@ inline void Icon::unsafe_arena_set_allocated_category( } else { } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Icon.category) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Icon.category) } -inline ::Category* Icon::release_category() { +inline ::waypoint::Category* Icon::release_category() { auto temp = unsafe_arena_release_category(); if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } return temp; } -inline ::Category* Icon::unsafe_arena_release_category() { - // @@protoc_insertion_point(field_release:Icon.category) +inline ::waypoint::Category* Icon::unsafe_arena_release_category() { + // @@protoc_insertion_point(field_release:waypoint.Icon.category) - ::Category* temp = category_; + ::waypoint::Category* temp = category_; category_ = nullptr; return temp; } -inline ::Category* Icon::_internal_mutable_category() { +inline ::waypoint::Category* Icon::_internal_mutable_category() { if (category_ == nullptr) { - auto* p = CreateMaybeMessage<::Category>(GetArena()); + auto* p = CreateMaybeMessage<::waypoint::Category>(GetArena()); category_ = p; } return category_; } -inline ::Category* Icon::mutable_category() { - // @@protoc_insertion_point(field_mutable:Icon.category) +inline ::waypoint::Category* Icon::mutable_category() { + // @@protoc_insertion_point(field_mutable:waypoint.Icon.category) return _internal_mutable_category(); } -inline void Icon::set_allocated_category(::Category* category) { +inline void Icon::set_allocated_category(::waypoint::Category* category) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); if (message_arena == nullptr) { delete category_; @@ -5312,10 +5315,10 @@ inline void Icon::set_allocated_category(::Category* category) { } category_ = category; - // @@protoc_insertion_point(field_set_allocated:Icon.category) + // @@protoc_insertion_point(field_set_allocated:waypoint.Icon.category) } -// .Texture texture = 2; +// .waypoint.Texture texture = 2; inline bool Icon::_internal_has_texture() const { return this != internal_default_instance() && texture_ != nullptr; } @@ -5328,17 +5331,17 @@ inline void Icon::clear_texture() { } texture_ = nullptr; } -inline const ::Texture& Icon::_internal_texture() const { - const ::Texture* p = texture_; - return p != nullptr ? *p : *reinterpret_cast( - &::_Texture_default_instance_); +inline const ::waypoint::Texture& Icon::_internal_texture() const { + const ::waypoint::Texture* p = texture_; + return p != nullptr ? *p : *reinterpret_cast( + &::waypoint::_Texture_default_instance_); } -inline const ::Texture& Icon::texture() const { - // @@protoc_insertion_point(field_get:Icon.texture) +inline const ::waypoint::Texture& Icon::texture() const { + // @@protoc_insertion_point(field_get:waypoint.Icon.texture) return _internal_texture(); } inline void Icon::unsafe_arena_set_allocated_texture( - ::Texture* texture) { + ::waypoint::Texture* texture) { if (GetArena() == nullptr) { delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(texture_); } @@ -5348,35 +5351,35 @@ inline void Icon::unsafe_arena_set_allocated_texture( } else { } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Icon.texture) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Icon.texture) } -inline ::Texture* Icon::release_texture() { +inline ::waypoint::Texture* Icon::release_texture() { auto temp = unsafe_arena_release_texture(); if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } return temp; } -inline ::Texture* Icon::unsafe_arena_release_texture() { - // @@protoc_insertion_point(field_release:Icon.texture) +inline ::waypoint::Texture* Icon::unsafe_arena_release_texture() { + // @@protoc_insertion_point(field_release:waypoint.Icon.texture) - ::Texture* temp = texture_; + ::waypoint::Texture* temp = texture_; texture_ = nullptr; return temp; } -inline ::Texture* Icon::_internal_mutable_texture() { +inline ::waypoint::Texture* Icon::_internal_mutable_texture() { if (texture_ == nullptr) { - auto* p = CreateMaybeMessage<::Texture>(GetArena()); + auto* p = CreateMaybeMessage<::waypoint::Texture>(GetArena()); texture_ = p; } return texture_; } -inline ::Texture* Icon::mutable_texture() { - // @@protoc_insertion_point(field_mutable:Icon.texture) +inline ::waypoint::Texture* Icon::mutable_texture() { + // @@protoc_insertion_point(field_mutable:waypoint.Icon.texture) return _internal_mutable_texture(); } -inline void Icon::set_allocated_texture(::Texture* texture) { +inline void Icon::set_allocated_texture(::waypoint::Texture* texture) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); if (message_arena == nullptr) { delete texture_; @@ -5393,10 +5396,10 @@ inline void Icon::set_allocated_texture(::Texture* texture) { } texture_ = texture; - // @@protoc_insertion_point(field_set_allocated:Icon.texture) + // @@protoc_insertion_point(field_set_allocated:waypoint.Icon.texture) } -// .GUID guid = 3; +// .waypoint.GUID guid = 3; inline bool Icon::_internal_has_guid() const { return this != internal_default_instance() && guid_ != nullptr; } @@ -5409,17 +5412,17 @@ inline void Icon::clear_guid() { } guid_ = nullptr; } -inline const ::GUID& Icon::_internal_guid() const { - const ::GUID* p = guid_; - return p != nullptr ? *p : *reinterpret_cast( - &::_GUID_default_instance_); +inline const ::waypoint::GUID& Icon::_internal_guid() const { + const ::waypoint::GUID* p = guid_; + return p != nullptr ? *p : *reinterpret_cast( + &::waypoint::_GUID_default_instance_); } -inline const ::GUID& Icon::guid() const { - // @@protoc_insertion_point(field_get:Icon.guid) +inline const ::waypoint::GUID& Icon::guid() const { + // @@protoc_insertion_point(field_get:waypoint.Icon.guid) return _internal_guid(); } inline void Icon::unsafe_arena_set_allocated_guid( - ::GUID* guid) { + ::waypoint::GUID* guid) { if (GetArena() == nullptr) { delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(guid_); } @@ -5429,35 +5432,35 @@ inline void Icon::unsafe_arena_set_allocated_guid( } else { } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Icon.guid) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Icon.guid) } -inline ::GUID* Icon::release_guid() { +inline ::waypoint::GUID* Icon::release_guid() { auto temp = unsafe_arena_release_guid(); if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } return temp; } -inline ::GUID* Icon::unsafe_arena_release_guid() { - // @@protoc_insertion_point(field_release:Icon.guid) +inline ::waypoint::GUID* Icon::unsafe_arena_release_guid() { + // @@protoc_insertion_point(field_release:waypoint.Icon.guid) - ::GUID* temp = guid_; + ::waypoint::GUID* temp = guid_; guid_ = nullptr; return temp; } -inline ::GUID* Icon::_internal_mutable_guid() { +inline ::waypoint::GUID* Icon::_internal_mutable_guid() { if (guid_ == nullptr) { - auto* p = CreateMaybeMessage<::GUID>(GetArena()); + auto* p = CreateMaybeMessage<::waypoint::GUID>(GetArena()); guid_ = p; } return guid_; } -inline ::GUID* Icon::mutable_guid() { - // @@protoc_insertion_point(field_mutable:Icon.guid) +inline ::waypoint::GUID* Icon::mutable_guid() { + // @@protoc_insertion_point(field_mutable:waypoint.Icon.guid) return _internal_mutable_guid(); } -inline void Icon::set_allocated_guid(::GUID* guid) { +inline void Icon::set_allocated_guid(::waypoint::GUID* guid) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); if (message_arena == nullptr) { delete guid_; @@ -5474,7 +5477,7 @@ inline void Icon::set_allocated_guid(::GUID* guid) { } guid_ = guid; - // @@protoc_insertion_point(field_set_allocated:Icon.guid) + // @@protoc_insertion_point(field_set_allocated:waypoint.Icon.guid) } // int32 map_id = 4; @@ -5485,7 +5488,7 @@ inline ::PROTOBUF_NAMESPACE_ID::int32 Icon::_internal_map_id() const { return map_id_; } inline ::PROTOBUF_NAMESPACE_ID::int32 Icon::map_id() const { - // @@protoc_insertion_point(field_get:Icon.map_id) + // @@protoc_insertion_point(field_get:waypoint.Icon.map_id) return _internal_map_id(); } inline void Icon::_internal_set_map_id(::PROTOBUF_NAMESPACE_ID::int32 value) { @@ -5494,7 +5497,7 @@ inline void Icon::_internal_set_map_id(::PROTOBUF_NAMESPACE_ID::int32 value) { } inline void Icon::set_map_id(::PROTOBUF_NAMESPACE_ID::int32 value) { _internal_set_map_id(value); - // @@protoc_insertion_point(field_set:Icon.map_id) + // @@protoc_insertion_point(field_set:waypoint.Icon.map_id) } // float distance_fade_end = 5; @@ -5505,7 +5508,7 @@ inline float Icon::_internal_distance_fade_end() const { return distance_fade_end_; } inline float Icon::distance_fade_end() const { - // @@protoc_insertion_point(field_get:Icon.distance_fade_end) + // @@protoc_insertion_point(field_get:waypoint.Icon.distance_fade_end) return _internal_distance_fade_end(); } inline void Icon::_internal_set_distance_fade_end(float value) { @@ -5514,7 +5517,7 @@ inline void Icon::_internal_set_distance_fade_end(float value) { } inline void Icon::set_distance_fade_end(float value) { _internal_set_distance_fade_end(value); - // @@protoc_insertion_point(field_set:Icon.distance_fade_end) + // @@protoc_insertion_point(field_set:waypoint.Icon.distance_fade_end) } // float distance_fade_start = 6; @@ -5525,7 +5528,7 @@ inline float Icon::_internal_distance_fade_start() const { return distance_fade_start_; } inline float Icon::distance_fade_start() const { - // @@protoc_insertion_point(field_get:Icon.distance_fade_start) + // @@protoc_insertion_point(field_get:waypoint.Icon.distance_fade_start) return _internal_distance_fade_start(); } inline void Icon::_internal_set_distance_fade_start(float value) { @@ -5534,7 +5537,7 @@ inline void Icon::_internal_set_distance_fade_start(float value) { } inline void Icon::set_distance_fade_start(float value) { _internal_set_distance_fade_start(value); - // @@protoc_insertion_point(field_set:Icon.distance_fade_start) + // @@protoc_insertion_point(field_set:waypoint.Icon.distance_fade_start) } // float height_offset = 7; @@ -5545,7 +5548,7 @@ inline float Icon::_internal_height_offset() const { return height_offset_; } inline float Icon::height_offset() const { - // @@protoc_insertion_point(field_get:Icon.height_offset) + // @@protoc_insertion_point(field_get:waypoint.Icon.height_offset) return _internal_height_offset(); } inline void Icon::_internal_set_height_offset(float value) { @@ -5554,10 +5557,10 @@ inline void Icon::_internal_set_height_offset(float value) { } inline void Icon::set_height_offset(float value) { _internal_set_height_offset(value); - // @@protoc_insertion_point(field_set:Icon.height_offset) + // @@protoc_insertion_point(field_set:waypoint.Icon.height_offset) } -// .Position position = 8; +// .waypoint.Position position = 8; inline bool Icon::_internal_has_position() const { return this != internal_default_instance() && position_ != nullptr; } @@ -5570,17 +5573,17 @@ inline void Icon::clear_position() { } position_ = nullptr; } -inline const ::Position& Icon::_internal_position() const { - const ::Position* p = position_; - return p != nullptr ? *p : *reinterpret_cast( - &::_Position_default_instance_); +inline const ::waypoint::Position& Icon::_internal_position() const { + const ::waypoint::Position* p = position_; + return p != nullptr ? *p : *reinterpret_cast( + &::waypoint::_Position_default_instance_); } -inline const ::Position& Icon::position() const { - // @@protoc_insertion_point(field_get:Icon.position) +inline const ::waypoint::Position& Icon::position() const { + // @@protoc_insertion_point(field_get:waypoint.Icon.position) return _internal_position(); } inline void Icon::unsafe_arena_set_allocated_position( - ::Position* position) { + ::waypoint::Position* position) { if (GetArena() == nullptr) { delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(position_); } @@ -5590,35 +5593,35 @@ inline void Icon::unsafe_arena_set_allocated_position( } else { } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Icon.position) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Icon.position) } -inline ::Position* Icon::release_position() { +inline ::waypoint::Position* Icon::release_position() { auto temp = unsafe_arena_release_position(); if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } return temp; } -inline ::Position* Icon::unsafe_arena_release_position() { - // @@protoc_insertion_point(field_release:Icon.position) +inline ::waypoint::Position* Icon::unsafe_arena_release_position() { + // @@protoc_insertion_point(field_release:waypoint.Icon.position) - ::Position* temp = position_; + ::waypoint::Position* temp = position_; position_ = nullptr; return temp; } -inline ::Position* Icon::_internal_mutable_position() { +inline ::waypoint::Position* Icon::_internal_mutable_position() { if (position_ == nullptr) { - auto* p = CreateMaybeMessage<::Position>(GetArena()); + auto* p = CreateMaybeMessage<::waypoint::Position>(GetArena()); position_ = p; } return position_; } -inline ::Position* Icon::mutable_position() { - // @@protoc_insertion_point(field_mutable:Icon.position) +inline ::waypoint::Position* Icon::mutable_position() { + // @@protoc_insertion_point(field_mutable:waypoint.Icon.position) return _internal_mutable_position(); } -inline void Icon::set_allocated_position(::Position* position) { +inline void Icon::set_allocated_position(::waypoint::Position* position) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); if (message_arena == nullptr) { delete position_; @@ -5635,30 +5638,30 @@ inline void Icon::set_allocated_position(::Position* position) { } position_ = position; - // @@protoc_insertion_point(field_set_allocated:Icon.position) + // @@protoc_insertion_point(field_set_allocated:waypoint.Icon.position) } -// .ResetBehavior reset_behavior = 9; +// .waypoint.ResetBehavior reset_behavior = 9; inline void Icon::clear_reset_behavior() { reset_behavior_ = 0; } -inline ::ResetBehavior Icon::_internal_reset_behavior() const { - return static_cast< ::ResetBehavior >(reset_behavior_); +inline ::waypoint::ResetBehavior Icon::_internal_reset_behavior() const { + return static_cast< ::waypoint::ResetBehavior >(reset_behavior_); } -inline ::ResetBehavior Icon::reset_behavior() const { - // @@protoc_insertion_point(field_get:Icon.reset_behavior) +inline ::waypoint::ResetBehavior Icon::reset_behavior() const { + // @@protoc_insertion_point(field_get:waypoint.Icon.reset_behavior) return _internal_reset_behavior(); } -inline void Icon::_internal_set_reset_behavior(::ResetBehavior value) { +inline void Icon::_internal_set_reset_behavior(::waypoint::ResetBehavior value) { reset_behavior_ = value; } -inline void Icon::set_reset_behavior(::ResetBehavior value) { +inline void Icon::set_reset_behavior(::waypoint::ResetBehavior value) { _internal_set_reset_behavior(value); - // @@protoc_insertion_point(field_set:Icon.reset_behavior) + // @@protoc_insertion_point(field_set:waypoint.Icon.reset_behavior) } -// .Trigger trigger = 10; +// .waypoint.Trigger trigger = 10; inline bool Icon::_internal_has_trigger() const { return this != internal_default_instance() && trigger_ != nullptr; } @@ -5671,17 +5674,17 @@ inline void Icon::clear_trigger() { } trigger_ = nullptr; } -inline const ::Trigger& Icon::_internal_trigger() const { - const ::Trigger* p = trigger_; - return p != nullptr ? *p : *reinterpret_cast( - &::_Trigger_default_instance_); +inline const ::waypoint::Trigger& Icon::_internal_trigger() const { + const ::waypoint::Trigger* p = trigger_; + return p != nullptr ? *p : *reinterpret_cast( + &::waypoint::_Trigger_default_instance_); } -inline const ::Trigger& Icon::trigger() const { - // @@protoc_insertion_point(field_get:Icon.trigger) +inline const ::waypoint::Trigger& Icon::trigger() const { + // @@protoc_insertion_point(field_get:waypoint.Icon.trigger) return _internal_trigger(); } inline void Icon::unsafe_arena_set_allocated_trigger( - ::Trigger* trigger) { + ::waypoint::Trigger* trigger) { if (GetArena() == nullptr) { delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(trigger_); } @@ -5691,35 +5694,35 @@ inline void Icon::unsafe_arena_set_allocated_trigger( } else { } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Icon.trigger) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Icon.trigger) } -inline ::Trigger* Icon::release_trigger() { +inline ::waypoint::Trigger* Icon::release_trigger() { auto temp = unsafe_arena_release_trigger(); if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } return temp; } -inline ::Trigger* Icon::unsafe_arena_release_trigger() { - // @@protoc_insertion_point(field_release:Icon.trigger) +inline ::waypoint::Trigger* Icon::unsafe_arena_release_trigger() { + // @@protoc_insertion_point(field_release:waypoint.Icon.trigger) - ::Trigger* temp = trigger_; + ::waypoint::Trigger* temp = trigger_; trigger_ = nullptr; return temp; } -inline ::Trigger* Icon::_internal_mutable_trigger() { +inline ::waypoint::Trigger* Icon::_internal_mutable_trigger() { if (trigger_ == nullptr) { - auto* p = CreateMaybeMessage<::Trigger>(GetArena()); + auto* p = CreateMaybeMessage<::waypoint::Trigger>(GetArena()); trigger_ = p; } return trigger_; } -inline ::Trigger* Icon::mutable_trigger() { - // @@protoc_insertion_point(field_mutable:Icon.trigger) +inline ::waypoint::Trigger* Icon::mutable_trigger() { + // @@protoc_insertion_point(field_mutable:waypoint.Icon.trigger) return _internal_mutable_trigger(); } -inline void Icon::set_allocated_trigger(::Trigger* trigger) { +inline void Icon::set_allocated_trigger(::waypoint::Trigger* trigger) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); if (message_arena == nullptr) { delete trigger_; @@ -5736,7 +5739,7 @@ inline void Icon::set_allocated_trigger(::Trigger* trigger) { } trigger_ = trigger; - // @@protoc_insertion_point(field_set_allocated:Icon.trigger) + // @@protoc_insertion_point(field_set_allocated:waypoint.Icon.trigger) } // fixed32 achievement_bit = 16; @@ -5747,7 +5750,7 @@ inline ::PROTOBUF_NAMESPACE_ID::uint32 Icon::_internal_achievement_bit() const { return achievement_bit_; } inline ::PROTOBUF_NAMESPACE_ID::uint32 Icon::achievement_bit() const { - // @@protoc_insertion_point(field_get:Icon.achievement_bit) + // @@protoc_insertion_point(field_get:waypoint.Icon.achievement_bit) return _internal_achievement_bit(); } inline void Icon::_internal_set_achievement_bit(::PROTOBUF_NAMESPACE_ID::uint32 value) { @@ -5756,7 +5759,7 @@ inline void Icon::_internal_set_achievement_bit(::PROTOBUF_NAMESPACE_ID::uint32 } inline void Icon::set_achievement_bit(::PROTOBUF_NAMESPACE_ID::uint32 value) { _internal_set_achievement_bit(value); - // @@protoc_insertion_point(field_set:Icon.achievement_bit) + // @@protoc_insertion_point(field_set:waypoint.Icon.achievement_bit) } // int32 achievement_id = 17; @@ -5767,7 +5770,7 @@ inline ::PROTOBUF_NAMESPACE_ID::int32 Icon::_internal_achievement_id() const { return achievement_id_; } inline ::PROTOBUF_NAMESPACE_ID::int32 Icon::achievement_id() const { - // @@protoc_insertion_point(field_get:Icon.achievement_id) + // @@protoc_insertion_point(field_get:waypoint.Icon.achievement_id) return _internal_achievement_id(); } inline void Icon::_internal_set_achievement_id(::PROTOBUF_NAMESPACE_ID::int32 value) { @@ -5776,7 +5779,7 @@ inline void Icon::_internal_set_achievement_id(::PROTOBUF_NAMESPACE_ID::int32 va } inline void Icon::set_achievement_id(::PROTOBUF_NAMESPACE_ID::int32 value) { _internal_set_achievement_id(value); - // @@protoc_insertion_point(field_set:Icon.achievement_id) + // @@protoc_insertion_point(field_set:waypoint.Icon.achievement_id) } // float alpha = 18; @@ -5787,7 +5790,7 @@ inline float Icon::_internal_alpha() const { return alpha_; } inline float Icon::alpha() const { - // @@protoc_insertion_point(field_get:Icon.alpha) + // @@protoc_insertion_point(field_get:waypoint.Icon.alpha) return _internal_alpha(); } inline void Icon::_internal_set_alpha(float value) { @@ -5796,7 +5799,7 @@ inline void Icon::_internal_set_alpha(float value) { } inline void Icon::set_alpha(float value) { _internal_set_alpha(value); - // @@protoc_insertion_point(field_set:Icon.alpha) + // @@protoc_insertion_point(field_set:waypoint.Icon.alpha) } // bool can_fade = 19; @@ -5807,7 +5810,7 @@ inline bool Icon::_internal_can_fade() const { return can_fade_; } inline bool Icon::can_fade() const { - // @@protoc_insertion_point(field_get:Icon.can_fade) + // @@protoc_insertion_point(field_get:waypoint.Icon.can_fade) return _internal_can_fade(); } inline void Icon::_internal_set_can_fade(bool value) { @@ -5816,7 +5819,7 @@ inline void Icon::_internal_set_can_fade(bool value) { } inline void Icon::set_can_fade(bool value) { _internal_set_can_fade(value); - // @@protoc_insertion_point(field_set:Icon.can_fade) + // @@protoc_insertion_point(field_set:waypoint.Icon.can_fade) } // int32 minimum_size_on_screen = 20; @@ -5827,7 +5830,7 @@ inline ::PROTOBUF_NAMESPACE_ID::int32 Icon::_internal_minimum_size_on_screen() c return minimum_size_on_screen_; } inline ::PROTOBUF_NAMESPACE_ID::int32 Icon::minimum_size_on_screen() const { - // @@protoc_insertion_point(field_get:Icon.minimum_size_on_screen) + // @@protoc_insertion_point(field_get:waypoint.Icon.minimum_size_on_screen) return _internal_minimum_size_on_screen(); } inline void Icon::_internal_set_minimum_size_on_screen(::PROTOBUF_NAMESPACE_ID::int32 value) { @@ -5836,7 +5839,7 @@ inline void Icon::_internal_set_minimum_size_on_screen(::PROTOBUF_NAMESPACE_ID:: } inline void Icon::set_minimum_size_on_screen(::PROTOBUF_NAMESPACE_ID::int32 value) { _internal_set_minimum_size_on_screen(value); - // @@protoc_insertion_point(field_set:Icon.minimum_size_on_screen) + // @@protoc_insertion_point(field_set:waypoint.Icon.minimum_size_on_screen) } // int32 map_display_size = 21; @@ -5847,7 +5850,7 @@ inline ::PROTOBUF_NAMESPACE_ID::int32 Icon::_internal_map_display_size() const { return map_display_size_; } inline ::PROTOBUF_NAMESPACE_ID::int32 Icon::map_display_size() const { - // @@protoc_insertion_point(field_get:Icon.map_display_size) + // @@protoc_insertion_point(field_get:waypoint.Icon.map_display_size) return _internal_map_display_size(); } inline void Icon::_internal_set_map_display_size(::PROTOBUF_NAMESPACE_ID::int32 value) { @@ -5856,7 +5859,7 @@ inline void Icon::_internal_set_map_display_size(::PROTOBUF_NAMESPACE_ID::int32 } inline void Icon::set_map_display_size(::PROTOBUF_NAMESPACE_ID::int32 value) { _internal_set_map_display_size(value); - // @@protoc_insertion_point(field_set:Icon.map_display_size) + // @@protoc_insertion_point(field_set:waypoint.Icon.map_display_size) } // int32 maximum_size_on_screen = 22; @@ -5867,7 +5870,7 @@ inline ::PROTOBUF_NAMESPACE_ID::int32 Icon::_internal_maximum_size_on_screen() c return maximum_size_on_screen_; } inline ::PROTOBUF_NAMESPACE_ID::int32 Icon::maximum_size_on_screen() const { - // @@protoc_insertion_point(field_get:Icon.maximum_size_on_screen) + // @@protoc_insertion_point(field_get:waypoint.Icon.maximum_size_on_screen) return _internal_maximum_size_on_screen(); } inline void Icon::_internal_set_maximum_size_on_screen(::PROTOBUF_NAMESPACE_ID::int32 value) { @@ -5876,7 +5879,7 @@ inline void Icon::_internal_set_maximum_size_on_screen(::PROTOBUF_NAMESPACE_ID:: } inline void Icon::set_maximum_size_on_screen(::PROTOBUF_NAMESPACE_ID::int32 value) { _internal_set_maximum_size_on_screen(value); - // @@protoc_insertion_point(field_set:Icon.maximum_size_on_screen) + // @@protoc_insertion_point(field_set:waypoint.Icon.maximum_size_on_screen) } // bool scale_on_map_with_zoom = 23; @@ -5887,7 +5890,7 @@ inline bool Icon::_internal_scale_on_map_with_zoom() const { return scale_on_map_with_zoom_; } inline bool Icon::scale_on_map_with_zoom() const { - // @@protoc_insertion_point(field_get:Icon.scale_on_map_with_zoom) + // @@protoc_insertion_point(field_get:waypoint.Icon.scale_on_map_with_zoom) return _internal_scale_on_map_with_zoom(); } inline void Icon::_internal_set_scale_on_map_with_zoom(bool value) { @@ -5896,7 +5899,7 @@ inline void Icon::_internal_set_scale_on_map_with_zoom(bool value) { } inline void Icon::set_scale_on_map_with_zoom(bool value) { _internal_set_scale_on_map_with_zoom(value); - // @@protoc_insertion_point(field_set:Icon.scale_on_map_with_zoom) + // @@protoc_insertion_point(field_set:waypoint.Icon.scale_on_map_with_zoom) } // string tip_description = 24; @@ -5904,15 +5907,15 @@ inline void Icon::clear_tip_description() { tip_description_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline const std::string& Icon::tip_description() const { - // @@protoc_insertion_point(field_get:Icon.tip_description) + // @@protoc_insertion_point(field_get:waypoint.Icon.tip_description) return _internal_tip_description(); } inline void Icon::set_tip_description(const std::string& value) { _internal_set_tip_description(value); - // @@protoc_insertion_point(field_set:Icon.tip_description) + // @@protoc_insertion_point(field_set:waypoint.Icon.tip_description) } inline std::string* Icon::mutable_tip_description() { - // @@protoc_insertion_point(field_mutable:Icon.tip_description) + // @@protoc_insertion_point(field_mutable:waypoint.Icon.tip_description) return _internal_mutable_tip_description(); } inline const std::string& Icon::_internal_tip_description() const { @@ -5926,28 +5929,28 @@ inline void Icon::set_tip_description(std::string&& value) { tip_description_.Set( &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:Icon.tip_description) + // @@protoc_insertion_point(field_set_rvalue:waypoint.Icon.tip_description) } inline void Icon::set_tip_description(const char* value) { GOOGLE_DCHECK(value != nullptr); tip_description_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:Icon.tip_description) + // @@protoc_insertion_point(field_set_char:waypoint.Icon.tip_description) } inline void Icon::set_tip_description(const char* value, size_t size) { tip_description_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:Icon.tip_description) + // @@protoc_insertion_point(field_set_pointer:waypoint.Icon.tip_description) } inline std::string* Icon::_internal_mutable_tip_description() { return tip_description_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* Icon::release_tip_description() { - // @@protoc_insertion_point(field_release:Icon.tip_description) + // @@protoc_insertion_point(field_release:waypoint.Icon.tip_description) return tip_description_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void Icon::set_allocated_tip_description(std::string* tip_description) { @@ -5958,10 +5961,10 @@ inline void Icon::set_allocated_tip_description(std::string* tip_description) { } tip_description_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), tip_description, GetArena()); - // @@protoc_insertion_point(field_set_allocated:Icon.tip_description) + // @@protoc_insertion_point(field_set_allocated:waypoint.Icon.tip_description) } inline std::string* Icon::unsafe_arena_release_tip_description() { - // @@protoc_insertion_point(field_unsafe_arena_release:Icon.tip_description) + // @@protoc_insertion_point(field_unsafe_arena_release:waypoint.Icon.tip_description) GOOGLE_DCHECK(GetArena() != nullptr); return tip_description_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), @@ -5977,7 +5980,7 @@ inline void Icon::unsafe_arena_set_allocated_tip_description( } tip_description_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), tip_description, GetArena()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Icon.tip_description) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Icon.tip_description) } // string tip_name = 25; @@ -5985,15 +5988,15 @@ inline void Icon::clear_tip_name() { tip_name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline const std::string& Icon::tip_name() const { - // @@protoc_insertion_point(field_get:Icon.tip_name) + // @@protoc_insertion_point(field_get:waypoint.Icon.tip_name) return _internal_tip_name(); } inline void Icon::set_tip_name(const std::string& value) { _internal_set_tip_name(value); - // @@protoc_insertion_point(field_set:Icon.tip_name) + // @@protoc_insertion_point(field_set:waypoint.Icon.tip_name) } inline std::string* Icon::mutable_tip_name() { - // @@protoc_insertion_point(field_mutable:Icon.tip_name) + // @@protoc_insertion_point(field_mutable:waypoint.Icon.tip_name) return _internal_mutable_tip_name(); } inline const std::string& Icon::_internal_tip_name() const { @@ -6007,28 +6010,28 @@ inline void Icon::set_tip_name(std::string&& value) { tip_name_.Set( &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:Icon.tip_name) + // @@protoc_insertion_point(field_set_rvalue:waypoint.Icon.tip_name) } inline void Icon::set_tip_name(const char* value) { GOOGLE_DCHECK(value != nullptr); tip_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:Icon.tip_name) + // @@protoc_insertion_point(field_set_char:waypoint.Icon.tip_name) } inline void Icon::set_tip_name(const char* value, size_t size) { tip_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:Icon.tip_name) + // @@protoc_insertion_point(field_set_pointer:waypoint.Icon.tip_name) } inline std::string* Icon::_internal_mutable_tip_name() { return tip_name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* Icon::release_tip_name() { - // @@protoc_insertion_point(field_release:Icon.tip_name) + // @@protoc_insertion_point(field_release:waypoint.Icon.tip_name) return tip_name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void Icon::set_allocated_tip_name(std::string* tip_name) { @@ -6039,10 +6042,10 @@ inline void Icon::set_allocated_tip_name(std::string* tip_name) { } tip_name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), tip_name, GetArena()); - // @@protoc_insertion_point(field_set_allocated:Icon.tip_name) + // @@protoc_insertion_point(field_set_allocated:waypoint.Icon.tip_name) } inline std::string* Icon::unsafe_arena_release_tip_name() { - // @@protoc_insertion_point(field_unsafe_arena_release:Icon.tip_name) + // @@protoc_insertion_point(field_unsafe_arena_release:waypoint.Icon.tip_name) GOOGLE_DCHECK(GetArena() != nullptr); return tip_name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), @@ -6058,7 +6061,7 @@ inline void Icon::unsafe_arena_set_allocated_tip_name( } tip_name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), tip_name, GetArena()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Icon.tip_name) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Icon.tip_name) } // float __tentative__scale = 2048; @@ -6069,7 +6072,7 @@ inline float Icon::_internal___tentative__scale() const { return __tentative__scale_; } inline float Icon::__tentative__scale() const { - // @@protoc_insertion_point(field_get:Icon.__tentative__scale) + // @@protoc_insertion_point(field_get:waypoint.Icon.__tentative__scale) return _internal___tentative__scale(); } inline void Icon::_internal_set___tentative__scale(float value) { @@ -6078,7 +6081,7 @@ inline void Icon::_internal_set___tentative__scale(float value) { } inline void Icon::set___tentative__scale(float value) { _internal_set___tentative__scale(value); - // @@protoc_insertion_point(field_set:Icon.__tentative__scale) + // @@protoc_insertion_point(field_set:waypoint.Icon.__tentative__scale) } // bool __tentative__render_ingame = 2049; @@ -6089,7 +6092,7 @@ inline bool Icon::_internal___tentative__render_ingame() const { return __tentative__render_ingame_; } inline bool Icon::__tentative__render_ingame() const { - // @@protoc_insertion_point(field_get:Icon.__tentative__render_ingame) + // @@protoc_insertion_point(field_get:waypoint.Icon.__tentative__render_ingame) return _internal___tentative__render_ingame(); } inline void Icon::_internal_set___tentative__render_ingame(bool value) { @@ -6098,7 +6101,7 @@ inline void Icon::_internal_set___tentative__render_ingame(bool value) { } inline void Icon::set___tentative__render_ingame(bool value) { _internal_set___tentative__render_ingame(value); - // @@protoc_insertion_point(field_set:Icon.__tentative__render_ingame) + // @@protoc_insertion_point(field_set:waypoint.Icon.__tentative__render_ingame) } // bool __tentative__render_on_map = 2050; @@ -6109,7 +6112,7 @@ inline bool Icon::_internal___tentative__render_on_map() const { return __tentative__render_on_map_; } inline bool Icon::__tentative__render_on_map() const { - // @@protoc_insertion_point(field_get:Icon.__tentative__render_on_map) + // @@protoc_insertion_point(field_get:waypoint.Icon.__tentative__render_on_map) return _internal___tentative__render_on_map(); } inline void Icon::_internal_set___tentative__render_on_map(bool value) { @@ -6118,7 +6121,7 @@ inline void Icon::_internal_set___tentative__render_on_map(bool value) { } inline void Icon::set___tentative__render_on_map(bool value) { _internal_set___tentative__render_on_map(value); - // @@protoc_insertion_point(field_set:Icon.__tentative__render_on_map) + // @@protoc_insertion_point(field_set:waypoint.Icon.__tentative__render_on_map) } // bool __tentative__render_on_minimap = 2051; @@ -6129,7 +6132,7 @@ inline bool Icon::_internal___tentative__render_on_minimap() const { return __tentative__render_on_minimap_; } inline bool Icon::__tentative__render_on_minimap() const { - // @@protoc_insertion_point(field_get:Icon.__tentative__render_on_minimap) + // @@protoc_insertion_point(field_get:waypoint.Icon.__tentative__render_on_minimap) return _internal___tentative__render_on_minimap(); } inline void Icon::_internal_set___tentative__render_on_minimap(bool value) { @@ -6138,7 +6141,7 @@ inline void Icon::_internal_set___tentative__render_on_minimap(bool value) { } inline void Icon::set___tentative__render_on_minimap(bool value) { _internal_set___tentative__render_on_minimap(value); - // @@protoc_insertion_point(field_set:Icon.__tentative__render_on_minimap) + // @@protoc_insertion_point(field_set:waypoint.Icon.__tentative__render_on_minimap) } // string bhdraft__schedule = 2052; @@ -6146,15 +6149,15 @@ inline void Icon::clear_bhdraft__schedule() { bhdraft__schedule_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline const std::string& Icon::bhdraft__schedule() const { - // @@protoc_insertion_point(field_get:Icon.bhdraft__schedule) + // @@protoc_insertion_point(field_get:waypoint.Icon.bhdraft__schedule) return _internal_bhdraft__schedule(); } inline void Icon::set_bhdraft__schedule(const std::string& value) { _internal_set_bhdraft__schedule(value); - // @@protoc_insertion_point(field_set:Icon.bhdraft__schedule) + // @@protoc_insertion_point(field_set:waypoint.Icon.bhdraft__schedule) } inline std::string* Icon::mutable_bhdraft__schedule() { - // @@protoc_insertion_point(field_mutable:Icon.bhdraft__schedule) + // @@protoc_insertion_point(field_mutable:waypoint.Icon.bhdraft__schedule) return _internal_mutable_bhdraft__schedule(); } inline const std::string& Icon::_internal_bhdraft__schedule() const { @@ -6168,28 +6171,28 @@ inline void Icon::set_bhdraft__schedule(std::string&& value) { bhdraft__schedule_.Set( &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:Icon.bhdraft__schedule) + // @@protoc_insertion_point(field_set_rvalue:waypoint.Icon.bhdraft__schedule) } inline void Icon::set_bhdraft__schedule(const char* value) { GOOGLE_DCHECK(value != nullptr); bhdraft__schedule_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:Icon.bhdraft__schedule) + // @@protoc_insertion_point(field_set_char:waypoint.Icon.bhdraft__schedule) } inline void Icon::set_bhdraft__schedule(const char* value, size_t size) { bhdraft__schedule_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:Icon.bhdraft__schedule) + // @@protoc_insertion_point(field_set_pointer:waypoint.Icon.bhdraft__schedule) } inline std::string* Icon::_internal_mutable_bhdraft__schedule() { return bhdraft__schedule_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* Icon::release_bhdraft__schedule() { - // @@protoc_insertion_point(field_release:Icon.bhdraft__schedule) + // @@protoc_insertion_point(field_release:waypoint.Icon.bhdraft__schedule) return bhdraft__schedule_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void Icon::set_allocated_bhdraft__schedule(std::string* bhdraft__schedule) { @@ -6200,10 +6203,10 @@ inline void Icon::set_allocated_bhdraft__schedule(std::string* bhdraft__schedule } bhdraft__schedule_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), bhdraft__schedule, GetArena()); - // @@protoc_insertion_point(field_set_allocated:Icon.bhdraft__schedule) + // @@protoc_insertion_point(field_set_allocated:waypoint.Icon.bhdraft__schedule) } inline std::string* Icon::unsafe_arena_release_bhdraft__schedule() { - // @@protoc_insertion_point(field_unsafe_arena_release:Icon.bhdraft__schedule) + // @@protoc_insertion_point(field_unsafe_arena_release:waypoint.Icon.bhdraft__schedule) GOOGLE_DCHECK(GetArena() != nullptr); return bhdraft__schedule_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), @@ -6219,7 +6222,7 @@ inline void Icon::unsafe_arena_set_allocated_bhdraft__schedule( } bhdraft__schedule_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), bhdraft__schedule, GetArena()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Icon.bhdraft__schedule) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Icon.bhdraft__schedule) } // float bhdraft__schedule_duration = 2053; @@ -6230,7 +6233,7 @@ inline float Icon::_internal_bhdraft__schedule_duration() const { return bhdraft__schedule_duration_; } inline float Icon::bhdraft__schedule_duration() const { - // @@protoc_insertion_point(field_get:Icon.bhdraft__schedule_duration) + // @@protoc_insertion_point(field_get:waypoint.Icon.bhdraft__schedule_duration) return _internal_bhdraft__schedule_duration(); } inline void Icon::_internal_set_bhdraft__schedule_duration(float value) { @@ -6239,14 +6242,14 @@ inline void Icon::_internal_set_bhdraft__schedule_duration(float value) { } inline void Icon::set_bhdraft__schedule_duration(float value) { _internal_set_bhdraft__schedule_duration(value); - // @@protoc_insertion_point(field_set:Icon.bhdraft__schedule_duration) + // @@protoc_insertion_point(field_set:waypoint.Icon.bhdraft__schedule_duration) } // ------------------------------------------------------------------- // Trail -// .Category category = 1; +// .waypoint.Category category = 1; inline bool Trail::_internal_has_category() const { return this != internal_default_instance() && category_ != nullptr; } @@ -6259,17 +6262,17 @@ inline void Trail::clear_category() { } category_ = nullptr; } -inline const ::Category& Trail::_internal_category() const { - const ::Category* p = category_; - return p != nullptr ? *p : *reinterpret_cast( - &::_Category_default_instance_); +inline const ::waypoint::Category& Trail::_internal_category() const { + const ::waypoint::Category* p = category_; + return p != nullptr ? *p : *reinterpret_cast( + &::waypoint::_Category_default_instance_); } -inline const ::Category& Trail::category() const { - // @@protoc_insertion_point(field_get:Trail.category) +inline const ::waypoint::Category& Trail::category() const { + // @@protoc_insertion_point(field_get:waypoint.Trail.category) return _internal_category(); } inline void Trail::unsafe_arena_set_allocated_category( - ::Category* category) { + ::waypoint::Category* category) { if (GetArena() == nullptr) { delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(category_); } @@ -6279,35 +6282,35 @@ inline void Trail::unsafe_arena_set_allocated_category( } else { } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Trail.category) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Trail.category) } -inline ::Category* Trail::release_category() { +inline ::waypoint::Category* Trail::release_category() { auto temp = unsafe_arena_release_category(); if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } return temp; } -inline ::Category* Trail::unsafe_arena_release_category() { - // @@protoc_insertion_point(field_release:Trail.category) +inline ::waypoint::Category* Trail::unsafe_arena_release_category() { + // @@protoc_insertion_point(field_release:waypoint.Trail.category) - ::Category* temp = category_; + ::waypoint::Category* temp = category_; category_ = nullptr; return temp; } -inline ::Category* Trail::_internal_mutable_category() { +inline ::waypoint::Category* Trail::_internal_mutable_category() { if (category_ == nullptr) { - auto* p = CreateMaybeMessage<::Category>(GetArena()); + auto* p = CreateMaybeMessage<::waypoint::Category>(GetArena()); category_ = p; } return category_; } -inline ::Category* Trail::mutable_category() { - // @@protoc_insertion_point(field_mutable:Trail.category) +inline ::waypoint::Category* Trail::mutable_category() { + // @@protoc_insertion_point(field_mutable:waypoint.Trail.category) return _internal_mutable_category(); } -inline void Trail::set_allocated_category(::Category* category) { +inline void Trail::set_allocated_category(::waypoint::Category* category) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); if (message_arena == nullptr) { delete category_; @@ -6324,10 +6327,10 @@ inline void Trail::set_allocated_category(::Category* category) { } category_ = category; - // @@protoc_insertion_point(field_set_allocated:Trail.category) + // @@protoc_insertion_point(field_set_allocated:waypoint.Trail.category) } -// .Texture texture = 2; +// .waypoint.Texture texture = 2; inline bool Trail::_internal_has_texture() const { return this != internal_default_instance() && texture_ != nullptr; } @@ -6340,17 +6343,17 @@ inline void Trail::clear_texture() { } texture_ = nullptr; } -inline const ::Texture& Trail::_internal_texture() const { - const ::Texture* p = texture_; - return p != nullptr ? *p : *reinterpret_cast( - &::_Texture_default_instance_); +inline const ::waypoint::Texture& Trail::_internal_texture() const { + const ::waypoint::Texture* p = texture_; + return p != nullptr ? *p : *reinterpret_cast( + &::waypoint::_Texture_default_instance_); } -inline const ::Texture& Trail::texture() const { - // @@protoc_insertion_point(field_get:Trail.texture) +inline const ::waypoint::Texture& Trail::texture() const { + // @@protoc_insertion_point(field_get:waypoint.Trail.texture) return _internal_texture(); } inline void Trail::unsafe_arena_set_allocated_texture( - ::Texture* texture) { + ::waypoint::Texture* texture) { if (GetArena() == nullptr) { delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(texture_); } @@ -6360,35 +6363,35 @@ inline void Trail::unsafe_arena_set_allocated_texture( } else { } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Trail.texture) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Trail.texture) } -inline ::Texture* Trail::release_texture() { +inline ::waypoint::Texture* Trail::release_texture() { auto temp = unsafe_arena_release_texture(); if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } return temp; } -inline ::Texture* Trail::unsafe_arena_release_texture() { - // @@protoc_insertion_point(field_release:Trail.texture) +inline ::waypoint::Texture* Trail::unsafe_arena_release_texture() { + // @@protoc_insertion_point(field_release:waypoint.Trail.texture) - ::Texture* temp = texture_; + ::waypoint::Texture* temp = texture_; texture_ = nullptr; return temp; } -inline ::Texture* Trail::_internal_mutable_texture() { +inline ::waypoint::Texture* Trail::_internal_mutable_texture() { if (texture_ == nullptr) { - auto* p = CreateMaybeMessage<::Texture>(GetArena()); + auto* p = CreateMaybeMessage<::waypoint::Texture>(GetArena()); texture_ = p; } return texture_; } -inline ::Texture* Trail::mutable_texture() { - // @@protoc_insertion_point(field_mutable:Trail.texture) +inline ::waypoint::Texture* Trail::mutable_texture() { + // @@protoc_insertion_point(field_mutable:waypoint.Trail.texture) return _internal_mutable_texture(); } -inline void Trail::set_allocated_texture(::Texture* texture) { +inline void Trail::set_allocated_texture(::waypoint::Texture* texture) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); if (message_arena == nullptr) { delete texture_; @@ -6405,10 +6408,10 @@ inline void Trail::set_allocated_texture(::Texture* texture) { } texture_ = texture; - // @@protoc_insertion_point(field_set_allocated:Trail.texture) + // @@protoc_insertion_point(field_set_allocated:waypoint.Trail.texture) } -// .GUID guid = 3; +// .waypoint.GUID guid = 3; inline bool Trail::_internal_has_guid() const { return this != internal_default_instance() && guid_ != nullptr; } @@ -6421,17 +6424,17 @@ inline void Trail::clear_guid() { } guid_ = nullptr; } -inline const ::GUID& Trail::_internal_guid() const { - const ::GUID* p = guid_; - return p != nullptr ? *p : *reinterpret_cast( - &::_GUID_default_instance_); +inline const ::waypoint::GUID& Trail::_internal_guid() const { + const ::waypoint::GUID* p = guid_; + return p != nullptr ? *p : *reinterpret_cast( + &::waypoint::_GUID_default_instance_); } -inline const ::GUID& Trail::guid() const { - // @@protoc_insertion_point(field_get:Trail.guid) +inline const ::waypoint::GUID& Trail::guid() const { + // @@protoc_insertion_point(field_get:waypoint.Trail.guid) return _internal_guid(); } inline void Trail::unsafe_arena_set_allocated_guid( - ::GUID* guid) { + ::waypoint::GUID* guid) { if (GetArena() == nullptr) { delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(guid_); } @@ -6441,35 +6444,35 @@ inline void Trail::unsafe_arena_set_allocated_guid( } else { } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Trail.guid) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Trail.guid) } -inline ::GUID* Trail::release_guid() { +inline ::waypoint::GUID* Trail::release_guid() { auto temp = unsafe_arena_release_guid(); if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } return temp; } -inline ::GUID* Trail::unsafe_arena_release_guid() { - // @@protoc_insertion_point(field_release:Trail.guid) +inline ::waypoint::GUID* Trail::unsafe_arena_release_guid() { + // @@protoc_insertion_point(field_release:waypoint.Trail.guid) - ::GUID* temp = guid_; + ::waypoint::GUID* temp = guid_; guid_ = nullptr; return temp; } -inline ::GUID* Trail::_internal_mutable_guid() { +inline ::waypoint::GUID* Trail::_internal_mutable_guid() { if (guid_ == nullptr) { - auto* p = CreateMaybeMessage<::GUID>(GetArena()); + auto* p = CreateMaybeMessage<::waypoint::GUID>(GetArena()); guid_ = p; } return guid_; } -inline ::GUID* Trail::mutable_guid() { - // @@protoc_insertion_point(field_mutable:Trail.guid) +inline ::waypoint::GUID* Trail::mutable_guid() { + // @@protoc_insertion_point(field_mutable:waypoint.Trail.guid) return _internal_mutable_guid(); } -inline void Trail::set_allocated_guid(::GUID* guid) { +inline void Trail::set_allocated_guid(::waypoint::GUID* guid) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); if (message_arena == nullptr) { delete guid_; @@ -6486,7 +6489,7 @@ inline void Trail::set_allocated_guid(::GUID* guid) { } guid_ = guid; - // @@protoc_insertion_point(field_set_allocated:Trail.guid) + // @@protoc_insertion_point(field_set_allocated:waypoint.Trail.guid) } // int32 map_id = 4; @@ -6497,7 +6500,7 @@ inline ::PROTOBUF_NAMESPACE_ID::int32 Trail::_internal_map_id() const { return map_id_; } inline ::PROTOBUF_NAMESPACE_ID::int32 Trail::map_id() const { - // @@protoc_insertion_point(field_get:Trail.map_id) + // @@protoc_insertion_point(field_get:waypoint.Trail.map_id) return _internal_map_id(); } inline void Trail::_internal_set_map_id(::PROTOBUF_NAMESPACE_ID::int32 value) { @@ -6506,7 +6509,7 @@ inline void Trail::_internal_set_map_id(::PROTOBUF_NAMESPACE_ID::int32 value) { } inline void Trail::set_map_id(::PROTOBUF_NAMESPACE_ID::int32 value) { _internal_set_map_id(value); - // @@protoc_insertion_point(field_set:Trail.map_id) + // @@protoc_insertion_point(field_set:waypoint.Trail.map_id) } // float distance_fade_end = 5; @@ -6517,7 +6520,7 @@ inline float Trail::_internal_distance_fade_end() const { return distance_fade_end_; } inline float Trail::distance_fade_end() const { - // @@protoc_insertion_point(field_get:Trail.distance_fade_end) + // @@protoc_insertion_point(field_get:waypoint.Trail.distance_fade_end) return _internal_distance_fade_end(); } inline void Trail::_internal_set_distance_fade_end(float value) { @@ -6526,7 +6529,7 @@ inline void Trail::_internal_set_distance_fade_end(float value) { } inline void Trail::set_distance_fade_end(float value) { _internal_set_distance_fade_end(value); - // @@protoc_insertion_point(field_set:Trail.distance_fade_end) + // @@protoc_insertion_point(field_set:waypoint.Trail.distance_fade_end) } // float distance_fade_start = 6; @@ -6537,7 +6540,7 @@ inline float Trail::_internal_distance_fade_start() const { return distance_fade_start_; } inline float Trail::distance_fade_start() const { - // @@protoc_insertion_point(field_get:Trail.distance_fade_start) + // @@protoc_insertion_point(field_get:waypoint.Trail.distance_fade_start) return _internal_distance_fade_start(); } inline void Trail::_internal_set_distance_fade_start(float value) { @@ -6546,10 +6549,10 @@ inline void Trail::_internal_set_distance_fade_start(float value) { } inline void Trail::set_distance_fade_start(float value) { _internal_set_distance_fade_start(value); - // @@protoc_insertion_point(field_set:Trail.distance_fade_start) + // @@protoc_insertion_point(field_set:waypoint.Trail.distance_fade_start) } -// .TrailData trail_data = 7; +// .waypoint.TrailData trail_data = 7; inline bool Trail::_internal_has_trail_data() const { return this != internal_default_instance() && trail_data_ != nullptr; } @@ -6562,17 +6565,17 @@ inline void Trail::clear_trail_data() { } trail_data_ = nullptr; } -inline const ::TrailData& Trail::_internal_trail_data() const { - const ::TrailData* p = trail_data_; - return p != nullptr ? *p : *reinterpret_cast( - &::_TrailData_default_instance_); +inline const ::waypoint::TrailData& Trail::_internal_trail_data() const { + const ::waypoint::TrailData* p = trail_data_; + return p != nullptr ? *p : *reinterpret_cast( + &::waypoint::_TrailData_default_instance_); } -inline const ::TrailData& Trail::trail_data() const { - // @@protoc_insertion_point(field_get:Trail.trail_data) +inline const ::waypoint::TrailData& Trail::trail_data() const { + // @@protoc_insertion_point(field_get:waypoint.Trail.trail_data) return _internal_trail_data(); } inline void Trail::unsafe_arena_set_allocated_trail_data( - ::TrailData* trail_data) { + ::waypoint::TrailData* trail_data) { if (GetArena() == nullptr) { delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(trail_data_); } @@ -6582,35 +6585,35 @@ inline void Trail::unsafe_arena_set_allocated_trail_data( } else { } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Trail.trail_data) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Trail.trail_data) } -inline ::TrailData* Trail::release_trail_data() { +inline ::waypoint::TrailData* Trail::release_trail_data() { auto temp = unsafe_arena_release_trail_data(); if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } return temp; } -inline ::TrailData* Trail::unsafe_arena_release_trail_data() { - // @@protoc_insertion_point(field_release:Trail.trail_data) +inline ::waypoint::TrailData* Trail::unsafe_arena_release_trail_data() { + // @@protoc_insertion_point(field_release:waypoint.Trail.trail_data) - ::TrailData* temp = trail_data_; + ::waypoint::TrailData* temp = trail_data_; trail_data_ = nullptr; return temp; } -inline ::TrailData* Trail::_internal_mutable_trail_data() { +inline ::waypoint::TrailData* Trail::_internal_mutable_trail_data() { if (trail_data_ == nullptr) { - auto* p = CreateMaybeMessage<::TrailData>(GetArena()); + auto* p = CreateMaybeMessage<::waypoint::TrailData>(GetArena()); trail_data_ = p; } return trail_data_; } -inline ::TrailData* Trail::mutable_trail_data() { - // @@protoc_insertion_point(field_mutable:Trail.trail_data) +inline ::waypoint::TrailData* Trail::mutable_trail_data() { + // @@protoc_insertion_point(field_mutable:waypoint.Trail.trail_data) return _internal_mutable_trail_data(); } -inline void Trail::set_allocated_trail_data(::TrailData* trail_data) { +inline void Trail::set_allocated_trail_data(::waypoint::TrailData* trail_data) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); if (message_arena == nullptr) { delete trail_data_; @@ -6627,7 +6630,7 @@ inline void Trail::set_allocated_trail_data(::TrailData* trail_data) { } trail_data_ = trail_data; - // @@protoc_insertion_point(field_set_allocated:Trail.trail_data) + // @@protoc_insertion_point(field_set_allocated:waypoint.Trail.trail_data) } // float animation_speed = 8; @@ -6638,7 +6641,7 @@ inline float Trail::_internal_animation_speed() const { return animation_speed_; } inline float Trail::animation_speed() const { - // @@protoc_insertion_point(field_get:Trail.animation_speed) + // @@protoc_insertion_point(field_get:waypoint.Trail.animation_speed) return _internal_animation_speed(); } inline void Trail::_internal_set_animation_speed(float value) { @@ -6647,27 +6650,27 @@ inline void Trail::_internal_set_animation_speed(float value) { } inline void Trail::set_animation_speed(float value) { _internal_set_animation_speed(value); - // @@protoc_insertion_point(field_set:Trail.animation_speed) + // @@protoc_insertion_point(field_set:waypoint.Trail.animation_speed) } -// .CullChirality cull_chirality = 9; +// .waypoint.CullChirality cull_chirality = 9; inline void Trail::clear_cull_chirality() { cull_chirality_ = 0; } -inline ::CullChirality Trail::_internal_cull_chirality() const { - return static_cast< ::CullChirality >(cull_chirality_); +inline ::waypoint::CullChirality Trail::_internal_cull_chirality() const { + return static_cast< ::waypoint::CullChirality >(cull_chirality_); } -inline ::CullChirality Trail::cull_chirality() const { - // @@protoc_insertion_point(field_get:Trail.cull_chirality) +inline ::waypoint::CullChirality Trail::cull_chirality() const { + // @@protoc_insertion_point(field_get:waypoint.Trail.cull_chirality) return _internal_cull_chirality(); } -inline void Trail::_internal_set_cull_chirality(::CullChirality value) { +inline void Trail::_internal_set_cull_chirality(::waypoint::CullChirality value) { cull_chirality_ = value; } -inline void Trail::set_cull_chirality(::CullChirality value) { +inline void Trail::set_cull_chirality(::waypoint::CullChirality value) { _internal_set_cull_chirality(value); - // @@protoc_insertion_point(field_set:Trail.cull_chirality) + // @@protoc_insertion_point(field_set:waypoint.Trail.cull_chirality) } // fixed32 achievement_bit = 16; @@ -6678,7 +6681,7 @@ inline ::PROTOBUF_NAMESPACE_ID::uint32 Trail::_internal_achievement_bit() const return achievement_bit_; } inline ::PROTOBUF_NAMESPACE_ID::uint32 Trail::achievement_bit() const { - // @@protoc_insertion_point(field_get:Trail.achievement_bit) + // @@protoc_insertion_point(field_get:waypoint.Trail.achievement_bit) return _internal_achievement_bit(); } inline void Trail::_internal_set_achievement_bit(::PROTOBUF_NAMESPACE_ID::uint32 value) { @@ -6687,7 +6690,7 @@ inline void Trail::_internal_set_achievement_bit(::PROTOBUF_NAMESPACE_ID::uint32 } inline void Trail::set_achievement_bit(::PROTOBUF_NAMESPACE_ID::uint32 value) { _internal_set_achievement_bit(value); - // @@protoc_insertion_point(field_set:Trail.achievement_bit) + // @@protoc_insertion_point(field_set:waypoint.Trail.achievement_bit) } // int32 achievement_id = 17; @@ -6698,7 +6701,7 @@ inline ::PROTOBUF_NAMESPACE_ID::int32 Trail::_internal_achievement_id() const { return achievement_id_; } inline ::PROTOBUF_NAMESPACE_ID::int32 Trail::achievement_id() const { - // @@protoc_insertion_point(field_get:Trail.achievement_id) + // @@protoc_insertion_point(field_get:waypoint.Trail.achievement_id) return _internal_achievement_id(); } inline void Trail::_internal_set_achievement_id(::PROTOBUF_NAMESPACE_ID::int32 value) { @@ -6707,7 +6710,7 @@ inline void Trail::_internal_set_achievement_id(::PROTOBUF_NAMESPACE_ID::int32 v } inline void Trail::set_achievement_id(::PROTOBUF_NAMESPACE_ID::int32 value) { _internal_set_achievement_id(value); - // @@protoc_insertion_point(field_set:Trail.achievement_id) + // @@protoc_insertion_point(field_set:waypoint.Trail.achievement_id) } // float alpha = 18; @@ -6718,7 +6721,7 @@ inline float Trail::_internal_alpha() const { return alpha_; } inline float Trail::alpha() const { - // @@protoc_insertion_point(field_get:Trail.alpha) + // @@protoc_insertion_point(field_get:waypoint.Trail.alpha) return _internal_alpha(); } inline void Trail::_internal_set_alpha(float value) { @@ -6727,7 +6730,7 @@ inline void Trail::_internal_set_alpha(float value) { } inline void Trail::set_alpha(float value) { _internal_set_alpha(value); - // @@protoc_insertion_point(field_set:Trail.alpha) + // @@protoc_insertion_point(field_set:waypoint.Trail.alpha) } // bool can_fade = 19; @@ -6738,7 +6741,7 @@ inline bool Trail::_internal_can_fade() const { return can_fade_; } inline bool Trail::can_fade() const { - // @@protoc_insertion_point(field_get:Trail.can_fade) + // @@protoc_insertion_point(field_get:waypoint.Trail.can_fade) return _internal_can_fade(); } inline void Trail::_internal_set_can_fade(bool value) { @@ -6747,7 +6750,7 @@ inline void Trail::_internal_set_can_fade(bool value) { } inline void Trail::set_can_fade(bool value) { _internal_set_can_fade(value); - // @@protoc_insertion_point(field_set:Trail.can_fade) + // @@protoc_insertion_point(field_set:waypoint.Trail.can_fade) } // bool is_wall = 22; @@ -6758,7 +6761,7 @@ inline bool Trail::_internal_is_wall() const { return is_wall_; } inline bool Trail::is_wall() const { - // @@protoc_insertion_point(field_get:Trail.is_wall) + // @@protoc_insertion_point(field_get:waypoint.Trail.is_wall) return _internal_is_wall(); } inline void Trail::_internal_set_is_wall(bool value) { @@ -6767,7 +6770,7 @@ inline void Trail::_internal_set_is_wall(bool value) { } inline void Trail::set_is_wall(bool value) { _internal_set_is_wall(value); - // @@protoc_insertion_point(field_set:Trail.is_wall) + // @@protoc_insertion_point(field_set:waypoint.Trail.is_wall) } // string bhdraft__schedule = 23; @@ -6775,15 +6778,15 @@ inline void Trail::clear_bhdraft__schedule() { bhdraft__schedule_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline const std::string& Trail::bhdraft__schedule() const { - // @@protoc_insertion_point(field_get:Trail.bhdraft__schedule) + // @@protoc_insertion_point(field_get:waypoint.Trail.bhdraft__schedule) return _internal_bhdraft__schedule(); } inline void Trail::set_bhdraft__schedule(const std::string& value) { _internal_set_bhdraft__schedule(value); - // @@protoc_insertion_point(field_set:Trail.bhdraft__schedule) + // @@protoc_insertion_point(field_set:waypoint.Trail.bhdraft__schedule) } inline std::string* Trail::mutable_bhdraft__schedule() { - // @@protoc_insertion_point(field_mutable:Trail.bhdraft__schedule) + // @@protoc_insertion_point(field_mutable:waypoint.Trail.bhdraft__schedule) return _internal_mutable_bhdraft__schedule(); } inline const std::string& Trail::_internal_bhdraft__schedule() const { @@ -6797,28 +6800,28 @@ inline void Trail::set_bhdraft__schedule(std::string&& value) { bhdraft__schedule_.Set( &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:Trail.bhdraft__schedule) + // @@protoc_insertion_point(field_set_rvalue:waypoint.Trail.bhdraft__schedule) } inline void Trail::set_bhdraft__schedule(const char* value) { GOOGLE_DCHECK(value != nullptr); bhdraft__schedule_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:Trail.bhdraft__schedule) + // @@protoc_insertion_point(field_set_char:waypoint.Trail.bhdraft__schedule) } inline void Trail::set_bhdraft__schedule(const char* value, size_t size) { bhdraft__schedule_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:Trail.bhdraft__schedule) + // @@protoc_insertion_point(field_set_pointer:waypoint.Trail.bhdraft__schedule) } inline std::string* Trail::_internal_mutable_bhdraft__schedule() { return bhdraft__schedule_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* Trail::release_bhdraft__schedule() { - // @@protoc_insertion_point(field_release:Trail.bhdraft__schedule) + // @@protoc_insertion_point(field_release:waypoint.Trail.bhdraft__schedule) return bhdraft__schedule_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void Trail::set_allocated_bhdraft__schedule(std::string* bhdraft__schedule) { @@ -6829,10 +6832,10 @@ inline void Trail::set_allocated_bhdraft__schedule(std::string* bhdraft__schedul } bhdraft__schedule_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), bhdraft__schedule, GetArena()); - // @@protoc_insertion_point(field_set_allocated:Trail.bhdraft__schedule) + // @@protoc_insertion_point(field_set_allocated:waypoint.Trail.bhdraft__schedule) } inline std::string* Trail::unsafe_arena_release_bhdraft__schedule() { - // @@protoc_insertion_point(field_unsafe_arena_release:Trail.bhdraft__schedule) + // @@protoc_insertion_point(field_unsafe_arena_release:waypoint.Trail.bhdraft__schedule) GOOGLE_DCHECK(GetArena() != nullptr); return bhdraft__schedule_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), @@ -6848,7 +6851,7 @@ inline void Trail::unsafe_arena_set_allocated_bhdraft__schedule( } bhdraft__schedule_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), bhdraft__schedule, GetArena()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Trail.bhdraft__schedule) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Trail.bhdraft__schedule) } // float bhdraft__schedule_duration = 24; @@ -6859,7 +6862,7 @@ inline float Trail::_internal_bhdraft__schedule_duration() const { return bhdraft__schedule_duration_; } inline float Trail::bhdraft__schedule_duration() const { - // @@protoc_insertion_point(field_get:Trail.bhdraft__schedule_duration) + // @@protoc_insertion_point(field_get:waypoint.Trail.bhdraft__schedule_duration) return _internal_bhdraft__schedule_duration(); } inline void Trail::_internal_set_bhdraft__schedule_duration(float value) { @@ -6868,7 +6871,7 @@ inline void Trail::_internal_set_bhdraft__schedule_duration(float value) { } inline void Trail::set_bhdraft__schedule_duration(float value) { _internal_set_bhdraft__schedule_duration(value); - // @@protoc_insertion_point(field_set:Trail.bhdraft__schedule_duration) + // @@protoc_insertion_point(field_set:waypoint.Trail.bhdraft__schedule_duration) } // float scale = 25; @@ -6879,7 +6882,7 @@ inline float Trail::_internal_scale() const { return scale_; } inline float Trail::scale() const { - // @@protoc_insertion_point(field_get:Trail.scale) + // @@protoc_insertion_point(field_get:waypoint.Trail.scale) return _internal_scale(); } inline void Trail::_internal_set_scale(float value) { @@ -6888,10 +6891,10 @@ inline void Trail::_internal_set_scale(float value) { } inline void Trail::set_scale(float value) { _internal_set_scale(value); - // @@protoc_insertion_point(field_set:Trail.scale) + // @@protoc_insertion_point(field_set:waypoint.Trail.scale) } -// .Color color = 26; +// .waypoint.Color color = 26; inline bool Trail::_internal_has_color() const { return this != internal_default_instance() && color_ != nullptr; } @@ -6904,17 +6907,17 @@ inline void Trail::clear_color() { } color_ = nullptr; } -inline const ::Color& Trail::_internal_color() const { - const ::Color* p = color_; - return p != nullptr ? *p : *reinterpret_cast( - &::_Color_default_instance_); +inline const ::waypoint::Color& Trail::_internal_color() const { + const ::waypoint::Color* p = color_; + return p != nullptr ? *p : *reinterpret_cast( + &::waypoint::_Color_default_instance_); } -inline const ::Color& Trail::color() const { - // @@protoc_insertion_point(field_get:Trail.color) +inline const ::waypoint::Color& Trail::color() const { + // @@protoc_insertion_point(field_get:waypoint.Trail.color) return _internal_color(); } inline void Trail::unsafe_arena_set_allocated_color( - ::Color* color) { + ::waypoint::Color* color) { if (GetArena() == nullptr) { delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(color_); } @@ -6924,35 +6927,35 @@ inline void Trail::unsafe_arena_set_allocated_color( } else { } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Trail.color) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Trail.color) } -inline ::Color* Trail::release_color() { +inline ::waypoint::Color* Trail::release_color() { auto temp = unsafe_arena_release_color(); if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } return temp; } -inline ::Color* Trail::unsafe_arena_release_color() { - // @@protoc_insertion_point(field_release:Trail.color) +inline ::waypoint::Color* Trail::unsafe_arena_release_color() { + // @@protoc_insertion_point(field_release:waypoint.Trail.color) - ::Color* temp = color_; + ::waypoint::Color* temp = color_; color_ = nullptr; return temp; } -inline ::Color* Trail::_internal_mutable_color() { +inline ::waypoint::Color* Trail::_internal_mutable_color() { if (color_ == nullptr) { - auto* p = CreateMaybeMessage<::Color>(GetArena()); + auto* p = CreateMaybeMessage<::waypoint::Color>(GetArena()); color_ = p; } return color_; } -inline ::Color* Trail::mutable_color() { - // @@protoc_insertion_point(field_mutable:Trail.color) +inline ::waypoint::Color* Trail::mutable_color() { + // @@protoc_insertion_point(field_mutable:waypoint.Trail.color) return _internal_mutable_color(); } -inline void Trail::set_allocated_color(::Color* color) { +inline void Trail::set_allocated_color(::waypoint::Color* color) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); if (message_arena == nullptr) { delete color_; @@ -6969,10 +6972,10 @@ inline void Trail::set_allocated_color(::Color* color) { } color_ = color; - // @@protoc_insertion_point(field_set_allocated:Trail.color) + // @@protoc_insertion_point(field_set_allocated:waypoint.Trail.color) } -// .FestivalFilter festival_filter = 27; +// .waypoint.FestivalFilter festival_filter = 27; inline bool Trail::_internal_has_festival_filter() const { return this != internal_default_instance() && festival_filter_ != nullptr; } @@ -6985,17 +6988,17 @@ inline void Trail::clear_festival_filter() { } festival_filter_ = nullptr; } -inline const ::FestivalFilter& Trail::_internal_festival_filter() const { - const ::FestivalFilter* p = festival_filter_; - return p != nullptr ? *p : *reinterpret_cast( - &::_FestivalFilter_default_instance_); +inline const ::waypoint::FestivalFilter& Trail::_internal_festival_filter() const { + const ::waypoint::FestivalFilter* p = festival_filter_; + return p != nullptr ? *p : *reinterpret_cast( + &::waypoint::_FestivalFilter_default_instance_); } -inline const ::FestivalFilter& Trail::festival_filter() const { - // @@protoc_insertion_point(field_get:Trail.festival_filter) +inline const ::waypoint::FestivalFilter& Trail::festival_filter() const { + // @@protoc_insertion_point(field_get:waypoint.Trail.festival_filter) return _internal_festival_filter(); } inline void Trail::unsafe_arena_set_allocated_festival_filter( - ::FestivalFilter* festival_filter) { + ::waypoint::FestivalFilter* festival_filter) { if (GetArena() == nullptr) { delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(festival_filter_); } @@ -7005,35 +7008,35 @@ inline void Trail::unsafe_arena_set_allocated_festival_filter( } else { } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Trail.festival_filter) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Trail.festival_filter) } -inline ::FestivalFilter* Trail::release_festival_filter() { +inline ::waypoint::FestivalFilter* Trail::release_festival_filter() { auto temp = unsafe_arena_release_festival_filter(); if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } return temp; } -inline ::FestivalFilter* Trail::unsafe_arena_release_festival_filter() { - // @@protoc_insertion_point(field_release:Trail.festival_filter) +inline ::waypoint::FestivalFilter* Trail::unsafe_arena_release_festival_filter() { + // @@protoc_insertion_point(field_release:waypoint.Trail.festival_filter) - ::FestivalFilter* temp = festival_filter_; + ::waypoint::FestivalFilter* temp = festival_filter_; festival_filter_ = nullptr; return temp; } -inline ::FestivalFilter* Trail::_internal_mutable_festival_filter() { +inline ::waypoint::FestivalFilter* Trail::_internal_mutable_festival_filter() { if (festival_filter_ == nullptr) { - auto* p = CreateMaybeMessage<::FestivalFilter>(GetArena()); + auto* p = CreateMaybeMessage<::waypoint::FestivalFilter>(GetArena()); festival_filter_ = p; } return festival_filter_; } -inline ::FestivalFilter* Trail::mutable_festival_filter() { - // @@protoc_insertion_point(field_mutable:Trail.festival_filter) +inline ::waypoint::FestivalFilter* Trail::mutable_festival_filter() { + // @@protoc_insertion_point(field_mutable:waypoint.Trail.festival_filter) return _internal_mutable_festival_filter(); } -inline void Trail::set_allocated_festival_filter(::FestivalFilter* festival_filter) { +inline void Trail::set_allocated_festival_filter(::waypoint::FestivalFilter* festival_filter) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); if (message_arena == nullptr) { delete festival_filter_; @@ -7050,10 +7053,10 @@ inline void Trail::set_allocated_festival_filter(::FestivalFilter* festival_filt } festival_filter_ = festival_filter; - // @@protoc_insertion_point(field_set_allocated:Trail.festival_filter) + // @@protoc_insertion_point(field_set_allocated:waypoint.Trail.festival_filter) } -// .MapTypeFilter map_type_filter = 28; +// .waypoint.MapTypeFilter map_type_filter = 28; inline bool Trail::_internal_has_map_type_filter() const { return this != internal_default_instance() && map_type_filter_ != nullptr; } @@ -7066,17 +7069,17 @@ inline void Trail::clear_map_type_filter() { } map_type_filter_ = nullptr; } -inline const ::MapTypeFilter& Trail::_internal_map_type_filter() const { - const ::MapTypeFilter* p = map_type_filter_; - return p != nullptr ? *p : *reinterpret_cast( - &::_MapTypeFilter_default_instance_); +inline const ::waypoint::MapTypeFilter& Trail::_internal_map_type_filter() const { + const ::waypoint::MapTypeFilter* p = map_type_filter_; + return p != nullptr ? *p : *reinterpret_cast( + &::waypoint::_MapTypeFilter_default_instance_); } -inline const ::MapTypeFilter& Trail::map_type_filter() const { - // @@protoc_insertion_point(field_get:Trail.map_type_filter) +inline const ::waypoint::MapTypeFilter& Trail::map_type_filter() const { + // @@protoc_insertion_point(field_get:waypoint.Trail.map_type_filter) return _internal_map_type_filter(); } inline void Trail::unsafe_arena_set_allocated_map_type_filter( - ::MapTypeFilter* map_type_filter) { + ::waypoint::MapTypeFilter* map_type_filter) { if (GetArena() == nullptr) { delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(map_type_filter_); } @@ -7086,35 +7089,35 @@ inline void Trail::unsafe_arena_set_allocated_map_type_filter( } else { } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Trail.map_type_filter) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Trail.map_type_filter) } -inline ::MapTypeFilter* Trail::release_map_type_filter() { +inline ::waypoint::MapTypeFilter* Trail::release_map_type_filter() { auto temp = unsafe_arena_release_map_type_filter(); if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } return temp; } -inline ::MapTypeFilter* Trail::unsafe_arena_release_map_type_filter() { - // @@protoc_insertion_point(field_release:Trail.map_type_filter) +inline ::waypoint::MapTypeFilter* Trail::unsafe_arena_release_map_type_filter() { + // @@protoc_insertion_point(field_release:waypoint.Trail.map_type_filter) - ::MapTypeFilter* temp = map_type_filter_; + ::waypoint::MapTypeFilter* temp = map_type_filter_; map_type_filter_ = nullptr; return temp; } -inline ::MapTypeFilter* Trail::_internal_mutable_map_type_filter() { +inline ::waypoint::MapTypeFilter* Trail::_internal_mutable_map_type_filter() { if (map_type_filter_ == nullptr) { - auto* p = CreateMaybeMessage<::MapTypeFilter>(GetArena()); + auto* p = CreateMaybeMessage<::waypoint::MapTypeFilter>(GetArena()); map_type_filter_ = p; } return map_type_filter_; } -inline ::MapTypeFilter* Trail::mutable_map_type_filter() { - // @@protoc_insertion_point(field_mutable:Trail.map_type_filter) +inline ::waypoint::MapTypeFilter* Trail::mutable_map_type_filter() { + // @@protoc_insertion_point(field_mutable:waypoint.Trail.map_type_filter) return _internal_mutable_map_type_filter(); } -inline void Trail::set_allocated_map_type_filter(::MapTypeFilter* map_type_filter) { +inline void Trail::set_allocated_map_type_filter(::waypoint::MapTypeFilter* map_type_filter) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); if (message_arena == nullptr) { delete map_type_filter_; @@ -7131,10 +7134,10 @@ inline void Trail::set_allocated_map_type_filter(::MapTypeFilter* map_type_filte } map_type_filter_ = map_type_filter; - // @@protoc_insertion_point(field_set_allocated:Trail.map_type_filter) + // @@protoc_insertion_point(field_set_allocated:waypoint.Trail.map_type_filter) } -// .MountFilter mount_filter = 29; +// .waypoint.MountFilter mount_filter = 29; inline bool Trail::_internal_has_mount_filter() const { return this != internal_default_instance() && mount_filter_ != nullptr; } @@ -7147,17 +7150,17 @@ inline void Trail::clear_mount_filter() { } mount_filter_ = nullptr; } -inline const ::MountFilter& Trail::_internal_mount_filter() const { - const ::MountFilter* p = mount_filter_; - return p != nullptr ? *p : *reinterpret_cast( - &::_MountFilter_default_instance_); +inline const ::waypoint::MountFilter& Trail::_internal_mount_filter() const { + const ::waypoint::MountFilter* p = mount_filter_; + return p != nullptr ? *p : *reinterpret_cast( + &::waypoint::_MountFilter_default_instance_); } -inline const ::MountFilter& Trail::mount_filter() const { - // @@protoc_insertion_point(field_get:Trail.mount_filter) +inline const ::waypoint::MountFilter& Trail::mount_filter() const { + // @@protoc_insertion_point(field_get:waypoint.Trail.mount_filter) return _internal_mount_filter(); } inline void Trail::unsafe_arena_set_allocated_mount_filter( - ::MountFilter* mount_filter) { + ::waypoint::MountFilter* mount_filter) { if (GetArena() == nullptr) { delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(mount_filter_); } @@ -7167,35 +7170,35 @@ inline void Trail::unsafe_arena_set_allocated_mount_filter( } else { } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Trail.mount_filter) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Trail.mount_filter) } -inline ::MountFilter* Trail::release_mount_filter() { +inline ::waypoint::MountFilter* Trail::release_mount_filter() { auto temp = unsafe_arena_release_mount_filter(); if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } return temp; } -inline ::MountFilter* Trail::unsafe_arena_release_mount_filter() { - // @@protoc_insertion_point(field_release:Trail.mount_filter) +inline ::waypoint::MountFilter* Trail::unsafe_arena_release_mount_filter() { + // @@protoc_insertion_point(field_release:waypoint.Trail.mount_filter) - ::MountFilter* temp = mount_filter_; + ::waypoint::MountFilter* temp = mount_filter_; mount_filter_ = nullptr; return temp; } -inline ::MountFilter* Trail::_internal_mutable_mount_filter() { +inline ::waypoint::MountFilter* Trail::_internal_mutable_mount_filter() { if (mount_filter_ == nullptr) { - auto* p = CreateMaybeMessage<::MountFilter>(GetArena()); + auto* p = CreateMaybeMessage<::waypoint::MountFilter>(GetArena()); mount_filter_ = p; } return mount_filter_; } -inline ::MountFilter* Trail::mutable_mount_filter() { - // @@protoc_insertion_point(field_mutable:Trail.mount_filter) +inline ::waypoint::MountFilter* Trail::mutable_mount_filter() { + // @@protoc_insertion_point(field_mutable:waypoint.Trail.mount_filter) return _internal_mutable_mount_filter(); } -inline void Trail::set_allocated_mount_filter(::MountFilter* mount_filter) { +inline void Trail::set_allocated_mount_filter(::waypoint::MountFilter* mount_filter) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); if (message_arena == nullptr) { delete mount_filter_; @@ -7212,10 +7215,10 @@ inline void Trail::set_allocated_mount_filter(::MountFilter* mount_filter) { } mount_filter_ = mount_filter; - // @@protoc_insertion_point(field_set_allocated:Trail.mount_filter) + // @@protoc_insertion_point(field_set_allocated:waypoint.Trail.mount_filter) } -// .ProfessionFilter profession_filter = 30; +// .waypoint.ProfessionFilter profession_filter = 30; inline bool Trail::_internal_has_profession_filter() const { return this != internal_default_instance() && profession_filter_ != nullptr; } @@ -7228,17 +7231,17 @@ inline void Trail::clear_profession_filter() { } profession_filter_ = nullptr; } -inline const ::ProfessionFilter& Trail::_internal_profession_filter() const { - const ::ProfessionFilter* p = profession_filter_; - return p != nullptr ? *p : *reinterpret_cast( - &::_ProfessionFilter_default_instance_); +inline const ::waypoint::ProfessionFilter& Trail::_internal_profession_filter() const { + const ::waypoint::ProfessionFilter* p = profession_filter_; + return p != nullptr ? *p : *reinterpret_cast( + &::waypoint::_ProfessionFilter_default_instance_); } -inline const ::ProfessionFilter& Trail::profession_filter() const { - // @@protoc_insertion_point(field_get:Trail.profession_filter) +inline const ::waypoint::ProfessionFilter& Trail::profession_filter() const { + // @@protoc_insertion_point(field_get:waypoint.Trail.profession_filter) return _internal_profession_filter(); } inline void Trail::unsafe_arena_set_allocated_profession_filter( - ::ProfessionFilter* profession_filter) { + ::waypoint::ProfessionFilter* profession_filter) { if (GetArena() == nullptr) { delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(profession_filter_); } @@ -7248,35 +7251,35 @@ inline void Trail::unsafe_arena_set_allocated_profession_filter( } else { } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Trail.profession_filter) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Trail.profession_filter) } -inline ::ProfessionFilter* Trail::release_profession_filter() { +inline ::waypoint::ProfessionFilter* Trail::release_profession_filter() { auto temp = unsafe_arena_release_profession_filter(); if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } return temp; } -inline ::ProfessionFilter* Trail::unsafe_arena_release_profession_filter() { - // @@protoc_insertion_point(field_release:Trail.profession_filter) +inline ::waypoint::ProfessionFilter* Trail::unsafe_arena_release_profession_filter() { + // @@protoc_insertion_point(field_release:waypoint.Trail.profession_filter) - ::ProfessionFilter* temp = profession_filter_; + ::waypoint::ProfessionFilter* temp = profession_filter_; profession_filter_ = nullptr; return temp; } -inline ::ProfessionFilter* Trail::_internal_mutable_profession_filter() { +inline ::waypoint::ProfessionFilter* Trail::_internal_mutable_profession_filter() { if (profession_filter_ == nullptr) { - auto* p = CreateMaybeMessage<::ProfessionFilter>(GetArena()); + auto* p = CreateMaybeMessage<::waypoint::ProfessionFilter>(GetArena()); profession_filter_ = p; } return profession_filter_; } -inline ::ProfessionFilter* Trail::mutable_profession_filter() { - // @@protoc_insertion_point(field_mutable:Trail.profession_filter) +inline ::waypoint::ProfessionFilter* Trail::mutable_profession_filter() { + // @@protoc_insertion_point(field_mutable:waypoint.Trail.profession_filter) return _internal_mutable_profession_filter(); } -inline void Trail::set_allocated_profession_filter(::ProfessionFilter* profession_filter) { +inline void Trail::set_allocated_profession_filter(::waypoint::ProfessionFilter* profession_filter) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); if (message_arena == nullptr) { delete profession_filter_; @@ -7293,10 +7296,10 @@ inline void Trail::set_allocated_profession_filter(::ProfessionFilter* professio } profession_filter_ = profession_filter; - // @@protoc_insertion_point(field_set_allocated:Trail.profession_filter) + // @@protoc_insertion_point(field_set_allocated:waypoint.Trail.profession_filter) } -// .SpecializationFilter specialization_filter = 31; +// .waypoint.SpecializationFilter specialization_filter = 31; inline bool Trail::_internal_has_specialization_filter() const { return this != internal_default_instance() && specialization_filter_ != nullptr; } @@ -7309,17 +7312,17 @@ inline void Trail::clear_specialization_filter() { } specialization_filter_ = nullptr; } -inline const ::SpecializationFilter& Trail::_internal_specialization_filter() const { - const ::SpecializationFilter* p = specialization_filter_; - return p != nullptr ? *p : *reinterpret_cast( - &::_SpecializationFilter_default_instance_); +inline const ::waypoint::SpecializationFilter& Trail::_internal_specialization_filter() const { + const ::waypoint::SpecializationFilter* p = specialization_filter_; + return p != nullptr ? *p : *reinterpret_cast( + &::waypoint::_SpecializationFilter_default_instance_); } -inline const ::SpecializationFilter& Trail::specialization_filter() const { - // @@protoc_insertion_point(field_get:Trail.specialization_filter) +inline const ::waypoint::SpecializationFilter& Trail::specialization_filter() const { + // @@protoc_insertion_point(field_get:waypoint.Trail.specialization_filter) return _internal_specialization_filter(); } inline void Trail::unsafe_arena_set_allocated_specialization_filter( - ::SpecializationFilter* specialization_filter) { + ::waypoint::SpecializationFilter* specialization_filter) { if (GetArena() == nullptr) { delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(specialization_filter_); } @@ -7329,35 +7332,35 @@ inline void Trail::unsafe_arena_set_allocated_specialization_filter( } else { } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Trail.specialization_filter) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Trail.specialization_filter) } -inline ::SpecializationFilter* Trail::release_specialization_filter() { +inline ::waypoint::SpecializationFilter* Trail::release_specialization_filter() { auto temp = unsafe_arena_release_specialization_filter(); if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } return temp; } -inline ::SpecializationFilter* Trail::unsafe_arena_release_specialization_filter() { - // @@protoc_insertion_point(field_release:Trail.specialization_filter) +inline ::waypoint::SpecializationFilter* Trail::unsafe_arena_release_specialization_filter() { + // @@protoc_insertion_point(field_release:waypoint.Trail.specialization_filter) - ::SpecializationFilter* temp = specialization_filter_; + ::waypoint::SpecializationFilter* temp = specialization_filter_; specialization_filter_ = nullptr; return temp; } -inline ::SpecializationFilter* Trail::_internal_mutable_specialization_filter() { +inline ::waypoint::SpecializationFilter* Trail::_internal_mutable_specialization_filter() { if (specialization_filter_ == nullptr) { - auto* p = CreateMaybeMessage<::SpecializationFilter>(GetArena()); + auto* p = CreateMaybeMessage<::waypoint::SpecializationFilter>(GetArena()); specialization_filter_ = p; } return specialization_filter_; } -inline ::SpecializationFilter* Trail::mutable_specialization_filter() { - // @@protoc_insertion_point(field_mutable:Trail.specialization_filter) +inline ::waypoint::SpecializationFilter* Trail::mutable_specialization_filter() { + // @@protoc_insertion_point(field_mutable:waypoint.Trail.specialization_filter) return _internal_mutable_specialization_filter(); } -inline void Trail::set_allocated_specialization_filter(::SpecializationFilter* specialization_filter) { +inline void Trail::set_allocated_specialization_filter(::waypoint::SpecializationFilter* specialization_filter) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); if (message_arena == nullptr) { delete specialization_filter_; @@ -7374,10 +7377,10 @@ inline void Trail::set_allocated_specialization_filter(::SpecializationFilter* s } specialization_filter_ = specialization_filter; - // @@protoc_insertion_point(field_set_allocated:Trail.specialization_filter) + // @@protoc_insertion_point(field_set_allocated:waypoint.Trail.specialization_filter) } -// .SpeciesFilter species_filter = 32; +// .waypoint.SpeciesFilter species_filter = 32; inline bool Trail::_internal_has_species_filter() const { return this != internal_default_instance() && species_filter_ != nullptr; } @@ -7390,17 +7393,17 @@ inline void Trail::clear_species_filter() { } species_filter_ = nullptr; } -inline const ::SpeciesFilter& Trail::_internal_species_filter() const { - const ::SpeciesFilter* p = species_filter_; - return p != nullptr ? *p : *reinterpret_cast( - &::_SpeciesFilter_default_instance_); +inline const ::waypoint::SpeciesFilter& Trail::_internal_species_filter() const { + const ::waypoint::SpeciesFilter* p = species_filter_; + return p != nullptr ? *p : *reinterpret_cast( + &::waypoint::_SpeciesFilter_default_instance_); } -inline const ::SpeciesFilter& Trail::species_filter() const { - // @@protoc_insertion_point(field_get:Trail.species_filter) +inline const ::waypoint::SpeciesFilter& Trail::species_filter() const { + // @@protoc_insertion_point(field_get:waypoint.Trail.species_filter) return _internal_species_filter(); } inline void Trail::unsafe_arena_set_allocated_species_filter( - ::SpeciesFilter* species_filter) { + ::waypoint::SpeciesFilter* species_filter) { if (GetArena() == nullptr) { delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(species_filter_); } @@ -7410,35 +7413,35 @@ inline void Trail::unsafe_arena_set_allocated_species_filter( } else { } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Trail.species_filter) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Trail.species_filter) } -inline ::SpeciesFilter* Trail::release_species_filter() { +inline ::waypoint::SpeciesFilter* Trail::release_species_filter() { auto temp = unsafe_arena_release_species_filter(); if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } return temp; } -inline ::SpeciesFilter* Trail::unsafe_arena_release_species_filter() { - // @@protoc_insertion_point(field_release:Trail.species_filter) +inline ::waypoint::SpeciesFilter* Trail::unsafe_arena_release_species_filter() { + // @@protoc_insertion_point(field_release:waypoint.Trail.species_filter) - ::SpeciesFilter* temp = species_filter_; + ::waypoint::SpeciesFilter* temp = species_filter_; species_filter_ = nullptr; return temp; } -inline ::SpeciesFilter* Trail::_internal_mutable_species_filter() { +inline ::waypoint::SpeciesFilter* Trail::_internal_mutable_species_filter() { if (species_filter_ == nullptr) { - auto* p = CreateMaybeMessage<::SpeciesFilter>(GetArena()); + auto* p = CreateMaybeMessage<::waypoint::SpeciesFilter>(GetArena()); species_filter_ = p; } return species_filter_; } -inline ::SpeciesFilter* Trail::mutable_species_filter() { - // @@protoc_insertion_point(field_mutable:Trail.species_filter) +inline ::waypoint::SpeciesFilter* Trail::mutable_species_filter() { + // @@protoc_insertion_point(field_mutable:waypoint.Trail.species_filter) return _internal_mutable_species_filter(); } -inline void Trail::set_allocated_species_filter(::SpeciesFilter* species_filter) { +inline void Trail::set_allocated_species_filter(::waypoint::SpeciesFilter* species_filter) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); if (message_arena == nullptr) { delete species_filter_; @@ -7455,7 +7458,7 @@ inline void Trail::set_allocated_species_filter(::SpeciesFilter* species_filter) } species_filter_ = species_filter; - // @@protoc_insertion_point(field_set_allocated:Trail.species_filter) + // @@protoc_insertion_point(field_set_allocated:waypoint.Trail.species_filter) } // ------------------------------------------------------------------- @@ -7467,15 +7470,15 @@ inline void Texture::clear_path() { path_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline const std::string& Texture::path() const { - // @@protoc_insertion_point(field_get:Texture.path) + // @@protoc_insertion_point(field_get:waypoint.Texture.path) return _internal_path(); } inline void Texture::set_path(const std::string& value) { _internal_set_path(value); - // @@protoc_insertion_point(field_set:Texture.path) + // @@protoc_insertion_point(field_set:waypoint.Texture.path) } inline std::string* Texture::mutable_path() { - // @@protoc_insertion_point(field_mutable:Texture.path) + // @@protoc_insertion_point(field_mutable:waypoint.Texture.path) return _internal_mutable_path(); } inline const std::string& Texture::_internal_path() const { @@ -7489,28 +7492,28 @@ inline void Texture::set_path(std::string&& value) { path_.Set( &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:Texture.path) + // @@protoc_insertion_point(field_set_rvalue:waypoint.Texture.path) } inline void Texture::set_path(const char* value) { GOOGLE_DCHECK(value != nullptr); path_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:Texture.path) + // @@protoc_insertion_point(field_set_char:waypoint.Texture.path) } inline void Texture::set_path(const char* value, size_t size) { path_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:Texture.path) + // @@protoc_insertion_point(field_set_pointer:waypoint.Texture.path) } inline std::string* Texture::_internal_mutable_path() { return path_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* Texture::release_path() { - // @@protoc_insertion_point(field_release:Texture.path) + // @@protoc_insertion_point(field_release:waypoint.Texture.path) return path_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void Texture::set_allocated_path(std::string* path) { @@ -7521,10 +7524,10 @@ inline void Texture::set_allocated_path(std::string* path) { } path_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), path, GetArena()); - // @@protoc_insertion_point(field_set_allocated:Texture.path) + // @@protoc_insertion_point(field_set_allocated:waypoint.Texture.path) } inline std::string* Texture::unsafe_arena_release_path() { - // @@protoc_insertion_point(field_unsafe_arena_release:Texture.path) + // @@protoc_insertion_point(field_unsafe_arena_release:waypoint.Texture.path) GOOGLE_DCHECK(GetArena() != nullptr); return path_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), @@ -7540,7 +7543,7 @@ inline void Texture::unsafe_arena_set_allocated_path( } path_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), path, GetArena()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Texture.path) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Texture.path) } // ------------------------------------------------------------------- @@ -7555,7 +7558,7 @@ inline float Position::_internal_x() const { return x_; } inline float Position::x() const { - // @@protoc_insertion_point(field_get:Position.x) + // @@protoc_insertion_point(field_get:waypoint.Position.x) return _internal_x(); } inline void Position::_internal_set_x(float value) { @@ -7564,7 +7567,7 @@ inline void Position::_internal_set_x(float value) { } inline void Position::set_x(float value) { _internal_set_x(value); - // @@protoc_insertion_point(field_set:Position.x) + // @@protoc_insertion_point(field_set:waypoint.Position.x) } // float y = 2; @@ -7575,7 +7578,7 @@ inline float Position::_internal_y() const { return y_; } inline float Position::y() const { - // @@protoc_insertion_point(field_get:Position.y) + // @@protoc_insertion_point(field_get:waypoint.Position.y) return _internal_y(); } inline void Position::_internal_set_y(float value) { @@ -7584,7 +7587,7 @@ inline void Position::_internal_set_y(float value) { } inline void Position::set_y(float value) { _internal_set_y(value); - // @@protoc_insertion_point(field_set:Position.y) + // @@protoc_insertion_point(field_set:waypoint.Position.y) } // float z = 3; @@ -7595,7 +7598,7 @@ inline float Position::_internal_z() const { return z_; } inline float Position::z() const { - // @@protoc_insertion_point(field_get:Position.z) + // @@protoc_insertion_point(field_get:waypoint.Position.z) return _internal_z(); } inline void Position::_internal_set_z(float value) { @@ -7604,7 +7607,7 @@ inline void Position::_internal_set_z(float value) { } inline void Position::set_z(float value) { _internal_set_z(value); - // @@protoc_insertion_point(field_set:Position.z) + // @@protoc_insertion_point(field_set:waypoint.Position.z) } // ------------------------------------------------------------------- @@ -7619,7 +7622,7 @@ inline float EulerRotation::_internal_x() const { return x_; } inline float EulerRotation::x() const { - // @@protoc_insertion_point(field_get:EulerRotation.x) + // @@protoc_insertion_point(field_get:waypoint.EulerRotation.x) return _internal_x(); } inline void EulerRotation::_internal_set_x(float value) { @@ -7628,7 +7631,7 @@ inline void EulerRotation::_internal_set_x(float value) { } inline void EulerRotation::set_x(float value) { _internal_set_x(value); - // @@protoc_insertion_point(field_set:EulerRotation.x) + // @@protoc_insertion_point(field_set:waypoint.EulerRotation.x) } // float y = 2; @@ -7639,7 +7642,7 @@ inline float EulerRotation::_internal_y() const { return y_; } inline float EulerRotation::y() const { - // @@protoc_insertion_point(field_get:EulerRotation.y) + // @@protoc_insertion_point(field_get:waypoint.EulerRotation.y) return _internal_y(); } inline void EulerRotation::_internal_set_y(float value) { @@ -7648,7 +7651,7 @@ inline void EulerRotation::_internal_set_y(float value) { } inline void EulerRotation::set_y(float value) { _internal_set_y(value); - // @@protoc_insertion_point(field_set:EulerRotation.y) + // @@protoc_insertion_point(field_set:waypoint.EulerRotation.y) } // float z = 3; @@ -7659,7 +7662,7 @@ inline float EulerRotation::_internal_z() const { return z_; } inline float EulerRotation::z() const { - // @@protoc_insertion_point(field_get:EulerRotation.z) + // @@protoc_insertion_point(field_get:waypoint.EulerRotation.z) return _internal_z(); } inline void EulerRotation::_internal_set_z(float value) { @@ -7668,7 +7671,7 @@ inline void EulerRotation::_internal_set_z(float value) { } inline void EulerRotation::set_z(float value) { _internal_set_z(value); - // @@protoc_insertion_point(field_set:EulerRotation.z) + // @@protoc_insertion_point(field_set:waypoint.EulerRotation.z) } // ------------------------------------------------------------------- @@ -7683,7 +7686,7 @@ inline bool Trigger::_internal_auto_trigger() const { return auto_trigger_; } inline bool Trigger::auto_trigger() const { - // @@protoc_insertion_point(field_get:Trigger.auto_trigger) + // @@protoc_insertion_point(field_get:waypoint.Trigger.auto_trigger) return _internal_auto_trigger(); } inline void Trigger::_internal_set_auto_trigger(bool value) { @@ -7692,7 +7695,7 @@ inline void Trigger::_internal_set_auto_trigger(bool value) { } inline void Trigger::set_auto_trigger(bool value) { _internal_set_auto_trigger(value); - // @@protoc_insertion_point(field_set:Trigger.auto_trigger) + // @@protoc_insertion_point(field_set:waypoint.Trigger.auto_trigger) } // float bounce_delay = 2; @@ -7703,7 +7706,7 @@ inline float Trigger::_internal_bounce_delay() const { return bounce_delay_; } inline float Trigger::bounce_delay() const { - // @@protoc_insertion_point(field_get:Trigger.bounce_delay) + // @@protoc_insertion_point(field_get:waypoint.Trigger.bounce_delay) return _internal_bounce_delay(); } inline void Trigger::_internal_set_bounce_delay(float value) { @@ -7712,7 +7715,7 @@ inline void Trigger::_internal_set_bounce_delay(float value) { } inline void Trigger::set_bounce_delay(float value) { _internal_set_bounce_delay(value); - // @@protoc_insertion_point(field_set:Trigger.bounce_delay) + // @@protoc_insertion_point(field_set:waypoint.Trigger.bounce_delay) } // float bounce_duration = 3; @@ -7723,7 +7726,7 @@ inline float Trigger::_internal_bounce_duration() const { return bounce_duration_; } inline float Trigger::bounce_duration() const { - // @@protoc_insertion_point(field_get:Trigger.bounce_duration) + // @@protoc_insertion_point(field_get:waypoint.Trigger.bounce_duration) return _internal_bounce_duration(); } inline void Trigger::_internal_set_bounce_duration(float value) { @@ -7732,7 +7735,7 @@ inline void Trigger::_internal_set_bounce_duration(float value) { } inline void Trigger::set_bounce_duration(float value) { _internal_set_bounce_duration(value); - // @@protoc_insertion_point(field_set:Trigger.bounce_duration) + // @@protoc_insertion_point(field_set:waypoint.Trigger.bounce_duration) } // float bounce_height = 4; @@ -7743,7 +7746,7 @@ inline float Trigger::_internal_bounce_height() const { return bounce_height_; } inline float Trigger::bounce_height() const { - // @@protoc_insertion_point(field_get:Trigger.bounce_height) + // @@protoc_insertion_point(field_get:waypoint.Trigger.bounce_height) return _internal_bounce_height(); } inline void Trigger::_internal_set_bounce_height(float value) { @@ -7752,7 +7755,7 @@ inline void Trigger::_internal_set_bounce_height(float value) { } inline void Trigger::set_bounce_height(float value) { _internal_set_bounce_height(value); - // @@protoc_insertion_point(field_set:Trigger.bounce_height) + // @@protoc_insertion_point(field_set:waypoint.Trigger.bounce_height) } // string action_copy_clipboard = 5; @@ -7760,15 +7763,15 @@ inline void Trigger::clear_action_copy_clipboard() { action_copy_clipboard_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline const std::string& Trigger::action_copy_clipboard() const { - // @@protoc_insertion_point(field_get:Trigger.action_copy_clipboard) + // @@protoc_insertion_point(field_get:waypoint.Trigger.action_copy_clipboard) return _internal_action_copy_clipboard(); } inline void Trigger::set_action_copy_clipboard(const std::string& value) { _internal_set_action_copy_clipboard(value); - // @@protoc_insertion_point(field_set:Trigger.action_copy_clipboard) + // @@protoc_insertion_point(field_set:waypoint.Trigger.action_copy_clipboard) } inline std::string* Trigger::mutable_action_copy_clipboard() { - // @@protoc_insertion_point(field_mutable:Trigger.action_copy_clipboard) + // @@protoc_insertion_point(field_mutable:waypoint.Trigger.action_copy_clipboard) return _internal_mutable_action_copy_clipboard(); } inline const std::string& Trigger::_internal_action_copy_clipboard() const { @@ -7782,28 +7785,28 @@ inline void Trigger::set_action_copy_clipboard(std::string&& value) { action_copy_clipboard_.Set( &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:Trigger.action_copy_clipboard) + // @@protoc_insertion_point(field_set_rvalue:waypoint.Trigger.action_copy_clipboard) } inline void Trigger::set_action_copy_clipboard(const char* value) { GOOGLE_DCHECK(value != nullptr); action_copy_clipboard_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:Trigger.action_copy_clipboard) + // @@protoc_insertion_point(field_set_char:waypoint.Trigger.action_copy_clipboard) } inline void Trigger::set_action_copy_clipboard(const char* value, size_t size) { action_copy_clipboard_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:Trigger.action_copy_clipboard) + // @@protoc_insertion_point(field_set_pointer:waypoint.Trigger.action_copy_clipboard) } inline std::string* Trigger::_internal_mutable_action_copy_clipboard() { return action_copy_clipboard_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* Trigger::release_action_copy_clipboard() { - // @@protoc_insertion_point(field_release:Trigger.action_copy_clipboard) + // @@protoc_insertion_point(field_release:waypoint.Trigger.action_copy_clipboard) return action_copy_clipboard_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void Trigger::set_allocated_action_copy_clipboard(std::string* action_copy_clipboard) { @@ -7814,10 +7817,10 @@ inline void Trigger::set_allocated_action_copy_clipboard(std::string* action_cop } action_copy_clipboard_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), action_copy_clipboard, GetArena()); - // @@protoc_insertion_point(field_set_allocated:Trigger.action_copy_clipboard) + // @@protoc_insertion_point(field_set_allocated:waypoint.Trigger.action_copy_clipboard) } inline std::string* Trigger::unsafe_arena_release_action_copy_clipboard() { - // @@protoc_insertion_point(field_unsafe_arena_release:Trigger.action_copy_clipboard) + // @@protoc_insertion_point(field_unsafe_arena_release:waypoint.Trigger.action_copy_clipboard) GOOGLE_DCHECK(GetArena() != nullptr); return action_copy_clipboard_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), @@ -7833,7 +7836,7 @@ inline void Trigger::unsafe_arena_set_allocated_action_copy_clipboard( } action_copy_clipboard_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), action_copy_clipboard, GetArena()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Trigger.action_copy_clipboard) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Trigger.action_copy_clipboard) } // string action_copy_message = 6; @@ -7841,15 +7844,15 @@ inline void Trigger::clear_action_copy_message() { action_copy_message_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline const std::string& Trigger::action_copy_message() const { - // @@protoc_insertion_point(field_get:Trigger.action_copy_message) + // @@protoc_insertion_point(field_get:waypoint.Trigger.action_copy_message) return _internal_action_copy_message(); } inline void Trigger::set_action_copy_message(const std::string& value) { _internal_set_action_copy_message(value); - // @@protoc_insertion_point(field_set:Trigger.action_copy_message) + // @@protoc_insertion_point(field_set:waypoint.Trigger.action_copy_message) } inline std::string* Trigger::mutable_action_copy_message() { - // @@protoc_insertion_point(field_mutable:Trigger.action_copy_message) + // @@protoc_insertion_point(field_mutable:waypoint.Trigger.action_copy_message) return _internal_mutable_action_copy_message(); } inline const std::string& Trigger::_internal_action_copy_message() const { @@ -7863,28 +7866,28 @@ inline void Trigger::set_action_copy_message(std::string&& value) { action_copy_message_.Set( &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:Trigger.action_copy_message) + // @@protoc_insertion_point(field_set_rvalue:waypoint.Trigger.action_copy_message) } inline void Trigger::set_action_copy_message(const char* value) { GOOGLE_DCHECK(value != nullptr); action_copy_message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:Trigger.action_copy_message) + // @@protoc_insertion_point(field_set_char:waypoint.Trigger.action_copy_message) } inline void Trigger::set_action_copy_message(const char* value, size_t size) { action_copy_message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:Trigger.action_copy_message) + // @@protoc_insertion_point(field_set_pointer:waypoint.Trigger.action_copy_message) } inline std::string* Trigger::_internal_mutable_action_copy_message() { return action_copy_message_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* Trigger::release_action_copy_message() { - // @@protoc_insertion_point(field_release:Trigger.action_copy_message) + // @@protoc_insertion_point(field_release:waypoint.Trigger.action_copy_message) return action_copy_message_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void Trigger::set_allocated_action_copy_message(std::string* action_copy_message) { @@ -7895,10 +7898,10 @@ inline void Trigger::set_allocated_action_copy_message(std::string* action_copy_ } action_copy_message_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), action_copy_message, GetArena()); - // @@protoc_insertion_point(field_set_allocated:Trigger.action_copy_message) + // @@protoc_insertion_point(field_set_allocated:waypoint.Trigger.action_copy_message) } inline std::string* Trigger::unsafe_arena_release_action_copy_message() { - // @@protoc_insertion_point(field_unsafe_arena_release:Trigger.action_copy_message) + // @@protoc_insertion_point(field_unsafe_arena_release:waypoint.Trigger.action_copy_message) GOOGLE_DCHECK(GetArena() != nullptr); return action_copy_message_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), @@ -7914,7 +7917,7 @@ inline void Trigger::unsafe_arena_set_allocated_action_copy_message( } action_copy_message_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), action_copy_message, GetArena()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Trigger.action_copy_message) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Trigger.action_copy_message) } // bool has_countdown = 7; @@ -7925,7 +7928,7 @@ inline bool Trigger::_internal_has_countdown() const { return has_countdown_; } inline bool Trigger::has_countdown() const { - // @@protoc_insertion_point(field_get:Trigger.has_countdown) + // @@protoc_insertion_point(field_get:waypoint.Trigger.has_countdown) return _internal_has_countdown(); } inline void Trigger::_internal_set_has_countdown(bool value) { @@ -7934,7 +7937,7 @@ inline void Trigger::_internal_set_has_countdown(bool value) { } inline void Trigger::set_has_countdown(bool value) { _internal_set_has_countdown(value); - // @@protoc_insertion_point(field_set:Trigger.has_countdown) + // @@protoc_insertion_point(field_set:waypoint.Trigger.has_countdown) } // string action_info_message = 8; @@ -7942,15 +7945,15 @@ inline void Trigger::clear_action_info_message() { action_info_message_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline const std::string& Trigger::action_info_message() const { - // @@protoc_insertion_point(field_get:Trigger.action_info_message) + // @@protoc_insertion_point(field_get:waypoint.Trigger.action_info_message) return _internal_action_info_message(); } inline void Trigger::set_action_info_message(const std::string& value) { _internal_set_action_info_message(value); - // @@protoc_insertion_point(field_set:Trigger.action_info_message) + // @@protoc_insertion_point(field_set:waypoint.Trigger.action_info_message) } inline std::string* Trigger::mutable_action_info_message() { - // @@protoc_insertion_point(field_mutable:Trigger.action_info_message) + // @@protoc_insertion_point(field_mutable:waypoint.Trigger.action_info_message) return _internal_mutable_action_info_message(); } inline const std::string& Trigger::_internal_action_info_message() const { @@ -7964,28 +7967,28 @@ inline void Trigger::set_action_info_message(std::string&& value) { action_info_message_.Set( &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:Trigger.action_info_message) + // @@protoc_insertion_point(field_set_rvalue:waypoint.Trigger.action_info_message) } inline void Trigger::set_action_info_message(const char* value) { GOOGLE_DCHECK(value != nullptr); action_info_message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:Trigger.action_info_message) + // @@protoc_insertion_point(field_set_char:waypoint.Trigger.action_info_message) } inline void Trigger::set_action_info_message(const char* value, size_t size) { action_info_message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:Trigger.action_info_message) + // @@protoc_insertion_point(field_set_pointer:waypoint.Trigger.action_info_message) } inline std::string* Trigger::_internal_mutable_action_info_message() { return action_info_message_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* Trigger::release_action_info_message() { - // @@protoc_insertion_point(field_release:Trigger.action_info_message) + // @@protoc_insertion_point(field_release:waypoint.Trigger.action_info_message) return action_info_message_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void Trigger::set_allocated_action_info_message(std::string* action_info_message) { @@ -7996,10 +7999,10 @@ inline void Trigger::set_allocated_action_info_message(std::string* action_info_ } action_info_message_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), action_info_message, GetArena()); - // @@protoc_insertion_point(field_set_allocated:Trigger.action_info_message) + // @@protoc_insertion_point(field_set_allocated:waypoint.Trigger.action_info_message) } inline std::string* Trigger::unsafe_arena_release_action_info_message() { - // @@protoc_insertion_point(field_unsafe_arena_release:Trigger.action_info_message) + // @@protoc_insertion_point(field_unsafe_arena_release:waypoint.Trigger.action_info_message) GOOGLE_DCHECK(GetArena() != nullptr); return action_info_message_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), @@ -8015,7 +8018,7 @@ inline void Trigger::unsafe_arena_set_allocated_action_info_message( } action_info_message_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), action_info_message, GetArena()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Trigger.action_info_message) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Trigger.action_info_message) } // bool invert_display = 9; @@ -8026,7 +8029,7 @@ inline bool Trigger::_internal_invert_display() const { return invert_display_; } inline bool Trigger::invert_display() const { - // @@protoc_insertion_point(field_get:Trigger.invert_display) + // @@protoc_insertion_point(field_get:waypoint.Trigger.invert_display) return _internal_invert_display(); } inline void Trigger::_internal_set_invert_display(bool value) { @@ -8035,7 +8038,7 @@ inline void Trigger::_internal_set_invert_display(bool value) { } inline void Trigger::set_invert_display(bool value) { _internal_set_invert_display(value); - // @@protoc_insertion_point(field_set:Trigger.invert_display) + // @@protoc_insertion_point(field_set:waypoint.Trigger.invert_display) } // float reset_length = 10; @@ -8046,7 +8049,7 @@ inline float Trigger::_internal_reset_length() const { return reset_length_; } inline float Trigger::reset_length() const { - // @@protoc_insertion_point(field_get:Trigger.reset_length) + // @@protoc_insertion_point(field_get:waypoint.Trigger.reset_length) return _internal_reset_length(); } inline void Trigger::_internal_set_reset_length(float value) { @@ -8055,7 +8058,7 @@ inline void Trigger::_internal_set_reset_length(float value) { } inline void Trigger::set_reset_length(float value) { _internal_set_reset_length(value); - // @@protoc_insertion_point(field_set:Trigger.reset_length) + // @@protoc_insertion_point(field_set:waypoint.Trigger.reset_length) } // float range = 11; @@ -8066,7 +8069,7 @@ inline float Trigger::_internal_range() const { return range_; } inline float Trigger::range() const { - // @@protoc_insertion_point(field_get:Trigger.range) + // @@protoc_insertion_point(field_get:waypoint.Trigger.range) return _internal_range(); } inline void Trigger::_internal_set_range(float value) { @@ -8075,10 +8078,10 @@ inline void Trigger::_internal_set_range(float value) { } inline void Trigger::set_range(float value) { _internal_set_range(value); - // @@protoc_insertion_point(field_set:Trigger.range) + // @@protoc_insertion_point(field_set:waypoint.Trigger.range) } -// .Category action_hide_category = 12; +// .waypoint.Category action_hide_category = 12; inline bool Trigger::_internal_has_action_hide_category() const { return this != internal_default_instance() && action_hide_category_ != nullptr; } @@ -8091,17 +8094,17 @@ inline void Trigger::clear_action_hide_category() { } action_hide_category_ = nullptr; } -inline const ::Category& Trigger::_internal_action_hide_category() const { - const ::Category* p = action_hide_category_; - return p != nullptr ? *p : *reinterpret_cast( - &::_Category_default_instance_); +inline const ::waypoint::Category& Trigger::_internal_action_hide_category() const { + const ::waypoint::Category* p = action_hide_category_; + return p != nullptr ? *p : *reinterpret_cast( + &::waypoint::_Category_default_instance_); } -inline const ::Category& Trigger::action_hide_category() const { - // @@protoc_insertion_point(field_get:Trigger.action_hide_category) +inline const ::waypoint::Category& Trigger::action_hide_category() const { + // @@protoc_insertion_point(field_get:waypoint.Trigger.action_hide_category) return _internal_action_hide_category(); } inline void Trigger::unsafe_arena_set_allocated_action_hide_category( - ::Category* action_hide_category) { + ::waypoint::Category* action_hide_category) { if (GetArena() == nullptr) { delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(action_hide_category_); } @@ -8111,35 +8114,35 @@ inline void Trigger::unsafe_arena_set_allocated_action_hide_category( } else { } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Trigger.action_hide_category) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Trigger.action_hide_category) } -inline ::Category* Trigger::release_action_hide_category() { +inline ::waypoint::Category* Trigger::release_action_hide_category() { auto temp = unsafe_arena_release_action_hide_category(); if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } return temp; } -inline ::Category* Trigger::unsafe_arena_release_action_hide_category() { - // @@protoc_insertion_point(field_release:Trigger.action_hide_category) +inline ::waypoint::Category* Trigger::unsafe_arena_release_action_hide_category() { + // @@protoc_insertion_point(field_release:waypoint.Trigger.action_hide_category) - ::Category* temp = action_hide_category_; + ::waypoint::Category* temp = action_hide_category_; action_hide_category_ = nullptr; return temp; } -inline ::Category* Trigger::_internal_mutable_action_hide_category() { +inline ::waypoint::Category* Trigger::_internal_mutable_action_hide_category() { if (action_hide_category_ == nullptr) { - auto* p = CreateMaybeMessage<::Category>(GetArena()); + auto* p = CreateMaybeMessage<::waypoint::Category>(GetArena()); action_hide_category_ = p; } return action_hide_category_; } -inline ::Category* Trigger::mutable_action_hide_category() { - // @@protoc_insertion_point(field_mutable:Trigger.action_hide_category) +inline ::waypoint::Category* Trigger::mutable_action_hide_category() { + // @@protoc_insertion_point(field_mutable:waypoint.Trigger.action_hide_category) return _internal_mutable_action_hide_category(); } -inline void Trigger::set_allocated_action_hide_category(::Category* action_hide_category) { +inline void Trigger::set_allocated_action_hide_category(::waypoint::Category* action_hide_category) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); if (message_arena == nullptr) { delete action_hide_category_; @@ -8156,10 +8159,10 @@ inline void Trigger::set_allocated_action_hide_category(::Category* action_hide_ } action_hide_category_ = action_hide_category; - // @@protoc_insertion_point(field_set_allocated:Trigger.action_hide_category) + // @@protoc_insertion_point(field_set_allocated:waypoint.Trigger.action_hide_category) } -// .Category action_show_category = 13; +// .waypoint.Category action_show_category = 13; inline bool Trigger::_internal_has_action_show_category() const { return this != internal_default_instance() && action_show_category_ != nullptr; } @@ -8172,17 +8175,17 @@ inline void Trigger::clear_action_show_category() { } action_show_category_ = nullptr; } -inline const ::Category& Trigger::_internal_action_show_category() const { - const ::Category* p = action_show_category_; - return p != nullptr ? *p : *reinterpret_cast( - &::_Category_default_instance_); +inline const ::waypoint::Category& Trigger::_internal_action_show_category() const { + const ::waypoint::Category* p = action_show_category_; + return p != nullptr ? *p : *reinterpret_cast( + &::waypoint::_Category_default_instance_); } -inline const ::Category& Trigger::action_show_category() const { - // @@protoc_insertion_point(field_get:Trigger.action_show_category) +inline const ::waypoint::Category& Trigger::action_show_category() const { + // @@protoc_insertion_point(field_get:waypoint.Trigger.action_show_category) return _internal_action_show_category(); } inline void Trigger::unsafe_arena_set_allocated_action_show_category( - ::Category* action_show_category) { + ::waypoint::Category* action_show_category) { if (GetArena() == nullptr) { delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(action_show_category_); } @@ -8192,35 +8195,35 @@ inline void Trigger::unsafe_arena_set_allocated_action_show_category( } else { } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Trigger.action_show_category) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Trigger.action_show_category) } -inline ::Category* Trigger::release_action_show_category() { +inline ::waypoint::Category* Trigger::release_action_show_category() { auto temp = unsafe_arena_release_action_show_category(); if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } return temp; } -inline ::Category* Trigger::unsafe_arena_release_action_show_category() { - // @@protoc_insertion_point(field_release:Trigger.action_show_category) +inline ::waypoint::Category* Trigger::unsafe_arena_release_action_show_category() { + // @@protoc_insertion_point(field_release:waypoint.Trigger.action_show_category) - ::Category* temp = action_show_category_; + ::waypoint::Category* temp = action_show_category_; action_show_category_ = nullptr; return temp; } -inline ::Category* Trigger::_internal_mutable_action_show_category() { +inline ::waypoint::Category* Trigger::_internal_mutable_action_show_category() { if (action_show_category_ == nullptr) { - auto* p = CreateMaybeMessage<::Category>(GetArena()); + auto* p = CreateMaybeMessage<::waypoint::Category>(GetArena()); action_show_category_ = p; } return action_show_category_; } -inline ::Category* Trigger::mutable_action_show_category() { - // @@protoc_insertion_point(field_mutable:Trigger.action_show_category) +inline ::waypoint::Category* Trigger::mutable_action_show_category() { + // @@protoc_insertion_point(field_mutable:waypoint.Trigger.action_show_category) return _internal_mutable_action_show_category(); } -inline void Trigger::set_allocated_action_show_category(::Category* action_show_category) { +inline void Trigger::set_allocated_action_show_category(::waypoint::Category* action_show_category) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); if (message_arena == nullptr) { delete action_show_category_; @@ -8237,10 +8240,10 @@ inline void Trigger::set_allocated_action_show_category(::Category* action_show_ } action_show_category_ = action_show_category; - // @@protoc_insertion_point(field_set_allocated:Trigger.action_show_category) + // @@protoc_insertion_point(field_set_allocated:waypoint.Trigger.action_show_category) } -// .Category action_toggle_category = 14; +// .waypoint.Category action_toggle_category = 14; inline bool Trigger::_internal_has_action_toggle_category() const { return this != internal_default_instance() && action_toggle_category_ != nullptr; } @@ -8253,17 +8256,17 @@ inline void Trigger::clear_action_toggle_category() { } action_toggle_category_ = nullptr; } -inline const ::Category& Trigger::_internal_action_toggle_category() const { - const ::Category* p = action_toggle_category_; - return p != nullptr ? *p : *reinterpret_cast( - &::_Category_default_instance_); +inline const ::waypoint::Category& Trigger::_internal_action_toggle_category() const { + const ::waypoint::Category* p = action_toggle_category_; + return p != nullptr ? *p : *reinterpret_cast( + &::waypoint::_Category_default_instance_); } -inline const ::Category& Trigger::action_toggle_category() const { - // @@protoc_insertion_point(field_get:Trigger.action_toggle_category) +inline const ::waypoint::Category& Trigger::action_toggle_category() const { + // @@protoc_insertion_point(field_get:waypoint.Trigger.action_toggle_category) return _internal_action_toggle_category(); } inline void Trigger::unsafe_arena_set_allocated_action_toggle_category( - ::Category* action_toggle_category) { + ::waypoint::Category* action_toggle_category) { if (GetArena() == nullptr) { delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(action_toggle_category_); } @@ -8273,35 +8276,35 @@ inline void Trigger::unsafe_arena_set_allocated_action_toggle_category( } else { } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Trigger.action_toggle_category) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Trigger.action_toggle_category) } -inline ::Category* Trigger::release_action_toggle_category() { +inline ::waypoint::Category* Trigger::release_action_toggle_category() { auto temp = unsafe_arena_release_action_toggle_category(); if (GetArena() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } return temp; } -inline ::Category* Trigger::unsafe_arena_release_action_toggle_category() { - // @@protoc_insertion_point(field_release:Trigger.action_toggle_category) +inline ::waypoint::Category* Trigger::unsafe_arena_release_action_toggle_category() { + // @@protoc_insertion_point(field_release:waypoint.Trigger.action_toggle_category) - ::Category* temp = action_toggle_category_; + ::waypoint::Category* temp = action_toggle_category_; action_toggle_category_ = nullptr; return temp; } -inline ::Category* Trigger::_internal_mutable_action_toggle_category() { +inline ::waypoint::Category* Trigger::_internal_mutable_action_toggle_category() { if (action_toggle_category_ == nullptr) { - auto* p = CreateMaybeMessage<::Category>(GetArena()); + auto* p = CreateMaybeMessage<::waypoint::Category>(GetArena()); action_toggle_category_ = p; } return action_toggle_category_; } -inline ::Category* Trigger::mutable_action_toggle_category() { - // @@protoc_insertion_point(field_mutable:Trigger.action_toggle_category) +inline ::waypoint::Category* Trigger::mutable_action_toggle_category() { + // @@protoc_insertion_point(field_mutable:waypoint.Trigger.action_toggle_category) return _internal_mutable_action_toggle_category(); } -inline void Trigger::set_allocated_action_toggle_category(::Category* action_toggle_category) { +inline void Trigger::set_allocated_action_toggle_category(::waypoint::Category* action_toggle_category) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); if (message_arena == nullptr) { delete action_toggle_category_; @@ -8318,7 +8321,7 @@ inline void Trigger::set_allocated_action_toggle_category(::Category* action_tog } action_toggle_category_ = action_toggle_category; - // @@protoc_insertion_point(field_set_allocated:Trigger.action_toggle_category) + // @@protoc_insertion_point(field_set_allocated:waypoint.Trigger.action_toggle_category) } // ------------------------------------------------------------------- @@ -8333,7 +8336,7 @@ inline ::PROTOBUF_NAMESPACE_ID::int32 GUID::_internal_guid() const { return guid_; } inline ::PROTOBUF_NAMESPACE_ID::int32 GUID::guid() const { - // @@protoc_insertion_point(field_get:GUID.guid) + // @@protoc_insertion_point(field_get:waypoint.GUID.guid) return _internal_guid(); } inline void GUID::_internal_set_guid(::PROTOBUF_NAMESPACE_ID::int32 value) { @@ -8342,7 +8345,7 @@ inline void GUID::_internal_set_guid(::PROTOBUF_NAMESPACE_ID::int32 value) { } inline void GUID::set_guid(::PROTOBUF_NAMESPACE_ID::int32 value) { _internal_set_guid(value); - // @@protoc_insertion_point(field_set:GUID.guid) + // @@protoc_insertion_point(field_set:waypoint.GUID.guid) } // ------------------------------------------------------------------- @@ -8354,15 +8357,15 @@ inline void Color::clear_hex() { hex_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline const std::string& Color::hex() const { - // @@protoc_insertion_point(field_get:Color.hex) + // @@protoc_insertion_point(field_get:waypoint.Color.hex) return _internal_hex(); } inline void Color::set_hex(const std::string& value) { _internal_set_hex(value); - // @@protoc_insertion_point(field_set:Color.hex) + // @@protoc_insertion_point(field_set:waypoint.Color.hex) } inline std::string* Color::mutable_hex() { - // @@protoc_insertion_point(field_mutable:Color.hex) + // @@protoc_insertion_point(field_mutable:waypoint.Color.hex) return _internal_mutable_hex(); } inline const std::string& Color::_internal_hex() const { @@ -8376,28 +8379,28 @@ inline void Color::set_hex(std::string&& value) { hex_.Set( &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:Color.hex) + // @@protoc_insertion_point(field_set_rvalue:waypoint.Color.hex) } inline void Color::set_hex(const char* value) { GOOGLE_DCHECK(value != nullptr); hex_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:Color.hex) + // @@protoc_insertion_point(field_set_char:waypoint.Color.hex) } inline void Color::set_hex(const char* value, size_t size) { hex_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:Color.hex) + // @@protoc_insertion_point(field_set_pointer:waypoint.Color.hex) } inline std::string* Color::_internal_mutable_hex() { return hex_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* Color::release_hex() { - // @@protoc_insertion_point(field_release:Color.hex) + // @@protoc_insertion_point(field_release:waypoint.Color.hex) return hex_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void Color::set_allocated_hex(std::string* hex) { @@ -8408,10 +8411,10 @@ inline void Color::set_allocated_hex(std::string* hex) { } hex_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), hex, GetArena()); - // @@protoc_insertion_point(field_set_allocated:Color.hex) + // @@protoc_insertion_point(field_set_allocated:waypoint.Color.hex) } inline std::string* Color::unsafe_arena_release_hex() { - // @@protoc_insertion_point(field_unsafe_arena_release:Color.hex) + // @@protoc_insertion_point(field_unsafe_arena_release:waypoint.Color.hex) GOOGLE_DCHECK(GetArena() != nullptr); return hex_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), @@ -8427,7 +8430,7 @@ inline void Color::unsafe_arena_set_allocated_hex( } hex_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), hex, GetArena()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Color.hex) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Color.hex) } // ------------------------------------------------------------------- @@ -8442,7 +8445,7 @@ inline bool FestivalFilter::_internal_dragonbash() const { return dragonbash_; } inline bool FestivalFilter::dragonbash() const { - // @@protoc_insertion_point(field_get:FestivalFilter.dragonbash) + // @@protoc_insertion_point(field_get:waypoint.FestivalFilter.dragonbash) return _internal_dragonbash(); } inline void FestivalFilter::_internal_set_dragonbash(bool value) { @@ -8451,7 +8454,7 @@ inline void FestivalFilter::_internal_set_dragonbash(bool value) { } inline void FestivalFilter::set_dragonbash(bool value) { _internal_set_dragonbash(value); - // @@protoc_insertion_point(field_set:FestivalFilter.dragonbash) + // @@protoc_insertion_point(field_set:waypoint.FestivalFilter.dragonbash) } // bool festival_of_the_four_winds = 2; @@ -8462,7 +8465,7 @@ inline bool FestivalFilter::_internal_festival_of_the_four_winds() const { return festival_of_the_four_winds_; } inline bool FestivalFilter::festival_of_the_four_winds() const { - // @@protoc_insertion_point(field_get:FestivalFilter.festival_of_the_four_winds) + // @@protoc_insertion_point(field_get:waypoint.FestivalFilter.festival_of_the_four_winds) return _internal_festival_of_the_four_winds(); } inline void FestivalFilter::_internal_set_festival_of_the_four_winds(bool value) { @@ -8471,7 +8474,7 @@ inline void FestivalFilter::_internal_set_festival_of_the_four_winds(bool value) } inline void FestivalFilter::set_festival_of_the_four_winds(bool value) { _internal_set_festival_of_the_four_winds(value); - // @@protoc_insertion_point(field_set:FestivalFilter.festival_of_the_four_winds) + // @@protoc_insertion_point(field_set:waypoint.FestivalFilter.festival_of_the_four_winds) } // bool halloween = 3; @@ -8482,7 +8485,7 @@ inline bool FestivalFilter::_internal_halloween() const { return halloween_; } inline bool FestivalFilter::halloween() const { - // @@protoc_insertion_point(field_get:FestivalFilter.halloween) + // @@protoc_insertion_point(field_get:waypoint.FestivalFilter.halloween) return _internal_halloween(); } inline void FestivalFilter::_internal_set_halloween(bool value) { @@ -8491,7 +8494,7 @@ inline void FestivalFilter::_internal_set_halloween(bool value) { } inline void FestivalFilter::set_halloween(bool value) { _internal_set_halloween(value); - // @@protoc_insertion_point(field_set:FestivalFilter.halloween) + // @@protoc_insertion_point(field_set:waypoint.FestivalFilter.halloween) } // bool lunar_new_year = 4; @@ -8502,7 +8505,7 @@ inline bool FestivalFilter::_internal_lunar_new_year() const { return lunar_new_year_; } inline bool FestivalFilter::lunar_new_year() const { - // @@protoc_insertion_point(field_get:FestivalFilter.lunar_new_year) + // @@protoc_insertion_point(field_get:waypoint.FestivalFilter.lunar_new_year) return _internal_lunar_new_year(); } inline void FestivalFilter::_internal_set_lunar_new_year(bool value) { @@ -8511,7 +8514,7 @@ inline void FestivalFilter::_internal_set_lunar_new_year(bool value) { } inline void FestivalFilter::set_lunar_new_year(bool value) { _internal_set_lunar_new_year(value); - // @@protoc_insertion_point(field_set:FestivalFilter.lunar_new_year) + // @@protoc_insertion_point(field_set:waypoint.FestivalFilter.lunar_new_year) } // bool super_adventure_festival = 5; @@ -8522,7 +8525,7 @@ inline bool FestivalFilter::_internal_super_adventure_festival() const { return super_adventure_festival_; } inline bool FestivalFilter::super_adventure_festival() const { - // @@protoc_insertion_point(field_get:FestivalFilter.super_adventure_festival) + // @@protoc_insertion_point(field_get:waypoint.FestivalFilter.super_adventure_festival) return _internal_super_adventure_festival(); } inline void FestivalFilter::_internal_set_super_adventure_festival(bool value) { @@ -8531,7 +8534,7 @@ inline void FestivalFilter::_internal_set_super_adventure_festival(bool value) { } inline void FestivalFilter::set_super_adventure_festival(bool value) { _internal_set_super_adventure_festival(value); - // @@protoc_insertion_point(field_set:FestivalFilter.super_adventure_festival) + // @@protoc_insertion_point(field_set:waypoint.FestivalFilter.super_adventure_festival) } // bool wintersday = 6; @@ -8542,7 +8545,7 @@ inline bool FestivalFilter::_internal_wintersday() const { return wintersday_; } inline bool FestivalFilter::wintersday() const { - // @@protoc_insertion_point(field_get:FestivalFilter.wintersday) + // @@protoc_insertion_point(field_get:waypoint.FestivalFilter.wintersday) return _internal_wintersday(); } inline void FestivalFilter::_internal_set_wintersday(bool value) { @@ -8551,7 +8554,7 @@ inline void FestivalFilter::_internal_set_wintersday(bool value) { } inline void FestivalFilter::set_wintersday(bool value) { _internal_set_wintersday(value); - // @@protoc_insertion_point(field_set:FestivalFilter.wintersday) + // @@protoc_insertion_point(field_set:waypoint.FestivalFilter.wintersday) } // bool none = 7; @@ -8562,7 +8565,7 @@ inline bool FestivalFilter::_internal_none() const { return none_; } inline bool FestivalFilter::none() const { - // @@protoc_insertion_point(field_get:FestivalFilter.none) + // @@protoc_insertion_point(field_get:waypoint.FestivalFilter.none) return _internal_none(); } inline void FestivalFilter::_internal_set_none(bool value) { @@ -8571,7 +8574,7 @@ inline void FestivalFilter::_internal_set_none(bool value) { } inline void FestivalFilter::set_none(bool value) { _internal_set_none(value); - // @@protoc_insertion_point(field_set:FestivalFilter.none) + // @@protoc_insertion_point(field_set:waypoint.FestivalFilter.none) } // ------------------------------------------------------------------- @@ -8586,7 +8589,7 @@ inline bool MapTypeFilter::_internal_unknown_map() const { return unknown_map_; } inline bool MapTypeFilter::unknown_map() const { - // @@protoc_insertion_point(field_get:MapTypeFilter.unknown_map) + // @@protoc_insertion_point(field_get:waypoint.MapTypeFilter.unknown_map) return _internal_unknown_map(); } inline void MapTypeFilter::_internal_set_unknown_map(bool value) { @@ -8595,7 +8598,7 @@ inline void MapTypeFilter::_internal_set_unknown_map(bool value) { } inline void MapTypeFilter::set_unknown_map(bool value) { _internal_set_unknown_map(value); - // @@protoc_insertion_point(field_set:MapTypeFilter.unknown_map) + // @@protoc_insertion_point(field_set:waypoint.MapTypeFilter.unknown_map) } // bool redirect_map = 2; @@ -8606,7 +8609,7 @@ inline bool MapTypeFilter::_internal_redirect_map() const { return redirect_map_; } inline bool MapTypeFilter::redirect_map() const { - // @@protoc_insertion_point(field_get:MapTypeFilter.redirect_map) + // @@protoc_insertion_point(field_get:waypoint.MapTypeFilter.redirect_map) return _internal_redirect_map(); } inline void MapTypeFilter::_internal_set_redirect_map(bool value) { @@ -8615,7 +8618,7 @@ inline void MapTypeFilter::_internal_set_redirect_map(bool value) { } inline void MapTypeFilter::set_redirect_map(bool value) { _internal_set_redirect_map(value); - // @@protoc_insertion_point(field_set:MapTypeFilter.redirect_map) + // @@protoc_insertion_point(field_set:waypoint.MapTypeFilter.redirect_map) } // bool character_create_map = 3; @@ -8626,7 +8629,7 @@ inline bool MapTypeFilter::_internal_character_create_map() const { return character_create_map_; } inline bool MapTypeFilter::character_create_map() const { - // @@protoc_insertion_point(field_get:MapTypeFilter.character_create_map) + // @@protoc_insertion_point(field_get:waypoint.MapTypeFilter.character_create_map) return _internal_character_create_map(); } inline void MapTypeFilter::_internal_set_character_create_map(bool value) { @@ -8635,7 +8638,7 @@ inline void MapTypeFilter::_internal_set_character_create_map(bool value) { } inline void MapTypeFilter::set_character_create_map(bool value) { _internal_set_character_create_map(value); - // @@protoc_insertion_point(field_set:MapTypeFilter.character_create_map) + // @@protoc_insertion_point(field_set:waypoint.MapTypeFilter.character_create_map) } // bool pvp_map = 4; @@ -8646,7 +8649,7 @@ inline bool MapTypeFilter::_internal_pvp_map() const { return pvp_map_; } inline bool MapTypeFilter::pvp_map() const { - // @@protoc_insertion_point(field_get:MapTypeFilter.pvp_map) + // @@protoc_insertion_point(field_get:waypoint.MapTypeFilter.pvp_map) return _internal_pvp_map(); } inline void MapTypeFilter::_internal_set_pvp_map(bool value) { @@ -8655,7 +8658,7 @@ inline void MapTypeFilter::_internal_set_pvp_map(bool value) { } inline void MapTypeFilter::set_pvp_map(bool value) { _internal_set_pvp_map(value); - // @@protoc_insertion_point(field_set:MapTypeFilter.pvp_map) + // @@protoc_insertion_point(field_set:waypoint.MapTypeFilter.pvp_map) } // bool gvg_map = 5; @@ -8666,7 +8669,7 @@ inline bool MapTypeFilter::_internal_gvg_map() const { return gvg_map_; } inline bool MapTypeFilter::gvg_map() const { - // @@protoc_insertion_point(field_get:MapTypeFilter.gvg_map) + // @@protoc_insertion_point(field_get:waypoint.MapTypeFilter.gvg_map) return _internal_gvg_map(); } inline void MapTypeFilter::_internal_set_gvg_map(bool value) { @@ -8675,7 +8678,7 @@ inline void MapTypeFilter::_internal_set_gvg_map(bool value) { } inline void MapTypeFilter::set_gvg_map(bool value) { _internal_set_gvg_map(value); - // @@protoc_insertion_point(field_set:MapTypeFilter.gvg_map) + // @@protoc_insertion_point(field_set:waypoint.MapTypeFilter.gvg_map) } // bool instance_map = 6; @@ -8686,7 +8689,7 @@ inline bool MapTypeFilter::_internal_instance_map() const { return instance_map_; } inline bool MapTypeFilter::instance_map() const { - // @@protoc_insertion_point(field_get:MapTypeFilter.instance_map) + // @@protoc_insertion_point(field_get:waypoint.MapTypeFilter.instance_map) return _internal_instance_map(); } inline void MapTypeFilter::_internal_set_instance_map(bool value) { @@ -8695,7 +8698,7 @@ inline void MapTypeFilter::_internal_set_instance_map(bool value) { } inline void MapTypeFilter::set_instance_map(bool value) { _internal_set_instance_map(value); - // @@protoc_insertion_point(field_set:MapTypeFilter.instance_map) + // @@protoc_insertion_point(field_set:waypoint.MapTypeFilter.instance_map) } // bool public_map = 7; @@ -8706,7 +8709,7 @@ inline bool MapTypeFilter::_internal_public_map() const { return public_map_; } inline bool MapTypeFilter::public_map() const { - // @@protoc_insertion_point(field_get:MapTypeFilter.public_map) + // @@protoc_insertion_point(field_get:waypoint.MapTypeFilter.public_map) return _internal_public_map(); } inline void MapTypeFilter::_internal_set_public_map(bool value) { @@ -8715,7 +8718,7 @@ inline void MapTypeFilter::_internal_set_public_map(bool value) { } inline void MapTypeFilter::set_public_map(bool value) { _internal_set_public_map(value); - // @@protoc_insertion_point(field_set:MapTypeFilter.public_map) + // @@protoc_insertion_point(field_set:waypoint.MapTypeFilter.public_map) } // bool tournament_map = 8; @@ -8726,7 +8729,7 @@ inline bool MapTypeFilter::_internal_tournament_map() const { return tournament_map_; } inline bool MapTypeFilter::tournament_map() const { - // @@protoc_insertion_point(field_get:MapTypeFilter.tournament_map) + // @@protoc_insertion_point(field_get:waypoint.MapTypeFilter.tournament_map) return _internal_tournament_map(); } inline void MapTypeFilter::_internal_set_tournament_map(bool value) { @@ -8735,7 +8738,7 @@ inline void MapTypeFilter::_internal_set_tournament_map(bool value) { } inline void MapTypeFilter::set_tournament_map(bool value) { _internal_set_tournament_map(value); - // @@protoc_insertion_point(field_set:MapTypeFilter.tournament_map) + // @@protoc_insertion_point(field_set:waypoint.MapTypeFilter.tournament_map) } // bool tutorial_map = 9; @@ -8746,7 +8749,7 @@ inline bool MapTypeFilter::_internal_tutorial_map() const { return tutorial_map_; } inline bool MapTypeFilter::tutorial_map() const { - // @@protoc_insertion_point(field_get:MapTypeFilter.tutorial_map) + // @@protoc_insertion_point(field_get:waypoint.MapTypeFilter.tutorial_map) return _internal_tutorial_map(); } inline void MapTypeFilter::_internal_set_tutorial_map(bool value) { @@ -8755,7 +8758,7 @@ inline void MapTypeFilter::_internal_set_tutorial_map(bool value) { } inline void MapTypeFilter::set_tutorial_map(bool value) { _internal_set_tutorial_map(value); - // @@protoc_insertion_point(field_set:MapTypeFilter.tutorial_map) + // @@protoc_insertion_point(field_set:waypoint.MapTypeFilter.tutorial_map) } // bool user_tournament_map = 10; @@ -8766,7 +8769,7 @@ inline bool MapTypeFilter::_internal_user_tournament_map() const { return user_tournament_map_; } inline bool MapTypeFilter::user_tournament_map() const { - // @@protoc_insertion_point(field_get:MapTypeFilter.user_tournament_map) + // @@protoc_insertion_point(field_get:waypoint.MapTypeFilter.user_tournament_map) return _internal_user_tournament_map(); } inline void MapTypeFilter::_internal_set_user_tournament_map(bool value) { @@ -8775,7 +8778,7 @@ inline void MapTypeFilter::_internal_set_user_tournament_map(bool value) { } inline void MapTypeFilter::set_user_tournament_map(bool value) { _internal_set_user_tournament_map(value); - // @@protoc_insertion_point(field_set:MapTypeFilter.user_tournament_map) + // @@protoc_insertion_point(field_set:waypoint.MapTypeFilter.user_tournament_map) } // bool center_map = 11; @@ -8786,7 +8789,7 @@ inline bool MapTypeFilter::_internal_center_map() const { return center_map_; } inline bool MapTypeFilter::center_map() const { - // @@protoc_insertion_point(field_get:MapTypeFilter.center_map) + // @@protoc_insertion_point(field_get:waypoint.MapTypeFilter.center_map) return _internal_center_map(); } inline void MapTypeFilter::_internal_set_center_map(bool value) { @@ -8795,7 +8798,7 @@ inline void MapTypeFilter::_internal_set_center_map(bool value) { } inline void MapTypeFilter::set_center_map(bool value) { _internal_set_center_map(value); - // @@protoc_insertion_point(field_set:MapTypeFilter.center_map) + // @@protoc_insertion_point(field_set:waypoint.MapTypeFilter.center_map) } // bool eternal_battlegrounds_map = 12; @@ -8806,7 +8809,7 @@ inline bool MapTypeFilter::_internal_eternal_battlegrounds_map() const { return eternal_battlegrounds_map_; } inline bool MapTypeFilter::eternal_battlegrounds_map() const { - // @@protoc_insertion_point(field_get:MapTypeFilter.eternal_battlegrounds_map) + // @@protoc_insertion_point(field_get:waypoint.MapTypeFilter.eternal_battlegrounds_map) return _internal_eternal_battlegrounds_map(); } inline void MapTypeFilter::_internal_set_eternal_battlegrounds_map(bool value) { @@ -8815,7 +8818,7 @@ inline void MapTypeFilter::_internal_set_eternal_battlegrounds_map(bool value) { } inline void MapTypeFilter::set_eternal_battlegrounds_map(bool value) { _internal_set_eternal_battlegrounds_map(value); - // @@protoc_insertion_point(field_set:MapTypeFilter.eternal_battlegrounds_map) + // @@protoc_insertion_point(field_set:waypoint.MapTypeFilter.eternal_battlegrounds_map) } // bool bluehome_map = 13; @@ -8826,7 +8829,7 @@ inline bool MapTypeFilter::_internal_bluehome_map() const { return bluehome_map_; } inline bool MapTypeFilter::bluehome_map() const { - // @@protoc_insertion_point(field_get:MapTypeFilter.bluehome_map) + // @@protoc_insertion_point(field_get:waypoint.MapTypeFilter.bluehome_map) return _internal_bluehome_map(); } inline void MapTypeFilter::_internal_set_bluehome_map(bool value) { @@ -8835,7 +8838,7 @@ inline void MapTypeFilter::_internal_set_bluehome_map(bool value) { } inline void MapTypeFilter::set_bluehome_map(bool value) { _internal_set_bluehome_map(value); - // @@protoc_insertion_point(field_set:MapTypeFilter.bluehome_map) + // @@protoc_insertion_point(field_set:waypoint.MapTypeFilter.bluehome_map) } // bool blue_borderlands_map = 14; @@ -8846,7 +8849,7 @@ inline bool MapTypeFilter::_internal_blue_borderlands_map() const { return blue_borderlands_map_; } inline bool MapTypeFilter::blue_borderlands_map() const { - // @@protoc_insertion_point(field_get:MapTypeFilter.blue_borderlands_map) + // @@protoc_insertion_point(field_get:waypoint.MapTypeFilter.blue_borderlands_map) return _internal_blue_borderlands_map(); } inline void MapTypeFilter::_internal_set_blue_borderlands_map(bool value) { @@ -8855,7 +8858,7 @@ inline void MapTypeFilter::_internal_set_blue_borderlands_map(bool value) { } inline void MapTypeFilter::set_blue_borderlands_map(bool value) { _internal_set_blue_borderlands_map(value); - // @@protoc_insertion_point(field_set:MapTypeFilter.blue_borderlands_map) + // @@protoc_insertion_point(field_set:waypoint.MapTypeFilter.blue_borderlands_map) } // bool green_home_map = 15; @@ -8866,7 +8869,7 @@ inline bool MapTypeFilter::_internal_green_home_map() const { return green_home_map_; } inline bool MapTypeFilter::green_home_map() const { - // @@protoc_insertion_point(field_get:MapTypeFilter.green_home_map) + // @@protoc_insertion_point(field_get:waypoint.MapTypeFilter.green_home_map) return _internal_green_home_map(); } inline void MapTypeFilter::_internal_set_green_home_map(bool value) { @@ -8875,7 +8878,7 @@ inline void MapTypeFilter::_internal_set_green_home_map(bool value) { } inline void MapTypeFilter::set_green_home_map(bool value) { _internal_set_green_home_map(value); - // @@protoc_insertion_point(field_set:MapTypeFilter.green_home_map) + // @@protoc_insertion_point(field_set:waypoint.MapTypeFilter.green_home_map) } // bool green_borderlands_map = 16; @@ -8886,7 +8889,7 @@ inline bool MapTypeFilter::_internal_green_borderlands_map() const { return green_borderlands_map_; } inline bool MapTypeFilter::green_borderlands_map() const { - // @@protoc_insertion_point(field_get:MapTypeFilter.green_borderlands_map) + // @@protoc_insertion_point(field_get:waypoint.MapTypeFilter.green_borderlands_map) return _internal_green_borderlands_map(); } inline void MapTypeFilter::_internal_set_green_borderlands_map(bool value) { @@ -8895,7 +8898,7 @@ inline void MapTypeFilter::_internal_set_green_borderlands_map(bool value) { } inline void MapTypeFilter::set_green_borderlands_map(bool value) { _internal_set_green_borderlands_map(value); - // @@protoc_insertion_point(field_set:MapTypeFilter.green_borderlands_map) + // @@protoc_insertion_point(field_set:waypoint.MapTypeFilter.green_borderlands_map) } // bool red_home_map = 17; @@ -8906,7 +8909,7 @@ inline bool MapTypeFilter::_internal_red_home_map() const { return red_home_map_; } inline bool MapTypeFilter::red_home_map() const { - // @@protoc_insertion_point(field_get:MapTypeFilter.red_home_map) + // @@protoc_insertion_point(field_get:waypoint.MapTypeFilter.red_home_map) return _internal_red_home_map(); } inline void MapTypeFilter::_internal_set_red_home_map(bool value) { @@ -8915,7 +8918,7 @@ inline void MapTypeFilter::_internal_set_red_home_map(bool value) { } inline void MapTypeFilter::set_red_home_map(bool value) { _internal_set_red_home_map(value); - // @@protoc_insertion_point(field_set:MapTypeFilter.red_home_map) + // @@protoc_insertion_point(field_set:waypoint.MapTypeFilter.red_home_map) } // bool red_borderlands_map = 18; @@ -8926,7 +8929,7 @@ inline bool MapTypeFilter::_internal_red_borderlands_map() const { return red_borderlands_map_; } inline bool MapTypeFilter::red_borderlands_map() const { - // @@protoc_insertion_point(field_get:MapTypeFilter.red_borderlands_map) + // @@protoc_insertion_point(field_get:waypoint.MapTypeFilter.red_borderlands_map) return _internal_red_borderlands_map(); } inline void MapTypeFilter::_internal_set_red_borderlands_map(bool value) { @@ -8935,7 +8938,7 @@ inline void MapTypeFilter::_internal_set_red_borderlands_map(bool value) { } inline void MapTypeFilter::set_red_borderlands_map(bool value) { _internal_set_red_borderlands_map(value); - // @@protoc_insertion_point(field_set:MapTypeFilter.red_borderlands_map) + // @@protoc_insertion_point(field_set:waypoint.MapTypeFilter.red_borderlands_map) } // bool fortunes_vale_map = 19; @@ -8946,7 +8949,7 @@ inline bool MapTypeFilter::_internal_fortunes_vale_map() const { return fortunes_vale_map_; } inline bool MapTypeFilter::fortunes_vale_map() const { - // @@protoc_insertion_point(field_get:MapTypeFilter.fortunes_vale_map) + // @@protoc_insertion_point(field_get:waypoint.MapTypeFilter.fortunes_vale_map) return _internal_fortunes_vale_map(); } inline void MapTypeFilter::_internal_set_fortunes_vale_map(bool value) { @@ -8955,7 +8958,7 @@ inline void MapTypeFilter::_internal_set_fortunes_vale_map(bool value) { } inline void MapTypeFilter::set_fortunes_vale_map(bool value) { _internal_set_fortunes_vale_map(value); - // @@protoc_insertion_point(field_set:MapTypeFilter.fortunes_vale_map) + // @@protoc_insertion_point(field_set:waypoint.MapTypeFilter.fortunes_vale_map) } // bool jump_puzzle_map = 20; @@ -8966,7 +8969,7 @@ inline bool MapTypeFilter::_internal_jump_puzzle_map() const { return jump_puzzle_map_; } inline bool MapTypeFilter::jump_puzzle_map() const { - // @@protoc_insertion_point(field_get:MapTypeFilter.jump_puzzle_map) + // @@protoc_insertion_point(field_get:waypoint.MapTypeFilter.jump_puzzle_map) return _internal_jump_puzzle_map(); } inline void MapTypeFilter::_internal_set_jump_puzzle_map(bool value) { @@ -8975,7 +8978,7 @@ inline void MapTypeFilter::_internal_set_jump_puzzle_map(bool value) { } inline void MapTypeFilter::set_jump_puzzle_map(bool value) { _internal_set_jump_puzzle_map(value); - // @@protoc_insertion_point(field_set:MapTypeFilter.jump_puzzle_map) + // @@protoc_insertion_point(field_set:waypoint.MapTypeFilter.jump_puzzle_map) } // bool obsidian_sanctum_map = 21; @@ -8986,7 +8989,7 @@ inline bool MapTypeFilter::_internal_obsidian_sanctum_map() const { return obsidian_sanctum_map_; } inline bool MapTypeFilter::obsidian_sanctum_map() const { - // @@protoc_insertion_point(field_get:MapTypeFilter.obsidian_sanctum_map) + // @@protoc_insertion_point(field_get:waypoint.MapTypeFilter.obsidian_sanctum_map) return _internal_obsidian_sanctum_map(); } inline void MapTypeFilter::_internal_set_obsidian_sanctum_map(bool value) { @@ -8995,7 +8998,7 @@ inline void MapTypeFilter::_internal_set_obsidian_sanctum_map(bool value) { } inline void MapTypeFilter::set_obsidian_sanctum_map(bool value) { _internal_set_obsidian_sanctum_map(value); - // @@protoc_insertion_point(field_set:MapTypeFilter.obsidian_sanctum_map) + // @@protoc_insertion_point(field_set:waypoint.MapTypeFilter.obsidian_sanctum_map) } // bool edge_of_the_mists_map = 22; @@ -9006,7 +9009,7 @@ inline bool MapTypeFilter::_internal_edge_of_the_mists_map() const { return edge_of_the_mists_map_; } inline bool MapTypeFilter::edge_of_the_mists_map() const { - // @@protoc_insertion_point(field_get:MapTypeFilter.edge_of_the_mists_map) + // @@protoc_insertion_point(field_get:waypoint.MapTypeFilter.edge_of_the_mists_map) return _internal_edge_of_the_mists_map(); } inline void MapTypeFilter::_internal_set_edge_of_the_mists_map(bool value) { @@ -9015,7 +9018,7 @@ inline void MapTypeFilter::_internal_set_edge_of_the_mists_map(bool value) { } inline void MapTypeFilter::set_edge_of_the_mists_map(bool value) { _internal_set_edge_of_the_mists_map(value); - // @@protoc_insertion_point(field_set:MapTypeFilter.edge_of_the_mists_map) + // @@protoc_insertion_point(field_set:waypoint.MapTypeFilter.edge_of_the_mists_map) } // bool public_mini_map = 23; @@ -9026,7 +9029,7 @@ inline bool MapTypeFilter::_internal_public_mini_map() const { return public_mini_map_; } inline bool MapTypeFilter::public_mini_map() const { - // @@protoc_insertion_point(field_get:MapTypeFilter.public_mini_map) + // @@protoc_insertion_point(field_get:waypoint.MapTypeFilter.public_mini_map) return _internal_public_mini_map(); } inline void MapTypeFilter::_internal_set_public_mini_map(bool value) { @@ -9035,7 +9038,7 @@ inline void MapTypeFilter::_internal_set_public_mini_map(bool value) { } inline void MapTypeFilter::set_public_mini_map(bool value) { _internal_set_public_mini_map(value); - // @@protoc_insertion_point(field_set:MapTypeFilter.public_mini_map) + // @@protoc_insertion_point(field_set:waypoint.MapTypeFilter.public_mini_map) } // bool wvw_lounge_map = 24; @@ -9046,7 +9049,7 @@ inline bool MapTypeFilter::_internal_wvw_lounge_map() const { return wvw_lounge_map_; } inline bool MapTypeFilter::wvw_lounge_map() const { - // @@protoc_insertion_point(field_get:MapTypeFilter.wvw_lounge_map) + // @@protoc_insertion_point(field_get:waypoint.MapTypeFilter.wvw_lounge_map) return _internal_wvw_lounge_map(); } inline void MapTypeFilter::_internal_set_wvw_lounge_map(bool value) { @@ -9055,7 +9058,7 @@ inline void MapTypeFilter::_internal_set_wvw_lounge_map(bool value) { } inline void MapTypeFilter::set_wvw_lounge_map(bool value) { _internal_set_wvw_lounge_map(value); - // @@protoc_insertion_point(field_set:MapTypeFilter.wvw_lounge_map) + // @@protoc_insertion_point(field_set:waypoint.MapTypeFilter.wvw_lounge_map) } // ------------------------------------------------------------------- @@ -9070,7 +9073,7 @@ inline bool MountFilter::_internal_raptor() const { return raptor_; } inline bool MountFilter::raptor() const { - // @@protoc_insertion_point(field_get:MountFilter.raptor) + // @@protoc_insertion_point(field_get:waypoint.MountFilter.raptor) return _internal_raptor(); } inline void MountFilter::_internal_set_raptor(bool value) { @@ -9079,7 +9082,7 @@ inline void MountFilter::_internal_set_raptor(bool value) { } inline void MountFilter::set_raptor(bool value) { _internal_set_raptor(value); - // @@protoc_insertion_point(field_set:MountFilter.raptor) + // @@protoc_insertion_point(field_set:waypoint.MountFilter.raptor) } // bool springer = 2; @@ -9090,7 +9093,7 @@ inline bool MountFilter::_internal_springer() const { return springer_; } inline bool MountFilter::springer() const { - // @@protoc_insertion_point(field_get:MountFilter.springer) + // @@protoc_insertion_point(field_get:waypoint.MountFilter.springer) return _internal_springer(); } inline void MountFilter::_internal_set_springer(bool value) { @@ -9099,7 +9102,7 @@ inline void MountFilter::_internal_set_springer(bool value) { } inline void MountFilter::set_springer(bool value) { _internal_set_springer(value); - // @@protoc_insertion_point(field_set:MountFilter.springer) + // @@protoc_insertion_point(field_set:waypoint.MountFilter.springer) } // bool skimmer = 3; @@ -9110,7 +9113,7 @@ inline bool MountFilter::_internal_skimmer() const { return skimmer_; } inline bool MountFilter::skimmer() const { - // @@protoc_insertion_point(field_get:MountFilter.skimmer) + // @@protoc_insertion_point(field_get:waypoint.MountFilter.skimmer) return _internal_skimmer(); } inline void MountFilter::_internal_set_skimmer(bool value) { @@ -9119,7 +9122,7 @@ inline void MountFilter::_internal_set_skimmer(bool value) { } inline void MountFilter::set_skimmer(bool value) { _internal_set_skimmer(value); - // @@protoc_insertion_point(field_set:MountFilter.skimmer) + // @@protoc_insertion_point(field_set:waypoint.MountFilter.skimmer) } // bool jackal = 4; @@ -9130,7 +9133,7 @@ inline bool MountFilter::_internal_jackal() const { return jackal_; } inline bool MountFilter::jackal() const { - // @@protoc_insertion_point(field_get:MountFilter.jackal) + // @@protoc_insertion_point(field_get:waypoint.MountFilter.jackal) return _internal_jackal(); } inline void MountFilter::_internal_set_jackal(bool value) { @@ -9139,7 +9142,7 @@ inline void MountFilter::_internal_set_jackal(bool value) { } inline void MountFilter::set_jackal(bool value) { _internal_set_jackal(value); - // @@protoc_insertion_point(field_set:MountFilter.jackal) + // @@protoc_insertion_point(field_set:waypoint.MountFilter.jackal) } // bool griffon = 5; @@ -9150,7 +9153,7 @@ inline bool MountFilter::_internal_griffon() const { return griffon_; } inline bool MountFilter::griffon() const { - // @@protoc_insertion_point(field_get:MountFilter.griffon) + // @@protoc_insertion_point(field_get:waypoint.MountFilter.griffon) return _internal_griffon(); } inline void MountFilter::_internal_set_griffon(bool value) { @@ -9159,7 +9162,7 @@ inline void MountFilter::_internal_set_griffon(bool value) { } inline void MountFilter::set_griffon(bool value) { _internal_set_griffon(value); - // @@protoc_insertion_point(field_set:MountFilter.griffon) + // @@protoc_insertion_point(field_set:waypoint.MountFilter.griffon) } // bool roller_beetle = 6; @@ -9170,7 +9173,7 @@ inline bool MountFilter::_internal_roller_beetle() const { return roller_beetle_; } inline bool MountFilter::roller_beetle() const { - // @@protoc_insertion_point(field_get:MountFilter.roller_beetle) + // @@protoc_insertion_point(field_get:waypoint.MountFilter.roller_beetle) return _internal_roller_beetle(); } inline void MountFilter::_internal_set_roller_beetle(bool value) { @@ -9179,7 +9182,7 @@ inline void MountFilter::_internal_set_roller_beetle(bool value) { } inline void MountFilter::set_roller_beetle(bool value) { _internal_set_roller_beetle(value); - // @@protoc_insertion_point(field_set:MountFilter.roller_beetle) + // @@protoc_insertion_point(field_set:waypoint.MountFilter.roller_beetle) } // bool warclaw = 7; @@ -9190,7 +9193,7 @@ inline bool MountFilter::_internal_warclaw() const { return warclaw_; } inline bool MountFilter::warclaw() const { - // @@protoc_insertion_point(field_get:MountFilter.warclaw) + // @@protoc_insertion_point(field_get:waypoint.MountFilter.warclaw) return _internal_warclaw(); } inline void MountFilter::_internal_set_warclaw(bool value) { @@ -9199,7 +9202,7 @@ inline void MountFilter::_internal_set_warclaw(bool value) { } inline void MountFilter::set_warclaw(bool value) { _internal_set_warclaw(value); - // @@protoc_insertion_point(field_set:MountFilter.warclaw) + // @@protoc_insertion_point(field_set:waypoint.MountFilter.warclaw) } // bool skyscalee = 8; @@ -9210,7 +9213,7 @@ inline bool MountFilter::_internal_skyscalee() const { return skyscalee_; } inline bool MountFilter::skyscalee() const { - // @@protoc_insertion_point(field_get:MountFilter.skyscalee) + // @@protoc_insertion_point(field_get:waypoint.MountFilter.skyscalee) return _internal_skyscalee(); } inline void MountFilter::_internal_set_skyscalee(bool value) { @@ -9219,7 +9222,7 @@ inline void MountFilter::_internal_set_skyscalee(bool value) { } inline void MountFilter::set_skyscalee(bool value) { _internal_set_skyscalee(value); - // @@protoc_insertion_point(field_set:MountFilter.skyscalee) + // @@protoc_insertion_point(field_set:waypoint.MountFilter.skyscalee) } // bool skiff = 9; @@ -9230,7 +9233,7 @@ inline bool MountFilter::_internal_skiff() const { return skiff_; } inline bool MountFilter::skiff() const { - // @@protoc_insertion_point(field_get:MountFilter.skiff) + // @@protoc_insertion_point(field_get:waypoint.MountFilter.skiff) return _internal_skiff(); } inline void MountFilter::_internal_set_skiff(bool value) { @@ -9239,7 +9242,7 @@ inline void MountFilter::_internal_set_skiff(bool value) { } inline void MountFilter::set_skiff(bool value) { _internal_set_skiff(value); - // @@protoc_insertion_point(field_set:MountFilter.skiff) + // @@protoc_insertion_point(field_set:waypoint.MountFilter.skiff) } // bool seige_turtle = 10; @@ -9250,7 +9253,7 @@ inline bool MountFilter::_internal_seige_turtle() const { return seige_turtle_; } inline bool MountFilter::seige_turtle() const { - // @@protoc_insertion_point(field_get:MountFilter.seige_turtle) + // @@protoc_insertion_point(field_get:waypoint.MountFilter.seige_turtle) return _internal_seige_turtle(); } inline void MountFilter::_internal_set_seige_turtle(bool value) { @@ -9259,7 +9262,7 @@ inline void MountFilter::_internal_set_seige_turtle(bool value) { } inline void MountFilter::set_seige_turtle(bool value) { _internal_set_seige_turtle(value); - // @@protoc_insertion_point(field_set:MountFilter.seige_turtle) + // @@protoc_insertion_point(field_set:waypoint.MountFilter.seige_turtle) } // ------------------------------------------------------------------- @@ -9274,7 +9277,7 @@ inline bool ProfessionFilter::_internal_guardian() const { return guardian_; } inline bool ProfessionFilter::guardian() const { - // @@protoc_insertion_point(field_get:ProfessionFilter.guardian) + // @@protoc_insertion_point(field_get:waypoint.ProfessionFilter.guardian) return _internal_guardian(); } inline void ProfessionFilter::_internal_set_guardian(bool value) { @@ -9283,7 +9286,7 @@ inline void ProfessionFilter::_internal_set_guardian(bool value) { } inline void ProfessionFilter::set_guardian(bool value) { _internal_set_guardian(value); - // @@protoc_insertion_point(field_set:ProfessionFilter.guardian) + // @@protoc_insertion_point(field_set:waypoint.ProfessionFilter.guardian) } // bool warrior = 2; @@ -9294,7 +9297,7 @@ inline bool ProfessionFilter::_internal_warrior() const { return warrior_; } inline bool ProfessionFilter::warrior() const { - // @@protoc_insertion_point(field_get:ProfessionFilter.warrior) + // @@protoc_insertion_point(field_get:waypoint.ProfessionFilter.warrior) return _internal_warrior(); } inline void ProfessionFilter::_internal_set_warrior(bool value) { @@ -9303,7 +9306,7 @@ inline void ProfessionFilter::_internal_set_warrior(bool value) { } inline void ProfessionFilter::set_warrior(bool value) { _internal_set_warrior(value); - // @@protoc_insertion_point(field_set:ProfessionFilter.warrior) + // @@protoc_insertion_point(field_set:waypoint.ProfessionFilter.warrior) } // bool engineer = 3; @@ -9314,7 +9317,7 @@ inline bool ProfessionFilter::_internal_engineer() const { return engineer_; } inline bool ProfessionFilter::engineer() const { - // @@protoc_insertion_point(field_get:ProfessionFilter.engineer) + // @@protoc_insertion_point(field_get:waypoint.ProfessionFilter.engineer) return _internal_engineer(); } inline void ProfessionFilter::_internal_set_engineer(bool value) { @@ -9323,7 +9326,7 @@ inline void ProfessionFilter::_internal_set_engineer(bool value) { } inline void ProfessionFilter::set_engineer(bool value) { _internal_set_engineer(value); - // @@protoc_insertion_point(field_set:ProfessionFilter.engineer) + // @@protoc_insertion_point(field_set:waypoint.ProfessionFilter.engineer) } // bool ranger = 4; @@ -9334,7 +9337,7 @@ inline bool ProfessionFilter::_internal_ranger() const { return ranger_; } inline bool ProfessionFilter::ranger() const { - // @@protoc_insertion_point(field_get:ProfessionFilter.ranger) + // @@protoc_insertion_point(field_get:waypoint.ProfessionFilter.ranger) return _internal_ranger(); } inline void ProfessionFilter::_internal_set_ranger(bool value) { @@ -9343,7 +9346,7 @@ inline void ProfessionFilter::_internal_set_ranger(bool value) { } inline void ProfessionFilter::set_ranger(bool value) { _internal_set_ranger(value); - // @@protoc_insertion_point(field_set:ProfessionFilter.ranger) + // @@protoc_insertion_point(field_set:waypoint.ProfessionFilter.ranger) } // bool thief = 5; @@ -9354,7 +9357,7 @@ inline bool ProfessionFilter::_internal_thief() const { return thief_; } inline bool ProfessionFilter::thief() const { - // @@protoc_insertion_point(field_get:ProfessionFilter.thief) + // @@protoc_insertion_point(field_get:waypoint.ProfessionFilter.thief) return _internal_thief(); } inline void ProfessionFilter::_internal_set_thief(bool value) { @@ -9363,7 +9366,7 @@ inline void ProfessionFilter::_internal_set_thief(bool value) { } inline void ProfessionFilter::set_thief(bool value) { _internal_set_thief(value); - // @@protoc_insertion_point(field_set:ProfessionFilter.thief) + // @@protoc_insertion_point(field_set:waypoint.ProfessionFilter.thief) } // bool elementalist = 6; @@ -9374,7 +9377,7 @@ inline bool ProfessionFilter::_internal_elementalist() const { return elementalist_; } inline bool ProfessionFilter::elementalist() const { - // @@protoc_insertion_point(field_get:ProfessionFilter.elementalist) + // @@protoc_insertion_point(field_get:waypoint.ProfessionFilter.elementalist) return _internal_elementalist(); } inline void ProfessionFilter::_internal_set_elementalist(bool value) { @@ -9383,7 +9386,7 @@ inline void ProfessionFilter::_internal_set_elementalist(bool value) { } inline void ProfessionFilter::set_elementalist(bool value) { _internal_set_elementalist(value); - // @@protoc_insertion_point(field_set:ProfessionFilter.elementalist) + // @@protoc_insertion_point(field_set:waypoint.ProfessionFilter.elementalist) } // bool mesmer = 7; @@ -9394,7 +9397,7 @@ inline bool ProfessionFilter::_internal_mesmer() const { return mesmer_; } inline bool ProfessionFilter::mesmer() const { - // @@protoc_insertion_point(field_get:ProfessionFilter.mesmer) + // @@protoc_insertion_point(field_get:waypoint.ProfessionFilter.mesmer) return _internal_mesmer(); } inline void ProfessionFilter::_internal_set_mesmer(bool value) { @@ -9403,7 +9406,7 @@ inline void ProfessionFilter::_internal_set_mesmer(bool value) { } inline void ProfessionFilter::set_mesmer(bool value) { _internal_set_mesmer(value); - // @@protoc_insertion_point(field_set:ProfessionFilter.mesmer) + // @@protoc_insertion_point(field_set:waypoint.ProfessionFilter.mesmer) } // bool necromancer = 8; @@ -9414,7 +9417,7 @@ inline bool ProfessionFilter::_internal_necromancer() const { return necromancer_; } inline bool ProfessionFilter::necromancer() const { - // @@protoc_insertion_point(field_get:ProfessionFilter.necromancer) + // @@protoc_insertion_point(field_get:waypoint.ProfessionFilter.necromancer) return _internal_necromancer(); } inline void ProfessionFilter::_internal_set_necromancer(bool value) { @@ -9423,7 +9426,7 @@ inline void ProfessionFilter::_internal_set_necromancer(bool value) { } inline void ProfessionFilter::set_necromancer(bool value) { _internal_set_necromancer(value); - // @@protoc_insertion_point(field_set:ProfessionFilter.necromancer) + // @@protoc_insertion_point(field_set:waypoint.ProfessionFilter.necromancer) } // bool revenantnt = 9; @@ -9434,7 +9437,7 @@ inline bool ProfessionFilter::_internal_revenantnt() const { return revenantnt_; } inline bool ProfessionFilter::revenantnt() const { - // @@protoc_insertion_point(field_get:ProfessionFilter.revenantnt) + // @@protoc_insertion_point(field_get:waypoint.ProfessionFilter.revenantnt) return _internal_revenantnt(); } inline void ProfessionFilter::_internal_set_revenantnt(bool value) { @@ -9443,7 +9446,7 @@ inline void ProfessionFilter::_internal_set_revenantnt(bool value) { } inline void ProfessionFilter::set_revenantnt(bool value) { _internal_set_revenantnt(value); - // @@protoc_insertion_point(field_set:ProfessionFilter.revenantnt) + // @@protoc_insertion_point(field_set:waypoint.ProfessionFilter.revenantnt) } // ------------------------------------------------------------------- @@ -9458,7 +9461,7 @@ inline bool SpecializationFilter::_internal_elementalist_tempest() const { return elementalist_tempest_; } inline bool SpecializationFilter::elementalist_tempest() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.elementalist_tempest) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.elementalist_tempest) return _internal_elementalist_tempest(); } inline void SpecializationFilter::_internal_set_elementalist_tempest(bool value) { @@ -9467,7 +9470,7 @@ inline void SpecializationFilter::_internal_set_elementalist_tempest(bool value) } inline void SpecializationFilter::set_elementalist_tempest(bool value) { _internal_set_elementalist_tempest(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.elementalist_tempest) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.elementalist_tempest) } // bool engineer_scrapper = 2; @@ -9478,7 +9481,7 @@ inline bool SpecializationFilter::_internal_engineer_scrapper() const { return engineer_scrapper_; } inline bool SpecializationFilter::engineer_scrapper() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.engineer_scrapper) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.engineer_scrapper) return _internal_engineer_scrapper(); } inline void SpecializationFilter::_internal_set_engineer_scrapper(bool value) { @@ -9487,7 +9490,7 @@ inline void SpecializationFilter::_internal_set_engineer_scrapper(bool value) { } inline void SpecializationFilter::set_engineer_scrapper(bool value) { _internal_set_engineer_scrapper(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.engineer_scrapper) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.engineer_scrapper) } // bool guardian_dragonhunter = 3; @@ -9498,7 +9501,7 @@ inline bool SpecializationFilter::_internal_guardian_dragonhunter() const { return guardian_dragonhunter_; } inline bool SpecializationFilter::guardian_dragonhunter() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.guardian_dragonhunter) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.guardian_dragonhunter) return _internal_guardian_dragonhunter(); } inline void SpecializationFilter::_internal_set_guardian_dragonhunter(bool value) { @@ -9507,7 +9510,7 @@ inline void SpecializationFilter::_internal_set_guardian_dragonhunter(bool value } inline void SpecializationFilter::set_guardian_dragonhunter(bool value) { _internal_set_guardian_dragonhunter(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.guardian_dragonhunter) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.guardian_dragonhunter) } // bool mesmer_chronomancer = 4; @@ -9518,7 +9521,7 @@ inline bool SpecializationFilter::_internal_mesmer_chronomancer() const { return mesmer_chronomancer_; } inline bool SpecializationFilter::mesmer_chronomancer() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.mesmer_chronomancer) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.mesmer_chronomancer) return _internal_mesmer_chronomancer(); } inline void SpecializationFilter::_internal_set_mesmer_chronomancer(bool value) { @@ -9527,7 +9530,7 @@ inline void SpecializationFilter::_internal_set_mesmer_chronomancer(bool value) } inline void SpecializationFilter::set_mesmer_chronomancer(bool value) { _internal_set_mesmer_chronomancer(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.mesmer_chronomancer) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.mesmer_chronomancer) } // bool necromancer_reaper = 5; @@ -9538,7 +9541,7 @@ inline bool SpecializationFilter::_internal_necromancer_reaper() const { return necromancer_reaper_; } inline bool SpecializationFilter::necromancer_reaper() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.necromancer_reaper) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.necromancer_reaper) return _internal_necromancer_reaper(); } inline void SpecializationFilter::_internal_set_necromancer_reaper(bool value) { @@ -9547,7 +9550,7 @@ inline void SpecializationFilter::_internal_set_necromancer_reaper(bool value) { } inline void SpecializationFilter::set_necromancer_reaper(bool value) { _internal_set_necromancer_reaper(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.necromancer_reaper) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.necromancer_reaper) } // bool ranger_druid = 6; @@ -9558,7 +9561,7 @@ inline bool SpecializationFilter::_internal_ranger_druid() const { return ranger_druid_; } inline bool SpecializationFilter::ranger_druid() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.ranger_druid) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.ranger_druid) return _internal_ranger_druid(); } inline void SpecializationFilter::_internal_set_ranger_druid(bool value) { @@ -9567,7 +9570,7 @@ inline void SpecializationFilter::_internal_set_ranger_druid(bool value) { } inline void SpecializationFilter::set_ranger_druid(bool value) { _internal_set_ranger_druid(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.ranger_druid) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.ranger_druid) } // bool revenant_herald = 7; @@ -9578,7 +9581,7 @@ inline bool SpecializationFilter::_internal_revenant_herald() const { return revenant_herald_; } inline bool SpecializationFilter::revenant_herald() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.revenant_herald) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.revenant_herald) return _internal_revenant_herald(); } inline void SpecializationFilter::_internal_set_revenant_herald(bool value) { @@ -9587,7 +9590,7 @@ inline void SpecializationFilter::_internal_set_revenant_herald(bool value) { } inline void SpecializationFilter::set_revenant_herald(bool value) { _internal_set_revenant_herald(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.revenant_herald) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.revenant_herald) } // bool thief_daredevil = 8; @@ -9598,7 +9601,7 @@ inline bool SpecializationFilter::_internal_thief_daredevil() const { return thief_daredevil_; } inline bool SpecializationFilter::thief_daredevil() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.thief_daredevil) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.thief_daredevil) return _internal_thief_daredevil(); } inline void SpecializationFilter::_internal_set_thief_daredevil(bool value) { @@ -9607,7 +9610,7 @@ inline void SpecializationFilter::_internal_set_thief_daredevil(bool value) { } inline void SpecializationFilter::set_thief_daredevil(bool value) { _internal_set_thief_daredevil(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.thief_daredevil) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.thief_daredevil) } // bool warrior_berserker = 9; @@ -9618,7 +9621,7 @@ inline bool SpecializationFilter::_internal_warrior_berserker() const { return warrior_berserker_; } inline bool SpecializationFilter::warrior_berserker() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.warrior_berserker) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.warrior_berserker) return _internal_warrior_berserker(); } inline void SpecializationFilter::_internal_set_warrior_berserker(bool value) { @@ -9627,7 +9630,7 @@ inline void SpecializationFilter::_internal_set_warrior_berserker(bool value) { } inline void SpecializationFilter::set_warrior_berserker(bool value) { _internal_set_warrior_berserker(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.warrior_berserker) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.warrior_berserker) } // bool elementalist_weaver = 10; @@ -9638,7 +9641,7 @@ inline bool SpecializationFilter::_internal_elementalist_weaver() const { return elementalist_weaver_; } inline bool SpecializationFilter::elementalist_weaver() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.elementalist_weaver) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.elementalist_weaver) return _internal_elementalist_weaver(); } inline void SpecializationFilter::_internal_set_elementalist_weaver(bool value) { @@ -9647,7 +9650,7 @@ inline void SpecializationFilter::_internal_set_elementalist_weaver(bool value) } inline void SpecializationFilter::set_elementalist_weaver(bool value) { _internal_set_elementalist_weaver(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.elementalist_weaver) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.elementalist_weaver) } // bool engineer_holosmith = 11; @@ -9658,7 +9661,7 @@ inline bool SpecializationFilter::_internal_engineer_holosmith() const { return engineer_holosmith_; } inline bool SpecializationFilter::engineer_holosmith() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.engineer_holosmith) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.engineer_holosmith) return _internal_engineer_holosmith(); } inline void SpecializationFilter::_internal_set_engineer_holosmith(bool value) { @@ -9667,7 +9670,7 @@ inline void SpecializationFilter::_internal_set_engineer_holosmith(bool value) { } inline void SpecializationFilter::set_engineer_holosmith(bool value) { _internal_set_engineer_holosmith(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.engineer_holosmith) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.engineer_holosmith) } // bool guardian_firebrand = 12; @@ -9678,7 +9681,7 @@ inline bool SpecializationFilter::_internal_guardian_firebrand() const { return guardian_firebrand_; } inline bool SpecializationFilter::guardian_firebrand() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.guardian_firebrand) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.guardian_firebrand) return _internal_guardian_firebrand(); } inline void SpecializationFilter::_internal_set_guardian_firebrand(bool value) { @@ -9687,7 +9690,7 @@ inline void SpecializationFilter::_internal_set_guardian_firebrand(bool value) { } inline void SpecializationFilter::set_guardian_firebrand(bool value) { _internal_set_guardian_firebrand(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.guardian_firebrand) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.guardian_firebrand) } // bool mesmer_mirage = 13; @@ -9698,7 +9701,7 @@ inline bool SpecializationFilter::_internal_mesmer_mirage() const { return mesmer_mirage_; } inline bool SpecializationFilter::mesmer_mirage() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.mesmer_mirage) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.mesmer_mirage) return _internal_mesmer_mirage(); } inline void SpecializationFilter::_internal_set_mesmer_mirage(bool value) { @@ -9707,7 +9710,7 @@ inline void SpecializationFilter::_internal_set_mesmer_mirage(bool value) { } inline void SpecializationFilter::set_mesmer_mirage(bool value) { _internal_set_mesmer_mirage(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.mesmer_mirage) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.mesmer_mirage) } // bool necromancer_scourge = 14; @@ -9718,7 +9721,7 @@ inline bool SpecializationFilter::_internal_necromancer_scourge() const { return necromancer_scourge_; } inline bool SpecializationFilter::necromancer_scourge() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.necromancer_scourge) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.necromancer_scourge) return _internal_necromancer_scourge(); } inline void SpecializationFilter::_internal_set_necromancer_scourge(bool value) { @@ -9727,7 +9730,7 @@ inline void SpecializationFilter::_internal_set_necromancer_scourge(bool value) } inline void SpecializationFilter::set_necromancer_scourge(bool value) { _internal_set_necromancer_scourge(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.necromancer_scourge) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.necromancer_scourge) } // bool ranger_soulbeast = 15; @@ -9738,7 +9741,7 @@ inline bool SpecializationFilter::_internal_ranger_soulbeast() const { return ranger_soulbeast_; } inline bool SpecializationFilter::ranger_soulbeast() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.ranger_soulbeast) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.ranger_soulbeast) return _internal_ranger_soulbeast(); } inline void SpecializationFilter::_internal_set_ranger_soulbeast(bool value) { @@ -9747,7 +9750,7 @@ inline void SpecializationFilter::_internal_set_ranger_soulbeast(bool value) { } inline void SpecializationFilter::set_ranger_soulbeast(bool value) { _internal_set_ranger_soulbeast(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.ranger_soulbeast) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.ranger_soulbeast) } // bool revenant_renegade = 16; @@ -9758,7 +9761,7 @@ inline bool SpecializationFilter::_internal_revenant_renegade() const { return revenant_renegade_; } inline bool SpecializationFilter::revenant_renegade() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.revenant_renegade) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.revenant_renegade) return _internal_revenant_renegade(); } inline void SpecializationFilter::_internal_set_revenant_renegade(bool value) { @@ -9767,7 +9770,7 @@ inline void SpecializationFilter::_internal_set_revenant_renegade(bool value) { } inline void SpecializationFilter::set_revenant_renegade(bool value) { _internal_set_revenant_renegade(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.revenant_renegade) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.revenant_renegade) } // bool thief_deadeye = 17; @@ -9778,7 +9781,7 @@ inline bool SpecializationFilter::_internal_thief_deadeye() const { return thief_deadeye_; } inline bool SpecializationFilter::thief_deadeye() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.thief_deadeye) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.thief_deadeye) return _internal_thief_deadeye(); } inline void SpecializationFilter::_internal_set_thief_deadeye(bool value) { @@ -9787,7 +9790,7 @@ inline void SpecializationFilter::_internal_set_thief_deadeye(bool value) { } inline void SpecializationFilter::set_thief_deadeye(bool value) { _internal_set_thief_deadeye(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.thief_deadeye) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.thief_deadeye) } // bool warrior_spellbreaker = 18; @@ -9798,7 +9801,7 @@ inline bool SpecializationFilter::_internal_warrior_spellbreaker() const { return warrior_spellbreaker_; } inline bool SpecializationFilter::warrior_spellbreaker() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.warrior_spellbreaker) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.warrior_spellbreaker) return _internal_warrior_spellbreaker(); } inline void SpecializationFilter::_internal_set_warrior_spellbreaker(bool value) { @@ -9807,7 +9810,7 @@ inline void SpecializationFilter::_internal_set_warrior_spellbreaker(bool value) } inline void SpecializationFilter::set_warrior_spellbreaker(bool value) { _internal_set_warrior_spellbreaker(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.warrior_spellbreaker) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.warrior_spellbreaker) } // bool elmentalist_catalyst = 19; @@ -9818,7 +9821,7 @@ inline bool SpecializationFilter::_internal_elmentalist_catalyst() const { return elmentalist_catalyst_; } inline bool SpecializationFilter::elmentalist_catalyst() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.elmentalist_catalyst) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.elmentalist_catalyst) return _internal_elmentalist_catalyst(); } inline void SpecializationFilter::_internal_set_elmentalist_catalyst(bool value) { @@ -9827,7 +9830,7 @@ inline void SpecializationFilter::_internal_set_elmentalist_catalyst(bool value) } inline void SpecializationFilter::set_elmentalist_catalyst(bool value) { _internal_set_elmentalist_catalyst(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.elmentalist_catalyst) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.elmentalist_catalyst) } // bool engineer_mechanist = 20; @@ -9838,7 +9841,7 @@ inline bool SpecializationFilter::_internal_engineer_mechanist() const { return engineer_mechanist_; } inline bool SpecializationFilter::engineer_mechanist() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.engineer_mechanist) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.engineer_mechanist) return _internal_engineer_mechanist(); } inline void SpecializationFilter::_internal_set_engineer_mechanist(bool value) { @@ -9847,7 +9850,7 @@ inline void SpecializationFilter::_internal_set_engineer_mechanist(bool value) { } inline void SpecializationFilter::set_engineer_mechanist(bool value) { _internal_set_engineer_mechanist(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.engineer_mechanist) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.engineer_mechanist) } // bool guardian_willbender = 21; @@ -9858,7 +9861,7 @@ inline bool SpecializationFilter::_internal_guardian_willbender() const { return guardian_willbender_; } inline bool SpecializationFilter::guardian_willbender() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.guardian_willbender) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.guardian_willbender) return _internal_guardian_willbender(); } inline void SpecializationFilter::_internal_set_guardian_willbender(bool value) { @@ -9867,7 +9870,7 @@ inline void SpecializationFilter::_internal_set_guardian_willbender(bool value) } inline void SpecializationFilter::set_guardian_willbender(bool value) { _internal_set_guardian_willbender(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.guardian_willbender) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.guardian_willbender) } // bool mesmer_virtuoso = 22; @@ -9878,7 +9881,7 @@ inline bool SpecializationFilter::_internal_mesmer_virtuoso() const { return mesmer_virtuoso_; } inline bool SpecializationFilter::mesmer_virtuoso() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.mesmer_virtuoso) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.mesmer_virtuoso) return _internal_mesmer_virtuoso(); } inline void SpecializationFilter::_internal_set_mesmer_virtuoso(bool value) { @@ -9887,7 +9890,7 @@ inline void SpecializationFilter::_internal_set_mesmer_virtuoso(bool value) { } inline void SpecializationFilter::set_mesmer_virtuoso(bool value) { _internal_set_mesmer_virtuoso(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.mesmer_virtuoso) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.mesmer_virtuoso) } // bool necromancer_harbinger = 23; @@ -9898,7 +9901,7 @@ inline bool SpecializationFilter::_internal_necromancer_harbinger() const { return necromancer_harbinger_; } inline bool SpecializationFilter::necromancer_harbinger() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.necromancer_harbinger) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.necromancer_harbinger) return _internal_necromancer_harbinger(); } inline void SpecializationFilter::_internal_set_necromancer_harbinger(bool value) { @@ -9907,7 +9910,7 @@ inline void SpecializationFilter::_internal_set_necromancer_harbinger(bool value } inline void SpecializationFilter::set_necromancer_harbinger(bool value) { _internal_set_necromancer_harbinger(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.necromancer_harbinger) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.necromancer_harbinger) } // bool ranger_untamed = 24; @@ -9918,7 +9921,7 @@ inline bool SpecializationFilter::_internal_ranger_untamed() const { return ranger_untamed_; } inline bool SpecializationFilter::ranger_untamed() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.ranger_untamed) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.ranger_untamed) return _internal_ranger_untamed(); } inline void SpecializationFilter::_internal_set_ranger_untamed(bool value) { @@ -9927,7 +9930,7 @@ inline void SpecializationFilter::_internal_set_ranger_untamed(bool value) { } inline void SpecializationFilter::set_ranger_untamed(bool value) { _internal_set_ranger_untamed(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.ranger_untamed) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.ranger_untamed) } // bool revenant_vindicator = 25; @@ -9938,7 +9941,7 @@ inline bool SpecializationFilter::_internal_revenant_vindicator() const { return revenant_vindicator_; } inline bool SpecializationFilter::revenant_vindicator() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.revenant_vindicator) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.revenant_vindicator) return _internal_revenant_vindicator(); } inline void SpecializationFilter::_internal_set_revenant_vindicator(bool value) { @@ -9947,7 +9950,7 @@ inline void SpecializationFilter::_internal_set_revenant_vindicator(bool value) } inline void SpecializationFilter::set_revenant_vindicator(bool value) { _internal_set_revenant_vindicator(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.revenant_vindicator) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.revenant_vindicator) } // bool thief_specter = 26; @@ -9958,7 +9961,7 @@ inline bool SpecializationFilter::_internal_thief_specter() const { return thief_specter_; } inline bool SpecializationFilter::thief_specter() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.thief_specter) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.thief_specter) return _internal_thief_specter(); } inline void SpecializationFilter::_internal_set_thief_specter(bool value) { @@ -9967,7 +9970,7 @@ inline void SpecializationFilter::_internal_set_thief_specter(bool value) { } inline void SpecializationFilter::set_thief_specter(bool value) { _internal_set_thief_specter(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.thief_specter) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.thief_specter) } // bool warrior_bladesworn = 27; @@ -9978,7 +9981,7 @@ inline bool SpecializationFilter::_internal_warrior_bladesworn() const { return warrior_bladesworn_; } inline bool SpecializationFilter::warrior_bladesworn() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.warrior_bladesworn) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.warrior_bladesworn) return _internal_warrior_bladesworn(); } inline void SpecializationFilter::_internal_set_warrior_bladesworn(bool value) { @@ -9987,7 +9990,7 @@ inline void SpecializationFilter::_internal_set_warrior_bladesworn(bool value) { } inline void SpecializationFilter::set_warrior_bladesworn(bool value) { _internal_set_warrior_bladesworn(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.warrior_bladesworn) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.warrior_bladesworn) } // bool elementalist_air = 28; @@ -9998,7 +10001,7 @@ inline bool SpecializationFilter::_internal_elementalist_air() const { return elementalist_air_; } inline bool SpecializationFilter::elementalist_air() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.elementalist_air) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.elementalist_air) return _internal_elementalist_air(); } inline void SpecializationFilter::_internal_set_elementalist_air(bool value) { @@ -10007,7 +10010,7 @@ inline void SpecializationFilter::_internal_set_elementalist_air(bool value) { } inline void SpecializationFilter::set_elementalist_air(bool value) { _internal_set_elementalist_air(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.elementalist_air) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.elementalist_air) } // bool elementalist_arcane = 29; @@ -10018,7 +10021,7 @@ inline bool SpecializationFilter::_internal_elementalist_arcane() const { return elementalist_arcane_; } inline bool SpecializationFilter::elementalist_arcane() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.elementalist_arcane) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.elementalist_arcane) return _internal_elementalist_arcane(); } inline void SpecializationFilter::_internal_set_elementalist_arcane(bool value) { @@ -10027,7 +10030,7 @@ inline void SpecializationFilter::_internal_set_elementalist_arcane(bool value) } inline void SpecializationFilter::set_elementalist_arcane(bool value) { _internal_set_elementalist_arcane(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.elementalist_arcane) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.elementalist_arcane) } // bool elementalist_earth = 30; @@ -10038,7 +10041,7 @@ inline bool SpecializationFilter::_internal_elementalist_earth() const { return elementalist_earth_; } inline bool SpecializationFilter::elementalist_earth() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.elementalist_earth) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.elementalist_earth) return _internal_elementalist_earth(); } inline void SpecializationFilter::_internal_set_elementalist_earth(bool value) { @@ -10047,7 +10050,7 @@ inline void SpecializationFilter::_internal_set_elementalist_earth(bool value) { } inline void SpecializationFilter::set_elementalist_earth(bool value) { _internal_set_elementalist_earth(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.elementalist_earth) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.elementalist_earth) } // bool elementalist_fire = 31; @@ -10058,7 +10061,7 @@ inline bool SpecializationFilter::_internal_elementalist_fire() const { return elementalist_fire_; } inline bool SpecializationFilter::elementalist_fire() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.elementalist_fire) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.elementalist_fire) return _internal_elementalist_fire(); } inline void SpecializationFilter::_internal_set_elementalist_fire(bool value) { @@ -10067,7 +10070,7 @@ inline void SpecializationFilter::_internal_set_elementalist_fire(bool value) { } inline void SpecializationFilter::set_elementalist_fire(bool value) { _internal_set_elementalist_fire(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.elementalist_fire) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.elementalist_fire) } // bool elementalist_water = 32; @@ -10078,7 +10081,7 @@ inline bool SpecializationFilter::_internal_elementalist_water() const { return elementalist_water_; } inline bool SpecializationFilter::elementalist_water() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.elementalist_water) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.elementalist_water) return _internal_elementalist_water(); } inline void SpecializationFilter::_internal_set_elementalist_water(bool value) { @@ -10087,7 +10090,7 @@ inline void SpecializationFilter::_internal_set_elementalist_water(bool value) { } inline void SpecializationFilter::set_elementalist_water(bool value) { _internal_set_elementalist_water(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.elementalist_water) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.elementalist_water) } // bool engineer_alchemy = 33; @@ -10098,7 +10101,7 @@ inline bool SpecializationFilter::_internal_engineer_alchemy() const { return engineer_alchemy_; } inline bool SpecializationFilter::engineer_alchemy() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.engineer_alchemy) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.engineer_alchemy) return _internal_engineer_alchemy(); } inline void SpecializationFilter::_internal_set_engineer_alchemy(bool value) { @@ -10107,7 +10110,7 @@ inline void SpecializationFilter::_internal_set_engineer_alchemy(bool value) { } inline void SpecializationFilter::set_engineer_alchemy(bool value) { _internal_set_engineer_alchemy(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.engineer_alchemy) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.engineer_alchemy) } // bool engineer_explosives = 34; @@ -10118,7 +10121,7 @@ inline bool SpecializationFilter::_internal_engineer_explosives() const { return engineer_explosives_; } inline bool SpecializationFilter::engineer_explosives() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.engineer_explosives) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.engineer_explosives) return _internal_engineer_explosives(); } inline void SpecializationFilter::_internal_set_engineer_explosives(bool value) { @@ -10127,7 +10130,7 @@ inline void SpecializationFilter::_internal_set_engineer_explosives(bool value) } inline void SpecializationFilter::set_engineer_explosives(bool value) { _internal_set_engineer_explosives(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.engineer_explosives) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.engineer_explosives) } // bool engineer_firearms = 35; @@ -10138,7 +10141,7 @@ inline bool SpecializationFilter::_internal_engineer_firearms() const { return engineer_firearms_; } inline bool SpecializationFilter::engineer_firearms() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.engineer_firearms) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.engineer_firearms) return _internal_engineer_firearms(); } inline void SpecializationFilter::_internal_set_engineer_firearms(bool value) { @@ -10147,7 +10150,7 @@ inline void SpecializationFilter::_internal_set_engineer_firearms(bool value) { } inline void SpecializationFilter::set_engineer_firearms(bool value) { _internal_set_engineer_firearms(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.engineer_firearms) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.engineer_firearms) } // bool engineer_inventions = 36; @@ -10158,7 +10161,7 @@ inline bool SpecializationFilter::_internal_engineer_inventions() const { return engineer_inventions_; } inline bool SpecializationFilter::engineer_inventions() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.engineer_inventions) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.engineer_inventions) return _internal_engineer_inventions(); } inline void SpecializationFilter::_internal_set_engineer_inventions(bool value) { @@ -10167,7 +10170,7 @@ inline void SpecializationFilter::_internal_set_engineer_inventions(bool value) } inline void SpecializationFilter::set_engineer_inventions(bool value) { _internal_set_engineer_inventions(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.engineer_inventions) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.engineer_inventions) } // bool engineer_tools = 37; @@ -10178,7 +10181,7 @@ inline bool SpecializationFilter::_internal_engineer_tools() const { return engineer_tools_; } inline bool SpecializationFilter::engineer_tools() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.engineer_tools) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.engineer_tools) return _internal_engineer_tools(); } inline void SpecializationFilter::_internal_set_engineer_tools(bool value) { @@ -10187,7 +10190,7 @@ inline void SpecializationFilter::_internal_set_engineer_tools(bool value) { } inline void SpecializationFilter::set_engineer_tools(bool value) { _internal_set_engineer_tools(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.engineer_tools) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.engineer_tools) } // bool guardian_honor = 38; @@ -10198,7 +10201,7 @@ inline bool SpecializationFilter::_internal_guardian_honor() const { return guardian_honor_; } inline bool SpecializationFilter::guardian_honor() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.guardian_honor) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.guardian_honor) return _internal_guardian_honor(); } inline void SpecializationFilter::_internal_set_guardian_honor(bool value) { @@ -10207,7 +10210,7 @@ inline void SpecializationFilter::_internal_set_guardian_honor(bool value) { } inline void SpecializationFilter::set_guardian_honor(bool value) { _internal_set_guardian_honor(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.guardian_honor) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.guardian_honor) } // bool guardian_radiance = 39; @@ -10218,7 +10221,7 @@ inline bool SpecializationFilter::_internal_guardian_radiance() const { return guardian_radiance_; } inline bool SpecializationFilter::guardian_radiance() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.guardian_radiance) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.guardian_radiance) return _internal_guardian_radiance(); } inline void SpecializationFilter::_internal_set_guardian_radiance(bool value) { @@ -10227,7 +10230,7 @@ inline void SpecializationFilter::_internal_set_guardian_radiance(bool value) { } inline void SpecializationFilter::set_guardian_radiance(bool value) { _internal_set_guardian_radiance(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.guardian_radiance) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.guardian_radiance) } // bool guardian_valor = 40; @@ -10238,7 +10241,7 @@ inline bool SpecializationFilter::_internal_guardian_valor() const { return guardian_valor_; } inline bool SpecializationFilter::guardian_valor() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.guardian_valor) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.guardian_valor) return _internal_guardian_valor(); } inline void SpecializationFilter::_internal_set_guardian_valor(bool value) { @@ -10247,7 +10250,7 @@ inline void SpecializationFilter::_internal_set_guardian_valor(bool value) { } inline void SpecializationFilter::set_guardian_valor(bool value) { _internal_set_guardian_valor(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.guardian_valor) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.guardian_valor) } // bool guardian_virtues = 41; @@ -10258,7 +10261,7 @@ inline bool SpecializationFilter::_internal_guardian_virtues() const { return guardian_virtues_; } inline bool SpecializationFilter::guardian_virtues() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.guardian_virtues) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.guardian_virtues) return _internal_guardian_virtues(); } inline void SpecializationFilter::_internal_set_guardian_virtues(bool value) { @@ -10267,7 +10270,7 @@ inline void SpecializationFilter::_internal_set_guardian_virtues(bool value) { } inline void SpecializationFilter::set_guardian_virtues(bool value) { _internal_set_guardian_virtues(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.guardian_virtues) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.guardian_virtues) } // bool guardian_zeal = 42; @@ -10278,7 +10281,7 @@ inline bool SpecializationFilter::_internal_guardian_zeal() const { return guardian_zeal_; } inline bool SpecializationFilter::guardian_zeal() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.guardian_zeal) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.guardian_zeal) return _internal_guardian_zeal(); } inline void SpecializationFilter::_internal_set_guardian_zeal(bool value) { @@ -10287,7 +10290,7 @@ inline void SpecializationFilter::_internal_set_guardian_zeal(bool value) { } inline void SpecializationFilter::set_guardian_zeal(bool value) { _internal_set_guardian_zeal(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.guardian_zeal) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.guardian_zeal) } // bool mesmer_chaos = 43; @@ -10298,7 +10301,7 @@ inline bool SpecializationFilter::_internal_mesmer_chaos() const { return mesmer_chaos_; } inline bool SpecializationFilter::mesmer_chaos() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.mesmer_chaos) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.mesmer_chaos) return _internal_mesmer_chaos(); } inline void SpecializationFilter::_internal_set_mesmer_chaos(bool value) { @@ -10307,7 +10310,7 @@ inline void SpecializationFilter::_internal_set_mesmer_chaos(bool value) { } inline void SpecializationFilter::set_mesmer_chaos(bool value) { _internal_set_mesmer_chaos(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.mesmer_chaos) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.mesmer_chaos) } // bool mesmer_domination = 44; @@ -10318,7 +10321,7 @@ inline bool SpecializationFilter::_internal_mesmer_domination() const { return mesmer_domination_; } inline bool SpecializationFilter::mesmer_domination() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.mesmer_domination) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.mesmer_domination) return _internal_mesmer_domination(); } inline void SpecializationFilter::_internal_set_mesmer_domination(bool value) { @@ -10327,7 +10330,7 @@ inline void SpecializationFilter::_internal_set_mesmer_domination(bool value) { } inline void SpecializationFilter::set_mesmer_domination(bool value) { _internal_set_mesmer_domination(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.mesmer_domination) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.mesmer_domination) } // bool mesmer_dueling = 45; @@ -10338,7 +10341,7 @@ inline bool SpecializationFilter::_internal_mesmer_dueling() const { return mesmer_dueling_; } inline bool SpecializationFilter::mesmer_dueling() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.mesmer_dueling) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.mesmer_dueling) return _internal_mesmer_dueling(); } inline void SpecializationFilter::_internal_set_mesmer_dueling(bool value) { @@ -10347,7 +10350,7 @@ inline void SpecializationFilter::_internal_set_mesmer_dueling(bool value) { } inline void SpecializationFilter::set_mesmer_dueling(bool value) { _internal_set_mesmer_dueling(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.mesmer_dueling) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.mesmer_dueling) } // bool mesmer_illusions = 46; @@ -10358,7 +10361,7 @@ inline bool SpecializationFilter::_internal_mesmer_illusions() const { return mesmer_illusions_; } inline bool SpecializationFilter::mesmer_illusions() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.mesmer_illusions) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.mesmer_illusions) return _internal_mesmer_illusions(); } inline void SpecializationFilter::_internal_set_mesmer_illusions(bool value) { @@ -10367,7 +10370,7 @@ inline void SpecializationFilter::_internal_set_mesmer_illusions(bool value) { } inline void SpecializationFilter::set_mesmer_illusions(bool value) { _internal_set_mesmer_illusions(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.mesmer_illusions) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.mesmer_illusions) } // bool mesmer_inspiration = 47; @@ -10378,7 +10381,7 @@ inline bool SpecializationFilter::_internal_mesmer_inspiration() const { return mesmer_inspiration_; } inline bool SpecializationFilter::mesmer_inspiration() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.mesmer_inspiration) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.mesmer_inspiration) return _internal_mesmer_inspiration(); } inline void SpecializationFilter::_internal_set_mesmer_inspiration(bool value) { @@ -10387,7 +10390,7 @@ inline void SpecializationFilter::_internal_set_mesmer_inspiration(bool value) { } inline void SpecializationFilter::set_mesmer_inspiration(bool value) { _internal_set_mesmer_inspiration(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.mesmer_inspiration) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.mesmer_inspiration) } // bool necromancer_blood_magic = 48; @@ -10398,7 +10401,7 @@ inline bool SpecializationFilter::_internal_necromancer_blood_magic() const { return necromancer_blood_magic_; } inline bool SpecializationFilter::necromancer_blood_magic() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.necromancer_blood_magic) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.necromancer_blood_magic) return _internal_necromancer_blood_magic(); } inline void SpecializationFilter::_internal_set_necromancer_blood_magic(bool value) { @@ -10407,7 +10410,7 @@ inline void SpecializationFilter::_internal_set_necromancer_blood_magic(bool val } inline void SpecializationFilter::set_necromancer_blood_magic(bool value) { _internal_set_necromancer_blood_magic(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.necromancer_blood_magic) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.necromancer_blood_magic) } // bool necromancer_curses = 49; @@ -10418,7 +10421,7 @@ inline bool SpecializationFilter::_internal_necromancer_curses() const { return necromancer_curses_; } inline bool SpecializationFilter::necromancer_curses() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.necromancer_curses) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.necromancer_curses) return _internal_necromancer_curses(); } inline void SpecializationFilter::_internal_set_necromancer_curses(bool value) { @@ -10427,7 +10430,7 @@ inline void SpecializationFilter::_internal_set_necromancer_curses(bool value) { } inline void SpecializationFilter::set_necromancer_curses(bool value) { _internal_set_necromancer_curses(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.necromancer_curses) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.necromancer_curses) } // bool necromancer_death_magic = 50; @@ -10438,7 +10441,7 @@ inline bool SpecializationFilter::_internal_necromancer_death_magic() const { return necromancer_death_magic_; } inline bool SpecializationFilter::necromancer_death_magic() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.necromancer_death_magic) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.necromancer_death_magic) return _internal_necromancer_death_magic(); } inline void SpecializationFilter::_internal_set_necromancer_death_magic(bool value) { @@ -10447,7 +10450,7 @@ inline void SpecializationFilter::_internal_set_necromancer_death_magic(bool val } inline void SpecializationFilter::set_necromancer_death_magic(bool value) { _internal_set_necromancer_death_magic(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.necromancer_death_magic) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.necromancer_death_magic) } // bool necromancer_soul_reaping = 51; @@ -10458,7 +10461,7 @@ inline bool SpecializationFilter::_internal_necromancer_soul_reaping() const { return necromancer_soul_reaping_; } inline bool SpecializationFilter::necromancer_soul_reaping() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.necromancer_soul_reaping) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.necromancer_soul_reaping) return _internal_necromancer_soul_reaping(); } inline void SpecializationFilter::_internal_set_necromancer_soul_reaping(bool value) { @@ -10467,7 +10470,7 @@ inline void SpecializationFilter::_internal_set_necromancer_soul_reaping(bool va } inline void SpecializationFilter::set_necromancer_soul_reaping(bool value) { _internal_set_necromancer_soul_reaping(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.necromancer_soul_reaping) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.necromancer_soul_reaping) } // bool necromancer_spite = 52; @@ -10478,7 +10481,7 @@ inline bool SpecializationFilter::_internal_necromancer_spite() const { return necromancer_spite_; } inline bool SpecializationFilter::necromancer_spite() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.necromancer_spite) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.necromancer_spite) return _internal_necromancer_spite(); } inline void SpecializationFilter::_internal_set_necromancer_spite(bool value) { @@ -10487,7 +10490,7 @@ inline void SpecializationFilter::_internal_set_necromancer_spite(bool value) { } inline void SpecializationFilter::set_necromancer_spite(bool value) { _internal_set_necromancer_spite(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.necromancer_spite) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.necromancer_spite) } // bool ranger_beastmastery = 53; @@ -10498,7 +10501,7 @@ inline bool SpecializationFilter::_internal_ranger_beastmastery() const { return ranger_beastmastery_; } inline bool SpecializationFilter::ranger_beastmastery() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.ranger_beastmastery) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.ranger_beastmastery) return _internal_ranger_beastmastery(); } inline void SpecializationFilter::_internal_set_ranger_beastmastery(bool value) { @@ -10507,7 +10510,7 @@ inline void SpecializationFilter::_internal_set_ranger_beastmastery(bool value) } inline void SpecializationFilter::set_ranger_beastmastery(bool value) { _internal_set_ranger_beastmastery(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.ranger_beastmastery) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.ranger_beastmastery) } // bool ranger_marksmanship = 54; @@ -10518,7 +10521,7 @@ inline bool SpecializationFilter::_internal_ranger_marksmanship() const { return ranger_marksmanship_; } inline bool SpecializationFilter::ranger_marksmanship() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.ranger_marksmanship) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.ranger_marksmanship) return _internal_ranger_marksmanship(); } inline void SpecializationFilter::_internal_set_ranger_marksmanship(bool value) { @@ -10527,7 +10530,7 @@ inline void SpecializationFilter::_internal_set_ranger_marksmanship(bool value) } inline void SpecializationFilter::set_ranger_marksmanship(bool value) { _internal_set_ranger_marksmanship(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.ranger_marksmanship) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.ranger_marksmanship) } // bool ranger_nature_magic = 55; @@ -10538,7 +10541,7 @@ inline bool SpecializationFilter::_internal_ranger_nature_magic() const { return ranger_nature_magic_; } inline bool SpecializationFilter::ranger_nature_magic() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.ranger_nature_magic) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.ranger_nature_magic) return _internal_ranger_nature_magic(); } inline void SpecializationFilter::_internal_set_ranger_nature_magic(bool value) { @@ -10547,7 +10550,7 @@ inline void SpecializationFilter::_internal_set_ranger_nature_magic(bool value) } inline void SpecializationFilter::set_ranger_nature_magic(bool value) { _internal_set_ranger_nature_magic(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.ranger_nature_magic) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.ranger_nature_magic) } // bool ranger_skirmishing = 56; @@ -10558,7 +10561,7 @@ inline bool SpecializationFilter::_internal_ranger_skirmishing() const { return ranger_skirmishing_; } inline bool SpecializationFilter::ranger_skirmishing() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.ranger_skirmishing) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.ranger_skirmishing) return _internal_ranger_skirmishing(); } inline void SpecializationFilter::_internal_set_ranger_skirmishing(bool value) { @@ -10567,7 +10570,7 @@ inline void SpecializationFilter::_internal_set_ranger_skirmishing(bool value) { } inline void SpecializationFilter::set_ranger_skirmishing(bool value) { _internal_set_ranger_skirmishing(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.ranger_skirmishing) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.ranger_skirmishing) } // bool ranger_wilderness_survival = 57; @@ -10578,7 +10581,7 @@ inline bool SpecializationFilter::_internal_ranger_wilderness_survival() const { return ranger_wilderness_survival_; } inline bool SpecializationFilter::ranger_wilderness_survival() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.ranger_wilderness_survival) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.ranger_wilderness_survival) return _internal_ranger_wilderness_survival(); } inline void SpecializationFilter::_internal_set_ranger_wilderness_survival(bool value) { @@ -10587,7 +10590,7 @@ inline void SpecializationFilter::_internal_set_ranger_wilderness_survival(bool } inline void SpecializationFilter::set_ranger_wilderness_survival(bool value) { _internal_set_ranger_wilderness_survival(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.ranger_wilderness_survival) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.ranger_wilderness_survival) } // bool revenant_corruption = 58; @@ -10598,7 +10601,7 @@ inline bool SpecializationFilter::_internal_revenant_corruption() const { return revenant_corruption_; } inline bool SpecializationFilter::revenant_corruption() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.revenant_corruption) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.revenant_corruption) return _internal_revenant_corruption(); } inline void SpecializationFilter::_internal_set_revenant_corruption(bool value) { @@ -10607,7 +10610,7 @@ inline void SpecializationFilter::_internal_set_revenant_corruption(bool value) } inline void SpecializationFilter::set_revenant_corruption(bool value) { _internal_set_revenant_corruption(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.revenant_corruption) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.revenant_corruption) } // bool revenant_devastation = 59; @@ -10618,7 +10621,7 @@ inline bool SpecializationFilter::_internal_revenant_devastation() const { return revenant_devastation_; } inline bool SpecializationFilter::revenant_devastation() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.revenant_devastation) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.revenant_devastation) return _internal_revenant_devastation(); } inline void SpecializationFilter::_internal_set_revenant_devastation(bool value) { @@ -10627,7 +10630,7 @@ inline void SpecializationFilter::_internal_set_revenant_devastation(bool value) } inline void SpecializationFilter::set_revenant_devastation(bool value) { _internal_set_revenant_devastation(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.revenant_devastation) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.revenant_devastation) } // bool revenant_invocation = 60; @@ -10638,7 +10641,7 @@ inline bool SpecializationFilter::_internal_revenant_invocation() const { return revenant_invocation_; } inline bool SpecializationFilter::revenant_invocation() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.revenant_invocation) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.revenant_invocation) return _internal_revenant_invocation(); } inline void SpecializationFilter::_internal_set_revenant_invocation(bool value) { @@ -10647,7 +10650,7 @@ inline void SpecializationFilter::_internal_set_revenant_invocation(bool value) } inline void SpecializationFilter::set_revenant_invocation(bool value) { _internal_set_revenant_invocation(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.revenant_invocation) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.revenant_invocation) } // bool revenant_retribution = 61; @@ -10658,7 +10661,7 @@ inline bool SpecializationFilter::_internal_revenant_retribution() const { return revenant_retribution_; } inline bool SpecializationFilter::revenant_retribution() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.revenant_retribution) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.revenant_retribution) return _internal_revenant_retribution(); } inline void SpecializationFilter::_internal_set_revenant_retribution(bool value) { @@ -10667,7 +10670,7 @@ inline void SpecializationFilter::_internal_set_revenant_retribution(bool value) } inline void SpecializationFilter::set_revenant_retribution(bool value) { _internal_set_revenant_retribution(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.revenant_retribution) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.revenant_retribution) } // bool revenant_salvation = 62; @@ -10678,7 +10681,7 @@ inline bool SpecializationFilter::_internal_revenant_salvation() const { return revenant_salvation_; } inline bool SpecializationFilter::revenant_salvation() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.revenant_salvation) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.revenant_salvation) return _internal_revenant_salvation(); } inline void SpecializationFilter::_internal_set_revenant_salvation(bool value) { @@ -10687,7 +10690,7 @@ inline void SpecializationFilter::_internal_set_revenant_salvation(bool value) { } inline void SpecializationFilter::set_revenant_salvation(bool value) { _internal_set_revenant_salvation(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.revenant_salvation) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.revenant_salvation) } // bool thief_acrobatics = 63; @@ -10698,7 +10701,7 @@ inline bool SpecializationFilter::_internal_thief_acrobatics() const { return thief_acrobatics_; } inline bool SpecializationFilter::thief_acrobatics() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.thief_acrobatics) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.thief_acrobatics) return _internal_thief_acrobatics(); } inline void SpecializationFilter::_internal_set_thief_acrobatics(bool value) { @@ -10707,7 +10710,7 @@ inline void SpecializationFilter::_internal_set_thief_acrobatics(bool value) { } inline void SpecializationFilter::set_thief_acrobatics(bool value) { _internal_set_thief_acrobatics(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.thief_acrobatics) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.thief_acrobatics) } // bool thief_critical_strikes = 64; @@ -10718,7 +10721,7 @@ inline bool SpecializationFilter::_internal_thief_critical_strikes() const { return thief_critical_strikes_; } inline bool SpecializationFilter::thief_critical_strikes() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.thief_critical_strikes) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.thief_critical_strikes) return _internal_thief_critical_strikes(); } inline void SpecializationFilter::_internal_set_thief_critical_strikes(bool value) { @@ -10727,7 +10730,7 @@ inline void SpecializationFilter::_internal_set_thief_critical_strikes(bool valu } inline void SpecializationFilter::set_thief_critical_strikes(bool value) { _internal_set_thief_critical_strikes(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.thief_critical_strikes) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.thief_critical_strikes) } // bool thief_deadly_arts = 65; @@ -10738,7 +10741,7 @@ inline bool SpecializationFilter::_internal_thief_deadly_arts() const { return thief_deadly_arts_; } inline bool SpecializationFilter::thief_deadly_arts() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.thief_deadly_arts) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.thief_deadly_arts) return _internal_thief_deadly_arts(); } inline void SpecializationFilter::_internal_set_thief_deadly_arts(bool value) { @@ -10747,7 +10750,7 @@ inline void SpecializationFilter::_internal_set_thief_deadly_arts(bool value) { } inline void SpecializationFilter::set_thief_deadly_arts(bool value) { _internal_set_thief_deadly_arts(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.thief_deadly_arts) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.thief_deadly_arts) } // bool thief_shadow_arts = 66; @@ -10758,7 +10761,7 @@ inline bool SpecializationFilter::_internal_thief_shadow_arts() const { return thief_shadow_arts_; } inline bool SpecializationFilter::thief_shadow_arts() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.thief_shadow_arts) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.thief_shadow_arts) return _internal_thief_shadow_arts(); } inline void SpecializationFilter::_internal_set_thief_shadow_arts(bool value) { @@ -10767,7 +10770,7 @@ inline void SpecializationFilter::_internal_set_thief_shadow_arts(bool value) { } inline void SpecializationFilter::set_thief_shadow_arts(bool value) { _internal_set_thief_shadow_arts(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.thief_shadow_arts) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.thief_shadow_arts) } // bool thief_trickery = 67; @@ -10778,7 +10781,7 @@ inline bool SpecializationFilter::_internal_thief_trickery() const { return thief_trickery_; } inline bool SpecializationFilter::thief_trickery() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.thief_trickery) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.thief_trickery) return _internal_thief_trickery(); } inline void SpecializationFilter::_internal_set_thief_trickery(bool value) { @@ -10787,7 +10790,7 @@ inline void SpecializationFilter::_internal_set_thief_trickery(bool value) { } inline void SpecializationFilter::set_thief_trickery(bool value) { _internal_set_thief_trickery(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.thief_trickery) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.thief_trickery) } // bool warrior_arms = 68; @@ -10798,7 +10801,7 @@ inline bool SpecializationFilter::_internal_warrior_arms() const { return warrior_arms_; } inline bool SpecializationFilter::warrior_arms() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.warrior_arms) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.warrior_arms) return _internal_warrior_arms(); } inline void SpecializationFilter::_internal_set_warrior_arms(bool value) { @@ -10807,7 +10810,7 @@ inline void SpecializationFilter::_internal_set_warrior_arms(bool value) { } inline void SpecializationFilter::set_warrior_arms(bool value) { _internal_set_warrior_arms(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.warrior_arms) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.warrior_arms) } // bool warrior_defense = 69; @@ -10818,7 +10821,7 @@ inline bool SpecializationFilter::_internal_warrior_defense() const { return warrior_defense_; } inline bool SpecializationFilter::warrior_defense() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.warrior_defense) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.warrior_defense) return _internal_warrior_defense(); } inline void SpecializationFilter::_internal_set_warrior_defense(bool value) { @@ -10827,7 +10830,7 @@ inline void SpecializationFilter::_internal_set_warrior_defense(bool value) { } inline void SpecializationFilter::set_warrior_defense(bool value) { _internal_set_warrior_defense(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.warrior_defense) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.warrior_defense) } // bool warrior_discipline = 70; @@ -10838,7 +10841,7 @@ inline bool SpecializationFilter::_internal_warrior_discipline() const { return warrior_discipline_; } inline bool SpecializationFilter::warrior_discipline() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.warrior_discipline) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.warrior_discipline) return _internal_warrior_discipline(); } inline void SpecializationFilter::_internal_set_warrior_discipline(bool value) { @@ -10847,7 +10850,7 @@ inline void SpecializationFilter::_internal_set_warrior_discipline(bool value) { } inline void SpecializationFilter::set_warrior_discipline(bool value) { _internal_set_warrior_discipline(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.warrior_discipline) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.warrior_discipline) } // bool warrior_strength = 71; @@ -10858,7 +10861,7 @@ inline bool SpecializationFilter::_internal_warrior_strength() const { return warrior_strength_; } inline bool SpecializationFilter::warrior_strength() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.warrior_strength) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.warrior_strength) return _internal_warrior_strength(); } inline void SpecializationFilter::_internal_set_warrior_strength(bool value) { @@ -10867,7 +10870,7 @@ inline void SpecializationFilter::_internal_set_warrior_strength(bool value) { } inline void SpecializationFilter::set_warrior_strength(bool value) { _internal_set_warrior_strength(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.warrior_strength) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.warrior_strength) } // bool warrior_tactics = 72; @@ -10878,7 +10881,7 @@ inline bool SpecializationFilter::_internal_warrior_tactics() const { return warrior_tactics_; } inline bool SpecializationFilter::warrior_tactics() const { - // @@protoc_insertion_point(field_get:SpecializationFilter.warrior_tactics) + // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.warrior_tactics) return _internal_warrior_tactics(); } inline void SpecializationFilter::_internal_set_warrior_tactics(bool value) { @@ -10887,7 +10890,7 @@ inline void SpecializationFilter::_internal_set_warrior_tactics(bool value) { } inline void SpecializationFilter::set_warrior_tactics(bool value) { _internal_set_warrior_tactics(value); - // @@protoc_insertion_point(field_set:SpecializationFilter.warrior_tactics) + // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.warrior_tactics) } // ------------------------------------------------------------------- @@ -10902,7 +10905,7 @@ inline bool SpeciesFilter::_internal_asura() const { return asura_; } inline bool SpeciesFilter::asura() const { - // @@protoc_insertion_point(field_get:SpeciesFilter.asura) + // @@protoc_insertion_point(field_get:waypoint.SpeciesFilter.asura) return _internal_asura(); } inline void SpeciesFilter::_internal_set_asura(bool value) { @@ -10911,7 +10914,7 @@ inline void SpeciesFilter::_internal_set_asura(bool value) { } inline void SpeciesFilter::set_asura(bool value) { _internal_set_asura(value); - // @@protoc_insertion_point(field_set:SpeciesFilter.asura) + // @@protoc_insertion_point(field_set:waypoint.SpeciesFilter.asura) } // bool charr = 2; @@ -10922,7 +10925,7 @@ inline bool SpeciesFilter::_internal_charr() const { return charr_; } inline bool SpeciesFilter::charr() const { - // @@protoc_insertion_point(field_get:SpeciesFilter.charr) + // @@protoc_insertion_point(field_get:waypoint.SpeciesFilter.charr) return _internal_charr(); } inline void SpeciesFilter::_internal_set_charr(bool value) { @@ -10931,7 +10934,7 @@ inline void SpeciesFilter::_internal_set_charr(bool value) { } inline void SpeciesFilter::set_charr(bool value) { _internal_set_charr(value); - // @@protoc_insertion_point(field_set:SpeciesFilter.charr) + // @@protoc_insertion_point(field_set:waypoint.SpeciesFilter.charr) } // bool human = 3; @@ -10942,7 +10945,7 @@ inline bool SpeciesFilter::_internal_human() const { return human_; } inline bool SpeciesFilter::human() const { - // @@protoc_insertion_point(field_get:SpeciesFilter.human) + // @@protoc_insertion_point(field_get:waypoint.SpeciesFilter.human) return _internal_human(); } inline void SpeciesFilter::_internal_set_human(bool value) { @@ -10951,7 +10954,7 @@ inline void SpeciesFilter::_internal_set_human(bool value) { } inline void SpeciesFilter::set_human(bool value) { _internal_set_human(value); - // @@protoc_insertion_point(field_set:SpeciesFilter.human) + // @@protoc_insertion_point(field_set:waypoint.SpeciesFilter.human) } // bool norn = 4; @@ -10962,7 +10965,7 @@ inline bool SpeciesFilter::_internal_norn() const { return norn_; } inline bool SpeciesFilter::norn() const { - // @@protoc_insertion_point(field_get:SpeciesFilter.norn) + // @@protoc_insertion_point(field_get:waypoint.SpeciesFilter.norn) return _internal_norn(); } inline void SpeciesFilter::_internal_set_norn(bool value) { @@ -10971,7 +10974,7 @@ inline void SpeciesFilter::_internal_set_norn(bool value) { } inline void SpeciesFilter::set_norn(bool value) { _internal_set_norn(value); - // @@protoc_insertion_point(field_set:SpeciesFilter.norn) + // @@protoc_insertion_point(field_set:waypoint.SpeciesFilter.norn) } // bool sylvari = 5; @@ -10982,7 +10985,7 @@ inline bool SpeciesFilter::_internal_sylvari() const { return sylvari_; } inline bool SpeciesFilter::sylvari() const { - // @@protoc_insertion_point(field_get:SpeciesFilter.sylvari) + // @@protoc_insertion_point(field_get:waypoint.SpeciesFilter.sylvari) return _internal_sylvari(); } inline void SpeciesFilter::_internal_set_sylvari(bool value) { @@ -10991,7 +10994,7 @@ inline void SpeciesFilter::_internal_set_sylvari(bool value) { } inline void SpeciesFilter::set_sylvari(bool value) { _internal_set_sylvari(value); - // @@protoc_insertion_point(field_set:SpeciesFilter.sylvari) + // @@protoc_insertion_point(field_set:waypoint.SpeciesFilter.sylvari) } // ------------------------------------------------------------------- @@ -11003,15 +11006,15 @@ inline void TrailData::clear_trail_data() { trail_data_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline const std::string& TrailData::trail_data() const { - // @@protoc_insertion_point(field_get:TrailData.trail_data) + // @@protoc_insertion_point(field_get:waypoint.TrailData.trail_data) return _internal_trail_data(); } inline void TrailData::set_trail_data(const std::string& value) { _internal_set_trail_data(value); - // @@protoc_insertion_point(field_set:TrailData.trail_data) + // @@protoc_insertion_point(field_set:waypoint.TrailData.trail_data) } inline std::string* TrailData::mutable_trail_data() { - // @@protoc_insertion_point(field_mutable:TrailData.trail_data) + // @@protoc_insertion_point(field_mutable:waypoint.TrailData.trail_data) return _internal_mutable_trail_data(); } inline const std::string& TrailData::_internal_trail_data() const { @@ -11025,28 +11028,28 @@ inline void TrailData::set_trail_data(std::string&& value) { trail_data_.Set( &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:TrailData.trail_data) + // @@protoc_insertion_point(field_set_rvalue:waypoint.TrailData.trail_data) } inline void TrailData::set_trail_data(const char* value) { GOOGLE_DCHECK(value != nullptr); trail_data_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:TrailData.trail_data) + // @@protoc_insertion_point(field_set_char:waypoint.TrailData.trail_data) } inline void TrailData::set_trail_data(const char* value, size_t size) { trail_data_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:TrailData.trail_data) + // @@protoc_insertion_point(field_set_pointer:waypoint.TrailData.trail_data) } inline std::string* TrailData::_internal_mutable_trail_data() { return trail_data_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline std::string* TrailData::release_trail_data() { - // @@protoc_insertion_point(field_release:TrailData.trail_data) + // @@protoc_insertion_point(field_release:waypoint.TrailData.trail_data) return trail_data_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); } inline void TrailData::set_allocated_trail_data(std::string* trail_data) { @@ -11057,10 +11060,10 @@ inline void TrailData::set_allocated_trail_data(std::string* trail_data) { } trail_data_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), trail_data, GetArena()); - // @@protoc_insertion_point(field_set_allocated:TrailData.trail_data) + // @@protoc_insertion_point(field_set_allocated:waypoint.TrailData.trail_data) } inline std::string* TrailData::unsafe_arena_release_trail_data() { - // @@protoc_insertion_point(field_unsafe_arena_release:TrailData.trail_data) + // @@protoc_insertion_point(field_unsafe_arena_release:waypoint.TrailData.trail_data) GOOGLE_DCHECK(GetArena() != nullptr); return trail_data_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), @@ -11076,7 +11079,7 @@ inline void TrailData::unsafe_arena_set_allocated_trail_data( } trail_data_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), trail_data, GetArena()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:TrailData.trail_data) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.TrailData.trail_data) } #ifdef __GNUC__ @@ -11117,18 +11120,19 @@ inline void TrailData::unsafe_arena_set_allocated_trail_data( // @@protoc_insertion_point(namespace_scope) +} // namespace waypoint PROTOBUF_NAMESPACE_OPEN -template <> struct is_proto_enum< ::CullChirality> : ::std::true_type {}; +template <> struct is_proto_enum< ::waypoint::CullChirality> : ::std::true_type {}; template <> -inline const EnumDescriptor* GetEnumDescriptor< ::CullChirality>() { - return ::CullChirality_descriptor(); +inline const EnumDescriptor* GetEnumDescriptor< ::waypoint::CullChirality>() { + return ::waypoint::CullChirality_descriptor(); } -template <> struct is_proto_enum< ::ResetBehavior> : ::std::true_type {}; +template <> struct is_proto_enum< ::waypoint::ResetBehavior> : ::std::true_type {}; template <> -inline const EnumDescriptor* GetEnumDescriptor< ::ResetBehavior>() { - return ::ResetBehavior_descriptor(); +inline const EnumDescriptor* GetEnumDescriptor< ::waypoint::ResetBehavior>() { + return ::waypoint::ResetBehavior_descriptor(); } PROTOBUF_NAMESPACE_CLOSE @@ -11136,4 +11140,4 @@ PROTOBUF_NAMESPACE_CLOSE // @@protoc_insertion_point(global_scope) #include -#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_generators_2fproto_5ftemplates_2fnode_2eproto +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_waypoint_2eproto From 0b30d92d1418b10a7c3ca8354f5d9ede1e21a83f Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sun, 6 Nov 2022 00:15:42 -0500 Subject: [PATCH 094/539] adding in a minimal profiling library for temporary use --- xml_converter/src/function_timers.cpp | 49 +++++++++++++++++++++++ xml_converter/src/function_timers.hpp | 57 +++++++++++++++++++++++++++ 2 files changed, 106 insertions(+) create mode 100644 xml_converter/src/function_timers.cpp create mode 100644 xml_converter/src/function_timers.hpp diff --git a/xml_converter/src/function_timers.cpp b/xml_converter/src/function_timers.cpp new file mode 100644 index 00000000..db8e4c8f --- /dev/null +++ b/xml_converter/src/function_timers.cpp @@ -0,0 +1,49 @@ +#include "string_helper.hpp" + +#include +#include +#include +#include + +#include + + +using namespace std; + +//////////////////////////////////////////////////////////////////////////////// +// Function Timers +// +// This is a hacky profiling library that is used to easily determine the +// difference in speed of a repeatedly called piece of code. There are some +// caviats to this, which is that it only really measures the code that runs +// between the start and end calls but not the function call itself so it +// does not do a good job at catching extranious copy calls from things like +// function arguments. +// +// A CPP file is needed to support the static value store of the timers, +// otherwise each compiled object would have its own defintions for the data +//////////////////////////////////////////////////////////////////////////////// + +#define TIMER_IMPLEMENTATION(TIMER) \ + std::chrono::time_point>> begin_##TIMER; \ + std::chrono::duration> duration_##TIMER; \ + unsigned long call_count_##TIMER = 0; \ + void print_timer_##TIMER(ostream &out) { \ + long microseconds = std::chrono::duration_cast(duration_##TIMER).count(); \ + out << "Timer " << TIMER << "Total Duration: " << microseconds << endl; \ + out << "Timer " << TIMER << "Call Count " << call_count_##TIMER << endl; \ + out << "Timer " << TIMER << "Call Duration: " << float(microseconds) / float(call_count_##TIMER) << endl; \ + } \ + void print_timer_##TIMER() {print_timer_##TIMER(cout);} + + +TIMER_IMPLEMENTATION(0) +TIMER_IMPLEMENTATION(1) +TIMER_IMPLEMENTATION(2) +TIMER_IMPLEMENTATION(3) +TIMER_IMPLEMENTATION(4) +TIMER_IMPLEMENTATION(5) +TIMER_IMPLEMENTATION(6) +TIMER_IMPLEMENTATION(7) +TIMER_IMPLEMENTATION(8) +TIMER_IMPLEMENTATION(9) diff --git a/xml_converter/src/function_timers.hpp b/xml_converter/src/function_timers.hpp new file mode 100644 index 00000000..1162cea2 --- /dev/null +++ b/xml_converter/src/function_timers.hpp @@ -0,0 +1,57 @@ +#pragma once + +#include +#include + +#include +#include + + + + + +//////////////////////////////////////////////////////////////////////////////// +// Function Timers +// +// This is a hacky profiling library that is used to easily determine the +// difference in speed of a repeatedly called piece of code. There are some +// caviats to this, which is that it only really measures the code that runs +// between the start and end calls but not the function call itself so it +// does not do a good job at catching extranious copy calls from things like +// function arguments. +// +// Usage: (any number from 0-9) +// start_timer_0(); +// ... +// stop_timer_0(); +// ... +// print_timer_0(); +//////////////////////////////////////////////////////////////////////////////// + + +#define TIMER_PROTOTYPE(TIMER) \ + extern std::chrono::time_point>> begin_##TIMER; \ + extern std::chrono::duration> duration_##TIMER; \ + extern unsigned long call_count_##TIMER; \ + inline void start_timer_##TIMER() { \ + begin_##TIMER = std::chrono::high_resolution_clock::now(); \ + } \ + inline void stop_timer_##TIMER() { \ + auto end = std::chrono::high_resolution_clock::now(); \ + duration_##TIMER += end - begin_##TIMER; \ + call_count_##TIMER += 1; \ + } \ + void print_timer_##TIMER(); \ + void print_timer_##TIMER(std::ostream); + + +TIMER_PROTOTYPE(0) +TIMER_PROTOTYPE(1) +TIMER_PROTOTYPE(2) +TIMER_PROTOTYPE(3) +TIMER_PROTOTYPE(4) +TIMER_PROTOTYPE(5) +TIMER_PROTOTYPE(6) +TIMER_PROTOTYPE(7) +TIMER_PROTOTYPE(8) +TIMER_PROTOTYPE(9) From bf36c5c136dd376e4afe933215895f92f15100d1 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sun, 6 Nov 2022 00:35:27 -0500 Subject: [PATCH 095/539] Replacing base64 decode function with one about 10x faster In testing we got the following results when running both functions simultaneously Old Base64 Decode Total Duration: 33521 Old Base64 Decode Call Count 63695 Old Base64 Decode Call Duration: 0.526274 New Base64 Decode Total Duration: 3083 New Base64 Decode Call Count 63695 New Base64 Decode Call Duration: 0.0484025 --- xml_converter/src/function_timers.cpp | 6 +- xml_converter/src/string_helper.cpp | 109 ++++++++++++++++---------- 2 files changed, 72 insertions(+), 43 deletions(-) diff --git a/xml_converter/src/function_timers.cpp b/xml_converter/src/function_timers.cpp index db8e4c8f..538d65dd 100644 --- a/xml_converter/src/function_timers.cpp +++ b/xml_converter/src/function_timers.cpp @@ -30,9 +30,9 @@ using namespace std; unsigned long call_count_##TIMER = 0; \ void print_timer_##TIMER(ostream &out) { \ long microseconds = std::chrono::duration_cast(duration_##TIMER).count(); \ - out << "Timer " << TIMER << "Total Duration: " << microseconds << endl; \ - out << "Timer " << TIMER << "Call Count " << call_count_##TIMER << endl; \ - out << "Timer " << TIMER << "Call Duration: " << float(microseconds) / float(call_count_##TIMER) << endl; \ + out << "Timer " << TIMER << " Total Duration: " << microseconds << endl; \ + out << "Timer " << TIMER << " Call Count " << call_count_##TIMER << endl; \ + out << "Timer " << TIMER << " Call Duration: " << float(microseconds) / float(call_count_##TIMER) << endl; \ } \ void print_timer_##TIMER() {print_timer_##TIMER(cout);} diff --git a/xml_converter/src/string_helper.cpp b/xml_converter/src/string_helper.cpp index d18223e0..cfff832e 100644 --- a/xml_converter/src/string_helper.cpp +++ b/xml_converter/src/string_helper.cpp @@ -118,11 +118,6 @@ static const std::string base64_chars = "abcdefghijklmnopqrstuvwxyz" "0123456789+/"; - -static inline bool is_base64(uint8_t c) { - return (isalnum(c) || (c == '+') || (c == '/')); -} - std::string base64_encode(uint8_t const* buf, unsigned int bufLen) { std::string ret; int i = 0; @@ -167,49 +162,83 @@ std::string base64_encode(uint8_t const* buf, unsigned int bufLen) { return ret; } +#include "function_timers.hpp" + +// TODO: Write Tests For This +static unsigned char base64_lookup[256] = { + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 62, 255, + 255, 255, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 255, 255, + 255, 255, 255, 255, 255, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, + 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 255, 255, 255, 255, 255, 255, 26, 27, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255 +}; + std::vector base64_decode(std::string const& encoded_string) { - int in_len = encoded_string.size(); - int i = 0; - int j = 0; - int in_ = 0; - uint8_t char_array_4[4], char_array_3[3]; - std::vector ret; - - while (in_len-- && ( encoded_string[in_] != '=') && is_base64(encoded_string[in_])) { - char_array_4[i++] = encoded_string[in_]; in_++; - if (i ==4) { - for (i = 0; i <4; i++){ - char_array_4[i] = base64_chars.find(char_array_4[i]); - } + int in_len = encoded_string.size(); - char_array_3[0] = (char_array_4[0] << 2) + ((char_array_4[1] & 0x30) >> 4); - char_array_3[1] = ((char_array_4[1] & 0xf) << 4) + ((char_array_4[2] & 0x3c) >> 2); - char_array_3[2] = ((char_array_4[2] & 0x3) << 6) + char_array_4[3]; + uint8_t char_array_4[4]; - for (i = 0; (i < 3); i++){ - ret.push_back(char_array_3[i]); - } - i = 0; - } - } + size_t input_index = 0; + size_t output_index = 0; - if (i) { - for (j = i; j <4; j++){ - char_array_4[j] = 0; + while(encoded_string[in_len-1] == '=') { + in_len -= 1; } - for (j = 0; j <4; j++){ - char_array_4[j] = base64_chars.find(char_array_4[j]); + std::vector ret(in_len * 3 / 4); + + while (in_len >= 4) { + for (int i = 0; i < 4; i++) { + char_array_4[i] = base64_lookup[encoded_string[input_index+i]]; + + if (char_array_4[i] == 255) { + // TODO: Throw an error or something + return std::vector(); + } + } + + ret[output_index] = (char_array_4[0] << 2) + ((char_array_4[1] & 0x30) >> 4); + ret[output_index + 1] = ((char_array_4[1] & 0xf) << 4) + ((char_array_4[2] & 0x3c) >> 2); + ret[output_index + 2] = ((char_array_4[2] & 0x3) << 6) + char_array_4[3]; + + input_index += 4; + in_len -= 4; + output_index += 3; } - char_array_3[0] = (char_array_4[0] << 2) + ((char_array_4[1] & 0x30) >> 4); - char_array_3[1] = ((char_array_4[1] & 0xf) << 4) + ((char_array_4[2] & 0x3c) >> 2); - char_array_3[2] = ((char_array_4[2] & 0x3) << 6) + char_array_4[3]; - for (j = 0; (j < i - 1); j++){ - ret.push_back(char_array_3[j]); + if (in_len) { + int i = 0; + for (; i < in_len; i++) { + char_array_4[i] = base64_lookup[encoded_string[input_index+i]]; + + if (char_array_4[i] == 255) { + // TODO: Throw an error or something + return std::vector(); + } + + } + for (; i < 4; i++) { + char_array_4[i] = 0; + } + + ret[output_index] = (char_array_4[0] << 2) + ((char_array_4[1] & 0x30) >> 4); + ret[output_index + 1] = ((char_array_4[1] & 0xf) << 4) + ((char_array_4[2] & 0x3c) >> 2); + ret[output_index + 2] = ((char_array_4[2] & 0x3) << 6) + char_array_4[3]; } - } - return ret; -} \ No newline at end of file + return ret; +} From 227fc83bcdb35079ce0aa1a542e65466327a7fa9 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sun, 6 Nov 2022 00:52:00 -0500 Subject: [PATCH 096/539] adding more presubmit checks --- xml_converter/generators/presubmit.sh | 2 ++ xml_converter/presubmit.sh | 16 +++++++++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/xml_converter/generators/presubmit.sh b/xml_converter/generators/presubmit.sh index a252c86e..478b2233 100755 --- a/xml_converter/generators/presubmit.sh +++ b/xml_converter/generators/presubmit.sh @@ -1,3 +1,5 @@ +#!/bin/bash + source ./venv/bin/activate readarray -d '' FILES < <(find . -type f -name "*.py" -not -path "*/venv/*" -print0) diff --git a/xml_converter/presubmit.sh b/xml_converter/presubmit.sh index 672a7c14..0f483dbc 100755 --- a/xml_converter/presubmit.sh +++ b/xml_converter/presubmit.sh @@ -1,12 +1,14 @@ -cpplint --quiet --recursive --exclude="src/rapidxml-1.13" --filter=-whitespace/newline,-whitespace/line_length,-readability/braces,-legal/copyright,-build/namespaces,-readability/casting src/ +#!/bin/bash + +cpplint --quiet --recursive --exclude="src/rapidxml-1.13" --filter=-whitespace/newline,-whitespace/line_length,-readability/braces,-legal/copyright,-build/namespaces,-readability/casting,-build/c++11 src/ # TODO: remove readability/casting from the filter. It was temporarily added # because the changes required would need testing unfitting of the original # style check update commit. -source ./generators/venv/bin/activate - -# Lint Python Files -flake8 --ignore=E501,E266,W503 "${FILES[@]}" +# Run Include What You Use +iwyu_tool -p . -# Type Check Python Files -mypy --strict "${FILES[@]}" \ No newline at end of file +# Run the python presubmit for the "generators" subdirectory. +pushd generators +./presubmit.sh +popd From fb9c2e72d3aad70da4393cfde1d03ebe0bc9d321 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 7 Nov 2022 22:19:16 -0500 Subject: [PATCH 097/539] This is a test to see if the program compiles --- .github/workflows/main.yml | 2 +- xml_converter/CMakeLists.txt | 2 - xml_converter/src/waypoint.pb.cc | 8929 ----------------------- xml_converter/src/waypoint.pb.h | 11143 ----------------------------- 4 files changed, 1 insertion(+), 20075 deletions(-) delete mode 100644 xml_converter/src/waypoint.pb.cc delete mode 100644 xml_converter/src/waypoint.pb.h diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 166270de..21fe9455 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -95,7 +95,7 @@ jobs: - name: Make xml_converter run: | cd xml_converter - cmake ./ + protoc --proto_path=generators/proto_templates --cpp_out=src/ generators/proto_templates/waypoint.proto) make mv xml_converter ../output diff --git a/xml_converter/CMakeLists.txt b/xml_converter/CMakeLists.txt index 7f3de30a..bf050374 100644 --- a/xml_converter/CMakeLists.txt +++ b/xml_converter/CMakeLists.txt @@ -9,8 +9,6 @@ set(TARGET_NAME xml_converter) # Add Protobuf find_package(Protobuf REQUIRED) include_directories(${Protobuf_INCLUDE_DIRS}) -# include_directories() -EXECUTE_PROCESS(COMMAND ${PROTOBUF_PROTOC_EXECUTABLE} --proto_path=generators/proto_templates --cpp_out=src/ generators/proto_templates/waypoint.proto) # Add Dependencies file(GLOB_RECURSE SOURCES "src/*.cpp" "src/*.cc") diff --git a/xml_converter/src/waypoint.pb.cc b/xml_converter/src/waypoint.pb.cc deleted file mode 100644 index b1b8d4a3..00000000 --- a/xml_converter/src/waypoint.pb.cc +++ /dev/null @@ -1,8929 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: waypoint.proto - -#include "waypoint.pb.h" - -#include - -#include -#include -#include -#include -#include -#include -#include -// @@protoc_insertion_point(includes) -#include -extern PROTOBUF_INTERNAL_EXPORT_waypoint_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Category_waypoint_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_waypoint_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Color_waypoint_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_waypoint_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_FestivalFilter_waypoint_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_waypoint_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_GUID_waypoint_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_waypoint_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_MapTypeFilter_waypoint_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_waypoint_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_MountFilter_waypoint_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_waypoint_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Position_waypoint_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_waypoint_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ProfessionFilter_waypoint_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_waypoint_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_SpecializationFilter_waypoint_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_waypoint_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_SpeciesFilter_waypoint_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_waypoint_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Texture_waypoint_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_waypoint_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_TrailData_waypoint_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_waypoint_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Trigger_waypoint_2eproto; -namespace waypoint { -class Category_ChildrenEntry_DoNotUseDefaultTypeInternal { - public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _Category_ChildrenEntry_DoNotUse_default_instance_; -class CategoryDefaultTypeInternal { - public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _Category_default_instance_; -class IconDefaultTypeInternal { - public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _Icon_default_instance_; -class TrailDefaultTypeInternal { - public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _Trail_default_instance_; -class TextureDefaultTypeInternal { - public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _Texture_default_instance_; -class PositionDefaultTypeInternal { - public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _Position_default_instance_; -class EulerRotationDefaultTypeInternal { - public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _EulerRotation_default_instance_; -class TriggerDefaultTypeInternal { - public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _Trigger_default_instance_; -class GUIDDefaultTypeInternal { - public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _GUID_default_instance_; -class ColorDefaultTypeInternal { - public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _Color_default_instance_; -class FestivalFilterDefaultTypeInternal { - public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _FestivalFilter_default_instance_; -class MapTypeFilterDefaultTypeInternal { - public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _MapTypeFilter_default_instance_; -class MountFilterDefaultTypeInternal { - public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _MountFilter_default_instance_; -class ProfessionFilterDefaultTypeInternal { - public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _ProfessionFilter_default_instance_; -class SpecializationFilterDefaultTypeInternal { - public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _SpecializationFilter_default_instance_; -class SpeciesFilterDefaultTypeInternal { - public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _SpeciesFilter_default_instance_; -class TrailDataDefaultTypeInternal { - public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _TrailData_default_instance_; -} // namespace waypoint -static void InitDefaultsscc_info_Category_waypoint_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::waypoint::_Category_ChildrenEntry_DoNotUse_default_instance_; - new (ptr) ::waypoint::Category_ChildrenEntry_DoNotUse(); - } - { - void* ptr = &::waypoint::_Category_default_instance_; - new (ptr) ::waypoint::Category(); - ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); - } - ::waypoint::Category_ChildrenEntry_DoNotUse::InitAsDefaultInstance(); - ::waypoint::Category::InitAsDefaultInstance(); -} - -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Category_waypoint_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Category_waypoint_2eproto}, {}}; - -static void InitDefaultsscc_info_Color_waypoint_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::waypoint::_Color_default_instance_; - new (ptr) ::waypoint::Color(); - ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); - } - ::waypoint::Color::InitAsDefaultInstance(); -} - -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Color_waypoint_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Color_waypoint_2eproto}, {}}; - -static void InitDefaultsscc_info_EulerRotation_waypoint_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::waypoint::_EulerRotation_default_instance_; - new (ptr) ::waypoint::EulerRotation(); - ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); - } - ::waypoint::EulerRotation::InitAsDefaultInstance(); -} - -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_EulerRotation_waypoint_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_EulerRotation_waypoint_2eproto}, {}}; - -static void InitDefaultsscc_info_FestivalFilter_waypoint_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::waypoint::_FestivalFilter_default_instance_; - new (ptr) ::waypoint::FestivalFilter(); - ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); - } - ::waypoint::FestivalFilter::InitAsDefaultInstance(); -} - -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_FestivalFilter_waypoint_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_FestivalFilter_waypoint_2eproto}, {}}; - -static void InitDefaultsscc_info_GUID_waypoint_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::waypoint::_GUID_default_instance_; - new (ptr) ::waypoint::GUID(); - ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); - } - ::waypoint::GUID::InitAsDefaultInstance(); -} - -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_GUID_waypoint_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_GUID_waypoint_2eproto}, {}}; - -static void InitDefaultsscc_info_Icon_waypoint_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::waypoint::_Icon_default_instance_; - new (ptr) ::waypoint::Icon(); - ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); - } - ::waypoint::Icon::InitAsDefaultInstance(); -} - -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<5> scc_info_Icon_waypoint_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 5, 0, InitDefaultsscc_info_Icon_waypoint_2eproto}, { - &scc_info_Category_waypoint_2eproto.base, - &scc_info_Texture_waypoint_2eproto.base, - &scc_info_GUID_waypoint_2eproto.base, - &scc_info_Position_waypoint_2eproto.base, - &scc_info_Trigger_waypoint_2eproto.base,}}; - -static void InitDefaultsscc_info_MapTypeFilter_waypoint_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::waypoint::_MapTypeFilter_default_instance_; - new (ptr) ::waypoint::MapTypeFilter(); - ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); - } - ::waypoint::MapTypeFilter::InitAsDefaultInstance(); -} - -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_MapTypeFilter_waypoint_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_MapTypeFilter_waypoint_2eproto}, {}}; - -static void InitDefaultsscc_info_MountFilter_waypoint_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::waypoint::_MountFilter_default_instance_; - new (ptr) ::waypoint::MountFilter(); - ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); - } - ::waypoint::MountFilter::InitAsDefaultInstance(); -} - -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_MountFilter_waypoint_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_MountFilter_waypoint_2eproto}, {}}; - -static void InitDefaultsscc_info_Position_waypoint_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::waypoint::_Position_default_instance_; - new (ptr) ::waypoint::Position(); - ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); - } - ::waypoint::Position::InitAsDefaultInstance(); -} - -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Position_waypoint_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Position_waypoint_2eproto}, {}}; - -static void InitDefaultsscc_info_ProfessionFilter_waypoint_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::waypoint::_ProfessionFilter_default_instance_; - new (ptr) ::waypoint::ProfessionFilter(); - ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); - } - ::waypoint::ProfessionFilter::InitAsDefaultInstance(); -} - -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ProfessionFilter_waypoint_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_ProfessionFilter_waypoint_2eproto}, {}}; - -static void InitDefaultsscc_info_SpecializationFilter_waypoint_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::waypoint::_SpecializationFilter_default_instance_; - new (ptr) ::waypoint::SpecializationFilter(); - ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); - } - ::waypoint::SpecializationFilter::InitAsDefaultInstance(); -} - -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_SpecializationFilter_waypoint_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_SpecializationFilter_waypoint_2eproto}, {}}; - -static void InitDefaultsscc_info_SpeciesFilter_waypoint_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::waypoint::_SpeciesFilter_default_instance_; - new (ptr) ::waypoint::SpeciesFilter(); - ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); - } - ::waypoint::SpeciesFilter::InitAsDefaultInstance(); -} - -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_SpeciesFilter_waypoint_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_SpeciesFilter_waypoint_2eproto}, {}}; - -static void InitDefaultsscc_info_Texture_waypoint_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::waypoint::_Texture_default_instance_; - new (ptr) ::waypoint::Texture(); - ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); - } - ::waypoint::Texture::InitAsDefaultInstance(); -} - -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Texture_waypoint_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Texture_waypoint_2eproto}, {}}; - -static void InitDefaultsscc_info_Trail_waypoint_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::waypoint::_Trail_default_instance_; - new (ptr) ::waypoint::Trail(); - ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); - } - ::waypoint::Trail::InitAsDefaultInstance(); -} - -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<11> scc_info_Trail_waypoint_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 11, 0, InitDefaultsscc_info_Trail_waypoint_2eproto}, { - &scc_info_Category_waypoint_2eproto.base, - &scc_info_Texture_waypoint_2eproto.base, - &scc_info_GUID_waypoint_2eproto.base, - &scc_info_TrailData_waypoint_2eproto.base, - &scc_info_Color_waypoint_2eproto.base, - &scc_info_FestivalFilter_waypoint_2eproto.base, - &scc_info_MapTypeFilter_waypoint_2eproto.base, - &scc_info_MountFilter_waypoint_2eproto.base, - &scc_info_ProfessionFilter_waypoint_2eproto.base, - &scc_info_SpecializationFilter_waypoint_2eproto.base, - &scc_info_SpeciesFilter_waypoint_2eproto.base,}}; - -static void InitDefaultsscc_info_TrailData_waypoint_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::waypoint::_TrailData_default_instance_; - new (ptr) ::waypoint::TrailData(); - ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); - } - ::waypoint::TrailData::InitAsDefaultInstance(); -} - -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_TrailData_waypoint_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_TrailData_waypoint_2eproto}, {}}; - -static void InitDefaultsscc_info_Trigger_waypoint_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::waypoint::_Trigger_default_instance_; - new (ptr) ::waypoint::Trigger(); - ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); - } - ::waypoint::Trigger::InitAsDefaultInstance(); -} - -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Trigger_waypoint_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_Trigger_waypoint_2eproto}, { - &scc_info_Category_waypoint_2eproto.base,}}; - -static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_waypoint_2eproto[17]; -static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_waypoint_2eproto[2]; -static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_waypoint_2eproto = nullptr; - -const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_waypoint_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - PROTOBUF_FIELD_OFFSET(::waypoint::Category_ChildrenEntry_DoNotUse, _has_bits_), - PROTOBUF_FIELD_OFFSET(::waypoint::Category_ChildrenEntry_DoNotUse, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::waypoint::Category_ChildrenEntry_DoNotUse, key_), - PROTOBUF_FIELD_OFFSET(::waypoint::Category_ChildrenEntry_DoNotUse, value_), - 0, - 1, - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::waypoint::Category, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::waypoint::Category, default_visibility_), - PROTOBUF_FIELD_OFFSET(::waypoint::Category, display_name_), - PROTOBUF_FIELD_OFFSET(::waypoint::Category, is_separator_), - PROTOBUF_FIELD_OFFSET(::waypoint::Category, name_), - PROTOBUF_FIELD_OFFSET(::waypoint::Category, tooltip_name_), - PROTOBUF_FIELD_OFFSET(::waypoint::Category, children_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::waypoint::Icon, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::waypoint::Icon, category_), - PROTOBUF_FIELD_OFFSET(::waypoint::Icon, texture_), - PROTOBUF_FIELD_OFFSET(::waypoint::Icon, guid_), - PROTOBUF_FIELD_OFFSET(::waypoint::Icon, map_id_), - PROTOBUF_FIELD_OFFSET(::waypoint::Icon, distance_fade_end_), - PROTOBUF_FIELD_OFFSET(::waypoint::Icon, distance_fade_start_), - PROTOBUF_FIELD_OFFSET(::waypoint::Icon, height_offset_), - PROTOBUF_FIELD_OFFSET(::waypoint::Icon, position_), - PROTOBUF_FIELD_OFFSET(::waypoint::Icon, reset_behavior_), - PROTOBUF_FIELD_OFFSET(::waypoint::Icon, trigger_), - PROTOBUF_FIELD_OFFSET(::waypoint::Icon, achievement_bit_), - PROTOBUF_FIELD_OFFSET(::waypoint::Icon, achievement_id_), - PROTOBUF_FIELD_OFFSET(::waypoint::Icon, alpha_), - PROTOBUF_FIELD_OFFSET(::waypoint::Icon, can_fade_), - PROTOBUF_FIELD_OFFSET(::waypoint::Icon, minimum_size_on_screen_), - PROTOBUF_FIELD_OFFSET(::waypoint::Icon, map_display_size_), - PROTOBUF_FIELD_OFFSET(::waypoint::Icon, maximum_size_on_screen_), - PROTOBUF_FIELD_OFFSET(::waypoint::Icon, scale_on_map_with_zoom_), - PROTOBUF_FIELD_OFFSET(::waypoint::Icon, tip_description_), - PROTOBUF_FIELD_OFFSET(::waypoint::Icon, tip_name_), - PROTOBUF_FIELD_OFFSET(::waypoint::Icon, __tentative__scale_), - PROTOBUF_FIELD_OFFSET(::waypoint::Icon, __tentative__render_ingame_), - PROTOBUF_FIELD_OFFSET(::waypoint::Icon, __tentative__render_on_map_), - PROTOBUF_FIELD_OFFSET(::waypoint::Icon, __tentative__render_on_minimap_), - PROTOBUF_FIELD_OFFSET(::waypoint::Icon, bhdraft__schedule_), - PROTOBUF_FIELD_OFFSET(::waypoint::Icon, bhdraft__schedule_duration_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::waypoint::Trail, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::waypoint::Trail, category_), - PROTOBUF_FIELD_OFFSET(::waypoint::Trail, texture_), - PROTOBUF_FIELD_OFFSET(::waypoint::Trail, guid_), - PROTOBUF_FIELD_OFFSET(::waypoint::Trail, map_id_), - PROTOBUF_FIELD_OFFSET(::waypoint::Trail, distance_fade_end_), - PROTOBUF_FIELD_OFFSET(::waypoint::Trail, distance_fade_start_), - PROTOBUF_FIELD_OFFSET(::waypoint::Trail, trail_data_), - PROTOBUF_FIELD_OFFSET(::waypoint::Trail, animation_speed_), - PROTOBUF_FIELD_OFFSET(::waypoint::Trail, cull_chirality_), - PROTOBUF_FIELD_OFFSET(::waypoint::Trail, achievement_bit_), - PROTOBUF_FIELD_OFFSET(::waypoint::Trail, achievement_id_), - PROTOBUF_FIELD_OFFSET(::waypoint::Trail, alpha_), - PROTOBUF_FIELD_OFFSET(::waypoint::Trail, can_fade_), - PROTOBUF_FIELD_OFFSET(::waypoint::Trail, is_wall_), - PROTOBUF_FIELD_OFFSET(::waypoint::Trail, bhdraft__schedule_), - PROTOBUF_FIELD_OFFSET(::waypoint::Trail, bhdraft__schedule_duration_), - PROTOBUF_FIELD_OFFSET(::waypoint::Trail, scale_), - PROTOBUF_FIELD_OFFSET(::waypoint::Trail, color_), - PROTOBUF_FIELD_OFFSET(::waypoint::Trail, festival_filter_), - PROTOBUF_FIELD_OFFSET(::waypoint::Trail, map_type_filter_), - PROTOBUF_FIELD_OFFSET(::waypoint::Trail, mount_filter_), - PROTOBUF_FIELD_OFFSET(::waypoint::Trail, profession_filter_), - PROTOBUF_FIELD_OFFSET(::waypoint::Trail, specialization_filter_), - PROTOBUF_FIELD_OFFSET(::waypoint::Trail, species_filter_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::waypoint::Texture, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::waypoint::Texture, path_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::waypoint::Position, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::waypoint::Position, x_), - PROTOBUF_FIELD_OFFSET(::waypoint::Position, y_), - PROTOBUF_FIELD_OFFSET(::waypoint::Position, z_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::waypoint::EulerRotation, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::waypoint::EulerRotation, x_), - PROTOBUF_FIELD_OFFSET(::waypoint::EulerRotation, y_), - PROTOBUF_FIELD_OFFSET(::waypoint::EulerRotation, z_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::waypoint::Trigger, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::waypoint::Trigger, auto_trigger_), - PROTOBUF_FIELD_OFFSET(::waypoint::Trigger, bounce_delay_), - PROTOBUF_FIELD_OFFSET(::waypoint::Trigger, bounce_duration_), - PROTOBUF_FIELD_OFFSET(::waypoint::Trigger, bounce_height_), - PROTOBUF_FIELD_OFFSET(::waypoint::Trigger, action_copy_clipboard_), - PROTOBUF_FIELD_OFFSET(::waypoint::Trigger, action_copy_message_), - PROTOBUF_FIELD_OFFSET(::waypoint::Trigger, has_countdown_), - PROTOBUF_FIELD_OFFSET(::waypoint::Trigger, action_info_message_), - PROTOBUF_FIELD_OFFSET(::waypoint::Trigger, invert_display_), - PROTOBUF_FIELD_OFFSET(::waypoint::Trigger, reset_length_), - PROTOBUF_FIELD_OFFSET(::waypoint::Trigger, range_), - PROTOBUF_FIELD_OFFSET(::waypoint::Trigger, action_hide_category_), - PROTOBUF_FIELD_OFFSET(::waypoint::Trigger, action_show_category_), - PROTOBUF_FIELD_OFFSET(::waypoint::Trigger, action_toggle_category_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::waypoint::GUID, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::waypoint::GUID, guid_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::waypoint::Color, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::waypoint::Color, hex_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::waypoint::FestivalFilter, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::waypoint::FestivalFilter, dragonbash_), - PROTOBUF_FIELD_OFFSET(::waypoint::FestivalFilter, festival_of_the_four_winds_), - PROTOBUF_FIELD_OFFSET(::waypoint::FestivalFilter, halloween_), - PROTOBUF_FIELD_OFFSET(::waypoint::FestivalFilter, lunar_new_year_), - PROTOBUF_FIELD_OFFSET(::waypoint::FestivalFilter, super_adventure_festival_), - PROTOBUF_FIELD_OFFSET(::waypoint::FestivalFilter, wintersday_), - PROTOBUF_FIELD_OFFSET(::waypoint::FestivalFilter, none_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::waypoint::MapTypeFilter, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::waypoint::MapTypeFilter, unknown_map_), - PROTOBUF_FIELD_OFFSET(::waypoint::MapTypeFilter, redirect_map_), - PROTOBUF_FIELD_OFFSET(::waypoint::MapTypeFilter, character_create_map_), - PROTOBUF_FIELD_OFFSET(::waypoint::MapTypeFilter, pvp_map_), - PROTOBUF_FIELD_OFFSET(::waypoint::MapTypeFilter, gvg_map_), - PROTOBUF_FIELD_OFFSET(::waypoint::MapTypeFilter, instance_map_), - PROTOBUF_FIELD_OFFSET(::waypoint::MapTypeFilter, public_map_), - PROTOBUF_FIELD_OFFSET(::waypoint::MapTypeFilter, tournament_map_), - PROTOBUF_FIELD_OFFSET(::waypoint::MapTypeFilter, tutorial_map_), - PROTOBUF_FIELD_OFFSET(::waypoint::MapTypeFilter, user_tournament_map_), - PROTOBUF_FIELD_OFFSET(::waypoint::MapTypeFilter, center_map_), - PROTOBUF_FIELD_OFFSET(::waypoint::MapTypeFilter, eternal_battlegrounds_map_), - PROTOBUF_FIELD_OFFSET(::waypoint::MapTypeFilter, bluehome_map_), - PROTOBUF_FIELD_OFFSET(::waypoint::MapTypeFilter, blue_borderlands_map_), - PROTOBUF_FIELD_OFFSET(::waypoint::MapTypeFilter, green_home_map_), - PROTOBUF_FIELD_OFFSET(::waypoint::MapTypeFilter, green_borderlands_map_), - PROTOBUF_FIELD_OFFSET(::waypoint::MapTypeFilter, red_home_map_), - PROTOBUF_FIELD_OFFSET(::waypoint::MapTypeFilter, red_borderlands_map_), - PROTOBUF_FIELD_OFFSET(::waypoint::MapTypeFilter, fortunes_vale_map_), - PROTOBUF_FIELD_OFFSET(::waypoint::MapTypeFilter, jump_puzzle_map_), - PROTOBUF_FIELD_OFFSET(::waypoint::MapTypeFilter, obsidian_sanctum_map_), - PROTOBUF_FIELD_OFFSET(::waypoint::MapTypeFilter, edge_of_the_mists_map_), - PROTOBUF_FIELD_OFFSET(::waypoint::MapTypeFilter, public_mini_map_), - PROTOBUF_FIELD_OFFSET(::waypoint::MapTypeFilter, wvw_lounge_map_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::waypoint::MountFilter, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::waypoint::MountFilter, raptor_), - PROTOBUF_FIELD_OFFSET(::waypoint::MountFilter, springer_), - PROTOBUF_FIELD_OFFSET(::waypoint::MountFilter, skimmer_), - PROTOBUF_FIELD_OFFSET(::waypoint::MountFilter, jackal_), - PROTOBUF_FIELD_OFFSET(::waypoint::MountFilter, griffon_), - PROTOBUF_FIELD_OFFSET(::waypoint::MountFilter, roller_beetle_), - PROTOBUF_FIELD_OFFSET(::waypoint::MountFilter, warclaw_), - PROTOBUF_FIELD_OFFSET(::waypoint::MountFilter, skyscalee_), - PROTOBUF_FIELD_OFFSET(::waypoint::MountFilter, skiff_), - PROTOBUF_FIELD_OFFSET(::waypoint::MountFilter, seige_turtle_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::waypoint::ProfessionFilter, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::waypoint::ProfessionFilter, guardian_), - PROTOBUF_FIELD_OFFSET(::waypoint::ProfessionFilter, warrior_), - PROTOBUF_FIELD_OFFSET(::waypoint::ProfessionFilter, engineer_), - PROTOBUF_FIELD_OFFSET(::waypoint::ProfessionFilter, ranger_), - PROTOBUF_FIELD_OFFSET(::waypoint::ProfessionFilter, thief_), - PROTOBUF_FIELD_OFFSET(::waypoint::ProfessionFilter, elementalist_), - PROTOBUF_FIELD_OFFSET(::waypoint::ProfessionFilter, mesmer_), - PROTOBUF_FIELD_OFFSET(::waypoint::ProfessionFilter, necromancer_), - PROTOBUF_FIELD_OFFSET(::waypoint::ProfessionFilter, revenantnt_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, elementalist_tempest_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, engineer_scrapper_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, guardian_dragonhunter_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, mesmer_chronomancer_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, necromancer_reaper_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, ranger_druid_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, revenant_herald_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, thief_daredevil_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, warrior_berserker_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, elementalist_weaver_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, engineer_holosmith_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, guardian_firebrand_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, mesmer_mirage_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, necromancer_scourge_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, ranger_soulbeast_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, revenant_renegade_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, thief_deadeye_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, warrior_spellbreaker_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, elmentalist_catalyst_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, engineer_mechanist_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, guardian_willbender_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, mesmer_virtuoso_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, necromancer_harbinger_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, ranger_untamed_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, revenant_vindicator_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, thief_specter_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, warrior_bladesworn_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, elementalist_air_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, elementalist_arcane_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, elementalist_earth_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, elementalist_fire_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, elementalist_water_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, engineer_alchemy_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, engineer_explosives_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, engineer_firearms_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, engineer_inventions_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, engineer_tools_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, guardian_honor_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, guardian_radiance_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, guardian_valor_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, guardian_virtues_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, guardian_zeal_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, mesmer_chaos_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, mesmer_domination_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, mesmer_dueling_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, mesmer_illusions_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, mesmer_inspiration_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, necromancer_blood_magic_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, necromancer_curses_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, necromancer_death_magic_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, necromancer_soul_reaping_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, necromancer_spite_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, ranger_beastmastery_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, ranger_marksmanship_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, ranger_nature_magic_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, ranger_skirmishing_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, ranger_wilderness_survival_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, revenant_corruption_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, revenant_devastation_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, revenant_invocation_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, revenant_retribution_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, revenant_salvation_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, thief_acrobatics_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, thief_critical_strikes_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, thief_deadly_arts_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, thief_shadow_arts_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, thief_trickery_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, warrior_arms_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, warrior_defense_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, warrior_discipline_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, warrior_strength_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpecializationFilter, warrior_tactics_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::waypoint::SpeciesFilter, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::waypoint::SpeciesFilter, asura_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpeciesFilter, charr_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpeciesFilter, human_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpeciesFilter, norn_), - PROTOBUF_FIELD_OFFSET(::waypoint::SpeciesFilter, sylvari_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::waypoint::TrailData, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::waypoint::TrailData, trail_data_), -}; -static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - { 0, 7, sizeof(::waypoint::Category_ChildrenEntry_DoNotUse)}, - { 9, -1, sizeof(::waypoint::Category)}, - { 20, -1, sizeof(::waypoint::Icon)}, - { 51, -1, sizeof(::waypoint::Trail)}, - { 80, -1, sizeof(::waypoint::Texture)}, - { 86, -1, sizeof(::waypoint::Position)}, - { 94, -1, sizeof(::waypoint::EulerRotation)}, - { 102, -1, sizeof(::waypoint::Trigger)}, - { 121, -1, sizeof(::waypoint::GUID)}, - { 127, -1, sizeof(::waypoint::Color)}, - { 133, -1, sizeof(::waypoint::FestivalFilter)}, - { 145, -1, sizeof(::waypoint::MapTypeFilter)}, - { 174, -1, sizeof(::waypoint::MountFilter)}, - { 189, -1, sizeof(::waypoint::ProfessionFilter)}, - { 203, -1, sizeof(::waypoint::SpecializationFilter)}, - { 280, -1, sizeof(::waypoint::SpeciesFilter)}, - { 290, -1, sizeof(::waypoint::TrailData)}, -}; - -static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { - reinterpret_cast(&::waypoint::_Category_ChildrenEntry_DoNotUse_default_instance_), - reinterpret_cast(&::waypoint::_Category_default_instance_), - reinterpret_cast(&::waypoint::_Icon_default_instance_), - reinterpret_cast(&::waypoint::_Trail_default_instance_), - reinterpret_cast(&::waypoint::_Texture_default_instance_), - reinterpret_cast(&::waypoint::_Position_default_instance_), - reinterpret_cast(&::waypoint::_EulerRotation_default_instance_), - reinterpret_cast(&::waypoint::_Trigger_default_instance_), - reinterpret_cast(&::waypoint::_GUID_default_instance_), - reinterpret_cast(&::waypoint::_Color_default_instance_), - reinterpret_cast(&::waypoint::_FestivalFilter_default_instance_), - reinterpret_cast(&::waypoint::_MapTypeFilter_default_instance_), - reinterpret_cast(&::waypoint::_MountFilter_default_instance_), - reinterpret_cast(&::waypoint::_ProfessionFilter_default_instance_), - reinterpret_cast(&::waypoint::_SpecializationFilter_default_instance_), - reinterpret_cast(&::waypoint::_SpeciesFilter_default_instance_), - reinterpret_cast(&::waypoint::_TrailData_default_instance_), -}; - -const char descriptor_table_protodef_waypoint_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = - "\n\016waypoint.proto\022\010waypoint\"\357\001\n\010Category\022" - "\032\n\022default_visibility\030\001 \001(\010\022\024\n\014display_n" - "ame\030\002 \001(\t\022\024\n\014is_separator\030\003 \001(\010\022\014\n\004name\030" - "\004 \001(\t\022\024\n\014tooltip_name\030\005 \001(\t\0222\n\010children\030" - "\006 \003(\0132 .waypoint.Category.ChildrenEntry\032" - "C\n\rChildrenEntry\022\013\n\003key\030\001 \001(\t\022!\n\005value\030\002" - " \001(\0132\022.waypoint.Category:\0028\001\"\220\006\n\004Icon\022$\n" - "\010category\030\001 \001(\0132\022.waypoint.Category\022\"\n\007t" - "exture\030\002 \001(\0132\021.waypoint.Texture\022\034\n\004guid\030" - "\003 \001(\0132\016.waypoint.GUID\022\016\n\006map_id\030\004 \001(\005\022\031\n" - "\021distance_fade_end\030\005 \001(\002\022\033\n\023distance_fad" - "e_start\030\006 \001(\002\022\025\n\rheight_offset\030\007 \001(\002\022$\n\010" - "position\030\010 \001(\0132\022.waypoint.Position\022/\n\016re" - "set_behavior\030\t \001(\0162\027.waypoint.ResetBehav" - "ior\022\"\n\007trigger\030\n \001(\0132\021.waypoint.Trigger\022" - "\027\n\017achievement_bit\030\020 \001(\007\022\026\n\016achievement_" - "id\030\021 \001(\005\022\r\n\005alpha\030\022 \001(\002\022\020\n\010can_fade\030\023 \001(" - "\010\022\036\n\026minimum_size_on_screen\030\024 \001(\005\022\030\n\020map" - "_display_size\030\025 \001(\005\022\036\n\026maximum_size_on_s" - "creen\030\026 \001(\005\022\036\n\026scale_on_map_with_zoom\030\027 " - "\001(\010\022\027\n\017tip_description\030\030 \001(\t\022\020\n\010tip_name" - "\030\031 \001(\t\022\033\n\022__tentative__scale\030\200\020 \001(\002\022#\n\032_" - "_tentative__render_ingame\030\201\020 \001(\010\022#\n\032__te" - "ntative__render_on_map\030\202\020 \001(\010\022\'\n\036__tenta" - "tive__render_on_minimap\030\203\020 \001(\010\022\032\n\021bhdraf" - "t__schedule\030\204\020 \001(\t\022#\n\032bhdraft__schedule_" - "duration\030\205\020 \001(\002\"\264\006\n\005Trail\022$\n\010category\030\001 " - "\001(\0132\022.waypoint.Category\022\"\n\007texture\030\002 \001(\013" - "2\021.waypoint.Texture\022\034\n\004guid\030\003 \001(\0132\016.wayp" - "oint.GUID\022\016\n\006map_id\030\004 \001(\005\022\031\n\021distance_fa" - "de_end\030\005 \001(\002\022\033\n\023distance_fade_start\030\006 \001(" - "\002\022\'\n\ntrail_data\030\007 \001(\0132\023.waypoint.TrailDa" - "ta\022\027\n\017animation_speed\030\010 \001(\002\022/\n\016cull_chir" - "ality\030\t \001(\0162\027.waypoint.CullChirality\022\027\n\017" - "achievement_bit\030\020 \001(\007\022\026\n\016achievement_id\030" - "\021 \001(\005\022\r\n\005alpha\030\022 \001(\002\022\020\n\010can_fade\030\023 \001(\010\022\017" - "\n\007is_wall\030\026 \001(\010\022\031\n\021bhdraft__schedule\030\027 \001" - "(\t\022\"\n\032bhdraft__schedule_duration\030\030 \001(\002\022\r" - "\n\005scale\030\031 \001(\002\022\036\n\005color\030\032 \001(\0132\017.waypoint." - "Color\0221\n\017festival_filter\030\033 \001(\0132\030.waypoin" - "t.FestivalFilter\0220\n\017map_type_filter\030\034 \001(" - "\0132\027.waypoint.MapTypeFilter\022+\n\014mount_filt" - "er\030\035 \001(\0132\025.waypoint.MountFilter\0225\n\021profe" - "ssion_filter\030\036 \001(\0132\032.waypoint.Profession" - "Filter\022=\n\025specialization_filter\030\037 \001(\0132\036." - "waypoint.SpecializationFilter\022/\n\016species" - "_filter\030 \001(\0132\027.waypoint.SpeciesFilter\"\027" - "\n\007Texture\022\014\n\004path\030\001 \001(\t\"+\n\010Position\022\t\n\001x" - "\030\001 \001(\002\022\t\n\001y\030\002 \001(\002\022\t\n\001z\030\003 \001(\002\"0\n\rEulerRot" - "ation\022\t\n\001x\030\001 \001(\002\022\t\n\001y\030\002 \001(\002\022\t\n\001z\030\003 \001(\002\"\252" - "\003\n\007Trigger\022\024\n\014auto_trigger\030\001 \001(\010\022\024\n\014boun" - "ce_delay\030\002 \001(\002\022\027\n\017bounce_duration\030\003 \001(\002\022" - "\025\n\rbounce_height\030\004 \001(\002\022\035\n\025action_copy_cl" - "ipboard\030\005 \001(\t\022\033\n\023action_copy_message\030\006 \001" - "(\t\022\025\n\rhas_countdown\030\007 \001(\010\022\033\n\023action_info" - "_message\030\010 \001(\t\022\026\n\016invert_display\030\t \001(\010\022\024" - "\n\014reset_length\030\n \001(\002\022\r\n\005range\030\013 \001(\002\0220\n\024a" - "ction_hide_category\030\014 \001(\0132\022.waypoint.Cat" - "egory\0220\n\024action_show_category\030\r \001(\0132\022.wa" - "ypoint.Category\0222\n\026action_toggle_categor" - "y\030\016 \001(\0132\022.waypoint.Category\"\024\n\004GUID\022\014\n\004g" - "uid\030\001 \001(\005\"\024\n\005Color\022\013\n\003hex\030\001 \001(\t\"\267\001\n\016Fest" - "ivalFilter\022\022\n\ndragonbash\030\001 \001(\010\022\"\n\032festiv" - "al_of_the_four_winds\030\002 \001(\010\022\021\n\thalloween\030" - "\003 \001(\010\022\026\n\016lunar_new_year\030\004 \001(\010\022 \n\030super_a" - "dventure_festival\030\005 \001(\010\022\022\n\nwintersday\030\006 " - "\001(\010\022\014\n\004none\030\007 \001(\010\"\346\004\n\rMapTypeFilter\022\023\n\013u" - "nknown_map\030\001 \001(\010\022\024\n\014redirect_map\030\002 \001(\010\022\034" - "\n\024character_create_map\030\003 \001(\010\022\017\n\007pvp_map\030" - "\004 \001(\010\022\017\n\007gvg_map\030\005 \001(\010\022\024\n\014instance_map\030\006" - " \001(\010\022\022\n\npublic_map\030\007 \001(\010\022\026\n\016tournament_m" - "ap\030\010 \001(\010\022\024\n\014tutorial_map\030\t \001(\010\022\033\n\023user_t" - "ournament_map\030\n \001(\010\022\022\n\ncenter_map\030\013 \001(\010\022" - "!\n\031eternal_battlegrounds_map\030\014 \001(\010\022\024\n\014bl" - "uehome_map\030\r \001(\010\022\034\n\024blue_borderlands_map" - "\030\016 \001(\010\022\026\n\016green_home_map\030\017 \001(\010\022\035\n\025green_" - "borderlands_map\030\020 \001(\010\022\024\n\014red_home_map\030\021 " - "\001(\010\022\033\n\023red_borderlands_map\030\022 \001(\010\022\031\n\021fort" - "unes_vale_map\030\023 \001(\010\022\027\n\017jump_puzzle_map\030\024" - " \001(\010\022\034\n\024obsidian_sanctum_map\030\025 \001(\010\022\035\n\025ed" - "ge_of_the_mists_map\030\026 \001(\010\022\027\n\017public_mini" - "_map\030\027 \001(\010\022\026\n\016wvw_lounge_map\030\030 \001(\010\"\301\001\n\013M" - "ountFilter\022\016\n\006raptor\030\001 \001(\010\022\020\n\010springer\030\002" - " \001(\010\022\017\n\007skimmer\030\003 \001(\010\022\016\n\006jackal\030\004 \001(\010\022\017\n" - "\007griffon\030\005 \001(\010\022\025\n\rroller_beetle\030\006 \001(\010\022\017\n" - "\007warclaw\030\007 \001(\010\022\021\n\tskyscalee\030\010 \001(\010\022\r\n\005ski" - "ff\030\t \001(\010\022\024\n\014seige_turtle\030\n \001(\010\"\265\001\n\020Profe" - "ssionFilter\022\020\n\010guardian\030\001 \001(\010\022\017\n\007warrior" - "\030\002 \001(\010\022\020\n\010engineer\030\003 \001(\010\022\016\n\006ranger\030\004 \001(\010" - "\022\r\n\005thief\030\005 \001(\010\022\024\n\014elementalist\030\006 \001(\010\022\016\n" - "\006mesmer\030\007 \001(\010\022\023\n\013necromancer\030\010 \001(\010\022\022\n\nre" - "venantnt\030\t \001(\010\"\312\017\n\024SpecializationFilter\022" - "\034\n\024elementalist_tempest\030\001 \001(\010\022\031\n\021enginee" - "r_scrapper\030\002 \001(\010\022\035\n\025guardian_dragonhunte" - "r\030\003 \001(\010\022\033\n\023mesmer_chronomancer\030\004 \001(\010\022\032\n\022" - "necromancer_reaper\030\005 \001(\010\022\024\n\014ranger_druid" - "\030\006 \001(\010\022\027\n\017revenant_herald\030\007 \001(\010\022\027\n\017thief" - "_daredevil\030\010 \001(\010\022\031\n\021warrior_berserker\030\t " - "\001(\010\022\033\n\023elementalist_weaver\030\n \001(\010\022\032\n\022engi" - "neer_holosmith\030\013 \001(\010\022\032\n\022guardian_firebra" - "nd\030\014 \001(\010\022\025\n\rmesmer_mirage\030\r \001(\010\022\033\n\023necro" - "mancer_scourge\030\016 \001(\010\022\030\n\020ranger_soulbeast" - "\030\017 \001(\010\022\031\n\021revenant_renegade\030\020 \001(\010\022\025\n\rthi" - "ef_deadeye\030\021 \001(\010\022\034\n\024warrior_spellbreaker" - "\030\022 \001(\010\022\034\n\024elmentalist_catalyst\030\023 \001(\010\022\032\n\022" - "engineer_mechanist\030\024 \001(\010\022\033\n\023guardian_wil" - "lbender\030\025 \001(\010\022\027\n\017mesmer_virtuoso\030\026 \001(\010\022\035" - "\n\025necromancer_harbinger\030\027 \001(\010\022\026\n\016ranger_" - "untamed\030\030 \001(\010\022\033\n\023revenant_vindicator\030\031 \001" - "(\010\022\025\n\rthief_specter\030\032 \001(\010\022\032\n\022warrior_bla" - "desworn\030\033 \001(\010\022\030\n\020elementalist_air\030\034 \001(\010\022" - "\033\n\023elementalist_arcane\030\035 \001(\010\022\032\n\022elementa" - "list_earth\030\036 \001(\010\022\031\n\021elementalist_fire\030\037 " - "\001(\010\022\032\n\022elementalist_water\030 \001(\010\022\030\n\020engin" - "eer_alchemy\030! \001(\010\022\033\n\023engineer_explosives" - "\030\" \001(\010\022\031\n\021engineer_firearms\030# \001(\010\022\033\n\023eng" - "ineer_inventions\030$ \001(\010\022\026\n\016engineer_tools" - "\030% \001(\010\022\026\n\016guardian_honor\030& \001(\010\022\031\n\021guardi" - "an_radiance\030\' \001(\010\022\026\n\016guardian_valor\030( \001(" - "\010\022\030\n\020guardian_virtues\030) \001(\010\022\025\n\rguardian_" - "zeal\030* \001(\010\022\024\n\014mesmer_chaos\030+ \001(\010\022\031\n\021mesm" - "er_domination\030, \001(\010\022\026\n\016mesmer_dueling\030- " - "\001(\010\022\030\n\020mesmer_illusions\030. \001(\010\022\032\n\022mesmer_" - "inspiration\030/ \001(\010\022\037\n\027necromancer_blood_m" - "agic\0300 \001(\010\022\032\n\022necromancer_curses\0301 \001(\010\022\037" - "\n\027necromancer_death_magic\0302 \001(\010\022 \n\030necro" - "mancer_soul_reaping\0303 \001(\010\022\031\n\021necromancer" - "_spite\0304 \001(\010\022\033\n\023ranger_beastmastery\0305 \001(" - "\010\022\033\n\023ranger_marksmanship\0306 \001(\010\022\033\n\023ranger" - "_nature_magic\0307 \001(\010\022\032\n\022ranger_skirmishin" - "g\0308 \001(\010\022\"\n\032ranger_wilderness_survival\0309 " - "\001(\010\022\033\n\023revenant_corruption\030: \001(\010\022\034\n\024reve" - "nant_devastation\030; \001(\010\022\033\n\023revenant_invoc" - "ation\030< \001(\010\022\034\n\024revenant_retribution\030= \001(" - "\010\022\032\n\022revenant_salvation\030> \001(\010\022\030\n\020thief_a" - "crobatics\030\? \001(\010\022\036\n\026thief_critical_strike" - "s\030@ \001(\010\022\031\n\021thief_deadly_arts\030A \001(\010\022\031\n\021th" - "ief_shadow_arts\030B \001(\010\022\026\n\016thief_trickery\030" - "C \001(\010\022\024\n\014warrior_arms\030D \001(\010\022\027\n\017warrior_d" - "efense\030E \001(\010\022\032\n\022warrior_discipline\030F \001(\010" - "\022\030\n\020warrior_strength\030G \001(\010\022\027\n\017warrior_ta" - "ctics\030H \001(\010\"[\n\rSpeciesFilter\022\r\n\005asura\030\001 " - "\001(\010\022\r\n\005charr\030\002 \001(\010\022\r\n\005human\030\003 \001(\010\022\014\n\004nor" - "n\030\004 \001(\010\022\017\n\007sylvari\030\005 \001(\010\"\037\n\tTrailData\022\022\n" - "\ntrail_data\030\001 \001(\t*\?\n\rCullChirality\022\010\n\004no" - "ne\020\000\022\r\n\tclockwise\020\001\022\025\n\021counter_clockwise" - "\020\002*\257\001\n\rResetBehavior\022\022\n\016always_visible\020\000" - "\022\016\n\nmap_change\020\001\022\017\n\013daily_reset\020\002\022\t\n\005nev" - "er\020\003\022\t\n\005timer\020\004\022\r\n\tmap_reset\020\005\022\023\n\017instan" - "ce_change\020\006\022\035\n\031daily_reset_per_character" - "\020\007\022\020\n\014weekly_reset\020\010b\006proto3" - ; -static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_waypoint_2eproto_deps[1] = { -}; -static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_waypoint_2eproto_sccs[16] = { - &scc_info_Category_waypoint_2eproto.base, - &scc_info_Color_waypoint_2eproto.base, - &scc_info_EulerRotation_waypoint_2eproto.base, - &scc_info_FestivalFilter_waypoint_2eproto.base, - &scc_info_GUID_waypoint_2eproto.base, - &scc_info_Icon_waypoint_2eproto.base, - &scc_info_MapTypeFilter_waypoint_2eproto.base, - &scc_info_MountFilter_waypoint_2eproto.base, - &scc_info_Position_waypoint_2eproto.base, - &scc_info_ProfessionFilter_waypoint_2eproto.base, - &scc_info_SpecializationFilter_waypoint_2eproto.base, - &scc_info_SpeciesFilter_waypoint_2eproto.base, - &scc_info_Texture_waypoint_2eproto.base, - &scc_info_Trail_waypoint_2eproto.base, - &scc_info_TrailData_waypoint_2eproto.base, - &scc_info_Trigger_waypoint_2eproto.base, -}; -static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_waypoint_2eproto_once; -const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_waypoint_2eproto = { - false, false, descriptor_table_protodef_waypoint_2eproto, "waypoint.proto", 6028, - &descriptor_table_waypoint_2eproto_once, descriptor_table_waypoint_2eproto_sccs, descriptor_table_waypoint_2eproto_deps, 16, 0, - schemas, file_default_instances, TableStruct_waypoint_2eproto::offsets, - file_level_metadata_waypoint_2eproto, 17, file_level_enum_descriptors_waypoint_2eproto, file_level_service_descriptors_waypoint_2eproto, -}; - -// Force running AddDescriptors() at dynamic initialization time. -static bool dynamic_init_dummy_waypoint_2eproto = (static_cast(::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_waypoint_2eproto)), true); -namespace waypoint { -const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* CullChirality_descriptor() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_waypoint_2eproto); - return file_level_enum_descriptors_waypoint_2eproto[0]; -} -bool CullChirality_IsValid(int value) { - switch (value) { - case 0: - case 1: - case 2: - return true; - default: - return false; - } -} - -const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ResetBehavior_descriptor() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_waypoint_2eproto); - return file_level_enum_descriptors_waypoint_2eproto[1]; -} -bool ResetBehavior_IsValid(int value) { - switch (value) { - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - return true; - default: - return false; - } -} - - -// =================================================================== - -Category_ChildrenEntry_DoNotUse::Category_ChildrenEntry_DoNotUse() {} -Category_ChildrenEntry_DoNotUse::Category_ChildrenEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : SuperType(arena) {} -void Category_ChildrenEntry_DoNotUse::MergeFrom(const Category_ChildrenEntry_DoNotUse& other) { - MergeFromInternal(other); -} -::PROTOBUF_NAMESPACE_ID::Metadata Category_ChildrenEntry_DoNotUse::GetMetadata() const { - return GetMetadataStatic(); -} -void Category_ChildrenEntry_DoNotUse::MergeFrom( - const ::PROTOBUF_NAMESPACE_ID::Message& other) { - ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom(other); -} - - -// =================================================================== - -void Category::InitAsDefaultInstance() { -} -class Category::_Internal { - public: -}; - -Category::Category(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena), - children_(arena) { - SharedCtor(); - RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:waypoint.Category) -} -Category::Category(const Category& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - children_.MergeFrom(from.children_); - display_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_display_name().empty()) { - display_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_display_name(), - GetArena()); - } - name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_name().empty()) { - name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_name(), - GetArena()); - } - tooltip_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_tooltip_name().empty()) { - tooltip_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_tooltip_name(), - GetArena()); - } - ::memcpy(&default_visibility_, &from.default_visibility_, - static_cast(reinterpret_cast(&is_separator_) - - reinterpret_cast(&default_visibility_)) + sizeof(is_separator_)); - // @@protoc_insertion_point(copy_constructor:waypoint.Category) -} - -void Category::SharedCtor() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Category_waypoint_2eproto.base); - display_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - tooltip_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - ::memset(&default_visibility_, 0, static_cast( - reinterpret_cast(&is_separator_) - - reinterpret_cast(&default_visibility_)) + sizeof(is_separator_)); -} - -Category::~Category() { - // @@protoc_insertion_point(destructor:waypoint.Category) - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -void Category::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); - display_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - tooltip_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -void Category::ArenaDtor(void* object) { - Category* _this = reinterpret_cast< Category* >(object); - (void)_this; -} -void Category::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void Category::SetCachedSize(int size) const { - _cached_size_.Set(size); -} -const Category& Category::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Category_waypoint_2eproto.base); - return *internal_default_instance(); -} - - -void Category::Clear() { -// @@protoc_insertion_point(message_clear_start:waypoint.Category) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - children_.Clear(); - display_name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - tooltip_name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - ::memset(&default_visibility_, 0, static_cast( - reinterpret_cast(&is_separator_) - - reinterpret_cast(&default_visibility_)) + sizeof(is_separator_)); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* Category::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; - while (!ctx->Done(&ptr)) { - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - CHK_(ptr); - switch (tag >> 3) { - // bool default_visibility = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - default_visibility_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // string display_name = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { - auto str = _internal_mutable_display_name(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "waypoint.Category.display_name")); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool is_separator = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { - is_separator_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // string name = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { - auto str = _internal_mutable_name(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "waypoint.Category.name")); - CHK_(ptr); - } else goto handle_unusual; - continue; - // string tooltip_name = 5; - case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) { - auto str = _internal_mutable_tooltip_name(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "waypoint.Category.tooltip_name")); - CHK_(ptr); - } else goto handle_unusual; - continue; - // map children = 6; - case 6: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(&children_, ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<50>(ptr)); - } else goto handle_unusual; - continue; - default: { - handle_unusual: - if ((tag & 7) == 4 || tag == 0) { - ctx->SetLastTag(tag); - goto success; - } - ptr = UnknownFieldParse(tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - continue; - } - } // switch - } // while -success: - return ptr; -failure: - ptr = nullptr; - goto success; -#undef CHK_ -} - -::PROTOBUF_NAMESPACE_ID::uint8* Category::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:waypoint.Category) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // bool default_visibility = 1; - if (this->default_visibility() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->_internal_default_visibility(), target); - } - - // string display_name = 2; - if (this->display_name().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_display_name().data(), static_cast(this->_internal_display_name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "waypoint.Category.display_name"); - target = stream->WriteStringMaybeAliased( - 2, this->_internal_display_name(), target); - } - - // bool is_separator = 3; - if (this->is_separator() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_is_separator(), target); - } - - // string name = 4; - if (this->name().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_name().data(), static_cast(this->_internal_name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "waypoint.Category.name"); - target = stream->WriteStringMaybeAliased( - 4, this->_internal_name(), target); - } - - // string tooltip_name = 5; - if (this->tooltip_name().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_tooltip_name().data(), static_cast(this->_internal_tooltip_name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "waypoint.Category.tooltip_name"); - target = stream->WriteStringMaybeAliased( - 5, this->_internal_tooltip_name(), target); - } - - // map children = 6; - if (!this->_internal_children().empty()) { - typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::waypoint::Category >::const_pointer - ConstPtr; - typedef ConstPtr SortItem; - typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst Less; - struct Utf8Check { - static void Check(ConstPtr p) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - p->first.data(), static_cast(p->first.length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "waypoint.Category.ChildrenEntry.key"); - } - }; - - if (stream->IsSerializationDeterministic() && - this->_internal_children().size() > 1) { - ::std::unique_ptr items( - new SortItem[this->_internal_children().size()]); - typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::waypoint::Category >::size_type size_type; - size_type n = 0; - for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::waypoint::Category >::const_iterator - it = this->_internal_children().begin(); - it != this->_internal_children().end(); ++it, ++n) { - items[static_cast(n)] = SortItem(&*it); - } - ::std::sort(&items[0], &items[static_cast(n)], Less()); - for (size_type i = 0; i < n; i++) { - target = Category_ChildrenEntry_DoNotUse::Funcs::InternalSerialize(6, items[static_cast(i)]->first, items[static_cast(i)]->second, target, stream); - Utf8Check::Check(&(*items[static_cast(i)])); - } - } else { - for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::waypoint::Category >::const_iterator - it = this->_internal_children().begin(); - it != this->_internal_children().end(); ++it) { - target = Category_ChildrenEntry_DoNotUse::Funcs::InternalSerialize(6, it->first, it->second, target, stream); - Utf8Check::Check(&(*it)); - } - } - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:waypoint.Category) - return target; -} - -size_t Category::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:waypoint.Category) - size_t total_size = 0; - - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // map children = 6; - total_size += 1 * - ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_children_size()); - for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::waypoint::Category >::const_iterator - it = this->_internal_children().begin(); - it != this->_internal_children().end(); ++it) { - total_size += Category_ChildrenEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); - } - - // string display_name = 2; - if (this->display_name().size() > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_display_name()); - } - - // string name = 4; - if (this->name().size() > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_name()); - } - - // string tooltip_name = 5; - if (this->tooltip_name().size() > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_tooltip_name()); - } - - // bool default_visibility = 1; - if (this->default_visibility() != 0) { - total_size += 1 + 1; - } - - // bool is_separator = 3; - if (this->is_separator() != 0) { - total_size += 1 + 1; - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( - _internal_metadata_, total_size, &_cached_size_); - } - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} - -void Category::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:waypoint.Category) - GOOGLE_DCHECK_NE(&from, this); - const Category* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:waypoint.Category) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:waypoint.Category) - MergeFrom(*source); - } -} - -void Category::MergeFrom(const Category& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:waypoint.Category) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - children_.MergeFrom(from.children_); - if (from.display_name().size() > 0) { - _internal_set_display_name(from._internal_display_name()); - } - if (from.name().size() > 0) { - _internal_set_name(from._internal_name()); - } - if (from.tooltip_name().size() > 0) { - _internal_set_tooltip_name(from._internal_tooltip_name()); - } - if (from.default_visibility() != 0) { - _internal_set_default_visibility(from._internal_default_visibility()); - } - if (from.is_separator() != 0) { - _internal_set_is_separator(from._internal_is_separator()); - } -} - -void Category::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:waypoint.Category) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void Category::CopyFrom(const Category& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:waypoint.Category) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool Category::IsInitialized() const { - return true; -} - -void Category::InternalSwap(Category* other) { - using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - children_.Swap(&other->children_); - display_name_.Swap(&other->display_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - tooltip_name_.Swap(&other->tooltip_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(Category, is_separator_) - + sizeof(Category::is_separator_) - - PROTOBUF_FIELD_OFFSET(Category, default_visibility_)>( - reinterpret_cast(&default_visibility_), - reinterpret_cast(&other->default_visibility_)); -} - -::PROTOBUF_NAMESPACE_ID::Metadata Category::GetMetadata() const { - return GetMetadataStatic(); -} - - -// =================================================================== - -void Icon::InitAsDefaultInstance() { - ::waypoint::_Icon_default_instance_._instance.get_mutable()->category_ = const_cast< ::waypoint::Category*>( - ::waypoint::Category::internal_default_instance()); - ::waypoint::_Icon_default_instance_._instance.get_mutable()->texture_ = const_cast< ::waypoint::Texture*>( - ::waypoint::Texture::internal_default_instance()); - ::waypoint::_Icon_default_instance_._instance.get_mutable()->guid_ = const_cast< ::waypoint::GUID*>( - ::waypoint::GUID::internal_default_instance()); - ::waypoint::_Icon_default_instance_._instance.get_mutable()->position_ = const_cast< ::waypoint::Position*>( - ::waypoint::Position::internal_default_instance()); - ::waypoint::_Icon_default_instance_._instance.get_mutable()->trigger_ = const_cast< ::waypoint::Trigger*>( - ::waypoint::Trigger::internal_default_instance()); -} -class Icon::_Internal { - public: - static const ::waypoint::Category& category(const Icon* msg); - static const ::waypoint::Texture& texture(const Icon* msg); - static const ::waypoint::GUID& guid(const Icon* msg); - static const ::waypoint::Position& position(const Icon* msg); - static const ::waypoint::Trigger& trigger(const Icon* msg); -}; - -const ::waypoint::Category& -Icon::_Internal::category(const Icon* msg) { - return *msg->category_; -} -const ::waypoint::Texture& -Icon::_Internal::texture(const Icon* msg) { - return *msg->texture_; -} -const ::waypoint::GUID& -Icon::_Internal::guid(const Icon* msg) { - return *msg->guid_; -} -const ::waypoint::Position& -Icon::_Internal::position(const Icon* msg) { - return *msg->position_; -} -const ::waypoint::Trigger& -Icon::_Internal::trigger(const Icon* msg) { - return *msg->trigger_; -} -Icon::Icon(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(); - RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:waypoint.Icon) -} -Icon::Icon(const Icon& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - tip_description_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_tip_description().empty()) { - tip_description_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_tip_description(), - GetArena()); - } - tip_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_tip_name().empty()) { - tip_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_tip_name(), - GetArena()); - } - bhdraft__schedule_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_bhdraft__schedule().empty()) { - bhdraft__schedule_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_bhdraft__schedule(), - GetArena()); - } - if (from._internal_has_category()) { - category_ = new ::waypoint::Category(*from.category_); - } else { - category_ = nullptr; - } - if (from._internal_has_texture()) { - texture_ = new ::waypoint::Texture(*from.texture_); - } else { - texture_ = nullptr; - } - if (from._internal_has_guid()) { - guid_ = new ::waypoint::GUID(*from.guid_); - } else { - guid_ = nullptr; - } - if (from._internal_has_position()) { - position_ = new ::waypoint::Position(*from.position_); - } else { - position_ = nullptr; - } - if (from._internal_has_trigger()) { - trigger_ = new ::waypoint::Trigger(*from.trigger_); - } else { - trigger_ = nullptr; - } - ::memcpy(&map_id_, &from.map_id_, - static_cast(reinterpret_cast(&__tentative__render_on_minimap_) - - reinterpret_cast(&map_id_)) + sizeof(__tentative__render_on_minimap_)); - // @@protoc_insertion_point(copy_constructor:waypoint.Icon) -} - -void Icon::SharedCtor() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Icon_waypoint_2eproto.base); - tip_description_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - tip_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - bhdraft__schedule_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - ::memset(&category_, 0, static_cast( - reinterpret_cast(&__tentative__render_on_minimap_) - - reinterpret_cast(&category_)) + sizeof(__tentative__render_on_minimap_)); -} - -Icon::~Icon() { - // @@protoc_insertion_point(destructor:waypoint.Icon) - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -void Icon::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); - tip_description_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - tip_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - bhdraft__schedule_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (this != internal_default_instance()) delete category_; - if (this != internal_default_instance()) delete texture_; - if (this != internal_default_instance()) delete guid_; - if (this != internal_default_instance()) delete position_; - if (this != internal_default_instance()) delete trigger_; -} - -void Icon::ArenaDtor(void* object) { - Icon* _this = reinterpret_cast< Icon* >(object); - (void)_this; -} -void Icon::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void Icon::SetCachedSize(int size) const { - _cached_size_.Set(size); -} -const Icon& Icon::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Icon_waypoint_2eproto.base); - return *internal_default_instance(); -} - - -void Icon::Clear() { -// @@protoc_insertion_point(message_clear_start:waypoint.Icon) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - tip_description_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - tip_name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - bhdraft__schedule_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - if (GetArena() == nullptr && category_ != nullptr) { - delete category_; - } - category_ = nullptr; - if (GetArena() == nullptr && texture_ != nullptr) { - delete texture_; - } - texture_ = nullptr; - if (GetArena() == nullptr && guid_ != nullptr) { - delete guid_; - } - guid_ = nullptr; - if (GetArena() == nullptr && position_ != nullptr) { - delete position_; - } - position_ = nullptr; - if (GetArena() == nullptr && trigger_ != nullptr) { - delete trigger_; - } - trigger_ = nullptr; - ::memset(&map_id_, 0, static_cast( - reinterpret_cast(&__tentative__render_on_minimap_) - - reinterpret_cast(&map_id_)) + sizeof(__tentative__render_on_minimap_)); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* Icon::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; - while (!ctx->Done(&ptr)) { - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - CHK_(ptr); - switch (tag >> 3) { - // .waypoint.Category category = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - ptr = ctx->ParseMessage(_internal_mutable_category(), ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // .waypoint.Texture texture = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { - ptr = ctx->ParseMessage(_internal_mutable_texture(), ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // .waypoint.GUID guid = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { - ptr = ctx->ParseMessage(_internal_mutable_guid(), ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // int32 map_id = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { - map_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // float distance_fade_end = 5; - case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 45)) { - distance_fade_end_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - // float distance_fade_start = 6; - case 6: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 53)) { - distance_fade_start_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - // float height_offset = 7; - case 7: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 61)) { - height_offset_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - // .waypoint.Position position = 8; - case 8: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 66)) { - ptr = ctx->ParseMessage(_internal_mutable_position(), ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // .waypoint.ResetBehavior reset_behavior = 9; - case 9: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 72)) { - ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - _internal_set_reset_behavior(static_cast<::waypoint::ResetBehavior>(val)); - } else goto handle_unusual; - continue; - // .waypoint.Trigger trigger = 10; - case 10: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 82)) { - ptr = ctx->ParseMessage(_internal_mutable_trigger(), ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // fixed32 achievement_bit = 16; - case 16: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 133)) { - achievement_bit_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint32>(ptr); - ptr += sizeof(::PROTOBUF_NAMESPACE_ID::uint32); - } else goto handle_unusual; - continue; - // int32 achievement_id = 17; - case 17: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 136)) { - achievement_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // float alpha = 18; - case 18: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 149)) { - alpha_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - // bool can_fade = 19; - case 19: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 152)) { - can_fade_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // int32 minimum_size_on_screen = 20; - case 20: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 160)) { - minimum_size_on_screen_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // int32 map_display_size = 21; - case 21: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 168)) { - map_display_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // int32 maximum_size_on_screen = 22; - case 22: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 176)) { - maximum_size_on_screen_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool scale_on_map_with_zoom = 23; - case 23: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 184)) { - scale_on_map_with_zoom_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // string tip_description = 24; - case 24: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 194)) { - auto str = _internal_mutable_tip_description(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "waypoint.Icon.tip_description")); - CHK_(ptr); - } else goto handle_unusual; - continue; - // string tip_name = 25; - case 25: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 202)) { - auto str = _internal_mutable_tip_name(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "waypoint.Icon.tip_name")); - CHK_(ptr); - } else goto handle_unusual; - continue; - // float __tentative__scale = 2048; - case 2048: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 5)) { - __tentative__scale_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - // bool __tentative__render_ingame = 2049; - case 2049: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - __tentative__render_ingame_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool __tentative__render_on_map = 2050; - case 2050: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { - __tentative__render_on_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool __tentative__render_on_minimap = 2051; - case 2051: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { - __tentative__render_on_minimap_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // string bhdraft__schedule = 2052; - case 2052: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { - auto str = _internal_mutable_bhdraft__schedule(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "waypoint.Icon.bhdraft__schedule")); - CHK_(ptr); - } else goto handle_unusual; - continue; - // float bhdraft__schedule_duration = 2053; - case 2053: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 45)) { - bhdraft__schedule_duration_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - default: { - handle_unusual: - if ((tag & 7) == 4 || tag == 0) { - ctx->SetLastTag(tag); - goto success; - } - ptr = UnknownFieldParse(tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - continue; - } - } // switch - } // while -success: - return ptr; -failure: - ptr = nullptr; - goto success; -#undef CHK_ -} - -::PROTOBUF_NAMESPACE_ID::uint8* Icon::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:waypoint.Icon) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // .waypoint.Category category = 1; - if (this->has_category()) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage( - 1, _Internal::category(this), target, stream); - } - - // .waypoint.Texture texture = 2; - if (this->has_texture()) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage( - 2, _Internal::texture(this), target, stream); - } - - // .waypoint.GUID guid = 3; - if (this->has_guid()) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage( - 3, _Internal::guid(this), target, stream); - } - - // int32 map_id = 4; - if (this->map_id() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->_internal_map_id(), target); - } - - // float distance_fade_end = 5; - if (!(this->distance_fade_end() <= 0 && this->distance_fade_end() >= 0)) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(5, this->_internal_distance_fade_end(), target); - } - - // float distance_fade_start = 6; - if (!(this->distance_fade_start() <= 0 && this->distance_fade_start() >= 0)) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(6, this->_internal_distance_fade_start(), target); - } - - // float height_offset = 7; - if (!(this->height_offset() <= 0 && this->height_offset() >= 0)) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(7, this->_internal_height_offset(), target); - } - - // .waypoint.Position position = 8; - if (this->has_position()) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage( - 8, _Internal::position(this), target, stream); - } - - // .waypoint.ResetBehavior reset_behavior = 9; - if (this->reset_behavior() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( - 9, this->_internal_reset_behavior(), target); - } - - // .waypoint.Trigger trigger = 10; - if (this->has_trigger()) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage( - 10, _Internal::trigger(this), target, stream); - } - - // fixed32 achievement_bit = 16; - if (this->achievement_bit() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFixed32ToArray(16, this->_internal_achievement_bit(), target); - } - - // int32 achievement_id = 17; - if (this->achievement_id() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(17, this->_internal_achievement_id(), target); - } - - // float alpha = 18; - if (!(this->alpha() <= 0 && this->alpha() >= 0)) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(18, this->_internal_alpha(), target); - } - - // bool can_fade = 19; - if (this->can_fade() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(19, this->_internal_can_fade(), target); - } - - // int32 minimum_size_on_screen = 20; - if (this->minimum_size_on_screen() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(20, this->_internal_minimum_size_on_screen(), target); - } - - // int32 map_display_size = 21; - if (this->map_display_size() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(21, this->_internal_map_display_size(), target); - } - - // int32 maximum_size_on_screen = 22; - if (this->maximum_size_on_screen() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(22, this->_internal_maximum_size_on_screen(), target); - } - - // bool scale_on_map_with_zoom = 23; - if (this->scale_on_map_with_zoom() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(23, this->_internal_scale_on_map_with_zoom(), target); - } - - // string tip_description = 24; - if (this->tip_description().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_tip_description().data(), static_cast(this->_internal_tip_description().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "waypoint.Icon.tip_description"); - target = stream->WriteStringMaybeAliased( - 24, this->_internal_tip_description(), target); - } - - // string tip_name = 25; - if (this->tip_name().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_tip_name().data(), static_cast(this->_internal_tip_name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "waypoint.Icon.tip_name"); - target = stream->WriteStringMaybeAliased( - 25, this->_internal_tip_name(), target); - } - - // float __tentative__scale = 2048; - if (!(this->__tentative__scale() <= 0 && this->__tentative__scale() >= 0)) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2048, this->_internal___tentative__scale(), target); - } - - // bool __tentative__render_ingame = 2049; - if (this->__tentative__render_ingame() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2049, this->_internal___tentative__render_ingame(), target); - } - - // bool __tentative__render_on_map = 2050; - if (this->__tentative__render_on_map() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2050, this->_internal___tentative__render_on_map(), target); - } - - // bool __tentative__render_on_minimap = 2051; - if (this->__tentative__render_on_minimap() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2051, this->_internal___tentative__render_on_minimap(), target); - } - - // string bhdraft__schedule = 2052; - if (this->bhdraft__schedule().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_bhdraft__schedule().data(), static_cast(this->_internal_bhdraft__schedule().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "waypoint.Icon.bhdraft__schedule"); - target = stream->WriteStringMaybeAliased( - 2052, this->_internal_bhdraft__schedule(), target); - } - - // float bhdraft__schedule_duration = 2053; - if (!(this->bhdraft__schedule_duration() <= 0 && this->bhdraft__schedule_duration() >= 0)) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2053, this->_internal_bhdraft__schedule_duration(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:waypoint.Icon) - return target; -} - -size_t Icon::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:waypoint.Icon) - size_t total_size = 0; - - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // string tip_description = 24; - if (this->tip_description().size() > 0) { - total_size += 2 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_tip_description()); - } - - // string tip_name = 25; - if (this->tip_name().size() > 0) { - total_size += 2 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_tip_name()); - } - - // string bhdraft__schedule = 2052; - if (this->bhdraft__schedule().size() > 0) { - total_size += 3 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_bhdraft__schedule()); - } - - // .waypoint.Category category = 1; - if (this->has_category()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *category_); - } - - // .waypoint.Texture texture = 2; - if (this->has_texture()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *texture_); - } - - // .waypoint.GUID guid = 3; - if (this->has_guid()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *guid_); - } - - // .waypoint.Position position = 8; - if (this->has_position()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *position_); - } - - // .waypoint.Trigger trigger = 10; - if (this->has_trigger()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *trigger_); - } - - // int32 map_id = 4; - if (this->map_id() != 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( - this->_internal_map_id()); - } - - // float distance_fade_end = 5; - if (!(this->distance_fade_end() <= 0 && this->distance_fade_end() >= 0)) { - total_size += 1 + 4; - } - - // float distance_fade_start = 6; - if (!(this->distance_fade_start() <= 0 && this->distance_fade_start() >= 0)) { - total_size += 1 + 4; - } - - // float height_offset = 7; - if (!(this->height_offset() <= 0 && this->height_offset() >= 0)) { - total_size += 1 + 4; - } - - // .waypoint.ResetBehavior reset_behavior = 9; - if (this->reset_behavior() != 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_reset_behavior()); - } - - // fixed32 achievement_bit = 16; - if (this->achievement_bit() != 0) { - total_size += 2 + 4; - } - - // int32 achievement_id = 17; - if (this->achievement_id() != 0) { - total_size += 2 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( - this->_internal_achievement_id()); - } - - // float alpha = 18; - if (!(this->alpha() <= 0 && this->alpha() >= 0)) { - total_size += 2 + 4; - } - - // int32 minimum_size_on_screen = 20; - if (this->minimum_size_on_screen() != 0) { - total_size += 2 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( - this->_internal_minimum_size_on_screen()); - } - - // int32 map_display_size = 21; - if (this->map_display_size() != 0) { - total_size += 2 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( - this->_internal_map_display_size()); - } - - // float bhdraft__schedule_duration = 2053; - if (!(this->bhdraft__schedule_duration() <= 0 && this->bhdraft__schedule_duration() >= 0)) { - total_size += 3 + 4; - } - - // int32 maximum_size_on_screen = 22; - if (this->maximum_size_on_screen() != 0) { - total_size += 2 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( - this->_internal_maximum_size_on_screen()); - } - - // bool can_fade = 19; - if (this->can_fade() != 0) { - total_size += 2 + 1; - } - - // bool scale_on_map_with_zoom = 23; - if (this->scale_on_map_with_zoom() != 0) { - total_size += 2 + 1; - } - - // bool __tentative__render_ingame = 2049; - if (this->__tentative__render_ingame() != 0) { - total_size += 3 + 1; - } - - // bool __tentative__render_on_map = 2050; - if (this->__tentative__render_on_map() != 0) { - total_size += 3 + 1; - } - - // float __tentative__scale = 2048; - if (!(this->__tentative__scale() <= 0 && this->__tentative__scale() >= 0)) { - total_size += 3 + 4; - } - - // bool __tentative__render_on_minimap = 2051; - if (this->__tentative__render_on_minimap() != 0) { - total_size += 3 + 1; - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( - _internal_metadata_, total_size, &_cached_size_); - } - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} - -void Icon::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:waypoint.Icon) - GOOGLE_DCHECK_NE(&from, this); - const Icon* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:waypoint.Icon) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:waypoint.Icon) - MergeFrom(*source); - } -} - -void Icon::MergeFrom(const Icon& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:waypoint.Icon) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - if (from.tip_description().size() > 0) { - _internal_set_tip_description(from._internal_tip_description()); - } - if (from.tip_name().size() > 0) { - _internal_set_tip_name(from._internal_tip_name()); - } - if (from.bhdraft__schedule().size() > 0) { - _internal_set_bhdraft__schedule(from._internal_bhdraft__schedule()); - } - if (from.has_category()) { - _internal_mutable_category()->::waypoint::Category::MergeFrom(from._internal_category()); - } - if (from.has_texture()) { - _internal_mutable_texture()->::waypoint::Texture::MergeFrom(from._internal_texture()); - } - if (from.has_guid()) { - _internal_mutable_guid()->::waypoint::GUID::MergeFrom(from._internal_guid()); - } - if (from.has_position()) { - _internal_mutable_position()->::waypoint::Position::MergeFrom(from._internal_position()); - } - if (from.has_trigger()) { - _internal_mutable_trigger()->::waypoint::Trigger::MergeFrom(from._internal_trigger()); - } - if (from.map_id() != 0) { - _internal_set_map_id(from._internal_map_id()); - } - if (!(from.distance_fade_end() <= 0 && from.distance_fade_end() >= 0)) { - _internal_set_distance_fade_end(from._internal_distance_fade_end()); - } - if (!(from.distance_fade_start() <= 0 && from.distance_fade_start() >= 0)) { - _internal_set_distance_fade_start(from._internal_distance_fade_start()); - } - if (!(from.height_offset() <= 0 && from.height_offset() >= 0)) { - _internal_set_height_offset(from._internal_height_offset()); - } - if (from.reset_behavior() != 0) { - _internal_set_reset_behavior(from._internal_reset_behavior()); - } - if (from.achievement_bit() != 0) { - _internal_set_achievement_bit(from._internal_achievement_bit()); - } - if (from.achievement_id() != 0) { - _internal_set_achievement_id(from._internal_achievement_id()); - } - if (!(from.alpha() <= 0 && from.alpha() >= 0)) { - _internal_set_alpha(from._internal_alpha()); - } - if (from.minimum_size_on_screen() != 0) { - _internal_set_minimum_size_on_screen(from._internal_minimum_size_on_screen()); - } - if (from.map_display_size() != 0) { - _internal_set_map_display_size(from._internal_map_display_size()); - } - if (!(from.bhdraft__schedule_duration() <= 0 && from.bhdraft__schedule_duration() >= 0)) { - _internal_set_bhdraft__schedule_duration(from._internal_bhdraft__schedule_duration()); - } - if (from.maximum_size_on_screen() != 0) { - _internal_set_maximum_size_on_screen(from._internal_maximum_size_on_screen()); - } - if (from.can_fade() != 0) { - _internal_set_can_fade(from._internal_can_fade()); - } - if (from.scale_on_map_with_zoom() != 0) { - _internal_set_scale_on_map_with_zoom(from._internal_scale_on_map_with_zoom()); - } - if (from.__tentative__render_ingame() != 0) { - _internal_set___tentative__render_ingame(from._internal___tentative__render_ingame()); - } - if (from.__tentative__render_on_map() != 0) { - _internal_set___tentative__render_on_map(from._internal___tentative__render_on_map()); - } - if (!(from.__tentative__scale() <= 0 && from.__tentative__scale() >= 0)) { - _internal_set___tentative__scale(from._internal___tentative__scale()); - } - if (from.__tentative__render_on_minimap() != 0) { - _internal_set___tentative__render_on_minimap(from._internal___tentative__render_on_minimap()); - } -} - -void Icon::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:waypoint.Icon) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void Icon::CopyFrom(const Icon& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:waypoint.Icon) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool Icon::IsInitialized() const { - return true; -} - -void Icon::InternalSwap(Icon* other) { - using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - tip_description_.Swap(&other->tip_description_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - tip_name_.Swap(&other->tip_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - bhdraft__schedule_.Swap(&other->bhdraft__schedule_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(Icon, __tentative__render_on_minimap_) - + sizeof(Icon::__tentative__render_on_minimap_) - - PROTOBUF_FIELD_OFFSET(Icon, category_)>( - reinterpret_cast(&category_), - reinterpret_cast(&other->category_)); -} - -::PROTOBUF_NAMESPACE_ID::Metadata Icon::GetMetadata() const { - return GetMetadataStatic(); -} - - -// =================================================================== - -void Trail::InitAsDefaultInstance() { - ::waypoint::_Trail_default_instance_._instance.get_mutable()->category_ = const_cast< ::waypoint::Category*>( - ::waypoint::Category::internal_default_instance()); - ::waypoint::_Trail_default_instance_._instance.get_mutable()->texture_ = const_cast< ::waypoint::Texture*>( - ::waypoint::Texture::internal_default_instance()); - ::waypoint::_Trail_default_instance_._instance.get_mutable()->guid_ = const_cast< ::waypoint::GUID*>( - ::waypoint::GUID::internal_default_instance()); - ::waypoint::_Trail_default_instance_._instance.get_mutable()->trail_data_ = const_cast< ::waypoint::TrailData*>( - ::waypoint::TrailData::internal_default_instance()); - ::waypoint::_Trail_default_instance_._instance.get_mutable()->color_ = const_cast< ::waypoint::Color*>( - ::waypoint::Color::internal_default_instance()); - ::waypoint::_Trail_default_instance_._instance.get_mutable()->festival_filter_ = const_cast< ::waypoint::FestivalFilter*>( - ::waypoint::FestivalFilter::internal_default_instance()); - ::waypoint::_Trail_default_instance_._instance.get_mutable()->map_type_filter_ = const_cast< ::waypoint::MapTypeFilter*>( - ::waypoint::MapTypeFilter::internal_default_instance()); - ::waypoint::_Trail_default_instance_._instance.get_mutable()->mount_filter_ = const_cast< ::waypoint::MountFilter*>( - ::waypoint::MountFilter::internal_default_instance()); - ::waypoint::_Trail_default_instance_._instance.get_mutable()->profession_filter_ = const_cast< ::waypoint::ProfessionFilter*>( - ::waypoint::ProfessionFilter::internal_default_instance()); - ::waypoint::_Trail_default_instance_._instance.get_mutable()->specialization_filter_ = const_cast< ::waypoint::SpecializationFilter*>( - ::waypoint::SpecializationFilter::internal_default_instance()); - ::waypoint::_Trail_default_instance_._instance.get_mutable()->species_filter_ = const_cast< ::waypoint::SpeciesFilter*>( - ::waypoint::SpeciesFilter::internal_default_instance()); -} -class Trail::_Internal { - public: - static const ::waypoint::Category& category(const Trail* msg); - static const ::waypoint::Texture& texture(const Trail* msg); - static const ::waypoint::GUID& guid(const Trail* msg); - static const ::waypoint::TrailData& trail_data(const Trail* msg); - static const ::waypoint::Color& color(const Trail* msg); - static const ::waypoint::FestivalFilter& festival_filter(const Trail* msg); - static const ::waypoint::MapTypeFilter& map_type_filter(const Trail* msg); - static const ::waypoint::MountFilter& mount_filter(const Trail* msg); - static const ::waypoint::ProfessionFilter& profession_filter(const Trail* msg); - static const ::waypoint::SpecializationFilter& specialization_filter(const Trail* msg); - static const ::waypoint::SpeciesFilter& species_filter(const Trail* msg); -}; - -const ::waypoint::Category& -Trail::_Internal::category(const Trail* msg) { - return *msg->category_; -} -const ::waypoint::Texture& -Trail::_Internal::texture(const Trail* msg) { - return *msg->texture_; -} -const ::waypoint::GUID& -Trail::_Internal::guid(const Trail* msg) { - return *msg->guid_; -} -const ::waypoint::TrailData& -Trail::_Internal::trail_data(const Trail* msg) { - return *msg->trail_data_; -} -const ::waypoint::Color& -Trail::_Internal::color(const Trail* msg) { - return *msg->color_; -} -const ::waypoint::FestivalFilter& -Trail::_Internal::festival_filter(const Trail* msg) { - return *msg->festival_filter_; -} -const ::waypoint::MapTypeFilter& -Trail::_Internal::map_type_filter(const Trail* msg) { - return *msg->map_type_filter_; -} -const ::waypoint::MountFilter& -Trail::_Internal::mount_filter(const Trail* msg) { - return *msg->mount_filter_; -} -const ::waypoint::ProfessionFilter& -Trail::_Internal::profession_filter(const Trail* msg) { - return *msg->profession_filter_; -} -const ::waypoint::SpecializationFilter& -Trail::_Internal::specialization_filter(const Trail* msg) { - return *msg->specialization_filter_; -} -const ::waypoint::SpeciesFilter& -Trail::_Internal::species_filter(const Trail* msg) { - return *msg->species_filter_; -} -Trail::Trail(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(); - RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:waypoint.Trail) -} -Trail::Trail(const Trail& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - bhdraft__schedule_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_bhdraft__schedule().empty()) { - bhdraft__schedule_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_bhdraft__schedule(), - GetArena()); - } - if (from._internal_has_category()) { - category_ = new ::waypoint::Category(*from.category_); - } else { - category_ = nullptr; - } - if (from._internal_has_texture()) { - texture_ = new ::waypoint::Texture(*from.texture_); - } else { - texture_ = nullptr; - } - if (from._internal_has_guid()) { - guid_ = new ::waypoint::GUID(*from.guid_); - } else { - guid_ = nullptr; - } - if (from._internal_has_trail_data()) { - trail_data_ = new ::waypoint::TrailData(*from.trail_data_); - } else { - trail_data_ = nullptr; - } - if (from._internal_has_color()) { - color_ = new ::waypoint::Color(*from.color_); - } else { - color_ = nullptr; - } - if (from._internal_has_festival_filter()) { - festival_filter_ = new ::waypoint::FestivalFilter(*from.festival_filter_); - } else { - festival_filter_ = nullptr; - } - if (from._internal_has_map_type_filter()) { - map_type_filter_ = new ::waypoint::MapTypeFilter(*from.map_type_filter_); - } else { - map_type_filter_ = nullptr; - } - if (from._internal_has_mount_filter()) { - mount_filter_ = new ::waypoint::MountFilter(*from.mount_filter_); - } else { - mount_filter_ = nullptr; - } - if (from._internal_has_profession_filter()) { - profession_filter_ = new ::waypoint::ProfessionFilter(*from.profession_filter_); - } else { - profession_filter_ = nullptr; - } - if (from._internal_has_specialization_filter()) { - specialization_filter_ = new ::waypoint::SpecializationFilter(*from.specialization_filter_); - } else { - specialization_filter_ = nullptr; - } - if (from._internal_has_species_filter()) { - species_filter_ = new ::waypoint::SpeciesFilter(*from.species_filter_); - } else { - species_filter_ = nullptr; - } - ::memcpy(&map_id_, &from.map_id_, - static_cast(reinterpret_cast(&scale_) - - reinterpret_cast(&map_id_)) + sizeof(scale_)); - // @@protoc_insertion_point(copy_constructor:waypoint.Trail) -} - -void Trail::SharedCtor() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Trail_waypoint_2eproto.base); - bhdraft__schedule_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - ::memset(&category_, 0, static_cast( - reinterpret_cast(&scale_) - - reinterpret_cast(&category_)) + sizeof(scale_)); -} - -Trail::~Trail() { - // @@protoc_insertion_point(destructor:waypoint.Trail) - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -void Trail::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); - bhdraft__schedule_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (this != internal_default_instance()) delete category_; - if (this != internal_default_instance()) delete texture_; - if (this != internal_default_instance()) delete guid_; - if (this != internal_default_instance()) delete trail_data_; - if (this != internal_default_instance()) delete color_; - if (this != internal_default_instance()) delete festival_filter_; - if (this != internal_default_instance()) delete map_type_filter_; - if (this != internal_default_instance()) delete mount_filter_; - if (this != internal_default_instance()) delete profession_filter_; - if (this != internal_default_instance()) delete specialization_filter_; - if (this != internal_default_instance()) delete species_filter_; -} - -void Trail::ArenaDtor(void* object) { - Trail* _this = reinterpret_cast< Trail* >(object); - (void)_this; -} -void Trail::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void Trail::SetCachedSize(int size) const { - _cached_size_.Set(size); -} -const Trail& Trail::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Trail_waypoint_2eproto.base); - return *internal_default_instance(); -} - - -void Trail::Clear() { -// @@protoc_insertion_point(message_clear_start:waypoint.Trail) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - bhdraft__schedule_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - if (GetArena() == nullptr && category_ != nullptr) { - delete category_; - } - category_ = nullptr; - if (GetArena() == nullptr && texture_ != nullptr) { - delete texture_; - } - texture_ = nullptr; - if (GetArena() == nullptr && guid_ != nullptr) { - delete guid_; - } - guid_ = nullptr; - if (GetArena() == nullptr && trail_data_ != nullptr) { - delete trail_data_; - } - trail_data_ = nullptr; - if (GetArena() == nullptr && color_ != nullptr) { - delete color_; - } - color_ = nullptr; - if (GetArena() == nullptr && festival_filter_ != nullptr) { - delete festival_filter_; - } - festival_filter_ = nullptr; - if (GetArena() == nullptr && map_type_filter_ != nullptr) { - delete map_type_filter_; - } - map_type_filter_ = nullptr; - if (GetArena() == nullptr && mount_filter_ != nullptr) { - delete mount_filter_; - } - mount_filter_ = nullptr; - if (GetArena() == nullptr && profession_filter_ != nullptr) { - delete profession_filter_; - } - profession_filter_ = nullptr; - if (GetArena() == nullptr && specialization_filter_ != nullptr) { - delete specialization_filter_; - } - specialization_filter_ = nullptr; - if (GetArena() == nullptr && species_filter_ != nullptr) { - delete species_filter_; - } - species_filter_ = nullptr; - ::memset(&map_id_, 0, static_cast( - reinterpret_cast(&scale_) - - reinterpret_cast(&map_id_)) + sizeof(scale_)); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* Trail::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; - while (!ctx->Done(&ptr)) { - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - CHK_(ptr); - switch (tag >> 3) { - // .waypoint.Category category = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - ptr = ctx->ParseMessage(_internal_mutable_category(), ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // .waypoint.Texture texture = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { - ptr = ctx->ParseMessage(_internal_mutable_texture(), ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // .waypoint.GUID guid = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { - ptr = ctx->ParseMessage(_internal_mutable_guid(), ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // int32 map_id = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { - map_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // float distance_fade_end = 5; - case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 45)) { - distance_fade_end_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - // float distance_fade_start = 6; - case 6: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 53)) { - distance_fade_start_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - // .waypoint.TrailData trail_data = 7; - case 7: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) { - ptr = ctx->ParseMessage(_internal_mutable_trail_data(), ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // float animation_speed = 8; - case 8: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 69)) { - animation_speed_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - // .waypoint.CullChirality cull_chirality = 9; - case 9: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 72)) { - ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - _internal_set_cull_chirality(static_cast<::waypoint::CullChirality>(val)); - } else goto handle_unusual; - continue; - // fixed32 achievement_bit = 16; - case 16: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 133)) { - achievement_bit_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint32>(ptr); - ptr += sizeof(::PROTOBUF_NAMESPACE_ID::uint32); - } else goto handle_unusual; - continue; - // int32 achievement_id = 17; - case 17: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 136)) { - achievement_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // float alpha = 18; - case 18: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 149)) { - alpha_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - // bool can_fade = 19; - case 19: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 152)) { - can_fade_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool is_wall = 22; - case 22: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 176)) { - is_wall_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // string bhdraft__schedule = 23; - case 23: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 186)) { - auto str = _internal_mutable_bhdraft__schedule(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "waypoint.Trail.bhdraft__schedule")); - CHK_(ptr); - } else goto handle_unusual; - continue; - // float bhdraft__schedule_duration = 24; - case 24: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 197)) { - bhdraft__schedule_duration_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - // float scale = 25; - case 25: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 205)) { - scale_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - // .waypoint.Color color = 26; - case 26: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 210)) { - ptr = ctx->ParseMessage(_internal_mutable_color(), ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // .waypoint.FestivalFilter festival_filter = 27; - case 27: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 218)) { - ptr = ctx->ParseMessage(_internal_mutable_festival_filter(), ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // .waypoint.MapTypeFilter map_type_filter = 28; - case 28: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 226)) { - ptr = ctx->ParseMessage(_internal_mutable_map_type_filter(), ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // .waypoint.MountFilter mount_filter = 29; - case 29: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 234)) { - ptr = ctx->ParseMessage(_internal_mutable_mount_filter(), ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // .waypoint.ProfessionFilter profession_filter = 30; - case 30: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 242)) { - ptr = ctx->ParseMessage(_internal_mutable_profession_filter(), ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // .waypoint.SpecializationFilter specialization_filter = 31; - case 31: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 250)) { - ptr = ctx->ParseMessage(_internal_mutable_specialization_filter(), ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // .waypoint.SpeciesFilter species_filter = 32; - case 32: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 2)) { - ptr = ctx->ParseMessage(_internal_mutable_species_filter(), ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - default: { - handle_unusual: - if ((tag & 7) == 4 || tag == 0) { - ctx->SetLastTag(tag); - goto success; - } - ptr = UnknownFieldParse(tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - continue; - } - } // switch - } // while -success: - return ptr; -failure: - ptr = nullptr; - goto success; -#undef CHK_ -} - -::PROTOBUF_NAMESPACE_ID::uint8* Trail::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:waypoint.Trail) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // .waypoint.Category category = 1; - if (this->has_category()) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage( - 1, _Internal::category(this), target, stream); - } - - // .waypoint.Texture texture = 2; - if (this->has_texture()) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage( - 2, _Internal::texture(this), target, stream); - } - - // .waypoint.GUID guid = 3; - if (this->has_guid()) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage( - 3, _Internal::guid(this), target, stream); - } - - // int32 map_id = 4; - if (this->map_id() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->_internal_map_id(), target); - } - - // float distance_fade_end = 5; - if (!(this->distance_fade_end() <= 0 && this->distance_fade_end() >= 0)) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(5, this->_internal_distance_fade_end(), target); - } - - // float distance_fade_start = 6; - if (!(this->distance_fade_start() <= 0 && this->distance_fade_start() >= 0)) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(6, this->_internal_distance_fade_start(), target); - } - - // .waypoint.TrailData trail_data = 7; - if (this->has_trail_data()) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage( - 7, _Internal::trail_data(this), target, stream); - } - - // float animation_speed = 8; - if (!(this->animation_speed() <= 0 && this->animation_speed() >= 0)) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(8, this->_internal_animation_speed(), target); - } - - // .waypoint.CullChirality cull_chirality = 9; - if (this->cull_chirality() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( - 9, this->_internal_cull_chirality(), target); - } - - // fixed32 achievement_bit = 16; - if (this->achievement_bit() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFixed32ToArray(16, this->_internal_achievement_bit(), target); - } - - // int32 achievement_id = 17; - if (this->achievement_id() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(17, this->_internal_achievement_id(), target); - } - - // float alpha = 18; - if (!(this->alpha() <= 0 && this->alpha() >= 0)) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(18, this->_internal_alpha(), target); - } - - // bool can_fade = 19; - if (this->can_fade() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(19, this->_internal_can_fade(), target); - } - - // bool is_wall = 22; - if (this->is_wall() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(22, this->_internal_is_wall(), target); - } - - // string bhdraft__schedule = 23; - if (this->bhdraft__schedule().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_bhdraft__schedule().data(), static_cast(this->_internal_bhdraft__schedule().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "waypoint.Trail.bhdraft__schedule"); - target = stream->WriteStringMaybeAliased( - 23, this->_internal_bhdraft__schedule(), target); - } - - // float bhdraft__schedule_duration = 24; - if (!(this->bhdraft__schedule_duration() <= 0 && this->bhdraft__schedule_duration() >= 0)) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(24, this->_internal_bhdraft__schedule_duration(), target); - } - - // float scale = 25; - if (!(this->scale() <= 0 && this->scale() >= 0)) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(25, this->_internal_scale(), target); - } - - // .waypoint.Color color = 26; - if (this->has_color()) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage( - 26, _Internal::color(this), target, stream); - } - - // .waypoint.FestivalFilter festival_filter = 27; - if (this->has_festival_filter()) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage( - 27, _Internal::festival_filter(this), target, stream); - } - - // .waypoint.MapTypeFilter map_type_filter = 28; - if (this->has_map_type_filter()) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage( - 28, _Internal::map_type_filter(this), target, stream); - } - - // .waypoint.MountFilter mount_filter = 29; - if (this->has_mount_filter()) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage( - 29, _Internal::mount_filter(this), target, stream); - } - - // .waypoint.ProfessionFilter profession_filter = 30; - if (this->has_profession_filter()) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage( - 30, _Internal::profession_filter(this), target, stream); - } - - // .waypoint.SpecializationFilter specialization_filter = 31; - if (this->has_specialization_filter()) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage( - 31, _Internal::specialization_filter(this), target, stream); - } - - // .waypoint.SpeciesFilter species_filter = 32; - if (this->has_species_filter()) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage( - 32, _Internal::species_filter(this), target, stream); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:waypoint.Trail) - return target; -} - -size_t Trail::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:waypoint.Trail) - size_t total_size = 0; - - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // string bhdraft__schedule = 23; - if (this->bhdraft__schedule().size() > 0) { - total_size += 2 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_bhdraft__schedule()); - } - - // .waypoint.Category category = 1; - if (this->has_category()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *category_); - } - - // .waypoint.Texture texture = 2; - if (this->has_texture()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *texture_); - } - - // .waypoint.GUID guid = 3; - if (this->has_guid()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *guid_); - } - - // .waypoint.TrailData trail_data = 7; - if (this->has_trail_data()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *trail_data_); - } - - // .waypoint.Color color = 26; - if (this->has_color()) { - total_size += 2 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *color_); - } - - // .waypoint.FestivalFilter festival_filter = 27; - if (this->has_festival_filter()) { - total_size += 2 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *festival_filter_); - } - - // .waypoint.MapTypeFilter map_type_filter = 28; - if (this->has_map_type_filter()) { - total_size += 2 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *map_type_filter_); - } - - // .waypoint.MountFilter mount_filter = 29; - if (this->has_mount_filter()) { - total_size += 2 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *mount_filter_); - } - - // .waypoint.ProfessionFilter profession_filter = 30; - if (this->has_profession_filter()) { - total_size += 2 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *profession_filter_); - } - - // .waypoint.SpecializationFilter specialization_filter = 31; - if (this->has_specialization_filter()) { - total_size += 2 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *specialization_filter_); - } - - // .waypoint.SpeciesFilter species_filter = 32; - if (this->has_species_filter()) { - total_size += 2 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *species_filter_); - } - - // int32 map_id = 4; - if (this->map_id() != 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( - this->_internal_map_id()); - } - - // float distance_fade_end = 5; - if (!(this->distance_fade_end() <= 0 && this->distance_fade_end() >= 0)) { - total_size += 1 + 4; - } - - // float distance_fade_start = 6; - if (!(this->distance_fade_start() <= 0 && this->distance_fade_start() >= 0)) { - total_size += 1 + 4; - } - - // float animation_speed = 8; - if (!(this->animation_speed() <= 0 && this->animation_speed() >= 0)) { - total_size += 1 + 4; - } - - // .waypoint.CullChirality cull_chirality = 9; - if (this->cull_chirality() != 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_cull_chirality()); - } - - // fixed32 achievement_bit = 16; - if (this->achievement_bit() != 0) { - total_size += 2 + 4; - } - - // int32 achievement_id = 17; - if (this->achievement_id() != 0) { - total_size += 2 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( - this->_internal_achievement_id()); - } - - // float alpha = 18; - if (!(this->alpha() <= 0 && this->alpha() >= 0)) { - total_size += 2 + 4; - } - - // bool can_fade = 19; - if (this->can_fade() != 0) { - total_size += 2 + 1; - } - - // bool is_wall = 22; - if (this->is_wall() != 0) { - total_size += 2 + 1; - } - - // float bhdraft__schedule_duration = 24; - if (!(this->bhdraft__schedule_duration() <= 0 && this->bhdraft__schedule_duration() >= 0)) { - total_size += 2 + 4; - } - - // float scale = 25; - if (!(this->scale() <= 0 && this->scale() >= 0)) { - total_size += 2 + 4; - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( - _internal_metadata_, total_size, &_cached_size_); - } - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} - -void Trail::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:waypoint.Trail) - GOOGLE_DCHECK_NE(&from, this); - const Trail* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:waypoint.Trail) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:waypoint.Trail) - MergeFrom(*source); - } -} - -void Trail::MergeFrom(const Trail& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:waypoint.Trail) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - if (from.bhdraft__schedule().size() > 0) { - _internal_set_bhdraft__schedule(from._internal_bhdraft__schedule()); - } - if (from.has_category()) { - _internal_mutable_category()->::waypoint::Category::MergeFrom(from._internal_category()); - } - if (from.has_texture()) { - _internal_mutable_texture()->::waypoint::Texture::MergeFrom(from._internal_texture()); - } - if (from.has_guid()) { - _internal_mutable_guid()->::waypoint::GUID::MergeFrom(from._internal_guid()); - } - if (from.has_trail_data()) { - _internal_mutable_trail_data()->::waypoint::TrailData::MergeFrom(from._internal_trail_data()); - } - if (from.has_color()) { - _internal_mutable_color()->::waypoint::Color::MergeFrom(from._internal_color()); - } - if (from.has_festival_filter()) { - _internal_mutable_festival_filter()->::waypoint::FestivalFilter::MergeFrom(from._internal_festival_filter()); - } - if (from.has_map_type_filter()) { - _internal_mutable_map_type_filter()->::waypoint::MapTypeFilter::MergeFrom(from._internal_map_type_filter()); - } - if (from.has_mount_filter()) { - _internal_mutable_mount_filter()->::waypoint::MountFilter::MergeFrom(from._internal_mount_filter()); - } - if (from.has_profession_filter()) { - _internal_mutable_profession_filter()->::waypoint::ProfessionFilter::MergeFrom(from._internal_profession_filter()); - } - if (from.has_specialization_filter()) { - _internal_mutable_specialization_filter()->::waypoint::SpecializationFilter::MergeFrom(from._internal_specialization_filter()); - } - if (from.has_species_filter()) { - _internal_mutable_species_filter()->::waypoint::SpeciesFilter::MergeFrom(from._internal_species_filter()); - } - if (from.map_id() != 0) { - _internal_set_map_id(from._internal_map_id()); - } - if (!(from.distance_fade_end() <= 0 && from.distance_fade_end() >= 0)) { - _internal_set_distance_fade_end(from._internal_distance_fade_end()); - } - if (!(from.distance_fade_start() <= 0 && from.distance_fade_start() >= 0)) { - _internal_set_distance_fade_start(from._internal_distance_fade_start()); - } - if (!(from.animation_speed() <= 0 && from.animation_speed() >= 0)) { - _internal_set_animation_speed(from._internal_animation_speed()); - } - if (from.cull_chirality() != 0) { - _internal_set_cull_chirality(from._internal_cull_chirality()); - } - if (from.achievement_bit() != 0) { - _internal_set_achievement_bit(from._internal_achievement_bit()); - } - if (from.achievement_id() != 0) { - _internal_set_achievement_id(from._internal_achievement_id()); - } - if (!(from.alpha() <= 0 && from.alpha() >= 0)) { - _internal_set_alpha(from._internal_alpha()); - } - if (from.can_fade() != 0) { - _internal_set_can_fade(from._internal_can_fade()); - } - if (from.is_wall() != 0) { - _internal_set_is_wall(from._internal_is_wall()); - } - if (!(from.bhdraft__schedule_duration() <= 0 && from.bhdraft__schedule_duration() >= 0)) { - _internal_set_bhdraft__schedule_duration(from._internal_bhdraft__schedule_duration()); - } - if (!(from.scale() <= 0 && from.scale() >= 0)) { - _internal_set_scale(from._internal_scale()); - } -} - -void Trail::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:waypoint.Trail) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void Trail::CopyFrom(const Trail& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:waypoint.Trail) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool Trail::IsInitialized() const { - return true; -} - -void Trail::InternalSwap(Trail* other) { - using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - bhdraft__schedule_.Swap(&other->bhdraft__schedule_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(Trail, scale_) - + sizeof(Trail::scale_) - - PROTOBUF_FIELD_OFFSET(Trail, category_)>( - reinterpret_cast(&category_), - reinterpret_cast(&other->category_)); -} - -::PROTOBUF_NAMESPACE_ID::Metadata Trail::GetMetadata() const { - return GetMetadataStatic(); -} - - -// =================================================================== - -void Texture::InitAsDefaultInstance() { -} -class Texture::_Internal { - public: -}; - -Texture::Texture(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(); - RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:waypoint.Texture) -} -Texture::Texture(const Texture& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - path_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_path().empty()) { - path_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_path(), - GetArena()); - } - // @@protoc_insertion_point(copy_constructor:waypoint.Texture) -} - -void Texture::SharedCtor() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Texture_waypoint_2eproto.base); - path_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -Texture::~Texture() { - // @@protoc_insertion_point(destructor:waypoint.Texture) - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -void Texture::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); - path_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -void Texture::ArenaDtor(void* object) { - Texture* _this = reinterpret_cast< Texture* >(object); - (void)_this; -} -void Texture::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void Texture::SetCachedSize(int size) const { - _cached_size_.Set(size); -} -const Texture& Texture::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Texture_waypoint_2eproto.base); - return *internal_default_instance(); -} - - -void Texture::Clear() { -// @@protoc_insertion_point(message_clear_start:waypoint.Texture) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - path_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* Texture::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; - while (!ctx->Done(&ptr)) { - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - CHK_(ptr); - switch (tag >> 3) { - // string path = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - auto str = _internal_mutable_path(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "waypoint.Texture.path")); - CHK_(ptr); - } else goto handle_unusual; - continue; - default: { - handle_unusual: - if ((tag & 7) == 4 || tag == 0) { - ctx->SetLastTag(tag); - goto success; - } - ptr = UnknownFieldParse(tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - continue; - } - } // switch - } // while -success: - return ptr; -failure: - ptr = nullptr; - goto success; -#undef CHK_ -} - -::PROTOBUF_NAMESPACE_ID::uint8* Texture::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:waypoint.Texture) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // string path = 1; - if (this->path().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_path().data(), static_cast(this->_internal_path().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "waypoint.Texture.path"); - target = stream->WriteStringMaybeAliased( - 1, this->_internal_path(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:waypoint.Texture) - return target; -} - -size_t Texture::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:waypoint.Texture) - size_t total_size = 0; - - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // string path = 1; - if (this->path().size() > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_path()); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( - _internal_metadata_, total_size, &_cached_size_); - } - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} - -void Texture::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:waypoint.Texture) - GOOGLE_DCHECK_NE(&from, this); - const Texture* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:waypoint.Texture) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:waypoint.Texture) - MergeFrom(*source); - } -} - -void Texture::MergeFrom(const Texture& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:waypoint.Texture) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - if (from.path().size() > 0) { - _internal_set_path(from._internal_path()); - } -} - -void Texture::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:waypoint.Texture) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void Texture::CopyFrom(const Texture& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:waypoint.Texture) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool Texture::IsInitialized() const { - return true; -} - -void Texture::InternalSwap(Texture* other) { - using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - path_.Swap(&other->path_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} - -::PROTOBUF_NAMESPACE_ID::Metadata Texture::GetMetadata() const { - return GetMetadataStatic(); -} - - -// =================================================================== - -void Position::InitAsDefaultInstance() { -} -class Position::_Internal { - public: -}; - -Position::Position(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(); - RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:waypoint.Position) -} -Position::Position(const Position& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::memcpy(&x_, &from.x_, - static_cast(reinterpret_cast(&z_) - - reinterpret_cast(&x_)) + sizeof(z_)); - // @@protoc_insertion_point(copy_constructor:waypoint.Position) -} - -void Position::SharedCtor() { - ::memset(&x_, 0, static_cast( - reinterpret_cast(&z_) - - reinterpret_cast(&x_)) + sizeof(z_)); -} - -Position::~Position() { - // @@protoc_insertion_point(destructor:waypoint.Position) - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -void Position::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); -} - -void Position::ArenaDtor(void* object) { - Position* _this = reinterpret_cast< Position* >(object); - (void)_this; -} -void Position::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void Position::SetCachedSize(int size) const { - _cached_size_.Set(size); -} -const Position& Position::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Position_waypoint_2eproto.base); - return *internal_default_instance(); -} - - -void Position::Clear() { -// @@protoc_insertion_point(message_clear_start:waypoint.Position) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - ::memset(&x_, 0, static_cast( - reinterpret_cast(&z_) - - reinterpret_cast(&x_)) + sizeof(z_)); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* Position::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; - while (!ctx->Done(&ptr)) { - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - CHK_(ptr); - switch (tag >> 3) { - // float x = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 13)) { - x_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - // float y = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 21)) { - y_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - // float z = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 29)) { - z_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - default: { - handle_unusual: - if ((tag & 7) == 4 || tag == 0) { - ctx->SetLastTag(tag); - goto success; - } - ptr = UnknownFieldParse(tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - continue; - } - } // switch - } // while -success: - return ptr; -failure: - ptr = nullptr; - goto success; -#undef CHK_ -} - -::PROTOBUF_NAMESPACE_ID::uint8* Position::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:waypoint.Position) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // float x = 1; - if (!(this->x() <= 0 && this->x() >= 0)) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(1, this->_internal_x(), target); - } - - // float y = 2; - if (!(this->y() <= 0 && this->y() >= 0)) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2, this->_internal_y(), target); - } - - // float z = 3; - if (!(this->z() <= 0 && this->z() >= 0)) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(3, this->_internal_z(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:waypoint.Position) - return target; -} - -size_t Position::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:waypoint.Position) - size_t total_size = 0; - - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // float x = 1; - if (!(this->x() <= 0 && this->x() >= 0)) { - total_size += 1 + 4; - } - - // float y = 2; - if (!(this->y() <= 0 && this->y() >= 0)) { - total_size += 1 + 4; - } - - // float z = 3; - if (!(this->z() <= 0 && this->z() >= 0)) { - total_size += 1 + 4; - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( - _internal_metadata_, total_size, &_cached_size_); - } - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} - -void Position::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:waypoint.Position) - GOOGLE_DCHECK_NE(&from, this); - const Position* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:waypoint.Position) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:waypoint.Position) - MergeFrom(*source); - } -} - -void Position::MergeFrom(const Position& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:waypoint.Position) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - if (!(from.x() <= 0 && from.x() >= 0)) { - _internal_set_x(from._internal_x()); - } - if (!(from.y() <= 0 && from.y() >= 0)) { - _internal_set_y(from._internal_y()); - } - if (!(from.z() <= 0 && from.z() >= 0)) { - _internal_set_z(from._internal_z()); - } -} - -void Position::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:waypoint.Position) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void Position::CopyFrom(const Position& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:waypoint.Position) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool Position::IsInitialized() const { - return true; -} - -void Position::InternalSwap(Position* other) { - using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(Position, z_) - + sizeof(Position::z_) - - PROTOBUF_FIELD_OFFSET(Position, x_)>( - reinterpret_cast(&x_), - reinterpret_cast(&other->x_)); -} - -::PROTOBUF_NAMESPACE_ID::Metadata Position::GetMetadata() const { - return GetMetadataStatic(); -} - - -// =================================================================== - -void EulerRotation::InitAsDefaultInstance() { -} -class EulerRotation::_Internal { - public: -}; - -EulerRotation::EulerRotation(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(); - RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:waypoint.EulerRotation) -} -EulerRotation::EulerRotation(const EulerRotation& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::memcpy(&x_, &from.x_, - static_cast(reinterpret_cast(&z_) - - reinterpret_cast(&x_)) + sizeof(z_)); - // @@protoc_insertion_point(copy_constructor:waypoint.EulerRotation) -} - -void EulerRotation::SharedCtor() { - ::memset(&x_, 0, static_cast( - reinterpret_cast(&z_) - - reinterpret_cast(&x_)) + sizeof(z_)); -} - -EulerRotation::~EulerRotation() { - // @@protoc_insertion_point(destructor:waypoint.EulerRotation) - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -void EulerRotation::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); -} - -void EulerRotation::ArenaDtor(void* object) { - EulerRotation* _this = reinterpret_cast< EulerRotation* >(object); - (void)_this; -} -void EulerRotation::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void EulerRotation::SetCachedSize(int size) const { - _cached_size_.Set(size); -} -const EulerRotation& EulerRotation::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_EulerRotation_waypoint_2eproto.base); - return *internal_default_instance(); -} - - -void EulerRotation::Clear() { -// @@protoc_insertion_point(message_clear_start:waypoint.EulerRotation) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - ::memset(&x_, 0, static_cast( - reinterpret_cast(&z_) - - reinterpret_cast(&x_)) + sizeof(z_)); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* EulerRotation::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; - while (!ctx->Done(&ptr)) { - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - CHK_(ptr); - switch (tag >> 3) { - // float x = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 13)) { - x_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - // float y = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 21)) { - y_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - // float z = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 29)) { - z_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - default: { - handle_unusual: - if ((tag & 7) == 4 || tag == 0) { - ctx->SetLastTag(tag); - goto success; - } - ptr = UnknownFieldParse(tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - continue; - } - } // switch - } // while -success: - return ptr; -failure: - ptr = nullptr; - goto success; -#undef CHK_ -} - -::PROTOBUF_NAMESPACE_ID::uint8* EulerRotation::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:waypoint.EulerRotation) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // float x = 1; - if (!(this->x() <= 0 && this->x() >= 0)) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(1, this->_internal_x(), target); - } - - // float y = 2; - if (!(this->y() <= 0 && this->y() >= 0)) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2, this->_internal_y(), target); - } - - // float z = 3; - if (!(this->z() <= 0 && this->z() >= 0)) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(3, this->_internal_z(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:waypoint.EulerRotation) - return target; -} - -size_t EulerRotation::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:waypoint.EulerRotation) - size_t total_size = 0; - - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // float x = 1; - if (!(this->x() <= 0 && this->x() >= 0)) { - total_size += 1 + 4; - } - - // float y = 2; - if (!(this->y() <= 0 && this->y() >= 0)) { - total_size += 1 + 4; - } - - // float z = 3; - if (!(this->z() <= 0 && this->z() >= 0)) { - total_size += 1 + 4; - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( - _internal_metadata_, total_size, &_cached_size_); - } - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} - -void EulerRotation::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:waypoint.EulerRotation) - GOOGLE_DCHECK_NE(&from, this); - const EulerRotation* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:waypoint.EulerRotation) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:waypoint.EulerRotation) - MergeFrom(*source); - } -} - -void EulerRotation::MergeFrom(const EulerRotation& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:waypoint.EulerRotation) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - if (!(from.x() <= 0 && from.x() >= 0)) { - _internal_set_x(from._internal_x()); - } - if (!(from.y() <= 0 && from.y() >= 0)) { - _internal_set_y(from._internal_y()); - } - if (!(from.z() <= 0 && from.z() >= 0)) { - _internal_set_z(from._internal_z()); - } -} - -void EulerRotation::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:waypoint.EulerRotation) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void EulerRotation::CopyFrom(const EulerRotation& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:waypoint.EulerRotation) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool EulerRotation::IsInitialized() const { - return true; -} - -void EulerRotation::InternalSwap(EulerRotation* other) { - using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(EulerRotation, z_) - + sizeof(EulerRotation::z_) - - PROTOBUF_FIELD_OFFSET(EulerRotation, x_)>( - reinterpret_cast(&x_), - reinterpret_cast(&other->x_)); -} - -::PROTOBUF_NAMESPACE_ID::Metadata EulerRotation::GetMetadata() const { - return GetMetadataStatic(); -} - - -// =================================================================== - -void Trigger::InitAsDefaultInstance() { - ::waypoint::_Trigger_default_instance_._instance.get_mutable()->action_hide_category_ = const_cast< ::waypoint::Category*>( - ::waypoint::Category::internal_default_instance()); - ::waypoint::_Trigger_default_instance_._instance.get_mutable()->action_show_category_ = const_cast< ::waypoint::Category*>( - ::waypoint::Category::internal_default_instance()); - ::waypoint::_Trigger_default_instance_._instance.get_mutable()->action_toggle_category_ = const_cast< ::waypoint::Category*>( - ::waypoint::Category::internal_default_instance()); -} -class Trigger::_Internal { - public: - static const ::waypoint::Category& action_hide_category(const Trigger* msg); - static const ::waypoint::Category& action_show_category(const Trigger* msg); - static const ::waypoint::Category& action_toggle_category(const Trigger* msg); -}; - -const ::waypoint::Category& -Trigger::_Internal::action_hide_category(const Trigger* msg) { - return *msg->action_hide_category_; -} -const ::waypoint::Category& -Trigger::_Internal::action_show_category(const Trigger* msg) { - return *msg->action_show_category_; -} -const ::waypoint::Category& -Trigger::_Internal::action_toggle_category(const Trigger* msg) { - return *msg->action_toggle_category_; -} -Trigger::Trigger(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(); - RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:waypoint.Trigger) -} -Trigger::Trigger(const Trigger& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - action_copy_clipboard_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_action_copy_clipboard().empty()) { - action_copy_clipboard_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_action_copy_clipboard(), - GetArena()); - } - action_copy_message_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_action_copy_message().empty()) { - action_copy_message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_action_copy_message(), - GetArena()); - } - action_info_message_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_action_info_message().empty()) { - action_info_message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_action_info_message(), - GetArena()); - } - if (from._internal_has_action_hide_category()) { - action_hide_category_ = new ::waypoint::Category(*from.action_hide_category_); - } else { - action_hide_category_ = nullptr; - } - if (from._internal_has_action_show_category()) { - action_show_category_ = new ::waypoint::Category(*from.action_show_category_); - } else { - action_show_category_ = nullptr; - } - if (from._internal_has_action_toggle_category()) { - action_toggle_category_ = new ::waypoint::Category(*from.action_toggle_category_); - } else { - action_toggle_category_ = nullptr; - } - ::memcpy(&bounce_delay_, &from.bounce_delay_, - static_cast(reinterpret_cast(&range_) - - reinterpret_cast(&bounce_delay_)) + sizeof(range_)); - // @@protoc_insertion_point(copy_constructor:waypoint.Trigger) -} - -void Trigger::SharedCtor() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Trigger_waypoint_2eproto.base); - action_copy_clipboard_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - action_copy_message_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - action_info_message_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - ::memset(&action_hide_category_, 0, static_cast( - reinterpret_cast(&range_) - - reinterpret_cast(&action_hide_category_)) + sizeof(range_)); -} - -Trigger::~Trigger() { - // @@protoc_insertion_point(destructor:waypoint.Trigger) - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -void Trigger::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); - action_copy_clipboard_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - action_copy_message_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - action_info_message_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (this != internal_default_instance()) delete action_hide_category_; - if (this != internal_default_instance()) delete action_show_category_; - if (this != internal_default_instance()) delete action_toggle_category_; -} - -void Trigger::ArenaDtor(void* object) { - Trigger* _this = reinterpret_cast< Trigger* >(object); - (void)_this; -} -void Trigger::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void Trigger::SetCachedSize(int size) const { - _cached_size_.Set(size); -} -const Trigger& Trigger::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Trigger_waypoint_2eproto.base); - return *internal_default_instance(); -} - - -void Trigger::Clear() { -// @@protoc_insertion_point(message_clear_start:waypoint.Trigger) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - action_copy_clipboard_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - action_copy_message_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - action_info_message_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - if (GetArena() == nullptr && action_hide_category_ != nullptr) { - delete action_hide_category_; - } - action_hide_category_ = nullptr; - if (GetArena() == nullptr && action_show_category_ != nullptr) { - delete action_show_category_; - } - action_show_category_ = nullptr; - if (GetArena() == nullptr && action_toggle_category_ != nullptr) { - delete action_toggle_category_; - } - action_toggle_category_ = nullptr; - ::memset(&bounce_delay_, 0, static_cast( - reinterpret_cast(&range_) - - reinterpret_cast(&bounce_delay_)) + sizeof(range_)); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* Trigger::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; - while (!ctx->Done(&ptr)) { - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - CHK_(ptr); - switch (tag >> 3) { - // bool auto_trigger = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - auto_trigger_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // float bounce_delay = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 21)) { - bounce_delay_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - // float bounce_duration = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 29)) { - bounce_duration_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - // float bounce_height = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 37)) { - bounce_height_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - // string action_copy_clipboard = 5; - case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) { - auto str = _internal_mutable_action_copy_clipboard(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "waypoint.Trigger.action_copy_clipboard")); - CHK_(ptr); - } else goto handle_unusual; - continue; - // string action_copy_message = 6; - case 6: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) { - auto str = _internal_mutable_action_copy_message(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "waypoint.Trigger.action_copy_message")); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool has_countdown = 7; - case 7: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) { - has_countdown_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // string action_info_message = 8; - case 8: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 66)) { - auto str = _internal_mutable_action_info_message(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "waypoint.Trigger.action_info_message")); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool invert_display = 9; - case 9: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 72)) { - invert_display_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // float reset_length = 10; - case 10: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 85)) { - reset_length_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - // float range = 11; - case 11: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 93)) { - range_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - // .waypoint.Category action_hide_category = 12; - case 12: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 98)) { - ptr = ctx->ParseMessage(_internal_mutable_action_hide_category(), ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // .waypoint.Category action_show_category = 13; - case 13: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 106)) { - ptr = ctx->ParseMessage(_internal_mutable_action_show_category(), ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // .waypoint.Category action_toggle_category = 14; - case 14: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 114)) { - ptr = ctx->ParseMessage(_internal_mutable_action_toggle_category(), ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - default: { - handle_unusual: - if ((tag & 7) == 4 || tag == 0) { - ctx->SetLastTag(tag); - goto success; - } - ptr = UnknownFieldParse(tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - continue; - } - } // switch - } // while -success: - return ptr; -failure: - ptr = nullptr; - goto success; -#undef CHK_ -} - -::PROTOBUF_NAMESPACE_ID::uint8* Trigger::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:waypoint.Trigger) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // bool auto_trigger = 1; - if (this->auto_trigger() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->_internal_auto_trigger(), target); - } - - // float bounce_delay = 2; - if (!(this->bounce_delay() <= 0 && this->bounce_delay() >= 0)) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2, this->_internal_bounce_delay(), target); - } - - // float bounce_duration = 3; - if (!(this->bounce_duration() <= 0 && this->bounce_duration() >= 0)) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(3, this->_internal_bounce_duration(), target); - } - - // float bounce_height = 4; - if (!(this->bounce_height() <= 0 && this->bounce_height() >= 0)) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(4, this->_internal_bounce_height(), target); - } - - // string action_copy_clipboard = 5; - if (this->action_copy_clipboard().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_action_copy_clipboard().data(), static_cast(this->_internal_action_copy_clipboard().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "waypoint.Trigger.action_copy_clipboard"); - target = stream->WriteStringMaybeAliased( - 5, this->_internal_action_copy_clipboard(), target); - } - - // string action_copy_message = 6; - if (this->action_copy_message().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_action_copy_message().data(), static_cast(this->_internal_action_copy_message().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "waypoint.Trigger.action_copy_message"); - target = stream->WriteStringMaybeAliased( - 6, this->_internal_action_copy_message(), target); - } - - // bool has_countdown = 7; - if (this->has_countdown() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(7, this->_internal_has_countdown(), target); - } - - // string action_info_message = 8; - if (this->action_info_message().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_action_info_message().data(), static_cast(this->_internal_action_info_message().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "waypoint.Trigger.action_info_message"); - target = stream->WriteStringMaybeAliased( - 8, this->_internal_action_info_message(), target); - } - - // bool invert_display = 9; - if (this->invert_display() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(9, this->_internal_invert_display(), target); - } - - // float reset_length = 10; - if (!(this->reset_length() <= 0 && this->reset_length() >= 0)) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(10, this->_internal_reset_length(), target); - } - - // float range = 11; - if (!(this->range() <= 0 && this->range() >= 0)) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(11, this->_internal_range(), target); - } - - // .waypoint.Category action_hide_category = 12; - if (this->has_action_hide_category()) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage( - 12, _Internal::action_hide_category(this), target, stream); - } - - // .waypoint.Category action_show_category = 13; - if (this->has_action_show_category()) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage( - 13, _Internal::action_show_category(this), target, stream); - } - - // .waypoint.Category action_toggle_category = 14; - if (this->has_action_toggle_category()) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage( - 14, _Internal::action_toggle_category(this), target, stream); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:waypoint.Trigger) - return target; -} - -size_t Trigger::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:waypoint.Trigger) - size_t total_size = 0; - - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // string action_copy_clipboard = 5; - if (this->action_copy_clipboard().size() > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_action_copy_clipboard()); - } - - // string action_copy_message = 6; - if (this->action_copy_message().size() > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_action_copy_message()); - } - - // string action_info_message = 8; - if (this->action_info_message().size() > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_action_info_message()); - } - - // .waypoint.Category action_hide_category = 12; - if (this->has_action_hide_category()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *action_hide_category_); - } - - // .waypoint.Category action_show_category = 13; - if (this->has_action_show_category()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *action_show_category_); - } - - // .waypoint.Category action_toggle_category = 14; - if (this->has_action_toggle_category()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *action_toggle_category_); - } - - // float bounce_delay = 2; - if (!(this->bounce_delay() <= 0 && this->bounce_delay() >= 0)) { - total_size += 1 + 4; - } - - // float bounce_duration = 3; - if (!(this->bounce_duration() <= 0 && this->bounce_duration() >= 0)) { - total_size += 1 + 4; - } - - // float bounce_height = 4; - if (!(this->bounce_height() <= 0 && this->bounce_height() >= 0)) { - total_size += 1 + 4; - } - - // bool auto_trigger = 1; - if (this->auto_trigger() != 0) { - total_size += 1 + 1; - } - - // bool has_countdown = 7; - if (this->has_countdown() != 0) { - total_size += 1 + 1; - } - - // bool invert_display = 9; - if (this->invert_display() != 0) { - total_size += 1 + 1; - } - - // float reset_length = 10; - if (!(this->reset_length() <= 0 && this->reset_length() >= 0)) { - total_size += 1 + 4; - } - - // float range = 11; - if (!(this->range() <= 0 && this->range() >= 0)) { - total_size += 1 + 4; - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( - _internal_metadata_, total_size, &_cached_size_); - } - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} - -void Trigger::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:waypoint.Trigger) - GOOGLE_DCHECK_NE(&from, this); - const Trigger* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:waypoint.Trigger) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:waypoint.Trigger) - MergeFrom(*source); - } -} - -void Trigger::MergeFrom(const Trigger& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:waypoint.Trigger) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - if (from.action_copy_clipboard().size() > 0) { - _internal_set_action_copy_clipboard(from._internal_action_copy_clipboard()); - } - if (from.action_copy_message().size() > 0) { - _internal_set_action_copy_message(from._internal_action_copy_message()); - } - if (from.action_info_message().size() > 0) { - _internal_set_action_info_message(from._internal_action_info_message()); - } - if (from.has_action_hide_category()) { - _internal_mutable_action_hide_category()->::waypoint::Category::MergeFrom(from._internal_action_hide_category()); - } - if (from.has_action_show_category()) { - _internal_mutable_action_show_category()->::waypoint::Category::MergeFrom(from._internal_action_show_category()); - } - if (from.has_action_toggle_category()) { - _internal_mutable_action_toggle_category()->::waypoint::Category::MergeFrom(from._internal_action_toggle_category()); - } - if (!(from.bounce_delay() <= 0 && from.bounce_delay() >= 0)) { - _internal_set_bounce_delay(from._internal_bounce_delay()); - } - if (!(from.bounce_duration() <= 0 && from.bounce_duration() >= 0)) { - _internal_set_bounce_duration(from._internal_bounce_duration()); - } - if (!(from.bounce_height() <= 0 && from.bounce_height() >= 0)) { - _internal_set_bounce_height(from._internal_bounce_height()); - } - if (from.auto_trigger() != 0) { - _internal_set_auto_trigger(from._internal_auto_trigger()); - } - if (from.has_countdown() != 0) { - _internal_set_has_countdown(from._internal_has_countdown()); - } - if (from.invert_display() != 0) { - _internal_set_invert_display(from._internal_invert_display()); - } - if (!(from.reset_length() <= 0 && from.reset_length() >= 0)) { - _internal_set_reset_length(from._internal_reset_length()); - } - if (!(from.range() <= 0 && from.range() >= 0)) { - _internal_set_range(from._internal_range()); - } -} - -void Trigger::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:waypoint.Trigger) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void Trigger::CopyFrom(const Trigger& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:waypoint.Trigger) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool Trigger::IsInitialized() const { - return true; -} - -void Trigger::InternalSwap(Trigger* other) { - using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - action_copy_clipboard_.Swap(&other->action_copy_clipboard_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - action_copy_message_.Swap(&other->action_copy_message_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - action_info_message_.Swap(&other->action_info_message_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(Trigger, range_) - + sizeof(Trigger::range_) - - PROTOBUF_FIELD_OFFSET(Trigger, action_hide_category_)>( - reinterpret_cast(&action_hide_category_), - reinterpret_cast(&other->action_hide_category_)); -} - -::PROTOBUF_NAMESPACE_ID::Metadata Trigger::GetMetadata() const { - return GetMetadataStatic(); -} - - -// =================================================================== - -void GUID::InitAsDefaultInstance() { -} -class GUID::_Internal { - public: -}; - -GUID::GUID(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(); - RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:waypoint.GUID) -} -GUID::GUID(const GUID& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - guid_ = from.guid_; - // @@protoc_insertion_point(copy_constructor:waypoint.GUID) -} - -void GUID::SharedCtor() { - guid_ = 0; -} - -GUID::~GUID() { - // @@protoc_insertion_point(destructor:waypoint.GUID) - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -void GUID::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); -} - -void GUID::ArenaDtor(void* object) { - GUID* _this = reinterpret_cast< GUID* >(object); - (void)_this; -} -void GUID::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void GUID::SetCachedSize(int size) const { - _cached_size_.Set(size); -} -const GUID& GUID::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_GUID_waypoint_2eproto.base); - return *internal_default_instance(); -} - - -void GUID::Clear() { -// @@protoc_insertion_point(message_clear_start:waypoint.GUID) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - guid_ = 0; - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* GUID::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; - while (!ctx->Done(&ptr)) { - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - CHK_(ptr); - switch (tag >> 3) { - // int32 guid = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - guid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - default: { - handle_unusual: - if ((tag & 7) == 4 || tag == 0) { - ctx->SetLastTag(tag); - goto success; - } - ptr = UnknownFieldParse(tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - continue; - } - } // switch - } // while -success: - return ptr; -failure: - ptr = nullptr; - goto success; -#undef CHK_ -} - -::PROTOBUF_NAMESPACE_ID::uint8* GUID::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:waypoint.GUID) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // int32 guid = 1; - if (this->guid() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_guid(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:waypoint.GUID) - return target; -} - -size_t GUID::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:waypoint.GUID) - size_t total_size = 0; - - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // int32 guid = 1; - if (this->guid() != 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( - this->_internal_guid()); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( - _internal_metadata_, total_size, &_cached_size_); - } - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} - -void GUID::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:waypoint.GUID) - GOOGLE_DCHECK_NE(&from, this); - const GUID* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:waypoint.GUID) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:waypoint.GUID) - MergeFrom(*source); - } -} - -void GUID::MergeFrom(const GUID& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:waypoint.GUID) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - if (from.guid() != 0) { - _internal_set_guid(from._internal_guid()); - } -} - -void GUID::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:waypoint.GUID) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void GUID::CopyFrom(const GUID& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:waypoint.GUID) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool GUID::IsInitialized() const { - return true; -} - -void GUID::InternalSwap(GUID* other) { - using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - swap(guid_, other->guid_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata GUID::GetMetadata() const { - return GetMetadataStatic(); -} - - -// =================================================================== - -void Color::InitAsDefaultInstance() { -} -class Color::_Internal { - public: -}; - -Color::Color(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(); - RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:waypoint.Color) -} -Color::Color(const Color& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - hex_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_hex().empty()) { - hex_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_hex(), - GetArena()); - } - // @@protoc_insertion_point(copy_constructor:waypoint.Color) -} - -void Color::SharedCtor() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Color_waypoint_2eproto.base); - hex_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -Color::~Color() { - // @@protoc_insertion_point(destructor:waypoint.Color) - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -void Color::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); - hex_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -void Color::ArenaDtor(void* object) { - Color* _this = reinterpret_cast< Color* >(object); - (void)_this; -} -void Color::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void Color::SetCachedSize(int size) const { - _cached_size_.Set(size); -} -const Color& Color::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Color_waypoint_2eproto.base); - return *internal_default_instance(); -} - - -void Color::Clear() { -// @@protoc_insertion_point(message_clear_start:waypoint.Color) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - hex_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* Color::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; - while (!ctx->Done(&ptr)) { - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - CHK_(ptr); - switch (tag >> 3) { - // string hex = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - auto str = _internal_mutable_hex(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "waypoint.Color.hex")); - CHK_(ptr); - } else goto handle_unusual; - continue; - default: { - handle_unusual: - if ((tag & 7) == 4 || tag == 0) { - ctx->SetLastTag(tag); - goto success; - } - ptr = UnknownFieldParse(tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - continue; - } - } // switch - } // while -success: - return ptr; -failure: - ptr = nullptr; - goto success; -#undef CHK_ -} - -::PROTOBUF_NAMESPACE_ID::uint8* Color::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:waypoint.Color) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // string hex = 1; - if (this->hex().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_hex().data(), static_cast(this->_internal_hex().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "waypoint.Color.hex"); - target = stream->WriteStringMaybeAliased( - 1, this->_internal_hex(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:waypoint.Color) - return target; -} - -size_t Color::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:waypoint.Color) - size_t total_size = 0; - - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // string hex = 1; - if (this->hex().size() > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_hex()); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( - _internal_metadata_, total_size, &_cached_size_); - } - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} - -void Color::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:waypoint.Color) - GOOGLE_DCHECK_NE(&from, this); - const Color* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:waypoint.Color) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:waypoint.Color) - MergeFrom(*source); - } -} - -void Color::MergeFrom(const Color& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:waypoint.Color) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - if (from.hex().size() > 0) { - _internal_set_hex(from._internal_hex()); - } -} - -void Color::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:waypoint.Color) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void Color::CopyFrom(const Color& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:waypoint.Color) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool Color::IsInitialized() const { - return true; -} - -void Color::InternalSwap(Color* other) { - using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - hex_.Swap(&other->hex_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} - -::PROTOBUF_NAMESPACE_ID::Metadata Color::GetMetadata() const { - return GetMetadataStatic(); -} - - -// =================================================================== - -void FestivalFilter::InitAsDefaultInstance() { -} -class FestivalFilter::_Internal { - public: -}; - -FestivalFilter::FestivalFilter(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(); - RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:waypoint.FestivalFilter) -} -FestivalFilter::FestivalFilter(const FestivalFilter& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::memcpy(&dragonbash_, &from.dragonbash_, - static_cast(reinterpret_cast(&none_) - - reinterpret_cast(&dragonbash_)) + sizeof(none_)); - // @@protoc_insertion_point(copy_constructor:waypoint.FestivalFilter) -} - -void FestivalFilter::SharedCtor() { - ::memset(&dragonbash_, 0, static_cast( - reinterpret_cast(&none_) - - reinterpret_cast(&dragonbash_)) + sizeof(none_)); -} - -FestivalFilter::~FestivalFilter() { - // @@protoc_insertion_point(destructor:waypoint.FestivalFilter) - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -void FestivalFilter::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); -} - -void FestivalFilter::ArenaDtor(void* object) { - FestivalFilter* _this = reinterpret_cast< FestivalFilter* >(object); - (void)_this; -} -void FestivalFilter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void FestivalFilter::SetCachedSize(int size) const { - _cached_size_.Set(size); -} -const FestivalFilter& FestivalFilter::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_FestivalFilter_waypoint_2eproto.base); - return *internal_default_instance(); -} - - -void FestivalFilter::Clear() { -// @@protoc_insertion_point(message_clear_start:waypoint.FestivalFilter) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - ::memset(&dragonbash_, 0, static_cast( - reinterpret_cast(&none_) - - reinterpret_cast(&dragonbash_)) + sizeof(none_)); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* FestivalFilter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; - while (!ctx->Done(&ptr)) { - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - CHK_(ptr); - switch (tag >> 3) { - // bool dragonbash = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - dragonbash_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool festival_of_the_four_winds = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { - festival_of_the_four_winds_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool halloween = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { - halloween_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool lunar_new_year = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { - lunar_new_year_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool super_adventure_festival = 5; - case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { - super_adventure_festival_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool wintersday = 6; - case 6: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) { - wintersday_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool none = 7; - case 7: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) { - none_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - default: { - handle_unusual: - if ((tag & 7) == 4 || tag == 0) { - ctx->SetLastTag(tag); - goto success; - } - ptr = UnknownFieldParse(tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - continue; - } - } // switch - } // while -success: - return ptr; -failure: - ptr = nullptr; - goto success; -#undef CHK_ -} - -::PROTOBUF_NAMESPACE_ID::uint8* FestivalFilter::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:waypoint.FestivalFilter) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // bool dragonbash = 1; - if (this->dragonbash() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->_internal_dragonbash(), target); - } - - // bool festival_of_the_four_winds = 2; - if (this->festival_of_the_four_winds() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_festival_of_the_four_winds(), target); - } - - // bool halloween = 3; - if (this->halloween() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_halloween(), target); - } - - // bool lunar_new_year = 4; - if (this->lunar_new_year() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->_internal_lunar_new_year(), target); - } - - // bool super_adventure_festival = 5; - if (this->super_adventure_festival() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->_internal_super_adventure_festival(), target); - } - - // bool wintersday = 6; - if (this->wintersday() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(6, this->_internal_wintersday(), target); - } - - // bool none = 7; - if (this->none() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(7, this->_internal_none(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:waypoint.FestivalFilter) - return target; -} - -size_t FestivalFilter::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:waypoint.FestivalFilter) - size_t total_size = 0; - - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // bool dragonbash = 1; - if (this->dragonbash() != 0) { - total_size += 1 + 1; - } - - // bool festival_of_the_four_winds = 2; - if (this->festival_of_the_four_winds() != 0) { - total_size += 1 + 1; - } - - // bool halloween = 3; - if (this->halloween() != 0) { - total_size += 1 + 1; - } - - // bool lunar_new_year = 4; - if (this->lunar_new_year() != 0) { - total_size += 1 + 1; - } - - // bool super_adventure_festival = 5; - if (this->super_adventure_festival() != 0) { - total_size += 1 + 1; - } - - // bool wintersday = 6; - if (this->wintersday() != 0) { - total_size += 1 + 1; - } - - // bool none = 7; - if (this->none() != 0) { - total_size += 1 + 1; - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( - _internal_metadata_, total_size, &_cached_size_); - } - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} - -void FestivalFilter::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:waypoint.FestivalFilter) - GOOGLE_DCHECK_NE(&from, this); - const FestivalFilter* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:waypoint.FestivalFilter) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:waypoint.FestivalFilter) - MergeFrom(*source); - } -} - -void FestivalFilter::MergeFrom(const FestivalFilter& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:waypoint.FestivalFilter) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - if (from.dragonbash() != 0) { - _internal_set_dragonbash(from._internal_dragonbash()); - } - if (from.festival_of_the_four_winds() != 0) { - _internal_set_festival_of_the_four_winds(from._internal_festival_of_the_four_winds()); - } - if (from.halloween() != 0) { - _internal_set_halloween(from._internal_halloween()); - } - if (from.lunar_new_year() != 0) { - _internal_set_lunar_new_year(from._internal_lunar_new_year()); - } - if (from.super_adventure_festival() != 0) { - _internal_set_super_adventure_festival(from._internal_super_adventure_festival()); - } - if (from.wintersday() != 0) { - _internal_set_wintersday(from._internal_wintersday()); - } - if (from.none() != 0) { - _internal_set_none(from._internal_none()); - } -} - -void FestivalFilter::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:waypoint.FestivalFilter) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void FestivalFilter::CopyFrom(const FestivalFilter& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:waypoint.FestivalFilter) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool FestivalFilter::IsInitialized() const { - return true; -} - -void FestivalFilter::InternalSwap(FestivalFilter* other) { - using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(FestivalFilter, none_) - + sizeof(FestivalFilter::none_) - - PROTOBUF_FIELD_OFFSET(FestivalFilter, dragonbash_)>( - reinterpret_cast(&dragonbash_), - reinterpret_cast(&other->dragonbash_)); -} - -::PROTOBUF_NAMESPACE_ID::Metadata FestivalFilter::GetMetadata() const { - return GetMetadataStatic(); -} - - -// =================================================================== - -void MapTypeFilter::InitAsDefaultInstance() { -} -class MapTypeFilter::_Internal { - public: -}; - -MapTypeFilter::MapTypeFilter(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(); - RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:waypoint.MapTypeFilter) -} -MapTypeFilter::MapTypeFilter(const MapTypeFilter& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::memcpy(&unknown_map_, &from.unknown_map_, - static_cast(reinterpret_cast(&wvw_lounge_map_) - - reinterpret_cast(&unknown_map_)) + sizeof(wvw_lounge_map_)); - // @@protoc_insertion_point(copy_constructor:waypoint.MapTypeFilter) -} - -void MapTypeFilter::SharedCtor() { - ::memset(&unknown_map_, 0, static_cast( - reinterpret_cast(&wvw_lounge_map_) - - reinterpret_cast(&unknown_map_)) + sizeof(wvw_lounge_map_)); -} - -MapTypeFilter::~MapTypeFilter() { - // @@protoc_insertion_point(destructor:waypoint.MapTypeFilter) - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -void MapTypeFilter::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); -} - -void MapTypeFilter::ArenaDtor(void* object) { - MapTypeFilter* _this = reinterpret_cast< MapTypeFilter* >(object); - (void)_this; -} -void MapTypeFilter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void MapTypeFilter::SetCachedSize(int size) const { - _cached_size_.Set(size); -} -const MapTypeFilter& MapTypeFilter::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_MapTypeFilter_waypoint_2eproto.base); - return *internal_default_instance(); -} - - -void MapTypeFilter::Clear() { -// @@protoc_insertion_point(message_clear_start:waypoint.MapTypeFilter) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - ::memset(&unknown_map_, 0, static_cast( - reinterpret_cast(&wvw_lounge_map_) - - reinterpret_cast(&unknown_map_)) + sizeof(wvw_lounge_map_)); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* MapTypeFilter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; - while (!ctx->Done(&ptr)) { - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - CHK_(ptr); - switch (tag >> 3) { - // bool unknown_map = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - unknown_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool redirect_map = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { - redirect_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool character_create_map = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { - character_create_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool pvp_map = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { - pvp_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool gvg_map = 5; - case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { - gvg_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool instance_map = 6; - case 6: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) { - instance_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool public_map = 7; - case 7: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) { - public_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool tournament_map = 8; - case 8: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 64)) { - tournament_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool tutorial_map = 9; - case 9: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 72)) { - tutorial_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool user_tournament_map = 10; - case 10: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 80)) { - user_tournament_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool center_map = 11; - case 11: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 88)) { - center_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool eternal_battlegrounds_map = 12; - case 12: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 96)) { - eternal_battlegrounds_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool bluehome_map = 13; - case 13: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 104)) { - bluehome_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool blue_borderlands_map = 14; - case 14: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 112)) { - blue_borderlands_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool green_home_map = 15; - case 15: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 120)) { - green_home_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool green_borderlands_map = 16; - case 16: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 128)) { - green_borderlands_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool red_home_map = 17; - case 17: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 136)) { - red_home_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool red_borderlands_map = 18; - case 18: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 144)) { - red_borderlands_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool fortunes_vale_map = 19; - case 19: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 152)) { - fortunes_vale_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool jump_puzzle_map = 20; - case 20: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 160)) { - jump_puzzle_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool obsidian_sanctum_map = 21; - case 21: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 168)) { - obsidian_sanctum_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool edge_of_the_mists_map = 22; - case 22: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 176)) { - edge_of_the_mists_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool public_mini_map = 23; - case 23: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 184)) { - public_mini_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool wvw_lounge_map = 24; - case 24: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 192)) { - wvw_lounge_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - default: { - handle_unusual: - if ((tag & 7) == 4 || tag == 0) { - ctx->SetLastTag(tag); - goto success; - } - ptr = UnknownFieldParse(tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - continue; - } - } // switch - } // while -success: - return ptr; -failure: - ptr = nullptr; - goto success; -#undef CHK_ -} - -::PROTOBUF_NAMESPACE_ID::uint8* MapTypeFilter::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:waypoint.MapTypeFilter) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // bool unknown_map = 1; - if (this->unknown_map() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->_internal_unknown_map(), target); - } - - // bool redirect_map = 2; - if (this->redirect_map() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_redirect_map(), target); - } - - // bool character_create_map = 3; - if (this->character_create_map() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_character_create_map(), target); - } - - // bool pvp_map = 4; - if (this->pvp_map() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->_internal_pvp_map(), target); - } - - // bool gvg_map = 5; - if (this->gvg_map() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->_internal_gvg_map(), target); - } - - // bool instance_map = 6; - if (this->instance_map() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(6, this->_internal_instance_map(), target); - } - - // bool public_map = 7; - if (this->public_map() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(7, this->_internal_public_map(), target); - } - - // bool tournament_map = 8; - if (this->tournament_map() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(8, this->_internal_tournament_map(), target); - } - - // bool tutorial_map = 9; - if (this->tutorial_map() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(9, this->_internal_tutorial_map(), target); - } - - // bool user_tournament_map = 10; - if (this->user_tournament_map() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(10, this->_internal_user_tournament_map(), target); - } - - // bool center_map = 11; - if (this->center_map() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(11, this->_internal_center_map(), target); - } - - // bool eternal_battlegrounds_map = 12; - if (this->eternal_battlegrounds_map() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(12, this->_internal_eternal_battlegrounds_map(), target); - } - - // bool bluehome_map = 13; - if (this->bluehome_map() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(13, this->_internal_bluehome_map(), target); - } - - // bool blue_borderlands_map = 14; - if (this->blue_borderlands_map() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(14, this->_internal_blue_borderlands_map(), target); - } - - // bool green_home_map = 15; - if (this->green_home_map() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(15, this->_internal_green_home_map(), target); - } - - // bool green_borderlands_map = 16; - if (this->green_borderlands_map() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(16, this->_internal_green_borderlands_map(), target); - } - - // bool red_home_map = 17; - if (this->red_home_map() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(17, this->_internal_red_home_map(), target); - } - - // bool red_borderlands_map = 18; - if (this->red_borderlands_map() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(18, this->_internal_red_borderlands_map(), target); - } - - // bool fortunes_vale_map = 19; - if (this->fortunes_vale_map() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(19, this->_internal_fortunes_vale_map(), target); - } - - // bool jump_puzzle_map = 20; - if (this->jump_puzzle_map() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(20, this->_internal_jump_puzzle_map(), target); - } - - // bool obsidian_sanctum_map = 21; - if (this->obsidian_sanctum_map() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(21, this->_internal_obsidian_sanctum_map(), target); - } - - // bool edge_of_the_mists_map = 22; - if (this->edge_of_the_mists_map() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(22, this->_internal_edge_of_the_mists_map(), target); - } - - // bool public_mini_map = 23; - if (this->public_mini_map() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(23, this->_internal_public_mini_map(), target); - } - - // bool wvw_lounge_map = 24; - if (this->wvw_lounge_map() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(24, this->_internal_wvw_lounge_map(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:waypoint.MapTypeFilter) - return target; -} - -size_t MapTypeFilter::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:waypoint.MapTypeFilter) - size_t total_size = 0; - - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // bool unknown_map = 1; - if (this->unknown_map() != 0) { - total_size += 1 + 1; - } - - // bool redirect_map = 2; - if (this->redirect_map() != 0) { - total_size += 1 + 1; - } - - // bool character_create_map = 3; - if (this->character_create_map() != 0) { - total_size += 1 + 1; - } - - // bool pvp_map = 4; - if (this->pvp_map() != 0) { - total_size += 1 + 1; - } - - // bool gvg_map = 5; - if (this->gvg_map() != 0) { - total_size += 1 + 1; - } - - // bool instance_map = 6; - if (this->instance_map() != 0) { - total_size += 1 + 1; - } - - // bool public_map = 7; - if (this->public_map() != 0) { - total_size += 1 + 1; - } - - // bool tournament_map = 8; - if (this->tournament_map() != 0) { - total_size += 1 + 1; - } - - // bool tutorial_map = 9; - if (this->tutorial_map() != 0) { - total_size += 1 + 1; - } - - // bool user_tournament_map = 10; - if (this->user_tournament_map() != 0) { - total_size += 1 + 1; - } - - // bool center_map = 11; - if (this->center_map() != 0) { - total_size += 1 + 1; - } - - // bool eternal_battlegrounds_map = 12; - if (this->eternal_battlegrounds_map() != 0) { - total_size += 1 + 1; - } - - // bool bluehome_map = 13; - if (this->bluehome_map() != 0) { - total_size += 1 + 1; - } - - // bool blue_borderlands_map = 14; - if (this->blue_borderlands_map() != 0) { - total_size += 1 + 1; - } - - // bool green_home_map = 15; - if (this->green_home_map() != 0) { - total_size += 1 + 1; - } - - // bool green_borderlands_map = 16; - if (this->green_borderlands_map() != 0) { - total_size += 2 + 1; - } - - // bool red_home_map = 17; - if (this->red_home_map() != 0) { - total_size += 2 + 1; - } - - // bool red_borderlands_map = 18; - if (this->red_borderlands_map() != 0) { - total_size += 2 + 1; - } - - // bool fortunes_vale_map = 19; - if (this->fortunes_vale_map() != 0) { - total_size += 2 + 1; - } - - // bool jump_puzzle_map = 20; - if (this->jump_puzzle_map() != 0) { - total_size += 2 + 1; - } - - // bool obsidian_sanctum_map = 21; - if (this->obsidian_sanctum_map() != 0) { - total_size += 2 + 1; - } - - // bool edge_of_the_mists_map = 22; - if (this->edge_of_the_mists_map() != 0) { - total_size += 2 + 1; - } - - // bool public_mini_map = 23; - if (this->public_mini_map() != 0) { - total_size += 2 + 1; - } - - // bool wvw_lounge_map = 24; - if (this->wvw_lounge_map() != 0) { - total_size += 2 + 1; - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( - _internal_metadata_, total_size, &_cached_size_); - } - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} - -void MapTypeFilter::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:waypoint.MapTypeFilter) - GOOGLE_DCHECK_NE(&from, this); - const MapTypeFilter* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:waypoint.MapTypeFilter) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:waypoint.MapTypeFilter) - MergeFrom(*source); - } -} - -void MapTypeFilter::MergeFrom(const MapTypeFilter& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:waypoint.MapTypeFilter) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - if (from.unknown_map() != 0) { - _internal_set_unknown_map(from._internal_unknown_map()); - } - if (from.redirect_map() != 0) { - _internal_set_redirect_map(from._internal_redirect_map()); - } - if (from.character_create_map() != 0) { - _internal_set_character_create_map(from._internal_character_create_map()); - } - if (from.pvp_map() != 0) { - _internal_set_pvp_map(from._internal_pvp_map()); - } - if (from.gvg_map() != 0) { - _internal_set_gvg_map(from._internal_gvg_map()); - } - if (from.instance_map() != 0) { - _internal_set_instance_map(from._internal_instance_map()); - } - if (from.public_map() != 0) { - _internal_set_public_map(from._internal_public_map()); - } - if (from.tournament_map() != 0) { - _internal_set_tournament_map(from._internal_tournament_map()); - } - if (from.tutorial_map() != 0) { - _internal_set_tutorial_map(from._internal_tutorial_map()); - } - if (from.user_tournament_map() != 0) { - _internal_set_user_tournament_map(from._internal_user_tournament_map()); - } - if (from.center_map() != 0) { - _internal_set_center_map(from._internal_center_map()); - } - if (from.eternal_battlegrounds_map() != 0) { - _internal_set_eternal_battlegrounds_map(from._internal_eternal_battlegrounds_map()); - } - if (from.bluehome_map() != 0) { - _internal_set_bluehome_map(from._internal_bluehome_map()); - } - if (from.blue_borderlands_map() != 0) { - _internal_set_blue_borderlands_map(from._internal_blue_borderlands_map()); - } - if (from.green_home_map() != 0) { - _internal_set_green_home_map(from._internal_green_home_map()); - } - if (from.green_borderlands_map() != 0) { - _internal_set_green_borderlands_map(from._internal_green_borderlands_map()); - } - if (from.red_home_map() != 0) { - _internal_set_red_home_map(from._internal_red_home_map()); - } - if (from.red_borderlands_map() != 0) { - _internal_set_red_borderlands_map(from._internal_red_borderlands_map()); - } - if (from.fortunes_vale_map() != 0) { - _internal_set_fortunes_vale_map(from._internal_fortunes_vale_map()); - } - if (from.jump_puzzle_map() != 0) { - _internal_set_jump_puzzle_map(from._internal_jump_puzzle_map()); - } - if (from.obsidian_sanctum_map() != 0) { - _internal_set_obsidian_sanctum_map(from._internal_obsidian_sanctum_map()); - } - if (from.edge_of_the_mists_map() != 0) { - _internal_set_edge_of_the_mists_map(from._internal_edge_of_the_mists_map()); - } - if (from.public_mini_map() != 0) { - _internal_set_public_mini_map(from._internal_public_mini_map()); - } - if (from.wvw_lounge_map() != 0) { - _internal_set_wvw_lounge_map(from._internal_wvw_lounge_map()); - } -} - -void MapTypeFilter::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:waypoint.MapTypeFilter) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void MapTypeFilter::CopyFrom(const MapTypeFilter& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:waypoint.MapTypeFilter) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool MapTypeFilter::IsInitialized() const { - return true; -} - -void MapTypeFilter::InternalSwap(MapTypeFilter* other) { - using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(MapTypeFilter, wvw_lounge_map_) - + sizeof(MapTypeFilter::wvw_lounge_map_) - - PROTOBUF_FIELD_OFFSET(MapTypeFilter, unknown_map_)>( - reinterpret_cast(&unknown_map_), - reinterpret_cast(&other->unknown_map_)); -} - -::PROTOBUF_NAMESPACE_ID::Metadata MapTypeFilter::GetMetadata() const { - return GetMetadataStatic(); -} - - -// =================================================================== - -void MountFilter::InitAsDefaultInstance() { -} -class MountFilter::_Internal { - public: -}; - -MountFilter::MountFilter(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(); - RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:waypoint.MountFilter) -} -MountFilter::MountFilter(const MountFilter& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::memcpy(&raptor_, &from.raptor_, - static_cast(reinterpret_cast(&seige_turtle_) - - reinterpret_cast(&raptor_)) + sizeof(seige_turtle_)); - // @@protoc_insertion_point(copy_constructor:waypoint.MountFilter) -} - -void MountFilter::SharedCtor() { - ::memset(&raptor_, 0, static_cast( - reinterpret_cast(&seige_turtle_) - - reinterpret_cast(&raptor_)) + sizeof(seige_turtle_)); -} - -MountFilter::~MountFilter() { - // @@protoc_insertion_point(destructor:waypoint.MountFilter) - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -void MountFilter::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); -} - -void MountFilter::ArenaDtor(void* object) { - MountFilter* _this = reinterpret_cast< MountFilter* >(object); - (void)_this; -} -void MountFilter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void MountFilter::SetCachedSize(int size) const { - _cached_size_.Set(size); -} -const MountFilter& MountFilter::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_MountFilter_waypoint_2eproto.base); - return *internal_default_instance(); -} - - -void MountFilter::Clear() { -// @@protoc_insertion_point(message_clear_start:waypoint.MountFilter) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - ::memset(&raptor_, 0, static_cast( - reinterpret_cast(&seige_turtle_) - - reinterpret_cast(&raptor_)) + sizeof(seige_turtle_)); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* MountFilter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; - while (!ctx->Done(&ptr)) { - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - CHK_(ptr); - switch (tag >> 3) { - // bool raptor = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - raptor_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool springer = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { - springer_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool skimmer = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { - skimmer_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool jackal = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { - jackal_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool griffon = 5; - case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { - griffon_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool roller_beetle = 6; - case 6: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) { - roller_beetle_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool warclaw = 7; - case 7: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) { - warclaw_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool skyscalee = 8; - case 8: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 64)) { - skyscalee_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool skiff = 9; - case 9: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 72)) { - skiff_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool seige_turtle = 10; - case 10: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 80)) { - seige_turtle_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - default: { - handle_unusual: - if ((tag & 7) == 4 || tag == 0) { - ctx->SetLastTag(tag); - goto success; - } - ptr = UnknownFieldParse(tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - continue; - } - } // switch - } // while -success: - return ptr; -failure: - ptr = nullptr; - goto success; -#undef CHK_ -} - -::PROTOBUF_NAMESPACE_ID::uint8* MountFilter::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:waypoint.MountFilter) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // bool raptor = 1; - if (this->raptor() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->_internal_raptor(), target); - } - - // bool springer = 2; - if (this->springer() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_springer(), target); - } - - // bool skimmer = 3; - if (this->skimmer() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_skimmer(), target); - } - - // bool jackal = 4; - if (this->jackal() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->_internal_jackal(), target); - } - - // bool griffon = 5; - if (this->griffon() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->_internal_griffon(), target); - } - - // bool roller_beetle = 6; - if (this->roller_beetle() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(6, this->_internal_roller_beetle(), target); - } - - // bool warclaw = 7; - if (this->warclaw() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(7, this->_internal_warclaw(), target); - } - - // bool skyscalee = 8; - if (this->skyscalee() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(8, this->_internal_skyscalee(), target); - } - - // bool skiff = 9; - if (this->skiff() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(9, this->_internal_skiff(), target); - } - - // bool seige_turtle = 10; - if (this->seige_turtle() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(10, this->_internal_seige_turtle(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:waypoint.MountFilter) - return target; -} - -size_t MountFilter::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:waypoint.MountFilter) - size_t total_size = 0; - - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // bool raptor = 1; - if (this->raptor() != 0) { - total_size += 1 + 1; - } - - // bool springer = 2; - if (this->springer() != 0) { - total_size += 1 + 1; - } - - // bool skimmer = 3; - if (this->skimmer() != 0) { - total_size += 1 + 1; - } - - // bool jackal = 4; - if (this->jackal() != 0) { - total_size += 1 + 1; - } - - // bool griffon = 5; - if (this->griffon() != 0) { - total_size += 1 + 1; - } - - // bool roller_beetle = 6; - if (this->roller_beetle() != 0) { - total_size += 1 + 1; - } - - // bool warclaw = 7; - if (this->warclaw() != 0) { - total_size += 1 + 1; - } - - // bool skyscalee = 8; - if (this->skyscalee() != 0) { - total_size += 1 + 1; - } - - // bool skiff = 9; - if (this->skiff() != 0) { - total_size += 1 + 1; - } - - // bool seige_turtle = 10; - if (this->seige_turtle() != 0) { - total_size += 1 + 1; - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( - _internal_metadata_, total_size, &_cached_size_); - } - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} - -void MountFilter::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:waypoint.MountFilter) - GOOGLE_DCHECK_NE(&from, this); - const MountFilter* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:waypoint.MountFilter) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:waypoint.MountFilter) - MergeFrom(*source); - } -} - -void MountFilter::MergeFrom(const MountFilter& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:waypoint.MountFilter) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - if (from.raptor() != 0) { - _internal_set_raptor(from._internal_raptor()); - } - if (from.springer() != 0) { - _internal_set_springer(from._internal_springer()); - } - if (from.skimmer() != 0) { - _internal_set_skimmer(from._internal_skimmer()); - } - if (from.jackal() != 0) { - _internal_set_jackal(from._internal_jackal()); - } - if (from.griffon() != 0) { - _internal_set_griffon(from._internal_griffon()); - } - if (from.roller_beetle() != 0) { - _internal_set_roller_beetle(from._internal_roller_beetle()); - } - if (from.warclaw() != 0) { - _internal_set_warclaw(from._internal_warclaw()); - } - if (from.skyscalee() != 0) { - _internal_set_skyscalee(from._internal_skyscalee()); - } - if (from.skiff() != 0) { - _internal_set_skiff(from._internal_skiff()); - } - if (from.seige_turtle() != 0) { - _internal_set_seige_turtle(from._internal_seige_turtle()); - } -} - -void MountFilter::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:waypoint.MountFilter) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void MountFilter::CopyFrom(const MountFilter& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:waypoint.MountFilter) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool MountFilter::IsInitialized() const { - return true; -} - -void MountFilter::InternalSwap(MountFilter* other) { - using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(MountFilter, seige_turtle_) - + sizeof(MountFilter::seige_turtle_) - - PROTOBUF_FIELD_OFFSET(MountFilter, raptor_)>( - reinterpret_cast(&raptor_), - reinterpret_cast(&other->raptor_)); -} - -::PROTOBUF_NAMESPACE_ID::Metadata MountFilter::GetMetadata() const { - return GetMetadataStatic(); -} - - -// =================================================================== - -void ProfessionFilter::InitAsDefaultInstance() { -} -class ProfessionFilter::_Internal { - public: -}; - -ProfessionFilter::ProfessionFilter(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(); - RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:waypoint.ProfessionFilter) -} -ProfessionFilter::ProfessionFilter(const ProfessionFilter& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::memcpy(&guardian_, &from.guardian_, - static_cast(reinterpret_cast(&revenantnt_) - - reinterpret_cast(&guardian_)) + sizeof(revenantnt_)); - // @@protoc_insertion_point(copy_constructor:waypoint.ProfessionFilter) -} - -void ProfessionFilter::SharedCtor() { - ::memset(&guardian_, 0, static_cast( - reinterpret_cast(&revenantnt_) - - reinterpret_cast(&guardian_)) + sizeof(revenantnt_)); -} - -ProfessionFilter::~ProfessionFilter() { - // @@protoc_insertion_point(destructor:waypoint.ProfessionFilter) - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -void ProfessionFilter::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); -} - -void ProfessionFilter::ArenaDtor(void* object) { - ProfessionFilter* _this = reinterpret_cast< ProfessionFilter* >(object); - (void)_this; -} -void ProfessionFilter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void ProfessionFilter::SetCachedSize(int size) const { - _cached_size_.Set(size); -} -const ProfessionFilter& ProfessionFilter::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ProfessionFilter_waypoint_2eproto.base); - return *internal_default_instance(); -} - - -void ProfessionFilter::Clear() { -// @@protoc_insertion_point(message_clear_start:waypoint.ProfessionFilter) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - ::memset(&guardian_, 0, static_cast( - reinterpret_cast(&revenantnt_) - - reinterpret_cast(&guardian_)) + sizeof(revenantnt_)); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* ProfessionFilter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; - while (!ctx->Done(&ptr)) { - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - CHK_(ptr); - switch (tag >> 3) { - // bool guardian = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - guardian_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool warrior = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { - warrior_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool engineer = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { - engineer_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool ranger = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { - ranger_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool thief = 5; - case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { - thief_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool elementalist = 6; - case 6: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) { - elementalist_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool mesmer = 7; - case 7: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) { - mesmer_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool necromancer = 8; - case 8: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 64)) { - necromancer_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool revenantnt = 9; - case 9: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 72)) { - revenantnt_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - default: { - handle_unusual: - if ((tag & 7) == 4 || tag == 0) { - ctx->SetLastTag(tag); - goto success; - } - ptr = UnknownFieldParse(tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - continue; - } - } // switch - } // while -success: - return ptr; -failure: - ptr = nullptr; - goto success; -#undef CHK_ -} - -::PROTOBUF_NAMESPACE_ID::uint8* ProfessionFilter::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:waypoint.ProfessionFilter) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // bool guardian = 1; - if (this->guardian() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->_internal_guardian(), target); - } - - // bool warrior = 2; - if (this->warrior() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_warrior(), target); - } - - // bool engineer = 3; - if (this->engineer() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_engineer(), target); - } - - // bool ranger = 4; - if (this->ranger() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->_internal_ranger(), target); - } - - // bool thief = 5; - if (this->thief() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->_internal_thief(), target); - } - - // bool elementalist = 6; - if (this->elementalist() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(6, this->_internal_elementalist(), target); - } - - // bool mesmer = 7; - if (this->mesmer() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(7, this->_internal_mesmer(), target); - } - - // bool necromancer = 8; - if (this->necromancer() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(8, this->_internal_necromancer(), target); - } - - // bool revenantnt = 9; - if (this->revenantnt() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(9, this->_internal_revenantnt(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:waypoint.ProfessionFilter) - return target; -} - -size_t ProfessionFilter::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:waypoint.ProfessionFilter) - size_t total_size = 0; - - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // bool guardian = 1; - if (this->guardian() != 0) { - total_size += 1 + 1; - } - - // bool warrior = 2; - if (this->warrior() != 0) { - total_size += 1 + 1; - } - - // bool engineer = 3; - if (this->engineer() != 0) { - total_size += 1 + 1; - } - - // bool ranger = 4; - if (this->ranger() != 0) { - total_size += 1 + 1; - } - - // bool thief = 5; - if (this->thief() != 0) { - total_size += 1 + 1; - } - - // bool elementalist = 6; - if (this->elementalist() != 0) { - total_size += 1 + 1; - } - - // bool mesmer = 7; - if (this->mesmer() != 0) { - total_size += 1 + 1; - } - - // bool necromancer = 8; - if (this->necromancer() != 0) { - total_size += 1 + 1; - } - - // bool revenantnt = 9; - if (this->revenantnt() != 0) { - total_size += 1 + 1; - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( - _internal_metadata_, total_size, &_cached_size_); - } - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} - -void ProfessionFilter::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:waypoint.ProfessionFilter) - GOOGLE_DCHECK_NE(&from, this); - const ProfessionFilter* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:waypoint.ProfessionFilter) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:waypoint.ProfessionFilter) - MergeFrom(*source); - } -} - -void ProfessionFilter::MergeFrom(const ProfessionFilter& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:waypoint.ProfessionFilter) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - if (from.guardian() != 0) { - _internal_set_guardian(from._internal_guardian()); - } - if (from.warrior() != 0) { - _internal_set_warrior(from._internal_warrior()); - } - if (from.engineer() != 0) { - _internal_set_engineer(from._internal_engineer()); - } - if (from.ranger() != 0) { - _internal_set_ranger(from._internal_ranger()); - } - if (from.thief() != 0) { - _internal_set_thief(from._internal_thief()); - } - if (from.elementalist() != 0) { - _internal_set_elementalist(from._internal_elementalist()); - } - if (from.mesmer() != 0) { - _internal_set_mesmer(from._internal_mesmer()); - } - if (from.necromancer() != 0) { - _internal_set_necromancer(from._internal_necromancer()); - } - if (from.revenantnt() != 0) { - _internal_set_revenantnt(from._internal_revenantnt()); - } -} - -void ProfessionFilter::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:waypoint.ProfessionFilter) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void ProfessionFilter::CopyFrom(const ProfessionFilter& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:waypoint.ProfessionFilter) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool ProfessionFilter::IsInitialized() const { - return true; -} - -void ProfessionFilter::InternalSwap(ProfessionFilter* other) { - using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(ProfessionFilter, revenantnt_) - + sizeof(ProfessionFilter::revenantnt_) - - PROTOBUF_FIELD_OFFSET(ProfessionFilter, guardian_)>( - reinterpret_cast(&guardian_), - reinterpret_cast(&other->guardian_)); -} - -::PROTOBUF_NAMESPACE_ID::Metadata ProfessionFilter::GetMetadata() const { - return GetMetadataStatic(); -} - - -// =================================================================== - -void SpecializationFilter::InitAsDefaultInstance() { -} -class SpecializationFilter::_Internal { - public: -}; - -SpecializationFilter::SpecializationFilter(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(); - RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:waypoint.SpecializationFilter) -} -SpecializationFilter::SpecializationFilter(const SpecializationFilter& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::memcpy(&elementalist_tempest_, &from.elementalist_tempest_, - static_cast(reinterpret_cast(&warrior_tactics_) - - reinterpret_cast(&elementalist_tempest_)) + sizeof(warrior_tactics_)); - // @@protoc_insertion_point(copy_constructor:waypoint.SpecializationFilter) -} - -void SpecializationFilter::SharedCtor() { - ::memset(&elementalist_tempest_, 0, static_cast( - reinterpret_cast(&warrior_tactics_) - - reinterpret_cast(&elementalist_tempest_)) + sizeof(warrior_tactics_)); -} - -SpecializationFilter::~SpecializationFilter() { - // @@protoc_insertion_point(destructor:waypoint.SpecializationFilter) - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -void SpecializationFilter::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); -} - -void SpecializationFilter::ArenaDtor(void* object) { - SpecializationFilter* _this = reinterpret_cast< SpecializationFilter* >(object); - (void)_this; -} -void SpecializationFilter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void SpecializationFilter::SetCachedSize(int size) const { - _cached_size_.Set(size); -} -const SpecializationFilter& SpecializationFilter::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_SpecializationFilter_waypoint_2eproto.base); - return *internal_default_instance(); -} - - -void SpecializationFilter::Clear() { -// @@protoc_insertion_point(message_clear_start:waypoint.SpecializationFilter) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - ::memset(&elementalist_tempest_, 0, static_cast( - reinterpret_cast(&warrior_tactics_) - - reinterpret_cast(&elementalist_tempest_)) + sizeof(warrior_tactics_)); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* SpecializationFilter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; - while (!ctx->Done(&ptr)) { - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - CHK_(ptr); - switch (tag >> 3) { - // bool elementalist_tempest = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - elementalist_tempest_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool engineer_scrapper = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { - engineer_scrapper_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool guardian_dragonhunter = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { - guardian_dragonhunter_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool mesmer_chronomancer = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { - mesmer_chronomancer_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool necromancer_reaper = 5; - case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { - necromancer_reaper_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool ranger_druid = 6; - case 6: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) { - ranger_druid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool revenant_herald = 7; - case 7: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) { - revenant_herald_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool thief_daredevil = 8; - case 8: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 64)) { - thief_daredevil_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool warrior_berserker = 9; - case 9: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 72)) { - warrior_berserker_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool elementalist_weaver = 10; - case 10: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 80)) { - elementalist_weaver_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool engineer_holosmith = 11; - case 11: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 88)) { - engineer_holosmith_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool guardian_firebrand = 12; - case 12: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 96)) { - guardian_firebrand_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool mesmer_mirage = 13; - case 13: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 104)) { - mesmer_mirage_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool necromancer_scourge = 14; - case 14: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 112)) { - necromancer_scourge_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool ranger_soulbeast = 15; - case 15: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 120)) { - ranger_soulbeast_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool revenant_renegade = 16; - case 16: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 128)) { - revenant_renegade_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool thief_deadeye = 17; - case 17: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 136)) { - thief_deadeye_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool warrior_spellbreaker = 18; - case 18: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 144)) { - warrior_spellbreaker_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool elmentalist_catalyst = 19; - case 19: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 152)) { - elmentalist_catalyst_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool engineer_mechanist = 20; - case 20: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 160)) { - engineer_mechanist_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool guardian_willbender = 21; - case 21: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 168)) { - guardian_willbender_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool mesmer_virtuoso = 22; - case 22: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 176)) { - mesmer_virtuoso_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool necromancer_harbinger = 23; - case 23: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 184)) { - necromancer_harbinger_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool ranger_untamed = 24; - case 24: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 192)) { - ranger_untamed_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool revenant_vindicator = 25; - case 25: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 200)) { - revenant_vindicator_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool thief_specter = 26; - case 26: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 208)) { - thief_specter_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool warrior_bladesworn = 27; - case 27: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 216)) { - warrior_bladesworn_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool elementalist_air = 28; - case 28: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 224)) { - elementalist_air_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool elementalist_arcane = 29; - case 29: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 232)) { - elementalist_arcane_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool elementalist_earth = 30; - case 30: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 240)) { - elementalist_earth_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool elementalist_fire = 31; - case 31: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 248)) { - elementalist_fire_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool elementalist_water = 32; - case 32: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 0)) { - elementalist_water_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool engineer_alchemy = 33; - case 33: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - engineer_alchemy_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool engineer_explosives = 34; - case 34: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { - engineer_explosives_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool engineer_firearms = 35; - case 35: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { - engineer_firearms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool engineer_inventions = 36; - case 36: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { - engineer_inventions_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool engineer_tools = 37; - case 37: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { - engineer_tools_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool guardian_honor = 38; - case 38: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) { - guardian_honor_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool guardian_radiance = 39; - case 39: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) { - guardian_radiance_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool guardian_valor = 40; - case 40: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 64)) { - guardian_valor_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool guardian_virtues = 41; - case 41: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 72)) { - guardian_virtues_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool guardian_zeal = 42; - case 42: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 80)) { - guardian_zeal_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool mesmer_chaos = 43; - case 43: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 88)) { - mesmer_chaos_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool mesmer_domination = 44; - case 44: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 96)) { - mesmer_domination_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool mesmer_dueling = 45; - case 45: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 104)) { - mesmer_dueling_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool mesmer_illusions = 46; - case 46: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 112)) { - mesmer_illusions_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool mesmer_inspiration = 47; - case 47: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 120)) { - mesmer_inspiration_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool necromancer_blood_magic = 48; - case 48: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 128)) { - necromancer_blood_magic_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool necromancer_curses = 49; - case 49: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 136)) { - necromancer_curses_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool necromancer_death_magic = 50; - case 50: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 144)) { - necromancer_death_magic_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool necromancer_soul_reaping = 51; - case 51: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 152)) { - necromancer_soul_reaping_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool necromancer_spite = 52; - case 52: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 160)) { - necromancer_spite_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool ranger_beastmastery = 53; - case 53: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 168)) { - ranger_beastmastery_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool ranger_marksmanship = 54; - case 54: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 176)) { - ranger_marksmanship_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool ranger_nature_magic = 55; - case 55: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 184)) { - ranger_nature_magic_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool ranger_skirmishing = 56; - case 56: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 192)) { - ranger_skirmishing_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool ranger_wilderness_survival = 57; - case 57: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 200)) { - ranger_wilderness_survival_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool revenant_corruption = 58; - case 58: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 208)) { - revenant_corruption_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool revenant_devastation = 59; - case 59: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 216)) { - revenant_devastation_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool revenant_invocation = 60; - case 60: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 224)) { - revenant_invocation_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool revenant_retribution = 61; - case 61: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 232)) { - revenant_retribution_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool revenant_salvation = 62; - case 62: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 240)) { - revenant_salvation_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool thief_acrobatics = 63; - case 63: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 248)) { - thief_acrobatics_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool thief_critical_strikes = 64; - case 64: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 0)) { - thief_critical_strikes_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool thief_deadly_arts = 65; - case 65: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - thief_deadly_arts_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool thief_shadow_arts = 66; - case 66: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { - thief_shadow_arts_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool thief_trickery = 67; - case 67: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { - thief_trickery_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool warrior_arms = 68; - case 68: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { - warrior_arms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool warrior_defense = 69; - case 69: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { - warrior_defense_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool warrior_discipline = 70; - case 70: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) { - warrior_discipline_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool warrior_strength = 71; - case 71: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) { - warrior_strength_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool warrior_tactics = 72; - case 72: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 64)) { - warrior_tactics_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - default: { - handle_unusual: - if ((tag & 7) == 4 || tag == 0) { - ctx->SetLastTag(tag); - goto success; - } - ptr = UnknownFieldParse(tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - continue; - } - } // switch - } // while -success: - return ptr; -failure: - ptr = nullptr; - goto success; -#undef CHK_ -} - -::PROTOBUF_NAMESPACE_ID::uint8* SpecializationFilter::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:waypoint.SpecializationFilter) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // bool elementalist_tempest = 1; - if (this->elementalist_tempest() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->_internal_elementalist_tempest(), target); - } - - // bool engineer_scrapper = 2; - if (this->engineer_scrapper() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_engineer_scrapper(), target); - } - - // bool guardian_dragonhunter = 3; - if (this->guardian_dragonhunter() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_guardian_dragonhunter(), target); - } - - // bool mesmer_chronomancer = 4; - if (this->mesmer_chronomancer() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->_internal_mesmer_chronomancer(), target); - } - - // bool necromancer_reaper = 5; - if (this->necromancer_reaper() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->_internal_necromancer_reaper(), target); - } - - // bool ranger_druid = 6; - if (this->ranger_druid() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(6, this->_internal_ranger_druid(), target); - } - - // bool revenant_herald = 7; - if (this->revenant_herald() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(7, this->_internal_revenant_herald(), target); - } - - // bool thief_daredevil = 8; - if (this->thief_daredevil() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(8, this->_internal_thief_daredevil(), target); - } - - // bool warrior_berserker = 9; - if (this->warrior_berserker() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(9, this->_internal_warrior_berserker(), target); - } - - // bool elementalist_weaver = 10; - if (this->elementalist_weaver() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(10, this->_internal_elementalist_weaver(), target); - } - - // bool engineer_holosmith = 11; - if (this->engineer_holosmith() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(11, this->_internal_engineer_holosmith(), target); - } - - // bool guardian_firebrand = 12; - if (this->guardian_firebrand() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(12, this->_internal_guardian_firebrand(), target); - } - - // bool mesmer_mirage = 13; - if (this->mesmer_mirage() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(13, this->_internal_mesmer_mirage(), target); - } - - // bool necromancer_scourge = 14; - if (this->necromancer_scourge() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(14, this->_internal_necromancer_scourge(), target); - } - - // bool ranger_soulbeast = 15; - if (this->ranger_soulbeast() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(15, this->_internal_ranger_soulbeast(), target); - } - - // bool revenant_renegade = 16; - if (this->revenant_renegade() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(16, this->_internal_revenant_renegade(), target); - } - - // bool thief_deadeye = 17; - if (this->thief_deadeye() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(17, this->_internal_thief_deadeye(), target); - } - - // bool warrior_spellbreaker = 18; - if (this->warrior_spellbreaker() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(18, this->_internal_warrior_spellbreaker(), target); - } - - // bool elmentalist_catalyst = 19; - if (this->elmentalist_catalyst() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(19, this->_internal_elmentalist_catalyst(), target); - } - - // bool engineer_mechanist = 20; - if (this->engineer_mechanist() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(20, this->_internal_engineer_mechanist(), target); - } - - // bool guardian_willbender = 21; - if (this->guardian_willbender() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(21, this->_internal_guardian_willbender(), target); - } - - // bool mesmer_virtuoso = 22; - if (this->mesmer_virtuoso() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(22, this->_internal_mesmer_virtuoso(), target); - } - - // bool necromancer_harbinger = 23; - if (this->necromancer_harbinger() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(23, this->_internal_necromancer_harbinger(), target); - } - - // bool ranger_untamed = 24; - if (this->ranger_untamed() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(24, this->_internal_ranger_untamed(), target); - } - - // bool revenant_vindicator = 25; - if (this->revenant_vindicator() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(25, this->_internal_revenant_vindicator(), target); - } - - // bool thief_specter = 26; - if (this->thief_specter() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(26, this->_internal_thief_specter(), target); - } - - // bool warrior_bladesworn = 27; - if (this->warrior_bladesworn() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(27, this->_internal_warrior_bladesworn(), target); - } - - // bool elementalist_air = 28; - if (this->elementalist_air() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(28, this->_internal_elementalist_air(), target); - } - - // bool elementalist_arcane = 29; - if (this->elementalist_arcane() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(29, this->_internal_elementalist_arcane(), target); - } - - // bool elementalist_earth = 30; - if (this->elementalist_earth() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(30, this->_internal_elementalist_earth(), target); - } - - // bool elementalist_fire = 31; - if (this->elementalist_fire() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(31, this->_internal_elementalist_fire(), target); - } - - // bool elementalist_water = 32; - if (this->elementalist_water() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(32, this->_internal_elementalist_water(), target); - } - - // bool engineer_alchemy = 33; - if (this->engineer_alchemy() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(33, this->_internal_engineer_alchemy(), target); - } - - // bool engineer_explosives = 34; - if (this->engineer_explosives() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(34, this->_internal_engineer_explosives(), target); - } - - // bool engineer_firearms = 35; - if (this->engineer_firearms() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(35, this->_internal_engineer_firearms(), target); - } - - // bool engineer_inventions = 36; - if (this->engineer_inventions() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(36, this->_internal_engineer_inventions(), target); - } - - // bool engineer_tools = 37; - if (this->engineer_tools() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(37, this->_internal_engineer_tools(), target); - } - - // bool guardian_honor = 38; - if (this->guardian_honor() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(38, this->_internal_guardian_honor(), target); - } - - // bool guardian_radiance = 39; - if (this->guardian_radiance() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(39, this->_internal_guardian_radiance(), target); - } - - // bool guardian_valor = 40; - if (this->guardian_valor() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(40, this->_internal_guardian_valor(), target); - } - - // bool guardian_virtues = 41; - if (this->guardian_virtues() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(41, this->_internal_guardian_virtues(), target); - } - - // bool guardian_zeal = 42; - if (this->guardian_zeal() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(42, this->_internal_guardian_zeal(), target); - } - - // bool mesmer_chaos = 43; - if (this->mesmer_chaos() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(43, this->_internal_mesmer_chaos(), target); - } - - // bool mesmer_domination = 44; - if (this->mesmer_domination() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(44, this->_internal_mesmer_domination(), target); - } - - // bool mesmer_dueling = 45; - if (this->mesmer_dueling() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(45, this->_internal_mesmer_dueling(), target); - } - - // bool mesmer_illusions = 46; - if (this->mesmer_illusions() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(46, this->_internal_mesmer_illusions(), target); - } - - // bool mesmer_inspiration = 47; - if (this->mesmer_inspiration() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(47, this->_internal_mesmer_inspiration(), target); - } - - // bool necromancer_blood_magic = 48; - if (this->necromancer_blood_magic() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(48, this->_internal_necromancer_blood_magic(), target); - } - - // bool necromancer_curses = 49; - if (this->necromancer_curses() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(49, this->_internal_necromancer_curses(), target); - } - - // bool necromancer_death_magic = 50; - if (this->necromancer_death_magic() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(50, this->_internal_necromancer_death_magic(), target); - } - - // bool necromancer_soul_reaping = 51; - if (this->necromancer_soul_reaping() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(51, this->_internal_necromancer_soul_reaping(), target); - } - - // bool necromancer_spite = 52; - if (this->necromancer_spite() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(52, this->_internal_necromancer_spite(), target); - } - - // bool ranger_beastmastery = 53; - if (this->ranger_beastmastery() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(53, this->_internal_ranger_beastmastery(), target); - } - - // bool ranger_marksmanship = 54; - if (this->ranger_marksmanship() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(54, this->_internal_ranger_marksmanship(), target); - } - - // bool ranger_nature_magic = 55; - if (this->ranger_nature_magic() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(55, this->_internal_ranger_nature_magic(), target); - } - - // bool ranger_skirmishing = 56; - if (this->ranger_skirmishing() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(56, this->_internal_ranger_skirmishing(), target); - } - - // bool ranger_wilderness_survival = 57; - if (this->ranger_wilderness_survival() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(57, this->_internal_ranger_wilderness_survival(), target); - } - - // bool revenant_corruption = 58; - if (this->revenant_corruption() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(58, this->_internal_revenant_corruption(), target); - } - - // bool revenant_devastation = 59; - if (this->revenant_devastation() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(59, this->_internal_revenant_devastation(), target); - } - - // bool revenant_invocation = 60; - if (this->revenant_invocation() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(60, this->_internal_revenant_invocation(), target); - } - - // bool revenant_retribution = 61; - if (this->revenant_retribution() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(61, this->_internal_revenant_retribution(), target); - } - - // bool revenant_salvation = 62; - if (this->revenant_salvation() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(62, this->_internal_revenant_salvation(), target); - } - - // bool thief_acrobatics = 63; - if (this->thief_acrobatics() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(63, this->_internal_thief_acrobatics(), target); - } - - // bool thief_critical_strikes = 64; - if (this->thief_critical_strikes() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(64, this->_internal_thief_critical_strikes(), target); - } - - // bool thief_deadly_arts = 65; - if (this->thief_deadly_arts() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(65, this->_internal_thief_deadly_arts(), target); - } - - // bool thief_shadow_arts = 66; - if (this->thief_shadow_arts() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(66, this->_internal_thief_shadow_arts(), target); - } - - // bool thief_trickery = 67; - if (this->thief_trickery() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(67, this->_internal_thief_trickery(), target); - } - - // bool warrior_arms = 68; - if (this->warrior_arms() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(68, this->_internal_warrior_arms(), target); - } - - // bool warrior_defense = 69; - if (this->warrior_defense() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(69, this->_internal_warrior_defense(), target); - } - - // bool warrior_discipline = 70; - if (this->warrior_discipline() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(70, this->_internal_warrior_discipline(), target); - } - - // bool warrior_strength = 71; - if (this->warrior_strength() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(71, this->_internal_warrior_strength(), target); - } - - // bool warrior_tactics = 72; - if (this->warrior_tactics() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(72, this->_internal_warrior_tactics(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:waypoint.SpecializationFilter) - return target; -} - -size_t SpecializationFilter::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:waypoint.SpecializationFilter) - size_t total_size = 0; - - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // bool elementalist_tempest = 1; - if (this->elementalist_tempest() != 0) { - total_size += 1 + 1; - } - - // bool engineer_scrapper = 2; - if (this->engineer_scrapper() != 0) { - total_size += 1 + 1; - } - - // bool guardian_dragonhunter = 3; - if (this->guardian_dragonhunter() != 0) { - total_size += 1 + 1; - } - - // bool mesmer_chronomancer = 4; - if (this->mesmer_chronomancer() != 0) { - total_size += 1 + 1; - } - - // bool necromancer_reaper = 5; - if (this->necromancer_reaper() != 0) { - total_size += 1 + 1; - } - - // bool ranger_druid = 6; - if (this->ranger_druid() != 0) { - total_size += 1 + 1; - } - - // bool revenant_herald = 7; - if (this->revenant_herald() != 0) { - total_size += 1 + 1; - } - - // bool thief_daredevil = 8; - if (this->thief_daredevil() != 0) { - total_size += 1 + 1; - } - - // bool warrior_berserker = 9; - if (this->warrior_berserker() != 0) { - total_size += 1 + 1; - } - - // bool elementalist_weaver = 10; - if (this->elementalist_weaver() != 0) { - total_size += 1 + 1; - } - - // bool engineer_holosmith = 11; - if (this->engineer_holosmith() != 0) { - total_size += 1 + 1; - } - - // bool guardian_firebrand = 12; - if (this->guardian_firebrand() != 0) { - total_size += 1 + 1; - } - - // bool mesmer_mirage = 13; - if (this->mesmer_mirage() != 0) { - total_size += 1 + 1; - } - - // bool necromancer_scourge = 14; - if (this->necromancer_scourge() != 0) { - total_size += 1 + 1; - } - - // bool ranger_soulbeast = 15; - if (this->ranger_soulbeast() != 0) { - total_size += 1 + 1; - } - - // bool revenant_renegade = 16; - if (this->revenant_renegade() != 0) { - total_size += 2 + 1; - } - - // bool thief_deadeye = 17; - if (this->thief_deadeye() != 0) { - total_size += 2 + 1; - } - - // bool warrior_spellbreaker = 18; - if (this->warrior_spellbreaker() != 0) { - total_size += 2 + 1; - } - - // bool elmentalist_catalyst = 19; - if (this->elmentalist_catalyst() != 0) { - total_size += 2 + 1; - } - - // bool engineer_mechanist = 20; - if (this->engineer_mechanist() != 0) { - total_size += 2 + 1; - } - - // bool guardian_willbender = 21; - if (this->guardian_willbender() != 0) { - total_size += 2 + 1; - } - - // bool mesmer_virtuoso = 22; - if (this->mesmer_virtuoso() != 0) { - total_size += 2 + 1; - } - - // bool necromancer_harbinger = 23; - if (this->necromancer_harbinger() != 0) { - total_size += 2 + 1; - } - - // bool ranger_untamed = 24; - if (this->ranger_untamed() != 0) { - total_size += 2 + 1; - } - - // bool revenant_vindicator = 25; - if (this->revenant_vindicator() != 0) { - total_size += 2 + 1; - } - - // bool thief_specter = 26; - if (this->thief_specter() != 0) { - total_size += 2 + 1; - } - - // bool warrior_bladesworn = 27; - if (this->warrior_bladesworn() != 0) { - total_size += 2 + 1; - } - - // bool elementalist_air = 28; - if (this->elementalist_air() != 0) { - total_size += 2 + 1; - } - - // bool elementalist_arcane = 29; - if (this->elementalist_arcane() != 0) { - total_size += 2 + 1; - } - - // bool elementalist_earth = 30; - if (this->elementalist_earth() != 0) { - total_size += 2 + 1; - } - - // bool elementalist_fire = 31; - if (this->elementalist_fire() != 0) { - total_size += 2 + 1; - } - - // bool elementalist_water = 32; - if (this->elementalist_water() != 0) { - total_size += 2 + 1; - } - - // bool engineer_alchemy = 33; - if (this->engineer_alchemy() != 0) { - total_size += 2 + 1; - } - - // bool engineer_explosives = 34; - if (this->engineer_explosives() != 0) { - total_size += 2 + 1; - } - - // bool engineer_firearms = 35; - if (this->engineer_firearms() != 0) { - total_size += 2 + 1; - } - - // bool engineer_inventions = 36; - if (this->engineer_inventions() != 0) { - total_size += 2 + 1; - } - - // bool engineer_tools = 37; - if (this->engineer_tools() != 0) { - total_size += 2 + 1; - } - - // bool guardian_honor = 38; - if (this->guardian_honor() != 0) { - total_size += 2 + 1; - } - - // bool guardian_radiance = 39; - if (this->guardian_radiance() != 0) { - total_size += 2 + 1; - } - - // bool guardian_valor = 40; - if (this->guardian_valor() != 0) { - total_size += 2 + 1; - } - - // bool guardian_virtues = 41; - if (this->guardian_virtues() != 0) { - total_size += 2 + 1; - } - - // bool guardian_zeal = 42; - if (this->guardian_zeal() != 0) { - total_size += 2 + 1; - } - - // bool mesmer_chaos = 43; - if (this->mesmer_chaos() != 0) { - total_size += 2 + 1; - } - - // bool mesmer_domination = 44; - if (this->mesmer_domination() != 0) { - total_size += 2 + 1; - } - - // bool mesmer_dueling = 45; - if (this->mesmer_dueling() != 0) { - total_size += 2 + 1; - } - - // bool mesmer_illusions = 46; - if (this->mesmer_illusions() != 0) { - total_size += 2 + 1; - } - - // bool mesmer_inspiration = 47; - if (this->mesmer_inspiration() != 0) { - total_size += 2 + 1; - } - - // bool necromancer_blood_magic = 48; - if (this->necromancer_blood_magic() != 0) { - total_size += 2 + 1; - } - - // bool necromancer_curses = 49; - if (this->necromancer_curses() != 0) { - total_size += 2 + 1; - } - - // bool necromancer_death_magic = 50; - if (this->necromancer_death_magic() != 0) { - total_size += 2 + 1; - } - - // bool necromancer_soul_reaping = 51; - if (this->necromancer_soul_reaping() != 0) { - total_size += 2 + 1; - } - - // bool necromancer_spite = 52; - if (this->necromancer_spite() != 0) { - total_size += 2 + 1; - } - - // bool ranger_beastmastery = 53; - if (this->ranger_beastmastery() != 0) { - total_size += 2 + 1; - } - - // bool ranger_marksmanship = 54; - if (this->ranger_marksmanship() != 0) { - total_size += 2 + 1; - } - - // bool ranger_nature_magic = 55; - if (this->ranger_nature_magic() != 0) { - total_size += 2 + 1; - } - - // bool ranger_skirmishing = 56; - if (this->ranger_skirmishing() != 0) { - total_size += 2 + 1; - } - - // bool ranger_wilderness_survival = 57; - if (this->ranger_wilderness_survival() != 0) { - total_size += 2 + 1; - } - - // bool revenant_corruption = 58; - if (this->revenant_corruption() != 0) { - total_size += 2 + 1; - } - - // bool revenant_devastation = 59; - if (this->revenant_devastation() != 0) { - total_size += 2 + 1; - } - - // bool revenant_invocation = 60; - if (this->revenant_invocation() != 0) { - total_size += 2 + 1; - } - - // bool revenant_retribution = 61; - if (this->revenant_retribution() != 0) { - total_size += 2 + 1; - } - - // bool revenant_salvation = 62; - if (this->revenant_salvation() != 0) { - total_size += 2 + 1; - } - - // bool thief_acrobatics = 63; - if (this->thief_acrobatics() != 0) { - total_size += 2 + 1; - } - - // bool thief_critical_strikes = 64; - if (this->thief_critical_strikes() != 0) { - total_size += 2 + 1; - } - - // bool thief_deadly_arts = 65; - if (this->thief_deadly_arts() != 0) { - total_size += 2 + 1; - } - - // bool thief_shadow_arts = 66; - if (this->thief_shadow_arts() != 0) { - total_size += 2 + 1; - } - - // bool thief_trickery = 67; - if (this->thief_trickery() != 0) { - total_size += 2 + 1; - } - - // bool warrior_arms = 68; - if (this->warrior_arms() != 0) { - total_size += 2 + 1; - } - - // bool warrior_defense = 69; - if (this->warrior_defense() != 0) { - total_size += 2 + 1; - } - - // bool warrior_discipline = 70; - if (this->warrior_discipline() != 0) { - total_size += 2 + 1; - } - - // bool warrior_strength = 71; - if (this->warrior_strength() != 0) { - total_size += 2 + 1; - } - - // bool warrior_tactics = 72; - if (this->warrior_tactics() != 0) { - total_size += 2 + 1; - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( - _internal_metadata_, total_size, &_cached_size_); - } - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} - -void SpecializationFilter::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:waypoint.SpecializationFilter) - GOOGLE_DCHECK_NE(&from, this); - const SpecializationFilter* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:waypoint.SpecializationFilter) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:waypoint.SpecializationFilter) - MergeFrom(*source); - } -} - -void SpecializationFilter::MergeFrom(const SpecializationFilter& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:waypoint.SpecializationFilter) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - if (from.elementalist_tempest() != 0) { - _internal_set_elementalist_tempest(from._internal_elementalist_tempest()); - } - if (from.engineer_scrapper() != 0) { - _internal_set_engineer_scrapper(from._internal_engineer_scrapper()); - } - if (from.guardian_dragonhunter() != 0) { - _internal_set_guardian_dragonhunter(from._internal_guardian_dragonhunter()); - } - if (from.mesmer_chronomancer() != 0) { - _internal_set_mesmer_chronomancer(from._internal_mesmer_chronomancer()); - } - if (from.necromancer_reaper() != 0) { - _internal_set_necromancer_reaper(from._internal_necromancer_reaper()); - } - if (from.ranger_druid() != 0) { - _internal_set_ranger_druid(from._internal_ranger_druid()); - } - if (from.revenant_herald() != 0) { - _internal_set_revenant_herald(from._internal_revenant_herald()); - } - if (from.thief_daredevil() != 0) { - _internal_set_thief_daredevil(from._internal_thief_daredevil()); - } - if (from.warrior_berserker() != 0) { - _internal_set_warrior_berserker(from._internal_warrior_berserker()); - } - if (from.elementalist_weaver() != 0) { - _internal_set_elementalist_weaver(from._internal_elementalist_weaver()); - } - if (from.engineer_holosmith() != 0) { - _internal_set_engineer_holosmith(from._internal_engineer_holosmith()); - } - if (from.guardian_firebrand() != 0) { - _internal_set_guardian_firebrand(from._internal_guardian_firebrand()); - } - if (from.mesmer_mirage() != 0) { - _internal_set_mesmer_mirage(from._internal_mesmer_mirage()); - } - if (from.necromancer_scourge() != 0) { - _internal_set_necromancer_scourge(from._internal_necromancer_scourge()); - } - if (from.ranger_soulbeast() != 0) { - _internal_set_ranger_soulbeast(from._internal_ranger_soulbeast()); - } - if (from.revenant_renegade() != 0) { - _internal_set_revenant_renegade(from._internal_revenant_renegade()); - } - if (from.thief_deadeye() != 0) { - _internal_set_thief_deadeye(from._internal_thief_deadeye()); - } - if (from.warrior_spellbreaker() != 0) { - _internal_set_warrior_spellbreaker(from._internal_warrior_spellbreaker()); - } - if (from.elmentalist_catalyst() != 0) { - _internal_set_elmentalist_catalyst(from._internal_elmentalist_catalyst()); - } - if (from.engineer_mechanist() != 0) { - _internal_set_engineer_mechanist(from._internal_engineer_mechanist()); - } - if (from.guardian_willbender() != 0) { - _internal_set_guardian_willbender(from._internal_guardian_willbender()); - } - if (from.mesmer_virtuoso() != 0) { - _internal_set_mesmer_virtuoso(from._internal_mesmer_virtuoso()); - } - if (from.necromancer_harbinger() != 0) { - _internal_set_necromancer_harbinger(from._internal_necromancer_harbinger()); - } - if (from.ranger_untamed() != 0) { - _internal_set_ranger_untamed(from._internal_ranger_untamed()); - } - if (from.revenant_vindicator() != 0) { - _internal_set_revenant_vindicator(from._internal_revenant_vindicator()); - } - if (from.thief_specter() != 0) { - _internal_set_thief_specter(from._internal_thief_specter()); - } - if (from.warrior_bladesworn() != 0) { - _internal_set_warrior_bladesworn(from._internal_warrior_bladesworn()); - } - if (from.elementalist_air() != 0) { - _internal_set_elementalist_air(from._internal_elementalist_air()); - } - if (from.elementalist_arcane() != 0) { - _internal_set_elementalist_arcane(from._internal_elementalist_arcane()); - } - if (from.elementalist_earth() != 0) { - _internal_set_elementalist_earth(from._internal_elementalist_earth()); - } - if (from.elementalist_fire() != 0) { - _internal_set_elementalist_fire(from._internal_elementalist_fire()); - } - if (from.elementalist_water() != 0) { - _internal_set_elementalist_water(from._internal_elementalist_water()); - } - if (from.engineer_alchemy() != 0) { - _internal_set_engineer_alchemy(from._internal_engineer_alchemy()); - } - if (from.engineer_explosives() != 0) { - _internal_set_engineer_explosives(from._internal_engineer_explosives()); - } - if (from.engineer_firearms() != 0) { - _internal_set_engineer_firearms(from._internal_engineer_firearms()); - } - if (from.engineer_inventions() != 0) { - _internal_set_engineer_inventions(from._internal_engineer_inventions()); - } - if (from.engineer_tools() != 0) { - _internal_set_engineer_tools(from._internal_engineer_tools()); - } - if (from.guardian_honor() != 0) { - _internal_set_guardian_honor(from._internal_guardian_honor()); - } - if (from.guardian_radiance() != 0) { - _internal_set_guardian_radiance(from._internal_guardian_radiance()); - } - if (from.guardian_valor() != 0) { - _internal_set_guardian_valor(from._internal_guardian_valor()); - } - if (from.guardian_virtues() != 0) { - _internal_set_guardian_virtues(from._internal_guardian_virtues()); - } - if (from.guardian_zeal() != 0) { - _internal_set_guardian_zeal(from._internal_guardian_zeal()); - } - if (from.mesmer_chaos() != 0) { - _internal_set_mesmer_chaos(from._internal_mesmer_chaos()); - } - if (from.mesmer_domination() != 0) { - _internal_set_mesmer_domination(from._internal_mesmer_domination()); - } - if (from.mesmer_dueling() != 0) { - _internal_set_mesmer_dueling(from._internal_mesmer_dueling()); - } - if (from.mesmer_illusions() != 0) { - _internal_set_mesmer_illusions(from._internal_mesmer_illusions()); - } - if (from.mesmer_inspiration() != 0) { - _internal_set_mesmer_inspiration(from._internal_mesmer_inspiration()); - } - if (from.necromancer_blood_magic() != 0) { - _internal_set_necromancer_blood_magic(from._internal_necromancer_blood_magic()); - } - if (from.necromancer_curses() != 0) { - _internal_set_necromancer_curses(from._internal_necromancer_curses()); - } - if (from.necromancer_death_magic() != 0) { - _internal_set_necromancer_death_magic(from._internal_necromancer_death_magic()); - } - if (from.necromancer_soul_reaping() != 0) { - _internal_set_necromancer_soul_reaping(from._internal_necromancer_soul_reaping()); - } - if (from.necromancer_spite() != 0) { - _internal_set_necromancer_spite(from._internal_necromancer_spite()); - } - if (from.ranger_beastmastery() != 0) { - _internal_set_ranger_beastmastery(from._internal_ranger_beastmastery()); - } - if (from.ranger_marksmanship() != 0) { - _internal_set_ranger_marksmanship(from._internal_ranger_marksmanship()); - } - if (from.ranger_nature_magic() != 0) { - _internal_set_ranger_nature_magic(from._internal_ranger_nature_magic()); - } - if (from.ranger_skirmishing() != 0) { - _internal_set_ranger_skirmishing(from._internal_ranger_skirmishing()); - } - if (from.ranger_wilderness_survival() != 0) { - _internal_set_ranger_wilderness_survival(from._internal_ranger_wilderness_survival()); - } - if (from.revenant_corruption() != 0) { - _internal_set_revenant_corruption(from._internal_revenant_corruption()); - } - if (from.revenant_devastation() != 0) { - _internal_set_revenant_devastation(from._internal_revenant_devastation()); - } - if (from.revenant_invocation() != 0) { - _internal_set_revenant_invocation(from._internal_revenant_invocation()); - } - if (from.revenant_retribution() != 0) { - _internal_set_revenant_retribution(from._internal_revenant_retribution()); - } - if (from.revenant_salvation() != 0) { - _internal_set_revenant_salvation(from._internal_revenant_salvation()); - } - if (from.thief_acrobatics() != 0) { - _internal_set_thief_acrobatics(from._internal_thief_acrobatics()); - } - if (from.thief_critical_strikes() != 0) { - _internal_set_thief_critical_strikes(from._internal_thief_critical_strikes()); - } - if (from.thief_deadly_arts() != 0) { - _internal_set_thief_deadly_arts(from._internal_thief_deadly_arts()); - } - if (from.thief_shadow_arts() != 0) { - _internal_set_thief_shadow_arts(from._internal_thief_shadow_arts()); - } - if (from.thief_trickery() != 0) { - _internal_set_thief_trickery(from._internal_thief_trickery()); - } - if (from.warrior_arms() != 0) { - _internal_set_warrior_arms(from._internal_warrior_arms()); - } - if (from.warrior_defense() != 0) { - _internal_set_warrior_defense(from._internal_warrior_defense()); - } - if (from.warrior_discipline() != 0) { - _internal_set_warrior_discipline(from._internal_warrior_discipline()); - } - if (from.warrior_strength() != 0) { - _internal_set_warrior_strength(from._internal_warrior_strength()); - } - if (from.warrior_tactics() != 0) { - _internal_set_warrior_tactics(from._internal_warrior_tactics()); - } -} - -void SpecializationFilter::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:waypoint.SpecializationFilter) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void SpecializationFilter::CopyFrom(const SpecializationFilter& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:waypoint.SpecializationFilter) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool SpecializationFilter::IsInitialized() const { - return true; -} - -void SpecializationFilter::InternalSwap(SpecializationFilter* other) { - using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(SpecializationFilter, warrior_tactics_) - + sizeof(SpecializationFilter::warrior_tactics_) - - PROTOBUF_FIELD_OFFSET(SpecializationFilter, elementalist_tempest_)>( - reinterpret_cast(&elementalist_tempest_), - reinterpret_cast(&other->elementalist_tempest_)); -} - -::PROTOBUF_NAMESPACE_ID::Metadata SpecializationFilter::GetMetadata() const { - return GetMetadataStatic(); -} - - -// =================================================================== - -void SpeciesFilter::InitAsDefaultInstance() { -} -class SpeciesFilter::_Internal { - public: -}; - -SpeciesFilter::SpeciesFilter(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(); - RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:waypoint.SpeciesFilter) -} -SpeciesFilter::SpeciesFilter(const SpeciesFilter& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::memcpy(&asura_, &from.asura_, - static_cast(reinterpret_cast(&sylvari_) - - reinterpret_cast(&asura_)) + sizeof(sylvari_)); - // @@protoc_insertion_point(copy_constructor:waypoint.SpeciesFilter) -} - -void SpeciesFilter::SharedCtor() { - ::memset(&asura_, 0, static_cast( - reinterpret_cast(&sylvari_) - - reinterpret_cast(&asura_)) + sizeof(sylvari_)); -} - -SpeciesFilter::~SpeciesFilter() { - // @@protoc_insertion_point(destructor:waypoint.SpeciesFilter) - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -void SpeciesFilter::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); -} - -void SpeciesFilter::ArenaDtor(void* object) { - SpeciesFilter* _this = reinterpret_cast< SpeciesFilter* >(object); - (void)_this; -} -void SpeciesFilter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void SpeciesFilter::SetCachedSize(int size) const { - _cached_size_.Set(size); -} -const SpeciesFilter& SpeciesFilter::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_SpeciesFilter_waypoint_2eproto.base); - return *internal_default_instance(); -} - - -void SpeciesFilter::Clear() { -// @@protoc_insertion_point(message_clear_start:waypoint.SpeciesFilter) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - ::memset(&asura_, 0, static_cast( - reinterpret_cast(&sylvari_) - - reinterpret_cast(&asura_)) + sizeof(sylvari_)); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* SpeciesFilter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; - while (!ctx->Done(&ptr)) { - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - CHK_(ptr); - switch (tag >> 3) { - // bool asura = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - asura_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool charr = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { - charr_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool human = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { - human_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool norn = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { - norn_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // bool sylvari = 5; - case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { - sylvari_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - default: { - handle_unusual: - if ((tag & 7) == 4 || tag == 0) { - ctx->SetLastTag(tag); - goto success; - } - ptr = UnknownFieldParse(tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - continue; - } - } // switch - } // while -success: - return ptr; -failure: - ptr = nullptr; - goto success; -#undef CHK_ -} - -::PROTOBUF_NAMESPACE_ID::uint8* SpeciesFilter::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:waypoint.SpeciesFilter) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // bool asura = 1; - if (this->asura() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->_internal_asura(), target); - } - - // bool charr = 2; - if (this->charr() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_charr(), target); - } - - // bool human = 3; - if (this->human() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_human(), target); - } - - // bool norn = 4; - if (this->norn() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->_internal_norn(), target); - } - - // bool sylvari = 5; - if (this->sylvari() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->_internal_sylvari(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:waypoint.SpeciesFilter) - return target; -} - -size_t SpeciesFilter::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:waypoint.SpeciesFilter) - size_t total_size = 0; - - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // bool asura = 1; - if (this->asura() != 0) { - total_size += 1 + 1; - } - - // bool charr = 2; - if (this->charr() != 0) { - total_size += 1 + 1; - } - - // bool human = 3; - if (this->human() != 0) { - total_size += 1 + 1; - } - - // bool norn = 4; - if (this->norn() != 0) { - total_size += 1 + 1; - } - - // bool sylvari = 5; - if (this->sylvari() != 0) { - total_size += 1 + 1; - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( - _internal_metadata_, total_size, &_cached_size_); - } - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} - -void SpeciesFilter::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:waypoint.SpeciesFilter) - GOOGLE_DCHECK_NE(&from, this); - const SpeciesFilter* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:waypoint.SpeciesFilter) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:waypoint.SpeciesFilter) - MergeFrom(*source); - } -} - -void SpeciesFilter::MergeFrom(const SpeciesFilter& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:waypoint.SpeciesFilter) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - if (from.asura() != 0) { - _internal_set_asura(from._internal_asura()); - } - if (from.charr() != 0) { - _internal_set_charr(from._internal_charr()); - } - if (from.human() != 0) { - _internal_set_human(from._internal_human()); - } - if (from.norn() != 0) { - _internal_set_norn(from._internal_norn()); - } - if (from.sylvari() != 0) { - _internal_set_sylvari(from._internal_sylvari()); - } -} - -void SpeciesFilter::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:waypoint.SpeciesFilter) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void SpeciesFilter::CopyFrom(const SpeciesFilter& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:waypoint.SpeciesFilter) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool SpeciesFilter::IsInitialized() const { - return true; -} - -void SpeciesFilter::InternalSwap(SpeciesFilter* other) { - using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(SpeciesFilter, sylvari_) - + sizeof(SpeciesFilter::sylvari_) - - PROTOBUF_FIELD_OFFSET(SpeciesFilter, asura_)>( - reinterpret_cast(&asura_), - reinterpret_cast(&other->asura_)); -} - -::PROTOBUF_NAMESPACE_ID::Metadata SpeciesFilter::GetMetadata() const { - return GetMetadataStatic(); -} - - -// =================================================================== - -void TrailData::InitAsDefaultInstance() { -} -class TrailData::_Internal { - public: -}; - -TrailData::TrailData(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(); - RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:waypoint.TrailData) -} -TrailData::TrailData(const TrailData& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - trail_data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_trail_data().empty()) { - trail_data_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_trail_data(), - GetArena()); - } - // @@protoc_insertion_point(copy_constructor:waypoint.TrailData) -} - -void TrailData::SharedCtor() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_TrailData_waypoint_2eproto.base); - trail_data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -TrailData::~TrailData() { - // @@protoc_insertion_point(destructor:waypoint.TrailData) - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -void TrailData::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); - trail_data_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -void TrailData::ArenaDtor(void* object) { - TrailData* _this = reinterpret_cast< TrailData* >(object); - (void)_this; -} -void TrailData::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void TrailData::SetCachedSize(int size) const { - _cached_size_.Set(size); -} -const TrailData& TrailData::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_TrailData_waypoint_2eproto.base); - return *internal_default_instance(); -} - - -void TrailData::Clear() { -// @@protoc_insertion_point(message_clear_start:waypoint.TrailData) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - trail_data_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* TrailData::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; - while (!ctx->Done(&ptr)) { - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - CHK_(ptr); - switch (tag >> 3) { - // string trail_data = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - auto str = _internal_mutable_trail_data(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "waypoint.TrailData.trail_data")); - CHK_(ptr); - } else goto handle_unusual; - continue; - default: { - handle_unusual: - if ((tag & 7) == 4 || tag == 0) { - ctx->SetLastTag(tag); - goto success; - } - ptr = UnknownFieldParse(tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - continue; - } - } // switch - } // while -success: - return ptr; -failure: - ptr = nullptr; - goto success; -#undef CHK_ -} - -::PROTOBUF_NAMESPACE_ID::uint8* TrailData::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:waypoint.TrailData) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // string trail_data = 1; - if (this->trail_data().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_trail_data().data(), static_cast(this->_internal_trail_data().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "waypoint.TrailData.trail_data"); - target = stream->WriteStringMaybeAliased( - 1, this->_internal_trail_data(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:waypoint.TrailData) - return target; -} - -size_t TrailData::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:waypoint.TrailData) - size_t total_size = 0; - - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // string trail_data = 1; - if (this->trail_data().size() > 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_trail_data()); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( - _internal_metadata_, total_size, &_cached_size_); - } - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} - -void TrailData::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:waypoint.TrailData) - GOOGLE_DCHECK_NE(&from, this); - const TrailData* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:waypoint.TrailData) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:waypoint.TrailData) - MergeFrom(*source); - } -} - -void TrailData::MergeFrom(const TrailData& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:waypoint.TrailData) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - if (from.trail_data().size() > 0) { - _internal_set_trail_data(from._internal_trail_data()); - } -} - -void TrailData::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:waypoint.TrailData) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void TrailData::CopyFrom(const TrailData& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:waypoint.TrailData) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool TrailData::IsInitialized() const { - return true; -} - -void TrailData::InternalSwap(TrailData* other) { - using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - trail_data_.Swap(&other->trail_data_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} - -::PROTOBUF_NAMESPACE_ID::Metadata TrailData::GetMetadata() const { - return GetMetadataStatic(); -} - - -// @@protoc_insertion_point(namespace_scope) -} // namespace waypoint -PROTOBUF_NAMESPACE_OPEN -template<> PROTOBUF_NOINLINE ::waypoint::Category_ChildrenEntry_DoNotUse* Arena::CreateMaybeMessage< ::waypoint::Category_ChildrenEntry_DoNotUse >(Arena* arena) { - return Arena::CreateMessageInternal< ::waypoint::Category_ChildrenEntry_DoNotUse >(arena); -} -template<> PROTOBUF_NOINLINE ::waypoint::Category* Arena::CreateMaybeMessage< ::waypoint::Category >(Arena* arena) { - return Arena::CreateMessageInternal< ::waypoint::Category >(arena); -} -template<> PROTOBUF_NOINLINE ::waypoint::Icon* Arena::CreateMaybeMessage< ::waypoint::Icon >(Arena* arena) { - return Arena::CreateMessageInternal< ::waypoint::Icon >(arena); -} -template<> PROTOBUF_NOINLINE ::waypoint::Trail* Arena::CreateMaybeMessage< ::waypoint::Trail >(Arena* arena) { - return Arena::CreateMessageInternal< ::waypoint::Trail >(arena); -} -template<> PROTOBUF_NOINLINE ::waypoint::Texture* Arena::CreateMaybeMessage< ::waypoint::Texture >(Arena* arena) { - return Arena::CreateMessageInternal< ::waypoint::Texture >(arena); -} -template<> PROTOBUF_NOINLINE ::waypoint::Position* Arena::CreateMaybeMessage< ::waypoint::Position >(Arena* arena) { - return Arena::CreateMessageInternal< ::waypoint::Position >(arena); -} -template<> PROTOBUF_NOINLINE ::waypoint::EulerRotation* Arena::CreateMaybeMessage< ::waypoint::EulerRotation >(Arena* arena) { - return Arena::CreateMessageInternal< ::waypoint::EulerRotation >(arena); -} -template<> PROTOBUF_NOINLINE ::waypoint::Trigger* Arena::CreateMaybeMessage< ::waypoint::Trigger >(Arena* arena) { - return Arena::CreateMessageInternal< ::waypoint::Trigger >(arena); -} -template<> PROTOBUF_NOINLINE ::waypoint::GUID* Arena::CreateMaybeMessage< ::waypoint::GUID >(Arena* arena) { - return Arena::CreateMessageInternal< ::waypoint::GUID >(arena); -} -template<> PROTOBUF_NOINLINE ::waypoint::Color* Arena::CreateMaybeMessage< ::waypoint::Color >(Arena* arena) { - return Arena::CreateMessageInternal< ::waypoint::Color >(arena); -} -template<> PROTOBUF_NOINLINE ::waypoint::FestivalFilter* Arena::CreateMaybeMessage< ::waypoint::FestivalFilter >(Arena* arena) { - return Arena::CreateMessageInternal< ::waypoint::FestivalFilter >(arena); -} -template<> PROTOBUF_NOINLINE ::waypoint::MapTypeFilter* Arena::CreateMaybeMessage< ::waypoint::MapTypeFilter >(Arena* arena) { - return Arena::CreateMessageInternal< ::waypoint::MapTypeFilter >(arena); -} -template<> PROTOBUF_NOINLINE ::waypoint::MountFilter* Arena::CreateMaybeMessage< ::waypoint::MountFilter >(Arena* arena) { - return Arena::CreateMessageInternal< ::waypoint::MountFilter >(arena); -} -template<> PROTOBUF_NOINLINE ::waypoint::ProfessionFilter* Arena::CreateMaybeMessage< ::waypoint::ProfessionFilter >(Arena* arena) { - return Arena::CreateMessageInternal< ::waypoint::ProfessionFilter >(arena); -} -template<> PROTOBUF_NOINLINE ::waypoint::SpecializationFilter* Arena::CreateMaybeMessage< ::waypoint::SpecializationFilter >(Arena* arena) { - return Arena::CreateMessageInternal< ::waypoint::SpecializationFilter >(arena); -} -template<> PROTOBUF_NOINLINE ::waypoint::SpeciesFilter* Arena::CreateMaybeMessage< ::waypoint::SpeciesFilter >(Arena* arena) { - return Arena::CreateMessageInternal< ::waypoint::SpeciesFilter >(arena); -} -template<> PROTOBUF_NOINLINE ::waypoint::TrailData* Arena::CreateMaybeMessage< ::waypoint::TrailData >(Arena* arena) { - return Arena::CreateMessageInternal< ::waypoint::TrailData >(arena); -} -PROTOBUF_NAMESPACE_CLOSE - -// @@protoc_insertion_point(global_scope) -#include diff --git a/xml_converter/src/waypoint.pb.h b/xml_converter/src/waypoint.pb.h deleted file mode 100644 index d629cd43..00000000 --- a/xml_converter/src/waypoint.pb.h +++ /dev/null @@ -1,11143 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: waypoint.proto - -#ifndef GOOGLE_PROTOBUF_INCLUDED_waypoint_2eproto -#define GOOGLE_PROTOBUF_INCLUDED_waypoint_2eproto - -#include -#include - -#include -#if PROTOBUF_VERSION < 3012000 -#error This file was generated by a newer version of protoc which is -#error incompatible with your Protocol Buffer headers. Please update -#error your headers. -#endif -#if 3012004 < PROTOBUF_MIN_PROTOC_VERSION -#error This file was generated by an older version of protoc which is -#error incompatible with your Protocol Buffer headers. Please -#error regenerate this file with a newer version of protoc. -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include // IWYU pragma: export -#include // IWYU pragma: export -#include // IWYU pragma: export -#include -#include -#include -#include -// @@protoc_insertion_point(includes) -#include -#define PROTOBUF_INTERNAL_EXPORT_waypoint_2eproto -PROTOBUF_NAMESPACE_OPEN -namespace internal { -class AnyMetadata; -} // namespace internal -PROTOBUF_NAMESPACE_CLOSE - -// Internal implementation detail -- do not use these members. -struct TableStruct_waypoint_2eproto { - static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] - PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[] - PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[17] - PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; - static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; - static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[]; -}; -extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_waypoint_2eproto; -namespace waypoint { -class Category; -class CategoryDefaultTypeInternal; -extern CategoryDefaultTypeInternal _Category_default_instance_; -class Category_ChildrenEntry_DoNotUse; -class Category_ChildrenEntry_DoNotUseDefaultTypeInternal; -extern Category_ChildrenEntry_DoNotUseDefaultTypeInternal _Category_ChildrenEntry_DoNotUse_default_instance_; -class Color; -class ColorDefaultTypeInternal; -extern ColorDefaultTypeInternal _Color_default_instance_; -class EulerRotation; -class EulerRotationDefaultTypeInternal; -extern EulerRotationDefaultTypeInternal _EulerRotation_default_instance_; -class FestivalFilter; -class FestivalFilterDefaultTypeInternal; -extern FestivalFilterDefaultTypeInternal _FestivalFilter_default_instance_; -class GUID; -class GUIDDefaultTypeInternal; -extern GUIDDefaultTypeInternal _GUID_default_instance_; -class Icon; -class IconDefaultTypeInternal; -extern IconDefaultTypeInternal _Icon_default_instance_; -class MapTypeFilter; -class MapTypeFilterDefaultTypeInternal; -extern MapTypeFilterDefaultTypeInternal _MapTypeFilter_default_instance_; -class MountFilter; -class MountFilterDefaultTypeInternal; -extern MountFilterDefaultTypeInternal _MountFilter_default_instance_; -class Position; -class PositionDefaultTypeInternal; -extern PositionDefaultTypeInternal _Position_default_instance_; -class ProfessionFilter; -class ProfessionFilterDefaultTypeInternal; -extern ProfessionFilterDefaultTypeInternal _ProfessionFilter_default_instance_; -class SpecializationFilter; -class SpecializationFilterDefaultTypeInternal; -extern SpecializationFilterDefaultTypeInternal _SpecializationFilter_default_instance_; -class SpeciesFilter; -class SpeciesFilterDefaultTypeInternal; -extern SpeciesFilterDefaultTypeInternal _SpeciesFilter_default_instance_; -class Texture; -class TextureDefaultTypeInternal; -extern TextureDefaultTypeInternal _Texture_default_instance_; -class Trail; -class TrailDefaultTypeInternal; -extern TrailDefaultTypeInternal _Trail_default_instance_; -class TrailData; -class TrailDataDefaultTypeInternal; -extern TrailDataDefaultTypeInternal _TrailData_default_instance_; -class Trigger; -class TriggerDefaultTypeInternal; -extern TriggerDefaultTypeInternal _Trigger_default_instance_; -} // namespace waypoint -PROTOBUF_NAMESPACE_OPEN -template<> ::waypoint::Category* Arena::CreateMaybeMessage<::waypoint::Category>(Arena*); -template<> ::waypoint::Category_ChildrenEntry_DoNotUse* Arena::CreateMaybeMessage<::waypoint::Category_ChildrenEntry_DoNotUse>(Arena*); -template<> ::waypoint::Color* Arena::CreateMaybeMessage<::waypoint::Color>(Arena*); -template<> ::waypoint::EulerRotation* Arena::CreateMaybeMessage<::waypoint::EulerRotation>(Arena*); -template<> ::waypoint::FestivalFilter* Arena::CreateMaybeMessage<::waypoint::FestivalFilter>(Arena*); -template<> ::waypoint::GUID* Arena::CreateMaybeMessage<::waypoint::GUID>(Arena*); -template<> ::waypoint::Icon* Arena::CreateMaybeMessage<::waypoint::Icon>(Arena*); -template<> ::waypoint::MapTypeFilter* Arena::CreateMaybeMessage<::waypoint::MapTypeFilter>(Arena*); -template<> ::waypoint::MountFilter* Arena::CreateMaybeMessage<::waypoint::MountFilter>(Arena*); -template<> ::waypoint::Position* Arena::CreateMaybeMessage<::waypoint::Position>(Arena*); -template<> ::waypoint::ProfessionFilter* Arena::CreateMaybeMessage<::waypoint::ProfessionFilter>(Arena*); -template<> ::waypoint::SpecializationFilter* Arena::CreateMaybeMessage<::waypoint::SpecializationFilter>(Arena*); -template<> ::waypoint::SpeciesFilter* Arena::CreateMaybeMessage<::waypoint::SpeciesFilter>(Arena*); -template<> ::waypoint::Texture* Arena::CreateMaybeMessage<::waypoint::Texture>(Arena*); -template<> ::waypoint::Trail* Arena::CreateMaybeMessage<::waypoint::Trail>(Arena*); -template<> ::waypoint::TrailData* Arena::CreateMaybeMessage<::waypoint::TrailData>(Arena*); -template<> ::waypoint::Trigger* Arena::CreateMaybeMessage<::waypoint::Trigger>(Arena*); -PROTOBUF_NAMESPACE_CLOSE -namespace waypoint { - -enum CullChirality : int { - none = 0, - clockwise = 1, - counter_clockwise = 2, - CullChirality_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(), - CullChirality_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max() -}; -bool CullChirality_IsValid(int value); -constexpr CullChirality CullChirality_MIN = none; -constexpr CullChirality CullChirality_MAX = counter_clockwise; -constexpr int CullChirality_ARRAYSIZE = CullChirality_MAX + 1; - -const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* CullChirality_descriptor(); -template -inline const std::string& CullChirality_Name(T enum_t_value) { - static_assert(::std::is_same::value || - ::std::is_integral::value, - "Incorrect type passed to function CullChirality_Name."); - return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( - CullChirality_descriptor(), enum_t_value); -} -inline bool CullChirality_Parse( - const std::string& name, CullChirality* value) { - return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( - CullChirality_descriptor(), name, value); -} -enum ResetBehavior : int { - always_visible = 0, - map_change = 1, - daily_reset = 2, - never = 3, - timer = 4, - map_reset = 5, - instance_change = 6, - daily_reset_per_character = 7, - weekly_reset = 8, - ResetBehavior_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(), - ResetBehavior_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max() -}; -bool ResetBehavior_IsValid(int value); -constexpr ResetBehavior ResetBehavior_MIN = always_visible; -constexpr ResetBehavior ResetBehavior_MAX = weekly_reset; -constexpr int ResetBehavior_ARRAYSIZE = ResetBehavior_MAX + 1; - -const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ResetBehavior_descriptor(); -template -inline const std::string& ResetBehavior_Name(T enum_t_value) { - static_assert(::std::is_same::value || - ::std::is_integral::value, - "Incorrect type passed to function ResetBehavior_Name."); - return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( - ResetBehavior_descriptor(), enum_t_value); -} -inline bool ResetBehavior_Parse( - const std::string& name, ResetBehavior* value) { - return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( - ResetBehavior_descriptor(), name, value); -} -// =================================================================== - -class Category_ChildrenEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { -public: - typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; - Category_ChildrenEntry_DoNotUse(); - Category_ChildrenEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); - void MergeFrom(const Category_ChildrenEntry_DoNotUse& other); - static const Category_ChildrenEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_Category_ChildrenEntry_DoNotUse_default_instance_); } - static bool ValidateKey(std::string* s) { - return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "waypoint.Category.ChildrenEntry.key"); - } - static bool ValidateValue(void*) { return true; } - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& other) final; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - private: - static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_waypoint_2eproto); - return ::descriptor_table_waypoint_2eproto.file_level_metadata[0]; - } - - public: -}; - -// ------------------------------------------------------------------- - -class Category PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:waypoint.Category) */ { - public: - inline Category() : Category(nullptr) {}; - virtual ~Category(); - - Category(const Category& from); - Category(Category&& from) noexcept - : Category() { - *this = ::std::move(from); - } - - inline Category& operator=(const Category& from) { - CopyFrom(from); - return *this; - } - inline Category& operator=(Category&& from) noexcept { - if (GetArena() == from.GetArena()) { - if (this != &from) InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return GetMetadataStatic().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return GetMetadataStatic().reflection; - } - static const Category& default_instance(); - - static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const Category* internal_default_instance() { - return reinterpret_cast( - &_Category_default_instance_); - } - static constexpr int kIndexInFileMessages = - 1; - - friend void swap(Category& a, Category& b) { - a.Swap(&b); - } - inline void Swap(Category* other) { - if (other == this) return; - if (GetArena() == other->GetArena()) { - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(Category* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline Category* New() const final { - return CreateMaybeMessage(nullptr); - } - - Category* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const Category& from); - void MergeFrom(const Category& from); - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - inline void SharedCtor(); - inline void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(Category* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "waypoint.Category"; - } - protected: - explicit Category(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - public: - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - private: - static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_waypoint_2eproto); - return ::descriptor_table_waypoint_2eproto.file_level_metadata[kIndexInFileMessages]; - } - - public: - - // nested types ---------------------------------------------------- - - - // accessors ------------------------------------------------------- - - enum : int { - kChildrenFieldNumber = 6, - kDisplayNameFieldNumber = 2, - kNameFieldNumber = 4, - kTooltipNameFieldNumber = 5, - kDefaultVisibilityFieldNumber = 1, - kIsSeparatorFieldNumber = 3, - }; - // map children = 6; - int children_size() const; - private: - int _internal_children_size() const; - public: - void clear_children(); - private: - const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::waypoint::Category >& - _internal_children() const; - ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::waypoint::Category >* - _internal_mutable_children(); - public: - const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::waypoint::Category >& - children() const; - ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::waypoint::Category >* - mutable_children(); - - // string display_name = 2; - void clear_display_name(); - const std::string& display_name() const; - void set_display_name(const std::string& value); - void set_display_name(std::string&& value); - void set_display_name(const char* value); - void set_display_name(const char* value, size_t size); - std::string* mutable_display_name(); - std::string* release_display_name(); - void set_allocated_display_name(std::string* display_name); - GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" - " string fields are deprecated and will be removed in a" - " future release.") - std::string* unsafe_arena_release_display_name(); - GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" - " string fields are deprecated and will be removed in a" - " future release.") - void unsafe_arena_set_allocated_display_name( - std::string* display_name); - private: - const std::string& _internal_display_name() const; - void _internal_set_display_name(const std::string& value); - std::string* _internal_mutable_display_name(); - public: - - // string name = 4; - void clear_name(); - const std::string& name() const; - void set_name(const std::string& value); - void set_name(std::string&& value); - void set_name(const char* value); - void set_name(const char* value, size_t size); - std::string* mutable_name(); - std::string* release_name(); - void set_allocated_name(std::string* name); - GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" - " string fields are deprecated and will be removed in a" - " future release.") - std::string* unsafe_arena_release_name(); - GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" - " string fields are deprecated and will be removed in a" - " future release.") - void unsafe_arena_set_allocated_name( - std::string* name); - private: - const std::string& _internal_name() const; - void _internal_set_name(const std::string& value); - std::string* _internal_mutable_name(); - public: - - // string tooltip_name = 5; - void clear_tooltip_name(); - const std::string& tooltip_name() const; - void set_tooltip_name(const std::string& value); - void set_tooltip_name(std::string&& value); - void set_tooltip_name(const char* value); - void set_tooltip_name(const char* value, size_t size); - std::string* mutable_tooltip_name(); - std::string* release_tooltip_name(); - void set_allocated_tooltip_name(std::string* tooltip_name); - GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" - " string fields are deprecated and will be removed in a" - " future release.") - std::string* unsafe_arena_release_tooltip_name(); - GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" - " string fields are deprecated and will be removed in a" - " future release.") - void unsafe_arena_set_allocated_tooltip_name( - std::string* tooltip_name); - private: - const std::string& _internal_tooltip_name() const; - void _internal_set_tooltip_name(const std::string& value); - std::string* _internal_mutable_tooltip_name(); - public: - - // bool default_visibility = 1; - void clear_default_visibility(); - bool default_visibility() const; - void set_default_visibility(bool value); - private: - bool _internal_default_visibility() const; - void _internal_set_default_visibility(bool value); - public: - - // bool is_separator = 3; - void clear_is_separator(); - bool is_separator() const; - void set_is_separator(bool value); - private: - bool _internal_is_separator() const; - void _internal_set_is_separator(bool value); - public: - - // @@protoc_insertion_point(class_scope:waypoint.Category) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::MapField< - Category_ChildrenEntry_DoNotUse, - std::string, ::waypoint::Category, - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE, - 0 > children_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr display_name_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr tooltip_name_; - bool default_visibility_; - bool is_separator_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_waypoint_2eproto; -}; -// ------------------------------------------------------------------- - -class Icon PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:waypoint.Icon) */ { - public: - inline Icon() : Icon(nullptr) {}; - virtual ~Icon(); - - Icon(const Icon& from); - Icon(Icon&& from) noexcept - : Icon() { - *this = ::std::move(from); - } - - inline Icon& operator=(const Icon& from) { - CopyFrom(from); - return *this; - } - inline Icon& operator=(Icon&& from) noexcept { - if (GetArena() == from.GetArena()) { - if (this != &from) InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return GetMetadataStatic().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return GetMetadataStatic().reflection; - } - static const Icon& default_instance(); - - static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const Icon* internal_default_instance() { - return reinterpret_cast( - &_Icon_default_instance_); - } - static constexpr int kIndexInFileMessages = - 2; - - friend void swap(Icon& a, Icon& b) { - a.Swap(&b); - } - inline void Swap(Icon* other) { - if (other == this) return; - if (GetArena() == other->GetArena()) { - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(Icon* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline Icon* New() const final { - return CreateMaybeMessage(nullptr); - } - - Icon* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const Icon& from); - void MergeFrom(const Icon& from); - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - inline void SharedCtor(); - inline void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(Icon* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "waypoint.Icon"; - } - protected: - explicit Icon(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - public: - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - private: - static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_waypoint_2eproto); - return ::descriptor_table_waypoint_2eproto.file_level_metadata[kIndexInFileMessages]; - } - - public: - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kTipDescriptionFieldNumber = 24, - kTipNameFieldNumber = 25, - kBhdraftScheduleFieldNumber = 2052, - kCategoryFieldNumber = 1, - kTextureFieldNumber = 2, - kGuidFieldNumber = 3, - kPositionFieldNumber = 8, - kTriggerFieldNumber = 10, - kMapIdFieldNumber = 4, - kDistanceFadeEndFieldNumber = 5, - kDistanceFadeStartFieldNumber = 6, - kHeightOffsetFieldNumber = 7, - kResetBehaviorFieldNumber = 9, - kAchievementBitFieldNumber = 16, - kAchievementIdFieldNumber = 17, - kAlphaFieldNumber = 18, - kMinimumSizeOnScreenFieldNumber = 20, - kMapDisplaySizeFieldNumber = 21, - kBhdraftScheduleDurationFieldNumber = 2053, - kMaximumSizeOnScreenFieldNumber = 22, - kCanFadeFieldNumber = 19, - kScaleOnMapWithZoomFieldNumber = 23, - kTentativeRenderIngameFieldNumber = 2049, - kTentativeRenderOnMapFieldNumber = 2050, - kTentativeScaleFieldNumber = 2048, - kTentativeRenderOnMinimapFieldNumber = 2051, - }; - // string tip_description = 24; - void clear_tip_description(); - const std::string& tip_description() const; - void set_tip_description(const std::string& value); - void set_tip_description(std::string&& value); - void set_tip_description(const char* value); - void set_tip_description(const char* value, size_t size); - std::string* mutable_tip_description(); - std::string* release_tip_description(); - void set_allocated_tip_description(std::string* tip_description); - GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" - " string fields are deprecated and will be removed in a" - " future release.") - std::string* unsafe_arena_release_tip_description(); - GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" - " string fields are deprecated and will be removed in a" - " future release.") - void unsafe_arena_set_allocated_tip_description( - std::string* tip_description); - private: - const std::string& _internal_tip_description() const; - void _internal_set_tip_description(const std::string& value); - std::string* _internal_mutable_tip_description(); - public: - - // string tip_name = 25; - void clear_tip_name(); - const std::string& tip_name() const; - void set_tip_name(const std::string& value); - void set_tip_name(std::string&& value); - void set_tip_name(const char* value); - void set_tip_name(const char* value, size_t size); - std::string* mutable_tip_name(); - std::string* release_tip_name(); - void set_allocated_tip_name(std::string* tip_name); - GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" - " string fields are deprecated and will be removed in a" - " future release.") - std::string* unsafe_arena_release_tip_name(); - GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" - " string fields are deprecated and will be removed in a" - " future release.") - void unsafe_arena_set_allocated_tip_name( - std::string* tip_name); - private: - const std::string& _internal_tip_name() const; - void _internal_set_tip_name(const std::string& value); - std::string* _internal_mutable_tip_name(); - public: - - // string bhdraft__schedule = 2052; - void clear_bhdraft__schedule(); - const std::string& bhdraft__schedule() const; - void set_bhdraft__schedule(const std::string& value); - void set_bhdraft__schedule(std::string&& value); - void set_bhdraft__schedule(const char* value); - void set_bhdraft__schedule(const char* value, size_t size); - std::string* mutable_bhdraft__schedule(); - std::string* release_bhdraft__schedule(); - void set_allocated_bhdraft__schedule(std::string* bhdraft__schedule); - GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" - " string fields are deprecated and will be removed in a" - " future release.") - std::string* unsafe_arena_release_bhdraft__schedule(); - GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" - " string fields are deprecated and will be removed in a" - " future release.") - void unsafe_arena_set_allocated_bhdraft__schedule( - std::string* bhdraft__schedule); - private: - const std::string& _internal_bhdraft__schedule() const; - void _internal_set_bhdraft__schedule(const std::string& value); - std::string* _internal_mutable_bhdraft__schedule(); - public: - - // .waypoint.Category category = 1; - bool has_category() const; - private: - bool _internal_has_category() const; - public: - void clear_category(); - const ::waypoint::Category& category() const; - ::waypoint::Category* release_category(); - ::waypoint::Category* mutable_category(); - void set_allocated_category(::waypoint::Category* category); - private: - const ::waypoint::Category& _internal_category() const; - ::waypoint::Category* _internal_mutable_category(); - public: - void unsafe_arena_set_allocated_category( - ::waypoint::Category* category); - ::waypoint::Category* unsafe_arena_release_category(); - - // .waypoint.Texture texture = 2; - bool has_texture() const; - private: - bool _internal_has_texture() const; - public: - void clear_texture(); - const ::waypoint::Texture& texture() const; - ::waypoint::Texture* release_texture(); - ::waypoint::Texture* mutable_texture(); - void set_allocated_texture(::waypoint::Texture* texture); - private: - const ::waypoint::Texture& _internal_texture() const; - ::waypoint::Texture* _internal_mutable_texture(); - public: - void unsafe_arena_set_allocated_texture( - ::waypoint::Texture* texture); - ::waypoint::Texture* unsafe_arena_release_texture(); - - // .waypoint.GUID guid = 3; - bool has_guid() const; - private: - bool _internal_has_guid() const; - public: - void clear_guid(); - const ::waypoint::GUID& guid() const; - ::waypoint::GUID* release_guid(); - ::waypoint::GUID* mutable_guid(); - void set_allocated_guid(::waypoint::GUID* guid); - private: - const ::waypoint::GUID& _internal_guid() const; - ::waypoint::GUID* _internal_mutable_guid(); - public: - void unsafe_arena_set_allocated_guid( - ::waypoint::GUID* guid); - ::waypoint::GUID* unsafe_arena_release_guid(); - - // .waypoint.Position position = 8; - bool has_position() const; - private: - bool _internal_has_position() const; - public: - void clear_position(); - const ::waypoint::Position& position() const; - ::waypoint::Position* release_position(); - ::waypoint::Position* mutable_position(); - void set_allocated_position(::waypoint::Position* position); - private: - const ::waypoint::Position& _internal_position() const; - ::waypoint::Position* _internal_mutable_position(); - public: - void unsafe_arena_set_allocated_position( - ::waypoint::Position* position); - ::waypoint::Position* unsafe_arena_release_position(); - - // .waypoint.Trigger trigger = 10; - bool has_trigger() const; - private: - bool _internal_has_trigger() const; - public: - void clear_trigger(); - const ::waypoint::Trigger& trigger() const; - ::waypoint::Trigger* release_trigger(); - ::waypoint::Trigger* mutable_trigger(); - void set_allocated_trigger(::waypoint::Trigger* trigger); - private: - const ::waypoint::Trigger& _internal_trigger() const; - ::waypoint::Trigger* _internal_mutable_trigger(); - public: - void unsafe_arena_set_allocated_trigger( - ::waypoint::Trigger* trigger); - ::waypoint::Trigger* unsafe_arena_release_trigger(); - - // int32 map_id = 4; - void clear_map_id(); - ::PROTOBUF_NAMESPACE_ID::int32 map_id() const; - void set_map_id(::PROTOBUF_NAMESPACE_ID::int32 value); - private: - ::PROTOBUF_NAMESPACE_ID::int32 _internal_map_id() const; - void _internal_set_map_id(::PROTOBUF_NAMESPACE_ID::int32 value); - public: - - // float distance_fade_end = 5; - void clear_distance_fade_end(); - float distance_fade_end() const; - void set_distance_fade_end(float value); - private: - float _internal_distance_fade_end() const; - void _internal_set_distance_fade_end(float value); - public: - - // float distance_fade_start = 6; - void clear_distance_fade_start(); - float distance_fade_start() const; - void set_distance_fade_start(float value); - private: - float _internal_distance_fade_start() const; - void _internal_set_distance_fade_start(float value); - public: - - // float height_offset = 7; - void clear_height_offset(); - float height_offset() const; - void set_height_offset(float value); - private: - float _internal_height_offset() const; - void _internal_set_height_offset(float value); - public: - - // .waypoint.ResetBehavior reset_behavior = 9; - void clear_reset_behavior(); - ::waypoint::ResetBehavior reset_behavior() const; - void set_reset_behavior(::waypoint::ResetBehavior value); - private: - ::waypoint::ResetBehavior _internal_reset_behavior() const; - void _internal_set_reset_behavior(::waypoint::ResetBehavior value); - public: - - // fixed32 achievement_bit = 16; - void clear_achievement_bit(); - ::PROTOBUF_NAMESPACE_ID::uint32 achievement_bit() const; - void set_achievement_bit(::PROTOBUF_NAMESPACE_ID::uint32 value); - private: - ::PROTOBUF_NAMESPACE_ID::uint32 _internal_achievement_bit() const; - void _internal_set_achievement_bit(::PROTOBUF_NAMESPACE_ID::uint32 value); - public: - - // int32 achievement_id = 17; - void clear_achievement_id(); - ::PROTOBUF_NAMESPACE_ID::int32 achievement_id() const; - void set_achievement_id(::PROTOBUF_NAMESPACE_ID::int32 value); - private: - ::PROTOBUF_NAMESPACE_ID::int32 _internal_achievement_id() const; - void _internal_set_achievement_id(::PROTOBUF_NAMESPACE_ID::int32 value); - public: - - // float alpha = 18; - void clear_alpha(); - float alpha() const; - void set_alpha(float value); - private: - float _internal_alpha() const; - void _internal_set_alpha(float value); - public: - - // int32 minimum_size_on_screen = 20; - void clear_minimum_size_on_screen(); - ::PROTOBUF_NAMESPACE_ID::int32 minimum_size_on_screen() const; - void set_minimum_size_on_screen(::PROTOBUF_NAMESPACE_ID::int32 value); - private: - ::PROTOBUF_NAMESPACE_ID::int32 _internal_minimum_size_on_screen() const; - void _internal_set_minimum_size_on_screen(::PROTOBUF_NAMESPACE_ID::int32 value); - public: - - // int32 map_display_size = 21; - void clear_map_display_size(); - ::PROTOBUF_NAMESPACE_ID::int32 map_display_size() const; - void set_map_display_size(::PROTOBUF_NAMESPACE_ID::int32 value); - private: - ::PROTOBUF_NAMESPACE_ID::int32 _internal_map_display_size() const; - void _internal_set_map_display_size(::PROTOBUF_NAMESPACE_ID::int32 value); - public: - - // float bhdraft__schedule_duration = 2053; - void clear_bhdraft__schedule_duration(); - float bhdraft__schedule_duration() const; - void set_bhdraft__schedule_duration(float value); - private: - float _internal_bhdraft__schedule_duration() const; - void _internal_set_bhdraft__schedule_duration(float value); - public: - - // int32 maximum_size_on_screen = 22; - void clear_maximum_size_on_screen(); - ::PROTOBUF_NAMESPACE_ID::int32 maximum_size_on_screen() const; - void set_maximum_size_on_screen(::PROTOBUF_NAMESPACE_ID::int32 value); - private: - ::PROTOBUF_NAMESPACE_ID::int32 _internal_maximum_size_on_screen() const; - void _internal_set_maximum_size_on_screen(::PROTOBUF_NAMESPACE_ID::int32 value); - public: - - // bool can_fade = 19; - void clear_can_fade(); - bool can_fade() const; - void set_can_fade(bool value); - private: - bool _internal_can_fade() const; - void _internal_set_can_fade(bool value); - public: - - // bool scale_on_map_with_zoom = 23; - void clear_scale_on_map_with_zoom(); - bool scale_on_map_with_zoom() const; - void set_scale_on_map_with_zoom(bool value); - private: - bool _internal_scale_on_map_with_zoom() const; - void _internal_set_scale_on_map_with_zoom(bool value); - public: - - // bool __tentative__render_ingame = 2049; - void clear___tentative__render_ingame(); - bool __tentative__render_ingame() const; - void set___tentative__render_ingame(bool value); - private: - bool _internal___tentative__render_ingame() const; - void _internal_set___tentative__render_ingame(bool value); - public: - - // bool __tentative__render_on_map = 2050; - void clear___tentative__render_on_map(); - bool __tentative__render_on_map() const; - void set___tentative__render_on_map(bool value); - private: - bool _internal___tentative__render_on_map() const; - void _internal_set___tentative__render_on_map(bool value); - public: - - // float __tentative__scale = 2048; - void clear___tentative__scale(); - float __tentative__scale() const; - void set___tentative__scale(float value); - private: - float _internal___tentative__scale() const; - void _internal_set___tentative__scale(float value); - public: - - // bool __tentative__render_on_minimap = 2051; - void clear___tentative__render_on_minimap(); - bool __tentative__render_on_minimap() const; - void set___tentative__render_on_minimap(bool value); - private: - bool _internal___tentative__render_on_minimap() const; - void _internal_set___tentative__render_on_minimap(bool value); - public: - - // @@protoc_insertion_point(class_scope:waypoint.Icon) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr tip_description_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr tip_name_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr bhdraft__schedule_; - ::waypoint::Category* category_; - ::waypoint::Texture* texture_; - ::waypoint::GUID* guid_; - ::waypoint::Position* position_; - ::waypoint::Trigger* trigger_; - ::PROTOBUF_NAMESPACE_ID::int32 map_id_; - float distance_fade_end_; - float distance_fade_start_; - float height_offset_; - int reset_behavior_; - ::PROTOBUF_NAMESPACE_ID::uint32 achievement_bit_; - ::PROTOBUF_NAMESPACE_ID::int32 achievement_id_; - float alpha_; - ::PROTOBUF_NAMESPACE_ID::int32 minimum_size_on_screen_; - ::PROTOBUF_NAMESPACE_ID::int32 map_display_size_; - float bhdraft__schedule_duration_; - ::PROTOBUF_NAMESPACE_ID::int32 maximum_size_on_screen_; - bool can_fade_; - bool scale_on_map_with_zoom_; - bool __tentative__render_ingame_; - bool __tentative__render_on_map_; - float __tentative__scale_; - bool __tentative__render_on_minimap_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_waypoint_2eproto; -}; -// ------------------------------------------------------------------- - -class Trail PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:waypoint.Trail) */ { - public: - inline Trail() : Trail(nullptr) {}; - virtual ~Trail(); - - Trail(const Trail& from); - Trail(Trail&& from) noexcept - : Trail() { - *this = ::std::move(from); - } - - inline Trail& operator=(const Trail& from) { - CopyFrom(from); - return *this; - } - inline Trail& operator=(Trail&& from) noexcept { - if (GetArena() == from.GetArena()) { - if (this != &from) InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return GetMetadataStatic().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return GetMetadataStatic().reflection; - } - static const Trail& default_instance(); - - static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const Trail* internal_default_instance() { - return reinterpret_cast( - &_Trail_default_instance_); - } - static constexpr int kIndexInFileMessages = - 3; - - friend void swap(Trail& a, Trail& b) { - a.Swap(&b); - } - inline void Swap(Trail* other) { - if (other == this) return; - if (GetArena() == other->GetArena()) { - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(Trail* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline Trail* New() const final { - return CreateMaybeMessage(nullptr); - } - - Trail* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const Trail& from); - void MergeFrom(const Trail& from); - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - inline void SharedCtor(); - inline void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(Trail* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "waypoint.Trail"; - } - protected: - explicit Trail(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - public: - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - private: - static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_waypoint_2eproto); - return ::descriptor_table_waypoint_2eproto.file_level_metadata[kIndexInFileMessages]; - } - - public: - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kBhdraftScheduleFieldNumber = 23, - kCategoryFieldNumber = 1, - kTextureFieldNumber = 2, - kGuidFieldNumber = 3, - kTrailDataFieldNumber = 7, - kColorFieldNumber = 26, - kFestivalFilterFieldNumber = 27, - kMapTypeFilterFieldNumber = 28, - kMountFilterFieldNumber = 29, - kProfessionFilterFieldNumber = 30, - kSpecializationFilterFieldNumber = 31, - kSpeciesFilterFieldNumber = 32, - kMapIdFieldNumber = 4, - kDistanceFadeEndFieldNumber = 5, - kDistanceFadeStartFieldNumber = 6, - kAnimationSpeedFieldNumber = 8, - kCullChiralityFieldNumber = 9, - kAchievementBitFieldNumber = 16, - kAchievementIdFieldNumber = 17, - kAlphaFieldNumber = 18, - kCanFadeFieldNumber = 19, - kIsWallFieldNumber = 22, - kBhdraftScheduleDurationFieldNumber = 24, - kScaleFieldNumber = 25, - }; - // string bhdraft__schedule = 23; - void clear_bhdraft__schedule(); - const std::string& bhdraft__schedule() const; - void set_bhdraft__schedule(const std::string& value); - void set_bhdraft__schedule(std::string&& value); - void set_bhdraft__schedule(const char* value); - void set_bhdraft__schedule(const char* value, size_t size); - std::string* mutable_bhdraft__schedule(); - std::string* release_bhdraft__schedule(); - void set_allocated_bhdraft__schedule(std::string* bhdraft__schedule); - GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" - " string fields are deprecated and will be removed in a" - " future release.") - std::string* unsafe_arena_release_bhdraft__schedule(); - GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" - " string fields are deprecated and will be removed in a" - " future release.") - void unsafe_arena_set_allocated_bhdraft__schedule( - std::string* bhdraft__schedule); - private: - const std::string& _internal_bhdraft__schedule() const; - void _internal_set_bhdraft__schedule(const std::string& value); - std::string* _internal_mutable_bhdraft__schedule(); - public: - - // .waypoint.Category category = 1; - bool has_category() const; - private: - bool _internal_has_category() const; - public: - void clear_category(); - const ::waypoint::Category& category() const; - ::waypoint::Category* release_category(); - ::waypoint::Category* mutable_category(); - void set_allocated_category(::waypoint::Category* category); - private: - const ::waypoint::Category& _internal_category() const; - ::waypoint::Category* _internal_mutable_category(); - public: - void unsafe_arena_set_allocated_category( - ::waypoint::Category* category); - ::waypoint::Category* unsafe_arena_release_category(); - - // .waypoint.Texture texture = 2; - bool has_texture() const; - private: - bool _internal_has_texture() const; - public: - void clear_texture(); - const ::waypoint::Texture& texture() const; - ::waypoint::Texture* release_texture(); - ::waypoint::Texture* mutable_texture(); - void set_allocated_texture(::waypoint::Texture* texture); - private: - const ::waypoint::Texture& _internal_texture() const; - ::waypoint::Texture* _internal_mutable_texture(); - public: - void unsafe_arena_set_allocated_texture( - ::waypoint::Texture* texture); - ::waypoint::Texture* unsafe_arena_release_texture(); - - // .waypoint.GUID guid = 3; - bool has_guid() const; - private: - bool _internal_has_guid() const; - public: - void clear_guid(); - const ::waypoint::GUID& guid() const; - ::waypoint::GUID* release_guid(); - ::waypoint::GUID* mutable_guid(); - void set_allocated_guid(::waypoint::GUID* guid); - private: - const ::waypoint::GUID& _internal_guid() const; - ::waypoint::GUID* _internal_mutable_guid(); - public: - void unsafe_arena_set_allocated_guid( - ::waypoint::GUID* guid); - ::waypoint::GUID* unsafe_arena_release_guid(); - - // .waypoint.TrailData trail_data = 7; - bool has_trail_data() const; - private: - bool _internal_has_trail_data() const; - public: - void clear_trail_data(); - const ::waypoint::TrailData& trail_data() const; - ::waypoint::TrailData* release_trail_data(); - ::waypoint::TrailData* mutable_trail_data(); - void set_allocated_trail_data(::waypoint::TrailData* trail_data); - private: - const ::waypoint::TrailData& _internal_trail_data() const; - ::waypoint::TrailData* _internal_mutable_trail_data(); - public: - void unsafe_arena_set_allocated_trail_data( - ::waypoint::TrailData* trail_data); - ::waypoint::TrailData* unsafe_arena_release_trail_data(); - - // .waypoint.Color color = 26; - bool has_color() const; - private: - bool _internal_has_color() const; - public: - void clear_color(); - const ::waypoint::Color& color() const; - ::waypoint::Color* release_color(); - ::waypoint::Color* mutable_color(); - void set_allocated_color(::waypoint::Color* color); - private: - const ::waypoint::Color& _internal_color() const; - ::waypoint::Color* _internal_mutable_color(); - public: - void unsafe_arena_set_allocated_color( - ::waypoint::Color* color); - ::waypoint::Color* unsafe_arena_release_color(); - - // .waypoint.FestivalFilter festival_filter = 27; - bool has_festival_filter() const; - private: - bool _internal_has_festival_filter() const; - public: - void clear_festival_filter(); - const ::waypoint::FestivalFilter& festival_filter() const; - ::waypoint::FestivalFilter* release_festival_filter(); - ::waypoint::FestivalFilter* mutable_festival_filter(); - void set_allocated_festival_filter(::waypoint::FestivalFilter* festival_filter); - private: - const ::waypoint::FestivalFilter& _internal_festival_filter() const; - ::waypoint::FestivalFilter* _internal_mutable_festival_filter(); - public: - void unsafe_arena_set_allocated_festival_filter( - ::waypoint::FestivalFilter* festival_filter); - ::waypoint::FestivalFilter* unsafe_arena_release_festival_filter(); - - // .waypoint.MapTypeFilter map_type_filter = 28; - bool has_map_type_filter() const; - private: - bool _internal_has_map_type_filter() const; - public: - void clear_map_type_filter(); - const ::waypoint::MapTypeFilter& map_type_filter() const; - ::waypoint::MapTypeFilter* release_map_type_filter(); - ::waypoint::MapTypeFilter* mutable_map_type_filter(); - void set_allocated_map_type_filter(::waypoint::MapTypeFilter* map_type_filter); - private: - const ::waypoint::MapTypeFilter& _internal_map_type_filter() const; - ::waypoint::MapTypeFilter* _internal_mutable_map_type_filter(); - public: - void unsafe_arena_set_allocated_map_type_filter( - ::waypoint::MapTypeFilter* map_type_filter); - ::waypoint::MapTypeFilter* unsafe_arena_release_map_type_filter(); - - // .waypoint.MountFilter mount_filter = 29; - bool has_mount_filter() const; - private: - bool _internal_has_mount_filter() const; - public: - void clear_mount_filter(); - const ::waypoint::MountFilter& mount_filter() const; - ::waypoint::MountFilter* release_mount_filter(); - ::waypoint::MountFilter* mutable_mount_filter(); - void set_allocated_mount_filter(::waypoint::MountFilter* mount_filter); - private: - const ::waypoint::MountFilter& _internal_mount_filter() const; - ::waypoint::MountFilter* _internal_mutable_mount_filter(); - public: - void unsafe_arena_set_allocated_mount_filter( - ::waypoint::MountFilter* mount_filter); - ::waypoint::MountFilter* unsafe_arena_release_mount_filter(); - - // .waypoint.ProfessionFilter profession_filter = 30; - bool has_profession_filter() const; - private: - bool _internal_has_profession_filter() const; - public: - void clear_profession_filter(); - const ::waypoint::ProfessionFilter& profession_filter() const; - ::waypoint::ProfessionFilter* release_profession_filter(); - ::waypoint::ProfessionFilter* mutable_profession_filter(); - void set_allocated_profession_filter(::waypoint::ProfessionFilter* profession_filter); - private: - const ::waypoint::ProfessionFilter& _internal_profession_filter() const; - ::waypoint::ProfessionFilter* _internal_mutable_profession_filter(); - public: - void unsafe_arena_set_allocated_profession_filter( - ::waypoint::ProfessionFilter* profession_filter); - ::waypoint::ProfessionFilter* unsafe_arena_release_profession_filter(); - - // .waypoint.SpecializationFilter specialization_filter = 31; - bool has_specialization_filter() const; - private: - bool _internal_has_specialization_filter() const; - public: - void clear_specialization_filter(); - const ::waypoint::SpecializationFilter& specialization_filter() const; - ::waypoint::SpecializationFilter* release_specialization_filter(); - ::waypoint::SpecializationFilter* mutable_specialization_filter(); - void set_allocated_specialization_filter(::waypoint::SpecializationFilter* specialization_filter); - private: - const ::waypoint::SpecializationFilter& _internal_specialization_filter() const; - ::waypoint::SpecializationFilter* _internal_mutable_specialization_filter(); - public: - void unsafe_arena_set_allocated_specialization_filter( - ::waypoint::SpecializationFilter* specialization_filter); - ::waypoint::SpecializationFilter* unsafe_arena_release_specialization_filter(); - - // .waypoint.SpeciesFilter species_filter = 32; - bool has_species_filter() const; - private: - bool _internal_has_species_filter() const; - public: - void clear_species_filter(); - const ::waypoint::SpeciesFilter& species_filter() const; - ::waypoint::SpeciesFilter* release_species_filter(); - ::waypoint::SpeciesFilter* mutable_species_filter(); - void set_allocated_species_filter(::waypoint::SpeciesFilter* species_filter); - private: - const ::waypoint::SpeciesFilter& _internal_species_filter() const; - ::waypoint::SpeciesFilter* _internal_mutable_species_filter(); - public: - void unsafe_arena_set_allocated_species_filter( - ::waypoint::SpeciesFilter* species_filter); - ::waypoint::SpeciesFilter* unsafe_arena_release_species_filter(); - - // int32 map_id = 4; - void clear_map_id(); - ::PROTOBUF_NAMESPACE_ID::int32 map_id() const; - void set_map_id(::PROTOBUF_NAMESPACE_ID::int32 value); - private: - ::PROTOBUF_NAMESPACE_ID::int32 _internal_map_id() const; - void _internal_set_map_id(::PROTOBUF_NAMESPACE_ID::int32 value); - public: - - // float distance_fade_end = 5; - void clear_distance_fade_end(); - float distance_fade_end() const; - void set_distance_fade_end(float value); - private: - float _internal_distance_fade_end() const; - void _internal_set_distance_fade_end(float value); - public: - - // float distance_fade_start = 6; - void clear_distance_fade_start(); - float distance_fade_start() const; - void set_distance_fade_start(float value); - private: - float _internal_distance_fade_start() const; - void _internal_set_distance_fade_start(float value); - public: - - // float animation_speed = 8; - void clear_animation_speed(); - float animation_speed() const; - void set_animation_speed(float value); - private: - float _internal_animation_speed() const; - void _internal_set_animation_speed(float value); - public: - - // .waypoint.CullChirality cull_chirality = 9; - void clear_cull_chirality(); - ::waypoint::CullChirality cull_chirality() const; - void set_cull_chirality(::waypoint::CullChirality value); - private: - ::waypoint::CullChirality _internal_cull_chirality() const; - void _internal_set_cull_chirality(::waypoint::CullChirality value); - public: - - // fixed32 achievement_bit = 16; - void clear_achievement_bit(); - ::PROTOBUF_NAMESPACE_ID::uint32 achievement_bit() const; - void set_achievement_bit(::PROTOBUF_NAMESPACE_ID::uint32 value); - private: - ::PROTOBUF_NAMESPACE_ID::uint32 _internal_achievement_bit() const; - void _internal_set_achievement_bit(::PROTOBUF_NAMESPACE_ID::uint32 value); - public: - - // int32 achievement_id = 17; - void clear_achievement_id(); - ::PROTOBUF_NAMESPACE_ID::int32 achievement_id() const; - void set_achievement_id(::PROTOBUF_NAMESPACE_ID::int32 value); - private: - ::PROTOBUF_NAMESPACE_ID::int32 _internal_achievement_id() const; - void _internal_set_achievement_id(::PROTOBUF_NAMESPACE_ID::int32 value); - public: - - // float alpha = 18; - void clear_alpha(); - float alpha() const; - void set_alpha(float value); - private: - float _internal_alpha() const; - void _internal_set_alpha(float value); - public: - - // bool can_fade = 19; - void clear_can_fade(); - bool can_fade() const; - void set_can_fade(bool value); - private: - bool _internal_can_fade() const; - void _internal_set_can_fade(bool value); - public: - - // bool is_wall = 22; - void clear_is_wall(); - bool is_wall() const; - void set_is_wall(bool value); - private: - bool _internal_is_wall() const; - void _internal_set_is_wall(bool value); - public: - - // float bhdraft__schedule_duration = 24; - void clear_bhdraft__schedule_duration(); - float bhdraft__schedule_duration() const; - void set_bhdraft__schedule_duration(float value); - private: - float _internal_bhdraft__schedule_duration() const; - void _internal_set_bhdraft__schedule_duration(float value); - public: - - // float scale = 25; - void clear_scale(); - float scale() const; - void set_scale(float value); - private: - float _internal_scale() const; - void _internal_set_scale(float value); - public: - - // @@protoc_insertion_point(class_scope:waypoint.Trail) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr bhdraft__schedule_; - ::waypoint::Category* category_; - ::waypoint::Texture* texture_; - ::waypoint::GUID* guid_; - ::waypoint::TrailData* trail_data_; - ::waypoint::Color* color_; - ::waypoint::FestivalFilter* festival_filter_; - ::waypoint::MapTypeFilter* map_type_filter_; - ::waypoint::MountFilter* mount_filter_; - ::waypoint::ProfessionFilter* profession_filter_; - ::waypoint::SpecializationFilter* specialization_filter_; - ::waypoint::SpeciesFilter* species_filter_; - ::PROTOBUF_NAMESPACE_ID::int32 map_id_; - float distance_fade_end_; - float distance_fade_start_; - float animation_speed_; - int cull_chirality_; - ::PROTOBUF_NAMESPACE_ID::uint32 achievement_bit_; - ::PROTOBUF_NAMESPACE_ID::int32 achievement_id_; - float alpha_; - bool can_fade_; - bool is_wall_; - float bhdraft__schedule_duration_; - float scale_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_waypoint_2eproto; -}; -// ------------------------------------------------------------------- - -class Texture PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:waypoint.Texture) */ { - public: - inline Texture() : Texture(nullptr) {}; - virtual ~Texture(); - - Texture(const Texture& from); - Texture(Texture&& from) noexcept - : Texture() { - *this = ::std::move(from); - } - - inline Texture& operator=(const Texture& from) { - CopyFrom(from); - return *this; - } - inline Texture& operator=(Texture&& from) noexcept { - if (GetArena() == from.GetArena()) { - if (this != &from) InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return GetMetadataStatic().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return GetMetadataStatic().reflection; - } - static const Texture& default_instance(); - - static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const Texture* internal_default_instance() { - return reinterpret_cast( - &_Texture_default_instance_); - } - static constexpr int kIndexInFileMessages = - 4; - - friend void swap(Texture& a, Texture& b) { - a.Swap(&b); - } - inline void Swap(Texture* other) { - if (other == this) return; - if (GetArena() == other->GetArena()) { - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(Texture* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline Texture* New() const final { - return CreateMaybeMessage(nullptr); - } - - Texture* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const Texture& from); - void MergeFrom(const Texture& from); - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - inline void SharedCtor(); - inline void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(Texture* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "waypoint.Texture"; - } - protected: - explicit Texture(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - public: - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - private: - static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_waypoint_2eproto); - return ::descriptor_table_waypoint_2eproto.file_level_metadata[kIndexInFileMessages]; - } - - public: - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kPathFieldNumber = 1, - }; - // string path = 1; - void clear_path(); - const std::string& path() const; - void set_path(const std::string& value); - void set_path(std::string&& value); - void set_path(const char* value); - void set_path(const char* value, size_t size); - std::string* mutable_path(); - std::string* release_path(); - void set_allocated_path(std::string* path); - GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" - " string fields are deprecated and will be removed in a" - " future release.") - std::string* unsafe_arena_release_path(); - GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" - " string fields are deprecated and will be removed in a" - " future release.") - void unsafe_arena_set_allocated_path( - std::string* path); - private: - const std::string& _internal_path() const; - void _internal_set_path(const std::string& value); - std::string* _internal_mutable_path(); - public: - - // @@protoc_insertion_point(class_scope:waypoint.Texture) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr path_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_waypoint_2eproto; -}; -// ------------------------------------------------------------------- - -class Position PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:waypoint.Position) */ { - public: - inline Position() : Position(nullptr) {}; - virtual ~Position(); - - Position(const Position& from); - Position(Position&& from) noexcept - : Position() { - *this = ::std::move(from); - } - - inline Position& operator=(const Position& from) { - CopyFrom(from); - return *this; - } - inline Position& operator=(Position&& from) noexcept { - if (GetArena() == from.GetArena()) { - if (this != &from) InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return GetMetadataStatic().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return GetMetadataStatic().reflection; - } - static const Position& default_instance(); - - static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const Position* internal_default_instance() { - return reinterpret_cast( - &_Position_default_instance_); - } - static constexpr int kIndexInFileMessages = - 5; - - friend void swap(Position& a, Position& b) { - a.Swap(&b); - } - inline void Swap(Position* other) { - if (other == this) return; - if (GetArena() == other->GetArena()) { - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(Position* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline Position* New() const final { - return CreateMaybeMessage(nullptr); - } - - Position* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const Position& from); - void MergeFrom(const Position& from); - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - inline void SharedCtor(); - inline void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(Position* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "waypoint.Position"; - } - protected: - explicit Position(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - public: - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - private: - static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_waypoint_2eproto); - return ::descriptor_table_waypoint_2eproto.file_level_metadata[kIndexInFileMessages]; - } - - public: - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kXFieldNumber = 1, - kYFieldNumber = 2, - kZFieldNumber = 3, - }; - // float x = 1; - void clear_x(); - float x() const; - void set_x(float value); - private: - float _internal_x() const; - void _internal_set_x(float value); - public: - - // float y = 2; - void clear_y(); - float y() const; - void set_y(float value); - private: - float _internal_y() const; - void _internal_set_y(float value); - public: - - // float z = 3; - void clear_z(); - float z() const; - void set_z(float value); - private: - float _internal_z() const; - void _internal_set_z(float value); - public: - - // @@protoc_insertion_point(class_scope:waypoint.Position) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - float x_; - float y_; - float z_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_waypoint_2eproto; -}; -// ------------------------------------------------------------------- - -class EulerRotation PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:waypoint.EulerRotation) */ { - public: - inline EulerRotation() : EulerRotation(nullptr) {}; - virtual ~EulerRotation(); - - EulerRotation(const EulerRotation& from); - EulerRotation(EulerRotation&& from) noexcept - : EulerRotation() { - *this = ::std::move(from); - } - - inline EulerRotation& operator=(const EulerRotation& from) { - CopyFrom(from); - return *this; - } - inline EulerRotation& operator=(EulerRotation&& from) noexcept { - if (GetArena() == from.GetArena()) { - if (this != &from) InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return GetMetadataStatic().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return GetMetadataStatic().reflection; - } - static const EulerRotation& default_instance(); - - static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const EulerRotation* internal_default_instance() { - return reinterpret_cast( - &_EulerRotation_default_instance_); - } - static constexpr int kIndexInFileMessages = - 6; - - friend void swap(EulerRotation& a, EulerRotation& b) { - a.Swap(&b); - } - inline void Swap(EulerRotation* other) { - if (other == this) return; - if (GetArena() == other->GetArena()) { - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(EulerRotation* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline EulerRotation* New() const final { - return CreateMaybeMessage(nullptr); - } - - EulerRotation* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const EulerRotation& from); - void MergeFrom(const EulerRotation& from); - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - inline void SharedCtor(); - inline void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(EulerRotation* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "waypoint.EulerRotation"; - } - protected: - explicit EulerRotation(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - public: - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - private: - static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_waypoint_2eproto); - return ::descriptor_table_waypoint_2eproto.file_level_metadata[kIndexInFileMessages]; - } - - public: - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kXFieldNumber = 1, - kYFieldNumber = 2, - kZFieldNumber = 3, - }; - // float x = 1; - void clear_x(); - float x() const; - void set_x(float value); - private: - float _internal_x() const; - void _internal_set_x(float value); - public: - - // float y = 2; - void clear_y(); - float y() const; - void set_y(float value); - private: - float _internal_y() const; - void _internal_set_y(float value); - public: - - // float z = 3; - void clear_z(); - float z() const; - void set_z(float value); - private: - float _internal_z() const; - void _internal_set_z(float value); - public: - - // @@protoc_insertion_point(class_scope:waypoint.EulerRotation) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - float x_; - float y_; - float z_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_waypoint_2eproto; -}; -// ------------------------------------------------------------------- - -class Trigger PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:waypoint.Trigger) */ { - public: - inline Trigger() : Trigger(nullptr) {}; - virtual ~Trigger(); - - Trigger(const Trigger& from); - Trigger(Trigger&& from) noexcept - : Trigger() { - *this = ::std::move(from); - } - - inline Trigger& operator=(const Trigger& from) { - CopyFrom(from); - return *this; - } - inline Trigger& operator=(Trigger&& from) noexcept { - if (GetArena() == from.GetArena()) { - if (this != &from) InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return GetMetadataStatic().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return GetMetadataStatic().reflection; - } - static const Trigger& default_instance(); - - static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const Trigger* internal_default_instance() { - return reinterpret_cast( - &_Trigger_default_instance_); - } - static constexpr int kIndexInFileMessages = - 7; - - friend void swap(Trigger& a, Trigger& b) { - a.Swap(&b); - } - inline void Swap(Trigger* other) { - if (other == this) return; - if (GetArena() == other->GetArena()) { - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(Trigger* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline Trigger* New() const final { - return CreateMaybeMessage(nullptr); - } - - Trigger* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const Trigger& from); - void MergeFrom(const Trigger& from); - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - inline void SharedCtor(); - inline void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(Trigger* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "waypoint.Trigger"; - } - protected: - explicit Trigger(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - public: - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - private: - static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_waypoint_2eproto); - return ::descriptor_table_waypoint_2eproto.file_level_metadata[kIndexInFileMessages]; - } - - public: - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kActionCopyClipboardFieldNumber = 5, - kActionCopyMessageFieldNumber = 6, - kActionInfoMessageFieldNumber = 8, - kActionHideCategoryFieldNumber = 12, - kActionShowCategoryFieldNumber = 13, - kActionToggleCategoryFieldNumber = 14, - kBounceDelayFieldNumber = 2, - kBounceDurationFieldNumber = 3, - kBounceHeightFieldNumber = 4, - kAutoTriggerFieldNumber = 1, - kHasCountdownFieldNumber = 7, - kInvertDisplayFieldNumber = 9, - kResetLengthFieldNumber = 10, - kRangeFieldNumber = 11, - }; - // string action_copy_clipboard = 5; - void clear_action_copy_clipboard(); - const std::string& action_copy_clipboard() const; - void set_action_copy_clipboard(const std::string& value); - void set_action_copy_clipboard(std::string&& value); - void set_action_copy_clipboard(const char* value); - void set_action_copy_clipboard(const char* value, size_t size); - std::string* mutable_action_copy_clipboard(); - std::string* release_action_copy_clipboard(); - void set_allocated_action_copy_clipboard(std::string* action_copy_clipboard); - GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" - " string fields are deprecated and will be removed in a" - " future release.") - std::string* unsafe_arena_release_action_copy_clipboard(); - GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" - " string fields are deprecated and will be removed in a" - " future release.") - void unsafe_arena_set_allocated_action_copy_clipboard( - std::string* action_copy_clipboard); - private: - const std::string& _internal_action_copy_clipboard() const; - void _internal_set_action_copy_clipboard(const std::string& value); - std::string* _internal_mutable_action_copy_clipboard(); - public: - - // string action_copy_message = 6; - void clear_action_copy_message(); - const std::string& action_copy_message() const; - void set_action_copy_message(const std::string& value); - void set_action_copy_message(std::string&& value); - void set_action_copy_message(const char* value); - void set_action_copy_message(const char* value, size_t size); - std::string* mutable_action_copy_message(); - std::string* release_action_copy_message(); - void set_allocated_action_copy_message(std::string* action_copy_message); - GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" - " string fields are deprecated and will be removed in a" - " future release.") - std::string* unsafe_arena_release_action_copy_message(); - GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" - " string fields are deprecated and will be removed in a" - " future release.") - void unsafe_arena_set_allocated_action_copy_message( - std::string* action_copy_message); - private: - const std::string& _internal_action_copy_message() const; - void _internal_set_action_copy_message(const std::string& value); - std::string* _internal_mutable_action_copy_message(); - public: - - // string action_info_message = 8; - void clear_action_info_message(); - const std::string& action_info_message() const; - void set_action_info_message(const std::string& value); - void set_action_info_message(std::string&& value); - void set_action_info_message(const char* value); - void set_action_info_message(const char* value, size_t size); - std::string* mutable_action_info_message(); - std::string* release_action_info_message(); - void set_allocated_action_info_message(std::string* action_info_message); - GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" - " string fields are deprecated and will be removed in a" - " future release.") - std::string* unsafe_arena_release_action_info_message(); - GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" - " string fields are deprecated and will be removed in a" - " future release.") - void unsafe_arena_set_allocated_action_info_message( - std::string* action_info_message); - private: - const std::string& _internal_action_info_message() const; - void _internal_set_action_info_message(const std::string& value); - std::string* _internal_mutable_action_info_message(); - public: - - // .waypoint.Category action_hide_category = 12; - bool has_action_hide_category() const; - private: - bool _internal_has_action_hide_category() const; - public: - void clear_action_hide_category(); - const ::waypoint::Category& action_hide_category() const; - ::waypoint::Category* release_action_hide_category(); - ::waypoint::Category* mutable_action_hide_category(); - void set_allocated_action_hide_category(::waypoint::Category* action_hide_category); - private: - const ::waypoint::Category& _internal_action_hide_category() const; - ::waypoint::Category* _internal_mutable_action_hide_category(); - public: - void unsafe_arena_set_allocated_action_hide_category( - ::waypoint::Category* action_hide_category); - ::waypoint::Category* unsafe_arena_release_action_hide_category(); - - // .waypoint.Category action_show_category = 13; - bool has_action_show_category() const; - private: - bool _internal_has_action_show_category() const; - public: - void clear_action_show_category(); - const ::waypoint::Category& action_show_category() const; - ::waypoint::Category* release_action_show_category(); - ::waypoint::Category* mutable_action_show_category(); - void set_allocated_action_show_category(::waypoint::Category* action_show_category); - private: - const ::waypoint::Category& _internal_action_show_category() const; - ::waypoint::Category* _internal_mutable_action_show_category(); - public: - void unsafe_arena_set_allocated_action_show_category( - ::waypoint::Category* action_show_category); - ::waypoint::Category* unsafe_arena_release_action_show_category(); - - // .waypoint.Category action_toggle_category = 14; - bool has_action_toggle_category() const; - private: - bool _internal_has_action_toggle_category() const; - public: - void clear_action_toggle_category(); - const ::waypoint::Category& action_toggle_category() const; - ::waypoint::Category* release_action_toggle_category(); - ::waypoint::Category* mutable_action_toggle_category(); - void set_allocated_action_toggle_category(::waypoint::Category* action_toggle_category); - private: - const ::waypoint::Category& _internal_action_toggle_category() const; - ::waypoint::Category* _internal_mutable_action_toggle_category(); - public: - void unsafe_arena_set_allocated_action_toggle_category( - ::waypoint::Category* action_toggle_category); - ::waypoint::Category* unsafe_arena_release_action_toggle_category(); - - // float bounce_delay = 2; - void clear_bounce_delay(); - float bounce_delay() const; - void set_bounce_delay(float value); - private: - float _internal_bounce_delay() const; - void _internal_set_bounce_delay(float value); - public: - - // float bounce_duration = 3; - void clear_bounce_duration(); - float bounce_duration() const; - void set_bounce_duration(float value); - private: - float _internal_bounce_duration() const; - void _internal_set_bounce_duration(float value); - public: - - // float bounce_height = 4; - void clear_bounce_height(); - float bounce_height() const; - void set_bounce_height(float value); - private: - float _internal_bounce_height() const; - void _internal_set_bounce_height(float value); - public: - - // bool auto_trigger = 1; - void clear_auto_trigger(); - bool auto_trigger() const; - void set_auto_trigger(bool value); - private: - bool _internal_auto_trigger() const; - void _internal_set_auto_trigger(bool value); - public: - - // bool has_countdown = 7; - void clear_has_countdown(); - bool has_countdown() const; - void set_has_countdown(bool value); - private: - bool _internal_has_countdown() const; - void _internal_set_has_countdown(bool value); - public: - - // bool invert_display = 9; - void clear_invert_display(); - bool invert_display() const; - void set_invert_display(bool value); - private: - bool _internal_invert_display() const; - void _internal_set_invert_display(bool value); - public: - - // float reset_length = 10; - void clear_reset_length(); - float reset_length() const; - void set_reset_length(float value); - private: - float _internal_reset_length() const; - void _internal_set_reset_length(float value); - public: - - // float range = 11; - void clear_range(); - float range() const; - void set_range(float value); - private: - float _internal_range() const; - void _internal_set_range(float value); - public: - - // @@protoc_insertion_point(class_scope:waypoint.Trigger) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr action_copy_clipboard_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr action_copy_message_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr action_info_message_; - ::waypoint::Category* action_hide_category_; - ::waypoint::Category* action_show_category_; - ::waypoint::Category* action_toggle_category_; - float bounce_delay_; - float bounce_duration_; - float bounce_height_; - bool auto_trigger_; - bool has_countdown_; - bool invert_display_; - float reset_length_; - float range_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_waypoint_2eproto; -}; -// ------------------------------------------------------------------- - -class GUID PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:waypoint.GUID) */ { - public: - inline GUID() : GUID(nullptr) {}; - virtual ~GUID(); - - GUID(const GUID& from); - GUID(GUID&& from) noexcept - : GUID() { - *this = ::std::move(from); - } - - inline GUID& operator=(const GUID& from) { - CopyFrom(from); - return *this; - } - inline GUID& operator=(GUID&& from) noexcept { - if (GetArena() == from.GetArena()) { - if (this != &from) InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return GetMetadataStatic().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return GetMetadataStatic().reflection; - } - static const GUID& default_instance(); - - static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const GUID* internal_default_instance() { - return reinterpret_cast( - &_GUID_default_instance_); - } - static constexpr int kIndexInFileMessages = - 8; - - friend void swap(GUID& a, GUID& b) { - a.Swap(&b); - } - inline void Swap(GUID* other) { - if (other == this) return; - if (GetArena() == other->GetArena()) { - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(GUID* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline GUID* New() const final { - return CreateMaybeMessage(nullptr); - } - - GUID* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const GUID& from); - void MergeFrom(const GUID& from); - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - inline void SharedCtor(); - inline void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(GUID* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "waypoint.GUID"; - } - protected: - explicit GUID(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - public: - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - private: - static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_waypoint_2eproto); - return ::descriptor_table_waypoint_2eproto.file_level_metadata[kIndexInFileMessages]; - } - - public: - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kGuidFieldNumber = 1, - }; - // int32 guid = 1; - void clear_guid(); - ::PROTOBUF_NAMESPACE_ID::int32 guid() const; - void set_guid(::PROTOBUF_NAMESPACE_ID::int32 value); - private: - ::PROTOBUF_NAMESPACE_ID::int32 _internal_guid() const; - void _internal_set_guid(::PROTOBUF_NAMESPACE_ID::int32 value); - public: - - // @@protoc_insertion_point(class_scope:waypoint.GUID) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::int32 guid_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_waypoint_2eproto; -}; -// ------------------------------------------------------------------- - -class Color PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:waypoint.Color) */ { - public: - inline Color() : Color(nullptr) {}; - virtual ~Color(); - - Color(const Color& from); - Color(Color&& from) noexcept - : Color() { - *this = ::std::move(from); - } - - inline Color& operator=(const Color& from) { - CopyFrom(from); - return *this; - } - inline Color& operator=(Color&& from) noexcept { - if (GetArena() == from.GetArena()) { - if (this != &from) InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return GetMetadataStatic().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return GetMetadataStatic().reflection; - } - static const Color& default_instance(); - - static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const Color* internal_default_instance() { - return reinterpret_cast( - &_Color_default_instance_); - } - static constexpr int kIndexInFileMessages = - 9; - - friend void swap(Color& a, Color& b) { - a.Swap(&b); - } - inline void Swap(Color* other) { - if (other == this) return; - if (GetArena() == other->GetArena()) { - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(Color* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline Color* New() const final { - return CreateMaybeMessage(nullptr); - } - - Color* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const Color& from); - void MergeFrom(const Color& from); - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - inline void SharedCtor(); - inline void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(Color* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "waypoint.Color"; - } - protected: - explicit Color(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - public: - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - private: - static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_waypoint_2eproto); - return ::descriptor_table_waypoint_2eproto.file_level_metadata[kIndexInFileMessages]; - } - - public: - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kHexFieldNumber = 1, - }; - // string hex = 1; - void clear_hex(); - const std::string& hex() const; - void set_hex(const std::string& value); - void set_hex(std::string&& value); - void set_hex(const char* value); - void set_hex(const char* value, size_t size); - std::string* mutable_hex(); - std::string* release_hex(); - void set_allocated_hex(std::string* hex); - GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" - " string fields are deprecated and will be removed in a" - " future release.") - std::string* unsafe_arena_release_hex(); - GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" - " string fields are deprecated and will be removed in a" - " future release.") - void unsafe_arena_set_allocated_hex( - std::string* hex); - private: - const std::string& _internal_hex() const; - void _internal_set_hex(const std::string& value); - std::string* _internal_mutable_hex(); - public: - - // @@protoc_insertion_point(class_scope:waypoint.Color) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr hex_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_waypoint_2eproto; -}; -// ------------------------------------------------------------------- - -class FestivalFilter PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:waypoint.FestivalFilter) */ { - public: - inline FestivalFilter() : FestivalFilter(nullptr) {}; - virtual ~FestivalFilter(); - - FestivalFilter(const FestivalFilter& from); - FestivalFilter(FestivalFilter&& from) noexcept - : FestivalFilter() { - *this = ::std::move(from); - } - - inline FestivalFilter& operator=(const FestivalFilter& from) { - CopyFrom(from); - return *this; - } - inline FestivalFilter& operator=(FestivalFilter&& from) noexcept { - if (GetArena() == from.GetArena()) { - if (this != &from) InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return GetMetadataStatic().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return GetMetadataStatic().reflection; - } - static const FestivalFilter& default_instance(); - - static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const FestivalFilter* internal_default_instance() { - return reinterpret_cast( - &_FestivalFilter_default_instance_); - } - static constexpr int kIndexInFileMessages = - 10; - - friend void swap(FestivalFilter& a, FestivalFilter& b) { - a.Swap(&b); - } - inline void Swap(FestivalFilter* other) { - if (other == this) return; - if (GetArena() == other->GetArena()) { - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(FestivalFilter* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline FestivalFilter* New() const final { - return CreateMaybeMessage(nullptr); - } - - FestivalFilter* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const FestivalFilter& from); - void MergeFrom(const FestivalFilter& from); - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - inline void SharedCtor(); - inline void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(FestivalFilter* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "waypoint.FestivalFilter"; - } - protected: - explicit FestivalFilter(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - public: - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - private: - static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_waypoint_2eproto); - return ::descriptor_table_waypoint_2eproto.file_level_metadata[kIndexInFileMessages]; - } - - public: - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kDragonbashFieldNumber = 1, - kFestivalOfTheFourWindsFieldNumber = 2, - kHalloweenFieldNumber = 3, - kLunarNewYearFieldNumber = 4, - kSuperAdventureFestivalFieldNumber = 5, - kWintersdayFieldNumber = 6, - kNoneFieldNumber = 7, - }; - // bool dragonbash = 1; - void clear_dragonbash(); - bool dragonbash() const; - void set_dragonbash(bool value); - private: - bool _internal_dragonbash() const; - void _internal_set_dragonbash(bool value); - public: - - // bool festival_of_the_four_winds = 2; - void clear_festival_of_the_four_winds(); - bool festival_of_the_four_winds() const; - void set_festival_of_the_four_winds(bool value); - private: - bool _internal_festival_of_the_four_winds() const; - void _internal_set_festival_of_the_four_winds(bool value); - public: - - // bool halloween = 3; - void clear_halloween(); - bool halloween() const; - void set_halloween(bool value); - private: - bool _internal_halloween() const; - void _internal_set_halloween(bool value); - public: - - // bool lunar_new_year = 4; - void clear_lunar_new_year(); - bool lunar_new_year() const; - void set_lunar_new_year(bool value); - private: - bool _internal_lunar_new_year() const; - void _internal_set_lunar_new_year(bool value); - public: - - // bool super_adventure_festival = 5; - void clear_super_adventure_festival(); - bool super_adventure_festival() const; - void set_super_adventure_festival(bool value); - private: - bool _internal_super_adventure_festival() const; - void _internal_set_super_adventure_festival(bool value); - public: - - // bool wintersday = 6; - void clear_wintersday(); - bool wintersday() const; - void set_wintersday(bool value); - private: - bool _internal_wintersday() const; - void _internal_set_wintersday(bool value); - public: - - // bool none = 7; - void clear_none(); - bool none() const; - void set_none(bool value); - private: - bool _internal_none() const; - void _internal_set_none(bool value); - public: - - // @@protoc_insertion_point(class_scope:waypoint.FestivalFilter) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - bool dragonbash_; - bool festival_of_the_four_winds_; - bool halloween_; - bool lunar_new_year_; - bool super_adventure_festival_; - bool wintersday_; - bool none_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_waypoint_2eproto; -}; -// ------------------------------------------------------------------- - -class MapTypeFilter PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:waypoint.MapTypeFilter) */ { - public: - inline MapTypeFilter() : MapTypeFilter(nullptr) {}; - virtual ~MapTypeFilter(); - - MapTypeFilter(const MapTypeFilter& from); - MapTypeFilter(MapTypeFilter&& from) noexcept - : MapTypeFilter() { - *this = ::std::move(from); - } - - inline MapTypeFilter& operator=(const MapTypeFilter& from) { - CopyFrom(from); - return *this; - } - inline MapTypeFilter& operator=(MapTypeFilter&& from) noexcept { - if (GetArena() == from.GetArena()) { - if (this != &from) InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return GetMetadataStatic().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return GetMetadataStatic().reflection; - } - static const MapTypeFilter& default_instance(); - - static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const MapTypeFilter* internal_default_instance() { - return reinterpret_cast( - &_MapTypeFilter_default_instance_); - } - static constexpr int kIndexInFileMessages = - 11; - - friend void swap(MapTypeFilter& a, MapTypeFilter& b) { - a.Swap(&b); - } - inline void Swap(MapTypeFilter* other) { - if (other == this) return; - if (GetArena() == other->GetArena()) { - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(MapTypeFilter* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline MapTypeFilter* New() const final { - return CreateMaybeMessage(nullptr); - } - - MapTypeFilter* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const MapTypeFilter& from); - void MergeFrom(const MapTypeFilter& from); - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - inline void SharedCtor(); - inline void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(MapTypeFilter* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "waypoint.MapTypeFilter"; - } - protected: - explicit MapTypeFilter(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - public: - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - private: - static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_waypoint_2eproto); - return ::descriptor_table_waypoint_2eproto.file_level_metadata[kIndexInFileMessages]; - } - - public: - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kUnknownMapFieldNumber = 1, - kRedirectMapFieldNumber = 2, - kCharacterCreateMapFieldNumber = 3, - kPvpMapFieldNumber = 4, - kGvgMapFieldNumber = 5, - kInstanceMapFieldNumber = 6, - kPublicMapFieldNumber = 7, - kTournamentMapFieldNumber = 8, - kTutorialMapFieldNumber = 9, - kUserTournamentMapFieldNumber = 10, - kCenterMapFieldNumber = 11, - kEternalBattlegroundsMapFieldNumber = 12, - kBluehomeMapFieldNumber = 13, - kBlueBorderlandsMapFieldNumber = 14, - kGreenHomeMapFieldNumber = 15, - kGreenBorderlandsMapFieldNumber = 16, - kRedHomeMapFieldNumber = 17, - kRedBorderlandsMapFieldNumber = 18, - kFortunesValeMapFieldNumber = 19, - kJumpPuzzleMapFieldNumber = 20, - kObsidianSanctumMapFieldNumber = 21, - kEdgeOfTheMistsMapFieldNumber = 22, - kPublicMiniMapFieldNumber = 23, - kWvwLoungeMapFieldNumber = 24, - }; - // bool unknown_map = 1; - void clear_unknown_map(); - bool unknown_map() const; - void set_unknown_map(bool value); - private: - bool _internal_unknown_map() const; - void _internal_set_unknown_map(bool value); - public: - - // bool redirect_map = 2; - void clear_redirect_map(); - bool redirect_map() const; - void set_redirect_map(bool value); - private: - bool _internal_redirect_map() const; - void _internal_set_redirect_map(bool value); - public: - - // bool character_create_map = 3; - void clear_character_create_map(); - bool character_create_map() const; - void set_character_create_map(bool value); - private: - bool _internal_character_create_map() const; - void _internal_set_character_create_map(bool value); - public: - - // bool pvp_map = 4; - void clear_pvp_map(); - bool pvp_map() const; - void set_pvp_map(bool value); - private: - bool _internal_pvp_map() const; - void _internal_set_pvp_map(bool value); - public: - - // bool gvg_map = 5; - void clear_gvg_map(); - bool gvg_map() const; - void set_gvg_map(bool value); - private: - bool _internal_gvg_map() const; - void _internal_set_gvg_map(bool value); - public: - - // bool instance_map = 6; - void clear_instance_map(); - bool instance_map() const; - void set_instance_map(bool value); - private: - bool _internal_instance_map() const; - void _internal_set_instance_map(bool value); - public: - - // bool public_map = 7; - void clear_public_map(); - bool public_map() const; - void set_public_map(bool value); - private: - bool _internal_public_map() const; - void _internal_set_public_map(bool value); - public: - - // bool tournament_map = 8; - void clear_tournament_map(); - bool tournament_map() const; - void set_tournament_map(bool value); - private: - bool _internal_tournament_map() const; - void _internal_set_tournament_map(bool value); - public: - - // bool tutorial_map = 9; - void clear_tutorial_map(); - bool tutorial_map() const; - void set_tutorial_map(bool value); - private: - bool _internal_tutorial_map() const; - void _internal_set_tutorial_map(bool value); - public: - - // bool user_tournament_map = 10; - void clear_user_tournament_map(); - bool user_tournament_map() const; - void set_user_tournament_map(bool value); - private: - bool _internal_user_tournament_map() const; - void _internal_set_user_tournament_map(bool value); - public: - - // bool center_map = 11; - void clear_center_map(); - bool center_map() const; - void set_center_map(bool value); - private: - bool _internal_center_map() const; - void _internal_set_center_map(bool value); - public: - - // bool eternal_battlegrounds_map = 12; - void clear_eternal_battlegrounds_map(); - bool eternal_battlegrounds_map() const; - void set_eternal_battlegrounds_map(bool value); - private: - bool _internal_eternal_battlegrounds_map() const; - void _internal_set_eternal_battlegrounds_map(bool value); - public: - - // bool bluehome_map = 13; - void clear_bluehome_map(); - bool bluehome_map() const; - void set_bluehome_map(bool value); - private: - bool _internal_bluehome_map() const; - void _internal_set_bluehome_map(bool value); - public: - - // bool blue_borderlands_map = 14; - void clear_blue_borderlands_map(); - bool blue_borderlands_map() const; - void set_blue_borderlands_map(bool value); - private: - bool _internal_blue_borderlands_map() const; - void _internal_set_blue_borderlands_map(bool value); - public: - - // bool green_home_map = 15; - void clear_green_home_map(); - bool green_home_map() const; - void set_green_home_map(bool value); - private: - bool _internal_green_home_map() const; - void _internal_set_green_home_map(bool value); - public: - - // bool green_borderlands_map = 16; - void clear_green_borderlands_map(); - bool green_borderlands_map() const; - void set_green_borderlands_map(bool value); - private: - bool _internal_green_borderlands_map() const; - void _internal_set_green_borderlands_map(bool value); - public: - - // bool red_home_map = 17; - void clear_red_home_map(); - bool red_home_map() const; - void set_red_home_map(bool value); - private: - bool _internal_red_home_map() const; - void _internal_set_red_home_map(bool value); - public: - - // bool red_borderlands_map = 18; - void clear_red_borderlands_map(); - bool red_borderlands_map() const; - void set_red_borderlands_map(bool value); - private: - bool _internal_red_borderlands_map() const; - void _internal_set_red_borderlands_map(bool value); - public: - - // bool fortunes_vale_map = 19; - void clear_fortunes_vale_map(); - bool fortunes_vale_map() const; - void set_fortunes_vale_map(bool value); - private: - bool _internal_fortunes_vale_map() const; - void _internal_set_fortunes_vale_map(bool value); - public: - - // bool jump_puzzle_map = 20; - void clear_jump_puzzle_map(); - bool jump_puzzle_map() const; - void set_jump_puzzle_map(bool value); - private: - bool _internal_jump_puzzle_map() const; - void _internal_set_jump_puzzle_map(bool value); - public: - - // bool obsidian_sanctum_map = 21; - void clear_obsidian_sanctum_map(); - bool obsidian_sanctum_map() const; - void set_obsidian_sanctum_map(bool value); - private: - bool _internal_obsidian_sanctum_map() const; - void _internal_set_obsidian_sanctum_map(bool value); - public: - - // bool edge_of_the_mists_map = 22; - void clear_edge_of_the_mists_map(); - bool edge_of_the_mists_map() const; - void set_edge_of_the_mists_map(bool value); - private: - bool _internal_edge_of_the_mists_map() const; - void _internal_set_edge_of_the_mists_map(bool value); - public: - - // bool public_mini_map = 23; - void clear_public_mini_map(); - bool public_mini_map() const; - void set_public_mini_map(bool value); - private: - bool _internal_public_mini_map() const; - void _internal_set_public_mini_map(bool value); - public: - - // bool wvw_lounge_map = 24; - void clear_wvw_lounge_map(); - bool wvw_lounge_map() const; - void set_wvw_lounge_map(bool value); - private: - bool _internal_wvw_lounge_map() const; - void _internal_set_wvw_lounge_map(bool value); - public: - - // @@protoc_insertion_point(class_scope:waypoint.MapTypeFilter) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - bool unknown_map_; - bool redirect_map_; - bool character_create_map_; - bool pvp_map_; - bool gvg_map_; - bool instance_map_; - bool public_map_; - bool tournament_map_; - bool tutorial_map_; - bool user_tournament_map_; - bool center_map_; - bool eternal_battlegrounds_map_; - bool bluehome_map_; - bool blue_borderlands_map_; - bool green_home_map_; - bool green_borderlands_map_; - bool red_home_map_; - bool red_borderlands_map_; - bool fortunes_vale_map_; - bool jump_puzzle_map_; - bool obsidian_sanctum_map_; - bool edge_of_the_mists_map_; - bool public_mini_map_; - bool wvw_lounge_map_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_waypoint_2eproto; -}; -// ------------------------------------------------------------------- - -class MountFilter PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:waypoint.MountFilter) */ { - public: - inline MountFilter() : MountFilter(nullptr) {}; - virtual ~MountFilter(); - - MountFilter(const MountFilter& from); - MountFilter(MountFilter&& from) noexcept - : MountFilter() { - *this = ::std::move(from); - } - - inline MountFilter& operator=(const MountFilter& from) { - CopyFrom(from); - return *this; - } - inline MountFilter& operator=(MountFilter&& from) noexcept { - if (GetArena() == from.GetArena()) { - if (this != &from) InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return GetMetadataStatic().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return GetMetadataStatic().reflection; - } - static const MountFilter& default_instance(); - - static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const MountFilter* internal_default_instance() { - return reinterpret_cast( - &_MountFilter_default_instance_); - } - static constexpr int kIndexInFileMessages = - 12; - - friend void swap(MountFilter& a, MountFilter& b) { - a.Swap(&b); - } - inline void Swap(MountFilter* other) { - if (other == this) return; - if (GetArena() == other->GetArena()) { - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(MountFilter* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline MountFilter* New() const final { - return CreateMaybeMessage(nullptr); - } - - MountFilter* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const MountFilter& from); - void MergeFrom(const MountFilter& from); - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - inline void SharedCtor(); - inline void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(MountFilter* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "waypoint.MountFilter"; - } - protected: - explicit MountFilter(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - public: - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - private: - static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_waypoint_2eproto); - return ::descriptor_table_waypoint_2eproto.file_level_metadata[kIndexInFileMessages]; - } - - public: - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kRaptorFieldNumber = 1, - kSpringerFieldNumber = 2, - kSkimmerFieldNumber = 3, - kJackalFieldNumber = 4, - kGriffonFieldNumber = 5, - kRollerBeetleFieldNumber = 6, - kWarclawFieldNumber = 7, - kSkyscaleeFieldNumber = 8, - kSkiffFieldNumber = 9, - kSeigeTurtleFieldNumber = 10, - }; - // bool raptor = 1; - void clear_raptor(); - bool raptor() const; - void set_raptor(bool value); - private: - bool _internal_raptor() const; - void _internal_set_raptor(bool value); - public: - - // bool springer = 2; - void clear_springer(); - bool springer() const; - void set_springer(bool value); - private: - bool _internal_springer() const; - void _internal_set_springer(bool value); - public: - - // bool skimmer = 3; - void clear_skimmer(); - bool skimmer() const; - void set_skimmer(bool value); - private: - bool _internal_skimmer() const; - void _internal_set_skimmer(bool value); - public: - - // bool jackal = 4; - void clear_jackal(); - bool jackal() const; - void set_jackal(bool value); - private: - bool _internal_jackal() const; - void _internal_set_jackal(bool value); - public: - - // bool griffon = 5; - void clear_griffon(); - bool griffon() const; - void set_griffon(bool value); - private: - bool _internal_griffon() const; - void _internal_set_griffon(bool value); - public: - - // bool roller_beetle = 6; - void clear_roller_beetle(); - bool roller_beetle() const; - void set_roller_beetle(bool value); - private: - bool _internal_roller_beetle() const; - void _internal_set_roller_beetle(bool value); - public: - - // bool warclaw = 7; - void clear_warclaw(); - bool warclaw() const; - void set_warclaw(bool value); - private: - bool _internal_warclaw() const; - void _internal_set_warclaw(bool value); - public: - - // bool skyscalee = 8; - void clear_skyscalee(); - bool skyscalee() const; - void set_skyscalee(bool value); - private: - bool _internal_skyscalee() const; - void _internal_set_skyscalee(bool value); - public: - - // bool skiff = 9; - void clear_skiff(); - bool skiff() const; - void set_skiff(bool value); - private: - bool _internal_skiff() const; - void _internal_set_skiff(bool value); - public: - - // bool seige_turtle = 10; - void clear_seige_turtle(); - bool seige_turtle() const; - void set_seige_turtle(bool value); - private: - bool _internal_seige_turtle() const; - void _internal_set_seige_turtle(bool value); - public: - - // @@protoc_insertion_point(class_scope:waypoint.MountFilter) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - bool raptor_; - bool springer_; - bool skimmer_; - bool jackal_; - bool griffon_; - bool roller_beetle_; - bool warclaw_; - bool skyscalee_; - bool skiff_; - bool seige_turtle_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_waypoint_2eproto; -}; -// ------------------------------------------------------------------- - -class ProfessionFilter PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:waypoint.ProfessionFilter) */ { - public: - inline ProfessionFilter() : ProfessionFilter(nullptr) {}; - virtual ~ProfessionFilter(); - - ProfessionFilter(const ProfessionFilter& from); - ProfessionFilter(ProfessionFilter&& from) noexcept - : ProfessionFilter() { - *this = ::std::move(from); - } - - inline ProfessionFilter& operator=(const ProfessionFilter& from) { - CopyFrom(from); - return *this; - } - inline ProfessionFilter& operator=(ProfessionFilter&& from) noexcept { - if (GetArena() == from.GetArena()) { - if (this != &from) InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return GetMetadataStatic().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return GetMetadataStatic().reflection; - } - static const ProfessionFilter& default_instance(); - - static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const ProfessionFilter* internal_default_instance() { - return reinterpret_cast( - &_ProfessionFilter_default_instance_); - } - static constexpr int kIndexInFileMessages = - 13; - - friend void swap(ProfessionFilter& a, ProfessionFilter& b) { - a.Swap(&b); - } - inline void Swap(ProfessionFilter* other) { - if (other == this) return; - if (GetArena() == other->GetArena()) { - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(ProfessionFilter* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline ProfessionFilter* New() const final { - return CreateMaybeMessage(nullptr); - } - - ProfessionFilter* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const ProfessionFilter& from); - void MergeFrom(const ProfessionFilter& from); - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - inline void SharedCtor(); - inline void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(ProfessionFilter* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "waypoint.ProfessionFilter"; - } - protected: - explicit ProfessionFilter(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - public: - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - private: - static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_waypoint_2eproto); - return ::descriptor_table_waypoint_2eproto.file_level_metadata[kIndexInFileMessages]; - } - - public: - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kGuardianFieldNumber = 1, - kWarriorFieldNumber = 2, - kEngineerFieldNumber = 3, - kRangerFieldNumber = 4, - kThiefFieldNumber = 5, - kElementalistFieldNumber = 6, - kMesmerFieldNumber = 7, - kNecromancerFieldNumber = 8, - kRevenantntFieldNumber = 9, - }; - // bool guardian = 1; - void clear_guardian(); - bool guardian() const; - void set_guardian(bool value); - private: - bool _internal_guardian() const; - void _internal_set_guardian(bool value); - public: - - // bool warrior = 2; - void clear_warrior(); - bool warrior() const; - void set_warrior(bool value); - private: - bool _internal_warrior() const; - void _internal_set_warrior(bool value); - public: - - // bool engineer = 3; - void clear_engineer(); - bool engineer() const; - void set_engineer(bool value); - private: - bool _internal_engineer() const; - void _internal_set_engineer(bool value); - public: - - // bool ranger = 4; - void clear_ranger(); - bool ranger() const; - void set_ranger(bool value); - private: - bool _internal_ranger() const; - void _internal_set_ranger(bool value); - public: - - // bool thief = 5; - void clear_thief(); - bool thief() const; - void set_thief(bool value); - private: - bool _internal_thief() const; - void _internal_set_thief(bool value); - public: - - // bool elementalist = 6; - void clear_elementalist(); - bool elementalist() const; - void set_elementalist(bool value); - private: - bool _internal_elementalist() const; - void _internal_set_elementalist(bool value); - public: - - // bool mesmer = 7; - void clear_mesmer(); - bool mesmer() const; - void set_mesmer(bool value); - private: - bool _internal_mesmer() const; - void _internal_set_mesmer(bool value); - public: - - // bool necromancer = 8; - void clear_necromancer(); - bool necromancer() const; - void set_necromancer(bool value); - private: - bool _internal_necromancer() const; - void _internal_set_necromancer(bool value); - public: - - // bool revenantnt = 9; - void clear_revenantnt(); - bool revenantnt() const; - void set_revenantnt(bool value); - private: - bool _internal_revenantnt() const; - void _internal_set_revenantnt(bool value); - public: - - // @@protoc_insertion_point(class_scope:waypoint.ProfessionFilter) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - bool guardian_; - bool warrior_; - bool engineer_; - bool ranger_; - bool thief_; - bool elementalist_; - bool mesmer_; - bool necromancer_; - bool revenantnt_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_waypoint_2eproto; -}; -// ------------------------------------------------------------------- - -class SpecializationFilter PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:waypoint.SpecializationFilter) */ { - public: - inline SpecializationFilter() : SpecializationFilter(nullptr) {}; - virtual ~SpecializationFilter(); - - SpecializationFilter(const SpecializationFilter& from); - SpecializationFilter(SpecializationFilter&& from) noexcept - : SpecializationFilter() { - *this = ::std::move(from); - } - - inline SpecializationFilter& operator=(const SpecializationFilter& from) { - CopyFrom(from); - return *this; - } - inline SpecializationFilter& operator=(SpecializationFilter&& from) noexcept { - if (GetArena() == from.GetArena()) { - if (this != &from) InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return GetMetadataStatic().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return GetMetadataStatic().reflection; - } - static const SpecializationFilter& default_instance(); - - static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const SpecializationFilter* internal_default_instance() { - return reinterpret_cast( - &_SpecializationFilter_default_instance_); - } - static constexpr int kIndexInFileMessages = - 14; - - friend void swap(SpecializationFilter& a, SpecializationFilter& b) { - a.Swap(&b); - } - inline void Swap(SpecializationFilter* other) { - if (other == this) return; - if (GetArena() == other->GetArena()) { - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(SpecializationFilter* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline SpecializationFilter* New() const final { - return CreateMaybeMessage(nullptr); - } - - SpecializationFilter* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const SpecializationFilter& from); - void MergeFrom(const SpecializationFilter& from); - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - inline void SharedCtor(); - inline void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(SpecializationFilter* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "waypoint.SpecializationFilter"; - } - protected: - explicit SpecializationFilter(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - public: - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - private: - static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_waypoint_2eproto); - return ::descriptor_table_waypoint_2eproto.file_level_metadata[kIndexInFileMessages]; - } - - public: - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kElementalistTempestFieldNumber = 1, - kEngineerScrapperFieldNumber = 2, - kGuardianDragonhunterFieldNumber = 3, - kMesmerChronomancerFieldNumber = 4, - kNecromancerReaperFieldNumber = 5, - kRangerDruidFieldNumber = 6, - kRevenantHeraldFieldNumber = 7, - kThiefDaredevilFieldNumber = 8, - kWarriorBerserkerFieldNumber = 9, - kElementalistWeaverFieldNumber = 10, - kEngineerHolosmithFieldNumber = 11, - kGuardianFirebrandFieldNumber = 12, - kMesmerMirageFieldNumber = 13, - kNecromancerScourgeFieldNumber = 14, - kRangerSoulbeastFieldNumber = 15, - kRevenantRenegadeFieldNumber = 16, - kThiefDeadeyeFieldNumber = 17, - kWarriorSpellbreakerFieldNumber = 18, - kElmentalistCatalystFieldNumber = 19, - kEngineerMechanistFieldNumber = 20, - kGuardianWillbenderFieldNumber = 21, - kMesmerVirtuosoFieldNumber = 22, - kNecromancerHarbingerFieldNumber = 23, - kRangerUntamedFieldNumber = 24, - kRevenantVindicatorFieldNumber = 25, - kThiefSpecterFieldNumber = 26, - kWarriorBladeswornFieldNumber = 27, - kElementalistAirFieldNumber = 28, - kElementalistArcaneFieldNumber = 29, - kElementalistEarthFieldNumber = 30, - kElementalistFireFieldNumber = 31, - kElementalistWaterFieldNumber = 32, - kEngineerAlchemyFieldNumber = 33, - kEngineerExplosivesFieldNumber = 34, - kEngineerFirearmsFieldNumber = 35, - kEngineerInventionsFieldNumber = 36, - kEngineerToolsFieldNumber = 37, - kGuardianHonorFieldNumber = 38, - kGuardianRadianceFieldNumber = 39, - kGuardianValorFieldNumber = 40, - kGuardianVirtuesFieldNumber = 41, - kGuardianZealFieldNumber = 42, - kMesmerChaosFieldNumber = 43, - kMesmerDominationFieldNumber = 44, - kMesmerDuelingFieldNumber = 45, - kMesmerIllusionsFieldNumber = 46, - kMesmerInspirationFieldNumber = 47, - kNecromancerBloodMagicFieldNumber = 48, - kNecromancerCursesFieldNumber = 49, - kNecromancerDeathMagicFieldNumber = 50, - kNecromancerSoulReapingFieldNumber = 51, - kNecromancerSpiteFieldNumber = 52, - kRangerBeastmasteryFieldNumber = 53, - kRangerMarksmanshipFieldNumber = 54, - kRangerNatureMagicFieldNumber = 55, - kRangerSkirmishingFieldNumber = 56, - kRangerWildernessSurvivalFieldNumber = 57, - kRevenantCorruptionFieldNumber = 58, - kRevenantDevastationFieldNumber = 59, - kRevenantInvocationFieldNumber = 60, - kRevenantRetributionFieldNumber = 61, - kRevenantSalvationFieldNumber = 62, - kThiefAcrobaticsFieldNumber = 63, - kThiefCriticalStrikesFieldNumber = 64, - kThiefDeadlyArtsFieldNumber = 65, - kThiefShadowArtsFieldNumber = 66, - kThiefTrickeryFieldNumber = 67, - kWarriorArmsFieldNumber = 68, - kWarriorDefenseFieldNumber = 69, - kWarriorDisciplineFieldNumber = 70, - kWarriorStrengthFieldNumber = 71, - kWarriorTacticsFieldNumber = 72, - }; - // bool elementalist_tempest = 1; - void clear_elementalist_tempest(); - bool elementalist_tempest() const; - void set_elementalist_tempest(bool value); - private: - bool _internal_elementalist_tempest() const; - void _internal_set_elementalist_tempest(bool value); - public: - - // bool engineer_scrapper = 2; - void clear_engineer_scrapper(); - bool engineer_scrapper() const; - void set_engineer_scrapper(bool value); - private: - bool _internal_engineer_scrapper() const; - void _internal_set_engineer_scrapper(bool value); - public: - - // bool guardian_dragonhunter = 3; - void clear_guardian_dragonhunter(); - bool guardian_dragonhunter() const; - void set_guardian_dragonhunter(bool value); - private: - bool _internal_guardian_dragonhunter() const; - void _internal_set_guardian_dragonhunter(bool value); - public: - - // bool mesmer_chronomancer = 4; - void clear_mesmer_chronomancer(); - bool mesmer_chronomancer() const; - void set_mesmer_chronomancer(bool value); - private: - bool _internal_mesmer_chronomancer() const; - void _internal_set_mesmer_chronomancer(bool value); - public: - - // bool necromancer_reaper = 5; - void clear_necromancer_reaper(); - bool necromancer_reaper() const; - void set_necromancer_reaper(bool value); - private: - bool _internal_necromancer_reaper() const; - void _internal_set_necromancer_reaper(bool value); - public: - - // bool ranger_druid = 6; - void clear_ranger_druid(); - bool ranger_druid() const; - void set_ranger_druid(bool value); - private: - bool _internal_ranger_druid() const; - void _internal_set_ranger_druid(bool value); - public: - - // bool revenant_herald = 7; - void clear_revenant_herald(); - bool revenant_herald() const; - void set_revenant_herald(bool value); - private: - bool _internal_revenant_herald() const; - void _internal_set_revenant_herald(bool value); - public: - - // bool thief_daredevil = 8; - void clear_thief_daredevil(); - bool thief_daredevil() const; - void set_thief_daredevil(bool value); - private: - bool _internal_thief_daredevil() const; - void _internal_set_thief_daredevil(bool value); - public: - - // bool warrior_berserker = 9; - void clear_warrior_berserker(); - bool warrior_berserker() const; - void set_warrior_berserker(bool value); - private: - bool _internal_warrior_berserker() const; - void _internal_set_warrior_berserker(bool value); - public: - - // bool elementalist_weaver = 10; - void clear_elementalist_weaver(); - bool elementalist_weaver() const; - void set_elementalist_weaver(bool value); - private: - bool _internal_elementalist_weaver() const; - void _internal_set_elementalist_weaver(bool value); - public: - - // bool engineer_holosmith = 11; - void clear_engineer_holosmith(); - bool engineer_holosmith() const; - void set_engineer_holosmith(bool value); - private: - bool _internal_engineer_holosmith() const; - void _internal_set_engineer_holosmith(bool value); - public: - - // bool guardian_firebrand = 12; - void clear_guardian_firebrand(); - bool guardian_firebrand() const; - void set_guardian_firebrand(bool value); - private: - bool _internal_guardian_firebrand() const; - void _internal_set_guardian_firebrand(bool value); - public: - - // bool mesmer_mirage = 13; - void clear_mesmer_mirage(); - bool mesmer_mirage() const; - void set_mesmer_mirage(bool value); - private: - bool _internal_mesmer_mirage() const; - void _internal_set_mesmer_mirage(bool value); - public: - - // bool necromancer_scourge = 14; - void clear_necromancer_scourge(); - bool necromancer_scourge() const; - void set_necromancer_scourge(bool value); - private: - bool _internal_necromancer_scourge() const; - void _internal_set_necromancer_scourge(bool value); - public: - - // bool ranger_soulbeast = 15; - void clear_ranger_soulbeast(); - bool ranger_soulbeast() const; - void set_ranger_soulbeast(bool value); - private: - bool _internal_ranger_soulbeast() const; - void _internal_set_ranger_soulbeast(bool value); - public: - - // bool revenant_renegade = 16; - void clear_revenant_renegade(); - bool revenant_renegade() const; - void set_revenant_renegade(bool value); - private: - bool _internal_revenant_renegade() const; - void _internal_set_revenant_renegade(bool value); - public: - - // bool thief_deadeye = 17; - void clear_thief_deadeye(); - bool thief_deadeye() const; - void set_thief_deadeye(bool value); - private: - bool _internal_thief_deadeye() const; - void _internal_set_thief_deadeye(bool value); - public: - - // bool warrior_spellbreaker = 18; - void clear_warrior_spellbreaker(); - bool warrior_spellbreaker() const; - void set_warrior_spellbreaker(bool value); - private: - bool _internal_warrior_spellbreaker() const; - void _internal_set_warrior_spellbreaker(bool value); - public: - - // bool elmentalist_catalyst = 19; - void clear_elmentalist_catalyst(); - bool elmentalist_catalyst() const; - void set_elmentalist_catalyst(bool value); - private: - bool _internal_elmentalist_catalyst() const; - void _internal_set_elmentalist_catalyst(bool value); - public: - - // bool engineer_mechanist = 20; - void clear_engineer_mechanist(); - bool engineer_mechanist() const; - void set_engineer_mechanist(bool value); - private: - bool _internal_engineer_mechanist() const; - void _internal_set_engineer_mechanist(bool value); - public: - - // bool guardian_willbender = 21; - void clear_guardian_willbender(); - bool guardian_willbender() const; - void set_guardian_willbender(bool value); - private: - bool _internal_guardian_willbender() const; - void _internal_set_guardian_willbender(bool value); - public: - - // bool mesmer_virtuoso = 22; - void clear_mesmer_virtuoso(); - bool mesmer_virtuoso() const; - void set_mesmer_virtuoso(bool value); - private: - bool _internal_mesmer_virtuoso() const; - void _internal_set_mesmer_virtuoso(bool value); - public: - - // bool necromancer_harbinger = 23; - void clear_necromancer_harbinger(); - bool necromancer_harbinger() const; - void set_necromancer_harbinger(bool value); - private: - bool _internal_necromancer_harbinger() const; - void _internal_set_necromancer_harbinger(bool value); - public: - - // bool ranger_untamed = 24; - void clear_ranger_untamed(); - bool ranger_untamed() const; - void set_ranger_untamed(bool value); - private: - bool _internal_ranger_untamed() const; - void _internal_set_ranger_untamed(bool value); - public: - - // bool revenant_vindicator = 25; - void clear_revenant_vindicator(); - bool revenant_vindicator() const; - void set_revenant_vindicator(bool value); - private: - bool _internal_revenant_vindicator() const; - void _internal_set_revenant_vindicator(bool value); - public: - - // bool thief_specter = 26; - void clear_thief_specter(); - bool thief_specter() const; - void set_thief_specter(bool value); - private: - bool _internal_thief_specter() const; - void _internal_set_thief_specter(bool value); - public: - - // bool warrior_bladesworn = 27; - void clear_warrior_bladesworn(); - bool warrior_bladesworn() const; - void set_warrior_bladesworn(bool value); - private: - bool _internal_warrior_bladesworn() const; - void _internal_set_warrior_bladesworn(bool value); - public: - - // bool elementalist_air = 28; - void clear_elementalist_air(); - bool elementalist_air() const; - void set_elementalist_air(bool value); - private: - bool _internal_elementalist_air() const; - void _internal_set_elementalist_air(bool value); - public: - - // bool elementalist_arcane = 29; - void clear_elementalist_arcane(); - bool elementalist_arcane() const; - void set_elementalist_arcane(bool value); - private: - bool _internal_elementalist_arcane() const; - void _internal_set_elementalist_arcane(bool value); - public: - - // bool elementalist_earth = 30; - void clear_elementalist_earth(); - bool elementalist_earth() const; - void set_elementalist_earth(bool value); - private: - bool _internal_elementalist_earth() const; - void _internal_set_elementalist_earth(bool value); - public: - - // bool elementalist_fire = 31; - void clear_elementalist_fire(); - bool elementalist_fire() const; - void set_elementalist_fire(bool value); - private: - bool _internal_elementalist_fire() const; - void _internal_set_elementalist_fire(bool value); - public: - - // bool elementalist_water = 32; - void clear_elementalist_water(); - bool elementalist_water() const; - void set_elementalist_water(bool value); - private: - bool _internal_elementalist_water() const; - void _internal_set_elementalist_water(bool value); - public: - - // bool engineer_alchemy = 33; - void clear_engineer_alchemy(); - bool engineer_alchemy() const; - void set_engineer_alchemy(bool value); - private: - bool _internal_engineer_alchemy() const; - void _internal_set_engineer_alchemy(bool value); - public: - - // bool engineer_explosives = 34; - void clear_engineer_explosives(); - bool engineer_explosives() const; - void set_engineer_explosives(bool value); - private: - bool _internal_engineer_explosives() const; - void _internal_set_engineer_explosives(bool value); - public: - - // bool engineer_firearms = 35; - void clear_engineer_firearms(); - bool engineer_firearms() const; - void set_engineer_firearms(bool value); - private: - bool _internal_engineer_firearms() const; - void _internal_set_engineer_firearms(bool value); - public: - - // bool engineer_inventions = 36; - void clear_engineer_inventions(); - bool engineer_inventions() const; - void set_engineer_inventions(bool value); - private: - bool _internal_engineer_inventions() const; - void _internal_set_engineer_inventions(bool value); - public: - - // bool engineer_tools = 37; - void clear_engineer_tools(); - bool engineer_tools() const; - void set_engineer_tools(bool value); - private: - bool _internal_engineer_tools() const; - void _internal_set_engineer_tools(bool value); - public: - - // bool guardian_honor = 38; - void clear_guardian_honor(); - bool guardian_honor() const; - void set_guardian_honor(bool value); - private: - bool _internal_guardian_honor() const; - void _internal_set_guardian_honor(bool value); - public: - - // bool guardian_radiance = 39; - void clear_guardian_radiance(); - bool guardian_radiance() const; - void set_guardian_radiance(bool value); - private: - bool _internal_guardian_radiance() const; - void _internal_set_guardian_radiance(bool value); - public: - - // bool guardian_valor = 40; - void clear_guardian_valor(); - bool guardian_valor() const; - void set_guardian_valor(bool value); - private: - bool _internal_guardian_valor() const; - void _internal_set_guardian_valor(bool value); - public: - - // bool guardian_virtues = 41; - void clear_guardian_virtues(); - bool guardian_virtues() const; - void set_guardian_virtues(bool value); - private: - bool _internal_guardian_virtues() const; - void _internal_set_guardian_virtues(bool value); - public: - - // bool guardian_zeal = 42; - void clear_guardian_zeal(); - bool guardian_zeal() const; - void set_guardian_zeal(bool value); - private: - bool _internal_guardian_zeal() const; - void _internal_set_guardian_zeal(bool value); - public: - - // bool mesmer_chaos = 43; - void clear_mesmer_chaos(); - bool mesmer_chaos() const; - void set_mesmer_chaos(bool value); - private: - bool _internal_mesmer_chaos() const; - void _internal_set_mesmer_chaos(bool value); - public: - - // bool mesmer_domination = 44; - void clear_mesmer_domination(); - bool mesmer_domination() const; - void set_mesmer_domination(bool value); - private: - bool _internal_mesmer_domination() const; - void _internal_set_mesmer_domination(bool value); - public: - - // bool mesmer_dueling = 45; - void clear_mesmer_dueling(); - bool mesmer_dueling() const; - void set_mesmer_dueling(bool value); - private: - bool _internal_mesmer_dueling() const; - void _internal_set_mesmer_dueling(bool value); - public: - - // bool mesmer_illusions = 46; - void clear_mesmer_illusions(); - bool mesmer_illusions() const; - void set_mesmer_illusions(bool value); - private: - bool _internal_mesmer_illusions() const; - void _internal_set_mesmer_illusions(bool value); - public: - - // bool mesmer_inspiration = 47; - void clear_mesmer_inspiration(); - bool mesmer_inspiration() const; - void set_mesmer_inspiration(bool value); - private: - bool _internal_mesmer_inspiration() const; - void _internal_set_mesmer_inspiration(bool value); - public: - - // bool necromancer_blood_magic = 48; - void clear_necromancer_blood_magic(); - bool necromancer_blood_magic() const; - void set_necromancer_blood_magic(bool value); - private: - bool _internal_necromancer_blood_magic() const; - void _internal_set_necromancer_blood_magic(bool value); - public: - - // bool necromancer_curses = 49; - void clear_necromancer_curses(); - bool necromancer_curses() const; - void set_necromancer_curses(bool value); - private: - bool _internal_necromancer_curses() const; - void _internal_set_necromancer_curses(bool value); - public: - - // bool necromancer_death_magic = 50; - void clear_necromancer_death_magic(); - bool necromancer_death_magic() const; - void set_necromancer_death_magic(bool value); - private: - bool _internal_necromancer_death_magic() const; - void _internal_set_necromancer_death_magic(bool value); - public: - - // bool necromancer_soul_reaping = 51; - void clear_necromancer_soul_reaping(); - bool necromancer_soul_reaping() const; - void set_necromancer_soul_reaping(bool value); - private: - bool _internal_necromancer_soul_reaping() const; - void _internal_set_necromancer_soul_reaping(bool value); - public: - - // bool necromancer_spite = 52; - void clear_necromancer_spite(); - bool necromancer_spite() const; - void set_necromancer_spite(bool value); - private: - bool _internal_necromancer_spite() const; - void _internal_set_necromancer_spite(bool value); - public: - - // bool ranger_beastmastery = 53; - void clear_ranger_beastmastery(); - bool ranger_beastmastery() const; - void set_ranger_beastmastery(bool value); - private: - bool _internal_ranger_beastmastery() const; - void _internal_set_ranger_beastmastery(bool value); - public: - - // bool ranger_marksmanship = 54; - void clear_ranger_marksmanship(); - bool ranger_marksmanship() const; - void set_ranger_marksmanship(bool value); - private: - bool _internal_ranger_marksmanship() const; - void _internal_set_ranger_marksmanship(bool value); - public: - - // bool ranger_nature_magic = 55; - void clear_ranger_nature_magic(); - bool ranger_nature_magic() const; - void set_ranger_nature_magic(bool value); - private: - bool _internal_ranger_nature_magic() const; - void _internal_set_ranger_nature_magic(bool value); - public: - - // bool ranger_skirmishing = 56; - void clear_ranger_skirmishing(); - bool ranger_skirmishing() const; - void set_ranger_skirmishing(bool value); - private: - bool _internal_ranger_skirmishing() const; - void _internal_set_ranger_skirmishing(bool value); - public: - - // bool ranger_wilderness_survival = 57; - void clear_ranger_wilderness_survival(); - bool ranger_wilderness_survival() const; - void set_ranger_wilderness_survival(bool value); - private: - bool _internal_ranger_wilderness_survival() const; - void _internal_set_ranger_wilderness_survival(bool value); - public: - - // bool revenant_corruption = 58; - void clear_revenant_corruption(); - bool revenant_corruption() const; - void set_revenant_corruption(bool value); - private: - bool _internal_revenant_corruption() const; - void _internal_set_revenant_corruption(bool value); - public: - - // bool revenant_devastation = 59; - void clear_revenant_devastation(); - bool revenant_devastation() const; - void set_revenant_devastation(bool value); - private: - bool _internal_revenant_devastation() const; - void _internal_set_revenant_devastation(bool value); - public: - - // bool revenant_invocation = 60; - void clear_revenant_invocation(); - bool revenant_invocation() const; - void set_revenant_invocation(bool value); - private: - bool _internal_revenant_invocation() const; - void _internal_set_revenant_invocation(bool value); - public: - - // bool revenant_retribution = 61; - void clear_revenant_retribution(); - bool revenant_retribution() const; - void set_revenant_retribution(bool value); - private: - bool _internal_revenant_retribution() const; - void _internal_set_revenant_retribution(bool value); - public: - - // bool revenant_salvation = 62; - void clear_revenant_salvation(); - bool revenant_salvation() const; - void set_revenant_salvation(bool value); - private: - bool _internal_revenant_salvation() const; - void _internal_set_revenant_salvation(bool value); - public: - - // bool thief_acrobatics = 63; - void clear_thief_acrobatics(); - bool thief_acrobatics() const; - void set_thief_acrobatics(bool value); - private: - bool _internal_thief_acrobatics() const; - void _internal_set_thief_acrobatics(bool value); - public: - - // bool thief_critical_strikes = 64; - void clear_thief_critical_strikes(); - bool thief_critical_strikes() const; - void set_thief_critical_strikes(bool value); - private: - bool _internal_thief_critical_strikes() const; - void _internal_set_thief_critical_strikes(bool value); - public: - - // bool thief_deadly_arts = 65; - void clear_thief_deadly_arts(); - bool thief_deadly_arts() const; - void set_thief_deadly_arts(bool value); - private: - bool _internal_thief_deadly_arts() const; - void _internal_set_thief_deadly_arts(bool value); - public: - - // bool thief_shadow_arts = 66; - void clear_thief_shadow_arts(); - bool thief_shadow_arts() const; - void set_thief_shadow_arts(bool value); - private: - bool _internal_thief_shadow_arts() const; - void _internal_set_thief_shadow_arts(bool value); - public: - - // bool thief_trickery = 67; - void clear_thief_trickery(); - bool thief_trickery() const; - void set_thief_trickery(bool value); - private: - bool _internal_thief_trickery() const; - void _internal_set_thief_trickery(bool value); - public: - - // bool warrior_arms = 68; - void clear_warrior_arms(); - bool warrior_arms() const; - void set_warrior_arms(bool value); - private: - bool _internal_warrior_arms() const; - void _internal_set_warrior_arms(bool value); - public: - - // bool warrior_defense = 69; - void clear_warrior_defense(); - bool warrior_defense() const; - void set_warrior_defense(bool value); - private: - bool _internal_warrior_defense() const; - void _internal_set_warrior_defense(bool value); - public: - - // bool warrior_discipline = 70; - void clear_warrior_discipline(); - bool warrior_discipline() const; - void set_warrior_discipline(bool value); - private: - bool _internal_warrior_discipline() const; - void _internal_set_warrior_discipline(bool value); - public: - - // bool warrior_strength = 71; - void clear_warrior_strength(); - bool warrior_strength() const; - void set_warrior_strength(bool value); - private: - bool _internal_warrior_strength() const; - void _internal_set_warrior_strength(bool value); - public: - - // bool warrior_tactics = 72; - void clear_warrior_tactics(); - bool warrior_tactics() const; - void set_warrior_tactics(bool value); - private: - bool _internal_warrior_tactics() const; - void _internal_set_warrior_tactics(bool value); - public: - - // @@protoc_insertion_point(class_scope:waypoint.SpecializationFilter) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - bool elementalist_tempest_; - bool engineer_scrapper_; - bool guardian_dragonhunter_; - bool mesmer_chronomancer_; - bool necromancer_reaper_; - bool ranger_druid_; - bool revenant_herald_; - bool thief_daredevil_; - bool warrior_berserker_; - bool elementalist_weaver_; - bool engineer_holosmith_; - bool guardian_firebrand_; - bool mesmer_mirage_; - bool necromancer_scourge_; - bool ranger_soulbeast_; - bool revenant_renegade_; - bool thief_deadeye_; - bool warrior_spellbreaker_; - bool elmentalist_catalyst_; - bool engineer_mechanist_; - bool guardian_willbender_; - bool mesmer_virtuoso_; - bool necromancer_harbinger_; - bool ranger_untamed_; - bool revenant_vindicator_; - bool thief_specter_; - bool warrior_bladesworn_; - bool elementalist_air_; - bool elementalist_arcane_; - bool elementalist_earth_; - bool elementalist_fire_; - bool elementalist_water_; - bool engineer_alchemy_; - bool engineer_explosives_; - bool engineer_firearms_; - bool engineer_inventions_; - bool engineer_tools_; - bool guardian_honor_; - bool guardian_radiance_; - bool guardian_valor_; - bool guardian_virtues_; - bool guardian_zeal_; - bool mesmer_chaos_; - bool mesmer_domination_; - bool mesmer_dueling_; - bool mesmer_illusions_; - bool mesmer_inspiration_; - bool necromancer_blood_magic_; - bool necromancer_curses_; - bool necromancer_death_magic_; - bool necromancer_soul_reaping_; - bool necromancer_spite_; - bool ranger_beastmastery_; - bool ranger_marksmanship_; - bool ranger_nature_magic_; - bool ranger_skirmishing_; - bool ranger_wilderness_survival_; - bool revenant_corruption_; - bool revenant_devastation_; - bool revenant_invocation_; - bool revenant_retribution_; - bool revenant_salvation_; - bool thief_acrobatics_; - bool thief_critical_strikes_; - bool thief_deadly_arts_; - bool thief_shadow_arts_; - bool thief_trickery_; - bool warrior_arms_; - bool warrior_defense_; - bool warrior_discipline_; - bool warrior_strength_; - bool warrior_tactics_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_waypoint_2eproto; -}; -// ------------------------------------------------------------------- - -class SpeciesFilter PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:waypoint.SpeciesFilter) */ { - public: - inline SpeciesFilter() : SpeciesFilter(nullptr) {}; - virtual ~SpeciesFilter(); - - SpeciesFilter(const SpeciesFilter& from); - SpeciesFilter(SpeciesFilter&& from) noexcept - : SpeciesFilter() { - *this = ::std::move(from); - } - - inline SpeciesFilter& operator=(const SpeciesFilter& from) { - CopyFrom(from); - return *this; - } - inline SpeciesFilter& operator=(SpeciesFilter&& from) noexcept { - if (GetArena() == from.GetArena()) { - if (this != &from) InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return GetMetadataStatic().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return GetMetadataStatic().reflection; - } - static const SpeciesFilter& default_instance(); - - static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const SpeciesFilter* internal_default_instance() { - return reinterpret_cast( - &_SpeciesFilter_default_instance_); - } - static constexpr int kIndexInFileMessages = - 15; - - friend void swap(SpeciesFilter& a, SpeciesFilter& b) { - a.Swap(&b); - } - inline void Swap(SpeciesFilter* other) { - if (other == this) return; - if (GetArena() == other->GetArena()) { - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(SpeciesFilter* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline SpeciesFilter* New() const final { - return CreateMaybeMessage(nullptr); - } - - SpeciesFilter* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const SpeciesFilter& from); - void MergeFrom(const SpeciesFilter& from); - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - inline void SharedCtor(); - inline void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(SpeciesFilter* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "waypoint.SpeciesFilter"; - } - protected: - explicit SpeciesFilter(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - public: - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - private: - static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_waypoint_2eproto); - return ::descriptor_table_waypoint_2eproto.file_level_metadata[kIndexInFileMessages]; - } - - public: - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kAsuraFieldNumber = 1, - kCharrFieldNumber = 2, - kHumanFieldNumber = 3, - kNornFieldNumber = 4, - kSylvariFieldNumber = 5, - }; - // bool asura = 1; - void clear_asura(); - bool asura() const; - void set_asura(bool value); - private: - bool _internal_asura() const; - void _internal_set_asura(bool value); - public: - - // bool charr = 2; - void clear_charr(); - bool charr() const; - void set_charr(bool value); - private: - bool _internal_charr() const; - void _internal_set_charr(bool value); - public: - - // bool human = 3; - void clear_human(); - bool human() const; - void set_human(bool value); - private: - bool _internal_human() const; - void _internal_set_human(bool value); - public: - - // bool norn = 4; - void clear_norn(); - bool norn() const; - void set_norn(bool value); - private: - bool _internal_norn() const; - void _internal_set_norn(bool value); - public: - - // bool sylvari = 5; - void clear_sylvari(); - bool sylvari() const; - void set_sylvari(bool value); - private: - bool _internal_sylvari() const; - void _internal_set_sylvari(bool value); - public: - - // @@protoc_insertion_point(class_scope:waypoint.SpeciesFilter) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - bool asura_; - bool charr_; - bool human_; - bool norn_; - bool sylvari_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_waypoint_2eproto; -}; -// ------------------------------------------------------------------- - -class TrailData PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:waypoint.TrailData) */ { - public: - inline TrailData() : TrailData(nullptr) {}; - virtual ~TrailData(); - - TrailData(const TrailData& from); - TrailData(TrailData&& from) noexcept - : TrailData() { - *this = ::std::move(from); - } - - inline TrailData& operator=(const TrailData& from) { - CopyFrom(from); - return *this; - } - inline TrailData& operator=(TrailData&& from) noexcept { - if (GetArena() == from.GetArena()) { - if (this != &from) InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return GetMetadataStatic().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return GetMetadataStatic().reflection; - } - static const TrailData& default_instance(); - - static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const TrailData* internal_default_instance() { - return reinterpret_cast( - &_TrailData_default_instance_); - } - static constexpr int kIndexInFileMessages = - 16; - - friend void swap(TrailData& a, TrailData& b) { - a.Swap(&b); - } - inline void Swap(TrailData* other) { - if (other == this) return; - if (GetArena() == other->GetArena()) { - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(TrailData* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline TrailData* New() const final { - return CreateMaybeMessage(nullptr); - } - - TrailData* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const TrailData& from); - void MergeFrom(const TrailData& from); - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - inline void SharedCtor(); - inline void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(TrailData* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "waypoint.TrailData"; - } - protected: - explicit TrailData(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - public: - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - private: - static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_waypoint_2eproto); - return ::descriptor_table_waypoint_2eproto.file_level_metadata[kIndexInFileMessages]; - } - - public: - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kTrailDataFieldNumber = 1, - }; - // string trail_data = 1; - void clear_trail_data(); - const std::string& trail_data() const; - void set_trail_data(const std::string& value); - void set_trail_data(std::string&& value); - void set_trail_data(const char* value); - void set_trail_data(const char* value, size_t size); - std::string* mutable_trail_data(); - std::string* release_trail_data(); - void set_allocated_trail_data(std::string* trail_data); - GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" - " string fields are deprecated and will be removed in a" - " future release.") - std::string* unsafe_arena_release_trail_data(); - GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" - " string fields are deprecated and will be removed in a" - " future release.") - void unsafe_arena_set_allocated_trail_data( - std::string* trail_data); - private: - const std::string& _internal_trail_data() const; - void _internal_set_trail_data(const std::string& value); - std::string* _internal_mutable_trail_data(); - public: - - // @@protoc_insertion_point(class_scope:waypoint.TrailData) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr trail_data_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_waypoint_2eproto; -}; -// =================================================================== - - -// =================================================================== - -#ifdef __GNUC__ - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wstrict-aliasing" -#endif // __GNUC__ -// ------------------------------------------------------------------- - -// Category - -// bool default_visibility = 1; -inline void Category::clear_default_visibility() { - default_visibility_ = false; -} -inline bool Category::_internal_default_visibility() const { - return default_visibility_; -} -inline bool Category::default_visibility() const { - // @@protoc_insertion_point(field_get:waypoint.Category.default_visibility) - return _internal_default_visibility(); -} -inline void Category::_internal_set_default_visibility(bool value) { - - default_visibility_ = value; -} -inline void Category::set_default_visibility(bool value) { - _internal_set_default_visibility(value); - // @@protoc_insertion_point(field_set:waypoint.Category.default_visibility) -} - -// string display_name = 2; -inline void Category::clear_display_name() { - display_name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline const std::string& Category::display_name() const { - // @@protoc_insertion_point(field_get:waypoint.Category.display_name) - return _internal_display_name(); -} -inline void Category::set_display_name(const std::string& value) { - _internal_set_display_name(value); - // @@protoc_insertion_point(field_set:waypoint.Category.display_name) -} -inline std::string* Category::mutable_display_name() { - // @@protoc_insertion_point(field_mutable:waypoint.Category.display_name) - return _internal_mutable_display_name(); -} -inline const std::string& Category::_internal_display_name() const { - return display_name_.Get(); -} -inline void Category::_internal_set_display_name(const std::string& value) { - - display_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); -} -inline void Category::set_display_name(std::string&& value) { - - display_name_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:waypoint.Category.display_name) -} -inline void Category::set_display_name(const char* value) { - GOOGLE_DCHECK(value != nullptr); - - display_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArena()); - // @@protoc_insertion_point(field_set_char:waypoint.Category.display_name) -} -inline void Category::set_display_name(const char* value, - size_t size) { - - display_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:waypoint.Category.display_name) -} -inline std::string* Category::_internal_mutable_display_name() { - - return display_name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline std::string* Category::release_display_name() { - // @@protoc_insertion_point(field_release:waypoint.Category.display_name) - return display_name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void Category::set_allocated_display_name(std::string* display_name) { - if (display_name != nullptr) { - - } else { - - } - display_name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), display_name, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:waypoint.Category.display_name) -} -inline std::string* Category::unsafe_arena_release_display_name() { - // @@protoc_insertion_point(field_unsafe_arena_release:waypoint.Category.display_name) - GOOGLE_DCHECK(GetArena() != nullptr); - - return display_name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArena()); -} -inline void Category::unsafe_arena_set_allocated_display_name( - std::string* display_name) { - GOOGLE_DCHECK(GetArena() != nullptr); - if (display_name != nullptr) { - - } else { - - } - display_name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - display_name, GetArena()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Category.display_name) -} - -// bool is_separator = 3; -inline void Category::clear_is_separator() { - is_separator_ = false; -} -inline bool Category::_internal_is_separator() const { - return is_separator_; -} -inline bool Category::is_separator() const { - // @@protoc_insertion_point(field_get:waypoint.Category.is_separator) - return _internal_is_separator(); -} -inline void Category::_internal_set_is_separator(bool value) { - - is_separator_ = value; -} -inline void Category::set_is_separator(bool value) { - _internal_set_is_separator(value); - // @@protoc_insertion_point(field_set:waypoint.Category.is_separator) -} - -// string name = 4; -inline void Category::clear_name() { - name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline const std::string& Category::name() const { - // @@protoc_insertion_point(field_get:waypoint.Category.name) - return _internal_name(); -} -inline void Category::set_name(const std::string& value) { - _internal_set_name(value); - // @@protoc_insertion_point(field_set:waypoint.Category.name) -} -inline std::string* Category::mutable_name() { - // @@protoc_insertion_point(field_mutable:waypoint.Category.name) - return _internal_mutable_name(); -} -inline const std::string& Category::_internal_name() const { - return name_.Get(); -} -inline void Category::_internal_set_name(const std::string& value) { - - name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); -} -inline void Category::set_name(std::string&& value) { - - name_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:waypoint.Category.name) -} -inline void Category::set_name(const char* value) { - GOOGLE_DCHECK(value != nullptr); - - name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArena()); - // @@protoc_insertion_point(field_set_char:waypoint.Category.name) -} -inline void Category::set_name(const char* value, - size_t size) { - - name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:waypoint.Category.name) -} -inline std::string* Category::_internal_mutable_name() { - - return name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline std::string* Category::release_name() { - // @@protoc_insertion_point(field_release:waypoint.Category.name) - return name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void Category::set_allocated_name(std::string* name) { - if (name != nullptr) { - - } else { - - } - name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:waypoint.Category.name) -} -inline std::string* Category::unsafe_arena_release_name() { - // @@protoc_insertion_point(field_unsafe_arena_release:waypoint.Category.name) - GOOGLE_DCHECK(GetArena() != nullptr); - - return name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArena()); -} -inline void Category::unsafe_arena_set_allocated_name( - std::string* name) { - GOOGLE_DCHECK(GetArena() != nullptr); - if (name != nullptr) { - - } else { - - } - name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - name, GetArena()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Category.name) -} - -// string tooltip_name = 5; -inline void Category::clear_tooltip_name() { - tooltip_name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline const std::string& Category::tooltip_name() const { - // @@protoc_insertion_point(field_get:waypoint.Category.tooltip_name) - return _internal_tooltip_name(); -} -inline void Category::set_tooltip_name(const std::string& value) { - _internal_set_tooltip_name(value); - // @@protoc_insertion_point(field_set:waypoint.Category.tooltip_name) -} -inline std::string* Category::mutable_tooltip_name() { - // @@protoc_insertion_point(field_mutable:waypoint.Category.tooltip_name) - return _internal_mutable_tooltip_name(); -} -inline const std::string& Category::_internal_tooltip_name() const { - return tooltip_name_.Get(); -} -inline void Category::_internal_set_tooltip_name(const std::string& value) { - - tooltip_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); -} -inline void Category::set_tooltip_name(std::string&& value) { - - tooltip_name_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:waypoint.Category.tooltip_name) -} -inline void Category::set_tooltip_name(const char* value) { - GOOGLE_DCHECK(value != nullptr); - - tooltip_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArena()); - // @@protoc_insertion_point(field_set_char:waypoint.Category.tooltip_name) -} -inline void Category::set_tooltip_name(const char* value, - size_t size) { - - tooltip_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:waypoint.Category.tooltip_name) -} -inline std::string* Category::_internal_mutable_tooltip_name() { - - return tooltip_name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline std::string* Category::release_tooltip_name() { - // @@protoc_insertion_point(field_release:waypoint.Category.tooltip_name) - return tooltip_name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void Category::set_allocated_tooltip_name(std::string* tooltip_name) { - if (tooltip_name != nullptr) { - - } else { - - } - tooltip_name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), tooltip_name, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:waypoint.Category.tooltip_name) -} -inline std::string* Category::unsafe_arena_release_tooltip_name() { - // @@protoc_insertion_point(field_unsafe_arena_release:waypoint.Category.tooltip_name) - GOOGLE_DCHECK(GetArena() != nullptr); - - return tooltip_name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArena()); -} -inline void Category::unsafe_arena_set_allocated_tooltip_name( - std::string* tooltip_name) { - GOOGLE_DCHECK(GetArena() != nullptr); - if (tooltip_name != nullptr) { - - } else { - - } - tooltip_name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - tooltip_name, GetArena()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Category.tooltip_name) -} - -// map children = 6; -inline int Category::_internal_children_size() const { - return children_.size(); -} -inline int Category::children_size() const { - return _internal_children_size(); -} -inline void Category::clear_children() { - children_.Clear(); -} -inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::waypoint::Category >& -Category::_internal_children() const { - return children_.GetMap(); -} -inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::waypoint::Category >& -Category::children() const { - // @@protoc_insertion_point(field_map:waypoint.Category.children) - return _internal_children(); -} -inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::waypoint::Category >* -Category::_internal_mutable_children() { - return children_.MutableMap(); -} -inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::waypoint::Category >* -Category::mutable_children() { - // @@protoc_insertion_point(field_mutable_map:waypoint.Category.children) - return _internal_mutable_children(); -} - -// ------------------------------------------------------------------- - -// Icon - -// .waypoint.Category category = 1; -inline bool Icon::_internal_has_category() const { - return this != internal_default_instance() && category_ != nullptr; -} -inline bool Icon::has_category() const { - return _internal_has_category(); -} -inline void Icon::clear_category() { - if (GetArena() == nullptr && category_ != nullptr) { - delete category_; - } - category_ = nullptr; -} -inline const ::waypoint::Category& Icon::_internal_category() const { - const ::waypoint::Category* p = category_; - return p != nullptr ? *p : *reinterpret_cast( - &::waypoint::_Category_default_instance_); -} -inline const ::waypoint::Category& Icon::category() const { - // @@protoc_insertion_point(field_get:waypoint.Icon.category) - return _internal_category(); -} -inline void Icon::unsafe_arena_set_allocated_category( - ::waypoint::Category* category) { - if (GetArena() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(category_); - } - category_ = category; - if (category) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Icon.category) -} -inline ::waypoint::Category* Icon::release_category() { - auto temp = unsafe_arena_release_category(); - if (GetArena() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } - return temp; -} -inline ::waypoint::Category* Icon::unsafe_arena_release_category() { - // @@protoc_insertion_point(field_release:waypoint.Icon.category) - - ::waypoint::Category* temp = category_; - category_ = nullptr; - return temp; -} -inline ::waypoint::Category* Icon::_internal_mutable_category() { - - if (category_ == nullptr) { - auto* p = CreateMaybeMessage<::waypoint::Category>(GetArena()); - category_ = p; - } - return category_; -} -inline ::waypoint::Category* Icon::mutable_category() { - // @@protoc_insertion_point(field_mutable:waypoint.Icon.category) - return _internal_mutable_category(); -} -inline void Icon::set_allocated_category(::waypoint::Category* category) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); - if (message_arena == nullptr) { - delete category_; - } - if (category) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(category); - if (message_arena != submessage_arena) { - category = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, category, submessage_arena); - } - - } else { - - } - category_ = category; - // @@protoc_insertion_point(field_set_allocated:waypoint.Icon.category) -} - -// .waypoint.Texture texture = 2; -inline bool Icon::_internal_has_texture() const { - return this != internal_default_instance() && texture_ != nullptr; -} -inline bool Icon::has_texture() const { - return _internal_has_texture(); -} -inline void Icon::clear_texture() { - if (GetArena() == nullptr && texture_ != nullptr) { - delete texture_; - } - texture_ = nullptr; -} -inline const ::waypoint::Texture& Icon::_internal_texture() const { - const ::waypoint::Texture* p = texture_; - return p != nullptr ? *p : *reinterpret_cast( - &::waypoint::_Texture_default_instance_); -} -inline const ::waypoint::Texture& Icon::texture() const { - // @@protoc_insertion_point(field_get:waypoint.Icon.texture) - return _internal_texture(); -} -inline void Icon::unsafe_arena_set_allocated_texture( - ::waypoint::Texture* texture) { - if (GetArena() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(texture_); - } - texture_ = texture; - if (texture) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Icon.texture) -} -inline ::waypoint::Texture* Icon::release_texture() { - auto temp = unsafe_arena_release_texture(); - if (GetArena() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } - return temp; -} -inline ::waypoint::Texture* Icon::unsafe_arena_release_texture() { - // @@protoc_insertion_point(field_release:waypoint.Icon.texture) - - ::waypoint::Texture* temp = texture_; - texture_ = nullptr; - return temp; -} -inline ::waypoint::Texture* Icon::_internal_mutable_texture() { - - if (texture_ == nullptr) { - auto* p = CreateMaybeMessage<::waypoint::Texture>(GetArena()); - texture_ = p; - } - return texture_; -} -inline ::waypoint::Texture* Icon::mutable_texture() { - // @@protoc_insertion_point(field_mutable:waypoint.Icon.texture) - return _internal_mutable_texture(); -} -inline void Icon::set_allocated_texture(::waypoint::Texture* texture) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); - if (message_arena == nullptr) { - delete texture_; - } - if (texture) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(texture); - if (message_arena != submessage_arena) { - texture = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, texture, submessage_arena); - } - - } else { - - } - texture_ = texture; - // @@protoc_insertion_point(field_set_allocated:waypoint.Icon.texture) -} - -// .waypoint.GUID guid = 3; -inline bool Icon::_internal_has_guid() const { - return this != internal_default_instance() && guid_ != nullptr; -} -inline bool Icon::has_guid() const { - return _internal_has_guid(); -} -inline void Icon::clear_guid() { - if (GetArena() == nullptr && guid_ != nullptr) { - delete guid_; - } - guid_ = nullptr; -} -inline const ::waypoint::GUID& Icon::_internal_guid() const { - const ::waypoint::GUID* p = guid_; - return p != nullptr ? *p : *reinterpret_cast( - &::waypoint::_GUID_default_instance_); -} -inline const ::waypoint::GUID& Icon::guid() const { - // @@protoc_insertion_point(field_get:waypoint.Icon.guid) - return _internal_guid(); -} -inline void Icon::unsafe_arena_set_allocated_guid( - ::waypoint::GUID* guid) { - if (GetArena() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(guid_); - } - guid_ = guid; - if (guid) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Icon.guid) -} -inline ::waypoint::GUID* Icon::release_guid() { - auto temp = unsafe_arena_release_guid(); - if (GetArena() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } - return temp; -} -inline ::waypoint::GUID* Icon::unsafe_arena_release_guid() { - // @@protoc_insertion_point(field_release:waypoint.Icon.guid) - - ::waypoint::GUID* temp = guid_; - guid_ = nullptr; - return temp; -} -inline ::waypoint::GUID* Icon::_internal_mutable_guid() { - - if (guid_ == nullptr) { - auto* p = CreateMaybeMessage<::waypoint::GUID>(GetArena()); - guid_ = p; - } - return guid_; -} -inline ::waypoint::GUID* Icon::mutable_guid() { - // @@protoc_insertion_point(field_mutable:waypoint.Icon.guid) - return _internal_mutable_guid(); -} -inline void Icon::set_allocated_guid(::waypoint::GUID* guid) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); - if (message_arena == nullptr) { - delete guid_; - } - if (guid) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(guid); - if (message_arena != submessage_arena) { - guid = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, guid, submessage_arena); - } - - } else { - - } - guid_ = guid; - // @@protoc_insertion_point(field_set_allocated:waypoint.Icon.guid) -} - -// int32 map_id = 4; -inline void Icon::clear_map_id() { - map_id_ = 0; -} -inline ::PROTOBUF_NAMESPACE_ID::int32 Icon::_internal_map_id() const { - return map_id_; -} -inline ::PROTOBUF_NAMESPACE_ID::int32 Icon::map_id() const { - // @@protoc_insertion_point(field_get:waypoint.Icon.map_id) - return _internal_map_id(); -} -inline void Icon::_internal_set_map_id(::PROTOBUF_NAMESPACE_ID::int32 value) { - - map_id_ = value; -} -inline void Icon::set_map_id(::PROTOBUF_NAMESPACE_ID::int32 value) { - _internal_set_map_id(value); - // @@protoc_insertion_point(field_set:waypoint.Icon.map_id) -} - -// float distance_fade_end = 5; -inline void Icon::clear_distance_fade_end() { - distance_fade_end_ = 0; -} -inline float Icon::_internal_distance_fade_end() const { - return distance_fade_end_; -} -inline float Icon::distance_fade_end() const { - // @@protoc_insertion_point(field_get:waypoint.Icon.distance_fade_end) - return _internal_distance_fade_end(); -} -inline void Icon::_internal_set_distance_fade_end(float value) { - - distance_fade_end_ = value; -} -inline void Icon::set_distance_fade_end(float value) { - _internal_set_distance_fade_end(value); - // @@protoc_insertion_point(field_set:waypoint.Icon.distance_fade_end) -} - -// float distance_fade_start = 6; -inline void Icon::clear_distance_fade_start() { - distance_fade_start_ = 0; -} -inline float Icon::_internal_distance_fade_start() const { - return distance_fade_start_; -} -inline float Icon::distance_fade_start() const { - // @@protoc_insertion_point(field_get:waypoint.Icon.distance_fade_start) - return _internal_distance_fade_start(); -} -inline void Icon::_internal_set_distance_fade_start(float value) { - - distance_fade_start_ = value; -} -inline void Icon::set_distance_fade_start(float value) { - _internal_set_distance_fade_start(value); - // @@protoc_insertion_point(field_set:waypoint.Icon.distance_fade_start) -} - -// float height_offset = 7; -inline void Icon::clear_height_offset() { - height_offset_ = 0; -} -inline float Icon::_internal_height_offset() const { - return height_offset_; -} -inline float Icon::height_offset() const { - // @@protoc_insertion_point(field_get:waypoint.Icon.height_offset) - return _internal_height_offset(); -} -inline void Icon::_internal_set_height_offset(float value) { - - height_offset_ = value; -} -inline void Icon::set_height_offset(float value) { - _internal_set_height_offset(value); - // @@protoc_insertion_point(field_set:waypoint.Icon.height_offset) -} - -// .waypoint.Position position = 8; -inline bool Icon::_internal_has_position() const { - return this != internal_default_instance() && position_ != nullptr; -} -inline bool Icon::has_position() const { - return _internal_has_position(); -} -inline void Icon::clear_position() { - if (GetArena() == nullptr && position_ != nullptr) { - delete position_; - } - position_ = nullptr; -} -inline const ::waypoint::Position& Icon::_internal_position() const { - const ::waypoint::Position* p = position_; - return p != nullptr ? *p : *reinterpret_cast( - &::waypoint::_Position_default_instance_); -} -inline const ::waypoint::Position& Icon::position() const { - // @@protoc_insertion_point(field_get:waypoint.Icon.position) - return _internal_position(); -} -inline void Icon::unsafe_arena_set_allocated_position( - ::waypoint::Position* position) { - if (GetArena() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(position_); - } - position_ = position; - if (position) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Icon.position) -} -inline ::waypoint::Position* Icon::release_position() { - auto temp = unsafe_arena_release_position(); - if (GetArena() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } - return temp; -} -inline ::waypoint::Position* Icon::unsafe_arena_release_position() { - // @@protoc_insertion_point(field_release:waypoint.Icon.position) - - ::waypoint::Position* temp = position_; - position_ = nullptr; - return temp; -} -inline ::waypoint::Position* Icon::_internal_mutable_position() { - - if (position_ == nullptr) { - auto* p = CreateMaybeMessage<::waypoint::Position>(GetArena()); - position_ = p; - } - return position_; -} -inline ::waypoint::Position* Icon::mutable_position() { - // @@protoc_insertion_point(field_mutable:waypoint.Icon.position) - return _internal_mutable_position(); -} -inline void Icon::set_allocated_position(::waypoint::Position* position) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); - if (message_arena == nullptr) { - delete position_; - } - if (position) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(position); - if (message_arena != submessage_arena) { - position = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, position, submessage_arena); - } - - } else { - - } - position_ = position; - // @@protoc_insertion_point(field_set_allocated:waypoint.Icon.position) -} - -// .waypoint.ResetBehavior reset_behavior = 9; -inline void Icon::clear_reset_behavior() { - reset_behavior_ = 0; -} -inline ::waypoint::ResetBehavior Icon::_internal_reset_behavior() const { - return static_cast< ::waypoint::ResetBehavior >(reset_behavior_); -} -inline ::waypoint::ResetBehavior Icon::reset_behavior() const { - // @@protoc_insertion_point(field_get:waypoint.Icon.reset_behavior) - return _internal_reset_behavior(); -} -inline void Icon::_internal_set_reset_behavior(::waypoint::ResetBehavior value) { - - reset_behavior_ = value; -} -inline void Icon::set_reset_behavior(::waypoint::ResetBehavior value) { - _internal_set_reset_behavior(value); - // @@protoc_insertion_point(field_set:waypoint.Icon.reset_behavior) -} - -// .waypoint.Trigger trigger = 10; -inline bool Icon::_internal_has_trigger() const { - return this != internal_default_instance() && trigger_ != nullptr; -} -inline bool Icon::has_trigger() const { - return _internal_has_trigger(); -} -inline void Icon::clear_trigger() { - if (GetArena() == nullptr && trigger_ != nullptr) { - delete trigger_; - } - trigger_ = nullptr; -} -inline const ::waypoint::Trigger& Icon::_internal_trigger() const { - const ::waypoint::Trigger* p = trigger_; - return p != nullptr ? *p : *reinterpret_cast( - &::waypoint::_Trigger_default_instance_); -} -inline const ::waypoint::Trigger& Icon::trigger() const { - // @@protoc_insertion_point(field_get:waypoint.Icon.trigger) - return _internal_trigger(); -} -inline void Icon::unsafe_arena_set_allocated_trigger( - ::waypoint::Trigger* trigger) { - if (GetArena() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(trigger_); - } - trigger_ = trigger; - if (trigger) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Icon.trigger) -} -inline ::waypoint::Trigger* Icon::release_trigger() { - auto temp = unsafe_arena_release_trigger(); - if (GetArena() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } - return temp; -} -inline ::waypoint::Trigger* Icon::unsafe_arena_release_trigger() { - // @@protoc_insertion_point(field_release:waypoint.Icon.trigger) - - ::waypoint::Trigger* temp = trigger_; - trigger_ = nullptr; - return temp; -} -inline ::waypoint::Trigger* Icon::_internal_mutable_trigger() { - - if (trigger_ == nullptr) { - auto* p = CreateMaybeMessage<::waypoint::Trigger>(GetArena()); - trigger_ = p; - } - return trigger_; -} -inline ::waypoint::Trigger* Icon::mutable_trigger() { - // @@protoc_insertion_point(field_mutable:waypoint.Icon.trigger) - return _internal_mutable_trigger(); -} -inline void Icon::set_allocated_trigger(::waypoint::Trigger* trigger) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); - if (message_arena == nullptr) { - delete trigger_; - } - if (trigger) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(trigger); - if (message_arena != submessage_arena) { - trigger = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, trigger, submessage_arena); - } - - } else { - - } - trigger_ = trigger; - // @@protoc_insertion_point(field_set_allocated:waypoint.Icon.trigger) -} - -// fixed32 achievement_bit = 16; -inline void Icon::clear_achievement_bit() { - achievement_bit_ = 0u; -} -inline ::PROTOBUF_NAMESPACE_ID::uint32 Icon::_internal_achievement_bit() const { - return achievement_bit_; -} -inline ::PROTOBUF_NAMESPACE_ID::uint32 Icon::achievement_bit() const { - // @@protoc_insertion_point(field_get:waypoint.Icon.achievement_bit) - return _internal_achievement_bit(); -} -inline void Icon::_internal_set_achievement_bit(::PROTOBUF_NAMESPACE_ID::uint32 value) { - - achievement_bit_ = value; -} -inline void Icon::set_achievement_bit(::PROTOBUF_NAMESPACE_ID::uint32 value) { - _internal_set_achievement_bit(value); - // @@protoc_insertion_point(field_set:waypoint.Icon.achievement_bit) -} - -// int32 achievement_id = 17; -inline void Icon::clear_achievement_id() { - achievement_id_ = 0; -} -inline ::PROTOBUF_NAMESPACE_ID::int32 Icon::_internal_achievement_id() const { - return achievement_id_; -} -inline ::PROTOBUF_NAMESPACE_ID::int32 Icon::achievement_id() const { - // @@protoc_insertion_point(field_get:waypoint.Icon.achievement_id) - return _internal_achievement_id(); -} -inline void Icon::_internal_set_achievement_id(::PROTOBUF_NAMESPACE_ID::int32 value) { - - achievement_id_ = value; -} -inline void Icon::set_achievement_id(::PROTOBUF_NAMESPACE_ID::int32 value) { - _internal_set_achievement_id(value); - // @@protoc_insertion_point(field_set:waypoint.Icon.achievement_id) -} - -// float alpha = 18; -inline void Icon::clear_alpha() { - alpha_ = 0; -} -inline float Icon::_internal_alpha() const { - return alpha_; -} -inline float Icon::alpha() const { - // @@protoc_insertion_point(field_get:waypoint.Icon.alpha) - return _internal_alpha(); -} -inline void Icon::_internal_set_alpha(float value) { - - alpha_ = value; -} -inline void Icon::set_alpha(float value) { - _internal_set_alpha(value); - // @@protoc_insertion_point(field_set:waypoint.Icon.alpha) -} - -// bool can_fade = 19; -inline void Icon::clear_can_fade() { - can_fade_ = false; -} -inline bool Icon::_internal_can_fade() const { - return can_fade_; -} -inline bool Icon::can_fade() const { - // @@protoc_insertion_point(field_get:waypoint.Icon.can_fade) - return _internal_can_fade(); -} -inline void Icon::_internal_set_can_fade(bool value) { - - can_fade_ = value; -} -inline void Icon::set_can_fade(bool value) { - _internal_set_can_fade(value); - // @@protoc_insertion_point(field_set:waypoint.Icon.can_fade) -} - -// int32 minimum_size_on_screen = 20; -inline void Icon::clear_minimum_size_on_screen() { - minimum_size_on_screen_ = 0; -} -inline ::PROTOBUF_NAMESPACE_ID::int32 Icon::_internal_minimum_size_on_screen() const { - return minimum_size_on_screen_; -} -inline ::PROTOBUF_NAMESPACE_ID::int32 Icon::minimum_size_on_screen() const { - // @@protoc_insertion_point(field_get:waypoint.Icon.minimum_size_on_screen) - return _internal_minimum_size_on_screen(); -} -inline void Icon::_internal_set_minimum_size_on_screen(::PROTOBUF_NAMESPACE_ID::int32 value) { - - minimum_size_on_screen_ = value; -} -inline void Icon::set_minimum_size_on_screen(::PROTOBUF_NAMESPACE_ID::int32 value) { - _internal_set_minimum_size_on_screen(value); - // @@protoc_insertion_point(field_set:waypoint.Icon.minimum_size_on_screen) -} - -// int32 map_display_size = 21; -inline void Icon::clear_map_display_size() { - map_display_size_ = 0; -} -inline ::PROTOBUF_NAMESPACE_ID::int32 Icon::_internal_map_display_size() const { - return map_display_size_; -} -inline ::PROTOBUF_NAMESPACE_ID::int32 Icon::map_display_size() const { - // @@protoc_insertion_point(field_get:waypoint.Icon.map_display_size) - return _internal_map_display_size(); -} -inline void Icon::_internal_set_map_display_size(::PROTOBUF_NAMESPACE_ID::int32 value) { - - map_display_size_ = value; -} -inline void Icon::set_map_display_size(::PROTOBUF_NAMESPACE_ID::int32 value) { - _internal_set_map_display_size(value); - // @@protoc_insertion_point(field_set:waypoint.Icon.map_display_size) -} - -// int32 maximum_size_on_screen = 22; -inline void Icon::clear_maximum_size_on_screen() { - maximum_size_on_screen_ = 0; -} -inline ::PROTOBUF_NAMESPACE_ID::int32 Icon::_internal_maximum_size_on_screen() const { - return maximum_size_on_screen_; -} -inline ::PROTOBUF_NAMESPACE_ID::int32 Icon::maximum_size_on_screen() const { - // @@protoc_insertion_point(field_get:waypoint.Icon.maximum_size_on_screen) - return _internal_maximum_size_on_screen(); -} -inline void Icon::_internal_set_maximum_size_on_screen(::PROTOBUF_NAMESPACE_ID::int32 value) { - - maximum_size_on_screen_ = value; -} -inline void Icon::set_maximum_size_on_screen(::PROTOBUF_NAMESPACE_ID::int32 value) { - _internal_set_maximum_size_on_screen(value); - // @@protoc_insertion_point(field_set:waypoint.Icon.maximum_size_on_screen) -} - -// bool scale_on_map_with_zoom = 23; -inline void Icon::clear_scale_on_map_with_zoom() { - scale_on_map_with_zoom_ = false; -} -inline bool Icon::_internal_scale_on_map_with_zoom() const { - return scale_on_map_with_zoom_; -} -inline bool Icon::scale_on_map_with_zoom() const { - // @@protoc_insertion_point(field_get:waypoint.Icon.scale_on_map_with_zoom) - return _internal_scale_on_map_with_zoom(); -} -inline void Icon::_internal_set_scale_on_map_with_zoom(bool value) { - - scale_on_map_with_zoom_ = value; -} -inline void Icon::set_scale_on_map_with_zoom(bool value) { - _internal_set_scale_on_map_with_zoom(value); - // @@protoc_insertion_point(field_set:waypoint.Icon.scale_on_map_with_zoom) -} - -// string tip_description = 24; -inline void Icon::clear_tip_description() { - tip_description_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline const std::string& Icon::tip_description() const { - // @@protoc_insertion_point(field_get:waypoint.Icon.tip_description) - return _internal_tip_description(); -} -inline void Icon::set_tip_description(const std::string& value) { - _internal_set_tip_description(value); - // @@protoc_insertion_point(field_set:waypoint.Icon.tip_description) -} -inline std::string* Icon::mutable_tip_description() { - // @@protoc_insertion_point(field_mutable:waypoint.Icon.tip_description) - return _internal_mutable_tip_description(); -} -inline const std::string& Icon::_internal_tip_description() const { - return tip_description_.Get(); -} -inline void Icon::_internal_set_tip_description(const std::string& value) { - - tip_description_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); -} -inline void Icon::set_tip_description(std::string&& value) { - - tip_description_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:waypoint.Icon.tip_description) -} -inline void Icon::set_tip_description(const char* value) { - GOOGLE_DCHECK(value != nullptr); - - tip_description_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArena()); - // @@protoc_insertion_point(field_set_char:waypoint.Icon.tip_description) -} -inline void Icon::set_tip_description(const char* value, - size_t size) { - - tip_description_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:waypoint.Icon.tip_description) -} -inline std::string* Icon::_internal_mutable_tip_description() { - - return tip_description_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline std::string* Icon::release_tip_description() { - // @@protoc_insertion_point(field_release:waypoint.Icon.tip_description) - return tip_description_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void Icon::set_allocated_tip_description(std::string* tip_description) { - if (tip_description != nullptr) { - - } else { - - } - tip_description_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), tip_description, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:waypoint.Icon.tip_description) -} -inline std::string* Icon::unsafe_arena_release_tip_description() { - // @@protoc_insertion_point(field_unsafe_arena_release:waypoint.Icon.tip_description) - GOOGLE_DCHECK(GetArena() != nullptr); - - return tip_description_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArena()); -} -inline void Icon::unsafe_arena_set_allocated_tip_description( - std::string* tip_description) { - GOOGLE_DCHECK(GetArena() != nullptr); - if (tip_description != nullptr) { - - } else { - - } - tip_description_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - tip_description, GetArena()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Icon.tip_description) -} - -// string tip_name = 25; -inline void Icon::clear_tip_name() { - tip_name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline const std::string& Icon::tip_name() const { - // @@protoc_insertion_point(field_get:waypoint.Icon.tip_name) - return _internal_tip_name(); -} -inline void Icon::set_tip_name(const std::string& value) { - _internal_set_tip_name(value); - // @@protoc_insertion_point(field_set:waypoint.Icon.tip_name) -} -inline std::string* Icon::mutable_tip_name() { - // @@protoc_insertion_point(field_mutable:waypoint.Icon.tip_name) - return _internal_mutable_tip_name(); -} -inline const std::string& Icon::_internal_tip_name() const { - return tip_name_.Get(); -} -inline void Icon::_internal_set_tip_name(const std::string& value) { - - tip_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); -} -inline void Icon::set_tip_name(std::string&& value) { - - tip_name_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:waypoint.Icon.tip_name) -} -inline void Icon::set_tip_name(const char* value) { - GOOGLE_DCHECK(value != nullptr); - - tip_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArena()); - // @@protoc_insertion_point(field_set_char:waypoint.Icon.tip_name) -} -inline void Icon::set_tip_name(const char* value, - size_t size) { - - tip_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:waypoint.Icon.tip_name) -} -inline std::string* Icon::_internal_mutable_tip_name() { - - return tip_name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline std::string* Icon::release_tip_name() { - // @@protoc_insertion_point(field_release:waypoint.Icon.tip_name) - return tip_name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void Icon::set_allocated_tip_name(std::string* tip_name) { - if (tip_name != nullptr) { - - } else { - - } - tip_name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), tip_name, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:waypoint.Icon.tip_name) -} -inline std::string* Icon::unsafe_arena_release_tip_name() { - // @@protoc_insertion_point(field_unsafe_arena_release:waypoint.Icon.tip_name) - GOOGLE_DCHECK(GetArena() != nullptr); - - return tip_name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArena()); -} -inline void Icon::unsafe_arena_set_allocated_tip_name( - std::string* tip_name) { - GOOGLE_DCHECK(GetArena() != nullptr); - if (tip_name != nullptr) { - - } else { - - } - tip_name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - tip_name, GetArena()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Icon.tip_name) -} - -// float __tentative__scale = 2048; -inline void Icon::clear___tentative__scale() { - __tentative__scale_ = 0; -} -inline float Icon::_internal___tentative__scale() const { - return __tentative__scale_; -} -inline float Icon::__tentative__scale() const { - // @@protoc_insertion_point(field_get:waypoint.Icon.__tentative__scale) - return _internal___tentative__scale(); -} -inline void Icon::_internal_set___tentative__scale(float value) { - - __tentative__scale_ = value; -} -inline void Icon::set___tentative__scale(float value) { - _internal_set___tentative__scale(value); - // @@protoc_insertion_point(field_set:waypoint.Icon.__tentative__scale) -} - -// bool __tentative__render_ingame = 2049; -inline void Icon::clear___tentative__render_ingame() { - __tentative__render_ingame_ = false; -} -inline bool Icon::_internal___tentative__render_ingame() const { - return __tentative__render_ingame_; -} -inline bool Icon::__tentative__render_ingame() const { - // @@protoc_insertion_point(field_get:waypoint.Icon.__tentative__render_ingame) - return _internal___tentative__render_ingame(); -} -inline void Icon::_internal_set___tentative__render_ingame(bool value) { - - __tentative__render_ingame_ = value; -} -inline void Icon::set___tentative__render_ingame(bool value) { - _internal_set___tentative__render_ingame(value); - // @@protoc_insertion_point(field_set:waypoint.Icon.__tentative__render_ingame) -} - -// bool __tentative__render_on_map = 2050; -inline void Icon::clear___tentative__render_on_map() { - __tentative__render_on_map_ = false; -} -inline bool Icon::_internal___tentative__render_on_map() const { - return __tentative__render_on_map_; -} -inline bool Icon::__tentative__render_on_map() const { - // @@protoc_insertion_point(field_get:waypoint.Icon.__tentative__render_on_map) - return _internal___tentative__render_on_map(); -} -inline void Icon::_internal_set___tentative__render_on_map(bool value) { - - __tentative__render_on_map_ = value; -} -inline void Icon::set___tentative__render_on_map(bool value) { - _internal_set___tentative__render_on_map(value); - // @@protoc_insertion_point(field_set:waypoint.Icon.__tentative__render_on_map) -} - -// bool __tentative__render_on_minimap = 2051; -inline void Icon::clear___tentative__render_on_minimap() { - __tentative__render_on_minimap_ = false; -} -inline bool Icon::_internal___tentative__render_on_minimap() const { - return __tentative__render_on_minimap_; -} -inline bool Icon::__tentative__render_on_minimap() const { - // @@protoc_insertion_point(field_get:waypoint.Icon.__tentative__render_on_minimap) - return _internal___tentative__render_on_minimap(); -} -inline void Icon::_internal_set___tentative__render_on_minimap(bool value) { - - __tentative__render_on_minimap_ = value; -} -inline void Icon::set___tentative__render_on_minimap(bool value) { - _internal_set___tentative__render_on_minimap(value); - // @@protoc_insertion_point(field_set:waypoint.Icon.__tentative__render_on_minimap) -} - -// string bhdraft__schedule = 2052; -inline void Icon::clear_bhdraft__schedule() { - bhdraft__schedule_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline const std::string& Icon::bhdraft__schedule() const { - // @@protoc_insertion_point(field_get:waypoint.Icon.bhdraft__schedule) - return _internal_bhdraft__schedule(); -} -inline void Icon::set_bhdraft__schedule(const std::string& value) { - _internal_set_bhdraft__schedule(value); - // @@protoc_insertion_point(field_set:waypoint.Icon.bhdraft__schedule) -} -inline std::string* Icon::mutable_bhdraft__schedule() { - // @@protoc_insertion_point(field_mutable:waypoint.Icon.bhdraft__schedule) - return _internal_mutable_bhdraft__schedule(); -} -inline const std::string& Icon::_internal_bhdraft__schedule() const { - return bhdraft__schedule_.Get(); -} -inline void Icon::_internal_set_bhdraft__schedule(const std::string& value) { - - bhdraft__schedule_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); -} -inline void Icon::set_bhdraft__schedule(std::string&& value) { - - bhdraft__schedule_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:waypoint.Icon.bhdraft__schedule) -} -inline void Icon::set_bhdraft__schedule(const char* value) { - GOOGLE_DCHECK(value != nullptr); - - bhdraft__schedule_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArena()); - // @@protoc_insertion_point(field_set_char:waypoint.Icon.bhdraft__schedule) -} -inline void Icon::set_bhdraft__schedule(const char* value, - size_t size) { - - bhdraft__schedule_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:waypoint.Icon.bhdraft__schedule) -} -inline std::string* Icon::_internal_mutable_bhdraft__schedule() { - - return bhdraft__schedule_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline std::string* Icon::release_bhdraft__schedule() { - // @@protoc_insertion_point(field_release:waypoint.Icon.bhdraft__schedule) - return bhdraft__schedule_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void Icon::set_allocated_bhdraft__schedule(std::string* bhdraft__schedule) { - if (bhdraft__schedule != nullptr) { - - } else { - - } - bhdraft__schedule_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), bhdraft__schedule, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:waypoint.Icon.bhdraft__schedule) -} -inline std::string* Icon::unsafe_arena_release_bhdraft__schedule() { - // @@protoc_insertion_point(field_unsafe_arena_release:waypoint.Icon.bhdraft__schedule) - GOOGLE_DCHECK(GetArena() != nullptr); - - return bhdraft__schedule_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArena()); -} -inline void Icon::unsafe_arena_set_allocated_bhdraft__schedule( - std::string* bhdraft__schedule) { - GOOGLE_DCHECK(GetArena() != nullptr); - if (bhdraft__schedule != nullptr) { - - } else { - - } - bhdraft__schedule_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - bhdraft__schedule, GetArena()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Icon.bhdraft__schedule) -} - -// float bhdraft__schedule_duration = 2053; -inline void Icon::clear_bhdraft__schedule_duration() { - bhdraft__schedule_duration_ = 0; -} -inline float Icon::_internal_bhdraft__schedule_duration() const { - return bhdraft__schedule_duration_; -} -inline float Icon::bhdraft__schedule_duration() const { - // @@protoc_insertion_point(field_get:waypoint.Icon.bhdraft__schedule_duration) - return _internal_bhdraft__schedule_duration(); -} -inline void Icon::_internal_set_bhdraft__schedule_duration(float value) { - - bhdraft__schedule_duration_ = value; -} -inline void Icon::set_bhdraft__schedule_duration(float value) { - _internal_set_bhdraft__schedule_duration(value); - // @@protoc_insertion_point(field_set:waypoint.Icon.bhdraft__schedule_duration) -} - -// ------------------------------------------------------------------- - -// Trail - -// .waypoint.Category category = 1; -inline bool Trail::_internal_has_category() const { - return this != internal_default_instance() && category_ != nullptr; -} -inline bool Trail::has_category() const { - return _internal_has_category(); -} -inline void Trail::clear_category() { - if (GetArena() == nullptr && category_ != nullptr) { - delete category_; - } - category_ = nullptr; -} -inline const ::waypoint::Category& Trail::_internal_category() const { - const ::waypoint::Category* p = category_; - return p != nullptr ? *p : *reinterpret_cast( - &::waypoint::_Category_default_instance_); -} -inline const ::waypoint::Category& Trail::category() const { - // @@protoc_insertion_point(field_get:waypoint.Trail.category) - return _internal_category(); -} -inline void Trail::unsafe_arena_set_allocated_category( - ::waypoint::Category* category) { - if (GetArena() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(category_); - } - category_ = category; - if (category) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Trail.category) -} -inline ::waypoint::Category* Trail::release_category() { - auto temp = unsafe_arena_release_category(); - if (GetArena() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } - return temp; -} -inline ::waypoint::Category* Trail::unsafe_arena_release_category() { - // @@protoc_insertion_point(field_release:waypoint.Trail.category) - - ::waypoint::Category* temp = category_; - category_ = nullptr; - return temp; -} -inline ::waypoint::Category* Trail::_internal_mutable_category() { - - if (category_ == nullptr) { - auto* p = CreateMaybeMessage<::waypoint::Category>(GetArena()); - category_ = p; - } - return category_; -} -inline ::waypoint::Category* Trail::mutable_category() { - // @@protoc_insertion_point(field_mutable:waypoint.Trail.category) - return _internal_mutable_category(); -} -inline void Trail::set_allocated_category(::waypoint::Category* category) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); - if (message_arena == nullptr) { - delete category_; - } - if (category) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(category); - if (message_arena != submessage_arena) { - category = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, category, submessage_arena); - } - - } else { - - } - category_ = category; - // @@protoc_insertion_point(field_set_allocated:waypoint.Trail.category) -} - -// .waypoint.Texture texture = 2; -inline bool Trail::_internal_has_texture() const { - return this != internal_default_instance() && texture_ != nullptr; -} -inline bool Trail::has_texture() const { - return _internal_has_texture(); -} -inline void Trail::clear_texture() { - if (GetArena() == nullptr && texture_ != nullptr) { - delete texture_; - } - texture_ = nullptr; -} -inline const ::waypoint::Texture& Trail::_internal_texture() const { - const ::waypoint::Texture* p = texture_; - return p != nullptr ? *p : *reinterpret_cast( - &::waypoint::_Texture_default_instance_); -} -inline const ::waypoint::Texture& Trail::texture() const { - // @@protoc_insertion_point(field_get:waypoint.Trail.texture) - return _internal_texture(); -} -inline void Trail::unsafe_arena_set_allocated_texture( - ::waypoint::Texture* texture) { - if (GetArena() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(texture_); - } - texture_ = texture; - if (texture) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Trail.texture) -} -inline ::waypoint::Texture* Trail::release_texture() { - auto temp = unsafe_arena_release_texture(); - if (GetArena() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } - return temp; -} -inline ::waypoint::Texture* Trail::unsafe_arena_release_texture() { - // @@protoc_insertion_point(field_release:waypoint.Trail.texture) - - ::waypoint::Texture* temp = texture_; - texture_ = nullptr; - return temp; -} -inline ::waypoint::Texture* Trail::_internal_mutable_texture() { - - if (texture_ == nullptr) { - auto* p = CreateMaybeMessage<::waypoint::Texture>(GetArena()); - texture_ = p; - } - return texture_; -} -inline ::waypoint::Texture* Trail::mutable_texture() { - // @@protoc_insertion_point(field_mutable:waypoint.Trail.texture) - return _internal_mutable_texture(); -} -inline void Trail::set_allocated_texture(::waypoint::Texture* texture) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); - if (message_arena == nullptr) { - delete texture_; - } - if (texture) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(texture); - if (message_arena != submessage_arena) { - texture = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, texture, submessage_arena); - } - - } else { - - } - texture_ = texture; - // @@protoc_insertion_point(field_set_allocated:waypoint.Trail.texture) -} - -// .waypoint.GUID guid = 3; -inline bool Trail::_internal_has_guid() const { - return this != internal_default_instance() && guid_ != nullptr; -} -inline bool Trail::has_guid() const { - return _internal_has_guid(); -} -inline void Trail::clear_guid() { - if (GetArena() == nullptr && guid_ != nullptr) { - delete guid_; - } - guid_ = nullptr; -} -inline const ::waypoint::GUID& Trail::_internal_guid() const { - const ::waypoint::GUID* p = guid_; - return p != nullptr ? *p : *reinterpret_cast( - &::waypoint::_GUID_default_instance_); -} -inline const ::waypoint::GUID& Trail::guid() const { - // @@protoc_insertion_point(field_get:waypoint.Trail.guid) - return _internal_guid(); -} -inline void Trail::unsafe_arena_set_allocated_guid( - ::waypoint::GUID* guid) { - if (GetArena() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(guid_); - } - guid_ = guid; - if (guid) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Trail.guid) -} -inline ::waypoint::GUID* Trail::release_guid() { - auto temp = unsafe_arena_release_guid(); - if (GetArena() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } - return temp; -} -inline ::waypoint::GUID* Trail::unsafe_arena_release_guid() { - // @@protoc_insertion_point(field_release:waypoint.Trail.guid) - - ::waypoint::GUID* temp = guid_; - guid_ = nullptr; - return temp; -} -inline ::waypoint::GUID* Trail::_internal_mutable_guid() { - - if (guid_ == nullptr) { - auto* p = CreateMaybeMessage<::waypoint::GUID>(GetArena()); - guid_ = p; - } - return guid_; -} -inline ::waypoint::GUID* Trail::mutable_guid() { - // @@protoc_insertion_point(field_mutable:waypoint.Trail.guid) - return _internal_mutable_guid(); -} -inline void Trail::set_allocated_guid(::waypoint::GUID* guid) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); - if (message_arena == nullptr) { - delete guid_; - } - if (guid) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(guid); - if (message_arena != submessage_arena) { - guid = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, guid, submessage_arena); - } - - } else { - - } - guid_ = guid; - // @@protoc_insertion_point(field_set_allocated:waypoint.Trail.guid) -} - -// int32 map_id = 4; -inline void Trail::clear_map_id() { - map_id_ = 0; -} -inline ::PROTOBUF_NAMESPACE_ID::int32 Trail::_internal_map_id() const { - return map_id_; -} -inline ::PROTOBUF_NAMESPACE_ID::int32 Trail::map_id() const { - // @@protoc_insertion_point(field_get:waypoint.Trail.map_id) - return _internal_map_id(); -} -inline void Trail::_internal_set_map_id(::PROTOBUF_NAMESPACE_ID::int32 value) { - - map_id_ = value; -} -inline void Trail::set_map_id(::PROTOBUF_NAMESPACE_ID::int32 value) { - _internal_set_map_id(value); - // @@protoc_insertion_point(field_set:waypoint.Trail.map_id) -} - -// float distance_fade_end = 5; -inline void Trail::clear_distance_fade_end() { - distance_fade_end_ = 0; -} -inline float Trail::_internal_distance_fade_end() const { - return distance_fade_end_; -} -inline float Trail::distance_fade_end() const { - // @@protoc_insertion_point(field_get:waypoint.Trail.distance_fade_end) - return _internal_distance_fade_end(); -} -inline void Trail::_internal_set_distance_fade_end(float value) { - - distance_fade_end_ = value; -} -inline void Trail::set_distance_fade_end(float value) { - _internal_set_distance_fade_end(value); - // @@protoc_insertion_point(field_set:waypoint.Trail.distance_fade_end) -} - -// float distance_fade_start = 6; -inline void Trail::clear_distance_fade_start() { - distance_fade_start_ = 0; -} -inline float Trail::_internal_distance_fade_start() const { - return distance_fade_start_; -} -inline float Trail::distance_fade_start() const { - // @@protoc_insertion_point(field_get:waypoint.Trail.distance_fade_start) - return _internal_distance_fade_start(); -} -inline void Trail::_internal_set_distance_fade_start(float value) { - - distance_fade_start_ = value; -} -inline void Trail::set_distance_fade_start(float value) { - _internal_set_distance_fade_start(value); - // @@protoc_insertion_point(field_set:waypoint.Trail.distance_fade_start) -} - -// .waypoint.TrailData trail_data = 7; -inline bool Trail::_internal_has_trail_data() const { - return this != internal_default_instance() && trail_data_ != nullptr; -} -inline bool Trail::has_trail_data() const { - return _internal_has_trail_data(); -} -inline void Trail::clear_trail_data() { - if (GetArena() == nullptr && trail_data_ != nullptr) { - delete trail_data_; - } - trail_data_ = nullptr; -} -inline const ::waypoint::TrailData& Trail::_internal_trail_data() const { - const ::waypoint::TrailData* p = trail_data_; - return p != nullptr ? *p : *reinterpret_cast( - &::waypoint::_TrailData_default_instance_); -} -inline const ::waypoint::TrailData& Trail::trail_data() const { - // @@protoc_insertion_point(field_get:waypoint.Trail.trail_data) - return _internal_trail_data(); -} -inline void Trail::unsafe_arena_set_allocated_trail_data( - ::waypoint::TrailData* trail_data) { - if (GetArena() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(trail_data_); - } - trail_data_ = trail_data; - if (trail_data) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Trail.trail_data) -} -inline ::waypoint::TrailData* Trail::release_trail_data() { - auto temp = unsafe_arena_release_trail_data(); - if (GetArena() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } - return temp; -} -inline ::waypoint::TrailData* Trail::unsafe_arena_release_trail_data() { - // @@protoc_insertion_point(field_release:waypoint.Trail.trail_data) - - ::waypoint::TrailData* temp = trail_data_; - trail_data_ = nullptr; - return temp; -} -inline ::waypoint::TrailData* Trail::_internal_mutable_trail_data() { - - if (trail_data_ == nullptr) { - auto* p = CreateMaybeMessage<::waypoint::TrailData>(GetArena()); - trail_data_ = p; - } - return trail_data_; -} -inline ::waypoint::TrailData* Trail::mutable_trail_data() { - // @@protoc_insertion_point(field_mutable:waypoint.Trail.trail_data) - return _internal_mutable_trail_data(); -} -inline void Trail::set_allocated_trail_data(::waypoint::TrailData* trail_data) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); - if (message_arena == nullptr) { - delete trail_data_; - } - if (trail_data) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(trail_data); - if (message_arena != submessage_arena) { - trail_data = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, trail_data, submessage_arena); - } - - } else { - - } - trail_data_ = trail_data; - // @@protoc_insertion_point(field_set_allocated:waypoint.Trail.trail_data) -} - -// float animation_speed = 8; -inline void Trail::clear_animation_speed() { - animation_speed_ = 0; -} -inline float Trail::_internal_animation_speed() const { - return animation_speed_; -} -inline float Trail::animation_speed() const { - // @@protoc_insertion_point(field_get:waypoint.Trail.animation_speed) - return _internal_animation_speed(); -} -inline void Trail::_internal_set_animation_speed(float value) { - - animation_speed_ = value; -} -inline void Trail::set_animation_speed(float value) { - _internal_set_animation_speed(value); - // @@protoc_insertion_point(field_set:waypoint.Trail.animation_speed) -} - -// .waypoint.CullChirality cull_chirality = 9; -inline void Trail::clear_cull_chirality() { - cull_chirality_ = 0; -} -inline ::waypoint::CullChirality Trail::_internal_cull_chirality() const { - return static_cast< ::waypoint::CullChirality >(cull_chirality_); -} -inline ::waypoint::CullChirality Trail::cull_chirality() const { - // @@protoc_insertion_point(field_get:waypoint.Trail.cull_chirality) - return _internal_cull_chirality(); -} -inline void Trail::_internal_set_cull_chirality(::waypoint::CullChirality value) { - - cull_chirality_ = value; -} -inline void Trail::set_cull_chirality(::waypoint::CullChirality value) { - _internal_set_cull_chirality(value); - // @@protoc_insertion_point(field_set:waypoint.Trail.cull_chirality) -} - -// fixed32 achievement_bit = 16; -inline void Trail::clear_achievement_bit() { - achievement_bit_ = 0u; -} -inline ::PROTOBUF_NAMESPACE_ID::uint32 Trail::_internal_achievement_bit() const { - return achievement_bit_; -} -inline ::PROTOBUF_NAMESPACE_ID::uint32 Trail::achievement_bit() const { - // @@protoc_insertion_point(field_get:waypoint.Trail.achievement_bit) - return _internal_achievement_bit(); -} -inline void Trail::_internal_set_achievement_bit(::PROTOBUF_NAMESPACE_ID::uint32 value) { - - achievement_bit_ = value; -} -inline void Trail::set_achievement_bit(::PROTOBUF_NAMESPACE_ID::uint32 value) { - _internal_set_achievement_bit(value); - // @@protoc_insertion_point(field_set:waypoint.Trail.achievement_bit) -} - -// int32 achievement_id = 17; -inline void Trail::clear_achievement_id() { - achievement_id_ = 0; -} -inline ::PROTOBUF_NAMESPACE_ID::int32 Trail::_internal_achievement_id() const { - return achievement_id_; -} -inline ::PROTOBUF_NAMESPACE_ID::int32 Trail::achievement_id() const { - // @@protoc_insertion_point(field_get:waypoint.Trail.achievement_id) - return _internal_achievement_id(); -} -inline void Trail::_internal_set_achievement_id(::PROTOBUF_NAMESPACE_ID::int32 value) { - - achievement_id_ = value; -} -inline void Trail::set_achievement_id(::PROTOBUF_NAMESPACE_ID::int32 value) { - _internal_set_achievement_id(value); - // @@protoc_insertion_point(field_set:waypoint.Trail.achievement_id) -} - -// float alpha = 18; -inline void Trail::clear_alpha() { - alpha_ = 0; -} -inline float Trail::_internal_alpha() const { - return alpha_; -} -inline float Trail::alpha() const { - // @@protoc_insertion_point(field_get:waypoint.Trail.alpha) - return _internal_alpha(); -} -inline void Trail::_internal_set_alpha(float value) { - - alpha_ = value; -} -inline void Trail::set_alpha(float value) { - _internal_set_alpha(value); - // @@protoc_insertion_point(field_set:waypoint.Trail.alpha) -} - -// bool can_fade = 19; -inline void Trail::clear_can_fade() { - can_fade_ = false; -} -inline bool Trail::_internal_can_fade() const { - return can_fade_; -} -inline bool Trail::can_fade() const { - // @@protoc_insertion_point(field_get:waypoint.Trail.can_fade) - return _internal_can_fade(); -} -inline void Trail::_internal_set_can_fade(bool value) { - - can_fade_ = value; -} -inline void Trail::set_can_fade(bool value) { - _internal_set_can_fade(value); - // @@protoc_insertion_point(field_set:waypoint.Trail.can_fade) -} - -// bool is_wall = 22; -inline void Trail::clear_is_wall() { - is_wall_ = false; -} -inline bool Trail::_internal_is_wall() const { - return is_wall_; -} -inline bool Trail::is_wall() const { - // @@protoc_insertion_point(field_get:waypoint.Trail.is_wall) - return _internal_is_wall(); -} -inline void Trail::_internal_set_is_wall(bool value) { - - is_wall_ = value; -} -inline void Trail::set_is_wall(bool value) { - _internal_set_is_wall(value); - // @@protoc_insertion_point(field_set:waypoint.Trail.is_wall) -} - -// string bhdraft__schedule = 23; -inline void Trail::clear_bhdraft__schedule() { - bhdraft__schedule_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline const std::string& Trail::bhdraft__schedule() const { - // @@protoc_insertion_point(field_get:waypoint.Trail.bhdraft__schedule) - return _internal_bhdraft__schedule(); -} -inline void Trail::set_bhdraft__schedule(const std::string& value) { - _internal_set_bhdraft__schedule(value); - // @@protoc_insertion_point(field_set:waypoint.Trail.bhdraft__schedule) -} -inline std::string* Trail::mutable_bhdraft__schedule() { - // @@protoc_insertion_point(field_mutable:waypoint.Trail.bhdraft__schedule) - return _internal_mutable_bhdraft__schedule(); -} -inline const std::string& Trail::_internal_bhdraft__schedule() const { - return bhdraft__schedule_.Get(); -} -inline void Trail::_internal_set_bhdraft__schedule(const std::string& value) { - - bhdraft__schedule_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); -} -inline void Trail::set_bhdraft__schedule(std::string&& value) { - - bhdraft__schedule_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:waypoint.Trail.bhdraft__schedule) -} -inline void Trail::set_bhdraft__schedule(const char* value) { - GOOGLE_DCHECK(value != nullptr); - - bhdraft__schedule_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArena()); - // @@protoc_insertion_point(field_set_char:waypoint.Trail.bhdraft__schedule) -} -inline void Trail::set_bhdraft__schedule(const char* value, - size_t size) { - - bhdraft__schedule_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:waypoint.Trail.bhdraft__schedule) -} -inline std::string* Trail::_internal_mutable_bhdraft__schedule() { - - return bhdraft__schedule_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline std::string* Trail::release_bhdraft__schedule() { - // @@protoc_insertion_point(field_release:waypoint.Trail.bhdraft__schedule) - return bhdraft__schedule_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void Trail::set_allocated_bhdraft__schedule(std::string* bhdraft__schedule) { - if (bhdraft__schedule != nullptr) { - - } else { - - } - bhdraft__schedule_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), bhdraft__schedule, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:waypoint.Trail.bhdraft__schedule) -} -inline std::string* Trail::unsafe_arena_release_bhdraft__schedule() { - // @@protoc_insertion_point(field_unsafe_arena_release:waypoint.Trail.bhdraft__schedule) - GOOGLE_DCHECK(GetArena() != nullptr); - - return bhdraft__schedule_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArena()); -} -inline void Trail::unsafe_arena_set_allocated_bhdraft__schedule( - std::string* bhdraft__schedule) { - GOOGLE_DCHECK(GetArena() != nullptr); - if (bhdraft__schedule != nullptr) { - - } else { - - } - bhdraft__schedule_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - bhdraft__schedule, GetArena()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Trail.bhdraft__schedule) -} - -// float bhdraft__schedule_duration = 24; -inline void Trail::clear_bhdraft__schedule_duration() { - bhdraft__schedule_duration_ = 0; -} -inline float Trail::_internal_bhdraft__schedule_duration() const { - return bhdraft__schedule_duration_; -} -inline float Trail::bhdraft__schedule_duration() const { - // @@protoc_insertion_point(field_get:waypoint.Trail.bhdraft__schedule_duration) - return _internal_bhdraft__schedule_duration(); -} -inline void Trail::_internal_set_bhdraft__schedule_duration(float value) { - - bhdraft__schedule_duration_ = value; -} -inline void Trail::set_bhdraft__schedule_duration(float value) { - _internal_set_bhdraft__schedule_duration(value); - // @@protoc_insertion_point(field_set:waypoint.Trail.bhdraft__schedule_duration) -} - -// float scale = 25; -inline void Trail::clear_scale() { - scale_ = 0; -} -inline float Trail::_internal_scale() const { - return scale_; -} -inline float Trail::scale() const { - // @@protoc_insertion_point(field_get:waypoint.Trail.scale) - return _internal_scale(); -} -inline void Trail::_internal_set_scale(float value) { - - scale_ = value; -} -inline void Trail::set_scale(float value) { - _internal_set_scale(value); - // @@protoc_insertion_point(field_set:waypoint.Trail.scale) -} - -// .waypoint.Color color = 26; -inline bool Trail::_internal_has_color() const { - return this != internal_default_instance() && color_ != nullptr; -} -inline bool Trail::has_color() const { - return _internal_has_color(); -} -inline void Trail::clear_color() { - if (GetArena() == nullptr && color_ != nullptr) { - delete color_; - } - color_ = nullptr; -} -inline const ::waypoint::Color& Trail::_internal_color() const { - const ::waypoint::Color* p = color_; - return p != nullptr ? *p : *reinterpret_cast( - &::waypoint::_Color_default_instance_); -} -inline const ::waypoint::Color& Trail::color() const { - // @@protoc_insertion_point(field_get:waypoint.Trail.color) - return _internal_color(); -} -inline void Trail::unsafe_arena_set_allocated_color( - ::waypoint::Color* color) { - if (GetArena() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(color_); - } - color_ = color; - if (color) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Trail.color) -} -inline ::waypoint::Color* Trail::release_color() { - auto temp = unsafe_arena_release_color(); - if (GetArena() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } - return temp; -} -inline ::waypoint::Color* Trail::unsafe_arena_release_color() { - // @@protoc_insertion_point(field_release:waypoint.Trail.color) - - ::waypoint::Color* temp = color_; - color_ = nullptr; - return temp; -} -inline ::waypoint::Color* Trail::_internal_mutable_color() { - - if (color_ == nullptr) { - auto* p = CreateMaybeMessage<::waypoint::Color>(GetArena()); - color_ = p; - } - return color_; -} -inline ::waypoint::Color* Trail::mutable_color() { - // @@protoc_insertion_point(field_mutable:waypoint.Trail.color) - return _internal_mutable_color(); -} -inline void Trail::set_allocated_color(::waypoint::Color* color) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); - if (message_arena == nullptr) { - delete color_; - } - if (color) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(color); - if (message_arena != submessage_arena) { - color = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, color, submessage_arena); - } - - } else { - - } - color_ = color; - // @@protoc_insertion_point(field_set_allocated:waypoint.Trail.color) -} - -// .waypoint.FestivalFilter festival_filter = 27; -inline bool Trail::_internal_has_festival_filter() const { - return this != internal_default_instance() && festival_filter_ != nullptr; -} -inline bool Trail::has_festival_filter() const { - return _internal_has_festival_filter(); -} -inline void Trail::clear_festival_filter() { - if (GetArena() == nullptr && festival_filter_ != nullptr) { - delete festival_filter_; - } - festival_filter_ = nullptr; -} -inline const ::waypoint::FestivalFilter& Trail::_internal_festival_filter() const { - const ::waypoint::FestivalFilter* p = festival_filter_; - return p != nullptr ? *p : *reinterpret_cast( - &::waypoint::_FestivalFilter_default_instance_); -} -inline const ::waypoint::FestivalFilter& Trail::festival_filter() const { - // @@protoc_insertion_point(field_get:waypoint.Trail.festival_filter) - return _internal_festival_filter(); -} -inline void Trail::unsafe_arena_set_allocated_festival_filter( - ::waypoint::FestivalFilter* festival_filter) { - if (GetArena() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(festival_filter_); - } - festival_filter_ = festival_filter; - if (festival_filter) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Trail.festival_filter) -} -inline ::waypoint::FestivalFilter* Trail::release_festival_filter() { - auto temp = unsafe_arena_release_festival_filter(); - if (GetArena() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } - return temp; -} -inline ::waypoint::FestivalFilter* Trail::unsafe_arena_release_festival_filter() { - // @@protoc_insertion_point(field_release:waypoint.Trail.festival_filter) - - ::waypoint::FestivalFilter* temp = festival_filter_; - festival_filter_ = nullptr; - return temp; -} -inline ::waypoint::FestivalFilter* Trail::_internal_mutable_festival_filter() { - - if (festival_filter_ == nullptr) { - auto* p = CreateMaybeMessage<::waypoint::FestivalFilter>(GetArena()); - festival_filter_ = p; - } - return festival_filter_; -} -inline ::waypoint::FestivalFilter* Trail::mutable_festival_filter() { - // @@protoc_insertion_point(field_mutable:waypoint.Trail.festival_filter) - return _internal_mutable_festival_filter(); -} -inline void Trail::set_allocated_festival_filter(::waypoint::FestivalFilter* festival_filter) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); - if (message_arena == nullptr) { - delete festival_filter_; - } - if (festival_filter) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(festival_filter); - if (message_arena != submessage_arena) { - festival_filter = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, festival_filter, submessage_arena); - } - - } else { - - } - festival_filter_ = festival_filter; - // @@protoc_insertion_point(field_set_allocated:waypoint.Trail.festival_filter) -} - -// .waypoint.MapTypeFilter map_type_filter = 28; -inline bool Trail::_internal_has_map_type_filter() const { - return this != internal_default_instance() && map_type_filter_ != nullptr; -} -inline bool Trail::has_map_type_filter() const { - return _internal_has_map_type_filter(); -} -inline void Trail::clear_map_type_filter() { - if (GetArena() == nullptr && map_type_filter_ != nullptr) { - delete map_type_filter_; - } - map_type_filter_ = nullptr; -} -inline const ::waypoint::MapTypeFilter& Trail::_internal_map_type_filter() const { - const ::waypoint::MapTypeFilter* p = map_type_filter_; - return p != nullptr ? *p : *reinterpret_cast( - &::waypoint::_MapTypeFilter_default_instance_); -} -inline const ::waypoint::MapTypeFilter& Trail::map_type_filter() const { - // @@protoc_insertion_point(field_get:waypoint.Trail.map_type_filter) - return _internal_map_type_filter(); -} -inline void Trail::unsafe_arena_set_allocated_map_type_filter( - ::waypoint::MapTypeFilter* map_type_filter) { - if (GetArena() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(map_type_filter_); - } - map_type_filter_ = map_type_filter; - if (map_type_filter) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Trail.map_type_filter) -} -inline ::waypoint::MapTypeFilter* Trail::release_map_type_filter() { - auto temp = unsafe_arena_release_map_type_filter(); - if (GetArena() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } - return temp; -} -inline ::waypoint::MapTypeFilter* Trail::unsafe_arena_release_map_type_filter() { - // @@protoc_insertion_point(field_release:waypoint.Trail.map_type_filter) - - ::waypoint::MapTypeFilter* temp = map_type_filter_; - map_type_filter_ = nullptr; - return temp; -} -inline ::waypoint::MapTypeFilter* Trail::_internal_mutable_map_type_filter() { - - if (map_type_filter_ == nullptr) { - auto* p = CreateMaybeMessage<::waypoint::MapTypeFilter>(GetArena()); - map_type_filter_ = p; - } - return map_type_filter_; -} -inline ::waypoint::MapTypeFilter* Trail::mutable_map_type_filter() { - // @@protoc_insertion_point(field_mutable:waypoint.Trail.map_type_filter) - return _internal_mutable_map_type_filter(); -} -inline void Trail::set_allocated_map_type_filter(::waypoint::MapTypeFilter* map_type_filter) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); - if (message_arena == nullptr) { - delete map_type_filter_; - } - if (map_type_filter) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(map_type_filter); - if (message_arena != submessage_arena) { - map_type_filter = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, map_type_filter, submessage_arena); - } - - } else { - - } - map_type_filter_ = map_type_filter; - // @@protoc_insertion_point(field_set_allocated:waypoint.Trail.map_type_filter) -} - -// .waypoint.MountFilter mount_filter = 29; -inline bool Trail::_internal_has_mount_filter() const { - return this != internal_default_instance() && mount_filter_ != nullptr; -} -inline bool Trail::has_mount_filter() const { - return _internal_has_mount_filter(); -} -inline void Trail::clear_mount_filter() { - if (GetArena() == nullptr && mount_filter_ != nullptr) { - delete mount_filter_; - } - mount_filter_ = nullptr; -} -inline const ::waypoint::MountFilter& Trail::_internal_mount_filter() const { - const ::waypoint::MountFilter* p = mount_filter_; - return p != nullptr ? *p : *reinterpret_cast( - &::waypoint::_MountFilter_default_instance_); -} -inline const ::waypoint::MountFilter& Trail::mount_filter() const { - // @@protoc_insertion_point(field_get:waypoint.Trail.mount_filter) - return _internal_mount_filter(); -} -inline void Trail::unsafe_arena_set_allocated_mount_filter( - ::waypoint::MountFilter* mount_filter) { - if (GetArena() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(mount_filter_); - } - mount_filter_ = mount_filter; - if (mount_filter) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Trail.mount_filter) -} -inline ::waypoint::MountFilter* Trail::release_mount_filter() { - auto temp = unsafe_arena_release_mount_filter(); - if (GetArena() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } - return temp; -} -inline ::waypoint::MountFilter* Trail::unsafe_arena_release_mount_filter() { - // @@protoc_insertion_point(field_release:waypoint.Trail.mount_filter) - - ::waypoint::MountFilter* temp = mount_filter_; - mount_filter_ = nullptr; - return temp; -} -inline ::waypoint::MountFilter* Trail::_internal_mutable_mount_filter() { - - if (mount_filter_ == nullptr) { - auto* p = CreateMaybeMessage<::waypoint::MountFilter>(GetArena()); - mount_filter_ = p; - } - return mount_filter_; -} -inline ::waypoint::MountFilter* Trail::mutable_mount_filter() { - // @@protoc_insertion_point(field_mutable:waypoint.Trail.mount_filter) - return _internal_mutable_mount_filter(); -} -inline void Trail::set_allocated_mount_filter(::waypoint::MountFilter* mount_filter) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); - if (message_arena == nullptr) { - delete mount_filter_; - } - if (mount_filter) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(mount_filter); - if (message_arena != submessage_arena) { - mount_filter = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, mount_filter, submessage_arena); - } - - } else { - - } - mount_filter_ = mount_filter; - // @@protoc_insertion_point(field_set_allocated:waypoint.Trail.mount_filter) -} - -// .waypoint.ProfessionFilter profession_filter = 30; -inline bool Trail::_internal_has_profession_filter() const { - return this != internal_default_instance() && profession_filter_ != nullptr; -} -inline bool Trail::has_profession_filter() const { - return _internal_has_profession_filter(); -} -inline void Trail::clear_profession_filter() { - if (GetArena() == nullptr && profession_filter_ != nullptr) { - delete profession_filter_; - } - profession_filter_ = nullptr; -} -inline const ::waypoint::ProfessionFilter& Trail::_internal_profession_filter() const { - const ::waypoint::ProfessionFilter* p = profession_filter_; - return p != nullptr ? *p : *reinterpret_cast( - &::waypoint::_ProfessionFilter_default_instance_); -} -inline const ::waypoint::ProfessionFilter& Trail::profession_filter() const { - // @@protoc_insertion_point(field_get:waypoint.Trail.profession_filter) - return _internal_profession_filter(); -} -inline void Trail::unsafe_arena_set_allocated_profession_filter( - ::waypoint::ProfessionFilter* profession_filter) { - if (GetArena() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(profession_filter_); - } - profession_filter_ = profession_filter; - if (profession_filter) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Trail.profession_filter) -} -inline ::waypoint::ProfessionFilter* Trail::release_profession_filter() { - auto temp = unsafe_arena_release_profession_filter(); - if (GetArena() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } - return temp; -} -inline ::waypoint::ProfessionFilter* Trail::unsafe_arena_release_profession_filter() { - // @@protoc_insertion_point(field_release:waypoint.Trail.profession_filter) - - ::waypoint::ProfessionFilter* temp = profession_filter_; - profession_filter_ = nullptr; - return temp; -} -inline ::waypoint::ProfessionFilter* Trail::_internal_mutable_profession_filter() { - - if (profession_filter_ == nullptr) { - auto* p = CreateMaybeMessage<::waypoint::ProfessionFilter>(GetArena()); - profession_filter_ = p; - } - return profession_filter_; -} -inline ::waypoint::ProfessionFilter* Trail::mutable_profession_filter() { - // @@protoc_insertion_point(field_mutable:waypoint.Trail.profession_filter) - return _internal_mutable_profession_filter(); -} -inline void Trail::set_allocated_profession_filter(::waypoint::ProfessionFilter* profession_filter) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); - if (message_arena == nullptr) { - delete profession_filter_; - } - if (profession_filter) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(profession_filter); - if (message_arena != submessage_arena) { - profession_filter = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, profession_filter, submessage_arena); - } - - } else { - - } - profession_filter_ = profession_filter; - // @@protoc_insertion_point(field_set_allocated:waypoint.Trail.profession_filter) -} - -// .waypoint.SpecializationFilter specialization_filter = 31; -inline bool Trail::_internal_has_specialization_filter() const { - return this != internal_default_instance() && specialization_filter_ != nullptr; -} -inline bool Trail::has_specialization_filter() const { - return _internal_has_specialization_filter(); -} -inline void Trail::clear_specialization_filter() { - if (GetArena() == nullptr && specialization_filter_ != nullptr) { - delete specialization_filter_; - } - specialization_filter_ = nullptr; -} -inline const ::waypoint::SpecializationFilter& Trail::_internal_specialization_filter() const { - const ::waypoint::SpecializationFilter* p = specialization_filter_; - return p != nullptr ? *p : *reinterpret_cast( - &::waypoint::_SpecializationFilter_default_instance_); -} -inline const ::waypoint::SpecializationFilter& Trail::specialization_filter() const { - // @@protoc_insertion_point(field_get:waypoint.Trail.specialization_filter) - return _internal_specialization_filter(); -} -inline void Trail::unsafe_arena_set_allocated_specialization_filter( - ::waypoint::SpecializationFilter* specialization_filter) { - if (GetArena() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(specialization_filter_); - } - specialization_filter_ = specialization_filter; - if (specialization_filter) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Trail.specialization_filter) -} -inline ::waypoint::SpecializationFilter* Trail::release_specialization_filter() { - auto temp = unsafe_arena_release_specialization_filter(); - if (GetArena() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } - return temp; -} -inline ::waypoint::SpecializationFilter* Trail::unsafe_arena_release_specialization_filter() { - // @@protoc_insertion_point(field_release:waypoint.Trail.specialization_filter) - - ::waypoint::SpecializationFilter* temp = specialization_filter_; - specialization_filter_ = nullptr; - return temp; -} -inline ::waypoint::SpecializationFilter* Trail::_internal_mutable_specialization_filter() { - - if (specialization_filter_ == nullptr) { - auto* p = CreateMaybeMessage<::waypoint::SpecializationFilter>(GetArena()); - specialization_filter_ = p; - } - return specialization_filter_; -} -inline ::waypoint::SpecializationFilter* Trail::mutable_specialization_filter() { - // @@protoc_insertion_point(field_mutable:waypoint.Trail.specialization_filter) - return _internal_mutable_specialization_filter(); -} -inline void Trail::set_allocated_specialization_filter(::waypoint::SpecializationFilter* specialization_filter) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); - if (message_arena == nullptr) { - delete specialization_filter_; - } - if (specialization_filter) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(specialization_filter); - if (message_arena != submessage_arena) { - specialization_filter = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, specialization_filter, submessage_arena); - } - - } else { - - } - specialization_filter_ = specialization_filter; - // @@protoc_insertion_point(field_set_allocated:waypoint.Trail.specialization_filter) -} - -// .waypoint.SpeciesFilter species_filter = 32; -inline bool Trail::_internal_has_species_filter() const { - return this != internal_default_instance() && species_filter_ != nullptr; -} -inline bool Trail::has_species_filter() const { - return _internal_has_species_filter(); -} -inline void Trail::clear_species_filter() { - if (GetArena() == nullptr && species_filter_ != nullptr) { - delete species_filter_; - } - species_filter_ = nullptr; -} -inline const ::waypoint::SpeciesFilter& Trail::_internal_species_filter() const { - const ::waypoint::SpeciesFilter* p = species_filter_; - return p != nullptr ? *p : *reinterpret_cast( - &::waypoint::_SpeciesFilter_default_instance_); -} -inline const ::waypoint::SpeciesFilter& Trail::species_filter() const { - // @@protoc_insertion_point(field_get:waypoint.Trail.species_filter) - return _internal_species_filter(); -} -inline void Trail::unsafe_arena_set_allocated_species_filter( - ::waypoint::SpeciesFilter* species_filter) { - if (GetArena() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(species_filter_); - } - species_filter_ = species_filter; - if (species_filter) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Trail.species_filter) -} -inline ::waypoint::SpeciesFilter* Trail::release_species_filter() { - auto temp = unsafe_arena_release_species_filter(); - if (GetArena() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } - return temp; -} -inline ::waypoint::SpeciesFilter* Trail::unsafe_arena_release_species_filter() { - // @@protoc_insertion_point(field_release:waypoint.Trail.species_filter) - - ::waypoint::SpeciesFilter* temp = species_filter_; - species_filter_ = nullptr; - return temp; -} -inline ::waypoint::SpeciesFilter* Trail::_internal_mutable_species_filter() { - - if (species_filter_ == nullptr) { - auto* p = CreateMaybeMessage<::waypoint::SpeciesFilter>(GetArena()); - species_filter_ = p; - } - return species_filter_; -} -inline ::waypoint::SpeciesFilter* Trail::mutable_species_filter() { - // @@protoc_insertion_point(field_mutable:waypoint.Trail.species_filter) - return _internal_mutable_species_filter(); -} -inline void Trail::set_allocated_species_filter(::waypoint::SpeciesFilter* species_filter) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); - if (message_arena == nullptr) { - delete species_filter_; - } - if (species_filter) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(species_filter); - if (message_arena != submessage_arena) { - species_filter = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, species_filter, submessage_arena); - } - - } else { - - } - species_filter_ = species_filter; - // @@protoc_insertion_point(field_set_allocated:waypoint.Trail.species_filter) -} - -// ------------------------------------------------------------------- - -// Texture - -// string path = 1; -inline void Texture::clear_path() { - path_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline const std::string& Texture::path() const { - // @@protoc_insertion_point(field_get:waypoint.Texture.path) - return _internal_path(); -} -inline void Texture::set_path(const std::string& value) { - _internal_set_path(value); - // @@protoc_insertion_point(field_set:waypoint.Texture.path) -} -inline std::string* Texture::mutable_path() { - // @@protoc_insertion_point(field_mutable:waypoint.Texture.path) - return _internal_mutable_path(); -} -inline const std::string& Texture::_internal_path() const { - return path_.Get(); -} -inline void Texture::_internal_set_path(const std::string& value) { - - path_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); -} -inline void Texture::set_path(std::string&& value) { - - path_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:waypoint.Texture.path) -} -inline void Texture::set_path(const char* value) { - GOOGLE_DCHECK(value != nullptr); - - path_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArena()); - // @@protoc_insertion_point(field_set_char:waypoint.Texture.path) -} -inline void Texture::set_path(const char* value, - size_t size) { - - path_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:waypoint.Texture.path) -} -inline std::string* Texture::_internal_mutable_path() { - - return path_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline std::string* Texture::release_path() { - // @@protoc_insertion_point(field_release:waypoint.Texture.path) - return path_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void Texture::set_allocated_path(std::string* path) { - if (path != nullptr) { - - } else { - - } - path_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), path, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:waypoint.Texture.path) -} -inline std::string* Texture::unsafe_arena_release_path() { - // @@protoc_insertion_point(field_unsafe_arena_release:waypoint.Texture.path) - GOOGLE_DCHECK(GetArena() != nullptr); - - return path_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArena()); -} -inline void Texture::unsafe_arena_set_allocated_path( - std::string* path) { - GOOGLE_DCHECK(GetArena() != nullptr); - if (path != nullptr) { - - } else { - - } - path_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - path, GetArena()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Texture.path) -} - -// ------------------------------------------------------------------- - -// Position - -// float x = 1; -inline void Position::clear_x() { - x_ = 0; -} -inline float Position::_internal_x() const { - return x_; -} -inline float Position::x() const { - // @@protoc_insertion_point(field_get:waypoint.Position.x) - return _internal_x(); -} -inline void Position::_internal_set_x(float value) { - - x_ = value; -} -inline void Position::set_x(float value) { - _internal_set_x(value); - // @@protoc_insertion_point(field_set:waypoint.Position.x) -} - -// float y = 2; -inline void Position::clear_y() { - y_ = 0; -} -inline float Position::_internal_y() const { - return y_; -} -inline float Position::y() const { - // @@protoc_insertion_point(field_get:waypoint.Position.y) - return _internal_y(); -} -inline void Position::_internal_set_y(float value) { - - y_ = value; -} -inline void Position::set_y(float value) { - _internal_set_y(value); - // @@protoc_insertion_point(field_set:waypoint.Position.y) -} - -// float z = 3; -inline void Position::clear_z() { - z_ = 0; -} -inline float Position::_internal_z() const { - return z_; -} -inline float Position::z() const { - // @@protoc_insertion_point(field_get:waypoint.Position.z) - return _internal_z(); -} -inline void Position::_internal_set_z(float value) { - - z_ = value; -} -inline void Position::set_z(float value) { - _internal_set_z(value); - // @@protoc_insertion_point(field_set:waypoint.Position.z) -} - -// ------------------------------------------------------------------- - -// EulerRotation - -// float x = 1; -inline void EulerRotation::clear_x() { - x_ = 0; -} -inline float EulerRotation::_internal_x() const { - return x_; -} -inline float EulerRotation::x() const { - // @@protoc_insertion_point(field_get:waypoint.EulerRotation.x) - return _internal_x(); -} -inline void EulerRotation::_internal_set_x(float value) { - - x_ = value; -} -inline void EulerRotation::set_x(float value) { - _internal_set_x(value); - // @@protoc_insertion_point(field_set:waypoint.EulerRotation.x) -} - -// float y = 2; -inline void EulerRotation::clear_y() { - y_ = 0; -} -inline float EulerRotation::_internal_y() const { - return y_; -} -inline float EulerRotation::y() const { - // @@protoc_insertion_point(field_get:waypoint.EulerRotation.y) - return _internal_y(); -} -inline void EulerRotation::_internal_set_y(float value) { - - y_ = value; -} -inline void EulerRotation::set_y(float value) { - _internal_set_y(value); - // @@protoc_insertion_point(field_set:waypoint.EulerRotation.y) -} - -// float z = 3; -inline void EulerRotation::clear_z() { - z_ = 0; -} -inline float EulerRotation::_internal_z() const { - return z_; -} -inline float EulerRotation::z() const { - // @@protoc_insertion_point(field_get:waypoint.EulerRotation.z) - return _internal_z(); -} -inline void EulerRotation::_internal_set_z(float value) { - - z_ = value; -} -inline void EulerRotation::set_z(float value) { - _internal_set_z(value); - // @@protoc_insertion_point(field_set:waypoint.EulerRotation.z) -} - -// ------------------------------------------------------------------- - -// Trigger - -// bool auto_trigger = 1; -inline void Trigger::clear_auto_trigger() { - auto_trigger_ = false; -} -inline bool Trigger::_internal_auto_trigger() const { - return auto_trigger_; -} -inline bool Trigger::auto_trigger() const { - // @@protoc_insertion_point(field_get:waypoint.Trigger.auto_trigger) - return _internal_auto_trigger(); -} -inline void Trigger::_internal_set_auto_trigger(bool value) { - - auto_trigger_ = value; -} -inline void Trigger::set_auto_trigger(bool value) { - _internal_set_auto_trigger(value); - // @@protoc_insertion_point(field_set:waypoint.Trigger.auto_trigger) -} - -// float bounce_delay = 2; -inline void Trigger::clear_bounce_delay() { - bounce_delay_ = 0; -} -inline float Trigger::_internal_bounce_delay() const { - return bounce_delay_; -} -inline float Trigger::bounce_delay() const { - // @@protoc_insertion_point(field_get:waypoint.Trigger.bounce_delay) - return _internal_bounce_delay(); -} -inline void Trigger::_internal_set_bounce_delay(float value) { - - bounce_delay_ = value; -} -inline void Trigger::set_bounce_delay(float value) { - _internal_set_bounce_delay(value); - // @@protoc_insertion_point(field_set:waypoint.Trigger.bounce_delay) -} - -// float bounce_duration = 3; -inline void Trigger::clear_bounce_duration() { - bounce_duration_ = 0; -} -inline float Trigger::_internal_bounce_duration() const { - return bounce_duration_; -} -inline float Trigger::bounce_duration() const { - // @@protoc_insertion_point(field_get:waypoint.Trigger.bounce_duration) - return _internal_bounce_duration(); -} -inline void Trigger::_internal_set_bounce_duration(float value) { - - bounce_duration_ = value; -} -inline void Trigger::set_bounce_duration(float value) { - _internal_set_bounce_duration(value); - // @@protoc_insertion_point(field_set:waypoint.Trigger.bounce_duration) -} - -// float bounce_height = 4; -inline void Trigger::clear_bounce_height() { - bounce_height_ = 0; -} -inline float Trigger::_internal_bounce_height() const { - return bounce_height_; -} -inline float Trigger::bounce_height() const { - // @@protoc_insertion_point(field_get:waypoint.Trigger.bounce_height) - return _internal_bounce_height(); -} -inline void Trigger::_internal_set_bounce_height(float value) { - - bounce_height_ = value; -} -inline void Trigger::set_bounce_height(float value) { - _internal_set_bounce_height(value); - // @@protoc_insertion_point(field_set:waypoint.Trigger.bounce_height) -} - -// string action_copy_clipboard = 5; -inline void Trigger::clear_action_copy_clipboard() { - action_copy_clipboard_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline const std::string& Trigger::action_copy_clipboard() const { - // @@protoc_insertion_point(field_get:waypoint.Trigger.action_copy_clipboard) - return _internal_action_copy_clipboard(); -} -inline void Trigger::set_action_copy_clipboard(const std::string& value) { - _internal_set_action_copy_clipboard(value); - // @@protoc_insertion_point(field_set:waypoint.Trigger.action_copy_clipboard) -} -inline std::string* Trigger::mutable_action_copy_clipboard() { - // @@protoc_insertion_point(field_mutable:waypoint.Trigger.action_copy_clipboard) - return _internal_mutable_action_copy_clipboard(); -} -inline const std::string& Trigger::_internal_action_copy_clipboard() const { - return action_copy_clipboard_.Get(); -} -inline void Trigger::_internal_set_action_copy_clipboard(const std::string& value) { - - action_copy_clipboard_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); -} -inline void Trigger::set_action_copy_clipboard(std::string&& value) { - - action_copy_clipboard_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:waypoint.Trigger.action_copy_clipboard) -} -inline void Trigger::set_action_copy_clipboard(const char* value) { - GOOGLE_DCHECK(value != nullptr); - - action_copy_clipboard_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArena()); - // @@protoc_insertion_point(field_set_char:waypoint.Trigger.action_copy_clipboard) -} -inline void Trigger::set_action_copy_clipboard(const char* value, - size_t size) { - - action_copy_clipboard_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:waypoint.Trigger.action_copy_clipboard) -} -inline std::string* Trigger::_internal_mutable_action_copy_clipboard() { - - return action_copy_clipboard_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline std::string* Trigger::release_action_copy_clipboard() { - // @@protoc_insertion_point(field_release:waypoint.Trigger.action_copy_clipboard) - return action_copy_clipboard_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void Trigger::set_allocated_action_copy_clipboard(std::string* action_copy_clipboard) { - if (action_copy_clipboard != nullptr) { - - } else { - - } - action_copy_clipboard_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), action_copy_clipboard, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:waypoint.Trigger.action_copy_clipboard) -} -inline std::string* Trigger::unsafe_arena_release_action_copy_clipboard() { - // @@protoc_insertion_point(field_unsafe_arena_release:waypoint.Trigger.action_copy_clipboard) - GOOGLE_DCHECK(GetArena() != nullptr); - - return action_copy_clipboard_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArena()); -} -inline void Trigger::unsafe_arena_set_allocated_action_copy_clipboard( - std::string* action_copy_clipboard) { - GOOGLE_DCHECK(GetArena() != nullptr); - if (action_copy_clipboard != nullptr) { - - } else { - - } - action_copy_clipboard_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - action_copy_clipboard, GetArena()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Trigger.action_copy_clipboard) -} - -// string action_copy_message = 6; -inline void Trigger::clear_action_copy_message() { - action_copy_message_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline const std::string& Trigger::action_copy_message() const { - // @@protoc_insertion_point(field_get:waypoint.Trigger.action_copy_message) - return _internal_action_copy_message(); -} -inline void Trigger::set_action_copy_message(const std::string& value) { - _internal_set_action_copy_message(value); - // @@protoc_insertion_point(field_set:waypoint.Trigger.action_copy_message) -} -inline std::string* Trigger::mutable_action_copy_message() { - // @@protoc_insertion_point(field_mutable:waypoint.Trigger.action_copy_message) - return _internal_mutable_action_copy_message(); -} -inline const std::string& Trigger::_internal_action_copy_message() const { - return action_copy_message_.Get(); -} -inline void Trigger::_internal_set_action_copy_message(const std::string& value) { - - action_copy_message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); -} -inline void Trigger::set_action_copy_message(std::string&& value) { - - action_copy_message_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:waypoint.Trigger.action_copy_message) -} -inline void Trigger::set_action_copy_message(const char* value) { - GOOGLE_DCHECK(value != nullptr); - - action_copy_message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArena()); - // @@protoc_insertion_point(field_set_char:waypoint.Trigger.action_copy_message) -} -inline void Trigger::set_action_copy_message(const char* value, - size_t size) { - - action_copy_message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:waypoint.Trigger.action_copy_message) -} -inline std::string* Trigger::_internal_mutable_action_copy_message() { - - return action_copy_message_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline std::string* Trigger::release_action_copy_message() { - // @@protoc_insertion_point(field_release:waypoint.Trigger.action_copy_message) - return action_copy_message_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void Trigger::set_allocated_action_copy_message(std::string* action_copy_message) { - if (action_copy_message != nullptr) { - - } else { - - } - action_copy_message_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), action_copy_message, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:waypoint.Trigger.action_copy_message) -} -inline std::string* Trigger::unsafe_arena_release_action_copy_message() { - // @@protoc_insertion_point(field_unsafe_arena_release:waypoint.Trigger.action_copy_message) - GOOGLE_DCHECK(GetArena() != nullptr); - - return action_copy_message_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArena()); -} -inline void Trigger::unsafe_arena_set_allocated_action_copy_message( - std::string* action_copy_message) { - GOOGLE_DCHECK(GetArena() != nullptr); - if (action_copy_message != nullptr) { - - } else { - - } - action_copy_message_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - action_copy_message, GetArena()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Trigger.action_copy_message) -} - -// bool has_countdown = 7; -inline void Trigger::clear_has_countdown() { - has_countdown_ = false; -} -inline bool Trigger::_internal_has_countdown() const { - return has_countdown_; -} -inline bool Trigger::has_countdown() const { - // @@protoc_insertion_point(field_get:waypoint.Trigger.has_countdown) - return _internal_has_countdown(); -} -inline void Trigger::_internal_set_has_countdown(bool value) { - - has_countdown_ = value; -} -inline void Trigger::set_has_countdown(bool value) { - _internal_set_has_countdown(value); - // @@protoc_insertion_point(field_set:waypoint.Trigger.has_countdown) -} - -// string action_info_message = 8; -inline void Trigger::clear_action_info_message() { - action_info_message_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline const std::string& Trigger::action_info_message() const { - // @@protoc_insertion_point(field_get:waypoint.Trigger.action_info_message) - return _internal_action_info_message(); -} -inline void Trigger::set_action_info_message(const std::string& value) { - _internal_set_action_info_message(value); - // @@protoc_insertion_point(field_set:waypoint.Trigger.action_info_message) -} -inline std::string* Trigger::mutable_action_info_message() { - // @@protoc_insertion_point(field_mutable:waypoint.Trigger.action_info_message) - return _internal_mutable_action_info_message(); -} -inline const std::string& Trigger::_internal_action_info_message() const { - return action_info_message_.Get(); -} -inline void Trigger::_internal_set_action_info_message(const std::string& value) { - - action_info_message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); -} -inline void Trigger::set_action_info_message(std::string&& value) { - - action_info_message_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:waypoint.Trigger.action_info_message) -} -inline void Trigger::set_action_info_message(const char* value) { - GOOGLE_DCHECK(value != nullptr); - - action_info_message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArena()); - // @@protoc_insertion_point(field_set_char:waypoint.Trigger.action_info_message) -} -inline void Trigger::set_action_info_message(const char* value, - size_t size) { - - action_info_message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:waypoint.Trigger.action_info_message) -} -inline std::string* Trigger::_internal_mutable_action_info_message() { - - return action_info_message_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline std::string* Trigger::release_action_info_message() { - // @@protoc_insertion_point(field_release:waypoint.Trigger.action_info_message) - return action_info_message_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void Trigger::set_allocated_action_info_message(std::string* action_info_message) { - if (action_info_message != nullptr) { - - } else { - - } - action_info_message_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), action_info_message, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:waypoint.Trigger.action_info_message) -} -inline std::string* Trigger::unsafe_arena_release_action_info_message() { - // @@protoc_insertion_point(field_unsafe_arena_release:waypoint.Trigger.action_info_message) - GOOGLE_DCHECK(GetArena() != nullptr); - - return action_info_message_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArena()); -} -inline void Trigger::unsafe_arena_set_allocated_action_info_message( - std::string* action_info_message) { - GOOGLE_DCHECK(GetArena() != nullptr); - if (action_info_message != nullptr) { - - } else { - - } - action_info_message_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - action_info_message, GetArena()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Trigger.action_info_message) -} - -// bool invert_display = 9; -inline void Trigger::clear_invert_display() { - invert_display_ = false; -} -inline bool Trigger::_internal_invert_display() const { - return invert_display_; -} -inline bool Trigger::invert_display() const { - // @@protoc_insertion_point(field_get:waypoint.Trigger.invert_display) - return _internal_invert_display(); -} -inline void Trigger::_internal_set_invert_display(bool value) { - - invert_display_ = value; -} -inline void Trigger::set_invert_display(bool value) { - _internal_set_invert_display(value); - // @@protoc_insertion_point(field_set:waypoint.Trigger.invert_display) -} - -// float reset_length = 10; -inline void Trigger::clear_reset_length() { - reset_length_ = 0; -} -inline float Trigger::_internal_reset_length() const { - return reset_length_; -} -inline float Trigger::reset_length() const { - // @@protoc_insertion_point(field_get:waypoint.Trigger.reset_length) - return _internal_reset_length(); -} -inline void Trigger::_internal_set_reset_length(float value) { - - reset_length_ = value; -} -inline void Trigger::set_reset_length(float value) { - _internal_set_reset_length(value); - // @@protoc_insertion_point(field_set:waypoint.Trigger.reset_length) -} - -// float range = 11; -inline void Trigger::clear_range() { - range_ = 0; -} -inline float Trigger::_internal_range() const { - return range_; -} -inline float Trigger::range() const { - // @@protoc_insertion_point(field_get:waypoint.Trigger.range) - return _internal_range(); -} -inline void Trigger::_internal_set_range(float value) { - - range_ = value; -} -inline void Trigger::set_range(float value) { - _internal_set_range(value); - // @@protoc_insertion_point(field_set:waypoint.Trigger.range) -} - -// .waypoint.Category action_hide_category = 12; -inline bool Trigger::_internal_has_action_hide_category() const { - return this != internal_default_instance() && action_hide_category_ != nullptr; -} -inline bool Trigger::has_action_hide_category() const { - return _internal_has_action_hide_category(); -} -inline void Trigger::clear_action_hide_category() { - if (GetArena() == nullptr && action_hide_category_ != nullptr) { - delete action_hide_category_; - } - action_hide_category_ = nullptr; -} -inline const ::waypoint::Category& Trigger::_internal_action_hide_category() const { - const ::waypoint::Category* p = action_hide_category_; - return p != nullptr ? *p : *reinterpret_cast( - &::waypoint::_Category_default_instance_); -} -inline const ::waypoint::Category& Trigger::action_hide_category() const { - // @@protoc_insertion_point(field_get:waypoint.Trigger.action_hide_category) - return _internal_action_hide_category(); -} -inline void Trigger::unsafe_arena_set_allocated_action_hide_category( - ::waypoint::Category* action_hide_category) { - if (GetArena() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(action_hide_category_); - } - action_hide_category_ = action_hide_category; - if (action_hide_category) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Trigger.action_hide_category) -} -inline ::waypoint::Category* Trigger::release_action_hide_category() { - auto temp = unsafe_arena_release_action_hide_category(); - if (GetArena() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } - return temp; -} -inline ::waypoint::Category* Trigger::unsafe_arena_release_action_hide_category() { - // @@protoc_insertion_point(field_release:waypoint.Trigger.action_hide_category) - - ::waypoint::Category* temp = action_hide_category_; - action_hide_category_ = nullptr; - return temp; -} -inline ::waypoint::Category* Trigger::_internal_mutable_action_hide_category() { - - if (action_hide_category_ == nullptr) { - auto* p = CreateMaybeMessage<::waypoint::Category>(GetArena()); - action_hide_category_ = p; - } - return action_hide_category_; -} -inline ::waypoint::Category* Trigger::mutable_action_hide_category() { - // @@protoc_insertion_point(field_mutable:waypoint.Trigger.action_hide_category) - return _internal_mutable_action_hide_category(); -} -inline void Trigger::set_allocated_action_hide_category(::waypoint::Category* action_hide_category) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); - if (message_arena == nullptr) { - delete action_hide_category_; - } - if (action_hide_category) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(action_hide_category); - if (message_arena != submessage_arena) { - action_hide_category = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, action_hide_category, submessage_arena); - } - - } else { - - } - action_hide_category_ = action_hide_category; - // @@protoc_insertion_point(field_set_allocated:waypoint.Trigger.action_hide_category) -} - -// .waypoint.Category action_show_category = 13; -inline bool Trigger::_internal_has_action_show_category() const { - return this != internal_default_instance() && action_show_category_ != nullptr; -} -inline bool Trigger::has_action_show_category() const { - return _internal_has_action_show_category(); -} -inline void Trigger::clear_action_show_category() { - if (GetArena() == nullptr && action_show_category_ != nullptr) { - delete action_show_category_; - } - action_show_category_ = nullptr; -} -inline const ::waypoint::Category& Trigger::_internal_action_show_category() const { - const ::waypoint::Category* p = action_show_category_; - return p != nullptr ? *p : *reinterpret_cast( - &::waypoint::_Category_default_instance_); -} -inline const ::waypoint::Category& Trigger::action_show_category() const { - // @@protoc_insertion_point(field_get:waypoint.Trigger.action_show_category) - return _internal_action_show_category(); -} -inline void Trigger::unsafe_arena_set_allocated_action_show_category( - ::waypoint::Category* action_show_category) { - if (GetArena() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(action_show_category_); - } - action_show_category_ = action_show_category; - if (action_show_category) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Trigger.action_show_category) -} -inline ::waypoint::Category* Trigger::release_action_show_category() { - auto temp = unsafe_arena_release_action_show_category(); - if (GetArena() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } - return temp; -} -inline ::waypoint::Category* Trigger::unsafe_arena_release_action_show_category() { - // @@protoc_insertion_point(field_release:waypoint.Trigger.action_show_category) - - ::waypoint::Category* temp = action_show_category_; - action_show_category_ = nullptr; - return temp; -} -inline ::waypoint::Category* Trigger::_internal_mutable_action_show_category() { - - if (action_show_category_ == nullptr) { - auto* p = CreateMaybeMessage<::waypoint::Category>(GetArena()); - action_show_category_ = p; - } - return action_show_category_; -} -inline ::waypoint::Category* Trigger::mutable_action_show_category() { - // @@protoc_insertion_point(field_mutable:waypoint.Trigger.action_show_category) - return _internal_mutable_action_show_category(); -} -inline void Trigger::set_allocated_action_show_category(::waypoint::Category* action_show_category) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); - if (message_arena == nullptr) { - delete action_show_category_; - } - if (action_show_category) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(action_show_category); - if (message_arena != submessage_arena) { - action_show_category = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, action_show_category, submessage_arena); - } - - } else { - - } - action_show_category_ = action_show_category; - // @@protoc_insertion_point(field_set_allocated:waypoint.Trigger.action_show_category) -} - -// .waypoint.Category action_toggle_category = 14; -inline bool Trigger::_internal_has_action_toggle_category() const { - return this != internal_default_instance() && action_toggle_category_ != nullptr; -} -inline bool Trigger::has_action_toggle_category() const { - return _internal_has_action_toggle_category(); -} -inline void Trigger::clear_action_toggle_category() { - if (GetArena() == nullptr && action_toggle_category_ != nullptr) { - delete action_toggle_category_; - } - action_toggle_category_ = nullptr; -} -inline const ::waypoint::Category& Trigger::_internal_action_toggle_category() const { - const ::waypoint::Category* p = action_toggle_category_; - return p != nullptr ? *p : *reinterpret_cast( - &::waypoint::_Category_default_instance_); -} -inline const ::waypoint::Category& Trigger::action_toggle_category() const { - // @@protoc_insertion_point(field_get:waypoint.Trigger.action_toggle_category) - return _internal_action_toggle_category(); -} -inline void Trigger::unsafe_arena_set_allocated_action_toggle_category( - ::waypoint::Category* action_toggle_category) { - if (GetArena() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(action_toggle_category_); - } - action_toggle_category_ = action_toggle_category; - if (action_toggle_category) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Trigger.action_toggle_category) -} -inline ::waypoint::Category* Trigger::release_action_toggle_category() { - auto temp = unsafe_arena_release_action_toggle_category(); - if (GetArena() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } - return temp; -} -inline ::waypoint::Category* Trigger::unsafe_arena_release_action_toggle_category() { - // @@protoc_insertion_point(field_release:waypoint.Trigger.action_toggle_category) - - ::waypoint::Category* temp = action_toggle_category_; - action_toggle_category_ = nullptr; - return temp; -} -inline ::waypoint::Category* Trigger::_internal_mutable_action_toggle_category() { - - if (action_toggle_category_ == nullptr) { - auto* p = CreateMaybeMessage<::waypoint::Category>(GetArena()); - action_toggle_category_ = p; - } - return action_toggle_category_; -} -inline ::waypoint::Category* Trigger::mutable_action_toggle_category() { - // @@protoc_insertion_point(field_mutable:waypoint.Trigger.action_toggle_category) - return _internal_mutable_action_toggle_category(); -} -inline void Trigger::set_allocated_action_toggle_category(::waypoint::Category* action_toggle_category) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); - if (message_arena == nullptr) { - delete action_toggle_category_; - } - if (action_toggle_category) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(action_toggle_category); - if (message_arena != submessage_arena) { - action_toggle_category = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, action_toggle_category, submessage_arena); - } - - } else { - - } - action_toggle_category_ = action_toggle_category; - // @@protoc_insertion_point(field_set_allocated:waypoint.Trigger.action_toggle_category) -} - -// ------------------------------------------------------------------- - -// GUID - -// int32 guid = 1; -inline void GUID::clear_guid() { - guid_ = 0; -} -inline ::PROTOBUF_NAMESPACE_ID::int32 GUID::_internal_guid() const { - return guid_; -} -inline ::PROTOBUF_NAMESPACE_ID::int32 GUID::guid() const { - // @@protoc_insertion_point(field_get:waypoint.GUID.guid) - return _internal_guid(); -} -inline void GUID::_internal_set_guid(::PROTOBUF_NAMESPACE_ID::int32 value) { - - guid_ = value; -} -inline void GUID::set_guid(::PROTOBUF_NAMESPACE_ID::int32 value) { - _internal_set_guid(value); - // @@protoc_insertion_point(field_set:waypoint.GUID.guid) -} - -// ------------------------------------------------------------------- - -// Color - -// string hex = 1; -inline void Color::clear_hex() { - hex_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline const std::string& Color::hex() const { - // @@protoc_insertion_point(field_get:waypoint.Color.hex) - return _internal_hex(); -} -inline void Color::set_hex(const std::string& value) { - _internal_set_hex(value); - // @@protoc_insertion_point(field_set:waypoint.Color.hex) -} -inline std::string* Color::mutable_hex() { - // @@protoc_insertion_point(field_mutable:waypoint.Color.hex) - return _internal_mutable_hex(); -} -inline const std::string& Color::_internal_hex() const { - return hex_.Get(); -} -inline void Color::_internal_set_hex(const std::string& value) { - - hex_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); -} -inline void Color::set_hex(std::string&& value) { - - hex_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:waypoint.Color.hex) -} -inline void Color::set_hex(const char* value) { - GOOGLE_DCHECK(value != nullptr); - - hex_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArena()); - // @@protoc_insertion_point(field_set_char:waypoint.Color.hex) -} -inline void Color::set_hex(const char* value, - size_t size) { - - hex_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:waypoint.Color.hex) -} -inline std::string* Color::_internal_mutable_hex() { - - return hex_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline std::string* Color::release_hex() { - // @@protoc_insertion_point(field_release:waypoint.Color.hex) - return hex_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void Color::set_allocated_hex(std::string* hex) { - if (hex != nullptr) { - - } else { - - } - hex_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), hex, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:waypoint.Color.hex) -} -inline std::string* Color::unsafe_arena_release_hex() { - // @@protoc_insertion_point(field_unsafe_arena_release:waypoint.Color.hex) - GOOGLE_DCHECK(GetArena() != nullptr); - - return hex_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArena()); -} -inline void Color::unsafe_arena_set_allocated_hex( - std::string* hex) { - GOOGLE_DCHECK(GetArena() != nullptr); - if (hex != nullptr) { - - } else { - - } - hex_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - hex, GetArena()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.Color.hex) -} - -// ------------------------------------------------------------------- - -// FestivalFilter - -// bool dragonbash = 1; -inline void FestivalFilter::clear_dragonbash() { - dragonbash_ = false; -} -inline bool FestivalFilter::_internal_dragonbash() const { - return dragonbash_; -} -inline bool FestivalFilter::dragonbash() const { - // @@protoc_insertion_point(field_get:waypoint.FestivalFilter.dragonbash) - return _internal_dragonbash(); -} -inline void FestivalFilter::_internal_set_dragonbash(bool value) { - - dragonbash_ = value; -} -inline void FestivalFilter::set_dragonbash(bool value) { - _internal_set_dragonbash(value); - // @@protoc_insertion_point(field_set:waypoint.FestivalFilter.dragonbash) -} - -// bool festival_of_the_four_winds = 2; -inline void FestivalFilter::clear_festival_of_the_four_winds() { - festival_of_the_four_winds_ = false; -} -inline bool FestivalFilter::_internal_festival_of_the_four_winds() const { - return festival_of_the_four_winds_; -} -inline bool FestivalFilter::festival_of_the_four_winds() const { - // @@protoc_insertion_point(field_get:waypoint.FestivalFilter.festival_of_the_four_winds) - return _internal_festival_of_the_four_winds(); -} -inline void FestivalFilter::_internal_set_festival_of_the_four_winds(bool value) { - - festival_of_the_four_winds_ = value; -} -inline void FestivalFilter::set_festival_of_the_four_winds(bool value) { - _internal_set_festival_of_the_four_winds(value); - // @@protoc_insertion_point(field_set:waypoint.FestivalFilter.festival_of_the_four_winds) -} - -// bool halloween = 3; -inline void FestivalFilter::clear_halloween() { - halloween_ = false; -} -inline bool FestivalFilter::_internal_halloween() const { - return halloween_; -} -inline bool FestivalFilter::halloween() const { - // @@protoc_insertion_point(field_get:waypoint.FestivalFilter.halloween) - return _internal_halloween(); -} -inline void FestivalFilter::_internal_set_halloween(bool value) { - - halloween_ = value; -} -inline void FestivalFilter::set_halloween(bool value) { - _internal_set_halloween(value); - // @@protoc_insertion_point(field_set:waypoint.FestivalFilter.halloween) -} - -// bool lunar_new_year = 4; -inline void FestivalFilter::clear_lunar_new_year() { - lunar_new_year_ = false; -} -inline bool FestivalFilter::_internal_lunar_new_year() const { - return lunar_new_year_; -} -inline bool FestivalFilter::lunar_new_year() const { - // @@protoc_insertion_point(field_get:waypoint.FestivalFilter.lunar_new_year) - return _internal_lunar_new_year(); -} -inline void FestivalFilter::_internal_set_lunar_new_year(bool value) { - - lunar_new_year_ = value; -} -inline void FestivalFilter::set_lunar_new_year(bool value) { - _internal_set_lunar_new_year(value); - // @@protoc_insertion_point(field_set:waypoint.FestivalFilter.lunar_new_year) -} - -// bool super_adventure_festival = 5; -inline void FestivalFilter::clear_super_adventure_festival() { - super_adventure_festival_ = false; -} -inline bool FestivalFilter::_internal_super_adventure_festival() const { - return super_adventure_festival_; -} -inline bool FestivalFilter::super_adventure_festival() const { - // @@protoc_insertion_point(field_get:waypoint.FestivalFilter.super_adventure_festival) - return _internal_super_adventure_festival(); -} -inline void FestivalFilter::_internal_set_super_adventure_festival(bool value) { - - super_adventure_festival_ = value; -} -inline void FestivalFilter::set_super_adventure_festival(bool value) { - _internal_set_super_adventure_festival(value); - // @@protoc_insertion_point(field_set:waypoint.FestivalFilter.super_adventure_festival) -} - -// bool wintersday = 6; -inline void FestivalFilter::clear_wintersday() { - wintersday_ = false; -} -inline bool FestivalFilter::_internal_wintersday() const { - return wintersday_; -} -inline bool FestivalFilter::wintersday() const { - // @@protoc_insertion_point(field_get:waypoint.FestivalFilter.wintersday) - return _internal_wintersday(); -} -inline void FestivalFilter::_internal_set_wintersday(bool value) { - - wintersday_ = value; -} -inline void FestivalFilter::set_wintersday(bool value) { - _internal_set_wintersday(value); - // @@protoc_insertion_point(field_set:waypoint.FestivalFilter.wintersday) -} - -// bool none = 7; -inline void FestivalFilter::clear_none() { - none_ = false; -} -inline bool FestivalFilter::_internal_none() const { - return none_; -} -inline bool FestivalFilter::none() const { - // @@protoc_insertion_point(field_get:waypoint.FestivalFilter.none) - return _internal_none(); -} -inline void FestivalFilter::_internal_set_none(bool value) { - - none_ = value; -} -inline void FestivalFilter::set_none(bool value) { - _internal_set_none(value); - // @@protoc_insertion_point(field_set:waypoint.FestivalFilter.none) -} - -// ------------------------------------------------------------------- - -// MapTypeFilter - -// bool unknown_map = 1; -inline void MapTypeFilter::clear_unknown_map() { - unknown_map_ = false; -} -inline bool MapTypeFilter::_internal_unknown_map() const { - return unknown_map_; -} -inline bool MapTypeFilter::unknown_map() const { - // @@protoc_insertion_point(field_get:waypoint.MapTypeFilter.unknown_map) - return _internal_unknown_map(); -} -inline void MapTypeFilter::_internal_set_unknown_map(bool value) { - - unknown_map_ = value; -} -inline void MapTypeFilter::set_unknown_map(bool value) { - _internal_set_unknown_map(value); - // @@protoc_insertion_point(field_set:waypoint.MapTypeFilter.unknown_map) -} - -// bool redirect_map = 2; -inline void MapTypeFilter::clear_redirect_map() { - redirect_map_ = false; -} -inline bool MapTypeFilter::_internal_redirect_map() const { - return redirect_map_; -} -inline bool MapTypeFilter::redirect_map() const { - // @@protoc_insertion_point(field_get:waypoint.MapTypeFilter.redirect_map) - return _internal_redirect_map(); -} -inline void MapTypeFilter::_internal_set_redirect_map(bool value) { - - redirect_map_ = value; -} -inline void MapTypeFilter::set_redirect_map(bool value) { - _internal_set_redirect_map(value); - // @@protoc_insertion_point(field_set:waypoint.MapTypeFilter.redirect_map) -} - -// bool character_create_map = 3; -inline void MapTypeFilter::clear_character_create_map() { - character_create_map_ = false; -} -inline bool MapTypeFilter::_internal_character_create_map() const { - return character_create_map_; -} -inline bool MapTypeFilter::character_create_map() const { - // @@protoc_insertion_point(field_get:waypoint.MapTypeFilter.character_create_map) - return _internal_character_create_map(); -} -inline void MapTypeFilter::_internal_set_character_create_map(bool value) { - - character_create_map_ = value; -} -inline void MapTypeFilter::set_character_create_map(bool value) { - _internal_set_character_create_map(value); - // @@protoc_insertion_point(field_set:waypoint.MapTypeFilter.character_create_map) -} - -// bool pvp_map = 4; -inline void MapTypeFilter::clear_pvp_map() { - pvp_map_ = false; -} -inline bool MapTypeFilter::_internal_pvp_map() const { - return pvp_map_; -} -inline bool MapTypeFilter::pvp_map() const { - // @@protoc_insertion_point(field_get:waypoint.MapTypeFilter.pvp_map) - return _internal_pvp_map(); -} -inline void MapTypeFilter::_internal_set_pvp_map(bool value) { - - pvp_map_ = value; -} -inline void MapTypeFilter::set_pvp_map(bool value) { - _internal_set_pvp_map(value); - // @@protoc_insertion_point(field_set:waypoint.MapTypeFilter.pvp_map) -} - -// bool gvg_map = 5; -inline void MapTypeFilter::clear_gvg_map() { - gvg_map_ = false; -} -inline bool MapTypeFilter::_internal_gvg_map() const { - return gvg_map_; -} -inline bool MapTypeFilter::gvg_map() const { - // @@protoc_insertion_point(field_get:waypoint.MapTypeFilter.gvg_map) - return _internal_gvg_map(); -} -inline void MapTypeFilter::_internal_set_gvg_map(bool value) { - - gvg_map_ = value; -} -inline void MapTypeFilter::set_gvg_map(bool value) { - _internal_set_gvg_map(value); - // @@protoc_insertion_point(field_set:waypoint.MapTypeFilter.gvg_map) -} - -// bool instance_map = 6; -inline void MapTypeFilter::clear_instance_map() { - instance_map_ = false; -} -inline bool MapTypeFilter::_internal_instance_map() const { - return instance_map_; -} -inline bool MapTypeFilter::instance_map() const { - // @@protoc_insertion_point(field_get:waypoint.MapTypeFilter.instance_map) - return _internal_instance_map(); -} -inline void MapTypeFilter::_internal_set_instance_map(bool value) { - - instance_map_ = value; -} -inline void MapTypeFilter::set_instance_map(bool value) { - _internal_set_instance_map(value); - // @@protoc_insertion_point(field_set:waypoint.MapTypeFilter.instance_map) -} - -// bool public_map = 7; -inline void MapTypeFilter::clear_public_map() { - public_map_ = false; -} -inline bool MapTypeFilter::_internal_public_map() const { - return public_map_; -} -inline bool MapTypeFilter::public_map() const { - // @@protoc_insertion_point(field_get:waypoint.MapTypeFilter.public_map) - return _internal_public_map(); -} -inline void MapTypeFilter::_internal_set_public_map(bool value) { - - public_map_ = value; -} -inline void MapTypeFilter::set_public_map(bool value) { - _internal_set_public_map(value); - // @@protoc_insertion_point(field_set:waypoint.MapTypeFilter.public_map) -} - -// bool tournament_map = 8; -inline void MapTypeFilter::clear_tournament_map() { - tournament_map_ = false; -} -inline bool MapTypeFilter::_internal_tournament_map() const { - return tournament_map_; -} -inline bool MapTypeFilter::tournament_map() const { - // @@protoc_insertion_point(field_get:waypoint.MapTypeFilter.tournament_map) - return _internal_tournament_map(); -} -inline void MapTypeFilter::_internal_set_tournament_map(bool value) { - - tournament_map_ = value; -} -inline void MapTypeFilter::set_tournament_map(bool value) { - _internal_set_tournament_map(value); - // @@protoc_insertion_point(field_set:waypoint.MapTypeFilter.tournament_map) -} - -// bool tutorial_map = 9; -inline void MapTypeFilter::clear_tutorial_map() { - tutorial_map_ = false; -} -inline bool MapTypeFilter::_internal_tutorial_map() const { - return tutorial_map_; -} -inline bool MapTypeFilter::tutorial_map() const { - // @@protoc_insertion_point(field_get:waypoint.MapTypeFilter.tutorial_map) - return _internal_tutorial_map(); -} -inline void MapTypeFilter::_internal_set_tutorial_map(bool value) { - - tutorial_map_ = value; -} -inline void MapTypeFilter::set_tutorial_map(bool value) { - _internal_set_tutorial_map(value); - // @@protoc_insertion_point(field_set:waypoint.MapTypeFilter.tutorial_map) -} - -// bool user_tournament_map = 10; -inline void MapTypeFilter::clear_user_tournament_map() { - user_tournament_map_ = false; -} -inline bool MapTypeFilter::_internal_user_tournament_map() const { - return user_tournament_map_; -} -inline bool MapTypeFilter::user_tournament_map() const { - // @@protoc_insertion_point(field_get:waypoint.MapTypeFilter.user_tournament_map) - return _internal_user_tournament_map(); -} -inline void MapTypeFilter::_internal_set_user_tournament_map(bool value) { - - user_tournament_map_ = value; -} -inline void MapTypeFilter::set_user_tournament_map(bool value) { - _internal_set_user_tournament_map(value); - // @@protoc_insertion_point(field_set:waypoint.MapTypeFilter.user_tournament_map) -} - -// bool center_map = 11; -inline void MapTypeFilter::clear_center_map() { - center_map_ = false; -} -inline bool MapTypeFilter::_internal_center_map() const { - return center_map_; -} -inline bool MapTypeFilter::center_map() const { - // @@protoc_insertion_point(field_get:waypoint.MapTypeFilter.center_map) - return _internal_center_map(); -} -inline void MapTypeFilter::_internal_set_center_map(bool value) { - - center_map_ = value; -} -inline void MapTypeFilter::set_center_map(bool value) { - _internal_set_center_map(value); - // @@protoc_insertion_point(field_set:waypoint.MapTypeFilter.center_map) -} - -// bool eternal_battlegrounds_map = 12; -inline void MapTypeFilter::clear_eternal_battlegrounds_map() { - eternal_battlegrounds_map_ = false; -} -inline bool MapTypeFilter::_internal_eternal_battlegrounds_map() const { - return eternal_battlegrounds_map_; -} -inline bool MapTypeFilter::eternal_battlegrounds_map() const { - // @@protoc_insertion_point(field_get:waypoint.MapTypeFilter.eternal_battlegrounds_map) - return _internal_eternal_battlegrounds_map(); -} -inline void MapTypeFilter::_internal_set_eternal_battlegrounds_map(bool value) { - - eternal_battlegrounds_map_ = value; -} -inline void MapTypeFilter::set_eternal_battlegrounds_map(bool value) { - _internal_set_eternal_battlegrounds_map(value); - // @@protoc_insertion_point(field_set:waypoint.MapTypeFilter.eternal_battlegrounds_map) -} - -// bool bluehome_map = 13; -inline void MapTypeFilter::clear_bluehome_map() { - bluehome_map_ = false; -} -inline bool MapTypeFilter::_internal_bluehome_map() const { - return bluehome_map_; -} -inline bool MapTypeFilter::bluehome_map() const { - // @@protoc_insertion_point(field_get:waypoint.MapTypeFilter.bluehome_map) - return _internal_bluehome_map(); -} -inline void MapTypeFilter::_internal_set_bluehome_map(bool value) { - - bluehome_map_ = value; -} -inline void MapTypeFilter::set_bluehome_map(bool value) { - _internal_set_bluehome_map(value); - // @@protoc_insertion_point(field_set:waypoint.MapTypeFilter.bluehome_map) -} - -// bool blue_borderlands_map = 14; -inline void MapTypeFilter::clear_blue_borderlands_map() { - blue_borderlands_map_ = false; -} -inline bool MapTypeFilter::_internal_blue_borderlands_map() const { - return blue_borderlands_map_; -} -inline bool MapTypeFilter::blue_borderlands_map() const { - // @@protoc_insertion_point(field_get:waypoint.MapTypeFilter.blue_borderlands_map) - return _internal_blue_borderlands_map(); -} -inline void MapTypeFilter::_internal_set_blue_borderlands_map(bool value) { - - blue_borderlands_map_ = value; -} -inline void MapTypeFilter::set_blue_borderlands_map(bool value) { - _internal_set_blue_borderlands_map(value); - // @@protoc_insertion_point(field_set:waypoint.MapTypeFilter.blue_borderlands_map) -} - -// bool green_home_map = 15; -inline void MapTypeFilter::clear_green_home_map() { - green_home_map_ = false; -} -inline bool MapTypeFilter::_internal_green_home_map() const { - return green_home_map_; -} -inline bool MapTypeFilter::green_home_map() const { - // @@protoc_insertion_point(field_get:waypoint.MapTypeFilter.green_home_map) - return _internal_green_home_map(); -} -inline void MapTypeFilter::_internal_set_green_home_map(bool value) { - - green_home_map_ = value; -} -inline void MapTypeFilter::set_green_home_map(bool value) { - _internal_set_green_home_map(value); - // @@protoc_insertion_point(field_set:waypoint.MapTypeFilter.green_home_map) -} - -// bool green_borderlands_map = 16; -inline void MapTypeFilter::clear_green_borderlands_map() { - green_borderlands_map_ = false; -} -inline bool MapTypeFilter::_internal_green_borderlands_map() const { - return green_borderlands_map_; -} -inline bool MapTypeFilter::green_borderlands_map() const { - // @@protoc_insertion_point(field_get:waypoint.MapTypeFilter.green_borderlands_map) - return _internal_green_borderlands_map(); -} -inline void MapTypeFilter::_internal_set_green_borderlands_map(bool value) { - - green_borderlands_map_ = value; -} -inline void MapTypeFilter::set_green_borderlands_map(bool value) { - _internal_set_green_borderlands_map(value); - // @@protoc_insertion_point(field_set:waypoint.MapTypeFilter.green_borderlands_map) -} - -// bool red_home_map = 17; -inline void MapTypeFilter::clear_red_home_map() { - red_home_map_ = false; -} -inline bool MapTypeFilter::_internal_red_home_map() const { - return red_home_map_; -} -inline bool MapTypeFilter::red_home_map() const { - // @@protoc_insertion_point(field_get:waypoint.MapTypeFilter.red_home_map) - return _internal_red_home_map(); -} -inline void MapTypeFilter::_internal_set_red_home_map(bool value) { - - red_home_map_ = value; -} -inline void MapTypeFilter::set_red_home_map(bool value) { - _internal_set_red_home_map(value); - // @@protoc_insertion_point(field_set:waypoint.MapTypeFilter.red_home_map) -} - -// bool red_borderlands_map = 18; -inline void MapTypeFilter::clear_red_borderlands_map() { - red_borderlands_map_ = false; -} -inline bool MapTypeFilter::_internal_red_borderlands_map() const { - return red_borderlands_map_; -} -inline bool MapTypeFilter::red_borderlands_map() const { - // @@protoc_insertion_point(field_get:waypoint.MapTypeFilter.red_borderlands_map) - return _internal_red_borderlands_map(); -} -inline void MapTypeFilter::_internal_set_red_borderlands_map(bool value) { - - red_borderlands_map_ = value; -} -inline void MapTypeFilter::set_red_borderlands_map(bool value) { - _internal_set_red_borderlands_map(value); - // @@protoc_insertion_point(field_set:waypoint.MapTypeFilter.red_borderlands_map) -} - -// bool fortunes_vale_map = 19; -inline void MapTypeFilter::clear_fortunes_vale_map() { - fortunes_vale_map_ = false; -} -inline bool MapTypeFilter::_internal_fortunes_vale_map() const { - return fortunes_vale_map_; -} -inline bool MapTypeFilter::fortunes_vale_map() const { - // @@protoc_insertion_point(field_get:waypoint.MapTypeFilter.fortunes_vale_map) - return _internal_fortunes_vale_map(); -} -inline void MapTypeFilter::_internal_set_fortunes_vale_map(bool value) { - - fortunes_vale_map_ = value; -} -inline void MapTypeFilter::set_fortunes_vale_map(bool value) { - _internal_set_fortunes_vale_map(value); - // @@protoc_insertion_point(field_set:waypoint.MapTypeFilter.fortunes_vale_map) -} - -// bool jump_puzzle_map = 20; -inline void MapTypeFilter::clear_jump_puzzle_map() { - jump_puzzle_map_ = false; -} -inline bool MapTypeFilter::_internal_jump_puzzle_map() const { - return jump_puzzle_map_; -} -inline bool MapTypeFilter::jump_puzzle_map() const { - // @@protoc_insertion_point(field_get:waypoint.MapTypeFilter.jump_puzzle_map) - return _internal_jump_puzzle_map(); -} -inline void MapTypeFilter::_internal_set_jump_puzzle_map(bool value) { - - jump_puzzle_map_ = value; -} -inline void MapTypeFilter::set_jump_puzzle_map(bool value) { - _internal_set_jump_puzzle_map(value); - // @@protoc_insertion_point(field_set:waypoint.MapTypeFilter.jump_puzzle_map) -} - -// bool obsidian_sanctum_map = 21; -inline void MapTypeFilter::clear_obsidian_sanctum_map() { - obsidian_sanctum_map_ = false; -} -inline bool MapTypeFilter::_internal_obsidian_sanctum_map() const { - return obsidian_sanctum_map_; -} -inline bool MapTypeFilter::obsidian_sanctum_map() const { - // @@protoc_insertion_point(field_get:waypoint.MapTypeFilter.obsidian_sanctum_map) - return _internal_obsidian_sanctum_map(); -} -inline void MapTypeFilter::_internal_set_obsidian_sanctum_map(bool value) { - - obsidian_sanctum_map_ = value; -} -inline void MapTypeFilter::set_obsidian_sanctum_map(bool value) { - _internal_set_obsidian_sanctum_map(value); - // @@protoc_insertion_point(field_set:waypoint.MapTypeFilter.obsidian_sanctum_map) -} - -// bool edge_of_the_mists_map = 22; -inline void MapTypeFilter::clear_edge_of_the_mists_map() { - edge_of_the_mists_map_ = false; -} -inline bool MapTypeFilter::_internal_edge_of_the_mists_map() const { - return edge_of_the_mists_map_; -} -inline bool MapTypeFilter::edge_of_the_mists_map() const { - // @@protoc_insertion_point(field_get:waypoint.MapTypeFilter.edge_of_the_mists_map) - return _internal_edge_of_the_mists_map(); -} -inline void MapTypeFilter::_internal_set_edge_of_the_mists_map(bool value) { - - edge_of_the_mists_map_ = value; -} -inline void MapTypeFilter::set_edge_of_the_mists_map(bool value) { - _internal_set_edge_of_the_mists_map(value); - // @@protoc_insertion_point(field_set:waypoint.MapTypeFilter.edge_of_the_mists_map) -} - -// bool public_mini_map = 23; -inline void MapTypeFilter::clear_public_mini_map() { - public_mini_map_ = false; -} -inline bool MapTypeFilter::_internal_public_mini_map() const { - return public_mini_map_; -} -inline bool MapTypeFilter::public_mini_map() const { - // @@protoc_insertion_point(field_get:waypoint.MapTypeFilter.public_mini_map) - return _internal_public_mini_map(); -} -inline void MapTypeFilter::_internal_set_public_mini_map(bool value) { - - public_mini_map_ = value; -} -inline void MapTypeFilter::set_public_mini_map(bool value) { - _internal_set_public_mini_map(value); - // @@protoc_insertion_point(field_set:waypoint.MapTypeFilter.public_mini_map) -} - -// bool wvw_lounge_map = 24; -inline void MapTypeFilter::clear_wvw_lounge_map() { - wvw_lounge_map_ = false; -} -inline bool MapTypeFilter::_internal_wvw_lounge_map() const { - return wvw_lounge_map_; -} -inline bool MapTypeFilter::wvw_lounge_map() const { - // @@protoc_insertion_point(field_get:waypoint.MapTypeFilter.wvw_lounge_map) - return _internal_wvw_lounge_map(); -} -inline void MapTypeFilter::_internal_set_wvw_lounge_map(bool value) { - - wvw_lounge_map_ = value; -} -inline void MapTypeFilter::set_wvw_lounge_map(bool value) { - _internal_set_wvw_lounge_map(value); - // @@protoc_insertion_point(field_set:waypoint.MapTypeFilter.wvw_lounge_map) -} - -// ------------------------------------------------------------------- - -// MountFilter - -// bool raptor = 1; -inline void MountFilter::clear_raptor() { - raptor_ = false; -} -inline bool MountFilter::_internal_raptor() const { - return raptor_; -} -inline bool MountFilter::raptor() const { - // @@protoc_insertion_point(field_get:waypoint.MountFilter.raptor) - return _internal_raptor(); -} -inline void MountFilter::_internal_set_raptor(bool value) { - - raptor_ = value; -} -inline void MountFilter::set_raptor(bool value) { - _internal_set_raptor(value); - // @@protoc_insertion_point(field_set:waypoint.MountFilter.raptor) -} - -// bool springer = 2; -inline void MountFilter::clear_springer() { - springer_ = false; -} -inline bool MountFilter::_internal_springer() const { - return springer_; -} -inline bool MountFilter::springer() const { - // @@protoc_insertion_point(field_get:waypoint.MountFilter.springer) - return _internal_springer(); -} -inline void MountFilter::_internal_set_springer(bool value) { - - springer_ = value; -} -inline void MountFilter::set_springer(bool value) { - _internal_set_springer(value); - // @@protoc_insertion_point(field_set:waypoint.MountFilter.springer) -} - -// bool skimmer = 3; -inline void MountFilter::clear_skimmer() { - skimmer_ = false; -} -inline bool MountFilter::_internal_skimmer() const { - return skimmer_; -} -inline bool MountFilter::skimmer() const { - // @@protoc_insertion_point(field_get:waypoint.MountFilter.skimmer) - return _internal_skimmer(); -} -inline void MountFilter::_internal_set_skimmer(bool value) { - - skimmer_ = value; -} -inline void MountFilter::set_skimmer(bool value) { - _internal_set_skimmer(value); - // @@protoc_insertion_point(field_set:waypoint.MountFilter.skimmer) -} - -// bool jackal = 4; -inline void MountFilter::clear_jackal() { - jackal_ = false; -} -inline bool MountFilter::_internal_jackal() const { - return jackal_; -} -inline bool MountFilter::jackal() const { - // @@protoc_insertion_point(field_get:waypoint.MountFilter.jackal) - return _internal_jackal(); -} -inline void MountFilter::_internal_set_jackal(bool value) { - - jackal_ = value; -} -inline void MountFilter::set_jackal(bool value) { - _internal_set_jackal(value); - // @@protoc_insertion_point(field_set:waypoint.MountFilter.jackal) -} - -// bool griffon = 5; -inline void MountFilter::clear_griffon() { - griffon_ = false; -} -inline bool MountFilter::_internal_griffon() const { - return griffon_; -} -inline bool MountFilter::griffon() const { - // @@protoc_insertion_point(field_get:waypoint.MountFilter.griffon) - return _internal_griffon(); -} -inline void MountFilter::_internal_set_griffon(bool value) { - - griffon_ = value; -} -inline void MountFilter::set_griffon(bool value) { - _internal_set_griffon(value); - // @@protoc_insertion_point(field_set:waypoint.MountFilter.griffon) -} - -// bool roller_beetle = 6; -inline void MountFilter::clear_roller_beetle() { - roller_beetle_ = false; -} -inline bool MountFilter::_internal_roller_beetle() const { - return roller_beetle_; -} -inline bool MountFilter::roller_beetle() const { - // @@protoc_insertion_point(field_get:waypoint.MountFilter.roller_beetle) - return _internal_roller_beetle(); -} -inline void MountFilter::_internal_set_roller_beetle(bool value) { - - roller_beetle_ = value; -} -inline void MountFilter::set_roller_beetle(bool value) { - _internal_set_roller_beetle(value); - // @@protoc_insertion_point(field_set:waypoint.MountFilter.roller_beetle) -} - -// bool warclaw = 7; -inline void MountFilter::clear_warclaw() { - warclaw_ = false; -} -inline bool MountFilter::_internal_warclaw() const { - return warclaw_; -} -inline bool MountFilter::warclaw() const { - // @@protoc_insertion_point(field_get:waypoint.MountFilter.warclaw) - return _internal_warclaw(); -} -inline void MountFilter::_internal_set_warclaw(bool value) { - - warclaw_ = value; -} -inline void MountFilter::set_warclaw(bool value) { - _internal_set_warclaw(value); - // @@protoc_insertion_point(field_set:waypoint.MountFilter.warclaw) -} - -// bool skyscalee = 8; -inline void MountFilter::clear_skyscalee() { - skyscalee_ = false; -} -inline bool MountFilter::_internal_skyscalee() const { - return skyscalee_; -} -inline bool MountFilter::skyscalee() const { - // @@protoc_insertion_point(field_get:waypoint.MountFilter.skyscalee) - return _internal_skyscalee(); -} -inline void MountFilter::_internal_set_skyscalee(bool value) { - - skyscalee_ = value; -} -inline void MountFilter::set_skyscalee(bool value) { - _internal_set_skyscalee(value); - // @@protoc_insertion_point(field_set:waypoint.MountFilter.skyscalee) -} - -// bool skiff = 9; -inline void MountFilter::clear_skiff() { - skiff_ = false; -} -inline bool MountFilter::_internal_skiff() const { - return skiff_; -} -inline bool MountFilter::skiff() const { - // @@protoc_insertion_point(field_get:waypoint.MountFilter.skiff) - return _internal_skiff(); -} -inline void MountFilter::_internal_set_skiff(bool value) { - - skiff_ = value; -} -inline void MountFilter::set_skiff(bool value) { - _internal_set_skiff(value); - // @@protoc_insertion_point(field_set:waypoint.MountFilter.skiff) -} - -// bool seige_turtle = 10; -inline void MountFilter::clear_seige_turtle() { - seige_turtle_ = false; -} -inline bool MountFilter::_internal_seige_turtle() const { - return seige_turtle_; -} -inline bool MountFilter::seige_turtle() const { - // @@protoc_insertion_point(field_get:waypoint.MountFilter.seige_turtle) - return _internal_seige_turtle(); -} -inline void MountFilter::_internal_set_seige_turtle(bool value) { - - seige_turtle_ = value; -} -inline void MountFilter::set_seige_turtle(bool value) { - _internal_set_seige_turtle(value); - // @@protoc_insertion_point(field_set:waypoint.MountFilter.seige_turtle) -} - -// ------------------------------------------------------------------- - -// ProfessionFilter - -// bool guardian = 1; -inline void ProfessionFilter::clear_guardian() { - guardian_ = false; -} -inline bool ProfessionFilter::_internal_guardian() const { - return guardian_; -} -inline bool ProfessionFilter::guardian() const { - // @@protoc_insertion_point(field_get:waypoint.ProfessionFilter.guardian) - return _internal_guardian(); -} -inline void ProfessionFilter::_internal_set_guardian(bool value) { - - guardian_ = value; -} -inline void ProfessionFilter::set_guardian(bool value) { - _internal_set_guardian(value); - // @@protoc_insertion_point(field_set:waypoint.ProfessionFilter.guardian) -} - -// bool warrior = 2; -inline void ProfessionFilter::clear_warrior() { - warrior_ = false; -} -inline bool ProfessionFilter::_internal_warrior() const { - return warrior_; -} -inline bool ProfessionFilter::warrior() const { - // @@protoc_insertion_point(field_get:waypoint.ProfessionFilter.warrior) - return _internal_warrior(); -} -inline void ProfessionFilter::_internal_set_warrior(bool value) { - - warrior_ = value; -} -inline void ProfessionFilter::set_warrior(bool value) { - _internal_set_warrior(value); - // @@protoc_insertion_point(field_set:waypoint.ProfessionFilter.warrior) -} - -// bool engineer = 3; -inline void ProfessionFilter::clear_engineer() { - engineer_ = false; -} -inline bool ProfessionFilter::_internal_engineer() const { - return engineer_; -} -inline bool ProfessionFilter::engineer() const { - // @@protoc_insertion_point(field_get:waypoint.ProfessionFilter.engineer) - return _internal_engineer(); -} -inline void ProfessionFilter::_internal_set_engineer(bool value) { - - engineer_ = value; -} -inline void ProfessionFilter::set_engineer(bool value) { - _internal_set_engineer(value); - // @@protoc_insertion_point(field_set:waypoint.ProfessionFilter.engineer) -} - -// bool ranger = 4; -inline void ProfessionFilter::clear_ranger() { - ranger_ = false; -} -inline bool ProfessionFilter::_internal_ranger() const { - return ranger_; -} -inline bool ProfessionFilter::ranger() const { - // @@protoc_insertion_point(field_get:waypoint.ProfessionFilter.ranger) - return _internal_ranger(); -} -inline void ProfessionFilter::_internal_set_ranger(bool value) { - - ranger_ = value; -} -inline void ProfessionFilter::set_ranger(bool value) { - _internal_set_ranger(value); - // @@protoc_insertion_point(field_set:waypoint.ProfessionFilter.ranger) -} - -// bool thief = 5; -inline void ProfessionFilter::clear_thief() { - thief_ = false; -} -inline bool ProfessionFilter::_internal_thief() const { - return thief_; -} -inline bool ProfessionFilter::thief() const { - // @@protoc_insertion_point(field_get:waypoint.ProfessionFilter.thief) - return _internal_thief(); -} -inline void ProfessionFilter::_internal_set_thief(bool value) { - - thief_ = value; -} -inline void ProfessionFilter::set_thief(bool value) { - _internal_set_thief(value); - // @@protoc_insertion_point(field_set:waypoint.ProfessionFilter.thief) -} - -// bool elementalist = 6; -inline void ProfessionFilter::clear_elementalist() { - elementalist_ = false; -} -inline bool ProfessionFilter::_internal_elementalist() const { - return elementalist_; -} -inline bool ProfessionFilter::elementalist() const { - // @@protoc_insertion_point(field_get:waypoint.ProfessionFilter.elementalist) - return _internal_elementalist(); -} -inline void ProfessionFilter::_internal_set_elementalist(bool value) { - - elementalist_ = value; -} -inline void ProfessionFilter::set_elementalist(bool value) { - _internal_set_elementalist(value); - // @@protoc_insertion_point(field_set:waypoint.ProfessionFilter.elementalist) -} - -// bool mesmer = 7; -inline void ProfessionFilter::clear_mesmer() { - mesmer_ = false; -} -inline bool ProfessionFilter::_internal_mesmer() const { - return mesmer_; -} -inline bool ProfessionFilter::mesmer() const { - // @@protoc_insertion_point(field_get:waypoint.ProfessionFilter.mesmer) - return _internal_mesmer(); -} -inline void ProfessionFilter::_internal_set_mesmer(bool value) { - - mesmer_ = value; -} -inline void ProfessionFilter::set_mesmer(bool value) { - _internal_set_mesmer(value); - // @@protoc_insertion_point(field_set:waypoint.ProfessionFilter.mesmer) -} - -// bool necromancer = 8; -inline void ProfessionFilter::clear_necromancer() { - necromancer_ = false; -} -inline bool ProfessionFilter::_internal_necromancer() const { - return necromancer_; -} -inline bool ProfessionFilter::necromancer() const { - // @@protoc_insertion_point(field_get:waypoint.ProfessionFilter.necromancer) - return _internal_necromancer(); -} -inline void ProfessionFilter::_internal_set_necromancer(bool value) { - - necromancer_ = value; -} -inline void ProfessionFilter::set_necromancer(bool value) { - _internal_set_necromancer(value); - // @@protoc_insertion_point(field_set:waypoint.ProfessionFilter.necromancer) -} - -// bool revenantnt = 9; -inline void ProfessionFilter::clear_revenantnt() { - revenantnt_ = false; -} -inline bool ProfessionFilter::_internal_revenantnt() const { - return revenantnt_; -} -inline bool ProfessionFilter::revenantnt() const { - // @@protoc_insertion_point(field_get:waypoint.ProfessionFilter.revenantnt) - return _internal_revenantnt(); -} -inline void ProfessionFilter::_internal_set_revenantnt(bool value) { - - revenantnt_ = value; -} -inline void ProfessionFilter::set_revenantnt(bool value) { - _internal_set_revenantnt(value); - // @@protoc_insertion_point(field_set:waypoint.ProfessionFilter.revenantnt) -} - -// ------------------------------------------------------------------- - -// SpecializationFilter - -// bool elementalist_tempest = 1; -inline void SpecializationFilter::clear_elementalist_tempest() { - elementalist_tempest_ = false; -} -inline bool SpecializationFilter::_internal_elementalist_tempest() const { - return elementalist_tempest_; -} -inline bool SpecializationFilter::elementalist_tempest() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.elementalist_tempest) - return _internal_elementalist_tempest(); -} -inline void SpecializationFilter::_internal_set_elementalist_tempest(bool value) { - - elementalist_tempest_ = value; -} -inline void SpecializationFilter::set_elementalist_tempest(bool value) { - _internal_set_elementalist_tempest(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.elementalist_tempest) -} - -// bool engineer_scrapper = 2; -inline void SpecializationFilter::clear_engineer_scrapper() { - engineer_scrapper_ = false; -} -inline bool SpecializationFilter::_internal_engineer_scrapper() const { - return engineer_scrapper_; -} -inline bool SpecializationFilter::engineer_scrapper() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.engineer_scrapper) - return _internal_engineer_scrapper(); -} -inline void SpecializationFilter::_internal_set_engineer_scrapper(bool value) { - - engineer_scrapper_ = value; -} -inline void SpecializationFilter::set_engineer_scrapper(bool value) { - _internal_set_engineer_scrapper(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.engineer_scrapper) -} - -// bool guardian_dragonhunter = 3; -inline void SpecializationFilter::clear_guardian_dragonhunter() { - guardian_dragonhunter_ = false; -} -inline bool SpecializationFilter::_internal_guardian_dragonhunter() const { - return guardian_dragonhunter_; -} -inline bool SpecializationFilter::guardian_dragonhunter() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.guardian_dragonhunter) - return _internal_guardian_dragonhunter(); -} -inline void SpecializationFilter::_internal_set_guardian_dragonhunter(bool value) { - - guardian_dragonhunter_ = value; -} -inline void SpecializationFilter::set_guardian_dragonhunter(bool value) { - _internal_set_guardian_dragonhunter(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.guardian_dragonhunter) -} - -// bool mesmer_chronomancer = 4; -inline void SpecializationFilter::clear_mesmer_chronomancer() { - mesmer_chronomancer_ = false; -} -inline bool SpecializationFilter::_internal_mesmer_chronomancer() const { - return mesmer_chronomancer_; -} -inline bool SpecializationFilter::mesmer_chronomancer() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.mesmer_chronomancer) - return _internal_mesmer_chronomancer(); -} -inline void SpecializationFilter::_internal_set_mesmer_chronomancer(bool value) { - - mesmer_chronomancer_ = value; -} -inline void SpecializationFilter::set_mesmer_chronomancer(bool value) { - _internal_set_mesmer_chronomancer(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.mesmer_chronomancer) -} - -// bool necromancer_reaper = 5; -inline void SpecializationFilter::clear_necromancer_reaper() { - necromancer_reaper_ = false; -} -inline bool SpecializationFilter::_internal_necromancer_reaper() const { - return necromancer_reaper_; -} -inline bool SpecializationFilter::necromancer_reaper() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.necromancer_reaper) - return _internal_necromancer_reaper(); -} -inline void SpecializationFilter::_internal_set_necromancer_reaper(bool value) { - - necromancer_reaper_ = value; -} -inline void SpecializationFilter::set_necromancer_reaper(bool value) { - _internal_set_necromancer_reaper(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.necromancer_reaper) -} - -// bool ranger_druid = 6; -inline void SpecializationFilter::clear_ranger_druid() { - ranger_druid_ = false; -} -inline bool SpecializationFilter::_internal_ranger_druid() const { - return ranger_druid_; -} -inline bool SpecializationFilter::ranger_druid() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.ranger_druid) - return _internal_ranger_druid(); -} -inline void SpecializationFilter::_internal_set_ranger_druid(bool value) { - - ranger_druid_ = value; -} -inline void SpecializationFilter::set_ranger_druid(bool value) { - _internal_set_ranger_druid(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.ranger_druid) -} - -// bool revenant_herald = 7; -inline void SpecializationFilter::clear_revenant_herald() { - revenant_herald_ = false; -} -inline bool SpecializationFilter::_internal_revenant_herald() const { - return revenant_herald_; -} -inline bool SpecializationFilter::revenant_herald() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.revenant_herald) - return _internal_revenant_herald(); -} -inline void SpecializationFilter::_internal_set_revenant_herald(bool value) { - - revenant_herald_ = value; -} -inline void SpecializationFilter::set_revenant_herald(bool value) { - _internal_set_revenant_herald(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.revenant_herald) -} - -// bool thief_daredevil = 8; -inline void SpecializationFilter::clear_thief_daredevil() { - thief_daredevil_ = false; -} -inline bool SpecializationFilter::_internal_thief_daredevil() const { - return thief_daredevil_; -} -inline bool SpecializationFilter::thief_daredevil() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.thief_daredevil) - return _internal_thief_daredevil(); -} -inline void SpecializationFilter::_internal_set_thief_daredevil(bool value) { - - thief_daredevil_ = value; -} -inline void SpecializationFilter::set_thief_daredevil(bool value) { - _internal_set_thief_daredevil(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.thief_daredevil) -} - -// bool warrior_berserker = 9; -inline void SpecializationFilter::clear_warrior_berserker() { - warrior_berserker_ = false; -} -inline bool SpecializationFilter::_internal_warrior_berserker() const { - return warrior_berserker_; -} -inline bool SpecializationFilter::warrior_berserker() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.warrior_berserker) - return _internal_warrior_berserker(); -} -inline void SpecializationFilter::_internal_set_warrior_berserker(bool value) { - - warrior_berserker_ = value; -} -inline void SpecializationFilter::set_warrior_berserker(bool value) { - _internal_set_warrior_berserker(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.warrior_berserker) -} - -// bool elementalist_weaver = 10; -inline void SpecializationFilter::clear_elementalist_weaver() { - elementalist_weaver_ = false; -} -inline bool SpecializationFilter::_internal_elementalist_weaver() const { - return elementalist_weaver_; -} -inline bool SpecializationFilter::elementalist_weaver() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.elementalist_weaver) - return _internal_elementalist_weaver(); -} -inline void SpecializationFilter::_internal_set_elementalist_weaver(bool value) { - - elementalist_weaver_ = value; -} -inline void SpecializationFilter::set_elementalist_weaver(bool value) { - _internal_set_elementalist_weaver(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.elementalist_weaver) -} - -// bool engineer_holosmith = 11; -inline void SpecializationFilter::clear_engineer_holosmith() { - engineer_holosmith_ = false; -} -inline bool SpecializationFilter::_internal_engineer_holosmith() const { - return engineer_holosmith_; -} -inline bool SpecializationFilter::engineer_holosmith() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.engineer_holosmith) - return _internal_engineer_holosmith(); -} -inline void SpecializationFilter::_internal_set_engineer_holosmith(bool value) { - - engineer_holosmith_ = value; -} -inline void SpecializationFilter::set_engineer_holosmith(bool value) { - _internal_set_engineer_holosmith(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.engineer_holosmith) -} - -// bool guardian_firebrand = 12; -inline void SpecializationFilter::clear_guardian_firebrand() { - guardian_firebrand_ = false; -} -inline bool SpecializationFilter::_internal_guardian_firebrand() const { - return guardian_firebrand_; -} -inline bool SpecializationFilter::guardian_firebrand() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.guardian_firebrand) - return _internal_guardian_firebrand(); -} -inline void SpecializationFilter::_internal_set_guardian_firebrand(bool value) { - - guardian_firebrand_ = value; -} -inline void SpecializationFilter::set_guardian_firebrand(bool value) { - _internal_set_guardian_firebrand(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.guardian_firebrand) -} - -// bool mesmer_mirage = 13; -inline void SpecializationFilter::clear_mesmer_mirage() { - mesmer_mirage_ = false; -} -inline bool SpecializationFilter::_internal_mesmer_mirage() const { - return mesmer_mirage_; -} -inline bool SpecializationFilter::mesmer_mirage() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.mesmer_mirage) - return _internal_mesmer_mirage(); -} -inline void SpecializationFilter::_internal_set_mesmer_mirage(bool value) { - - mesmer_mirage_ = value; -} -inline void SpecializationFilter::set_mesmer_mirage(bool value) { - _internal_set_mesmer_mirage(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.mesmer_mirage) -} - -// bool necromancer_scourge = 14; -inline void SpecializationFilter::clear_necromancer_scourge() { - necromancer_scourge_ = false; -} -inline bool SpecializationFilter::_internal_necromancer_scourge() const { - return necromancer_scourge_; -} -inline bool SpecializationFilter::necromancer_scourge() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.necromancer_scourge) - return _internal_necromancer_scourge(); -} -inline void SpecializationFilter::_internal_set_necromancer_scourge(bool value) { - - necromancer_scourge_ = value; -} -inline void SpecializationFilter::set_necromancer_scourge(bool value) { - _internal_set_necromancer_scourge(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.necromancer_scourge) -} - -// bool ranger_soulbeast = 15; -inline void SpecializationFilter::clear_ranger_soulbeast() { - ranger_soulbeast_ = false; -} -inline bool SpecializationFilter::_internal_ranger_soulbeast() const { - return ranger_soulbeast_; -} -inline bool SpecializationFilter::ranger_soulbeast() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.ranger_soulbeast) - return _internal_ranger_soulbeast(); -} -inline void SpecializationFilter::_internal_set_ranger_soulbeast(bool value) { - - ranger_soulbeast_ = value; -} -inline void SpecializationFilter::set_ranger_soulbeast(bool value) { - _internal_set_ranger_soulbeast(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.ranger_soulbeast) -} - -// bool revenant_renegade = 16; -inline void SpecializationFilter::clear_revenant_renegade() { - revenant_renegade_ = false; -} -inline bool SpecializationFilter::_internal_revenant_renegade() const { - return revenant_renegade_; -} -inline bool SpecializationFilter::revenant_renegade() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.revenant_renegade) - return _internal_revenant_renegade(); -} -inline void SpecializationFilter::_internal_set_revenant_renegade(bool value) { - - revenant_renegade_ = value; -} -inline void SpecializationFilter::set_revenant_renegade(bool value) { - _internal_set_revenant_renegade(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.revenant_renegade) -} - -// bool thief_deadeye = 17; -inline void SpecializationFilter::clear_thief_deadeye() { - thief_deadeye_ = false; -} -inline bool SpecializationFilter::_internal_thief_deadeye() const { - return thief_deadeye_; -} -inline bool SpecializationFilter::thief_deadeye() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.thief_deadeye) - return _internal_thief_deadeye(); -} -inline void SpecializationFilter::_internal_set_thief_deadeye(bool value) { - - thief_deadeye_ = value; -} -inline void SpecializationFilter::set_thief_deadeye(bool value) { - _internal_set_thief_deadeye(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.thief_deadeye) -} - -// bool warrior_spellbreaker = 18; -inline void SpecializationFilter::clear_warrior_spellbreaker() { - warrior_spellbreaker_ = false; -} -inline bool SpecializationFilter::_internal_warrior_spellbreaker() const { - return warrior_spellbreaker_; -} -inline bool SpecializationFilter::warrior_spellbreaker() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.warrior_spellbreaker) - return _internal_warrior_spellbreaker(); -} -inline void SpecializationFilter::_internal_set_warrior_spellbreaker(bool value) { - - warrior_spellbreaker_ = value; -} -inline void SpecializationFilter::set_warrior_spellbreaker(bool value) { - _internal_set_warrior_spellbreaker(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.warrior_spellbreaker) -} - -// bool elmentalist_catalyst = 19; -inline void SpecializationFilter::clear_elmentalist_catalyst() { - elmentalist_catalyst_ = false; -} -inline bool SpecializationFilter::_internal_elmentalist_catalyst() const { - return elmentalist_catalyst_; -} -inline bool SpecializationFilter::elmentalist_catalyst() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.elmentalist_catalyst) - return _internal_elmentalist_catalyst(); -} -inline void SpecializationFilter::_internal_set_elmentalist_catalyst(bool value) { - - elmentalist_catalyst_ = value; -} -inline void SpecializationFilter::set_elmentalist_catalyst(bool value) { - _internal_set_elmentalist_catalyst(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.elmentalist_catalyst) -} - -// bool engineer_mechanist = 20; -inline void SpecializationFilter::clear_engineer_mechanist() { - engineer_mechanist_ = false; -} -inline bool SpecializationFilter::_internal_engineer_mechanist() const { - return engineer_mechanist_; -} -inline bool SpecializationFilter::engineer_mechanist() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.engineer_mechanist) - return _internal_engineer_mechanist(); -} -inline void SpecializationFilter::_internal_set_engineer_mechanist(bool value) { - - engineer_mechanist_ = value; -} -inline void SpecializationFilter::set_engineer_mechanist(bool value) { - _internal_set_engineer_mechanist(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.engineer_mechanist) -} - -// bool guardian_willbender = 21; -inline void SpecializationFilter::clear_guardian_willbender() { - guardian_willbender_ = false; -} -inline bool SpecializationFilter::_internal_guardian_willbender() const { - return guardian_willbender_; -} -inline bool SpecializationFilter::guardian_willbender() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.guardian_willbender) - return _internal_guardian_willbender(); -} -inline void SpecializationFilter::_internal_set_guardian_willbender(bool value) { - - guardian_willbender_ = value; -} -inline void SpecializationFilter::set_guardian_willbender(bool value) { - _internal_set_guardian_willbender(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.guardian_willbender) -} - -// bool mesmer_virtuoso = 22; -inline void SpecializationFilter::clear_mesmer_virtuoso() { - mesmer_virtuoso_ = false; -} -inline bool SpecializationFilter::_internal_mesmer_virtuoso() const { - return mesmer_virtuoso_; -} -inline bool SpecializationFilter::mesmer_virtuoso() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.mesmer_virtuoso) - return _internal_mesmer_virtuoso(); -} -inline void SpecializationFilter::_internal_set_mesmer_virtuoso(bool value) { - - mesmer_virtuoso_ = value; -} -inline void SpecializationFilter::set_mesmer_virtuoso(bool value) { - _internal_set_mesmer_virtuoso(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.mesmer_virtuoso) -} - -// bool necromancer_harbinger = 23; -inline void SpecializationFilter::clear_necromancer_harbinger() { - necromancer_harbinger_ = false; -} -inline bool SpecializationFilter::_internal_necromancer_harbinger() const { - return necromancer_harbinger_; -} -inline bool SpecializationFilter::necromancer_harbinger() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.necromancer_harbinger) - return _internal_necromancer_harbinger(); -} -inline void SpecializationFilter::_internal_set_necromancer_harbinger(bool value) { - - necromancer_harbinger_ = value; -} -inline void SpecializationFilter::set_necromancer_harbinger(bool value) { - _internal_set_necromancer_harbinger(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.necromancer_harbinger) -} - -// bool ranger_untamed = 24; -inline void SpecializationFilter::clear_ranger_untamed() { - ranger_untamed_ = false; -} -inline bool SpecializationFilter::_internal_ranger_untamed() const { - return ranger_untamed_; -} -inline bool SpecializationFilter::ranger_untamed() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.ranger_untamed) - return _internal_ranger_untamed(); -} -inline void SpecializationFilter::_internal_set_ranger_untamed(bool value) { - - ranger_untamed_ = value; -} -inline void SpecializationFilter::set_ranger_untamed(bool value) { - _internal_set_ranger_untamed(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.ranger_untamed) -} - -// bool revenant_vindicator = 25; -inline void SpecializationFilter::clear_revenant_vindicator() { - revenant_vindicator_ = false; -} -inline bool SpecializationFilter::_internal_revenant_vindicator() const { - return revenant_vindicator_; -} -inline bool SpecializationFilter::revenant_vindicator() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.revenant_vindicator) - return _internal_revenant_vindicator(); -} -inline void SpecializationFilter::_internal_set_revenant_vindicator(bool value) { - - revenant_vindicator_ = value; -} -inline void SpecializationFilter::set_revenant_vindicator(bool value) { - _internal_set_revenant_vindicator(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.revenant_vindicator) -} - -// bool thief_specter = 26; -inline void SpecializationFilter::clear_thief_specter() { - thief_specter_ = false; -} -inline bool SpecializationFilter::_internal_thief_specter() const { - return thief_specter_; -} -inline bool SpecializationFilter::thief_specter() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.thief_specter) - return _internal_thief_specter(); -} -inline void SpecializationFilter::_internal_set_thief_specter(bool value) { - - thief_specter_ = value; -} -inline void SpecializationFilter::set_thief_specter(bool value) { - _internal_set_thief_specter(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.thief_specter) -} - -// bool warrior_bladesworn = 27; -inline void SpecializationFilter::clear_warrior_bladesworn() { - warrior_bladesworn_ = false; -} -inline bool SpecializationFilter::_internal_warrior_bladesworn() const { - return warrior_bladesworn_; -} -inline bool SpecializationFilter::warrior_bladesworn() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.warrior_bladesworn) - return _internal_warrior_bladesworn(); -} -inline void SpecializationFilter::_internal_set_warrior_bladesworn(bool value) { - - warrior_bladesworn_ = value; -} -inline void SpecializationFilter::set_warrior_bladesworn(bool value) { - _internal_set_warrior_bladesworn(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.warrior_bladesworn) -} - -// bool elementalist_air = 28; -inline void SpecializationFilter::clear_elementalist_air() { - elementalist_air_ = false; -} -inline bool SpecializationFilter::_internal_elementalist_air() const { - return elementalist_air_; -} -inline bool SpecializationFilter::elementalist_air() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.elementalist_air) - return _internal_elementalist_air(); -} -inline void SpecializationFilter::_internal_set_elementalist_air(bool value) { - - elementalist_air_ = value; -} -inline void SpecializationFilter::set_elementalist_air(bool value) { - _internal_set_elementalist_air(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.elementalist_air) -} - -// bool elementalist_arcane = 29; -inline void SpecializationFilter::clear_elementalist_arcane() { - elementalist_arcane_ = false; -} -inline bool SpecializationFilter::_internal_elementalist_arcane() const { - return elementalist_arcane_; -} -inline bool SpecializationFilter::elementalist_arcane() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.elementalist_arcane) - return _internal_elementalist_arcane(); -} -inline void SpecializationFilter::_internal_set_elementalist_arcane(bool value) { - - elementalist_arcane_ = value; -} -inline void SpecializationFilter::set_elementalist_arcane(bool value) { - _internal_set_elementalist_arcane(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.elementalist_arcane) -} - -// bool elementalist_earth = 30; -inline void SpecializationFilter::clear_elementalist_earth() { - elementalist_earth_ = false; -} -inline bool SpecializationFilter::_internal_elementalist_earth() const { - return elementalist_earth_; -} -inline bool SpecializationFilter::elementalist_earth() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.elementalist_earth) - return _internal_elementalist_earth(); -} -inline void SpecializationFilter::_internal_set_elementalist_earth(bool value) { - - elementalist_earth_ = value; -} -inline void SpecializationFilter::set_elementalist_earth(bool value) { - _internal_set_elementalist_earth(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.elementalist_earth) -} - -// bool elementalist_fire = 31; -inline void SpecializationFilter::clear_elementalist_fire() { - elementalist_fire_ = false; -} -inline bool SpecializationFilter::_internal_elementalist_fire() const { - return elementalist_fire_; -} -inline bool SpecializationFilter::elementalist_fire() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.elementalist_fire) - return _internal_elementalist_fire(); -} -inline void SpecializationFilter::_internal_set_elementalist_fire(bool value) { - - elementalist_fire_ = value; -} -inline void SpecializationFilter::set_elementalist_fire(bool value) { - _internal_set_elementalist_fire(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.elementalist_fire) -} - -// bool elementalist_water = 32; -inline void SpecializationFilter::clear_elementalist_water() { - elementalist_water_ = false; -} -inline bool SpecializationFilter::_internal_elementalist_water() const { - return elementalist_water_; -} -inline bool SpecializationFilter::elementalist_water() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.elementalist_water) - return _internal_elementalist_water(); -} -inline void SpecializationFilter::_internal_set_elementalist_water(bool value) { - - elementalist_water_ = value; -} -inline void SpecializationFilter::set_elementalist_water(bool value) { - _internal_set_elementalist_water(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.elementalist_water) -} - -// bool engineer_alchemy = 33; -inline void SpecializationFilter::clear_engineer_alchemy() { - engineer_alchemy_ = false; -} -inline bool SpecializationFilter::_internal_engineer_alchemy() const { - return engineer_alchemy_; -} -inline bool SpecializationFilter::engineer_alchemy() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.engineer_alchemy) - return _internal_engineer_alchemy(); -} -inline void SpecializationFilter::_internal_set_engineer_alchemy(bool value) { - - engineer_alchemy_ = value; -} -inline void SpecializationFilter::set_engineer_alchemy(bool value) { - _internal_set_engineer_alchemy(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.engineer_alchemy) -} - -// bool engineer_explosives = 34; -inline void SpecializationFilter::clear_engineer_explosives() { - engineer_explosives_ = false; -} -inline bool SpecializationFilter::_internal_engineer_explosives() const { - return engineer_explosives_; -} -inline bool SpecializationFilter::engineer_explosives() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.engineer_explosives) - return _internal_engineer_explosives(); -} -inline void SpecializationFilter::_internal_set_engineer_explosives(bool value) { - - engineer_explosives_ = value; -} -inline void SpecializationFilter::set_engineer_explosives(bool value) { - _internal_set_engineer_explosives(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.engineer_explosives) -} - -// bool engineer_firearms = 35; -inline void SpecializationFilter::clear_engineer_firearms() { - engineer_firearms_ = false; -} -inline bool SpecializationFilter::_internal_engineer_firearms() const { - return engineer_firearms_; -} -inline bool SpecializationFilter::engineer_firearms() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.engineer_firearms) - return _internal_engineer_firearms(); -} -inline void SpecializationFilter::_internal_set_engineer_firearms(bool value) { - - engineer_firearms_ = value; -} -inline void SpecializationFilter::set_engineer_firearms(bool value) { - _internal_set_engineer_firearms(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.engineer_firearms) -} - -// bool engineer_inventions = 36; -inline void SpecializationFilter::clear_engineer_inventions() { - engineer_inventions_ = false; -} -inline bool SpecializationFilter::_internal_engineer_inventions() const { - return engineer_inventions_; -} -inline bool SpecializationFilter::engineer_inventions() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.engineer_inventions) - return _internal_engineer_inventions(); -} -inline void SpecializationFilter::_internal_set_engineer_inventions(bool value) { - - engineer_inventions_ = value; -} -inline void SpecializationFilter::set_engineer_inventions(bool value) { - _internal_set_engineer_inventions(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.engineer_inventions) -} - -// bool engineer_tools = 37; -inline void SpecializationFilter::clear_engineer_tools() { - engineer_tools_ = false; -} -inline bool SpecializationFilter::_internal_engineer_tools() const { - return engineer_tools_; -} -inline bool SpecializationFilter::engineer_tools() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.engineer_tools) - return _internal_engineer_tools(); -} -inline void SpecializationFilter::_internal_set_engineer_tools(bool value) { - - engineer_tools_ = value; -} -inline void SpecializationFilter::set_engineer_tools(bool value) { - _internal_set_engineer_tools(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.engineer_tools) -} - -// bool guardian_honor = 38; -inline void SpecializationFilter::clear_guardian_honor() { - guardian_honor_ = false; -} -inline bool SpecializationFilter::_internal_guardian_honor() const { - return guardian_honor_; -} -inline bool SpecializationFilter::guardian_honor() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.guardian_honor) - return _internal_guardian_honor(); -} -inline void SpecializationFilter::_internal_set_guardian_honor(bool value) { - - guardian_honor_ = value; -} -inline void SpecializationFilter::set_guardian_honor(bool value) { - _internal_set_guardian_honor(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.guardian_honor) -} - -// bool guardian_radiance = 39; -inline void SpecializationFilter::clear_guardian_radiance() { - guardian_radiance_ = false; -} -inline bool SpecializationFilter::_internal_guardian_radiance() const { - return guardian_radiance_; -} -inline bool SpecializationFilter::guardian_radiance() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.guardian_radiance) - return _internal_guardian_radiance(); -} -inline void SpecializationFilter::_internal_set_guardian_radiance(bool value) { - - guardian_radiance_ = value; -} -inline void SpecializationFilter::set_guardian_radiance(bool value) { - _internal_set_guardian_radiance(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.guardian_radiance) -} - -// bool guardian_valor = 40; -inline void SpecializationFilter::clear_guardian_valor() { - guardian_valor_ = false; -} -inline bool SpecializationFilter::_internal_guardian_valor() const { - return guardian_valor_; -} -inline bool SpecializationFilter::guardian_valor() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.guardian_valor) - return _internal_guardian_valor(); -} -inline void SpecializationFilter::_internal_set_guardian_valor(bool value) { - - guardian_valor_ = value; -} -inline void SpecializationFilter::set_guardian_valor(bool value) { - _internal_set_guardian_valor(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.guardian_valor) -} - -// bool guardian_virtues = 41; -inline void SpecializationFilter::clear_guardian_virtues() { - guardian_virtues_ = false; -} -inline bool SpecializationFilter::_internal_guardian_virtues() const { - return guardian_virtues_; -} -inline bool SpecializationFilter::guardian_virtues() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.guardian_virtues) - return _internal_guardian_virtues(); -} -inline void SpecializationFilter::_internal_set_guardian_virtues(bool value) { - - guardian_virtues_ = value; -} -inline void SpecializationFilter::set_guardian_virtues(bool value) { - _internal_set_guardian_virtues(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.guardian_virtues) -} - -// bool guardian_zeal = 42; -inline void SpecializationFilter::clear_guardian_zeal() { - guardian_zeal_ = false; -} -inline bool SpecializationFilter::_internal_guardian_zeal() const { - return guardian_zeal_; -} -inline bool SpecializationFilter::guardian_zeal() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.guardian_zeal) - return _internal_guardian_zeal(); -} -inline void SpecializationFilter::_internal_set_guardian_zeal(bool value) { - - guardian_zeal_ = value; -} -inline void SpecializationFilter::set_guardian_zeal(bool value) { - _internal_set_guardian_zeal(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.guardian_zeal) -} - -// bool mesmer_chaos = 43; -inline void SpecializationFilter::clear_mesmer_chaos() { - mesmer_chaos_ = false; -} -inline bool SpecializationFilter::_internal_mesmer_chaos() const { - return mesmer_chaos_; -} -inline bool SpecializationFilter::mesmer_chaos() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.mesmer_chaos) - return _internal_mesmer_chaos(); -} -inline void SpecializationFilter::_internal_set_mesmer_chaos(bool value) { - - mesmer_chaos_ = value; -} -inline void SpecializationFilter::set_mesmer_chaos(bool value) { - _internal_set_mesmer_chaos(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.mesmer_chaos) -} - -// bool mesmer_domination = 44; -inline void SpecializationFilter::clear_mesmer_domination() { - mesmer_domination_ = false; -} -inline bool SpecializationFilter::_internal_mesmer_domination() const { - return mesmer_domination_; -} -inline bool SpecializationFilter::mesmer_domination() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.mesmer_domination) - return _internal_mesmer_domination(); -} -inline void SpecializationFilter::_internal_set_mesmer_domination(bool value) { - - mesmer_domination_ = value; -} -inline void SpecializationFilter::set_mesmer_domination(bool value) { - _internal_set_mesmer_domination(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.mesmer_domination) -} - -// bool mesmer_dueling = 45; -inline void SpecializationFilter::clear_mesmer_dueling() { - mesmer_dueling_ = false; -} -inline bool SpecializationFilter::_internal_mesmer_dueling() const { - return mesmer_dueling_; -} -inline bool SpecializationFilter::mesmer_dueling() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.mesmer_dueling) - return _internal_mesmer_dueling(); -} -inline void SpecializationFilter::_internal_set_mesmer_dueling(bool value) { - - mesmer_dueling_ = value; -} -inline void SpecializationFilter::set_mesmer_dueling(bool value) { - _internal_set_mesmer_dueling(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.mesmer_dueling) -} - -// bool mesmer_illusions = 46; -inline void SpecializationFilter::clear_mesmer_illusions() { - mesmer_illusions_ = false; -} -inline bool SpecializationFilter::_internal_mesmer_illusions() const { - return mesmer_illusions_; -} -inline bool SpecializationFilter::mesmer_illusions() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.mesmer_illusions) - return _internal_mesmer_illusions(); -} -inline void SpecializationFilter::_internal_set_mesmer_illusions(bool value) { - - mesmer_illusions_ = value; -} -inline void SpecializationFilter::set_mesmer_illusions(bool value) { - _internal_set_mesmer_illusions(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.mesmer_illusions) -} - -// bool mesmer_inspiration = 47; -inline void SpecializationFilter::clear_mesmer_inspiration() { - mesmer_inspiration_ = false; -} -inline bool SpecializationFilter::_internal_mesmer_inspiration() const { - return mesmer_inspiration_; -} -inline bool SpecializationFilter::mesmer_inspiration() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.mesmer_inspiration) - return _internal_mesmer_inspiration(); -} -inline void SpecializationFilter::_internal_set_mesmer_inspiration(bool value) { - - mesmer_inspiration_ = value; -} -inline void SpecializationFilter::set_mesmer_inspiration(bool value) { - _internal_set_mesmer_inspiration(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.mesmer_inspiration) -} - -// bool necromancer_blood_magic = 48; -inline void SpecializationFilter::clear_necromancer_blood_magic() { - necromancer_blood_magic_ = false; -} -inline bool SpecializationFilter::_internal_necromancer_blood_magic() const { - return necromancer_blood_magic_; -} -inline bool SpecializationFilter::necromancer_blood_magic() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.necromancer_blood_magic) - return _internal_necromancer_blood_magic(); -} -inline void SpecializationFilter::_internal_set_necromancer_blood_magic(bool value) { - - necromancer_blood_magic_ = value; -} -inline void SpecializationFilter::set_necromancer_blood_magic(bool value) { - _internal_set_necromancer_blood_magic(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.necromancer_blood_magic) -} - -// bool necromancer_curses = 49; -inline void SpecializationFilter::clear_necromancer_curses() { - necromancer_curses_ = false; -} -inline bool SpecializationFilter::_internal_necromancer_curses() const { - return necromancer_curses_; -} -inline bool SpecializationFilter::necromancer_curses() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.necromancer_curses) - return _internal_necromancer_curses(); -} -inline void SpecializationFilter::_internal_set_necromancer_curses(bool value) { - - necromancer_curses_ = value; -} -inline void SpecializationFilter::set_necromancer_curses(bool value) { - _internal_set_necromancer_curses(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.necromancer_curses) -} - -// bool necromancer_death_magic = 50; -inline void SpecializationFilter::clear_necromancer_death_magic() { - necromancer_death_magic_ = false; -} -inline bool SpecializationFilter::_internal_necromancer_death_magic() const { - return necromancer_death_magic_; -} -inline bool SpecializationFilter::necromancer_death_magic() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.necromancer_death_magic) - return _internal_necromancer_death_magic(); -} -inline void SpecializationFilter::_internal_set_necromancer_death_magic(bool value) { - - necromancer_death_magic_ = value; -} -inline void SpecializationFilter::set_necromancer_death_magic(bool value) { - _internal_set_necromancer_death_magic(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.necromancer_death_magic) -} - -// bool necromancer_soul_reaping = 51; -inline void SpecializationFilter::clear_necromancer_soul_reaping() { - necromancer_soul_reaping_ = false; -} -inline bool SpecializationFilter::_internal_necromancer_soul_reaping() const { - return necromancer_soul_reaping_; -} -inline bool SpecializationFilter::necromancer_soul_reaping() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.necromancer_soul_reaping) - return _internal_necromancer_soul_reaping(); -} -inline void SpecializationFilter::_internal_set_necromancer_soul_reaping(bool value) { - - necromancer_soul_reaping_ = value; -} -inline void SpecializationFilter::set_necromancer_soul_reaping(bool value) { - _internal_set_necromancer_soul_reaping(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.necromancer_soul_reaping) -} - -// bool necromancer_spite = 52; -inline void SpecializationFilter::clear_necromancer_spite() { - necromancer_spite_ = false; -} -inline bool SpecializationFilter::_internal_necromancer_spite() const { - return necromancer_spite_; -} -inline bool SpecializationFilter::necromancer_spite() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.necromancer_spite) - return _internal_necromancer_spite(); -} -inline void SpecializationFilter::_internal_set_necromancer_spite(bool value) { - - necromancer_spite_ = value; -} -inline void SpecializationFilter::set_necromancer_spite(bool value) { - _internal_set_necromancer_spite(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.necromancer_spite) -} - -// bool ranger_beastmastery = 53; -inline void SpecializationFilter::clear_ranger_beastmastery() { - ranger_beastmastery_ = false; -} -inline bool SpecializationFilter::_internal_ranger_beastmastery() const { - return ranger_beastmastery_; -} -inline bool SpecializationFilter::ranger_beastmastery() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.ranger_beastmastery) - return _internal_ranger_beastmastery(); -} -inline void SpecializationFilter::_internal_set_ranger_beastmastery(bool value) { - - ranger_beastmastery_ = value; -} -inline void SpecializationFilter::set_ranger_beastmastery(bool value) { - _internal_set_ranger_beastmastery(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.ranger_beastmastery) -} - -// bool ranger_marksmanship = 54; -inline void SpecializationFilter::clear_ranger_marksmanship() { - ranger_marksmanship_ = false; -} -inline bool SpecializationFilter::_internal_ranger_marksmanship() const { - return ranger_marksmanship_; -} -inline bool SpecializationFilter::ranger_marksmanship() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.ranger_marksmanship) - return _internal_ranger_marksmanship(); -} -inline void SpecializationFilter::_internal_set_ranger_marksmanship(bool value) { - - ranger_marksmanship_ = value; -} -inline void SpecializationFilter::set_ranger_marksmanship(bool value) { - _internal_set_ranger_marksmanship(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.ranger_marksmanship) -} - -// bool ranger_nature_magic = 55; -inline void SpecializationFilter::clear_ranger_nature_magic() { - ranger_nature_magic_ = false; -} -inline bool SpecializationFilter::_internal_ranger_nature_magic() const { - return ranger_nature_magic_; -} -inline bool SpecializationFilter::ranger_nature_magic() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.ranger_nature_magic) - return _internal_ranger_nature_magic(); -} -inline void SpecializationFilter::_internal_set_ranger_nature_magic(bool value) { - - ranger_nature_magic_ = value; -} -inline void SpecializationFilter::set_ranger_nature_magic(bool value) { - _internal_set_ranger_nature_magic(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.ranger_nature_magic) -} - -// bool ranger_skirmishing = 56; -inline void SpecializationFilter::clear_ranger_skirmishing() { - ranger_skirmishing_ = false; -} -inline bool SpecializationFilter::_internal_ranger_skirmishing() const { - return ranger_skirmishing_; -} -inline bool SpecializationFilter::ranger_skirmishing() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.ranger_skirmishing) - return _internal_ranger_skirmishing(); -} -inline void SpecializationFilter::_internal_set_ranger_skirmishing(bool value) { - - ranger_skirmishing_ = value; -} -inline void SpecializationFilter::set_ranger_skirmishing(bool value) { - _internal_set_ranger_skirmishing(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.ranger_skirmishing) -} - -// bool ranger_wilderness_survival = 57; -inline void SpecializationFilter::clear_ranger_wilderness_survival() { - ranger_wilderness_survival_ = false; -} -inline bool SpecializationFilter::_internal_ranger_wilderness_survival() const { - return ranger_wilderness_survival_; -} -inline bool SpecializationFilter::ranger_wilderness_survival() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.ranger_wilderness_survival) - return _internal_ranger_wilderness_survival(); -} -inline void SpecializationFilter::_internal_set_ranger_wilderness_survival(bool value) { - - ranger_wilderness_survival_ = value; -} -inline void SpecializationFilter::set_ranger_wilderness_survival(bool value) { - _internal_set_ranger_wilderness_survival(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.ranger_wilderness_survival) -} - -// bool revenant_corruption = 58; -inline void SpecializationFilter::clear_revenant_corruption() { - revenant_corruption_ = false; -} -inline bool SpecializationFilter::_internal_revenant_corruption() const { - return revenant_corruption_; -} -inline bool SpecializationFilter::revenant_corruption() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.revenant_corruption) - return _internal_revenant_corruption(); -} -inline void SpecializationFilter::_internal_set_revenant_corruption(bool value) { - - revenant_corruption_ = value; -} -inline void SpecializationFilter::set_revenant_corruption(bool value) { - _internal_set_revenant_corruption(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.revenant_corruption) -} - -// bool revenant_devastation = 59; -inline void SpecializationFilter::clear_revenant_devastation() { - revenant_devastation_ = false; -} -inline bool SpecializationFilter::_internal_revenant_devastation() const { - return revenant_devastation_; -} -inline bool SpecializationFilter::revenant_devastation() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.revenant_devastation) - return _internal_revenant_devastation(); -} -inline void SpecializationFilter::_internal_set_revenant_devastation(bool value) { - - revenant_devastation_ = value; -} -inline void SpecializationFilter::set_revenant_devastation(bool value) { - _internal_set_revenant_devastation(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.revenant_devastation) -} - -// bool revenant_invocation = 60; -inline void SpecializationFilter::clear_revenant_invocation() { - revenant_invocation_ = false; -} -inline bool SpecializationFilter::_internal_revenant_invocation() const { - return revenant_invocation_; -} -inline bool SpecializationFilter::revenant_invocation() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.revenant_invocation) - return _internal_revenant_invocation(); -} -inline void SpecializationFilter::_internal_set_revenant_invocation(bool value) { - - revenant_invocation_ = value; -} -inline void SpecializationFilter::set_revenant_invocation(bool value) { - _internal_set_revenant_invocation(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.revenant_invocation) -} - -// bool revenant_retribution = 61; -inline void SpecializationFilter::clear_revenant_retribution() { - revenant_retribution_ = false; -} -inline bool SpecializationFilter::_internal_revenant_retribution() const { - return revenant_retribution_; -} -inline bool SpecializationFilter::revenant_retribution() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.revenant_retribution) - return _internal_revenant_retribution(); -} -inline void SpecializationFilter::_internal_set_revenant_retribution(bool value) { - - revenant_retribution_ = value; -} -inline void SpecializationFilter::set_revenant_retribution(bool value) { - _internal_set_revenant_retribution(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.revenant_retribution) -} - -// bool revenant_salvation = 62; -inline void SpecializationFilter::clear_revenant_salvation() { - revenant_salvation_ = false; -} -inline bool SpecializationFilter::_internal_revenant_salvation() const { - return revenant_salvation_; -} -inline bool SpecializationFilter::revenant_salvation() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.revenant_salvation) - return _internal_revenant_salvation(); -} -inline void SpecializationFilter::_internal_set_revenant_salvation(bool value) { - - revenant_salvation_ = value; -} -inline void SpecializationFilter::set_revenant_salvation(bool value) { - _internal_set_revenant_salvation(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.revenant_salvation) -} - -// bool thief_acrobatics = 63; -inline void SpecializationFilter::clear_thief_acrobatics() { - thief_acrobatics_ = false; -} -inline bool SpecializationFilter::_internal_thief_acrobatics() const { - return thief_acrobatics_; -} -inline bool SpecializationFilter::thief_acrobatics() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.thief_acrobatics) - return _internal_thief_acrobatics(); -} -inline void SpecializationFilter::_internal_set_thief_acrobatics(bool value) { - - thief_acrobatics_ = value; -} -inline void SpecializationFilter::set_thief_acrobatics(bool value) { - _internal_set_thief_acrobatics(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.thief_acrobatics) -} - -// bool thief_critical_strikes = 64; -inline void SpecializationFilter::clear_thief_critical_strikes() { - thief_critical_strikes_ = false; -} -inline bool SpecializationFilter::_internal_thief_critical_strikes() const { - return thief_critical_strikes_; -} -inline bool SpecializationFilter::thief_critical_strikes() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.thief_critical_strikes) - return _internal_thief_critical_strikes(); -} -inline void SpecializationFilter::_internal_set_thief_critical_strikes(bool value) { - - thief_critical_strikes_ = value; -} -inline void SpecializationFilter::set_thief_critical_strikes(bool value) { - _internal_set_thief_critical_strikes(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.thief_critical_strikes) -} - -// bool thief_deadly_arts = 65; -inline void SpecializationFilter::clear_thief_deadly_arts() { - thief_deadly_arts_ = false; -} -inline bool SpecializationFilter::_internal_thief_deadly_arts() const { - return thief_deadly_arts_; -} -inline bool SpecializationFilter::thief_deadly_arts() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.thief_deadly_arts) - return _internal_thief_deadly_arts(); -} -inline void SpecializationFilter::_internal_set_thief_deadly_arts(bool value) { - - thief_deadly_arts_ = value; -} -inline void SpecializationFilter::set_thief_deadly_arts(bool value) { - _internal_set_thief_deadly_arts(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.thief_deadly_arts) -} - -// bool thief_shadow_arts = 66; -inline void SpecializationFilter::clear_thief_shadow_arts() { - thief_shadow_arts_ = false; -} -inline bool SpecializationFilter::_internal_thief_shadow_arts() const { - return thief_shadow_arts_; -} -inline bool SpecializationFilter::thief_shadow_arts() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.thief_shadow_arts) - return _internal_thief_shadow_arts(); -} -inline void SpecializationFilter::_internal_set_thief_shadow_arts(bool value) { - - thief_shadow_arts_ = value; -} -inline void SpecializationFilter::set_thief_shadow_arts(bool value) { - _internal_set_thief_shadow_arts(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.thief_shadow_arts) -} - -// bool thief_trickery = 67; -inline void SpecializationFilter::clear_thief_trickery() { - thief_trickery_ = false; -} -inline bool SpecializationFilter::_internal_thief_trickery() const { - return thief_trickery_; -} -inline bool SpecializationFilter::thief_trickery() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.thief_trickery) - return _internal_thief_trickery(); -} -inline void SpecializationFilter::_internal_set_thief_trickery(bool value) { - - thief_trickery_ = value; -} -inline void SpecializationFilter::set_thief_trickery(bool value) { - _internal_set_thief_trickery(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.thief_trickery) -} - -// bool warrior_arms = 68; -inline void SpecializationFilter::clear_warrior_arms() { - warrior_arms_ = false; -} -inline bool SpecializationFilter::_internal_warrior_arms() const { - return warrior_arms_; -} -inline bool SpecializationFilter::warrior_arms() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.warrior_arms) - return _internal_warrior_arms(); -} -inline void SpecializationFilter::_internal_set_warrior_arms(bool value) { - - warrior_arms_ = value; -} -inline void SpecializationFilter::set_warrior_arms(bool value) { - _internal_set_warrior_arms(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.warrior_arms) -} - -// bool warrior_defense = 69; -inline void SpecializationFilter::clear_warrior_defense() { - warrior_defense_ = false; -} -inline bool SpecializationFilter::_internal_warrior_defense() const { - return warrior_defense_; -} -inline bool SpecializationFilter::warrior_defense() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.warrior_defense) - return _internal_warrior_defense(); -} -inline void SpecializationFilter::_internal_set_warrior_defense(bool value) { - - warrior_defense_ = value; -} -inline void SpecializationFilter::set_warrior_defense(bool value) { - _internal_set_warrior_defense(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.warrior_defense) -} - -// bool warrior_discipline = 70; -inline void SpecializationFilter::clear_warrior_discipline() { - warrior_discipline_ = false; -} -inline bool SpecializationFilter::_internal_warrior_discipline() const { - return warrior_discipline_; -} -inline bool SpecializationFilter::warrior_discipline() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.warrior_discipline) - return _internal_warrior_discipline(); -} -inline void SpecializationFilter::_internal_set_warrior_discipline(bool value) { - - warrior_discipline_ = value; -} -inline void SpecializationFilter::set_warrior_discipline(bool value) { - _internal_set_warrior_discipline(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.warrior_discipline) -} - -// bool warrior_strength = 71; -inline void SpecializationFilter::clear_warrior_strength() { - warrior_strength_ = false; -} -inline bool SpecializationFilter::_internal_warrior_strength() const { - return warrior_strength_; -} -inline bool SpecializationFilter::warrior_strength() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.warrior_strength) - return _internal_warrior_strength(); -} -inline void SpecializationFilter::_internal_set_warrior_strength(bool value) { - - warrior_strength_ = value; -} -inline void SpecializationFilter::set_warrior_strength(bool value) { - _internal_set_warrior_strength(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.warrior_strength) -} - -// bool warrior_tactics = 72; -inline void SpecializationFilter::clear_warrior_tactics() { - warrior_tactics_ = false; -} -inline bool SpecializationFilter::_internal_warrior_tactics() const { - return warrior_tactics_; -} -inline bool SpecializationFilter::warrior_tactics() const { - // @@protoc_insertion_point(field_get:waypoint.SpecializationFilter.warrior_tactics) - return _internal_warrior_tactics(); -} -inline void SpecializationFilter::_internal_set_warrior_tactics(bool value) { - - warrior_tactics_ = value; -} -inline void SpecializationFilter::set_warrior_tactics(bool value) { - _internal_set_warrior_tactics(value); - // @@protoc_insertion_point(field_set:waypoint.SpecializationFilter.warrior_tactics) -} - -// ------------------------------------------------------------------- - -// SpeciesFilter - -// bool asura = 1; -inline void SpeciesFilter::clear_asura() { - asura_ = false; -} -inline bool SpeciesFilter::_internal_asura() const { - return asura_; -} -inline bool SpeciesFilter::asura() const { - // @@protoc_insertion_point(field_get:waypoint.SpeciesFilter.asura) - return _internal_asura(); -} -inline void SpeciesFilter::_internal_set_asura(bool value) { - - asura_ = value; -} -inline void SpeciesFilter::set_asura(bool value) { - _internal_set_asura(value); - // @@protoc_insertion_point(field_set:waypoint.SpeciesFilter.asura) -} - -// bool charr = 2; -inline void SpeciesFilter::clear_charr() { - charr_ = false; -} -inline bool SpeciesFilter::_internal_charr() const { - return charr_; -} -inline bool SpeciesFilter::charr() const { - // @@protoc_insertion_point(field_get:waypoint.SpeciesFilter.charr) - return _internal_charr(); -} -inline void SpeciesFilter::_internal_set_charr(bool value) { - - charr_ = value; -} -inline void SpeciesFilter::set_charr(bool value) { - _internal_set_charr(value); - // @@protoc_insertion_point(field_set:waypoint.SpeciesFilter.charr) -} - -// bool human = 3; -inline void SpeciesFilter::clear_human() { - human_ = false; -} -inline bool SpeciesFilter::_internal_human() const { - return human_; -} -inline bool SpeciesFilter::human() const { - // @@protoc_insertion_point(field_get:waypoint.SpeciesFilter.human) - return _internal_human(); -} -inline void SpeciesFilter::_internal_set_human(bool value) { - - human_ = value; -} -inline void SpeciesFilter::set_human(bool value) { - _internal_set_human(value); - // @@protoc_insertion_point(field_set:waypoint.SpeciesFilter.human) -} - -// bool norn = 4; -inline void SpeciesFilter::clear_norn() { - norn_ = false; -} -inline bool SpeciesFilter::_internal_norn() const { - return norn_; -} -inline bool SpeciesFilter::norn() const { - // @@protoc_insertion_point(field_get:waypoint.SpeciesFilter.norn) - return _internal_norn(); -} -inline void SpeciesFilter::_internal_set_norn(bool value) { - - norn_ = value; -} -inline void SpeciesFilter::set_norn(bool value) { - _internal_set_norn(value); - // @@protoc_insertion_point(field_set:waypoint.SpeciesFilter.norn) -} - -// bool sylvari = 5; -inline void SpeciesFilter::clear_sylvari() { - sylvari_ = false; -} -inline bool SpeciesFilter::_internal_sylvari() const { - return sylvari_; -} -inline bool SpeciesFilter::sylvari() const { - // @@protoc_insertion_point(field_get:waypoint.SpeciesFilter.sylvari) - return _internal_sylvari(); -} -inline void SpeciesFilter::_internal_set_sylvari(bool value) { - - sylvari_ = value; -} -inline void SpeciesFilter::set_sylvari(bool value) { - _internal_set_sylvari(value); - // @@protoc_insertion_point(field_set:waypoint.SpeciesFilter.sylvari) -} - -// ------------------------------------------------------------------- - -// TrailData - -// string trail_data = 1; -inline void TrailData::clear_trail_data() { - trail_data_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline const std::string& TrailData::trail_data() const { - // @@protoc_insertion_point(field_get:waypoint.TrailData.trail_data) - return _internal_trail_data(); -} -inline void TrailData::set_trail_data(const std::string& value) { - _internal_set_trail_data(value); - // @@protoc_insertion_point(field_set:waypoint.TrailData.trail_data) -} -inline std::string* TrailData::mutable_trail_data() { - // @@protoc_insertion_point(field_mutable:waypoint.TrailData.trail_data) - return _internal_mutable_trail_data(); -} -inline const std::string& TrailData::_internal_trail_data() const { - return trail_data_.Get(); -} -inline void TrailData::_internal_set_trail_data(const std::string& value) { - - trail_data_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); -} -inline void TrailData::set_trail_data(std::string&& value) { - - trail_data_.Set( - &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:waypoint.TrailData.trail_data) -} -inline void TrailData::set_trail_data(const char* value) { - GOOGLE_DCHECK(value != nullptr); - - trail_data_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), - GetArena()); - // @@protoc_insertion_point(field_set_char:waypoint.TrailData.trail_data) -} -inline void TrailData::set_trail_data(const char* value, - size_t size) { - - trail_data_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:waypoint.TrailData.trail_data) -} -inline std::string* TrailData::_internal_mutable_trail_data() { - - return trail_data_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline std::string* TrailData::release_trail_data() { - // @@protoc_insertion_point(field_release:waypoint.TrailData.trail_data) - return trail_data_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void TrailData::set_allocated_trail_data(std::string* trail_data) { - if (trail_data != nullptr) { - - } else { - - } - trail_data_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), trail_data, - GetArena()); - // @@protoc_insertion_point(field_set_allocated:waypoint.TrailData.trail_data) -} -inline std::string* TrailData::unsafe_arena_release_trail_data() { - // @@protoc_insertion_point(field_unsafe_arena_release:waypoint.TrailData.trail_data) - GOOGLE_DCHECK(GetArena() != nullptr); - - return trail_data_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - GetArena()); -} -inline void TrailData::unsafe_arena_set_allocated_trail_data( - std::string* trail_data) { - GOOGLE_DCHECK(GetArena() != nullptr); - if (trail_data != nullptr) { - - } else { - - } - trail_data_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - trail_data, GetArena()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:waypoint.TrailData.trail_data) -} - -#ifdef __GNUC__ - #pragma GCC diagnostic pop -#endif // __GNUC__ -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - - -// @@protoc_insertion_point(namespace_scope) - -} // namespace waypoint - -PROTOBUF_NAMESPACE_OPEN - -template <> struct is_proto_enum< ::waypoint::CullChirality> : ::std::true_type {}; -template <> -inline const EnumDescriptor* GetEnumDescriptor< ::waypoint::CullChirality>() { - return ::waypoint::CullChirality_descriptor(); -} -template <> struct is_proto_enum< ::waypoint::ResetBehavior> : ::std::true_type {}; -template <> -inline const EnumDescriptor* GetEnumDescriptor< ::waypoint::ResetBehavior>() { - return ::waypoint::ResetBehavior_descriptor(); -} - -PROTOBUF_NAMESPACE_CLOSE - -// @@protoc_insertion_point(global_scope) - -#include -#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_waypoint_2eproto From 9211875a25fbfc697047bce92cd70a4293bd9509 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 7 Nov 2022 22:26:14 -0500 Subject: [PATCH 098/539] This is a test to see if the program compiles #2 --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 21fe9455..3163450f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -92,10 +92,10 @@ jobs: - name: Install protoc run: sudo apt-get install protobuf-compiler - - name: Make xml_converter + - name: Build xml_converter run: | cd xml_converter - protoc --proto_path=generators/proto_templates --cpp_out=src/ generators/proto_templates/waypoint.proto) + protoc --proto_path=generators/proto_templates --cpp_out=src/ generators/proto_templates/waypoint.proto make mv xml_converter ../output From 8b7b8edce08afe486773669065903220e27f590a Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 7 Nov 2022 22:35:24 -0500 Subject: [PATCH 099/539] This is a test to see if the program compiles #3 --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3163450f..59233da5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -96,6 +96,7 @@ jobs: run: | cd xml_converter protoc --proto_path=generators/proto_templates --cpp_out=src/ generators/proto_templates/waypoint.proto + cmake ./ make mv xml_converter ../output From e425794f88020df202f3dfb4bbf3a48aedd87423 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Mon, 7 Nov 2022 23:24:54 -0600 Subject: [PATCH 100/539] adding comment for the base64 decode table --- xml_converter/src/string_helper.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/xml_converter/src/string_helper.cpp b/xml_converter/src/string_helper.cpp index cfff832e..242fe1ca 100644 --- a/xml_converter/src/string_helper.cpp +++ b/xml_converter/src/string_helper.cpp @@ -112,6 +112,7 @@ string lowercase(string input) { // Functions to either encode or decode base64 strings + // Obtained from https://stackoverflow.com/questions/180947/base64-decode-snippet-in-c static const std::string base64_chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" @@ -165,6 +166,16 @@ std::string base64_encode(uint8_t const* buf, unsigned int bufLen) { #include "function_timers.hpp" // TODO: Write Tests For This +//////////////////////////////////////////////////////////////////////////////// +// This lookup table maps all base64 characters to their numerical equivalents +// A-Z 0-25 +// a-z 26-51 +// 0-9 52-61 +// + 62 +// / 63 +// Everything else to 255 (invalid character) +// = is mapped as an error because it gets caught early as a termination +//////////////////////////////////////////////////////////////////////////////// static unsigned char base64_lookup[256] = { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, @@ -219,7 +230,6 @@ std::vector base64_decode(std::string const& encoded_string) { output_index += 3; } - if (in_len) { int i = 0; for (; i < in_len; i++) { From 99359af9e34f5ad2e0630cd4dc4551a76ae46caa Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Mon, 7 Nov 2022 23:34:40 -0600 Subject: [PATCH 101/539] clarifying base64 invalid ='s comment --- xml_converter/src/string_helper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml_converter/src/string_helper.cpp b/xml_converter/src/string_helper.cpp index 242fe1ca..c5f55186 100644 --- a/xml_converter/src/string_helper.cpp +++ b/xml_converter/src/string_helper.cpp @@ -174,7 +174,7 @@ std::string base64_encode(uint8_t const* buf, unsigned int bufLen) { // + 62 // / 63 // Everything else to 255 (invalid character) -// = is mapped as an error because it gets caught early as a termination +// = is invalid because trailing ='s are stripped any any others are invalid //////////////////////////////////////////////////////////////////////////////// static unsigned char base64_lookup[256] = { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, From b4cbb6bff89b34674bacf25d2deb535a514f7dc9 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Tue, 8 Nov 2022 08:59:11 -0600 Subject: [PATCH 102/539] manually fixing all includes and forward defs A future commit will change the generators to generate these as output --- xml_converter/src/attribute/bool.cpp | 4 +-- xml_converter/src/attribute/bool.hpp | 8 ++--- xml_converter/src/attribute/color.cpp | 1 + xml_converter/src/attribute/color.hpp | 9 +++--- .../src/attribute/cull_chirality_gen.cpp | 4 +++ .../src/attribute/cull_chirality_gen.hpp | 9 +++--- .../src/attribute/euler_rotation_gen.cpp | 5 ++- .../src/attribute/euler_rotation_gen.hpp | 11 +++---- .../src/attribute/festival_filter_gen.cpp | 4 +++ .../src/attribute/festival_filter_gen.hpp | 11 +++---- xml_converter/src/attribute/float.cpp | 6 ++-- xml_converter/src/attribute/float.hpp | 9 +++--- xml_converter/src/attribute/image.cpp | 2 ++ xml_converter/src/attribute/image.hpp | 9 +++--- xml_converter/src/attribute/int.cpp | 1 + xml_converter/src/attribute/int.hpp | 7 ++--- .../src/attribute/map_type_filter_gen.cpp | 4 +++ .../src/attribute/map_type_filter_gen.hpp | 11 +++---- .../src/attribute/marker_category.cpp | 4 +-- .../src/attribute/marker_category.hpp | 9 +++--- .../src/attribute/mount_filter_gen.cpp | 4 +++ .../src/attribute/mount_filter_gen.hpp | 11 +++---- xml_converter/src/attribute/position_gen.cpp | 5 ++- xml_converter/src/attribute/position_gen.hpp | 11 +++---- .../src/attribute/profession_filter_gen.cpp | 4 +++ .../src/attribute/profession_filter_gen.hpp | 11 +++---- .../src/attribute/reset_behavior_gen.cpp | 4 +++ .../src/attribute/reset_behavior_gen.hpp | 9 +++--- .../attribute/specialization_filter_gen.cpp | 4 +++ .../attribute/specialization_filter_gen.hpp | 11 +++---- .../src/attribute/species_filter_gen.cpp | 4 +++ .../src/attribute/species_filter_gen.hpp | 11 +++---- xml_converter/src/attribute/string.cpp | 2 ++ xml_converter/src/attribute/string.hpp | 7 ++--- xml_converter/src/attribute/trail_data.cpp | 2 ++ xml_converter/src/attribute/trail_data.hpp | 10 +++--- .../src/attribute/trail_data_map_id.cpp | 3 ++ .../src/attribute/trail_data_map_id.hpp | 10 +++--- xml_converter/src/attribute/unique_id.cpp | 4 +++ xml_converter/src/attribute/unique_id.hpp | 12 +++---- xml_converter/src/category_gen.cpp | 11 ++++++- xml_converter/src/category_gen.hpp | 30 +++++++++--------- xml_converter/src/function_timers.cpp | 10 ++---- xml_converter/src/icon_gen.cpp | 11 ++++++- xml_converter/src/icon_gen.hpp | 31 +++++++++---------- xml_converter/src/parseable.cpp | 24 +++++--------- xml_converter/src/parseable.hpp | 13 +++----- xml_converter/src/rapid_helpers.cpp | 6 +++- xml_converter/src/rapid_helpers.hpp | 19 ++++++------ xml_converter/src/string_helper.cpp | 15 ++++++--- xml_converter/src/string_helper.hpp | 15 ++++----- xml_converter/src/trail_gen.cpp | 11 ++++++- xml_converter/src/trail_gen.hpp | 30 +++++------------- xml_converter/src/xml_converter.cpp | 31 +++++++++---------- 54 files changed, 283 insertions(+), 241 deletions(-) diff --git a/xml_converter/src/attribute/bool.cpp b/xml_converter/src/attribute/bool.cpp index 4c4a643b..df864581 100644 --- a/xml_converter/src/attribute/bool.cpp +++ b/xml_converter/src/attribute/bool.cpp @@ -1,11 +1,11 @@ #include "bool.hpp" -#include +#include #include #include -#include "../rapidxml-1.13/rapidxml.hpp" #include "../rapid_helpers.hpp" +#include "../rapidxml-1.13/rapidxml.hpp" using namespace std; diff --git a/xml_converter/src/attribute/bool.hpp b/xml_converter/src/attribute/bool.hpp index 2672153f..5433ed9a 100644 --- a/xml_converter/src/attribute/bool.hpp +++ b/xml_converter/src/attribute/bool.hpp @@ -1,14 +1,12 @@ #pragma once #include -#include #include -#include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" -using namespace std; +class XMLError; -bool parse_bool(rapidxml::xml_attribute<>* input, vector *errors); +bool parse_bool(rapidxml::xml_attribute<>* input, std::vector *errors); -string stringify_bool(bool attribute_value); +std::string stringify_bool(bool attribute_value); diff --git a/xml_converter/src/attribute/color.cpp b/xml_converter/src/attribute/color.cpp index 235d9d36..579296e2 100644 --- a/xml_converter/src/attribute/color.cpp +++ b/xml_converter/src/attribute/color.cpp @@ -1,5 +1,6 @@ #include "color.hpp" +#include #include #include diff --git a/xml_converter/src/attribute/color.hpp b/xml_converter/src/attribute/color.hpp index 91b34443..bd822985 100644 --- a/xml_converter/src/attribute/color.hpp +++ b/xml_converter/src/attribute/color.hpp @@ -3,16 +3,15 @@ #include #include -#include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" -using namespace std; +class XMLError; class Color { public: - string hex; + std::string hex; }; -Color parse_color(rapidxml::xml_attribute<>* input, vector *errors); +Color parse_color(rapidxml::xml_attribute<>* input, std::vector *errors); -string stringify_color (Color attribute_value); \ No newline at end of file +std::string stringify_color (Color attribute_value); \ No newline at end of file diff --git a/xml_converter/src/attribute/cull_chirality_gen.cpp b/xml_converter/src/attribute/cull_chirality_gen.cpp index 83a5af41..75a8e71d 100644 --- a/xml_converter/src/attribute/cull_chirality_gen.cpp +++ b/xml_converter/src/attribute/cull_chirality_gen.cpp @@ -1,10 +1,14 @@ #include "cull_chirality_gen.hpp" +#include #include #include #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" +#include "../string_helper.hpp" + +using namespace std; CullChirality parse_cull_chirality(rapidxml::xml_attribute<>* input, vector *errors){ CullChirality cull_chirality; diff --git a/xml_converter/src/attribute/cull_chirality_gen.hpp b/xml_converter/src/attribute/cull_chirality_gen.hpp index ce91b790..60d3ae7f 100644 --- a/xml_converter/src/attribute/cull_chirality_gen.hpp +++ b/xml_converter/src/attribute/cull_chirality_gen.hpp @@ -3,15 +3,14 @@ #include #include -#include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" -#include "../string_helper.hpp" -using namespace std; +class XMLError; + enum CullChirality { clockwise, counter_clockwise, none, }; -CullChirality parse_cull_chirality(rapidxml::xml_attribute<>* input, vector *errors); -string stringify_cull_chirality(CullChirality attribute_value); \ No newline at end of file +CullChirality parse_cull_chirality(rapidxml::xml_attribute<>* input, std::vector *errors); +std::string stringify_cull_chirality(CullChirality attribute_value); \ No newline at end of file diff --git a/xml_converter/src/attribute/euler_rotation_gen.cpp b/xml_converter/src/attribute/euler_rotation_gen.cpp index 16faead6..941ce3a3 100644 --- a/xml_converter/src/attribute/euler_rotation_gen.cpp +++ b/xml_converter/src/attribute/euler_rotation_gen.cpp @@ -1,11 +1,14 @@ #include "euler_rotation_gen.hpp" +#include #include #include -#include #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" +#include "../string_helper.hpp" + +using namespace std; EulerRotation parse_euler_rotation(rapidxml::xml_attribute<>* input, vector *){ EulerRotation euler_rotation; diff --git a/xml_converter/src/attribute/euler_rotation_gen.hpp b/xml_converter/src/attribute/euler_rotation_gen.hpp index 5daf6326..62092219 100644 --- a/xml_converter/src/attribute/euler_rotation_gen.hpp +++ b/xml_converter/src/attribute/euler_rotation_gen.hpp @@ -3,18 +3,17 @@ #include #include -#include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" -#include "../string_helper.hpp" -using namespace std; +class XMLError; + class EulerRotation { public: float x_rotation; float y_rotation; float z_rotation; - virtual string classname() { return "EulerRotation"; }; + virtual std::string classname() { return "EulerRotation"; }; }; -EulerRotation parse_euler_rotation(rapidxml::xml_attribute<>* input, vector *errors); -string stringify_euler_rotation(EulerRotation attribute_value); \ No newline at end of file +EulerRotation parse_euler_rotation(rapidxml::xml_attribute<>* input, std::vector *errors); +std::string stringify_euler_rotation(EulerRotation attribute_value); \ No newline at end of file diff --git a/xml_converter/src/attribute/festival_filter_gen.cpp b/xml_converter/src/attribute/festival_filter_gen.cpp index 7e57f9e9..60769ff5 100644 --- a/xml_converter/src/attribute/festival_filter_gen.cpp +++ b/xml_converter/src/attribute/festival_filter_gen.cpp @@ -1,10 +1,14 @@ #include "festival_filter_gen.hpp" +#include #include #include #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" +#include "../string_helper.hpp" + +using namespace std; FestivalFilter parse_festival_filter(rapidxml::xml_attribute<>* input, vector *errors){ FestivalFilter festival_filter; diff --git a/xml_converter/src/attribute/festival_filter_gen.hpp b/xml_converter/src/attribute/festival_filter_gen.hpp index 66341504..35f5a5f1 100644 --- a/xml_converter/src/attribute/festival_filter_gen.hpp +++ b/xml_converter/src/attribute/festival_filter_gen.hpp @@ -3,11 +3,10 @@ #include #include -#include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" -#include "../string_helper.hpp" -using namespace std; +class XMLError; + class FestivalFilter { public: bool dragonbash; @@ -18,7 +17,7 @@ class FestivalFilter { bool super_adventure_festival; bool wintersday; - virtual string classname() { return "FestivalFilter"; }; + virtual std::string classname() { return "FestivalFilter"; }; }; -FestivalFilter parse_festival_filter(rapidxml::xml_attribute<>* input, vector *errors); -string stringify_festival_filter(FestivalFilter attribute_value); \ No newline at end of file +FestivalFilter parse_festival_filter(rapidxml::xml_attribute<>* input, std::vector *errors); +std::string stringify_festival_filter(FestivalFilter attribute_value); \ No newline at end of file diff --git a/xml_converter/src/attribute/float.cpp b/xml_converter/src/attribute/float.cpp index 5180a3db..d1b6ef5e 100644 --- a/xml_converter/src/attribute/float.cpp +++ b/xml_converter/src/attribute/float.cpp @@ -2,13 +2,13 @@ #include #include - +#include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" float parse_float(rapidxml::xml_attribute<>* input, std::vector *) { return std::stof(get_attribute_value(input)); } -string stringify_float (float attribute_value){ - return to_string(attribute_value); +std::string stringify_float (float attribute_value){ + return std::to_string(attribute_value); } diff --git a/xml_converter/src/attribute/float.hpp b/xml_converter/src/attribute/float.hpp index 621f24c5..24e268d9 100644 --- a/xml_converter/src/attribute/float.hpp +++ b/xml_converter/src/attribute/float.hpp @@ -1,11 +1,12 @@ #pragma once -#include -#include +#include +#include -#include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" +class XMLError; + float parse_float(rapidxml::xml_attribute<>* input, std::vector *errors); -string stringify_float (float attribute_value); \ No newline at end of file +std::string stringify_float (float attribute_value); diff --git a/xml_converter/src/attribute/image.cpp b/xml_converter/src/attribute/image.cpp index 738f9cda..659d4f4f 100644 --- a/xml_converter/src/attribute/image.cpp +++ b/xml_converter/src/attribute/image.cpp @@ -1,8 +1,10 @@ #include "image.hpp" +#include #include #include +#include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" using namespace std; diff --git a/xml_converter/src/attribute/image.hpp b/xml_converter/src/attribute/image.hpp index 591f94d0..452c25f1 100644 --- a/xml_converter/src/attribute/image.hpp +++ b/xml_converter/src/attribute/image.hpp @@ -3,17 +3,16 @@ #include #include -#include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" -using namespace std; +class XMLError; class Image { public: - string path; + std::string path; rapidxml::xml_attribute<>* original_token; }; -Image parse_image(rapidxml::xml_attribute<>* input, vector *errors); +Image parse_image(rapidxml::xml_attribute<>* input, std::vector *errors); -string stringify_image (Image attribute_value); \ No newline at end of file +std::string stringify_image (Image attribute_value); \ No newline at end of file diff --git a/xml_converter/src/attribute/int.cpp b/xml_converter/src/attribute/int.cpp index fb496230..3bcc0ddc 100644 --- a/xml_converter/src/attribute/int.cpp +++ b/xml_converter/src/attribute/int.cpp @@ -1,5 +1,6 @@ #include "int.hpp" +#include #include #include #include diff --git a/xml_converter/src/attribute/int.hpp b/xml_converter/src/attribute/int.hpp index e93baed3..e6c073c3 100644 --- a/xml_converter/src/attribute/int.hpp +++ b/xml_converter/src/attribute/int.hpp @@ -3,13 +3,12 @@ #include #include -#include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" -using namespace std; +class XMLError; -int parse_int(rapidxml::xml_attribute<>* input, vector *errors); +int parse_int(rapidxml::xml_attribute<>* input, std::vector *errors); int init_int_attribute(); -string stringify_int (int attribute_value); \ No newline at end of file +std::string stringify_int (int attribute_value); \ No newline at end of file diff --git a/xml_converter/src/attribute/map_type_filter_gen.cpp b/xml_converter/src/attribute/map_type_filter_gen.cpp index f4aececc..c099112e 100644 --- a/xml_converter/src/attribute/map_type_filter_gen.cpp +++ b/xml_converter/src/attribute/map_type_filter_gen.cpp @@ -1,10 +1,14 @@ #include "map_type_filter_gen.hpp" +#include #include #include #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" +#include "../string_helper.hpp" + +using namespace std; MapTypeFilter parse_map_type_filter(rapidxml::xml_attribute<>* input, vector *errors){ MapTypeFilter map_type_filter; diff --git a/xml_converter/src/attribute/map_type_filter_gen.hpp b/xml_converter/src/attribute/map_type_filter_gen.hpp index 9562dd87..ebc013f7 100644 --- a/xml_converter/src/attribute/map_type_filter_gen.hpp +++ b/xml_converter/src/attribute/map_type_filter_gen.hpp @@ -3,11 +3,10 @@ #include #include -#include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" -#include "../string_helper.hpp" -using namespace std; +class XMLError; + class MapTypeFilter { public: bool blue_borderlands_map; @@ -35,7 +34,7 @@ class MapTypeFilter { bool user_tournament_map; bool wvw_lounge_map; - virtual string classname() { return "MapTypeFilter"; }; + virtual std::string classname() { return "MapTypeFilter"; }; }; -MapTypeFilter parse_map_type_filter(rapidxml::xml_attribute<>* input, vector *errors); -string stringify_map_type_filter(MapTypeFilter attribute_value); \ No newline at end of file +MapTypeFilter parse_map_type_filter(rapidxml::xml_attribute<>* input, std::vector *errors); +std::string stringify_map_type_filter(MapTypeFilter attribute_value); \ No newline at end of file diff --git a/xml_converter/src/attribute/marker_category.cpp b/xml_converter/src/attribute/marker_category.cpp index 545d2bc1..6fb351cd 100644 --- a/xml_converter/src/attribute/marker_category.cpp +++ b/xml_converter/src/attribute/marker_category.cpp @@ -6,12 +6,12 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" -MarkerCategory parse_marker_category(rapidxml::xml_attribute<>* input, vector *) { +MarkerCategory parse_marker_category(rapidxml::xml_attribute<>* input, std::vector *) { MarkerCategory marker_category; marker_category.category = get_attribute_value(input); return marker_category; } -string stringify_marker_category (MarkerCategory attribute_value){ +std::string stringify_marker_category (MarkerCategory attribute_value){ return attribute_value.category; } \ No newline at end of file diff --git a/xml_converter/src/attribute/marker_category.hpp b/xml_converter/src/attribute/marker_category.hpp index 2a951f99..29cbce0c 100644 --- a/xml_converter/src/attribute/marker_category.hpp +++ b/xml_converter/src/attribute/marker_category.hpp @@ -3,14 +3,15 @@ #include #include -#include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" +class XMLError; + class MarkerCategory { public: - string category; + std::string category; }; -MarkerCategory parse_marker_category(rapidxml::xml_attribute<>* input, vector *errors); +MarkerCategory parse_marker_category(rapidxml::xml_attribute<>* input, std::vector *errors); -string stringify_marker_category (MarkerCategory attribute_value); \ No newline at end of file +std::string stringify_marker_category (MarkerCategory attribute_value); \ No newline at end of file diff --git a/xml_converter/src/attribute/mount_filter_gen.cpp b/xml_converter/src/attribute/mount_filter_gen.cpp index be82db68..764d2150 100644 --- a/xml_converter/src/attribute/mount_filter_gen.cpp +++ b/xml_converter/src/attribute/mount_filter_gen.cpp @@ -1,10 +1,14 @@ #include "mount_filter_gen.hpp" +#include #include #include #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" +#include "../string_helper.hpp" + +using namespace std; MountFilter parse_mount_filter(rapidxml::xml_attribute<>* input, vector *errors){ MountFilter mount_filter; diff --git a/xml_converter/src/attribute/mount_filter_gen.hpp b/xml_converter/src/attribute/mount_filter_gen.hpp index 7b62fa37..199a3680 100644 --- a/xml_converter/src/attribute/mount_filter_gen.hpp +++ b/xml_converter/src/attribute/mount_filter_gen.hpp @@ -3,11 +3,10 @@ #include #include -#include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" -#include "../string_helper.hpp" -using namespace std; +class XMLError; + class MountFilter { public: bool griffon; @@ -21,7 +20,7 @@ class MountFilter { bool springer; bool warclaw; - virtual string classname() { return "MountFilter"; }; + virtual std::string classname() { return "MountFilter"; }; }; -MountFilter parse_mount_filter(rapidxml::xml_attribute<>* input, vector *errors); -string stringify_mount_filter(MountFilter attribute_value); \ No newline at end of file +MountFilter parse_mount_filter(rapidxml::xml_attribute<>* input, std::vector *errors); +std::string stringify_mount_filter(MountFilter attribute_value); \ No newline at end of file diff --git a/xml_converter/src/attribute/position_gen.cpp b/xml_converter/src/attribute/position_gen.cpp index fea38867..4e09b549 100644 --- a/xml_converter/src/attribute/position_gen.cpp +++ b/xml_converter/src/attribute/position_gen.cpp @@ -1,11 +1,14 @@ #include "position_gen.hpp" +#include #include #include -#include #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" +#include "../string_helper.hpp" + +using namespace std; Position parse_position(rapidxml::xml_attribute<>* input, vector *){ Position position; diff --git a/xml_converter/src/attribute/position_gen.hpp b/xml_converter/src/attribute/position_gen.hpp index c97c2af1..4ca03068 100644 --- a/xml_converter/src/attribute/position_gen.hpp +++ b/xml_converter/src/attribute/position_gen.hpp @@ -3,18 +3,17 @@ #include #include -#include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" -#include "../string_helper.hpp" -using namespace std; +class XMLError; + class Position { public: float x_position; float y_position; float z_position; - virtual string classname() { return "Position"; }; + virtual std::string classname() { return "Position"; }; }; -Position parse_position(rapidxml::xml_attribute<>* input, vector *errors); -string stringify_position(Position attribute_value); \ No newline at end of file +Position parse_position(rapidxml::xml_attribute<>* input, std::vector *errors); +std::string stringify_position(Position attribute_value); \ No newline at end of file diff --git a/xml_converter/src/attribute/profession_filter_gen.cpp b/xml_converter/src/attribute/profession_filter_gen.cpp index 18a1143e..b984f37a 100644 --- a/xml_converter/src/attribute/profession_filter_gen.cpp +++ b/xml_converter/src/attribute/profession_filter_gen.cpp @@ -1,10 +1,14 @@ #include "profession_filter_gen.hpp" +#include #include #include #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" +#include "../string_helper.hpp" + +using namespace std; ProfessionFilter parse_profession_filter(rapidxml::xml_attribute<>* input, vector *errors){ ProfessionFilter profession_filter; diff --git a/xml_converter/src/attribute/profession_filter_gen.hpp b/xml_converter/src/attribute/profession_filter_gen.hpp index ae467a00..5a8150f7 100644 --- a/xml_converter/src/attribute/profession_filter_gen.hpp +++ b/xml_converter/src/attribute/profession_filter_gen.hpp @@ -3,11 +3,10 @@ #include #include -#include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" -#include "../string_helper.hpp" -using namespace std; +class XMLError; + class ProfessionFilter { public: bool elementalist; @@ -20,7 +19,7 @@ class ProfessionFilter { bool thief; bool warrior; - virtual string classname() { return "ProfessionFilter"; }; + virtual std::string classname() { return "ProfessionFilter"; }; }; -ProfessionFilter parse_profession_filter(rapidxml::xml_attribute<>* input, vector *errors); -string stringify_profession_filter(ProfessionFilter attribute_value); \ No newline at end of file +ProfessionFilter parse_profession_filter(rapidxml::xml_attribute<>* input, std::vector *errors); +std::string stringify_profession_filter(ProfessionFilter attribute_value); \ No newline at end of file diff --git a/xml_converter/src/attribute/reset_behavior_gen.cpp b/xml_converter/src/attribute/reset_behavior_gen.cpp index ed9a31dc..16d09759 100644 --- a/xml_converter/src/attribute/reset_behavior_gen.cpp +++ b/xml_converter/src/attribute/reset_behavior_gen.cpp @@ -1,10 +1,14 @@ #include "reset_behavior_gen.hpp" +#include #include #include #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" +#include "../string_helper.hpp" + +using namespace std; ResetBehavior parse_reset_behavior(rapidxml::xml_attribute<>* input, vector *errors){ ResetBehavior reset_behavior; diff --git a/xml_converter/src/attribute/reset_behavior_gen.hpp b/xml_converter/src/attribute/reset_behavior_gen.hpp index 3cbe0f60..98ca311d 100644 --- a/xml_converter/src/attribute/reset_behavior_gen.hpp +++ b/xml_converter/src/attribute/reset_behavior_gen.hpp @@ -3,11 +3,10 @@ #include #include -#include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" -#include "../string_helper.hpp" -using namespace std; +class XMLError; + enum ResetBehavior { always_visible, daily_reset, @@ -19,5 +18,5 @@ enum ResetBehavior { timer, weekly_reset, }; -ResetBehavior parse_reset_behavior(rapidxml::xml_attribute<>* input, vector *errors); -string stringify_reset_behavior(ResetBehavior attribute_value); \ No newline at end of file +ResetBehavior parse_reset_behavior(rapidxml::xml_attribute<>* input, std::vector *errors); +std::string stringify_reset_behavior(ResetBehavior attribute_value); \ No newline at end of file diff --git a/xml_converter/src/attribute/specialization_filter_gen.cpp b/xml_converter/src/attribute/specialization_filter_gen.cpp index 59e9efa8..1628efa5 100644 --- a/xml_converter/src/attribute/specialization_filter_gen.cpp +++ b/xml_converter/src/attribute/specialization_filter_gen.cpp @@ -1,11 +1,15 @@ #include "specialization_filter_gen.hpp" +#include #include #include #include "../rapid_helpers.hpp" +#include "../string_helper.hpp" #include "../rapidxml-1.13/rapidxml.hpp" +using namespace std; + SpecializationFilter parse_specialization_filter(rapidxml::xml_attribute<>* input, vector *errors){ SpecializationFilter specialization_filter; vector flag_values; diff --git a/xml_converter/src/attribute/specialization_filter_gen.hpp b/xml_converter/src/attribute/specialization_filter_gen.hpp index afffc7af..c01699dd 100644 --- a/xml_converter/src/attribute/specialization_filter_gen.hpp +++ b/xml_converter/src/attribute/specialization_filter_gen.hpp @@ -3,11 +3,10 @@ #include #include -#include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" -#include "../string_helper.hpp" -using namespace std; +class XMLError; + class SpecializationFilter { public: bool elementalist_air; @@ -83,7 +82,7 @@ class SpecializationFilter { bool warrior_strength; bool warrior_tactics; - virtual string classname() { return "SpecializationFilter"; }; + virtual std::string classname() { return "SpecializationFilter"; }; }; -SpecializationFilter parse_specialization_filter(rapidxml::xml_attribute<>* input, vector *errors); -string stringify_specialization_filter(SpecializationFilter attribute_value); \ No newline at end of file +SpecializationFilter parse_specialization_filter(rapidxml::xml_attribute<>* input, std::vector *errors); +std::string stringify_specialization_filter(SpecializationFilter attribute_value); \ No newline at end of file diff --git a/xml_converter/src/attribute/species_filter_gen.cpp b/xml_converter/src/attribute/species_filter_gen.cpp index 259c6bb6..585f2d1b 100644 --- a/xml_converter/src/attribute/species_filter_gen.cpp +++ b/xml_converter/src/attribute/species_filter_gen.cpp @@ -1,11 +1,15 @@ #include "species_filter_gen.hpp" +#include #include #include #include "../rapid_helpers.hpp" +#include "../string_helper.hpp" #include "../rapidxml-1.13/rapidxml.hpp" +using namespace std; + SpeciesFilter parse_species_filter(rapidxml::xml_attribute<>* input, vector *errors){ SpeciesFilter species_filter; vector flag_values; diff --git a/xml_converter/src/attribute/species_filter_gen.hpp b/xml_converter/src/attribute/species_filter_gen.hpp index 93e26110..517e4298 100644 --- a/xml_converter/src/attribute/species_filter_gen.hpp +++ b/xml_converter/src/attribute/species_filter_gen.hpp @@ -3,11 +3,10 @@ #include #include -#include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" -#include "../string_helper.hpp" -using namespace std; +class XMLError; + class SpeciesFilter { public: bool asura; @@ -16,7 +15,7 @@ class SpeciesFilter { bool norn; bool sylvari; - virtual string classname() { return "SpeciesFilter"; }; + virtual std::string classname() { return "SpeciesFilter"; }; }; -SpeciesFilter parse_species_filter(rapidxml::xml_attribute<>* input, vector *errors); -string stringify_species_filter(SpeciesFilter attribute_value); \ No newline at end of file +SpeciesFilter parse_species_filter(rapidxml::xml_attribute<>* input, std::vector *errors); +std::string stringify_species_filter(SpeciesFilter attribute_value); \ No newline at end of file diff --git a/xml_converter/src/attribute/string.cpp b/xml_converter/src/attribute/string.cpp index 68b7970c..f140597c 100644 --- a/xml_converter/src/attribute/string.cpp +++ b/xml_converter/src/attribute/string.cpp @@ -1,8 +1,10 @@ #include "string.hpp" +#include #include #include +#include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" using namespace std; diff --git a/xml_converter/src/attribute/string.hpp b/xml_converter/src/attribute/string.hpp index 3577d1aa..8beb7b3d 100644 --- a/xml_converter/src/attribute/string.hpp +++ b/xml_converter/src/attribute/string.hpp @@ -3,11 +3,10 @@ #include #include -#include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" -using namespace std; +class XMLError; -string parse_string(rapidxml::xml_attribute<>* input, vector *errors); +std::string parse_string(rapidxml::xml_attribute<>* input, std::vector *errors); -string stringify_string(string attribute_value); \ No newline at end of file +std::string stringify_string(std::string attribute_value); \ No newline at end of file diff --git a/xml_converter/src/attribute/trail_data.cpp b/xml_converter/src/attribute/trail_data.cpp index e9808d40..cc765dfc 100644 --- a/xml_converter/src/attribute/trail_data.cpp +++ b/xml_converter/src/attribute/trail_data.cpp @@ -1,11 +1,13 @@ #include "trail_data.hpp" +#include #include #include #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" +using namespace std; TrailData parse_trail_data(rapidxml::xml_attribute<>* input, vector *) { TrailData trail_data; diff --git a/xml_converter/src/attribute/trail_data.hpp b/xml_converter/src/attribute/trail_data.hpp index 22110376..8311c269 100644 --- a/xml_converter/src/attribute/trail_data.hpp +++ b/xml_converter/src/attribute/trail_data.hpp @@ -3,15 +3,15 @@ #include #include -#include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" -using namespace std; +class XMLError; + class TrailData { public: - string trail_data; + std::string trail_data; }; -TrailData parse_trail_data(rapidxml::xml_attribute<>* input, vector *errors); +TrailData parse_trail_data(rapidxml::xml_attribute<>* input, std::vector *errors); -string stringify_trail_data(TrailData attribute_value); \ No newline at end of file +std::string stringify_trail_data(TrailData attribute_value); \ No newline at end of file diff --git a/xml_converter/src/attribute/trail_data_map_id.cpp b/xml_converter/src/attribute/trail_data_map_id.cpp index 304d7708..aa34e50c 100644 --- a/xml_converter/src/attribute/trail_data_map_id.cpp +++ b/xml_converter/src/attribute/trail_data_map_id.cpp @@ -1,11 +1,14 @@ #include "trail_data_map_id.hpp" +#include #include #include #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" +using namespace std; + TrailDataMapId parse_trail_data_map_id(rapidxml::xml_attribute<>* input, vector *){ TrailDataMapId trail_data_map_id; trail_data_map_id.trail_data_map_id = std::stof(get_attribute_value(input)); diff --git a/xml_converter/src/attribute/trail_data_map_id.hpp b/xml_converter/src/attribute/trail_data_map_id.hpp index edede2ac..46a4a0f7 100644 --- a/xml_converter/src/attribute/trail_data_map_id.hpp +++ b/xml_converter/src/attribute/trail_data_map_id.hpp @@ -3,15 +3,15 @@ #include #include -#include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" -using namespace std; +class XMLError; + class TrailDataMapId { -public: + public: int trail_data_map_id; }; -TrailDataMapId parse_trail_data_map_id(rapidxml::xml_attribute<>* input, vector *errors); +TrailDataMapId parse_trail_data_map_id(rapidxml::xml_attribute<>* input, std::vector *errors); -string stringify_trail_data_map_id(TrailDataMapId attribute_value); \ No newline at end of file +std::string stringify_trail_data_map_id(TrailDataMapId attribute_value); \ No newline at end of file diff --git a/xml_converter/src/attribute/unique_id.cpp b/xml_converter/src/attribute/unique_id.cpp index 0b648c4f..d99020f6 100644 --- a/xml_converter/src/attribute/unique_id.cpp +++ b/xml_converter/src/attribute/unique_id.cpp @@ -1,5 +1,7 @@ #include "unique_id.hpp" +#include +#include #include #include @@ -7,6 +9,8 @@ #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" +using namespace std; + UniqueId parse_unique_id(rapidxml::xml_attribute<>* input, vector *) { UniqueId unique_id; string base64; diff --git a/xml_converter/src/attribute/unique_id.hpp b/xml_converter/src/attribute/unique_id.hpp index 0ee40a8b..8cfe4c9c 100644 --- a/xml_converter/src/attribute/unique_id.hpp +++ b/xml_converter/src/attribute/unique_id.hpp @@ -1,18 +1,18 @@ #pragma once +#include #include #include -#include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" -#include "../string_helper.hpp" -using namespace std; +class XMLError; + class UniqueId { public: - vector guid; + std::vector guid; }; -UniqueId parse_unique_id(rapidxml::xml_attribute<>* input, vector *errors); +UniqueId parse_unique_id(rapidxml::xml_attribute<>* input, std::vector *errors); -string stringify_unique_id(UniqueId attribute_value); +std::string stringify_unique_id(UniqueId attribute_value); diff --git a/xml_converter/src/category_gen.cpp b/xml_converter/src/category_gen.cpp index 9f56bb0f..827ec2e7 100644 --- a/xml_converter/src/category_gen.cpp +++ b/xml_converter/src/category_gen.cpp @@ -1,6 +1,15 @@ #include "category_gen.hpp" -#include + +#include #include +#include + +#include "rapid_helpers.hpp" +#include "string_helper.hpp" +#include "attribute/bool.hpp" +#include "attribute/string.hpp" + +#include "rapidxml-1.13/rapidxml.hpp" using namespace std; diff --git a/xml_converter/src/category_gen.hpp b/xml_converter/src/category_gen.hpp index 470ac899..f70590bf 100644 --- a/xml_converter/src/category_gen.hpp +++ b/xml_converter/src/category_gen.hpp @@ -1,34 +1,36 @@ #pragma once -#include "rapidxml-1.13/rapidxml.hpp" + +#include "icon_gen.hpp" + +#include #include #include + #include "parseable.hpp" -#include -#include "icon_gen.hpp" #include "trail_gen.hpp" -#include "attribute/bool.hpp" -#include "attribute/string.hpp" -using namespace std; +#include "rapidxml-1.13/rapidxml.hpp" + +class XMLError; class Category: public Parseable { public: bool default_visibility; bool default_visibility_is_set = false; - string display_name; + std::string display_name; bool display_name_is_set = false; bool is_separator; bool is_separator_is_set = false; - string name; + std::string name; bool name_is_set = false; - string tooltip_name; + std::string tooltip_name; bool tooltip_name_is_set = false; - map children; + std::map children; Icon default_icon; Trail default_trail; - void init_from_xml(rapidxml::xml_node<>* node, vector *errors); - virtual string classname(); - bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors); - virtual vector as_xml() const; + void init_from_xml(rapidxml::xml_node<>* node, std::vector *errors); + virtual std::string classname(); + bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector *errors); + virtual std::vector as_xml() const; }; \ No newline at end of file diff --git a/xml_converter/src/function_timers.cpp b/xml_converter/src/function_timers.cpp index 538d65dd..3d00c8d1 100644 --- a/xml_converter/src/function_timers.cpp +++ b/xml_converter/src/function_timers.cpp @@ -1,12 +1,6 @@ -#include "string_helper.hpp" - -#include -#include -#include -#include - #include - +#include +#include using namespace std; diff --git a/xml_converter/src/icon_gen.cpp b/xml_converter/src/icon_gen.cpp index 5693505b..e7513556 100644 --- a/xml_converter/src/icon_gen.cpp +++ b/xml_converter/src/icon_gen.cpp @@ -1,6 +1,15 @@ #include "icon_gen.hpp" -#include + #include +#include +#include "rapid_helpers.hpp" +#include "string_helper.hpp" +#include "attribute/bool.hpp" +#include "attribute/float.hpp" +#include "attribute/int.hpp" +#include "attribute/string.hpp" + +#include "rapidxml-1.13/rapidxml.hpp" using namespace std; diff --git a/xml_converter/src/icon_gen.hpp b/xml_converter/src/icon_gen.hpp index 22fa6957..d65e7131 100644 --- a/xml_converter/src/icon_gen.hpp +++ b/xml_converter/src/icon_gen.hpp @@ -1,17 +1,12 @@ #pragma once -#include "rapidxml-1.13/rapidxml.hpp" #include #include -#include "parseable.hpp" -#include "attribute/bool.hpp" #include "attribute/color.hpp" #include "attribute/cull_chirality_gen.hpp" #include "attribute/euler_rotation_gen.hpp" #include "attribute/festival_filter_gen.hpp" -#include "attribute/float.hpp" #include "attribute/image.hpp" -#include "attribute/int.hpp" #include "attribute/map_type_filter_gen.hpp" #include "attribute/marker_category.hpp" #include "attribute/mount_filter_gen.hpp" @@ -20,9 +15,13 @@ #include "attribute/reset_behavior_gen.hpp" #include "attribute/specialization_filter_gen.hpp" #include "attribute/species_filter_gen.hpp" -#include "attribute/string.hpp" #include "attribute/unique_id.hpp" -using namespace std; +#include "parseable.hpp" + +#include "rapidxml-1.13/rapidxml.hpp" + +class XMLError; + class Icon: public Parseable { public: @@ -46,9 +45,9 @@ class Icon: public Parseable { bool category_is_set = false; Color color; bool color_is_set = false; - string copy_clipboard; + std::string copy_clipboard; bool copy_clipboard_is_set = false; - string copy_message; + std::string copy_message; bool copy_message_is_set = false; CullChirality cull_chirality; bool cull_chirality_is_set = false; @@ -72,7 +71,7 @@ class Icon: public Parseable { bool icon_is_set = false; float icon_size; bool icon_size_is_set = false; - string info_message; + std::string info_message; bool info_message_is_set = false; bool invert_visibility; bool invert_visibility_is_set = false; @@ -104,7 +103,7 @@ class Icon: public Parseable { bool reset_length_is_set = false; bool scale_on_map_with_zoom; bool scale_on_map_with_zoom_is_set = false; - string schedule; + std::string schedule; bool schedule_is_set = false; float schedule_duration; bool schedule_duration_is_set = false; @@ -116,9 +115,9 @@ class Icon: public Parseable { bool species_filter_is_set = false; MarkerCategory toggle_category; bool toggle_category_is_set = false; - string tooltip_description; + std::string tooltip_description; bool tooltip_description_is_set = false; - string tooltip_name; + std::string tooltip_name; bool tooltip_name_is_set = false; float trigger_range; bool trigger_range_is_set = false; @@ -134,8 +133,8 @@ class Icon: public Parseable { bool z_position_is_set = false; float z_rotation; bool z_rotation_is_set = false; - virtual string classname(); - bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors); - virtual vector as_xml() const; + virtual std::string classname(); + bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector *errors); + virtual std::vector as_xml() const; bool validate_attributes_of_type_marker_category(); }; \ No newline at end of file diff --git a/xml_converter/src/parseable.cpp b/xml_converter/src/parseable.cpp index 02de6a6e..98f19d59 100644 --- a/xml_converter/src/parseable.cpp +++ b/xml_converter/src/parseable.cpp @@ -1,28 +1,20 @@ #include "parseable.hpp" -#include -#include -#include -#include -#include -#include -#include +#include #include -#include #include -#include "rapidxml-1.13/rapidxml.hpp" -#include "string_helper.hpp" +#include "rapid_helpers.hpp" -using namespace std; +#include "rapidxml-1.13/rapidxml.hpp" -string Parseable::classname() { +std::string Parseable::classname() { return "Parseable"; } -void Parseable::init_from_xml(rapidxml::xml_node<>* node, vector* errors) { +void Parseable::init_from_xml(rapidxml::xml_node<>* node, std::vector* errors) { for (rapidxml::xml_attribute<>* attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()) { if (init_xml_attribute(attribute, errors)) {} else { @@ -39,13 +31,13 @@ void Parseable::init_from_xml(rapidxml::xml_node<>* node, vector* err // all of the other parsible classes. So just return false right away without // doing anything. //////////////////////////////////////////////////////////////////////////////// -bool Parseable::init_xml_attribute(rapidxml::xml_attribute<>*, vector*) { +bool Parseable::init_xml_attribute(rapidxml::xml_attribute<>*, std::vector*) { return false; } -vector Parseable::as_xml() const{ +std::vector Parseable::as_xml() const{ throw std::runtime_error("error: Parseable::as_xml() should not be called"); - vector result; + std::vector result; return result; } diff --git a/xml_converter/src/parseable.hpp b/xml_converter/src/parseable.hpp index 1fcf043d..4d5f2d64 100644 --- a/xml_converter/src/parseable.hpp +++ b/xml_converter/src/parseable.hpp @@ -2,12 +2,9 @@ #include #include -#include -#include "rapid_helpers.hpp" #include "rapidxml-1.13/rapidxml.hpp" - -using namespace std; +class XMLError; class Parseable { private: @@ -16,15 +13,15 @@ class Parseable { public: // A stringy representation of a human readable classname. Used for errors. - virtual string classname(); + virtual std::string classname(); // A default parser function to parse an entire XML node into the class. - void init_from_xml(rapidxml::xml_node<>* node, vector *errors); + void init_from_xml(rapidxml::xml_node<>* node, std::vector *errors); // A default parser function to parse a single XML attribute into the class. - virtual bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors); + virtual bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector *errors); // - virtual vector as_xml() const; + virtual std::vector as_xml() const; }; diff --git a/xml_converter/src/rapid_helpers.cpp b/xml_converter/src/rapid_helpers.cpp index c23d9d6d..3aa93749 100644 --- a/xml_converter/src/rapid_helpers.cpp +++ b/xml_converter/src/rapid_helpers.cpp @@ -1,7 +1,11 @@ #include "rapid_helpers.hpp" -#include "rapidxml-1.13/rapidxml.hpp" + +#include #include #include + +#include "rapidxml-1.13/rapidxml.hpp" + using namespace std; string find_attribute_value(rapidxml::xml_node<>* node, string attribute_name) { diff --git a/xml_converter/src/rapid_helpers.hpp b/xml_converter/src/rapid_helpers.hpp index 00e924fe..bf34ca42 100644 --- a/xml_converter/src/rapid_helpers.hpp +++ b/xml_converter/src/rapid_helpers.hpp @@ -4,15 +4,14 @@ #include "rapidxml-1.13/rapidxml.hpp" -using namespace std; -string find_attribute_value(rapidxml::xml_node<>* node, string attribute_name); -rapidxml::xml_attribute<>* find_attribute(rapidxml::xml_node<>* node, string attribute_name); +std::string find_attribute_value(rapidxml::xml_node<>* node, std::string attribute_name); +rapidxml::xml_attribute<>* find_attribute(rapidxml::xml_node<>* node, std::string attribute_name); -string get_attribute_name(rapidxml::xml_attribute<>* attribute); -string get_attribute_value(rapidxml::xml_attribute<>* attribute); +std::string get_attribute_name(rapidxml::xml_attribute<>* attribute); +std::string get_attribute_value(rapidxml::xml_attribute<>* attribute); -string get_node_name(rapidxml::xml_node<>* node); +std::string get_node_name(rapidxml::xml_node<>* node); //////////////////////////////////////////////////////////////////////////////// @@ -23,22 +22,22 @@ string get_node_name(rapidxml::xml_node<>* node); //////////////////////////////////////////////////////////////////////////////// class XMLError { protected: - string error_message; + std::string error_message; public: void print_error(); }; class XMLAttributeNameError: public XMLError { public: - XMLAttributeNameError(string message, rapidxml::xml_attribute<>* attribute); + XMLAttributeNameError(std::string message, rapidxml::xml_attribute<>* attribute); }; class XMLAttributeValueError: public XMLError { public: - XMLAttributeValueError(string message, rapidxml::xml_attribute<>* attribute); + XMLAttributeValueError(std::string message, rapidxml::xml_attribute<>* attribute); }; class XMLNodeNameError: public XMLError { public: - XMLNodeNameError(string message, rapidxml::xml_node<>* node); + XMLNodeNameError(std::string message, rapidxml::xml_node<>* node); }; diff --git a/xml_converter/src/string_helper.cpp b/xml_converter/src/string_helper.cpp index c5f55186..4585a42e 100644 --- a/xml_converter/src/string_helper.cpp +++ b/xml_converter/src/string_helper.cpp @@ -1,7 +1,8 @@ #include "string_helper.hpp" -#include #include +#include +#include #include #include @@ -95,6 +96,12 @@ string normalize(string input_string) { } +//////////////////////////////////////////////////////////////////////////////// +// lowercase +// +// A function to return a string where all of the letters have been lowercased. +// Only works on ASCII strings. +//////////////////////////////////////////////////////////////////////////////// string lowercase(string input) { string output; output.reserve(input.length()); @@ -163,7 +170,6 @@ std::string base64_encode(uint8_t const* buf, unsigned int bufLen) { return ret; } -#include "function_timers.hpp" // TODO: Write Tests For This //////////////////////////////////////////////////////////////////////////////// @@ -213,7 +219,7 @@ std::vector base64_decode(std::string const& encoded_string) { while (in_len >= 4) { for (int i = 0; i < 4; i++) { - char_array_4[i] = base64_lookup[encoded_string[input_index+i]]; + char_array_4[i] = base64_lookup[(uint8_t)encoded_string[input_index+i]]; if (char_array_4[i] == 255) { // TODO: Throw an error or something @@ -233,13 +239,12 @@ std::vector base64_decode(std::string const& encoded_string) { if (in_len) { int i = 0; for (; i < in_len; i++) { - char_array_4[i] = base64_lookup[encoded_string[input_index+i]]; + char_array_4[i] = base64_lookup[(uint8_t)encoded_string[input_index+i]]; if (char_array_4[i] == 255) { // TODO: Throw an error or something return std::vector(); } - } for (; i < 4; i++) { char_array_4[i] = 0; diff --git a/xml_converter/src/string_helper.hpp b/xml_converter/src/string_helper.hpp index c25512c5..d1ecffad 100644 --- a/xml_converter/src/string_helper.hpp +++ b/xml_converter/src/string_helper.hpp @@ -1,18 +1,19 @@ #pragma once +#include +#include #include #include -using namespace std; -bool matches_any(string test, std::initializer_list list); -bool normalized_matches_any(string test, std::initializer_list list); -bool normalized_matches_any(string test, std::vector list); +bool matches_any(std::string test, std::initializer_list list); +bool normalized_matches_any(std::string test, std::initializer_list list); +bool normalized_matches_any(std::string test, std::vector list); -string lowercase(string); +std::string lowercase(std::string); -vector split(string input, string delimiter); +std::vector split(std::string input, std::string delimiter); -string normalize(string input_string); +std::string normalize(std::string input_string); std::string base64_encode(uint8_t const* buf, unsigned int bufLen); std::vector base64_decode(std::string const&); diff --git a/xml_converter/src/trail_gen.cpp b/xml_converter/src/trail_gen.cpp index c2b7e959..79a429ae 100644 --- a/xml_converter/src/trail_gen.cpp +++ b/xml_converter/src/trail_gen.cpp @@ -1,7 +1,16 @@ #include "trail_gen.hpp" -#include + +#include #include +#include "rapidxml-1.13/rapidxml.hpp" +#include "attribute/bool.hpp" +#include "attribute/float.hpp" +#include "attribute/int.hpp" +#include "attribute/string.hpp" +#include "rapid_helpers.hpp" +#include "string_helper.hpp" + using namespace std; string Trail::classname() { diff --git a/xml_converter/src/trail_gen.hpp b/xml_converter/src/trail_gen.hpp index a9bf3591..f660aded 100644 --- a/xml_converter/src/trail_gen.hpp +++ b/xml_converter/src/trail_gen.hpp @@ -1,36 +1,22 @@ #pragma once -#include "rapidxml-1.13/rapidxml.hpp" + #include #include -#include "parseable.hpp" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "rapidxml-1.13/rapidxml_print.hpp" - -#include "attribute/bool.hpp" #include "attribute/color.hpp" #include "attribute/cull_chirality_gen.hpp" #include "attribute/festival_filter_gen.hpp" -#include "attribute/float.hpp" #include "attribute/image.hpp" -#include "attribute/int.hpp" #include "attribute/map_type_filter_gen.hpp" #include "attribute/marker_category.hpp" #include "attribute/mount_filter_gen.hpp" #include "attribute/profession_filter_gen.hpp" #include "attribute/specialization_filter_gen.hpp" #include "attribute/species_filter_gen.hpp" -#include "attribute/string.hpp" #include "attribute/trail_data.hpp" #include "attribute/unique_id.hpp" -using namespace std; +#include "parseable.hpp" +#include "rapidxml-1.13/rapidxml.hpp" +class XMLError; class Trail: public Parseable { public: @@ -76,7 +62,7 @@ class Trail: public Parseable { bool render_on_map_is_set = false; bool render_on_minimap; bool render_on_minimap_is_set = false; - string schedule; + std::string schedule; bool schedule_is_set = false; float schedule_duration; bool schedule_duration_is_set = false; @@ -90,8 +76,8 @@ class Trail: public Parseable { bool trail_data_is_set = false; float trail_scale; bool trail_scale_is_set = false; - virtual string classname(); - bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors); - virtual vector as_xml() const; + virtual std::string classname(); + bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector *errors); + virtual std::vector as_xml() const; bool validate_attributes_of_type_marker_category(); }; \ No newline at end of file diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index fb7da96b..0b1ee5f4 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -1,23 +1,20 @@ -#include - -#include +#include +#include +#include #include +#include #include -#include +#include #include -#include +#include #include -#include -#include -#include -#include "parseable.hpp" -#include "trail_gen.hpp" -#include "icon_gen.hpp" #include "category_gen.hpp" -#include "attribute/float.hpp" -#include "string_helper.hpp" +#include "icon_gen.hpp" +#include "parseable.hpp" #include "rapid_helpers.hpp" +#include "string_helper.hpp" +#include "trail_gen.hpp" #include "rapidxml-1.13/rapidxml.hpp" #include "rapidxml-1.13/rapidxml_utils.hpp" @@ -42,7 +39,7 @@ void write_xml_file(string xml_filepath, map* marker_categorie outfile << "\n"; for (const auto & category : *marker_categories) { string text; - for (const auto& s : category.second.as_xml()) { + for (const auto& s : category.second.as_xml()) { text += s; } outfile << text + "\n"; @@ -50,9 +47,9 @@ void write_xml_file(string xml_filepath, map* marker_categorie outfile << "\n"; for (const auto & parsed_poi : *parsed_pois) { - string text; - for (const auto& s : parsed_poi->as_xml()) { - text += s; + string text; + for (const auto& s : parsed_poi->as_xml()) { + text += s; } outfile << text + "\n"; } From 09aaf65eded8a4841f998e511b0ab711dd47d5ba Mon Sep 17 00:00:00 2001 From: klingbolt Date: Tue, 8 Nov 2022 20:32:56 -0500 Subject: [PATCH 103/539] CI runs code_generator before make --- .github/workflows/main.yml | 6 +++--- xml_converter/generators/code_generator.py | 11 ++++++++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 59233da5..4b8992db 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -94,9 +94,9 @@ jobs: - name: Build xml_converter run: | - cd xml_converter - protoc --proto_path=generators/proto_templates --cpp_out=src/ generators/proto_templates/waypoint.proto - cmake ./ + cd xml_converter/generators + python ./code_generator.py + cmake .. make mv xml_converter ../output diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index a919c77b..44b9cd3f 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -5,6 +5,7 @@ from typing import Any, Dict, List, Tuple, Set import os import markdown +import subprocess from dataclasses import dataclass, field from jinja2 import Template, FileSystemLoader, Environment @@ -220,6 +221,9 @@ def validate_front_matter_schema(front_matter: Any) -> str: return "Error Message: {} (Path: {}".format(e.message, e.json_path) return "" +# def validate_protobuf_schema() + # validate(front_matter, proto.safe_load(schema)) +# Write this later @dataclass class Document: @@ -274,7 +278,7 @@ class Generator: def delete_generated_docs(self, dir_path: str) -> None: for filepath in os.listdir(dir_path): filepath = os.path.join(dir_path, filepath) - if filepath.endswith("_gen.hpp") or filepath.endswith("_gen.cpp") or filepath.endswith("_gen.html"): + if filepath.endswith("_gen.hpp") or filepath.endswith("_gen.cpp") or filepath.endswith("_gen.html") or filepath.endswith("pb/h") or filepath.endswith("pb.cc"): os.remove(filepath) def load_input_doc(self, dir_path: str) -> None: @@ -296,6 +300,10 @@ def load_input_doc(self, dir_path: str) -> None: content=document.content ) + def write_proto_files(self, output_directory: str) -> None: + args = "protoc --proto_path=./proto_templates --cpp_out=" + output_directory + " ./proto_templates/waypoint.proto" + os.system(args) + ############################################################################ # write_cpp_classes # @@ -837,6 +845,7 @@ def main() -> None: generator.delete_generated_docs("../src/") generator.delete_generated_docs("../src/attribute") generator.write_webdocs("../web_docs/") + generator.write_proto_files("../src/") generator.write_cpp_classes("../src/") generator.write_attribute("../src/attribute") From 4a877a3cfee5878f3a8a9d2ffa675f1a86cb6b14 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Thu, 10 Nov 2022 20:46:25 -0500 Subject: [PATCH 104/539] Added new cmake file that generates the protobuf files on make --- .github/workflows/main.yml | 3 +-- xml_converter/CMakeLists.txt | 11 ++++++----- xml_converter/generators/code_generator.py | 7 +------ .../generators/cpp_templates/class_template.hpp | 2 +- xml_converter/proto/CMakeLists.txt | 11 +++++++++++ .../proto_templates => proto}/waypoint.proto | 0 xml_converter/src/category_gen.hpp | 2 +- xml_converter/src/xml_converter.cpp | 1 + 8 files changed, 22 insertions(+), 15 deletions(-) create mode 100644 xml_converter/proto/CMakeLists.txt rename xml_converter/{generators/proto_templates => proto}/waypoint.proto (100%) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4b8992db..7773c7e9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -94,8 +94,7 @@ jobs: - name: Build xml_converter run: | - cd xml_converter/generators - python ./code_generator.py + cd xml_converter cmake .. make mv xml_converter ../output diff --git a/xml_converter/CMakeLists.txt b/xml_converter/CMakeLists.txt index bf050374..a874e2e6 100644 --- a/xml_converter/CMakeLists.txt +++ b/xml_converter/CMakeLists.txt @@ -3,13 +3,14 @@ project (XMLConverter) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) +# Generate Protobuf +INCLUDE(FindProtobuf) +FIND_PACKAGE(Protobuf REQUIRED) +ADD_SUBDIRECTORY(proto) + # Name Output File set(TARGET_NAME xml_converter) -# Add Protobuf -find_package(Protobuf REQUIRED) -include_directories(${Protobuf_INCLUDE_DIRS}) - # Add Dependencies file(GLOB_RECURSE SOURCES "src/*.cpp" "src/*.cc") @@ -18,7 +19,7 @@ file(GLOB_RECURSE SOURCES "src/*.cpp" "src/*.cc") add_executable (${TARGET_NAME} ${SOURCES}) # include libraies -target_link_libraries(${TARGET_NAME} ${Protobuf_LIBRARIES}) +target_link_libraries(${TARGET_NAME} proto ${Protobuf_LIBRARIES}) # Require C++ 17 or newer. target_compile_features(${TARGET_NAME} PRIVATE cxx_std_17) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 44b9cd3f..20c64067 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -278,7 +278,7 @@ class Generator: def delete_generated_docs(self, dir_path: str) -> None: for filepath in os.listdir(dir_path): filepath = os.path.join(dir_path, filepath) - if filepath.endswith("_gen.hpp") or filepath.endswith("_gen.cpp") or filepath.endswith("_gen.html") or filepath.endswith("pb/h") or filepath.endswith("pb.cc"): + if filepath.endswith("_gen.hpp") or filepath.endswith("_gen.cpp") or filepath.endswith("_gen.html"): os.remove(filepath) def load_input_doc(self, dir_path: str) -> None: @@ -300,10 +300,6 @@ def load_input_doc(self, dir_path: str) -> None: content=document.content ) - def write_proto_files(self, output_directory: str) -> None: - args = "protoc --proto_path=./proto_templates --cpp_out=" + output_directory + " ./proto_templates/waypoint.proto" - os.system(args) - ############################################################################ # write_cpp_classes # @@ -845,7 +841,6 @@ def main() -> None: generator.delete_generated_docs("../src/") generator.delete_generated_docs("../src/attribute") generator.write_webdocs("../web_docs/") - generator.write_proto_files("../src/") generator.write_cpp_classes("../src/") generator.write_attribute("../src/attribute") diff --git a/xml_converter/generators/cpp_templates/class_template.hpp b/xml_converter/generators/cpp_templates/class_template.hpp index 27027d39..3b56d3f9 100644 --- a/xml_converter/generators/cpp_templates/class_template.hpp +++ b/xml_converter/generators/cpp_templates/class_template.hpp @@ -40,8 +40,8 @@ class {{cpp_class}}: public Parseable { void init_from_xml(rapidxml::xml_node<>* node, vector *errors); {%- else %} - virtual vector as_xml() const; {%- endif %} + virtual vector as_xml() const; virtual string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors); {%-if attributes_of_type_marker_category %} diff --git a/xml_converter/proto/CMakeLists.txt b/xml_converter/proto/CMakeLists.txt new file mode 100644 index 00000000..76188209 --- /dev/null +++ b/xml_converter/proto/CMakeLists.txt @@ -0,0 +1,11 @@ +INCLUDE(FindProtobuf) +FIND_PACKAGE(Protobuf REQUIRED) +INCLUDE_DIRECTORIES(${PROTOBUF_INCLUDE_DIR}) +PROTOBUF_GENERATE_CPP(PROTO_SRC PROTO_HEADER waypoint.proto) +ADD_LIBRARY(proto ${PROTO_HEADER} ${PROTO_SRC}) + +add_custom_command(TARGET proto PRE_BUILD + COMMAND ${CMAKE_COMMAND} -E copy ${PROTO_HEADER} ${PROTO_SRC} ../src) + +add_custom_command(TARGET proto POST_BUILD + COMMAND ${CMAKE_COMMAND} -E rm ${PROTO_HEADER} ${PROTO_SRC}) diff --git a/xml_converter/generators/proto_templates/waypoint.proto b/xml_converter/proto/waypoint.proto similarity index 100% rename from xml_converter/generators/proto_templates/waypoint.proto rename to xml_converter/proto/waypoint.proto diff --git a/xml_converter/src/category_gen.hpp b/xml_converter/src/category_gen.hpp index 32548c34..b5538826 100644 --- a/xml_converter/src/category_gen.hpp +++ b/xml_converter/src/category_gen.hpp @@ -27,8 +27,8 @@ class Category: public Parseable { Icon default_icon; Trail default_trail; - virtual vector as_xml() const; void init_from_xml(rapidxml::xml_node<>* node, vector *errors); + virtual vector as_xml() const; virtual string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors); }; \ No newline at end of file diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 0b82ddf6..179fe4cf 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -18,6 +18,7 @@ #include "attribute/float.hpp" #include "string_helper.hpp" #include "rapid_helpers.hpp" +#include "waypoint.pb.h" #include "rapidxml-1.13/rapidxml.hpp" #include "rapidxml-1.13/rapidxml_utils.hpp" From 9b6be9b96f8558d53b899c6dc5e401f3faca2ddc Mon Sep 17 00:00:00 2001 From: klingbolt Date: Thu, 10 Nov 2022 20:54:42 -0500 Subject: [PATCH 105/539] Changed . to / --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7773c7e9..a123adfb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -95,7 +95,7 @@ jobs: - name: Build xml_converter run: | cd xml_converter - cmake .. + cmake ./ make mv xml_converter ../output From d34b47ba0736ba0de36cb7aebd8ae700e9241ee9 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Fri, 11 Nov 2022 17:08:53 -0500 Subject: [PATCH 106/539] Cleaning up code from previous commit and addressing comments --- .github/workflows/main.yml | 6 ++++-- xml_converter/CMakeLists.txt | 3 +-- xml_converter/generators/code_generator.py | 4 ---- .../generators/cpp_templates/class_template.hpp | 1 - xml_converter/proto/CMakeLists.txt | 8 +------- xml_converter/src/xml_converter.cpp | 12 +++++++++++- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a123adfb..80346746 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -95,9 +95,11 @@ jobs: - name: Build xml_converter run: | cd xml_converter - cmake ./ + mkdir build + cd build + cmake .. make - mv xml_converter ../output + mv xml_converter ../../output - name: Build Burrito Link run: | diff --git a/xml_converter/CMakeLists.txt b/xml_converter/CMakeLists.txt index a874e2e6..1742f568 100644 --- a/xml_converter/CMakeLists.txt +++ b/xml_converter/CMakeLists.txt @@ -5,14 +5,13 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON) # Generate Protobuf INCLUDE(FindProtobuf) -FIND_PACKAGE(Protobuf REQUIRED) ADD_SUBDIRECTORY(proto) # Name Output File set(TARGET_NAME xml_converter) # Add Dependencies -file(GLOB_RECURSE SOURCES "src/*.cpp" "src/*.cc") +file(GLOB_RECURSE SOURCES "src/*.cpp") # Set output as executable. # TODO: This will eventually become a library when it gets integrated into burrito. diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 20c64067..476f08ff 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -221,10 +221,6 @@ def validate_front_matter_schema(front_matter: Any) -> str: return "Error Message: {} (Path: {}".format(e.message, e.json_path) return "" -# def validate_protobuf_schema() - # validate(front_matter, proto.safe_load(schema)) -# Write this later - @dataclass class Document: metadata: SchemaType diff --git a/xml_converter/generators/cpp_templates/class_template.hpp b/xml_converter/generators/cpp_templates/class_template.hpp index 3b56d3f9..816753f3 100644 --- a/xml_converter/generators/cpp_templates/class_template.hpp +++ b/xml_converter/generators/cpp_templates/class_template.hpp @@ -39,7 +39,6 @@ class {{cpp_class}}: public Parseable { Trail default_trail; void init_from_xml(rapidxml::xml_node<>* node, vector *errors); - {%- else %} {%- endif %} virtual vector as_xml() const; virtual string classname(); diff --git a/xml_converter/proto/CMakeLists.txt b/xml_converter/proto/CMakeLists.txt index 76188209..9c56bbc9 100644 --- a/xml_converter/proto/CMakeLists.txt +++ b/xml_converter/proto/CMakeLists.txt @@ -2,10 +2,4 @@ INCLUDE(FindProtobuf) FIND_PACKAGE(Protobuf REQUIRED) INCLUDE_DIRECTORIES(${PROTOBUF_INCLUDE_DIR}) PROTOBUF_GENERATE_CPP(PROTO_SRC PROTO_HEADER waypoint.proto) -ADD_LIBRARY(proto ${PROTO_HEADER} ${PROTO_SRC}) - -add_custom_command(TARGET proto PRE_BUILD - COMMAND ${CMAKE_COMMAND} -E copy ${PROTO_HEADER} ${PROTO_SRC} ../src) - -add_custom_command(TARGET proto POST_BUILD - COMMAND ${CMAKE_COMMAND} -E rm ${PROTO_HEADER} ${PROTO_SRC}) +ADD_LIBRARY(proto ${PROTO_HEADER} ${PROTO_SRC}) \ No newline at end of file diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 179fe4cf..19fc3b9e 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -18,7 +18,7 @@ #include "attribute/float.hpp" #include "string_helper.hpp" #include "rapid_helpers.hpp" -#include "waypoint.pb.h" +#include "../proto/waypoint.pb.h" #include "rapidxml-1.13/rapidxml.hpp" #include "rapidxml-1.13/rapidxml_utils.hpp" @@ -229,9 +229,19 @@ void convert_taco_directory(string directory, map* marker_cate } } +void test_proto (){ + waypoint::Category testcategory; + testcategory.set_display_name("TEST"); + string output = testcategory.display_name(); + if (output != "TEST") { + cout << "Error in test_proto" < parsed_pois; map marker_categories; + test_proto(); for (const auto & entry : filesystem::directory_iterator("./packs")) { string path = entry.path(); From 833831e51647f1bcca62bdc31e7220f0eabba2cb Mon Sep 17 00:00:00 2001 From: klingbolt Date: Fri, 11 Nov 2022 17:31:25 -0500 Subject: [PATCH 107/539] Attempt to solve previous build failure --- xml_converter/proto/CMakeLists.txt | 8 +++++++- xml_converter/src/xml_converter.cpp | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/xml_converter/proto/CMakeLists.txt b/xml_converter/proto/CMakeLists.txt index 9c56bbc9..76188209 100644 --- a/xml_converter/proto/CMakeLists.txt +++ b/xml_converter/proto/CMakeLists.txt @@ -2,4 +2,10 @@ INCLUDE(FindProtobuf) FIND_PACKAGE(Protobuf REQUIRED) INCLUDE_DIRECTORIES(${PROTOBUF_INCLUDE_DIR}) PROTOBUF_GENERATE_CPP(PROTO_SRC PROTO_HEADER waypoint.proto) -ADD_LIBRARY(proto ${PROTO_HEADER} ${PROTO_SRC}) \ No newline at end of file +ADD_LIBRARY(proto ${PROTO_HEADER} ${PROTO_SRC}) + +add_custom_command(TARGET proto PRE_BUILD + COMMAND ${CMAKE_COMMAND} -E copy ${PROTO_HEADER} ${PROTO_SRC} ../src) + +add_custom_command(TARGET proto POST_BUILD + COMMAND ${CMAKE_COMMAND} -E rm ${PROTO_HEADER} ${PROTO_SRC}) diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 19fc3b9e..8e734f7e 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -18,7 +18,7 @@ #include "attribute/float.hpp" #include "string_helper.hpp" #include "rapid_helpers.hpp" -#include "../proto/waypoint.pb.h" +#include "waypoint.pb.h" #include "rapidxml-1.13/rapidxml.hpp" #include "rapidxml-1.13/rapidxml_utils.hpp" From e3038bfacd91d6c2e85753601e1a2225441c1ac1 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sat, 12 Nov 2022 14:09:47 -0500 Subject: [PATCH 108/539] Removed moving the generated proto files --- xml_converter/proto/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml_converter/proto/CMakeLists.txt b/xml_converter/proto/CMakeLists.txt index 76188209..9331e8a4 100644 --- a/xml_converter/proto/CMakeLists.txt +++ b/xml_converter/proto/CMakeLists.txt @@ -5,7 +5,7 @@ PROTOBUF_GENERATE_CPP(PROTO_SRC PROTO_HEADER waypoint.proto) ADD_LIBRARY(proto ${PROTO_HEADER} ${PROTO_SRC}) add_custom_command(TARGET proto PRE_BUILD - COMMAND ${CMAKE_COMMAND} -E copy ${PROTO_HEADER} ${PROTO_SRC} ../src) + COMMAND ${CMAKE_COMMAND} -E copy ${PROTO_HEADER} ${PROTO_SRC} ../../src) add_custom_command(TARGET proto POST_BUILD COMMAND ${CMAKE_COMMAND} -E rm ${PROTO_HEADER} ${PROTO_SRC}) From 1ca699645db345f2ab9b50fd423541897f2f5c6f Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sat, 12 Nov 2022 14:29:31 -0500 Subject: [PATCH 109/539] Removing extraneous include --- xml_converter/generators/code_generator.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 476f08ff..bbb8fc9a 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -5,7 +5,6 @@ from typing import Any, Dict, List, Tuple, Set import os import markdown -import subprocess from dataclasses import dataclass, field from jinja2 import Template, FileSystemLoader, Environment @@ -822,8 +821,6 @@ def normalize(word: str) -> str: # The first function that gets called. Is in change of parsing the input # markdown files, and then creating the desired output files. ################################################################################ - - def main() -> None: generator = Generator() markdown_doc_directory = "../doc" From 650b4271c21987a36942cc5c550addf78a0774d1 Mon Sep 17 00:00:00 2001 From: klingbolt <89052698+klingbolt@users.noreply.github.com> Date: Sat, 12 Nov 2022 14:32:42 -0500 Subject: [PATCH 110/539] Update xml_converter/proto/CMakeLists.txt --- xml_converter/proto/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/xml_converter/proto/CMakeLists.txt b/xml_converter/proto/CMakeLists.txt index 9331e8a4..814448d8 100644 --- a/xml_converter/proto/CMakeLists.txt +++ b/xml_converter/proto/CMakeLists.txt @@ -1,5 +1,4 @@ INCLUDE(FindProtobuf) -FIND_PACKAGE(Protobuf REQUIRED) INCLUDE_DIRECTORIES(${PROTOBUF_INCLUDE_DIR}) PROTOBUF_GENERATE_CPP(PROTO_SRC PROTO_HEADER waypoint.proto) ADD_LIBRARY(proto ${PROTO_HEADER} ${PROTO_SRC}) From af849959750e8700008454942133bc7124c4eea5 Mon Sep 17 00:00:00 2001 From: klingbolt <89052698+klingbolt@users.noreply.github.com> Date: Sat, 12 Nov 2022 14:33:43 -0500 Subject: [PATCH 111/539] Update xml_converter/proto/CMakeLists.txt --- xml_converter/proto/CMakeLists.txt | 5 ----- 1 file changed, 5 deletions(-) diff --git a/xml_converter/proto/CMakeLists.txt b/xml_converter/proto/CMakeLists.txt index 814448d8..651acb1c 100644 --- a/xml_converter/proto/CMakeLists.txt +++ b/xml_converter/proto/CMakeLists.txt @@ -3,8 +3,3 @@ INCLUDE_DIRECTORIES(${PROTOBUF_INCLUDE_DIR}) PROTOBUF_GENERATE_CPP(PROTO_SRC PROTO_HEADER waypoint.proto) ADD_LIBRARY(proto ${PROTO_HEADER} ${PROTO_SRC}) -add_custom_command(TARGET proto PRE_BUILD - COMMAND ${CMAKE_COMMAND} -E copy ${PROTO_HEADER} ${PROTO_SRC} ../../src) - -add_custom_command(TARGET proto POST_BUILD - COMMAND ${CMAKE_COMMAND} -E rm ${PROTO_HEADER} ${PROTO_SRC}) From 2092308329913c8b034fb7e20211ae93427159e2 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sun, 13 Nov 2022 10:19:13 -0600 Subject: [PATCH 112/539] manually fixing non-generated syntax lints --- xml_converter/src/attribute/bool.cpp | 17 +++- xml_converter/src/attribute/color.cpp | 15 +++- xml_converter/src/attribute/color.hpp | 2 +- xml_converter/src/attribute/float.cpp | 13 ++- xml_converter/src/attribute/float.hpp | 2 +- xml_converter/src/attribute/image.cpp | 14 +++- xml_converter/src/attribute/image.hpp | 2 +- xml_converter/src/attribute/int.cpp | 22 ++++-- xml_converter/src/attribute/int.hpp | 4 +- .../src/attribute/marker_category.cpp | 17 +++- .../src/attribute/marker_category.hpp | 4 +- xml_converter/src/attribute/string.cpp | 16 +++- xml_converter/src/attribute/string.hpp | 2 +- xml_converter/src/attribute/trail_data.cpp | 2 +- xml_converter/src/attribute/trail_data.hpp | 4 +- .../src/attribute/trail_data_map_id.cpp | 6 +- .../src/attribute/trail_data_map_id.hpp | 4 +- xml_converter/src/attribute/unique_id.cpp | 2 +- xml_converter/src/function_timers.cpp | 10 +-- xml_converter/src/function_timers.hpp | 12 +-- xml_converter/src/parseable.cpp | 2 +- xml_converter/src/parseable.hpp | 6 -- xml_converter/src/rapid_helpers.cpp | 8 +- xml_converter/src/rapid_helpers.hpp | 10 +-- xml_converter/src/string_helper.cpp | 79 +++++++++---------- 25 files changed, 167 insertions(+), 108 deletions(-) diff --git a/xml_converter/src/attribute/bool.cpp b/xml_converter/src/attribute/bool.cpp index df864581..92d03fe5 100644 --- a/xml_converter/src/attribute/bool.cpp +++ b/xml_converter/src/attribute/bool.cpp @@ -9,6 +9,13 @@ using namespace std; +//////////////////////////////////////////////////////////////////////////////// +// parse_bool +// +// Parses a bool from the value of a rapidxml::xmlattribute. "true" or "1" are +// evaluated as `true`. 'false' or '0' are evaluated as `false`. Everything is +// is also evaluated as false but appends an error to the errors vector. +//////////////////////////////////////////////////////////////////////////////// bool parse_bool(rapidxml::xml_attribute<>* input, vector *errors) { if (get_attribute_value(input) == "0" || get_attribute_value(input) == "false") { return false; @@ -22,12 +29,16 @@ bool parse_bool(rapidxml::xml_attribute<>* input, vector *errors) { } } -string stringify_bool(bool attribute_value){ +//////////////////////////////////////////////////////////////////////////////// +// stringify_bool +// +// Converts a bool into a stringy value so that it can be saved to xml. +//////////////////////////////////////////////////////////////////////////////// +string stringify_bool(bool attribute_value) { if (attribute_value) { return "true"; } else { return "false"; - } + } } - \ No newline at end of file diff --git a/xml_converter/src/attribute/color.cpp b/xml_converter/src/attribute/color.cpp index 579296e2..09ff843d 100644 --- a/xml_converter/src/attribute/color.cpp +++ b/xml_converter/src/attribute/color.cpp @@ -9,12 +9,23 @@ using namespace std; +//////////////////////////////////////////////////////////////////////////////// +// parse_color +// +// Parses a Color from the value of a rapidxml::xml_attribute. +// TODO(#98): Color should be saved in a better format then the raw hex string. +//////////////////////////////////////////////////////////////////////////////// Color parse_color(rapidxml::xml_attribute<>* input, vector *) { Color color; color.hex = get_attribute_value(input); return color; } -string stringify_color (Color attribute_value){ +//////////////////////////////////////////////////////////////////////////////// +// stringify_color +// +// Converts a Color into a stringy value so it can be saved to xml. +//////////////////////////////////////////////////////////////////////////////// +string stringify_color(Color attribute_value) { return attribute_value.hex; -} \ No newline at end of file +} diff --git a/xml_converter/src/attribute/color.hpp b/xml_converter/src/attribute/color.hpp index bd822985..8f8ee0e4 100644 --- a/xml_converter/src/attribute/color.hpp +++ b/xml_converter/src/attribute/color.hpp @@ -14,4 +14,4 @@ class Color { Color parse_color(rapidxml::xml_attribute<>* input, std::vector *errors); -std::string stringify_color (Color attribute_value); \ No newline at end of file +std::string stringify_color(Color attribute_value); diff --git a/xml_converter/src/attribute/float.cpp b/xml_converter/src/attribute/float.cpp index d1b6ef5e..964faa16 100644 --- a/xml_converter/src/attribute/float.cpp +++ b/xml_converter/src/attribute/float.cpp @@ -5,10 +5,21 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" +//////////////////////////////////////////////////////////////////////////////// +// parse_float +// +// Parses a float from the value of a rapidxml::xml_attribute. +//////////////////////////////////////////////////////////////////////////////// float parse_float(rapidxml::xml_attribute<>* input, std::vector *) { return std::stof(get_attribute_value(input)); } -std::string stringify_float (float attribute_value){ + +//////////////////////////////////////////////////////////////////////////////// +// stringify_float +// +// Converts a float into a stringy value so that it can be saved to xml. +//////////////////////////////////////////////////////////////////////////////// +std::string stringify_float(float attribute_value) { return std::to_string(attribute_value); } diff --git a/xml_converter/src/attribute/float.hpp b/xml_converter/src/attribute/float.hpp index 24e268d9..8cce8226 100644 --- a/xml_converter/src/attribute/float.hpp +++ b/xml_converter/src/attribute/float.hpp @@ -9,4 +9,4 @@ class XMLError; float parse_float(rapidxml::xml_attribute<>* input, std::vector *errors); -std::string stringify_float (float attribute_value); +std::string stringify_float(float attribute_value); diff --git a/xml_converter/src/attribute/image.cpp b/xml_converter/src/attribute/image.cpp index 659d4f4f..142e5dde 100644 --- a/xml_converter/src/attribute/image.cpp +++ b/xml_converter/src/attribute/image.cpp @@ -9,6 +9,11 @@ using namespace std; +//////////////////////////////////////////////////////////////////////////////// +// parse_image +// +// Parses the path to an image from the value of a rapidxml::xml_attribute. +//////////////////////////////////////////////////////////////////////////////// Image parse_image(rapidxml::xml_attribute<>* input, vector *) { Image image; image.path = get_attribute_value(input); @@ -16,6 +21,11 @@ Image parse_image(rapidxml::xml_attribute<>* input, vector *) { return image; } -string stringify_image(Image attribute_value){ +//////////////////////////////////////////////////////////////////////////////// +// stringify_image +// +// Converts an Image into a stringy value representing the path to the image. +//////////////////////////////////////////////////////////////////////////////// +string stringify_image(Image attribute_value) { return attribute_value.path; -} \ No newline at end of file +} diff --git a/xml_converter/src/attribute/image.hpp b/xml_converter/src/attribute/image.hpp index 452c25f1..1404efb3 100644 --- a/xml_converter/src/attribute/image.hpp +++ b/xml_converter/src/attribute/image.hpp @@ -15,4 +15,4 @@ class Image { Image parse_image(rapidxml::xml_attribute<>* input, std::vector *errors); -std::string stringify_image (Image attribute_value); \ No newline at end of file +std::string stringify_image(Image attribute_value); diff --git a/xml_converter/src/attribute/int.cpp b/xml_converter/src/attribute/int.cpp index 3bcc0ddc..46d1568f 100644 --- a/xml_converter/src/attribute/int.cpp +++ b/xml_converter/src/attribute/int.cpp @@ -10,6 +10,13 @@ using namespace std; + +//////////////////////////////////////////////////////////////////////////////// +// parse_int +// +// Parses an int from the value of a rapidxml::xml_attribute. Adds an error +// if the value cannot be parsed properly. +//////////////////////////////////////////////////////////////////////////////// int parse_int(rapidxml::xml_attribute<>* input, vector *errors) { try { return stoi(get_attribute_value(input)); @@ -18,6 +25,7 @@ int parse_int(rapidxml::xml_attribute<>* input, vector *errors) { errors->push_back(new XMLAttributeValueError("Invalid integer value", input)); return 0; } + // TODO(#99): Do we need an out_of_range exception catch when parsing integers? // catch(std::out_of_range const& exception) { // std::cout << "std::out_of_range::what(): " << ex.what() << '\n'; // const long long ll {std::stoll(s, &pos)}; @@ -25,10 +33,12 @@ int parse_int(rapidxml::xml_attribute<>* input, vector *errors) { // } } -int init_int_attribute() { - return 0; -} -string stringify_int (int attribute_value){ - return to_string(attribute_value); -} \ No newline at end of file +//////////////////////////////////////////////////////////////////////////////// +// stringify_int +// +// Converts an int into a stringy value so that it can be saved to xml. +//////////////////////////////////////////////////////////////////////////////// +string stringify_int(int attribute_value) { + return to_string(attribute_value); +} diff --git a/xml_converter/src/attribute/int.hpp b/xml_converter/src/attribute/int.hpp index e6c073c3..b0d8dae1 100644 --- a/xml_converter/src/attribute/int.hpp +++ b/xml_converter/src/attribute/int.hpp @@ -9,6 +9,4 @@ class XMLError; int parse_int(rapidxml::xml_attribute<>* input, std::vector *errors); -int init_int_attribute(); - -std::string stringify_int (int attribute_value); \ No newline at end of file +std::string stringify_int(int attribute_value); diff --git a/xml_converter/src/attribute/marker_category.cpp b/xml_converter/src/attribute/marker_category.cpp index 6fb351cd..39285399 100644 --- a/xml_converter/src/attribute/marker_category.cpp +++ b/xml_converter/src/attribute/marker_category.cpp @@ -6,12 +6,23 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" +//////////////////////////////////////////////////////////////////////////////// +// parse_marker_category +// +// Parses a MarkerCategory from the value of a rapidxml::xml_attribute. +//////////////////////////////////////////////////////////////////////////////// MarkerCategory parse_marker_category(rapidxml::xml_attribute<>* input, std::vector *) { MarkerCategory marker_category; marker_category.category = get_attribute_value(input); return marker_category; -} +} -std::string stringify_marker_category (MarkerCategory attribute_value){ +//////////////////////////////////////////////////////////////////////////////// +// stringify_marker_category +// +// Converts a MarkerCategory into a stringy value so that it can be saved to +// xml. The stringy value is a full hierarchical path to the MarkerCategory. +//////////////////////////////////////////////////////////////////////////////// +std::string stringify_marker_category(MarkerCategory attribute_value) { return attribute_value.category; -} \ No newline at end of file +} diff --git a/xml_converter/src/attribute/marker_category.hpp b/xml_converter/src/attribute/marker_category.hpp index 29cbce0c..d495a925 100644 --- a/xml_converter/src/attribute/marker_category.hpp +++ b/xml_converter/src/attribute/marker_category.hpp @@ -8,10 +8,10 @@ class XMLError; class MarkerCategory { - public: + public: std::string category; }; MarkerCategory parse_marker_category(rapidxml::xml_attribute<>* input, std::vector *errors); -std::string stringify_marker_category (MarkerCategory attribute_value); \ No newline at end of file +std::string stringify_marker_category(MarkerCategory attribute_value); diff --git a/xml_converter/src/attribute/string.cpp b/xml_converter/src/attribute/string.cpp index f140597c..351ddc60 100644 --- a/xml_converter/src/attribute/string.cpp +++ b/xml_converter/src/attribute/string.cpp @@ -9,10 +9,22 @@ using namespace std; +//////////////////////////////////////////////////////////////////////////////// +// parse_string +// +// Parses a string from the value of a rapidxml::xml_attribute. +//////////////////////////////////////////////////////////////////////////////// string parse_string(rapidxml::xml_attribute<>* input, vector *) { return get_attribute_value(input); } -string stringify_string(string attribute_value){ +//////////////////////////////////////////////////////////////////////////////// +// stringify_string +// +// Returns the same string that was passed in which is encoded directly into +// xml. This function exists for stylistic convenience with all the other +// attribute stringify functions. +//////////////////////////////////////////////////////////////////////////////// +string stringify_string(string attribute_value) { return attribute_value; -} \ No newline at end of file +} diff --git a/xml_converter/src/attribute/string.hpp b/xml_converter/src/attribute/string.hpp index 8beb7b3d..fe2f0816 100644 --- a/xml_converter/src/attribute/string.hpp +++ b/xml_converter/src/attribute/string.hpp @@ -9,4 +9,4 @@ class XMLError; std::string parse_string(rapidxml::xml_attribute<>* input, std::vector *errors); -std::string stringify_string(std::string attribute_value); \ No newline at end of file +std::string stringify_string(std::string attribute_value); diff --git a/xml_converter/src/attribute/trail_data.cpp b/xml_converter/src/attribute/trail_data.cpp index cc765dfc..16c6e117 100644 --- a/xml_converter/src/attribute/trail_data.cpp +++ b/xml_converter/src/attribute/trail_data.cpp @@ -15,6 +15,6 @@ TrailData parse_trail_data(rapidxml::xml_attribute<>* input, vector * return trail_data; } -string stringify_trail_data(TrailData attribute_value){ +string stringify_trail_data(TrailData attribute_value) { return attribute_value.trail_data; } diff --git a/xml_converter/src/attribute/trail_data.hpp b/xml_converter/src/attribute/trail_data.hpp index 8311c269..c83a12e4 100644 --- a/xml_converter/src/attribute/trail_data.hpp +++ b/xml_converter/src/attribute/trail_data.hpp @@ -8,10 +8,10 @@ class XMLError; class TrailData { -public: + public: std::string trail_data; }; TrailData parse_trail_data(rapidxml::xml_attribute<>* input, std::vector *errors); -std::string stringify_trail_data(TrailData attribute_value); \ No newline at end of file +std::string stringify_trail_data(TrailData attribute_value); diff --git a/xml_converter/src/attribute/trail_data_map_id.cpp b/xml_converter/src/attribute/trail_data_map_id.cpp index aa34e50c..b5d937b9 100644 --- a/xml_converter/src/attribute/trail_data_map_id.cpp +++ b/xml_converter/src/attribute/trail_data_map_id.cpp @@ -9,12 +9,12 @@ using namespace std; -TrailDataMapId parse_trail_data_map_id(rapidxml::xml_attribute<>* input, vector *){ +TrailDataMapId parse_trail_data_map_id(rapidxml::xml_attribute<>* input, vector *) { TrailDataMapId trail_data_map_id; trail_data_map_id.trail_data_map_id = std::stof(get_attribute_value(input)); return trail_data_map_id; } -string stringify_trail_data_map_id(TrailDataMapId attribute_value){ - return to_string(attribute_value.trail_data_map_id); +string stringify_trail_data_map_id(TrailDataMapId attribute_value) { + return to_string(attribute_value.trail_data_map_id); } diff --git a/xml_converter/src/attribute/trail_data_map_id.hpp b/xml_converter/src/attribute/trail_data_map_id.hpp index 46a4a0f7..3ce4bc18 100644 --- a/xml_converter/src/attribute/trail_data_map_id.hpp +++ b/xml_converter/src/attribute/trail_data_map_id.hpp @@ -8,10 +8,10 @@ class XMLError; class TrailDataMapId { - public: + public: int trail_data_map_id; }; TrailDataMapId parse_trail_data_map_id(rapidxml::xml_attribute<>* input, std::vector *errors); -std::string stringify_trail_data_map_id(TrailDataMapId attribute_value); \ No newline at end of file +std::string stringify_trail_data_map_id(TrailDataMapId attribute_value); diff --git a/xml_converter/src/attribute/unique_id.cpp b/xml_converter/src/attribute/unique_id.cpp index d99020f6..371ac73f 100644 --- a/xml_converter/src/attribute/unique_id.cpp +++ b/xml_converter/src/attribute/unique_id.cpp @@ -20,6 +20,6 @@ UniqueId parse_unique_id(rapidxml::xml_attribute<>* input, vector *) return unique_id; } -string stringify_unique_id(UniqueId attribute_value){ +string stringify_unique_id(UniqueId attribute_value) { return base64_encode(&attribute_value.guid[0], attribute_value.guid.size()); } diff --git a/xml_converter/src/function_timers.cpp b/xml_converter/src/function_timers.cpp index 3d00c8d1..acc919fa 100644 --- a/xml_converter/src/function_timers.cpp +++ b/xml_converter/src/function_timers.cpp @@ -1,4 +1,5 @@ #include +#include #include #include @@ -19,18 +20,17 @@ using namespace std; //////////////////////////////////////////////////////////////////////////////// #define TIMER_IMPLEMENTATION(TIMER) \ - std::chrono::time_point>> begin_##TIMER; \ - std::chrono::duration> duration_##TIMER; \ - unsigned long call_count_##TIMER = 0; \ + std::chrono::time_point>> begin_##TIMER; \ + std::chrono::duration> duration_##TIMER; \ + uint64_t call_count_##TIMER = 0; \ void print_timer_##TIMER(ostream &out) { \ - long microseconds = std::chrono::duration_cast(duration_##TIMER).count(); \ + int64_t microseconds = std::chrono::duration_cast(duration_##TIMER).count(); \ out << "Timer " << TIMER << " Total Duration: " << microseconds << endl; \ out << "Timer " << TIMER << " Call Count " << call_count_##TIMER << endl; \ out << "Timer " << TIMER << " Call Duration: " << float(microseconds) / float(call_count_##TIMER) << endl; \ } \ void print_timer_##TIMER() {print_timer_##TIMER(cout);} - TIMER_IMPLEMENTATION(0) TIMER_IMPLEMENTATION(1) TIMER_IMPLEMENTATION(2) diff --git a/xml_converter/src/function_timers.hpp b/xml_converter/src/function_timers.hpp index 1162cea2..f9c0eb4c 100644 --- a/xml_converter/src/function_timers.hpp +++ b/xml_converter/src/function_timers.hpp @@ -6,10 +6,6 @@ #include #include - - - - //////////////////////////////////////////////////////////////////////////////// // Function Timers // @@ -28,11 +24,10 @@ // print_timer_0(); //////////////////////////////////////////////////////////////////////////////// - #define TIMER_PROTOTYPE(TIMER) \ - extern std::chrono::time_point>> begin_##TIMER; \ - extern std::chrono::duration> duration_##TIMER; \ - extern unsigned long call_count_##TIMER; \ + extern std::chrono::time_point>> begin_##TIMER; \ + extern std::chrono::duration> duration_##TIMER; \ + extern uint64_t call_count_##TIMER; \ inline void start_timer_##TIMER() { \ begin_##TIMER = std::chrono::high_resolution_clock::now(); \ } \ @@ -44,7 +39,6 @@ void print_timer_##TIMER(); \ void print_timer_##TIMER(std::ostream); - TIMER_PROTOTYPE(0) TIMER_PROTOTYPE(1) TIMER_PROTOTYPE(2) diff --git a/xml_converter/src/parseable.cpp b/xml_converter/src/parseable.cpp index 98f19d59..f59ef873 100644 --- a/xml_converter/src/parseable.cpp +++ b/xml_converter/src/parseable.cpp @@ -36,7 +36,7 @@ bool Parseable::init_xml_attribute(rapidxml::xml_attribute<>*, std::vector Parseable::as_xml() const{ +std::vector Parseable::as_xml() const { throw std::runtime_error("error: Parseable::as_xml() should not be called"); std::vector result; return result; diff --git a/xml_converter/src/parseable.hpp b/xml_converter/src/parseable.hpp index 4d5f2d64..671e1194 100644 --- a/xml_converter/src/parseable.hpp +++ b/xml_converter/src/parseable.hpp @@ -7,10 +7,6 @@ class XMLError; class Parseable { - private: - - protected: - public: // A stringy representation of a human readable classname. Used for errors. virtual std::string classname(); @@ -21,7 +17,5 @@ class Parseable { // A default parser function to parse a single XML attribute into the class. virtual bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector *errors); - // virtual std::vector as_xml() const; - }; diff --git a/xml_converter/src/rapid_helpers.cpp b/xml_converter/src/rapid_helpers.cpp index 3aa93749..d510d4d8 100644 --- a/xml_converter/src/rapid_helpers.cpp +++ b/xml_converter/src/rapid_helpers.cpp @@ -10,7 +10,7 @@ using namespace std; string find_attribute_value(rapidxml::xml_node<>* node, string attribute_name) { auto attribute = node->first_attribute(attribute_name.data(), attribute_name.size(), false); - + return string(attribute->value(), attribute->value_size()); } @@ -94,13 +94,12 @@ TextPosition get_line_number(char* source, char* start_index) { // This function creates a new string with all the tabs replaced with four // spaces. This is done to normalize the size of the strings when printed. //////////////////////////////////////////////////////////////////////////////// -string replace_tabs(string input){ +string replace_tabs(string input) { string tab = "\t"; string spaces = " "; auto iterator = input.find(tab); - while (iterator != string::npos) - { + while (iterator != string::npos) { input.replace(iterator, tab.size(), spaces); iterator = input.find(tab); } @@ -115,7 +114,6 @@ string replace_tabs(string input){ // in order to do so. //////////////////////////////////////////////////////////////////////////////// string generate_generic_error(string error_message, char* source, string filepath, char* start_index, uint length) { - string BOLD_COLOR = "\033[1m"; string RED_COLOR = "\033[31;1m"; string DEFAULT_COLOR = "\033[0m"; diff --git a/xml_converter/src/rapid_helpers.hpp b/xml_converter/src/rapid_helpers.hpp index bf34ca42..35cb62c5 100644 --- a/xml_converter/src/rapid_helpers.hpp +++ b/xml_converter/src/rapid_helpers.hpp @@ -22,22 +22,22 @@ std::string get_node_name(rapidxml::xml_node<>* node); //////////////////////////////////////////////////////////////////////////////// class XMLError { protected: - std::string error_message; + std::string error_message; public: - void print_error(); + void print_error(); }; class XMLAttributeNameError: public XMLError { public: - XMLAttributeNameError(std::string message, rapidxml::xml_attribute<>* attribute); + XMLAttributeNameError(std::string message, rapidxml::xml_attribute<>* attribute); }; class XMLAttributeValueError: public XMLError { public: - XMLAttributeValueError(std::string message, rapidxml::xml_attribute<>* attribute); + XMLAttributeValueError(std::string message, rapidxml::xml_attribute<>* attribute); }; class XMLNodeNameError: public XMLError { public: - XMLNodeNameError(std::string message, rapidxml::xml_node<>* node); + XMLNodeNameError(std::string message, rapidxml::xml_node<>* node); }; diff --git a/xml_converter/src/string_helper.cpp b/xml_converter/src/string_helper.cpp index 4585a42e..fa33ac63 100644 --- a/xml_converter/src/string_helper.cpp +++ b/xml_converter/src/string_helper.cpp @@ -18,7 +18,7 @@ bool matches_any(string test, std::initializer_list list) { return false; } -bool nomralized_matches_any(string test, std::initializer_list list) { +bool normalized_matches_any(string test, std::initializer_list list) { test = normalize(test); for (auto elem : list) { if (test == normalize(elem)) { @@ -28,7 +28,7 @@ bool nomralized_matches_any(string test, std::initializer_list list) { return false; } -bool nomralized_matches_any(string test, std::vector list) { +bool normalized_matches_any(string test, std::vector list) { test = normalize(test); for (auto elem : list) { if (test == normalize(elem)) { @@ -98,7 +98,7 @@ string normalize(string input_string) { //////////////////////////////////////////////////////////////////////////////// // lowercase -// +// // A function to return a string where all of the letters have been lowercased. // Only works on ASCII strings. //////////////////////////////////////////////////////////////////////////////// @@ -121,57 +121,56 @@ string lowercase(string input) { // Functions to either encode or decode base64 strings // Obtained from https://stackoverflow.com/questions/180947/base64-decode-snippet-in-c -static const std::string base64_chars = +static const char base64_chars[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "abcdefghijklmnopqrstuvwxyz" "0123456789+/"; std::string base64_encode(uint8_t const* buf, unsigned int bufLen) { - std::string ret; - int i = 0; - int j = 0; - uint8_t char_array_3[3]; - uint8_t char_array_4[4]; - - while (bufLen--) { - char_array_3[i++] = *(buf++); - if (i == 3) { - char_array_4[0] = (char_array_3[0] & 0xfc) >> 2; - char_array_4[1] = ((char_array_3[0] & 0x03) << 4) + ((char_array_3[1] & 0xf0) >> 4); - char_array_4[2] = ((char_array_3[1] & 0x0f) << 2) + ((char_array_3[2] & 0xc0) >> 6); - char_array_4[3] = char_array_3[2] & 0x3f; - - for(i = 0; (i <4) ; i++){ - ret += base64_chars[char_array_4[i]]; - } - i = 0; - } - } + std::string ret; + int i = 0; + int j = 0; + uint8_t char_array_3[3]; + uint8_t char_array_4[4]; - if (i){ - for(j = i; j < 3; j++){ - char_array_3[j] = '\0'; + while (bufLen--) { + char_array_3[i++] = *(buf++); + if (i == 3) { + char_array_4[0] = (char_array_3[0] & 0xfc) >> 2; + char_array_4[1] = ((char_array_3[0] & 0x03) << 4) + ((char_array_3[1] & 0xf0) >> 4); + char_array_4[2] = ((char_array_3[1] & 0x0f) << 2) + ((char_array_3[2] & 0xc0) >> 6); + char_array_4[3] = char_array_3[2] & 0x3f; + + for (i = 0; (i <4) ; i++) { + ret += base64_chars[char_array_4[i]]; + } + i = 0; + } } - char_array_4[0] = (char_array_3[0] & 0xfc) >> 2; - char_array_4[1] = ((char_array_3[0] & 0x03) << 4) + ((char_array_3[1] & 0xf0) >> 4); - char_array_4[2] = ((char_array_3[1] & 0x0f) << 2) + ((char_array_3[2] & 0xc0) >> 6); - char_array_4[3] = char_array_3[2] & 0x3f; + if (i) { + for (j = i; j < 3; j++) { + char_array_3[j] = '\0'; + } - for (j = 0; (j < i + 1); j++){ - ret += base64_chars[char_array_4[j]]; - } + char_array_4[0] = (char_array_3[0] & 0xfc) >> 2; + char_array_4[1] = ((char_array_3[0] & 0x03) << 4) + ((char_array_3[1] & 0xf0) >> 4); + char_array_4[2] = ((char_array_3[1] & 0x0f) << 2) + ((char_array_3[2] & 0xc0) >> 6); + char_array_4[3] = char_array_3[2] & 0x3f; + + for (j = 0; (j < i + 1); j++) { + ret += base64_chars[char_array_4[j]]; + } - while((i++ < 3)){ - ret += '='; + while (i++ < 3) { + ret += '='; + } } - } - return ret; + return ret; } -// TODO: Write Tests For This //////////////////////////////////////////////////////////////////////////////// // This lookup table maps all base64 characters to their numerical equivalents // A-Z 0-25 @@ -211,7 +210,7 @@ std::vector base64_decode(std::string const& encoded_string) { size_t input_index = 0; size_t output_index = 0; - while(encoded_string[in_len-1] == '=') { + while (encoded_string[in_len-1] == '=') { in_len -= 1; } From 6145f5ae1a8b66a10596962c7745f619f49f4e30 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 13 Nov 2022 19:05:51 -0500 Subject: [PATCH 113/539] Reduced to one cmake file that creates the proto files on make --- xml_converter/.gitignore | 2 ++ xml_converter/CMakeLists.txt | 10 ++++++---- xml_converter/proto/CMakeLists.txt | 11 ----------- 3 files changed, 8 insertions(+), 15 deletions(-) delete mode 100644 xml_converter/proto/CMakeLists.txt diff --git a/xml_converter/.gitignore b/xml_converter/.gitignore index 75099e8b..ee6c06c7 100644 --- a/xml_converter/.gitignore +++ b/xml_converter/.gitignore @@ -9,3 +9,5 @@ xml_converter venv/ web_docs __pycache__/ +build/ +export_packs/ diff --git a/xml_converter/CMakeLists.txt b/xml_converter/CMakeLists.txt index 1742f568..40f58e0e 100644 --- a/xml_converter/CMakeLists.txt +++ b/xml_converter/CMakeLists.txt @@ -4,8 +4,10 @@ project (XMLConverter) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) # Generate Protobuf -INCLUDE(FindProtobuf) -ADD_SUBDIRECTORY(proto) +FIND_PACKAGE(Protobuf REQUIRED) +INCLUDE_DIRECTORIES(${PROTOBUF_INCLUDE_DIR}) +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) +PROTOBUF_GENERATE_CPP(PROTO_SRC PROTO_HEADER proto/waypoint.proto) # Name Output File set(TARGET_NAME xml_converter) @@ -15,10 +17,10 @@ file(GLOB_RECURSE SOURCES "src/*.cpp") # Set output as executable. # TODO: This will eventually become a library when it gets integrated into burrito. -add_executable (${TARGET_NAME} ${SOURCES}) +add_executable (${TARGET_NAME} ${SOURCES} ${PROTO_SRC}) # include libraies -target_link_libraries(${TARGET_NAME} proto ${Protobuf_LIBRARIES}) +target_link_libraries(${TARGET_NAME} ${Protobuf_LIBRARIES}) # Require C++ 17 or newer. target_compile_features(${TARGET_NAME} PRIVATE cxx_std_17) diff --git a/xml_converter/proto/CMakeLists.txt b/xml_converter/proto/CMakeLists.txt deleted file mode 100644 index 9331e8a4..00000000 --- a/xml_converter/proto/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -INCLUDE(FindProtobuf) -FIND_PACKAGE(Protobuf REQUIRED) -INCLUDE_DIRECTORIES(${PROTOBUF_INCLUDE_DIR}) -PROTOBUF_GENERATE_CPP(PROTO_SRC PROTO_HEADER waypoint.proto) -ADD_LIBRARY(proto ${PROTO_HEADER} ${PROTO_SRC}) - -add_custom_command(TARGET proto PRE_BUILD - COMMAND ${CMAKE_COMMAND} -E copy ${PROTO_HEADER} ${PROTO_SRC} ../../src) - -add_custom_command(TARGET proto POST_BUILD - COMMAND ${CMAKE_COMMAND} -E rm ${PROTO_HEADER} ${PROTO_SRC}) From fc44ab9245b73d01e1fc9af6b7fd6d424034fca0 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sat, 19 Nov 2022 10:31:09 -0600 Subject: [PATCH 114/539] adding clang-format requirements to the presubmit --- third_party/iwyu_tool.py | 525 ++++++++++++++++++ xml_converter/.clang-format | 166 ++++++ xml_converter/generators/presubmit.sh | 15 +- xml_converter/presubmit.sh | 63 ++- xml_converter/src/attribute/bool.cpp | 2 +- xml_converter/src/attribute/bool.hpp | 2 +- xml_converter/src/attribute/color.cpp | 2 +- xml_converter/src/attribute/color.hpp | 2 +- .../src/attribute/cull_chirality_gen.cpp | 6 +- .../src/attribute/cull_chirality_gen.hpp | 4 +- .../src/attribute/euler_rotation_gen.cpp | 20 +- .../src/attribute/euler_rotation_gen.hpp | 8 +- .../src/attribute/festival_filter_gen.cpp | 52 +- .../src/attribute/festival_filter_gen.hpp | 8 +- xml_converter/src/attribute/float.cpp | 8 +- xml_converter/src/attribute/float.hpp | 2 +- xml_converter/src/attribute/image.cpp | 2 +- xml_converter/src/attribute/image.hpp | 2 +- xml_converter/src/attribute/int.cpp | 6 +- xml_converter/src/attribute/int.hpp | 2 +- .../src/attribute/map_type_filter_gen.cpp | 152 ++--- .../src/attribute/map_type_filter_gen.hpp | 8 +- .../src/attribute/marker_category.cpp | 2 +- .../src/attribute/marker_category.hpp | 2 +- .../src/attribute/mount_filter_gen.cpp | 68 +-- .../src/attribute/mount_filter_gen.hpp | 8 +- xml_converter/src/attribute/position_gen.cpp | 16 +- xml_converter/src/attribute/position_gen.hpp | 8 +- .../src/attribute/profession_filter_gen.cpp | 62 +-- .../src/attribute/profession_filter_gen.hpp | 8 +- .../src/attribute/reset_behavior_gen.cpp | 6 +- .../src/attribute/reset_behavior_gen.hpp | 4 +- .../attribute/specialization_filter_gen.cpp | 478 ++++++++-------- .../attribute/specialization_filter_gen.hpp | 8 +- .../src/attribute/species_filter_gen.cpp | 40 +- .../src/attribute/species_filter_gen.hpp | 8 +- xml_converter/src/attribute/string.cpp | 2 +- xml_converter/src/attribute/string.hpp | 2 +- xml_converter/src/attribute/trail_data.cpp | 2 +- xml_converter/src/attribute/trail_data.hpp | 2 +- .../src/attribute/trail_data_map_id.cpp | 2 +- .../src/attribute/trail_data_map_id.hpp | 2 +- xml_converter/src/attribute/unique_id.cpp | 2 +- xml_converter/src/attribute/unique_id.hpp | 2 +- xml_converter/src/category_gen.cpp | 33 +- xml_converter/src/category_gen.hpp | 46 +- xml_converter/src/function_timers.cpp | 8 +- xml_converter/src/function_timers.hpp | 11 +- xml_converter/src/icon_gen.cpp | 24 +- xml_converter/src/icon_gen.hpp | 232 ++++---- xml_converter/src/parseable.cpp | 8 +- xml_converter/src/parseable.hpp | 4 +- xml_converter/src/rapid_helpers.cpp | 27 +- xml_converter/src/rapid_helpers.hpp | 9 +- xml_converter/src/string_helper.cpp | 24 +- xml_converter/src/trail_gen.cpp | 10 +- xml_converter/src/trail_gen.hpp | 127 ++--- xml_converter/src/xml_converter.cpp | 33 +- 58 files changed, 1570 insertions(+), 817 deletions(-) create mode 100755 third_party/iwyu_tool.py create mode 100644 xml_converter/.clang-format diff --git a/third_party/iwyu_tool.py b/third_party/iwyu_tool.py new file mode 100755 index 00000000..c9c95c92 --- /dev/null +++ b/third_party/iwyu_tool.py @@ -0,0 +1,525 @@ +#!/usr/bin/env python + +##===--- iwyu_tool.py -----------------------------------------------------===## +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +##===----------------------------------------------------------------------===## + +""" Driver to consume a Clang compilation database and invoke IWYU. + +Example usage with CMake: + + # Unix systems + $ mkdir build && cd build + $ CC="clang" CXX="clang++" cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ... + $ iwyu_tool.py -p . + + # Windows systems + $ mkdir build && cd build + $ cmake -DCMAKE_CXX_COMPILER="%VCINSTALLDIR%/bin/cl.exe" \ + -DCMAKE_C_COMPILER="%VCINSTALLDIR%/VC/bin/cl.exe" \ + -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ + -G Ninja ... + $ python iwyu_tool.py -p . + +See iwyu_tool.py -h for more details on command-line arguments. +""" +from __future__ import print_function +import os +import re +import sys +import json +import time +import shlex +import argparse +import tempfile +import subprocess + + +CORRECT_RE = re.compile(r'^\((.*?) has correct #includes/fwd-decls\)$') +SHOULD_ADD_RE = re.compile(r'^(.*?) should add these lines:$') +ADD_RE = re.compile('^(.*?) +// (.*)$') +SHOULD_REMOVE_RE = re.compile(r'^(.*?) should remove these lines:$') +FULL_LIST_RE = re.compile(r'The full include-list for (.*?):$') +END_RE = re.compile(r'^---$') +LINES_RE = re.compile(r'^- (.*?) // lines ([0-9]+)-[0-9]+$') + + +GENERAL, ADD, REMOVE, LIST = range(4) + + +def clang_formatter(output): + """ Process iwyu's output into something clang-like. """ + formatted = [] + + state = (GENERAL, None) + for line in output.splitlines(): + match = CORRECT_RE.match(line) + if match: + formatted.append('%s:1:1: note: #includes/fwd-decls are correct' % + match.groups(1)) + continue + match = SHOULD_ADD_RE.match(line) + if match: + state = (ADD, match.group(1)) + continue + match = SHOULD_REMOVE_RE.match(line) + if match: + state = (REMOVE, match.group(1)) + continue + match = FULL_LIST_RE.match(line) + if match: + state = (LIST, match.group(1)) + elif END_RE.match(line): + state = (GENERAL, None) + elif not line.strip(): + continue + elif state[0] == GENERAL: + formatted.append(line) + elif state[0] == ADD: + match = ADD_RE.match(line) + if match: + formatted.append("%s:1:1: error: add '%s' (%s)" % + (state[1], match.group(1), match.group(2))) + else: + formatted.append("%s:1:1: error: add '%s'" % (state[1], line)) + elif state[0] == REMOVE: + match = LINES_RE.match(line) + line_no = match.group(2) if match else '1' + formatted.append("%s:%s:1: error: superfluous '%s'" % + (state[1], line_no, match.group(1))) + + return os.linesep.join(formatted) + + +def quiet_formatter(output): + """ Process iwyu's output to hide excessive newlines and successes""" + formatted = [] + allow_empty_line = False + + for line in output.splitlines(): + if len(line) == 0: + if allow_empty_line: + allow_empty_line = False + formatted.append("") + continue + match = CORRECT_RE.match(line) + if match: + continue + formatted.append(line) + allow_empty_line = True + + return os.linesep.join(formatted) + + +DEFAULT_FORMAT = 'iwyu' +FORMATTERS = { + 'iwyu': lambda output: output, + 'clang': clang_formatter, + 'quiet': quiet_formatter, +} + + +if sys.platform.startswith('win'): + # Case-insensitive match on Windows + def normcase(s): + return s.lower() +else: + def normcase(s): + return s + + +def is_subpath_of(path, parent): + """ Return True if path is equal to or fully contained within parent. + + Assumes both paths are canonicalized with os.path.realpath. + """ + parent = normcase(parent) + path = normcase(path) + + if path == parent: + return True + + if not path.startswith(parent): + return False + + # Now we know parent is a prefix of path, but they only share lineage if the + # difference between them starts with a path separator, e.g. /a/b/c/file + # is not a parent of /a/b/c/file.cpp, but /a/b/c and /a/b/c/ are. + parent = parent.rstrip(os.path.sep) + suffix = path[len(parent):] + return suffix.startswith(os.path.sep) + + +def is_msvc_driver(compile_command): + """ Return True if compile_command matches an MSVC CL-style driver. """ + compile_command = normcase(compile_command) + + if compile_command.endswith('cl.exe'): + # Native MSVC compiler or clang-cl.exe + return True + + if compile_command.endswith('clang-cl'): + # Cross clang-cl on non-Windows + return True + + return False + + +def win_split(cmdline): + """ Minimal implementation of shlex.split for Windows following + https://msdn.microsoft.com/en-us/library/windows/desktop/17w5ykft.aspx. + """ + def split_iter(cmdline): + in_quotes = False + backslashes = 0 + arg = '' + for c in cmdline: + if c == '\\': + # MSDN: Backslashes are interpreted literally, unless they + # immediately precede a double quotation mark. + # Buffer them until we know what comes next. + backslashes += 1 + elif c == '"': + # Quotes can either be an escaped quote or the start of a quoted + # string. Paraphrasing MSDN: + # Before quotes, place one backslash in the arg for every pair + # of leading backslashes. If the number of backslashes is odd, + # retain the double quotation mark, otherwise interpret it as a + # string delimiter and switch state. + arg += '\\' * (backslashes // 2) + if backslashes % 2 == 1: + arg += c + else: + in_quotes = not in_quotes + backslashes = 0 + elif c in (' ', '\t') and not in_quotes: + # MSDN: Arguments are delimited by white space, which is either + # a space or a tab [but only outside of a string]. + # Flush backslashes and return arg bufferd so far, unless empty. + arg += '\\' * backslashes + if arg: + yield arg + arg = '' + backslashes = 0 + else: + # Flush buffered backslashes and append. + arg += '\\' * backslashes + arg += c + backslashes = 0 + + if arg: + arg += '\\' * backslashes + yield arg + + return list(split_iter(cmdline)) + + +def split_command(cmdstr): + """ Split a command string into a list, respecting shell quoting. """ + if sys.platform.startswith('win'): + # shlex.split does not work for Windows command-lines, so special-case + # to our own implementation. + cmd = win_split(cmdstr) + else: + cmd = shlex.split(cmdstr) + + return cmd + + +def find_include_what_you_use(): + """ Find IWYU executable and return its full pathname. """ + if 'IWYU_BINARY' in os.environ: + return os.environ.get('IWYU_BINARY') + + # TODO: Investigate using shutil.which when Python 2 has passed away. + executable_name = 'include-what-you-use' + if sys.platform.startswith('win'): + executable_name += '.exe' + + search_path = [os.path.dirname(__file__)] + search_path += os.environ.get('PATH', '').split(os.pathsep) + + for dirpath in search_path: + full = os.path.join(dirpath, executable_name) + if os.path.isfile(full): + return os.path.realpath(full) + + return None + + +IWYU_EXECUTABLE = find_include_what_you_use() + + +class Process(object): + """ Manages an IWYU process in flight """ + def __init__(self, proc, outfile): + self.proc = proc + self.outfile = outfile + self.output = None + + def poll(self): + """ Return the exit code if the process has completed, None otherwise. + """ + return self.proc.poll() + + @property + def returncode(self): + return self.proc.returncode + + def get_output(self): + """ Return stdout+stderr output of the process. + + This call blocks until the process is complete, then returns the output. + """ + if not self.output: + self.proc.wait() + self.outfile.seek(0) + self.output = self.outfile.read().decode("utf-8") + self.outfile.close() + + return self.output + + @classmethod + def start(cls, invocation): + """ Start a Process for the invocation and capture stdout+stderr. """ + outfile = tempfile.TemporaryFile(prefix='iwyu') + process = subprocess.Popen( + invocation.command, + cwd=invocation.cwd, + stdout=outfile, + stderr=subprocess.STDOUT) + return cls(process, outfile) + + +KNOWN_COMPILER_WRAPPERS=frozenset([ + "ccache" +]) + + +class Invocation(object): + """ Holds arguments of an IWYU invocation. """ + def __init__(self, command, cwd): + self.command = command + self.cwd = cwd + + def __str__(self): + return ' '.join(self.command) + + @classmethod + def from_compile_command(cls, entry, extra_args): + """ Parse a JSON compilation database entry into new Invocation. """ + if 'arguments' in entry: + # arguments is a command-line in list form. + command = entry['arguments'] + elif 'command' in entry: + # command is a command-line in string form, split to list. + command = split_command(entry['command']) + else: + raise ValueError('Invalid compilation database entry: %s' % entry) + + if command[0] in KNOWN_COMPILER_WRAPPERS: + # Remove the compiler wrapper from the command. + command = command[1:] + + # Rewrite the compile command for IWYU + compile_command, compile_args = command[0], command[1:] + if is_msvc_driver(compile_command): + # If the compiler is cl-compatible, let IWYU be cl-compatible. + extra_args = ['--driver-mode=cl'] + extra_args + + command = [IWYU_EXECUTABLE] + extra_args + compile_args + return cls(command, entry['directory']) + + def start(self, verbose): + """ Run invocation and collect output. """ + if verbose: + print('# %s' % self, file=sys.stderr) + + return Process.start(self) + + +def fixup_compilation_db(compilation_db): + """ Canonicalize paths in JSON compilation database. """ + for entry in compilation_db: + # Convert relative paths to absolute ones if possible, based on the entry's directory. + if 'directory' in entry and not os.path.isabs(entry['file']): + entry['file'] = os.path.join(entry['directory'], entry['file']) + + # Expand relative paths and symlinks + entry['file'] = os.path.realpath(entry['file']) + + return compilation_db + + +def slice_compilation_db(compilation_db, selection): + """ Return a new compilation database reduced to the paths in selection. """ + if not selection: + return compilation_db + + # Canonicalize selection paths to match compilation database. + selection = [os.path.realpath(p) for p in selection] + + new_db = [] + for path in selection: + if not os.path.exists(path): + print('warning: \'%s\' not found on disk.' % path, file=sys.stderr) + continue + + found = [e for e in compilation_db if is_subpath_of(e['file'], path)] + if not found: + print('warning: \'%s\' not found in compilation database.' % path, + file=sys.stderr) + continue + + new_db.extend(found) + + return new_db + + +def execute(invocations, verbose, formatter, jobs, max_load_average=0): + """ Launch processes described by invocations. """ + exit_code = 0 + if jobs == 1: + for invocation in invocations: + proc = invocation.start(verbose) + output = formatter(proc.get_output()) + if len(output) > 0: + print(output) + exit_code = max(exit_code, proc.returncode) + return exit_code + + pending = [] + while invocations or pending: + # Collect completed IWYU processes and print results. + complete = [proc for proc in pending if proc.poll() is not None] + for proc in complete: + pending.remove(proc) + output = formatter(proc.get_output()) + if len(output) > 0: + print(output) + exit_code = max(exit_code, proc.returncode) + + # Schedule new processes if there's room. + capacity = jobs - len(pending) + + if max_load_average > 0: + one_min_load_average, _, _ = os.getloadavg() + load_capacity = max_load_average - one_min_load_average + if load_capacity < 0: + load_capacity = 0 + if load_capacity < capacity: + capacity = int(load_capacity) + if not capacity and not pending: + # Ensure there is at least one job running. + capacity = 1 + + pending.extend(i.start(verbose) for i in invocations[:capacity]) + invocations = invocations[capacity:] + + # Yield CPU. + time.sleep(0.0001) + return exit_code + + +def main(compilation_db_path, source_files, verbose, formatter, jobs, + max_load_average, extra_args): + """ Entry point. """ + + if not IWYU_EXECUTABLE: + print('error: include-what-you-use executable not found', + file=sys.stderr) + return 1 + + try: + if os.path.isdir(compilation_db_path): + compilation_db_path = os.path.join(compilation_db_path, + 'compile_commands.json') + + # Read compilation db from disk. + compilation_db_path = os.path.realpath(compilation_db_path) + with open(compilation_db_path, 'r') as fileobj: + compilation_db = json.load(fileobj) + except IOError as why: + print('error: failed to parse compilation database: %s' % why, + file=sys.stderr) + return 1 + + compilation_db = fixup_compilation_db(compilation_db) + compilation_db = slice_compilation_db(compilation_db, source_files) + + # Transform compilation db entries into a list of IWYU invocations. + invocations = [ + Invocation.from_compile_command(e, extra_args) for e in compilation_db + ] + + return execute(invocations, verbose, formatter, jobs, max_load_average) + + +def _bootstrap(sys_argv): + """ Parse arguments and dispatch to main(). """ + + # This hackery is necessary to add the forwarded IWYU args to the + # usage and help strings. + def customize_usage(parser): + """ Rewrite the parser's format_usage. """ + original_format_usage = parser.format_usage + parser.format_usage = lambda: original_format_usage().rstrip() + \ + ' -- []' + os.linesep + + def customize_help(parser): + """ Rewrite the parser's format_help. """ + original_format_help = parser.format_help + + def custom_help(): + """ Customized help string, calls the adjusted format_usage. """ + helpmsg = original_format_help() + helplines = helpmsg.splitlines() + helplines[0] = parser.format_usage().rstrip() + return os.linesep.join(helplines) + os.linesep + + parser.format_help = custom_help + + # Parse arguments. + parser = argparse.ArgumentParser( + description='Include-what-you-use compilation database driver.', + epilog='Assumes include-what-you-use is available on the PATH.') + customize_usage(parser) + customize_help(parser) + + parser.add_argument('-v', '--verbose', action='store_true', + help='Print IWYU commands') + parser.add_argument('-o', '--output-format', type=str, + choices=FORMATTERS.keys(), default=DEFAULT_FORMAT, + help='Output format (default: %s)' % DEFAULT_FORMAT) + parser.add_argument('-j', '--jobs', type=int, default=1, + help='Number of concurrent subprocesses') + parser.add_argument('-l', '--load', type=float, default=0, + help='Do not start new jobs if the 1min load average is greater than the provided value') + parser.add_argument('-p', metavar='', required=True, + help='Compilation database path', dest='dbpath') + parser.add_argument('source', nargs='*', + help=('Zero or more source files (or directories) to ' + 'run IWYU on. Defaults to all in compilation ' + 'database.')) + + def partition_args(argv): + """ Split around '--' into driver args and IWYU args. """ + try: + double_dash = argv.index('--') + return argv[:double_dash], argv[double_dash+1:] + except ValueError: + return argv, [] + argv, extra_args = partition_args(sys_argv[1:]) + args = parser.parse_args(argv) + + return main(args.dbpath, args.source, args.verbose, + FORMATTERS[args.output_format], args.jobs, args.load, extra_args) + + +if __name__ == '__main__': + sys.exit(_bootstrap(sys.argv)) diff --git a/xml_converter/.clang-format b/xml_converter/.clang-format new file mode 100644 index 00000000..71dc1ff2 --- /dev/null +++ b/xml_converter/.clang-format @@ -0,0 +1,166 @@ +--- +Language: Cpp # Validate C++ +# BasedOnStyle: Google +AccessModifierOffset: -3 # With a tab indent of 4 spaces this equals a 1 space access modifier indent +AlignAfterOpenBracket: AlwaysBreak # Should be `BlockIndent` when it begins to work +AlignConsecutiveMacros: false +AlignConsecutiveAssignments: false +AlignConsecutiveDeclarations: false +AlignEscapedNewlines: DontAlign +AlignOperands: true +AlignTrailingComments: false +AllowAllArgumentsOnNextLine: true +AllowAllConstructorInitializersOnNextLine: true # V +AllowAllParametersOfDeclarationOnNextLine: true # V +AllowShortBlocksOnASingleLine: Never # V +AllowShortCaseLabelsOnASingleLine: false +AllowShortFunctionsOnASingleLine: None +AllowShortLambdasOnASingleLine: All +AllowShortIfStatementsOnASingleLine: WithoutElse +AllowShortLoopsOnASingleLine: true +AlwaysBreakAfterDefinitionReturnType: None +AlwaysBreakAfterReturnType: None +AlwaysBreakBeforeMultilineStrings: true +AlwaysBreakTemplateDeclarations: Yes +BinPackArguments: false # Dont binpack anything +BinPackParameters: false # Dont binpack anything +BraceWrapping: + AfterCaseLabel: false # Keep the open brace on the same line as the label + AfterClass: false # Keep the open brace on the same line as the class + AfterControlStatement: false + AfterEnum: false # V + AfterFunction: false # V + AfterNamespace: false # V + AfterObjCDeclaration: false + AfterStruct: false # V + AfterUnion: false # V + AfterExternBlock: false # V + BeforeCatch: true # V + BeforeElse: true # V + IndentBraces: false + SplitEmptyFunction: true + SplitEmptyRecord: true + SplitEmptyNamespace: true +BreakBeforeBraces: Custom +BreakBeforeInheritanceComma: false +BreakInheritanceList: BeforeColon +BreakBeforeTernaryOperators: true +BreakConstructorInitializersBeforeComma: false +BreakConstructorInitializers: BeforeColon +BreakAfterJavaFieldAnnotations: false +BreakStringLiterals: true +ColumnLimit: 0 # Line break auto-formatting is very difficult. Ignoring it for now +CommentPragmas: '^ IWYU pragma:' +CompactNamespaces: false +ConstructorInitializerAllOnOneLineOrOnePerLine: true +ConstructorInitializerIndentWidth: 4 +ContinuationIndentWidth: 4 +Cpp11BracedListStyle: true +DeriveLineEnding: true +DerivePointerAlignment: true +DisableFormat: false +ExperimentalAutoDetectBinPacking: false +FixNamespaceComments: true +ForEachMacros: + - foreach + - Q_FOREACH + - BOOST_FOREACH +IncludeBlocks: Regroup +IncludeCategories: + - Regex: '^' + Priority: 2 + SortPriority: 0 + - Regex: '^<.*\.h>' + Priority: 1 + SortPriority: 0 + - Regex: '^<.*' + Priority: 2 + SortPriority: 0 + - Regex: '.*' + Priority: 3 + SortPriority: 0 +IncludeIsMainRegex: '([-_](test|unittest))?$' +IncludeIsMainSourceRegex: '' +IndentCaseLabels: true +IndentGotoLabels: true +IndentPPDirectives: None +IndentWidth: 4 # Use 4 spaces for an indent +IndentWrappedFunctionNames: false +JavaScriptQuotes: Leave +JavaScriptWrapImports: true +KeepEmptyLinesAtTheStartOfBlocks: false +MacroBlockBegin: '' +MacroBlockEnd: '' +MaxEmptyLinesToKeep: 1 +NamespaceIndentation: None +ObjCBinPackProtocolList: Never +ObjCBlockIndentWidth: 2 +ObjCSpaceAfterProperty: false +ObjCSpaceBeforeProtocolList: true +PenaltyBreakAssignment: 99999 +PenaltyBreakBeforeFirstCallParameter: 1 +PenaltyBreakComment: 300 +PenaltyBreakFirstLessLess: 120 +PenaltyBreakString: 1000 +PenaltyBreakTemplateDeclaration: 10 +PenaltyExcessCharacter: 1 # 1000000 +PenaltyReturnTypeOnItsOwnLine: 200 +PointerAlignment: Left +RawStringFormats: + - Language: Cpp + Delimiters: + - cc + - CC + - cpp + - Cpp + - CPP + - 'c++' + - 'C++' + CanonicalDelimiter: '' + BasedOnStyle: google + - Language: TextProto + Delimiters: + - pb + - PB + - proto + - PROTO + EnclosingFunctions: + - EqualsProto + - EquivToProto + - PARSE_PARTIAL_TEXT_PROTO + - PARSE_TEST_PROTO + - PARSE_TEXT_PROTO + - ParseTextOrDie + - ParseTextProtoOrDie + CanonicalDelimiter: '' + BasedOnStyle: google +ReflowComments: true +SortIncludes: true +SortUsingDeclarations: true +SpaceAfterCStyleCast: false +SpaceAfterLogicalNot: false +SpaceAfterTemplateKeyword: true +SpaceBeforeAssignmentOperators: true +SpaceBeforeCpp11BracedList: false +SpaceBeforeCtorInitializerColon: true +SpaceBeforeInheritanceColon: true +SpaceBeforeParens: ControlStatements +SpaceBeforeRangeBasedForLoopColon: true +SpaceInEmptyBlock: false +SpaceInEmptyParentheses: false +SpacesBeforeTrailingComments: 2 +SpacesInAngles: false +SpacesInConditionalStatement: false +SpacesInContainerLiterals: true +SpacesInCStyleCastParentheses: false +SpacesInParentheses: false +SpacesInSquareBrackets: false +SpaceBeforeSquareBrackets: false +Standard: Auto +StatementMacros: + - Q_UNUSED + - QT_REQUIRE_VERSION +TabWidth: 8 +UseCRLF: false +UseTab: Never +... diff --git a/xml_converter/generators/presubmit.sh b/xml_converter/generators/presubmit.sh index 478b2233..a7b5e1cc 100755 --- a/xml_converter/generators/presubmit.sh +++ b/xml_converter/generators/presubmit.sh @@ -1,11 +1,24 @@ #!/bin/bash +error_count=0 + source ./venv/bin/activate readarray -d '' FILES < <(find . -type f -name "*.py" -not -path "*/venv/*" -print0) # Lint Python Files flake8 --ignore=E501,E266,W503 "${FILES[@]}" +if (( $? > 0 )); then + echo "Flake8 Error" + error_count=`expr $error_count + 1` +fi # Type Check Python Files -mypy --strict "${FILES[@]}" \ No newline at end of file +mypy --strict "${FILES[@]}" +if (( $? > 0 )); then + echo "mypy error" + error_count=`expr $error_count + 1` +fi + + +exit $error_count diff --git a/xml_converter/presubmit.sh b/xml_converter/presubmit.sh index 0f483dbc..a6750061 100755 --- a/xml_converter/presubmit.sh +++ b/xml_converter/presubmit.sh @@ -1,14 +1,67 @@ #!/bin/bash -cpplint --quiet --recursive --exclude="src/rapidxml-1.13" --filter=-whitespace/newline,-whitespace/line_length,-readability/braces,-legal/copyright,-build/namespaces,-readability/casting,-build/c++11 src/ -# TODO: remove readability/casting from the filter. It was temporarily added -# because the changes required would need testing unfitting of the original -# style check update commit. +error_count=0 + +# Run cpplint +filters="" + # Automated line length restrictions often cause more pain then they solve. + # Lines should be kept in check via code review. + filters+="-whitespace/line_length," + # These two are just wrong brace styling, fight me. + filters+="-readability/braces," + filters+="-whitespace/newline," + # Copyright is handled on the repo level. + # An argument could be made this should be uncommented. + filters+="-legal/copyright," + # This is probably a good thing to have but there is no way to only allow + # `using namespace std` in `.cpp` files. So we are allowing it everywhere + # hoping that iwyu makes it annoying to use it in header files. + # An argument could be made that this should be uncommented. + filters+="-build/namespaces," + # Something like this is useful but the error message should say + # "issue number" not "username". There is no clear method for how that could + # be changed use it right now + filters+="-readability/todo," + # We do not have the same library usage restrictions in C++11 as Google so ignore them + filters+="-build/c++11," + +cpplint --quiet --recursive --exclude="src/rapidxml-1.13" --filter=${filters} src/ +if (( $? > 0 )); then + error_count=`expr $error_count + 1` +fi # Run Include What You Use -iwyu_tool -p . +# +# We have 2 sed filters here, they could be combined but they are split for clarity +# The first one removes all blank lines +# The second one removes all "everything is good" lines from iwyu +# +# TODO: When this or newer versions of iwyu_tool that carry over the exit codes +# from the include-what-you-use command calls are more widely standard this can +# be replaced with just a call to iwyu_tool instead. +../third_party/iwyu_tool.py -p . -o quiet +# include-what-you-use has a "success code" of 2 for a legacy reason. +if (( $? > 2 )); then + error_count=`expr $error_count + 1` +fi + + +# Validate that clang-format would make no changes +readarray -d '' FILES < <(find src/ -type f \( -name "*.cpp" -o -name "*.hpp" \) -not -path "*/rapidxml-1.13/*" -print0) +clang-format -Werror --dry-run -i "${FILES[@]}" +if (( $? > 0 )); then + error_count=`expr $error_count + 1` +fi + # Run the python presubmit for the "generators" subdirectory. pushd generators ./presubmit.sh +if (( $? > 0 )); then + error_count=`expr $error_count + 1` +fi popd + + + +exit $error_count diff --git a/xml_converter/src/attribute/bool.cpp b/xml_converter/src/attribute/bool.cpp index 92d03fe5..cc7409d0 100644 --- a/xml_converter/src/attribute/bool.cpp +++ b/xml_converter/src/attribute/bool.cpp @@ -16,7 +16,7 @@ using namespace std; // evaluated as `true`. 'false' or '0' are evaluated as `false`. Everything is // is also evaluated as false but appends an error to the errors vector. //////////////////////////////////////////////////////////////////////////////// -bool parse_bool(rapidxml::xml_attribute<>* input, vector *errors) { +bool parse_bool(rapidxml::xml_attribute<>* input, vector* errors) { if (get_attribute_value(input) == "0" || get_attribute_value(input) == "false") { return false; } diff --git a/xml_converter/src/attribute/bool.hpp b/xml_converter/src/attribute/bool.hpp index 5433ed9a..bd917c5f 100644 --- a/xml_converter/src/attribute/bool.hpp +++ b/xml_converter/src/attribute/bool.hpp @@ -7,6 +7,6 @@ class XMLError; -bool parse_bool(rapidxml::xml_attribute<>* input, std::vector *errors); +bool parse_bool(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_bool(bool attribute_value); diff --git a/xml_converter/src/attribute/color.cpp b/xml_converter/src/attribute/color.cpp index 09ff843d..956c20f8 100644 --- a/xml_converter/src/attribute/color.cpp +++ b/xml_converter/src/attribute/color.cpp @@ -15,7 +15,7 @@ using namespace std; // Parses a Color from the value of a rapidxml::xml_attribute. // TODO(#98): Color should be saved in a better format then the raw hex string. //////////////////////////////////////////////////////////////////////////////// -Color parse_color(rapidxml::xml_attribute<>* input, vector *) { +Color parse_color(rapidxml::xml_attribute<>* input, vector*) { Color color; color.hex = get_attribute_value(input); return color; diff --git a/xml_converter/src/attribute/color.hpp b/xml_converter/src/attribute/color.hpp index 8f8ee0e4..1e44d6c2 100644 --- a/xml_converter/src/attribute/color.hpp +++ b/xml_converter/src/attribute/color.hpp @@ -12,6 +12,6 @@ class Color { std::string hex; }; -Color parse_color(rapidxml::xml_attribute<>* input, std::vector *errors); +Color parse_color(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_color(Color attribute_value); diff --git a/xml_converter/src/attribute/cull_chirality_gen.cpp b/xml_converter/src/attribute/cull_chirality_gen.cpp index 75a8e71d..5868a13d 100644 --- a/xml_converter/src/attribute/cull_chirality_gen.cpp +++ b/xml_converter/src/attribute/cull_chirality_gen.cpp @@ -10,7 +10,7 @@ using namespace std; -CullChirality parse_cull_chirality(rapidxml::xml_attribute<>* input, vector *errors){ +CullChirality parse_cull_chirality(rapidxml::xml_attribute<>* input, vector* errors) { CullChirality cull_chirality; string normalized_value = normalize(get_attribute_value(input)); if (normalized_value == "none") { @@ -29,7 +29,7 @@ CullChirality parse_cull_chirality(rapidxml::xml_attribute<>* input, vector* input, std::vector *errors); -std::string stringify_cull_chirality(CullChirality attribute_value); \ No newline at end of file +CullChirality parse_cull_chirality(rapidxml::xml_attribute<>* input, std::vector* errors); +std::string stringify_cull_chirality(CullChirality attribute_value); diff --git a/xml_converter/src/attribute/euler_rotation_gen.cpp b/xml_converter/src/attribute/euler_rotation_gen.cpp index 941ce3a3..f85be9c1 100644 --- a/xml_converter/src/attribute/euler_rotation_gen.cpp +++ b/xml_converter/src/attribute/euler_rotation_gen.cpp @@ -10,26 +10,26 @@ using namespace std; -EulerRotation parse_euler_rotation(rapidxml::xml_attribute<>* input, vector *){ +EulerRotation parse_euler_rotation(rapidxml::xml_attribute<>* input, vector*) { EulerRotation euler_rotation; vector compound_values; string attributename; euler_rotation.x_rotation = 0; euler_rotation.y_rotation = 0; - euler_rotation.z_rotation = 0; - attributename = get_attribute_name(input); + euler_rotation.z_rotation = 0; + attributename = get_attribute_name(input); compound_values = split(get_attribute_value(input), ","); - if (compound_values.size() == 3){ - euler_rotation.x_rotation = std::stof(compound_values[0]); - euler_rotation.y_rotation = std::stof(compound_values[1]); - euler_rotation.z_rotation = std::stof(compound_values[2]); + if (compound_values.size() == 3) { + euler_rotation.x_rotation = std::stof(compound_values[0]); + euler_rotation.y_rotation = std::stof(compound_values[1]); + euler_rotation.z_rotation = std::stof(compound_values[2]); } return euler_rotation; } -string stringify_euler_rotation(EulerRotation attribute_value){ +string stringify_euler_rotation(EulerRotation attribute_value) { string output; output = to_string(attribute_value.x_rotation); output = output + "," + to_string(attribute_value.y_rotation); - output = output + "," + to_string(attribute_value.z_rotation); + output = output + "," + to_string(attribute_value.z_rotation); return output; -} \ No newline at end of file +} diff --git a/xml_converter/src/attribute/euler_rotation_gen.hpp b/xml_converter/src/attribute/euler_rotation_gen.hpp index 62092219..301dec7e 100644 --- a/xml_converter/src/attribute/euler_rotation_gen.hpp +++ b/xml_converter/src/attribute/euler_rotation_gen.hpp @@ -13,7 +13,9 @@ class EulerRotation { float y_rotation; float z_rotation; - virtual std::string classname() { return "EulerRotation"; }; + virtual std::string classname() { + return "EulerRotation"; + }; }; -EulerRotation parse_euler_rotation(rapidxml::xml_attribute<>* input, std::vector *errors); -std::string stringify_euler_rotation(EulerRotation attribute_value); \ No newline at end of file +EulerRotation parse_euler_rotation(rapidxml::xml_attribute<>* input, std::vector* errors); +std::string stringify_euler_rotation(EulerRotation attribute_value); diff --git a/xml_converter/src/attribute/festival_filter_gen.cpp b/xml_converter/src/attribute/festival_filter_gen.cpp index 60769ff5..5986d2ad 100644 --- a/xml_converter/src/attribute/festival_filter_gen.cpp +++ b/xml_converter/src/attribute/festival_filter_gen.cpp @@ -10,43 +10,43 @@ using namespace std; -FestivalFilter parse_festival_filter(rapidxml::xml_attribute<>* input, vector *errors){ +FestivalFilter parse_festival_filter(rapidxml::xml_attribute<>* input, vector* errors) { FestivalFilter festival_filter; vector flag_values; - flag_values = split(get_attribute_value(input), ","); - festival_filter.dragonbash = false; - festival_filter.festival_of_the_four_winds = false; - festival_filter.halloween = false; - festival_filter.lunar_new_year = false; - festival_filter.super_adventure_festival = false; - festival_filter.wintersday = false; + flag_values = split(get_attribute_value(input), ","); + festival_filter.dragonbash = false; + festival_filter.festival_of_the_four_winds = false; + festival_filter.halloween = false; + festival_filter.lunar_new_year = false; + festival_filter.super_adventure_festival = false; + festival_filter.wintersday = false; festival_filter.none = false; - + for (string flag_value : flag_values) { string normalized_flag_value = normalize(flag_value); if (normalized_flag_value == "dragonbash") { - festival_filter.dragonbash = true; + festival_filter.dragonbash = true; } else if (normalized_flag_value == "festivalofthefourwinds") { - festival_filter.festival_of_the_four_winds = true; + festival_filter.festival_of_the_four_winds = true; } else if (normalized_flag_value == "halloween") { - festival_filter.halloween = true; + festival_filter.halloween = true; } else if (normalized_flag_value == "lunarnewyear") { - festival_filter.lunar_new_year = true; + festival_filter.lunar_new_year = true; } else if (normalized_flag_value == "superadventurefestival") { - festival_filter.super_adventure_festival = true; + festival_filter.super_adventure_festival = true; } else if (normalized_flag_value == "superadventurebox") { - festival_filter.super_adventure_festival = true; + festival_filter.super_adventure_festival = true; } else if (normalized_flag_value == "wintersday") { - festival_filter.wintersday = true; + festival_filter.wintersday = true; } else if (normalized_flag_value == "none") { - festival_filter.none = true; + festival_filter.none = true; } else { errors->push_back(new XMLAttributeValueError("Invalid Filter for FestivalFilter. Found " + flag_value, input)); @@ -56,28 +56,28 @@ FestivalFilter parse_festival_filter(rapidxml::xml_attribute<>* input, vector* input, std::vector *errors); -std::string stringify_festival_filter(FestivalFilter attribute_value); \ No newline at end of file +FestivalFilter parse_festival_filter(rapidxml::xml_attribute<>* input, std::vector* errors); +std::string stringify_festival_filter(FestivalFilter attribute_value); diff --git a/xml_converter/src/attribute/float.cpp b/xml_converter/src/attribute/float.cpp index 964faa16..7a3a91cd 100644 --- a/xml_converter/src/attribute/float.cpp +++ b/xml_converter/src/attribute/float.cpp @@ -1,7 +1,8 @@ #include "float.hpp" -#include -#include +#include +#include + #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" @@ -10,11 +11,10 @@ // // Parses a float from the value of a rapidxml::xml_attribute. //////////////////////////////////////////////////////////////////////////////// -float parse_float(rapidxml::xml_attribute<>* input, std::vector *) { +float parse_float(rapidxml::xml_attribute<>* input, std::vector*) { return std::stof(get_attribute_value(input)); } - //////////////////////////////////////////////////////////////////////////////// // stringify_float // diff --git a/xml_converter/src/attribute/float.hpp b/xml_converter/src/attribute/float.hpp index 8cce8226..b2e9cfe5 100644 --- a/xml_converter/src/attribute/float.hpp +++ b/xml_converter/src/attribute/float.hpp @@ -7,6 +7,6 @@ class XMLError; -float parse_float(rapidxml::xml_attribute<>* input, std::vector *errors); +float parse_float(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_float(float attribute_value); diff --git a/xml_converter/src/attribute/image.cpp b/xml_converter/src/attribute/image.cpp index 142e5dde..7136d7a0 100644 --- a/xml_converter/src/attribute/image.cpp +++ b/xml_converter/src/attribute/image.cpp @@ -14,7 +14,7 @@ using namespace std; // // Parses the path to an image from the value of a rapidxml::xml_attribute. //////////////////////////////////////////////////////////////////////////////// -Image parse_image(rapidxml::xml_attribute<>* input, vector *) { +Image parse_image(rapidxml::xml_attribute<>* input, vector*) { Image image; image.path = get_attribute_value(input); image.original_token = input; diff --git a/xml_converter/src/attribute/image.hpp b/xml_converter/src/attribute/image.hpp index 1404efb3..b0814213 100644 --- a/xml_converter/src/attribute/image.hpp +++ b/xml_converter/src/attribute/image.hpp @@ -13,6 +13,6 @@ class Image { rapidxml::xml_attribute<>* original_token; }; -Image parse_image(rapidxml::xml_attribute<>* input, std::vector *errors); +Image parse_image(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_image(Image attribute_value); diff --git a/xml_converter/src/attribute/int.cpp b/xml_converter/src/attribute/int.cpp index 46d1568f..cb605abb 100644 --- a/xml_converter/src/attribute/int.cpp +++ b/xml_converter/src/attribute/int.cpp @@ -10,18 +10,17 @@ using namespace std; - //////////////////////////////////////////////////////////////////////////////// // parse_int // // Parses an int from the value of a rapidxml::xml_attribute. Adds an error // if the value cannot be parsed properly. //////////////////////////////////////////////////////////////////////////////// -int parse_int(rapidxml::xml_attribute<>* input, vector *errors) { +int parse_int(rapidxml::xml_attribute<>* input, vector* errors) { try { return stoi(get_attribute_value(input)); } - catch(std::invalid_argument const& exception) { + catch (std::invalid_argument const& exception) { errors->push_back(new XMLAttributeValueError("Invalid integer value", input)); return 0; } @@ -33,7 +32,6 @@ int parse_int(rapidxml::xml_attribute<>* input, vector *errors) { // } } - //////////////////////////////////////////////////////////////////////////////// // stringify_int // diff --git a/xml_converter/src/attribute/int.hpp b/xml_converter/src/attribute/int.hpp index b0d8dae1..680d7160 100644 --- a/xml_converter/src/attribute/int.hpp +++ b/xml_converter/src/attribute/int.hpp @@ -7,6 +7,6 @@ class XMLError; -int parse_int(rapidxml::xml_attribute<>* input, std::vector *errors); +int parse_int(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_int(int attribute_value); diff --git a/xml_converter/src/attribute/map_type_filter_gen.cpp b/xml_converter/src/attribute/map_type_filter_gen.cpp index c099112e..90138800 100644 --- a/xml_converter/src/attribute/map_type_filter_gen.cpp +++ b/xml_converter/src/attribute/map_type_filter_gen.cpp @@ -10,108 +10,108 @@ using namespace std; -MapTypeFilter parse_map_type_filter(rapidxml::xml_attribute<>* input, vector *errors){ +MapTypeFilter parse_map_type_filter(rapidxml::xml_attribute<>* input, vector* errors) { MapTypeFilter map_type_filter; vector flag_values; - flag_values = split(get_attribute_value(input), ","); - map_type_filter.unknown_map = false; - map_type_filter.redirect_map = false; - map_type_filter.character_create_map = false; - map_type_filter.pvp_map = false; - map_type_filter.gvg_map = false; - map_type_filter.instance_map = false; - map_type_filter.public_map = false; - map_type_filter.tournament_map = false; - map_type_filter.tutorial_map = false; - map_type_filter.user_tournament_map = false; - map_type_filter.center_map = false; - map_type_filter.eternal_battlegrounds_map = false; - map_type_filter.bluehome_map = false; - map_type_filter.blue_borderlands_map = false; - map_type_filter.green_home_map = false; - map_type_filter.green_borderlands_map = false; - map_type_filter.red_home_map = false; - map_type_filter.red_borderlands_map = false; - map_type_filter.fortunes_vale_map = false; - map_type_filter.jump_puzzle_map = false; - map_type_filter.obsidian_sanctum_map = false; - map_type_filter.edge_of_the_mists_map = false; - map_type_filter.public_mini_map = false; + flag_values = split(get_attribute_value(input), ","); + map_type_filter.unknown_map = false; + map_type_filter.redirect_map = false; + map_type_filter.character_create_map = false; + map_type_filter.pvp_map = false; + map_type_filter.gvg_map = false; + map_type_filter.instance_map = false; + map_type_filter.public_map = false; + map_type_filter.tournament_map = false; + map_type_filter.tutorial_map = false; + map_type_filter.user_tournament_map = false; + map_type_filter.center_map = false; + map_type_filter.eternal_battlegrounds_map = false; + map_type_filter.bluehome_map = false; + map_type_filter.blue_borderlands_map = false; + map_type_filter.green_home_map = false; + map_type_filter.green_borderlands_map = false; + map_type_filter.red_home_map = false; + map_type_filter.red_borderlands_map = false; + map_type_filter.fortunes_vale_map = false; + map_type_filter.jump_puzzle_map = false; + map_type_filter.obsidian_sanctum_map = false; + map_type_filter.edge_of_the_mists_map = false; + map_type_filter.public_mini_map = false; map_type_filter.wvw_lounge_map = false; - + for (string flag_value : flag_values) { string normalized_flag_value = normalize(flag_value); if (normalized_flag_value == "unknown") { - map_type_filter.unknown_map = true; + map_type_filter.unknown_map = true; } else if (normalized_flag_value == "redirect") { - map_type_filter.redirect_map = true; + map_type_filter.redirect_map = true; } else if (normalized_flag_value == "charactercreate") { - map_type_filter.character_create_map = true; + map_type_filter.character_create_map = true; } else if (normalized_flag_value == "pvp") { - map_type_filter.pvp_map = true; + map_type_filter.pvp_map = true; } else if (normalized_flag_value == "gvg") { - map_type_filter.gvg_map = true; + map_type_filter.gvg_map = true; } else if (normalized_flag_value == "instance") { - map_type_filter.instance_map = true; + map_type_filter.instance_map = true; } else if (normalized_flag_value == "public") { - map_type_filter.public_map = true; + map_type_filter.public_map = true; } else if (normalized_flag_value == "tournament") { - map_type_filter.tournament_map = true; + map_type_filter.tournament_map = true; } else if (normalized_flag_value == "tutorial") { - map_type_filter.tutorial_map = true; + map_type_filter.tutorial_map = true; } else if (normalized_flag_value == "usertournament") { - map_type_filter.user_tournament_map = true; + map_type_filter.user_tournament_map = true; } else if (normalized_flag_value == "center") { - map_type_filter.center_map = true; + map_type_filter.center_map = true; } else if (normalized_flag_value == "eternalbattlegrounds") { - map_type_filter.eternal_battlegrounds_map = true; + map_type_filter.eternal_battlegrounds_map = true; } else if (normalized_flag_value == "bluehome") { - map_type_filter.bluehome_map = true; + map_type_filter.bluehome_map = true; } else if (normalized_flag_value == "blueborderlands") { - map_type_filter.blue_borderlands_map = true; + map_type_filter.blue_borderlands_map = true; } else if (normalized_flag_value == "greenhome") { - map_type_filter.green_home_map = true; + map_type_filter.green_home_map = true; } else if (normalized_flag_value == "greenborderlands") { - map_type_filter.green_borderlands_map = true; + map_type_filter.green_borderlands_map = true; } else if (normalized_flag_value == "redhome") { - map_type_filter.red_home_map = true; + map_type_filter.red_home_map = true; } else if (normalized_flag_value == "redborderlands") { - map_type_filter.red_borderlands_map = true; + map_type_filter.red_borderlands_map = true; } else if (normalized_flag_value == "fortunesvale") { - map_type_filter.fortunes_vale_map = true; + map_type_filter.fortunes_vale_map = true; } else if (normalized_flag_value == "jumppuzzle") { - map_type_filter.jump_puzzle_map = true; + map_type_filter.jump_puzzle_map = true; } else if (normalized_flag_value == "obsidiansanctum") { - map_type_filter.obsidian_sanctum_map = true; + map_type_filter.obsidian_sanctum_map = true; } else if (normalized_flag_value == "edgeofthemists") { - map_type_filter.edge_of_the_mists_map = true; + map_type_filter.edge_of_the_mists_map = true; } else if (normalized_flag_value == "publicmini") { - map_type_filter.public_mini_map = true; + map_type_filter.public_mini_map = true; } else if (normalized_flag_value == "wvwlounge") { - map_type_filter.wvw_lounge_map = true; + map_type_filter.wvw_lounge_map = true; } else { errors->push_back(new XMLAttributeValueError("Invalid Filter for MapTypeFilter. Found " + flag_value, input)); @@ -121,79 +121,79 @@ MapTypeFilter parse_map_type_filter(rapidxml::xml_attribute<>* input, vector* input, std::vector *errors); -std::string stringify_map_type_filter(MapTypeFilter attribute_value); \ No newline at end of file +MapTypeFilter parse_map_type_filter(rapidxml::xml_attribute<>* input, std::vector* errors); +std::string stringify_map_type_filter(MapTypeFilter attribute_value); diff --git a/xml_converter/src/attribute/marker_category.cpp b/xml_converter/src/attribute/marker_category.cpp index 39285399..4f3ab6f0 100644 --- a/xml_converter/src/attribute/marker_category.cpp +++ b/xml_converter/src/attribute/marker_category.cpp @@ -11,7 +11,7 @@ // // Parses a MarkerCategory from the value of a rapidxml::xml_attribute. //////////////////////////////////////////////////////////////////////////////// -MarkerCategory parse_marker_category(rapidxml::xml_attribute<>* input, std::vector *) { +MarkerCategory parse_marker_category(rapidxml::xml_attribute<>* input, std::vector*) { MarkerCategory marker_category; marker_category.category = get_attribute_value(input); return marker_category; diff --git a/xml_converter/src/attribute/marker_category.hpp b/xml_converter/src/attribute/marker_category.hpp index d495a925..aaca7fe2 100644 --- a/xml_converter/src/attribute/marker_category.hpp +++ b/xml_converter/src/attribute/marker_category.hpp @@ -12,6 +12,6 @@ class MarkerCategory { std::string category; }; -MarkerCategory parse_marker_category(rapidxml::xml_attribute<>* input, std::vector *errors); +MarkerCategory parse_marker_category(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_marker_category(MarkerCategory attribute_value); diff --git a/xml_converter/src/attribute/mount_filter_gen.cpp b/xml_converter/src/attribute/mount_filter_gen.cpp index 764d2150..dd769e1c 100644 --- a/xml_converter/src/attribute/mount_filter_gen.cpp +++ b/xml_converter/src/attribute/mount_filter_gen.cpp @@ -10,52 +10,52 @@ using namespace std; -MountFilter parse_mount_filter(rapidxml::xml_attribute<>* input, vector *errors){ +MountFilter parse_mount_filter(rapidxml::xml_attribute<>* input, vector* errors) { MountFilter mount_filter; vector flag_values; - flag_values = split(get_attribute_value(input), ","); - mount_filter.raptor = false; - mount_filter.springer = false; - mount_filter.skimmer = false; - mount_filter.jackal = false; - mount_filter.griffon = false; - mount_filter.roller_beetle = false; - mount_filter.warclaw = false; - mount_filter.skyscale = false; - mount_filter.skiff = false; + flag_values = split(get_attribute_value(input), ","); + mount_filter.raptor = false; + mount_filter.springer = false; + mount_filter.skimmer = false; + mount_filter.jackal = false; + mount_filter.griffon = false; + mount_filter.roller_beetle = false; + mount_filter.warclaw = false; + mount_filter.skyscale = false; + mount_filter.skiff = false; mount_filter.seige_turtle = false; - + for (string flag_value : flag_values) { string normalized_flag_value = normalize(flag_value); if (normalized_flag_value == "raptor") { - mount_filter.raptor = true; + mount_filter.raptor = true; } else if (normalized_flag_value == "springer") { - mount_filter.springer = true; + mount_filter.springer = true; } else if (normalized_flag_value == "skimmer") { - mount_filter.skimmer = true; + mount_filter.skimmer = true; } else if (normalized_flag_value == "jackal") { - mount_filter.jackal = true; + mount_filter.jackal = true; } else if (normalized_flag_value == "griffon") { - mount_filter.griffon = true; + mount_filter.griffon = true; } else if (normalized_flag_value == "rollerbeetle") { - mount_filter.roller_beetle = true; + mount_filter.roller_beetle = true; } else if (normalized_flag_value == "warclaw") { - mount_filter.warclaw = true; + mount_filter.warclaw = true; } else if (normalized_flag_value == "skyscale") { - mount_filter.skyscale = true; + mount_filter.skyscale = true; } else if (normalized_flag_value == "skiff") { - mount_filter.skiff = true; + mount_filter.skiff = true; } else if (normalized_flag_value == "seigeturtle") { - mount_filter.seige_turtle = true; + mount_filter.seige_turtle = true; } else { errors->push_back(new XMLAttributeValueError("Invalid Filter for MountFilter. Found " + flag_value, input)); @@ -65,37 +65,37 @@ MountFilter parse_mount_filter(rapidxml::xml_attribute<>* input, vector* input, std::vector *errors); -std::string stringify_mount_filter(MountFilter attribute_value); \ No newline at end of file +MountFilter parse_mount_filter(rapidxml::xml_attribute<>* input, std::vector* errors); +std::string stringify_mount_filter(MountFilter attribute_value); diff --git a/xml_converter/src/attribute/position_gen.cpp b/xml_converter/src/attribute/position_gen.cpp index 4e09b549..1d0be9e8 100644 --- a/xml_converter/src/attribute/position_gen.cpp +++ b/xml_converter/src/attribute/position_gen.cpp @@ -10,19 +10,19 @@ using namespace std; -Position parse_position(rapidxml::xml_attribute<>* input, vector *){ +Position parse_position(rapidxml::xml_attribute<>* input, vector*) { Position position; vector compound_values; string attributename; position.x_position = 0; position.y_position = 0; - position.z_position = 0; - attributename = get_attribute_name(input); + position.z_position = 0; + attributename = get_attribute_name(input); compound_values = split(get_attribute_value(input), ","); - if (compound_values.size() == 3){ - position.x_position = std::stof(compound_values[0]); - position.y_position = std::stof(compound_values[1]); - position.z_position = std::stof(compound_values[2]); + if (compound_values.size() == 3) { + position.x_position = std::stof(compound_values[0]); + position.y_position = std::stof(compound_values[1]); + position.z_position = std::stof(compound_values[2]); } return position; -} \ No newline at end of file +} diff --git a/xml_converter/src/attribute/position_gen.hpp b/xml_converter/src/attribute/position_gen.hpp index 4ca03068..31f7e116 100644 --- a/xml_converter/src/attribute/position_gen.hpp +++ b/xml_converter/src/attribute/position_gen.hpp @@ -13,7 +13,9 @@ class Position { float y_position; float z_position; - virtual std::string classname() { return "Position"; }; + virtual std::string classname() { + return "Position"; + }; }; -Position parse_position(rapidxml::xml_attribute<>* input, std::vector *errors); -std::string stringify_position(Position attribute_value); \ No newline at end of file +Position parse_position(rapidxml::xml_attribute<>* input, std::vector* errors); +std::string stringify_position(Position attribute_value); diff --git a/xml_converter/src/attribute/profession_filter_gen.cpp b/xml_converter/src/attribute/profession_filter_gen.cpp index b984f37a..eb99d7a1 100644 --- a/xml_converter/src/attribute/profession_filter_gen.cpp +++ b/xml_converter/src/attribute/profession_filter_gen.cpp @@ -10,48 +10,48 @@ using namespace std; -ProfessionFilter parse_profession_filter(rapidxml::xml_attribute<>* input, vector *errors){ +ProfessionFilter parse_profession_filter(rapidxml::xml_attribute<>* input, vector* errors) { ProfessionFilter profession_filter; vector flag_values; - flag_values = split(get_attribute_value(input), ","); - profession_filter.guardian = false; - profession_filter.warrior = false; - profession_filter.engineer = false; - profession_filter.ranger = false; - profession_filter.thief = false; - profession_filter.elementalist = false; - profession_filter.mesmer = false; - profession_filter.necromancer = false; + flag_values = split(get_attribute_value(input), ","); + profession_filter.guardian = false; + profession_filter.warrior = false; + profession_filter.engineer = false; + profession_filter.ranger = false; + profession_filter.thief = false; + profession_filter.elementalist = false; + profession_filter.mesmer = false; + profession_filter.necromancer = false; profession_filter.revenant = false; - + for (string flag_value : flag_values) { string normalized_flag_value = normalize(flag_value); if (normalized_flag_value == "guardian") { - profession_filter.guardian = true; + profession_filter.guardian = true; } else if (normalized_flag_value == "warrior") { - profession_filter.warrior = true; + profession_filter.warrior = true; } else if (normalized_flag_value == "engineer") { - profession_filter.engineer = true; + profession_filter.engineer = true; } else if (normalized_flag_value == "ranger") { - profession_filter.ranger = true; + profession_filter.ranger = true; } else if (normalized_flag_value == "thief") { - profession_filter.thief = true; + profession_filter.thief = true; } else if (normalized_flag_value == "elementalist") { - profession_filter.elementalist = true; + profession_filter.elementalist = true; } else if (normalized_flag_value == "mesmer") { - profession_filter.mesmer = true; + profession_filter.mesmer = true; } else if (normalized_flag_value == "necromancer") { - profession_filter.necromancer = true; + profession_filter.necromancer = true; } else if (normalized_flag_value == "revenant") { - profession_filter.revenant = true; + profession_filter.revenant = true; } else { errors->push_back(new XMLAttributeValueError("Invalid Filter for ProfessionFilter. Found " + flag_value, input)); @@ -61,34 +61,34 @@ ProfessionFilter parse_profession_filter(rapidxml::xml_attribute<>* input, vecto return profession_filter; } -string stringify_profession_filter(ProfessionFilter attribute_value){ +string stringify_profession_filter(ProfessionFilter attribute_value) { string output = ""; - if (attribute_value.guardian == true){ + if (attribute_value.guardian == true) { output = output + "guardian"; } - if (attribute_value.warrior == true){ + if (attribute_value.warrior == true) { output = output + "warrior"; } - if (attribute_value.engineer == true){ + if (attribute_value.engineer == true) { output = output + "engineer"; } - if (attribute_value.ranger == true){ + if (attribute_value.ranger == true) { output = output + "ranger"; } - if (attribute_value.thief == true){ + if (attribute_value.thief == true) { output = output + "thief"; } - if (attribute_value.elementalist == true){ + if (attribute_value.elementalist == true) { output = output + "elementalist"; } - if (attribute_value.mesmer == true){ + if (attribute_value.mesmer == true) { output = output + "mesmer"; } - if (attribute_value.necromancer == true){ + if (attribute_value.necromancer == true) { output = output + "necromancer"; } - if (attribute_value.revenant == true){ + if (attribute_value.revenant == true) { output = output + "revenant"; } return output; -} \ No newline at end of file +} diff --git a/xml_converter/src/attribute/profession_filter_gen.hpp b/xml_converter/src/attribute/profession_filter_gen.hpp index 5a8150f7..261265ab 100644 --- a/xml_converter/src/attribute/profession_filter_gen.hpp +++ b/xml_converter/src/attribute/profession_filter_gen.hpp @@ -19,7 +19,9 @@ class ProfessionFilter { bool thief; bool warrior; - virtual std::string classname() { return "ProfessionFilter"; }; + virtual std::string classname() { + return "ProfessionFilter"; + }; }; -ProfessionFilter parse_profession_filter(rapidxml::xml_attribute<>* input, std::vector *errors); -std::string stringify_profession_filter(ProfessionFilter attribute_value); \ No newline at end of file +ProfessionFilter parse_profession_filter(rapidxml::xml_attribute<>* input, std::vector* errors); +std::string stringify_profession_filter(ProfessionFilter attribute_value); diff --git a/xml_converter/src/attribute/reset_behavior_gen.cpp b/xml_converter/src/attribute/reset_behavior_gen.cpp index 16d09759..fcaf2063 100644 --- a/xml_converter/src/attribute/reset_behavior_gen.cpp +++ b/xml_converter/src/attribute/reset_behavior_gen.cpp @@ -10,7 +10,7 @@ using namespace std; -ResetBehavior parse_reset_behavior(rapidxml::xml_attribute<>* input, vector *errors){ +ResetBehavior parse_reset_behavior(rapidxml::xml_attribute<>* input, vector* errors) { ResetBehavior reset_behavior; string normalized_value = normalize(get_attribute_value(input)); if (normalized_value == "0") { @@ -74,7 +74,7 @@ ResetBehavior parse_reset_behavior(rapidxml::xml_attribute<>* input, vector* input, std::vector *errors); -std::string stringify_reset_behavior(ResetBehavior attribute_value); \ No newline at end of file +ResetBehavior parse_reset_behavior(rapidxml::xml_attribute<>* input, std::vector* errors); +std::string stringify_reset_behavior(ResetBehavior attribute_value); diff --git a/xml_converter/src/attribute/specialization_filter_gen.cpp b/xml_converter/src/attribute/specialization_filter_gen.cpp index 1628efa5..23df1346 100644 --- a/xml_converter/src/attribute/specialization_filter_gen.cpp +++ b/xml_converter/src/attribute/specialization_filter_gen.cpp @@ -5,359 +5,359 @@ #include #include "../rapid_helpers.hpp" -#include "../string_helper.hpp" #include "../rapidxml-1.13/rapidxml.hpp" +#include "../string_helper.hpp" using namespace std; -SpecializationFilter parse_specialization_filter(rapidxml::xml_attribute<>* input, vector *errors){ +SpecializationFilter parse_specialization_filter(rapidxml::xml_attribute<>* input, vector* errors) { SpecializationFilter specialization_filter; vector flag_values; - flag_values = split(get_attribute_value(input), ","); - specialization_filter.elementalist_tempest = false; - specialization_filter.engineer_scrapper = false; - specialization_filter.guardian_dragonhunter = false; - specialization_filter.mesmer_chronomancer = false; - specialization_filter.necromancer_reaper = false; - specialization_filter.ranger_druid = false; - specialization_filter.revenant_herald = false; - specialization_filter.thief_daredevil = false; - specialization_filter.warrior_berserker = false; - specialization_filter.elementalist_weaver = false; - specialization_filter.engineer_holosmith = false; - specialization_filter.guardian_firebrand = false; - specialization_filter.mesmer_mirage = false; - specialization_filter.necromancer_scourge = false; - specialization_filter.ranger_soulbeast = false; - specialization_filter.revenant_renegade = false; - specialization_filter.thief_deadeye = false; - specialization_filter.warrior_spellbreaker = false; - specialization_filter.elementalist_catalyst = false; - specialization_filter.engineer_mechanist = false; - specialization_filter.guardian_willbender = false; - specialization_filter.mesmer_virtuoso = false; - specialization_filter.necromancer_harbinger = false; - specialization_filter.ranger_untamed = false; - specialization_filter.revenant_vindicator = false; - specialization_filter.thief_specter = false; - specialization_filter.warrior_bladesworn = false; - specialization_filter.elementalist_air = false; - specialization_filter.elementalist_arcane = false; - specialization_filter.elementalist_earth = false; - specialization_filter.elementalist_fire = false; - specialization_filter.elementalist_water = false; - specialization_filter.engineer_alchemy = false; - specialization_filter.engineer_explosives = false; - specialization_filter.engineer_firearms = false; - specialization_filter.engineer_inventions = false; - specialization_filter.engineer_tools = false; - specialization_filter.guardian_honor = false; - specialization_filter.guardian_radiance = false; - specialization_filter.guardian_valor = false; - specialization_filter.guardian_virtues = false; - specialization_filter.guardian_zeal = false; - specialization_filter.mesmer_chaos = false; - specialization_filter.mesmer_domination = false; - specialization_filter.mesmer_dueling = false; - specialization_filter.mesmer_illusions = false; - specialization_filter.mesmer_inspiration = false; - specialization_filter.necromancer_blood_magic = false; - specialization_filter.necromancer_curses = false; - specialization_filter.necromancer_death_magic = false; - specialization_filter.necromancer_soul_reaping = false; - specialization_filter.necromancer_spite = false; - specialization_filter.ranger_beastmastery = false; - specialization_filter.ranger_marksmanship = false; - specialization_filter.ranger_nature_magic = false; - specialization_filter.ranger_skirmishing = false; - specialization_filter.ranger_wilderness_survival = false; - specialization_filter.revenant_corruption = false; - specialization_filter.revenant_devastation = false; - specialization_filter.revenant_invocation = false; - specialization_filter.revenant_retribution = false; - specialization_filter.revenant_salvation = false; - specialization_filter.thief_acrobatics = false; - specialization_filter.thief_critical_strikes = false; - specialization_filter.thief_deadly_arts = false; - specialization_filter.thief_shadow_arts = false; - specialization_filter.thief_trickery = false; - specialization_filter.warrior_arms = false; - specialization_filter.warrior_defense = false; - specialization_filter.warrior_discipline = false; - specialization_filter.warrior_strength = false; + flag_values = split(get_attribute_value(input), ","); + specialization_filter.elementalist_tempest = false; + specialization_filter.engineer_scrapper = false; + specialization_filter.guardian_dragonhunter = false; + specialization_filter.mesmer_chronomancer = false; + specialization_filter.necromancer_reaper = false; + specialization_filter.ranger_druid = false; + specialization_filter.revenant_herald = false; + specialization_filter.thief_daredevil = false; + specialization_filter.warrior_berserker = false; + specialization_filter.elementalist_weaver = false; + specialization_filter.engineer_holosmith = false; + specialization_filter.guardian_firebrand = false; + specialization_filter.mesmer_mirage = false; + specialization_filter.necromancer_scourge = false; + specialization_filter.ranger_soulbeast = false; + specialization_filter.revenant_renegade = false; + specialization_filter.thief_deadeye = false; + specialization_filter.warrior_spellbreaker = false; + specialization_filter.elementalist_catalyst = false; + specialization_filter.engineer_mechanist = false; + specialization_filter.guardian_willbender = false; + specialization_filter.mesmer_virtuoso = false; + specialization_filter.necromancer_harbinger = false; + specialization_filter.ranger_untamed = false; + specialization_filter.revenant_vindicator = false; + specialization_filter.thief_specter = false; + specialization_filter.warrior_bladesworn = false; + specialization_filter.elementalist_air = false; + specialization_filter.elementalist_arcane = false; + specialization_filter.elementalist_earth = false; + specialization_filter.elementalist_fire = false; + specialization_filter.elementalist_water = false; + specialization_filter.engineer_alchemy = false; + specialization_filter.engineer_explosives = false; + specialization_filter.engineer_firearms = false; + specialization_filter.engineer_inventions = false; + specialization_filter.engineer_tools = false; + specialization_filter.guardian_honor = false; + specialization_filter.guardian_radiance = false; + specialization_filter.guardian_valor = false; + specialization_filter.guardian_virtues = false; + specialization_filter.guardian_zeal = false; + specialization_filter.mesmer_chaos = false; + specialization_filter.mesmer_domination = false; + specialization_filter.mesmer_dueling = false; + specialization_filter.mesmer_illusions = false; + specialization_filter.mesmer_inspiration = false; + specialization_filter.necromancer_blood_magic = false; + specialization_filter.necromancer_curses = false; + specialization_filter.necromancer_death_magic = false; + specialization_filter.necromancer_soul_reaping = false; + specialization_filter.necromancer_spite = false; + specialization_filter.ranger_beastmastery = false; + specialization_filter.ranger_marksmanship = false; + specialization_filter.ranger_nature_magic = false; + specialization_filter.ranger_skirmishing = false; + specialization_filter.ranger_wilderness_survival = false; + specialization_filter.revenant_corruption = false; + specialization_filter.revenant_devastation = false; + specialization_filter.revenant_invocation = false; + specialization_filter.revenant_retribution = false; + specialization_filter.revenant_salvation = false; + specialization_filter.thief_acrobatics = false; + specialization_filter.thief_critical_strikes = false; + specialization_filter.thief_deadly_arts = false; + specialization_filter.thief_shadow_arts = false; + specialization_filter.thief_trickery = false; + specialization_filter.warrior_arms = false; + specialization_filter.warrior_defense = false; + specialization_filter.warrior_discipline = false; + specialization_filter.warrior_strength = false; specialization_filter.warrior_tactics = false; - + for (string flag_value : flag_values) { string normalized_flag_value = normalize(flag_value); if (normalized_flag_value == "48") { - specialization_filter.elementalist_tempest = true; + specialization_filter.elementalist_tempest = true; } else if (normalized_flag_value == "tempest") { - specialization_filter.elementalist_tempest = true; + specialization_filter.elementalist_tempest = true; } else if (normalized_flag_value == "43") { - specialization_filter.engineer_scrapper = true; + specialization_filter.engineer_scrapper = true; } else if (normalized_flag_value == "scrapper") { - specialization_filter.engineer_scrapper = true; + specialization_filter.engineer_scrapper = true; } else if (normalized_flag_value == "27") { - specialization_filter.guardian_dragonhunter = true; + specialization_filter.guardian_dragonhunter = true; } else if (normalized_flag_value == "dragonhunter") { - specialization_filter.guardian_dragonhunter = true; + specialization_filter.guardian_dragonhunter = true; } else if (normalized_flag_value == "40") { - specialization_filter.mesmer_chronomancer = true; + specialization_filter.mesmer_chronomancer = true; } else if (normalized_flag_value == "chronomancer") { - specialization_filter.mesmer_chronomancer = true; + specialization_filter.mesmer_chronomancer = true; } else if (normalized_flag_value == "34") { - specialization_filter.necromancer_reaper = true; + specialization_filter.necromancer_reaper = true; } else if (normalized_flag_value == "reaper") { - specialization_filter.necromancer_reaper = true; + specialization_filter.necromancer_reaper = true; } else if (normalized_flag_value == "5") { - specialization_filter.ranger_druid = true; + specialization_filter.ranger_druid = true; } else if (normalized_flag_value == "druid") { - specialization_filter.ranger_druid = true; + specialization_filter.ranger_druid = true; } else if (normalized_flag_value == "52") { - specialization_filter.revenant_herald = true; + specialization_filter.revenant_herald = true; } else if (normalized_flag_value == "herald") { - specialization_filter.revenant_herald = true; + specialization_filter.revenant_herald = true; } else if (normalized_flag_value == "7") { - specialization_filter.thief_daredevil = true; + specialization_filter.thief_daredevil = true; } else if (normalized_flag_value == "daredevil") { - specialization_filter.thief_daredevil = true; + specialization_filter.thief_daredevil = true; } else if (normalized_flag_value == "18") { - specialization_filter.warrior_berserker = true; + specialization_filter.warrior_berserker = true; } else if (normalized_flag_value == "berserker") { - specialization_filter.warrior_berserker = true; + specialization_filter.warrior_berserker = true; } else if (normalized_flag_value == "56") { - specialization_filter.elementalist_weaver = true; + specialization_filter.elementalist_weaver = true; } else if (normalized_flag_value == "weaver") { - specialization_filter.elementalist_weaver = true; + specialization_filter.elementalist_weaver = true; } else if (normalized_flag_value == "57") { - specialization_filter.engineer_holosmith = true; + specialization_filter.engineer_holosmith = true; } else if (normalized_flag_value == "holosmith") { - specialization_filter.engineer_holosmith = true; + specialization_filter.engineer_holosmith = true; } else if (normalized_flag_value == "62") { - specialization_filter.guardian_firebrand = true; + specialization_filter.guardian_firebrand = true; } else if (normalized_flag_value == "firebrand") { - specialization_filter.guardian_firebrand = true; + specialization_filter.guardian_firebrand = true; } else if (normalized_flag_value == "59") { - specialization_filter.mesmer_mirage = true; + specialization_filter.mesmer_mirage = true; } else if (normalized_flag_value == "mirage") { - specialization_filter.mesmer_mirage = true; + specialization_filter.mesmer_mirage = true; } else if (normalized_flag_value == "60") { - specialization_filter.necromancer_scourge = true; + specialization_filter.necromancer_scourge = true; } else if (normalized_flag_value == "scourge") { - specialization_filter.necromancer_scourge = true; + specialization_filter.necromancer_scourge = true; } else if (normalized_flag_value == "55") { - specialization_filter.ranger_soulbeast = true; + specialization_filter.ranger_soulbeast = true; } else if (normalized_flag_value == "soulbeast") { - specialization_filter.ranger_soulbeast = true; + specialization_filter.ranger_soulbeast = true; } else if (normalized_flag_value == "63") { - specialization_filter.revenant_renegade = true; + specialization_filter.revenant_renegade = true; } else if (normalized_flag_value == "renegade") { - specialization_filter.revenant_renegade = true; + specialization_filter.revenant_renegade = true; } else if (normalized_flag_value == "58") { - specialization_filter.thief_deadeye = true; + specialization_filter.thief_deadeye = true; } else if (normalized_flag_value == "deadeye") { - specialization_filter.thief_deadeye = true; + specialization_filter.thief_deadeye = true; } else if (normalized_flag_value == "61") { - specialization_filter.warrior_spellbreaker = true; + specialization_filter.warrior_spellbreaker = true; } else if (normalized_flag_value == "spellbreaker") { - specialization_filter.warrior_spellbreaker = true; + specialization_filter.warrior_spellbreaker = true; } else if (normalized_flag_value == "catalyst") { - specialization_filter.elementalist_catalyst = true; + specialization_filter.elementalist_catalyst = true; } else if (normalized_flag_value == "mechanist") { - specialization_filter.engineer_mechanist = true; + specialization_filter.engineer_mechanist = true; } else if (normalized_flag_value == "willbender") { - specialization_filter.guardian_willbender = true; + specialization_filter.guardian_willbender = true; } else if (normalized_flag_value == "virtuoso") { - specialization_filter.mesmer_virtuoso = true; + specialization_filter.mesmer_virtuoso = true; } else if (normalized_flag_value == "harbinger") { - specialization_filter.necromancer_harbinger = true; + specialization_filter.necromancer_harbinger = true; } else if (normalized_flag_value == "untamed") { - specialization_filter.ranger_untamed = true; + specialization_filter.ranger_untamed = true; } else if (normalized_flag_value == "vindicator") { - specialization_filter.revenant_vindicator = true; + specialization_filter.revenant_vindicator = true; } else if (normalized_flag_value == "specter") { - specialization_filter.thief_specter = true; + specialization_filter.thief_specter = true; } else if (normalized_flag_value == "bladesworn") { - specialization_filter.warrior_bladesworn = true; + specialization_filter.warrior_bladesworn = true; } else if (normalized_flag_value == "41") { - specialization_filter.elementalist_air = true; + specialization_filter.elementalist_air = true; } else if (normalized_flag_value == "37") { - specialization_filter.elementalist_arcane = true; + specialization_filter.elementalist_arcane = true; } else if (normalized_flag_value == "26") { - specialization_filter.elementalist_earth = true; + specialization_filter.elementalist_earth = true; } else if (normalized_flag_value == "31") { - specialization_filter.elementalist_fire = true; + specialization_filter.elementalist_fire = true; } else if (normalized_flag_value == "17") { - specialization_filter.elementalist_water = true; + specialization_filter.elementalist_water = true; } else if (normalized_flag_value == "29") { - specialization_filter.engineer_alchemy = true; + specialization_filter.engineer_alchemy = true; } else if (normalized_flag_value == "6") { - specialization_filter.engineer_explosives = true; + specialization_filter.engineer_explosives = true; } else if (normalized_flag_value == "38") { - specialization_filter.engineer_firearms = true; + specialization_filter.engineer_firearms = true; } else if (normalized_flag_value == "47") { - specialization_filter.engineer_inventions = true; + specialization_filter.engineer_inventions = true; } else if (normalized_flag_value == "21") { - specialization_filter.engineer_tools = true; + specialization_filter.engineer_tools = true; } else if (normalized_flag_value == "49") { - specialization_filter.guardian_honor = true; + specialization_filter.guardian_honor = true; } else if (normalized_flag_value == "16") { - specialization_filter.guardian_radiance = true; + specialization_filter.guardian_radiance = true; } else if (normalized_flag_value == "13") { - specialization_filter.guardian_valor = true; + specialization_filter.guardian_valor = true; } else if (normalized_flag_value == "46") { - specialization_filter.guardian_virtues = true; + specialization_filter.guardian_virtues = true; } else if (normalized_flag_value == "42") { - specialization_filter.guardian_zeal = true; + specialization_filter.guardian_zeal = true; } else if (normalized_flag_value == "45") { - specialization_filter.mesmer_chaos = true; + specialization_filter.mesmer_chaos = true; } else if (normalized_flag_value == "10") { - specialization_filter.mesmer_domination = true; + specialization_filter.mesmer_domination = true; } else if (normalized_flag_value == "1") { - specialization_filter.mesmer_dueling = true; + specialization_filter.mesmer_dueling = true; } else if (normalized_flag_value == "24") { - specialization_filter.mesmer_illusions = true; + specialization_filter.mesmer_illusions = true; } else if (normalized_flag_value == "23") { - specialization_filter.mesmer_inspiration = true; + specialization_filter.mesmer_inspiration = true; } else if (normalized_flag_value == "19") { - specialization_filter.necromancer_blood_magic = true; + specialization_filter.necromancer_blood_magic = true; } else if (normalized_flag_value == "39") { - specialization_filter.necromancer_curses = true; + specialization_filter.necromancer_curses = true; } else if (normalized_flag_value == "2") { - specialization_filter.necromancer_death_magic = true; + specialization_filter.necromancer_death_magic = true; } else if (normalized_flag_value == "50") { - specialization_filter.necromancer_soul_reaping = true; + specialization_filter.necromancer_soul_reaping = true; } else if (normalized_flag_value == "53") { - specialization_filter.necromancer_spite = true; + specialization_filter.necromancer_spite = true; } else if (normalized_flag_value == "32") { - specialization_filter.ranger_beastmastery = true; + specialization_filter.ranger_beastmastery = true; } else if (normalized_flag_value == "8") { - specialization_filter.ranger_marksmanship = true; + specialization_filter.ranger_marksmanship = true; } else if (normalized_flag_value == "25") { - specialization_filter.ranger_nature_magic = true; + specialization_filter.ranger_nature_magic = true; } else if (normalized_flag_value == "30") { - specialization_filter.ranger_skirmishing = true; + specialization_filter.ranger_skirmishing = true; } else if (normalized_flag_value == "33") { - specialization_filter.ranger_wilderness_survival = true; + specialization_filter.ranger_wilderness_survival = true; } else if (normalized_flag_value == "14") { - specialization_filter.revenant_corruption = true; + specialization_filter.revenant_corruption = true; } else if (normalized_flag_value == "15") { - specialization_filter.revenant_devastation = true; + specialization_filter.revenant_devastation = true; } else if (normalized_flag_value == "3") { - specialization_filter.revenant_invocation = true; + specialization_filter.revenant_invocation = true; } else if (normalized_flag_value == "9") { - specialization_filter.revenant_retribution = true; + specialization_filter.revenant_retribution = true; } else if (normalized_flag_value == "12") { - specialization_filter.revenant_salvation = true; + specialization_filter.revenant_salvation = true; } else if (normalized_flag_value == "54") { - specialization_filter.thief_acrobatics = true; + specialization_filter.thief_acrobatics = true; } else if (normalized_flag_value == "35") { - specialization_filter.thief_critical_strikes = true; + specialization_filter.thief_critical_strikes = true; } else if (normalized_flag_value == "28") { - specialization_filter.thief_deadly_arts = true; + specialization_filter.thief_deadly_arts = true; } else if (normalized_flag_value == "20") { - specialization_filter.thief_shadow_arts = true; + specialization_filter.thief_shadow_arts = true; } else if (normalized_flag_value == "44") { - specialization_filter.thief_trickery = true; + specialization_filter.thief_trickery = true; } else if (normalized_flag_value == "36") { - specialization_filter.warrior_arms = true; + specialization_filter.warrior_arms = true; } else if (normalized_flag_value == "22") { - specialization_filter.warrior_defense = true; + specialization_filter.warrior_defense = true; } else if (normalized_flag_value == "51") { - specialization_filter.warrior_discipline = true; + specialization_filter.warrior_discipline = true; } else if (normalized_flag_value == "4") { - specialization_filter.warrior_strength = true; + specialization_filter.warrior_strength = true; } else if (normalized_flag_value == "11") { - specialization_filter.warrior_tactics = true; + specialization_filter.warrior_tactics = true; } else { errors->push_back(new XMLAttributeValueError("Invalid Filter for SpecializationFilter. Found " + flag_value, input)); @@ -367,223 +367,223 @@ SpecializationFilter parse_specialization_filter(rapidxml::xml_attribute<>* inpu return specialization_filter; } -string stringify_specialization_filter(SpecializationFilter attribute_value){ +string stringify_specialization_filter(SpecializationFilter attribute_value) { string output = ""; - if (attribute_value.elementalist_tempest == true){ + if (attribute_value.elementalist_tempest == true) { output = output + "48"; } - if (attribute_value.engineer_scrapper == true){ + if (attribute_value.engineer_scrapper == true) { output = output + "43"; } - if (attribute_value.guardian_dragonhunter == true){ + if (attribute_value.guardian_dragonhunter == true) { output = output + "27"; } - if (attribute_value.mesmer_chronomancer == true){ + if (attribute_value.mesmer_chronomancer == true) { output = output + "40"; } - if (attribute_value.necromancer_reaper == true){ + if (attribute_value.necromancer_reaper == true) { output = output + "34"; } - if (attribute_value.ranger_druid == true){ + if (attribute_value.ranger_druid == true) { output = output + "5"; } - if (attribute_value.revenant_herald == true){ + if (attribute_value.revenant_herald == true) { output = output + "52"; } - if (attribute_value.thief_daredevil == true){ + if (attribute_value.thief_daredevil == true) { output = output + "7"; } - if (attribute_value.warrior_berserker == true){ + if (attribute_value.warrior_berserker == true) { output = output + "18"; } - if (attribute_value.elementalist_weaver == true){ + if (attribute_value.elementalist_weaver == true) { output = output + "56"; } - if (attribute_value.engineer_holosmith == true){ + if (attribute_value.engineer_holosmith == true) { output = output + "57"; } - if (attribute_value.guardian_firebrand == true){ + if (attribute_value.guardian_firebrand == true) { output = output + "62"; } - if (attribute_value.mesmer_mirage == true){ + if (attribute_value.mesmer_mirage == true) { output = output + "59"; } - if (attribute_value.necromancer_scourge == true){ + if (attribute_value.necromancer_scourge == true) { output = output + "60"; } - if (attribute_value.ranger_soulbeast == true){ + if (attribute_value.ranger_soulbeast == true) { output = output + "55"; } - if (attribute_value.revenant_renegade == true){ + if (attribute_value.revenant_renegade == true) { output = output + "63"; } - if (attribute_value.thief_deadeye == true){ + if (attribute_value.thief_deadeye == true) { output = output + "58"; } - if (attribute_value.warrior_spellbreaker == true){ + if (attribute_value.warrior_spellbreaker == true) { output = output + "61"; } - if (attribute_value.elementalist_catalyst == true){ + if (attribute_value.elementalist_catalyst == true) { output = output + "catalyst"; } - if (attribute_value.engineer_mechanist == true){ + if (attribute_value.engineer_mechanist == true) { output = output + "mechanist"; } - if (attribute_value.guardian_willbender == true){ + if (attribute_value.guardian_willbender == true) { output = output + "willbender"; } - if (attribute_value.mesmer_virtuoso == true){ + if (attribute_value.mesmer_virtuoso == true) { output = output + "virtuoso"; } - if (attribute_value.necromancer_harbinger == true){ + if (attribute_value.necromancer_harbinger == true) { output = output + "harbinger"; } - if (attribute_value.ranger_untamed == true){ + if (attribute_value.ranger_untamed == true) { output = output + "untamed"; } - if (attribute_value.revenant_vindicator == true){ + if (attribute_value.revenant_vindicator == true) { output = output + "vindicator"; } - if (attribute_value.thief_specter == true){ + if (attribute_value.thief_specter == true) { output = output + "specter"; } - if (attribute_value.warrior_bladesworn == true){ + if (attribute_value.warrior_bladesworn == true) { output = output + "bladesworn"; } - if (attribute_value.elementalist_air == true){ + if (attribute_value.elementalist_air == true) { output = output + "41"; } - if (attribute_value.elementalist_arcane == true){ + if (attribute_value.elementalist_arcane == true) { output = output + "37"; } - if (attribute_value.elementalist_earth == true){ + if (attribute_value.elementalist_earth == true) { output = output + "26"; } - if (attribute_value.elementalist_fire == true){ + if (attribute_value.elementalist_fire == true) { output = output + "31"; } - if (attribute_value.elementalist_water == true){ + if (attribute_value.elementalist_water == true) { output = output + "17"; } - if (attribute_value.engineer_alchemy == true){ + if (attribute_value.engineer_alchemy == true) { output = output + "29"; } - if (attribute_value.engineer_explosives == true){ + if (attribute_value.engineer_explosives == true) { output = output + "6"; } - if (attribute_value.engineer_firearms == true){ + if (attribute_value.engineer_firearms == true) { output = output + "38"; } - if (attribute_value.engineer_inventions == true){ + if (attribute_value.engineer_inventions == true) { output = output + "47"; } - if (attribute_value.engineer_tools == true){ + if (attribute_value.engineer_tools == true) { output = output + "21"; } - if (attribute_value.guardian_honor == true){ + if (attribute_value.guardian_honor == true) { output = output + "49"; } - if (attribute_value.guardian_radiance == true){ + if (attribute_value.guardian_radiance == true) { output = output + "16"; } - if (attribute_value.guardian_valor == true){ + if (attribute_value.guardian_valor == true) { output = output + "13"; } - if (attribute_value.guardian_virtues == true){ + if (attribute_value.guardian_virtues == true) { output = output + "46"; } - if (attribute_value.guardian_zeal == true){ + if (attribute_value.guardian_zeal == true) { output = output + "42"; } - if (attribute_value.mesmer_chaos == true){ + if (attribute_value.mesmer_chaos == true) { output = output + "45"; } - if (attribute_value.mesmer_domination == true){ + if (attribute_value.mesmer_domination == true) { output = output + "10"; } - if (attribute_value.mesmer_dueling == true){ + if (attribute_value.mesmer_dueling == true) { output = output + "1"; } - if (attribute_value.mesmer_illusions == true){ + if (attribute_value.mesmer_illusions == true) { output = output + "24"; } - if (attribute_value.mesmer_inspiration == true){ + if (attribute_value.mesmer_inspiration == true) { output = output + "23"; } - if (attribute_value.necromancer_blood_magic == true){ + if (attribute_value.necromancer_blood_magic == true) { output = output + "19"; } - if (attribute_value.necromancer_curses == true){ + if (attribute_value.necromancer_curses == true) { output = output + "39"; } - if (attribute_value.necromancer_death_magic == true){ + if (attribute_value.necromancer_death_magic == true) { output = output + "2"; } - if (attribute_value.necromancer_soul_reaping == true){ + if (attribute_value.necromancer_soul_reaping == true) { output = output + "50"; } - if (attribute_value.necromancer_spite == true){ + if (attribute_value.necromancer_spite == true) { output = output + "53"; } - if (attribute_value.ranger_beastmastery == true){ + if (attribute_value.ranger_beastmastery == true) { output = output + "32"; } - if (attribute_value.ranger_marksmanship == true){ + if (attribute_value.ranger_marksmanship == true) { output = output + "8"; } - if (attribute_value.ranger_nature_magic == true){ + if (attribute_value.ranger_nature_magic == true) { output = output + "25"; } - if (attribute_value.ranger_skirmishing == true){ + if (attribute_value.ranger_skirmishing == true) { output = output + "30"; } - if (attribute_value.ranger_wilderness_survival == true){ + if (attribute_value.ranger_wilderness_survival == true) { output = output + "33"; } - if (attribute_value.revenant_corruption == true){ + if (attribute_value.revenant_corruption == true) { output = output + "14"; } - if (attribute_value.revenant_devastation == true){ + if (attribute_value.revenant_devastation == true) { output = output + "15"; } - if (attribute_value.revenant_invocation == true){ + if (attribute_value.revenant_invocation == true) { output = output + "3"; } - if (attribute_value.revenant_retribution == true){ + if (attribute_value.revenant_retribution == true) { output = output + "9"; } - if (attribute_value.revenant_salvation == true){ + if (attribute_value.revenant_salvation == true) { output = output + "12"; } - if (attribute_value.thief_acrobatics == true){ + if (attribute_value.thief_acrobatics == true) { output = output + "54"; } - if (attribute_value.thief_critical_strikes == true){ + if (attribute_value.thief_critical_strikes == true) { output = output + "35"; } - if (attribute_value.thief_deadly_arts == true){ + if (attribute_value.thief_deadly_arts == true) { output = output + "28"; } - if (attribute_value.thief_shadow_arts == true){ + if (attribute_value.thief_shadow_arts == true) { output = output + "20"; } - if (attribute_value.thief_trickery == true){ + if (attribute_value.thief_trickery == true) { output = output + "44"; } - if (attribute_value.warrior_arms == true){ + if (attribute_value.warrior_arms == true) { output = output + "36"; } - if (attribute_value.warrior_defense == true){ + if (attribute_value.warrior_defense == true) { output = output + "22"; } - if (attribute_value.warrior_discipline == true){ + if (attribute_value.warrior_discipline == true) { output = output + "51"; } - if (attribute_value.warrior_strength == true){ + if (attribute_value.warrior_strength == true) { output = output + "4"; } - if (attribute_value.warrior_tactics == true){ + if (attribute_value.warrior_tactics == true) { output = output + "11"; } return output; -} \ No newline at end of file +} diff --git a/xml_converter/src/attribute/specialization_filter_gen.hpp b/xml_converter/src/attribute/specialization_filter_gen.hpp index c01699dd..8094df9e 100644 --- a/xml_converter/src/attribute/specialization_filter_gen.hpp +++ b/xml_converter/src/attribute/specialization_filter_gen.hpp @@ -82,7 +82,9 @@ class SpecializationFilter { bool warrior_strength; bool warrior_tactics; - virtual std::string classname() { return "SpecializationFilter"; }; + virtual std::string classname() { + return "SpecializationFilter"; + }; }; -SpecializationFilter parse_specialization_filter(rapidxml::xml_attribute<>* input, std::vector *errors); -std::string stringify_specialization_filter(SpecializationFilter attribute_value); \ No newline at end of file +SpecializationFilter parse_specialization_filter(rapidxml::xml_attribute<>* input, std::vector* errors); +std::string stringify_specialization_filter(SpecializationFilter attribute_value); diff --git a/xml_converter/src/attribute/species_filter_gen.cpp b/xml_converter/src/attribute/species_filter_gen.cpp index 585f2d1b..782c6106 100644 --- a/xml_converter/src/attribute/species_filter_gen.cpp +++ b/xml_converter/src/attribute/species_filter_gen.cpp @@ -5,37 +5,37 @@ #include #include "../rapid_helpers.hpp" -#include "../string_helper.hpp" #include "../rapidxml-1.13/rapidxml.hpp" +#include "../string_helper.hpp" using namespace std; -SpeciesFilter parse_species_filter(rapidxml::xml_attribute<>* input, vector *errors){ +SpeciesFilter parse_species_filter(rapidxml::xml_attribute<>* input, vector* errors) { SpeciesFilter species_filter; vector flag_values; - flag_values = split(get_attribute_value(input), ","); - species_filter.asura = false; - species_filter.charr = false; - species_filter.human = false; - species_filter.norn = false; + flag_values = split(get_attribute_value(input), ","); + species_filter.asura = false; + species_filter.charr = false; + species_filter.human = false; + species_filter.norn = false; species_filter.sylvari = false; - + for (string flag_value : flag_values) { string normalized_flag_value = normalize(flag_value); if (normalized_flag_value == "asura") { - species_filter.asura = true; + species_filter.asura = true; } else if (normalized_flag_value == "charr") { - species_filter.charr = true; + species_filter.charr = true; } else if (normalized_flag_value == "human") { - species_filter.human = true; + species_filter.human = true; } else if (normalized_flag_value == "norn") { - species_filter.norn = true; + species_filter.norn = true; } else if (normalized_flag_value == "sylvari") { - species_filter.sylvari = true; + species_filter.sylvari = true; } else { errors->push_back(new XMLAttributeValueError("Invalid Filter for SpeciesFilter. Found " + flag_value, input)); @@ -45,22 +45,22 @@ SpeciesFilter parse_species_filter(rapidxml::xml_attribute<>* input, vector* input, std::vector *errors); -std::string stringify_species_filter(SpeciesFilter attribute_value); \ No newline at end of file +SpeciesFilter parse_species_filter(rapidxml::xml_attribute<>* input, std::vector* errors); +std::string stringify_species_filter(SpeciesFilter attribute_value); diff --git a/xml_converter/src/attribute/string.cpp b/xml_converter/src/attribute/string.cpp index 351ddc60..08e53392 100644 --- a/xml_converter/src/attribute/string.cpp +++ b/xml_converter/src/attribute/string.cpp @@ -14,7 +14,7 @@ using namespace std; // // Parses a string from the value of a rapidxml::xml_attribute. //////////////////////////////////////////////////////////////////////////////// -string parse_string(rapidxml::xml_attribute<>* input, vector *) { +string parse_string(rapidxml::xml_attribute<>* input, vector*) { return get_attribute_value(input); } diff --git a/xml_converter/src/attribute/string.hpp b/xml_converter/src/attribute/string.hpp index fe2f0816..6e202248 100644 --- a/xml_converter/src/attribute/string.hpp +++ b/xml_converter/src/attribute/string.hpp @@ -7,6 +7,6 @@ class XMLError; -std::string parse_string(rapidxml::xml_attribute<>* input, std::vector *errors); +std::string parse_string(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_string(std::string attribute_value); diff --git a/xml_converter/src/attribute/trail_data.cpp b/xml_converter/src/attribute/trail_data.cpp index 16c6e117..d2d83387 100644 --- a/xml_converter/src/attribute/trail_data.cpp +++ b/xml_converter/src/attribute/trail_data.cpp @@ -9,7 +9,7 @@ using namespace std; -TrailData parse_trail_data(rapidxml::xml_attribute<>* input, vector *) { +TrailData parse_trail_data(rapidxml::xml_attribute<>* input, vector*) { TrailData trail_data; trail_data.trail_data = get_attribute_value(input); return trail_data; diff --git a/xml_converter/src/attribute/trail_data.hpp b/xml_converter/src/attribute/trail_data.hpp index c83a12e4..6903f622 100644 --- a/xml_converter/src/attribute/trail_data.hpp +++ b/xml_converter/src/attribute/trail_data.hpp @@ -12,6 +12,6 @@ class TrailData { std::string trail_data; }; -TrailData parse_trail_data(rapidxml::xml_attribute<>* input, std::vector *errors); +TrailData parse_trail_data(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_trail_data(TrailData attribute_value); diff --git a/xml_converter/src/attribute/trail_data_map_id.cpp b/xml_converter/src/attribute/trail_data_map_id.cpp index b5d937b9..56c111d9 100644 --- a/xml_converter/src/attribute/trail_data_map_id.cpp +++ b/xml_converter/src/attribute/trail_data_map_id.cpp @@ -9,7 +9,7 @@ using namespace std; -TrailDataMapId parse_trail_data_map_id(rapidxml::xml_attribute<>* input, vector *) { +TrailDataMapId parse_trail_data_map_id(rapidxml::xml_attribute<>* input, vector*) { TrailDataMapId trail_data_map_id; trail_data_map_id.trail_data_map_id = std::stof(get_attribute_value(input)); return trail_data_map_id; diff --git a/xml_converter/src/attribute/trail_data_map_id.hpp b/xml_converter/src/attribute/trail_data_map_id.hpp index 3ce4bc18..440fa5ae 100644 --- a/xml_converter/src/attribute/trail_data_map_id.hpp +++ b/xml_converter/src/attribute/trail_data_map_id.hpp @@ -12,6 +12,6 @@ class TrailDataMapId { int trail_data_map_id; }; -TrailDataMapId parse_trail_data_map_id(rapidxml::xml_attribute<>* input, std::vector *errors); +TrailDataMapId parse_trail_data_map_id(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_trail_data_map_id(TrailDataMapId attribute_value); diff --git a/xml_converter/src/attribute/unique_id.cpp b/xml_converter/src/attribute/unique_id.cpp index 371ac73f..4fd3561d 100644 --- a/xml_converter/src/attribute/unique_id.cpp +++ b/xml_converter/src/attribute/unique_id.cpp @@ -11,7 +11,7 @@ using namespace std; -UniqueId parse_unique_id(rapidxml::xml_attribute<>* input, vector *) { +UniqueId parse_unique_id(rapidxml::xml_attribute<>* input, vector*) { UniqueId unique_id; string base64; base64 = get_attribute_value(input); diff --git a/xml_converter/src/attribute/unique_id.hpp b/xml_converter/src/attribute/unique_id.hpp index 8cfe4c9c..40324d1b 100644 --- a/xml_converter/src/attribute/unique_id.hpp +++ b/xml_converter/src/attribute/unique_id.hpp @@ -13,6 +13,6 @@ class UniqueId { std::vector guid; }; -UniqueId parse_unique_id(rapidxml::xml_attribute<>* input, std::vector *errors); +UniqueId parse_unique_id(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_unique_id(UniqueId attribute_value); diff --git a/xml_converter/src/category_gen.cpp b/xml_converter/src/category_gen.cpp index 827ec2e7..807496ce 100644 --- a/xml_converter/src/category_gen.cpp +++ b/xml_converter/src/category_gen.cpp @@ -4,33 +4,34 @@ #include #include -#include "rapid_helpers.hpp" -#include "string_helper.hpp" #include "attribute/bool.hpp" #include "attribute/string.hpp" - +#include "rapid_helpers.hpp" #include "rapidxml-1.13/rapidxml.hpp" +#include "string_helper.hpp" using namespace std; string Category::classname() { return "MarkerCategory"; } -void Category::init_from_xml(rapidxml::xml_node<>* node, vector *errors) { +void Category::init_from_xml(rapidxml::xml_node<>* node, vector* errors) { for (rapidxml::xml_attribute<>* attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()) { bool is_icon_value = this->default_icon.init_xml_attribute(attribute, errors); bool is_trail_value = this->default_trail.init_xml_attribute(attribute, errors); - if (init_xml_attribute(attribute, errors)) {} - else if (is_icon_value || is_trail_value) {} + if (init_xml_attribute(attribute, errors)) { + } + else if (is_icon_value || is_trail_value) { + } else { - errors->push_back(new XMLAttributeNameError("Unknown " + this->classname() + " attribute ", attribute)); + errors->push_back(new XMLAttributeNameError("Unknown " + this->classname() + " attribute ", attribute)); } } } -bool Category::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors) { - string attributename; - attributename = normalize(get_attribute_name(attribute)); +bool Category::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector* errors) { + string attributename; + attributename = normalize(get_attribute_name(attribute)); if (attributename == "defaulttoggle") { this->default_visibility = parse_bool(attribute, errors); this->default_visibility_is_set = true; @@ -74,16 +75,18 @@ vector Category::as_xml() const { } if (this->tooltip_name_is_set) { xml_node_contents.push_back(" TipDescription=\"" + stringify_string(this->tooltip_name) + "\""); - } + } xml_node_contents.push_back(">\n"); - for (const auto& [key, val] : this->children){ - string text; - for (const auto& s: val.as_xml()) { text += s; }; + for (const auto& [key, val] : this->children) { + string text; + for (const auto& s : val.as_xml()) { + text += s; + }; xml_node_contents.push_back("\t" + text); } xml_node_contents.push_back("\n"); return xml_node_contents; -} \ No newline at end of file +} diff --git a/xml_converter/src/category_gen.hpp b/xml_converter/src/category_gen.hpp index f70590bf..f260fef6 100644 --- a/xml_converter/src/category_gen.hpp +++ b/xml_converter/src/category_gen.hpp @@ -1,36 +1,34 @@ #pragma once -#include "icon_gen.hpp" - #include #include #include +#include "icon_gen.hpp" #include "parseable.hpp" -#include "trail_gen.hpp" - #include "rapidxml-1.13/rapidxml.hpp" +#include "trail_gen.hpp" class XMLError; -class Category: public Parseable { - public: - bool default_visibility; - bool default_visibility_is_set = false; - std::string display_name; - bool display_name_is_set = false; - bool is_separator; - bool is_separator_is_set = false; - std::string name; - bool name_is_set = false; - std::string tooltip_name; - bool tooltip_name_is_set = false; - std::map children; - Icon default_icon; - Trail default_trail; +class Category : public Parseable { + public: + bool default_visibility; + bool default_visibility_is_set = false; + std::string display_name; + bool display_name_is_set = false; + bool is_separator; + bool is_separator_is_set = false; + std::string name; + bool name_is_set = false; + std::string tooltip_name; + bool tooltip_name_is_set = false; + std::map children; + Icon default_icon; + Trail default_trail; - void init_from_xml(rapidxml::xml_node<>* node, std::vector *errors); - virtual std::string classname(); - bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector *errors); - virtual std::vector as_xml() const; -}; \ No newline at end of file + void init_from_xml(rapidxml::xml_node<>* node, std::vector* errors); + virtual std::string classname(); + bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors); + virtual std::vector as_xml() const; +}; diff --git a/xml_converter/src/function_timers.cpp b/xml_converter/src/function_timers.cpp index acc919fa..fa702539 100644 --- a/xml_converter/src/function_timers.cpp +++ b/xml_converter/src/function_timers.cpp @@ -1,3 +1,5 @@ +#include "function_timers.hpp" + #include #include #include @@ -23,13 +25,15 @@ using namespace std; std::chrono::time_point>> begin_##TIMER; \ std::chrono::duration> duration_##TIMER; \ uint64_t call_count_##TIMER = 0; \ - void print_timer_##TIMER(ostream &out) { \ + void print_timer_##TIMER(std::ostream &out) { \ int64_t microseconds = std::chrono::duration_cast(duration_##TIMER).count(); \ out << "Timer " << TIMER << " Total Duration: " << microseconds << endl; \ out << "Timer " << TIMER << " Call Count " << call_count_##TIMER << endl; \ out << "Timer " << TIMER << " Call Duration: " << float(microseconds) / float(call_count_##TIMER) << endl; \ } \ - void print_timer_##TIMER() {print_timer_##TIMER(cout);} + void print_timer_##TIMER() { \ + print_timer_##TIMER(cout); \ + } TIMER_IMPLEMENTATION(0) TIMER_IMPLEMENTATION(1) diff --git a/xml_converter/src/function_timers.hpp b/xml_converter/src/function_timers.hpp index f9c0eb4c..ed6dc519 100644 --- a/xml_converter/src/function_timers.hpp +++ b/xml_converter/src/function_timers.hpp @@ -1,10 +1,9 @@ #pragma once -#include -#include - -#include #include +#include +#include +#include //////////////////////////////////////////////////////////////////////////////// // Function Timers @@ -29,7 +28,7 @@ extern std::chrono::duration> duration_##TIMER; \ extern uint64_t call_count_##TIMER; \ inline void start_timer_##TIMER() { \ - begin_##TIMER = std::chrono::high_resolution_clock::now(); \ + begin_##TIMER = std::chrono::high_resolution_clock::now(); \ } \ inline void stop_timer_##TIMER() { \ auto end = std::chrono::high_resolution_clock::now(); \ @@ -37,7 +36,7 @@ call_count_##TIMER += 1; \ } \ void print_timer_##TIMER(); \ - void print_timer_##TIMER(std::ostream); + void print_timer_##TIMER(std::ostream&); TIMER_PROTOTYPE(0) TIMER_PROTOTYPE(1) diff --git a/xml_converter/src/icon_gen.cpp b/xml_converter/src/icon_gen.cpp index e7513556..d1f34b05 100644 --- a/xml_converter/src/icon_gen.cpp +++ b/xml_converter/src/icon_gen.cpp @@ -1,24 +1,24 @@ #include "icon_gen.hpp" -#include #include -#include "rapid_helpers.hpp" -#include "string_helper.hpp" +#include + #include "attribute/bool.hpp" #include "attribute/float.hpp" #include "attribute/int.hpp" #include "attribute/string.hpp" - +#include "rapid_helpers.hpp" #include "rapidxml-1.13/rapidxml.hpp" +#include "string_helper.hpp" using namespace std; string Icon::classname() { return "POI"; } -bool Icon::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors) { - string attributename; - attributename = normalize(get_attribute_name(attribute)); +bool Icon::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector* errors) { + string attributename; + attributename = normalize(get_attribute_name(attribute)); if (attributename == "achievementbit") { this->achievement_bitmask = parse_int(attribute, errors); this->achievement_bitmask_is_set = true; @@ -344,7 +344,7 @@ vector Icon::as_xml() const { if (this->distance_fade_start_is_set) { xml_node_contents.push_back(" FadeNear=\"" + stringify_float(this->distance_fade_start) + "\""); } - if (this->euler_rotation_is_set) { + if (this->euler_rotation_is_set) { xml_node_contents.push_back(" Rotate=\"" + stringify_euler_rotation(this->euler_rotation) + "\""); } if (this->festival_filter_is_set) { @@ -440,15 +440,15 @@ vector Icon::as_xml() const { if (this->trigger_range_is_set) { xml_node_contents.push_back(" TriggerRange=\"" + stringify_float(this->trigger_range) + "\""); } - if (this->x_position_is_set) { + if (this->x_position_is_set) { xml_node_contents.push_back(" XPos=\"" + to_string(this->x_position) + "\""); } - if (this->y_position_is_set) { + if (this->y_position_is_set) { xml_node_contents.push_back(" YPos=\"" + to_string(this->y_position) + "\""); } - if (this->z_position_is_set) { + if (this->z_position_is_set) { xml_node_contents.push_back(" ZPos=\"" + to_string(this->z_position) + "\""); } xml_node_contents.push_back("/>"); return xml_node_contents; -} \ No newline at end of file +} diff --git a/xml_converter/src/icon_gen.hpp b/xml_converter/src/icon_gen.hpp index d65e7131..23e5e8bc 100644 --- a/xml_converter/src/icon_gen.hpp +++ b/xml_converter/src/icon_gen.hpp @@ -17,124 +17,122 @@ #include "attribute/species_filter_gen.hpp" #include "attribute/unique_id.hpp" #include "parseable.hpp" - #include "rapidxml-1.13/rapidxml.hpp" class XMLError; - -class Icon: public Parseable { - public: - int achievement_bitmask; - bool achievement_bitmask_is_set = false; - int achievement_id; - bool achievement_id_is_set = false; - float alpha; - bool alpha_is_set = false; - bool auto_trigger; - bool auto_trigger_is_set = false; - float bounce_delay; - bool bounce_delay_is_set = false; - float bounce_duration; - bool bounce_duration_is_set = false; - float bounce_height; - bool bounce_height_is_set = false; - bool can_fade; - bool can_fade_is_set = false; - MarkerCategory category; - bool category_is_set = false; - Color color; - bool color_is_set = false; - std::string copy_clipboard; - bool copy_clipboard_is_set = false; - std::string copy_message; - bool copy_message_is_set = false; - CullChirality cull_chirality; - bool cull_chirality_is_set = false; - float distance_fade_end; - bool distance_fade_end_is_set = false; - float distance_fade_start; - bool distance_fade_start_is_set = false; - EulerRotation euler_rotation; - bool euler_rotation_is_set = false; - FestivalFilter festival_filter; - bool festival_filter_is_set = false; - UniqueId guid; - bool guid_is_set = false; - bool has_countdown; - bool has_countdown_is_set = false; - float heightoffset; - bool heightoffset_is_set = false; - MarkerCategory hide_category; - bool hide_category_is_set = false; - Image icon; - bool icon_is_set = false; - float icon_size; - bool icon_size_is_set = false; - std::string info_message; - bool info_message_is_set = false; - bool invert_visibility; - bool invert_visibility_is_set = false; - int map_display_size; - bool map_display_size_is_set = false; - int map_id; - bool map_id_is_set = false; - MapTypeFilter map_type_filter; - bool map_type_filter_is_set = false; - int maximum_size_on_screen; - bool maximum_size_on_screen_is_set = false; - int minimum_size_on_screen; - bool minimum_size_on_screen_is_set = false; - MountFilter mount_filter; - bool mount_filter_is_set = false; - Position position; - bool position_is_set = false; - ProfessionFilter profession_filter; - bool profession_filter_is_set = false; - bool render_ingame; - bool render_ingame_is_set = false; - bool render_on_map; - bool render_on_map_is_set = false; - bool render_on_minimap; - bool render_on_minimap_is_set = false; - ResetBehavior reset_behavior; - bool reset_behavior_is_set = false; - float reset_length; - bool reset_length_is_set = false; - bool scale_on_map_with_zoom; - bool scale_on_map_with_zoom_is_set = false; - std::string schedule; - bool schedule_is_set = false; - float schedule_duration; - bool schedule_duration_is_set = false; - MarkerCategory show_category; - bool show_category_is_set = false; - SpecializationFilter specialization_filter; - bool specialization_filter_is_set = false; - SpeciesFilter species_filter; - bool species_filter_is_set = false; - MarkerCategory toggle_category; - bool toggle_category_is_set = false; - std::string tooltip_description; - bool tooltip_description_is_set = false; - std::string tooltip_name; - bool tooltip_name_is_set = false; - float trigger_range; - bool trigger_range_is_set = false; - float x_position; - bool x_position_is_set = false; - float x_rotation; - bool x_rotation_is_set = false; - float y_position; - bool y_position_is_set = false; - float y_rotation; - bool y_rotation_is_set = false; - float z_position; - bool z_position_is_set = false; - float z_rotation; - bool z_rotation_is_set = false; - virtual std::string classname(); - bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector *errors); - virtual std::vector as_xml() const; - bool validate_attributes_of_type_marker_category(); -}; \ No newline at end of file +class Icon : public Parseable { + public: + int achievement_bitmask; + bool achievement_bitmask_is_set = false; + int achievement_id; + bool achievement_id_is_set = false; + float alpha; + bool alpha_is_set = false; + bool auto_trigger; + bool auto_trigger_is_set = false; + float bounce_delay; + bool bounce_delay_is_set = false; + float bounce_duration; + bool bounce_duration_is_set = false; + float bounce_height; + bool bounce_height_is_set = false; + bool can_fade; + bool can_fade_is_set = false; + MarkerCategory category; + bool category_is_set = false; + Color color; + bool color_is_set = false; + std::string copy_clipboard; + bool copy_clipboard_is_set = false; + std::string copy_message; + bool copy_message_is_set = false; + CullChirality cull_chirality; + bool cull_chirality_is_set = false; + float distance_fade_end; + bool distance_fade_end_is_set = false; + float distance_fade_start; + bool distance_fade_start_is_set = false; + EulerRotation euler_rotation; + bool euler_rotation_is_set = false; + FestivalFilter festival_filter; + bool festival_filter_is_set = false; + UniqueId guid; + bool guid_is_set = false; + bool has_countdown; + bool has_countdown_is_set = false; + float heightoffset; + bool heightoffset_is_set = false; + MarkerCategory hide_category; + bool hide_category_is_set = false; + Image icon; + bool icon_is_set = false; + float icon_size; + bool icon_size_is_set = false; + std::string info_message; + bool info_message_is_set = false; + bool invert_visibility; + bool invert_visibility_is_set = false; + int map_display_size; + bool map_display_size_is_set = false; + int map_id; + bool map_id_is_set = false; + MapTypeFilter map_type_filter; + bool map_type_filter_is_set = false; + int maximum_size_on_screen; + bool maximum_size_on_screen_is_set = false; + int minimum_size_on_screen; + bool minimum_size_on_screen_is_set = false; + MountFilter mount_filter; + bool mount_filter_is_set = false; + Position position; + bool position_is_set = false; + ProfessionFilter profession_filter; + bool profession_filter_is_set = false; + bool render_ingame; + bool render_ingame_is_set = false; + bool render_on_map; + bool render_on_map_is_set = false; + bool render_on_minimap; + bool render_on_minimap_is_set = false; + ResetBehavior reset_behavior; + bool reset_behavior_is_set = false; + float reset_length; + bool reset_length_is_set = false; + bool scale_on_map_with_zoom; + bool scale_on_map_with_zoom_is_set = false; + std::string schedule; + bool schedule_is_set = false; + float schedule_duration; + bool schedule_duration_is_set = false; + MarkerCategory show_category; + bool show_category_is_set = false; + SpecializationFilter specialization_filter; + bool specialization_filter_is_set = false; + SpeciesFilter species_filter; + bool species_filter_is_set = false; + MarkerCategory toggle_category; + bool toggle_category_is_set = false; + std::string tooltip_description; + bool tooltip_description_is_set = false; + std::string tooltip_name; + bool tooltip_name_is_set = false; + float trigger_range; + bool trigger_range_is_set = false; + float x_position; + bool x_position_is_set = false; + float x_rotation; + bool x_rotation_is_set = false; + float y_position; + bool y_position_is_set = false; + float y_rotation; + bool y_rotation_is_set = false; + float z_position; + bool z_position_is_set = false; + float z_rotation; + bool z_rotation_is_set = false; + virtual std::string classname(); + bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors); + virtual std::vector as_xml() const; + bool validate_attributes_of_type_marker_category(); +}; diff --git a/xml_converter/src/parseable.cpp b/xml_converter/src/parseable.cpp index f59ef873..b5299275 100644 --- a/xml_converter/src/parseable.cpp +++ b/xml_converter/src/parseable.cpp @@ -5,25 +5,22 @@ #include #include "rapid_helpers.hpp" - #include "rapidxml-1.13/rapidxml.hpp" - std::string Parseable::classname() { return "Parseable"; } - void Parseable::init_from_xml(rapidxml::xml_node<>* node, std::vector* errors) { for (rapidxml::xml_attribute<>* attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()) { - if (init_xml_attribute(attribute, errors)) {} + if (init_xml_attribute(attribute, errors)) { + } else { errors->push_back(new XMLAttributeNameError("Unknown " + this->classname() + " attribute ", attribute)); } } } - //////////////////////////////////////////////////////////////////////////////// // Parseable::init_xml_attribute // @@ -35,7 +32,6 @@ bool Parseable::init_xml_attribute(rapidxml::xml_attribute<>*, std::vector Parseable::as_xml() const { throw std::runtime_error("error: Parseable::as_xml() should not be called"); std::vector result; diff --git a/xml_converter/src/parseable.hpp b/xml_converter/src/parseable.hpp index 671e1194..42f63088 100644 --- a/xml_converter/src/parseable.hpp +++ b/xml_converter/src/parseable.hpp @@ -12,10 +12,10 @@ class Parseable { virtual std::string classname(); // A default parser function to parse an entire XML node into the class. - void init_from_xml(rapidxml::xml_node<>* node, std::vector *errors); + void init_from_xml(rapidxml::xml_node<>* node, std::vector* errors); // A default parser function to parse a single XML attribute into the class. - virtual bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector *errors); + virtual bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors); virtual std::vector as_xml() const; }; diff --git a/xml_converter/src/rapid_helpers.cpp b/xml_converter/src/rapid_helpers.cpp index d510d4d8..21d42b98 100644 --- a/xml_converter/src/rapid_helpers.cpp +++ b/xml_converter/src/rapid_helpers.cpp @@ -1,6 +1,7 @@ #include "rapid_helpers.hpp" #include + #include #include @@ -30,7 +31,6 @@ string get_node_name(rapidxml::xml_node<>* node) { return string(node->name(), node->name_size()); } - //////////////////////////////////////////////////////////////////////////////// // TextPosition // @@ -44,7 +44,6 @@ struct TextPosition { uint line_length; }; - //////////////////////////////////////////////////////////////////////////////// // get_line_number // @@ -61,7 +60,7 @@ TextPosition get_line_number(char* source, char* start_index) { while (index >= source) { if (*index == '\n') { if (line_start == nullptr) { - line_start = index+1; + line_start = index + 1; } newline_count++; @@ -83,11 +82,9 @@ TextPosition get_line_number(char* source, char* start_index) { newline_count + 1, column_number, line_start, - line_length - }; + line_length}; } - //////////////////////////////////////////////////////////////////////////////// // replace_tabs // @@ -106,7 +103,6 @@ string replace_tabs(string input) { return input; } - //////////////////////////////////////////////////////////////////////////////// // print_generic_error // @@ -139,10 +135,10 @@ string generate_generic_error(string error_message, char* source, string filepat // Calculate the strings for the row of XML that should be shown to the // user, splitting out the value which will be colored. - string prefix = replace_tabs(string(text_position.line_start, text_position.column_number-1)); + string prefix = replace_tabs(string(text_position.line_start, text_position.column_number - 1)); string value = replace_tabs(string(start_index, length)); uint suffix_length = text_position.line_length - length - text_position.column_number; - string suffix = string(start_index+length, suffix_length); + string suffix = string(start_index + length, suffix_length); // Calculate the strings that position and indicate where the error is for // displays that do not use color. @@ -151,7 +147,7 @@ string generate_generic_error(string error_message, char* source, string filepat // Display the formatted lines to the user. return output + line_number_string + " |" + prefix + RED_COLOR + value + DEFAULT_COLOR + suffix + "\n" + - padding_string + " |" + prefix_padding + RED_COLOR + value_markers + DEFAULT_COLOR + "\n"; + padding_string + " |" + prefix_padding + RED_COLOR + value_markers + DEFAULT_COLOR + "\n"; } void XMLError::print_error() { @@ -167,11 +163,9 @@ XMLAttributeNameError::XMLAttributeNameError(string message, rapidxml::xml_attri attribute->document()->source, attribute->document()->source_name, attribute->name(), - attribute->name_size() - ); + attribute->name_size()); } - //////////////////////////////////////////////////////////////////////////////// // Implementation of the constructor for the XMLAttributeValueError subclass. //////////////////////////////////////////////////////////////////////////////// @@ -181,11 +175,9 @@ XMLAttributeValueError::XMLAttributeValueError(string message, rapidxml::xml_att attribute->document()->source, attribute->document()->source_name, attribute->value(), - attribute->value_size() - ); + attribute->value_size()); } - //////////////////////////////////////////////////////////////////////////////// // Implementation of the constructor for the XMLNodeNameError subclass. //////////////////////////////////////////////////////////////////////////////// @@ -195,6 +187,5 @@ XMLNodeNameError::XMLNodeNameError(string message, rapidxml::xml_node<>* node) { node->document()->source, node->document()->source_name, node->name(), - node->name_size() - ); + node->name_size()); } diff --git a/xml_converter/src/rapid_helpers.hpp b/xml_converter/src/rapid_helpers.hpp index 35cb62c5..7c7e1845 100644 --- a/xml_converter/src/rapid_helpers.hpp +++ b/xml_converter/src/rapid_helpers.hpp @@ -4,7 +4,6 @@ #include "rapidxml-1.13/rapidxml.hpp" - std::string find_attribute_value(rapidxml::xml_node<>* node, std::string attribute_name); rapidxml::xml_attribute<>* find_attribute(rapidxml::xml_node<>* node, std::string attribute_name); @@ -13,7 +12,6 @@ std::string get_attribute_value(rapidxml::xml_attribute<>* attribute); std::string get_node_name(rapidxml::xml_node<>* node); - //////////////////////////////////////////////////////////////////////////////// // XMLError // @@ -23,21 +21,22 @@ std::string get_node_name(rapidxml::xml_node<>* node); class XMLError { protected: std::string error_message; + public: void print_error(); }; -class XMLAttributeNameError: public XMLError { +class XMLAttributeNameError : public XMLError { public: XMLAttributeNameError(std::string message, rapidxml::xml_attribute<>* attribute); }; -class XMLAttributeValueError: public XMLError { +class XMLAttributeValueError : public XMLError { public: XMLAttributeValueError(std::string message, rapidxml::xml_attribute<>* attribute); }; -class XMLNodeNameError: public XMLError { +class XMLNodeNameError : public XMLError { public: XMLNodeNameError(std::string message, rapidxml::xml_node<>* node); }; diff --git a/xml_converter/src/string_helper.cpp b/xml_converter/src/string_helper.cpp index fa33ac63..07b92128 100644 --- a/xml_converter/src/string_helper.cpp +++ b/xml_converter/src/string_helper.cpp @@ -6,7 +6,6 @@ #include #include - using namespace std; bool matches_any(string test, std::initializer_list list) { @@ -38,7 +37,6 @@ bool normalized_matches_any(string test, std::vector list) { return false; } - vector split(string input, string delimiter) { vector output; size_t cursor_position = 0; @@ -50,7 +48,6 @@ vector split(string input, string delimiter) { return output; } - //////////////////////////////////////////////////////////////////////////////// // normalize // @@ -63,6 +60,7 @@ vector split(string input, string delimiter) { // All Uppercase Letters A-Z to the lowercase letters a-z // Everything else to 0 //////////////////////////////////////////////////////////////////////////////// +// clang-format off static unsigned char normalize_lookup[256] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -83,6 +81,7 @@ static unsigned char normalize_lookup[256] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; +// clang-format on string normalize(string input_string) { size_t out_index = 0; for (size_t i = 0; i < input_string.length(); i++) { @@ -95,7 +94,6 @@ string normalize(string input_string) { return input_string; } - //////////////////////////////////////////////////////////////////////////////// // lowercase // @@ -117,14 +115,13 @@ string lowercase(string input) { return output; } - // Functions to either encode or decode base64 strings // Obtained from https://stackoverflow.com/questions/180947/base64-decode-snippet-in-c static const char base64_chars[] = - "ABCDEFGHIJKLMNOPQRSTUVWXYZ" - "abcdefghijklmnopqrstuvwxyz" - "0123456789+/"; + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "abcdefghijklmnopqrstuvwxyz" + "0123456789+/"; std::string base64_encode(uint8_t const* buf, unsigned int bufLen) { std::string ret; @@ -141,7 +138,7 @@ std::string base64_encode(uint8_t const* buf, unsigned int bufLen) { char_array_4[2] = ((char_array_3[1] & 0x0f) << 2) + ((char_array_3[2] & 0xc0) >> 6); char_array_4[3] = char_array_3[2] & 0x3f; - for (i = 0; (i <4) ; i++) { + for (i = 0; (i < 4); i++) { ret += base64_chars[char_array_4[i]]; } i = 0; @@ -170,7 +167,6 @@ std::string base64_encode(uint8_t const* buf, unsigned int bufLen) { return ret; } - //////////////////////////////////////////////////////////////////////////////// // This lookup table maps all base64 characters to their numerical equivalents // A-Z 0-25 @@ -181,6 +177,7 @@ std::string base64_encode(uint8_t const* buf, unsigned int bufLen) { // Everything else to 255 (invalid character) // = is invalid because trailing ='s are stripped any any others are invalid //////////////////////////////////////////////////////////////////////////////// +// clang-format off static unsigned char base64_lookup[256] = { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, @@ -201,6 +198,7 @@ static unsigned char base64_lookup[256] = { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }; +// clang-format on std::vector base64_decode(std::string const& encoded_string) { int in_len = encoded_string.size(); @@ -210,7 +208,7 @@ std::vector base64_decode(std::string const& encoded_string) { size_t input_index = 0; size_t output_index = 0; - while (encoded_string[in_len-1] == '=') { + while (encoded_string[in_len - 1] == '=') { in_len -= 1; } @@ -218,7 +216,7 @@ std::vector base64_decode(std::string const& encoded_string) { while (in_len >= 4) { for (int i = 0; i < 4; i++) { - char_array_4[i] = base64_lookup[(uint8_t)encoded_string[input_index+i]]; + char_array_4[i] = base64_lookup[(uint8_t)encoded_string[input_index + i]]; if (char_array_4[i] == 255) { // TODO: Throw an error or something @@ -238,7 +236,7 @@ std::vector base64_decode(std::string const& encoded_string) { if (in_len) { int i = 0; for (; i < in_len; i++) { - char_array_4[i] = base64_lookup[(uint8_t)encoded_string[input_index+i]]; + char_array_4[i] = base64_lookup[(uint8_t)encoded_string[input_index + i]]; if (char_array_4[i] == 255) { // TODO: Throw an error or something diff --git a/xml_converter/src/trail_gen.cpp b/xml_converter/src/trail_gen.cpp index 79a429ae..40106b65 100644 --- a/xml_converter/src/trail_gen.cpp +++ b/xml_converter/src/trail_gen.cpp @@ -3,12 +3,12 @@ #include #include -#include "rapidxml-1.13/rapidxml.hpp" #include "attribute/bool.hpp" #include "attribute/float.hpp" #include "attribute/int.hpp" #include "attribute/string.hpp" #include "rapid_helpers.hpp" +#include "rapidxml-1.13/rapidxml.hpp" #include "string_helper.hpp" using namespace std; @@ -16,9 +16,9 @@ using namespace std; string Trail::classname() { return "Trail"; } -bool Trail::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors) { - string attributename; - attributename = normalize(get_attribute_name(attribute)); +bool Trail::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector* errors) { + string attributename; + attributename = normalize(get_attribute_name(attribute)); if (attributename == "achievementbit") { this->achievement_bitmask = parse_int(attribute, errors); this->achievement_bitmask_is_set = true; @@ -262,4 +262,4 @@ vector Trail::as_xml() const { } xml_node_contents.push_back("/>"); return xml_node_contents; -} \ No newline at end of file +} diff --git a/xml_converter/src/trail_gen.hpp b/xml_converter/src/trail_gen.hpp index f660aded..01fe6eed 100644 --- a/xml_converter/src/trail_gen.hpp +++ b/xml_converter/src/trail_gen.hpp @@ -2,6 +2,7 @@ #include #include + #include "attribute/color.hpp" #include "attribute/cull_chirality_gen.hpp" #include "attribute/festival_filter_gen.hpp" @@ -18,66 +19,66 @@ #include "rapidxml-1.13/rapidxml.hpp" class XMLError; -class Trail: public Parseable { - public: - int achievement_bitmask; - bool achievement_bitmask_is_set = false; - int achievement_id; - bool achievement_id_is_set = false; - float alpha; - bool alpha_is_set = false; - float animation_speed; - bool animation_speed_is_set = false; - bool can_fade; - bool can_fade_is_set = false; - MarkerCategory category; - bool category_is_set = false; - Color color; - bool color_is_set = false; - CullChirality cull_chirality; - bool cull_chirality_is_set = false; - float distance_fade_end; - bool distance_fade_end_is_set = false; - float distance_fade_start; - bool distance_fade_start_is_set = false; - FestivalFilter festival_filter; - bool festival_filter_is_set = false; - UniqueId guid; - bool guid_is_set = false; - bool is_wall; - bool is_wall_is_set = false; - int map_display_size; - bool map_display_size_is_set = false; - int map_id; - bool map_id_is_set = false; - MapTypeFilter map_type_filter; - bool map_type_filter_is_set = false; - MountFilter mount_filter; - bool mount_filter_is_set = false; - ProfessionFilter profession_filter; - bool profession_filter_is_set = false; - bool render_ingame; - bool render_ingame_is_set = false; - bool render_on_map; - bool render_on_map_is_set = false; - bool render_on_minimap; - bool render_on_minimap_is_set = false; - std::string schedule; - bool schedule_is_set = false; - float schedule_duration; - bool schedule_duration_is_set = false; - SpecializationFilter specialization_filter; - bool specialization_filter_is_set = false; - SpeciesFilter species_filter; - bool species_filter_is_set = false; - Image texture; - bool texture_is_set = false; - TrailData trail_data; - bool trail_data_is_set = false; - float trail_scale; - bool trail_scale_is_set = false; - virtual std::string classname(); - bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector *errors); - virtual std::vector as_xml() const; - bool validate_attributes_of_type_marker_category(); -}; \ No newline at end of file +class Trail : public Parseable { + public: + int achievement_bitmask; + bool achievement_bitmask_is_set = false; + int achievement_id; + bool achievement_id_is_set = false; + float alpha; + bool alpha_is_set = false; + float animation_speed; + bool animation_speed_is_set = false; + bool can_fade; + bool can_fade_is_set = false; + MarkerCategory category; + bool category_is_set = false; + Color color; + bool color_is_set = false; + CullChirality cull_chirality; + bool cull_chirality_is_set = false; + float distance_fade_end; + bool distance_fade_end_is_set = false; + float distance_fade_start; + bool distance_fade_start_is_set = false; + FestivalFilter festival_filter; + bool festival_filter_is_set = false; + UniqueId guid; + bool guid_is_set = false; + bool is_wall; + bool is_wall_is_set = false; + int map_display_size; + bool map_display_size_is_set = false; + int map_id; + bool map_id_is_set = false; + MapTypeFilter map_type_filter; + bool map_type_filter_is_set = false; + MountFilter mount_filter; + bool mount_filter_is_set = false; + ProfessionFilter profession_filter; + bool profession_filter_is_set = false; + bool render_ingame; + bool render_ingame_is_set = false; + bool render_on_map; + bool render_on_map_is_set = false; + bool render_on_minimap; + bool render_on_minimap_is_set = false; + std::string schedule; + bool schedule_is_set = false; + float schedule_duration; + bool schedule_duration_is_set = false; + SpecializationFilter specialization_filter; + bool specialization_filter_is_set = false; + SpeciesFilter species_filter; + bool species_filter_is_set = false; + Image texture; + bool texture_is_set = false; + TrailData trail_data; + bool trail_data_is_set = false; + float trail_scale; + bool trail_scale_is_set = false; + virtual std::string classname(); + bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors); + virtual std::vector as_xml() const; + bool validate_attributes_of_type_marker_category(); +}; diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 0b1ee5f4..61ccf636 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -13,18 +13,18 @@ #include "icon_gen.hpp" #include "parseable.hpp" #include "rapid_helpers.hpp" -#include "string_helper.hpp" -#include "trail_gen.hpp" - #include "rapidxml-1.13/rapidxml.hpp" #include "rapidxml-1.13/rapidxml_utils.hpp" +#include "string_helper.hpp" +#include "trail_gen.hpp" using namespace std; -bool has_suffix(std::string const &fullString, std::string const &ending) { +bool has_suffix(std::string const& fullString, std::string const& ending) { if (fullString.length() >= ending.length()) { - return (0 == fullString.compare (fullString.length() - ending.length(), ending.length(), ending)); - } else { + return (0 == fullString.compare(fullString.length() - ending.length(), ending.length(), ending)); + } + else { return false; } } @@ -37,7 +37,7 @@ void write_xml_file(string xml_filepath, map* marker_categorie outfile.open(new_file_path, ios::out); outfile << "\n"; - for (const auto & category : *marker_categories) { + for (const auto& category : *marker_categories) { string text; for (const auto& s : category.second.as_xml()) { text += s; @@ -46,7 +46,7 @@ void write_xml_file(string xml_filepath, map* marker_categorie } outfile << "\n"; - for (const auto & parsed_poi : *parsed_pois) { + for (const auto& parsed_poi : *parsed_pois) { string text; for (const auto& s : parsed_poi->as_xml()) { text += s; @@ -96,7 +96,6 @@ Category* get_category(rapidxml::xml_node<>* node, map* marker return output; } - //////////////////////////////////////////////////////////////////////////////// // parse_pois // @@ -137,7 +136,6 @@ vector parse_pois(rapidxml::xml_node<>* root_node, map* node, map* marker_categories, vector* errors, int depth = 0) { if (get_node_name(node) == "MarkerCategory") { string name = lowercase(find_attribute_value(node, "name")); @@ -146,7 +144,7 @@ void parse_marker_categories(rapidxml::xml_node<>* node, map* this_category->init_from_xml(node, errors); for (rapidxml::xml_node<>* child_node = node->first_node(); child_node; child_node = child_node->next_sibling()) { - parse_marker_categories(child_node, &(this_category->children), errors, depth +1); + parse_marker_categories(child_node, &(this_category->children), errors, depth + 1); } } else { @@ -154,7 +152,6 @@ void parse_marker_categories(rapidxml::xml_node<>* node, map* } } - //////////////////////////////////////////////////////////////////////////////// // parse_xml_file // @@ -201,12 +198,11 @@ bool filename_comp(string a, string b) { return lowercase(a) < lowercase(b); } - vector get_xml_files(string directory) { vector files; vector subfolders; - for (const auto & entry : filesystem::directory_iterator(directory)) { + for (const auto& entry : filesystem::directory_iterator(directory)) { string path = entry.path(); if (entry.is_directory()) { subfolders.push_back(path); @@ -221,9 +217,9 @@ vector get_xml_files(string directory) { std::sort(files.begin(), files.end(), filename_comp); std::sort(subfolders.begin(), subfolders.end(), filename_comp); - for (const string & subfolder : subfolders) { + for (const string& subfolder : subfolders) { vector subfiles = get_xml_files(subfolder); - files.insert(files.end(), subfiles.begin(), subfiles.end() ); + files.insert(files.end(), subfiles.begin(), subfiles.end()); } return files; @@ -232,7 +228,7 @@ vector get_xml_files(string directory) { void convert_taco_directory(string directory, map* marker_categories, vector* parsed_pois) { vector xml_files = get_xml_files(directory); - for (const string & path : xml_files) { + for (const string& path : xml_files) { parse_xml_file(path, marker_categories, parsed_pois); } } @@ -243,7 +239,7 @@ int main() { vector parsed_pois; map marker_categories; - for (const auto & entry : filesystem::directory_iterator("./packs")) { + for (const auto& entry : filesystem::directory_iterator("./packs")) { string path = entry.path(); if (entry.is_directory()) { @@ -259,7 +255,6 @@ int main() { auto ms = std::chrono::duration_cast(dur).count(); cout << "The parse function took " << ms << " milliseconds to run" << endl; - begin = chrono::high_resolution_clock::now(); write_xml_file("./export_packs/", &marker_categories, &parsed_pois); end = chrono::high_resolution_clock::now(); From 9a12fb917f0ac46f169c399111f2a802acab7c67 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sat, 19 Nov 2022 10:37:33 -0600 Subject: [PATCH 115/539] Get ci to run presubmit --- .github/workflows/main.yml | 50 +++++++++++++++++++++++++++++++++----- xml_converter/presubmit.sh | 10 +++++++- 2 files changed, 53 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d4ad6bf6..d19f4fee 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,5 +1,6 @@ -# This workflow will compile the burrio_link and export the burrito binary -# the two files will be available as an artifact. +# This workflow will compile burrio_link.exe, the burrito binary, and any +# additional libraries needed to run. All these files will then be available +# as an artifact. name: CI @@ -33,8 +34,42 @@ jobs: steps: - uses: actions/checkout@v2 - # - name: Update Packages - # run: sudo apt-get update && sudo apt-get upgrade + # `clang-9` must be installed here because of a weird unlisted dependency + # on some sort of file that clang-9 installs. Without it iwyu would + # complain about missing files and error out. + - name: Install include-what-you-use + run: | + sudo apt-get install iwyu + sudo apt-get install clang-9 + + + - name: Install cpplint + run: | + pip3 install cpplint + + + - name: Install xml_converter/generators Dependencies + run: | + cd xml_converter/generators + python3 -m venv venv + source venv/bin/activate + pip install -r requirements.txt + + + - name: Create xml_converter makefile + run: | + cd xml_converter + mkdir build + cd build + cmake .. + cp compile_commands.json ../compile_commands.json + + + - name: Validate xml_converter + run: | + cd xml_converter + ./presubmit.sh + # - name: Cache Godot # id: cache-godot @@ -43,7 +78,7 @@ jobs: # path: ./Godot_v${GODOT_VERSION}-stable_linux_headless.64 # key: ${{ runner.os }}-godot-${GODOT_VERSION}-${CACHE_STRING} - # + - name: Download Godot # if: steps.cache-godot.outputs.cache-hit != 'true' run: | @@ -51,6 +86,7 @@ jobs: unzip Godot_v${GODOT_VERSION}-stable_linux_headless.64.zip rm Godot_v${GODOT_VERSION}-stable_linux_headless.64.zip + # - name: Cache Godot Templates # id: cache-godot-templates # uses: actions/cache@v2 @@ -75,20 +111,22 @@ jobs: run: sudo apt-get install gcc-mingw-w64 - # Runs a single command using the runners shell - name: Create the Output Directory run: mkdir output + - name: Build X11_FG run: | cd burrito-fg cargo build --release + - name: Build taco_parser run: | cd taco_parser cargo build --release + - name: Build Burrito Link run: | cd burrito_link diff --git a/xml_converter/presubmit.sh b/xml_converter/presubmit.sh index a6750061..1e1534d6 100755 --- a/xml_converter/presubmit.sh +++ b/xml_converter/presubmit.sh @@ -24,7 +24,11 @@ filters="" filters+="-readability/todo," # We do not have the same library usage restrictions in C++11 as Google so ignore them filters+="-build/c++11," + # Include subdir might make sense in google's blaze build system but not in ours + filters+="-build/include_subdir," +echo "cpplint" +echo "-------" cpplint --quiet --recursive --exclude="src/rapidxml-1.13" --filter=${filters} src/ if (( $? > 0 )); then error_count=`expr $error_count + 1` @@ -39,14 +43,18 @@ fi # TODO: When this or newer versions of iwyu_tool that carry over the exit codes # from the include-what-you-use command calls are more widely standard this can # be replaced with just a call to iwyu_tool instead. +echo "Include What You Use" +echo "--------------------" ../third_party/iwyu_tool.py -p . -o quiet # include-what-you-use has a "success code" of 2 for a legacy reason. -if (( $? > 2 )); then +if [[ $? -ne 2 ]]; then error_count=`expr $error_count + 1` fi # Validate that clang-format would make no changes +echo "Clang Format" +echo "------------" readarray -d '' FILES < <(find src/ -type f \( -name "*.cpp" -o -name "*.hpp" \) -not -path "*/rapidxml-1.13/*" -print0) clang-format -Werror --dry-run -i "${FILES[@]}" if (( $? > 0 )); then From 28308bdccf22bb0e40cfb238289864459bd4feae Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sat, 19 Nov 2022 15:47:34 -0600 Subject: [PATCH 116/539] removing some data processing steps from the node class generators --- xml_converter/generators/code_generator.py | 33 +++++++++++----------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index a919c77b..21f05e9c 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -306,7 +306,6 @@ def write_cpp_classes(self, output_directory: str) -> None: print("Writing XML Node Cpp Classes") file_loader = FileSystemLoader('cpp_templates') env = Environment(loader=file_loader) - attribute_names: Dict[str, str] = {} header_template: Template = env.get_template("class_template.hpp") code_template: Template = env.get_template("class_template.cpp") attributes_of_type_marker_category: List[str] = [] @@ -316,19 +315,11 @@ def write_cpp_classes(self, output_directory: str) -> None: "Trail": "Trail" } - for filepath in self.data.keys(): - filename = os.path.basename(filepath) - attribute_names[filepath] = filename.split(".md")[0] - for cpp_class in cpp_classes: - metadata: Dict[str, SchemaType] = {} attributes_of_type_marker_category = [] - for attribute_name in attribute_names: - metadata[attribute_name] = self.data[attribute_name].metadata - attribute_variables: List[AttributeVariable] - attribute_variables, cpp_include_paths = self.generate_cpp_variable_data(metadata, cpp_class, attribute_names) + attribute_variables, cpp_include_paths = self.generate_cpp_variable_data(cpp_class) for attribute_variable in attribute_variables: if attribute_variable.class_name == "marker_category": @@ -361,9 +352,7 @@ def write_cpp_classes(self, output_directory: str) -> None: ############################################################################ def generate_cpp_variable_data( self, - metadata: Dict[str, SchemaType], doc_type: str, - attribute_names: Dict[str, str] = {} ) -> Tuple[List[AttributeVariable], Set[str]]: cpp_include_paths: Set[str] = set() @@ -373,29 +362,32 @@ def generate_cpp_variable_data( default_xml_fields: List[str] = [] xml_export: str = "" - for fieldkey, fieldval in metadata.items(): - for x in attribute_names: - if fieldkey in x: - attribute_name = attribute_names[x] + for filepath, document in self.data.items(): + attribute_name = self.variable_name_from_markdown_path(filepath) + fieldval = document.metadata if doc_type in fieldval['applies_to']: xml_fields = [] default_xml_fields = [] xml_export = "" + if fieldval['type'] in doc_type_to_cpp_type: cpp_type = doc_type_to_cpp_type[fieldval['type']] class_name = cpp_type cpp_include_paths.add(class_name) + elif fieldval['type'] == "Custom": if fieldval['class'] == "TrailDataMapId": continue cpp_type = fieldval['class'] class_name = insert_delimiter(fieldval['class'], delimiter="_") cpp_include_paths.add(class_name) + elif fieldval['type'] in ["Enum", "MultiflagValue", "CompoundValue"]: cpp_type = capitalize(attribute_name, delimiter="") class_name = attribute_name cpp_include_paths.add(class_name + "_gen") + else: raise ValueError("Unexpected type {field_type} for attribute {attribute_name}".format( field_type=fieldval['type'], @@ -443,6 +435,15 @@ def generate_cpp_variable_data( return attribute_variables, cpp_include_paths + ############################################################################ + # variable_name_from_markdown_path + # + # Takes the name of a markdown file and returns the variable name that + # should be used internally to store that value. + ############################################################################ + def variable_name_from_markdown_path(self, filepath: str) -> str: + return os.path.splitext(os.path.basename(filepath))[0] + ############################################################################ # write_attributes # From 63418342227ea7ac40bfc83da45d45fadb702ef7 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sat, 19 Nov 2022 18:46:19 -0600 Subject: [PATCH 117/539] updating the generators for the node classes --- xml_converter/generators/code_generator.py | 110 +++++++++++++++--- .../cpp_templates/class_template.cpp | 106 +++++++++-------- .../cpp_templates/class_template.hpp | 80 ++++++------- xml_converter/src/category_gen.cpp | 6 +- xml_converter/src/category_gen.hpp | 2 + xml_converter/src/icon_gen.cpp | 7 +- xml_converter/src/icon_gen.hpp | 3 + xml_converter/src/trail_gen.cpp | 3 + xml_converter/src/trail_gen.hpp | 3 + 9 files changed, 205 insertions(+), 115 deletions(-) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 21f05e9c..7fd111e2 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -248,9 +248,33 @@ class FieldRow: "Int32": "int", "Boolean": "bool", "Float32": "float", - "String": "string", + "String": "std::string", } +documentation_type_data = { + "Fixed32": { + "class_name": "int", + "cpp_type": "int", + }, + "Int32": { + "class_name": "int", + "cpp_type": "int", + }, + "Boolean": { + "class_name": "bool", + "cpp_type": "bool", + }, + "Float32": { + "class_name": "float", + "cpp_type": "float", + }, + "String": { + "class_name": "string", + "cpp_type": "std::string" + } +} + + @dataclass class AttributeVariable: @@ -264,6 +288,36 @@ class AttributeVariable: is_child: bool = False +################################################################################ +# CPPInclude +# +# A series of include paths and forward declarations for a pair of hpp and cpp +# files to use at the top of the file. +################################################################################ +@dataclass +class CPPInclude: + hpp_relative_includes: Set[str] = field(default_factory=set) + hpp_absolute_includes: Set[str] = field(default_factory=set) + hpp_forward_declarations: Set[str] = field(default_factory=set) + cpp_relative_includes: Set[str] = field(default_factory=set) + cpp_absolute_includes: Set[str] = field(default_factory=set) + cpp_forward_declarations: Set[str] = field(default_factory=set) + + def sorted_hpp_relative_includes(self) -> List[str]: + return sorted(self.hpp_relative_includes) + def sorted_hpp_absolute_includes(self) -> List[str]: + return sorted(self.hpp_absolute_includes) + def sorted_hpp_forward_declarations(self) -> List[str]: + return sorted(self.hpp_forward_declarations) + def sorted_cpp_relative_includes(self) -> List[str]: + return sorted(self.cpp_relative_includes) + def sorted_cpp_absolute_includes(self) -> List[str]: + return sorted(self.cpp_absolute_includes) + def sorted_cpp_forward_declarations(self) -> List[str]: + return sorted(self.cpp_forward_declarations) + + + def get_attribute_variable_key(attribute_variable: AttributeVariable) -> str: return attribute_variable.attribute_name @@ -305,7 +359,7 @@ def load_input_doc(self, dir_path: str) -> None: def write_cpp_classes(self, output_directory: str) -> None: print("Writing XML Node Cpp Classes") file_loader = FileSystemLoader('cpp_templates') - env = Environment(loader=file_loader) + env = Environment(loader=file_loader, keep_trailing_newline=True, trim_blocks=True, lstrip_blocks=True) header_template: Template = env.get_template("class_template.hpp") code_template: Template = env.get_template("class_template.cpp") attributes_of_type_marker_category: List[str] = [] @@ -319,7 +373,7 @@ def write_cpp_classes(self, output_directory: str) -> None: attributes_of_type_marker_category = [] attribute_variables: List[AttributeVariable] - attribute_variables, cpp_include_paths = self.generate_cpp_variable_data(cpp_class) + attribute_variables, cpp_includes = self.generate_cpp_variable_data(cpp_class) for attribute_variable in attribute_variables: if attribute_variable.class_name == "marker_category": @@ -329,13 +383,14 @@ def write_cpp_classes(self, output_directory: str) -> None: f.write(header_template.render( cpp_class=cpp_class, attribute_variables=sorted(attribute_variables, key=get_attribute_variable_key), - cpp_include_paths=sorted(cpp_include_paths), + cpp_includes=cpp_includes, attributes_of_type_marker_category=attributes_of_type_marker_category, )) with open(os.path.join(output_directory, lowercase(cpp_class) + "_gen.cpp"), 'w') as f: f.write(code_template.render( cpp_class=cpp_class, + cpp_includes=cpp_includes, cpp_class_header=lowercase(cpp_class), xml_class_name=cpp_classes[cpp_class], attribute_variables=sorted(attribute_variables, key=get_attribute_variable_key), @@ -346,23 +401,41 @@ def write_cpp_classes(self, output_directory: str) -> None: ############################################################################ # generate_cpp_variable_data # - # This will return a list of tuples containing a tuple of the variables - # needed for the templates, and a set of all of the dependencies - # those variables will need to have included. + # Generate a list of all the variables this cpp class will have as well as + # data about what other files need to be included in the associated hpp and + # cpp files. ############################################################################ def generate_cpp_variable_data( self, doc_type: str, - ) -> Tuple[List[AttributeVariable], Set[str]]: + ) -> Tuple[List[AttributeVariable], CPPInclude]: - cpp_include_paths: Set[str] = set() + cpp_includes: CPPInclude = CPPInclude() attribute_name: str = "" attribute_variables: List[AttributeVariable] = [] xml_fields: List[str] = [] default_xml_fields: List[str] = [] xml_export: str = "" - for filepath, document in self.data.items(): + cpp_includes.hpp_absolute_includes.add("string") + cpp_includes.hpp_absolute_includes.add("vector") + cpp_includes.hpp_relative_includes.add("rapidxml-1.13/rapidxml.hpp") + cpp_includes.hpp_relative_includes.add("parseable.hpp") + cpp_includes.hpp_forward_declarations.add("XMLError") + + cpp_includes.cpp_absolute_includes.add("iosfwd") + cpp_includes.cpp_absolute_includes.add("string") + cpp_includes.cpp_relative_includes.add("rapidxml-1.13/rapidxml.hpp") + cpp_includes.cpp_relative_includes.add("string_helper.hpp") + cpp_includes.cpp_relative_includes.add("rapid_helpers.hpp") + + + if (doc_type == "Category"): + cpp_includes.hpp_absolute_includes.add("map") + cpp_includes.hpp_relative_includes.add("icon_gen.hpp") + cpp_includes.hpp_relative_includes.add("trail_gen.hpp") + + for filepath, document in sorted(self.data.items()): attribute_name = self.variable_name_from_markdown_path(filepath) fieldval = document.metadata @@ -371,22 +444,23 @@ def generate_cpp_variable_data( default_xml_fields = [] xml_export = "" - if fieldval['type'] in doc_type_to_cpp_type: - cpp_type = doc_type_to_cpp_type[fieldval['type']] - class_name = cpp_type - cpp_include_paths.add(class_name) + if fieldval['type'] in documentation_type_data: + cpp_type = documentation_type_data[fieldval['type']]["cpp_type"] + class_name = documentation_type_data[fieldval['type']]["class_name"] + cpp_includes.cpp_relative_includes.add("attribute/{}.hpp".format(class_name)) elif fieldval['type'] == "Custom": if fieldval['class'] == "TrailDataMapId": continue cpp_type = fieldval['class'] class_name = insert_delimiter(fieldval['class'], delimiter="_") - cpp_include_paths.add(class_name) + cpp_includes.hpp_relative_includes.add("attribute/{}.hpp".format(class_name)) elif fieldval['type'] in ["Enum", "MultiflagValue", "CompoundValue"]: cpp_type = capitalize(attribute_name, delimiter="") class_name = attribute_name - cpp_include_paths.add(class_name + "_gen") + + cpp_includes.hpp_relative_includes.add("attribute/{}_gen.hpp".format(class_name)) else: raise ValueError("Unexpected type {field_type} for attribute {attribute_name}".format( @@ -433,7 +507,7 @@ def generate_cpp_variable_data( ) attribute_variables.append(attribute_variable) - return attribute_variables, cpp_include_paths + return attribute_variables, cpp_includes ############################################################################ # variable_name_from_markdown_path @@ -454,7 +528,7 @@ def write_attribute(self, output_directory: str) -> None: os.makedirs(output_directory, exist_ok=True) file_loader = FileSystemLoader('cpp_templates') - env = Environment(loader=file_loader) + env = Environment(loader=file_loader, keep_trailing_newline=True, trim_blocks=True) attribute_names: Dict[str, str] = {} attribute_variables: List[AttributeVariable] = [] attribute_variable: AttributeVariable diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index 4e663f36..9fe6b279 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -1,108 +1,118 @@ #include "{{cpp_class_header}}_gen.hpp" -#include -#include + +{% for absolute_include in cpp_includes.sorted_cpp_absolute_includes() %} +#include <{{absolute_include}}> +{% endfor %} + +{% for relative_include in cpp_includes.sorted_cpp_relative_includes() %} +#include "{{relative_include}}" +{% endfor %} + +{% for forward_declaration in cpp_includes.sorted_cpp_forward_declarations() %} +class {{forward_declaration}}; +{% endfor %} using namespace std; string {{cpp_class}}::classname() { return "{{xml_class_name}}"; } -{%- if cpp_class == "Category": %} -void {{cpp_class}}::init_from_xml(rapidxml::xml_node<>* node, vector *errors) { +{% if cpp_class == "Category": %} +void {{cpp_class}}::init_from_xml(rapidxml::xml_node<>* node, vector* errors) { for (rapidxml::xml_attribute<>* attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()) { bool is_icon_value = this->default_icon.init_xml_attribute(attribute, errors); bool is_trail_value = this->default_trail.init_xml_attribute(attribute, errors); - if (init_xml_attribute(attribute, errors)) {} - else if (is_icon_value || is_trail_value) {} + if (init_xml_attribute(attribute, errors)) { + } + else if (is_icon_value || is_trail_value) { + } else { - errors->push_back(new XMLAttributeNameError("Unknown " + this->classname() + " attribute ", attribute)); + errors->push_back(new XMLAttributeNameError("Unknown " + this->classname() + " attribute ", attribute)); } } } +{% endif %} -{%- endif %} -bool {{cpp_class}}::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors) { - string attributename; +bool {{cpp_class}}::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector* errors) { + string attributename; attributename = normalize(get_attribute_name(attribute)); - - - -{%-for n, attribute_variable in enumerate(attribute_variables)%} - {%-for i, value in enumerate(attribute_variable.xml_fields)%} - {%-if i == 0 and n == 0:%} + {% for n, attribute_variable in enumerate(attribute_variables) %} + {% for i, value in enumerate(attribute_variable.xml_fields) %} + {% if i == 0 and n == 0: %} if (attributename == "{{value}}") { this->{{attribute_variable.attribute_name}} = parse_{{attribute_variable.class_name}}(attribute, errors); this->{{attribute_variable.attribute_name}}_is_set = true; } - {%-elif (attribute_variable.attribute_type == "CompoundValue" and attribute_variable.is_child == true) %} + {% elif (attribute_variable.attribute_type == "CompoundValue" and attribute_variable.is_child == true) %} else if (attributename == "{{value}}") { this->{{attribute_variable.attribute_name}} = parse_float(attribute, errors); this->{{attribute_variable.attribute_name}}_is_set = true; } - {%- else: %} + {% else: %} else if (attributename == "{{value}}") { this->{{attribute_variable.attribute_name}} = parse_{{attribute_variable.class_name}}(attribute, errors); this->{{attribute_variable.attribute_name}}_is_set = true; } - {%- endif %} - {%- endfor %} -{%- endfor %} + {% endif %} + {% endfor %} + {% endfor %} else { return false; } return true; } -{%-if attributes_of_type_marker_category %} +{% if attributes_of_type_marker_category %} bool {{cpp_class}}::validate_attributes_of_type_marker_category() { - {%-for attribute in attributes_of_type_marker_category%} + {% for attribute in attributes_of_type_marker_category %} // TODO: validate "{{attribute}}" - {%- endfor %} + {% endfor %} return true; } -{%- endif %} +{% endif %} vector {{cpp_class}}::as_xml() const { vector xml_node_contents; xml_node_contents.push_back("<{{xml_class_name}} "); -{%-for attribute_variable in attribute_variables%} - {%- if (attribute_variable.attribute_type == "CompoundValue")%} - {%-if (attribute_variable.xml_export == "Children" and attribute_variable.is_child == true)%} - if (this->{{attribute_variable.attribute_name}}_is_set) { + {% for attribute_variable in attribute_variables %} + {% if (attribute_variable.attribute_type == "CompoundValue") %} + {% if (attribute_variable.xml_export == "Children" and attribute_variable.is_child == true) %} + if (this->{{attribute_variable.attribute_name}}_is_set) { xml_node_contents.push_back(" {{attribute_variable.default_xml_fields[0]}}=\"" + to_string(this->{{attribute_variable.attribute_name}}) + "\""); - } - {%-elif (attribute_variable.xml_export == "Parent" and attribute_variable.is_child == false)%} - if (this->{{attribute_variable.attribute_name}}_is_set) { + } + {% elif (attribute_variable.xml_export == "Parent" and attribute_variable.is_child == false)%} + if (this->{{attribute_variable.attribute_name}}_is_set) { xml_node_contents.push_back(" {{attribute_variable.default_xml_fields[0]}}=\"" + stringify_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}}) + "\""); } - {%-elif (attribute_variable.xml_export == "Parent and Children")%} - {%-for value in attribute_variable.xml_fields%} - if (this->{{attribute_variable.attribute_name}}_is_set) { + {% elif (attribute_variable.xml_export == "Parent and Children")%} + {% for value in attribute_variable.xml_fields %} + if (this->{{attribute_variable.attribute_name}}_is_set) { xml_node_contents.push_back(" {{value}}=\"" + stringify_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}}) + "\""); - {%- endfor %} + {% endfor %} } - {%- endif %} - {%- else: %} + {% endif %} + {% else: %} if (this->{{attribute_variable.attribute_name}}_is_set) { xml_node_contents.push_back(" {{attribute_variable.default_xml_fields[0]}}=\"" + stringify_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}}) + "\""); } - {%- endif %} - -{%- endfor %} -{%- if cpp_class == "Category": %} + {% endif %} +{% endfor %} +{% if cpp_class == "Category": %} xml_node_contents.push_back(">\n"); - for (const auto& [key, val] : this->children){ - string text; - for (const auto& s: val.as_xml()) { text += s; }; + for (const auto& [key, val] : this->children) { + string text; + for (const auto& s : val.as_xml()) { + text += s; + } xml_node_contents.push_back("\t" + text); } - xml_node_contents.push_back("\n"); -{%- else: %} + xml_node_contents.push_back("\n"); +{% else: %} xml_node_contents.push_back("/>"); -{%- endif %} +{% endif %} return xml_node_contents; } diff --git a/xml_converter/generators/cpp_templates/class_template.hpp b/xml_converter/generators/cpp_templates/class_template.hpp index ef1e06ff..351a8fb4 100644 --- a/xml_converter/generators/cpp_templates/class_template.hpp +++ b/xml_converter/generators/cpp_templates/class_template.hpp @@ -1,47 +1,37 @@ #pragma once -#include "rapidxml-1.13/rapidxml.hpp" -#include -#include -#include "parseable.hpp" -{%- if cpp_class == "Category": %} -#include -#include "icon_gen.hpp" -#include "trail_gen.hpp" -{%- elif cpp_class == "Trail": %} -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "rapidxml-1.13/rapidxml_print.hpp" -{%- endif %} -{% for cpp_include_path in cpp_include_paths %} -#include "attribute/{{cpp_include_path}}.hpp" -{%- endfor %} -using namespace std; - -class {{cpp_class}}: public Parseable { - public: - {%- for attribute_variable in attribute_variables: %} - {{attribute_variable.cpp_type}} {{attribute_variable.attribute_name}}; - bool {{attribute_variable.attribute_name}}_is_set = false; - {%- endfor %} - - {%- if cpp_class == "Category": %} - map children; - Icon default_icon; - Trail default_trail; - - void init_from_xml(rapidxml::xml_node<>* node, vector *errors); - {%- endif %} - virtual string classname(); - bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector *errors); - virtual vector as_xml() const; - {%-if attributes_of_type_marker_category %} - bool validate_attributes_of_type_marker_category(); - {%- endif %} + +{% for absolute_include in cpp_includes.sorted_hpp_absolute_includes() %} +#include <{{absolute_include}}> +{% endfor %} + +{% for relative_include in cpp_includes.sorted_hpp_relative_includes() %} +#include "{{relative_include}}" +{% endfor %} + +{% for forward_declaration in cpp_includes.sorted_hpp_forward_declarations() %} +class {{forward_declaration}}; +{% endfor %} + + + +class {{cpp_class}} : public Parseable { + public: + {% for attribute_variable in attribute_variables: %} + {{attribute_variable.cpp_type}} {{attribute_variable.attribute_name}}; + bool {{attribute_variable.attribute_name}}_is_set = false; + {% endfor %} + + {%- if cpp_class == "Category": %} + std::map children; + Icon default_icon; + Trail default_trail; + + void init_from_xml(rapidxml::xml_node<>* node, std::vector* errors); + {% endif %} + virtual std::string classname(); + bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors); + virtual std::vector as_xml() const; + {% if attributes_of_type_marker_category %} + bool validate_attributes_of_type_marker_category(); + {% endif %} }; diff --git a/xml_converter/src/category_gen.cpp b/xml_converter/src/category_gen.cpp index 807496ce..6ed68a5b 100644 --- a/xml_converter/src/category_gen.cpp +++ b/xml_converter/src/category_gen.cpp @@ -2,7 +2,6 @@ #include #include -#include #include "attribute/bool.hpp" #include "attribute/string.hpp" @@ -10,6 +9,7 @@ #include "rapidxml-1.13/rapidxml.hpp" #include "string_helper.hpp" + using namespace std; string Category::classname() { @@ -29,6 +29,7 @@ void Category::init_from_xml(rapidxml::xml_node<>* node, vector* erro } } } + bool Category::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector* errors) { string attributename; attributename = normalize(get_attribute_name(attribute)); @@ -58,6 +59,7 @@ bool Category::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector Category::as_xml() const { vector xml_node_contents; xml_node_contents.push_back(" Category::as_xml() const { string text; for (const auto& s : val.as_xml()) { text += s; - }; + } xml_node_contents.push_back("\t" + text); } diff --git a/xml_converter/src/category_gen.hpp b/xml_converter/src/category_gen.hpp index f260fef6..dbe3b6e7 100644 --- a/xml_converter/src/category_gen.hpp +++ b/xml_converter/src/category_gen.hpp @@ -11,6 +11,8 @@ class XMLError; + + class Category : public Parseable { public: bool default_visibility; diff --git a/xml_converter/src/icon_gen.cpp b/xml_converter/src/icon_gen.cpp index d1f34b05..f3d93710 100644 --- a/xml_converter/src/icon_gen.cpp +++ b/xml_converter/src/icon_gen.cpp @@ -11,11 +11,13 @@ #include "rapidxml-1.13/rapidxml.hpp" #include "string_helper.hpp" + using namespace std; string Icon::classname() { return "POI"; } + bool Icon::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector* errors) { string attributename; attributename = normalize(get_attribute_name(attribute)); @@ -288,11 +290,12 @@ bool Icon::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector #include @@ -21,6 +22,8 @@ class XMLError; + + class Icon : public Parseable { public: int achievement_bitmask; diff --git a/xml_converter/src/trail_gen.cpp b/xml_converter/src/trail_gen.cpp index 40106b65..bfa7e56a 100644 --- a/xml_converter/src/trail_gen.cpp +++ b/xml_converter/src/trail_gen.cpp @@ -11,11 +11,13 @@ #include "rapidxml-1.13/rapidxml.hpp" #include "string_helper.hpp" + using namespace std; string Trail::classname() { return "Trail"; } + bool Trail::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector* errors) { string attributename; attributename = normalize(get_attribute_name(attribute)); @@ -168,6 +170,7 @@ bool Trail::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector Date: Sat, 19 Nov 2022 19:58:17 -0600 Subject: [PATCH 118/539] updating the generators for the attribute classes --- xml_converter/generators/code_generator.py | 2 +- .../cpp_templates/attribute_template.hpp | 26 ++++++------- .../cpp_templates/compoundvalue.cpp | 37 +++++++++--------- .../generators/cpp_templates/enum.cpp | 35 +++++++++-------- .../cpp_templates/multiflagvalue.cpp | 38 ++++++++++--------- .../src/attribute/euler_rotation_gen.hpp | 2 +- .../src/attribute/festival_filter_gen.hpp | 2 +- .../src/attribute/map_type_filter_gen.hpp | 2 +- .../src/attribute/mount_filter_gen.hpp | 2 +- xml_converter/src/attribute/position_gen.hpp | 2 +- .../src/attribute/profession_filter_gen.hpp | 2 +- .../attribute/specialization_filter_gen.hpp | 2 +- .../src/attribute/species_filter_gen.hpp | 2 +- 13 files changed, 82 insertions(+), 72 deletions(-) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 7fd111e2..405ad4ce 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -528,7 +528,7 @@ def write_attribute(self, output_directory: str) -> None: os.makedirs(output_directory, exist_ok=True) file_loader = FileSystemLoader('cpp_templates') - env = Environment(loader=file_loader, keep_trailing_newline=True, trim_blocks=True) + env = Environment(loader=file_loader, keep_trailing_newline=True, trim_blocks=True, lstrip_blocks=True) attribute_names: Dict[str, str] = {} attribute_variables: List[AttributeVariable] = [] attribute_variable: AttributeVariable diff --git a/xml_converter/generators/cpp_templates/attribute_template.hpp b/xml_converter/generators/cpp_templates/attribute_template.hpp index d9459580..7f414206 100644 --- a/xml_converter/generators/cpp_templates/attribute_template.hpp +++ b/xml_converter/generators/cpp_templates/attribute_template.hpp @@ -3,27 +3,27 @@ #include #include -#include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" -#include "../string_helper.hpp" -using namespace std; +class XMLError; -{%- if type == "Enum":%} +{% if type == "Enum":%} enum {{class_name}} { - {%- for attribute_variable in attribute_variables: %} + {% for attribute_variable in attribute_variables: %} {{attribute_variable.attribute_name}}, -{%- endfor %} + {% endfor %} }; -{%- else: %} +{% else: %} class {{class_name}} { public: - {%- for attribute_variable in attribute_variables: %} + {% for attribute_variable in attribute_variables: %} {{attribute_variable.cpp_type}} {{attribute_variable.attribute_name}}; - {%- endfor %} + {% endfor %} - virtual string classname() { return "{{class_name}}"; }; + virtual std::string classname() { + return "{{class_name}}"; + } }; -{%- endif %} -{{class_name}} parse_{{attribute_name}}(rapidxml::xml_attribute<>* input, vector *errors); -string stringify_{{attribute_name}}({{class_name}} attribute_value); +{% endif %} +{{class_name}} parse_{{attribute_name}}(rapidxml::xml_attribute<>* input, std::vector* errors); +std::string stringify_{{attribute_name}}({{class_name}} attribute_value); diff --git a/xml_converter/generators/cpp_templates/compoundvalue.cpp b/xml_converter/generators/cpp_templates/compoundvalue.cpp index acead274..4c876208 100644 --- a/xml_converter/generators/cpp_templates/compoundvalue.cpp +++ b/xml_converter/generators/cpp_templates/compoundvalue.cpp @@ -1,38 +1,41 @@ #include "{{attribute_name}}_gen.hpp" +#include #include #include -#include #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" +#include "../string_helper.hpp" -{{class_name}} parse_{{attribute_name}}(rapidxml::xml_attribute<>* input, vector *){ +using namespace std; + +{{class_name}} parse_{{attribute_name}}(rapidxml::xml_attribute<>* input, vector*) { {{class_name}} {{attribute_name}}; vector compound_values; string attributename; -{%- for attribute_variable in attribute_variables: %} +{% for attribute_variable in attribute_variables: %} {{attribute_name}}.{{attribute_variable.attribute_name}} = 0; -{%- endfor %} - attributename = get_attribute_name(input); +{% endfor %} + attributename = get_attribute_name(input); compound_values = split(get_attribute_value(input), ","); - if (compound_values.size() == 3){ -{%-for n, attribute_variable in enumerate(attribute_variables)%} - {{attribute_name}}.{{attribute_variables[n].attribute_name}} = std::stof(compound_values[{{n}}]); -{%- endfor %} + if (compound_values.size() == {{ attribute_variables|length }}) { +{% for n, attribute_variable in enumerate(attribute_variables) %} + {{attribute_name}}.{{attribute_variables[n].attribute_name}} = std::stof(compound_values[{{n}}]); +{% endfor %} } return {{attribute_name}}; } -{%-if attribute_variables[0].xml_export == "Parent"%} -string stringify_{{attribute_name}}({{class_name}} attribute_value){ +{% if attribute_variables[0].xml_export == "Parent" %} +string stringify_{{attribute_name}}({{class_name}} attribute_value) { string output; - {%-for n, attribute_variable in enumerate(attribute_variables)%} - {%-if n == 0:%} + {% for n, attribute_variable in enumerate(attribute_variables) %} + {% if n == 0: %} output = to_string(attribute_value.{{attribute_variables[n].attribute_name}}); - {%- else %} + {% else %} output = output + "," + to_string(attribute_value.{{attribute_variables[n].attribute_name}}); - {%- endif %} - {%- endfor %} + {% endif %} + {% endfor %} return output; } -{%- endif %} +{% endif %} diff --git a/xml_converter/generators/cpp_templates/enum.cpp b/xml_converter/generators/cpp_templates/enum.cpp index f9396688..210659aa 100644 --- a/xml_converter/generators/cpp_templates/enum.cpp +++ b/xml_converter/generators/cpp_templates/enum.cpp @@ -1,28 +1,31 @@ #include "{{attribute_name}}_gen.hpp" +#include #include #include #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" +#include "../string_helper.hpp" -{{class_name}} parse_{{attribute_name}}(rapidxml::xml_attribute<>* input, vector *errors){ +using namespace std; + +{{class_name}} parse_{{attribute_name}}(rapidxml::xml_attribute<>* input, vector* errors) { {{class_name}} {{attribute_name}}; string normalized_value = normalize(get_attribute_value(input)); -{%-for n, attribute_variable in enumerate(attribute_variables)%} - {%-for i, value in enumerate(attribute_variable.xml_fields)%} - {%-if i == 0 and n == 0:%} + {% for n, attribute_variable in enumerate(attribute_variables) %} + {% for i, value in enumerate(attribute_variable.xml_fields) %} + {% if i == 0 and n == 0: %} if (normalized_value == "{{value}}") { {{attribute_name}} = {{class_name}}::{{attribute_variable.attribute_name}}; } - {%- else: %} + {% else: %} else if (normalized_value == "{{value}}") { {{attribute_name}} = {{class_name}}::{{attribute_variable.attribute_name}}; } - {%- endif %} - {%- endfor %} - -{%- endfor %} + {% endif %} + {% endfor %} + {% endfor %} else { errors->push_back(new XMLAttributeValueError("Found an invalid value that was not in the Enum {{class_name}}", input)); {{attribute_name}} = {{class_name}}::{{attribute_variables[0].attribute_name}}; @@ -30,20 +33,20 @@ return {{attribute_name}}; } -string stringify_{{attribute_name}}({{class_name}} attribute_value){ -{%-for n, attribute_variable in enumerate(attribute_variables)%} - {%-for i, value in enumerate(attribute_variable.xml_fields)%} +string stringify_{{attribute_name}}({{class_name}} attribute_value) { + {% for n, attribute_variable in enumerate(attribute_variables) %} + {% for i, value in enumerate(attribute_variable.xml_fields) %} {%-if i == 0 and n == 0:%} if (attribute_value == {{class_name}}::{{attribute_variable.attribute_name}}) { return "{{value}}"; } - {%- else: %} + {% else: %} else if (attribute_value == {{class_name}}::{{attribute_variable.attribute_name}}) { return "{{value}}"; } - {%- endif %} - {%- endfor %} -{%- endfor %} + {% endif %} + {% endfor %} + {% endfor %} else { return "{{class_name}}::{{attribute_variables[0].xml_fields[0]}}"; } diff --git a/xml_converter/generators/cpp_templates/multiflagvalue.cpp b/xml_converter/generators/cpp_templates/multiflagvalue.cpp index 67628dce..abd3a8e4 100644 --- a/xml_converter/generators/cpp_templates/multiflagvalue.cpp +++ b/xml_converter/generators/cpp_templates/multiflagvalue.cpp @@ -1,34 +1,38 @@ #include "{{attribute_name}}_gen.hpp" +#include #include #include #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" +#include "../string_helper.hpp" -{{class_name}} parse_{{attribute_name}}(rapidxml::xml_attribute<>* input, vector *errors){ +using namespace std; + +{{class_name}} parse_{{attribute_name}}(rapidxml::xml_attribute<>* input, vector* errors) { {{class_name}} {{attribute_name}}; vector flag_values; flag_values = split(get_attribute_value(input), ","); -{%-for attribute_variable in attribute_variables%} +{% for attribute_variable in attribute_variables %} {{attribute_name}}.{{attribute_variable.attribute_name}} = false; -{%- endfor %} - +{% endfor %} + for (string flag_value : flag_values) { string normalized_flag_value = normalize(flag_value); -{%-for n, attribute_variable in enumerate(attribute_variables)%} - {%-for i, value in enumerate(attribute_variable.xml_fields)%} - {%-if i == 0 and n == 0:%} + {% for n, attribute_variable in enumerate(attribute_variables) %} + {% for i, value in enumerate(attribute_variable.xml_fields) %} + {% if i == 0 and n == 0: %} if (normalized_flag_value == "{{value}}") { - {{attribute_name}}.{{attribute_variable.attribute_name}} = true; + {{attribute_name}}.{{attribute_variable.attribute_name}} = true; } - {%- else: %} + {% else: %} else if (normalized_flag_value == "{{value}}") { - {{attribute_name}}.{{attribute_variable.attribute_name}} = true; + {{attribute_name}}.{{attribute_variable.attribute_name}} = true; } - {%- endif %} - {%- endfor %} -{%- endfor %} + {% endif %} + {%- endfor %} + {%- endfor %} else { errors->push_back(new XMLAttributeValueError("Invalid Filter for {{class_name}}. Found " + flag_value, input)); continue; @@ -37,12 +41,12 @@ return {{attribute_name}}; } -string stringify_{{attribute_name}}({{class_name}} attribute_value){ +string stringify_{{attribute_name}}({{class_name}} attribute_value) { string output = ""; -{%-for n, attribute_variable in enumerate(attribute_variables)%} - if (attribute_value.{{attribute_variable.attribute_name}} == true){ +{% for n, attribute_variable in enumerate(attribute_variables)%} + if (attribute_value.{{attribute_variable.attribute_name}} == true) { output = output + "{{attribute_variable.xml_fields[0]}}"; } -{%- endfor %} +{% endfor %} return output; } diff --git a/xml_converter/src/attribute/euler_rotation_gen.hpp b/xml_converter/src/attribute/euler_rotation_gen.hpp index 301dec7e..e65e5460 100644 --- a/xml_converter/src/attribute/euler_rotation_gen.hpp +++ b/xml_converter/src/attribute/euler_rotation_gen.hpp @@ -15,7 +15,7 @@ class EulerRotation { virtual std::string classname() { return "EulerRotation"; - }; + } }; EulerRotation parse_euler_rotation(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_euler_rotation(EulerRotation attribute_value); diff --git a/xml_converter/src/attribute/festival_filter_gen.hpp b/xml_converter/src/attribute/festival_filter_gen.hpp index 58733e58..1fb54bfe 100644 --- a/xml_converter/src/attribute/festival_filter_gen.hpp +++ b/xml_converter/src/attribute/festival_filter_gen.hpp @@ -19,7 +19,7 @@ class FestivalFilter { virtual std::string classname() { return "FestivalFilter"; - }; + } }; FestivalFilter parse_festival_filter(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_festival_filter(FestivalFilter attribute_value); diff --git a/xml_converter/src/attribute/map_type_filter_gen.hpp b/xml_converter/src/attribute/map_type_filter_gen.hpp index 1c0ecb02..f2ea9d64 100644 --- a/xml_converter/src/attribute/map_type_filter_gen.hpp +++ b/xml_converter/src/attribute/map_type_filter_gen.hpp @@ -36,7 +36,7 @@ class MapTypeFilter { virtual std::string classname() { return "MapTypeFilter"; - }; + } }; MapTypeFilter parse_map_type_filter(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_map_type_filter(MapTypeFilter attribute_value); diff --git a/xml_converter/src/attribute/mount_filter_gen.hpp b/xml_converter/src/attribute/mount_filter_gen.hpp index 48e37de9..1316b29e 100644 --- a/xml_converter/src/attribute/mount_filter_gen.hpp +++ b/xml_converter/src/attribute/mount_filter_gen.hpp @@ -22,7 +22,7 @@ class MountFilter { virtual std::string classname() { return "MountFilter"; - }; + } }; MountFilter parse_mount_filter(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_mount_filter(MountFilter attribute_value); diff --git a/xml_converter/src/attribute/position_gen.hpp b/xml_converter/src/attribute/position_gen.hpp index 31f7e116..e24e1fe8 100644 --- a/xml_converter/src/attribute/position_gen.hpp +++ b/xml_converter/src/attribute/position_gen.hpp @@ -15,7 +15,7 @@ class Position { virtual std::string classname() { return "Position"; - }; + } }; Position parse_position(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_position(Position attribute_value); diff --git a/xml_converter/src/attribute/profession_filter_gen.hpp b/xml_converter/src/attribute/profession_filter_gen.hpp index 261265ab..391788fe 100644 --- a/xml_converter/src/attribute/profession_filter_gen.hpp +++ b/xml_converter/src/attribute/profession_filter_gen.hpp @@ -21,7 +21,7 @@ class ProfessionFilter { virtual std::string classname() { return "ProfessionFilter"; - }; + } }; ProfessionFilter parse_profession_filter(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_profession_filter(ProfessionFilter attribute_value); diff --git a/xml_converter/src/attribute/specialization_filter_gen.hpp b/xml_converter/src/attribute/specialization_filter_gen.hpp index 8094df9e..6fbc45d2 100644 --- a/xml_converter/src/attribute/specialization_filter_gen.hpp +++ b/xml_converter/src/attribute/specialization_filter_gen.hpp @@ -84,7 +84,7 @@ class SpecializationFilter { virtual std::string classname() { return "SpecializationFilter"; - }; + } }; SpecializationFilter parse_specialization_filter(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_specialization_filter(SpecializationFilter attribute_value); diff --git a/xml_converter/src/attribute/species_filter_gen.hpp b/xml_converter/src/attribute/species_filter_gen.hpp index fd8356fb..e5967b1a 100644 --- a/xml_converter/src/attribute/species_filter_gen.hpp +++ b/xml_converter/src/attribute/species_filter_gen.hpp @@ -17,7 +17,7 @@ class SpeciesFilter { virtual std::string classname() { return "SpeciesFilter"; - }; + } }; SpeciesFilter parse_species_filter(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_species_filter(SpeciesFilter attribute_value); From 36de7091a2b30a57986c1ad26ac8fbe25232efb1 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sat, 19 Nov 2022 20:35:54 -0600 Subject: [PATCH 119/539] fixing various final linter errors --- xml_converter/generators/code_generator.py | 13 +++++++++---- .../generators/cpp_templates/class_template.cpp | 4 ++-- .../generators/cpp_templates/class_template.hpp | 2 -- xml_converter/src/category_gen.cpp | 4 +--- xml_converter/src/category_gen.hpp | 2 -- xml_converter/src/icon_gen.cpp | 2 -- xml_converter/src/icon_gen.hpp | 2 -- xml_converter/src/trail_gen.cpp | 2 -- xml_converter/src/trail_gen.hpp | 2 -- 9 files changed, 12 insertions(+), 21 deletions(-) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 405ad4ce..4332e218 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -242,7 +242,8 @@ class FieldRow: sub_fields: List["FieldRow"] description: str - +# TODO: Eventually replace all references to `doc_type_to_cpp_type` with +# references to `documentation_type_data` because they contain the same data doc_type_to_cpp_type: Dict[str, str] = { "Fixed32": "int", "Int32": "int", @@ -275,7 +276,6 @@ class FieldRow: } - @dataclass class AttributeVariable: attribute_name: str @@ -305,19 +305,23 @@ class CPPInclude: def sorted_hpp_relative_includes(self) -> List[str]: return sorted(self.hpp_relative_includes) + def sorted_hpp_absolute_includes(self) -> List[str]: return sorted(self.hpp_absolute_includes) + def sorted_hpp_forward_declarations(self) -> List[str]: return sorted(self.hpp_forward_declarations) + def sorted_cpp_relative_includes(self) -> List[str]: return sorted(self.cpp_relative_includes) + def sorted_cpp_absolute_includes(self) -> List[str]: return sorted(self.cpp_absolute_includes) + def sorted_cpp_forward_declarations(self) -> List[str]: return sorted(self.cpp_forward_declarations) - def get_attribute_variable_key(attribute_variable: AttributeVariable) -> str: return attribute_variable.attribute_name @@ -429,12 +433,13 @@ def generate_cpp_variable_data( cpp_includes.cpp_relative_includes.add("string_helper.hpp") cpp_includes.cpp_relative_includes.add("rapid_helpers.hpp") - if (doc_type == "Category"): cpp_includes.hpp_absolute_includes.add("map") cpp_includes.hpp_relative_includes.add("icon_gen.hpp") cpp_includes.hpp_relative_includes.add("trail_gen.hpp") + cpp_includes.cpp_absolute_includes.add("type_traits") + for filepath, document in sorted(self.data.items()): attribute_name = self.variable_name_from_markdown_path(filepath) fieldval = document.metadata diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index 9fe6b279..a609e47e 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -11,7 +11,6 @@ {% for forward_declaration in cpp_includes.sorted_cpp_forward_declarations() %} class {{forward_declaration}}; {% endfor %} - using namespace std; string {{cpp_class}}::classname() { @@ -63,7 +62,8 @@ bool {{cpp_class}}::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vec return true; } -{% if attributes_of_type_marker_category %} +{%- if attributes_of_type_marker_category %} + bool {{cpp_class}}::validate_attributes_of_type_marker_category() { {% for attribute in attributes_of_type_marker_category %} // TODO: validate "{{attribute}}" diff --git a/xml_converter/generators/cpp_templates/class_template.hpp b/xml_converter/generators/cpp_templates/class_template.hpp index 351a8fb4..65fa1524 100644 --- a/xml_converter/generators/cpp_templates/class_template.hpp +++ b/xml_converter/generators/cpp_templates/class_template.hpp @@ -12,8 +12,6 @@ class {{forward_declaration}}; {% endfor %} - - class {{cpp_class}} : public Parseable { public: {% for attribute_variable in attribute_variables: %} diff --git a/xml_converter/src/category_gen.cpp b/xml_converter/src/category_gen.cpp index 6ed68a5b..6a1df242 100644 --- a/xml_converter/src/category_gen.cpp +++ b/xml_converter/src/category_gen.cpp @@ -2,6 +2,7 @@ #include #include +#include #include "attribute/bool.hpp" #include "attribute/string.hpp" @@ -9,7 +10,6 @@ #include "rapidxml-1.13/rapidxml.hpp" #include "string_helper.hpp" - using namespace std; string Category::classname() { @@ -58,8 +58,6 @@ bool Category::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector Category::as_xml() const { vector xml_node_contents; xml_node_contents.push_back("* attribute, vector* attribute, vector Date: Sat, 19 Nov 2022 21:46:48 -0600 Subject: [PATCH 120/539] installing protoc earlier then the first cmake command --- .github/workflows/main.yml | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6e7e6787..ef89e8ea 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -56,12 +56,18 @@ jobs: pip install -r requirements.txt - - name: Create xml_converter makefile + - name: Install protoc + run: sudo apt-get install protobuf-compiler + + + - name: Build xml_converter run: | cd xml_converter mkdir -v -p build cd build cmake .. + make + mv xml_converter ../../output cp compile_commands.json ../compile_commands.json @@ -126,17 +132,6 @@ jobs: cd taco_parser cargo build --release - - name: Install protoc - run: sudo apt-get install protobuf-compiler - - - name: Build xml_converter - run: | - cd xml_converter - mkdir -v -p build - cd build - cmake .. - make - mv xml_converter ../../output - name: Build Burrito Link run: | From ff5152a6e3c0cf00f1671bb95c598dfc9a31927a Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sat, 19 Nov 2022 21:56:30 -0600 Subject: [PATCH 121/539] fixing python lint error --- .github/workflows/main.yml | 9 ++++----- xml_converter/generators/code_generator.py | 1 + 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ef89e8ea..a6a6b614 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -34,6 +34,9 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Create the Output Directory + run: mkdir -v -p output + # `clang-9` must be installed here because of a weird unlisted dependency # on some sort of file that clang-9 installs. Without it iwyu would # complain about missing files and error out. @@ -67,7 +70,7 @@ jobs: cd build cmake .. make - mv xml_converter ../../output + mv xml_converter ../../output/ cp compile_commands.json ../compile_commands.json @@ -115,10 +118,6 @@ jobs: - name: Install mingw run: sudo apt-get install gcc-mingw-w64 - - - - name: Create the Output Directory - run: mkdir -v -p output - name: Build X11_FG diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index e0765600..f23584df 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -220,6 +220,7 @@ def validate_front_matter_schema(front_matter: Any) -> str: return "Error Message: {} (Path: {}".format(e.message, e.json_path) return "" + @dataclass class Document: metadata: SchemaType From 7c03bf77f574e28442efc02f84a1bbc071e44f52 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sun, 20 Nov 2022 14:57:18 -0600 Subject: [PATCH 122/539] Pin Runner OS Version Pinning runner operating system version so forks can run tests correctly. --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a6a6b614..9a10e84b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -28,7 +28,7 @@ jobs: # This workflow contains a single job called "build" Build-Linux: # The type of runner that the job will run on - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 # Steps represent a sequence of tasks that will be executed as part of the job steps: From 539c2a62f5daaa7021f2354145bc76cb8b2e46cf Mon Sep 17 00:00:00 2001 From: klingbolt Date: Wed, 23 Nov 2022 00:20:54 -0500 Subject: [PATCH 123/539] Beginning work on the as_protobuf functions --- .../doc/acheivement/achievement_bitmask.md | 2 +- .../doc/tooltip/tooltip_description.md | 10 +- xml_converter/doc/tooltip/tooltip_name.md | 10 +- xml_converter/doc/trigger/guid.md | 2 +- xml_converter/doc/trigger/toggle_category.md | 2 +- xml_converter/generators/code_generator.py | 31 ++- .../cpp_templates/attribute_template.hpp | 2 + .../cpp_templates/class_template.cpp | 45 ++++ .../cpp_templates/class_template.hpp | 6 +- xml_converter/proto/waypoint.proto | 33 ++- xml_converter/src/attribute/bool.cpp | 15 ++ xml_converter/src/attribute/bool.hpp | 3 + xml_converter/src/attribute/color.cpp | 11 + xml_converter/src/attribute/color.hpp | 3 + .../src/attribute/cull_chirality_gen.hpp | 2 + .../src/attribute/euler_rotation_gen.hpp | 2 + .../src/attribute/festival_filter_gen.hpp | 2 + xml_converter/src/attribute/float.cpp | 9 + xml_converter/src/attribute/float.hpp | 3 + xml_converter/src/attribute/image.cpp | 11 + xml_converter/src/attribute/image.hpp | 3 + xml_converter/src/attribute/int.cpp | 9 + xml_converter/src/attribute/int.hpp | 3 + .../src/attribute/map_type_filter_gen.hpp | 2 + .../src/attribute/marker_category.cpp | 13 + .../src/attribute/marker_category.hpp | 3 + .../src/attribute/mount_filter_gen.hpp | 2 + xml_converter/src/attribute/position_gen.hpp | 2 + .../src/attribute/profession_filter_gen.hpp | 2 + .../src/attribute/reset_behavior_gen.hpp | 2 + .../attribute/specialization_filter_gen.hpp | 2 + .../src/attribute/species_filter_gen.hpp | 2 + xml_converter/src/attribute/string.cpp | 11 + xml_converter/src/attribute/string.hpp | 3 + xml_converter/src/attribute/trail_data.cpp | 21 ++ xml_converter/src/attribute/trail_data.hpp | 3 + .../src/attribute/trail_data_map_id.cpp | 23 ++ .../src/attribute/trail_data_map_id.hpp | 3 + xml_converter/src/attribute/unique_id.cpp | 6 + xml_converter/src/attribute/unique_id.hpp | 3 + xml_converter/src/category_gen.cpp | 38 ++- xml_converter/src/category_gen.hpp | 7 +- xml_converter/src/icon_gen.cpp | 238 +++++++++++++++++- xml_converter/src/icon_gen.hpp | 2 + xml_converter/src/parseable.cpp | 6 + xml_converter/src/parseable.hpp | 3 + xml_converter/src/trail_gen.cpp | 122 +++++++++ xml_converter/src/trail_gen.hpp | 2 + xml_converter/src/xml_converter.cpp | 33 ++- 49 files changed, 731 insertions(+), 42 deletions(-) diff --git a/xml_converter/doc/acheivement/achievement_bitmask.md b/xml_converter/doc/acheivement/achievement_bitmask.md index 9b4cdf15..15d5f871 100644 --- a/xml_converter/doc/acheivement/achievement_bitmask.md +++ b/xml_converter/doc/acheivement/achievement_bitmask.md @@ -4,7 +4,7 @@ type: Fixed32 applies_to: [Icon, Trail] compatability: [TacO, BlishHUD, Burrito] xml_fields: ["AchievementBit"] -protobuf_field: achievement_bitmask +protobuf_field: achievement_bit --- A portion of an achievement that, if completed, will hide this marker. diff --git a/xml_converter/doc/tooltip/tooltip_description.md b/xml_converter/doc/tooltip/tooltip_description.md index 0c9df800..5c315f68 100644 --- a/xml_converter/doc/tooltip/tooltip_description.md +++ b/xml_converter/doc/tooltip/tooltip_description.md @@ -1,12 +1,12 @@ --- -name: Tooltip Name +name: Tooltip Description type: String -applies_to: [Icon] -xml_fields: [TipName] -protobuf_field: tip_name +applies_to: [Icon, Category] +xml_fields: [TipDescription] +protobuf_field: tip_description compatability: [TacO, BlishHUD, Burrito] --- -The name of the tooltip when hovering over the minimap. +The full text of the tooltip. Notes ===== diff --git a/xml_converter/doc/tooltip/tooltip_name.md b/xml_converter/doc/tooltip/tooltip_name.md index 5c315f68..0c9df800 100644 --- a/xml_converter/doc/tooltip/tooltip_name.md +++ b/xml_converter/doc/tooltip/tooltip_name.md @@ -1,12 +1,12 @@ --- -name: Tooltip Description +name: Tooltip Name type: String -applies_to: [Icon, Category] -xml_fields: [TipDescription] -protobuf_field: tip_description +applies_to: [Icon] +xml_fields: [TipName] +protobuf_field: tip_name compatability: [TacO, BlishHUD, Burrito] --- -The full text of the tooltip. +The name of the tooltip when hovering over the minimap. Notes ===== diff --git a/xml_converter/doc/trigger/guid.md b/xml_converter/doc/trigger/guid.md index 625b22bf..9e2451da 100644 --- a/xml_converter/doc/trigger/guid.md +++ b/xml_converter/doc/trigger/guid.md @@ -4,7 +4,7 @@ type: Custom class: UniqueId xml_fields: ["GUID"] applies_to: ["Icon", "Trail"] -protobuf_field: "guid" +protobuf_field: guid compatability: [TacO, BlishHUD, Burrito] --- A globally unique identifier value to make sure this maker's trigger reset data is always assocaited with this marker and never lost or confused with other markers. diff --git a/xml_converter/doc/trigger/toggle_category.md b/xml_converter/doc/trigger/toggle_category.md index 8d73e457..21b2881b 100644 --- a/xml_converter/doc/trigger/toggle_category.md +++ b/xml_converter/doc/trigger/toggle_category.md @@ -3,7 +3,7 @@ name: Toggle Category type: Custom class: MarkerCategory applies_to: [Icon] -xml_fields: [Toggle] +xml_fields: [Toggle, toggleCategory] protobuf_field: trigger.action_toggle_category compatability: [TacO, BlishHUD, Burrito] --- diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index f23584df..5d6f547e 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -284,9 +284,11 @@ class AttributeVariable: cpp_type: str class_name: str xml_fields: List[str] + protobuf_field: str default_xml_fields: List[str] = field(default_factory=list) xml_export: str = "" is_child: bool = False + is_trigger: bool = False ################################################################################ @@ -389,6 +391,7 @@ def write_cpp_classes(self, output_directory: str) -> None: cpp_class=cpp_class, attribute_variables=sorted(attribute_variables, key=get_attribute_variable_key), cpp_includes=cpp_includes, + cpp_class_header=lowercase(cpp_class), attributes_of_type_marker_category=attributes_of_type_marker_category, )) @@ -421,6 +424,8 @@ def generate_cpp_variable_data( xml_fields: List[str] = [] default_xml_fields: List[str] = [] xml_export: str = "" + protobuf_field: str = "" + is_trigger: bool = False; cpp_includes.hpp_absolute_includes.add("string") cpp_includes.hpp_absolute_includes.add("vector") @@ -494,6 +499,7 @@ def generate_cpp_variable_data( xml_fields=component_xml_fields, default_xml_fields=component_default_xml_fields, xml_export=xml_export, + protobuf_field=fieldval["protobuf_field"], is_child=True, ) attribute_variables.append(component_attribute_variable) @@ -502,6 +508,13 @@ def generate_cpp_variable_data( xml_fields.append(lowercase(x, delimiter="")) default_xml_fields.append(fieldval['xml_fields'][0]) + if fieldval["protobuf_field"].startswith("trigger"): + is_trigger = True + protobuf_field = fieldval["protobuf_field"].split('.')[1] + else: + is_trigger = False + protobuf_field = fieldval["protobuf_field"] + attribute_variable = AttributeVariable( attribute_name=attribute_name, attribute_type=fieldval["type"], @@ -510,6 +523,8 @@ def generate_cpp_variable_data( xml_fields=xml_fields, default_xml_fields=default_xml_fields, xml_export=xml_export, + protobuf_field=protobuf_field, + is_trigger=is_trigger, ) attribute_variables.append(attribute_variable) @@ -540,6 +555,7 @@ def write_attribute(self, output_directory: str) -> None: attribute_variable: AttributeVariable metadata: Dict[str, SchemaType] = {} xml_fields: List[str] = [] + is_trigger: bool = False template: Dict[str, Template] = { "MultiflagValue": env.get_template("multiflagvalue.cpp"), "CompoundValue": env.get_template("compoundvalue.cpp"), @@ -555,6 +571,13 @@ def write_attribute(self, output_directory: str) -> None: attribute_name = attribute_names[filepath] metadata[filepath] = self.data[filepath].metadata + if metadata[filepath]["protobuf_field"].startswith("trigger"): + is_trigger = True + protobuf_field = metadata[filepath]["protobuf_field"].split('.')[1] + else: + is_trigger = False + protobuf_field = metadata[filepath]["protobuf_field"] + if metadata[filepath]['type'] == "MultiflagValue": for flag in metadata[filepath]['flags']: xml_fields = [] @@ -567,6 +590,8 @@ def write_attribute(self, output_directory: str) -> None: cpp_type="bool", class_name=attribute_name, xml_fields=xml_fields, + protobuf_field=protobuf_field, + is_trigger=is_trigger, ) attribute_variables.append(attribute_variable) @@ -586,6 +611,8 @@ def write_attribute(self, output_directory: str) -> None: class_name=attribute_name, xml_fields=xml_fields, xml_export=metadata[filepath]["xml_export"], + protobuf_field=protobuf_field, + is_trigger=is_trigger, ) attribute_variables.append(attribute_variable) @@ -599,7 +626,9 @@ def write_attribute(self, output_directory: str) -> None: attribute_type=metadata[filepath]['type'], cpp_type="str", class_name=attribute_name, - xml_fields=xml_fields + xml_fields=xml_fields, + protobuf_field=protobuf_field, + is_trigger=is_trigger, ) attribute_variables.append(attribute_variable) diff --git a/xml_converter/generators/cpp_templates/attribute_template.hpp b/xml_converter/generators/cpp_templates/attribute_template.hpp index 7f414206..8dc18659 100644 --- a/xml_converter/generators/cpp_templates/attribute_template.hpp +++ b/xml_converter/generators/cpp_templates/attribute_template.hpp @@ -4,6 +4,7 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "waypoint.pb.h" class XMLError; @@ -27,3 +28,4 @@ class {{class_name}} { {% endif %} {{class_name}} parse_{{attribute_name}}(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_{{attribute_name}}({{class_name}} attribute_value); +// waypoint::{{class_name}}* to_proto_{{attribute_name}}({{class_name}} attribute_value); diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index a609e47e..a92cdeee 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -1,4 +1,5 @@ #include "{{cpp_class_header}}_gen.hpp" +#include "waypoint.pb.h" {% for absolute_include in cpp_includes.sorted_cpp_absolute_includes() %} #include <{{absolute_include}}> @@ -116,3 +117,47 @@ vector {{cpp_class}}::as_xml() const { {% endif %} return xml_node_contents; } + +std::string {{cpp_class}}::as_protobuf() const { + waypoint::{{cpp_class}} proto_{{cpp_class_header}}; + {% if cpp_class == "Icon": %} + ::waypoint::Trigger trigger; + {% endif %} +{%for attribute_variable in attribute_variables%} + {% if (attribute_variable.is_trigger == true)%} + {% if (attribute_variable.attribute_type == "Custom")%} + if (this->{{attribute_variable.attribute_name}}_is_set) { + trigger.set_allocated_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); + } + {% elif (attribute_variable.attribute_type in ["MultiflagValue","Enum", "CompoundValue"])%} + // + {% else: %} + // if (this->{{attribute_variable.attribute_name}}_is_set) { + // proto_{{cpp_class_header}}.trigger.set_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); + // } + // {% endif %} + {% else: %} + {% if (attribute_variable.attribute_type == "Custom" and attribute_variable.class_name == "TrailDataMapId")%} +//TODO: TrailDataMapID is different + {% elif (attribute_variable.attribute_type == "Custom")%} + // if (this->{{attribute_variable.attribute_name}}_is_set) { + // proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}.set_allocated_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); + // } + {% elif (attribute_variable.attribute_type in ["MultiflagValue","Enum", "CompoundValue"])%} + // if (this->{{attribute_variable.attribute_name}}_is_set) { + // this->proto_{{cpp_class_header}}->{{attribute_variable.class_name}}->set_allocated(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}}) + // } + {% else: %} + if (this->{{attribute_variable.attribute_name}}_is_set) { + proto_{{cpp_class_header}}.set_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); + } + {% endif %} + {% endif %} +{% endfor %} +{% if cpp_class == "Icon": %} + proto_{{cpp_class_header}}.set_allocated_trigger(&trigger); +{% endif %} + std::string output; + proto_{{cpp_class_header}}.SerializeToString(&output); + return output; +} diff --git a/xml_converter/generators/cpp_templates/class_template.hpp b/xml_converter/generators/cpp_templates/class_template.hpp index bb213c73..68d53280 100644 --- a/xml_converter/generators/cpp_templates/class_template.hpp +++ b/xml_converter/generators/cpp_templates/class_template.hpp @@ -20,17 +20,19 @@ class {{cpp_class}} : public Parseable { {% for attribute_variable in attribute_variables: %} bool {{attribute_variable.attribute_name}}_is_set = false; {% endfor %} - - {%- if cpp_class == "Category": %} + bool set_trigger = false; + {% if cpp_class == "Category": %} std::map children; Icon default_icon; Trail default_trail; + void init_from_xml(rapidxml::xml_node<>* node, std::vector* errors); {% endif %} virtual std::vector as_xml() const; virtual std::string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors); + virtual std::string as_protobuf() const; {% if attributes_of_type_marker_category %} bool validate_attributes_of_type_marker_category(); {% endif %} diff --git a/xml_converter/proto/waypoint.proto b/xml_converter/proto/waypoint.proto index f9ac53ba..f245438e 100644 --- a/xml_converter/proto/waypoint.proto +++ b/xml_converter/proto/waypoint.proto @@ -7,8 +7,9 @@ message Category { string display_name = 2; bool is_separator = 3; string name = 4; - string tooltip_name = 5; + string tip_description = 5; map children = 6; + string type = 7; } message Icon { @@ -33,6 +34,7 @@ message Icon { bool scale_on_map_with_zoom = 23; string tip_description = 24; string tip_name = 25; + Color color = 26; float __tentative__scale = 2048; bool __tentative__render_ingame = 2049; @@ -57,17 +59,22 @@ message Trail { int32 achievement_id = 17; float alpha = 18; bool can_fade = 19; - bool is_wall = 22; - string bhdraft__schedule = 23; - float bhdraft__schedule_duration = 24; - float scale = 25; - Color color = 26; - FestivalFilter festival_filter = 27; - MapTypeFilter map_type_filter = 28; - MountFilter mount_filter = 29; - ProfessionFilter profession_filter = 30; - SpecializationFilter specialization_filter = 31; - SpeciesFilter species_filter = 32; + bool is_wall = 20; + float scale = 21; + Color color = 22; + FestivalFilter festival_filter = 23; + MapTypeFilter map_type_filter = 24; + MountFilter mount_filter = 25; + ProfessionFilter profession_filter = 26; + SpecializationFilter specialization_filter = 27; + SpeciesFilter species_filter = 28; + int32 map_display_size = 29; + + bool __tentative__render_ingame = 2049; + bool __tentative__render_on_map = 2050; + bool __tentative__render_on_minimap = 2051; + string bhdraft__schedule = 2052; + float bhdraft__schedule_duration = 2053; } message Texture { @@ -104,7 +111,7 @@ message Trigger { } message GUID { - int32 guid = 1; + string guid = 1; } message Color { diff --git a/xml_converter/src/attribute/bool.cpp b/xml_converter/src/attribute/bool.cpp index cc7409d0..990dcdf5 100644 --- a/xml_converter/src/attribute/bool.cpp +++ b/xml_converter/src/attribute/bool.cpp @@ -42,3 +42,18 @@ string stringify_bool(bool attribute_value) { return "false"; } } + +//////////////////////////////////////////////////////////////////////////////// +// to_proto_bool +// +// Converts a bool into a bool so that it can be saved to proto. +//////////////////////////////////////////////////////////////////////////////// +bool to_proto_bool (bool attribute_value) { + if (attribute_value) { + return true; + } + else { + return false; + } +} + diff --git a/xml_converter/src/attribute/bool.hpp b/xml_converter/src/attribute/bool.hpp index bd917c5f..d4b578c9 100644 --- a/xml_converter/src/attribute/bool.hpp +++ b/xml_converter/src/attribute/bool.hpp @@ -4,9 +4,12 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "waypoint.pb.h" class XMLError; bool parse_bool(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_bool(bool attribute_value); + +bool to_proto_bool (bool attribute_value); diff --git a/xml_converter/src/attribute/color.cpp b/xml_converter/src/attribute/color.cpp index 956c20f8..a2396451 100644 --- a/xml_converter/src/attribute/color.cpp +++ b/xml_converter/src/attribute/color.cpp @@ -29,3 +29,14 @@ Color parse_color(rapidxml::xml_attribute<>* input, vector*) { string stringify_color(Color attribute_value) { return attribute_value.hex; } + +//////////////////////////////////////////////////////////////////////////////// +// to_proto_color +// +// Converts a Color into a stringy value so it can be saved to xml. +//////////////////////////////////////////////////////////////////////////////// +waypoint::Color* to_proto_color(Color attribute_value) { + waypoint::Color* color; + color->set_hex(attribute_value.hex); + return color; +} diff --git a/xml_converter/src/attribute/color.hpp b/xml_converter/src/attribute/color.hpp index 1e44d6c2..ead9ec36 100644 --- a/xml_converter/src/attribute/color.hpp +++ b/xml_converter/src/attribute/color.hpp @@ -4,6 +4,7 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "waypoint.pb.h" class XMLError; @@ -15,3 +16,5 @@ class Color { Color parse_color(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_color(Color attribute_value); + +waypoint::Color* to_proto_color(Color attribute_value); diff --git a/xml_converter/src/attribute/cull_chirality_gen.hpp b/xml_converter/src/attribute/cull_chirality_gen.hpp index 76125d2d..f062d1cc 100644 --- a/xml_converter/src/attribute/cull_chirality_gen.hpp +++ b/xml_converter/src/attribute/cull_chirality_gen.hpp @@ -4,6 +4,7 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "waypoint.pb.h" class XMLError; @@ -14,3 +15,4 @@ enum CullChirality { }; CullChirality parse_cull_chirality(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_cull_chirality(CullChirality attribute_value); +// waypoint::CullChirality* to_proto_cull_chirality(CullChirality attribute_value); diff --git a/xml_converter/src/attribute/euler_rotation_gen.hpp b/xml_converter/src/attribute/euler_rotation_gen.hpp index e65e5460..50c62ae2 100644 --- a/xml_converter/src/attribute/euler_rotation_gen.hpp +++ b/xml_converter/src/attribute/euler_rotation_gen.hpp @@ -4,6 +4,7 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "waypoint.pb.h" class XMLError; @@ -19,3 +20,4 @@ class EulerRotation { }; EulerRotation parse_euler_rotation(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_euler_rotation(EulerRotation attribute_value); +// waypoint::EulerRotation* to_proto_euler_rotation(EulerRotation attribute_value); diff --git a/xml_converter/src/attribute/festival_filter_gen.hpp b/xml_converter/src/attribute/festival_filter_gen.hpp index 1fb54bfe..fbcb2b8e 100644 --- a/xml_converter/src/attribute/festival_filter_gen.hpp +++ b/xml_converter/src/attribute/festival_filter_gen.hpp @@ -4,6 +4,7 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "waypoint.pb.h" class XMLError; @@ -23,3 +24,4 @@ class FestivalFilter { }; FestivalFilter parse_festival_filter(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_festival_filter(FestivalFilter attribute_value); +// waypoint::FestivalFilter* to_proto_festival_filter(FestivalFilter attribute_value); diff --git a/xml_converter/src/attribute/float.cpp b/xml_converter/src/attribute/float.cpp index 7a3a91cd..b040c96e 100644 --- a/xml_converter/src/attribute/float.cpp +++ b/xml_converter/src/attribute/float.cpp @@ -23,3 +23,12 @@ float parse_float(rapidxml::xml_attribute<>* input, std::vector*) { std::string stringify_float(float attribute_value) { return std::to_string(attribute_value); } + +//////////////////////////////////////////////////////////////////////////////// +// to_proto_float +// +// Returns the float so that it can be saved to proto. +//////////////////////////////////////////////////////////////////////////////// +float to_proto_float(float attribute_value){ + return attribute_value; +} \ No newline at end of file diff --git a/xml_converter/src/attribute/float.hpp b/xml_converter/src/attribute/float.hpp index b2e9cfe5..5b4893be 100644 --- a/xml_converter/src/attribute/float.hpp +++ b/xml_converter/src/attribute/float.hpp @@ -4,9 +4,12 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "waypoint.pb.h" class XMLError; float parse_float(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_float(float attribute_value); + +float to_proto_float(float attribute_value); diff --git a/xml_converter/src/attribute/image.cpp b/xml_converter/src/attribute/image.cpp index d708fb8d..552359a1 100644 --- a/xml_converter/src/attribute/image.cpp +++ b/xml_converter/src/attribute/image.cpp @@ -28,3 +28,14 @@ Image parse_image(rapidxml::xml_attribute<>* input, vector*) { string stringify_image(Image attribute_value) { return attribute_value.path; } + +//////////////////////////////////////////////////////////////////////////////// +// to_proto_image +// +// Converts an Image into a waypoint::Image pointer to save to proto. +//////////////////////////////////////////////////////////////////////////////// +waypoint::Texture* to_proto_image(Image attribute_value) { + waypoint::Texture* texture; + texture->set_path(attribute_value.path); + return texture; +} diff --git a/xml_converter/src/attribute/image.hpp b/xml_converter/src/attribute/image.hpp index 1c6aea11..433847e2 100644 --- a/xml_converter/src/attribute/image.hpp +++ b/xml_converter/src/attribute/image.hpp @@ -4,6 +4,7 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "waypoint.pb.h" class XMLError; @@ -15,3 +16,5 @@ class Image { Image parse_image(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_image(Image attribute_value); + +waypoint::Texture* to_proto_image(Image attribute_value) ; diff --git a/xml_converter/src/attribute/int.cpp b/xml_converter/src/attribute/int.cpp index cb605abb..b5adec49 100644 --- a/xml_converter/src/attribute/int.cpp +++ b/xml_converter/src/attribute/int.cpp @@ -40,3 +40,12 @@ int parse_int(rapidxml::xml_attribute<>* input, vector* errors) { string stringify_int(int attribute_value) { return to_string(attribute_value); } + +//////////////////////////////////////////////////////////////////////////////// +// to_proto_int +// +// Returns the int so that it can be saved to proto. +//////////////////////////////////////////////////////////////////////////////// +int to_proto_int(int attribute_value){ + return attribute_value; +} diff --git a/xml_converter/src/attribute/int.hpp b/xml_converter/src/attribute/int.hpp index 680d7160..770ec75a 100644 --- a/xml_converter/src/attribute/int.hpp +++ b/xml_converter/src/attribute/int.hpp @@ -4,9 +4,12 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "waypoint.pb.h" class XMLError; int parse_int(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_int(int attribute_value); + +int to_proto_int(int attribute_value); diff --git a/xml_converter/src/attribute/map_type_filter_gen.hpp b/xml_converter/src/attribute/map_type_filter_gen.hpp index f2ea9d64..3cb6d584 100644 --- a/xml_converter/src/attribute/map_type_filter_gen.hpp +++ b/xml_converter/src/attribute/map_type_filter_gen.hpp @@ -4,6 +4,7 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "waypoint.pb.h" class XMLError; @@ -40,3 +41,4 @@ class MapTypeFilter { }; MapTypeFilter parse_map_type_filter(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_map_type_filter(MapTypeFilter attribute_value); +// waypoint::MapTypeFilter* to_proto_map_type_filter(MapTypeFilter attribute_value); diff --git a/xml_converter/src/attribute/marker_category.cpp b/xml_converter/src/attribute/marker_category.cpp index 4f3ab6f0..68287b7a 100644 --- a/xml_converter/src/attribute/marker_category.cpp +++ b/xml_converter/src/attribute/marker_category.cpp @@ -26,3 +26,16 @@ MarkerCategory parse_marker_category(rapidxml::xml_attribute<>* input, std::vect std::string stringify_marker_category(MarkerCategory attribute_value) { return attribute_value.category; } + +//////////////////////////////////////////////////////////////////////////////// +// to_proto_marker_category +// +// Returns a MarkerCategory so that it can be saved to proto. +//////////////////////////////////////////////////////////////////////////////// +waypoint::Category* to_proto_marker_category(MarkerCategory attribute_value) { + waypoint::Category* category; + category->set_type(attribute_value.category); + return category; +} + +// TODO: Make sure this works. \ No newline at end of file diff --git a/xml_converter/src/attribute/marker_category.hpp b/xml_converter/src/attribute/marker_category.hpp index aaca7fe2..a49c495f 100644 --- a/xml_converter/src/attribute/marker_category.hpp +++ b/xml_converter/src/attribute/marker_category.hpp @@ -4,6 +4,7 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "waypoint.pb.h" class XMLError; @@ -15,3 +16,5 @@ class MarkerCategory { MarkerCategory parse_marker_category(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_marker_category(MarkerCategory attribute_value); + +waypoint::Category* to_proto_marker_category(MarkerCategory attribute_value); diff --git a/xml_converter/src/attribute/mount_filter_gen.hpp b/xml_converter/src/attribute/mount_filter_gen.hpp index 1316b29e..e230450b 100644 --- a/xml_converter/src/attribute/mount_filter_gen.hpp +++ b/xml_converter/src/attribute/mount_filter_gen.hpp @@ -4,6 +4,7 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "waypoint.pb.h" class XMLError; @@ -26,3 +27,4 @@ class MountFilter { }; MountFilter parse_mount_filter(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_mount_filter(MountFilter attribute_value); +// waypoint::MountFilter* to_proto_mount_filter(MountFilter attribute_value); diff --git a/xml_converter/src/attribute/position_gen.hpp b/xml_converter/src/attribute/position_gen.hpp index e24e1fe8..6ab33150 100644 --- a/xml_converter/src/attribute/position_gen.hpp +++ b/xml_converter/src/attribute/position_gen.hpp @@ -4,6 +4,7 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "waypoint.pb.h" class XMLError; @@ -19,3 +20,4 @@ class Position { }; Position parse_position(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_position(Position attribute_value); +// waypoint::Position* to_proto_position(Position attribute_value); diff --git a/xml_converter/src/attribute/profession_filter_gen.hpp b/xml_converter/src/attribute/profession_filter_gen.hpp index 391788fe..d209a779 100644 --- a/xml_converter/src/attribute/profession_filter_gen.hpp +++ b/xml_converter/src/attribute/profession_filter_gen.hpp @@ -4,6 +4,7 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "waypoint.pb.h" class XMLError; @@ -25,3 +26,4 @@ class ProfessionFilter { }; ProfessionFilter parse_profession_filter(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_profession_filter(ProfessionFilter attribute_value); +// waypoint::ProfessionFilter* to_proto_profession_filter(ProfessionFilter attribute_value); diff --git a/xml_converter/src/attribute/reset_behavior_gen.hpp b/xml_converter/src/attribute/reset_behavior_gen.hpp index 3b9b40c1..6b16ea8d 100644 --- a/xml_converter/src/attribute/reset_behavior_gen.hpp +++ b/xml_converter/src/attribute/reset_behavior_gen.hpp @@ -4,6 +4,7 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "waypoint.pb.h" class XMLError; @@ -20,3 +21,4 @@ enum ResetBehavior { }; ResetBehavior parse_reset_behavior(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_reset_behavior(ResetBehavior attribute_value); +// waypoint::ResetBehavior* to_proto_reset_behavior(ResetBehavior attribute_value); diff --git a/xml_converter/src/attribute/specialization_filter_gen.hpp b/xml_converter/src/attribute/specialization_filter_gen.hpp index 6fbc45d2..b0f872cf 100644 --- a/xml_converter/src/attribute/specialization_filter_gen.hpp +++ b/xml_converter/src/attribute/specialization_filter_gen.hpp @@ -4,6 +4,7 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "waypoint.pb.h" class XMLError; @@ -88,3 +89,4 @@ class SpecializationFilter { }; SpecializationFilter parse_specialization_filter(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_specialization_filter(SpecializationFilter attribute_value); +// waypoint::SpecializationFilter* to_proto_specialization_filter(SpecializationFilter attribute_value); diff --git a/xml_converter/src/attribute/species_filter_gen.hpp b/xml_converter/src/attribute/species_filter_gen.hpp index e5967b1a..4957b868 100644 --- a/xml_converter/src/attribute/species_filter_gen.hpp +++ b/xml_converter/src/attribute/species_filter_gen.hpp @@ -4,6 +4,7 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "waypoint.pb.h" class XMLError; @@ -21,3 +22,4 @@ class SpeciesFilter { }; SpeciesFilter parse_species_filter(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_species_filter(SpeciesFilter attribute_value); +// waypoint::SpeciesFilter* to_proto_species_filter(SpeciesFilter attribute_value); diff --git a/xml_converter/src/attribute/string.cpp b/xml_converter/src/attribute/string.cpp index 08e53392..55424d14 100644 --- a/xml_converter/src/attribute/string.cpp +++ b/xml_converter/src/attribute/string.cpp @@ -28,3 +28,14 @@ string parse_string(rapidxml::xml_attribute<>* input, vector*) { string stringify_string(string attribute_value) { return attribute_value; } + +//////////////////////////////////////////////////////////////////////////////// +// to_proto_string +// +// Returns the same string that was passed in which is encoded directly into +// proto. This function exists for stylistic convenience with all the other +// attribute stringify functions. +//////////////////////////////////////////////////////////////////////////////// +string to_proto_string(string attribute_value) { + return attribute_value; +} diff --git a/xml_converter/src/attribute/string.hpp b/xml_converter/src/attribute/string.hpp index 6e202248..a8df6bf5 100644 --- a/xml_converter/src/attribute/string.hpp +++ b/xml_converter/src/attribute/string.hpp @@ -4,9 +4,12 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "waypoint.pb.h" class XMLError; std::string parse_string(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_string(std::string attribute_value); + +std::string to_proto_string(std::string attribute_value); diff --git a/xml_converter/src/attribute/trail_data.cpp b/xml_converter/src/attribute/trail_data.cpp index d2d83387..7e44b8af 100644 --- a/xml_converter/src/attribute/trail_data.cpp +++ b/xml_converter/src/attribute/trail_data.cpp @@ -9,12 +9,33 @@ using namespace std; +//////////////////////////////////////////////////////////////////////////////// +// parse_trail_data +// +// Parses a TrailData from the value of a rapidxml::xml_attribute. +//////////////////////////////////////////////////////////////////////////////// TrailData parse_trail_data(rapidxml::xml_attribute<>* input, vector*) { TrailData trail_data; trail_data.trail_data = get_attribute_value(input); return trail_data; } +//////////////////////////////////////////////////////////////////////////////// +// stringify_trail_data +// +// Converts a TrailData into a stringy value so that it can be saved to xml +//////////////////////////////////////////////////////////////////////////////// string stringify_trail_data(TrailData attribute_value) { return attribute_value.trail_data; } + +//////////////////////////////////////////////////////////////////////////////// +// to_proto_trail_data +// +// Returns a TrailData so that it can be saved to proto. +//////////////////////////////////////////////////////////////////////////////// +waypoint::TrailData* to_proto_trail_data(TrailData attribute_value) { + waypoint::TrailData* trail_data; + trail_data->set_trail_data(attribute_value.trail_data); + return trail_data; +} diff --git a/xml_converter/src/attribute/trail_data.hpp b/xml_converter/src/attribute/trail_data.hpp index 6903f622..bede4859 100644 --- a/xml_converter/src/attribute/trail_data.hpp +++ b/xml_converter/src/attribute/trail_data.hpp @@ -4,6 +4,7 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "waypoint.pb.h" class XMLError; @@ -15,3 +16,5 @@ class TrailData { TrailData parse_trail_data(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_trail_data(TrailData attribute_value); + +waypoint::TrailData* to_proto_trail_data(TrailData attribute_value); diff --git a/xml_converter/src/attribute/trail_data_map_id.cpp b/xml_converter/src/attribute/trail_data_map_id.cpp index 56c111d9..be9a19d2 100644 --- a/xml_converter/src/attribute/trail_data_map_id.cpp +++ b/xml_converter/src/attribute/trail_data_map_id.cpp @@ -9,12 +9,35 @@ using namespace std; +// TODO: trail_data_map_id is currently unused in the convertor + +//////////////////////////////////////////////////////////////////////////////// +// parse_trail_data +// +// Parses a TrailDataMapID from the value of a rapidxml::xml_attribute. +//////////////////////////////////////////////////////////////////////////////// TrailDataMapId parse_trail_data_map_id(rapidxml::xml_attribute<>* input, vector*) { TrailDataMapId trail_data_map_id; trail_data_map_id.trail_data_map_id = std::stof(get_attribute_value(input)); return trail_data_map_id; } +//////////////////////////////////////////////////////////////////////////////// +// stringify_trail_data +// +// Converts a TrailDataMapID into a stringy value so that it can be saved to xml +//////////////////////////////////////////////////////////////////////////////// string stringify_trail_data_map_id(TrailDataMapId attribute_value) { return to_string(attribute_value.trail_data_map_id); } + +//////////////////////////////////////////////////////////////////////////////// +// to_proto_trail_data +// +// Returns a TrailDataMapID so that it can be saved to proto. +//////////////////////////////////////////////////////////////////////////////// +// waypoint::TrailDataMapID* to_proto_trail_data(TrailDataMapID attribute_value) { +// waypoint::TrailData* trail_data; +// trail_data->set_trail_data(attribute_value.trail_data); +// return trail_data; +// } diff --git a/xml_converter/src/attribute/trail_data_map_id.hpp b/xml_converter/src/attribute/trail_data_map_id.hpp index 440fa5ae..d2812eb3 100644 --- a/xml_converter/src/attribute/trail_data_map_id.hpp +++ b/xml_converter/src/attribute/trail_data_map_id.hpp @@ -4,6 +4,7 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "waypoint.pb.h" class XMLError; @@ -15,3 +16,5 @@ class TrailDataMapId { TrailDataMapId parse_trail_data_map_id(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_trail_data_map_id(TrailDataMapId attribute_value); + +// waypoint::TrailDataMapID* to_proto_trail_data(TrailDataMapID attribute_value); diff --git a/xml_converter/src/attribute/unique_id.cpp b/xml_converter/src/attribute/unique_id.cpp index 4fd3561d..26ad7e9a 100644 --- a/xml_converter/src/attribute/unique_id.cpp +++ b/xml_converter/src/attribute/unique_id.cpp @@ -23,3 +23,9 @@ UniqueId parse_unique_id(rapidxml::xml_attribute<>* input, vector*) { string stringify_unique_id(UniqueId attribute_value) { return base64_encode(&attribute_value.guid[0], attribute_value.guid.size()); } + +waypoint::GUID* to_proto_unique_id(UniqueId attribute_value){ + waypoint::GUID* guid; + guid->set_guid(base64_encode(&attribute_value.guid[0], attribute_value.guid.size())); + return guid; +} diff --git a/xml_converter/src/attribute/unique_id.hpp b/xml_converter/src/attribute/unique_id.hpp index 40324d1b..d0f7c45b 100644 --- a/xml_converter/src/attribute/unique_id.hpp +++ b/xml_converter/src/attribute/unique_id.hpp @@ -5,6 +5,7 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "waypoint.pb.h" class XMLError; @@ -16,3 +17,5 @@ class UniqueId { UniqueId parse_unique_id(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_unique_id(UniqueId attribute_value); + +waypoint::GUID* to_proto_unique_id(UniqueId attribute_value); diff --git a/xml_converter/src/category_gen.cpp b/xml_converter/src/category_gen.cpp index 6a1df242..ac966a07 100644 --- a/xml_converter/src/category_gen.cpp +++ b/xml_converter/src/category_gen.cpp @@ -1,4 +1,5 @@ #include "category_gen.hpp" +#include "waypoint.pb.h" #include #include @@ -50,8 +51,8 @@ bool Category::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectorname_is_set = true; } else if (attributename == "tipdescription") { - this->tooltip_name = parse_string(attribute, errors); - this->tooltip_name_is_set = true; + this->tooltip_description = parse_string(attribute, errors); + this->tooltip_description_is_set = true; } else { return false; @@ -73,8 +74,8 @@ vector Category::as_xml() const { if (this->name_is_set) { xml_node_contents.push_back(" Name=\"" + stringify_string(this->name) + "\""); } - if (this->tooltip_name_is_set) { - xml_node_contents.push_back(" TipDescription=\"" + stringify_string(this->tooltip_name) + "\""); + if (this->tooltip_description_is_set) { + xml_node_contents.push_back(" TipDescription=\"" + stringify_string(this->tooltip_description) + "\""); } xml_node_contents.push_back(">\n"); @@ -90,3 +91,32 @@ vector Category::as_xml() const { xml_node_contents.push_back("\n"); return xml_node_contents; } + +std::string Category::as_protobuf() const { + waypoint::Category proto_category; + + if (this->default_visibility_is_set) { + proto_category.set_default_visibility(to_proto_bool(this->default_visibility)); + } + + if (this->display_name_is_set) { + proto_category.set_display_name(to_proto_string(this->display_name)); + } + + if (this->is_separator_is_set) { + proto_category.set_is_separator(to_proto_bool(this->is_separator)); + } + + if (this->name_is_set) { + proto_category.set_name(to_proto_string(this->name)); + } + + if (this->tooltip_description_is_set) { + proto_category.set_tip_description(to_proto_string(this->tooltip_description)); + } + + + std::string output; + proto_category.SerializeToString(&output); + return output; +} diff --git a/xml_converter/src/category_gen.hpp b/xml_converter/src/category_gen.hpp index e1aa8f58..4a6b3ea7 100644 --- a/xml_converter/src/category_gen.hpp +++ b/xml_converter/src/category_gen.hpp @@ -17,18 +17,21 @@ class Category : public Parseable { std::string display_name; bool is_separator; std::string name; - std::string tooltip_name; + std::string tooltip_description; bool default_visibility_is_set = false; bool display_name_is_set = false; bool is_separator_is_set = false; bool name_is_set = false; - bool tooltip_name_is_set = false; + bool tooltip_description_is_set = false; + bool set_trigger = false; std::map children; Icon default_icon; Trail default_trail; + void init_from_xml(rapidxml::xml_node<>* node, std::vector* errors); virtual std::vector as_xml() const; virtual std::string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors); + virtual std::string as_protobuf() const; }; diff --git a/xml_converter/src/icon_gen.cpp b/xml_converter/src/icon_gen.cpp index 50af9bb8..6c656134 100644 --- a/xml_converter/src/icon_gen.cpp +++ b/xml_converter/src/icon_gen.cpp @@ -1,4 +1,5 @@ #include "icon_gen.hpp" +#include "waypoint.pb.h" #include #include @@ -232,11 +233,15 @@ bool Icon::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectortoggle_category = parse_marker_category(attribute, errors); this->toggle_category_is_set = true; } - else if (attributename == "tipname") { + else if (attributename == "togglecategory") { + this->toggle_category = parse_marker_category(attribute, errors); + this->toggle_category_is_set = true; + } + else if (attributename == "tipdescription") { this->tooltip_description = parse_string(attribute, errors); this->tooltip_description_is_set = true; } - else if (attributename == "tipdescription") { + else if (attributename == "tipname") { this->tooltip_name = parse_string(attribute, errors); this->tooltip_name_is_set = true; } @@ -433,10 +438,10 @@ vector Icon::as_xml() const { xml_node_contents.push_back(" Toggle=\"" + stringify_marker_category(this->toggle_category) + "\""); } if (this->tooltip_description_is_set) { - xml_node_contents.push_back(" TipName=\"" + stringify_string(this->tooltip_description) + "\""); + xml_node_contents.push_back(" TipDescription=\"" + stringify_string(this->tooltip_description) + "\""); } if (this->tooltip_name_is_set) { - xml_node_contents.push_back(" TipDescription=\"" + stringify_string(this->tooltip_name) + "\""); + xml_node_contents.push_back(" TipName=\"" + stringify_string(this->tooltip_name) + "\""); } if (this->trigger_range_is_set) { xml_node_contents.push_back(" TriggerRange=\"" + stringify_float(this->trigger_range) + "\""); @@ -453,3 +458,228 @@ vector Icon::as_xml() const { xml_node_contents.push_back("/>"); return xml_node_contents; } + +std::string Icon::as_protobuf() const { + waypoint::Icon proto_icon; + ::waypoint::Trigger trigger; + + if (this->achievement_bitmask_is_set) { + proto_icon.set_achievement_bit(to_proto_int(this->achievement_bitmask)); + } + + if (this->achievement_id_is_set) { + proto_icon.set_achievement_id(to_proto_int(this->achievement_id)); + } + + if (this->alpha_is_set) { + proto_icon.set_alpha(to_proto_float(this->alpha)); + } + + // if (this->auto_trigger_is_set) { + // proto_icon.trigger.set_auto_trigger(to_proto_bool(this->auto_trigger)); + // } + // + // if (this->bounce_delay_is_set) { + // proto_icon.trigger.set_bounce_delay(to_proto_float(this->bounce_delay)); + // } + // + // if (this->bounce_duration_is_set) { + // proto_icon.trigger.set_bounce_duration(to_proto_float(this->bounce_duration)); + // } + // + // if (this->bounce_height_is_set) { + // proto_icon.trigger.set_bounce_height(to_proto_float(this->bounce_height)); + // } + // + if (this->can_fade_is_set) { + proto_icon.set_can_fade(to_proto_bool(this->can_fade)); + } + + // if (this->category_is_set) { + // proto_icon.category.set_allocated_category(to_proto_marker_category(this->category)); + // } + + // if (this->color_is_set) { + // proto_icon.color.set_allocated_color(to_proto_color(this->color)); + // } + + // if (this->copy_clipboard_is_set) { + // proto_icon.trigger.set_action_copy_clipboard(to_proto_string(this->copy_clipboard)); + // } + // + // if (this->copy_message_is_set) { + // proto_icon.trigger.set_action_copy_message(to_proto_string(this->copy_message)); + // } + // + // if (this->cull_chirality_is_set) { + // this->proto_icon->cull_chirality->set_allocated(to_proto_cull_chirality(this->cull_chirality) + // } + + if (this->distance_fade_end_is_set) { + proto_icon.set_distance_fade_end(to_proto_float(this->distance_fade_end)); + } + + if (this->distance_fade_start_is_set) { + proto_icon.set_distance_fade_start(to_proto_float(this->distance_fade_start)); + } + + // if (this->euler_rotation_is_set) { + // this->proto_icon->euler_rotation->set_allocated(to_proto_euler_rotation(this->euler_rotation) + // } + + // if (this->festival_filter_is_set) { + // this->proto_icon->festival_filter->set_allocated(to_proto_festival_filter(this->festival_filter) + // } + + // if (this->guid_is_set) { + // proto_icon.guid.set_allocated_guid(to_proto_unique_id(this->guid)); + // } + + // if (this->has_countdown_is_set) { + // proto_icon.trigger.set_has_countdown(to_proto_bool(this->has_countdown)); + // } + // + if (this->heightoffset_is_set) { + proto_icon.set_height_offset(to_proto_float(this->heightoffset)); + } + + if (this->hide_category_is_set) { + trigger.set_allocated_action_hide_category(to_proto_marker_category(this->hide_category)); + } + + // if (this->icon_is_set) { + // proto_icon.texture.set_allocated_texture(to_proto_image(this->icon)); + // } + + if (this->icon_size_is_set) { + proto_icon.set___tentative__scale(to_proto_float(this->icon_size)); + } + + // if (this->info_message_is_set) { + // proto_icon.trigger.set_action_info_message(to_proto_string(this->info_message)); + // } + // + // if (this->invert_visibility_is_set) { + // proto_icon.trigger.set_invert_display(to_proto_bool(this->invert_visibility)); + // } + // + if (this->map_display_size_is_set) { + proto_icon.set_map_display_size(to_proto_int(this->map_display_size)); + } + + if (this->map_id_is_set) { + proto_icon.set_map_id(to_proto_int(this->map_id)); + } + + // if (this->map_type_filter_is_set) { + // this->proto_icon->map_type_filter->set_allocated(to_proto_map_type_filter(this->map_type_filter) + // } + + if (this->maximum_size_on_screen_is_set) { + proto_icon.set_maximum_size_on_screen(to_proto_int(this->maximum_size_on_screen)); + } + + if (this->minimum_size_on_screen_is_set) { + proto_icon.set_minimum_size_on_screen(to_proto_int(this->minimum_size_on_screen)); + } + + // if (this->mount_filter_is_set) { + // this->proto_icon->mount_filter->set_allocated(to_proto_mount_filter(this->mount_filter) + // } + + // if (this->position_is_set) { + // this->proto_icon->position->set_allocated(to_proto_position(this->position) + // } + + // if (this->profession_filter_is_set) { + // this->proto_icon->profession_filter->set_allocated(to_proto_profession_filter(this->profession_filter) + // } + + if (this->render_ingame_is_set) { + proto_icon.set___tentative__render_ingame(to_proto_bool(this->render_ingame)); + } + + if (this->render_on_map_is_set) { + proto_icon.set___tentative__render_on_map(to_proto_bool(this->render_on_map)); + } + + if (this->render_on_minimap_is_set) { + proto_icon.set___tentative__render_on_minimap(to_proto_bool(this->render_on_minimap)); + } + + // + + // if (this->reset_length_is_set) { + // proto_icon.trigger.set_reset_length(to_proto_float(this->reset_length)); + // } + // + if (this->scale_on_map_with_zoom_is_set) { + proto_icon.set_scale_on_map_with_zoom(to_proto_bool(this->scale_on_map_with_zoom)); + } + + if (this->schedule_is_set) { + proto_icon.set_bhdraft__schedule(to_proto_string(this->schedule)); + } + + if (this->schedule_duration_is_set) { + proto_icon.set_bhdraft__schedule_duration(to_proto_float(this->schedule_duration)); + } + + if (this->show_category_is_set) { + trigger.set_allocated_action_show_category(to_proto_marker_category(this->show_category)); + } + + // if (this->specialization_filter_is_set) { + // this->proto_icon->specialization_filter->set_allocated(to_proto_specialization_filter(this->specialization_filter) + // } + + // if (this->species_filter_is_set) { + // this->proto_icon->species_filter->set_allocated(to_proto_species_filter(this->species_filter) + // } + + if (this->toggle_category_is_set) { + trigger.set_allocated_action_toggle_category(to_proto_marker_category(this->toggle_category)); + } + + if (this->tooltip_description_is_set) { + proto_icon.set_tip_description(to_proto_string(this->tooltip_description)); + } + + if (this->tooltip_name_is_set) { + proto_icon.set_tip_name(to_proto_string(this->tooltip_name)); + } + + // if (this->trigger_range_is_set) { + // proto_icon.trigger.set_range(to_proto_float(this->trigger_range)); + // } + // + // if (this->x_position_is_set) { + // this->proto_icon->position->set_allocated(to_proto_position(this->x_position) + // } + + // if (this->x_rotation_is_set) { + // this->proto_icon->euler_rotation->set_allocated(to_proto_euler_rotation(this->x_rotation) + // } + + // if (this->y_position_is_set) { + // this->proto_icon->position->set_allocated(to_proto_position(this->y_position) + // } + + // if (this->y_rotation_is_set) { + // this->proto_icon->euler_rotation->set_allocated(to_proto_euler_rotation(this->y_rotation) + // } + + // if (this->z_position_is_set) { + // this->proto_icon->position->set_allocated(to_proto_position(this->z_position) + // } + + // if (this->z_rotation_is_set) { + // this->proto_icon->euler_rotation->set_allocated(to_proto_euler_rotation(this->z_rotation) + // } + + proto_icon.set_allocated_trigger(&trigger); + + std::string output; + proto_icon.SerializeToString(&output); + return output; +} diff --git a/xml_converter/src/icon_gen.hpp b/xml_converter/src/icon_gen.hpp index 7a59cabe..181010c1 100644 --- a/xml_converter/src/icon_gen.hpp +++ b/xml_converter/src/icon_gen.hpp @@ -132,8 +132,10 @@ class Icon : public Parseable { bool y_rotation_is_set = false; bool z_position_is_set = false; bool z_rotation_is_set = false; + bool set_trigger = false; virtual std::vector as_xml() const; virtual std::string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors); + virtual std::string as_protobuf() const; bool validate_attributes_of_type_marker_category(); }; diff --git a/xml_converter/src/parseable.cpp b/xml_converter/src/parseable.cpp index b5299275..fbea92d0 100644 --- a/xml_converter/src/parseable.cpp +++ b/xml_converter/src/parseable.cpp @@ -37,3 +37,9 @@ std::vector Parseable::as_xml() const { std::vector result; return result; } + +std::string Parseable::as_protobuf() const { + throw std::runtime_error("error: Parseable::as_proto() should not be called"); + std::string result; + return result; +} \ No newline at end of file diff --git a/xml_converter/src/parseable.hpp b/xml_converter/src/parseable.hpp index 42f63088..d1603af6 100644 --- a/xml_converter/src/parseable.hpp +++ b/xml_converter/src/parseable.hpp @@ -4,6 +4,7 @@ #include #include "rapidxml-1.13/rapidxml.hpp" +#include "waypoint.pb.h" class XMLError; class Parseable { @@ -18,4 +19,6 @@ class Parseable { virtual bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors); virtual std::vector as_xml() const; + + virtual std::string as_protobuf() const; }; diff --git a/xml_converter/src/trail_gen.cpp b/xml_converter/src/trail_gen.cpp index 89c42a32..903c679f 100644 --- a/xml_converter/src/trail_gen.cpp +++ b/xml_converter/src/trail_gen.cpp @@ -1,4 +1,5 @@ #include "trail_gen.hpp" +#include "waypoint.pb.h" #include #include @@ -264,3 +265,124 @@ vector Trail::as_xml() const { xml_node_contents.push_back("/>"); return xml_node_contents; } + +std::string Trail::as_protobuf() const { + waypoint::Trail proto_trail; + + if (this->achievement_bitmask_is_set) { + proto_trail.set_achievement_bit(to_proto_int(this->achievement_bitmask)); + } + + if (this->achievement_id_is_set) { + proto_trail.set_achievement_id(to_proto_int(this->achievement_id)); + } + + if (this->alpha_is_set) { + proto_trail.set_alpha(to_proto_float(this->alpha)); + } + + if (this->animation_speed_is_set) { + proto_trail.set_animation_speed(to_proto_float(this->animation_speed)); + } + + if (this->can_fade_is_set) { + proto_trail.set_can_fade(to_proto_bool(this->can_fade)); + } + + // if (this->category_is_set) { + // proto_trail.category.set_allocated_category(to_proto_marker_category(this->category)); + // } + + // if (this->color_is_set) { + // proto_trail.color.set_allocated_color(to_proto_color(this->color)); + // } + + // if (this->cull_chirality_is_set) { + // this->proto_trail->cull_chirality->set_allocated(to_proto_cull_chirality(this->cull_chirality) + // } + + if (this->distance_fade_end_is_set) { + proto_trail.set_distance_fade_end(to_proto_float(this->distance_fade_end)); + } + + if (this->distance_fade_start_is_set) { + proto_trail.set_distance_fade_start(to_proto_float(this->distance_fade_start)); + } + + // if (this->festival_filter_is_set) { + // this->proto_trail->festival_filter->set_allocated(to_proto_festival_filter(this->festival_filter) + // } + + // if (this->guid_is_set) { + // proto_trail.guid.set_allocated_guid(to_proto_unique_id(this->guid)); + // } + + if (this->is_wall_is_set) { + proto_trail.set_is_wall(to_proto_bool(this->is_wall)); + } + + if (this->map_display_size_is_set) { + proto_trail.set_map_display_size(to_proto_int(this->map_display_size)); + } + + if (this->map_id_is_set) { + proto_trail.set_map_id(to_proto_int(this->map_id)); + } + + // if (this->map_type_filter_is_set) { + // this->proto_trail->map_type_filter->set_allocated(to_proto_map_type_filter(this->map_type_filter) + // } + + // if (this->mount_filter_is_set) { + // this->proto_trail->mount_filter->set_allocated(to_proto_mount_filter(this->mount_filter) + // } + + // if (this->profession_filter_is_set) { + // this->proto_trail->profession_filter->set_allocated(to_proto_profession_filter(this->profession_filter) + // } + + if (this->render_ingame_is_set) { + proto_trail.set___tentative__render_ingame(to_proto_bool(this->render_ingame)); + } + + if (this->render_on_map_is_set) { + proto_trail.set___tentative__render_on_map(to_proto_bool(this->render_on_map)); + } + + if (this->render_on_minimap_is_set) { + proto_trail.set___tentative__render_on_minimap(to_proto_bool(this->render_on_minimap)); + } + + if (this->schedule_is_set) { + proto_trail.set_bhdraft__schedule(to_proto_string(this->schedule)); + } + + if (this->schedule_duration_is_set) { + proto_trail.set_bhdraft__schedule_duration(to_proto_float(this->schedule_duration)); + } + + // if (this->specialization_filter_is_set) { + // this->proto_trail->specialization_filter->set_allocated(to_proto_specialization_filter(this->specialization_filter) + // } + + // if (this->species_filter_is_set) { + // this->proto_trail->species_filter->set_allocated(to_proto_species_filter(this->species_filter) + // } + + // if (this->texture_is_set) { + // proto_trail.texture.set_allocated_texture(to_proto_image(this->texture)); + // } + + // if (this->trail_data_is_set) { + // proto_trail.trail_data.set_allocated_trail_data(to_proto_trail_data(this->trail_data)); + // } + + if (this->trail_scale_is_set) { + proto_trail.set_scale(to_proto_float(this->trail_scale)); + } + + + std::string output; + proto_trail.SerializeToString(&output); + return output; +} diff --git a/xml_converter/src/trail_gen.hpp b/xml_converter/src/trail_gen.hpp index f1f9a321..d8b77c59 100644 --- a/xml_converter/src/trail_gen.hpp +++ b/xml_converter/src/trail_gen.hpp @@ -78,8 +78,10 @@ class Trail : public Parseable { bool texture_is_set = false; bool trail_data_is_set = false; bool trail_scale_is_set = false; + bool set_trigger = false; virtual std::vector as_xml() const; virtual std::string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors); + virtual std::string as_protobuf() const; bool validate_attributes_of_type_marker_category(); }; diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index fa397ad9..2ce0ba35 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -59,6 +59,26 @@ void write_xml_file(string xml_filepath, map* marker_categorie outfile.close(); } +void write_protobuf_file(string xml_filepath, map* marker_categories, vector* parsed_pois) { + ofstream outfile; + string new_file_path = xml_filepath + "export.data"; + + outfile.open(new_file_path, ios::out | ios_base::binary); + for (const auto& category : *marker_categories) { + std::string text; + text = category.second.as_protobuf(); + outfile << text; + } + + for (const auto& parsed_poi : *parsed_pois) { + std::string text; + text = parsed_poi->as_protobuf(); + outfile << text; + } + + outfile.close(); +} + Category* get_category(rapidxml::xml_node<>* node, map* marker_categories, vector* errors) { // TODO: This is a slow linear search, replace with something faster. // maybe use data from already parsed node instead of searching for @@ -250,7 +270,7 @@ int main() { map marker_categories; test_proto(); - for (const auto& entry : filesystem::directory_iterator("./packs")) { + for (const auto& entry : filesystem::directory_iterator("../packs")) { string path = entry.path(); if (entry.is_directory()) { @@ -267,10 +287,17 @@ int main() { cout << "The parse function took " << ms << " milliseconds to run" << endl; begin = chrono::high_resolution_clock::now(); - write_xml_file("./export_packs/", &marker_categories, &parsed_pois); + write_xml_file("../export_packs/", &marker_categories, &parsed_pois); + end = chrono::high_resolution_clock::now(); + dur = end - begin; + ms = std::chrono::duration_cast(dur).count(); + cout << "The xml write function took " << ms << " milliseconds to run" << endl; + + begin = chrono::high_resolution_clock::now(); + write_protobuf_file("../export_packs/", &marker_categories, &parsed_pois); end = chrono::high_resolution_clock::now(); dur = end - begin; ms = std::chrono::duration_cast(dur).count(); - cout << "The write function took " << ms << " milliseconds to run" << endl; + cout << "The protobuf write function took " << ms << " milliseconds to run" << endl; return 0; } From ce0e5a6789d4fb9e8df9851704d44f6dac7c3876 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Fri, 2 Dec 2022 20:40:04 -0500 Subject: [PATCH 124/539] This commit contains the functions nessecary to write to protobuf --- xml_converter/doc/map_id/map_type_filter.md | 2 +- xml_converter/doc/rendering/cull_chirality.md | 3 +- xml_converter/generators/code_generator.py | 4 +- .../cpp_templates/attribute_template.hpp | 6 +- .../cpp_templates/class_template.cpp | 56 ++-- .../cpp_templates/class_template.hpp | 2 + .../cpp_templates/compoundvalue.cpp | 8 + .../generators/cpp_templates/enum.cpp | 22 ++ .../cpp_templates/multiflagvalue.cpp | 11 + xml_converter/proto/waypoint.proto | 22 +- xml_converter/src/attribute/color.cpp | 2 +- .../src/attribute/cull_chirality_gen.cpp | 18 ++ .../src/attribute/cull_chirality_gen.hpp | 2 +- .../src/attribute/euler_rotation_gen.cpp | 8 + .../src/attribute/euler_rotation_gen.hpp | 2 +- .../src/attribute/festival_filter_gen.cpp | 27 ++ .../src/attribute/festival_filter_gen.hpp | 2 +- xml_converter/src/attribute/image.cpp | 2 +- .../src/attribute/map_type_filter_gen.cpp | 78 +++++ .../src/attribute/map_type_filter_gen.hpp | 2 +- .../src/attribute/marker_category.cpp | 3 +- .../src/attribute/mount_filter_gen.cpp | 36 +++ .../src/attribute/mount_filter_gen.hpp | 2 +- xml_converter/src/attribute/position_gen.cpp | 8 + xml_converter/src/attribute/position_gen.hpp | 2 +- .../src/attribute/profession_filter_gen.cpp | 33 +++ .../src/attribute/profession_filter_gen.hpp | 2 +- .../src/attribute/reset_behavior_gen.cpp | 63 ++++ .../src/attribute/reset_behavior_gen.hpp | 2 +- .../attribute/specialization_filter_gen.cpp | 222 ++++++++++++++ .../attribute/specialization_filter_gen.hpp | 2 +- .../src/attribute/species_filter_gen.cpp | 21 ++ .../src/attribute/species_filter_gen.hpp | 2 +- xml_converter/src/attribute/trail_data.cpp | 2 +- xml_converter/src/attribute/unique_id.cpp | 3 +- xml_converter/src/category_gen.cpp | 21 +- xml_converter/src/category_gen.hpp | 1 - xml_converter/src/icon_gen.cpp | 274 +++++++++--------- xml_converter/src/trail_gen.cpp | 106 +++---- xml_converter/src/trail_gen.hpp | 1 - 40 files changed, 845 insertions(+), 240 deletions(-) diff --git a/xml_converter/doc/map_id/map_type_filter.md b/xml_converter/doc/map_id/map_type_filter.md index c0b01142..fde01d54 100644 --- a/xml_converter/doc/map_id/map_type_filter.md +++ b/xml_converter/doc/map_id/map_type_filter.md @@ -3,7 +3,7 @@ name: Map Type Filter type: MultiflagValue applies_to: [Icon, Trail] xml_fields: [MapID] -protobuf_field: map_type +protobuf_field: map_type_filter compatability: [TacO, BlishHUD, Burrito] flags: # Unknown map type diff --git a/xml_converter/doc/rendering/cull_chirality.md b/xml_converter/doc/rendering/cull_chirality.md index 9a04d888..18545d04 100644 --- a/xml_converter/doc/rendering/cull_chirality.md +++ b/xml_converter/doc/rendering/cull_chirality.md @@ -2,7 +2,7 @@ name: Cull Chirality applies_to: [Icon, Trail] xml_fields: [Cull] -protobuf_field: cull +protobuf_field: cull_chirality type: Enum compatability: [TacO, BlishHUD, Burrito] values: @@ -17,3 +17,4 @@ Notes ===== https://blishhud.com/docs/markers/attributes/cull + \ No newline at end of file diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 5d6f547e..690d54cd 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -499,7 +499,7 @@ def generate_cpp_variable_data( xml_fields=component_xml_fields, default_xml_fields=component_default_xml_fields, xml_export=xml_export, - protobuf_field=fieldval["protobuf_field"], + protobuf_field=component["protobuf_field"], is_child=True, ) attribute_variables.append(component_attribute_variable) @@ -611,7 +611,7 @@ def write_attribute(self, output_directory: str) -> None: class_name=attribute_name, xml_fields=xml_fields, xml_export=metadata[filepath]["xml_export"], - protobuf_field=protobuf_field, + protobuf_field=component["protobuf_field"], is_trigger=is_trigger, ) attribute_variables.append(attribute_variable) diff --git a/xml_converter/generators/cpp_templates/attribute_template.hpp b/xml_converter/generators/cpp_templates/attribute_template.hpp index 8dc18659..bed25329 100644 --- a/xml_converter/generators/cpp_templates/attribute_template.hpp +++ b/xml_converter/generators/cpp_templates/attribute_template.hpp @@ -28,4 +28,8 @@ class {{class_name}} { {% endif %} {{class_name}} parse_{{attribute_name}}(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_{{attribute_name}}({{class_name}} attribute_value); -// waypoint::{{class_name}}* to_proto_{{attribute_name}}({{class_name}} attribute_value); +{% if type == "Enum":%} +waypoint::{{class_name}} to_proto_{{attribute_name}}({{class_name}} attribute_value); +{% else: %} +waypoint::{{class_name}}* to_proto_{{attribute_name}}({{class_name}} attribute_value); +{% endif %} diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index a92cdeee..898771b0 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -121,43 +121,61 @@ vector {{cpp_class}}::as_xml() const { std::string {{cpp_class}}::as_protobuf() const { waypoint::{{cpp_class}} proto_{{cpp_class_header}}; {% if cpp_class == "Icon": %} - ::waypoint::Trigger trigger; + waypoint::Trigger* trigger = new waypoint::Trigger(); + bool set_trigger = false; {% endif %} {%for attribute_variable in attribute_variables%} {% if (attribute_variable.is_trigger == true)%} {% if (attribute_variable.attribute_type == "Custom")%} if (this->{{attribute_variable.attribute_name}}_is_set) { - trigger.set_allocated_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); - } - {% elif (attribute_variable.attribute_type in ["MultiflagValue","Enum", "CompoundValue"])%} - // + trigger->set_allocated_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); + set_trigger = true; + } {% else: %} - // if (this->{{attribute_variable.attribute_name}}_is_set) { - // proto_{{cpp_class_header}}.trigger.set_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); - // } - // {% endif %} + if (this->{{attribute_variable.attribute_name}}_is_set) { + trigger->set_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); + set_trigger = true; + } + {% endif %} {% else: %} {% if (attribute_variable.attribute_type == "Custom" and attribute_variable.class_name == "TrailDataMapId")%} //TODO: TrailDataMapID is different - {% elif (attribute_variable.attribute_type == "Custom")%} - // if (this->{{attribute_variable.attribute_name}}_is_set) { - // proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}.set_allocated_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); - // } - {% elif (attribute_variable.attribute_type in ["MultiflagValue","Enum", "CompoundValue"])%} - // if (this->{{attribute_variable.attribute_name}}_is_set) { - // this->proto_{{cpp_class_header}}->{{attribute_variable.class_name}}->set_allocated(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}}) - // } + {% elif (attribute_variable.attribute_type == "Enum")%} + if (this->{{attribute_variable.attribute_name}}_is_set) { + proto_{{cpp_class_header}}.set_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); + } + {% elif (attribute_variable.attribute_type in ["MultiflagValue", "CompoundValue", "Custom"]) and attribute_variable.is_child == false%} + if (this->{{attribute_variable.attribute_name}}_is_set) { + proto_{{cpp_class_header}}.set_allocated_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); + } + {% elif attribute_variable.is_child == true%} {% else: %} if (this->{{attribute_variable.attribute_name}}_is_set) { proto_{{cpp_class_header}}.set_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); - } + } {% endif %} {% endif %} {% endfor %} {% if cpp_class == "Icon": %} - proto_{{cpp_class_header}}.set_allocated_trigger(&trigger); + if (set_trigger){ + proto_{{cpp_class_header}}.set_allocated_trigger(trigger); + } {% endif %} std::string output; proto_{{cpp_class_header}}.SerializeToString(&output); + + {% if cpp_class == "Category": %} + for (const auto& [key, val] : this->children) { + std::string text; + for (const auto& s : val.as_protobuf()) { + text += s; + } + output += text; + } + + + {% endif %} + return output; } + diff --git a/xml_converter/generators/cpp_templates/class_template.hpp b/xml_converter/generators/cpp_templates/class_template.hpp index 68d53280..df539e7f 100644 --- a/xml_converter/generators/cpp_templates/class_template.hpp +++ b/xml_converter/generators/cpp_templates/class_template.hpp @@ -20,7 +20,9 @@ class {{cpp_class}} : public Parseable { {% for attribute_variable in attribute_variables: %} bool {{attribute_variable.attribute_name}}_is_set = false; {% endfor %} + {% if cpp_class == "Icon": %} bool set_trigger = false; + {% endif %} {% if cpp_class == "Category": %} std::map children; Icon default_icon; diff --git a/xml_converter/generators/cpp_templates/compoundvalue.cpp b/xml_converter/generators/cpp_templates/compoundvalue.cpp index 4c876208..0b1a9d50 100644 --- a/xml_converter/generators/cpp_templates/compoundvalue.cpp +++ b/xml_converter/generators/cpp_templates/compoundvalue.cpp @@ -39,3 +39,11 @@ string stringify_{{attribute_name}}({{class_name}} attribute_value) { return output; } {% endif %} + +waypoint::{{class_name}}* to_proto_{{attribute_name}} ({{class_name}} attribute_value) { + waypoint::{{class_name}}* {{attribute_name}} = new waypoint::{{class_name}}(); + {% for attribute_variable in attribute_variables %} + {{attribute_name}}->set_{{attribute_variable.protobuf_field}}(attribute_value.{{attribute_variable.attribute_name}}); + {% endfor %} + return {{attribute_name}}; +} diff --git a/xml_converter/generators/cpp_templates/enum.cpp b/xml_converter/generators/cpp_templates/enum.cpp index 210659aa..105572f0 100644 --- a/xml_converter/generators/cpp_templates/enum.cpp +++ b/xml_converter/generators/cpp_templates/enum.cpp @@ -1,3 +1,4 @@ +#include "waypoint.pb.h" #include "{{attribute_name}}_gen.hpp" #include @@ -51,3 +52,24 @@ string stringify_{{attribute_name}}({{class_name}} attribute_value) { return "{{class_name}}::{{attribute_variables[0].xml_fields[0]}}"; } } + +waypoint::{{class_name}} to_proto_{{attribute_name}} ({{class_name}} attribute_value) { + waypoint::{{class_name}} {{attribute_name}}; + {% for n, attribute_variable in enumerate(attribute_variables) %} + {% for i, value in enumerate(attribute_variable.xml_fields) %} + {% if i == 0 and n == 0: %} + if (attribute_value == {{class_name}}::{{attribute_variable.attribute_name}}) { + {{attribute_name}} = waypoint::{{class_name}}::{{attribute_variable.attribute_name}}; + } + {% else: %} + else if (attribute_value == {{class_name}}::{{attribute_variable.attribute_name}}) { + {{attribute_name}} = waypoint::{{class_name}}::{{attribute_variable.attribute_name}}; + } + {% endif %} + {% endfor %} + {% endfor %} + else { + {{attribute_name}} = waypoint::{{class_name}}::{{attribute_variables[0].attribute_name}}; + } + return {{attribute_name}}; +} \ No newline at end of file diff --git a/xml_converter/generators/cpp_templates/multiflagvalue.cpp b/xml_converter/generators/cpp_templates/multiflagvalue.cpp index abd3a8e4..17dcb7cd 100644 --- a/xml_converter/generators/cpp_templates/multiflagvalue.cpp +++ b/xml_converter/generators/cpp_templates/multiflagvalue.cpp @@ -1,3 +1,4 @@ +#include #include "{{attribute_name}}_gen.hpp" #include @@ -50,3 +51,13 @@ string stringify_{{attribute_name}}({{class_name}} attribute_value) { {% endfor %} return output; } + +waypoint::{{class_name}}* to_proto_{{attribute_name}} ({{class_name}} attribute_value) { + waypoint::{{class_name}}* {{attribute_name}} = new waypoint::{{class_name}}(); + {% for n, attribute_variable in enumerate(attribute_variables)%} + if (attribute_value.{{attribute_variable.attribute_name}} == true) { + {{attribute_name}}->set_{{attribute_variable.attribute_name}}(true); + } + {% endfor %} + return {{attribute_name}}; +} \ No newline at end of file diff --git a/xml_converter/proto/waypoint.proto b/xml_converter/proto/waypoint.proto index f245438e..bf6bf544 100644 --- a/xml_converter/proto/waypoint.proto +++ b/xml_converter/proto/waypoint.proto @@ -8,7 +8,7 @@ message Category { bool is_separator = 3; string name = 4; string tip_description = 5; - map children = 6; + Category children = 6; string type = 7; } @@ -21,8 +21,8 @@ message Icon { float distance_fade_start = 6; float height_offset= 7; Position position = 8; - ResetBehavior reset_behavior= 9; - Trigger trigger = 10; + Trigger trigger = 9; + EulerRotation euler_rotation = 10; fixed32 achievement_bit = 16; int32 achievement_id = 17; @@ -35,6 +35,13 @@ message Icon { string tip_description = 24; string tip_name = 25; Color color = 26; + FestivalFilter festival_filter = 27; + MapTypeFilter map_type_filter = 28; + MountFilter mount_filter = 29; + ProfessionFilter profession_filter = 30; + SpecializationFilter specialization_filter = 31; + SpeciesFilter species_filter = 32; + CullChirality cull_chirality = 33; float __tentative__scale = 2048; bool __tentative__render_ingame = 2049; @@ -53,7 +60,6 @@ message Trail { float distance_fade_start = 6; TrailData trail_data = 7; float animation_speed = 8; - CullChirality cull_chirality = 9; fixed32 achievement_bit = 16; int32 achievement_id = 17; @@ -69,6 +75,7 @@ message Trail { SpecializationFilter specialization_filter = 27; SpeciesFilter species_filter = 28; int32 map_display_size = 29; + CullChirality cull_chirality = 30; bool __tentative__render_ingame = 2049; bool __tentative__render_on_map = 2050; @@ -108,6 +115,7 @@ message Trigger { Category action_hide_category = 12; Category action_show_category = 13; Category action_toggle_category = 14; + ResetBehavior reset_behavior= 15; } message GUID { @@ -181,7 +189,7 @@ message MountFilter { bool griffon = 5; bool roller_beetle = 6; bool warclaw = 7; - bool skyscalee = 8; + bool skyscale = 8; bool skiff = 9; bool seige_turtle = 10; } @@ -195,7 +203,7 @@ message ProfessionFilter { bool elementalist = 6; bool mesmer = 7; bool necromancer = 8; - bool revenantnt = 9; + bool revenant = 9; } message SpecializationFilter { @@ -220,7 +228,7 @@ message SpecializationFilter { bool thief_deadeye = 17; bool warrior_spellbreaker = 18; // End of Dragon Spec - bool elmentalist_catalyst = 19; + bool elementalist_catalyst = 19; bool engineer_mechanist = 20; bool guardian_willbender = 21; bool mesmer_virtuoso = 22; diff --git a/xml_converter/src/attribute/color.cpp b/xml_converter/src/attribute/color.cpp index a2396451..48401406 100644 --- a/xml_converter/src/attribute/color.cpp +++ b/xml_converter/src/attribute/color.cpp @@ -36,7 +36,7 @@ string stringify_color(Color attribute_value) { // Converts a Color into a stringy value so it can be saved to xml. //////////////////////////////////////////////////////////////////////////////// waypoint::Color* to_proto_color(Color attribute_value) { - waypoint::Color* color; + waypoint::Color* color = new waypoint::Color(); color->set_hex(attribute_value.hex); return color; } diff --git a/xml_converter/src/attribute/cull_chirality_gen.cpp b/xml_converter/src/attribute/cull_chirality_gen.cpp index 5868a13d..093b4404 100644 --- a/xml_converter/src/attribute/cull_chirality_gen.cpp +++ b/xml_converter/src/attribute/cull_chirality_gen.cpp @@ -1,3 +1,4 @@ +#include "waypoint.pb.h" #include "cull_chirality_gen.hpp" #include @@ -43,3 +44,20 @@ string stringify_cull_chirality(CullChirality attribute_value) { return "CullChirality::none"; } } + +waypoint::CullChirality to_proto_cull_chirality (CullChirality attribute_value) { + waypoint::CullChirality cull_chirality; + if (attribute_value == CullChirality::none) { + cull_chirality = waypoint::CullChirality::none; + } + else if (attribute_value == CullChirality::clockwise) { + cull_chirality = waypoint::CullChirality::clockwise; + } + else if (attribute_value == CullChirality::counter_clockwise) { + cull_chirality = waypoint::CullChirality::counter_clockwise; + } + else { + cull_chirality = waypoint::CullChirality::none; + } + return cull_chirality; +} \ No newline at end of file diff --git a/xml_converter/src/attribute/cull_chirality_gen.hpp b/xml_converter/src/attribute/cull_chirality_gen.hpp index f062d1cc..c819d3bd 100644 --- a/xml_converter/src/attribute/cull_chirality_gen.hpp +++ b/xml_converter/src/attribute/cull_chirality_gen.hpp @@ -15,4 +15,4 @@ enum CullChirality { }; CullChirality parse_cull_chirality(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_cull_chirality(CullChirality attribute_value); -// waypoint::CullChirality* to_proto_cull_chirality(CullChirality attribute_value); +waypoint::CullChirality to_proto_cull_chirality(CullChirality attribute_value); diff --git a/xml_converter/src/attribute/euler_rotation_gen.cpp b/xml_converter/src/attribute/euler_rotation_gen.cpp index f85be9c1..8d0d16c9 100644 --- a/xml_converter/src/attribute/euler_rotation_gen.cpp +++ b/xml_converter/src/attribute/euler_rotation_gen.cpp @@ -33,3 +33,11 @@ string stringify_euler_rotation(EulerRotation attribute_value) { output = output + "," + to_string(attribute_value.z_rotation); return output; } + +waypoint::EulerRotation* to_proto_euler_rotation (EulerRotation attribute_value) { + waypoint::EulerRotation* euler_rotation = new waypoint::EulerRotation(); + euler_rotation->set_x(attribute_value.x_rotation); + euler_rotation->set_y(attribute_value.y_rotation); + euler_rotation->set_z(attribute_value.z_rotation); + return euler_rotation; +} diff --git a/xml_converter/src/attribute/euler_rotation_gen.hpp b/xml_converter/src/attribute/euler_rotation_gen.hpp index 50c62ae2..114ba325 100644 --- a/xml_converter/src/attribute/euler_rotation_gen.hpp +++ b/xml_converter/src/attribute/euler_rotation_gen.hpp @@ -20,4 +20,4 @@ class EulerRotation { }; EulerRotation parse_euler_rotation(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_euler_rotation(EulerRotation attribute_value); -// waypoint::EulerRotation* to_proto_euler_rotation(EulerRotation attribute_value); +waypoint::EulerRotation* to_proto_euler_rotation(EulerRotation attribute_value); diff --git a/xml_converter/src/attribute/festival_filter_gen.cpp b/xml_converter/src/attribute/festival_filter_gen.cpp index 5986d2ad..618a3048 100644 --- a/xml_converter/src/attribute/festival_filter_gen.cpp +++ b/xml_converter/src/attribute/festival_filter_gen.cpp @@ -1,3 +1,4 @@ +#include #include "festival_filter_gen.hpp" #include @@ -81,3 +82,29 @@ string stringify_festival_filter(FestivalFilter attribute_value) { } return output; } + +waypoint::FestivalFilter* to_proto_festival_filter (FestivalFilter attribute_value) { + waypoint::FestivalFilter* festival_filter = new waypoint::FestivalFilter(); + if (attribute_value.dragonbash == true) { + festival_filter->set_dragonbash(true); + } + if (attribute_value.festival_of_the_four_winds == true) { + festival_filter->set_festival_of_the_four_winds(true); + } + if (attribute_value.halloween == true) { + festival_filter->set_halloween(true); + } + if (attribute_value.lunar_new_year == true) { + festival_filter->set_lunar_new_year(true); + } + if (attribute_value.super_adventure_festival == true) { + festival_filter->set_super_adventure_festival(true); + } + if (attribute_value.wintersday == true) { + festival_filter->set_wintersday(true); + } + if (attribute_value.none == true) { + festival_filter->set_none(true); + } + return festival_filter; +} \ No newline at end of file diff --git a/xml_converter/src/attribute/festival_filter_gen.hpp b/xml_converter/src/attribute/festival_filter_gen.hpp index fbcb2b8e..346dd5ee 100644 --- a/xml_converter/src/attribute/festival_filter_gen.hpp +++ b/xml_converter/src/attribute/festival_filter_gen.hpp @@ -24,4 +24,4 @@ class FestivalFilter { }; FestivalFilter parse_festival_filter(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_festival_filter(FestivalFilter attribute_value); -// waypoint::FestivalFilter* to_proto_festival_filter(FestivalFilter attribute_value); +waypoint::FestivalFilter* to_proto_festival_filter(FestivalFilter attribute_value); diff --git a/xml_converter/src/attribute/image.cpp b/xml_converter/src/attribute/image.cpp index 552359a1..d0e5f644 100644 --- a/xml_converter/src/attribute/image.cpp +++ b/xml_converter/src/attribute/image.cpp @@ -35,7 +35,7 @@ string stringify_image(Image attribute_value) { // Converts an Image into a waypoint::Image pointer to save to proto. //////////////////////////////////////////////////////////////////////////////// waypoint::Texture* to_proto_image(Image attribute_value) { - waypoint::Texture* texture; + waypoint::Texture* texture = new waypoint::Texture(); texture->set_path(attribute_value.path); return texture; } diff --git a/xml_converter/src/attribute/map_type_filter_gen.cpp b/xml_converter/src/attribute/map_type_filter_gen.cpp index 90138800..7ebc17ce 100644 --- a/xml_converter/src/attribute/map_type_filter_gen.cpp +++ b/xml_converter/src/attribute/map_type_filter_gen.cpp @@ -1,3 +1,4 @@ +#include #include "map_type_filter_gen.hpp" #include @@ -197,3 +198,80 @@ string stringify_map_type_filter(MapTypeFilter attribute_value) { } return output; } + +waypoint::MapTypeFilter* to_proto_map_type_filter (MapTypeFilter attribute_value) { + waypoint::MapTypeFilter* map_type_filter = new waypoint::MapTypeFilter(); + if (attribute_value.unknown_map == true) { + map_type_filter->set_unknown_map(true); + } + if (attribute_value.redirect_map == true) { + map_type_filter->set_redirect_map(true); + } + if (attribute_value.character_create_map == true) { + map_type_filter->set_character_create_map(true); + } + if (attribute_value.pvp_map == true) { + map_type_filter->set_pvp_map(true); + } + if (attribute_value.gvg_map == true) { + map_type_filter->set_gvg_map(true); + } + if (attribute_value.instance_map == true) { + map_type_filter->set_instance_map(true); + } + if (attribute_value.public_map == true) { + map_type_filter->set_public_map(true); + } + if (attribute_value.tournament_map == true) { + map_type_filter->set_tournament_map(true); + } + if (attribute_value.tutorial_map == true) { + map_type_filter->set_tutorial_map(true); + } + if (attribute_value.user_tournament_map == true) { + map_type_filter->set_user_tournament_map(true); + } + if (attribute_value.center_map == true) { + map_type_filter->set_center_map(true); + } + if (attribute_value.eternal_battlegrounds_map == true) { + map_type_filter->set_eternal_battlegrounds_map(true); + } + if (attribute_value.bluehome_map == true) { + map_type_filter->set_bluehome_map(true); + } + if (attribute_value.blue_borderlands_map == true) { + map_type_filter->set_blue_borderlands_map(true); + } + if (attribute_value.green_home_map == true) { + map_type_filter->set_green_home_map(true); + } + if (attribute_value.green_borderlands_map == true) { + map_type_filter->set_green_borderlands_map(true); + } + if (attribute_value.red_home_map == true) { + map_type_filter->set_red_home_map(true); + } + if (attribute_value.red_borderlands_map == true) { + map_type_filter->set_red_borderlands_map(true); + } + if (attribute_value.fortunes_vale_map == true) { + map_type_filter->set_fortunes_vale_map(true); + } + if (attribute_value.jump_puzzle_map == true) { + map_type_filter->set_jump_puzzle_map(true); + } + if (attribute_value.obsidian_sanctum_map == true) { + map_type_filter->set_obsidian_sanctum_map(true); + } + if (attribute_value.edge_of_the_mists_map == true) { + map_type_filter->set_edge_of_the_mists_map(true); + } + if (attribute_value.public_mini_map == true) { + map_type_filter->set_public_mini_map(true); + } + if (attribute_value.wvw_lounge_map == true) { + map_type_filter->set_wvw_lounge_map(true); + } + return map_type_filter; +} \ No newline at end of file diff --git a/xml_converter/src/attribute/map_type_filter_gen.hpp b/xml_converter/src/attribute/map_type_filter_gen.hpp index 3cb6d584..08112732 100644 --- a/xml_converter/src/attribute/map_type_filter_gen.hpp +++ b/xml_converter/src/attribute/map_type_filter_gen.hpp @@ -41,4 +41,4 @@ class MapTypeFilter { }; MapTypeFilter parse_map_type_filter(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_map_type_filter(MapTypeFilter attribute_value); -// waypoint::MapTypeFilter* to_proto_map_type_filter(MapTypeFilter attribute_value); +waypoint::MapTypeFilter* to_proto_map_type_filter(MapTypeFilter attribute_value); diff --git a/xml_converter/src/attribute/marker_category.cpp b/xml_converter/src/attribute/marker_category.cpp index 68287b7a..dc2bcd4b 100644 --- a/xml_converter/src/attribute/marker_category.cpp +++ b/xml_converter/src/attribute/marker_category.cpp @@ -5,6 +5,7 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" +#include "waypoint.pb.h" //////////////////////////////////////////////////////////////////////////////// // parse_marker_category @@ -33,7 +34,7 @@ std::string stringify_marker_category(MarkerCategory attribute_value) { // Returns a MarkerCategory so that it can be saved to proto. //////////////////////////////////////////////////////////////////////////////// waypoint::Category* to_proto_marker_category(MarkerCategory attribute_value) { - waypoint::Category* category; + waypoint::Category* category = new waypoint::Category(); category->set_type(attribute_value.category); return category; } diff --git a/xml_converter/src/attribute/mount_filter_gen.cpp b/xml_converter/src/attribute/mount_filter_gen.cpp index dd769e1c..34c29b96 100644 --- a/xml_converter/src/attribute/mount_filter_gen.cpp +++ b/xml_converter/src/attribute/mount_filter_gen.cpp @@ -1,3 +1,4 @@ +#include #include "mount_filter_gen.hpp" #include @@ -99,3 +100,38 @@ string stringify_mount_filter(MountFilter attribute_value) { } return output; } + +waypoint::MountFilter* to_proto_mount_filter (MountFilter attribute_value) { + waypoint::MountFilter* mount_filter = new waypoint::MountFilter(); + if (attribute_value.raptor == true) { + mount_filter->set_raptor(true); + } + if (attribute_value.springer == true) { + mount_filter->set_springer(true); + } + if (attribute_value.skimmer == true) { + mount_filter->set_skimmer(true); + } + if (attribute_value.jackal == true) { + mount_filter->set_jackal(true); + } + if (attribute_value.griffon == true) { + mount_filter->set_griffon(true); + } + if (attribute_value.roller_beetle == true) { + mount_filter->set_roller_beetle(true); + } + if (attribute_value.warclaw == true) { + mount_filter->set_warclaw(true); + } + if (attribute_value.skyscale == true) { + mount_filter->set_skyscale(true); + } + if (attribute_value.skiff == true) { + mount_filter->set_skiff(true); + } + if (attribute_value.seige_turtle == true) { + mount_filter->set_seige_turtle(true); + } + return mount_filter; +} \ No newline at end of file diff --git a/xml_converter/src/attribute/mount_filter_gen.hpp b/xml_converter/src/attribute/mount_filter_gen.hpp index e230450b..a45d73ca 100644 --- a/xml_converter/src/attribute/mount_filter_gen.hpp +++ b/xml_converter/src/attribute/mount_filter_gen.hpp @@ -27,4 +27,4 @@ class MountFilter { }; MountFilter parse_mount_filter(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_mount_filter(MountFilter attribute_value); -// waypoint::MountFilter* to_proto_mount_filter(MountFilter attribute_value); +waypoint::MountFilter* to_proto_mount_filter(MountFilter attribute_value); diff --git a/xml_converter/src/attribute/position_gen.cpp b/xml_converter/src/attribute/position_gen.cpp index 1d0be9e8..44d1d7bd 100644 --- a/xml_converter/src/attribute/position_gen.cpp +++ b/xml_converter/src/attribute/position_gen.cpp @@ -26,3 +26,11 @@ Position parse_position(rapidxml::xml_attribute<>* input, vector*) { } return position; } + +waypoint::Position* to_proto_position (Position attribute_value) { + waypoint::Position* position = new waypoint::Position(); + position->set_x(attribute_value.x_position); + position->set_y(attribute_value.y_position); + position->set_z(attribute_value.z_position); + return position; +} diff --git a/xml_converter/src/attribute/position_gen.hpp b/xml_converter/src/attribute/position_gen.hpp index 6ab33150..0d163163 100644 --- a/xml_converter/src/attribute/position_gen.hpp +++ b/xml_converter/src/attribute/position_gen.hpp @@ -20,4 +20,4 @@ class Position { }; Position parse_position(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_position(Position attribute_value); -// waypoint::Position* to_proto_position(Position attribute_value); +waypoint::Position* to_proto_position(Position attribute_value); diff --git a/xml_converter/src/attribute/profession_filter_gen.cpp b/xml_converter/src/attribute/profession_filter_gen.cpp index eb99d7a1..5bf41bf6 100644 --- a/xml_converter/src/attribute/profession_filter_gen.cpp +++ b/xml_converter/src/attribute/profession_filter_gen.cpp @@ -1,3 +1,4 @@ +#include #include "profession_filter_gen.hpp" #include @@ -92,3 +93,35 @@ string stringify_profession_filter(ProfessionFilter attribute_value) { } return output; } + +waypoint::ProfessionFilter* to_proto_profession_filter (ProfessionFilter attribute_value) { + waypoint::ProfessionFilter* profession_filter = new waypoint::ProfessionFilter(); + if (attribute_value.guardian == true) { + profession_filter->set_guardian(true); + } + if (attribute_value.warrior == true) { + profession_filter->set_warrior(true); + } + if (attribute_value.engineer == true) { + profession_filter->set_engineer(true); + } + if (attribute_value.ranger == true) { + profession_filter->set_ranger(true); + } + if (attribute_value.thief == true) { + profession_filter->set_thief(true); + } + if (attribute_value.elementalist == true) { + profession_filter->set_elementalist(true); + } + if (attribute_value.mesmer == true) { + profession_filter->set_mesmer(true); + } + if (attribute_value.necromancer == true) { + profession_filter->set_necromancer(true); + } + if (attribute_value.revenant == true) { + profession_filter->set_revenant(true); + } + return profession_filter; +} \ No newline at end of file diff --git a/xml_converter/src/attribute/profession_filter_gen.hpp b/xml_converter/src/attribute/profession_filter_gen.hpp index d209a779..33c0fc97 100644 --- a/xml_converter/src/attribute/profession_filter_gen.hpp +++ b/xml_converter/src/attribute/profession_filter_gen.hpp @@ -26,4 +26,4 @@ class ProfessionFilter { }; ProfessionFilter parse_profession_filter(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_profession_filter(ProfessionFilter attribute_value); -// waypoint::ProfessionFilter* to_proto_profession_filter(ProfessionFilter attribute_value); +waypoint::ProfessionFilter* to_proto_profession_filter(ProfessionFilter attribute_value); diff --git a/xml_converter/src/attribute/reset_behavior_gen.cpp b/xml_converter/src/attribute/reset_behavior_gen.cpp index fcaf2063..e3035ba9 100644 --- a/xml_converter/src/attribute/reset_behavior_gen.cpp +++ b/xml_converter/src/attribute/reset_behavior_gen.cpp @@ -1,3 +1,4 @@ +#include "waypoint.pb.h" #include "reset_behavior_gen.hpp" #include @@ -133,3 +134,65 @@ string stringify_reset_behavior(ResetBehavior attribute_value) { return "ResetBehavior::0"; } } + +waypoint::ResetBehavior to_proto_reset_behavior (ResetBehavior attribute_value) { + waypoint::ResetBehavior reset_behavior; + if (attribute_value == ResetBehavior::always_visible) { + reset_behavior = waypoint::ResetBehavior::always_visible; + } + else if (attribute_value == ResetBehavior::always_visible) { + reset_behavior = waypoint::ResetBehavior::always_visible; + } + else if (attribute_value == ResetBehavior::map_change) { + reset_behavior = waypoint::ResetBehavior::map_change; + } + else if (attribute_value == ResetBehavior::map_change) { + reset_behavior = waypoint::ResetBehavior::map_change; + } + else if (attribute_value == ResetBehavior::daily_reset) { + reset_behavior = waypoint::ResetBehavior::daily_reset; + } + else if (attribute_value == ResetBehavior::daily_reset) { + reset_behavior = waypoint::ResetBehavior::daily_reset; + } + else if (attribute_value == ResetBehavior::never) { + reset_behavior = waypoint::ResetBehavior::never; + } + else if (attribute_value == ResetBehavior::never) { + reset_behavior = waypoint::ResetBehavior::never; + } + else if (attribute_value == ResetBehavior::timer) { + reset_behavior = waypoint::ResetBehavior::timer; + } + else if (attribute_value == ResetBehavior::timer) { + reset_behavior = waypoint::ResetBehavior::timer; + } + else if (attribute_value == ResetBehavior::map_reset) { + reset_behavior = waypoint::ResetBehavior::map_reset; + } + else if (attribute_value == ResetBehavior::map_reset) { + reset_behavior = waypoint::ResetBehavior::map_reset; + } + else if (attribute_value == ResetBehavior::instance_change) { + reset_behavior = waypoint::ResetBehavior::instance_change; + } + else if (attribute_value == ResetBehavior::instance_change) { + reset_behavior = waypoint::ResetBehavior::instance_change; + } + else if (attribute_value == ResetBehavior::daily_reset_per_character) { + reset_behavior = waypoint::ResetBehavior::daily_reset_per_character; + } + else if (attribute_value == ResetBehavior::daily_reset_per_character) { + reset_behavior = waypoint::ResetBehavior::daily_reset_per_character; + } + else if (attribute_value == ResetBehavior::weekly_reset) { + reset_behavior = waypoint::ResetBehavior::weekly_reset; + } + else if (attribute_value == ResetBehavior::weekly_reset) { + reset_behavior = waypoint::ResetBehavior::weekly_reset; + } + else { + reset_behavior = waypoint::ResetBehavior::always_visible; + } + return reset_behavior; +} \ No newline at end of file diff --git a/xml_converter/src/attribute/reset_behavior_gen.hpp b/xml_converter/src/attribute/reset_behavior_gen.hpp index 6b16ea8d..3e10759c 100644 --- a/xml_converter/src/attribute/reset_behavior_gen.hpp +++ b/xml_converter/src/attribute/reset_behavior_gen.hpp @@ -21,4 +21,4 @@ enum ResetBehavior { }; ResetBehavior parse_reset_behavior(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_reset_behavior(ResetBehavior attribute_value); -// waypoint::ResetBehavior* to_proto_reset_behavior(ResetBehavior attribute_value); +waypoint::ResetBehavior to_proto_reset_behavior(ResetBehavior attribute_value); diff --git a/xml_converter/src/attribute/specialization_filter_gen.cpp b/xml_converter/src/attribute/specialization_filter_gen.cpp index 8b76a43b..10348577 100644 --- a/xml_converter/src/attribute/specialization_filter_gen.cpp +++ b/xml_converter/src/attribute/specialization_filter_gen.cpp @@ -1,3 +1,4 @@ +#include #include "specialization_filter_gen.hpp" #include @@ -614,3 +615,224 @@ string stringify_specialization_filter(SpecializationFilter attribute_value) { } return output; } + +waypoint::SpecializationFilter* to_proto_specialization_filter (SpecializationFilter attribute_value) { + waypoint::SpecializationFilter* specialization_filter = new waypoint::SpecializationFilter(); + if (attribute_value.elementalist_tempest == true) { + specialization_filter->set_elementalist_tempest(true); + } + if (attribute_value.engineer_scrapper == true) { + specialization_filter->set_engineer_scrapper(true); + } + if (attribute_value.guardian_dragonhunter == true) { + specialization_filter->set_guardian_dragonhunter(true); + } + if (attribute_value.mesmer_chronomancer == true) { + specialization_filter->set_mesmer_chronomancer(true); + } + if (attribute_value.necromancer_reaper == true) { + specialization_filter->set_necromancer_reaper(true); + } + if (attribute_value.ranger_druid == true) { + specialization_filter->set_ranger_druid(true); + } + if (attribute_value.revenant_herald == true) { + specialization_filter->set_revenant_herald(true); + } + if (attribute_value.thief_daredevil == true) { + specialization_filter->set_thief_daredevil(true); + } + if (attribute_value.warrior_berserker == true) { + specialization_filter->set_warrior_berserker(true); + } + if (attribute_value.elementalist_weaver == true) { + specialization_filter->set_elementalist_weaver(true); + } + if (attribute_value.engineer_holosmith == true) { + specialization_filter->set_engineer_holosmith(true); + } + if (attribute_value.guardian_firebrand == true) { + specialization_filter->set_guardian_firebrand(true); + } + if (attribute_value.mesmer_mirage == true) { + specialization_filter->set_mesmer_mirage(true); + } + if (attribute_value.necromancer_scourge == true) { + specialization_filter->set_necromancer_scourge(true); + } + if (attribute_value.ranger_soulbeast == true) { + specialization_filter->set_ranger_soulbeast(true); + } + if (attribute_value.revenant_renegade == true) { + specialization_filter->set_revenant_renegade(true); + } + if (attribute_value.thief_deadeye == true) { + specialization_filter->set_thief_deadeye(true); + } + if (attribute_value.warrior_spellbreaker == true) { + specialization_filter->set_warrior_spellbreaker(true); + } + if (attribute_value.elementalist_catalyst == true) { + specialization_filter->set_elementalist_catalyst(true); + } + if (attribute_value.engineer_mechanist == true) { + specialization_filter->set_engineer_mechanist(true); + } + if (attribute_value.guardian_willbender == true) { + specialization_filter->set_guardian_willbender(true); + } + if (attribute_value.mesmer_virtuoso == true) { + specialization_filter->set_mesmer_virtuoso(true); + } + if (attribute_value.necromancer_harbinger == true) { + specialization_filter->set_necromancer_harbinger(true); + } + if (attribute_value.ranger_untamed == true) { + specialization_filter->set_ranger_untamed(true); + } + if (attribute_value.revenant_vindicator == true) { + specialization_filter->set_revenant_vindicator(true); + } + if (attribute_value.thief_specter == true) { + specialization_filter->set_thief_specter(true); + } + if (attribute_value.warrior_bladesworn == true) { + specialization_filter->set_warrior_bladesworn(true); + } + if (attribute_value.elementalist_air == true) { + specialization_filter->set_elementalist_air(true); + } + if (attribute_value.elementalist_arcane == true) { + specialization_filter->set_elementalist_arcane(true); + } + if (attribute_value.elementalist_earth == true) { + specialization_filter->set_elementalist_earth(true); + } + if (attribute_value.elementalist_fire == true) { + specialization_filter->set_elementalist_fire(true); + } + if (attribute_value.elementalist_water == true) { + specialization_filter->set_elementalist_water(true); + } + if (attribute_value.engineer_alchemy == true) { + specialization_filter->set_engineer_alchemy(true); + } + if (attribute_value.engineer_explosives == true) { + specialization_filter->set_engineer_explosives(true); + } + if (attribute_value.engineer_firearms == true) { + specialization_filter->set_engineer_firearms(true); + } + if (attribute_value.engineer_inventions == true) { + specialization_filter->set_engineer_inventions(true); + } + if (attribute_value.engineer_tools == true) { + specialization_filter->set_engineer_tools(true); + } + if (attribute_value.guardian_honor == true) { + specialization_filter->set_guardian_honor(true); + } + if (attribute_value.guardian_radiance == true) { + specialization_filter->set_guardian_radiance(true); + } + if (attribute_value.guardian_valor == true) { + specialization_filter->set_guardian_valor(true); + } + if (attribute_value.guardian_virtues == true) { + specialization_filter->set_guardian_virtues(true); + } + if (attribute_value.guardian_zeal == true) { + specialization_filter->set_guardian_zeal(true); + } + if (attribute_value.mesmer_chaos == true) { + specialization_filter->set_mesmer_chaos(true); + } + if (attribute_value.mesmer_domination == true) { + specialization_filter->set_mesmer_domination(true); + } + if (attribute_value.mesmer_dueling == true) { + specialization_filter->set_mesmer_dueling(true); + } + if (attribute_value.mesmer_illusions == true) { + specialization_filter->set_mesmer_illusions(true); + } + if (attribute_value.mesmer_inspiration == true) { + specialization_filter->set_mesmer_inspiration(true); + } + if (attribute_value.necromancer_blood_magic == true) { + specialization_filter->set_necromancer_blood_magic(true); + } + if (attribute_value.necromancer_curses == true) { + specialization_filter->set_necromancer_curses(true); + } + if (attribute_value.necromancer_death_magic == true) { + specialization_filter->set_necromancer_death_magic(true); + } + if (attribute_value.necromancer_soul_reaping == true) { + specialization_filter->set_necromancer_soul_reaping(true); + } + if (attribute_value.necromancer_spite == true) { + specialization_filter->set_necromancer_spite(true); + } + if (attribute_value.ranger_beastmastery == true) { + specialization_filter->set_ranger_beastmastery(true); + } + if (attribute_value.ranger_marksmanship == true) { + specialization_filter->set_ranger_marksmanship(true); + } + if (attribute_value.ranger_nature_magic == true) { + specialization_filter->set_ranger_nature_magic(true); + } + if (attribute_value.ranger_skirmishing == true) { + specialization_filter->set_ranger_skirmishing(true); + } + if (attribute_value.ranger_wilderness_survival == true) { + specialization_filter->set_ranger_wilderness_survival(true); + } + if (attribute_value.revenant_corruption == true) { + specialization_filter->set_revenant_corruption(true); + } + if (attribute_value.revenant_devastation == true) { + specialization_filter->set_revenant_devastation(true); + } + if (attribute_value.revenant_invocation == true) { + specialization_filter->set_revenant_invocation(true); + } + if (attribute_value.revenant_retribution == true) { + specialization_filter->set_revenant_retribution(true); + } + if (attribute_value.revenant_salvation == true) { + specialization_filter->set_revenant_salvation(true); + } + if (attribute_value.thief_acrobatics == true) { + specialization_filter->set_thief_acrobatics(true); + } + if (attribute_value.thief_critical_strikes == true) { + specialization_filter->set_thief_critical_strikes(true); + } + if (attribute_value.thief_deadly_arts == true) { + specialization_filter->set_thief_deadly_arts(true); + } + if (attribute_value.thief_shadow_arts == true) { + specialization_filter->set_thief_shadow_arts(true); + } + if (attribute_value.thief_trickery == true) { + specialization_filter->set_thief_trickery(true); + } + if (attribute_value.warrior_arms == true) { + specialization_filter->set_warrior_arms(true); + } + if (attribute_value.warrior_defense == true) { + specialization_filter->set_warrior_defense(true); + } + if (attribute_value.warrior_discipline == true) { + specialization_filter->set_warrior_discipline(true); + } + if (attribute_value.warrior_strength == true) { + specialization_filter->set_warrior_strength(true); + } + if (attribute_value.warrior_tactics == true) { + specialization_filter->set_warrior_tactics(true); + } + return specialization_filter; +} \ No newline at end of file diff --git a/xml_converter/src/attribute/specialization_filter_gen.hpp b/xml_converter/src/attribute/specialization_filter_gen.hpp index b0f872cf..15f8782c 100644 --- a/xml_converter/src/attribute/specialization_filter_gen.hpp +++ b/xml_converter/src/attribute/specialization_filter_gen.hpp @@ -89,4 +89,4 @@ class SpecializationFilter { }; SpecializationFilter parse_specialization_filter(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_specialization_filter(SpecializationFilter attribute_value); -// waypoint::SpecializationFilter* to_proto_specialization_filter(SpecializationFilter attribute_value); +waypoint::SpecializationFilter* to_proto_specialization_filter(SpecializationFilter attribute_value); diff --git a/xml_converter/src/attribute/species_filter_gen.cpp b/xml_converter/src/attribute/species_filter_gen.cpp index 782c6106..51e67346 100644 --- a/xml_converter/src/attribute/species_filter_gen.cpp +++ b/xml_converter/src/attribute/species_filter_gen.cpp @@ -1,3 +1,4 @@ +#include #include "species_filter_gen.hpp" #include @@ -64,3 +65,23 @@ string stringify_species_filter(SpeciesFilter attribute_value) { } return output; } + +waypoint::SpeciesFilter* to_proto_species_filter (SpeciesFilter attribute_value) { + waypoint::SpeciesFilter* species_filter = new waypoint::SpeciesFilter(); + if (attribute_value.asura == true) { + species_filter->set_asura(true); + } + if (attribute_value.charr == true) { + species_filter->set_charr(true); + } + if (attribute_value.human == true) { + species_filter->set_human(true); + } + if (attribute_value.norn == true) { + species_filter->set_norn(true); + } + if (attribute_value.sylvari == true) { + species_filter->set_sylvari(true); + } + return species_filter; +} \ No newline at end of file diff --git a/xml_converter/src/attribute/species_filter_gen.hpp b/xml_converter/src/attribute/species_filter_gen.hpp index 4957b868..d5e3e99e 100644 --- a/xml_converter/src/attribute/species_filter_gen.hpp +++ b/xml_converter/src/attribute/species_filter_gen.hpp @@ -22,4 +22,4 @@ class SpeciesFilter { }; SpeciesFilter parse_species_filter(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_species_filter(SpeciesFilter attribute_value); -// waypoint::SpeciesFilter* to_proto_species_filter(SpeciesFilter attribute_value); +waypoint::SpeciesFilter* to_proto_species_filter(SpeciesFilter attribute_value); diff --git a/xml_converter/src/attribute/trail_data.cpp b/xml_converter/src/attribute/trail_data.cpp index 7e44b8af..ab5fc885 100644 --- a/xml_converter/src/attribute/trail_data.cpp +++ b/xml_converter/src/attribute/trail_data.cpp @@ -35,7 +35,7 @@ string stringify_trail_data(TrailData attribute_value) { // Returns a TrailData so that it can be saved to proto. //////////////////////////////////////////////////////////////////////////////// waypoint::TrailData* to_proto_trail_data(TrailData attribute_value) { - waypoint::TrailData* trail_data; + waypoint::TrailData* trail_data = new waypoint::TrailData(); trail_data->set_trail_data(attribute_value.trail_data); return trail_data; } diff --git a/xml_converter/src/attribute/unique_id.cpp b/xml_converter/src/attribute/unique_id.cpp index 26ad7e9a..5fe39cbb 100644 --- a/xml_converter/src/attribute/unique_id.cpp +++ b/xml_converter/src/attribute/unique_id.cpp @@ -8,6 +8,7 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" +#include "waypoint.pb.h" using namespace std; @@ -25,7 +26,7 @@ string stringify_unique_id(UniqueId attribute_value) { } waypoint::GUID* to_proto_unique_id(UniqueId attribute_value){ - waypoint::GUID* guid; + waypoint::GUID* guid = new waypoint::GUID(); guid->set_guid(base64_encode(&attribute_value.guid[0], attribute_value.guid.size())); return guid; } diff --git a/xml_converter/src/category_gen.cpp b/xml_converter/src/category_gen.cpp index ac966a07..49cf1ee6 100644 --- a/xml_converter/src/category_gen.cpp +++ b/xml_converter/src/category_gen.cpp @@ -97,26 +97,37 @@ std::string Category::as_protobuf() const { if (this->default_visibility_is_set) { proto_category.set_default_visibility(to_proto_bool(this->default_visibility)); - } + } if (this->display_name_is_set) { proto_category.set_display_name(to_proto_string(this->display_name)); - } + } if (this->is_separator_is_set) { proto_category.set_is_separator(to_proto_bool(this->is_separator)); - } + } if (this->name_is_set) { proto_category.set_name(to_proto_string(this->name)); - } + } if (this->tooltip_description_is_set) { proto_category.set_tip_description(to_proto_string(this->tooltip_description)); - } + } std::string output; proto_category.SerializeToString(&output); + + for (const auto& [key, val] : this->children) { + std::string text; + for (const auto& s : val.as_protobuf()) { + text += s; + } + output += text; + } + + + return output; } diff --git a/xml_converter/src/category_gen.hpp b/xml_converter/src/category_gen.hpp index 4a6b3ea7..f270dd37 100644 --- a/xml_converter/src/category_gen.hpp +++ b/xml_converter/src/category_gen.hpp @@ -23,7 +23,6 @@ class Category : public Parseable { bool is_separator_is_set = false; bool name_is_set = false; bool tooltip_description_is_set = false; - bool set_trigger = false; std::map children; Icon default_icon; Trail default_trail; diff --git a/xml_converter/src/icon_gen.cpp b/xml_converter/src/icon_gen.cpp index 6c656134..454ec2cc 100644 --- a/xml_converter/src/icon_gen.cpp +++ b/xml_converter/src/icon_gen.cpp @@ -461,225 +461,229 @@ vector Icon::as_xml() const { std::string Icon::as_protobuf() const { waypoint::Icon proto_icon; - ::waypoint::Trigger trigger; + waypoint::Trigger* trigger = new waypoint::Trigger(); + bool set_trigger = false; if (this->achievement_bitmask_is_set) { proto_icon.set_achievement_bit(to_proto_int(this->achievement_bitmask)); - } + } if (this->achievement_id_is_set) { proto_icon.set_achievement_id(to_proto_int(this->achievement_id)); - } + } if (this->alpha_is_set) { proto_icon.set_alpha(to_proto_float(this->alpha)); - } - - // if (this->auto_trigger_is_set) { - // proto_icon.trigger.set_auto_trigger(to_proto_bool(this->auto_trigger)); - // } - // - // if (this->bounce_delay_is_set) { - // proto_icon.trigger.set_bounce_delay(to_proto_float(this->bounce_delay)); - // } - // - // if (this->bounce_duration_is_set) { - // proto_icon.trigger.set_bounce_duration(to_proto_float(this->bounce_duration)); - // } - // - // if (this->bounce_height_is_set) { - // proto_icon.trigger.set_bounce_height(to_proto_float(this->bounce_height)); - // } - // + } + + if (this->auto_trigger_is_set) { + trigger->set_auto_trigger(to_proto_bool(this->auto_trigger)); + set_trigger = true; + } + + if (this->bounce_delay_is_set) { + trigger->set_bounce_delay(to_proto_float(this->bounce_delay)); + set_trigger = true; + } + + if (this->bounce_duration_is_set) { + trigger->set_bounce_duration(to_proto_float(this->bounce_duration)); + set_trigger = true; + } + + if (this->bounce_height_is_set) { + trigger->set_bounce_height(to_proto_float(this->bounce_height)); + set_trigger = true; + } + if (this->can_fade_is_set) { proto_icon.set_can_fade(to_proto_bool(this->can_fade)); - } - - // if (this->category_is_set) { - // proto_icon.category.set_allocated_category(to_proto_marker_category(this->category)); - // } - - // if (this->color_is_set) { - // proto_icon.color.set_allocated_color(to_proto_color(this->color)); - // } - - // if (this->copy_clipboard_is_set) { - // proto_icon.trigger.set_action_copy_clipboard(to_proto_string(this->copy_clipboard)); - // } - // - // if (this->copy_message_is_set) { - // proto_icon.trigger.set_action_copy_message(to_proto_string(this->copy_message)); - // } - // - // if (this->cull_chirality_is_set) { - // this->proto_icon->cull_chirality->set_allocated(to_proto_cull_chirality(this->cull_chirality) - // } + } + + if (this->category_is_set) { + proto_icon.set_allocated_category(to_proto_marker_category(this->category)); + } + + if (this->color_is_set) { + proto_icon.set_allocated_color(to_proto_color(this->color)); + } + + if (this->copy_clipboard_is_set) { + trigger->set_action_copy_clipboard(to_proto_string(this->copy_clipboard)); + set_trigger = true; + } + + if (this->copy_message_is_set) { + trigger->set_action_copy_message(to_proto_string(this->copy_message)); + set_trigger = true; + } + + if (this->cull_chirality_is_set) { + proto_icon.set_cull_chirality(to_proto_cull_chirality(this->cull_chirality)); + } if (this->distance_fade_end_is_set) { proto_icon.set_distance_fade_end(to_proto_float(this->distance_fade_end)); - } + } if (this->distance_fade_start_is_set) { proto_icon.set_distance_fade_start(to_proto_float(this->distance_fade_start)); - } + } - // if (this->euler_rotation_is_set) { - // this->proto_icon->euler_rotation->set_allocated(to_proto_euler_rotation(this->euler_rotation) - // } + if (this->euler_rotation_is_set) { + proto_icon.set_allocated_euler_rotation(to_proto_euler_rotation(this->euler_rotation)); + } - // if (this->festival_filter_is_set) { - // this->proto_icon->festival_filter->set_allocated(to_proto_festival_filter(this->festival_filter) - // } + if (this->festival_filter_is_set) { + proto_icon.set_allocated_festival_filter(to_proto_festival_filter(this->festival_filter)); + } - // if (this->guid_is_set) { - // proto_icon.guid.set_allocated_guid(to_proto_unique_id(this->guid)); - // } + if (this->guid_is_set) { + proto_icon.set_allocated_guid(to_proto_unique_id(this->guid)); + } + + if (this->has_countdown_is_set) { + trigger->set_has_countdown(to_proto_bool(this->has_countdown)); + set_trigger = true; + } - // if (this->has_countdown_is_set) { - // proto_icon.trigger.set_has_countdown(to_proto_bool(this->has_countdown)); - // } - // if (this->heightoffset_is_set) { proto_icon.set_height_offset(to_proto_float(this->heightoffset)); - } + } if (this->hide_category_is_set) { - trigger.set_allocated_action_hide_category(to_proto_marker_category(this->hide_category)); - } + trigger->set_allocated_action_hide_category(to_proto_marker_category(this->hide_category)); + set_trigger = true; + } - // if (this->icon_is_set) { - // proto_icon.texture.set_allocated_texture(to_proto_image(this->icon)); - // } + if (this->icon_is_set) { + proto_icon.set_allocated_texture(to_proto_image(this->icon)); + } if (this->icon_size_is_set) { proto_icon.set___tentative__scale(to_proto_float(this->icon_size)); - } - - // if (this->info_message_is_set) { - // proto_icon.trigger.set_action_info_message(to_proto_string(this->info_message)); - // } - // - // if (this->invert_visibility_is_set) { - // proto_icon.trigger.set_invert_display(to_proto_bool(this->invert_visibility)); - // } - // + } + + if (this->info_message_is_set) { + trigger->set_action_info_message(to_proto_string(this->info_message)); + set_trigger = true; + } + + if (this->invert_visibility_is_set) { + trigger->set_invert_display(to_proto_bool(this->invert_visibility)); + set_trigger = true; + } + if (this->map_display_size_is_set) { proto_icon.set_map_display_size(to_proto_int(this->map_display_size)); - } + } if (this->map_id_is_set) { proto_icon.set_map_id(to_proto_int(this->map_id)); - } + } - // if (this->map_type_filter_is_set) { - // this->proto_icon->map_type_filter->set_allocated(to_proto_map_type_filter(this->map_type_filter) - // } + if (this->map_type_filter_is_set) { + proto_icon.set_allocated_map_type_filter(to_proto_map_type_filter(this->map_type_filter)); + } if (this->maximum_size_on_screen_is_set) { proto_icon.set_maximum_size_on_screen(to_proto_int(this->maximum_size_on_screen)); - } + } if (this->minimum_size_on_screen_is_set) { proto_icon.set_minimum_size_on_screen(to_proto_int(this->minimum_size_on_screen)); - } + } - // if (this->mount_filter_is_set) { - // this->proto_icon->mount_filter->set_allocated(to_proto_mount_filter(this->mount_filter) - // } + if (this->mount_filter_is_set) { + proto_icon.set_allocated_mount_filter(to_proto_mount_filter(this->mount_filter)); + } - // if (this->position_is_set) { - // this->proto_icon->position->set_allocated(to_proto_position(this->position) - // } + if (this->position_is_set) { + proto_icon.set_allocated_position(to_proto_position(this->position)); + } - // if (this->profession_filter_is_set) { - // this->proto_icon->profession_filter->set_allocated(to_proto_profession_filter(this->profession_filter) - // } + if (this->profession_filter_is_set) { + proto_icon.set_allocated_profession_filter(to_proto_profession_filter(this->profession_filter)); + } if (this->render_ingame_is_set) { proto_icon.set___tentative__render_ingame(to_proto_bool(this->render_ingame)); - } + } if (this->render_on_map_is_set) { proto_icon.set___tentative__render_on_map(to_proto_bool(this->render_on_map)); - } + } if (this->render_on_minimap_is_set) { proto_icon.set___tentative__render_on_minimap(to_proto_bool(this->render_on_minimap)); - } + } - // + if (this->reset_behavior_is_set) { + trigger->set_reset_behavior(to_proto_reset_behavior(this->reset_behavior)); + set_trigger = true; + } + + if (this->reset_length_is_set) { + trigger->set_reset_length(to_proto_float(this->reset_length)); + set_trigger = true; + } - // if (this->reset_length_is_set) { - // proto_icon.trigger.set_reset_length(to_proto_float(this->reset_length)); - // } - // if (this->scale_on_map_with_zoom_is_set) { proto_icon.set_scale_on_map_with_zoom(to_proto_bool(this->scale_on_map_with_zoom)); - } + } if (this->schedule_is_set) { proto_icon.set_bhdraft__schedule(to_proto_string(this->schedule)); - } + } if (this->schedule_duration_is_set) { proto_icon.set_bhdraft__schedule_duration(to_proto_float(this->schedule_duration)); - } + } if (this->show_category_is_set) { - trigger.set_allocated_action_show_category(to_proto_marker_category(this->show_category)); - } + trigger->set_allocated_action_show_category(to_proto_marker_category(this->show_category)); + set_trigger = true; + } - // if (this->specialization_filter_is_set) { - // this->proto_icon->specialization_filter->set_allocated(to_proto_specialization_filter(this->specialization_filter) - // } + if (this->specialization_filter_is_set) { + proto_icon.set_allocated_specialization_filter(to_proto_specialization_filter(this->specialization_filter)); + } - // if (this->species_filter_is_set) { - // this->proto_icon->species_filter->set_allocated(to_proto_species_filter(this->species_filter) - // } + if (this->species_filter_is_set) { + proto_icon.set_allocated_species_filter(to_proto_species_filter(this->species_filter)); + } if (this->toggle_category_is_set) { - trigger.set_allocated_action_toggle_category(to_proto_marker_category(this->toggle_category)); - } + trigger->set_allocated_action_toggle_category(to_proto_marker_category(this->toggle_category)); + set_trigger = true; + } if (this->tooltip_description_is_set) { proto_icon.set_tip_description(to_proto_string(this->tooltip_description)); - } + } if (this->tooltip_name_is_set) { proto_icon.set_tip_name(to_proto_string(this->tooltip_name)); - } + } + + if (this->trigger_range_is_set) { + trigger->set_range(to_proto_float(this->trigger_range)); + set_trigger = true; + } - // if (this->trigger_range_is_set) { - // proto_icon.trigger.set_range(to_proto_float(this->trigger_range)); - // } - // - // if (this->x_position_is_set) { - // this->proto_icon->position->set_allocated(to_proto_position(this->x_position) - // } - // if (this->x_rotation_is_set) { - // this->proto_icon->euler_rotation->set_allocated(to_proto_euler_rotation(this->x_rotation) - // } - // if (this->y_position_is_set) { - // this->proto_icon->position->set_allocated(to_proto_position(this->y_position) - // } - // if (this->y_rotation_is_set) { - // this->proto_icon->euler_rotation->set_allocated(to_proto_euler_rotation(this->y_rotation) - // } - // if (this->z_position_is_set) { - // this->proto_icon->position->set_allocated(to_proto_position(this->z_position) - // } - // if (this->z_rotation_is_set) { - // this->proto_icon->euler_rotation->set_allocated(to_proto_euler_rotation(this->z_rotation) - // } - proto_icon.set_allocated_trigger(&trigger); + if (set_trigger){ + proto_icon.set_allocated_trigger(trigger); + } std::string output; proto_icon.SerializeToString(&output); + + return output; } diff --git a/xml_converter/src/trail_gen.cpp b/xml_converter/src/trail_gen.cpp index 903c679f..c7d4738d 100644 --- a/xml_converter/src/trail_gen.cpp +++ b/xml_converter/src/trail_gen.cpp @@ -271,118 +271,120 @@ std::string Trail::as_protobuf() const { if (this->achievement_bitmask_is_set) { proto_trail.set_achievement_bit(to_proto_int(this->achievement_bitmask)); - } + } if (this->achievement_id_is_set) { proto_trail.set_achievement_id(to_proto_int(this->achievement_id)); - } + } if (this->alpha_is_set) { proto_trail.set_alpha(to_proto_float(this->alpha)); - } + } if (this->animation_speed_is_set) { proto_trail.set_animation_speed(to_proto_float(this->animation_speed)); - } + } if (this->can_fade_is_set) { proto_trail.set_can_fade(to_proto_bool(this->can_fade)); - } + } - // if (this->category_is_set) { - // proto_trail.category.set_allocated_category(to_proto_marker_category(this->category)); - // } + if (this->category_is_set) { + proto_trail.set_allocated_category(to_proto_marker_category(this->category)); + } - // if (this->color_is_set) { - // proto_trail.color.set_allocated_color(to_proto_color(this->color)); - // } + if (this->color_is_set) { + proto_trail.set_allocated_color(to_proto_color(this->color)); + } - // if (this->cull_chirality_is_set) { - // this->proto_trail->cull_chirality->set_allocated(to_proto_cull_chirality(this->cull_chirality) - // } + if (this->cull_chirality_is_set) { + proto_trail.set_cull_chirality(to_proto_cull_chirality(this->cull_chirality)); + } if (this->distance_fade_end_is_set) { proto_trail.set_distance_fade_end(to_proto_float(this->distance_fade_end)); - } + } if (this->distance_fade_start_is_set) { proto_trail.set_distance_fade_start(to_proto_float(this->distance_fade_start)); - } + } - // if (this->festival_filter_is_set) { - // this->proto_trail->festival_filter->set_allocated(to_proto_festival_filter(this->festival_filter) - // } + if (this->festival_filter_is_set) { + proto_trail.set_allocated_festival_filter(to_proto_festival_filter(this->festival_filter)); + } - // if (this->guid_is_set) { - // proto_trail.guid.set_allocated_guid(to_proto_unique_id(this->guid)); - // } + if (this->guid_is_set) { + proto_trail.set_allocated_guid(to_proto_unique_id(this->guid)); + } if (this->is_wall_is_set) { proto_trail.set_is_wall(to_proto_bool(this->is_wall)); - } + } if (this->map_display_size_is_set) { proto_trail.set_map_display_size(to_proto_int(this->map_display_size)); - } + } if (this->map_id_is_set) { proto_trail.set_map_id(to_proto_int(this->map_id)); - } + } - // if (this->map_type_filter_is_set) { - // this->proto_trail->map_type_filter->set_allocated(to_proto_map_type_filter(this->map_type_filter) - // } + if (this->map_type_filter_is_set) { + proto_trail.set_allocated_map_type_filter(to_proto_map_type_filter(this->map_type_filter)); + } - // if (this->mount_filter_is_set) { - // this->proto_trail->mount_filter->set_allocated(to_proto_mount_filter(this->mount_filter) - // } + if (this->mount_filter_is_set) { + proto_trail.set_allocated_mount_filter(to_proto_mount_filter(this->mount_filter)); + } - // if (this->profession_filter_is_set) { - // this->proto_trail->profession_filter->set_allocated(to_proto_profession_filter(this->profession_filter) - // } + if (this->profession_filter_is_set) { + proto_trail.set_allocated_profession_filter(to_proto_profession_filter(this->profession_filter)); + } if (this->render_ingame_is_set) { proto_trail.set___tentative__render_ingame(to_proto_bool(this->render_ingame)); - } + } if (this->render_on_map_is_set) { proto_trail.set___tentative__render_on_map(to_proto_bool(this->render_on_map)); - } + } if (this->render_on_minimap_is_set) { proto_trail.set___tentative__render_on_minimap(to_proto_bool(this->render_on_minimap)); - } + } if (this->schedule_is_set) { proto_trail.set_bhdraft__schedule(to_proto_string(this->schedule)); - } + } if (this->schedule_duration_is_set) { proto_trail.set_bhdraft__schedule_duration(to_proto_float(this->schedule_duration)); - } + } - // if (this->specialization_filter_is_set) { - // this->proto_trail->specialization_filter->set_allocated(to_proto_specialization_filter(this->specialization_filter) - // } + if (this->specialization_filter_is_set) { + proto_trail.set_allocated_specialization_filter(to_proto_specialization_filter(this->specialization_filter)); + } - // if (this->species_filter_is_set) { - // this->proto_trail->species_filter->set_allocated(to_proto_species_filter(this->species_filter) - // } + if (this->species_filter_is_set) { + proto_trail.set_allocated_species_filter(to_proto_species_filter(this->species_filter)); + } - // if (this->texture_is_set) { - // proto_trail.texture.set_allocated_texture(to_proto_image(this->texture)); - // } + if (this->texture_is_set) { + proto_trail.set_allocated_texture(to_proto_image(this->texture)); + } - // if (this->trail_data_is_set) { - // proto_trail.trail_data.set_allocated_trail_data(to_proto_trail_data(this->trail_data)); - // } + if (this->trail_data_is_set) { + proto_trail.set_allocated_trail_data(to_proto_trail_data(this->trail_data)); + } if (this->trail_scale_is_set) { proto_trail.set_scale(to_proto_float(this->trail_scale)); - } + } std::string output; proto_trail.SerializeToString(&output); + + return output; } diff --git a/xml_converter/src/trail_gen.hpp b/xml_converter/src/trail_gen.hpp index d8b77c59..0fd3e507 100644 --- a/xml_converter/src/trail_gen.hpp +++ b/xml_converter/src/trail_gen.hpp @@ -78,7 +78,6 @@ class Trail : public Parseable { bool texture_is_set = false; bool trail_data_is_set = false; bool trail_scale_is_set = false; - bool set_trigger = false; virtual std::vector as_xml() const; virtual std::string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors); From 38d0c8fac3c67bb56e1d06a26dac39889f852a4b Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sat, 3 Dec 2022 12:58:30 -0500 Subject: [PATCH 125/539] Reworked the write proto function to make the entire data set one message --- .../cpp_templates/class_template.cpp | 23 +++----- .../cpp_templates/class_template.hpp | 2 +- xml_converter/proto/waypoint.proto | 8 ++- xml_converter/src/category_gen.cpp | 22 +++----- xml_converter/src/category_gen.hpp | 2 +- xml_converter/src/icon_gen.cpp | 12 ++-- xml_converter/src/icon_gen.hpp | 2 +- xml_converter/src/parseable.cpp | 19 +++++-- xml_converter/src/parseable.hpp | 7 ++- xml_converter/src/trail_gen.cpp | 12 ++-- xml_converter/src/trail_gen.hpp | 2 +- xml_converter/src/xml_converter.cpp | 56 ++++++++++++++----- 12 files changed, 100 insertions(+), 67 deletions(-) diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index 898771b0..1a44b531 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -118,8 +118,7 @@ vector {{cpp_class}}::as_xml() const { return xml_node_contents; } -std::string {{cpp_class}}::as_protobuf() const { - waypoint::{{cpp_class}} proto_{{cpp_class_header}}; +waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf(waypoint::{{cpp_class}} proto_{{cpp_class_header}}) const { {% if cpp_class == "Icon": %} waypoint::Trigger* trigger = new waypoint::Trigger(); bool set_trigger = false; @@ -161,21 +160,15 @@ std::string {{cpp_class}}::as_protobuf() const { proto_{{cpp_class_header}}.set_allocated_trigger(trigger); } {% endif %} - std::string output; - proto_{{cpp_class_header}}.SerializeToString(&output); - {% if cpp_class == "Category": %} for (const auto& [key, val] : this->children) { - std::string text; - for (const auto& s : val.as_protobuf()) { - text += s; - } - output += text; + waypoint::{{cpp_class}} proto_{{cpp_class_header}}_child; + val.as_protobuf(proto_{{cpp_class_header}}_child); + proto_{{cpp_class_header}}.add_children()->CopyFrom(proto_{{cpp_class_header}}_child); } - - - {% endif %} - - return output; +{% endif %} + return proto_{{cpp_class_header}}; } + +// {{cpp_class}}::from_protobuf() diff --git a/xml_converter/generators/cpp_templates/class_template.hpp b/xml_converter/generators/cpp_templates/class_template.hpp index df539e7f..b71b95c5 100644 --- a/xml_converter/generators/cpp_templates/class_template.hpp +++ b/xml_converter/generators/cpp_templates/class_template.hpp @@ -34,7 +34,7 @@ class {{cpp_class}} : public Parseable { virtual std::vector as_xml() const; virtual std::string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors); - virtual std::string as_protobuf() const; + waypoint::{{cpp_class}} as_protobuf(waypoint::{{cpp_class}}) const; {% if attributes_of_type_marker_category %} bool validate_attributes_of_type_marker_category(); {% endif %} diff --git a/xml_converter/proto/waypoint.proto b/xml_converter/proto/waypoint.proto index bf6bf544..e9ed9f28 100644 --- a/xml_converter/proto/waypoint.proto +++ b/xml_converter/proto/waypoint.proto @@ -2,13 +2,19 @@ syntax = "proto3"; package waypoint; +message Waypoint { + repeated Category category = 1; + repeated Icon icon = 2; + repeated Trail trail = 3; +} + message Category { bool default_visibility = 1; string display_name = 2; bool is_separator = 3; string name = 4; string tip_description = 5; - Category children = 6; + repeated Category children = 6; string type = 7; } diff --git a/xml_converter/src/category_gen.cpp b/xml_converter/src/category_gen.cpp index 49cf1ee6..6863fd55 100644 --- a/xml_converter/src/category_gen.cpp +++ b/xml_converter/src/category_gen.cpp @@ -92,8 +92,7 @@ vector Category::as_xml() const { return xml_node_contents; } -std::string Category::as_protobuf() const { - waypoint::Category proto_category; +waypoint::Category Category::as_protobuf(waypoint::Category proto_category) const { if (this->default_visibility_is_set) { proto_category.set_default_visibility(to_proto_bool(this->default_visibility)); @@ -116,18 +115,13 @@ std::string Category::as_protobuf() const { } - std::string output; - proto_category.SerializeToString(&output); - for (const auto& [key, val] : this->children) { - std::string text; - for (const auto& s : val.as_protobuf()) { - text += s; - } - output += text; + waypoint::Category proto_category_child; + val.as_protobuf(proto_category_child); + proto_category.add_children()->CopyFrom(proto_category_child); } - - - - return output; + return proto_category; } + +// Category::from_protobuf() + diff --git a/xml_converter/src/category_gen.hpp b/xml_converter/src/category_gen.hpp index f270dd37..342c8181 100644 --- a/xml_converter/src/category_gen.hpp +++ b/xml_converter/src/category_gen.hpp @@ -32,5 +32,5 @@ class Category : public Parseable { virtual std::vector as_xml() const; virtual std::string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors); - virtual std::string as_protobuf() const; + waypoint::Category as_protobuf(waypoint::Category) const; }; diff --git a/xml_converter/src/icon_gen.cpp b/xml_converter/src/icon_gen.cpp index 454ec2cc..a4ab8a19 100644 --- a/xml_converter/src/icon_gen.cpp +++ b/xml_converter/src/icon_gen.cpp @@ -459,8 +459,7 @@ vector Icon::as_xml() const { return xml_node_contents; } -std::string Icon::as_protobuf() const { - waypoint::Icon proto_icon; +waypoint::Icon Icon::as_protobuf(waypoint::Icon proto_icon) const { waypoint::Trigger* trigger = new waypoint::Trigger(); bool set_trigger = false; @@ -681,9 +680,8 @@ std::string Icon::as_protobuf() const { proto_icon.set_allocated_trigger(trigger); } - std::string output; - proto_icon.SerializeToString(&output); - - - return output; + return proto_icon; } + +// Icon::from_protobuf() + diff --git a/xml_converter/src/icon_gen.hpp b/xml_converter/src/icon_gen.hpp index 181010c1..289d3f17 100644 --- a/xml_converter/src/icon_gen.hpp +++ b/xml_converter/src/icon_gen.hpp @@ -136,6 +136,6 @@ class Icon : public Parseable { virtual std::vector as_xml() const; virtual std::string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors); - virtual std::string as_protobuf() const; + waypoint::Icon as_protobuf(waypoint::Icon) const; bool validate_attributes_of_type_marker_category(); }; diff --git a/xml_converter/src/parseable.cpp b/xml_converter/src/parseable.cpp index fbea92d0..e7407476 100644 --- a/xml_converter/src/parseable.cpp +++ b/xml_converter/src/parseable.cpp @@ -6,6 +6,7 @@ #include "rapid_helpers.hpp" #include "rapidxml-1.13/rapidxml.hpp" +#include "waypoint.pb.h" std::string Parseable::classname() { return "Parseable"; @@ -38,8 +39,18 @@ std::vector Parseable::as_xml() const { return result; } -std::string Parseable::as_protobuf() const { +waypoint::Icon Parseable::as_protobuf(waypoint::Icon proto_Icon) const { throw std::runtime_error("error: Parseable::as_proto() should not be called"); - std::string result; - return result; -} \ No newline at end of file + return proto_Icon; +} + +waypoint::Trail Parseable::as_protobuf(waypoint::Trail proto_Trail) const { + throw std::runtime_error("error: Parseable::as_proto() should not be called"); + return proto_Trail; +} + +waypoint::Category Parseable::as_protobuf(waypoint::Category proto_Category) const { + throw std::runtime_error("error: Parseable::as_proto() should not be called"); + return proto_Category; +} + diff --git a/xml_converter/src/parseable.hpp b/xml_converter/src/parseable.hpp index d1603af6..2c53a1bb 100644 --- a/xml_converter/src/parseable.hpp +++ b/xml_converter/src/parseable.hpp @@ -20,5 +20,10 @@ class Parseable { virtual std::vector as_xml() const; - virtual std::string as_protobuf() const; + virtual waypoint::Icon as_protobuf(waypoint::Icon proto_Icon) const; + + virtual waypoint::Trail as_protobuf(waypoint::Trail proto_Trail) const; + + virtual waypoint::Category as_protobuf(waypoint::Category proto_Category) const; + }; diff --git a/xml_converter/src/trail_gen.cpp b/xml_converter/src/trail_gen.cpp index c7d4738d..c5044907 100644 --- a/xml_converter/src/trail_gen.cpp +++ b/xml_converter/src/trail_gen.cpp @@ -266,8 +266,7 @@ vector Trail::as_xml() const { return xml_node_contents; } -std::string Trail::as_protobuf() const { - waypoint::Trail proto_trail; +waypoint::Trail Trail::as_protobuf(waypoint::Trail proto_trail) const { if (this->achievement_bitmask_is_set) { proto_trail.set_achievement_bit(to_proto_int(this->achievement_bitmask)); @@ -382,9 +381,8 @@ std::string Trail::as_protobuf() const { } - std::string output; - proto_trail.SerializeToString(&output); - - - return output; + return proto_trail; } + +// Trail::from_protobuf() + diff --git a/xml_converter/src/trail_gen.hpp b/xml_converter/src/trail_gen.hpp index 0fd3e507..d48cc285 100644 --- a/xml_converter/src/trail_gen.hpp +++ b/xml_converter/src/trail_gen.hpp @@ -81,6 +81,6 @@ class Trail : public Parseable { virtual std::vector as_xml() const; virtual std::string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors); - virtual std::string as_protobuf() const; + waypoint::Trail as_protobuf(waypoint::Trail) const; bool validate_attributes_of_type_marker_category(); }; diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 2ce0ba35..87990cda 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -33,9 +33,8 @@ bool has_suffix(std::string const& fullString, std::string const& ending) { void write_xml_file(string xml_filepath, map* marker_categories, vector* parsed_pois) { ofstream outfile; string tab_string; - string new_file_path = xml_filepath + "export.xml"; - outfile.open(new_file_path, ios::out); + outfile.open(xml_filepath, ios::out); outfile << "\n"; for (const auto& category : *marker_categories) { @@ -59,26 +58,40 @@ void write_xml_file(string xml_filepath, map* marker_categorie outfile.close(); } -void write_protobuf_file(string xml_filepath, map* marker_categories, vector* parsed_pois) { +void write_protobuf_file(string proto_filepath, map* marker_categories, vector* parsed_pois) { ofstream outfile; - string new_file_path = xml_filepath + "export.data"; + waypoint::Waypoint proto_message; - outfile.open(new_file_path, ios::out | ios_base::binary); + outfile.open(proto_filepath, ios::out | ios_base::binary); for (const auto& category : *marker_categories) { - std::string text; - text = category.second.as_protobuf(); - outfile << text; + waypoint::Category proto_category; + proto_category = category.second.as_protobuf(proto_category); + proto_message.add_category()->CopyFrom(proto_category); } for (const auto& parsed_poi : *parsed_pois) { - std::string text; - text = parsed_poi->as_protobuf(); - outfile << text; + if (parsed_poi->classname() == "POI"){ + waypoint::Icon proto_Icon; + proto_Icon = parsed_poi->as_protobuf(proto_Icon); + proto_message.add_icon()->CopyFrom(proto_Icon); + } + if (parsed_poi->classname() == "Trail"){ + waypoint::Trail proto_Trail; + proto_Trail = parsed_poi->as_protobuf(proto_Trail); + proto_message.add_trail()->CopyFrom(proto_Trail); + } } - + proto_message.SerializeToOstream(&outfile); outfile.close(); } +// void read_protobuf_file(string proto_filepath, map* marker_categories, vector* parsed_pois){ +// fstream infile; + +// infile.open(proto_filepath, ios::in | ios_base::binary); + +// } + Category* get_category(rapidxml::xml_node<>* node, map* marker_categories, vector* errors) { // TODO: This is a slow linear search, replace with something faster. // maybe use data from already parsed node instead of searching for @@ -287,17 +300,32 @@ int main() { cout << "The parse function took " << ms << " milliseconds to run" << endl; begin = chrono::high_resolution_clock::now(); - write_xml_file("../export_packs/", &marker_categories, &parsed_pois); + write_xml_file("../export_packs/export.xml", &marker_categories, &parsed_pois); end = chrono::high_resolution_clock::now(); dur = end - begin; ms = std::chrono::duration_cast(dur).count(); cout << "The xml write function took " << ms << " milliseconds to run" << endl; begin = chrono::high_resolution_clock::now(); - write_protobuf_file("../export_packs/", &marker_categories, &parsed_pois); + write_protobuf_file("../export_packs/export.data", &marker_categories, &parsed_pois); end = chrono::high_resolution_clock::now(); dur = end - begin; ms = std::chrono::duration_cast(dur).count(); cout << "The protobuf write function took " << ms << " milliseconds to run" << endl; + + // begin = chrono::high_resolution_clock::now(); + // read_protobuf_file("../export_packs/export.data", &marker_categories, &parsed_pois); + // end = chrono::high_resolution_clock::now(); + // dur = end - begin; + // ms = std::chrono::duration_cast(dur).count(); + // cout << "The protobuf read function took " << ms << " milliseconds to run" << endl; + + // begin = chrono::high_resolution_clock::now(); + // write_xml_file("../export_packs/export2.xml", &marker_categories, &parsed_pois); + // end = chrono::high_resolution_clock::now(); + // dur = end - begin; + // ms = std::chrono::duration_cast(dur).count(); + // cout << "The xml write function took " << ms << " milliseconds to run" << endl; + return 0; } From 488104fbf947b7a0c3620b25f6573fad330b8260 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 5 Dec 2022 21:02:29 -0500 Subject: [PATCH 126/539] The code now reads and saves children in proto correctly and can output all the data in either a binary or xml --- .../cpp_templates/attribute_template.hpp | 1 + .../cpp_templates/class_template.cpp | 53 ++- .../cpp_templates/class_template.hpp | 1 + .../cpp_templates/compoundvalue.cpp | 14 +- .../generators/cpp_templates/enum.cpp | 30 +- .../cpp_templates/multiflagvalue.cpp | 14 +- xml_converter/src/attribute/bool.cpp | 13 + xml_converter/src/attribute/bool.hpp | 2 + xml_converter/src/attribute/color.cpp | 13 +- xml_converter/src/attribute/color.hpp | 2 + .../src/attribute/cull_chirality_gen.cpp | 28 +- .../src/attribute/cull_chirality_gen.hpp | 1 + .../src/attribute/euler_rotation_gen.cpp | 18 +- .../src/attribute/euler_rotation_gen.hpp | 1 + .../src/attribute/festival_filter_gen.cpp | 42 +- .../src/attribute/festival_filter_gen.hpp | 1 + xml_converter/src/attribute/float.cpp | 9 + xml_converter/src/attribute/float.hpp | 2 + xml_converter/src/attribute/image.cpp | 11 + xml_converter/src/attribute/image.hpp | 4 +- xml_converter/src/attribute/int.cpp | 9 + xml_converter/src/attribute/int.hpp | 2 + .../src/attribute/map_type_filter_gen.cpp | 127 ++++-- .../src/attribute/map_type_filter_gen.hpp | 1 + .../src/attribute/marker_category.cpp | 13 +- .../src/attribute/marker_category.hpp | 2 + .../src/attribute/mount_filter_gen.cpp | 57 ++- .../src/attribute/mount_filter_gen.hpp | 1 + xml_converter/src/attribute/position_gen.cpp | 18 +- xml_converter/src/attribute/position_gen.hpp | 1 + .../src/attribute/profession_filter_gen.cpp | 52 ++- .../src/attribute/profession_filter_gen.hpp | 1 + .../src/attribute/reset_behavior_gen.cpp | 103 ++++- .../src/attribute/reset_behavior_gen.hpp | 1 + .../attribute/specialization_filter_gen.cpp | 367 ++++++++++++++---- .../attribute/specialization_filter_gen.hpp | 1 + .../src/attribute/species_filter_gen.cpp | 32 +- .../src/attribute/species_filter_gen.hpp | 1 + xml_converter/src/attribute/string.cpp | 13 +- xml_converter/src/attribute/string.hpp | 2 + xml_converter/src/attribute/trail_data.cpp | 13 +- xml_converter/src/attribute/trail_data.hpp | 2 + xml_converter/src/attribute/unique_id.cpp | 6 + xml_converter/src/attribute/unique_id.hpp | 2 + xml_converter/src/category_gen.cpp | 40 +- xml_converter/src/category_gen.hpp | 1 + xml_converter/src/icon_gen.cpp | 297 +++++++++++++- xml_converter/src/icon_gen.hpp | 1 + xml_converter/src/trail_gen.cpp | 174 ++++++++- xml_converter/src/trail_gen.hpp | 1 + xml_converter/src/xml_converter.cpp | 83 +++- 51 files changed, 1471 insertions(+), 213 deletions(-) diff --git a/xml_converter/generators/cpp_templates/attribute_template.hpp b/xml_converter/generators/cpp_templates/attribute_template.hpp index bed25329..bb69b002 100644 --- a/xml_converter/generators/cpp_templates/attribute_template.hpp +++ b/xml_converter/generators/cpp_templates/attribute_template.hpp @@ -33,3 +33,4 @@ waypoint::{{class_name}} to_proto_{{attribute_name}}({{class_name}} attribute_va {% else: %} waypoint::{{class_name}}* to_proto_{{attribute_name}}({{class_name}} attribute_value); {% endif %} +{{class_name}} from_proto_{{attribute_name}}(waypoint::{{class_name}} proto_{{attribute_name}}); diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index 1a44b531..09dd8f66 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -1,3 +1,4 @@ +#include #include "{{cpp_class_header}}_gen.hpp" #include "waypoint.pb.h" @@ -163,12 +164,60 @@ waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf(waypoint::{{cpp_class}} proto {% if cpp_class == "Category": %} for (const auto& [key, val] : this->children) { waypoint::{{cpp_class}} proto_{{cpp_class_header}}_child; - val.as_protobuf(proto_{{cpp_class_header}}_child); + proto_{{cpp_class_header}}_child = val.as_protobuf(proto_{{cpp_class_header}}_child); proto_{{cpp_class_header}}.add_children()->CopyFrom(proto_{{cpp_class_header}}_child); } {% endif %} return proto_{{cpp_class_header}}; } -// {{cpp_class}}::from_protobuf() +void {{cpp_class}}::parse_protobuf(waypoint::{{cpp_class}} proto_{{cpp_class_header}}){ + {% if cpp_class == "Icon": %} + waypoint::Trigger trigger = proto_{{cpp_class_header}}.trigger(); + {% endif %} +{%for attribute_variable in attribute_variables%} + {% if (attribute_variable.is_trigger == true)%} + {% if (attribute_variable.attribute_type == "Custom")%} + if (trigger.has_{{attribute_variable.protobuf_field}}()) { + this->{{attribute_variable.attribute_name}} = from_proto_{{attribute_variable.class_name}}(trigger.{{attribute_variable.protobuf_field}}()); + this->{{attribute_variable.attribute_name}}_is_set = true; + } + {% elif attribute_variable.class_name == "string" %} + if (trigger.{{attribute_variable.protobuf_field}}() != "") { + this->{{attribute_variable.attribute_name}} = from_proto_{{attribute_variable.class_name}}(trigger.{{attribute_variable.protobuf_field}}()); + this->{{attribute_variable.attribute_name}}_is_set = true; + } + {% else: %} + if (trigger.{{attribute_variable.protobuf_field}}() != 0) { + this->{{attribute_variable.attribute_name}} = from_proto_{{attribute_variable.class_name}}(trigger.{{attribute_variable.protobuf_field}}()); + this->{{attribute_variable.attribute_name}}_is_set = true; + } + {% endif %} + {% else: %} + {% if (attribute_variable.attribute_type == "Custom" and attribute_variable.class_name == "TrailDataMapId")%} + {% elif (attribute_variable.attribute_type == "Enum") %} + if (proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}() != 0) { + this->{{attribute_variable.attribute_name}} = from_proto_{{attribute_variable.class_name}}(proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}()); + this->{{attribute_variable.attribute_name}}_is_set = true; + } + {% elif (attribute_variable.attribute_type in ["MultiflagValue", "CompoundValue", "Custom"]) and attribute_variable.is_child == false%} + if (proto_{{cpp_class_header}}.has_{{attribute_variable.protobuf_field}}()) { + this->{{attribute_variable.attribute_name}} = from_proto_{{attribute_variable.class_name}}(proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}()); + this->{{attribute_variable.attribute_name}}_is_set = true; + } + {% elif attribute_variable.is_child == true%} + {% elif attribute_variable.class_name == "string" %} + if (proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}() != "") { + this->{{attribute_variable.attribute_name}} = from_proto_{{attribute_variable.class_name}}(proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}()); + this->{{attribute_variable.attribute_name}}_is_set = true; + } + {% else: %} + if (proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}() != 0) { + this->{{attribute_variable.attribute_name}} = from_proto_{{attribute_variable.class_name}}(proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}()); + this->{{attribute_variable.attribute_name}}_is_set = true; + } + {% endif %} + {% endif %} + {% endfor %} +} diff --git a/xml_converter/generators/cpp_templates/class_template.hpp b/xml_converter/generators/cpp_templates/class_template.hpp index b71b95c5..99a50cb9 100644 --- a/xml_converter/generators/cpp_templates/class_template.hpp +++ b/xml_converter/generators/cpp_templates/class_template.hpp @@ -35,6 +35,7 @@ class {{cpp_class}} : public Parseable { virtual std::string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors); waypoint::{{cpp_class}} as_protobuf(waypoint::{{cpp_class}}) const; + void parse_protobuf(waypoint::{{cpp_class}} proto_{{cpp_class_header}}); {% if attributes_of_type_marker_category %} bool validate_attributes_of_type_marker_category(); {% endif %} diff --git a/xml_converter/generators/cpp_templates/compoundvalue.cpp b/xml_converter/generators/cpp_templates/compoundvalue.cpp index 0b1a9d50..bb9d4211 100644 --- a/xml_converter/generators/cpp_templates/compoundvalue.cpp +++ b/xml_converter/generators/cpp_templates/compoundvalue.cpp @@ -41,9 +41,17 @@ string stringify_{{attribute_name}}({{class_name}} attribute_value) { {% endif %} waypoint::{{class_name}}* to_proto_{{attribute_name}} ({{class_name}} attribute_value) { - waypoint::{{class_name}}* {{attribute_name}} = new waypoint::{{class_name}}(); + waypoint::{{class_name}}* proto_{{attribute_name}} = new waypoint::{{class_name}}(); {% for attribute_variable in attribute_variables %} - {{attribute_name}}->set_{{attribute_variable.protobuf_field}}(attribute_value.{{attribute_variable.attribute_name}}); + proto_{{attribute_name}}->set_{{attribute_variable.protobuf_field}}(attribute_value.{{attribute_variable.attribute_name}}); {% endfor %} - return {{attribute_name}}; + return proto_{{attribute_name}}; } + +{{class_name}} from_proto_{{attribute_name}} (waypoint::{{class_name}} proto_{{attribute_name}}) { + {{class_name}} {{attribute_name}}; + {% for attribute_variable in attribute_variables: %} + {{attribute_name}}.{{attribute_variable.attribute_name}} = proto_{{attribute_name}}.{{attribute_variable.protobuf_field}}(); + {% endfor %} + return {{attribute_name}}; +} \ No newline at end of file diff --git a/xml_converter/generators/cpp_templates/enum.cpp b/xml_converter/generators/cpp_templates/enum.cpp index 105572f0..d71994a6 100644 --- a/xml_converter/generators/cpp_templates/enum.cpp +++ b/xml_converter/generators/cpp_templates/enum.cpp @@ -1,4 +1,3 @@ -#include "waypoint.pb.h" #include "{{attribute_name}}_gen.hpp" #include @@ -54,22 +53,43 @@ string stringify_{{attribute_name}}({{class_name}} attribute_value) { } waypoint::{{class_name}} to_proto_{{attribute_name}} ({{class_name}} attribute_value) { - waypoint::{{class_name}} {{attribute_name}}; + waypoint::{{class_name}} proto_{{attribute_name}}; {% for n, attribute_variable in enumerate(attribute_variables) %} {% for i, value in enumerate(attribute_variable.xml_fields) %} {% if i == 0 and n == 0: %} if (attribute_value == {{class_name}}::{{attribute_variable.attribute_name}}) { - {{attribute_name}} = waypoint::{{class_name}}::{{attribute_variable.attribute_name}}; + proto_{{attribute_name}} = waypoint::{{class_name}}::{{attribute_variable.attribute_name}}; } {% else: %} else if (attribute_value == {{class_name}}::{{attribute_variable.attribute_name}}) { - {{attribute_name}} = waypoint::{{class_name}}::{{attribute_variable.attribute_name}}; + proto_{{attribute_name}} = waypoint::{{class_name}}::{{attribute_variable.attribute_name}}; } {% endif %} {% endfor %} {% endfor %} else { - {{attribute_name}} = waypoint::{{class_name}}::{{attribute_variables[0].attribute_name}}; + proto_{{attribute_name}} = waypoint::{{class_name}}::{{attribute_variables[0].attribute_name}}; + } + return proto_{{attribute_name}}; +} + +{{class_name}} from_proto_{{attribute_name}} (waypoint::{{class_name}} proto_{{attribute_name}}) { + {{class_name}} {{attribute_name}}; + {% for n, attribute_variable in enumerate(attribute_variables) %} + {% for i, value in enumerate(attribute_variable.xml_fields) %} + {% if i == 0 and n == 0: %} + if (proto_{{attribute_name}} == waypoint::{{class_name}}::{{attribute_variable.attribute_name}}){ + {{attribute_name}} = {{class_name}}::{{attribute_variable.attribute_name}}; + } + {% else: %} + else if (proto_{{attribute_name}} == waypoint::{{class_name}}::{{attribute_variable.attribute_name}}) { + {{attribute_name}} = {{class_name}}::{{attribute_variable.attribute_name}}; + } + {% endif %} + {% endfor %} + {% endfor %} + else { + {{attribute_name}} = {{class_name}}::{{attribute_variables[0].attribute_name}}; } return {{attribute_name}}; } \ No newline at end of file diff --git a/xml_converter/generators/cpp_templates/multiflagvalue.cpp b/xml_converter/generators/cpp_templates/multiflagvalue.cpp index 17dcb7cd..0e5493af 100644 --- a/xml_converter/generators/cpp_templates/multiflagvalue.cpp +++ b/xml_converter/generators/cpp_templates/multiflagvalue.cpp @@ -53,10 +53,20 @@ string stringify_{{attribute_name}}({{class_name}} attribute_value) { } waypoint::{{class_name}}* to_proto_{{attribute_name}} ({{class_name}} attribute_value) { - waypoint::{{class_name}}* {{attribute_name}} = new waypoint::{{class_name}}(); + waypoint::{{class_name}}* proto_{{attribute_name}} = new waypoint::{{class_name}}(); {% for n, attribute_variable in enumerate(attribute_variables)%} if (attribute_value.{{attribute_variable.attribute_name}} == true) { - {{attribute_name}}->set_{{attribute_variable.attribute_name}}(true); + proto_{{attribute_name}}->set_{{attribute_variable.attribute_name}}(true); + } + {% endfor %} + return proto_{{attribute_name}}; +} + +{{class_name}} from_proto_{{attribute_name}} (waypoint::{{class_name}} proto_{{attribute_name}}) { + {{class_name}} {{attribute_name}}; + {% for n, attribute_variable in enumerate(attribute_variables)%} + if (proto_{{attribute_name}}.{{attribute_variable.attribute_name}}() == true) { + {{attribute_name}}.{{attribute_variable.attribute_name}} = true; } {% endfor %} return {{attribute_name}}; diff --git a/xml_converter/src/attribute/bool.cpp b/xml_converter/src/attribute/bool.cpp index 990dcdf5..d2fb4e65 100644 --- a/xml_converter/src/attribute/bool.cpp +++ b/xml_converter/src/attribute/bool.cpp @@ -57,3 +57,16 @@ bool to_proto_bool (bool attribute_value) { } } +//////////////////////////////////////////////////////////////////////////////// +// from_proto_bool +// +// Converts a bool into a bool so that it can be saved to memory. +//////////////////////////////////////////////////////////////////////////////// +bool from_proto_bool (bool attribute_value) { + if (attribute_value) { + return true; + } + else { + return false; + } +} diff --git a/xml_converter/src/attribute/bool.hpp b/xml_converter/src/attribute/bool.hpp index d4b578c9..fc79f0b0 100644 --- a/xml_converter/src/attribute/bool.hpp +++ b/xml_converter/src/attribute/bool.hpp @@ -13,3 +13,5 @@ bool parse_bool(rapidxml::xml_attribute<>* input, std::vector* errors std::string stringify_bool(bool attribute_value); bool to_proto_bool (bool attribute_value); + +bool from_proto_bool (bool attribute_value); diff --git a/xml_converter/src/attribute/color.cpp b/xml_converter/src/attribute/color.cpp index 48401406..b511ba4c 100644 --- a/xml_converter/src/attribute/color.cpp +++ b/xml_converter/src/attribute/color.cpp @@ -33,10 +33,21 @@ string stringify_color(Color attribute_value) { //////////////////////////////////////////////////////////////////////////////// // to_proto_color // -// Converts a Color into a stringy value so it can be saved to xml. +// Converts a Color into a proto message //////////////////////////////////////////////////////////////////////////////// waypoint::Color* to_proto_color(Color attribute_value) { waypoint::Color* color = new waypoint::Color(); color->set_hex(attribute_value.hex); return color; } + +//////////////////////////////////////////////////////////////////////////////// +// from_proto_color +// +// Converts a proto message into a Color +//////////////////////////////////////////////////////////////////////////////// +Color from_proto_color(waypoint::Color attribute_value) { + Color color; + color.hex = attribute_value.hex(); + return color; +} \ No newline at end of file diff --git a/xml_converter/src/attribute/color.hpp b/xml_converter/src/attribute/color.hpp index ead9ec36..9b827b0c 100644 --- a/xml_converter/src/attribute/color.hpp +++ b/xml_converter/src/attribute/color.hpp @@ -18,3 +18,5 @@ Color parse_color(rapidxml::xml_attribute<>* input, std::vector* erro std::string stringify_color(Color attribute_value); waypoint::Color* to_proto_color(Color attribute_value); + +Color from_proto_color(waypoint::Color attribute_value); diff --git a/xml_converter/src/attribute/cull_chirality_gen.cpp b/xml_converter/src/attribute/cull_chirality_gen.cpp index 093b4404..2ea19e2a 100644 --- a/xml_converter/src/attribute/cull_chirality_gen.cpp +++ b/xml_converter/src/attribute/cull_chirality_gen.cpp @@ -1,4 +1,3 @@ -#include "waypoint.pb.h" #include "cull_chirality_gen.hpp" #include @@ -46,18 +45,35 @@ string stringify_cull_chirality(CullChirality attribute_value) { } waypoint::CullChirality to_proto_cull_chirality (CullChirality attribute_value) { - waypoint::CullChirality cull_chirality; + waypoint::CullChirality proto_cull_chirality; if (attribute_value == CullChirality::none) { - cull_chirality = waypoint::CullChirality::none; + proto_cull_chirality = waypoint::CullChirality::none; } else if (attribute_value == CullChirality::clockwise) { - cull_chirality = waypoint::CullChirality::clockwise; + proto_cull_chirality = waypoint::CullChirality::clockwise; } else if (attribute_value == CullChirality::counter_clockwise) { - cull_chirality = waypoint::CullChirality::counter_clockwise; + proto_cull_chirality = waypoint::CullChirality::counter_clockwise; } else { - cull_chirality = waypoint::CullChirality::none; + proto_cull_chirality = waypoint::CullChirality::none; + } + return proto_cull_chirality; +} + +CullChirality from_proto_cull_chirality (waypoint::CullChirality proto_cull_chirality) { + CullChirality cull_chirality; + if (proto_cull_chirality == waypoint::CullChirality::none){ + cull_chirality = CullChirality::none; + } + else if (proto_cull_chirality == waypoint::CullChirality::clockwise) { + cull_chirality = CullChirality::clockwise; + } + else if (proto_cull_chirality == waypoint::CullChirality::counter_clockwise) { + cull_chirality = CullChirality::counter_clockwise; + } + else { + cull_chirality = CullChirality::none; } return cull_chirality; } \ No newline at end of file diff --git a/xml_converter/src/attribute/cull_chirality_gen.hpp b/xml_converter/src/attribute/cull_chirality_gen.hpp index c819d3bd..793574c6 100644 --- a/xml_converter/src/attribute/cull_chirality_gen.hpp +++ b/xml_converter/src/attribute/cull_chirality_gen.hpp @@ -16,3 +16,4 @@ enum CullChirality { CullChirality parse_cull_chirality(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_cull_chirality(CullChirality attribute_value); waypoint::CullChirality to_proto_cull_chirality(CullChirality attribute_value); +CullChirality from_proto_cull_chirality(waypoint::CullChirality proto_cull_chirality); diff --git a/xml_converter/src/attribute/euler_rotation_gen.cpp b/xml_converter/src/attribute/euler_rotation_gen.cpp index 8d0d16c9..cd311753 100644 --- a/xml_converter/src/attribute/euler_rotation_gen.cpp +++ b/xml_converter/src/attribute/euler_rotation_gen.cpp @@ -35,9 +35,17 @@ string stringify_euler_rotation(EulerRotation attribute_value) { } waypoint::EulerRotation* to_proto_euler_rotation (EulerRotation attribute_value) { - waypoint::EulerRotation* euler_rotation = new waypoint::EulerRotation(); - euler_rotation->set_x(attribute_value.x_rotation); - euler_rotation->set_y(attribute_value.y_rotation); - euler_rotation->set_z(attribute_value.z_rotation); - return euler_rotation; + waypoint::EulerRotation* proto_euler_rotation = new waypoint::EulerRotation(); + proto_euler_rotation->set_x(attribute_value.x_rotation); + proto_euler_rotation->set_y(attribute_value.y_rotation); + proto_euler_rotation->set_z(attribute_value.z_rotation); + return proto_euler_rotation; } + +EulerRotation from_proto_euler_rotation (waypoint::EulerRotation proto_euler_rotation) { + EulerRotation euler_rotation; + euler_rotation.x_rotation = proto_euler_rotation.x(); + euler_rotation.y_rotation = proto_euler_rotation.y(); + euler_rotation.z_rotation = proto_euler_rotation.z(); + return euler_rotation; +} \ No newline at end of file diff --git a/xml_converter/src/attribute/euler_rotation_gen.hpp b/xml_converter/src/attribute/euler_rotation_gen.hpp index 114ba325..42df5f49 100644 --- a/xml_converter/src/attribute/euler_rotation_gen.hpp +++ b/xml_converter/src/attribute/euler_rotation_gen.hpp @@ -21,3 +21,4 @@ class EulerRotation { EulerRotation parse_euler_rotation(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_euler_rotation(EulerRotation attribute_value); waypoint::EulerRotation* to_proto_euler_rotation(EulerRotation attribute_value); +EulerRotation from_proto_euler_rotation(waypoint::EulerRotation proto_euler_rotation); diff --git a/xml_converter/src/attribute/festival_filter_gen.cpp b/xml_converter/src/attribute/festival_filter_gen.cpp index 618a3048..d7617c76 100644 --- a/xml_converter/src/attribute/festival_filter_gen.cpp +++ b/xml_converter/src/attribute/festival_filter_gen.cpp @@ -84,27 +84,53 @@ string stringify_festival_filter(FestivalFilter attribute_value) { } waypoint::FestivalFilter* to_proto_festival_filter (FestivalFilter attribute_value) { - waypoint::FestivalFilter* festival_filter = new waypoint::FestivalFilter(); + waypoint::FestivalFilter* proto_festival_filter = new waypoint::FestivalFilter(); if (attribute_value.dragonbash == true) { - festival_filter->set_dragonbash(true); + proto_festival_filter->set_dragonbash(true); } if (attribute_value.festival_of_the_four_winds == true) { - festival_filter->set_festival_of_the_four_winds(true); + proto_festival_filter->set_festival_of_the_four_winds(true); } if (attribute_value.halloween == true) { - festival_filter->set_halloween(true); + proto_festival_filter->set_halloween(true); } if (attribute_value.lunar_new_year == true) { - festival_filter->set_lunar_new_year(true); + proto_festival_filter->set_lunar_new_year(true); } if (attribute_value.super_adventure_festival == true) { - festival_filter->set_super_adventure_festival(true); + proto_festival_filter->set_super_adventure_festival(true); } if (attribute_value.wintersday == true) { - festival_filter->set_wintersday(true); + proto_festival_filter->set_wintersday(true); } if (attribute_value.none == true) { - festival_filter->set_none(true); + proto_festival_filter->set_none(true); + } + return proto_festival_filter; +} + +FestivalFilter from_proto_festival_filter (waypoint::FestivalFilter proto_festival_filter) { + FestivalFilter festival_filter; + if (proto_festival_filter.dragonbash() == true) { + festival_filter.dragonbash = true; + } + if (proto_festival_filter.festival_of_the_four_winds() == true) { + festival_filter.festival_of_the_four_winds = true; + } + if (proto_festival_filter.halloween() == true) { + festival_filter.halloween = true; + } + if (proto_festival_filter.lunar_new_year() == true) { + festival_filter.lunar_new_year = true; + } + if (proto_festival_filter.super_adventure_festival() == true) { + festival_filter.super_adventure_festival = true; + } + if (proto_festival_filter.wintersday() == true) { + festival_filter.wintersday = true; + } + if (proto_festival_filter.none() == true) { + festival_filter.none = true; } return festival_filter; } \ No newline at end of file diff --git a/xml_converter/src/attribute/festival_filter_gen.hpp b/xml_converter/src/attribute/festival_filter_gen.hpp index 346dd5ee..356afe91 100644 --- a/xml_converter/src/attribute/festival_filter_gen.hpp +++ b/xml_converter/src/attribute/festival_filter_gen.hpp @@ -25,3 +25,4 @@ class FestivalFilter { FestivalFilter parse_festival_filter(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_festival_filter(FestivalFilter attribute_value); waypoint::FestivalFilter* to_proto_festival_filter(FestivalFilter attribute_value); +FestivalFilter from_proto_festival_filter(waypoint::FestivalFilter proto_festival_filter); diff --git a/xml_converter/src/attribute/float.cpp b/xml_converter/src/attribute/float.cpp index b040c96e..9e3861c8 100644 --- a/xml_converter/src/attribute/float.cpp +++ b/xml_converter/src/attribute/float.cpp @@ -31,4 +31,13 @@ std::string stringify_float(float attribute_value) { //////////////////////////////////////////////////////////////////////////////// float to_proto_float(float attribute_value){ return attribute_value; +} + +//////////////////////////////////////////////////////////////////////////////// +// to_proto_float +// +// Parses the float from proto. +//////////////////////////////////////////////////////////////////////////////// +float from_proto_float(float attribute_value){ + return attribute_value; } \ No newline at end of file diff --git a/xml_converter/src/attribute/float.hpp b/xml_converter/src/attribute/float.hpp index 5b4893be..138d2da7 100644 --- a/xml_converter/src/attribute/float.hpp +++ b/xml_converter/src/attribute/float.hpp @@ -13,3 +13,5 @@ float parse_float(rapidxml::xml_attribute<>* input, std::vector* erro std::string stringify_float(float attribute_value); float to_proto_float(float attribute_value); + +float from_proto_float(float attribute_value); diff --git a/xml_converter/src/attribute/image.cpp b/xml_converter/src/attribute/image.cpp index d0e5f644..e2227027 100644 --- a/xml_converter/src/attribute/image.cpp +++ b/xml_converter/src/attribute/image.cpp @@ -39,3 +39,14 @@ waypoint::Texture* to_proto_image(Image attribute_value) { texture->set_path(attribute_value.path); return texture; } + +//////////////////////////////////////////////////////////////////////////////// +// from_proto_image +// +// Parses a waypoint::Image from proto +//////////////////////////////////////////////////////////////////////////////// +Image from_proto_image(waypoint::Texture attribute_value) { + Image image; + image.path = attribute_value.path(); + return image; +} diff --git a/xml_converter/src/attribute/image.hpp b/xml_converter/src/attribute/image.hpp index 433847e2..7398ad24 100644 --- a/xml_converter/src/attribute/image.hpp +++ b/xml_converter/src/attribute/image.hpp @@ -17,4 +17,6 @@ Image parse_image(rapidxml::xml_attribute<>* input, std::vector* erro std::string stringify_image(Image attribute_value); -waypoint::Texture* to_proto_image(Image attribute_value) ; +waypoint::Texture* to_proto_image(Image attribute_value); + +Image from_proto_image(waypoint::Texture attribute_value); diff --git a/xml_converter/src/attribute/int.cpp b/xml_converter/src/attribute/int.cpp index b5adec49..d144668b 100644 --- a/xml_converter/src/attribute/int.cpp +++ b/xml_converter/src/attribute/int.cpp @@ -49,3 +49,12 @@ string stringify_int(int attribute_value) { int to_proto_int(int attribute_value){ return attribute_value; } + +//////////////////////////////////////////////////////////////////////////////// +// from_proto_int +// +// Parses the int from proto. +//////////////////////////////////////////////////////////////////////////////// +int from_proto_int(int attribute_value){ + return attribute_value; +} \ No newline at end of file diff --git a/xml_converter/src/attribute/int.hpp b/xml_converter/src/attribute/int.hpp index 770ec75a..4a9e93e8 100644 --- a/xml_converter/src/attribute/int.hpp +++ b/xml_converter/src/attribute/int.hpp @@ -13,3 +13,5 @@ int parse_int(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_int(int attribute_value); int to_proto_int(int attribute_value); + +int from_proto_int(int attribute_value); diff --git a/xml_converter/src/attribute/map_type_filter_gen.cpp b/xml_converter/src/attribute/map_type_filter_gen.cpp index 7ebc17ce..5165ed35 100644 --- a/xml_converter/src/attribute/map_type_filter_gen.cpp +++ b/xml_converter/src/attribute/map_type_filter_gen.cpp @@ -200,78 +200,155 @@ string stringify_map_type_filter(MapTypeFilter attribute_value) { } waypoint::MapTypeFilter* to_proto_map_type_filter (MapTypeFilter attribute_value) { - waypoint::MapTypeFilter* map_type_filter = new waypoint::MapTypeFilter(); + waypoint::MapTypeFilter* proto_map_type_filter = new waypoint::MapTypeFilter(); if (attribute_value.unknown_map == true) { - map_type_filter->set_unknown_map(true); + proto_map_type_filter->set_unknown_map(true); } if (attribute_value.redirect_map == true) { - map_type_filter->set_redirect_map(true); + proto_map_type_filter->set_redirect_map(true); } if (attribute_value.character_create_map == true) { - map_type_filter->set_character_create_map(true); + proto_map_type_filter->set_character_create_map(true); } if (attribute_value.pvp_map == true) { - map_type_filter->set_pvp_map(true); + proto_map_type_filter->set_pvp_map(true); } if (attribute_value.gvg_map == true) { - map_type_filter->set_gvg_map(true); + proto_map_type_filter->set_gvg_map(true); } if (attribute_value.instance_map == true) { - map_type_filter->set_instance_map(true); + proto_map_type_filter->set_instance_map(true); } if (attribute_value.public_map == true) { - map_type_filter->set_public_map(true); + proto_map_type_filter->set_public_map(true); } if (attribute_value.tournament_map == true) { - map_type_filter->set_tournament_map(true); + proto_map_type_filter->set_tournament_map(true); } if (attribute_value.tutorial_map == true) { - map_type_filter->set_tutorial_map(true); + proto_map_type_filter->set_tutorial_map(true); } if (attribute_value.user_tournament_map == true) { - map_type_filter->set_user_tournament_map(true); + proto_map_type_filter->set_user_tournament_map(true); } if (attribute_value.center_map == true) { - map_type_filter->set_center_map(true); + proto_map_type_filter->set_center_map(true); } if (attribute_value.eternal_battlegrounds_map == true) { - map_type_filter->set_eternal_battlegrounds_map(true); + proto_map_type_filter->set_eternal_battlegrounds_map(true); } if (attribute_value.bluehome_map == true) { - map_type_filter->set_bluehome_map(true); + proto_map_type_filter->set_bluehome_map(true); } if (attribute_value.blue_borderlands_map == true) { - map_type_filter->set_blue_borderlands_map(true); + proto_map_type_filter->set_blue_borderlands_map(true); } if (attribute_value.green_home_map == true) { - map_type_filter->set_green_home_map(true); + proto_map_type_filter->set_green_home_map(true); } if (attribute_value.green_borderlands_map == true) { - map_type_filter->set_green_borderlands_map(true); + proto_map_type_filter->set_green_borderlands_map(true); } if (attribute_value.red_home_map == true) { - map_type_filter->set_red_home_map(true); + proto_map_type_filter->set_red_home_map(true); } if (attribute_value.red_borderlands_map == true) { - map_type_filter->set_red_borderlands_map(true); + proto_map_type_filter->set_red_borderlands_map(true); } if (attribute_value.fortunes_vale_map == true) { - map_type_filter->set_fortunes_vale_map(true); + proto_map_type_filter->set_fortunes_vale_map(true); } if (attribute_value.jump_puzzle_map == true) { - map_type_filter->set_jump_puzzle_map(true); + proto_map_type_filter->set_jump_puzzle_map(true); } if (attribute_value.obsidian_sanctum_map == true) { - map_type_filter->set_obsidian_sanctum_map(true); + proto_map_type_filter->set_obsidian_sanctum_map(true); } if (attribute_value.edge_of_the_mists_map == true) { - map_type_filter->set_edge_of_the_mists_map(true); + proto_map_type_filter->set_edge_of_the_mists_map(true); } if (attribute_value.public_mini_map == true) { - map_type_filter->set_public_mini_map(true); + proto_map_type_filter->set_public_mini_map(true); } if (attribute_value.wvw_lounge_map == true) { - map_type_filter->set_wvw_lounge_map(true); + proto_map_type_filter->set_wvw_lounge_map(true); + } + return proto_map_type_filter; +} + +MapTypeFilter from_proto_map_type_filter (waypoint::MapTypeFilter proto_map_type_filter) { + MapTypeFilter map_type_filter; + if (proto_map_type_filter.unknown_map() == true) { + map_type_filter.unknown_map = true; + } + if (proto_map_type_filter.redirect_map() == true) { + map_type_filter.redirect_map = true; + } + if (proto_map_type_filter.character_create_map() == true) { + map_type_filter.character_create_map = true; + } + if (proto_map_type_filter.pvp_map() == true) { + map_type_filter.pvp_map = true; + } + if (proto_map_type_filter.gvg_map() == true) { + map_type_filter.gvg_map = true; + } + if (proto_map_type_filter.instance_map() == true) { + map_type_filter.instance_map = true; + } + if (proto_map_type_filter.public_map() == true) { + map_type_filter.public_map = true; + } + if (proto_map_type_filter.tournament_map() == true) { + map_type_filter.tournament_map = true; + } + if (proto_map_type_filter.tutorial_map() == true) { + map_type_filter.tutorial_map = true; + } + if (proto_map_type_filter.user_tournament_map() == true) { + map_type_filter.user_tournament_map = true; + } + if (proto_map_type_filter.center_map() == true) { + map_type_filter.center_map = true; + } + if (proto_map_type_filter.eternal_battlegrounds_map() == true) { + map_type_filter.eternal_battlegrounds_map = true; + } + if (proto_map_type_filter.bluehome_map() == true) { + map_type_filter.bluehome_map = true; + } + if (proto_map_type_filter.blue_borderlands_map() == true) { + map_type_filter.blue_borderlands_map = true; + } + if (proto_map_type_filter.green_home_map() == true) { + map_type_filter.green_home_map = true; + } + if (proto_map_type_filter.green_borderlands_map() == true) { + map_type_filter.green_borderlands_map = true; + } + if (proto_map_type_filter.red_home_map() == true) { + map_type_filter.red_home_map = true; + } + if (proto_map_type_filter.red_borderlands_map() == true) { + map_type_filter.red_borderlands_map = true; + } + if (proto_map_type_filter.fortunes_vale_map() == true) { + map_type_filter.fortunes_vale_map = true; + } + if (proto_map_type_filter.jump_puzzle_map() == true) { + map_type_filter.jump_puzzle_map = true; + } + if (proto_map_type_filter.obsidian_sanctum_map() == true) { + map_type_filter.obsidian_sanctum_map = true; + } + if (proto_map_type_filter.edge_of_the_mists_map() == true) { + map_type_filter.edge_of_the_mists_map = true; + } + if (proto_map_type_filter.public_mini_map() == true) { + map_type_filter.public_mini_map = true; + } + if (proto_map_type_filter.wvw_lounge_map() == true) { + map_type_filter.wvw_lounge_map = true; } return map_type_filter; } \ No newline at end of file diff --git a/xml_converter/src/attribute/map_type_filter_gen.hpp b/xml_converter/src/attribute/map_type_filter_gen.hpp index 08112732..39e9683c 100644 --- a/xml_converter/src/attribute/map_type_filter_gen.hpp +++ b/xml_converter/src/attribute/map_type_filter_gen.hpp @@ -42,3 +42,4 @@ class MapTypeFilter { MapTypeFilter parse_map_type_filter(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_map_type_filter(MapTypeFilter attribute_value); waypoint::MapTypeFilter* to_proto_map_type_filter(MapTypeFilter attribute_value); +MapTypeFilter from_proto_map_type_filter(waypoint::MapTypeFilter proto_map_type_filter); diff --git a/xml_converter/src/attribute/marker_category.cpp b/xml_converter/src/attribute/marker_category.cpp index dc2bcd4b..82f82c24 100644 --- a/xml_converter/src/attribute/marker_category.cpp +++ b/xml_converter/src/attribute/marker_category.cpp @@ -31,7 +31,7 @@ std::string stringify_marker_category(MarkerCategory attribute_value) { //////////////////////////////////////////////////////////////////////////////// // to_proto_marker_category // -// Returns a MarkerCategory so that it can be saved to proto. +// Returns a waypoint::Category so that it can be saved to proto. //////////////////////////////////////////////////////////////////////////////// waypoint::Category* to_proto_marker_category(MarkerCategory attribute_value) { waypoint::Category* category = new waypoint::Category(); @@ -39,4 +39,13 @@ waypoint::Category* to_proto_marker_category(MarkerCategory attribute_value) { return category; } -// TODO: Make sure this works. \ No newline at end of file +//////////////////////////////////////////////////////////////////////////////// +// to_proto_marker_category +// +// Parses a waypoint::Category and returns a MarkerCategory +/////////////////////////////////////////////////////////////////////////////// +MarkerCategory from_proto_marker_category(waypoint::Category attribute_value) { + MarkerCategory marker_category; + marker_category.category = attribute_value.type(); + return marker_category; +} diff --git a/xml_converter/src/attribute/marker_category.hpp b/xml_converter/src/attribute/marker_category.hpp index a49c495f..3bb1fd76 100644 --- a/xml_converter/src/attribute/marker_category.hpp +++ b/xml_converter/src/attribute/marker_category.hpp @@ -18,3 +18,5 @@ MarkerCategory parse_marker_category(rapidxml::xml_attribute<>* input, std::vect std::string stringify_marker_category(MarkerCategory attribute_value); waypoint::Category* to_proto_marker_category(MarkerCategory attribute_value); + +MarkerCategory from_proto_marker_category(waypoint::Category attribute_value); diff --git a/xml_converter/src/attribute/mount_filter_gen.cpp b/xml_converter/src/attribute/mount_filter_gen.cpp index 34c29b96..2516007e 100644 --- a/xml_converter/src/attribute/mount_filter_gen.cpp +++ b/xml_converter/src/attribute/mount_filter_gen.cpp @@ -102,36 +102,71 @@ string stringify_mount_filter(MountFilter attribute_value) { } waypoint::MountFilter* to_proto_mount_filter (MountFilter attribute_value) { - waypoint::MountFilter* mount_filter = new waypoint::MountFilter(); + waypoint::MountFilter* proto_mount_filter = new waypoint::MountFilter(); if (attribute_value.raptor == true) { - mount_filter->set_raptor(true); + proto_mount_filter->set_raptor(true); } if (attribute_value.springer == true) { - mount_filter->set_springer(true); + proto_mount_filter->set_springer(true); } if (attribute_value.skimmer == true) { - mount_filter->set_skimmer(true); + proto_mount_filter->set_skimmer(true); } if (attribute_value.jackal == true) { - mount_filter->set_jackal(true); + proto_mount_filter->set_jackal(true); } if (attribute_value.griffon == true) { - mount_filter->set_griffon(true); + proto_mount_filter->set_griffon(true); } if (attribute_value.roller_beetle == true) { - mount_filter->set_roller_beetle(true); + proto_mount_filter->set_roller_beetle(true); } if (attribute_value.warclaw == true) { - mount_filter->set_warclaw(true); + proto_mount_filter->set_warclaw(true); } if (attribute_value.skyscale == true) { - mount_filter->set_skyscale(true); + proto_mount_filter->set_skyscale(true); } if (attribute_value.skiff == true) { - mount_filter->set_skiff(true); + proto_mount_filter->set_skiff(true); } if (attribute_value.seige_turtle == true) { - mount_filter->set_seige_turtle(true); + proto_mount_filter->set_seige_turtle(true); + } + return proto_mount_filter; +} + +MountFilter from_proto_mount_filter (waypoint::MountFilter proto_mount_filter) { + MountFilter mount_filter; + if (proto_mount_filter.raptor() == true) { + mount_filter.raptor = true; + } + if (proto_mount_filter.springer() == true) { + mount_filter.springer = true; + } + if (proto_mount_filter.skimmer() == true) { + mount_filter.skimmer = true; + } + if (proto_mount_filter.jackal() == true) { + mount_filter.jackal = true; + } + if (proto_mount_filter.griffon() == true) { + mount_filter.griffon = true; + } + if (proto_mount_filter.roller_beetle() == true) { + mount_filter.roller_beetle = true; + } + if (proto_mount_filter.warclaw() == true) { + mount_filter.warclaw = true; + } + if (proto_mount_filter.skyscale() == true) { + mount_filter.skyscale = true; + } + if (proto_mount_filter.skiff() == true) { + mount_filter.skiff = true; + } + if (proto_mount_filter.seige_turtle() == true) { + mount_filter.seige_turtle = true; } return mount_filter; } \ No newline at end of file diff --git a/xml_converter/src/attribute/mount_filter_gen.hpp b/xml_converter/src/attribute/mount_filter_gen.hpp index a45d73ca..04c5d15a 100644 --- a/xml_converter/src/attribute/mount_filter_gen.hpp +++ b/xml_converter/src/attribute/mount_filter_gen.hpp @@ -28,3 +28,4 @@ class MountFilter { MountFilter parse_mount_filter(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_mount_filter(MountFilter attribute_value); waypoint::MountFilter* to_proto_mount_filter(MountFilter attribute_value); +MountFilter from_proto_mount_filter(waypoint::MountFilter proto_mount_filter); diff --git a/xml_converter/src/attribute/position_gen.cpp b/xml_converter/src/attribute/position_gen.cpp index 44d1d7bd..5ad79196 100644 --- a/xml_converter/src/attribute/position_gen.cpp +++ b/xml_converter/src/attribute/position_gen.cpp @@ -28,9 +28,17 @@ Position parse_position(rapidxml::xml_attribute<>* input, vector*) { } waypoint::Position* to_proto_position (Position attribute_value) { - waypoint::Position* position = new waypoint::Position(); - position->set_x(attribute_value.x_position); - position->set_y(attribute_value.y_position); - position->set_z(attribute_value.z_position); - return position; + waypoint::Position* proto_position = new waypoint::Position(); + proto_position->set_x(attribute_value.x_position); + proto_position->set_y(attribute_value.y_position); + proto_position->set_z(attribute_value.z_position); + return proto_position; } + +Position from_proto_position (waypoint::Position proto_position) { + Position position; + position.x_position = proto_position.x(); + position.y_position = proto_position.y(); + position.z_position = proto_position.z(); + return position; +} \ No newline at end of file diff --git a/xml_converter/src/attribute/position_gen.hpp b/xml_converter/src/attribute/position_gen.hpp index 0d163163..b9772a58 100644 --- a/xml_converter/src/attribute/position_gen.hpp +++ b/xml_converter/src/attribute/position_gen.hpp @@ -21,3 +21,4 @@ class Position { Position parse_position(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_position(Position attribute_value); waypoint::Position* to_proto_position(Position attribute_value); +Position from_proto_position(waypoint::Position proto_position); diff --git a/xml_converter/src/attribute/profession_filter_gen.cpp b/xml_converter/src/attribute/profession_filter_gen.cpp index 5bf41bf6..ea6b981d 100644 --- a/xml_converter/src/attribute/profession_filter_gen.cpp +++ b/xml_converter/src/attribute/profession_filter_gen.cpp @@ -95,33 +95,65 @@ string stringify_profession_filter(ProfessionFilter attribute_value) { } waypoint::ProfessionFilter* to_proto_profession_filter (ProfessionFilter attribute_value) { - waypoint::ProfessionFilter* profession_filter = new waypoint::ProfessionFilter(); + waypoint::ProfessionFilter* proto_profession_filter = new waypoint::ProfessionFilter(); if (attribute_value.guardian == true) { - profession_filter->set_guardian(true); + proto_profession_filter->set_guardian(true); } if (attribute_value.warrior == true) { - profession_filter->set_warrior(true); + proto_profession_filter->set_warrior(true); } if (attribute_value.engineer == true) { - profession_filter->set_engineer(true); + proto_profession_filter->set_engineer(true); } if (attribute_value.ranger == true) { - profession_filter->set_ranger(true); + proto_profession_filter->set_ranger(true); } if (attribute_value.thief == true) { - profession_filter->set_thief(true); + proto_profession_filter->set_thief(true); } if (attribute_value.elementalist == true) { - profession_filter->set_elementalist(true); + proto_profession_filter->set_elementalist(true); } if (attribute_value.mesmer == true) { - profession_filter->set_mesmer(true); + proto_profession_filter->set_mesmer(true); } if (attribute_value.necromancer == true) { - profession_filter->set_necromancer(true); + proto_profession_filter->set_necromancer(true); } if (attribute_value.revenant == true) { - profession_filter->set_revenant(true); + proto_profession_filter->set_revenant(true); + } + return proto_profession_filter; +} + +ProfessionFilter from_proto_profession_filter (waypoint::ProfessionFilter proto_profession_filter) { + ProfessionFilter profession_filter; + if (proto_profession_filter.guardian() == true) { + profession_filter.guardian = true; + } + if (proto_profession_filter.warrior() == true) { + profession_filter.warrior = true; + } + if (proto_profession_filter.engineer() == true) { + profession_filter.engineer = true; + } + if (proto_profession_filter.ranger() == true) { + profession_filter.ranger = true; + } + if (proto_profession_filter.thief() == true) { + profession_filter.thief = true; + } + if (proto_profession_filter.elementalist() == true) { + profession_filter.elementalist = true; + } + if (proto_profession_filter.mesmer() == true) { + profession_filter.mesmer = true; + } + if (proto_profession_filter.necromancer() == true) { + profession_filter.necromancer = true; + } + if (proto_profession_filter.revenant() == true) { + profession_filter.revenant = true; } return profession_filter; } \ No newline at end of file diff --git a/xml_converter/src/attribute/profession_filter_gen.hpp b/xml_converter/src/attribute/profession_filter_gen.hpp index 33c0fc97..5b6e9768 100644 --- a/xml_converter/src/attribute/profession_filter_gen.hpp +++ b/xml_converter/src/attribute/profession_filter_gen.hpp @@ -27,3 +27,4 @@ class ProfessionFilter { ProfessionFilter parse_profession_filter(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_profession_filter(ProfessionFilter attribute_value); waypoint::ProfessionFilter* to_proto_profession_filter(ProfessionFilter attribute_value); +ProfessionFilter from_proto_profession_filter(waypoint::ProfessionFilter proto_profession_filter); diff --git a/xml_converter/src/attribute/reset_behavior_gen.cpp b/xml_converter/src/attribute/reset_behavior_gen.cpp index e3035ba9..dd2c6929 100644 --- a/xml_converter/src/attribute/reset_behavior_gen.cpp +++ b/xml_converter/src/attribute/reset_behavior_gen.cpp @@ -1,4 +1,3 @@ -#include "waypoint.pb.h" #include "reset_behavior_gen.hpp" #include @@ -136,63 +135,125 @@ string stringify_reset_behavior(ResetBehavior attribute_value) { } waypoint::ResetBehavior to_proto_reset_behavior (ResetBehavior attribute_value) { - waypoint::ResetBehavior reset_behavior; + waypoint::ResetBehavior proto_reset_behavior; if (attribute_value == ResetBehavior::always_visible) { - reset_behavior = waypoint::ResetBehavior::always_visible; + proto_reset_behavior = waypoint::ResetBehavior::always_visible; } else if (attribute_value == ResetBehavior::always_visible) { - reset_behavior = waypoint::ResetBehavior::always_visible; + proto_reset_behavior = waypoint::ResetBehavior::always_visible; } else if (attribute_value == ResetBehavior::map_change) { - reset_behavior = waypoint::ResetBehavior::map_change; + proto_reset_behavior = waypoint::ResetBehavior::map_change; } else if (attribute_value == ResetBehavior::map_change) { - reset_behavior = waypoint::ResetBehavior::map_change; + proto_reset_behavior = waypoint::ResetBehavior::map_change; } else if (attribute_value == ResetBehavior::daily_reset) { - reset_behavior = waypoint::ResetBehavior::daily_reset; + proto_reset_behavior = waypoint::ResetBehavior::daily_reset; } else if (attribute_value == ResetBehavior::daily_reset) { - reset_behavior = waypoint::ResetBehavior::daily_reset; + proto_reset_behavior = waypoint::ResetBehavior::daily_reset; } else if (attribute_value == ResetBehavior::never) { - reset_behavior = waypoint::ResetBehavior::never; + proto_reset_behavior = waypoint::ResetBehavior::never; } else if (attribute_value == ResetBehavior::never) { - reset_behavior = waypoint::ResetBehavior::never; + proto_reset_behavior = waypoint::ResetBehavior::never; } else if (attribute_value == ResetBehavior::timer) { - reset_behavior = waypoint::ResetBehavior::timer; + proto_reset_behavior = waypoint::ResetBehavior::timer; } else if (attribute_value == ResetBehavior::timer) { - reset_behavior = waypoint::ResetBehavior::timer; + proto_reset_behavior = waypoint::ResetBehavior::timer; } else if (attribute_value == ResetBehavior::map_reset) { - reset_behavior = waypoint::ResetBehavior::map_reset; + proto_reset_behavior = waypoint::ResetBehavior::map_reset; } else if (attribute_value == ResetBehavior::map_reset) { - reset_behavior = waypoint::ResetBehavior::map_reset; + proto_reset_behavior = waypoint::ResetBehavior::map_reset; } else if (attribute_value == ResetBehavior::instance_change) { - reset_behavior = waypoint::ResetBehavior::instance_change; + proto_reset_behavior = waypoint::ResetBehavior::instance_change; } else if (attribute_value == ResetBehavior::instance_change) { - reset_behavior = waypoint::ResetBehavior::instance_change; + proto_reset_behavior = waypoint::ResetBehavior::instance_change; } else if (attribute_value == ResetBehavior::daily_reset_per_character) { - reset_behavior = waypoint::ResetBehavior::daily_reset_per_character; + proto_reset_behavior = waypoint::ResetBehavior::daily_reset_per_character; } else if (attribute_value == ResetBehavior::daily_reset_per_character) { - reset_behavior = waypoint::ResetBehavior::daily_reset_per_character; + proto_reset_behavior = waypoint::ResetBehavior::daily_reset_per_character; } else if (attribute_value == ResetBehavior::weekly_reset) { - reset_behavior = waypoint::ResetBehavior::weekly_reset; + proto_reset_behavior = waypoint::ResetBehavior::weekly_reset; } else if (attribute_value == ResetBehavior::weekly_reset) { - reset_behavior = waypoint::ResetBehavior::weekly_reset; + proto_reset_behavior = waypoint::ResetBehavior::weekly_reset; } else { - reset_behavior = waypoint::ResetBehavior::always_visible; + proto_reset_behavior = waypoint::ResetBehavior::always_visible; + } + return proto_reset_behavior; +} + +ResetBehavior from_proto_reset_behavior (waypoint::ResetBehavior proto_reset_behavior) { + ResetBehavior reset_behavior; + if (proto_reset_behavior == waypoint::ResetBehavior::always_visible){ + reset_behavior = ResetBehavior::always_visible; + } + else if (proto_reset_behavior == waypoint::ResetBehavior::always_visible) { + reset_behavior = ResetBehavior::always_visible; + } + else if (proto_reset_behavior == waypoint::ResetBehavior::map_change) { + reset_behavior = ResetBehavior::map_change; + } + else if (proto_reset_behavior == waypoint::ResetBehavior::map_change) { + reset_behavior = ResetBehavior::map_change; + } + else if (proto_reset_behavior == waypoint::ResetBehavior::daily_reset) { + reset_behavior = ResetBehavior::daily_reset; + } + else if (proto_reset_behavior == waypoint::ResetBehavior::daily_reset) { + reset_behavior = ResetBehavior::daily_reset; + } + else if (proto_reset_behavior == waypoint::ResetBehavior::never) { + reset_behavior = ResetBehavior::never; + } + else if (proto_reset_behavior == waypoint::ResetBehavior::never) { + reset_behavior = ResetBehavior::never; + } + else if (proto_reset_behavior == waypoint::ResetBehavior::timer) { + reset_behavior = ResetBehavior::timer; + } + else if (proto_reset_behavior == waypoint::ResetBehavior::timer) { + reset_behavior = ResetBehavior::timer; + } + else if (proto_reset_behavior == waypoint::ResetBehavior::map_reset) { + reset_behavior = ResetBehavior::map_reset; + } + else if (proto_reset_behavior == waypoint::ResetBehavior::map_reset) { + reset_behavior = ResetBehavior::map_reset; + } + else if (proto_reset_behavior == waypoint::ResetBehavior::instance_change) { + reset_behavior = ResetBehavior::instance_change; + } + else if (proto_reset_behavior == waypoint::ResetBehavior::instance_change) { + reset_behavior = ResetBehavior::instance_change; + } + else if (proto_reset_behavior == waypoint::ResetBehavior::daily_reset_per_character) { + reset_behavior = ResetBehavior::daily_reset_per_character; + } + else if (proto_reset_behavior == waypoint::ResetBehavior::daily_reset_per_character) { + reset_behavior = ResetBehavior::daily_reset_per_character; + } + else if (proto_reset_behavior == waypoint::ResetBehavior::weekly_reset) { + reset_behavior = ResetBehavior::weekly_reset; + } + else if (proto_reset_behavior == waypoint::ResetBehavior::weekly_reset) { + reset_behavior = ResetBehavior::weekly_reset; + } + else { + reset_behavior = ResetBehavior::always_visible; } return reset_behavior; } \ No newline at end of file diff --git a/xml_converter/src/attribute/reset_behavior_gen.hpp b/xml_converter/src/attribute/reset_behavior_gen.hpp index 3e10759c..56708961 100644 --- a/xml_converter/src/attribute/reset_behavior_gen.hpp +++ b/xml_converter/src/attribute/reset_behavior_gen.hpp @@ -22,3 +22,4 @@ enum ResetBehavior { ResetBehavior parse_reset_behavior(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_reset_behavior(ResetBehavior attribute_value); waypoint::ResetBehavior to_proto_reset_behavior(ResetBehavior attribute_value); +ResetBehavior from_proto_reset_behavior(waypoint::ResetBehavior proto_reset_behavior); diff --git a/xml_converter/src/attribute/specialization_filter_gen.cpp b/xml_converter/src/attribute/specialization_filter_gen.cpp index 10348577..25b24e1d 100644 --- a/xml_converter/src/attribute/specialization_filter_gen.cpp +++ b/xml_converter/src/attribute/specialization_filter_gen.cpp @@ -617,222 +617,443 @@ string stringify_specialization_filter(SpecializationFilter attribute_value) { } waypoint::SpecializationFilter* to_proto_specialization_filter (SpecializationFilter attribute_value) { - waypoint::SpecializationFilter* specialization_filter = new waypoint::SpecializationFilter(); + waypoint::SpecializationFilter* proto_specialization_filter = new waypoint::SpecializationFilter(); if (attribute_value.elementalist_tempest == true) { - specialization_filter->set_elementalist_tempest(true); + proto_specialization_filter->set_elementalist_tempest(true); } if (attribute_value.engineer_scrapper == true) { - specialization_filter->set_engineer_scrapper(true); + proto_specialization_filter->set_engineer_scrapper(true); } if (attribute_value.guardian_dragonhunter == true) { - specialization_filter->set_guardian_dragonhunter(true); + proto_specialization_filter->set_guardian_dragonhunter(true); } if (attribute_value.mesmer_chronomancer == true) { - specialization_filter->set_mesmer_chronomancer(true); + proto_specialization_filter->set_mesmer_chronomancer(true); } if (attribute_value.necromancer_reaper == true) { - specialization_filter->set_necromancer_reaper(true); + proto_specialization_filter->set_necromancer_reaper(true); } if (attribute_value.ranger_druid == true) { - specialization_filter->set_ranger_druid(true); + proto_specialization_filter->set_ranger_druid(true); } if (attribute_value.revenant_herald == true) { - specialization_filter->set_revenant_herald(true); + proto_specialization_filter->set_revenant_herald(true); } if (attribute_value.thief_daredevil == true) { - specialization_filter->set_thief_daredevil(true); + proto_specialization_filter->set_thief_daredevil(true); } if (attribute_value.warrior_berserker == true) { - specialization_filter->set_warrior_berserker(true); + proto_specialization_filter->set_warrior_berserker(true); } if (attribute_value.elementalist_weaver == true) { - specialization_filter->set_elementalist_weaver(true); + proto_specialization_filter->set_elementalist_weaver(true); } if (attribute_value.engineer_holosmith == true) { - specialization_filter->set_engineer_holosmith(true); + proto_specialization_filter->set_engineer_holosmith(true); } if (attribute_value.guardian_firebrand == true) { - specialization_filter->set_guardian_firebrand(true); + proto_specialization_filter->set_guardian_firebrand(true); } if (attribute_value.mesmer_mirage == true) { - specialization_filter->set_mesmer_mirage(true); + proto_specialization_filter->set_mesmer_mirage(true); } if (attribute_value.necromancer_scourge == true) { - specialization_filter->set_necromancer_scourge(true); + proto_specialization_filter->set_necromancer_scourge(true); } if (attribute_value.ranger_soulbeast == true) { - specialization_filter->set_ranger_soulbeast(true); + proto_specialization_filter->set_ranger_soulbeast(true); } if (attribute_value.revenant_renegade == true) { - specialization_filter->set_revenant_renegade(true); + proto_specialization_filter->set_revenant_renegade(true); } if (attribute_value.thief_deadeye == true) { - specialization_filter->set_thief_deadeye(true); + proto_specialization_filter->set_thief_deadeye(true); } if (attribute_value.warrior_spellbreaker == true) { - specialization_filter->set_warrior_spellbreaker(true); + proto_specialization_filter->set_warrior_spellbreaker(true); } if (attribute_value.elementalist_catalyst == true) { - specialization_filter->set_elementalist_catalyst(true); + proto_specialization_filter->set_elementalist_catalyst(true); } if (attribute_value.engineer_mechanist == true) { - specialization_filter->set_engineer_mechanist(true); + proto_specialization_filter->set_engineer_mechanist(true); } if (attribute_value.guardian_willbender == true) { - specialization_filter->set_guardian_willbender(true); + proto_specialization_filter->set_guardian_willbender(true); } if (attribute_value.mesmer_virtuoso == true) { - specialization_filter->set_mesmer_virtuoso(true); + proto_specialization_filter->set_mesmer_virtuoso(true); } if (attribute_value.necromancer_harbinger == true) { - specialization_filter->set_necromancer_harbinger(true); + proto_specialization_filter->set_necromancer_harbinger(true); } if (attribute_value.ranger_untamed == true) { - specialization_filter->set_ranger_untamed(true); + proto_specialization_filter->set_ranger_untamed(true); } if (attribute_value.revenant_vindicator == true) { - specialization_filter->set_revenant_vindicator(true); + proto_specialization_filter->set_revenant_vindicator(true); } if (attribute_value.thief_specter == true) { - specialization_filter->set_thief_specter(true); + proto_specialization_filter->set_thief_specter(true); } if (attribute_value.warrior_bladesworn == true) { - specialization_filter->set_warrior_bladesworn(true); + proto_specialization_filter->set_warrior_bladesworn(true); } if (attribute_value.elementalist_air == true) { - specialization_filter->set_elementalist_air(true); + proto_specialization_filter->set_elementalist_air(true); } if (attribute_value.elementalist_arcane == true) { - specialization_filter->set_elementalist_arcane(true); + proto_specialization_filter->set_elementalist_arcane(true); } if (attribute_value.elementalist_earth == true) { - specialization_filter->set_elementalist_earth(true); + proto_specialization_filter->set_elementalist_earth(true); } if (attribute_value.elementalist_fire == true) { - specialization_filter->set_elementalist_fire(true); + proto_specialization_filter->set_elementalist_fire(true); } if (attribute_value.elementalist_water == true) { - specialization_filter->set_elementalist_water(true); + proto_specialization_filter->set_elementalist_water(true); } if (attribute_value.engineer_alchemy == true) { - specialization_filter->set_engineer_alchemy(true); + proto_specialization_filter->set_engineer_alchemy(true); } if (attribute_value.engineer_explosives == true) { - specialization_filter->set_engineer_explosives(true); + proto_specialization_filter->set_engineer_explosives(true); } if (attribute_value.engineer_firearms == true) { - specialization_filter->set_engineer_firearms(true); + proto_specialization_filter->set_engineer_firearms(true); } if (attribute_value.engineer_inventions == true) { - specialization_filter->set_engineer_inventions(true); + proto_specialization_filter->set_engineer_inventions(true); } if (attribute_value.engineer_tools == true) { - specialization_filter->set_engineer_tools(true); + proto_specialization_filter->set_engineer_tools(true); } if (attribute_value.guardian_honor == true) { - specialization_filter->set_guardian_honor(true); + proto_specialization_filter->set_guardian_honor(true); } if (attribute_value.guardian_radiance == true) { - specialization_filter->set_guardian_radiance(true); + proto_specialization_filter->set_guardian_radiance(true); } if (attribute_value.guardian_valor == true) { - specialization_filter->set_guardian_valor(true); + proto_specialization_filter->set_guardian_valor(true); } if (attribute_value.guardian_virtues == true) { - specialization_filter->set_guardian_virtues(true); + proto_specialization_filter->set_guardian_virtues(true); } if (attribute_value.guardian_zeal == true) { - specialization_filter->set_guardian_zeal(true); + proto_specialization_filter->set_guardian_zeal(true); } if (attribute_value.mesmer_chaos == true) { - specialization_filter->set_mesmer_chaos(true); + proto_specialization_filter->set_mesmer_chaos(true); } if (attribute_value.mesmer_domination == true) { - specialization_filter->set_mesmer_domination(true); + proto_specialization_filter->set_mesmer_domination(true); } if (attribute_value.mesmer_dueling == true) { - specialization_filter->set_mesmer_dueling(true); + proto_specialization_filter->set_mesmer_dueling(true); } if (attribute_value.mesmer_illusions == true) { - specialization_filter->set_mesmer_illusions(true); + proto_specialization_filter->set_mesmer_illusions(true); } if (attribute_value.mesmer_inspiration == true) { - specialization_filter->set_mesmer_inspiration(true); + proto_specialization_filter->set_mesmer_inspiration(true); } if (attribute_value.necromancer_blood_magic == true) { - specialization_filter->set_necromancer_blood_magic(true); + proto_specialization_filter->set_necromancer_blood_magic(true); } if (attribute_value.necromancer_curses == true) { - specialization_filter->set_necromancer_curses(true); + proto_specialization_filter->set_necromancer_curses(true); } if (attribute_value.necromancer_death_magic == true) { - specialization_filter->set_necromancer_death_magic(true); + proto_specialization_filter->set_necromancer_death_magic(true); } if (attribute_value.necromancer_soul_reaping == true) { - specialization_filter->set_necromancer_soul_reaping(true); + proto_specialization_filter->set_necromancer_soul_reaping(true); } if (attribute_value.necromancer_spite == true) { - specialization_filter->set_necromancer_spite(true); + proto_specialization_filter->set_necromancer_spite(true); } if (attribute_value.ranger_beastmastery == true) { - specialization_filter->set_ranger_beastmastery(true); + proto_specialization_filter->set_ranger_beastmastery(true); } if (attribute_value.ranger_marksmanship == true) { - specialization_filter->set_ranger_marksmanship(true); + proto_specialization_filter->set_ranger_marksmanship(true); } if (attribute_value.ranger_nature_magic == true) { - specialization_filter->set_ranger_nature_magic(true); + proto_specialization_filter->set_ranger_nature_magic(true); } if (attribute_value.ranger_skirmishing == true) { - specialization_filter->set_ranger_skirmishing(true); + proto_specialization_filter->set_ranger_skirmishing(true); } if (attribute_value.ranger_wilderness_survival == true) { - specialization_filter->set_ranger_wilderness_survival(true); + proto_specialization_filter->set_ranger_wilderness_survival(true); } if (attribute_value.revenant_corruption == true) { - specialization_filter->set_revenant_corruption(true); + proto_specialization_filter->set_revenant_corruption(true); } if (attribute_value.revenant_devastation == true) { - specialization_filter->set_revenant_devastation(true); + proto_specialization_filter->set_revenant_devastation(true); } if (attribute_value.revenant_invocation == true) { - specialization_filter->set_revenant_invocation(true); + proto_specialization_filter->set_revenant_invocation(true); } if (attribute_value.revenant_retribution == true) { - specialization_filter->set_revenant_retribution(true); + proto_specialization_filter->set_revenant_retribution(true); } if (attribute_value.revenant_salvation == true) { - specialization_filter->set_revenant_salvation(true); + proto_specialization_filter->set_revenant_salvation(true); } if (attribute_value.thief_acrobatics == true) { - specialization_filter->set_thief_acrobatics(true); + proto_specialization_filter->set_thief_acrobatics(true); } if (attribute_value.thief_critical_strikes == true) { - specialization_filter->set_thief_critical_strikes(true); + proto_specialization_filter->set_thief_critical_strikes(true); } if (attribute_value.thief_deadly_arts == true) { - specialization_filter->set_thief_deadly_arts(true); + proto_specialization_filter->set_thief_deadly_arts(true); } if (attribute_value.thief_shadow_arts == true) { - specialization_filter->set_thief_shadow_arts(true); + proto_specialization_filter->set_thief_shadow_arts(true); } if (attribute_value.thief_trickery == true) { - specialization_filter->set_thief_trickery(true); + proto_specialization_filter->set_thief_trickery(true); } if (attribute_value.warrior_arms == true) { - specialization_filter->set_warrior_arms(true); + proto_specialization_filter->set_warrior_arms(true); } if (attribute_value.warrior_defense == true) { - specialization_filter->set_warrior_defense(true); + proto_specialization_filter->set_warrior_defense(true); } if (attribute_value.warrior_discipline == true) { - specialization_filter->set_warrior_discipline(true); + proto_specialization_filter->set_warrior_discipline(true); } if (attribute_value.warrior_strength == true) { - specialization_filter->set_warrior_strength(true); + proto_specialization_filter->set_warrior_strength(true); } if (attribute_value.warrior_tactics == true) { - specialization_filter->set_warrior_tactics(true); + proto_specialization_filter->set_warrior_tactics(true); + } + return proto_specialization_filter; +} + +SpecializationFilter from_proto_specialization_filter (waypoint::SpecializationFilter proto_specialization_filter) { + SpecializationFilter specialization_filter; + if (proto_specialization_filter.elementalist_tempest() == true) { + specialization_filter.elementalist_tempest = true; + } + if (proto_specialization_filter.engineer_scrapper() == true) { + specialization_filter.engineer_scrapper = true; + } + if (proto_specialization_filter.guardian_dragonhunter() == true) { + specialization_filter.guardian_dragonhunter = true; + } + if (proto_specialization_filter.mesmer_chronomancer() == true) { + specialization_filter.mesmer_chronomancer = true; + } + if (proto_specialization_filter.necromancer_reaper() == true) { + specialization_filter.necromancer_reaper = true; + } + if (proto_specialization_filter.ranger_druid() == true) { + specialization_filter.ranger_druid = true; + } + if (proto_specialization_filter.revenant_herald() == true) { + specialization_filter.revenant_herald = true; + } + if (proto_specialization_filter.thief_daredevil() == true) { + specialization_filter.thief_daredevil = true; + } + if (proto_specialization_filter.warrior_berserker() == true) { + specialization_filter.warrior_berserker = true; + } + if (proto_specialization_filter.elementalist_weaver() == true) { + specialization_filter.elementalist_weaver = true; + } + if (proto_specialization_filter.engineer_holosmith() == true) { + specialization_filter.engineer_holosmith = true; + } + if (proto_specialization_filter.guardian_firebrand() == true) { + specialization_filter.guardian_firebrand = true; + } + if (proto_specialization_filter.mesmer_mirage() == true) { + specialization_filter.mesmer_mirage = true; + } + if (proto_specialization_filter.necromancer_scourge() == true) { + specialization_filter.necromancer_scourge = true; + } + if (proto_specialization_filter.ranger_soulbeast() == true) { + specialization_filter.ranger_soulbeast = true; + } + if (proto_specialization_filter.revenant_renegade() == true) { + specialization_filter.revenant_renegade = true; + } + if (proto_specialization_filter.thief_deadeye() == true) { + specialization_filter.thief_deadeye = true; + } + if (proto_specialization_filter.warrior_spellbreaker() == true) { + specialization_filter.warrior_spellbreaker = true; + } + if (proto_specialization_filter.elementalist_catalyst() == true) { + specialization_filter.elementalist_catalyst = true; + } + if (proto_specialization_filter.engineer_mechanist() == true) { + specialization_filter.engineer_mechanist = true; + } + if (proto_specialization_filter.guardian_willbender() == true) { + specialization_filter.guardian_willbender = true; + } + if (proto_specialization_filter.mesmer_virtuoso() == true) { + specialization_filter.mesmer_virtuoso = true; + } + if (proto_specialization_filter.necromancer_harbinger() == true) { + specialization_filter.necromancer_harbinger = true; + } + if (proto_specialization_filter.ranger_untamed() == true) { + specialization_filter.ranger_untamed = true; + } + if (proto_specialization_filter.revenant_vindicator() == true) { + specialization_filter.revenant_vindicator = true; + } + if (proto_specialization_filter.thief_specter() == true) { + specialization_filter.thief_specter = true; + } + if (proto_specialization_filter.warrior_bladesworn() == true) { + specialization_filter.warrior_bladesworn = true; + } + if (proto_specialization_filter.elementalist_air() == true) { + specialization_filter.elementalist_air = true; + } + if (proto_specialization_filter.elementalist_arcane() == true) { + specialization_filter.elementalist_arcane = true; + } + if (proto_specialization_filter.elementalist_earth() == true) { + specialization_filter.elementalist_earth = true; + } + if (proto_specialization_filter.elementalist_fire() == true) { + specialization_filter.elementalist_fire = true; + } + if (proto_specialization_filter.elementalist_water() == true) { + specialization_filter.elementalist_water = true; + } + if (proto_specialization_filter.engineer_alchemy() == true) { + specialization_filter.engineer_alchemy = true; + } + if (proto_specialization_filter.engineer_explosives() == true) { + specialization_filter.engineer_explosives = true; + } + if (proto_specialization_filter.engineer_firearms() == true) { + specialization_filter.engineer_firearms = true; + } + if (proto_specialization_filter.engineer_inventions() == true) { + specialization_filter.engineer_inventions = true; + } + if (proto_specialization_filter.engineer_tools() == true) { + specialization_filter.engineer_tools = true; + } + if (proto_specialization_filter.guardian_honor() == true) { + specialization_filter.guardian_honor = true; + } + if (proto_specialization_filter.guardian_radiance() == true) { + specialization_filter.guardian_radiance = true; + } + if (proto_specialization_filter.guardian_valor() == true) { + specialization_filter.guardian_valor = true; + } + if (proto_specialization_filter.guardian_virtues() == true) { + specialization_filter.guardian_virtues = true; + } + if (proto_specialization_filter.guardian_zeal() == true) { + specialization_filter.guardian_zeal = true; + } + if (proto_specialization_filter.mesmer_chaos() == true) { + specialization_filter.mesmer_chaos = true; + } + if (proto_specialization_filter.mesmer_domination() == true) { + specialization_filter.mesmer_domination = true; + } + if (proto_specialization_filter.mesmer_dueling() == true) { + specialization_filter.mesmer_dueling = true; + } + if (proto_specialization_filter.mesmer_illusions() == true) { + specialization_filter.mesmer_illusions = true; + } + if (proto_specialization_filter.mesmer_inspiration() == true) { + specialization_filter.mesmer_inspiration = true; + } + if (proto_specialization_filter.necromancer_blood_magic() == true) { + specialization_filter.necromancer_blood_magic = true; + } + if (proto_specialization_filter.necromancer_curses() == true) { + specialization_filter.necromancer_curses = true; + } + if (proto_specialization_filter.necromancer_death_magic() == true) { + specialization_filter.necromancer_death_magic = true; + } + if (proto_specialization_filter.necromancer_soul_reaping() == true) { + specialization_filter.necromancer_soul_reaping = true; + } + if (proto_specialization_filter.necromancer_spite() == true) { + specialization_filter.necromancer_spite = true; + } + if (proto_specialization_filter.ranger_beastmastery() == true) { + specialization_filter.ranger_beastmastery = true; + } + if (proto_specialization_filter.ranger_marksmanship() == true) { + specialization_filter.ranger_marksmanship = true; + } + if (proto_specialization_filter.ranger_nature_magic() == true) { + specialization_filter.ranger_nature_magic = true; + } + if (proto_specialization_filter.ranger_skirmishing() == true) { + specialization_filter.ranger_skirmishing = true; + } + if (proto_specialization_filter.ranger_wilderness_survival() == true) { + specialization_filter.ranger_wilderness_survival = true; + } + if (proto_specialization_filter.revenant_corruption() == true) { + specialization_filter.revenant_corruption = true; + } + if (proto_specialization_filter.revenant_devastation() == true) { + specialization_filter.revenant_devastation = true; + } + if (proto_specialization_filter.revenant_invocation() == true) { + specialization_filter.revenant_invocation = true; + } + if (proto_specialization_filter.revenant_retribution() == true) { + specialization_filter.revenant_retribution = true; + } + if (proto_specialization_filter.revenant_salvation() == true) { + specialization_filter.revenant_salvation = true; + } + if (proto_specialization_filter.thief_acrobatics() == true) { + specialization_filter.thief_acrobatics = true; + } + if (proto_specialization_filter.thief_critical_strikes() == true) { + specialization_filter.thief_critical_strikes = true; + } + if (proto_specialization_filter.thief_deadly_arts() == true) { + specialization_filter.thief_deadly_arts = true; + } + if (proto_specialization_filter.thief_shadow_arts() == true) { + specialization_filter.thief_shadow_arts = true; + } + if (proto_specialization_filter.thief_trickery() == true) { + specialization_filter.thief_trickery = true; + } + if (proto_specialization_filter.warrior_arms() == true) { + specialization_filter.warrior_arms = true; + } + if (proto_specialization_filter.warrior_defense() == true) { + specialization_filter.warrior_defense = true; + } + if (proto_specialization_filter.warrior_discipline() == true) { + specialization_filter.warrior_discipline = true; + } + if (proto_specialization_filter.warrior_strength() == true) { + specialization_filter.warrior_strength = true; + } + if (proto_specialization_filter.warrior_tactics() == true) { + specialization_filter.warrior_tactics = true; } return specialization_filter; } \ No newline at end of file diff --git a/xml_converter/src/attribute/specialization_filter_gen.hpp b/xml_converter/src/attribute/specialization_filter_gen.hpp index 15f8782c..b3af8ebd 100644 --- a/xml_converter/src/attribute/specialization_filter_gen.hpp +++ b/xml_converter/src/attribute/specialization_filter_gen.hpp @@ -90,3 +90,4 @@ class SpecializationFilter { SpecializationFilter parse_specialization_filter(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_specialization_filter(SpecializationFilter attribute_value); waypoint::SpecializationFilter* to_proto_specialization_filter(SpecializationFilter attribute_value); +SpecializationFilter from_proto_specialization_filter(waypoint::SpecializationFilter proto_specialization_filter); diff --git a/xml_converter/src/attribute/species_filter_gen.cpp b/xml_converter/src/attribute/species_filter_gen.cpp index 51e67346..a0ff9903 100644 --- a/xml_converter/src/attribute/species_filter_gen.cpp +++ b/xml_converter/src/attribute/species_filter_gen.cpp @@ -67,21 +67,41 @@ string stringify_species_filter(SpeciesFilter attribute_value) { } waypoint::SpeciesFilter* to_proto_species_filter (SpeciesFilter attribute_value) { - waypoint::SpeciesFilter* species_filter = new waypoint::SpeciesFilter(); + waypoint::SpeciesFilter* proto_species_filter = new waypoint::SpeciesFilter(); if (attribute_value.asura == true) { - species_filter->set_asura(true); + proto_species_filter->set_asura(true); } if (attribute_value.charr == true) { - species_filter->set_charr(true); + proto_species_filter->set_charr(true); } if (attribute_value.human == true) { - species_filter->set_human(true); + proto_species_filter->set_human(true); } if (attribute_value.norn == true) { - species_filter->set_norn(true); + proto_species_filter->set_norn(true); } if (attribute_value.sylvari == true) { - species_filter->set_sylvari(true); + proto_species_filter->set_sylvari(true); + } + return proto_species_filter; +} + +SpeciesFilter from_proto_species_filter (waypoint::SpeciesFilter proto_species_filter) { + SpeciesFilter species_filter; + if (proto_species_filter.asura() == true) { + species_filter.asura = true; + } + if (proto_species_filter.charr() == true) { + species_filter.charr = true; + } + if (proto_species_filter.human() == true) { + species_filter.human = true; + } + if (proto_species_filter.norn() == true) { + species_filter.norn = true; + } + if (proto_species_filter.sylvari() == true) { + species_filter.sylvari = true; } return species_filter; } \ No newline at end of file diff --git a/xml_converter/src/attribute/species_filter_gen.hpp b/xml_converter/src/attribute/species_filter_gen.hpp index d5e3e99e..0b03ff88 100644 --- a/xml_converter/src/attribute/species_filter_gen.hpp +++ b/xml_converter/src/attribute/species_filter_gen.hpp @@ -23,3 +23,4 @@ class SpeciesFilter { SpeciesFilter parse_species_filter(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_species_filter(SpeciesFilter attribute_value); waypoint::SpeciesFilter* to_proto_species_filter(SpeciesFilter attribute_value); +SpeciesFilter from_proto_species_filter(waypoint::SpeciesFilter proto_species_filter); diff --git a/xml_converter/src/attribute/string.cpp b/xml_converter/src/attribute/string.cpp index 55424d14..c802eb84 100644 --- a/xml_converter/src/attribute/string.cpp +++ b/xml_converter/src/attribute/string.cpp @@ -34,8 +34,19 @@ string stringify_string(string attribute_value) { // // Returns the same string that was passed in which is encoded directly into // proto. This function exists for stylistic convenience with all the other -// attribute stringify functions. +// attribute to_proto functions. //////////////////////////////////////////////////////////////////////////////// string to_proto_string(string attribute_value) { return attribute_value; } + +//////////////////////////////////////////////////////////////////////////////// +// to_proto_string +// +// Returns the same string that was parsed from proto. +// This function exists for stylistic convenience with all the other +// attribute from_proto functions. +//////////////////////////////////////////////////////////////////////////////// +string from_proto_string(string attribute_value) { + return attribute_value; +} diff --git a/xml_converter/src/attribute/string.hpp b/xml_converter/src/attribute/string.hpp index a8df6bf5..91eca6c2 100644 --- a/xml_converter/src/attribute/string.hpp +++ b/xml_converter/src/attribute/string.hpp @@ -13,3 +13,5 @@ std::string parse_string(rapidxml::xml_attribute<>* input, std::vectorset_trail_data(attribute_value.trail_data); return trail_data; } + +//////////////////////////////////////////////////////////////////////////////// +// from_proto_trail_data +// +// Returns a TrailData parsed from proto. +//////////////////////////////////////////////////////////////////////////////// +TrailData from_proto_trail_data(waypoint::TrailData attribute_value) { + TrailData trail_data; + trail_data.trail_data = attribute_value.trail_data(); + return trail_data; +} \ No newline at end of file diff --git a/xml_converter/src/attribute/trail_data.hpp b/xml_converter/src/attribute/trail_data.hpp index bede4859..2e2ae479 100644 --- a/xml_converter/src/attribute/trail_data.hpp +++ b/xml_converter/src/attribute/trail_data.hpp @@ -18,3 +18,5 @@ TrailData parse_trail_data(rapidxml::xml_attribute<>* input, std::vectorset_guid(base64_encode(&attribute_value.guid[0], attribute_value.guid.size())); return guid; } + +UniqueId from_proto_unique_id(waypoint::GUID attribute_value){ + UniqueId unique_id; + unique_id.guid = base64_decode(attribute_value.guid()); + return unique_id; +} diff --git a/xml_converter/src/attribute/unique_id.hpp b/xml_converter/src/attribute/unique_id.hpp index d0f7c45b..0b30be32 100644 --- a/xml_converter/src/attribute/unique_id.hpp +++ b/xml_converter/src/attribute/unique_id.hpp @@ -19,3 +19,5 @@ UniqueId parse_unique_id(rapidxml::xml_attribute<>* input, std::vector #include "category_gen.hpp" #include "waypoint.pb.h" @@ -117,11 +118,46 @@ waypoint::Category Category::as_protobuf(waypoint::Category proto_category) cons for (const auto& [key, val] : this->children) { waypoint::Category proto_category_child; - val.as_protobuf(proto_category_child); + proto_category_child = val.as_protobuf(proto_category_child); proto_category.add_children()->CopyFrom(proto_category_child); } return proto_category; } -// Category::from_protobuf() +void Category::parse_protobuf(waypoint::Category proto_category){ + + if (proto_category.default_visibility() != 0) { + this->default_visibility = from_proto_bool(proto_category.default_visibility()); + this->default_visibility_is_set = true; + } + + + + if (proto_category.display_name() != "") { + this->display_name = from_proto_string(proto_category.display_name()); + this->display_name_is_set = true; + } + + + if (proto_category.is_separator() != 0) { + this->is_separator = from_proto_bool(proto_category.is_separator()); + this->is_separator_is_set = true; + } + + + + if (proto_category.name() != "") { + this->name = from_proto_string(proto_category.name()); + this->name_is_set = true; + } + + + + if (proto_category.tip_description() != "") { + this->tooltip_description = from_proto_string(proto_category.tip_description()); + this->tooltip_description_is_set = true; + } + + +} diff --git a/xml_converter/src/category_gen.hpp b/xml_converter/src/category_gen.hpp index 342c8181..ac667478 100644 --- a/xml_converter/src/category_gen.hpp +++ b/xml_converter/src/category_gen.hpp @@ -33,4 +33,5 @@ class Category : public Parseable { virtual std::string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors); waypoint::Category as_protobuf(waypoint::Category) const; + void parse_protobuf(waypoint::Category proto_category); }; diff --git a/xml_converter/src/icon_gen.cpp b/xml_converter/src/icon_gen.cpp index a4ab8a19..fd1c1fe3 100644 --- a/xml_converter/src/icon_gen.cpp +++ b/xml_converter/src/icon_gen.cpp @@ -1,3 +1,4 @@ +#include #include "icon_gen.hpp" #include "waypoint.pb.h" @@ -683,5 +684,299 @@ waypoint::Icon Icon::as_protobuf(waypoint::Icon proto_icon) const { return proto_icon; } -// Icon::from_protobuf() +void Icon::parse_protobuf(waypoint::Icon proto_icon){ + waypoint::Trigger trigger = proto_icon.trigger(); + + if (proto_icon.achievement_bit() != 0) { + this->achievement_bitmask = from_proto_int(proto_icon.achievement_bit()); + this->achievement_bitmask_is_set = true; + } + + + if (proto_icon.achievement_id() != 0) { + this->achievement_id = from_proto_int(proto_icon.achievement_id()); + this->achievement_id_is_set = true; + } + + + if (proto_icon.alpha() != 0) { + this->alpha = from_proto_float(proto_icon.alpha()); + this->alpha_is_set = true; + } + + + if (trigger.auto_trigger() != 0) { + this->auto_trigger = from_proto_bool(trigger.auto_trigger()); + this->auto_trigger_is_set = true; + } + + if (trigger.bounce_delay() != 0) { + this->bounce_delay = from_proto_float(trigger.bounce_delay()); + this->bounce_delay_is_set = true; + } + + if (trigger.bounce_duration() != 0) { + this->bounce_duration = from_proto_float(trigger.bounce_duration()); + this->bounce_duration_is_set = true; + } + + if (trigger.bounce_height() != 0) { + this->bounce_height = from_proto_float(trigger.bounce_height()); + this->bounce_height_is_set = true; + } + + if (proto_icon.can_fade() != 0) { + this->can_fade = from_proto_bool(proto_icon.can_fade()); + this->can_fade_is_set = true; + } + + + if (proto_icon.has_category()) { + this->category = from_proto_marker_category(proto_icon.category()); + this->category_is_set = true; + } + + + if (proto_icon.has_color()) { + this->color = from_proto_color(proto_icon.color()); + this->color_is_set = true; + } + + + + if (trigger.action_copy_clipboard() != "") { + this->copy_clipboard = from_proto_string(trigger.action_copy_clipboard()); + this->copy_clipboard_is_set = true; + } + + + if (trigger.action_copy_message() != "") { + this->copy_message = from_proto_string(trigger.action_copy_message()); + this->copy_message_is_set = true; + } + + if (proto_icon.cull_chirality() != 0) { + this->cull_chirality = from_proto_cull_chirality(proto_icon.cull_chirality()); + this->cull_chirality_is_set = true; + } + + + if (proto_icon.distance_fade_end() != 0) { + this->distance_fade_end = from_proto_float(proto_icon.distance_fade_end()); + this->distance_fade_end_is_set = true; + } + + + if (proto_icon.distance_fade_start() != 0) { + this->distance_fade_start = from_proto_float(proto_icon.distance_fade_start()); + this->distance_fade_start_is_set = true; + } + + + if (proto_icon.has_euler_rotation()) { + this->euler_rotation = from_proto_euler_rotation(proto_icon.euler_rotation()); + this->euler_rotation_is_set = true; + } + + + if (proto_icon.has_festival_filter()) { + this->festival_filter = from_proto_festival_filter(proto_icon.festival_filter()); + this->festival_filter_is_set = true; + } + + + if (proto_icon.has_guid()) { + this->guid = from_proto_unique_id(proto_icon.guid()); + this->guid_is_set = true; + } + + + if (trigger.has_countdown() != 0) { + this->has_countdown = from_proto_bool(trigger.has_countdown()); + this->has_countdown_is_set = true; + } + + if (proto_icon.height_offset() != 0) { + this->heightoffset = from_proto_float(proto_icon.height_offset()); + this->heightoffset_is_set = true; + } + + + if (trigger.has_action_hide_category()) { + this->hide_category = from_proto_marker_category(trigger.action_hide_category()); + this->hide_category_is_set = true; + } + + if (proto_icon.has_texture()) { + this->icon = from_proto_image(proto_icon.texture()); + this->icon_is_set = true; + } + + + if (proto_icon.__tentative__scale() != 0) { + this->icon_size = from_proto_float(proto_icon.__tentative__scale()); + this->icon_size_is_set = true; + } + + + + if (trigger.action_info_message() != "") { + this->info_message = from_proto_string(trigger.action_info_message()); + this->info_message_is_set = true; + } + + if (trigger.invert_display() != 0) { + this->invert_visibility = from_proto_bool(trigger.invert_display()); + this->invert_visibility_is_set = true; + } + + if (proto_icon.map_display_size() != 0) { + this->map_display_size = from_proto_int(proto_icon.map_display_size()); + this->map_display_size_is_set = true; + } + + + if (proto_icon.map_id() != 0) { + this->map_id = from_proto_int(proto_icon.map_id()); + this->map_id_is_set = true; + } + + + if (proto_icon.has_map_type_filter()) { + this->map_type_filter = from_proto_map_type_filter(proto_icon.map_type_filter()); + this->map_type_filter_is_set = true; + } + + + if (proto_icon.maximum_size_on_screen() != 0) { + this->maximum_size_on_screen = from_proto_int(proto_icon.maximum_size_on_screen()); + this->maximum_size_on_screen_is_set = true; + } + + + if (proto_icon.minimum_size_on_screen() != 0) { + this->minimum_size_on_screen = from_proto_int(proto_icon.minimum_size_on_screen()); + this->minimum_size_on_screen_is_set = true; + } + + + if (proto_icon.has_mount_filter()) { + this->mount_filter = from_proto_mount_filter(proto_icon.mount_filter()); + this->mount_filter_is_set = true; + } + + + if (proto_icon.has_position()) { + this->position = from_proto_position(proto_icon.position()); + this->position_is_set = true; + } + + + if (proto_icon.has_profession_filter()) { + this->profession_filter = from_proto_profession_filter(proto_icon.profession_filter()); + this->profession_filter_is_set = true; + } + + + if (proto_icon.__tentative__render_ingame() != 0) { + this->render_ingame = from_proto_bool(proto_icon.__tentative__render_ingame()); + this->render_ingame_is_set = true; + } + + + if (proto_icon.__tentative__render_on_map() != 0) { + this->render_on_map = from_proto_bool(proto_icon.__tentative__render_on_map()); + this->render_on_map_is_set = true; + } + + + if (proto_icon.__tentative__render_on_minimap() != 0) { + this->render_on_minimap = from_proto_bool(proto_icon.__tentative__render_on_minimap()); + this->render_on_minimap_is_set = true; + } + + + if (trigger.reset_behavior() != 0) { + this->reset_behavior = from_proto_reset_behavior(trigger.reset_behavior()); + this->reset_behavior_is_set = true; + } + + if (trigger.reset_length() != 0) { + this->reset_length = from_proto_float(trigger.reset_length()); + this->reset_length_is_set = true; + } + + if (proto_icon.scale_on_map_with_zoom() != 0) { + this->scale_on_map_with_zoom = from_proto_bool(proto_icon.scale_on_map_with_zoom()); + this->scale_on_map_with_zoom_is_set = true; + } + + + + if (proto_icon.bhdraft__schedule() != "") { + this->schedule = from_proto_string(proto_icon.bhdraft__schedule()); + this->schedule_is_set = true; + } + + + if (proto_icon.bhdraft__schedule_duration() != 0) { + this->schedule_duration = from_proto_float(proto_icon.bhdraft__schedule_duration()); + this->schedule_duration_is_set = true; + } + + + if (trigger.has_action_show_category()) { + this->show_category = from_proto_marker_category(trigger.action_show_category()); + this->show_category_is_set = true; + } + + if (proto_icon.has_specialization_filter()) { + this->specialization_filter = from_proto_specialization_filter(proto_icon.specialization_filter()); + this->specialization_filter_is_set = true; + } + + + if (proto_icon.has_species_filter()) { + this->species_filter = from_proto_species_filter(proto_icon.species_filter()); + this->species_filter_is_set = true; + } + + + if (trigger.has_action_toggle_category()) { + this->toggle_category = from_proto_marker_category(trigger.action_toggle_category()); + this->toggle_category_is_set = true; + } + + + if (proto_icon.tip_description() != "") { + this->tooltip_description = from_proto_string(proto_icon.tip_description()); + this->tooltip_description_is_set = true; + } + + + + if (proto_icon.tip_name() != "") { + this->tooltip_name = from_proto_string(proto_icon.tip_name()); + this->tooltip_name_is_set = true; + } + + + if (trigger.range() != 0) { + this->trigger_range = from_proto_float(trigger.range()); + this->trigger_range_is_set = true; + } + + + + + + + + + + + + + +} diff --git a/xml_converter/src/icon_gen.hpp b/xml_converter/src/icon_gen.hpp index 289d3f17..6a696888 100644 --- a/xml_converter/src/icon_gen.hpp +++ b/xml_converter/src/icon_gen.hpp @@ -137,5 +137,6 @@ class Icon : public Parseable { virtual std::string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors); waypoint::Icon as_protobuf(waypoint::Icon) const; + void parse_protobuf(waypoint::Icon proto_icon); bool validate_attributes_of_type_marker_category(); }; diff --git a/xml_converter/src/trail_gen.cpp b/xml_converter/src/trail_gen.cpp index c5044907..23d95290 100644 --- a/xml_converter/src/trail_gen.cpp +++ b/xml_converter/src/trail_gen.cpp @@ -1,3 +1,4 @@ +#include #include "trail_gen.hpp" #include "waypoint.pb.h" @@ -384,5 +385,176 @@ waypoint::Trail Trail::as_protobuf(waypoint::Trail proto_trail) const { return proto_trail; } -// Trail::from_protobuf() +void Trail::parse_protobuf(waypoint::Trail proto_trail){ + + if (proto_trail.achievement_bit() != 0) { + this->achievement_bitmask = from_proto_int(proto_trail.achievement_bit()); + this->achievement_bitmask_is_set = true; + } + + + if (proto_trail.achievement_id() != 0) { + this->achievement_id = from_proto_int(proto_trail.achievement_id()); + this->achievement_id_is_set = true; + } + + + if (proto_trail.alpha() != 0) { + this->alpha = from_proto_float(proto_trail.alpha()); + this->alpha_is_set = true; + } + + + if (proto_trail.animation_speed() != 0) { + this->animation_speed = from_proto_float(proto_trail.animation_speed()); + this->animation_speed_is_set = true; + } + + + if (proto_trail.can_fade() != 0) { + this->can_fade = from_proto_bool(proto_trail.can_fade()); + this->can_fade_is_set = true; + } + + + if (proto_trail.has_category()) { + this->category = from_proto_marker_category(proto_trail.category()); + this->category_is_set = true; + } + + + if (proto_trail.has_color()) { + this->color = from_proto_color(proto_trail.color()); + this->color_is_set = true; + } + + + if (proto_trail.cull_chirality() != 0) { + this->cull_chirality = from_proto_cull_chirality(proto_trail.cull_chirality()); + this->cull_chirality_is_set = true; + } + + + if (proto_trail.distance_fade_end() != 0) { + this->distance_fade_end = from_proto_float(proto_trail.distance_fade_end()); + this->distance_fade_end_is_set = true; + } + + + if (proto_trail.distance_fade_start() != 0) { + this->distance_fade_start = from_proto_float(proto_trail.distance_fade_start()); + this->distance_fade_start_is_set = true; + } + + + if (proto_trail.has_festival_filter()) { + this->festival_filter = from_proto_festival_filter(proto_trail.festival_filter()); + this->festival_filter_is_set = true; + } + + + if (proto_trail.has_guid()) { + this->guid = from_proto_unique_id(proto_trail.guid()); + this->guid_is_set = true; + } + + + if (proto_trail.is_wall() != 0) { + this->is_wall = from_proto_bool(proto_trail.is_wall()); + this->is_wall_is_set = true; + } + + + if (proto_trail.map_display_size() != 0) { + this->map_display_size = from_proto_int(proto_trail.map_display_size()); + this->map_display_size_is_set = true; + } + + + if (proto_trail.map_id() != 0) { + this->map_id = from_proto_int(proto_trail.map_id()); + this->map_id_is_set = true; + } + + + if (proto_trail.has_map_type_filter()) { + this->map_type_filter = from_proto_map_type_filter(proto_trail.map_type_filter()); + this->map_type_filter_is_set = true; + } + + + if (proto_trail.has_mount_filter()) { + this->mount_filter = from_proto_mount_filter(proto_trail.mount_filter()); + this->mount_filter_is_set = true; + } + + + if (proto_trail.has_profession_filter()) { + this->profession_filter = from_proto_profession_filter(proto_trail.profession_filter()); + this->profession_filter_is_set = true; + } + + + if (proto_trail.__tentative__render_ingame() != 0) { + this->render_ingame = from_proto_bool(proto_trail.__tentative__render_ingame()); + this->render_ingame_is_set = true; + } + + + if (proto_trail.__tentative__render_on_map() != 0) { + this->render_on_map = from_proto_bool(proto_trail.__tentative__render_on_map()); + this->render_on_map_is_set = true; + } + + + if (proto_trail.__tentative__render_on_minimap() != 0) { + this->render_on_minimap = from_proto_bool(proto_trail.__tentative__render_on_minimap()); + this->render_on_minimap_is_set = true; + } + + + + if (proto_trail.bhdraft__schedule() != "") { + this->schedule = from_proto_string(proto_trail.bhdraft__schedule()); + this->schedule_is_set = true; + } + + + if (proto_trail.bhdraft__schedule_duration() != 0) { + this->schedule_duration = from_proto_float(proto_trail.bhdraft__schedule_duration()); + this->schedule_duration_is_set = true; + } + + + if (proto_trail.has_specialization_filter()) { + this->specialization_filter = from_proto_specialization_filter(proto_trail.specialization_filter()); + this->specialization_filter_is_set = true; + } + + + if (proto_trail.has_species_filter()) { + this->species_filter = from_proto_species_filter(proto_trail.species_filter()); + this->species_filter_is_set = true; + } + + + if (proto_trail.has_texture()) { + this->texture = from_proto_image(proto_trail.texture()); + this->texture_is_set = true; + } + + + if (proto_trail.has_trail_data()) { + this->trail_data = from_proto_trail_data(proto_trail.trail_data()); + this->trail_data_is_set = true; + } + + + if (proto_trail.scale() != 0) { + this->trail_scale = from_proto_float(proto_trail.scale()); + this->trail_scale_is_set = true; + } + + +} diff --git a/xml_converter/src/trail_gen.hpp b/xml_converter/src/trail_gen.hpp index d48cc285..dd0894aa 100644 --- a/xml_converter/src/trail_gen.hpp +++ b/xml_converter/src/trail_gen.hpp @@ -82,5 +82,6 @@ class Trail : public Parseable { virtual std::string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors); waypoint::Trail as_protobuf(waypoint::Trail) const; + void parse_protobuf(waypoint::Trail proto_trail); bool validate_attributes_of_type_marker_category(); }; diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 87990cda..46d6a671 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -53,7 +53,7 @@ void write_xml_file(string xml_filepath, map* marker_categorie } outfile << text + "\n"; } - outfile << "\n"; + outfile << "\n\n"; outfile.close(); } @@ -85,12 +85,6 @@ void write_protobuf_file(string proto_filepath, map* marker_ca outfile.close(); } -// void read_protobuf_file(string proto_filepath, map* marker_categories, vector* parsed_pois){ -// fstream infile; - -// infile.open(proto_filepath, ios::in | ios_base::binary); - -// } Category* get_category(rapidxml::xml_node<>* node, map* marker_categories, vector* errors) { // TODO: This is a slow linear search, replace with something faster. @@ -170,13 +164,28 @@ vector parse_pois(rapidxml::xml_node<>* root_node, map parse_proto_pois(waypoint::Waypoint proto_message) { + vector markers; + + for (int i = 0; i < proto_message.icon_size(); i++) { + Icon* icon = new Icon(); + icon->parse_protobuf(proto_message.icon(i)); + markers.push_back(icon); + } + for (int i = 0; i < proto_message.trail_size(); i++) { + Trail* trail = new Trail(); + trail->parse_protobuf(proto_message.trail(i)); + markers.push_back(trail); + } + return markers; +} + void parse_marker_categories(rapidxml::xml_node<>* node, map* marker_categories, vector* errors, int depth = 0) { if (get_node_name(node) == "MarkerCategory") { string name = lowercase(find_attribute_value(node, "name")); Category* this_category = &(*marker_categories)[name]; this_category->init_from_xml(node, errors); - for (rapidxml::xml_node<>* child_node = node->first_node(); child_node; child_node = child_node->next_sibling()) { parse_marker_categories(child_node, &(this_category->children), errors, depth + 1); } @@ -185,6 +194,14 @@ void parse_marker_categories(rapidxml::xml_node<>* node, map* errors->push_back(new XMLNodeNameError("Unknown MarkerCategory Tag", node)); } } +void parse_proto_marker_categories(::waypoint::Category proto_category, map* marker_categories){ + string name = proto_category.name(); + Category* this_category = &(*marker_categories)[name]; + this_category->parse_protobuf(proto_category); + for (int i = 0; i < proto_category.children_size(); i++) { + parse_proto_marker_categories(proto_category.children(i), &(this_category->children)); + } +} //////////////////////////////////////////////////////////////////////////////// // parse_xml_file @@ -228,6 +245,19 @@ void parse_xml_file(string xml_filepath, map* marker_categorie } } +void read_protobuf_file(string proto_filepath, map* marker_categories, vector* parsed_pois){ + fstream infile; + waypoint::Waypoint proto_message; + + infile.open(proto_filepath, ios::in | ios_base::binary); + proto_message.ParseFromIstream(&infile); + for (int i = 0; i < proto_message.category_size(); i++) { + parse_proto_marker_categories(proto_message.category(i), marker_categories); + } + vector temp_vector = parse_proto_pois(proto_message); + move(temp_vector.begin(), temp_vector.end(), back_inserter(*parsed_pois)); +} + bool filename_comp(string a, string b) { return lowercase(a) < lowercase(b); } @@ -270,6 +300,9 @@ void convert_taco_directory(string directory, map* marker_cate void test_proto() { waypoint::Category testcategory; testcategory.set_display_name("TEST"); + if (testcategory.name() != ""){ + cout << "Error in test_proto" << endl; + } string output = testcategory.display_name(); if (output != "TEST") { cout << "Error in test_proto" << endl; @@ -313,19 +346,27 @@ int main() { ms = std::chrono::duration_cast(dur).count(); cout << "The protobuf write function took " << ms << " milliseconds to run" << endl; - // begin = chrono::high_resolution_clock::now(); - // read_protobuf_file("../export_packs/export.data", &marker_categories, &parsed_pois); - // end = chrono::high_resolution_clock::now(); - // dur = end - begin; - // ms = std::chrono::duration_cast(dur).count(); - // cout << "The protobuf read function took " << ms << " milliseconds to run" << endl; - - // begin = chrono::high_resolution_clock::now(); - // write_xml_file("../export_packs/export2.xml", &marker_categories, &parsed_pois); - // end = chrono::high_resolution_clock::now(); - // dur = end - begin; - // ms = std::chrono::duration_cast(dur).count(); - // cout << "The xml write function took " << ms << " milliseconds to run" << endl; + +//////////////////////////////////////////////////////////////////////////////////////// +/// This section tests that the protobuf file can be parsed back to xml +//////////////////////////////////////////////////////////////////////////////////////// + + parsed_pois.clear(); + marker_categories.clear(); + + begin = chrono::high_resolution_clock::now(); + read_protobuf_file("../export_packs/export.data", &marker_categories, &parsed_pois); + end = chrono::high_resolution_clock::now(); + dur = end - begin; + ms = std::chrono::duration_cast(dur).count(); + cout << "The protobuf read function took " << ms << " milliseconds to run" << endl; + + begin = chrono::high_resolution_clock::now(); + write_xml_file("../export_packs/export2.xml", &marker_categories, &parsed_pois); + end = chrono::high_resolution_clock::now(); + dur = end - begin; + ms = std::chrono::duration_cast(dur).count(); + cout << "The xml write function took " << ms << " milliseconds to run" << endl; return 0; } From e5a73fa7a69cdb0770a5025d6cb9b0dd26a556f2 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 5 Dec 2022 21:15:04 -0500 Subject: [PATCH 127/539] Addressing error in code_generator.py --- xml_converter/generators/code_generator.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 690d54cd..1a4a0edb 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -425,7 +425,7 @@ def generate_cpp_variable_data( default_xml_fields: List[str] = [] xml_export: str = "" protobuf_field: str = "" - is_trigger: bool = False; + is_trigger: bool = False cpp_includes.hpp_absolute_includes.add("string") cpp_includes.hpp_absolute_includes.add("vector") @@ -482,10 +482,10 @@ def generate_cpp_variable_data( # Compound Values are unique in that the components have xml fields in addition to the compound variable if fieldval['type'] == "CompoundValue": xml_export = fieldval['xml_export'] - for i, component in enumerate(fieldval['components']): + for component in fieldval['components']: component_xml_fields = [] component_default_xml_fields = [] - for j, item in enumerate(component['xml_fields']): + for item in component['xml_fields']: if xml_export == "Children": component_default_xml_fields.append(item) if xml_export == "Parent": From dd508f7ebb388de7bfd37e4db6f7499eeebb07d3 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 5 Dec 2022 21:57:47 -0500 Subject: [PATCH 128/539] Small change to test error --- xml_converter/src/xml_converter.cpp | 70 ++++++++++++++--------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 46d6a671..81a031b7 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -332,41 +332,41 @@ int main() { auto ms = std::chrono::duration_cast(dur).count(); cout << "The parse function took " << ms << " milliseconds to run" << endl; - begin = chrono::high_resolution_clock::now(); - write_xml_file("../export_packs/export.xml", &marker_categories, &parsed_pois); - end = chrono::high_resolution_clock::now(); - dur = end - begin; - ms = std::chrono::duration_cast(dur).count(); - cout << "The xml write function took " << ms << " milliseconds to run" << endl; - - begin = chrono::high_resolution_clock::now(); - write_protobuf_file("../export_packs/export.data", &marker_categories, &parsed_pois); - end = chrono::high_resolution_clock::now(); - dur = end - begin; - ms = std::chrono::duration_cast(dur).count(); - cout << "The protobuf write function took " << ms << " milliseconds to run" << endl; - - -//////////////////////////////////////////////////////////////////////////////////////// -/// This section tests that the protobuf file can be parsed back to xml -//////////////////////////////////////////////////////////////////////////////////////// - - parsed_pois.clear(); - marker_categories.clear(); - - begin = chrono::high_resolution_clock::now(); - read_protobuf_file("../export_packs/export.data", &marker_categories, &parsed_pois); - end = chrono::high_resolution_clock::now(); - dur = end - begin; - ms = std::chrono::duration_cast(dur).count(); - cout << "The protobuf read function took " << ms << " milliseconds to run" << endl; - - begin = chrono::high_resolution_clock::now(); - write_xml_file("../export_packs/export2.xml", &marker_categories, &parsed_pois); - end = chrono::high_resolution_clock::now(); - dur = end - begin; - ms = std::chrono::duration_cast(dur).count(); - cout << "The xml write function took " << ms << " milliseconds to run" << endl; +// begin = chrono::high_resolution_clock::now(); +// write_xml_file("../export_packs/export.xml", &marker_categories, &parsed_pois); +// end = chrono::high_resolution_clock::now(); +// dur = end - begin; +// ms = std::chrono::duration_cast(dur).count(); +// cout << "The xml write function took " << ms << " milliseconds to run" << endl; + +// begin = chrono::high_resolution_clock::now(); +// write_protobuf_file("../export_packs/export.data", &marker_categories, &parsed_pois); +// end = chrono::high_resolution_clock::now(); +// dur = end - begin; +// ms = std::chrono::duration_cast(dur).count(); +// cout << "The protobuf write function took " << ms << " milliseconds to run" << endl; + + +// //////////////////////////////////////////////////////////////////////////////////////// +// /// This section tests that the protobuf file can be parsed back to xml +// //////////////////////////////////////////////////////////////////////////////////////// + +// parsed_pois.clear(); +// marker_categories.clear(); + +// begin = chrono::high_resolution_clock::now(); +// read_protobuf_file("../export_packs/export.data", &marker_categories, &parsed_pois); +// end = chrono::high_resolution_clock::now(); +// dur = end - begin; +// ms = std::chrono::duration_cast(dur).count(); +// cout << "The protobuf read function took " << ms << " milliseconds to run" << endl; + +// begin = chrono::high_resolution_clock::now(); +// write_xml_file("../export_packs/export2.xml", &marker_categories, &parsed_pois); +// end = chrono::high_resolution_clock::now(); +// dur = end - begin; +// ms = std::chrono::duration_cast(dur).count(); +// cout << "The xml write function took " << ms << " milliseconds to run" << endl; return 0; } From 8d6058c5653d5d29a8a2379b4dd03c1ae461f56d Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 5 Dec 2022 22:31:45 -0500 Subject: [PATCH 129/539] Reverse pref commit --- xml_converter/src/xml_converter.cpp | 70 ++++++++++++++--------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 81a031b7..46d6a671 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -332,41 +332,41 @@ int main() { auto ms = std::chrono::duration_cast(dur).count(); cout << "The parse function took " << ms << " milliseconds to run" << endl; -// begin = chrono::high_resolution_clock::now(); -// write_xml_file("../export_packs/export.xml", &marker_categories, &parsed_pois); -// end = chrono::high_resolution_clock::now(); -// dur = end - begin; -// ms = std::chrono::duration_cast(dur).count(); -// cout << "The xml write function took " << ms << " milliseconds to run" << endl; - -// begin = chrono::high_resolution_clock::now(); -// write_protobuf_file("../export_packs/export.data", &marker_categories, &parsed_pois); -// end = chrono::high_resolution_clock::now(); -// dur = end - begin; -// ms = std::chrono::duration_cast(dur).count(); -// cout << "The protobuf write function took " << ms << " milliseconds to run" << endl; - - -// //////////////////////////////////////////////////////////////////////////////////////// -// /// This section tests that the protobuf file can be parsed back to xml -// //////////////////////////////////////////////////////////////////////////////////////// - -// parsed_pois.clear(); -// marker_categories.clear(); - -// begin = chrono::high_resolution_clock::now(); -// read_protobuf_file("../export_packs/export.data", &marker_categories, &parsed_pois); -// end = chrono::high_resolution_clock::now(); -// dur = end - begin; -// ms = std::chrono::duration_cast(dur).count(); -// cout << "The protobuf read function took " << ms << " milliseconds to run" << endl; - -// begin = chrono::high_resolution_clock::now(); -// write_xml_file("../export_packs/export2.xml", &marker_categories, &parsed_pois); -// end = chrono::high_resolution_clock::now(); -// dur = end - begin; -// ms = std::chrono::duration_cast(dur).count(); -// cout << "The xml write function took " << ms << " milliseconds to run" << endl; + begin = chrono::high_resolution_clock::now(); + write_xml_file("../export_packs/export.xml", &marker_categories, &parsed_pois); + end = chrono::high_resolution_clock::now(); + dur = end - begin; + ms = std::chrono::duration_cast(dur).count(); + cout << "The xml write function took " << ms << " milliseconds to run" << endl; + + begin = chrono::high_resolution_clock::now(); + write_protobuf_file("../export_packs/export.data", &marker_categories, &parsed_pois); + end = chrono::high_resolution_clock::now(); + dur = end - begin; + ms = std::chrono::duration_cast(dur).count(); + cout << "The protobuf write function took " << ms << " milliseconds to run" << endl; + + +//////////////////////////////////////////////////////////////////////////////////////// +/// This section tests that the protobuf file can be parsed back to xml +//////////////////////////////////////////////////////////////////////////////////////// + + parsed_pois.clear(); + marker_categories.clear(); + + begin = chrono::high_resolution_clock::now(); + read_protobuf_file("../export_packs/export.data", &marker_categories, &parsed_pois); + end = chrono::high_resolution_clock::now(); + dur = end - begin; + ms = std::chrono::duration_cast(dur).count(); + cout << "The protobuf read function took " << ms << " milliseconds to run" << endl; + + begin = chrono::high_resolution_clock::now(); + write_xml_file("../export_packs/export2.xml", &marker_categories, &parsed_pois); + end = chrono::high_resolution_clock::now(); + dur = end - begin; + ms = std::chrono::duration_cast(dur).count(); + cout << "The xml write function took " << ms << " milliseconds to run" << endl; return 0; } From aea045ff951414d364d4feb53689620e8860901b Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 5 Dec 2022 22:44:45 -0500 Subject: [PATCH 130/539] Fixed clang errors on non-generated code --- xml_converter/src/attribute/bool.cpp | 4 ++-- xml_converter/src/attribute/bool.hpp | 4 ++-- xml_converter/src/attribute/color.hpp | 2 +- xml_converter/src/attribute/float.cpp | 4 ++-- xml_converter/src/attribute/int.cpp | 4 ++-- .../src/attribute/marker_category.cpp | 2 +- xml_converter/src/attribute/trail_data.cpp | 4 ++-- xml_converter/src/attribute/trail_data.hpp | 2 +- .../src/attribute/trail_data_map_id.cpp | 2 +- xml_converter/src/attribute/unique_id.cpp | 4 ++-- xml_converter/src/parseable.cpp | 1 - xml_converter/src/parseable.hpp | 1 - xml_converter/src/xml_converter.cpp | 24 +++++++++---------- 13 files changed, 27 insertions(+), 31 deletions(-) diff --git a/xml_converter/src/attribute/bool.cpp b/xml_converter/src/attribute/bool.cpp index d2fb4e65..138b7a26 100644 --- a/xml_converter/src/attribute/bool.cpp +++ b/xml_converter/src/attribute/bool.cpp @@ -48,7 +48,7 @@ string stringify_bool(bool attribute_value) { // // Converts a bool into a bool so that it can be saved to proto. //////////////////////////////////////////////////////////////////////////////// -bool to_proto_bool (bool attribute_value) { +bool to_proto_bool(bool attribute_value) { if (attribute_value) { return true; } @@ -62,7 +62,7 @@ bool to_proto_bool (bool attribute_value) { // // Converts a bool into a bool so that it can be saved to memory. //////////////////////////////////////////////////////////////////////////////// -bool from_proto_bool (bool attribute_value) { +bool from_proto_bool(bool attribute_value) { if (attribute_value) { return true; } diff --git a/xml_converter/src/attribute/bool.hpp b/xml_converter/src/attribute/bool.hpp index fc79f0b0..0f2bfef0 100644 --- a/xml_converter/src/attribute/bool.hpp +++ b/xml_converter/src/attribute/bool.hpp @@ -12,6 +12,6 @@ bool parse_bool(rapidxml::xml_attribute<>* input, std::vector* errors std::string stringify_bool(bool attribute_value); -bool to_proto_bool (bool attribute_value); +bool to_proto_bool(bool attribute_value); -bool from_proto_bool (bool attribute_value); +bool from_proto_bool(bool attribute_value); diff --git a/xml_converter/src/attribute/color.hpp b/xml_converter/src/attribute/color.hpp index 9b827b0c..4664b194 100644 --- a/xml_converter/src/attribute/color.hpp +++ b/xml_converter/src/attribute/color.hpp @@ -17,6 +17,6 @@ Color parse_color(rapidxml::xml_attribute<>* input, std::vector* erro std::string stringify_color(Color attribute_value); -waypoint::Color* to_proto_color(Color attribute_value); +waypoint::Color* to_proto_color(Color attribute_value); Color from_proto_color(waypoint::Color attribute_value); diff --git a/xml_converter/src/attribute/float.cpp b/xml_converter/src/attribute/float.cpp index 9e3861c8..232efbb0 100644 --- a/xml_converter/src/attribute/float.cpp +++ b/xml_converter/src/attribute/float.cpp @@ -29,7 +29,7 @@ std::string stringify_float(float attribute_value) { // // Returns the float so that it can be saved to proto. //////////////////////////////////////////////////////////////////////////////// -float to_proto_float(float attribute_value){ +float to_proto_float(float attribute_value) { return attribute_value; } @@ -38,6 +38,6 @@ float to_proto_float(float attribute_value){ // // Parses the float from proto. //////////////////////////////////////////////////////////////////////////////// -float from_proto_float(float attribute_value){ +float from_proto_float(float attribute_value) { return attribute_value; } \ No newline at end of file diff --git a/xml_converter/src/attribute/int.cpp b/xml_converter/src/attribute/int.cpp index d144668b..5496c148 100644 --- a/xml_converter/src/attribute/int.cpp +++ b/xml_converter/src/attribute/int.cpp @@ -46,7 +46,7 @@ string stringify_int(int attribute_value) { // // Returns the int so that it can be saved to proto. //////////////////////////////////////////////////////////////////////////////// -int to_proto_int(int attribute_value){ +int to_proto_int(int attribute_value) { return attribute_value; } @@ -55,6 +55,6 @@ int to_proto_int(int attribute_value){ // // Parses the int from proto. //////////////////////////////////////////////////////////////////////////////// -int from_proto_int(int attribute_value){ +int from_proto_int(int attribute_value) { return attribute_value; } \ No newline at end of file diff --git a/xml_converter/src/attribute/marker_category.cpp b/xml_converter/src/attribute/marker_category.cpp index 82f82c24..77c15c18 100644 --- a/xml_converter/src/attribute/marker_category.cpp +++ b/xml_converter/src/attribute/marker_category.cpp @@ -31,7 +31,7 @@ std::string stringify_marker_category(MarkerCategory attribute_value) { //////////////////////////////////////////////////////////////////////////////// // to_proto_marker_category // -// Returns a waypoint::Category so that it can be saved to proto. +// Returns a waypoint::Category so that it can be saved to proto. //////////////////////////////////////////////////////////////////////////////// waypoint::Category* to_proto_marker_category(MarkerCategory attribute_value) { waypoint::Category* category = new waypoint::Category(); diff --git a/xml_converter/src/attribute/trail_data.cpp b/xml_converter/src/attribute/trail_data.cpp index 46a96e64..7bdee572 100644 --- a/xml_converter/src/attribute/trail_data.cpp +++ b/xml_converter/src/attribute/trail_data.cpp @@ -32,7 +32,7 @@ string stringify_trail_data(TrailData attribute_value) { //////////////////////////////////////////////////////////////////////////////// // to_proto_trail_data // -// Returns a waypoint::TrailData so that it can be saved to proto. +// Returns a waypoint::TrailData so that it can be saved to proto. //////////////////////////////////////////////////////////////////////////////// waypoint::TrailData* to_proto_trail_data(TrailData attribute_value) { waypoint::TrailData* trail_data = new waypoint::TrailData(); @@ -43,7 +43,7 @@ waypoint::TrailData* to_proto_trail_data(TrailData attribute_value) { //////////////////////////////////////////////////////////////////////////////// // from_proto_trail_data // -// Returns a TrailData parsed from proto. +// Returns a TrailData parsed from proto. //////////////////////////////////////////////////////////////////////////////// TrailData from_proto_trail_data(waypoint::TrailData attribute_value) { TrailData trail_data; diff --git a/xml_converter/src/attribute/trail_data.hpp b/xml_converter/src/attribute/trail_data.hpp index 2e2ae479..038bf3f9 100644 --- a/xml_converter/src/attribute/trail_data.hpp +++ b/xml_converter/src/attribute/trail_data.hpp @@ -19,4 +19,4 @@ std::string stringify_trail_data(TrailData attribute_value); waypoint::TrailData* to_proto_trail_data(TrailData attribute_value); -TrailData from_proto_trail_data(waypoint::TrailData attribute_value); +TrailData from_proto_trail_data(waypoint::TrailData attribute_value); diff --git a/xml_converter/src/attribute/trail_data_map_id.cpp b/xml_converter/src/attribute/trail_data_map_id.cpp index be9a19d2..6d9cb2b3 100644 --- a/xml_converter/src/attribute/trail_data_map_id.cpp +++ b/xml_converter/src/attribute/trail_data_map_id.cpp @@ -34,7 +34,7 @@ string stringify_trail_data_map_id(TrailDataMapId attribute_value) { //////////////////////////////////////////////////////////////////////////////// // to_proto_trail_data // -// Returns a TrailDataMapID so that it can be saved to proto. +// Returns a TrailDataMapID so that it can be saved to proto. //////////////////////////////////////////////////////////////////////////////// // waypoint::TrailDataMapID* to_proto_trail_data(TrailDataMapID attribute_value) { // waypoint::TrailData* trail_data; diff --git a/xml_converter/src/attribute/unique_id.cpp b/xml_converter/src/attribute/unique_id.cpp index 9f4ba0c5..46627b4e 100644 --- a/xml_converter/src/attribute/unique_id.cpp +++ b/xml_converter/src/attribute/unique_id.cpp @@ -25,13 +25,13 @@ string stringify_unique_id(UniqueId attribute_value) { return base64_encode(&attribute_value.guid[0], attribute_value.guid.size()); } -waypoint::GUID* to_proto_unique_id(UniqueId attribute_value){ +waypoint::GUID* to_proto_unique_id(UniqueId attribute_value) { waypoint::GUID* guid = new waypoint::GUID(); guid->set_guid(base64_encode(&attribute_value.guid[0], attribute_value.guid.size())); return guid; } -UniqueId from_proto_unique_id(waypoint::GUID attribute_value){ +UniqueId from_proto_unique_id(waypoint::GUID attribute_value) { UniqueId unique_id; unique_id.guid = base64_decode(attribute_value.guid()); return unique_id; diff --git a/xml_converter/src/parseable.cpp b/xml_converter/src/parseable.cpp index e7407476..5a201af3 100644 --- a/xml_converter/src/parseable.cpp +++ b/xml_converter/src/parseable.cpp @@ -53,4 +53,3 @@ waypoint::Category Parseable::as_protobuf(waypoint::Category proto_Category) con throw std::runtime_error("error: Parseable::as_proto() should not be called"); return proto_Category; } - diff --git a/xml_converter/src/parseable.hpp b/xml_converter/src/parseable.hpp index 2c53a1bb..54f33a23 100644 --- a/xml_converter/src/parseable.hpp +++ b/xml_converter/src/parseable.hpp @@ -25,5 +25,4 @@ class Parseable { virtual waypoint::Trail as_protobuf(waypoint::Trail proto_Trail) const; virtual waypoint::Category as_protobuf(waypoint::Category proto_Category) const; - }; diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 46d6a671..25959e50 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -70,12 +70,12 @@ void write_protobuf_file(string proto_filepath, map* marker_ca } for (const auto& parsed_poi : *parsed_pois) { - if (parsed_poi->classname() == "POI"){ + if (parsed_poi->classname() == "POI") { waypoint::Icon proto_Icon; proto_Icon = parsed_poi->as_protobuf(proto_Icon); proto_message.add_icon()->CopyFrom(proto_Icon); } - if (parsed_poi->classname() == "Trail"){ + if (parsed_poi->classname() == "Trail") { waypoint::Trail proto_Trail; proto_Trail = parsed_poi->as_protobuf(proto_Trail); proto_message.add_trail()->CopyFrom(proto_Trail); @@ -85,7 +85,6 @@ void write_protobuf_file(string proto_filepath, map* marker_ca outfile.close(); } - Category* get_category(rapidxml::xml_node<>* node, map* marker_categories, vector* errors) { // TODO: This is a slow linear search, replace with something faster. // maybe use data from already parsed node instead of searching for @@ -175,7 +174,7 @@ vector parse_proto_pois(waypoint::Waypoint proto_message) { for (int i = 0; i < proto_message.trail_size(); i++) { Trail* trail = new Trail(); trail->parse_protobuf(proto_message.trail(i)); - markers.push_back(trail); + markers.push_back(trail); } return markers; } @@ -194,7 +193,7 @@ void parse_marker_categories(rapidxml::xml_node<>* node, map* errors->push_back(new XMLNodeNameError("Unknown MarkerCategory Tag", node)); } } -void parse_proto_marker_categories(::waypoint::Category proto_category, map* marker_categories){ +void parse_proto_marker_categories(::waypoint::Category proto_category, map* marker_categories) { string name = proto_category.name(); Category* this_category = &(*marker_categories)[name]; this_category->parse_protobuf(proto_category); @@ -245,7 +244,7 @@ void parse_xml_file(string xml_filepath, map* marker_categorie } } -void read_protobuf_file(string proto_filepath, map* marker_categories, vector* parsed_pois){ +void read_protobuf_file(string proto_filepath, map* marker_categories, vector* parsed_pois) { fstream infile; waypoint::Waypoint proto_message; @@ -300,9 +299,9 @@ void convert_taco_directory(string directory, map* marker_cate void test_proto() { waypoint::Category testcategory; testcategory.set_display_name("TEST"); - if (testcategory.name() != ""){ - cout << "Error in test_proto" << endl; - } + if (testcategory.name() != "") { + cout << "Error in test_proto" << endl; + } string output = testcategory.display_name(); if (output != "TEST") { cout << "Error in test_proto" << endl; @@ -346,10 +345,9 @@ int main() { ms = std::chrono::duration_cast(dur).count(); cout << "The protobuf write function took " << ms << " milliseconds to run" << endl; - -//////////////////////////////////////////////////////////////////////////////////////// -/// This section tests that the protobuf file can be parsed back to xml -//////////////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////////////// + /// This section tests that the protobuf file can be parsed back to xml + //////////////////////////////////////////////////////////////////////////////////////// parsed_pois.clear(); marker_categories.clear(); From f24e982e6353db60688b1b7f0a564f290b070b83 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 5 Dec 2022 23:44:26 -0500 Subject: [PATCH 131/539] Fixing all Clang errors --- xml_converter/generators/code_generator.py | 2 + .../cpp_templates/class_template.cpp | 63 +++--- .../cpp_templates/class_template.hpp | 3 +- .../cpp_templates/compoundvalue.cpp | 7 +- .../generators/cpp_templates/enum.cpp | 7 +- .../cpp_templates/multiflagvalue.cpp | 6 +- .../src/attribute/cull_chirality_gen.cpp | 7 +- .../src/attribute/euler_rotation_gen.cpp | 7 +- .../src/attribute/festival_filter_gen.cpp | 6 +- .../src/attribute/map_type_filter_gen.cpp | 6 +- .../src/attribute/mount_filter_gen.cpp | 6 +- xml_converter/src/attribute/position_gen.cpp | 7 +- .../src/attribute/profession_filter_gen.cpp | 6 +- .../src/attribute/reset_behavior_gen.cpp | 7 +- .../attribute/specialization_filter_gen.cpp | 6 +- .../src/attribute/species_filter_gen.cpp | 6 +- xml_converter/src/category_gen.cpp | 29 +-- xml_converter/src/category_gen.hpp | 4 +- xml_converter/src/icon_gen.cpp | 200 ++---------------- xml_converter/src/icon_gen.hpp | 3 +- xml_converter/src/trail_gen.cpp | 122 ++--------- xml_converter/src/trail_gen.hpp | 3 +- 22 files changed, 128 insertions(+), 385 deletions(-) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 1a4a0edb..49a4cf4c 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -431,6 +431,7 @@ def generate_cpp_variable_data( cpp_includes.hpp_absolute_includes.add("vector") cpp_includes.hpp_relative_includes.add("rapidxml-1.13/rapidxml.hpp") cpp_includes.hpp_relative_includes.add("parseable.hpp") + cpp_includes.hpp_relative_includes.add("waypoint.pb.h") cpp_includes.hpp_forward_declarations.add("XMLError") cpp_includes.cpp_absolute_includes.add("iosfwd") @@ -438,6 +439,7 @@ def generate_cpp_variable_data( cpp_includes.cpp_relative_includes.add("rapidxml-1.13/rapidxml.hpp") cpp_includes.cpp_relative_includes.add("string_helper.hpp") cpp_includes.cpp_relative_includes.add("rapid_helpers.hpp") + cpp_includes.cpp_relative_includes.add("waypoint.pb.h") if (doc_type == "Category"): cpp_includes.hpp_absolute_includes.add("map") diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index 09dd8f66..8b9364ef 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -1,7 +1,7 @@ -#include #include "{{cpp_class_header}}_gen.hpp" -#include "waypoint.pb.h" +#include +#include {% for absolute_include in cpp_includes.sorted_cpp_absolute_includes() %} #include <{{absolute_include}}> {% endfor %} @@ -123,67 +123,66 @@ waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf(waypoint::{{cpp_class}} proto {% if cpp_class == "Icon": %} waypoint::Trigger* trigger = new waypoint::Trigger(); bool set_trigger = false; - {% endif %} -{%for attribute_variable in attribute_variables%} + {% endif %} + {%for attribute_variable in attribute_variables%} {% if (attribute_variable.is_trigger == true)%} - {% if (attribute_variable.attribute_type == "Custom")%} + {% if (attribute_variable.attribute_type == "Custom")%} if (this->{{attribute_variable.attribute_name}}_is_set) { trigger->set_allocated_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); set_trigger = true; } - {% else: %} + {% else: %} if (this->{{attribute_variable.attribute_name}}_is_set) { trigger->set_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); set_trigger = true; } - {% endif %} + {% endif %} {% else: %} - {% if (attribute_variable.attribute_type == "Custom" and attribute_variable.class_name == "TrailDataMapId")%} + {% if (attribute_variable.attribute_type == "Custom" and attribute_variable.class_name == "TrailDataMapId")%} //TODO: TrailDataMapID is different - {% elif (attribute_variable.attribute_type == "Enum")%} + {% elif (attribute_variable.attribute_type == "Enum")%} if (this->{{attribute_variable.attribute_name}}_is_set) { - proto_{{cpp_class_header}}.set_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); + proto_{{cpp_class_header}}.set_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); } - {% elif (attribute_variable.attribute_type in ["MultiflagValue", "CompoundValue", "Custom"]) and attribute_variable.is_child == false%} + {% elif (attribute_variable.attribute_type in ["MultiflagValue", "CompoundValue", "Custom"]) and attribute_variable.is_child == false%} if (this->{{attribute_variable.attribute_name}}_is_set) { proto_{{cpp_class_header}}.set_allocated_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); } - {% elif attribute_variable.is_child == true%} - {% else: %} + {% elif attribute_variable.is_child == true%} + {% else: %} if (this->{{attribute_variable.attribute_name}}_is_set) { proto_{{cpp_class_header}}.set_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); } - {% endif %} - {% endif %} -{% endfor %} -{% if cpp_class == "Icon": %} - if (set_trigger){ - proto_{{cpp_class_header}}.set_allocated_trigger(trigger); + {% endif %} + {% endif %} + {% endfor %} + {% if cpp_class == "Icon": %} + if (set_trigger) { + proto_{{cpp_class_header}}.set_allocated_trigger(trigger); } -{% endif %} + {% endif %} {% if cpp_class == "Category": %} for (const auto& [key, val] : this->children) { waypoint::{{cpp_class}} proto_{{cpp_class_header}}_child; proto_{{cpp_class_header}}_child = val.as_protobuf(proto_{{cpp_class_header}}_child); proto_{{cpp_class_header}}.add_children()->CopyFrom(proto_{{cpp_class_header}}_child); } -{% endif %} + {% endif %} return proto_{{cpp_class_header}}; } - -void {{cpp_class}}::parse_protobuf(waypoint::{{cpp_class}} proto_{{cpp_class_header}}){ + +void {{cpp_class}}::parse_protobuf(waypoint::{{cpp_class}} proto_{{cpp_class_header}}) { {% if cpp_class == "Icon": %} waypoint::Trigger trigger = proto_{{cpp_class_header}}.trigger(); - {% endif %} - -{%for attribute_variable in attribute_variables%} + {% endif %} + {%for attribute_variable in attribute_variables%} {% if (attribute_variable.is_trigger == true)%} {% if (attribute_variable.attribute_type == "Custom")%} if (trigger.has_{{attribute_variable.protobuf_field}}()) { this->{{attribute_variable.attribute_name}} = from_proto_{{attribute_variable.class_name}}(trigger.{{attribute_variable.protobuf_field}}()); this->{{attribute_variable.attribute_name}}_is_set = true; } - {% elif attribute_variable.class_name == "string" %} + {% elif attribute_variable.class_name == "string" %} if (trigger.{{attribute_variable.protobuf_field}}() != "") { this->{{attribute_variable.attribute_name}} = from_proto_{{attribute_variable.class_name}}(trigger.{{attribute_variable.protobuf_field}}()); this->{{attribute_variable.attribute_name}}_is_set = true; @@ -200,14 +199,14 @@ void {{cpp_class}}::parse_protobuf(waypoint::{{cpp_class}} proto_{{cpp_class_hea if (proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}() != 0) { this->{{attribute_variable.attribute_name}} = from_proto_{{attribute_variable.class_name}}(proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}()); this->{{attribute_variable.attribute_name}}_is_set = true; - } + } {% elif (attribute_variable.attribute_type in ["MultiflagValue", "CompoundValue", "Custom"]) and attribute_variable.is_child == false%} if (proto_{{cpp_class_header}}.has_{{attribute_variable.protobuf_field}}()) { this->{{attribute_variable.attribute_name}} = from_proto_{{attribute_variable.class_name}}(proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}()); this->{{attribute_variable.attribute_name}}_is_set = true; - } + } {% elif attribute_variable.is_child == true%} - {% elif attribute_variable.class_name == "string" %} + {% elif attribute_variable.class_name == "string" %} if (proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}() != "") { this->{{attribute_variable.attribute_name}} = from_proto_{{attribute_variable.class_name}}(proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}()); this->{{attribute_variable.attribute_name}}_is_set = true; @@ -217,7 +216,7 @@ void {{cpp_class}}::parse_protobuf(waypoint::{{cpp_class}} proto_{{cpp_class_hea this->{{attribute_variable.attribute_name}} = from_proto_{{attribute_variable.class_name}}(proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}()); this->{{attribute_variable.attribute_name}}_is_set = true; } - {% endif %} - {% endif %} + {% endif %} + {% endif %} {% endfor %} } diff --git a/xml_converter/generators/cpp_templates/class_template.hpp b/xml_converter/generators/cpp_templates/class_template.hpp index 99a50cb9..5d38d078 100644 --- a/xml_converter/generators/cpp_templates/class_template.hpp +++ b/xml_converter/generators/cpp_templates/class_template.hpp @@ -28,13 +28,12 @@ class {{cpp_class}} : public Parseable { Icon default_icon; Trail default_trail; - void init_from_xml(rapidxml::xml_node<>* node, std::vector* errors); {% endif %} virtual std::vector as_xml() const; virtual std::string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors); - waypoint::{{cpp_class}} as_protobuf(waypoint::{{cpp_class}}) const; + waypoint::{{cpp_class}} as_protobuf(waypoint::{{cpp_class}}) const; void parse_protobuf(waypoint::{{cpp_class}} proto_{{cpp_class_header}}); {% if attributes_of_type_marker_category %} bool validate_attributes_of_type_marker_category(); diff --git a/xml_converter/generators/cpp_templates/compoundvalue.cpp b/xml_converter/generators/cpp_templates/compoundvalue.cpp index bb9d4211..32f04136 100644 --- a/xml_converter/generators/cpp_templates/compoundvalue.cpp +++ b/xml_converter/generators/cpp_templates/compoundvalue.cpp @@ -7,6 +7,7 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" +#include "waypoint.pb.h" using namespace std; @@ -39,8 +40,8 @@ string stringify_{{attribute_name}}({{class_name}} attribute_value) { return output; } {% endif %} - -waypoint::{{class_name}}* to_proto_{{attribute_name}} ({{class_name}} attribute_value) { + +waypoint::{{class_name}}* to_proto_{{attribute_name}}({{class_name}} attribute_value) { waypoint::{{class_name}}* proto_{{attribute_name}} = new waypoint::{{class_name}}(); {% for attribute_variable in attribute_variables %} proto_{{attribute_name}}->set_{{attribute_variable.protobuf_field}}(attribute_value.{{attribute_variable.attribute_name}}); @@ -48,7 +49,7 @@ waypoint::{{class_name}}* to_proto_{{attribute_name}} ({{class_name}} attribute_ return proto_{{attribute_name}}; } -{{class_name}} from_proto_{{attribute_name}} (waypoint::{{class_name}} proto_{{attribute_name}}) { +{{class_name}} from_proto_{{attribute_name}}(waypoint::{{class_name}} proto_{{attribute_name}}) { {{class_name}} {{attribute_name}}; {% for attribute_variable in attribute_variables: %} {{attribute_name}}.{{attribute_variable.attribute_name}} = proto_{{attribute_name}}.{{attribute_variable.protobuf_field}}(); diff --git a/xml_converter/generators/cpp_templates/enum.cpp b/xml_converter/generators/cpp_templates/enum.cpp index d71994a6..c95084e6 100644 --- a/xml_converter/generators/cpp_templates/enum.cpp +++ b/xml_converter/generators/cpp_templates/enum.cpp @@ -7,6 +7,7 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" +#include "waypoint.pb.h" using namespace std; @@ -52,7 +53,7 @@ string stringify_{{attribute_name}}({{class_name}} attribute_value) { } } -waypoint::{{class_name}} to_proto_{{attribute_name}} ({{class_name}} attribute_value) { +waypoint::{{class_name}} to_proto_{{attribute_name}}({{class_name}} attribute_value) { waypoint::{{class_name}} proto_{{attribute_name}}; {% for n, attribute_variable in enumerate(attribute_variables) %} {% for i, value in enumerate(attribute_variable.xml_fields) %} @@ -73,12 +74,12 @@ waypoint::{{class_name}} to_proto_{{attribute_name}} ({{class_name}} attribute_v return proto_{{attribute_name}}; } -{{class_name}} from_proto_{{attribute_name}} (waypoint::{{class_name}} proto_{{attribute_name}}) { +{{class_name}} from_proto_{{attribute_name}}(waypoint::{{class_name}} proto_{{attribute_name}}) { {{class_name}} {{attribute_name}}; {% for n, attribute_variable in enumerate(attribute_variables) %} {% for i, value in enumerate(attribute_variable.xml_fields) %} {% if i == 0 and n == 0: %} - if (proto_{{attribute_name}} == waypoint::{{class_name}}::{{attribute_variable.attribute_name}}){ + if (proto_{{attribute_name}} == waypoint::{{class_name}}::{{attribute_variable.attribute_name}}) { {{attribute_name}} = {{class_name}}::{{attribute_variable.attribute_name}}; } {% else: %} diff --git a/xml_converter/generators/cpp_templates/multiflagvalue.cpp b/xml_converter/generators/cpp_templates/multiflagvalue.cpp index 0e5493af..06e7b58d 100644 --- a/xml_converter/generators/cpp_templates/multiflagvalue.cpp +++ b/xml_converter/generators/cpp_templates/multiflagvalue.cpp @@ -1,4 +1,3 @@ -#include #include "{{attribute_name}}_gen.hpp" #include @@ -8,6 +7,7 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" +#include "waypoint.pb.h" using namespace std; @@ -52,7 +52,7 @@ string stringify_{{attribute_name}}({{class_name}} attribute_value) { return output; } -waypoint::{{class_name}}* to_proto_{{attribute_name}} ({{class_name}} attribute_value) { +waypoint::{{class_name}}* to_proto_{{attribute_name}}({{class_name}} attribute_value) { waypoint::{{class_name}}* proto_{{attribute_name}} = new waypoint::{{class_name}}(); {% for n, attribute_variable in enumerate(attribute_variables)%} if (attribute_value.{{attribute_variable.attribute_name}} == true) { @@ -62,7 +62,7 @@ waypoint::{{class_name}}* to_proto_{{attribute_name}} ({{class_name}} attribute_ return proto_{{attribute_name}}; } -{{class_name}} from_proto_{{attribute_name}} (waypoint::{{class_name}} proto_{{attribute_name}}) { +{{class_name}} from_proto_{{attribute_name}}(waypoint::{{class_name}} proto_{{attribute_name}}) { {{class_name}} {{attribute_name}}; {% for n, attribute_variable in enumerate(attribute_variables)%} if (proto_{{attribute_name}}.{{attribute_variable.attribute_name}}() == true) { diff --git a/xml_converter/src/attribute/cull_chirality_gen.cpp b/xml_converter/src/attribute/cull_chirality_gen.cpp index 2ea19e2a..4c9589b8 100644 --- a/xml_converter/src/attribute/cull_chirality_gen.cpp +++ b/xml_converter/src/attribute/cull_chirality_gen.cpp @@ -7,6 +7,7 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" +#include "waypoint.pb.h" using namespace std; @@ -44,7 +45,7 @@ string stringify_cull_chirality(CullChirality attribute_value) { } } -waypoint::CullChirality to_proto_cull_chirality (CullChirality attribute_value) { +waypoint::CullChirality to_proto_cull_chirality(CullChirality attribute_value) { waypoint::CullChirality proto_cull_chirality; if (attribute_value == CullChirality::none) { proto_cull_chirality = waypoint::CullChirality::none; @@ -61,9 +62,9 @@ waypoint::CullChirality to_proto_cull_chirality (CullChirality attribute_value) return proto_cull_chirality; } -CullChirality from_proto_cull_chirality (waypoint::CullChirality proto_cull_chirality) { +CullChirality from_proto_cull_chirality(waypoint::CullChirality proto_cull_chirality) { CullChirality cull_chirality; - if (proto_cull_chirality == waypoint::CullChirality::none){ + if (proto_cull_chirality == waypoint::CullChirality::none) { cull_chirality = CullChirality::none; } else if (proto_cull_chirality == waypoint::CullChirality::clockwise) { diff --git a/xml_converter/src/attribute/euler_rotation_gen.cpp b/xml_converter/src/attribute/euler_rotation_gen.cpp index cd311753..53724e92 100644 --- a/xml_converter/src/attribute/euler_rotation_gen.cpp +++ b/xml_converter/src/attribute/euler_rotation_gen.cpp @@ -7,6 +7,7 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" +#include "waypoint.pb.h" using namespace std; @@ -33,8 +34,8 @@ string stringify_euler_rotation(EulerRotation attribute_value) { output = output + "," + to_string(attribute_value.z_rotation); return output; } - -waypoint::EulerRotation* to_proto_euler_rotation (EulerRotation attribute_value) { + +waypoint::EulerRotation* to_proto_euler_rotation(EulerRotation attribute_value) { waypoint::EulerRotation* proto_euler_rotation = new waypoint::EulerRotation(); proto_euler_rotation->set_x(attribute_value.x_rotation); proto_euler_rotation->set_y(attribute_value.y_rotation); @@ -42,7 +43,7 @@ waypoint::EulerRotation* to_proto_euler_rotation (EulerRotation attribute_value) return proto_euler_rotation; } -EulerRotation from_proto_euler_rotation (waypoint::EulerRotation proto_euler_rotation) { +EulerRotation from_proto_euler_rotation(waypoint::EulerRotation proto_euler_rotation) { EulerRotation euler_rotation; euler_rotation.x_rotation = proto_euler_rotation.x(); euler_rotation.y_rotation = proto_euler_rotation.y(); diff --git a/xml_converter/src/attribute/festival_filter_gen.cpp b/xml_converter/src/attribute/festival_filter_gen.cpp index d7617c76..a1ba2f06 100644 --- a/xml_converter/src/attribute/festival_filter_gen.cpp +++ b/xml_converter/src/attribute/festival_filter_gen.cpp @@ -1,4 +1,3 @@ -#include #include "festival_filter_gen.hpp" #include @@ -8,6 +7,7 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" +#include "waypoint.pb.h" using namespace std; @@ -83,7 +83,7 @@ string stringify_festival_filter(FestivalFilter attribute_value) { return output; } -waypoint::FestivalFilter* to_proto_festival_filter (FestivalFilter attribute_value) { +waypoint::FestivalFilter* to_proto_festival_filter(FestivalFilter attribute_value) { waypoint::FestivalFilter* proto_festival_filter = new waypoint::FestivalFilter(); if (attribute_value.dragonbash == true) { proto_festival_filter->set_dragonbash(true); @@ -109,7 +109,7 @@ waypoint::FestivalFilter* to_proto_festival_filter (FestivalFilter attribute_val return proto_festival_filter; } -FestivalFilter from_proto_festival_filter (waypoint::FestivalFilter proto_festival_filter) { +FestivalFilter from_proto_festival_filter(waypoint::FestivalFilter proto_festival_filter) { FestivalFilter festival_filter; if (proto_festival_filter.dragonbash() == true) { festival_filter.dragonbash = true; diff --git a/xml_converter/src/attribute/map_type_filter_gen.cpp b/xml_converter/src/attribute/map_type_filter_gen.cpp index 5165ed35..951e9564 100644 --- a/xml_converter/src/attribute/map_type_filter_gen.cpp +++ b/xml_converter/src/attribute/map_type_filter_gen.cpp @@ -1,4 +1,3 @@ -#include #include "map_type_filter_gen.hpp" #include @@ -8,6 +7,7 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" +#include "waypoint.pb.h" using namespace std; @@ -199,7 +199,7 @@ string stringify_map_type_filter(MapTypeFilter attribute_value) { return output; } -waypoint::MapTypeFilter* to_proto_map_type_filter (MapTypeFilter attribute_value) { +waypoint::MapTypeFilter* to_proto_map_type_filter(MapTypeFilter attribute_value) { waypoint::MapTypeFilter* proto_map_type_filter = new waypoint::MapTypeFilter(); if (attribute_value.unknown_map == true) { proto_map_type_filter->set_unknown_map(true); @@ -276,7 +276,7 @@ waypoint::MapTypeFilter* to_proto_map_type_filter (MapTypeFilter attribute_value return proto_map_type_filter; } -MapTypeFilter from_proto_map_type_filter (waypoint::MapTypeFilter proto_map_type_filter) { +MapTypeFilter from_proto_map_type_filter(waypoint::MapTypeFilter proto_map_type_filter) { MapTypeFilter map_type_filter; if (proto_map_type_filter.unknown_map() == true) { map_type_filter.unknown_map = true; diff --git a/xml_converter/src/attribute/mount_filter_gen.cpp b/xml_converter/src/attribute/mount_filter_gen.cpp index 2516007e..350df7c8 100644 --- a/xml_converter/src/attribute/mount_filter_gen.cpp +++ b/xml_converter/src/attribute/mount_filter_gen.cpp @@ -1,4 +1,3 @@ -#include #include "mount_filter_gen.hpp" #include @@ -8,6 +7,7 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" +#include "waypoint.pb.h" using namespace std; @@ -101,7 +101,7 @@ string stringify_mount_filter(MountFilter attribute_value) { return output; } -waypoint::MountFilter* to_proto_mount_filter (MountFilter attribute_value) { +waypoint::MountFilter* to_proto_mount_filter(MountFilter attribute_value) { waypoint::MountFilter* proto_mount_filter = new waypoint::MountFilter(); if (attribute_value.raptor == true) { proto_mount_filter->set_raptor(true); @@ -136,7 +136,7 @@ waypoint::MountFilter* to_proto_mount_filter (MountFilter attribute_value) { return proto_mount_filter; } -MountFilter from_proto_mount_filter (waypoint::MountFilter proto_mount_filter) { +MountFilter from_proto_mount_filter(waypoint::MountFilter proto_mount_filter) { MountFilter mount_filter; if (proto_mount_filter.raptor() == true) { mount_filter.raptor = true; diff --git a/xml_converter/src/attribute/position_gen.cpp b/xml_converter/src/attribute/position_gen.cpp index 5ad79196..fbb674af 100644 --- a/xml_converter/src/attribute/position_gen.cpp +++ b/xml_converter/src/attribute/position_gen.cpp @@ -7,6 +7,7 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" +#include "waypoint.pb.h" using namespace std; @@ -26,8 +27,8 @@ Position parse_position(rapidxml::xml_attribute<>* input, vector*) { } return position; } - -waypoint::Position* to_proto_position (Position attribute_value) { + +waypoint::Position* to_proto_position(Position attribute_value) { waypoint::Position* proto_position = new waypoint::Position(); proto_position->set_x(attribute_value.x_position); proto_position->set_y(attribute_value.y_position); @@ -35,7 +36,7 @@ waypoint::Position* to_proto_position (Position attribute_value) { return proto_position; } -Position from_proto_position (waypoint::Position proto_position) { +Position from_proto_position(waypoint::Position proto_position) { Position position; position.x_position = proto_position.x(); position.y_position = proto_position.y(); diff --git a/xml_converter/src/attribute/profession_filter_gen.cpp b/xml_converter/src/attribute/profession_filter_gen.cpp index ea6b981d..b61cd5b4 100644 --- a/xml_converter/src/attribute/profession_filter_gen.cpp +++ b/xml_converter/src/attribute/profession_filter_gen.cpp @@ -1,4 +1,3 @@ -#include #include "profession_filter_gen.hpp" #include @@ -8,6 +7,7 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" +#include "waypoint.pb.h" using namespace std; @@ -94,7 +94,7 @@ string stringify_profession_filter(ProfessionFilter attribute_value) { return output; } -waypoint::ProfessionFilter* to_proto_profession_filter (ProfessionFilter attribute_value) { +waypoint::ProfessionFilter* to_proto_profession_filter(ProfessionFilter attribute_value) { waypoint::ProfessionFilter* proto_profession_filter = new waypoint::ProfessionFilter(); if (attribute_value.guardian == true) { proto_profession_filter->set_guardian(true); @@ -126,7 +126,7 @@ waypoint::ProfessionFilter* to_proto_profession_filter (ProfessionFilter attribu return proto_profession_filter; } -ProfessionFilter from_proto_profession_filter (waypoint::ProfessionFilter proto_profession_filter) { +ProfessionFilter from_proto_profession_filter(waypoint::ProfessionFilter proto_profession_filter) { ProfessionFilter profession_filter; if (proto_profession_filter.guardian() == true) { profession_filter.guardian = true; diff --git a/xml_converter/src/attribute/reset_behavior_gen.cpp b/xml_converter/src/attribute/reset_behavior_gen.cpp index dd2c6929..6c22ffc3 100644 --- a/xml_converter/src/attribute/reset_behavior_gen.cpp +++ b/xml_converter/src/attribute/reset_behavior_gen.cpp @@ -7,6 +7,7 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" +#include "waypoint.pb.h" using namespace std; @@ -134,7 +135,7 @@ string stringify_reset_behavior(ResetBehavior attribute_value) { } } -waypoint::ResetBehavior to_proto_reset_behavior (ResetBehavior attribute_value) { +waypoint::ResetBehavior to_proto_reset_behavior(ResetBehavior attribute_value) { waypoint::ResetBehavior proto_reset_behavior; if (attribute_value == ResetBehavior::always_visible) { proto_reset_behavior = waypoint::ResetBehavior::always_visible; @@ -196,9 +197,9 @@ waypoint::ResetBehavior to_proto_reset_behavior (ResetBehavior attribute_value) return proto_reset_behavior; } -ResetBehavior from_proto_reset_behavior (waypoint::ResetBehavior proto_reset_behavior) { +ResetBehavior from_proto_reset_behavior(waypoint::ResetBehavior proto_reset_behavior) { ResetBehavior reset_behavior; - if (proto_reset_behavior == waypoint::ResetBehavior::always_visible){ + if (proto_reset_behavior == waypoint::ResetBehavior::always_visible) { reset_behavior = ResetBehavior::always_visible; } else if (proto_reset_behavior == waypoint::ResetBehavior::always_visible) { diff --git a/xml_converter/src/attribute/specialization_filter_gen.cpp b/xml_converter/src/attribute/specialization_filter_gen.cpp index 25b24e1d..5a7fcfca 100644 --- a/xml_converter/src/attribute/specialization_filter_gen.cpp +++ b/xml_converter/src/attribute/specialization_filter_gen.cpp @@ -1,4 +1,3 @@ -#include #include "specialization_filter_gen.hpp" #include @@ -8,6 +7,7 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" +#include "waypoint.pb.h" using namespace std; @@ -616,7 +616,7 @@ string stringify_specialization_filter(SpecializationFilter attribute_value) { return output; } -waypoint::SpecializationFilter* to_proto_specialization_filter (SpecializationFilter attribute_value) { +waypoint::SpecializationFilter* to_proto_specialization_filter(SpecializationFilter attribute_value) { waypoint::SpecializationFilter* proto_specialization_filter = new waypoint::SpecializationFilter(); if (attribute_value.elementalist_tempest == true) { proto_specialization_filter->set_elementalist_tempest(true); @@ -837,7 +837,7 @@ waypoint::SpecializationFilter* to_proto_specialization_filter (SpecializationFi return proto_specialization_filter; } -SpecializationFilter from_proto_specialization_filter (waypoint::SpecializationFilter proto_specialization_filter) { +SpecializationFilter from_proto_specialization_filter(waypoint::SpecializationFilter proto_specialization_filter) { SpecializationFilter specialization_filter; if (proto_specialization_filter.elementalist_tempest() == true) { specialization_filter.elementalist_tempest = true; diff --git a/xml_converter/src/attribute/species_filter_gen.cpp b/xml_converter/src/attribute/species_filter_gen.cpp index a0ff9903..4a20f4b0 100644 --- a/xml_converter/src/attribute/species_filter_gen.cpp +++ b/xml_converter/src/attribute/species_filter_gen.cpp @@ -1,4 +1,3 @@ -#include #include "species_filter_gen.hpp" #include @@ -8,6 +7,7 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" +#include "waypoint.pb.h" using namespace std; @@ -66,7 +66,7 @@ string stringify_species_filter(SpeciesFilter attribute_value) { return output; } -waypoint::SpeciesFilter* to_proto_species_filter (SpeciesFilter attribute_value) { +waypoint::SpeciesFilter* to_proto_species_filter(SpeciesFilter attribute_value) { waypoint::SpeciesFilter* proto_species_filter = new waypoint::SpeciesFilter(); if (attribute_value.asura == true) { proto_species_filter->set_asura(true); @@ -86,7 +86,7 @@ waypoint::SpeciesFilter* to_proto_species_filter (SpeciesFilter attribute_value) return proto_species_filter; } -SpeciesFilter from_proto_species_filter (waypoint::SpeciesFilter proto_species_filter) { +SpeciesFilter from_proto_species_filter(waypoint::SpeciesFilter proto_species_filter) { SpeciesFilter species_filter; if (proto_species_filter.asura() == true) { species_filter.asura = true; diff --git a/xml_converter/src/category_gen.cpp b/xml_converter/src/category_gen.cpp index eff55c3a..26c4222b 100644 --- a/xml_converter/src/category_gen.cpp +++ b/xml_converter/src/category_gen.cpp @@ -1,7 +1,7 @@ -#include #include "category_gen.hpp" -#include "waypoint.pb.h" +#include +#include #include #include #include @@ -11,6 +11,7 @@ #include "rapid_helpers.hpp" #include "rapidxml-1.13/rapidxml.hpp" #include "string_helper.hpp" +#include "waypoint.pb.h" using namespace std; @@ -94,28 +95,21 @@ vector Category::as_xml() const { } waypoint::Category Category::as_protobuf(waypoint::Category proto_category) const { - if (this->default_visibility_is_set) { proto_category.set_default_visibility(to_proto_bool(this->default_visibility)); } - if (this->display_name_is_set) { proto_category.set_display_name(to_proto_string(this->display_name)); } - if (this->is_separator_is_set) { proto_category.set_is_separator(to_proto_bool(this->is_separator)); } - if (this->name_is_set) { proto_category.set_name(to_proto_string(this->name)); } - if (this->tooltip_description_is_set) { proto_category.set_tip_description(to_proto_string(this->tooltip_description)); } - - for (const auto& [key, val] : this->children) { waypoint::Category proto_category_child; proto_category_child = val.as_protobuf(proto_category_child); @@ -123,41 +117,26 @@ waypoint::Category Category::as_protobuf(waypoint::Category proto_category) cons } return proto_category; } - -void Category::parse_protobuf(waypoint::Category proto_category){ - +void Category::parse_protobuf(waypoint::Category proto_category) { if (proto_category.default_visibility() != 0) { this->default_visibility = from_proto_bool(proto_category.default_visibility()); this->default_visibility_is_set = true; } - - - if (proto_category.display_name() != "") { this->display_name = from_proto_string(proto_category.display_name()); this->display_name_is_set = true; } - - if (proto_category.is_separator() != 0) { this->is_separator = from_proto_bool(proto_category.is_separator()); this->is_separator_is_set = true; } - - - if (proto_category.name() != "") { this->name = from_proto_string(proto_category.name()); this->name_is_set = true; } - - - if (proto_category.tip_description() != "") { this->tooltip_description = from_proto_string(proto_category.tip_description()); this->tooltip_description_is_set = true; } - - } diff --git a/xml_converter/src/category_gen.hpp b/xml_converter/src/category_gen.hpp index ac667478..fe96fb39 100644 --- a/xml_converter/src/category_gen.hpp +++ b/xml_converter/src/category_gen.hpp @@ -8,6 +8,7 @@ #include "parseable.hpp" #include "rapidxml-1.13/rapidxml.hpp" #include "trail_gen.hpp" +#include "waypoint.pb.h" class XMLError; @@ -27,11 +28,10 @@ class Category : public Parseable { Icon default_icon; Trail default_trail; - void init_from_xml(rapidxml::xml_node<>* node, std::vector* errors); virtual std::vector as_xml() const; virtual std::string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors); - waypoint::Category as_protobuf(waypoint::Category) const; + waypoint::Category as_protobuf(waypoint::Category) const; void parse_protobuf(waypoint::Category proto_category); }; diff --git a/xml_converter/src/icon_gen.cpp b/xml_converter/src/icon_gen.cpp index fd1c1fe3..97ea9785 100644 --- a/xml_converter/src/icon_gen.cpp +++ b/xml_converter/src/icon_gen.cpp @@ -1,7 +1,7 @@ -#include #include "icon_gen.hpp" -#include "waypoint.pb.h" +#include +#include #include #include @@ -12,6 +12,7 @@ #include "rapid_helpers.hpp" #include "rapidxml-1.13/rapidxml.hpp" #include "string_helper.hpp" +#include "waypoint.pb.h" using namespace std; @@ -463,520 +464,363 @@ vector Icon::as_xml() const { waypoint::Icon Icon::as_protobuf(waypoint::Icon proto_icon) const { waypoint::Trigger* trigger = new waypoint::Trigger(); bool set_trigger = false; - if (this->achievement_bitmask_is_set) { proto_icon.set_achievement_bit(to_proto_int(this->achievement_bitmask)); } - if (this->achievement_id_is_set) { proto_icon.set_achievement_id(to_proto_int(this->achievement_id)); } - if (this->alpha_is_set) { proto_icon.set_alpha(to_proto_float(this->alpha)); } - if (this->auto_trigger_is_set) { trigger->set_auto_trigger(to_proto_bool(this->auto_trigger)); set_trigger = true; } - if (this->bounce_delay_is_set) { trigger->set_bounce_delay(to_proto_float(this->bounce_delay)); set_trigger = true; } - if (this->bounce_duration_is_set) { trigger->set_bounce_duration(to_proto_float(this->bounce_duration)); set_trigger = true; } - if (this->bounce_height_is_set) { trigger->set_bounce_height(to_proto_float(this->bounce_height)); set_trigger = true; } - if (this->can_fade_is_set) { proto_icon.set_can_fade(to_proto_bool(this->can_fade)); } - if (this->category_is_set) { proto_icon.set_allocated_category(to_proto_marker_category(this->category)); } - if (this->color_is_set) { proto_icon.set_allocated_color(to_proto_color(this->color)); } - if (this->copy_clipboard_is_set) { trigger->set_action_copy_clipboard(to_proto_string(this->copy_clipboard)); set_trigger = true; } - if (this->copy_message_is_set) { trigger->set_action_copy_message(to_proto_string(this->copy_message)); set_trigger = true; } - if (this->cull_chirality_is_set) { - proto_icon.set_cull_chirality(to_proto_cull_chirality(this->cull_chirality)); + proto_icon.set_cull_chirality(to_proto_cull_chirality(this->cull_chirality)); } - if (this->distance_fade_end_is_set) { proto_icon.set_distance_fade_end(to_proto_float(this->distance_fade_end)); } - if (this->distance_fade_start_is_set) { proto_icon.set_distance_fade_start(to_proto_float(this->distance_fade_start)); } - if (this->euler_rotation_is_set) { proto_icon.set_allocated_euler_rotation(to_proto_euler_rotation(this->euler_rotation)); } - if (this->festival_filter_is_set) { proto_icon.set_allocated_festival_filter(to_proto_festival_filter(this->festival_filter)); } - if (this->guid_is_set) { proto_icon.set_allocated_guid(to_proto_unique_id(this->guid)); } - if (this->has_countdown_is_set) { trigger->set_has_countdown(to_proto_bool(this->has_countdown)); set_trigger = true; } - if (this->heightoffset_is_set) { proto_icon.set_height_offset(to_proto_float(this->heightoffset)); } - if (this->hide_category_is_set) { trigger->set_allocated_action_hide_category(to_proto_marker_category(this->hide_category)); set_trigger = true; } - if (this->icon_is_set) { proto_icon.set_allocated_texture(to_proto_image(this->icon)); } - if (this->icon_size_is_set) { proto_icon.set___tentative__scale(to_proto_float(this->icon_size)); } - if (this->info_message_is_set) { trigger->set_action_info_message(to_proto_string(this->info_message)); set_trigger = true; } - if (this->invert_visibility_is_set) { trigger->set_invert_display(to_proto_bool(this->invert_visibility)); set_trigger = true; } - if (this->map_display_size_is_set) { proto_icon.set_map_display_size(to_proto_int(this->map_display_size)); } - if (this->map_id_is_set) { proto_icon.set_map_id(to_proto_int(this->map_id)); } - if (this->map_type_filter_is_set) { proto_icon.set_allocated_map_type_filter(to_proto_map_type_filter(this->map_type_filter)); } - if (this->maximum_size_on_screen_is_set) { proto_icon.set_maximum_size_on_screen(to_proto_int(this->maximum_size_on_screen)); } - if (this->minimum_size_on_screen_is_set) { proto_icon.set_minimum_size_on_screen(to_proto_int(this->minimum_size_on_screen)); } - if (this->mount_filter_is_set) { proto_icon.set_allocated_mount_filter(to_proto_mount_filter(this->mount_filter)); } - if (this->position_is_set) { proto_icon.set_allocated_position(to_proto_position(this->position)); } - if (this->profession_filter_is_set) { proto_icon.set_allocated_profession_filter(to_proto_profession_filter(this->profession_filter)); } - if (this->render_ingame_is_set) { proto_icon.set___tentative__render_ingame(to_proto_bool(this->render_ingame)); } - if (this->render_on_map_is_set) { proto_icon.set___tentative__render_on_map(to_proto_bool(this->render_on_map)); } - if (this->render_on_minimap_is_set) { proto_icon.set___tentative__render_on_minimap(to_proto_bool(this->render_on_minimap)); } - if (this->reset_behavior_is_set) { trigger->set_reset_behavior(to_proto_reset_behavior(this->reset_behavior)); set_trigger = true; } - if (this->reset_length_is_set) { trigger->set_reset_length(to_proto_float(this->reset_length)); set_trigger = true; } - if (this->scale_on_map_with_zoom_is_set) { proto_icon.set_scale_on_map_with_zoom(to_proto_bool(this->scale_on_map_with_zoom)); } - if (this->schedule_is_set) { proto_icon.set_bhdraft__schedule(to_proto_string(this->schedule)); } - if (this->schedule_duration_is_set) { proto_icon.set_bhdraft__schedule_duration(to_proto_float(this->schedule_duration)); } - if (this->show_category_is_set) { trigger->set_allocated_action_show_category(to_proto_marker_category(this->show_category)); set_trigger = true; } - if (this->specialization_filter_is_set) { proto_icon.set_allocated_specialization_filter(to_proto_specialization_filter(this->specialization_filter)); } - if (this->species_filter_is_set) { proto_icon.set_allocated_species_filter(to_proto_species_filter(this->species_filter)); } - if (this->toggle_category_is_set) { trigger->set_allocated_action_toggle_category(to_proto_marker_category(this->toggle_category)); set_trigger = true; } - if (this->tooltip_description_is_set) { proto_icon.set_tip_description(to_proto_string(this->tooltip_description)); } - if (this->tooltip_name_is_set) { proto_icon.set_tip_name(to_proto_string(this->tooltip_name)); } - if (this->trigger_range_is_set) { trigger->set_range(to_proto_float(this->trigger_range)); set_trigger = true; } - - - - - - - - if (set_trigger){ - proto_icon.set_allocated_trigger(trigger); - } - + if (set_trigger) { + proto_icon.set_allocated_trigger(trigger); + } return proto_icon; } - -void Icon::parse_protobuf(waypoint::Icon proto_icon){ - waypoint::Trigger trigger = proto_icon.trigger(); - +void Icon::parse_protobuf(waypoint::Icon proto_icon) { + waypoint::Trigger trigger = proto_icon.trigger(); if (proto_icon.achievement_bit() != 0) { this->achievement_bitmask = from_proto_int(proto_icon.achievement_bit()); this->achievement_bitmask_is_set = true; } - - if (proto_icon.achievement_id() != 0) { this->achievement_id = from_proto_int(proto_icon.achievement_id()); this->achievement_id_is_set = true; } - - if (proto_icon.alpha() != 0) { this->alpha = from_proto_float(proto_icon.alpha()); this->alpha_is_set = true; } - - if (trigger.auto_trigger() != 0) { this->auto_trigger = from_proto_bool(trigger.auto_trigger()); this->auto_trigger_is_set = true; } - if (trigger.bounce_delay() != 0) { this->bounce_delay = from_proto_float(trigger.bounce_delay()); this->bounce_delay_is_set = true; } - if (trigger.bounce_duration() != 0) { this->bounce_duration = from_proto_float(trigger.bounce_duration()); this->bounce_duration_is_set = true; } - if (trigger.bounce_height() != 0) { this->bounce_height = from_proto_float(trigger.bounce_height()); this->bounce_height_is_set = true; } - if (proto_icon.can_fade() != 0) { this->can_fade = from_proto_bool(proto_icon.can_fade()); this->can_fade_is_set = true; } - - if (proto_icon.has_category()) { this->category = from_proto_marker_category(proto_icon.category()); this->category_is_set = true; - } - - + } if (proto_icon.has_color()) { this->color = from_proto_color(proto_icon.color()); this->color_is_set = true; - } - - - + } if (trigger.action_copy_clipboard() != "") { this->copy_clipboard = from_proto_string(trigger.action_copy_clipboard()); this->copy_clipboard_is_set = true; } - - if (trigger.action_copy_message() != "") { this->copy_message = from_proto_string(trigger.action_copy_message()); this->copy_message_is_set = true; } - if (proto_icon.cull_chirality() != 0) { this->cull_chirality = from_proto_cull_chirality(proto_icon.cull_chirality()); this->cull_chirality_is_set = true; - } - - + } if (proto_icon.distance_fade_end() != 0) { this->distance_fade_end = from_proto_float(proto_icon.distance_fade_end()); this->distance_fade_end_is_set = true; } - - if (proto_icon.distance_fade_start() != 0) { this->distance_fade_start = from_proto_float(proto_icon.distance_fade_start()); this->distance_fade_start_is_set = true; } - - if (proto_icon.has_euler_rotation()) { this->euler_rotation = from_proto_euler_rotation(proto_icon.euler_rotation()); this->euler_rotation_is_set = true; - } - - + } if (proto_icon.has_festival_filter()) { this->festival_filter = from_proto_festival_filter(proto_icon.festival_filter()); this->festival_filter_is_set = true; - } - - + } if (proto_icon.has_guid()) { this->guid = from_proto_unique_id(proto_icon.guid()); this->guid_is_set = true; - } - - + } if (trigger.has_countdown() != 0) { this->has_countdown = from_proto_bool(trigger.has_countdown()); this->has_countdown_is_set = true; } - if (proto_icon.height_offset() != 0) { this->heightoffset = from_proto_float(proto_icon.height_offset()); this->heightoffset_is_set = true; } - - if (trigger.has_action_hide_category()) { this->hide_category = from_proto_marker_category(trigger.action_hide_category()); this->hide_category_is_set = true; } - if (proto_icon.has_texture()) { this->icon = from_proto_image(proto_icon.texture()); this->icon_is_set = true; - } - - + } if (proto_icon.__tentative__scale() != 0) { this->icon_size = from_proto_float(proto_icon.__tentative__scale()); this->icon_size_is_set = true; } - - - if (trigger.action_info_message() != "") { this->info_message = from_proto_string(trigger.action_info_message()); this->info_message_is_set = true; } - if (trigger.invert_display() != 0) { this->invert_visibility = from_proto_bool(trigger.invert_display()); this->invert_visibility_is_set = true; } - if (proto_icon.map_display_size() != 0) { this->map_display_size = from_proto_int(proto_icon.map_display_size()); this->map_display_size_is_set = true; } - - if (proto_icon.map_id() != 0) { this->map_id = from_proto_int(proto_icon.map_id()); this->map_id_is_set = true; } - - if (proto_icon.has_map_type_filter()) { this->map_type_filter = from_proto_map_type_filter(proto_icon.map_type_filter()); this->map_type_filter_is_set = true; - } - - + } if (proto_icon.maximum_size_on_screen() != 0) { this->maximum_size_on_screen = from_proto_int(proto_icon.maximum_size_on_screen()); this->maximum_size_on_screen_is_set = true; } - - if (proto_icon.minimum_size_on_screen() != 0) { this->minimum_size_on_screen = from_proto_int(proto_icon.minimum_size_on_screen()); this->minimum_size_on_screen_is_set = true; } - - if (proto_icon.has_mount_filter()) { this->mount_filter = from_proto_mount_filter(proto_icon.mount_filter()); this->mount_filter_is_set = true; - } - - + } if (proto_icon.has_position()) { this->position = from_proto_position(proto_icon.position()); this->position_is_set = true; - } - - + } if (proto_icon.has_profession_filter()) { this->profession_filter = from_proto_profession_filter(proto_icon.profession_filter()); this->profession_filter_is_set = true; - } - - + } if (proto_icon.__tentative__render_ingame() != 0) { this->render_ingame = from_proto_bool(proto_icon.__tentative__render_ingame()); this->render_ingame_is_set = true; } - - if (proto_icon.__tentative__render_on_map() != 0) { this->render_on_map = from_proto_bool(proto_icon.__tentative__render_on_map()); this->render_on_map_is_set = true; } - - if (proto_icon.__tentative__render_on_minimap() != 0) { this->render_on_minimap = from_proto_bool(proto_icon.__tentative__render_on_minimap()); this->render_on_minimap_is_set = true; } - - if (trigger.reset_behavior() != 0) { this->reset_behavior = from_proto_reset_behavior(trigger.reset_behavior()); this->reset_behavior_is_set = true; } - if (trigger.reset_length() != 0) { this->reset_length = from_proto_float(trigger.reset_length()); this->reset_length_is_set = true; } - if (proto_icon.scale_on_map_with_zoom() != 0) { this->scale_on_map_with_zoom = from_proto_bool(proto_icon.scale_on_map_with_zoom()); this->scale_on_map_with_zoom_is_set = true; } - - - if (proto_icon.bhdraft__schedule() != "") { this->schedule = from_proto_string(proto_icon.bhdraft__schedule()); this->schedule_is_set = true; } - - if (proto_icon.bhdraft__schedule_duration() != 0) { this->schedule_duration = from_proto_float(proto_icon.bhdraft__schedule_duration()); this->schedule_duration_is_set = true; } - - if (trigger.has_action_show_category()) { this->show_category = from_proto_marker_category(trigger.action_show_category()); this->show_category_is_set = true; } - if (proto_icon.has_specialization_filter()) { this->specialization_filter = from_proto_specialization_filter(proto_icon.specialization_filter()); this->specialization_filter_is_set = true; - } - - + } if (proto_icon.has_species_filter()) { this->species_filter = from_proto_species_filter(proto_icon.species_filter()); this->species_filter_is_set = true; - } - - + } if (trigger.has_action_toggle_category()) { this->toggle_category = from_proto_marker_category(trigger.action_toggle_category()); this->toggle_category_is_set = true; } - - if (proto_icon.tip_description() != "") { this->tooltip_description = from_proto_string(proto_icon.tip_description()); this->tooltip_description_is_set = true; } - - - if (proto_icon.tip_name() != "") { this->tooltip_name = from_proto_string(proto_icon.tip_name()); this->tooltip_name_is_set = true; } - - if (trigger.range() != 0) { this->trigger_range = from_proto_float(trigger.range()); this->trigger_range_is_set = true; } - - - - - - - - - - - - - } diff --git a/xml_converter/src/icon_gen.hpp b/xml_converter/src/icon_gen.hpp index 6a696888..3d9db836 100644 --- a/xml_converter/src/icon_gen.hpp +++ b/xml_converter/src/icon_gen.hpp @@ -19,6 +19,7 @@ #include "attribute/unique_id.hpp" #include "parseable.hpp" #include "rapidxml-1.13/rapidxml.hpp" +#include "waypoint.pb.h" class XMLError; @@ -136,7 +137,7 @@ class Icon : public Parseable { virtual std::vector as_xml() const; virtual std::string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors); - waypoint::Icon as_protobuf(waypoint::Icon) const; + waypoint::Icon as_protobuf(waypoint::Icon) const; void parse_protobuf(waypoint::Icon proto_icon); bool validate_attributes_of_type_marker_category(); }; diff --git a/xml_converter/src/trail_gen.cpp b/xml_converter/src/trail_gen.cpp index 23d95290..25cc3301 100644 --- a/xml_converter/src/trail_gen.cpp +++ b/xml_converter/src/trail_gen.cpp @@ -1,7 +1,7 @@ -#include #include "trail_gen.hpp" -#include "waypoint.pb.h" +#include +#include #include #include @@ -12,6 +12,7 @@ #include "rapid_helpers.hpp" #include "rapidxml-1.13/rapidxml.hpp" #include "string_helper.hpp" +#include "waypoint.pb.h" using namespace std; @@ -268,293 +269,204 @@ vector Trail::as_xml() const { } waypoint::Trail Trail::as_protobuf(waypoint::Trail proto_trail) const { - if (this->achievement_bitmask_is_set) { proto_trail.set_achievement_bit(to_proto_int(this->achievement_bitmask)); } - if (this->achievement_id_is_set) { proto_trail.set_achievement_id(to_proto_int(this->achievement_id)); } - if (this->alpha_is_set) { proto_trail.set_alpha(to_proto_float(this->alpha)); } - if (this->animation_speed_is_set) { proto_trail.set_animation_speed(to_proto_float(this->animation_speed)); } - if (this->can_fade_is_set) { proto_trail.set_can_fade(to_proto_bool(this->can_fade)); } - if (this->category_is_set) { proto_trail.set_allocated_category(to_proto_marker_category(this->category)); } - if (this->color_is_set) { proto_trail.set_allocated_color(to_proto_color(this->color)); } - if (this->cull_chirality_is_set) { - proto_trail.set_cull_chirality(to_proto_cull_chirality(this->cull_chirality)); + proto_trail.set_cull_chirality(to_proto_cull_chirality(this->cull_chirality)); } - if (this->distance_fade_end_is_set) { proto_trail.set_distance_fade_end(to_proto_float(this->distance_fade_end)); } - if (this->distance_fade_start_is_set) { proto_trail.set_distance_fade_start(to_proto_float(this->distance_fade_start)); } - if (this->festival_filter_is_set) { proto_trail.set_allocated_festival_filter(to_proto_festival_filter(this->festival_filter)); } - if (this->guid_is_set) { proto_trail.set_allocated_guid(to_proto_unique_id(this->guid)); } - if (this->is_wall_is_set) { proto_trail.set_is_wall(to_proto_bool(this->is_wall)); } - if (this->map_display_size_is_set) { proto_trail.set_map_display_size(to_proto_int(this->map_display_size)); } - if (this->map_id_is_set) { proto_trail.set_map_id(to_proto_int(this->map_id)); } - if (this->map_type_filter_is_set) { proto_trail.set_allocated_map_type_filter(to_proto_map_type_filter(this->map_type_filter)); } - if (this->mount_filter_is_set) { proto_trail.set_allocated_mount_filter(to_proto_mount_filter(this->mount_filter)); } - if (this->profession_filter_is_set) { proto_trail.set_allocated_profession_filter(to_proto_profession_filter(this->profession_filter)); } - if (this->render_ingame_is_set) { proto_trail.set___tentative__render_ingame(to_proto_bool(this->render_ingame)); } - if (this->render_on_map_is_set) { proto_trail.set___tentative__render_on_map(to_proto_bool(this->render_on_map)); } - if (this->render_on_minimap_is_set) { proto_trail.set___tentative__render_on_minimap(to_proto_bool(this->render_on_minimap)); } - if (this->schedule_is_set) { proto_trail.set_bhdraft__schedule(to_proto_string(this->schedule)); } - if (this->schedule_duration_is_set) { proto_trail.set_bhdraft__schedule_duration(to_proto_float(this->schedule_duration)); } - if (this->specialization_filter_is_set) { proto_trail.set_allocated_specialization_filter(to_proto_specialization_filter(this->specialization_filter)); } - if (this->species_filter_is_set) { proto_trail.set_allocated_species_filter(to_proto_species_filter(this->species_filter)); } - if (this->texture_is_set) { proto_trail.set_allocated_texture(to_proto_image(this->texture)); } - if (this->trail_data_is_set) { proto_trail.set_allocated_trail_data(to_proto_trail_data(this->trail_data)); } - if (this->trail_scale_is_set) { proto_trail.set_scale(to_proto_float(this->trail_scale)); } - - return proto_trail; } - -void Trail::parse_protobuf(waypoint::Trail proto_trail){ - +void Trail::parse_protobuf(waypoint::Trail proto_trail) { if (proto_trail.achievement_bit() != 0) { this->achievement_bitmask = from_proto_int(proto_trail.achievement_bit()); this->achievement_bitmask_is_set = true; } - - if (proto_trail.achievement_id() != 0) { this->achievement_id = from_proto_int(proto_trail.achievement_id()); this->achievement_id_is_set = true; } - - if (proto_trail.alpha() != 0) { this->alpha = from_proto_float(proto_trail.alpha()); this->alpha_is_set = true; } - - if (proto_trail.animation_speed() != 0) { this->animation_speed = from_proto_float(proto_trail.animation_speed()); this->animation_speed_is_set = true; } - - if (proto_trail.can_fade() != 0) { this->can_fade = from_proto_bool(proto_trail.can_fade()); this->can_fade_is_set = true; } - - if (proto_trail.has_category()) { this->category = from_proto_marker_category(proto_trail.category()); this->category_is_set = true; - } - - + } if (proto_trail.has_color()) { this->color = from_proto_color(proto_trail.color()); this->color_is_set = true; - } - - + } if (proto_trail.cull_chirality() != 0) { this->cull_chirality = from_proto_cull_chirality(proto_trail.cull_chirality()); this->cull_chirality_is_set = true; - } - - + } if (proto_trail.distance_fade_end() != 0) { this->distance_fade_end = from_proto_float(proto_trail.distance_fade_end()); this->distance_fade_end_is_set = true; } - - if (proto_trail.distance_fade_start() != 0) { this->distance_fade_start = from_proto_float(proto_trail.distance_fade_start()); this->distance_fade_start_is_set = true; } - - if (proto_trail.has_festival_filter()) { this->festival_filter = from_proto_festival_filter(proto_trail.festival_filter()); this->festival_filter_is_set = true; - } - - + } if (proto_trail.has_guid()) { this->guid = from_proto_unique_id(proto_trail.guid()); this->guid_is_set = true; - } - - + } if (proto_trail.is_wall() != 0) { this->is_wall = from_proto_bool(proto_trail.is_wall()); this->is_wall_is_set = true; } - - if (proto_trail.map_display_size() != 0) { this->map_display_size = from_proto_int(proto_trail.map_display_size()); this->map_display_size_is_set = true; } - - if (proto_trail.map_id() != 0) { this->map_id = from_proto_int(proto_trail.map_id()); this->map_id_is_set = true; } - - if (proto_trail.has_map_type_filter()) { this->map_type_filter = from_proto_map_type_filter(proto_trail.map_type_filter()); this->map_type_filter_is_set = true; - } - - + } if (proto_trail.has_mount_filter()) { this->mount_filter = from_proto_mount_filter(proto_trail.mount_filter()); this->mount_filter_is_set = true; - } - - + } if (proto_trail.has_profession_filter()) { this->profession_filter = from_proto_profession_filter(proto_trail.profession_filter()); this->profession_filter_is_set = true; - } - - + } if (proto_trail.__tentative__render_ingame() != 0) { this->render_ingame = from_proto_bool(proto_trail.__tentative__render_ingame()); this->render_ingame_is_set = true; } - - if (proto_trail.__tentative__render_on_map() != 0) { this->render_on_map = from_proto_bool(proto_trail.__tentative__render_on_map()); this->render_on_map_is_set = true; } - - if (proto_trail.__tentative__render_on_minimap() != 0) { this->render_on_minimap = from_proto_bool(proto_trail.__tentative__render_on_minimap()); this->render_on_minimap_is_set = true; } - - - if (proto_trail.bhdraft__schedule() != "") { this->schedule = from_proto_string(proto_trail.bhdraft__schedule()); this->schedule_is_set = true; } - - if (proto_trail.bhdraft__schedule_duration() != 0) { this->schedule_duration = from_proto_float(proto_trail.bhdraft__schedule_duration()); this->schedule_duration_is_set = true; } - - if (proto_trail.has_specialization_filter()) { this->specialization_filter = from_proto_specialization_filter(proto_trail.specialization_filter()); this->specialization_filter_is_set = true; - } - - + } if (proto_trail.has_species_filter()) { this->species_filter = from_proto_species_filter(proto_trail.species_filter()); this->species_filter_is_set = true; - } - - + } if (proto_trail.has_texture()) { this->texture = from_proto_image(proto_trail.texture()); this->texture_is_set = true; - } - - + } if (proto_trail.has_trail_data()) { this->trail_data = from_proto_trail_data(proto_trail.trail_data()); this->trail_data_is_set = true; - } - - + } if (proto_trail.scale() != 0) { this->trail_scale = from_proto_float(proto_trail.scale()); this->trail_scale_is_set = true; } - - } diff --git a/xml_converter/src/trail_gen.hpp b/xml_converter/src/trail_gen.hpp index dd0894aa..9046a2b6 100644 --- a/xml_converter/src/trail_gen.hpp +++ b/xml_converter/src/trail_gen.hpp @@ -17,6 +17,7 @@ #include "attribute/unique_id.hpp" #include "parseable.hpp" #include "rapidxml-1.13/rapidxml.hpp" +#include "waypoint.pb.h" class XMLError; @@ -81,7 +82,7 @@ class Trail : public Parseable { virtual std::vector as_xml() const; virtual std::string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors); - waypoint::Trail as_protobuf(waypoint::Trail) const; + waypoint::Trail as_protobuf(waypoint::Trail) const; void parse_protobuf(waypoint::Trail proto_trail); bool validate_attributes_of_type_marker_category(); }; From 541a0e345bf5dc12f8831c0f3e6176e0ab95a5c6 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Tue, 6 Dec 2022 00:42:37 -0500 Subject: [PATCH 132/539] Fixed most errors --- .../generators/cpp_templates/attribute_template.hpp | 7 ++++++- xml_converter/generators/cpp_templates/class_template.cpp | 1 - xml_converter/generators/cpp_templates/compoundvalue.cpp | 2 +- xml_converter/generators/cpp_templates/enum.cpp | 3 ++- xml_converter/generators/cpp_templates/multiflagvalue.cpp | 3 ++- xml_converter/src/attribute/bool.hpp | 1 - xml_converter/src/attribute/color.cpp | 3 ++- xml_converter/src/attribute/color.hpp | 4 +++- xml_converter/src/attribute/cull_chirality_gen.cpp | 3 ++- xml_converter/src/attribute/euler_rotation_gen.cpp | 2 +- xml_converter/src/attribute/euler_rotation_gen.hpp | 5 +++-- xml_converter/src/attribute/festival_filter_gen.cpp | 3 ++- xml_converter/src/attribute/festival_filter_gen.hpp | 5 +++-- xml_converter/src/attribute/float.cpp | 2 +- xml_converter/src/attribute/float.hpp | 1 - xml_converter/src/attribute/image.cpp | 1 + xml_converter/src/attribute/image.hpp | 4 +++- xml_converter/src/attribute/int.cpp | 2 +- xml_converter/src/attribute/int.hpp | 1 - xml_converter/src/attribute/map_type_filter_gen.cpp | 3 ++- xml_converter/src/attribute/map_type_filter_gen.hpp | 5 +++-- xml_converter/src/attribute/marker_category.hpp | 4 +++- xml_converter/src/attribute/mount_filter_gen.cpp | 3 ++- xml_converter/src/attribute/mount_filter_gen.hpp | 5 +++-- xml_converter/src/attribute/position_gen.cpp | 2 +- xml_converter/src/attribute/position_gen.hpp | 5 +++-- xml_converter/src/attribute/profession_filter_gen.cpp | 3 ++- xml_converter/src/attribute/profession_filter_gen.hpp | 5 +++-- xml_converter/src/attribute/reset_behavior_gen.cpp | 3 ++- xml_converter/src/attribute/specialization_filter_gen.cpp | 3 ++- xml_converter/src/attribute/specialization_filter_gen.hpp | 5 +++-- xml_converter/src/attribute/species_filter_gen.cpp | 3 ++- xml_converter/src/attribute/species_filter_gen.hpp | 5 +++-- xml_converter/src/attribute/string.hpp | 1 - xml_converter/src/attribute/trail_data.cpp | 3 ++- xml_converter/src/attribute/trail_data.hpp | 4 +++- xml_converter/src/attribute/trail_data_map_id.hpp | 1 - xml_converter/src/attribute/unique_id.hpp | 4 +++- xml_converter/src/category_gen.cpp | 1 - xml_converter/src/icon_gen.cpp | 1 - xml_converter/src/parseable.cpp | 1 + xml_converter/src/trail_gen.cpp | 1 - 42 files changed, 76 insertions(+), 48 deletions(-) diff --git a/xml_converter/generators/cpp_templates/attribute_template.hpp b/xml_converter/generators/cpp_templates/attribute_template.hpp index bb69b002..eae924a5 100644 --- a/xml_converter/generators/cpp_templates/attribute_template.hpp +++ b/xml_converter/generators/cpp_templates/attribute_template.hpp @@ -4,17 +4,22 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +{% if type == "Enum":%} #include "waypoint.pb.h" class XMLError; -{% if type == "Enum":%} enum {{class_name}} { {% for attribute_variable in attribute_variables: %} {{attribute_variable.attribute_name}}, {% endfor %} }; {% else: %} +class XMLError; +namespace waypoint { +class {{class_name}}; +} + class {{class_name}} { public: {% for attribute_variable in attribute_variables: %} diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index 8b9364ef..dbfb3901 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -1,7 +1,6 @@ #include "{{cpp_class_header}}_gen.hpp" #include -#include {% for absolute_include in cpp_includes.sorted_cpp_absolute_includes() %} #include <{{absolute_include}}> {% endfor %} diff --git a/xml_converter/generators/cpp_templates/compoundvalue.cpp b/xml_converter/generators/cpp_templates/compoundvalue.cpp index 32f04136..caeecd6f 100644 --- a/xml_converter/generators/cpp_templates/compoundvalue.cpp +++ b/xml_converter/generators/cpp_templates/compoundvalue.cpp @@ -55,4 +55,4 @@ waypoint::{{class_name}}* to_proto_{{attribute_name}}({{class_name}} attribute_v {{attribute_name}}.{{attribute_variable.attribute_name}} = proto_{{attribute_name}}.{{attribute_variable.protobuf_field}}(); {% endfor %} return {{attribute_name}}; -} \ No newline at end of file +} diff --git a/xml_converter/generators/cpp_templates/enum.cpp b/xml_converter/generators/cpp_templates/enum.cpp index c95084e6..38637383 100644 --- a/xml_converter/generators/cpp_templates/enum.cpp +++ b/xml_converter/generators/cpp_templates/enum.cpp @@ -1,5 +1,6 @@ #include "{{attribute_name}}_gen.hpp" +#include #include #include #include @@ -93,4 +94,4 @@ waypoint::{{class_name}} to_proto_{{attribute_name}}({{class_name}} attribute_va {{attribute_name}} = {{class_name}}::{{attribute_variables[0].attribute_name}}; } return {{attribute_name}}; -} \ No newline at end of file +} diff --git a/xml_converter/generators/cpp_templates/multiflagvalue.cpp b/xml_converter/generators/cpp_templates/multiflagvalue.cpp index 06e7b58d..dfac2298 100644 --- a/xml_converter/generators/cpp_templates/multiflagvalue.cpp +++ b/xml_converter/generators/cpp_templates/multiflagvalue.cpp @@ -1,5 +1,6 @@ #include "{{attribute_name}}_gen.hpp" +#include #include #include #include @@ -70,4 +71,4 @@ waypoint::{{class_name}}* to_proto_{{attribute_name}}({{class_name}} attribute_v } {% endfor %} return {{attribute_name}}; -} \ No newline at end of file +} diff --git a/xml_converter/src/attribute/bool.hpp b/xml_converter/src/attribute/bool.hpp index 0f2bfef0..eac7d42f 100644 --- a/xml_converter/src/attribute/bool.hpp +++ b/xml_converter/src/attribute/bool.hpp @@ -4,7 +4,6 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" -#include "waypoint.pb.h" class XMLError; diff --git a/xml_converter/src/attribute/color.cpp b/xml_converter/src/attribute/color.cpp index b511ba4c..d687c918 100644 --- a/xml_converter/src/attribute/color.cpp +++ b/xml_converter/src/attribute/color.cpp @@ -6,6 +6,7 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" +#include "waypoint.pb.h" using namespace std; @@ -50,4 +51,4 @@ Color from_proto_color(waypoint::Color attribute_value) { Color color; color.hex = attribute_value.hex(); return color; -} \ No newline at end of file +} diff --git a/xml_converter/src/attribute/color.hpp b/xml_converter/src/attribute/color.hpp index 4664b194..43c76d61 100644 --- a/xml_converter/src/attribute/color.hpp +++ b/xml_converter/src/attribute/color.hpp @@ -4,9 +4,11 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" -#include "waypoint.pb.h" class XMLError; +namespace waypoint { +class Color; +} class Color { public: diff --git a/xml_converter/src/attribute/cull_chirality_gen.cpp b/xml_converter/src/attribute/cull_chirality_gen.cpp index 4c9589b8..eb11df49 100644 --- a/xml_converter/src/attribute/cull_chirality_gen.cpp +++ b/xml_converter/src/attribute/cull_chirality_gen.cpp @@ -1,5 +1,6 @@ #include "cull_chirality_gen.hpp" +#include #include #include #include @@ -77,4 +78,4 @@ CullChirality from_proto_cull_chirality(waypoint::CullChirality proto_cull_chira cull_chirality = CullChirality::none; } return cull_chirality; -} \ No newline at end of file +} diff --git a/xml_converter/src/attribute/euler_rotation_gen.cpp b/xml_converter/src/attribute/euler_rotation_gen.cpp index 53724e92..f960aee7 100644 --- a/xml_converter/src/attribute/euler_rotation_gen.cpp +++ b/xml_converter/src/attribute/euler_rotation_gen.cpp @@ -49,4 +49,4 @@ EulerRotation from_proto_euler_rotation(waypoint::EulerRotation proto_euler_rota euler_rotation.y_rotation = proto_euler_rotation.y(); euler_rotation.z_rotation = proto_euler_rotation.z(); return euler_rotation; -} \ No newline at end of file +} diff --git a/xml_converter/src/attribute/euler_rotation_gen.hpp b/xml_converter/src/attribute/euler_rotation_gen.hpp index 42df5f49..85004e59 100644 --- a/xml_converter/src/attribute/euler_rotation_gen.hpp +++ b/xml_converter/src/attribute/euler_rotation_gen.hpp @@ -4,9 +4,10 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" -#include "waypoint.pb.h" - class XMLError; +namespace waypoint { +class EulerRotation; +} class EulerRotation { public: diff --git a/xml_converter/src/attribute/festival_filter_gen.cpp b/xml_converter/src/attribute/festival_filter_gen.cpp index a1ba2f06..a502abb0 100644 --- a/xml_converter/src/attribute/festival_filter_gen.cpp +++ b/xml_converter/src/attribute/festival_filter_gen.cpp @@ -1,5 +1,6 @@ #include "festival_filter_gen.hpp" +#include #include #include #include @@ -133,4 +134,4 @@ FestivalFilter from_proto_festival_filter(waypoint::FestivalFilter proto_festiva festival_filter.none = true; } return festival_filter; -} \ No newline at end of file +} diff --git a/xml_converter/src/attribute/festival_filter_gen.hpp b/xml_converter/src/attribute/festival_filter_gen.hpp index 356afe91..a5f8f85e 100644 --- a/xml_converter/src/attribute/festival_filter_gen.hpp +++ b/xml_converter/src/attribute/festival_filter_gen.hpp @@ -4,9 +4,10 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" -#include "waypoint.pb.h" - class XMLError; +namespace waypoint { +class FestivalFilter; +} class FestivalFilter { public: diff --git a/xml_converter/src/attribute/float.cpp b/xml_converter/src/attribute/float.cpp index 232efbb0..28e3fef5 100644 --- a/xml_converter/src/attribute/float.cpp +++ b/xml_converter/src/attribute/float.cpp @@ -40,4 +40,4 @@ float to_proto_float(float attribute_value) { //////////////////////////////////////////////////////////////////////////////// float from_proto_float(float attribute_value) { return attribute_value; -} \ No newline at end of file +} diff --git a/xml_converter/src/attribute/float.hpp b/xml_converter/src/attribute/float.hpp index 138d2da7..61c7151c 100644 --- a/xml_converter/src/attribute/float.hpp +++ b/xml_converter/src/attribute/float.hpp @@ -4,7 +4,6 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" -#include "waypoint.pb.h" class XMLError; diff --git a/xml_converter/src/attribute/image.cpp b/xml_converter/src/attribute/image.cpp index e2227027..637f15c8 100644 --- a/xml_converter/src/attribute/image.cpp +++ b/xml_converter/src/attribute/image.cpp @@ -6,6 +6,7 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" +#include "waypoint.pb.h" using namespace std; diff --git a/xml_converter/src/attribute/image.hpp b/xml_converter/src/attribute/image.hpp index 7398ad24..0e3c684b 100644 --- a/xml_converter/src/attribute/image.hpp +++ b/xml_converter/src/attribute/image.hpp @@ -4,9 +4,11 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" -#include "waypoint.pb.h" class XMLError; +namespace waypoint { +class Texture; +} class Image { public: diff --git a/xml_converter/src/attribute/int.cpp b/xml_converter/src/attribute/int.cpp index 5496c148..d0a30fb6 100644 --- a/xml_converter/src/attribute/int.cpp +++ b/xml_converter/src/attribute/int.cpp @@ -57,4 +57,4 @@ int to_proto_int(int attribute_value) { //////////////////////////////////////////////////////////////////////////////// int from_proto_int(int attribute_value) { return attribute_value; -} \ No newline at end of file +} diff --git a/xml_converter/src/attribute/int.hpp b/xml_converter/src/attribute/int.hpp index 4a9e93e8..eafa64aa 100644 --- a/xml_converter/src/attribute/int.hpp +++ b/xml_converter/src/attribute/int.hpp @@ -4,7 +4,6 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" -#include "waypoint.pb.h" class XMLError; diff --git a/xml_converter/src/attribute/map_type_filter_gen.cpp b/xml_converter/src/attribute/map_type_filter_gen.cpp index 951e9564..afcc21ed 100644 --- a/xml_converter/src/attribute/map_type_filter_gen.cpp +++ b/xml_converter/src/attribute/map_type_filter_gen.cpp @@ -1,5 +1,6 @@ #include "map_type_filter_gen.hpp" +#include #include #include #include @@ -351,4 +352,4 @@ MapTypeFilter from_proto_map_type_filter(waypoint::MapTypeFilter proto_map_type_ map_type_filter.wvw_lounge_map = true; } return map_type_filter; -} \ No newline at end of file +} diff --git a/xml_converter/src/attribute/map_type_filter_gen.hpp b/xml_converter/src/attribute/map_type_filter_gen.hpp index 39e9683c..644bca64 100644 --- a/xml_converter/src/attribute/map_type_filter_gen.hpp +++ b/xml_converter/src/attribute/map_type_filter_gen.hpp @@ -4,9 +4,10 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" -#include "waypoint.pb.h" - class XMLError; +namespace waypoint { +class MapTypeFilter; +} class MapTypeFilter { public: diff --git a/xml_converter/src/attribute/marker_category.hpp b/xml_converter/src/attribute/marker_category.hpp index 3bb1fd76..06b6bf53 100644 --- a/xml_converter/src/attribute/marker_category.hpp +++ b/xml_converter/src/attribute/marker_category.hpp @@ -4,9 +4,11 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" -#include "waypoint.pb.h" class XMLError; +namespace waypoint { +class Category; +} class MarkerCategory { public: diff --git a/xml_converter/src/attribute/mount_filter_gen.cpp b/xml_converter/src/attribute/mount_filter_gen.cpp index 350df7c8..cb1f86dd 100644 --- a/xml_converter/src/attribute/mount_filter_gen.cpp +++ b/xml_converter/src/attribute/mount_filter_gen.cpp @@ -1,5 +1,6 @@ #include "mount_filter_gen.hpp" +#include #include #include #include @@ -169,4 +170,4 @@ MountFilter from_proto_mount_filter(waypoint::MountFilter proto_mount_filter) { mount_filter.seige_turtle = true; } return mount_filter; -} \ No newline at end of file +} diff --git a/xml_converter/src/attribute/mount_filter_gen.hpp b/xml_converter/src/attribute/mount_filter_gen.hpp index 04c5d15a..d680c5ea 100644 --- a/xml_converter/src/attribute/mount_filter_gen.hpp +++ b/xml_converter/src/attribute/mount_filter_gen.hpp @@ -4,9 +4,10 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" -#include "waypoint.pb.h" - class XMLError; +namespace waypoint { +class MountFilter; +} class MountFilter { public: diff --git a/xml_converter/src/attribute/position_gen.cpp b/xml_converter/src/attribute/position_gen.cpp index fbb674af..5cc086b8 100644 --- a/xml_converter/src/attribute/position_gen.cpp +++ b/xml_converter/src/attribute/position_gen.cpp @@ -42,4 +42,4 @@ Position from_proto_position(waypoint::Position proto_position) { position.y_position = proto_position.y(); position.z_position = proto_position.z(); return position; -} \ No newline at end of file +} diff --git a/xml_converter/src/attribute/position_gen.hpp b/xml_converter/src/attribute/position_gen.hpp index b9772a58..b5823c57 100644 --- a/xml_converter/src/attribute/position_gen.hpp +++ b/xml_converter/src/attribute/position_gen.hpp @@ -4,9 +4,10 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" -#include "waypoint.pb.h" - class XMLError; +namespace waypoint { +class Position; +} class Position { public: diff --git a/xml_converter/src/attribute/profession_filter_gen.cpp b/xml_converter/src/attribute/profession_filter_gen.cpp index b61cd5b4..e5c41af8 100644 --- a/xml_converter/src/attribute/profession_filter_gen.cpp +++ b/xml_converter/src/attribute/profession_filter_gen.cpp @@ -1,5 +1,6 @@ #include "profession_filter_gen.hpp" +#include #include #include #include @@ -156,4 +157,4 @@ ProfessionFilter from_proto_profession_filter(waypoint::ProfessionFilter proto_p profession_filter.revenant = true; } return profession_filter; -} \ No newline at end of file +} diff --git a/xml_converter/src/attribute/profession_filter_gen.hpp b/xml_converter/src/attribute/profession_filter_gen.hpp index 5b6e9768..1dda32b8 100644 --- a/xml_converter/src/attribute/profession_filter_gen.hpp +++ b/xml_converter/src/attribute/profession_filter_gen.hpp @@ -4,9 +4,10 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" -#include "waypoint.pb.h" - class XMLError; +namespace waypoint { +class ProfessionFilter; +} class ProfessionFilter { public: diff --git a/xml_converter/src/attribute/reset_behavior_gen.cpp b/xml_converter/src/attribute/reset_behavior_gen.cpp index 6c22ffc3..00e70060 100644 --- a/xml_converter/src/attribute/reset_behavior_gen.cpp +++ b/xml_converter/src/attribute/reset_behavior_gen.cpp @@ -1,5 +1,6 @@ #include "reset_behavior_gen.hpp" +#include #include #include #include @@ -257,4 +258,4 @@ ResetBehavior from_proto_reset_behavior(waypoint::ResetBehavior proto_reset_beha reset_behavior = ResetBehavior::always_visible; } return reset_behavior; -} \ No newline at end of file +} diff --git a/xml_converter/src/attribute/specialization_filter_gen.cpp b/xml_converter/src/attribute/specialization_filter_gen.cpp index 5a7fcfca..8c7d6940 100644 --- a/xml_converter/src/attribute/specialization_filter_gen.cpp +++ b/xml_converter/src/attribute/specialization_filter_gen.cpp @@ -1,5 +1,6 @@ #include "specialization_filter_gen.hpp" +#include #include #include #include @@ -1056,4 +1057,4 @@ SpecializationFilter from_proto_specialization_filter(waypoint::SpecializationFi specialization_filter.warrior_tactics = true; } return specialization_filter; -} \ No newline at end of file +} diff --git a/xml_converter/src/attribute/specialization_filter_gen.hpp b/xml_converter/src/attribute/specialization_filter_gen.hpp index b3af8ebd..a8f4d21c 100644 --- a/xml_converter/src/attribute/specialization_filter_gen.hpp +++ b/xml_converter/src/attribute/specialization_filter_gen.hpp @@ -4,9 +4,10 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" -#include "waypoint.pb.h" - class XMLError; +namespace waypoint { +class SpecializationFilter; +} class SpecializationFilter { public: diff --git a/xml_converter/src/attribute/species_filter_gen.cpp b/xml_converter/src/attribute/species_filter_gen.cpp index 4a20f4b0..a8be6b0a 100644 --- a/xml_converter/src/attribute/species_filter_gen.cpp +++ b/xml_converter/src/attribute/species_filter_gen.cpp @@ -1,5 +1,6 @@ #include "species_filter_gen.hpp" +#include #include #include #include @@ -104,4 +105,4 @@ SpeciesFilter from_proto_species_filter(waypoint::SpeciesFilter proto_species_fi species_filter.sylvari = true; } return species_filter; -} \ No newline at end of file +} diff --git a/xml_converter/src/attribute/species_filter_gen.hpp b/xml_converter/src/attribute/species_filter_gen.hpp index 0b03ff88..fd93e3d4 100644 --- a/xml_converter/src/attribute/species_filter_gen.hpp +++ b/xml_converter/src/attribute/species_filter_gen.hpp @@ -4,9 +4,10 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" -#include "waypoint.pb.h" - class XMLError; +namespace waypoint { +class SpeciesFilter; +} class SpeciesFilter { public: diff --git a/xml_converter/src/attribute/string.hpp b/xml_converter/src/attribute/string.hpp index 91eca6c2..a47ac3a3 100644 --- a/xml_converter/src/attribute/string.hpp +++ b/xml_converter/src/attribute/string.hpp @@ -4,7 +4,6 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" -#include "waypoint.pb.h" class XMLError; diff --git a/xml_converter/src/attribute/trail_data.cpp b/xml_converter/src/attribute/trail_data.cpp index 7bdee572..89ef298f 100644 --- a/xml_converter/src/attribute/trail_data.cpp +++ b/xml_converter/src/attribute/trail_data.cpp @@ -6,6 +6,7 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" +#include "waypoint.pb.h" using namespace std; @@ -49,4 +50,4 @@ TrailData from_proto_trail_data(waypoint::TrailData attribute_value) { TrailData trail_data; trail_data.trail_data = attribute_value.trail_data(); return trail_data; -} \ No newline at end of file +} diff --git a/xml_converter/src/attribute/trail_data.hpp b/xml_converter/src/attribute/trail_data.hpp index 038bf3f9..7df31c48 100644 --- a/xml_converter/src/attribute/trail_data.hpp +++ b/xml_converter/src/attribute/trail_data.hpp @@ -4,9 +4,11 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" -#include "waypoint.pb.h" class XMLError; +namespace waypoint { +class TrailData; +} class TrailData { public: diff --git a/xml_converter/src/attribute/trail_data_map_id.hpp b/xml_converter/src/attribute/trail_data_map_id.hpp index d2812eb3..beca405a 100644 --- a/xml_converter/src/attribute/trail_data_map_id.hpp +++ b/xml_converter/src/attribute/trail_data_map_id.hpp @@ -4,7 +4,6 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" -#include "waypoint.pb.h" class XMLError; diff --git a/xml_converter/src/attribute/unique_id.hpp b/xml_converter/src/attribute/unique_id.hpp index 0b30be32..44755836 100644 --- a/xml_converter/src/attribute/unique_id.hpp +++ b/xml_converter/src/attribute/unique_id.hpp @@ -5,9 +5,11 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" -#include "waypoint.pb.h" class XMLError; +namespace waypoint { +class GUID; +} class UniqueId { public: diff --git a/xml_converter/src/category_gen.cpp b/xml_converter/src/category_gen.cpp index 26c4222b..ffa0c707 100644 --- a/xml_converter/src/category_gen.cpp +++ b/xml_converter/src/category_gen.cpp @@ -1,7 +1,6 @@ #include "category_gen.hpp" #include -#include #include #include #include diff --git a/xml_converter/src/icon_gen.cpp b/xml_converter/src/icon_gen.cpp index 97ea9785..6c8766e3 100644 --- a/xml_converter/src/icon_gen.cpp +++ b/xml_converter/src/icon_gen.cpp @@ -1,7 +1,6 @@ #include "icon_gen.hpp" #include -#include #include #include diff --git a/xml_converter/src/parseable.cpp b/xml_converter/src/parseable.cpp index 5a201af3..f5d30c4c 100644 --- a/xml_converter/src/parseable.cpp +++ b/xml_converter/src/parseable.cpp @@ -1,5 +1,6 @@ #include "parseable.hpp" +#include #include #include #include diff --git a/xml_converter/src/trail_gen.cpp b/xml_converter/src/trail_gen.cpp index 25cc3301..db238de7 100644 --- a/xml_converter/src/trail_gen.cpp +++ b/xml_converter/src/trail_gen.cpp @@ -1,7 +1,6 @@ #include "trail_gen.hpp" #include -#include #include #include From 3146b8dfee3ccc3a413c33996636a5b8e91bf18b Mon Sep 17 00:00:00 2001 From: klingbolt Date: Tue, 6 Dec 2022 01:02:43 -0500 Subject: [PATCH 133/539] Fixed remaining clang errors --- xml_converter/generators/cpp_templates/class_template.cpp | 1 - xml_converter/generators/cpp_templates/enum.cpp | 1 - xml_converter/generators/cpp_templates/multiflagvalue.cpp | 1 - xml_converter/src/attribute/cull_chirality_gen.cpp | 1 - xml_converter/src/attribute/festival_filter_gen.cpp | 1 - xml_converter/src/attribute/map_type_filter_gen.cpp | 1 - xml_converter/src/attribute/mount_filter_gen.cpp | 1 - xml_converter/src/attribute/profession_filter_gen.cpp | 1 - xml_converter/src/attribute/reset_behavior_gen.cpp | 1 - xml_converter/src/attribute/specialization_filter_gen.cpp | 1 - xml_converter/src/attribute/species_filter_gen.cpp | 1 - xml_converter/src/category_gen.cpp | 1 - xml_converter/src/icon_gen.cpp | 1 - xml_converter/src/parseable.cpp | 1 - xml_converter/src/trail_gen.cpp | 1 - xml_converter/src/xml_converter.cpp | 1 + 16 files changed, 1 insertion(+), 15 deletions(-) diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index dbfb3901..6d23ca94 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -1,6 +1,5 @@ #include "{{cpp_class_header}}_gen.hpp" -#include {% for absolute_include in cpp_includes.sorted_cpp_absolute_includes() %} #include <{{absolute_include}}> {% endfor %} diff --git a/xml_converter/generators/cpp_templates/enum.cpp b/xml_converter/generators/cpp_templates/enum.cpp index 38637383..1afaed9d 100644 --- a/xml_converter/generators/cpp_templates/enum.cpp +++ b/xml_converter/generators/cpp_templates/enum.cpp @@ -1,6 +1,5 @@ #include "{{attribute_name}}_gen.hpp" -#include #include #include #include diff --git a/xml_converter/generators/cpp_templates/multiflagvalue.cpp b/xml_converter/generators/cpp_templates/multiflagvalue.cpp index dfac2298..21fd8c18 100644 --- a/xml_converter/generators/cpp_templates/multiflagvalue.cpp +++ b/xml_converter/generators/cpp_templates/multiflagvalue.cpp @@ -1,6 +1,5 @@ #include "{{attribute_name}}_gen.hpp" -#include #include #include #include diff --git a/xml_converter/src/attribute/cull_chirality_gen.cpp b/xml_converter/src/attribute/cull_chirality_gen.cpp index eb11df49..d900ea76 100644 --- a/xml_converter/src/attribute/cull_chirality_gen.cpp +++ b/xml_converter/src/attribute/cull_chirality_gen.cpp @@ -1,6 +1,5 @@ #include "cull_chirality_gen.hpp" -#include #include #include #include diff --git a/xml_converter/src/attribute/festival_filter_gen.cpp b/xml_converter/src/attribute/festival_filter_gen.cpp index a502abb0..ad8bb840 100644 --- a/xml_converter/src/attribute/festival_filter_gen.cpp +++ b/xml_converter/src/attribute/festival_filter_gen.cpp @@ -1,6 +1,5 @@ #include "festival_filter_gen.hpp" -#include #include #include #include diff --git a/xml_converter/src/attribute/map_type_filter_gen.cpp b/xml_converter/src/attribute/map_type_filter_gen.cpp index afcc21ed..0d20171c 100644 --- a/xml_converter/src/attribute/map_type_filter_gen.cpp +++ b/xml_converter/src/attribute/map_type_filter_gen.cpp @@ -1,6 +1,5 @@ #include "map_type_filter_gen.hpp" -#include #include #include #include diff --git a/xml_converter/src/attribute/mount_filter_gen.cpp b/xml_converter/src/attribute/mount_filter_gen.cpp index cb1f86dd..d3781ca2 100644 --- a/xml_converter/src/attribute/mount_filter_gen.cpp +++ b/xml_converter/src/attribute/mount_filter_gen.cpp @@ -1,6 +1,5 @@ #include "mount_filter_gen.hpp" -#include #include #include #include diff --git a/xml_converter/src/attribute/profession_filter_gen.cpp b/xml_converter/src/attribute/profession_filter_gen.cpp index e5c41af8..bbebcab0 100644 --- a/xml_converter/src/attribute/profession_filter_gen.cpp +++ b/xml_converter/src/attribute/profession_filter_gen.cpp @@ -1,6 +1,5 @@ #include "profession_filter_gen.hpp" -#include #include #include #include diff --git a/xml_converter/src/attribute/reset_behavior_gen.cpp b/xml_converter/src/attribute/reset_behavior_gen.cpp index 00e70060..b5211d25 100644 --- a/xml_converter/src/attribute/reset_behavior_gen.cpp +++ b/xml_converter/src/attribute/reset_behavior_gen.cpp @@ -1,6 +1,5 @@ #include "reset_behavior_gen.hpp" -#include #include #include #include diff --git a/xml_converter/src/attribute/specialization_filter_gen.cpp b/xml_converter/src/attribute/specialization_filter_gen.cpp index 8c7d6940..1a141ea3 100644 --- a/xml_converter/src/attribute/specialization_filter_gen.cpp +++ b/xml_converter/src/attribute/specialization_filter_gen.cpp @@ -1,6 +1,5 @@ #include "specialization_filter_gen.hpp" -#include #include #include #include diff --git a/xml_converter/src/attribute/species_filter_gen.cpp b/xml_converter/src/attribute/species_filter_gen.cpp index a8be6b0a..5cf363ca 100644 --- a/xml_converter/src/attribute/species_filter_gen.cpp +++ b/xml_converter/src/attribute/species_filter_gen.cpp @@ -1,6 +1,5 @@ #include "species_filter_gen.hpp" -#include #include #include #include diff --git a/xml_converter/src/category_gen.cpp b/xml_converter/src/category_gen.cpp index ffa0c707..14b7acc6 100644 --- a/xml_converter/src/category_gen.cpp +++ b/xml_converter/src/category_gen.cpp @@ -1,6 +1,5 @@ #include "category_gen.hpp" -#include #include #include #include diff --git a/xml_converter/src/icon_gen.cpp b/xml_converter/src/icon_gen.cpp index 6c8766e3..b259ef9e 100644 --- a/xml_converter/src/icon_gen.cpp +++ b/xml_converter/src/icon_gen.cpp @@ -1,6 +1,5 @@ #include "icon_gen.hpp" -#include #include #include diff --git a/xml_converter/src/parseable.cpp b/xml_converter/src/parseable.cpp index f5d30c4c..5a201af3 100644 --- a/xml_converter/src/parseable.cpp +++ b/xml_converter/src/parseable.cpp @@ -1,6 +1,5 @@ #include "parseable.hpp" -#include #include #include #include diff --git a/xml_converter/src/trail_gen.cpp b/xml_converter/src/trail_gen.cpp index db238de7..84e87194 100644 --- a/xml_converter/src/trail_gen.cpp +++ b/xml_converter/src/trail_gen.cpp @@ -1,6 +1,5 @@ #include "trail_gen.hpp" -#include #include #include diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 25959e50..03f2c8f2 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include #include From 9985291636303b9b55f530b6d8676d44e9b7bb75 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Tue, 6 Dec 2022 18:22:14 -0500 Subject: [PATCH 134/539] My presubmit wants to include to xml_converter but github's build does not --- xml_converter/src/xml_converter.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 03f2c8f2..25959e50 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -1,6 +1,5 @@ #include #include -#include #include #include #include From 5c9835da260c8aa9dbc162be878cc5b3f6830f7a Mon Sep 17 00:00:00 2001 From: klingbolt Date: Thu, 8 Dec 2022 22:02:22 -0500 Subject: [PATCH 135/539] Removed filesystem and addressed some review comments --- .../cpp_templates/attribute_template.hpp | 2 +- .../cpp_templates/class_template.cpp | 42 +++-- .../cpp_templates/class_template.hpp | 5 +- .../generators/cpp_templates/enum.cpp | 1 + .../cpp_templates/multiflagvalue.cpp | 1 + xml_converter/src/attribute/color.hpp | 4 +- .../src/attribute/cull_chirality_gen.cpp | 1 + .../src/attribute/cull_chirality_gen.hpp | 6 +- .../src/attribute/festival_filter_gen.cpp | 1 + .../src/attribute/map_type_filter_gen.cpp | 1 + .../src/attribute/mount_filter_gen.cpp | 1 + .../src/attribute/profession_filter_gen.cpp | 1 + .../src/attribute/reset_behavior_gen.cpp | 1 + .../src/attribute/reset_behavior_gen.hpp | 18 +- .../attribute/specialization_filter_gen.cpp | 1 + .../src/attribute/species_filter_gen.cpp | 1 + xml_converter/src/category_gen.cpp | 34 ++-- xml_converter/src/category_gen.hpp | 2 +- xml_converter/src/icon_gen.cpp | 175 +++++++++++------- xml_converter/src/icon_gen.hpp | 3 +- xml_converter/src/parseable.cpp | 18 +- xml_converter/src/parseable.hpp | 6 +- xml_converter/src/trail_gen.cpp | 72 +++---- xml_converter/src/trail_gen.hpp | 2 +- xml_converter/src/xml_converter.cpp | 74 ++++---- 25 files changed, 264 insertions(+), 209 deletions(-) diff --git a/xml_converter/generators/cpp_templates/attribute_template.hpp b/xml_converter/generators/cpp_templates/attribute_template.hpp index eae924a5..11eeca18 100644 --- a/xml_converter/generators/cpp_templates/attribute_template.hpp +++ b/xml_converter/generators/cpp_templates/attribute_template.hpp @@ -11,7 +11,7 @@ class XMLError; enum {{class_name}} { {% for attribute_variable in attribute_variables: %} - {{attribute_variable.attribute_name}}, + {{attribute_variable.attribute_name}}, {% endfor %} }; {% else: %} diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index 6d23ca94..0b544e0d 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -1,5 +1,6 @@ #include "{{cpp_class_header}}_gen.hpp" +#include {% for absolute_include in cpp_includes.sorted_cpp_absolute_includes() %} #include <{{absolute_include}}> {% endfor %} @@ -117,27 +118,31 @@ vector {{cpp_class}}::as_xml() const { return xml_node_contents; } -waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf(waypoint::{{cpp_class}} proto_{{cpp_class_header}}) const { +waypoint::Waypoint {{cpp_class}}::as_protobuf() const { + waypoint::{{cpp_class}} proto_{{cpp_class_header}}; {% if cpp_class == "Icon": %} - waypoint::Trigger* trigger = new waypoint::Trigger(); - bool set_trigger = false; + waypoint::Trigger* trigger = nullptr; {% endif %} {%for attribute_variable in attribute_variables%} {% if (attribute_variable.is_trigger == true)%} {% if (attribute_variable.attribute_type == "Custom")%} if (this->{{attribute_variable.attribute_name}}_is_set) { + if (trigger == nullptr) { + trigger = new waypoint::Trigger(); + } trigger->set_allocated_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); - set_trigger = true; } {% else: %} if (this->{{attribute_variable.attribute_name}}_is_set) { + if (trigger == nullptr) { + trigger = new waypoint::Trigger(); + } trigger->set_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); - set_trigger = true; } {% endif %} {% else: %} {% if (attribute_variable.attribute_type == "Custom" and attribute_variable.class_name == "TrailDataMapId")%} -//TODO: TrailDataMapID is different +//TODO: TrailDataMapID is currently not implemented {% elif (attribute_variable.attribute_type == "Enum")%} if (this->{{attribute_variable.attribute_name}}_is_set) { proto_{{cpp_class_header}}.set_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); @@ -149,24 +154,26 @@ waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf(waypoint::{{cpp_class}} proto {% elif attribute_variable.is_child == true%} {% else: %} if (this->{{attribute_variable.attribute_name}}_is_set) { - proto_{{cpp_class_header}}.set_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); + proto_{{cpp_class_header}}.set_{{attribute_variable.protobuf_field}}(this->{{attribute_variable.attribute_name}}); } {% endif %} {% endif %} {% endfor %} {% if cpp_class == "Icon": %} - if (set_trigger) { + if (trigger != nullptr) { proto_{{cpp_class_header}}.set_allocated_trigger(trigger); } {% endif %} {% if cpp_class == "Category": %} for (const auto& [key, val] : this->children) { - waypoint::{{cpp_class}} proto_{{cpp_class_header}}_child; - proto_{{cpp_class_header}}_child = val.as_protobuf(proto_{{cpp_class_header}}_child); - proto_{{cpp_class_header}}.add_children()->CopyFrom(proto_{{cpp_class_header}}_child); + waypoint::Waypoint proto_{{cpp_class_header}}_child = val.as_protobuf(); + + proto_{{cpp_class_header}}.add_children()->CopyFrom(proto_{{cpp_class_header}}_child.{{cpp_class_header}}(0)); } {% endif %} - return proto_{{cpp_class_header}}; + waypoint::Waypoint output; + output.add_{{cpp_class_header}}()->CopyFrom(proto_{{cpp_class_header}}); + return output; } void {{cpp_class}}::parse_protobuf(waypoint::{{cpp_class}} proto_{{cpp_class_header}}) { @@ -182,12 +189,17 @@ void {{cpp_class}}::parse_protobuf(waypoint::{{cpp_class}} proto_{{cpp_class_hea } {% elif attribute_variable.class_name == "string" %} if (trigger.{{attribute_variable.protobuf_field}}() != "") { + this->{{attribute_variable.attribute_name}} = trigger.{{attribute_variable.protobuf_field}}(); + this->{{attribute_variable.attribute_name}}_is_set = true; + } + {% elif (attribute_variable.attribute_type == "Enum") %} + if (trigger.{{attribute_variable.protobuf_field}}() != 0) { this->{{attribute_variable.attribute_name}} = from_proto_{{attribute_variable.class_name}}(trigger.{{attribute_variable.protobuf_field}}()); this->{{attribute_variable.attribute_name}}_is_set = true; } {% else: %} if (trigger.{{attribute_variable.protobuf_field}}() != 0) { - this->{{attribute_variable.attribute_name}} = from_proto_{{attribute_variable.class_name}}(trigger.{{attribute_variable.protobuf_field}}()); + this->{{attribute_variable.attribute_name}} = trigger.{{attribute_variable.protobuf_field}}(); this->{{attribute_variable.attribute_name}}_is_set = true; } {% endif %} @@ -206,12 +218,12 @@ void {{cpp_class}}::parse_protobuf(waypoint::{{cpp_class}} proto_{{cpp_class_hea {% elif attribute_variable.is_child == true%} {% elif attribute_variable.class_name == "string" %} if (proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}() != "") { - this->{{attribute_variable.attribute_name}} = from_proto_{{attribute_variable.class_name}}(proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}()); + this->{{attribute_variable.attribute_name}} = proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}(); this->{{attribute_variable.attribute_name}}_is_set = true; } {% else: %} if (proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}() != 0) { - this->{{attribute_variable.attribute_name}} = from_proto_{{attribute_variable.class_name}}(proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}()); + this->{{attribute_variable.attribute_name}} = proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}(); this->{{attribute_variable.attribute_name}}_is_set = true; } {% endif %} diff --git a/xml_converter/generators/cpp_templates/class_template.hpp b/xml_converter/generators/cpp_templates/class_template.hpp index 5d38d078..91f123c7 100644 --- a/xml_converter/generators/cpp_templates/class_template.hpp +++ b/xml_converter/generators/cpp_templates/class_template.hpp @@ -20,9 +20,6 @@ class {{cpp_class}} : public Parseable { {% for attribute_variable in attribute_variables: %} bool {{attribute_variable.attribute_name}}_is_set = false; {% endfor %} - {% if cpp_class == "Icon": %} - bool set_trigger = false; - {% endif %} {% if cpp_class == "Category": %} std::map children; Icon default_icon; @@ -33,7 +30,7 @@ class {{cpp_class}} : public Parseable { virtual std::vector as_xml() const; virtual std::string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors); - waypoint::{{cpp_class}} as_protobuf(waypoint::{{cpp_class}}) const; + virtual waypoint::Waypoint as_protobuf() const; void parse_protobuf(waypoint::{{cpp_class}} proto_{{cpp_class_header}}); {% if attributes_of_type_marker_category %} bool validate_attributes_of_type_marker_category(); diff --git a/xml_converter/generators/cpp_templates/enum.cpp b/xml_converter/generators/cpp_templates/enum.cpp index 1afaed9d..38637383 100644 --- a/xml_converter/generators/cpp_templates/enum.cpp +++ b/xml_converter/generators/cpp_templates/enum.cpp @@ -1,5 +1,6 @@ #include "{{attribute_name}}_gen.hpp" +#include #include #include #include diff --git a/xml_converter/generators/cpp_templates/multiflagvalue.cpp b/xml_converter/generators/cpp_templates/multiflagvalue.cpp index 21fd8c18..dfac2298 100644 --- a/xml_converter/generators/cpp_templates/multiflagvalue.cpp +++ b/xml_converter/generators/cpp_templates/multiflagvalue.cpp @@ -1,5 +1,6 @@ #include "{{attribute_name}}_gen.hpp" +#include #include #include #include diff --git a/xml_converter/src/attribute/color.hpp b/xml_converter/src/attribute/color.hpp index 43c76d61..0d53fd1d 100644 --- a/xml_converter/src/attribute/color.hpp +++ b/xml_converter/src/attribute/color.hpp @@ -6,9 +6,7 @@ #include "../rapidxml-1.13/rapidxml.hpp" class XMLError; -namespace waypoint { -class Color; -} +namespace waypoint {class Color;} class Color { public: diff --git a/xml_converter/src/attribute/cull_chirality_gen.cpp b/xml_converter/src/attribute/cull_chirality_gen.cpp index d900ea76..eb11df49 100644 --- a/xml_converter/src/attribute/cull_chirality_gen.cpp +++ b/xml_converter/src/attribute/cull_chirality_gen.cpp @@ -1,5 +1,6 @@ #include "cull_chirality_gen.hpp" +#include #include #include #include diff --git a/xml_converter/src/attribute/cull_chirality_gen.hpp b/xml_converter/src/attribute/cull_chirality_gen.hpp index 793574c6..ff3a14db 100644 --- a/xml_converter/src/attribute/cull_chirality_gen.hpp +++ b/xml_converter/src/attribute/cull_chirality_gen.hpp @@ -9,9 +9,9 @@ class XMLError; enum CullChirality { - clockwise, - counter_clockwise, - none, + clockwise, + counter_clockwise, + none, }; CullChirality parse_cull_chirality(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_cull_chirality(CullChirality attribute_value); diff --git a/xml_converter/src/attribute/festival_filter_gen.cpp b/xml_converter/src/attribute/festival_filter_gen.cpp index ad8bb840..a502abb0 100644 --- a/xml_converter/src/attribute/festival_filter_gen.cpp +++ b/xml_converter/src/attribute/festival_filter_gen.cpp @@ -1,5 +1,6 @@ #include "festival_filter_gen.hpp" +#include #include #include #include diff --git a/xml_converter/src/attribute/map_type_filter_gen.cpp b/xml_converter/src/attribute/map_type_filter_gen.cpp index 0d20171c..afcc21ed 100644 --- a/xml_converter/src/attribute/map_type_filter_gen.cpp +++ b/xml_converter/src/attribute/map_type_filter_gen.cpp @@ -1,5 +1,6 @@ #include "map_type_filter_gen.hpp" +#include #include #include #include diff --git a/xml_converter/src/attribute/mount_filter_gen.cpp b/xml_converter/src/attribute/mount_filter_gen.cpp index d3781ca2..cb1f86dd 100644 --- a/xml_converter/src/attribute/mount_filter_gen.cpp +++ b/xml_converter/src/attribute/mount_filter_gen.cpp @@ -1,5 +1,6 @@ #include "mount_filter_gen.hpp" +#include #include #include #include diff --git a/xml_converter/src/attribute/profession_filter_gen.cpp b/xml_converter/src/attribute/profession_filter_gen.cpp index bbebcab0..e5c41af8 100644 --- a/xml_converter/src/attribute/profession_filter_gen.cpp +++ b/xml_converter/src/attribute/profession_filter_gen.cpp @@ -1,5 +1,6 @@ #include "profession_filter_gen.hpp" +#include #include #include #include diff --git a/xml_converter/src/attribute/reset_behavior_gen.cpp b/xml_converter/src/attribute/reset_behavior_gen.cpp index b5211d25..00e70060 100644 --- a/xml_converter/src/attribute/reset_behavior_gen.cpp +++ b/xml_converter/src/attribute/reset_behavior_gen.cpp @@ -1,5 +1,6 @@ #include "reset_behavior_gen.hpp" +#include #include #include #include diff --git a/xml_converter/src/attribute/reset_behavior_gen.hpp b/xml_converter/src/attribute/reset_behavior_gen.hpp index 56708961..acd08189 100644 --- a/xml_converter/src/attribute/reset_behavior_gen.hpp +++ b/xml_converter/src/attribute/reset_behavior_gen.hpp @@ -9,15 +9,15 @@ class XMLError; enum ResetBehavior { - always_visible, - daily_reset, - daily_reset_per_character, - instance_change, - map_change, - map_reset, - never, - timer, - weekly_reset, + always_visible, + daily_reset, + daily_reset_per_character, + instance_change, + map_change, + map_reset, + never, + timer, + weekly_reset, }; ResetBehavior parse_reset_behavior(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_reset_behavior(ResetBehavior attribute_value); diff --git a/xml_converter/src/attribute/specialization_filter_gen.cpp b/xml_converter/src/attribute/specialization_filter_gen.cpp index 1a141ea3..8c7d6940 100644 --- a/xml_converter/src/attribute/specialization_filter_gen.cpp +++ b/xml_converter/src/attribute/specialization_filter_gen.cpp @@ -1,5 +1,6 @@ #include "specialization_filter_gen.hpp" +#include #include #include #include diff --git a/xml_converter/src/attribute/species_filter_gen.cpp b/xml_converter/src/attribute/species_filter_gen.cpp index 5cf363ca..a8be6b0a 100644 --- a/xml_converter/src/attribute/species_filter_gen.cpp +++ b/xml_converter/src/attribute/species_filter_gen.cpp @@ -1,5 +1,6 @@ #include "species_filter_gen.hpp" +#include #include #include #include diff --git a/xml_converter/src/category_gen.cpp b/xml_converter/src/category_gen.cpp index 14b7acc6..f105b72b 100644 --- a/xml_converter/src/category_gen.cpp +++ b/xml_converter/src/category_gen.cpp @@ -1,5 +1,6 @@ #include "category_gen.hpp" +#include #include #include #include @@ -92,49 +93,52 @@ vector Category::as_xml() const { return xml_node_contents; } -waypoint::Category Category::as_protobuf(waypoint::Category proto_category) const { +waypoint::Waypoint Category::as_protobuf() const { + waypoint::Category proto_category; if (this->default_visibility_is_set) { - proto_category.set_default_visibility(to_proto_bool(this->default_visibility)); + proto_category.set_default_visibility(this->default_visibility); } if (this->display_name_is_set) { - proto_category.set_display_name(to_proto_string(this->display_name)); + proto_category.set_display_name(this->display_name); } if (this->is_separator_is_set) { - proto_category.set_is_separator(to_proto_bool(this->is_separator)); + proto_category.set_is_separator(this->is_separator); } if (this->name_is_set) { - proto_category.set_name(to_proto_string(this->name)); + proto_category.set_name(this->name); } if (this->tooltip_description_is_set) { - proto_category.set_tip_description(to_proto_string(this->tooltip_description)); + proto_category.set_tip_description(this->tooltip_description); } for (const auto& [key, val] : this->children) { - waypoint::Category proto_category_child; - proto_category_child = val.as_protobuf(proto_category_child); - proto_category.add_children()->CopyFrom(proto_category_child); + waypoint::Waypoint proto_category_child = val.as_protobuf(); + + proto_category.add_children()->CopyFrom(proto_category_child.category(0)); } - return proto_category; + waypoint::Waypoint output; + output.add_category()->CopyFrom(proto_category); + return output; } void Category::parse_protobuf(waypoint::Category proto_category) { if (proto_category.default_visibility() != 0) { - this->default_visibility = from_proto_bool(proto_category.default_visibility()); + this->default_visibility = proto_category.default_visibility(); this->default_visibility_is_set = true; } if (proto_category.display_name() != "") { - this->display_name = from_proto_string(proto_category.display_name()); + this->display_name = proto_category.display_name(); this->display_name_is_set = true; } if (proto_category.is_separator() != 0) { - this->is_separator = from_proto_bool(proto_category.is_separator()); + this->is_separator = proto_category.is_separator(); this->is_separator_is_set = true; } if (proto_category.name() != "") { - this->name = from_proto_string(proto_category.name()); + this->name = proto_category.name(); this->name_is_set = true; } if (proto_category.tip_description() != "") { - this->tooltip_description = from_proto_string(proto_category.tip_description()); + this->tooltip_description = proto_category.tip_description(); this->tooltip_description_is_set = true; } } diff --git a/xml_converter/src/category_gen.hpp b/xml_converter/src/category_gen.hpp index fe96fb39..5aeac6fd 100644 --- a/xml_converter/src/category_gen.hpp +++ b/xml_converter/src/category_gen.hpp @@ -32,6 +32,6 @@ class Category : public Parseable { virtual std::vector as_xml() const; virtual std::string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors); - waypoint::Category as_protobuf(waypoint::Category) const; + virtual waypoint::Waypoint as_protobuf() const; void parse_protobuf(waypoint::Category proto_category); }; diff --git a/xml_converter/src/icon_gen.cpp b/xml_converter/src/icon_gen.cpp index b259ef9e..a0836710 100644 --- a/xml_converter/src/icon_gen.cpp +++ b/xml_converter/src/icon_gen.cpp @@ -1,5 +1,6 @@ #include "icon_gen.hpp" +#include #include #include @@ -459,36 +460,44 @@ vector Icon::as_xml() const { return xml_node_contents; } -waypoint::Icon Icon::as_protobuf(waypoint::Icon proto_icon) const { - waypoint::Trigger* trigger = new waypoint::Trigger(); - bool set_trigger = false; +waypoint::Waypoint Icon::as_protobuf() const { + waypoint::Icon proto_icon; + waypoint::Trigger* trigger = nullptr; if (this->achievement_bitmask_is_set) { - proto_icon.set_achievement_bit(to_proto_int(this->achievement_bitmask)); + proto_icon.set_achievement_bit(this->achievement_bitmask); } if (this->achievement_id_is_set) { - proto_icon.set_achievement_id(to_proto_int(this->achievement_id)); + proto_icon.set_achievement_id(this->achievement_id); } if (this->alpha_is_set) { - proto_icon.set_alpha(to_proto_float(this->alpha)); + proto_icon.set_alpha(this->alpha); } if (this->auto_trigger_is_set) { + if (trigger == nullptr) { + trigger = new waypoint::Trigger(); + } trigger->set_auto_trigger(to_proto_bool(this->auto_trigger)); - set_trigger = true; } if (this->bounce_delay_is_set) { + if (trigger == nullptr) { + trigger = new waypoint::Trigger(); + } trigger->set_bounce_delay(to_proto_float(this->bounce_delay)); - set_trigger = true; } if (this->bounce_duration_is_set) { + if (trigger == nullptr) { + trigger = new waypoint::Trigger(); + } trigger->set_bounce_duration(to_proto_float(this->bounce_duration)); - set_trigger = true; } if (this->bounce_height_is_set) { + if (trigger == nullptr) { + trigger = new waypoint::Trigger(); + } trigger->set_bounce_height(to_proto_float(this->bounce_height)); - set_trigger = true; } if (this->can_fade_is_set) { - proto_icon.set_can_fade(to_proto_bool(this->can_fade)); + proto_icon.set_can_fade(this->can_fade); } if (this->category_is_set) { proto_icon.set_allocated_category(to_proto_marker_category(this->category)); @@ -497,21 +506,25 @@ waypoint::Icon Icon::as_protobuf(waypoint::Icon proto_icon) const { proto_icon.set_allocated_color(to_proto_color(this->color)); } if (this->copy_clipboard_is_set) { + if (trigger == nullptr) { + trigger = new waypoint::Trigger(); + } trigger->set_action_copy_clipboard(to_proto_string(this->copy_clipboard)); - set_trigger = true; } if (this->copy_message_is_set) { + if (trigger == nullptr) { + trigger = new waypoint::Trigger(); + } trigger->set_action_copy_message(to_proto_string(this->copy_message)); - set_trigger = true; } if (this->cull_chirality_is_set) { proto_icon.set_cull_chirality(to_proto_cull_chirality(this->cull_chirality)); } if (this->distance_fade_end_is_set) { - proto_icon.set_distance_fade_end(to_proto_float(this->distance_fade_end)); + proto_icon.set_distance_fade_end(this->distance_fade_end); } if (this->distance_fade_start_is_set) { - proto_icon.set_distance_fade_start(to_proto_float(this->distance_fade_start)); + proto_icon.set_distance_fade_start(this->distance_fade_start); } if (this->euler_rotation_is_set) { proto_icon.set_allocated_euler_rotation(to_proto_euler_rotation(this->euler_rotation)); @@ -523,44 +536,52 @@ waypoint::Icon Icon::as_protobuf(waypoint::Icon proto_icon) const { proto_icon.set_allocated_guid(to_proto_unique_id(this->guid)); } if (this->has_countdown_is_set) { + if (trigger == nullptr) { + trigger = new waypoint::Trigger(); + } trigger->set_has_countdown(to_proto_bool(this->has_countdown)); - set_trigger = true; } if (this->heightoffset_is_set) { - proto_icon.set_height_offset(to_proto_float(this->heightoffset)); + proto_icon.set_height_offset(this->heightoffset); } if (this->hide_category_is_set) { + if (trigger == nullptr) { + trigger = new waypoint::Trigger(); + } trigger->set_allocated_action_hide_category(to_proto_marker_category(this->hide_category)); - set_trigger = true; } if (this->icon_is_set) { proto_icon.set_allocated_texture(to_proto_image(this->icon)); } if (this->icon_size_is_set) { - proto_icon.set___tentative__scale(to_proto_float(this->icon_size)); + proto_icon.set___tentative__scale(this->icon_size); } if (this->info_message_is_set) { + if (trigger == nullptr) { + trigger = new waypoint::Trigger(); + } trigger->set_action_info_message(to_proto_string(this->info_message)); - set_trigger = true; } if (this->invert_visibility_is_set) { + if (trigger == nullptr) { + trigger = new waypoint::Trigger(); + } trigger->set_invert_display(to_proto_bool(this->invert_visibility)); - set_trigger = true; } if (this->map_display_size_is_set) { - proto_icon.set_map_display_size(to_proto_int(this->map_display_size)); + proto_icon.set_map_display_size(this->map_display_size); } if (this->map_id_is_set) { - proto_icon.set_map_id(to_proto_int(this->map_id)); + proto_icon.set_map_id(this->map_id); } if (this->map_type_filter_is_set) { proto_icon.set_allocated_map_type_filter(to_proto_map_type_filter(this->map_type_filter)); } if (this->maximum_size_on_screen_is_set) { - proto_icon.set_maximum_size_on_screen(to_proto_int(this->maximum_size_on_screen)); + proto_icon.set_maximum_size_on_screen(this->maximum_size_on_screen); } if (this->minimum_size_on_screen_is_set) { - proto_icon.set_minimum_size_on_screen(to_proto_int(this->minimum_size_on_screen)); + proto_icon.set_minimum_size_on_screen(this->minimum_size_on_screen); } if (this->mount_filter_is_set) { proto_icon.set_allocated_mount_filter(to_proto_mount_filter(this->mount_filter)); @@ -572,34 +593,40 @@ waypoint::Icon Icon::as_protobuf(waypoint::Icon proto_icon) const { proto_icon.set_allocated_profession_filter(to_proto_profession_filter(this->profession_filter)); } if (this->render_ingame_is_set) { - proto_icon.set___tentative__render_ingame(to_proto_bool(this->render_ingame)); + proto_icon.set___tentative__render_ingame(this->render_ingame); } if (this->render_on_map_is_set) { - proto_icon.set___tentative__render_on_map(to_proto_bool(this->render_on_map)); + proto_icon.set___tentative__render_on_map(this->render_on_map); } if (this->render_on_minimap_is_set) { - proto_icon.set___tentative__render_on_minimap(to_proto_bool(this->render_on_minimap)); + proto_icon.set___tentative__render_on_minimap(this->render_on_minimap); } if (this->reset_behavior_is_set) { + if (trigger == nullptr) { + trigger = new waypoint::Trigger(); + } trigger->set_reset_behavior(to_proto_reset_behavior(this->reset_behavior)); - set_trigger = true; } if (this->reset_length_is_set) { + if (trigger == nullptr) { + trigger = new waypoint::Trigger(); + } trigger->set_reset_length(to_proto_float(this->reset_length)); - set_trigger = true; } if (this->scale_on_map_with_zoom_is_set) { - proto_icon.set_scale_on_map_with_zoom(to_proto_bool(this->scale_on_map_with_zoom)); + proto_icon.set_scale_on_map_with_zoom(this->scale_on_map_with_zoom); } if (this->schedule_is_set) { - proto_icon.set_bhdraft__schedule(to_proto_string(this->schedule)); + proto_icon.set_bhdraft__schedule(this->schedule); } if (this->schedule_duration_is_set) { - proto_icon.set_bhdraft__schedule_duration(to_proto_float(this->schedule_duration)); + proto_icon.set_bhdraft__schedule_duration(this->schedule_duration); } if (this->show_category_is_set) { + if (trigger == nullptr) { + trigger = new waypoint::Trigger(); + } trigger->set_allocated_action_show_category(to_proto_marker_category(this->show_category)); - set_trigger = true; } if (this->specialization_filter_is_set) { proto_icon.set_allocated_specialization_filter(to_proto_specialization_filter(this->specialization_filter)); @@ -608,57 +635,63 @@ waypoint::Icon Icon::as_protobuf(waypoint::Icon proto_icon) const { proto_icon.set_allocated_species_filter(to_proto_species_filter(this->species_filter)); } if (this->toggle_category_is_set) { + if (trigger == nullptr) { + trigger = new waypoint::Trigger(); + } trigger->set_allocated_action_toggle_category(to_proto_marker_category(this->toggle_category)); - set_trigger = true; } if (this->tooltip_description_is_set) { - proto_icon.set_tip_description(to_proto_string(this->tooltip_description)); + proto_icon.set_tip_description(this->tooltip_description); } if (this->tooltip_name_is_set) { - proto_icon.set_tip_name(to_proto_string(this->tooltip_name)); + proto_icon.set_tip_name(this->tooltip_name); } if (this->trigger_range_is_set) { + if (trigger == nullptr) { + trigger = new waypoint::Trigger(); + } trigger->set_range(to_proto_float(this->trigger_range)); - set_trigger = true; } - if (set_trigger) { + if (trigger != nullptr) { proto_icon.set_allocated_trigger(trigger); } - return proto_icon; + waypoint::Waypoint output; + output.add_icon()->CopyFrom(proto_icon); + return output; } void Icon::parse_protobuf(waypoint::Icon proto_icon) { waypoint::Trigger trigger = proto_icon.trigger(); if (proto_icon.achievement_bit() != 0) { - this->achievement_bitmask = from_proto_int(proto_icon.achievement_bit()); + this->achievement_bitmask = proto_icon.achievement_bit(); this->achievement_bitmask_is_set = true; } if (proto_icon.achievement_id() != 0) { - this->achievement_id = from_proto_int(proto_icon.achievement_id()); + this->achievement_id = proto_icon.achievement_id(); this->achievement_id_is_set = true; } if (proto_icon.alpha() != 0) { - this->alpha = from_proto_float(proto_icon.alpha()); + this->alpha = proto_icon.alpha(); this->alpha_is_set = true; } if (trigger.auto_trigger() != 0) { - this->auto_trigger = from_proto_bool(trigger.auto_trigger()); + this->auto_trigger = trigger.auto_trigger(); this->auto_trigger_is_set = true; } if (trigger.bounce_delay() != 0) { - this->bounce_delay = from_proto_float(trigger.bounce_delay()); + this->bounce_delay = trigger.bounce_delay(); this->bounce_delay_is_set = true; } if (trigger.bounce_duration() != 0) { - this->bounce_duration = from_proto_float(trigger.bounce_duration()); + this->bounce_duration = trigger.bounce_duration(); this->bounce_duration_is_set = true; } if (trigger.bounce_height() != 0) { - this->bounce_height = from_proto_float(trigger.bounce_height()); + this->bounce_height = trigger.bounce_height(); this->bounce_height_is_set = true; } if (proto_icon.can_fade() != 0) { - this->can_fade = from_proto_bool(proto_icon.can_fade()); + this->can_fade = proto_icon.can_fade(); this->can_fade_is_set = true; } if (proto_icon.has_category()) { @@ -670,11 +703,11 @@ void Icon::parse_protobuf(waypoint::Icon proto_icon) { this->color_is_set = true; } if (trigger.action_copy_clipboard() != "") { - this->copy_clipboard = from_proto_string(trigger.action_copy_clipboard()); + this->copy_clipboard = trigger.action_copy_clipboard(); this->copy_clipboard_is_set = true; } if (trigger.action_copy_message() != "") { - this->copy_message = from_proto_string(trigger.action_copy_message()); + this->copy_message = trigger.action_copy_message(); this->copy_message_is_set = true; } if (proto_icon.cull_chirality() != 0) { @@ -682,11 +715,11 @@ void Icon::parse_protobuf(waypoint::Icon proto_icon) { this->cull_chirality_is_set = true; } if (proto_icon.distance_fade_end() != 0) { - this->distance_fade_end = from_proto_float(proto_icon.distance_fade_end()); + this->distance_fade_end = proto_icon.distance_fade_end(); this->distance_fade_end_is_set = true; } if (proto_icon.distance_fade_start() != 0) { - this->distance_fade_start = from_proto_float(proto_icon.distance_fade_start()); + this->distance_fade_start = proto_icon.distance_fade_start(); this->distance_fade_start_is_set = true; } if (proto_icon.has_euler_rotation()) { @@ -702,11 +735,11 @@ void Icon::parse_protobuf(waypoint::Icon proto_icon) { this->guid_is_set = true; } if (trigger.has_countdown() != 0) { - this->has_countdown = from_proto_bool(trigger.has_countdown()); + this->has_countdown = trigger.has_countdown(); this->has_countdown_is_set = true; } if (proto_icon.height_offset() != 0) { - this->heightoffset = from_proto_float(proto_icon.height_offset()); + this->heightoffset = proto_icon.height_offset(); this->heightoffset_is_set = true; } if (trigger.has_action_hide_category()) { @@ -718,23 +751,23 @@ void Icon::parse_protobuf(waypoint::Icon proto_icon) { this->icon_is_set = true; } if (proto_icon.__tentative__scale() != 0) { - this->icon_size = from_proto_float(proto_icon.__tentative__scale()); + this->icon_size = proto_icon.__tentative__scale(); this->icon_size_is_set = true; } if (trigger.action_info_message() != "") { - this->info_message = from_proto_string(trigger.action_info_message()); + this->info_message = trigger.action_info_message(); this->info_message_is_set = true; } if (trigger.invert_display() != 0) { - this->invert_visibility = from_proto_bool(trigger.invert_display()); + this->invert_visibility = trigger.invert_display(); this->invert_visibility_is_set = true; } if (proto_icon.map_display_size() != 0) { - this->map_display_size = from_proto_int(proto_icon.map_display_size()); + this->map_display_size = proto_icon.map_display_size(); this->map_display_size_is_set = true; } if (proto_icon.map_id() != 0) { - this->map_id = from_proto_int(proto_icon.map_id()); + this->map_id = proto_icon.map_id(); this->map_id_is_set = true; } if (proto_icon.has_map_type_filter()) { @@ -742,11 +775,11 @@ void Icon::parse_protobuf(waypoint::Icon proto_icon) { this->map_type_filter_is_set = true; } if (proto_icon.maximum_size_on_screen() != 0) { - this->maximum_size_on_screen = from_proto_int(proto_icon.maximum_size_on_screen()); + this->maximum_size_on_screen = proto_icon.maximum_size_on_screen(); this->maximum_size_on_screen_is_set = true; } if (proto_icon.minimum_size_on_screen() != 0) { - this->minimum_size_on_screen = from_proto_int(proto_icon.minimum_size_on_screen()); + this->minimum_size_on_screen = proto_icon.minimum_size_on_screen(); this->minimum_size_on_screen_is_set = true; } if (proto_icon.has_mount_filter()) { @@ -762,15 +795,15 @@ void Icon::parse_protobuf(waypoint::Icon proto_icon) { this->profession_filter_is_set = true; } if (proto_icon.__tentative__render_ingame() != 0) { - this->render_ingame = from_proto_bool(proto_icon.__tentative__render_ingame()); + this->render_ingame = proto_icon.__tentative__render_ingame(); this->render_ingame_is_set = true; } if (proto_icon.__tentative__render_on_map() != 0) { - this->render_on_map = from_proto_bool(proto_icon.__tentative__render_on_map()); + this->render_on_map = proto_icon.__tentative__render_on_map(); this->render_on_map_is_set = true; } if (proto_icon.__tentative__render_on_minimap() != 0) { - this->render_on_minimap = from_proto_bool(proto_icon.__tentative__render_on_minimap()); + this->render_on_minimap = proto_icon.__tentative__render_on_minimap(); this->render_on_minimap_is_set = true; } if (trigger.reset_behavior() != 0) { @@ -778,19 +811,19 @@ void Icon::parse_protobuf(waypoint::Icon proto_icon) { this->reset_behavior_is_set = true; } if (trigger.reset_length() != 0) { - this->reset_length = from_proto_float(trigger.reset_length()); + this->reset_length = trigger.reset_length(); this->reset_length_is_set = true; } if (proto_icon.scale_on_map_with_zoom() != 0) { - this->scale_on_map_with_zoom = from_proto_bool(proto_icon.scale_on_map_with_zoom()); + this->scale_on_map_with_zoom = proto_icon.scale_on_map_with_zoom(); this->scale_on_map_with_zoom_is_set = true; } if (proto_icon.bhdraft__schedule() != "") { - this->schedule = from_proto_string(proto_icon.bhdraft__schedule()); + this->schedule = proto_icon.bhdraft__schedule(); this->schedule_is_set = true; } if (proto_icon.bhdraft__schedule_duration() != 0) { - this->schedule_duration = from_proto_float(proto_icon.bhdraft__schedule_duration()); + this->schedule_duration = proto_icon.bhdraft__schedule_duration(); this->schedule_duration_is_set = true; } if (trigger.has_action_show_category()) { @@ -810,15 +843,15 @@ void Icon::parse_protobuf(waypoint::Icon proto_icon) { this->toggle_category_is_set = true; } if (proto_icon.tip_description() != "") { - this->tooltip_description = from_proto_string(proto_icon.tip_description()); + this->tooltip_description = proto_icon.tip_description(); this->tooltip_description_is_set = true; } if (proto_icon.tip_name() != "") { - this->tooltip_name = from_proto_string(proto_icon.tip_name()); + this->tooltip_name = proto_icon.tip_name(); this->tooltip_name_is_set = true; } if (trigger.range() != 0) { - this->trigger_range = from_proto_float(trigger.range()); + this->trigger_range = trigger.range(); this->trigger_range_is_set = true; } } diff --git a/xml_converter/src/icon_gen.hpp b/xml_converter/src/icon_gen.hpp index 3d9db836..5be08a0b 100644 --- a/xml_converter/src/icon_gen.hpp +++ b/xml_converter/src/icon_gen.hpp @@ -133,11 +133,10 @@ class Icon : public Parseable { bool y_rotation_is_set = false; bool z_position_is_set = false; bool z_rotation_is_set = false; - bool set_trigger = false; virtual std::vector as_xml() const; virtual std::string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors); - waypoint::Icon as_protobuf(waypoint::Icon) const; + virtual waypoint::Waypoint as_protobuf() const; void parse_protobuf(waypoint::Icon proto_icon); bool validate_attributes_of_type_marker_category(); }; diff --git a/xml_converter/src/parseable.cpp b/xml_converter/src/parseable.cpp index 5a201af3..87a3211b 100644 --- a/xml_converter/src/parseable.cpp +++ b/xml_converter/src/parseable.cpp @@ -1,5 +1,6 @@ #include "parseable.hpp" +#include #include #include #include @@ -39,17 +40,8 @@ std::vector Parseable::as_xml() const { return result; } -waypoint::Icon Parseable::as_protobuf(waypoint::Icon proto_Icon) const { - throw std::runtime_error("error: Parseable::as_proto() should not be called"); - return proto_Icon; -} - -waypoint::Trail Parseable::as_protobuf(waypoint::Trail proto_Trail) const { - throw std::runtime_error("error: Parseable::as_proto() should not be called"); - return proto_Trail; -} - -waypoint::Category Parseable::as_protobuf(waypoint::Category proto_Category) const { - throw std::runtime_error("error: Parseable::as_proto() should not be called"); - return proto_Category; +waypoint::Waypoint Parseable::as_protobuf() const { + throw std::runtime_error("error: Parseable::as_protobuf() should not be called"); + waypoint::Waypoint result; + return result; } diff --git a/xml_converter/src/parseable.hpp b/xml_converter/src/parseable.hpp index 54f33a23..8f1d7c6e 100644 --- a/xml_converter/src/parseable.hpp +++ b/xml_converter/src/parseable.hpp @@ -20,9 +20,5 @@ class Parseable { virtual std::vector as_xml() const; - virtual waypoint::Icon as_protobuf(waypoint::Icon proto_Icon) const; - - virtual waypoint::Trail as_protobuf(waypoint::Trail proto_Trail) const; - - virtual waypoint::Category as_protobuf(waypoint::Category proto_Category) const; + virtual waypoint::Waypoint as_protobuf() const; }; diff --git a/xml_converter/src/trail_gen.cpp b/xml_converter/src/trail_gen.cpp index 84e87194..c35576f6 100644 --- a/xml_converter/src/trail_gen.cpp +++ b/xml_converter/src/trail_gen.cpp @@ -1,5 +1,6 @@ #include "trail_gen.hpp" +#include #include #include @@ -266,21 +267,22 @@ vector Trail::as_xml() const { return xml_node_contents; } -waypoint::Trail Trail::as_protobuf(waypoint::Trail proto_trail) const { +waypoint::Waypoint Trail::as_protobuf() const { + waypoint::Trail proto_trail; if (this->achievement_bitmask_is_set) { - proto_trail.set_achievement_bit(to_proto_int(this->achievement_bitmask)); + proto_trail.set_achievement_bit(this->achievement_bitmask); } if (this->achievement_id_is_set) { - proto_trail.set_achievement_id(to_proto_int(this->achievement_id)); + proto_trail.set_achievement_id(this->achievement_id); } if (this->alpha_is_set) { - proto_trail.set_alpha(to_proto_float(this->alpha)); + proto_trail.set_alpha(this->alpha); } if (this->animation_speed_is_set) { - proto_trail.set_animation_speed(to_proto_float(this->animation_speed)); + proto_trail.set_animation_speed(this->animation_speed); } if (this->can_fade_is_set) { - proto_trail.set_can_fade(to_proto_bool(this->can_fade)); + proto_trail.set_can_fade(this->can_fade); } if (this->category_is_set) { proto_trail.set_allocated_category(to_proto_marker_category(this->category)); @@ -292,10 +294,10 @@ waypoint::Trail Trail::as_protobuf(waypoint::Trail proto_trail) const { proto_trail.set_cull_chirality(to_proto_cull_chirality(this->cull_chirality)); } if (this->distance_fade_end_is_set) { - proto_trail.set_distance_fade_end(to_proto_float(this->distance_fade_end)); + proto_trail.set_distance_fade_end(this->distance_fade_end); } if (this->distance_fade_start_is_set) { - proto_trail.set_distance_fade_start(to_proto_float(this->distance_fade_start)); + proto_trail.set_distance_fade_start(this->distance_fade_start); } if (this->festival_filter_is_set) { proto_trail.set_allocated_festival_filter(to_proto_festival_filter(this->festival_filter)); @@ -304,13 +306,13 @@ waypoint::Trail Trail::as_protobuf(waypoint::Trail proto_trail) const { proto_trail.set_allocated_guid(to_proto_unique_id(this->guid)); } if (this->is_wall_is_set) { - proto_trail.set_is_wall(to_proto_bool(this->is_wall)); + proto_trail.set_is_wall(this->is_wall); } if (this->map_display_size_is_set) { - proto_trail.set_map_display_size(to_proto_int(this->map_display_size)); + proto_trail.set_map_display_size(this->map_display_size); } if (this->map_id_is_set) { - proto_trail.set_map_id(to_proto_int(this->map_id)); + proto_trail.set_map_id(this->map_id); } if (this->map_type_filter_is_set) { proto_trail.set_allocated_map_type_filter(to_proto_map_type_filter(this->map_type_filter)); @@ -322,19 +324,19 @@ waypoint::Trail Trail::as_protobuf(waypoint::Trail proto_trail) const { proto_trail.set_allocated_profession_filter(to_proto_profession_filter(this->profession_filter)); } if (this->render_ingame_is_set) { - proto_trail.set___tentative__render_ingame(to_proto_bool(this->render_ingame)); + proto_trail.set___tentative__render_ingame(this->render_ingame); } if (this->render_on_map_is_set) { - proto_trail.set___tentative__render_on_map(to_proto_bool(this->render_on_map)); + proto_trail.set___tentative__render_on_map(this->render_on_map); } if (this->render_on_minimap_is_set) { - proto_trail.set___tentative__render_on_minimap(to_proto_bool(this->render_on_minimap)); + proto_trail.set___tentative__render_on_minimap(this->render_on_minimap); } if (this->schedule_is_set) { - proto_trail.set_bhdraft__schedule(to_proto_string(this->schedule)); + proto_trail.set_bhdraft__schedule(this->schedule); } if (this->schedule_duration_is_set) { - proto_trail.set_bhdraft__schedule_duration(to_proto_float(this->schedule_duration)); + proto_trail.set_bhdraft__schedule_duration(this->schedule_duration); } if (this->specialization_filter_is_set) { proto_trail.set_allocated_specialization_filter(to_proto_specialization_filter(this->specialization_filter)); @@ -349,30 +351,32 @@ waypoint::Trail Trail::as_protobuf(waypoint::Trail proto_trail) const { proto_trail.set_allocated_trail_data(to_proto_trail_data(this->trail_data)); } if (this->trail_scale_is_set) { - proto_trail.set_scale(to_proto_float(this->trail_scale)); + proto_trail.set_scale(this->trail_scale); } - return proto_trail; + waypoint::Waypoint output; + output.add_trail()->CopyFrom(proto_trail); + return output; } void Trail::parse_protobuf(waypoint::Trail proto_trail) { if (proto_trail.achievement_bit() != 0) { - this->achievement_bitmask = from_proto_int(proto_trail.achievement_bit()); + this->achievement_bitmask = proto_trail.achievement_bit(); this->achievement_bitmask_is_set = true; } if (proto_trail.achievement_id() != 0) { - this->achievement_id = from_proto_int(proto_trail.achievement_id()); + this->achievement_id = proto_trail.achievement_id(); this->achievement_id_is_set = true; } if (proto_trail.alpha() != 0) { - this->alpha = from_proto_float(proto_trail.alpha()); + this->alpha = proto_trail.alpha(); this->alpha_is_set = true; } if (proto_trail.animation_speed() != 0) { - this->animation_speed = from_proto_float(proto_trail.animation_speed()); + this->animation_speed = proto_trail.animation_speed(); this->animation_speed_is_set = true; } if (proto_trail.can_fade() != 0) { - this->can_fade = from_proto_bool(proto_trail.can_fade()); + this->can_fade = proto_trail.can_fade(); this->can_fade_is_set = true; } if (proto_trail.has_category()) { @@ -388,11 +392,11 @@ void Trail::parse_protobuf(waypoint::Trail proto_trail) { this->cull_chirality_is_set = true; } if (proto_trail.distance_fade_end() != 0) { - this->distance_fade_end = from_proto_float(proto_trail.distance_fade_end()); + this->distance_fade_end = proto_trail.distance_fade_end(); this->distance_fade_end_is_set = true; } if (proto_trail.distance_fade_start() != 0) { - this->distance_fade_start = from_proto_float(proto_trail.distance_fade_start()); + this->distance_fade_start = proto_trail.distance_fade_start(); this->distance_fade_start_is_set = true; } if (proto_trail.has_festival_filter()) { @@ -404,15 +408,15 @@ void Trail::parse_protobuf(waypoint::Trail proto_trail) { this->guid_is_set = true; } if (proto_trail.is_wall() != 0) { - this->is_wall = from_proto_bool(proto_trail.is_wall()); + this->is_wall = proto_trail.is_wall(); this->is_wall_is_set = true; } if (proto_trail.map_display_size() != 0) { - this->map_display_size = from_proto_int(proto_trail.map_display_size()); + this->map_display_size = proto_trail.map_display_size(); this->map_display_size_is_set = true; } if (proto_trail.map_id() != 0) { - this->map_id = from_proto_int(proto_trail.map_id()); + this->map_id = proto_trail.map_id(); this->map_id_is_set = true; } if (proto_trail.has_map_type_filter()) { @@ -428,23 +432,23 @@ void Trail::parse_protobuf(waypoint::Trail proto_trail) { this->profession_filter_is_set = true; } if (proto_trail.__tentative__render_ingame() != 0) { - this->render_ingame = from_proto_bool(proto_trail.__tentative__render_ingame()); + this->render_ingame = proto_trail.__tentative__render_ingame(); this->render_ingame_is_set = true; } if (proto_trail.__tentative__render_on_map() != 0) { - this->render_on_map = from_proto_bool(proto_trail.__tentative__render_on_map()); + this->render_on_map = proto_trail.__tentative__render_on_map(); this->render_on_map_is_set = true; } if (proto_trail.__tentative__render_on_minimap() != 0) { - this->render_on_minimap = from_proto_bool(proto_trail.__tentative__render_on_minimap()); + this->render_on_minimap = proto_trail.__tentative__render_on_minimap(); this->render_on_minimap_is_set = true; } if (proto_trail.bhdraft__schedule() != "") { - this->schedule = from_proto_string(proto_trail.bhdraft__schedule()); + this->schedule = proto_trail.bhdraft__schedule(); this->schedule_is_set = true; } if (proto_trail.bhdraft__schedule_duration() != 0) { - this->schedule_duration = from_proto_float(proto_trail.bhdraft__schedule_duration()); + this->schedule_duration = proto_trail.bhdraft__schedule_duration(); this->schedule_duration_is_set = true; } if (proto_trail.has_specialization_filter()) { @@ -464,7 +468,7 @@ void Trail::parse_protobuf(waypoint::Trail proto_trail) { this->trail_data_is_set = true; } if (proto_trail.scale() != 0) { - this->trail_scale = from_proto_float(proto_trail.scale()); + this->trail_scale = proto_trail.scale(); this->trail_scale_is_set = true; } } diff --git a/xml_converter/src/trail_gen.hpp b/xml_converter/src/trail_gen.hpp index 9046a2b6..032692e9 100644 --- a/xml_converter/src/trail_gen.hpp +++ b/xml_converter/src/trail_gen.hpp @@ -82,7 +82,7 @@ class Trail : public Parseable { virtual std::vector as_xml() const; virtual std::string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors); - waypoint::Trail as_protobuf(waypoint::Trail) const; + virtual waypoint::Waypoint as_protobuf() const; void parse_protobuf(waypoint::Trail proto_trail); bool validate_attributes_of_type_marker_category(); }; diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 25959e50..2be5b5b8 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -1,11 +1,13 @@ +#include #include #include -#include +#include #include #include #include #include #include +#include #include #include @@ -64,21 +66,18 @@ void write_protobuf_file(string proto_filepath, map* marker_ca outfile.open(proto_filepath, ios::out | ios_base::binary); for (const auto& category : *marker_categories) { - waypoint::Category proto_category; - proto_category = category.second.as_protobuf(proto_category); - proto_message.add_category()->CopyFrom(proto_category); + waypoint::Waypoint proto_category = category.second.as_protobuf(); + proto_message.add_category()->CopyFrom(proto_category.category(0)); } for (const auto& parsed_poi : *parsed_pois) { if (parsed_poi->classname() == "POI") { - waypoint::Icon proto_Icon; - proto_Icon = parsed_poi->as_protobuf(proto_Icon); - proto_message.add_icon()->CopyFrom(proto_Icon); + waypoint::Waypoint poi = parsed_poi->as_protobuf(); + proto_message.add_icon()->CopyFrom(poi.icon(0)); } if (parsed_poi->classname() == "Trail") { - waypoint::Trail proto_Trail; - proto_Trail = parsed_poi->as_protobuf(proto_Trail); - proto_message.add_trail()->CopyFrom(proto_Trail); + waypoint::Waypoint poi = parsed_poi->as_protobuf(); + proto_message.add_trail()->CopyFrom(poi.trail(0)); } } proto_message.SerializeToOstream(&outfile); @@ -264,27 +263,35 @@ bool filename_comp(string a, string b) { vector get_xml_files(string directory) { vector files; vector subfolders; - - for (const auto& entry : filesystem::directory_iterator(directory)) { - string path = entry.path(); - if (entry.is_directory()) { + string path; + DIR *dir = opendir(directory.c_str()); + struct dirent *entry = readdir(dir); + while ((entry = readdir(dir)) != NULL) { + if (entry->d_type == DT_DIR && has_suffix(directory, ".") == false) { + path = directory + "/"; + path += entry->d_name; subfolders.push_back(path); } + else if (has_suffix(entry->d_name, ".xml")) { + path = directory + "/"; + path += entry->d_name; + files.push_back(path); + } else { - if (has_suffix(path, ".xml")) { - files.push_back(path); - } + continue; } } + closedir(dir); std::sort(files.begin(), files.end(), filename_comp); std::sort(subfolders.begin(), subfolders.end(), filename_comp); - for (const string& subfolder : subfolders) { - vector subfiles = get_xml_files(subfolder); - files.insert(files.end(), subfiles.begin(), subfiles.end()); + for (const std::string &subfolder : subfolders) { + if (has_suffix(subfolder, ".") == false && has_suffix(subfolder, "..") == false) { + vector subfiles = get_xml_files(subfolder); + files.insert(files.end(), subfiles.begin(), subfiles.end()); + } } - return files; } @@ -301,10 +308,12 @@ void test_proto() { testcategory.set_display_name("TEST"); if (testcategory.name() != "") { cout << "Error in test_proto" << endl; + throw std::error_code(); } string output = testcategory.display_name(); if (output != "TEST") { cout << "Error in test_proto" << endl; + throw std::error_code(); } } @@ -315,16 +324,17 @@ int main() { map marker_categories; test_proto(); - for (const auto& entry : filesystem::directory_iterator("../packs")) { - string path = entry.path(); - - if (entry.is_directory()) { + string directory = "./packs"; + DIR *dir = opendir(directory.c_str()); + struct dirent *entry = readdir(dir); + while ((entry = readdir(dir)) != NULL) { + if (entry->d_type == DT_DIR) { + string path = directory + "/"; + path += entry->d_name; convert_taco_directory(path, &marker_categories, &parsed_pois); } - else { - continue; - } } + closedir(dir); auto end = chrono::high_resolution_clock::now(); auto dur = end - begin; @@ -332,14 +342,14 @@ int main() { cout << "The parse function took " << ms << " milliseconds to run" << endl; begin = chrono::high_resolution_clock::now(); - write_xml_file("../export_packs/export.xml", &marker_categories, &parsed_pois); + write_xml_file("./export_packs/export.xml", &marker_categories, &parsed_pois); end = chrono::high_resolution_clock::now(); dur = end - begin; ms = std::chrono::duration_cast(dur).count(); cout << "The xml write function took " << ms << " milliseconds to run" << endl; begin = chrono::high_resolution_clock::now(); - write_protobuf_file("../export_packs/export.data", &marker_categories, &parsed_pois); + write_protobuf_file("./export_packs/export.data", &marker_categories, &parsed_pois); end = chrono::high_resolution_clock::now(); dur = end - begin; ms = std::chrono::duration_cast(dur).count(); @@ -353,14 +363,14 @@ int main() { marker_categories.clear(); begin = chrono::high_resolution_clock::now(); - read_protobuf_file("../export_packs/export.data", &marker_categories, &parsed_pois); + read_protobuf_file("./export_packs/export.data", &marker_categories, &parsed_pois); end = chrono::high_resolution_clock::now(); dur = end - begin; ms = std::chrono::duration_cast(dur).count(); cout << "The protobuf read function took " << ms << " milliseconds to run" << endl; begin = chrono::high_resolution_clock::now(); - write_xml_file("../export_packs/export2.xml", &marker_categories, &parsed_pois); + write_xml_file("./export_packs/export2.xml", &marker_categories, &parsed_pois); end = chrono::high_resolution_clock::now(); dur = end - begin; ms = std::chrono::duration_cast(dur).count(); From 2159c3913b5f2e493ec74bf21f4f448a829fcd51 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sat, 10 Dec 2022 14:28:12 -0500 Subject: [PATCH 136/539] Addressing rest of comments on code review --- xml_converter/doc/trigger/toggle_category.md | 2 +- .../cpp_templates/attribute_template.hpp | 2 +- .../cpp_templates/class_template.cpp | 9 +- .../generators/cpp_templates/enum.cpp | 44 +- .../cpp_templates/multiflagvalue.cpp | 8 +- xml_converter/proto/waypoint.proto | 3 +- xml_converter/src/attribute/bool.cpp | 28 - xml_converter/src/attribute/bool.hpp | 4 - xml_converter/src/attribute/color.hpp | 4 +- .../src/attribute/cull_chirality_gen.cpp | 44 +- .../src/attribute/cull_chirality_gen.hpp | 6 +- .../src/attribute/festival_filter_gen.cpp | 56 +- xml_converter/src/attribute/float.cpp | 18 - xml_converter/src/attribute/float.hpp | 4 - xml_converter/src/attribute/int.cpp | 18 - xml_converter/src/attribute/int.hpp | 4 - .../src/attribute/map_type_filter_gen.cpp | 192 ++---- .../src/attribute/marker_category.cpp | 4 +- .../src/attribute/mount_filter_gen.cpp | 80 +-- .../src/attribute/profession_filter_gen.cpp | 72 +-- .../src/attribute/reset_behavior_gen.cpp | 158 ++--- .../src/attribute/reset_behavior_gen.hpp | 18 +- .../attribute/specialization_filter_gen.cpp | 576 +++++------------- .../src/attribute/species_filter_gen.cpp | 40 +- xml_converter/src/attribute/string.cpp | 22 - xml_converter/src/attribute/string.hpp | 4 - .../src/attribute/trail_data_map_id.cpp | 11 - .../src/attribute/trail_data_map_id.hpp | 2 - xml_converter/src/attribute/unique_id.cpp | 7 +- xml_converter/src/icon_gen.cpp | 22 +- xml_converter/src/xml_converter.cpp | 23 +- 31 files changed, 384 insertions(+), 1101 deletions(-) diff --git a/xml_converter/doc/trigger/toggle_category.md b/xml_converter/doc/trigger/toggle_category.md index 21b2881b..eb4b01bb 100644 --- a/xml_converter/doc/trigger/toggle_category.md +++ b/xml_converter/doc/trigger/toggle_category.md @@ -3,7 +3,7 @@ name: Toggle Category type: Custom class: MarkerCategory applies_to: [Icon] -xml_fields: [Toggle, toggleCategory] +xml_fields: [Toggle, ToggleCategory] protobuf_field: trigger.action_toggle_category compatability: [TacO, BlishHUD, Burrito] --- diff --git a/xml_converter/generators/cpp_templates/attribute_template.hpp b/xml_converter/generators/cpp_templates/attribute_template.hpp index 11eeca18..eae924a5 100644 --- a/xml_converter/generators/cpp_templates/attribute_template.hpp +++ b/xml_converter/generators/cpp_templates/attribute_template.hpp @@ -11,7 +11,7 @@ class XMLError; enum {{class_name}} { {% for attribute_variable in attribute_variables: %} - {{attribute_variable.attribute_name}}, + {{attribute_variable.attribute_name}}, {% endfor %} }; {% else: %} diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index 0b544e0d..4587cb7a 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -132,13 +132,20 @@ waypoint::Waypoint {{cpp_class}}::as_protobuf() const { } trigger->set_allocated_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); } - {% else: %} + {% elif (attribute_variable.attribute_type == "Enum")%} if (this->{{attribute_variable.attribute_name}}_is_set) { if (trigger == nullptr) { trigger = new waypoint::Trigger(); } trigger->set_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); } + {% else: %} + if (this->{{attribute_variable.attribute_name}}_is_set) { + if (trigger == nullptr) { + trigger = new waypoint::Trigger(); + } + trigger->set_{{attribute_variable.protobuf_field}}(this->{{attribute_variable.attribute_name}}); + } {% endif %} {% else: %} {% if (attribute_variable.attribute_type == "Custom" and attribute_variable.class_name == "TrailDataMapId")%} diff --git a/xml_converter/generators/cpp_templates/enum.cpp b/xml_converter/generators/cpp_templates/enum.cpp index 38637383..ce599a7d 100644 --- a/xml_converter/generators/cpp_templates/enum.cpp +++ b/xml_converter/generators/cpp_templates/enum.cpp @@ -55,43 +55,23 @@ string stringify_{{attribute_name}}({{class_name}} attribute_value) { } waypoint::{{class_name}} to_proto_{{attribute_name}}({{class_name}} attribute_value) { - waypoint::{{class_name}} proto_{{attribute_name}}; - {% for n, attribute_variable in enumerate(attribute_variables) %} - {% for i, value in enumerate(attribute_variable.xml_fields) %} - {% if i == 0 and n == 0: %} - if (attribute_value == {{class_name}}::{{attribute_variable.attribute_name}}) { - proto_{{attribute_name}} = waypoint::{{class_name}}::{{attribute_variable.attribute_name}}; - } - {% else: %} - else if (attribute_value == {{class_name}}::{{attribute_variable.attribute_name}}) { - proto_{{attribute_name}} = waypoint::{{class_name}}::{{attribute_variable.attribute_name}}; - } - {% endif %} - {% endfor %} + switch (attribute_value) { + {% for attribute_variable in attribute_variables %} + case {{class_name}}::{{attribute_variable.attribute_name}}: + return waypoint::{{class_name}}::{{attribute_variable.attribute_name}}; {% endfor %} - else { - proto_{{attribute_name}} = waypoint::{{class_name}}::{{attribute_variables[0].attribute_name}}; + default: + return waypoint::{{class_name}}::{{attribute_variables[0].attribute_name}}; } - return proto_{{attribute_name}}; } {{class_name}} from_proto_{{attribute_name}}(waypoint::{{class_name}} proto_{{attribute_name}}) { - {{class_name}} {{attribute_name}}; - {% for n, attribute_variable in enumerate(attribute_variables) %} - {% for i, value in enumerate(attribute_variable.xml_fields) %} - {% if i == 0 and n == 0: %} - if (proto_{{attribute_name}} == waypoint::{{class_name}}::{{attribute_variable.attribute_name}}) { - {{attribute_name}} = {{class_name}}::{{attribute_variable.attribute_name}}; - } - {% else: %} - else if (proto_{{attribute_name}} == waypoint::{{class_name}}::{{attribute_variable.attribute_name}}) { - {{attribute_name}} = {{class_name}}::{{attribute_variable.attribute_name}}; - } - {% endif %} - {% endfor %} + switch (proto_{{attribute_name}}) { + {% for attribute_variable in attribute_variables %} + case waypoint::{{class_name}}::{{attribute_variable.attribute_name}}: + return {{class_name}}::{{attribute_variable.attribute_name}}; {% endfor %} - else { - {{attribute_name}} = {{class_name}}::{{attribute_variables[0].attribute_name}}; + default: + return {{class_name}}::{{attribute_variables[0].attribute_name}}; } - return {{attribute_name}}; } diff --git a/xml_converter/generators/cpp_templates/multiflagvalue.cpp b/xml_converter/generators/cpp_templates/multiflagvalue.cpp index dfac2298..47abae16 100644 --- a/xml_converter/generators/cpp_templates/multiflagvalue.cpp +++ b/xml_converter/generators/cpp_templates/multiflagvalue.cpp @@ -56,9 +56,7 @@ string stringify_{{attribute_name}}({{class_name}} attribute_value) { waypoint::{{class_name}}* to_proto_{{attribute_name}}({{class_name}} attribute_value) { waypoint::{{class_name}}* proto_{{attribute_name}} = new waypoint::{{class_name}}(); {% for n, attribute_variable in enumerate(attribute_variables)%} - if (attribute_value.{{attribute_variable.attribute_name}} == true) { - proto_{{attribute_name}}->set_{{attribute_variable.attribute_name}}(true); - } + proto_{{attribute_name}}->set_{{attribute_variable.attribute_name}}(attribute_value.{{attribute_variable.attribute_name}}); {% endfor %} return proto_{{attribute_name}}; } @@ -66,9 +64,7 @@ waypoint::{{class_name}}* to_proto_{{attribute_name}}({{class_name}} attribute_v {{class_name}} from_proto_{{attribute_name}}(waypoint::{{class_name}} proto_{{attribute_name}}) { {{class_name}} {{attribute_name}}; {% for n, attribute_variable in enumerate(attribute_variables)%} - if (proto_{{attribute_name}}.{{attribute_variable.attribute_name}}() == true) { - {{attribute_name}}.{{attribute_variable.attribute_name}} = true; - } + {{attribute_name}}.{{attribute_variable.attribute_name}} = proto_{{attribute_name}}.{{attribute_variable.attribute_name}}(); {% endfor %} return {{attribute_name}}; } diff --git a/xml_converter/proto/waypoint.proto b/xml_converter/proto/waypoint.proto index e9ed9f28..f4ea5d6b 100644 --- a/xml_converter/proto/waypoint.proto +++ b/xml_converter/proto/waypoint.proto @@ -15,7 +15,6 @@ message Category { string name = 4; string tip_description = 5; repeated Category children = 6; - string type = 7; } message Icon { @@ -125,7 +124,7 @@ message Trigger { } message GUID { - string guid = 1; + bytes guid = 1; } message Color { diff --git a/xml_converter/src/attribute/bool.cpp b/xml_converter/src/attribute/bool.cpp index 138b7a26..cc7409d0 100644 --- a/xml_converter/src/attribute/bool.cpp +++ b/xml_converter/src/attribute/bool.cpp @@ -42,31 +42,3 @@ string stringify_bool(bool attribute_value) { return "false"; } } - -//////////////////////////////////////////////////////////////////////////////// -// to_proto_bool -// -// Converts a bool into a bool so that it can be saved to proto. -//////////////////////////////////////////////////////////////////////////////// -bool to_proto_bool(bool attribute_value) { - if (attribute_value) { - return true; - } - else { - return false; - } -} - -//////////////////////////////////////////////////////////////////////////////// -// from_proto_bool -// -// Converts a bool into a bool so that it can be saved to memory. -//////////////////////////////////////////////////////////////////////////////// -bool from_proto_bool(bool attribute_value) { - if (attribute_value) { - return true; - } - else { - return false; - } -} diff --git a/xml_converter/src/attribute/bool.hpp b/xml_converter/src/attribute/bool.hpp index eac7d42f..bd917c5f 100644 --- a/xml_converter/src/attribute/bool.hpp +++ b/xml_converter/src/attribute/bool.hpp @@ -10,7 +10,3 @@ class XMLError; bool parse_bool(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_bool(bool attribute_value); - -bool to_proto_bool(bool attribute_value); - -bool from_proto_bool(bool attribute_value); diff --git a/xml_converter/src/attribute/color.hpp b/xml_converter/src/attribute/color.hpp index 0d53fd1d..43c76d61 100644 --- a/xml_converter/src/attribute/color.hpp +++ b/xml_converter/src/attribute/color.hpp @@ -6,7 +6,9 @@ #include "../rapidxml-1.13/rapidxml.hpp" class XMLError; -namespace waypoint {class Color;} +namespace waypoint { +class Color; +} class Color { public: diff --git a/xml_converter/src/attribute/cull_chirality_gen.cpp b/xml_converter/src/attribute/cull_chirality_gen.cpp index eb11df49..faed5616 100644 --- a/xml_converter/src/attribute/cull_chirality_gen.cpp +++ b/xml_converter/src/attribute/cull_chirality_gen.cpp @@ -47,35 +47,27 @@ string stringify_cull_chirality(CullChirality attribute_value) { } waypoint::CullChirality to_proto_cull_chirality(CullChirality attribute_value) { - waypoint::CullChirality proto_cull_chirality; - if (attribute_value == CullChirality::none) { - proto_cull_chirality = waypoint::CullChirality::none; - } - else if (attribute_value == CullChirality::clockwise) { - proto_cull_chirality = waypoint::CullChirality::clockwise; - } - else if (attribute_value == CullChirality::counter_clockwise) { - proto_cull_chirality = waypoint::CullChirality::counter_clockwise; + switch (attribute_value) { + case CullChirality::none: + return waypoint::CullChirality::none; + case CullChirality::clockwise: + return waypoint::CullChirality::clockwise; + case CullChirality::counter_clockwise: + return waypoint::CullChirality::counter_clockwise; + default: + return waypoint::CullChirality::none; } - else { - proto_cull_chirality = waypoint::CullChirality::none; - } - return proto_cull_chirality; } CullChirality from_proto_cull_chirality(waypoint::CullChirality proto_cull_chirality) { - CullChirality cull_chirality; - if (proto_cull_chirality == waypoint::CullChirality::none) { - cull_chirality = CullChirality::none; + switch (proto_cull_chirality) { + case waypoint::CullChirality::none: + return CullChirality::none; + case waypoint::CullChirality::clockwise: + return CullChirality::clockwise; + case waypoint::CullChirality::counter_clockwise: + return CullChirality::counter_clockwise; + default: + return CullChirality::none; } - else if (proto_cull_chirality == waypoint::CullChirality::clockwise) { - cull_chirality = CullChirality::clockwise; - } - else if (proto_cull_chirality == waypoint::CullChirality::counter_clockwise) { - cull_chirality = CullChirality::counter_clockwise; - } - else { - cull_chirality = CullChirality::none; - } - return cull_chirality; } diff --git a/xml_converter/src/attribute/cull_chirality_gen.hpp b/xml_converter/src/attribute/cull_chirality_gen.hpp index ff3a14db..793574c6 100644 --- a/xml_converter/src/attribute/cull_chirality_gen.hpp +++ b/xml_converter/src/attribute/cull_chirality_gen.hpp @@ -9,9 +9,9 @@ class XMLError; enum CullChirality { - clockwise, - counter_clockwise, - none, + clockwise, + counter_clockwise, + none, }; CullChirality parse_cull_chirality(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_cull_chirality(CullChirality attribute_value); diff --git a/xml_converter/src/attribute/festival_filter_gen.cpp b/xml_converter/src/attribute/festival_filter_gen.cpp index a502abb0..c7f86ea8 100644 --- a/xml_converter/src/attribute/festival_filter_gen.cpp +++ b/xml_converter/src/attribute/festival_filter_gen.cpp @@ -86,52 +86,24 @@ string stringify_festival_filter(FestivalFilter attribute_value) { waypoint::FestivalFilter* to_proto_festival_filter(FestivalFilter attribute_value) { waypoint::FestivalFilter* proto_festival_filter = new waypoint::FestivalFilter(); - if (attribute_value.dragonbash == true) { - proto_festival_filter->set_dragonbash(true); - } - if (attribute_value.festival_of_the_four_winds == true) { - proto_festival_filter->set_festival_of_the_four_winds(true); - } - if (attribute_value.halloween == true) { - proto_festival_filter->set_halloween(true); - } - if (attribute_value.lunar_new_year == true) { - proto_festival_filter->set_lunar_new_year(true); - } - if (attribute_value.super_adventure_festival == true) { - proto_festival_filter->set_super_adventure_festival(true); - } - if (attribute_value.wintersday == true) { - proto_festival_filter->set_wintersday(true); - } - if (attribute_value.none == true) { - proto_festival_filter->set_none(true); - } + proto_festival_filter->set_dragonbash(attribute_value.dragonbash); + proto_festival_filter->set_festival_of_the_four_winds(attribute_value.festival_of_the_four_winds); + proto_festival_filter->set_halloween(attribute_value.halloween); + proto_festival_filter->set_lunar_new_year(attribute_value.lunar_new_year); + proto_festival_filter->set_super_adventure_festival(attribute_value.super_adventure_festival); + proto_festival_filter->set_wintersday(attribute_value.wintersday); + proto_festival_filter->set_none(attribute_value.none); return proto_festival_filter; } FestivalFilter from_proto_festival_filter(waypoint::FestivalFilter proto_festival_filter) { FestivalFilter festival_filter; - if (proto_festival_filter.dragonbash() == true) { - festival_filter.dragonbash = true; - } - if (proto_festival_filter.festival_of_the_four_winds() == true) { - festival_filter.festival_of_the_four_winds = true; - } - if (proto_festival_filter.halloween() == true) { - festival_filter.halloween = true; - } - if (proto_festival_filter.lunar_new_year() == true) { - festival_filter.lunar_new_year = true; - } - if (proto_festival_filter.super_adventure_festival() == true) { - festival_filter.super_adventure_festival = true; - } - if (proto_festival_filter.wintersday() == true) { - festival_filter.wintersday = true; - } - if (proto_festival_filter.none() == true) { - festival_filter.none = true; - } + festival_filter.dragonbash = proto_festival_filter.dragonbash(); + festival_filter.festival_of_the_four_winds = proto_festival_filter.festival_of_the_four_winds(); + festival_filter.halloween = proto_festival_filter.halloween(); + festival_filter.lunar_new_year = proto_festival_filter.lunar_new_year(); + festival_filter.super_adventure_festival = proto_festival_filter.super_adventure_festival(); + festival_filter.wintersday = proto_festival_filter.wintersday(); + festival_filter.none = proto_festival_filter.none(); return festival_filter; } diff --git a/xml_converter/src/attribute/float.cpp b/xml_converter/src/attribute/float.cpp index 28e3fef5..7a3a91cd 100644 --- a/xml_converter/src/attribute/float.cpp +++ b/xml_converter/src/attribute/float.cpp @@ -23,21 +23,3 @@ float parse_float(rapidxml::xml_attribute<>* input, std::vector*) { std::string stringify_float(float attribute_value) { return std::to_string(attribute_value); } - -//////////////////////////////////////////////////////////////////////////////// -// to_proto_float -// -// Returns the float so that it can be saved to proto. -//////////////////////////////////////////////////////////////////////////////// -float to_proto_float(float attribute_value) { - return attribute_value; -} - -//////////////////////////////////////////////////////////////////////////////// -// to_proto_float -// -// Parses the float from proto. -//////////////////////////////////////////////////////////////////////////////// -float from_proto_float(float attribute_value) { - return attribute_value; -} diff --git a/xml_converter/src/attribute/float.hpp b/xml_converter/src/attribute/float.hpp index 61c7151c..b2e9cfe5 100644 --- a/xml_converter/src/attribute/float.hpp +++ b/xml_converter/src/attribute/float.hpp @@ -10,7 +10,3 @@ class XMLError; float parse_float(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_float(float attribute_value); - -float to_proto_float(float attribute_value); - -float from_proto_float(float attribute_value); diff --git a/xml_converter/src/attribute/int.cpp b/xml_converter/src/attribute/int.cpp index d0a30fb6..cb605abb 100644 --- a/xml_converter/src/attribute/int.cpp +++ b/xml_converter/src/attribute/int.cpp @@ -40,21 +40,3 @@ int parse_int(rapidxml::xml_attribute<>* input, vector* errors) { string stringify_int(int attribute_value) { return to_string(attribute_value); } - -//////////////////////////////////////////////////////////////////////////////// -// to_proto_int -// -// Returns the int so that it can be saved to proto. -//////////////////////////////////////////////////////////////////////////////// -int to_proto_int(int attribute_value) { - return attribute_value; -} - -//////////////////////////////////////////////////////////////////////////////// -// from_proto_int -// -// Parses the int from proto. -//////////////////////////////////////////////////////////////////////////////// -int from_proto_int(int attribute_value) { - return attribute_value; -} diff --git a/xml_converter/src/attribute/int.hpp b/xml_converter/src/attribute/int.hpp index eafa64aa..680d7160 100644 --- a/xml_converter/src/attribute/int.hpp +++ b/xml_converter/src/attribute/int.hpp @@ -10,7 +10,3 @@ class XMLError; int parse_int(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_int(int attribute_value); - -int to_proto_int(int attribute_value); - -int from_proto_int(int attribute_value); diff --git a/xml_converter/src/attribute/map_type_filter_gen.cpp b/xml_converter/src/attribute/map_type_filter_gen.cpp index afcc21ed..6a847d8a 100644 --- a/xml_converter/src/attribute/map_type_filter_gen.cpp +++ b/xml_converter/src/attribute/map_type_filter_gen.cpp @@ -202,154 +202,58 @@ string stringify_map_type_filter(MapTypeFilter attribute_value) { waypoint::MapTypeFilter* to_proto_map_type_filter(MapTypeFilter attribute_value) { waypoint::MapTypeFilter* proto_map_type_filter = new waypoint::MapTypeFilter(); - if (attribute_value.unknown_map == true) { - proto_map_type_filter->set_unknown_map(true); - } - if (attribute_value.redirect_map == true) { - proto_map_type_filter->set_redirect_map(true); - } - if (attribute_value.character_create_map == true) { - proto_map_type_filter->set_character_create_map(true); - } - if (attribute_value.pvp_map == true) { - proto_map_type_filter->set_pvp_map(true); - } - if (attribute_value.gvg_map == true) { - proto_map_type_filter->set_gvg_map(true); - } - if (attribute_value.instance_map == true) { - proto_map_type_filter->set_instance_map(true); - } - if (attribute_value.public_map == true) { - proto_map_type_filter->set_public_map(true); - } - if (attribute_value.tournament_map == true) { - proto_map_type_filter->set_tournament_map(true); - } - if (attribute_value.tutorial_map == true) { - proto_map_type_filter->set_tutorial_map(true); - } - if (attribute_value.user_tournament_map == true) { - proto_map_type_filter->set_user_tournament_map(true); - } - if (attribute_value.center_map == true) { - proto_map_type_filter->set_center_map(true); - } - if (attribute_value.eternal_battlegrounds_map == true) { - proto_map_type_filter->set_eternal_battlegrounds_map(true); - } - if (attribute_value.bluehome_map == true) { - proto_map_type_filter->set_bluehome_map(true); - } - if (attribute_value.blue_borderlands_map == true) { - proto_map_type_filter->set_blue_borderlands_map(true); - } - if (attribute_value.green_home_map == true) { - proto_map_type_filter->set_green_home_map(true); - } - if (attribute_value.green_borderlands_map == true) { - proto_map_type_filter->set_green_borderlands_map(true); - } - if (attribute_value.red_home_map == true) { - proto_map_type_filter->set_red_home_map(true); - } - if (attribute_value.red_borderlands_map == true) { - proto_map_type_filter->set_red_borderlands_map(true); - } - if (attribute_value.fortunes_vale_map == true) { - proto_map_type_filter->set_fortunes_vale_map(true); - } - if (attribute_value.jump_puzzle_map == true) { - proto_map_type_filter->set_jump_puzzle_map(true); - } - if (attribute_value.obsidian_sanctum_map == true) { - proto_map_type_filter->set_obsidian_sanctum_map(true); - } - if (attribute_value.edge_of_the_mists_map == true) { - proto_map_type_filter->set_edge_of_the_mists_map(true); - } - if (attribute_value.public_mini_map == true) { - proto_map_type_filter->set_public_mini_map(true); - } - if (attribute_value.wvw_lounge_map == true) { - proto_map_type_filter->set_wvw_lounge_map(true); - } + proto_map_type_filter->set_unknown_map(attribute_value.unknown_map); + proto_map_type_filter->set_redirect_map(attribute_value.redirect_map); + proto_map_type_filter->set_character_create_map(attribute_value.character_create_map); + proto_map_type_filter->set_pvp_map(attribute_value.pvp_map); + proto_map_type_filter->set_gvg_map(attribute_value.gvg_map); + proto_map_type_filter->set_instance_map(attribute_value.instance_map); + proto_map_type_filter->set_public_map(attribute_value.public_map); + proto_map_type_filter->set_tournament_map(attribute_value.tournament_map); + proto_map_type_filter->set_tutorial_map(attribute_value.tutorial_map); + proto_map_type_filter->set_user_tournament_map(attribute_value.user_tournament_map); + proto_map_type_filter->set_center_map(attribute_value.center_map); + proto_map_type_filter->set_eternal_battlegrounds_map(attribute_value.eternal_battlegrounds_map); + proto_map_type_filter->set_bluehome_map(attribute_value.bluehome_map); + proto_map_type_filter->set_blue_borderlands_map(attribute_value.blue_borderlands_map); + proto_map_type_filter->set_green_home_map(attribute_value.green_home_map); + proto_map_type_filter->set_green_borderlands_map(attribute_value.green_borderlands_map); + proto_map_type_filter->set_red_home_map(attribute_value.red_home_map); + proto_map_type_filter->set_red_borderlands_map(attribute_value.red_borderlands_map); + proto_map_type_filter->set_fortunes_vale_map(attribute_value.fortunes_vale_map); + proto_map_type_filter->set_jump_puzzle_map(attribute_value.jump_puzzle_map); + proto_map_type_filter->set_obsidian_sanctum_map(attribute_value.obsidian_sanctum_map); + proto_map_type_filter->set_edge_of_the_mists_map(attribute_value.edge_of_the_mists_map); + proto_map_type_filter->set_public_mini_map(attribute_value.public_mini_map); + proto_map_type_filter->set_wvw_lounge_map(attribute_value.wvw_lounge_map); return proto_map_type_filter; } MapTypeFilter from_proto_map_type_filter(waypoint::MapTypeFilter proto_map_type_filter) { MapTypeFilter map_type_filter; - if (proto_map_type_filter.unknown_map() == true) { - map_type_filter.unknown_map = true; - } - if (proto_map_type_filter.redirect_map() == true) { - map_type_filter.redirect_map = true; - } - if (proto_map_type_filter.character_create_map() == true) { - map_type_filter.character_create_map = true; - } - if (proto_map_type_filter.pvp_map() == true) { - map_type_filter.pvp_map = true; - } - if (proto_map_type_filter.gvg_map() == true) { - map_type_filter.gvg_map = true; - } - if (proto_map_type_filter.instance_map() == true) { - map_type_filter.instance_map = true; - } - if (proto_map_type_filter.public_map() == true) { - map_type_filter.public_map = true; - } - if (proto_map_type_filter.tournament_map() == true) { - map_type_filter.tournament_map = true; - } - if (proto_map_type_filter.tutorial_map() == true) { - map_type_filter.tutorial_map = true; - } - if (proto_map_type_filter.user_tournament_map() == true) { - map_type_filter.user_tournament_map = true; - } - if (proto_map_type_filter.center_map() == true) { - map_type_filter.center_map = true; - } - if (proto_map_type_filter.eternal_battlegrounds_map() == true) { - map_type_filter.eternal_battlegrounds_map = true; - } - if (proto_map_type_filter.bluehome_map() == true) { - map_type_filter.bluehome_map = true; - } - if (proto_map_type_filter.blue_borderlands_map() == true) { - map_type_filter.blue_borderlands_map = true; - } - if (proto_map_type_filter.green_home_map() == true) { - map_type_filter.green_home_map = true; - } - if (proto_map_type_filter.green_borderlands_map() == true) { - map_type_filter.green_borderlands_map = true; - } - if (proto_map_type_filter.red_home_map() == true) { - map_type_filter.red_home_map = true; - } - if (proto_map_type_filter.red_borderlands_map() == true) { - map_type_filter.red_borderlands_map = true; - } - if (proto_map_type_filter.fortunes_vale_map() == true) { - map_type_filter.fortunes_vale_map = true; - } - if (proto_map_type_filter.jump_puzzle_map() == true) { - map_type_filter.jump_puzzle_map = true; - } - if (proto_map_type_filter.obsidian_sanctum_map() == true) { - map_type_filter.obsidian_sanctum_map = true; - } - if (proto_map_type_filter.edge_of_the_mists_map() == true) { - map_type_filter.edge_of_the_mists_map = true; - } - if (proto_map_type_filter.public_mini_map() == true) { - map_type_filter.public_mini_map = true; - } - if (proto_map_type_filter.wvw_lounge_map() == true) { - map_type_filter.wvw_lounge_map = true; - } + map_type_filter.unknown_map = proto_map_type_filter.unknown_map(); + map_type_filter.redirect_map = proto_map_type_filter.redirect_map(); + map_type_filter.character_create_map = proto_map_type_filter.character_create_map(); + map_type_filter.pvp_map = proto_map_type_filter.pvp_map(); + map_type_filter.gvg_map = proto_map_type_filter.gvg_map(); + map_type_filter.instance_map = proto_map_type_filter.instance_map(); + map_type_filter.public_map = proto_map_type_filter.public_map(); + map_type_filter.tournament_map = proto_map_type_filter.tournament_map(); + map_type_filter.tutorial_map = proto_map_type_filter.tutorial_map(); + map_type_filter.user_tournament_map = proto_map_type_filter.user_tournament_map(); + map_type_filter.center_map = proto_map_type_filter.center_map(); + map_type_filter.eternal_battlegrounds_map = proto_map_type_filter.eternal_battlegrounds_map(); + map_type_filter.bluehome_map = proto_map_type_filter.bluehome_map(); + map_type_filter.blue_borderlands_map = proto_map_type_filter.blue_borderlands_map(); + map_type_filter.green_home_map = proto_map_type_filter.green_home_map(); + map_type_filter.green_borderlands_map = proto_map_type_filter.green_borderlands_map(); + map_type_filter.red_home_map = proto_map_type_filter.red_home_map(); + map_type_filter.red_borderlands_map = proto_map_type_filter.red_borderlands_map(); + map_type_filter.fortunes_vale_map = proto_map_type_filter.fortunes_vale_map(); + map_type_filter.jump_puzzle_map = proto_map_type_filter.jump_puzzle_map(); + map_type_filter.obsidian_sanctum_map = proto_map_type_filter.obsidian_sanctum_map(); + map_type_filter.edge_of_the_mists_map = proto_map_type_filter.edge_of_the_mists_map(); + map_type_filter.public_mini_map = proto_map_type_filter.public_mini_map(); + map_type_filter.wvw_lounge_map = proto_map_type_filter.wvw_lounge_map(); return map_type_filter; } diff --git a/xml_converter/src/attribute/marker_category.cpp b/xml_converter/src/attribute/marker_category.cpp index 77c15c18..caa4f42c 100644 --- a/xml_converter/src/attribute/marker_category.cpp +++ b/xml_converter/src/attribute/marker_category.cpp @@ -35,7 +35,7 @@ std::string stringify_marker_category(MarkerCategory attribute_value) { //////////////////////////////////////////////////////////////////////////////// waypoint::Category* to_proto_marker_category(MarkerCategory attribute_value) { waypoint::Category* category = new waypoint::Category(); - category->set_type(attribute_value.category); + category->set_name(attribute_value.category); return category; } @@ -46,6 +46,6 @@ waypoint::Category* to_proto_marker_category(MarkerCategory attribute_value) { /////////////////////////////////////////////////////////////////////////////// MarkerCategory from_proto_marker_category(waypoint::Category attribute_value) { MarkerCategory marker_category; - marker_category.category = attribute_value.type(); + marker_category.category = attribute_value.name(); return marker_category; } diff --git a/xml_converter/src/attribute/mount_filter_gen.cpp b/xml_converter/src/attribute/mount_filter_gen.cpp index cb1f86dd..bd40f601 100644 --- a/xml_converter/src/attribute/mount_filter_gen.cpp +++ b/xml_converter/src/attribute/mount_filter_gen.cpp @@ -104,70 +104,30 @@ string stringify_mount_filter(MountFilter attribute_value) { waypoint::MountFilter* to_proto_mount_filter(MountFilter attribute_value) { waypoint::MountFilter* proto_mount_filter = new waypoint::MountFilter(); - if (attribute_value.raptor == true) { - proto_mount_filter->set_raptor(true); - } - if (attribute_value.springer == true) { - proto_mount_filter->set_springer(true); - } - if (attribute_value.skimmer == true) { - proto_mount_filter->set_skimmer(true); - } - if (attribute_value.jackal == true) { - proto_mount_filter->set_jackal(true); - } - if (attribute_value.griffon == true) { - proto_mount_filter->set_griffon(true); - } - if (attribute_value.roller_beetle == true) { - proto_mount_filter->set_roller_beetle(true); - } - if (attribute_value.warclaw == true) { - proto_mount_filter->set_warclaw(true); - } - if (attribute_value.skyscale == true) { - proto_mount_filter->set_skyscale(true); - } - if (attribute_value.skiff == true) { - proto_mount_filter->set_skiff(true); - } - if (attribute_value.seige_turtle == true) { - proto_mount_filter->set_seige_turtle(true); - } + proto_mount_filter->set_raptor(attribute_value.raptor); + proto_mount_filter->set_springer(attribute_value.springer); + proto_mount_filter->set_skimmer(attribute_value.skimmer); + proto_mount_filter->set_jackal(attribute_value.jackal); + proto_mount_filter->set_griffon(attribute_value.griffon); + proto_mount_filter->set_roller_beetle(attribute_value.roller_beetle); + proto_mount_filter->set_warclaw(attribute_value.warclaw); + proto_mount_filter->set_skyscale(attribute_value.skyscale); + proto_mount_filter->set_skiff(attribute_value.skiff); + proto_mount_filter->set_seige_turtle(attribute_value.seige_turtle); return proto_mount_filter; } MountFilter from_proto_mount_filter(waypoint::MountFilter proto_mount_filter) { MountFilter mount_filter; - if (proto_mount_filter.raptor() == true) { - mount_filter.raptor = true; - } - if (proto_mount_filter.springer() == true) { - mount_filter.springer = true; - } - if (proto_mount_filter.skimmer() == true) { - mount_filter.skimmer = true; - } - if (proto_mount_filter.jackal() == true) { - mount_filter.jackal = true; - } - if (proto_mount_filter.griffon() == true) { - mount_filter.griffon = true; - } - if (proto_mount_filter.roller_beetle() == true) { - mount_filter.roller_beetle = true; - } - if (proto_mount_filter.warclaw() == true) { - mount_filter.warclaw = true; - } - if (proto_mount_filter.skyscale() == true) { - mount_filter.skyscale = true; - } - if (proto_mount_filter.skiff() == true) { - mount_filter.skiff = true; - } - if (proto_mount_filter.seige_turtle() == true) { - mount_filter.seige_turtle = true; - } + mount_filter.raptor = proto_mount_filter.raptor(); + mount_filter.springer = proto_mount_filter.springer(); + mount_filter.skimmer = proto_mount_filter.skimmer(); + mount_filter.jackal = proto_mount_filter.jackal(); + mount_filter.griffon = proto_mount_filter.griffon(); + mount_filter.roller_beetle = proto_mount_filter.roller_beetle(); + mount_filter.warclaw = proto_mount_filter.warclaw(); + mount_filter.skyscale = proto_mount_filter.skyscale(); + mount_filter.skiff = proto_mount_filter.skiff(); + mount_filter.seige_turtle = proto_mount_filter.seige_turtle(); return mount_filter; } diff --git a/xml_converter/src/attribute/profession_filter_gen.cpp b/xml_converter/src/attribute/profession_filter_gen.cpp index e5c41af8..61e13e2a 100644 --- a/xml_converter/src/attribute/profession_filter_gen.cpp +++ b/xml_converter/src/attribute/profession_filter_gen.cpp @@ -97,64 +97,28 @@ string stringify_profession_filter(ProfessionFilter attribute_value) { waypoint::ProfessionFilter* to_proto_profession_filter(ProfessionFilter attribute_value) { waypoint::ProfessionFilter* proto_profession_filter = new waypoint::ProfessionFilter(); - if (attribute_value.guardian == true) { - proto_profession_filter->set_guardian(true); - } - if (attribute_value.warrior == true) { - proto_profession_filter->set_warrior(true); - } - if (attribute_value.engineer == true) { - proto_profession_filter->set_engineer(true); - } - if (attribute_value.ranger == true) { - proto_profession_filter->set_ranger(true); - } - if (attribute_value.thief == true) { - proto_profession_filter->set_thief(true); - } - if (attribute_value.elementalist == true) { - proto_profession_filter->set_elementalist(true); - } - if (attribute_value.mesmer == true) { - proto_profession_filter->set_mesmer(true); - } - if (attribute_value.necromancer == true) { - proto_profession_filter->set_necromancer(true); - } - if (attribute_value.revenant == true) { - proto_profession_filter->set_revenant(true); - } + proto_profession_filter->set_guardian(attribute_value.guardian); + proto_profession_filter->set_warrior(attribute_value.warrior); + proto_profession_filter->set_engineer(attribute_value.engineer); + proto_profession_filter->set_ranger(attribute_value.ranger); + proto_profession_filter->set_thief(attribute_value.thief); + proto_profession_filter->set_elementalist(attribute_value.elementalist); + proto_profession_filter->set_mesmer(attribute_value.mesmer); + proto_profession_filter->set_necromancer(attribute_value.necromancer); + proto_profession_filter->set_revenant(attribute_value.revenant); return proto_profession_filter; } ProfessionFilter from_proto_profession_filter(waypoint::ProfessionFilter proto_profession_filter) { ProfessionFilter profession_filter; - if (proto_profession_filter.guardian() == true) { - profession_filter.guardian = true; - } - if (proto_profession_filter.warrior() == true) { - profession_filter.warrior = true; - } - if (proto_profession_filter.engineer() == true) { - profession_filter.engineer = true; - } - if (proto_profession_filter.ranger() == true) { - profession_filter.ranger = true; - } - if (proto_profession_filter.thief() == true) { - profession_filter.thief = true; - } - if (proto_profession_filter.elementalist() == true) { - profession_filter.elementalist = true; - } - if (proto_profession_filter.mesmer() == true) { - profession_filter.mesmer = true; - } - if (proto_profession_filter.necromancer() == true) { - profession_filter.necromancer = true; - } - if (proto_profession_filter.revenant() == true) { - profession_filter.revenant = true; - } + profession_filter.guardian = proto_profession_filter.guardian(); + profession_filter.warrior = proto_profession_filter.warrior(); + profession_filter.engineer = proto_profession_filter.engineer(); + profession_filter.ranger = proto_profession_filter.ranger(); + profession_filter.thief = proto_profession_filter.thief(); + profession_filter.elementalist = proto_profession_filter.elementalist(); + profession_filter.mesmer = proto_profession_filter.mesmer(); + profession_filter.necromancer = proto_profession_filter.necromancer(); + profession_filter.revenant = proto_profession_filter.revenant(); return profession_filter; } diff --git a/xml_converter/src/attribute/reset_behavior_gen.cpp b/xml_converter/src/attribute/reset_behavior_gen.cpp index 00e70060..8d830ad1 100644 --- a/xml_converter/src/attribute/reset_behavior_gen.cpp +++ b/xml_converter/src/attribute/reset_behavior_gen.cpp @@ -137,125 +137,51 @@ string stringify_reset_behavior(ResetBehavior attribute_value) { } waypoint::ResetBehavior to_proto_reset_behavior(ResetBehavior attribute_value) { - waypoint::ResetBehavior proto_reset_behavior; - if (attribute_value == ResetBehavior::always_visible) { - proto_reset_behavior = waypoint::ResetBehavior::always_visible; - } - else if (attribute_value == ResetBehavior::always_visible) { - proto_reset_behavior = waypoint::ResetBehavior::always_visible; - } - else if (attribute_value == ResetBehavior::map_change) { - proto_reset_behavior = waypoint::ResetBehavior::map_change; - } - else if (attribute_value == ResetBehavior::map_change) { - proto_reset_behavior = waypoint::ResetBehavior::map_change; - } - else if (attribute_value == ResetBehavior::daily_reset) { - proto_reset_behavior = waypoint::ResetBehavior::daily_reset; - } - else if (attribute_value == ResetBehavior::daily_reset) { - proto_reset_behavior = waypoint::ResetBehavior::daily_reset; - } - else if (attribute_value == ResetBehavior::never) { - proto_reset_behavior = waypoint::ResetBehavior::never; - } - else if (attribute_value == ResetBehavior::never) { - proto_reset_behavior = waypoint::ResetBehavior::never; + switch (attribute_value) { + case ResetBehavior::always_visible: + return waypoint::ResetBehavior::always_visible; + case ResetBehavior::map_change: + return waypoint::ResetBehavior::map_change; + case ResetBehavior::daily_reset: + return waypoint::ResetBehavior::daily_reset; + case ResetBehavior::never: + return waypoint::ResetBehavior::never; + case ResetBehavior::timer: + return waypoint::ResetBehavior::timer; + case ResetBehavior::map_reset: + return waypoint::ResetBehavior::map_reset; + case ResetBehavior::instance_change: + return waypoint::ResetBehavior::instance_change; + case ResetBehavior::daily_reset_per_character: + return waypoint::ResetBehavior::daily_reset_per_character; + case ResetBehavior::weekly_reset: + return waypoint::ResetBehavior::weekly_reset; + default: + return waypoint::ResetBehavior::always_visible; } - else if (attribute_value == ResetBehavior::timer) { - proto_reset_behavior = waypoint::ResetBehavior::timer; - } - else if (attribute_value == ResetBehavior::timer) { - proto_reset_behavior = waypoint::ResetBehavior::timer; - } - else if (attribute_value == ResetBehavior::map_reset) { - proto_reset_behavior = waypoint::ResetBehavior::map_reset; - } - else if (attribute_value == ResetBehavior::map_reset) { - proto_reset_behavior = waypoint::ResetBehavior::map_reset; - } - else if (attribute_value == ResetBehavior::instance_change) { - proto_reset_behavior = waypoint::ResetBehavior::instance_change; - } - else if (attribute_value == ResetBehavior::instance_change) { - proto_reset_behavior = waypoint::ResetBehavior::instance_change; - } - else if (attribute_value == ResetBehavior::daily_reset_per_character) { - proto_reset_behavior = waypoint::ResetBehavior::daily_reset_per_character; - } - else if (attribute_value == ResetBehavior::daily_reset_per_character) { - proto_reset_behavior = waypoint::ResetBehavior::daily_reset_per_character; - } - else if (attribute_value == ResetBehavior::weekly_reset) { - proto_reset_behavior = waypoint::ResetBehavior::weekly_reset; - } - else if (attribute_value == ResetBehavior::weekly_reset) { - proto_reset_behavior = waypoint::ResetBehavior::weekly_reset; - } - else { - proto_reset_behavior = waypoint::ResetBehavior::always_visible; - } - return proto_reset_behavior; } ResetBehavior from_proto_reset_behavior(waypoint::ResetBehavior proto_reset_behavior) { - ResetBehavior reset_behavior; - if (proto_reset_behavior == waypoint::ResetBehavior::always_visible) { - reset_behavior = ResetBehavior::always_visible; + switch (proto_reset_behavior) { + case waypoint::ResetBehavior::always_visible: + return ResetBehavior::always_visible; + case waypoint::ResetBehavior::map_change: + return ResetBehavior::map_change; + case waypoint::ResetBehavior::daily_reset: + return ResetBehavior::daily_reset; + case waypoint::ResetBehavior::never: + return ResetBehavior::never; + case waypoint::ResetBehavior::timer: + return ResetBehavior::timer; + case waypoint::ResetBehavior::map_reset: + return ResetBehavior::map_reset; + case waypoint::ResetBehavior::instance_change: + return ResetBehavior::instance_change; + case waypoint::ResetBehavior::daily_reset_per_character: + return ResetBehavior::daily_reset_per_character; + case waypoint::ResetBehavior::weekly_reset: + return ResetBehavior::weekly_reset; + default: + return ResetBehavior::always_visible; } - else if (proto_reset_behavior == waypoint::ResetBehavior::always_visible) { - reset_behavior = ResetBehavior::always_visible; - } - else if (proto_reset_behavior == waypoint::ResetBehavior::map_change) { - reset_behavior = ResetBehavior::map_change; - } - else if (proto_reset_behavior == waypoint::ResetBehavior::map_change) { - reset_behavior = ResetBehavior::map_change; - } - else if (proto_reset_behavior == waypoint::ResetBehavior::daily_reset) { - reset_behavior = ResetBehavior::daily_reset; - } - else if (proto_reset_behavior == waypoint::ResetBehavior::daily_reset) { - reset_behavior = ResetBehavior::daily_reset; - } - else if (proto_reset_behavior == waypoint::ResetBehavior::never) { - reset_behavior = ResetBehavior::never; - } - else if (proto_reset_behavior == waypoint::ResetBehavior::never) { - reset_behavior = ResetBehavior::never; - } - else if (proto_reset_behavior == waypoint::ResetBehavior::timer) { - reset_behavior = ResetBehavior::timer; - } - else if (proto_reset_behavior == waypoint::ResetBehavior::timer) { - reset_behavior = ResetBehavior::timer; - } - else if (proto_reset_behavior == waypoint::ResetBehavior::map_reset) { - reset_behavior = ResetBehavior::map_reset; - } - else if (proto_reset_behavior == waypoint::ResetBehavior::map_reset) { - reset_behavior = ResetBehavior::map_reset; - } - else if (proto_reset_behavior == waypoint::ResetBehavior::instance_change) { - reset_behavior = ResetBehavior::instance_change; - } - else if (proto_reset_behavior == waypoint::ResetBehavior::instance_change) { - reset_behavior = ResetBehavior::instance_change; - } - else if (proto_reset_behavior == waypoint::ResetBehavior::daily_reset_per_character) { - reset_behavior = ResetBehavior::daily_reset_per_character; - } - else if (proto_reset_behavior == waypoint::ResetBehavior::daily_reset_per_character) { - reset_behavior = ResetBehavior::daily_reset_per_character; - } - else if (proto_reset_behavior == waypoint::ResetBehavior::weekly_reset) { - reset_behavior = ResetBehavior::weekly_reset; - } - else if (proto_reset_behavior == waypoint::ResetBehavior::weekly_reset) { - reset_behavior = ResetBehavior::weekly_reset; - } - else { - reset_behavior = ResetBehavior::always_visible; - } - return reset_behavior; } diff --git a/xml_converter/src/attribute/reset_behavior_gen.hpp b/xml_converter/src/attribute/reset_behavior_gen.hpp index acd08189..56708961 100644 --- a/xml_converter/src/attribute/reset_behavior_gen.hpp +++ b/xml_converter/src/attribute/reset_behavior_gen.hpp @@ -9,15 +9,15 @@ class XMLError; enum ResetBehavior { - always_visible, - daily_reset, - daily_reset_per_character, - instance_change, - map_change, - map_reset, - never, - timer, - weekly_reset, + always_visible, + daily_reset, + daily_reset_per_character, + instance_change, + map_change, + map_reset, + never, + timer, + weekly_reset, }; ResetBehavior parse_reset_behavior(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_reset_behavior(ResetBehavior attribute_value); diff --git a/xml_converter/src/attribute/specialization_filter_gen.cpp b/xml_converter/src/attribute/specialization_filter_gen.cpp index 8c7d6940..4292fd6b 100644 --- a/xml_converter/src/attribute/specialization_filter_gen.cpp +++ b/xml_converter/src/attribute/specialization_filter_gen.cpp @@ -619,442 +619,154 @@ string stringify_specialization_filter(SpecializationFilter attribute_value) { waypoint::SpecializationFilter* to_proto_specialization_filter(SpecializationFilter attribute_value) { waypoint::SpecializationFilter* proto_specialization_filter = new waypoint::SpecializationFilter(); - if (attribute_value.elementalist_tempest == true) { - proto_specialization_filter->set_elementalist_tempest(true); - } - if (attribute_value.engineer_scrapper == true) { - proto_specialization_filter->set_engineer_scrapper(true); - } - if (attribute_value.guardian_dragonhunter == true) { - proto_specialization_filter->set_guardian_dragonhunter(true); - } - if (attribute_value.mesmer_chronomancer == true) { - proto_specialization_filter->set_mesmer_chronomancer(true); - } - if (attribute_value.necromancer_reaper == true) { - proto_specialization_filter->set_necromancer_reaper(true); - } - if (attribute_value.ranger_druid == true) { - proto_specialization_filter->set_ranger_druid(true); - } - if (attribute_value.revenant_herald == true) { - proto_specialization_filter->set_revenant_herald(true); - } - if (attribute_value.thief_daredevil == true) { - proto_specialization_filter->set_thief_daredevil(true); - } - if (attribute_value.warrior_berserker == true) { - proto_specialization_filter->set_warrior_berserker(true); - } - if (attribute_value.elementalist_weaver == true) { - proto_specialization_filter->set_elementalist_weaver(true); - } - if (attribute_value.engineer_holosmith == true) { - proto_specialization_filter->set_engineer_holosmith(true); - } - if (attribute_value.guardian_firebrand == true) { - proto_specialization_filter->set_guardian_firebrand(true); - } - if (attribute_value.mesmer_mirage == true) { - proto_specialization_filter->set_mesmer_mirage(true); - } - if (attribute_value.necromancer_scourge == true) { - proto_specialization_filter->set_necromancer_scourge(true); - } - if (attribute_value.ranger_soulbeast == true) { - proto_specialization_filter->set_ranger_soulbeast(true); - } - if (attribute_value.revenant_renegade == true) { - proto_specialization_filter->set_revenant_renegade(true); - } - if (attribute_value.thief_deadeye == true) { - proto_specialization_filter->set_thief_deadeye(true); - } - if (attribute_value.warrior_spellbreaker == true) { - proto_specialization_filter->set_warrior_spellbreaker(true); - } - if (attribute_value.elementalist_catalyst == true) { - proto_specialization_filter->set_elementalist_catalyst(true); - } - if (attribute_value.engineer_mechanist == true) { - proto_specialization_filter->set_engineer_mechanist(true); - } - if (attribute_value.guardian_willbender == true) { - proto_specialization_filter->set_guardian_willbender(true); - } - if (attribute_value.mesmer_virtuoso == true) { - proto_specialization_filter->set_mesmer_virtuoso(true); - } - if (attribute_value.necromancer_harbinger == true) { - proto_specialization_filter->set_necromancer_harbinger(true); - } - if (attribute_value.ranger_untamed == true) { - proto_specialization_filter->set_ranger_untamed(true); - } - if (attribute_value.revenant_vindicator == true) { - proto_specialization_filter->set_revenant_vindicator(true); - } - if (attribute_value.thief_specter == true) { - proto_specialization_filter->set_thief_specter(true); - } - if (attribute_value.warrior_bladesworn == true) { - proto_specialization_filter->set_warrior_bladesworn(true); - } - if (attribute_value.elementalist_air == true) { - proto_specialization_filter->set_elementalist_air(true); - } - if (attribute_value.elementalist_arcane == true) { - proto_specialization_filter->set_elementalist_arcane(true); - } - if (attribute_value.elementalist_earth == true) { - proto_specialization_filter->set_elementalist_earth(true); - } - if (attribute_value.elementalist_fire == true) { - proto_specialization_filter->set_elementalist_fire(true); - } - if (attribute_value.elementalist_water == true) { - proto_specialization_filter->set_elementalist_water(true); - } - if (attribute_value.engineer_alchemy == true) { - proto_specialization_filter->set_engineer_alchemy(true); - } - if (attribute_value.engineer_explosives == true) { - proto_specialization_filter->set_engineer_explosives(true); - } - if (attribute_value.engineer_firearms == true) { - proto_specialization_filter->set_engineer_firearms(true); - } - if (attribute_value.engineer_inventions == true) { - proto_specialization_filter->set_engineer_inventions(true); - } - if (attribute_value.engineer_tools == true) { - proto_specialization_filter->set_engineer_tools(true); - } - if (attribute_value.guardian_honor == true) { - proto_specialization_filter->set_guardian_honor(true); - } - if (attribute_value.guardian_radiance == true) { - proto_specialization_filter->set_guardian_radiance(true); - } - if (attribute_value.guardian_valor == true) { - proto_specialization_filter->set_guardian_valor(true); - } - if (attribute_value.guardian_virtues == true) { - proto_specialization_filter->set_guardian_virtues(true); - } - if (attribute_value.guardian_zeal == true) { - proto_specialization_filter->set_guardian_zeal(true); - } - if (attribute_value.mesmer_chaos == true) { - proto_specialization_filter->set_mesmer_chaos(true); - } - if (attribute_value.mesmer_domination == true) { - proto_specialization_filter->set_mesmer_domination(true); - } - if (attribute_value.mesmer_dueling == true) { - proto_specialization_filter->set_mesmer_dueling(true); - } - if (attribute_value.mesmer_illusions == true) { - proto_specialization_filter->set_mesmer_illusions(true); - } - if (attribute_value.mesmer_inspiration == true) { - proto_specialization_filter->set_mesmer_inspiration(true); - } - if (attribute_value.necromancer_blood_magic == true) { - proto_specialization_filter->set_necromancer_blood_magic(true); - } - if (attribute_value.necromancer_curses == true) { - proto_specialization_filter->set_necromancer_curses(true); - } - if (attribute_value.necromancer_death_magic == true) { - proto_specialization_filter->set_necromancer_death_magic(true); - } - if (attribute_value.necromancer_soul_reaping == true) { - proto_specialization_filter->set_necromancer_soul_reaping(true); - } - if (attribute_value.necromancer_spite == true) { - proto_specialization_filter->set_necromancer_spite(true); - } - if (attribute_value.ranger_beastmastery == true) { - proto_specialization_filter->set_ranger_beastmastery(true); - } - if (attribute_value.ranger_marksmanship == true) { - proto_specialization_filter->set_ranger_marksmanship(true); - } - if (attribute_value.ranger_nature_magic == true) { - proto_specialization_filter->set_ranger_nature_magic(true); - } - if (attribute_value.ranger_skirmishing == true) { - proto_specialization_filter->set_ranger_skirmishing(true); - } - if (attribute_value.ranger_wilderness_survival == true) { - proto_specialization_filter->set_ranger_wilderness_survival(true); - } - if (attribute_value.revenant_corruption == true) { - proto_specialization_filter->set_revenant_corruption(true); - } - if (attribute_value.revenant_devastation == true) { - proto_specialization_filter->set_revenant_devastation(true); - } - if (attribute_value.revenant_invocation == true) { - proto_specialization_filter->set_revenant_invocation(true); - } - if (attribute_value.revenant_retribution == true) { - proto_specialization_filter->set_revenant_retribution(true); - } - if (attribute_value.revenant_salvation == true) { - proto_specialization_filter->set_revenant_salvation(true); - } - if (attribute_value.thief_acrobatics == true) { - proto_specialization_filter->set_thief_acrobatics(true); - } - if (attribute_value.thief_critical_strikes == true) { - proto_specialization_filter->set_thief_critical_strikes(true); - } - if (attribute_value.thief_deadly_arts == true) { - proto_specialization_filter->set_thief_deadly_arts(true); - } - if (attribute_value.thief_shadow_arts == true) { - proto_specialization_filter->set_thief_shadow_arts(true); - } - if (attribute_value.thief_trickery == true) { - proto_specialization_filter->set_thief_trickery(true); - } - if (attribute_value.warrior_arms == true) { - proto_specialization_filter->set_warrior_arms(true); - } - if (attribute_value.warrior_defense == true) { - proto_specialization_filter->set_warrior_defense(true); - } - if (attribute_value.warrior_discipline == true) { - proto_specialization_filter->set_warrior_discipline(true); - } - if (attribute_value.warrior_strength == true) { - proto_specialization_filter->set_warrior_strength(true); - } - if (attribute_value.warrior_tactics == true) { - proto_specialization_filter->set_warrior_tactics(true); - } + proto_specialization_filter->set_elementalist_tempest(attribute_value.elementalist_tempest); + proto_specialization_filter->set_engineer_scrapper(attribute_value.engineer_scrapper); + proto_specialization_filter->set_guardian_dragonhunter(attribute_value.guardian_dragonhunter); + proto_specialization_filter->set_mesmer_chronomancer(attribute_value.mesmer_chronomancer); + proto_specialization_filter->set_necromancer_reaper(attribute_value.necromancer_reaper); + proto_specialization_filter->set_ranger_druid(attribute_value.ranger_druid); + proto_specialization_filter->set_revenant_herald(attribute_value.revenant_herald); + proto_specialization_filter->set_thief_daredevil(attribute_value.thief_daredevil); + proto_specialization_filter->set_warrior_berserker(attribute_value.warrior_berserker); + proto_specialization_filter->set_elementalist_weaver(attribute_value.elementalist_weaver); + proto_specialization_filter->set_engineer_holosmith(attribute_value.engineer_holosmith); + proto_specialization_filter->set_guardian_firebrand(attribute_value.guardian_firebrand); + proto_specialization_filter->set_mesmer_mirage(attribute_value.mesmer_mirage); + proto_specialization_filter->set_necromancer_scourge(attribute_value.necromancer_scourge); + proto_specialization_filter->set_ranger_soulbeast(attribute_value.ranger_soulbeast); + proto_specialization_filter->set_revenant_renegade(attribute_value.revenant_renegade); + proto_specialization_filter->set_thief_deadeye(attribute_value.thief_deadeye); + proto_specialization_filter->set_warrior_spellbreaker(attribute_value.warrior_spellbreaker); + proto_specialization_filter->set_elementalist_catalyst(attribute_value.elementalist_catalyst); + proto_specialization_filter->set_engineer_mechanist(attribute_value.engineer_mechanist); + proto_specialization_filter->set_guardian_willbender(attribute_value.guardian_willbender); + proto_specialization_filter->set_mesmer_virtuoso(attribute_value.mesmer_virtuoso); + proto_specialization_filter->set_necromancer_harbinger(attribute_value.necromancer_harbinger); + proto_specialization_filter->set_ranger_untamed(attribute_value.ranger_untamed); + proto_specialization_filter->set_revenant_vindicator(attribute_value.revenant_vindicator); + proto_specialization_filter->set_thief_specter(attribute_value.thief_specter); + proto_specialization_filter->set_warrior_bladesworn(attribute_value.warrior_bladesworn); + proto_specialization_filter->set_elementalist_air(attribute_value.elementalist_air); + proto_specialization_filter->set_elementalist_arcane(attribute_value.elementalist_arcane); + proto_specialization_filter->set_elementalist_earth(attribute_value.elementalist_earth); + proto_specialization_filter->set_elementalist_fire(attribute_value.elementalist_fire); + proto_specialization_filter->set_elementalist_water(attribute_value.elementalist_water); + proto_specialization_filter->set_engineer_alchemy(attribute_value.engineer_alchemy); + proto_specialization_filter->set_engineer_explosives(attribute_value.engineer_explosives); + proto_specialization_filter->set_engineer_firearms(attribute_value.engineer_firearms); + proto_specialization_filter->set_engineer_inventions(attribute_value.engineer_inventions); + proto_specialization_filter->set_engineer_tools(attribute_value.engineer_tools); + proto_specialization_filter->set_guardian_honor(attribute_value.guardian_honor); + proto_specialization_filter->set_guardian_radiance(attribute_value.guardian_radiance); + proto_specialization_filter->set_guardian_valor(attribute_value.guardian_valor); + proto_specialization_filter->set_guardian_virtues(attribute_value.guardian_virtues); + proto_specialization_filter->set_guardian_zeal(attribute_value.guardian_zeal); + proto_specialization_filter->set_mesmer_chaos(attribute_value.mesmer_chaos); + proto_specialization_filter->set_mesmer_domination(attribute_value.mesmer_domination); + proto_specialization_filter->set_mesmer_dueling(attribute_value.mesmer_dueling); + proto_specialization_filter->set_mesmer_illusions(attribute_value.mesmer_illusions); + proto_specialization_filter->set_mesmer_inspiration(attribute_value.mesmer_inspiration); + proto_specialization_filter->set_necromancer_blood_magic(attribute_value.necromancer_blood_magic); + proto_specialization_filter->set_necromancer_curses(attribute_value.necromancer_curses); + proto_specialization_filter->set_necromancer_death_magic(attribute_value.necromancer_death_magic); + proto_specialization_filter->set_necromancer_soul_reaping(attribute_value.necromancer_soul_reaping); + proto_specialization_filter->set_necromancer_spite(attribute_value.necromancer_spite); + proto_specialization_filter->set_ranger_beastmastery(attribute_value.ranger_beastmastery); + proto_specialization_filter->set_ranger_marksmanship(attribute_value.ranger_marksmanship); + proto_specialization_filter->set_ranger_nature_magic(attribute_value.ranger_nature_magic); + proto_specialization_filter->set_ranger_skirmishing(attribute_value.ranger_skirmishing); + proto_specialization_filter->set_ranger_wilderness_survival(attribute_value.ranger_wilderness_survival); + proto_specialization_filter->set_revenant_corruption(attribute_value.revenant_corruption); + proto_specialization_filter->set_revenant_devastation(attribute_value.revenant_devastation); + proto_specialization_filter->set_revenant_invocation(attribute_value.revenant_invocation); + proto_specialization_filter->set_revenant_retribution(attribute_value.revenant_retribution); + proto_specialization_filter->set_revenant_salvation(attribute_value.revenant_salvation); + proto_specialization_filter->set_thief_acrobatics(attribute_value.thief_acrobatics); + proto_specialization_filter->set_thief_critical_strikes(attribute_value.thief_critical_strikes); + proto_specialization_filter->set_thief_deadly_arts(attribute_value.thief_deadly_arts); + proto_specialization_filter->set_thief_shadow_arts(attribute_value.thief_shadow_arts); + proto_specialization_filter->set_thief_trickery(attribute_value.thief_trickery); + proto_specialization_filter->set_warrior_arms(attribute_value.warrior_arms); + proto_specialization_filter->set_warrior_defense(attribute_value.warrior_defense); + proto_specialization_filter->set_warrior_discipline(attribute_value.warrior_discipline); + proto_specialization_filter->set_warrior_strength(attribute_value.warrior_strength); + proto_specialization_filter->set_warrior_tactics(attribute_value.warrior_tactics); return proto_specialization_filter; } SpecializationFilter from_proto_specialization_filter(waypoint::SpecializationFilter proto_specialization_filter) { SpecializationFilter specialization_filter; - if (proto_specialization_filter.elementalist_tempest() == true) { - specialization_filter.elementalist_tempest = true; - } - if (proto_specialization_filter.engineer_scrapper() == true) { - specialization_filter.engineer_scrapper = true; - } - if (proto_specialization_filter.guardian_dragonhunter() == true) { - specialization_filter.guardian_dragonhunter = true; - } - if (proto_specialization_filter.mesmer_chronomancer() == true) { - specialization_filter.mesmer_chronomancer = true; - } - if (proto_specialization_filter.necromancer_reaper() == true) { - specialization_filter.necromancer_reaper = true; - } - if (proto_specialization_filter.ranger_druid() == true) { - specialization_filter.ranger_druid = true; - } - if (proto_specialization_filter.revenant_herald() == true) { - specialization_filter.revenant_herald = true; - } - if (proto_specialization_filter.thief_daredevil() == true) { - specialization_filter.thief_daredevil = true; - } - if (proto_specialization_filter.warrior_berserker() == true) { - specialization_filter.warrior_berserker = true; - } - if (proto_specialization_filter.elementalist_weaver() == true) { - specialization_filter.elementalist_weaver = true; - } - if (proto_specialization_filter.engineer_holosmith() == true) { - specialization_filter.engineer_holosmith = true; - } - if (proto_specialization_filter.guardian_firebrand() == true) { - specialization_filter.guardian_firebrand = true; - } - if (proto_specialization_filter.mesmer_mirage() == true) { - specialization_filter.mesmer_mirage = true; - } - if (proto_specialization_filter.necromancer_scourge() == true) { - specialization_filter.necromancer_scourge = true; - } - if (proto_specialization_filter.ranger_soulbeast() == true) { - specialization_filter.ranger_soulbeast = true; - } - if (proto_specialization_filter.revenant_renegade() == true) { - specialization_filter.revenant_renegade = true; - } - if (proto_specialization_filter.thief_deadeye() == true) { - specialization_filter.thief_deadeye = true; - } - if (proto_specialization_filter.warrior_spellbreaker() == true) { - specialization_filter.warrior_spellbreaker = true; - } - if (proto_specialization_filter.elementalist_catalyst() == true) { - specialization_filter.elementalist_catalyst = true; - } - if (proto_specialization_filter.engineer_mechanist() == true) { - specialization_filter.engineer_mechanist = true; - } - if (proto_specialization_filter.guardian_willbender() == true) { - specialization_filter.guardian_willbender = true; - } - if (proto_specialization_filter.mesmer_virtuoso() == true) { - specialization_filter.mesmer_virtuoso = true; - } - if (proto_specialization_filter.necromancer_harbinger() == true) { - specialization_filter.necromancer_harbinger = true; - } - if (proto_specialization_filter.ranger_untamed() == true) { - specialization_filter.ranger_untamed = true; - } - if (proto_specialization_filter.revenant_vindicator() == true) { - specialization_filter.revenant_vindicator = true; - } - if (proto_specialization_filter.thief_specter() == true) { - specialization_filter.thief_specter = true; - } - if (proto_specialization_filter.warrior_bladesworn() == true) { - specialization_filter.warrior_bladesworn = true; - } - if (proto_specialization_filter.elementalist_air() == true) { - specialization_filter.elementalist_air = true; - } - if (proto_specialization_filter.elementalist_arcane() == true) { - specialization_filter.elementalist_arcane = true; - } - if (proto_specialization_filter.elementalist_earth() == true) { - specialization_filter.elementalist_earth = true; - } - if (proto_specialization_filter.elementalist_fire() == true) { - specialization_filter.elementalist_fire = true; - } - if (proto_specialization_filter.elementalist_water() == true) { - specialization_filter.elementalist_water = true; - } - if (proto_specialization_filter.engineer_alchemy() == true) { - specialization_filter.engineer_alchemy = true; - } - if (proto_specialization_filter.engineer_explosives() == true) { - specialization_filter.engineer_explosives = true; - } - if (proto_specialization_filter.engineer_firearms() == true) { - specialization_filter.engineer_firearms = true; - } - if (proto_specialization_filter.engineer_inventions() == true) { - specialization_filter.engineer_inventions = true; - } - if (proto_specialization_filter.engineer_tools() == true) { - specialization_filter.engineer_tools = true; - } - if (proto_specialization_filter.guardian_honor() == true) { - specialization_filter.guardian_honor = true; - } - if (proto_specialization_filter.guardian_radiance() == true) { - specialization_filter.guardian_radiance = true; - } - if (proto_specialization_filter.guardian_valor() == true) { - specialization_filter.guardian_valor = true; - } - if (proto_specialization_filter.guardian_virtues() == true) { - specialization_filter.guardian_virtues = true; - } - if (proto_specialization_filter.guardian_zeal() == true) { - specialization_filter.guardian_zeal = true; - } - if (proto_specialization_filter.mesmer_chaos() == true) { - specialization_filter.mesmer_chaos = true; - } - if (proto_specialization_filter.mesmer_domination() == true) { - specialization_filter.mesmer_domination = true; - } - if (proto_specialization_filter.mesmer_dueling() == true) { - specialization_filter.mesmer_dueling = true; - } - if (proto_specialization_filter.mesmer_illusions() == true) { - specialization_filter.mesmer_illusions = true; - } - if (proto_specialization_filter.mesmer_inspiration() == true) { - specialization_filter.mesmer_inspiration = true; - } - if (proto_specialization_filter.necromancer_blood_magic() == true) { - specialization_filter.necromancer_blood_magic = true; - } - if (proto_specialization_filter.necromancer_curses() == true) { - specialization_filter.necromancer_curses = true; - } - if (proto_specialization_filter.necromancer_death_magic() == true) { - specialization_filter.necromancer_death_magic = true; - } - if (proto_specialization_filter.necromancer_soul_reaping() == true) { - specialization_filter.necromancer_soul_reaping = true; - } - if (proto_specialization_filter.necromancer_spite() == true) { - specialization_filter.necromancer_spite = true; - } - if (proto_specialization_filter.ranger_beastmastery() == true) { - specialization_filter.ranger_beastmastery = true; - } - if (proto_specialization_filter.ranger_marksmanship() == true) { - specialization_filter.ranger_marksmanship = true; - } - if (proto_specialization_filter.ranger_nature_magic() == true) { - specialization_filter.ranger_nature_magic = true; - } - if (proto_specialization_filter.ranger_skirmishing() == true) { - specialization_filter.ranger_skirmishing = true; - } - if (proto_specialization_filter.ranger_wilderness_survival() == true) { - specialization_filter.ranger_wilderness_survival = true; - } - if (proto_specialization_filter.revenant_corruption() == true) { - specialization_filter.revenant_corruption = true; - } - if (proto_specialization_filter.revenant_devastation() == true) { - specialization_filter.revenant_devastation = true; - } - if (proto_specialization_filter.revenant_invocation() == true) { - specialization_filter.revenant_invocation = true; - } - if (proto_specialization_filter.revenant_retribution() == true) { - specialization_filter.revenant_retribution = true; - } - if (proto_specialization_filter.revenant_salvation() == true) { - specialization_filter.revenant_salvation = true; - } - if (proto_specialization_filter.thief_acrobatics() == true) { - specialization_filter.thief_acrobatics = true; - } - if (proto_specialization_filter.thief_critical_strikes() == true) { - specialization_filter.thief_critical_strikes = true; - } - if (proto_specialization_filter.thief_deadly_arts() == true) { - specialization_filter.thief_deadly_arts = true; - } - if (proto_specialization_filter.thief_shadow_arts() == true) { - specialization_filter.thief_shadow_arts = true; - } - if (proto_specialization_filter.thief_trickery() == true) { - specialization_filter.thief_trickery = true; - } - if (proto_specialization_filter.warrior_arms() == true) { - specialization_filter.warrior_arms = true; - } - if (proto_specialization_filter.warrior_defense() == true) { - specialization_filter.warrior_defense = true; - } - if (proto_specialization_filter.warrior_discipline() == true) { - specialization_filter.warrior_discipline = true; - } - if (proto_specialization_filter.warrior_strength() == true) { - specialization_filter.warrior_strength = true; - } - if (proto_specialization_filter.warrior_tactics() == true) { - specialization_filter.warrior_tactics = true; - } + specialization_filter.elementalist_tempest = proto_specialization_filter.elementalist_tempest(); + specialization_filter.engineer_scrapper = proto_specialization_filter.engineer_scrapper(); + specialization_filter.guardian_dragonhunter = proto_specialization_filter.guardian_dragonhunter(); + specialization_filter.mesmer_chronomancer = proto_specialization_filter.mesmer_chronomancer(); + specialization_filter.necromancer_reaper = proto_specialization_filter.necromancer_reaper(); + specialization_filter.ranger_druid = proto_specialization_filter.ranger_druid(); + specialization_filter.revenant_herald = proto_specialization_filter.revenant_herald(); + specialization_filter.thief_daredevil = proto_specialization_filter.thief_daredevil(); + specialization_filter.warrior_berserker = proto_specialization_filter.warrior_berserker(); + specialization_filter.elementalist_weaver = proto_specialization_filter.elementalist_weaver(); + specialization_filter.engineer_holosmith = proto_specialization_filter.engineer_holosmith(); + specialization_filter.guardian_firebrand = proto_specialization_filter.guardian_firebrand(); + specialization_filter.mesmer_mirage = proto_specialization_filter.mesmer_mirage(); + specialization_filter.necromancer_scourge = proto_specialization_filter.necromancer_scourge(); + specialization_filter.ranger_soulbeast = proto_specialization_filter.ranger_soulbeast(); + specialization_filter.revenant_renegade = proto_specialization_filter.revenant_renegade(); + specialization_filter.thief_deadeye = proto_specialization_filter.thief_deadeye(); + specialization_filter.warrior_spellbreaker = proto_specialization_filter.warrior_spellbreaker(); + specialization_filter.elementalist_catalyst = proto_specialization_filter.elementalist_catalyst(); + specialization_filter.engineer_mechanist = proto_specialization_filter.engineer_mechanist(); + specialization_filter.guardian_willbender = proto_specialization_filter.guardian_willbender(); + specialization_filter.mesmer_virtuoso = proto_specialization_filter.mesmer_virtuoso(); + specialization_filter.necromancer_harbinger = proto_specialization_filter.necromancer_harbinger(); + specialization_filter.ranger_untamed = proto_specialization_filter.ranger_untamed(); + specialization_filter.revenant_vindicator = proto_specialization_filter.revenant_vindicator(); + specialization_filter.thief_specter = proto_specialization_filter.thief_specter(); + specialization_filter.warrior_bladesworn = proto_specialization_filter.warrior_bladesworn(); + specialization_filter.elementalist_air = proto_specialization_filter.elementalist_air(); + specialization_filter.elementalist_arcane = proto_specialization_filter.elementalist_arcane(); + specialization_filter.elementalist_earth = proto_specialization_filter.elementalist_earth(); + specialization_filter.elementalist_fire = proto_specialization_filter.elementalist_fire(); + specialization_filter.elementalist_water = proto_specialization_filter.elementalist_water(); + specialization_filter.engineer_alchemy = proto_specialization_filter.engineer_alchemy(); + specialization_filter.engineer_explosives = proto_specialization_filter.engineer_explosives(); + specialization_filter.engineer_firearms = proto_specialization_filter.engineer_firearms(); + specialization_filter.engineer_inventions = proto_specialization_filter.engineer_inventions(); + specialization_filter.engineer_tools = proto_specialization_filter.engineer_tools(); + specialization_filter.guardian_honor = proto_specialization_filter.guardian_honor(); + specialization_filter.guardian_radiance = proto_specialization_filter.guardian_radiance(); + specialization_filter.guardian_valor = proto_specialization_filter.guardian_valor(); + specialization_filter.guardian_virtues = proto_specialization_filter.guardian_virtues(); + specialization_filter.guardian_zeal = proto_specialization_filter.guardian_zeal(); + specialization_filter.mesmer_chaos = proto_specialization_filter.mesmer_chaos(); + specialization_filter.mesmer_domination = proto_specialization_filter.mesmer_domination(); + specialization_filter.mesmer_dueling = proto_specialization_filter.mesmer_dueling(); + specialization_filter.mesmer_illusions = proto_specialization_filter.mesmer_illusions(); + specialization_filter.mesmer_inspiration = proto_specialization_filter.mesmer_inspiration(); + specialization_filter.necromancer_blood_magic = proto_specialization_filter.necromancer_blood_magic(); + specialization_filter.necromancer_curses = proto_specialization_filter.necromancer_curses(); + specialization_filter.necromancer_death_magic = proto_specialization_filter.necromancer_death_magic(); + specialization_filter.necromancer_soul_reaping = proto_specialization_filter.necromancer_soul_reaping(); + specialization_filter.necromancer_spite = proto_specialization_filter.necromancer_spite(); + specialization_filter.ranger_beastmastery = proto_specialization_filter.ranger_beastmastery(); + specialization_filter.ranger_marksmanship = proto_specialization_filter.ranger_marksmanship(); + specialization_filter.ranger_nature_magic = proto_specialization_filter.ranger_nature_magic(); + specialization_filter.ranger_skirmishing = proto_specialization_filter.ranger_skirmishing(); + specialization_filter.ranger_wilderness_survival = proto_specialization_filter.ranger_wilderness_survival(); + specialization_filter.revenant_corruption = proto_specialization_filter.revenant_corruption(); + specialization_filter.revenant_devastation = proto_specialization_filter.revenant_devastation(); + specialization_filter.revenant_invocation = proto_specialization_filter.revenant_invocation(); + specialization_filter.revenant_retribution = proto_specialization_filter.revenant_retribution(); + specialization_filter.revenant_salvation = proto_specialization_filter.revenant_salvation(); + specialization_filter.thief_acrobatics = proto_specialization_filter.thief_acrobatics(); + specialization_filter.thief_critical_strikes = proto_specialization_filter.thief_critical_strikes(); + specialization_filter.thief_deadly_arts = proto_specialization_filter.thief_deadly_arts(); + specialization_filter.thief_shadow_arts = proto_specialization_filter.thief_shadow_arts(); + specialization_filter.thief_trickery = proto_specialization_filter.thief_trickery(); + specialization_filter.warrior_arms = proto_specialization_filter.warrior_arms(); + specialization_filter.warrior_defense = proto_specialization_filter.warrior_defense(); + specialization_filter.warrior_discipline = proto_specialization_filter.warrior_discipline(); + specialization_filter.warrior_strength = proto_specialization_filter.warrior_strength(); + specialization_filter.warrior_tactics = proto_specialization_filter.warrior_tactics(); return specialization_filter; } diff --git a/xml_converter/src/attribute/species_filter_gen.cpp b/xml_converter/src/attribute/species_filter_gen.cpp index a8be6b0a..d2f3ad6c 100644 --- a/xml_converter/src/attribute/species_filter_gen.cpp +++ b/xml_converter/src/attribute/species_filter_gen.cpp @@ -69,40 +69,20 @@ string stringify_species_filter(SpeciesFilter attribute_value) { waypoint::SpeciesFilter* to_proto_species_filter(SpeciesFilter attribute_value) { waypoint::SpeciesFilter* proto_species_filter = new waypoint::SpeciesFilter(); - if (attribute_value.asura == true) { - proto_species_filter->set_asura(true); - } - if (attribute_value.charr == true) { - proto_species_filter->set_charr(true); - } - if (attribute_value.human == true) { - proto_species_filter->set_human(true); - } - if (attribute_value.norn == true) { - proto_species_filter->set_norn(true); - } - if (attribute_value.sylvari == true) { - proto_species_filter->set_sylvari(true); - } + proto_species_filter->set_asura(attribute_value.asura); + proto_species_filter->set_charr(attribute_value.charr); + proto_species_filter->set_human(attribute_value.human); + proto_species_filter->set_norn(attribute_value.norn); + proto_species_filter->set_sylvari(attribute_value.sylvari); return proto_species_filter; } SpeciesFilter from_proto_species_filter(waypoint::SpeciesFilter proto_species_filter) { SpeciesFilter species_filter; - if (proto_species_filter.asura() == true) { - species_filter.asura = true; - } - if (proto_species_filter.charr() == true) { - species_filter.charr = true; - } - if (proto_species_filter.human() == true) { - species_filter.human = true; - } - if (proto_species_filter.norn() == true) { - species_filter.norn = true; - } - if (proto_species_filter.sylvari() == true) { - species_filter.sylvari = true; - } + species_filter.asura = proto_species_filter.asura(); + species_filter.charr = proto_species_filter.charr(); + species_filter.human = proto_species_filter.human(); + species_filter.norn = proto_species_filter.norn(); + species_filter.sylvari = proto_species_filter.sylvari(); return species_filter; } diff --git a/xml_converter/src/attribute/string.cpp b/xml_converter/src/attribute/string.cpp index c802eb84..08e53392 100644 --- a/xml_converter/src/attribute/string.cpp +++ b/xml_converter/src/attribute/string.cpp @@ -28,25 +28,3 @@ string parse_string(rapidxml::xml_attribute<>* input, vector*) { string stringify_string(string attribute_value) { return attribute_value; } - -//////////////////////////////////////////////////////////////////////////////// -// to_proto_string -// -// Returns the same string that was passed in which is encoded directly into -// proto. This function exists for stylistic convenience with all the other -// attribute to_proto functions. -//////////////////////////////////////////////////////////////////////////////// -string to_proto_string(string attribute_value) { - return attribute_value; -} - -//////////////////////////////////////////////////////////////////////////////// -// to_proto_string -// -// Returns the same string that was parsed from proto. -// This function exists for stylistic convenience with all the other -// attribute from_proto functions. -//////////////////////////////////////////////////////////////////////////////// -string from_proto_string(string attribute_value) { - return attribute_value; -} diff --git a/xml_converter/src/attribute/string.hpp b/xml_converter/src/attribute/string.hpp index a47ac3a3..6e202248 100644 --- a/xml_converter/src/attribute/string.hpp +++ b/xml_converter/src/attribute/string.hpp @@ -10,7 +10,3 @@ class XMLError; std::string parse_string(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_string(std::string attribute_value); - -std::string to_proto_string(std::string attribute_value); - -std::string from_proto_string(std::string attribute_value); diff --git a/xml_converter/src/attribute/trail_data_map_id.cpp b/xml_converter/src/attribute/trail_data_map_id.cpp index 6d9cb2b3..c86b94e6 100644 --- a/xml_converter/src/attribute/trail_data_map_id.cpp +++ b/xml_converter/src/attribute/trail_data_map_id.cpp @@ -30,14 +30,3 @@ TrailDataMapId parse_trail_data_map_id(rapidxml::xml_attribute<>* input, vector< string stringify_trail_data_map_id(TrailDataMapId attribute_value) { return to_string(attribute_value.trail_data_map_id); } - -//////////////////////////////////////////////////////////////////////////////// -// to_proto_trail_data -// -// Returns a TrailDataMapID so that it can be saved to proto. -//////////////////////////////////////////////////////////////////////////////// -// waypoint::TrailDataMapID* to_proto_trail_data(TrailDataMapID attribute_value) { -// waypoint::TrailData* trail_data; -// trail_data->set_trail_data(attribute_value.trail_data); -// return trail_data; -// } diff --git a/xml_converter/src/attribute/trail_data_map_id.hpp b/xml_converter/src/attribute/trail_data_map_id.hpp index beca405a..440fa5ae 100644 --- a/xml_converter/src/attribute/trail_data_map_id.hpp +++ b/xml_converter/src/attribute/trail_data_map_id.hpp @@ -15,5 +15,3 @@ class TrailDataMapId { TrailDataMapId parse_trail_data_map_id(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_trail_data_map_id(TrailDataMapId attribute_value); - -// waypoint::TrailDataMapID* to_proto_trail_data(TrailDataMapID attribute_value); diff --git a/xml_converter/src/attribute/unique_id.cpp b/xml_converter/src/attribute/unique_id.cpp index 46627b4e..5de78428 100644 --- a/xml_converter/src/attribute/unique_id.cpp +++ b/xml_converter/src/attribute/unique_id.cpp @@ -27,12 +27,15 @@ string stringify_unique_id(UniqueId attribute_value) { waypoint::GUID* to_proto_unique_id(UniqueId attribute_value) { waypoint::GUID* guid = new waypoint::GUID(); - guid->set_guid(base64_encode(&attribute_value.guid[0], attribute_value.guid.size())); + std::string s(attribute_value.guid.begin(), attribute_value.guid.end()); + guid->set_guid(s); return guid; } UniqueId from_proto_unique_id(waypoint::GUID attribute_value) { UniqueId unique_id; - unique_id.guid = base64_decode(attribute_value.guid()); + string s = attribute_value.guid(); + std::vector guid(s.begin(), s.end()); + unique_id.guid = guid; return unique_id; } diff --git a/xml_converter/src/icon_gen.cpp b/xml_converter/src/icon_gen.cpp index a0836710..c0770a98 100644 --- a/xml_converter/src/icon_gen.cpp +++ b/xml_converter/src/icon_gen.cpp @@ -476,25 +476,25 @@ waypoint::Waypoint Icon::as_protobuf() const { if (trigger == nullptr) { trigger = new waypoint::Trigger(); } - trigger->set_auto_trigger(to_proto_bool(this->auto_trigger)); + trigger->set_auto_trigger(this->auto_trigger); } if (this->bounce_delay_is_set) { if (trigger == nullptr) { trigger = new waypoint::Trigger(); } - trigger->set_bounce_delay(to_proto_float(this->bounce_delay)); + trigger->set_bounce_delay(this->bounce_delay); } if (this->bounce_duration_is_set) { if (trigger == nullptr) { trigger = new waypoint::Trigger(); } - trigger->set_bounce_duration(to_proto_float(this->bounce_duration)); + trigger->set_bounce_duration(this->bounce_duration); } if (this->bounce_height_is_set) { if (trigger == nullptr) { trigger = new waypoint::Trigger(); } - trigger->set_bounce_height(to_proto_float(this->bounce_height)); + trigger->set_bounce_height(this->bounce_height); } if (this->can_fade_is_set) { proto_icon.set_can_fade(this->can_fade); @@ -509,13 +509,13 @@ waypoint::Waypoint Icon::as_protobuf() const { if (trigger == nullptr) { trigger = new waypoint::Trigger(); } - trigger->set_action_copy_clipboard(to_proto_string(this->copy_clipboard)); + trigger->set_action_copy_clipboard(this->copy_clipboard); } if (this->copy_message_is_set) { if (trigger == nullptr) { trigger = new waypoint::Trigger(); } - trigger->set_action_copy_message(to_proto_string(this->copy_message)); + trigger->set_action_copy_message(this->copy_message); } if (this->cull_chirality_is_set) { proto_icon.set_cull_chirality(to_proto_cull_chirality(this->cull_chirality)); @@ -539,7 +539,7 @@ waypoint::Waypoint Icon::as_protobuf() const { if (trigger == nullptr) { trigger = new waypoint::Trigger(); } - trigger->set_has_countdown(to_proto_bool(this->has_countdown)); + trigger->set_has_countdown(this->has_countdown); } if (this->heightoffset_is_set) { proto_icon.set_height_offset(this->heightoffset); @@ -560,13 +560,13 @@ waypoint::Waypoint Icon::as_protobuf() const { if (trigger == nullptr) { trigger = new waypoint::Trigger(); } - trigger->set_action_info_message(to_proto_string(this->info_message)); + trigger->set_action_info_message(this->info_message); } if (this->invert_visibility_is_set) { if (trigger == nullptr) { trigger = new waypoint::Trigger(); } - trigger->set_invert_display(to_proto_bool(this->invert_visibility)); + trigger->set_invert_display(this->invert_visibility); } if (this->map_display_size_is_set) { proto_icon.set_map_display_size(this->map_display_size); @@ -611,7 +611,7 @@ waypoint::Waypoint Icon::as_protobuf() const { if (trigger == nullptr) { trigger = new waypoint::Trigger(); } - trigger->set_reset_length(to_proto_float(this->reset_length)); + trigger->set_reset_length(this->reset_length); } if (this->scale_on_map_with_zoom_is_set) { proto_icon.set_scale_on_map_with_zoom(this->scale_on_map_with_zoom); @@ -650,7 +650,7 @@ waypoint::Waypoint Icon::as_protobuf() const { if (trigger == nullptr) { trigger = new waypoint::Trigger(); } - trigger->set_range(to_proto_float(this->trigger_range)); + trigger->set_range(this->trigger_range); } if (trigger != nullptr) { proto_icon.set_allocated_trigger(trigger); diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 2be5b5b8..c0516e53 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -1,4 +1,5 @@ #include + #include #include #include @@ -64,7 +65,7 @@ void write_protobuf_file(string proto_filepath, map* marker_ca ofstream outfile; waypoint::Waypoint proto_message; - outfile.open(proto_filepath, ios::out | ios_base::binary); + outfile.open(proto_filepath, ios::out | ios::binary); for (const auto& category : *marker_categories) { waypoint::Waypoint proto_category = category.second.as_protobuf(); proto_message.add_category()->CopyFrom(proto_category.category(0)); @@ -247,7 +248,7 @@ void read_protobuf_file(string proto_filepath, map* marker_cat fstream infile; waypoint::Waypoint proto_message; - infile.open(proto_filepath, ios::in | ios_base::binary); + infile.open(proto_filepath, ios::in | ios::binary); proto_message.ParseFromIstream(&infile); for (int i = 0; i < proto_message.category_size(); i++) { parse_proto_marker_categories(proto_message.category(i), marker_categories); @@ -264,8 +265,8 @@ vector get_xml_files(string directory) { vector files; vector subfolders; string path; - DIR *dir = opendir(directory.c_str()); - struct dirent *entry = readdir(dir); + DIR* dir = opendir(directory.c_str()); + struct dirent* entry = readdir(dir); while ((entry = readdir(dir)) != NULL) { if (entry->d_type == DT_DIR && has_suffix(directory, ".") == false) { path = directory + "/"; @@ -286,11 +287,11 @@ vector get_xml_files(string directory) { std::sort(files.begin(), files.end(), filename_comp); std::sort(subfolders.begin(), subfolders.end(), filename_comp); - for (const std::string &subfolder : subfolders) { - if (has_suffix(subfolder, ".") == false && has_suffix(subfolder, "..") == false) { - vector subfiles = get_xml_files(subfolder); - files.insert(files.end(), subfiles.begin(), subfiles.end()); - } + for (const std::string& subfolder : subfolders) { + if (has_suffix(subfolder, ".") == false && has_suffix(subfolder, "..") == false) { + vector subfiles = get_xml_files(subfolder); + files.insert(files.end(), subfiles.begin(), subfiles.end()); + } } return files; } @@ -325,8 +326,8 @@ int main() { test_proto(); string directory = "./packs"; - DIR *dir = opendir(directory.c_str()); - struct dirent *entry = readdir(dir); + DIR* dir = opendir(directory.c_str()); + struct dirent* entry = readdir(dir); while ((entry = readdir(dir)) != NULL) { if (entry->d_type == DT_DIR) { string path = directory + "/"; From fa424d35c68a7a79ee93846246a57905d88191fa Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 11 Dec 2022 11:37:25 -0500 Subject: [PATCH 137/539] Changed as_protobuf() to return the proto class for the function --- .../generators/cpp_templates/class_template.cpp | 11 ++++------- .../generators/cpp_templates/class_template.hpp | 2 +- xml_converter/src/category_gen.cpp | 11 ++++------- xml_converter/src/category_gen.hpp | 2 +- xml_converter/src/icon_gen.cpp | 6 ++---- xml_converter/src/icon_gen.hpp | 2 +- xml_converter/src/parseable.cpp | 8 -------- xml_converter/src/parseable.hpp | 3 --- xml_converter/src/trail_gen.cpp | 6 ++---- xml_converter/src/trail_gen.hpp | 2 +- xml_converter/src/xml_converter.cpp | 14 ++++++++------ 11 files changed, 24 insertions(+), 43 deletions(-) diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index 4587cb7a..3d7dd6d9 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -118,7 +118,7 @@ vector {{cpp_class}}::as_xml() const { return xml_node_contents; } -waypoint::Waypoint {{cpp_class}}::as_protobuf() const { +waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf() const { waypoint::{{cpp_class}} proto_{{cpp_class_header}}; {% if cpp_class == "Icon": %} waypoint::Trigger* trigger = nullptr; @@ -173,14 +173,11 @@ waypoint::Waypoint {{cpp_class}}::as_protobuf() const { {% endif %} {% if cpp_class == "Category": %} for (const auto& [key, val] : this->children) { - waypoint::Waypoint proto_{{cpp_class_header}}_child = val.as_protobuf(); - - proto_{{cpp_class_header}}.add_children()->CopyFrom(proto_{{cpp_class_header}}_child.{{cpp_class_header}}(0)); + waypoint::{{cpp_class}} proto_{{cpp_class_header}}_child = val.as_protobuf(); + proto_{{cpp_class_header}}.add_children()->CopyFrom(proto_{{cpp_class_header}}_child); } {% endif %} - waypoint::Waypoint output; - output.add_{{cpp_class_header}}()->CopyFrom(proto_{{cpp_class_header}}); - return output; + return proto_{{cpp_class_header}}; } void {{cpp_class}}::parse_protobuf(waypoint::{{cpp_class}} proto_{{cpp_class_header}}) { diff --git a/xml_converter/generators/cpp_templates/class_template.hpp b/xml_converter/generators/cpp_templates/class_template.hpp index 91f123c7..fdc11c36 100644 --- a/xml_converter/generators/cpp_templates/class_template.hpp +++ b/xml_converter/generators/cpp_templates/class_template.hpp @@ -30,7 +30,7 @@ class {{cpp_class}} : public Parseable { virtual std::vector as_xml() const; virtual std::string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors); - virtual waypoint::Waypoint as_protobuf() const; + waypoint::{{cpp_class}} as_protobuf() const; void parse_protobuf(waypoint::{{cpp_class}} proto_{{cpp_class_header}}); {% if attributes_of_type_marker_category %} bool validate_attributes_of_type_marker_category(); diff --git a/xml_converter/src/category_gen.cpp b/xml_converter/src/category_gen.cpp index f105b72b..50dddab3 100644 --- a/xml_converter/src/category_gen.cpp +++ b/xml_converter/src/category_gen.cpp @@ -93,7 +93,7 @@ vector Category::as_xml() const { return xml_node_contents; } -waypoint::Waypoint Category::as_protobuf() const { +waypoint::Category Category::as_protobuf() const { waypoint::Category proto_category; if (this->default_visibility_is_set) { proto_category.set_default_visibility(this->default_visibility); @@ -111,13 +111,10 @@ waypoint::Waypoint Category::as_protobuf() const { proto_category.set_tip_description(this->tooltip_description); } for (const auto& [key, val] : this->children) { - waypoint::Waypoint proto_category_child = val.as_protobuf(); - - proto_category.add_children()->CopyFrom(proto_category_child.category(0)); + waypoint::Category proto_category_child = val.as_protobuf(); + proto_category.add_children()->CopyFrom(proto_category_child); } - waypoint::Waypoint output; - output.add_category()->CopyFrom(proto_category); - return output; + return proto_category; } void Category::parse_protobuf(waypoint::Category proto_category) { diff --git a/xml_converter/src/category_gen.hpp b/xml_converter/src/category_gen.hpp index 5aeac6fd..a29fed10 100644 --- a/xml_converter/src/category_gen.hpp +++ b/xml_converter/src/category_gen.hpp @@ -32,6 +32,6 @@ class Category : public Parseable { virtual std::vector as_xml() const; virtual std::string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors); - virtual waypoint::Waypoint as_protobuf() const; + waypoint::Category as_protobuf() const; void parse_protobuf(waypoint::Category proto_category); }; diff --git a/xml_converter/src/icon_gen.cpp b/xml_converter/src/icon_gen.cpp index c0770a98..6fc3ee1c 100644 --- a/xml_converter/src/icon_gen.cpp +++ b/xml_converter/src/icon_gen.cpp @@ -460,7 +460,7 @@ vector Icon::as_xml() const { return xml_node_contents; } -waypoint::Waypoint Icon::as_protobuf() const { +waypoint::Icon Icon::as_protobuf() const { waypoint::Icon proto_icon; waypoint::Trigger* trigger = nullptr; if (this->achievement_bitmask_is_set) { @@ -655,9 +655,7 @@ waypoint::Waypoint Icon::as_protobuf() const { if (trigger != nullptr) { proto_icon.set_allocated_trigger(trigger); } - waypoint::Waypoint output; - output.add_icon()->CopyFrom(proto_icon); - return output; + return proto_icon; } void Icon::parse_protobuf(waypoint::Icon proto_icon) { diff --git a/xml_converter/src/icon_gen.hpp b/xml_converter/src/icon_gen.hpp index 5be08a0b..c53a0d16 100644 --- a/xml_converter/src/icon_gen.hpp +++ b/xml_converter/src/icon_gen.hpp @@ -136,7 +136,7 @@ class Icon : public Parseable { virtual std::vector as_xml() const; virtual std::string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors); - virtual waypoint::Waypoint as_protobuf() const; + waypoint::Icon as_protobuf() const; void parse_protobuf(waypoint::Icon proto_icon); bool validate_attributes_of_type_marker_category(); }; diff --git a/xml_converter/src/parseable.cpp b/xml_converter/src/parseable.cpp index 87a3211b..b5299275 100644 --- a/xml_converter/src/parseable.cpp +++ b/xml_converter/src/parseable.cpp @@ -1,13 +1,11 @@ #include "parseable.hpp" -#include #include #include #include #include "rapid_helpers.hpp" #include "rapidxml-1.13/rapidxml.hpp" -#include "waypoint.pb.h" std::string Parseable::classname() { return "Parseable"; @@ -39,9 +37,3 @@ std::vector Parseable::as_xml() const { std::vector result; return result; } - -waypoint::Waypoint Parseable::as_protobuf() const { - throw std::runtime_error("error: Parseable::as_protobuf() should not be called"); - waypoint::Waypoint result; - return result; -} diff --git a/xml_converter/src/parseable.hpp b/xml_converter/src/parseable.hpp index 8f1d7c6e..42f63088 100644 --- a/xml_converter/src/parseable.hpp +++ b/xml_converter/src/parseable.hpp @@ -4,7 +4,6 @@ #include #include "rapidxml-1.13/rapidxml.hpp" -#include "waypoint.pb.h" class XMLError; class Parseable { @@ -19,6 +18,4 @@ class Parseable { virtual bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors); virtual std::vector as_xml() const; - - virtual waypoint::Waypoint as_protobuf() const; }; diff --git a/xml_converter/src/trail_gen.cpp b/xml_converter/src/trail_gen.cpp index c35576f6..c5cc81fe 100644 --- a/xml_converter/src/trail_gen.cpp +++ b/xml_converter/src/trail_gen.cpp @@ -267,7 +267,7 @@ vector Trail::as_xml() const { return xml_node_contents; } -waypoint::Waypoint Trail::as_protobuf() const { +waypoint::Trail Trail::as_protobuf() const { waypoint::Trail proto_trail; if (this->achievement_bitmask_is_set) { proto_trail.set_achievement_bit(this->achievement_bitmask); @@ -353,9 +353,7 @@ waypoint::Waypoint Trail::as_protobuf() const { if (this->trail_scale_is_set) { proto_trail.set_scale(this->trail_scale); } - waypoint::Waypoint output; - output.add_trail()->CopyFrom(proto_trail); - return output; + return proto_trail; } void Trail::parse_protobuf(waypoint::Trail proto_trail) { diff --git a/xml_converter/src/trail_gen.hpp b/xml_converter/src/trail_gen.hpp index 032692e9..c54eb32d 100644 --- a/xml_converter/src/trail_gen.hpp +++ b/xml_converter/src/trail_gen.hpp @@ -82,7 +82,7 @@ class Trail : public Parseable { virtual std::vector as_xml() const; virtual std::string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors); - virtual waypoint::Waypoint as_protobuf() const; + waypoint::Trail as_protobuf() const; void parse_protobuf(waypoint::Trail proto_trail); bool validate_attributes_of_type_marker_category(); }; diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index c0516e53..3661f7ec 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -67,18 +67,20 @@ void write_protobuf_file(string proto_filepath, map* marker_ca outfile.open(proto_filepath, ios::out | ios::binary); for (const auto& category : *marker_categories) { - waypoint::Waypoint proto_category = category.second.as_protobuf(); - proto_message.add_category()->CopyFrom(proto_category.category(0)); + waypoint::Category proto_category = category.second.as_protobuf(); + proto_message.add_category()->CopyFrom(proto_category); } for (const auto& parsed_poi : *parsed_pois) { if (parsed_poi->classname() == "POI") { - waypoint::Waypoint poi = parsed_poi->as_protobuf(); - proto_message.add_icon()->CopyFrom(poi.icon(0)); + Icon* icon = dynamic_cast(parsed_poi); + waypoint::Icon poi = icon->as_protobuf(); + proto_message.add_icon()->CopyFrom(poi); } if (parsed_poi->classname() == "Trail") { - waypoint::Waypoint poi = parsed_poi->as_protobuf(); - proto_message.add_trail()->CopyFrom(poi.trail(0)); + Trail* trail = dynamic_cast(parsed_poi); + waypoint::Trail poi = trail->as_protobuf(); + proto_message.add_trail()->CopyFrom(poi); } } proto_message.SerializeToOstream(&outfile); From c2a8a026c3c2a9f85c1f5dec089efb2f9802c1c8 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sat, 17 Dec 2022 17:45:31 -0500 Subject: [PATCH 138/539] Created a function system that writes protobins based on MapID --- xml_converter/src/xml_converter.cpp | 79 ++++++++++++++++++++++++----- 1 file changed, 65 insertions(+), 14 deletions(-) diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 3661f7ec..ae43a328 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -2,11 +2,13 @@ #include #include +#include #include #include #include #include #include +#include #include #include #include @@ -61,14 +63,22 @@ void write_xml_file(string xml_filepath, map* marker_categorie outfile.close(); } +void create_proto_categories(waypoint::Category proto_category, map* proto_categories){ + proto_categories->insert({proto_category.name(), proto_category}); + for (int i = 0; i < proto_category.children_size(); i++) { + create_proto_categories(proto_category.children(i), proto_categories); + } +} + void write_protobuf_file(string proto_filepath, map* marker_categories, vector* parsed_pois) { - ofstream outfile; waypoint::Waypoint proto_message; + std::set map_ids; + map proto_categories; + std::set category_includes; - outfile.open(proto_filepath, ios::out | ios::binary); for (const auto& category : *marker_categories) { waypoint::Category proto_category = category.second.as_protobuf(); - proto_message.add_category()->CopyFrom(proto_category); + create_proto_categories(proto_category, &proto_categories); } for (const auto& parsed_poi : *parsed_pois) { @@ -76,15 +86,56 @@ void write_protobuf_file(string proto_filepath, map* marker_ca Icon* icon = dynamic_cast(parsed_poi); waypoint::Icon poi = icon->as_protobuf(); proto_message.add_icon()->CopyFrom(poi); + map_ids.insert(icon->map_id); } if (parsed_poi->classname() == "Trail") { Trail* trail = dynamic_cast(parsed_poi); waypoint::Trail poi = trail->as_protobuf(); proto_message.add_trail()->CopyFrom(poi); + map_ids.insert(trail->map_id); } } - proto_message.SerializeToOstream(&outfile); - outfile.close(); + + for (int map_id : map_ids) { + ofstream outfile; + string output_filepath = proto_filepath + "/" + to_string(map_id) + ".data"; + outfile.open(output_filepath, ios::out | ios::binary); + waypoint::Waypoint output_message; + + for (int i = 0; i < proto_message.icon_size(); i++) { + if (proto_message.icon(i).map_id() == map_id) { + vector split_categories = split(proto_message.icon(i).category().name(), "."); + auto category = proto_categories.find(split_categories[split_categories.size()-1]); + if (category == proto_categories.end()) { + cout << "Unknown MarkerCategory " << proto_message.icon(i).category().name() << endl; + } + else { + category_includes.insert(split_categories[0]); + } + output_message.add_icon()->CopyFrom(proto_message.icon(i)); + } + } + for (int i = 0; i < proto_message.trail_size(); i++) { + if (proto_message.trail(i).map_id() == map_id) { + vector split_categories = split(proto_message.trail(i).category().name(), "."); + auto category = proto_categories.find(split_categories[split_categories.size()-1]); + if (category == proto_categories.end()) { + cout << "Unknown MarkerCategory " << proto_message.trail(i).category().name() << endl; + } + else { + category_includes.insert(split_categories[0]); + } + output_message.add_trail()->CopyFrom(proto_message.trail(i)); + } + } + + for (string category_include : category_includes){ + output_message.add_category()->CopyFrom(proto_categories[category_include]); + } + //TODO: Change so that only the markercategories that have POIs are included and exclude all others. + output_message.SerializeToOstream(&outfile); + outfile.close(); + } } Category* get_category(rapidxml::xml_node<>* node, map* marker_categories, vector* errors) { @@ -344,15 +395,15 @@ int main() { auto ms = std::chrono::duration_cast(dur).count(); cout << "The parse function took " << ms << " milliseconds to run" << endl; - begin = chrono::high_resolution_clock::now(); - write_xml_file("./export_packs/export.xml", &marker_categories, &parsed_pois); - end = chrono::high_resolution_clock::now(); - dur = end - begin; - ms = std::chrono::duration_cast(dur).count(); - cout << "The xml write function took " << ms << " milliseconds to run" << endl; + // begin = chrono::high_resolution_clock::now(); + // write_xml_file("./export_packs/export.xml", &marker_categories, &parsed_pois); + // end = chrono::high_resolution_clock::now(); + // dur = end - begin; + // ms = std::chrono::duration_cast(dur).count(); + // cout << "The xml write function took " << ms << " milliseconds to run" << endl; begin = chrono::high_resolution_clock::now(); - write_protobuf_file("./export_packs/export.data", &marker_categories, &parsed_pois); + write_protobuf_file("./protobins", &marker_categories, &parsed_pois); end = chrono::high_resolution_clock::now(); dur = end - begin; ms = std::chrono::duration_cast(dur).count(); @@ -366,14 +417,14 @@ int main() { marker_categories.clear(); begin = chrono::high_resolution_clock::now(); - read_protobuf_file("./export_packs/export.data", &marker_categories, &parsed_pois); + read_protobuf_file("./protobins/0.data", &marker_categories, &parsed_pois); end = chrono::high_resolution_clock::now(); dur = end - begin; ms = std::chrono::duration_cast(dur).count(); cout << "The protobuf read function took " << ms << " milliseconds to run" << endl; begin = chrono::high_resolution_clock::now(); - write_xml_file("./export_packs/export2.xml", &marker_categories, &parsed_pois); + write_xml_file("./protobins/0.xml", &marker_categories, &parsed_pois); end = chrono::high_resolution_clock::now(); dur = end - begin; ms = std::chrono::duration_cast(dur).count(); From 144dd98394790ed98f254c850f76055e469cf4b3 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 19 Dec 2022 22:05:05 -0500 Subject: [PATCH 139/539] Added filter that removes unused categories before serializing --- xml_converter/src/xml_converter.cpp | 108 ++++++++++++++++++---------- 1 file changed, 72 insertions(+), 36 deletions(-) diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index ae43a328..b9b9deee 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -1,9 +1,9 @@ #include +#include #include #include #include -#include #include #include #include @@ -63,21 +63,50 @@ void write_xml_file(string xml_filepath, map* marker_categorie outfile.close(); } -void create_proto_categories(waypoint::Category proto_category, map* proto_categories){ - proto_categories->insert({proto_category.name(), proto_category}); +void create_proto_categories(waypoint::Category proto_category, set* proto_categories) { + proto_categories->insert(proto_category.name()); for (int i = 0; i < proto_category.children_size(); i++) { create_proto_categories(proto_category.children(i), proto_categories); } } +void remove_proto_child(waypoint::Category* proto_category, set category_includes) { + int keep = 0; + for (int i = 0; i < proto_category->children_size(); i++) { + vector split_categories = split(proto_category->children(i).name(), "."); + auto pos = category_includes.find(split_categories[split_categories.size() - 1]); + if (pos != category_includes.end()) { + if (keep < i) { + proto_category->mutable_children()->SwapElements(i, keep); + if (proto_category->children(i).children_size() >= 0) { + for (int j = 0; j < proto_category->children_size(); j++) { + remove_proto_child(proto_category->mutable_children(j), category_includes); + } + } + } + ++keep; + } + } + + proto_category->mutable_children()->DeleteSubrange(keep, proto_category->children_size() - keep); +} + void write_protobuf_file(string proto_filepath, map* marker_categories, vector* parsed_pois) { - waypoint::Waypoint proto_message; + waypoint::Waypoint proto_pois; + waypoint::Waypoint all_categories; + waypoint::Waypoint output_message; std::set map_ids; - map proto_categories; + std::set proto_categories; std::set category_includes; + if (mkdir(proto_filepath.c_str(), 0700) == -1) { + cout << "Error making ./protobins" << endl; + throw std::error_code(); + } + for (const auto& category : *marker_categories) { waypoint::Category proto_category = category.second.as_protobuf(); + all_categories.add_category()->CopyFrom(proto_category); create_proto_categories(proto_category, &proto_categories); } @@ -85,13 +114,13 @@ void write_protobuf_file(string proto_filepath, map* marker_ca if (parsed_poi->classname() == "POI") { Icon* icon = dynamic_cast(parsed_poi); waypoint::Icon poi = icon->as_protobuf(); - proto_message.add_icon()->CopyFrom(poi); + proto_pois.add_icon()->CopyFrom(poi); map_ids.insert(icon->map_id); } if (parsed_poi->classname() == "Trail") { Trail* trail = dynamic_cast(parsed_poi); waypoint::Trail poi = trail->as_protobuf(); - proto_message.add_trail()->CopyFrom(poi); + proto_pois.add_trail()->CopyFrom(poi); map_ids.insert(trail->map_id); } } @@ -99,42 +128,49 @@ void write_protobuf_file(string proto_filepath, map* marker_ca for (int map_id : map_ids) { ofstream outfile; string output_filepath = proto_filepath + "/" + to_string(map_id) + ".data"; - outfile.open(output_filepath, ios::out | ios::binary); - waypoint::Waypoint output_message; + outfile.open(output_filepath, ios::out | ios::binary); + output_message.CopyFrom(all_categories); - for (int i = 0; i < proto_message.icon_size(); i++) { - if (proto_message.icon(i).map_id() == map_id) { - vector split_categories = split(proto_message.icon(i).category().name(), "."); - auto category = proto_categories.find(split_categories[split_categories.size()-1]); + for (int i = 0; i < proto_pois.icon_size(); i++) { + vector split_categories = split(proto_pois.icon(i).category().name(), "."); + if (proto_pois.icon(i).map_id() == map_id) { + auto category = proto_categories.find(split_categories[split_categories.size() - 1]); if (category == proto_categories.end()) { - cout << "Unknown MarkerCategory " << proto_message.icon(i).category().name() << endl; + cout << "Unknown MarkerCategory " << proto_pois.icon(i).category().name() << endl; } else { - category_includes.insert(split_categories[0]); + for (string split_category : split_categories) { + category_includes.insert(split_category); + } } - output_message.add_icon()->CopyFrom(proto_message.icon(i)); + output_message.add_icon()->CopyFrom(proto_pois.icon(i)); } - } - for (int i = 0; i < proto_message.trail_size(); i++) { - if (proto_message.trail(i).map_id() == map_id) { - vector split_categories = split(proto_message.trail(i).category().name(), "."); - auto category = proto_categories.find(split_categories[split_categories.size()-1]); + } + for (int i = 0; i < proto_pois.trail_size(); i++) { + if (proto_pois.trail(i).map_id() == map_id) { + vector split_categories = split(proto_pois.trail(i).category().name(), "."); + auto category = proto_categories.find(split_categories[split_categories.size() - 1]); if (category == proto_categories.end()) { - cout << "Unknown MarkerCategory " << proto_message.trail(i).category().name() << endl; + cout << "Unknown MarkerCategory " << proto_pois.trail(i).category().name() << endl; } else { - category_includes.insert(split_categories[0]); + for (string split_category : split_categories) { + category_includes.insert(split_category); + } } - output_message.add_trail()->CopyFrom(proto_message.trail(i)); + output_message.add_trail()->CopyFrom(proto_pois.trail(i)); } } - - for (string category_include : category_includes){ - output_message.add_category()->CopyFrom(proto_categories[category_include]); + for (int i = 0; i < output_message.category_size(); i++) { + remove_proto_child(output_message.mutable_category(i), category_includes); + if (output_message.mutable_category(i)->children_size() == 0) { + output_message.mutable_category(i)->Clear(); + } } - //TODO: Change so that only the markercategories that have POIs are included and exclude all others. output_message.SerializeToOstream(&outfile); outfile.close(); + output_message.Clear(); + category_includes.clear(); } } @@ -395,12 +431,12 @@ int main() { auto ms = std::chrono::duration_cast(dur).count(); cout << "The parse function took " << ms << " milliseconds to run" << endl; - // begin = chrono::high_resolution_clock::now(); - // write_xml_file("./export_packs/export.xml", &marker_categories, &parsed_pois); - // end = chrono::high_resolution_clock::now(); - // dur = end - begin; - // ms = std::chrono::duration_cast(dur).count(); - // cout << "The xml write function took " << ms << " milliseconds to run" << endl; + begin = chrono::high_resolution_clock::now(); + write_xml_file("./export_packs/export.xml", &marker_categories, &parsed_pois); + end = chrono::high_resolution_clock::now(); + dur = end - begin; + ms = std::chrono::duration_cast(dur).count(); + cout << "The xml write function took " << ms << " milliseconds to run" << endl; begin = chrono::high_resolution_clock::now(); write_protobuf_file("./protobins", &marker_categories, &parsed_pois); @@ -417,14 +453,14 @@ int main() { marker_categories.clear(); begin = chrono::high_resolution_clock::now(); - read_protobuf_file("./protobins/0.data", &marker_categories, &parsed_pois); + read_protobuf_file("./protobins/1037.data", &marker_categories, &parsed_pois); end = chrono::high_resolution_clock::now(); dur = end - begin; ms = std::chrono::duration_cast(dur).count(); cout << "The protobuf read function took " << ms << " milliseconds to run" << endl; begin = chrono::high_resolution_clock::now(); - write_xml_file("./protobins/0.xml", &marker_categories, &parsed_pois); + write_xml_file("./protobins/1037.xml", &marker_categories, &parsed_pois); end = chrono::high_resolution_clock::now(); dur = end - begin; ms = std::chrono::duration_cast(dur).count(); From 27b36088bdefc2d9f5d7449468524ad581e8e62f Mon Sep 17 00:00:00 2001 From: klingbolt Date: Tue, 20 Dec 2022 20:59:45 -0500 Subject: [PATCH 140/539] Made changes to the remove_child function to address edge cases --- xml_converter/src/xml_converter.cpp | 91 ++++++++++++++++------------- 1 file changed, 50 insertions(+), 41 deletions(-) diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index b9b9deee..6f60cc93 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -1,4 +1,5 @@ #include +#include #include #include @@ -64,52 +65,48 @@ void write_xml_file(string xml_filepath, map* marker_categorie } void create_proto_categories(waypoint::Category proto_category, set* proto_categories) { - proto_categories->insert(proto_category.name()); + proto_categories->insert(lowercase(proto_category.name())); for (int i = 0; i < proto_category.children_size(); i++) { create_proto_categories(proto_category.children(i), proto_categories); } } -void remove_proto_child(waypoint::Category* proto_category, set category_includes) { +void remove_proto_child(waypoint::Category* proto_category, set category_includes, string parent_name) { int keep = 0; for (int i = 0; i < proto_category->children_size(); i++) { - vector split_categories = split(proto_category->children(i).name(), "."); - auto pos = category_includes.find(split_categories[split_categories.size() - 1]); + string name = parent_name + "." + proto_category->children(i).name(); + auto pos = category_includes.find(lowercase(name)); if (pos != category_includes.end()) { if (keep < i) { proto_category->mutable_children()->SwapElements(i, keep); if (proto_category->children(i).children_size() >= 0) { for (int j = 0; j < proto_category->children_size(); j++) { - remove_proto_child(proto_category->mutable_children(j), category_includes); + remove_proto_child(proto_category->mutable_children(j), category_includes, name); } } } ++keep; } } - proto_category->mutable_children()->DeleteSubrange(keep, proto_category->children_size() - keep); } void write_protobuf_file(string proto_filepath, map* marker_categories, vector* parsed_pois) { - waypoint::Waypoint proto_pois; - waypoint::Waypoint all_categories; - waypoint::Waypoint output_message; - std::set map_ids; - std::set proto_categories; - std::set category_includes; - - if (mkdir(proto_filepath.c_str(), 0700) == -1) { + if (mkdir(proto_filepath.c_str(), 0700) == -1 && errno != EEXIST) { cout << "Error making ./protobins" << endl; throw std::error_code(); } - + // Converts map to Waypoint::Categories + waypoint::Waypoint all_categories; + std::set proto_categories; for (const auto& category : *marker_categories) { waypoint::Category proto_category = category.second.as_protobuf(); all_categories.add_category()->CopyFrom(proto_category); create_proto_categories(proto_category, &proto_categories); } - + // Converts vector to Waypoint::Icon and Waypoint::Trail + waypoint::Waypoint proto_pois; + std::set map_ids; for (const auto& parsed_poi : *parsed_pois) { if (parsed_poi->classname() == "POI") { Icon* icon = dynamic_cast(parsed_poi); @@ -117,7 +114,7 @@ void write_protobuf_file(string proto_filepath, map* marker_ca proto_pois.add_icon()->CopyFrom(poi); map_ids.insert(icon->map_id); } - if (parsed_poi->classname() == "Trail") { + else if (parsed_poi->classname() == "Trail") { Trail* trail = dynamic_cast(parsed_poi); waypoint::Trail poi = trail->as_protobuf(); proto_pois.add_trail()->CopyFrom(poi); @@ -125,6 +122,8 @@ void write_protobuf_file(string proto_filepath, map* marker_ca } } + waypoint::Waypoint output_message; + std::set category_includes; for (int map_id : map_ids) { ofstream outfile; string output_filepath = proto_filepath + "/" + to_string(map_id) + ".data"; @@ -132,15 +131,18 @@ void write_protobuf_file(string proto_filepath, map* marker_ca output_message.CopyFrom(all_categories); for (int i = 0; i < proto_pois.icon_size(); i++) { - vector split_categories = split(proto_pois.icon(i).category().name(), "."); if (proto_pois.icon(i).map_id() == map_id) { - auto category = proto_categories.find(split_categories[split_categories.size() - 1]); + vector split_categories = split(proto_pois.icon(i).category().name(), "."); + auto category = proto_categories.find(lowercase(split_categories[split_categories.size() - 1])); if (category == proto_categories.end()) { cout << "Unknown MarkerCategory " << proto_pois.icon(i).category().name() << endl; } else { - for (string split_category : split_categories) { - category_includes.insert(split_category); + // This loop adds the name of the category and all of it's parents + string name; + for (int j = 0; j < static_cast(split_categories.size()); j++) { + category_includes.insert(name + split_categories[j]); + name += split_categories[j] + "."; } } output_message.add_icon()->CopyFrom(proto_pois.icon(i)); @@ -149,20 +151,27 @@ void write_protobuf_file(string proto_filepath, map* marker_ca for (int i = 0; i < proto_pois.trail_size(); i++) { if (proto_pois.trail(i).map_id() == map_id) { vector split_categories = split(proto_pois.trail(i).category().name(), "."); - auto category = proto_categories.find(split_categories[split_categories.size() - 1]); + auto category = proto_categories.find(lowercase(split_categories[split_categories.size() - 1])); if (category == proto_categories.end()) { cout << "Unknown MarkerCategory " << proto_pois.trail(i).category().name() << endl; } else { - for (string split_category : split_categories) { - category_includes.insert(split_category); + // This loop adds the name of the category and all of it's parents + string name; + for (int j = 0; j < static_cast(split_categories.size()); j++) { + category_includes.insert(name + split_categories[j]); + name += split_categories[j] + "."; } } output_message.add_trail()->CopyFrom(proto_pois.trail(i)); } } + // In order to reduce bloat, each map's protobin will only include categories mentioned by the POIs + // To do this while maintaining hiercarchy, all categories are added to the message and then compared + // to a set of names. If the name is not in the set, it is deleted. This pruning method is slow but retains + // the most data. Ideally this function will only happen when a new marker pack is added. for (int i = 0; i < output_message.category_size(); i++) { - remove_proto_child(output_message.mutable_category(i), category_includes); + remove_proto_child(output_message.mutable_category(i), category_includes, output_message.category(i).name()); if (output_message.mutable_category(i)->children_size() == 0) { output_message.mutable_category(i)->Clear(); } @@ -449,22 +458,22 @@ int main() { /// This section tests that the protobuf file can be parsed back to xml //////////////////////////////////////////////////////////////////////////////////////// - parsed_pois.clear(); - marker_categories.clear(); - - begin = chrono::high_resolution_clock::now(); - read_protobuf_file("./protobins/1037.data", &marker_categories, &parsed_pois); - end = chrono::high_resolution_clock::now(); - dur = end - begin; - ms = std::chrono::duration_cast(dur).count(); - cout << "The protobuf read function took " << ms << " milliseconds to run" << endl; - - begin = chrono::high_resolution_clock::now(); - write_xml_file("./protobins/1037.xml", &marker_categories, &parsed_pois); - end = chrono::high_resolution_clock::now(); - dur = end - begin; - ms = std::chrono::duration_cast(dur).count(); - cout << "The xml write function took " << ms << " milliseconds to run" << endl; + // parsed_pois.clear(); + // marker_categories.clear(); + + // begin = chrono::high_resolution_clock::now(); + // read_protobuf_file("./protobins/1037.data", &marker_categories, &parsed_pois); + // end = chrono::high_resolution_clock::now(); + // dur = end - begin; + // ms = std::chrono::duration_cast(dur).count(); + // cout << "The protobuf read function took " << ms << " milliseconds to run" << endl; + + // begin = chrono::high_resolution_clock::now(); + // write_xml_file("./protobins/1037.xml", &marker_categories, &parsed_pois); + // end = chrono::high_resolution_clock::now(); + // dur = end - begin; + // ms = std::chrono::duration_cast(dur).count(); + // cout << "The xml write function took " << ms << " milliseconds to run" << endl; return 0; } From b5f5c751ce6929a1974430d78bcc65c0c4b9cfc9 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Tue, 20 Dec 2022 21:09:20 -0500 Subject: [PATCH 141/539] Remove erroneous space --- xml_converter/src/xml_converter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 6f60cc93..863c3570 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -169,7 +169,7 @@ void write_protobuf_file(string proto_filepath, map* marker_ca // In order to reduce bloat, each map's protobin will only include categories mentioned by the POIs // To do this while maintaining hiercarchy, all categories are added to the message and then compared // to a set of names. If the name is not in the set, it is deleted. This pruning method is slow but retains - // the most data. Ideally this function will only happen when a new marker pack is added. + // the most data. Ideally this function will only happen when a new marker pack is added. for (int i = 0; i < output_message.category_size(); i++) { remove_proto_child(output_message.mutable_category(i), category_includes, output_message.category(i).name()); if (output_message.mutable_category(i)->children_size() == 0) { From d4f79ffb86cf72e4ac7a202d5bb57c4c514bcf14 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Tue, 20 Dec 2022 21:24:45 -0500 Subject: [PATCH 142/539] Appeasing IWYU --- xml_converter/src/xml_converter.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 863c3570..f66733e8 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include From 732e14fbab36ed4d1527d9dd58c662c347996cf6 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Tue, 20 Dec 2022 23:36:23 -0500 Subject: [PATCH 143/539] Fixing includes --- xml_converter/src/xml_converter.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index f66733e8..bd46e07d 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -1,11 +1,11 @@ #include #include -#include #include #include #include #include +#include #include #include #include @@ -141,7 +141,7 @@ void write_protobuf_file(string proto_filepath, map* marker_ca else { // This loop adds the name of the category and all of it's parents string name; - for (int j = 0; j < static_cast(split_categories.size()); j++) { + for (uint64_t j = 0; j < split_categories.size(); j++) { category_includes.insert(name + split_categories[j]); name += split_categories[j] + "."; } @@ -159,7 +159,7 @@ void write_protobuf_file(string proto_filepath, map* marker_ca else { // This loop adds the name of the category and all of it's parents string name; - for (int j = 0; j < static_cast(split_categories.size()); j++) { + for (uint64_t j = 0; j < split_categories.size(); j++) { category_includes.insert(name + split_categories[j]); name += split_categories[j] + "."; } From 5732a01d409fc9b743c6fb3a34d1bf99c7c033cc Mon Sep 17 00:00:00 2001 From: klingbolt Date: Wed, 21 Dec 2022 00:12:25 -0500 Subject: [PATCH 144/539] Changed string allocation --- xml_converter/src/xml_converter.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index bd46e07d..f805e442 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -5,7 +5,6 @@ #include #include #include -#include #include #include #include @@ -141,9 +140,10 @@ void write_protobuf_file(string proto_filepath, map* marker_ca else { // This loop adds the name of the category and all of it's parents string name; - for (uint64_t j = 0; j < split_categories.size(); j++) { - category_includes.insert(name + split_categories[j]); - name += split_categories[j] + "."; + for (unsigned int j = 0; j < split_categories.size(); j++) { + name += split_categories[j]; + category_includes.insert(name); + name += "."; } } output_message.add_icon()->CopyFrom(proto_pois.icon(i)); @@ -159,9 +159,10 @@ void write_protobuf_file(string proto_filepath, map* marker_ca else { // This loop adds the name of the category and all of it's parents string name; - for (uint64_t j = 0; j < split_categories.size(); j++) { - category_includes.insert(name + split_categories[j]); - name += split_categories[j] + "."; + for (unsigned int j = 0; j < split_categories.size(); j++) { + name += split_categories[j]; + category_includes.insert(name); + name += "."; } } output_message.add_trail()->CopyFrom(proto_pois.trail(i)); From 08e8b33d84d7c59ca58821119700fd53d6b41809 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sat, 31 Dec 2022 13:55:56 -0500 Subject: [PATCH 145/539] Changed description to justify data structure --- xml_converter/src/xml_converter.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index f805e442..0f59fdc8 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -168,10 +168,12 @@ void write_protobuf_file(string proto_filepath, map* marker_ca output_message.add_trail()->CopyFrom(proto_pois.trail(i)); } } - // In order to reduce bloat, each map's protobin will only include categories mentioned by the POIs - // To do this while maintaining hiercarchy, all categories are added to the message and then compared - // to a set of names. If the name is not in the set, it is deleted. This pruning method is slow but retains - // the most data. Ideally this function will only happen when a new marker pack is added. + // In XML, Marker_Categories has a tree hierarchy while POIS have a flat hierarchy. + // This is preserved in the protobuf for ease of translation. + // We are doing a removal instead of an insertion because each parent category contains the data for all of its children. + // It would be impractical to include all of the data from each category except for the children and then re-add the children. + // That would require coping every non-child attribute individually and iterating over all the children. + // This pruning method is slower but ensures that the all wanted information is kept. for (int i = 0; i < output_message.category_size(); i++) { remove_proto_child(output_message.mutable_category(i), category_includes, output_message.category(i).name()); if (output_message.mutable_category(i)->children_size() == 0) { From b8b94bfead7ed1c197091d9834b4a35a78efc362 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sat, 31 Dec 2022 14:08:10 -0500 Subject: [PATCH 146/539] Extra spaces --- xml_converter/src/xml_converter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 0f59fdc8..6b20ef8f 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -169,9 +169,9 @@ void write_protobuf_file(string proto_filepath, map* marker_ca } } // In XML, Marker_Categories has a tree hierarchy while POIS have a flat hierarchy. - // This is preserved in the protobuf for ease of translation. + // This is preserved in the protobuf for ease of translation. // We are doing a removal instead of an insertion because each parent category contains the data for all of its children. - // It would be impractical to include all of the data from each category except for the children and then re-add the children. + // It would be impractical to include all of the data from each category except for the children and then re-add the children. // That would require coping every non-child attribute individually and iterating over all the children. // This pruning method is slower but ensures that the all wanted information is kept. for (int i = 0; i < output_message.category_size(); i++) { From bdb74e1cbf32ad28f6ccb828d17b4e6d8435dc2e Mon Sep 17 00:00:00 2001 From: klingbolt Date: Tue, 17 Jan 2023 09:51:03 -0500 Subject: [PATCH 147/539] Added protobuf addon for gdscript/ added read trail data function --- Spatial.gd | 69 +- addons/protobuf/parser.gd | 2199 +++++++++ addons/protobuf/plugin.cfg | 7 + addons/protobuf/protobuf_cmdln.gd | 67 + addons/protobuf/protobuf_core.gd | 654 +++ addons/protobuf/protobuf_ui.gd | 50 + addons/protobuf/protobuf_ui_dock.gd | 131 + addons/protobuf/protobuf_ui_dock.tscn | 176 + addons/protobuf/protobuf_util.gd | 46 + .../test/expected_bin/proto2/f_bool.v2ref | Bin 0 -> 2 bytes .../test/expected_bin/proto2/f_bytes.v2ref | 1 + .../expected_bin/proto2/f_bytes_default.v2ref | Bin 0 -> 2 bytes .../test/expected_bin/proto2/f_double.v2ref | Bin 0 -> 9 bytes .../expected_bin/proto2/f_empty_inner.v2ref | Bin 0 -> 3 bytes .../expected_bin/proto2/f_empty_out.v2ref | Bin 0 -> 3 bytes .../expected_bin/proto2/f_enum_inner.v2ref | 1 + .../test/expected_bin/proto2/f_enum_out.v2ref | 1 + .../test/expected_bin/proto2/f_fixed32.v2ref | Bin 0 -> 5 bytes .../test/expected_bin/proto2/f_fixed64.v2ref | Bin 0 -> 9 bytes .../test/expected_bin/proto2/f_float.v2ref | 1 + .../test/expected_bin/proto2/f_int32.v2ref | 1 + .../expected_bin/proto2/f_int32_default.v2ref | Bin 0 -> 2 bytes .../test/expected_bin/proto2/f_int64.v2ref | 1 + .../test/expected_bin/proto2/f_map.v2ref | 1 + .../test/expected_bin/proto2/f_map_1.v2ref | 1 + .../test/expected_bin/proto2/f_oneof_f1.v2ref | 1 + .../test/expected_bin/proto2/f_oneof_f2.v2ref | 1 + .../test/expected_bin/proto2/f_sfixed32.v2ref | Bin 0 -> 5 bytes .../test/expected_bin/proto2/f_sfixed64.v2ref | Bin 0 -> 9 bytes .../test/expected_bin/proto2/f_sint32.v2ref | 1 + .../test/expected_bin/proto2/f_sint64.v2ref | 1 + .../test/expected_bin/proto2/f_string.v2ref | 1 + .../proto2/f_string_default.v2ref | Bin 0 -> 2 bytes .../test/expected_bin/proto2/f_uint32.v2ref | 1 + .../test/expected_bin/proto2/f_uint64.v2ref | 1 + .../test/expected_bin/proto2/rf_bool.v2ref | Bin 0 -> 9 bytes .../expected_bin/proto2/rf_bool_empty.v2ref | 0 .../test/expected_bin/proto2/rf_bytes.v2ref | 1 + .../expected_bin/proto2/rf_bytes_empty.v2ref | 0 .../test/expected_bin/proto2/rf_double.v2ref | Bin 0 -> 20 bytes .../expected_bin/proto2/rf_double_empty.v2ref | 0 .../expected_bin/proto2/rf_empty_inner.v2ref | Bin 0 -> 9 bytes .../expected_bin/proto2/rf_empty_out.v2ref | Bin 0 -> 9 bytes .../expected_bin/proto2/rf_enum_inner.v2ref | 1 + .../expected_bin/proto2/rf_enum_out.v2ref | 1 + .../test/expected_bin/proto2/rf_fixed32.v2ref | Bin 0 -> 12 bytes .../proto2/rf_fixed32_empty.v2ref | 0 .../test/expected_bin/proto2/rf_fixed64.v2ref | Bin 0 -> 20 bytes .../proto2/rf_fixed64_empty.v2ref | 0 .../test/expected_bin/proto2/rf_float.v2ref | 1 + .../expected_bin/proto2/rf_float_empty.v2ref | 0 .../expected_bin/proto2/rf_inner_ene.v2ref | Bin 0 -> 13 bytes .../expected_bin/proto2/rf_inner_nen.v2ref | Bin 0 -> 17 bytes .../test/expected_bin/proto2/rf_int32.v2ref | 1 + .../expected_bin/proto2/rf_int32_empty.v2ref | 0 .../proto2/rf_int32_with_clear.v2ref | 1 + .../test/expected_bin/proto2/rf_int64.v2ref | 1 + .../expected_bin/proto2/rf_int64_empty.v2ref | 0 .../expected_bin/proto2/rf_sfixed32.v2ref | Bin 0 -> 12 bytes .../proto2/rf_sfixed32_empty.v2ref | 0 .../expected_bin/proto2/rf_sfixed64.v2ref | Bin 0 -> 20 bytes .../proto2/rf_sfixed64_empty.v2ref | 0 .../test/expected_bin/proto2/rf_sint32.v2ref | 1 + .../expected_bin/proto2/rf_sint32_empty.v2ref | 0 .../test/expected_bin/proto2/rf_sint64.v2ref | 1 + .../expected_bin/proto2/rf_sint64_empty.v2ref | 0 .../test/expected_bin/proto2/rf_string.v2ref | 1 + .../expected_bin/proto2/rf_string_empty.v2ref | 0 .../test/expected_bin/proto2/rf_uint32.v2ref | 1 + .../expected_bin/proto2/rf_uint32_empty.v2ref | 0 .../test/expected_bin/proto2/rf_uint64.v2ref | 1 + .../expected_bin/proto2/rf_uint64_empty.v2ref | 0 .../test/expected_bin/proto2/rfu_bool.v2ref | Bin 0 -> 6 bytes .../test/expected_bin/proto2/rfu_double.v2ref | Bin 0 -> 19 bytes .../expected_bin/proto2/rfu_fixed32.v2ref | Bin 0 -> 11 bytes .../expected_bin/proto2/rfu_fixed64.v2ref | Bin 0 -> 19 bytes .../test/expected_bin/proto2/rfu_float.v2ref | 1 + .../test/expected_bin/proto2/rfu_int32.v2ref | 1 + .../test/expected_bin/proto2/rfu_int64.v2ref | 1 + .../expected_bin/proto2/rfu_sfixed32.v2ref | Bin 0 -> 11 bytes .../expected_bin/proto2/rfu_sfixed64.v2ref | Bin 0 -> 19 bytes .../test/expected_bin/proto2/rfu_sint32.v2ref | 1 + .../test/expected_bin/proto2/rfu_sint64.v2ref | 1 + .../test/expected_bin/proto2/rfu_uint32.v2ref | 1 + .../test/expected_bin/proto2/rfu_uint64.v2ref | 1 + .../test/expected_bin/proto2/simple_all.v2ref | Bin 0 -> 503 bytes .../expected_bin/proto2/simple_all_1.v2ref | Bin 0 -> 503 bytes .../test/expected_bin/proto2/test2_1.v2ref | Bin 0 -> 68 bytes .../test/expected_bin/proto2/test2_2.v2ref | Bin 0 -> 35 bytes .../test/expected_bin/proto2/test2_2_1.v2ref | Bin 0 -> 35 bytes .../test/expected_bin/proto2/test2_3.v2ref | Bin 0 -> 128 bytes .../test/expected_bin/proto2/test2_4.v2ref | 5 + .../test/expected_bin/proto2/test2_4_1.v2ref | 5 + .../proto2/test2_testinner3_testinner32.v2ref | 1 + .../test2_testinner3_testinner32_empty.v2ref | 0 .../test/expected_bin/proto2/test4.v2ref | Bin 0 -> 25 bytes .../test/expected_bin/proto2/test4_map.v2ref | 1 + .../expected_bin/proto2/test4_map_1.v2ref | 1 + .../expected_bin/proto2/test4_map_2.v2ref | 1 + .../expected_bin/proto2/test4_map_3.v2ref | 1 + .../expected_bin/proto2/test4_map_4.v2ref | 1 + .../expected_bin/proto2/test4_map_5.v2ref | 1 + .../expected_bin/proto2/test4_map_dup.v2ref | 1 + .../proto2/test4_map_zero_key.v2ref | Bin 0 -> 7 bytes .../test/expected_bin/proto3/f_bool.v3ref | 0 .../test/expected_bin/proto3/f_bytes.v3ref | 1 + .../expected_bin/proto3/f_bytes_default.v3ref | 0 .../test/expected_bin/proto3/f_double.v3ref | Bin 0 -> 9 bytes .../expected_bin/proto3/f_empty_inner.v3ref | Bin 0 -> 3 bytes .../expected_bin/proto3/f_empty_out.v3ref | Bin 0 -> 3 bytes .../expected_bin/proto3/f_enum_inner.v3ref | 1 + .../test/expected_bin/proto3/f_enum_out.v3ref | 1 + .../test/expected_bin/proto3/f_fixed32.v3ref | Bin 0 -> 5 bytes .../test/expected_bin/proto3/f_fixed64.v3ref | Bin 0 -> 9 bytes .../test/expected_bin/proto3/f_float.v3ref | 1 + .../test/expected_bin/proto3/f_int32.v3ref | 1 + .../expected_bin/proto3/f_int32_default.v3ref | 0 .../test/expected_bin/proto3/f_int64.v3ref | 1 + .../test/expected_bin/proto3/f_map.v3ref | 1 + .../test/expected_bin/proto3/f_map_1.v3ref | 1 + .../test/expected_bin/proto3/f_oneof_f1.v3ref | 1 + .../test/expected_bin/proto3/f_oneof_f2.v3ref | 1 + .../test/expected_bin/proto3/f_sfixed32.v3ref | Bin 0 -> 5 bytes .../test/expected_bin/proto3/f_sfixed64.v3ref | Bin 0 -> 9 bytes .../test/expected_bin/proto3/f_sint32.v3ref | 1 + .../test/expected_bin/proto3/f_sint64.v3ref | 1 + .../test/expected_bin/proto3/f_string.v3ref | 1 + .../proto3/f_string_default.v3ref | 0 .../test/expected_bin/proto3/f_uint32.v3ref | 1 + .../test/expected_bin/proto3/f_uint64.v3ref | 1 + .../test/expected_bin/proto3/rf_bool.v3ref | Bin 0 -> 6 bytes .../expected_bin/proto3/rf_bool_empty.v3ref | 0 .../test/expected_bin/proto3/rf_bytes.v3ref | 1 + .../expected_bin/proto3/rf_bytes_empty.v3ref | 0 .../test/expected_bin/proto3/rf_double.v3ref | Bin 0 -> 19 bytes .../expected_bin/proto3/rf_double_empty.v3ref | 0 .../expected_bin/proto3/rf_empty_inner.v3ref | Bin 0 -> 9 bytes .../expected_bin/proto3/rf_empty_out.v3ref | Bin 0 -> 9 bytes .../expected_bin/proto3/rf_enum_inner.v3ref | 1 + .../expected_bin/proto3/rf_enum_out.v3ref | 1 + .../test/expected_bin/proto3/rf_fixed32.v3ref | Bin 0 -> 11 bytes .../proto3/rf_fixed32_empty.v3ref | 0 .../test/expected_bin/proto3/rf_fixed64.v3ref | Bin 0 -> 19 bytes .../proto3/rf_fixed64_empty.v3ref | 0 .../test/expected_bin/proto3/rf_float.v3ref | 1 + .../expected_bin/proto3/rf_float_empty.v3ref | 0 .../expected_bin/proto3/rf_inner_ene.v3ref | Bin 0 -> 13 bytes .../expected_bin/proto3/rf_inner_nen.v3ref | Bin 0 -> 17 bytes .../test/expected_bin/proto3/rf_int32.v3ref | 1 + .../expected_bin/proto3/rf_int32_empty.v3ref | 0 .../proto3/rf_int32_with_clear.v3ref | 1 + .../test/expected_bin/proto3/rf_int64.v3ref | 1 + .../expected_bin/proto3/rf_int64_empty.v3ref | 0 .../expected_bin/proto3/rf_sfixed32.v3ref | Bin 0 -> 11 bytes .../proto3/rf_sfixed32_empty.v3ref | 0 .../expected_bin/proto3/rf_sfixed64.v3ref | Bin 0 -> 19 bytes .../proto3/rf_sfixed64_empty.v3ref | 0 .../test/expected_bin/proto3/rf_sint32.v3ref | 1 + .../expected_bin/proto3/rf_sint32_empty.v3ref | 0 .../test/expected_bin/proto3/rf_sint64.v3ref | 1 + .../expected_bin/proto3/rf_sint64_empty.v3ref | 0 .../test/expected_bin/proto3/rf_string.v3ref | 1 + .../expected_bin/proto3/rf_string_empty.v3ref | 0 .../test/expected_bin/proto3/rf_uint32.v3ref | 1 + .../expected_bin/proto3/rf_uint32_empty.v3ref | 0 .../test/expected_bin/proto3/rf_uint64.v3ref | 1 + .../expected_bin/proto3/rf_uint64_empty.v3ref | 0 .../test/expected_bin/proto3/rfu_bool.v3ref | Bin 0 -> 9 bytes .../test/expected_bin/proto3/rfu_double.v3ref | Bin 0 -> 20 bytes .../expected_bin/proto3/rfu_fixed32.v3ref | Bin 0 -> 12 bytes .../expected_bin/proto3/rfu_fixed64.v3ref | Bin 0 -> 20 bytes .../test/expected_bin/proto3/rfu_float.v3ref | 1 + .../test/expected_bin/proto3/rfu_int32.v3ref | 1 + .../test/expected_bin/proto3/rfu_int64.v3ref | 1 + .../expected_bin/proto3/rfu_sfixed32.v3ref | Bin 0 -> 12 bytes .../expected_bin/proto3/rfu_sfixed64.v3ref | Bin 0 -> 20 bytes .../test/expected_bin/proto3/rfu_sint32.v3ref | 1 + .../test/expected_bin/proto3/rfu_sint64.v3ref | 1 + .../test/expected_bin/proto3/rfu_uint32.v3ref | 1 + .../test/expected_bin/proto3/rfu_uint64.v3ref | 1 + .../test/expected_bin/proto3/simple_all.v3ref | Bin 0 -> 495 bytes .../expected_bin/proto3/simple_all_1.v3ref | Bin 0 -> 495 bytes .../test/expected_bin/proto3/test2_1.v3ref | Bin 0 -> 68 bytes .../test/expected_bin/proto3/test2_2.v3ref | Bin 0 -> 35 bytes .../test/expected_bin/proto3/test2_2_1.v3ref | Bin 0 -> 35 bytes .../test/expected_bin/proto3/test2_3.v3ref | Bin 0 -> 128 bytes .../test/expected_bin/proto3/test2_4.v3ref | 5 + .../test/expected_bin/proto3/test2_4_1.v3ref | 5 + .../proto3/test2_testinner3_testinner32.v3ref | 1 + .../test2_testinner3_testinner32_empty.v3ref | 0 .../test/expected_bin/proto3/test4.v3ref | Bin 0 -> 25 bytes .../test/expected_bin/proto3/test4_map.v3ref | 1 + .../expected_bin/proto3/test4_map_1.v3ref | 1 + .../expected_bin/proto3/test4_map_2.v3ref | 1 + .../expected_bin/proto3/test4_map_3.v3ref | 1 + .../expected_bin/proto3/test4_map_4.v3ref | 1 + .../expected_bin/proto3/test4_map_5.v3ref | 1 + .../expected_bin/proto3/test4_map_dup.v3ref | 1 + .../proto3/test4_map_zero_key.v3ref | Bin 0 -> 7 bytes .../protobuf/test/script/unit_tests_common.gd | 324 ++ .../protobuf/test/script/unit_tests_proto2.gd | 746 +++ .../protobuf/test/script/unit_tests_proto3.gd | 746 +++ addons/protobuf/test/source/pbtest2.proto | 159 + addons/protobuf/test/source/pbtest3.proto | 124 + addons/protobuf/test/temp/proto3.gd | 2241 +++++++++ project.godot | 4 + waypoint.gd | 4328 +++++++++++++++++ xml_converter/doc/rendering/render_ingame.md | 2 +- xml_converter/doc/rendering/render_on_map.md | 2 +- .../doc/rendering/render_on_minimap.md | 2 +- xml_converter/doc/scale/icon_size.md | 2 +- xml_converter/proto/waypoint.proto | 14 +- xml_converter/src/icon_gen.cpp | 24 +- xml_converter/src/trail_gen.cpp | 18 +- xml_converter/src/xml_converter.cpp | 109 +- 215 files changed, 12267 insertions(+), 81 deletions(-) create mode 100644 addons/protobuf/parser.gd create mode 100644 addons/protobuf/plugin.cfg create mode 100644 addons/protobuf/protobuf_cmdln.gd create mode 100644 addons/protobuf/protobuf_core.gd create mode 100644 addons/protobuf/protobuf_ui.gd create mode 100644 addons/protobuf/protobuf_ui_dock.gd create mode 100644 addons/protobuf/protobuf_ui_dock.tscn create mode 100644 addons/protobuf/protobuf_util.gd create mode 100644 addons/protobuf/test/expected_bin/proto2/f_bool.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/f_bytes.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/f_bytes_default.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/f_double.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/f_empty_inner.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/f_empty_out.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/f_enum_inner.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/f_enum_out.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/f_fixed32.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/f_fixed64.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/f_float.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/f_int32.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/f_int32_default.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/f_int64.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/f_map.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/f_map_1.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/f_oneof_f1.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/f_oneof_f2.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/f_sfixed32.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/f_sfixed64.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/f_sint32.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/f_sint64.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/f_string.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/f_string_default.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/f_uint32.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/f_uint64.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/rf_bool.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/rf_bool_empty.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/rf_bytes.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/rf_bytes_empty.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/rf_double.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/rf_double_empty.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/rf_empty_inner.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/rf_empty_out.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/rf_enum_inner.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/rf_enum_out.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/rf_fixed32.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/rf_fixed32_empty.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/rf_fixed64.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/rf_fixed64_empty.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/rf_float.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/rf_float_empty.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/rf_inner_ene.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/rf_inner_nen.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/rf_int32.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/rf_int32_empty.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/rf_int32_with_clear.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/rf_int64.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/rf_int64_empty.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/rf_sfixed32.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/rf_sfixed32_empty.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/rf_sfixed64.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/rf_sfixed64_empty.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/rf_sint32.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/rf_sint32_empty.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/rf_sint64.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/rf_sint64_empty.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/rf_string.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/rf_string_empty.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/rf_uint32.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/rf_uint32_empty.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/rf_uint64.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/rf_uint64_empty.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/rfu_bool.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/rfu_double.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/rfu_fixed32.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/rfu_fixed64.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/rfu_float.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/rfu_int32.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/rfu_int64.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/rfu_sfixed32.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/rfu_sfixed64.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/rfu_sint32.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/rfu_sint64.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/rfu_uint32.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/rfu_uint64.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/simple_all.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/simple_all_1.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/test2_1.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/test2_2.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/test2_2_1.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/test2_3.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/test2_4.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/test2_4_1.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/test2_testinner3_testinner32.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/test2_testinner3_testinner32_empty.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/test4.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/test4_map.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/test4_map_1.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/test4_map_2.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/test4_map_3.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/test4_map_4.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/test4_map_5.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/test4_map_dup.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto2/test4_map_zero_key.v2ref create mode 100644 addons/protobuf/test/expected_bin/proto3/f_bool.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/f_bytes.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/f_bytes_default.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/f_double.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/f_empty_inner.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/f_empty_out.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/f_enum_inner.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/f_enum_out.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/f_fixed32.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/f_fixed64.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/f_float.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/f_int32.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/f_int32_default.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/f_int64.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/f_map.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/f_map_1.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/f_oneof_f1.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/f_oneof_f2.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/f_sfixed32.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/f_sfixed64.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/f_sint32.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/f_sint64.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/f_string.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/f_string_default.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/f_uint32.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/f_uint64.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/rf_bool.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/rf_bool_empty.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/rf_bytes.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/rf_bytes_empty.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/rf_double.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/rf_double_empty.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/rf_empty_inner.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/rf_empty_out.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/rf_enum_inner.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/rf_enum_out.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/rf_fixed32.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/rf_fixed32_empty.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/rf_fixed64.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/rf_fixed64_empty.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/rf_float.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/rf_float_empty.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/rf_inner_ene.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/rf_inner_nen.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/rf_int32.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/rf_int32_empty.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/rf_int32_with_clear.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/rf_int64.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/rf_int64_empty.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/rf_sfixed32.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/rf_sfixed32_empty.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/rf_sfixed64.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/rf_sfixed64_empty.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/rf_sint32.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/rf_sint32_empty.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/rf_sint64.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/rf_sint64_empty.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/rf_string.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/rf_string_empty.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/rf_uint32.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/rf_uint32_empty.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/rf_uint64.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/rf_uint64_empty.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/rfu_bool.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/rfu_double.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/rfu_fixed32.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/rfu_fixed64.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/rfu_float.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/rfu_int32.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/rfu_int64.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/rfu_sfixed32.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/rfu_sfixed64.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/rfu_sint32.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/rfu_sint64.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/rfu_uint32.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/rfu_uint64.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/simple_all.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/simple_all_1.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/test2_1.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/test2_2.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/test2_2_1.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/test2_3.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/test2_4.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/test2_4_1.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/test2_testinner3_testinner32.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/test2_testinner3_testinner32_empty.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/test4.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/test4_map.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/test4_map_1.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/test4_map_2.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/test4_map_3.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/test4_map_4.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/test4_map_5.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/test4_map_dup.v3ref create mode 100644 addons/protobuf/test/expected_bin/proto3/test4_map_zero_key.v3ref create mode 100644 addons/protobuf/test/script/unit_tests_common.gd create mode 100644 addons/protobuf/test/script/unit_tests_proto2.gd create mode 100644 addons/protobuf/test/script/unit_tests_proto3.gd create mode 100644 addons/protobuf/test/source/pbtest2.proto create mode 100644 addons/protobuf/test/source/pbtest3.proto create mode 100644 addons/protobuf/test/temp/proto3.gd create mode 100644 waypoint.gd diff --git a/Spatial.gd b/Spatial.gd index 738b4d67..4cd6b8ae 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -287,25 +287,35 @@ func reset_minimap_masks(): minimap_path.material.set_shader_param("minimap_corner", compass_corner1) minimap_path.material.set_shader_param("minimap_corner2", compass_corner2) -var markerdata = {} +var markerdata = waypoint.Waypoint.new() var marker_file_path = "" -func load_taco_markers(marker_json_file): - self.marker_file_path = marker_json_file +func load_taco_markers(marker_file): + self.marker_file_path = marker_file if is_xml_file(marker_json_file): - print("Loading XML file from path ", marker_json_file) - var parsed_taco_tuple = taco_parser.parse_taco_xml(marker_json_file) + print("Loading XML file from path ", marker_file) + var parsed_taco_tuple = taco_parser.parse_taco_xml(marker_file) var json_payload = parsed_taco_tuple[0] var error_message = parsed_taco_tuple[1] if error_message != "": print("XML parsing failed with error message: ", error_message) self.markerdata = JSON.parse(json_payload).result - else: - print("Loading Json file from path ", marker_json_file) + # else: + # print("Loading Json file from path ", marker_json_file) + # var file = File.new() + # file.open(marker_json_file, file.READ) + # var text = file.get_as_text() + # self.markerdata = JSON.parse(text).result + else: #$$$COVERT TO PROTO$$$ + print("Loading protobuf file from path ", marker_file) var file = File.new() - file.open(marker_json_file, file.READ) - var text = file.get_as_text() - self.markerdata = JSON.parse(text).result + file.open(marker_file, file.READ) + var data = file.get_buffer() + self.markerdata.from_bytes(data) + if result_code == waypoint.PB_ERR.NO_ERRORS: + print("OK") + else: + return relative_textures_to_absolute_textures(marker_file_path.get_base_dir()) @@ -315,14 +325,17 @@ func is_xml_file(input_file): return input_file.split(".")[-1] == "xml" func relative_textures_to_absolute_textures(marker_file_dir): - for map in markerdata: - for icon in markerdata[map]["icons"]: - if !icon["texture"].is_abs_path(): - icon["texture"] = marker_file_dir + "/" + icon["texture"] - #print("ABS", icon["texture"]) - for path in markerdata[map]["paths"]: - if !path["texture"].is_abs_path(): - path["texture"] = marker_file_dir + "/" + path["texture"] + var icons = markerdata.get_icon() + for icon in icons: + var texture = icon.get_texture() + if !texture.get_path().is_abs_path(): + icon.set_path() = marker_file_dir + "/" + icon.get_path() + #print("ABS", icon["texture"]) + var paths = markerdata.get_trail() + for path in paths: + var texture = path.get_texture() + if !texture.get_path().is_abs_path(): + path.set_path() = marker_file_dir + "/" + path.get_path() var route_scene = load("res://Route.tscn") @@ -416,15 +429,15 @@ func gen_map_markers(): for icon in icons.get_children(): icon.queue_free() - # Load the data from the markers - if str(map_id) in markerdata: - var map_markerdata = markerdata[str(map_id)] - for path in map_markerdata["paths"]: - gen_new_path(path["points"], path["texture"]) - - for icon in map_markerdata["icons"]: - var position = Vector3(icon["position"][0], icon["position"][1], icon["position"][2]) - gen_new_icon(position, icon["texture"]) + # Load the data from the markers $$$COVERT TO PROTO$$$ + var paths = markerdata.get_trail() + for path in paths: + gen_new_path(path["points"], path["texture"]) + var icons = markerdata.get_icon() + for icon in icons: + var position = icon.get_position() + var position_vector = Vector3(position.get_x(), position.get_y(), position.get_z()) + gen_new_icon(position_vector, icon.get_path()) func gen_new_path(points: Array, texture_path: String): var points_2d: PoolVector2Array = [] @@ -492,7 +505,7 @@ func gen_new_path(points: Array, texture_path: String): ################################################################################ # ################################################################################ -func gen_new_icon(position: Vector3, texture_path: String): +func gen_new_icon(position: Vector3, texture_path: String): #$$$COVERT TO PROTO$$$ position.z = -position.z var new_icon = icon_scene.instance() new_icon.translation = position diff --git a/addons/protobuf/parser.gd b/addons/protobuf/parser.gd new file mode 100644 index 00000000..9fecb429 --- /dev/null +++ b/addons/protobuf/parser.gd @@ -0,0 +1,2199 @@ +# +# BSD 3-Clause License +# +# Copyright (c) 2018 - 2022, Oleg Malyavkin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# * Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +tool +extends Node + +class Document: + + func _init(doc_name : String, doc_text : String): + name = doc_name + text = doc_text + + var name : String + var text : String + +class TokenPosition: + func _init(b : int, e : int): + begin = b + end = e + var begin : int = 0 + var end : int = 0 + +class Helper: + + class StringPosition: + func _init(s : int, c : int, l : int): + str_num = s + column = c + length = l + var str_num : int + var column : int + var length : int + + static func str_pos(text : String, position : TokenPosition) -> StringPosition: + var cur_str : int = 1 + var cur_col : int = 1 + var res_str : int = 0 + var res_col : int = 0 + var res_length : int = 0 + for i in range(text.length()): + if text[i] == "\n": + cur_str += 1 + cur_col = 0 + if position.begin == i: + res_str = cur_str + res_col = cur_col + res_length = position.end - position.begin + 1 + break + cur_col += 1 + return StringPosition.new(res_str, res_col, res_length) + + static func text_pos(tokens : Array, index : int) -> TokenPosition: + var res_begin : int = 0 + var res_end : int = 0 + if index < tokens.size() && index >= 0: + res_begin = tokens[index].position.begin + res_end = tokens[index].position.end + return TokenPosition.new(res_begin, res_end) + + static func error_string(file_name, col, row, error_text): + return file_name + ":" + String(col) + ":" + String(row) + ": error: " + error_text + +class AnalyzeResult: + var classes : Array = [] + var fields : Array = [] + var groups : Array = [] + var version : int = 0 + var state : bool = false + var tokens : Array = [] + var syntax : Analysis.TranslationResult + var imports : Array = [] + var doc : Document + + func soft_copy() -> AnalyzeResult: + var res : AnalyzeResult = AnalyzeResult.new() + res.classes = classes + res.fields = fields + res.groups = groups + res.version = version + res.state = state + res.tokens = tokens + res.syntax = syntax + res.imports = imports + res.doc = doc + return res + +class Analysis: + + func _init(path : String, doc : Document): + path_dir = path + document = doc + + var document : Document + var path_dir : String + + const LEX = { + LETTER = "[A-Za-z]", + DIGIT_DEC = "[0-9]", + DIGIT_OCT = "[0-7]", + DIGIT_HEX = "[0-9]|[A-F]|[a-f]", + BRACKET_ROUND_LEFT = "\\(", + BRACKET_ROUND_RIGHT = "\\)", + BRACKET_CURLY_LEFT = "\\{", + BRACKET_CURLY_RIGHT = "\\}", + BRACKET_SQUARE_LEFT = "\\[", + BRACKET_SQUARE_RIGHT = "\\]", + BRACKET_ANGLE_LEFT = "\\<", + BRACKET_ANGLE_RIGHT = "\\>", + SEMICOLON = ";", + COMMA = ",", + EQUAL = "=", + SIGN = "\\+|\\-", + SPACE = "\\s", + QUOTE_SINGLE = "'", + QUOTE_DOUBLE = "\"", + } + + const TOKEN_IDENT : String = "(" + LEX.LETTER + "+" + "(" + LEX.LETTER + "|" + LEX.DIGIT_DEC + "|" + "_)*)" + const TOKEN_FULL_IDENT : String = TOKEN_IDENT + "{0,1}(\\." + TOKEN_IDENT + ")+" + const TOKEN_BRACKET_ROUND_LEFT : String = "(" + LEX.BRACKET_ROUND_LEFT + ")" + const TOKEN_BRACKET_ROUND_RIGHT : String = "(" + LEX.BRACKET_ROUND_RIGHT + ")" + const TOKEN_BRACKET_CURLY_LEFT : String = "(" + LEX.BRACKET_CURLY_LEFT + ")" + const TOKEN_BRACKET_CURLY_RIGHT : String = "(" + LEX.BRACKET_CURLY_RIGHT + ")" + const TOKEN_BRACKET_SQUARE_LEFT : String = "(" + LEX.BRACKET_SQUARE_LEFT + ")" + const TOKEN_BRACKET_SQUARE_RIGHT : String = "(" + LEX.BRACKET_SQUARE_RIGHT + ")" + const TOKEN_BRACKET_ANGLE_LEFT : String = "(" + LEX.BRACKET_ANGLE_LEFT + ")" + const TOKEN_BRACKET_ANGLE_RIGHT : String = "(" + LEX.BRACKET_ANGLE_RIGHT + ")" + const TOKEN_SEMICOLON : String = "(" + LEX.SEMICOLON + ")" + const TOKEN_EUQAL : String = "(" + LEX.EQUAL + ")" + const TOKEN_SIGN : String = "(" + LEX.SIGN + ")" + const TOKEN_LITERAL_DEC : String = "(([1-9])" + LEX.DIGIT_DEC +"*)" + const TOKEN_LITERAL_OCT : String = "(0" + LEX.DIGIT_OCT +"*)" + const TOKEN_LITERAL_HEX : String = "(0(x|X)(" + LEX.DIGIT_HEX +")+)" + const TOKEN_LITERAL_INT : String = "((\\+|\\-){0,1}" + TOKEN_LITERAL_DEC + "|" + TOKEN_LITERAL_OCT + "|" + TOKEN_LITERAL_HEX + ")" + const TOKEN_LITERAL_FLOAT_DEC : String = "(" + LEX.DIGIT_DEC + "+)" + const TOKEN_LITERAL_FLOAT_EXP : String = "((e|E)(\\+|\\-)?" + TOKEN_LITERAL_FLOAT_DEC + "+)" + const TOKEN_LITERAL_FLOAT : String = "((\\+|\\-){0,1}(" + TOKEN_LITERAL_FLOAT_DEC + "\\." + TOKEN_LITERAL_FLOAT_DEC + "?" + TOKEN_LITERAL_FLOAT_EXP + "?)|(" + TOKEN_LITERAL_FLOAT_DEC + TOKEN_LITERAL_FLOAT_EXP + ")|(\\." + TOKEN_LITERAL_FLOAT_DEC + TOKEN_LITERAL_FLOAT_EXP + "?))" + const TOKEN_SPACE : String = "(" + LEX.SPACE + ")+" + const TOKEN_COMMA : String = "(" + LEX.COMMA + ")" + const TOKEN_CHAR_ESC : String = "[\\\\(a|b|f|n|r|t|v|\\\\|'|\")]" + const TOKEN_OCT_ESC : String = "[\\\\" + LEX.DIGIT_OCT + "{3}]" + const TOKEN_HEX_ESC : String = "[\\\\(x|X)" + LEX.DIGIT_HEX + "{2}]" + const TOKEN_CHAR_EXCLUDE : String = "[^\\0\\n\\\\]" + const TOKEN_CHAR_VALUE : String = "(" + TOKEN_HEX_ESC + "|" + TOKEN_OCT_ESC + "|" + TOKEN_CHAR_ESC + "|" + TOKEN_CHAR_EXCLUDE + ")" + const TOKEN_STRING_SINGLE : String = "('" + TOKEN_CHAR_VALUE + "*?')" + const TOKEN_STRING_DOUBLE : String = "(\"" + TOKEN_CHAR_VALUE + "*?\")" + const TOKEN_COMMENT_SINGLE : String = "((//[^\\n\\r]*[^\\s])|//)" + const TOKEN_COMMENT_MULTI : String = "/\\*(.|[\\n\\r])*?\\*/" + + const TOKEN_SECOND_MESSAGE : String = "^message$" + const TOKEN_SECOND_SIMPLE_DATA_TYPE : String = "^(double|float|int32|int64|uint32|uint64|sint32|sint64|fixed32|fixed64|sfixed32|sfixed64|bool|string|bytes)$" + const TOKEN_SECOND_ENUM : String = "^enum$" + const TOKEN_SECOND_MAP : String = "^map$" + const TOKEN_SECOND_ONEOF : String = "^oneof$" + const TOKEN_SECOND_LITERAL_BOOL : String = "^(true|false)$" + const TOKEN_SECOND_SYNTAX : String = "^syntax$" + const TOKEN_SECOND_IMPORT : String = "^import$" + const TOKEN_SECOND_PACKAGE : String = "^package$" + const TOKEN_SECOND_OPTION : String = "^option$" + const TOKEN_SECOND_SERVICE : String = "^service$" + const TOKEN_SECOND_RESERVED : String = "^reserved$" + const TOKEN_SECOND_IMPORT_QUALIFICATION : String = "^(weak|public)$" + const TOKEN_SECOND_FIELD_QUALIFICATION : String = "^(repeated|required|optional)$" + const TOKEN_SECOND_ENUM_OPTION : String = "^allow_alias$" + const TOKEN_SECOND_QUALIFICATION : String = "^(custom_option|extensions)$" + const TOKEN_SECOND_FIELD_OPTION : String = "^packed$" + + class TokenEntrance: + func _init(i : int, b : int, e : int, t : String): + position = TokenPosition.new(b, e) + text = t + id = i + var position : TokenPosition + var text : String + var id : int + + enum RANGE_STATE { + INCLUDE = 0, + EXCLUDE_LEFT = 1, + EXCLUDE_RIGHT = 2, + OVERLAY = 3, + EQUAL = 4, + ENTERS = 5 + } + + class TokenRange: + func _init(b : int, e : int, s): + position = TokenPosition.new(b, e) + state = s + var position : TokenPosition + var state + + class Token: + var _regex : RegEx + var _entrance : TokenEntrance = null + var _entrances : Array = [] + var _entrance_index : int = 0 + var _id : int + var _ignore : bool + var _clarification : String + + func _init(id : int, clarification : String, regex_str : String, ignore = false): + _id = id + _regex = RegEx.new() + _regex.compile(regex_str) + _clarification = clarification + _ignore = ignore + + func find(text : String, start : int) -> TokenEntrance: + _entrance = null + if !_regex.is_valid(): + return null + var match_result : RegExMatch = _regex.search(text, start) + if match_result != null: + var capture + capture = match_result.get_string(0) + if capture.empty(): + return null + _entrance = TokenEntrance.new(_id, match_result.get_start(0), capture.length() - 1 + match_result.get_start(0), capture) + return _entrance + + func find_all(text : String) -> Array: + var pos : int = 0 + clear() + while find(text, pos) != null: + _entrances.append(_entrance) + pos = _entrance.position.end + 1 + return _entrances + + func add_entrance(entrance) -> void: + _entrances.append(entrance) + + func clear() -> void: + _entrance = null + _entrances = [] + _entrance_index = 0 + + func get_entrances() -> Array: + return _entrances + + func remove_entrance(index) -> void: + if index < _entrances.size(): + _entrances.remove(index) + + func get_index() -> int: + return _entrance_index + + func set_index(index : int) -> void: + if index < _entrances.size(): + _entrance_index = index + else: + _entrance_index = 0 + + func is_ignore() -> bool: + return _ignore + + func get_clarification() -> String: + return _clarification + + class TokenResult: + var tokens : Array = [] + var errors : Array = [] + + enum TOKEN_ID { + UNDEFINED = -1, + IDENT = 0, + FULL_IDENT = 1, + BRACKET_ROUND_LEFT = 2, + BRACKET_ROUND_RIGHT = 3, + BRACKET_CURLY_LEFT = 4, + BRACKET_CURLY_RIGHT = 5, + BRACKET_SQUARE_LEFT = 6, + BRACKET_SQUARE_RIGHT = 7, + BRACKET_ANGLE_LEFT = 8, + BRACKET_ANGLE_RIGHT = 9, + SEMICOLON = 10, + EUQAL = 11, + SIGN = 12, + INT = 13, + FLOAT = 14, + SPACE = 15, + COMMA = 16, + STRING_SINGLE = 17, + STRING_DOUBLE = 18, + COMMENT_SINGLE = 19, + COMMENT_MULTI = 20, + + MESSAGE = 21, + SIMPLE_DATA_TYPE = 22, + ENUM = 23, + MAP = 24, + ONEOF = 25, + LITERAL_BOOL = 26, + SYNTAX = 27, + IMPORT = 28, + PACKAGE = 29, + OPTION = 30, + SERVICE = 31, + RESERVED = 32, + IMPORT_QUALIFICATION = 33, + FIELD_QUALIFICATION = 34, + ENUM_OPTION = 35, + QUALIFICATION = 36, + FIELD_OPTION = 37, + + STRING = 38 + } + + var TOKEN = { + TOKEN_ID.IDENT: Token.new(TOKEN_ID.IDENT, "Identifier", TOKEN_IDENT), + TOKEN_ID.FULL_IDENT: Token.new(TOKEN_ID.FULL_IDENT, "Full identifier", TOKEN_FULL_IDENT), + TOKEN_ID.BRACKET_ROUND_LEFT: Token.new(TOKEN_ID.BRACKET_ROUND_LEFT, "(", TOKEN_BRACKET_ROUND_LEFT), + TOKEN_ID.BRACKET_ROUND_RIGHT: Token.new(TOKEN_ID.BRACKET_ROUND_RIGHT, ")", TOKEN_BRACKET_ROUND_RIGHT), + TOKEN_ID.BRACKET_CURLY_LEFT: Token.new(TOKEN_ID.BRACKET_CURLY_LEFT, "{", TOKEN_BRACKET_CURLY_LEFT), + TOKEN_ID.BRACKET_CURLY_RIGHT: Token.new(TOKEN_ID.BRACKET_CURLY_RIGHT, "}", TOKEN_BRACKET_CURLY_RIGHT), + TOKEN_ID.BRACKET_SQUARE_LEFT: Token.new(TOKEN_ID.BRACKET_SQUARE_LEFT, "[", TOKEN_BRACKET_SQUARE_LEFT), + TOKEN_ID.BRACKET_SQUARE_RIGHT: Token.new(TOKEN_ID.BRACKET_SQUARE_RIGHT, "]", TOKEN_BRACKET_SQUARE_RIGHT), + TOKEN_ID.BRACKET_ANGLE_LEFT: Token.new(TOKEN_ID.BRACKET_ANGLE_LEFT, "<", TOKEN_BRACKET_ANGLE_LEFT), + TOKEN_ID.BRACKET_ANGLE_RIGHT: Token.new(TOKEN_ID.BRACKET_ANGLE_RIGHT, ">", TOKEN_BRACKET_ANGLE_RIGHT), + TOKEN_ID.SEMICOLON: Token.new(TOKEN_ID.SEMICOLON, ";", TOKEN_SEMICOLON), + TOKEN_ID.EUQAL: Token.new(TOKEN_ID.EUQAL, "=", TOKEN_EUQAL), + TOKEN_ID.INT: Token.new(TOKEN_ID.INT, "Integer", TOKEN_LITERAL_INT), + TOKEN_ID.FLOAT: Token.new(TOKEN_ID.FLOAT, "Float", TOKEN_LITERAL_FLOAT), + TOKEN_ID.SPACE: Token.new(TOKEN_ID.SPACE, "Space", TOKEN_SPACE), + TOKEN_ID.COMMA: Token.new(TOKEN_ID.COMMA, ",", TOKEN_COMMA), + TOKEN_ID.STRING_SINGLE: Token.new(TOKEN_ID.STRING_SINGLE, "'String'", TOKEN_STRING_SINGLE), + TOKEN_ID.STRING_DOUBLE: Token.new(TOKEN_ID.STRING_DOUBLE, "\"String\"", TOKEN_STRING_DOUBLE), + TOKEN_ID.COMMENT_SINGLE: Token.new(TOKEN_ID.COMMENT_SINGLE, "//Comment", TOKEN_COMMENT_SINGLE), + TOKEN_ID.COMMENT_MULTI: Token.new(TOKEN_ID.COMMENT_MULTI, "/*Comment*/", TOKEN_COMMENT_MULTI), + + TOKEN_ID.MESSAGE: Token.new(TOKEN_ID.MESSAGE, "Message", TOKEN_SECOND_MESSAGE, true), + TOKEN_ID.SIMPLE_DATA_TYPE: Token.new(TOKEN_ID.SIMPLE_DATA_TYPE, "Data type", TOKEN_SECOND_SIMPLE_DATA_TYPE, true), + TOKEN_ID.ENUM: Token.new(TOKEN_ID.ENUM, "Enum", TOKEN_SECOND_ENUM, true), + TOKEN_ID.MAP: Token.new(TOKEN_ID.MAP, "Map", TOKEN_SECOND_MAP, true), + TOKEN_ID.ONEOF: Token.new(TOKEN_ID.ONEOF, "OneOf", TOKEN_SECOND_ONEOF, true), + TOKEN_ID.LITERAL_BOOL: Token.new(TOKEN_ID.LITERAL_BOOL, "Bool literal", TOKEN_SECOND_LITERAL_BOOL, true), + TOKEN_ID.SYNTAX: Token.new(TOKEN_ID.SYNTAX, "Syntax", TOKEN_SECOND_SYNTAX, true), + TOKEN_ID.IMPORT: Token.new(TOKEN_ID.IMPORT, "Import", TOKEN_SECOND_IMPORT, true), + TOKEN_ID.PACKAGE: Token.new(TOKEN_ID.PACKAGE, "Package", TOKEN_SECOND_PACKAGE, true), + TOKEN_ID.OPTION: Token.new(TOKEN_ID.OPTION, "Option", TOKEN_SECOND_OPTION, true), + TOKEN_ID.SERVICE: Token.new(TOKEN_ID.SERVICE, "Service", TOKEN_SECOND_SERVICE, true), + TOKEN_ID.RESERVED: Token.new(TOKEN_ID.RESERVED, "Reserved", TOKEN_SECOND_RESERVED, true), + TOKEN_ID.IMPORT_QUALIFICATION: Token.new(TOKEN_ID.IMPORT_QUALIFICATION, "Import qualification", TOKEN_SECOND_IMPORT_QUALIFICATION, true), + TOKEN_ID.FIELD_QUALIFICATION: Token.new(TOKEN_ID.FIELD_QUALIFICATION, "Field qualification", TOKEN_SECOND_FIELD_QUALIFICATION, true), + TOKEN_ID.ENUM_OPTION: Token.new(TOKEN_ID.ENUM_OPTION, "Enum option", TOKEN_SECOND_ENUM_OPTION, true), + TOKEN_ID.QUALIFICATION: Token.new(TOKEN_ID.QUALIFICATION, "Qualification", TOKEN_SECOND_QUALIFICATION, true), + TOKEN_ID.FIELD_OPTION: Token.new(TOKEN_ID.FIELD_OPTION, "Field option", TOKEN_SECOND_FIELD_OPTION, true), + + TOKEN_ID.STRING: Token.new(TOKEN_ID.STRING, "String", "", true) + } + + static func check_range(main : TokenEntrance, current : TokenEntrance) -> TokenRange: + if main.position.begin > current.position.begin: + if main.position.end > current.position.end: + if main.position.begin >= current.position.end: + return TokenRange.new(current.position.begin, current.position.end, RANGE_STATE.EXCLUDE_LEFT) + else: + return TokenRange.new(main.position.begin, current.position.end, RANGE_STATE.OVERLAY) + else: + return TokenRange.new(current.position.begin, current.position.end, RANGE_STATE.ENTERS) + elif main.position.begin < current.position.begin: + if main.position.end >= current.position.end: + return TokenRange.new(main.position.begin, main.position.end, RANGE_STATE.INCLUDE) + else: + if main.position.end < current.position.begin: + return TokenRange.new(main.position.begin, main.position.end, RANGE_STATE.EXCLUDE_RIGHT) + else: + return TokenRange.new(main.position.begin, current.position.end, RANGE_STATE.OVERLAY) + else: + if main.position.end == current.position.end: + return TokenRange.new(main.position.begin, main.position.end, RANGE_STATE.EQUAL) + elif main.position.end > current.position.end: + return TokenRange.new(main.position.begin, main.position.end, RANGE_STATE.INCLUDE) + else: + return TokenRange.new(current.position.begin, current.position.end, RANGE_STATE.ENTERS) + + func tokenizer() -> TokenResult: + for k in TOKEN: + if !TOKEN[k].is_ignore(): + TOKEN[k].find_all(document.text) + var second_tokens : Array = [] + second_tokens.append(TOKEN[TOKEN_ID.MESSAGE]) + second_tokens.append(TOKEN[TOKEN_ID.SIMPLE_DATA_TYPE]) + second_tokens.append(TOKEN[TOKEN_ID.ENUM]) + second_tokens.append(TOKEN[TOKEN_ID.MAP]) + second_tokens.append(TOKEN[TOKEN_ID.ONEOF]) + second_tokens.append(TOKEN[TOKEN_ID.LITERAL_BOOL]) + second_tokens.append(TOKEN[TOKEN_ID.SYNTAX]) + second_tokens.append(TOKEN[TOKEN_ID.IMPORT]) + second_tokens.append(TOKEN[TOKEN_ID.PACKAGE]) + second_tokens.append(TOKEN[TOKEN_ID.OPTION]) + second_tokens.append(TOKEN[TOKEN_ID.SERVICE]) + second_tokens.append(TOKEN[TOKEN_ID.RESERVED]) + second_tokens.append(TOKEN[TOKEN_ID.IMPORT_QUALIFICATION]) + second_tokens.append(TOKEN[TOKEN_ID.FIELD_QUALIFICATION]) + second_tokens.append(TOKEN[TOKEN_ID.ENUM_OPTION]) + second_tokens.append(TOKEN[TOKEN_ID.QUALIFICATION]) + second_tokens.append(TOKEN[TOKEN_ID.FIELD_OPTION]) + + var ident_token : Token = TOKEN[TOKEN_ID.IDENT] + for sec_token in second_tokens: + var remove_indexes : Array = [] + for i in range(ident_token.get_entrances().size()): + var entrance : TokenEntrance = sec_token.find(ident_token.get_entrances()[i].text, 0) + if entrance != null: + entrance.position.begin = ident_token.get_entrances()[i].position.begin + entrance.position.end = ident_token.get_entrances()[i].position.end + sec_token.add_entrance(entrance) + remove_indexes.append(i) + for i in range(remove_indexes.size()): + ident_token.remove_entrance(remove_indexes[i] - i) + for v in TOKEN[TOKEN_ID.STRING_DOUBLE].get_entrances(): + v.id = TOKEN_ID.STRING + TOKEN[TOKEN_ID.STRING].add_entrance(v) + TOKEN[TOKEN_ID.STRING_DOUBLE].clear() + for v in TOKEN[TOKEN_ID.STRING_SINGLE].get_entrances(): + v.id = TOKEN_ID.STRING + TOKEN[TOKEN_ID.STRING].add_entrance(v) + TOKEN[TOKEN_ID.STRING_SINGLE].clear() + var main_token : TokenEntrance + var cur_token : TokenEntrance + var main_index : int = -1 + var token_index_flag : bool = false + var result : TokenResult = TokenResult.new() + var check : TokenRange + var end : bool = false + var all : bool = false + var repeat : bool = false + while true: + all = true + for k in TOKEN: + if main_index == k: + continue + repeat = false + while TOKEN[k].get_entrances().size() > 0: + all = false + if !token_index_flag: + main_index = k + main_token = TOKEN[main_index].get_entrances()[0] + token_index_flag = true + break + else: + cur_token = TOKEN[k].get_entrances()[0] + check = check_range(main_token, cur_token) + if check.state == RANGE_STATE.INCLUDE: + TOKEN[k].remove_entrance(0) + end = true + elif check.state == RANGE_STATE.EXCLUDE_LEFT: + main_token = cur_token + main_index = k + end = false + repeat = true + break + elif check.state == RANGE_STATE.EXCLUDE_RIGHT: + end = true + break + elif check.state == RANGE_STATE.OVERLAY || check.state == RANGE_STATE.EQUAL: + result.errors.append(check) + TOKEN[main_index].remove_entrance(0) + TOKEN[k].remove_entrance(0) + token_index_flag = false + end = false + repeat = true + break + elif check.state == RANGE_STATE.ENTERS: + TOKEN[main_index].remove_entrance(0) + main_token = cur_token + main_index = k + end = false + repeat = true + break + if repeat: + break + if end: + if TOKEN[main_index].get_entrances().size() > 0: + result.tokens.append(main_token) + TOKEN[main_index].remove_entrance(0) + token_index_flag = false + if all: + break + return result + + static func check_tokens_integrity(tokens : Array, end : int) -> Array: + var cur_index : int = 0 + var result : Array = [] + for v in tokens: + if v.position.begin > cur_index: + result.append(TokenPosition.new(cur_index, v.position.begin)) + cur_index = v.position.end + 1 + if cur_index < end: + result.append(TokenPosition.new(cur_index, end)) + return result + + static func comment_space_processing(tokens : Array) -> void: + var remove_indexes : Array = [] + for i in range(tokens.size()): + if tokens[i].id == TOKEN_ID.COMMENT_SINGLE || tokens[i].id == TOKEN_ID.COMMENT_MULTI: + tokens[i].id = TOKEN_ID.SPACE + var space_index : int = -1 + for i in range(tokens.size()): + if tokens[i].id == TOKEN_ID.SPACE: + if space_index >= 0: + tokens[space_index].position.end = tokens[i].position.end + tokens[space_index].text = tokens[space_index].text + tokens[i].text + remove_indexes.append(i) + else: + space_index = i + else: + space_index = -1 + for i in range(remove_indexes.size()): + tokens.remove(remove_indexes[i] - i) + + #Analysis rule + enum AR { + MAYBE = 1, + MUST_ONE = 2, + ANY = 3, + OR = 4, + MAYBE_BEGIN = 5, + MAYBE_END = 6, + ANY_BEGIN = 7, + ANY_END = 8 + } + + #Space rule (space after token) + enum SP { + MAYBE = 1, + MUST = 2, + NO = 3 + } + + #Analysis Syntax Description + class ASD: + func _init(t, s : int = SP.MAYBE, r : int = AR.MUST_ONE, i : bool = false): + token = t + space = s + rule = r + importance = i + var token + var space : int + var rule : int + var importance : bool + + var TEMPLATE_SYNTAX : Array = [ + funcref(self, "desc_syntax"), + ASD.new(TOKEN_ID.SYNTAX), + ASD.new(TOKEN_ID.EUQAL), + ASD.new(TOKEN_ID.STRING, SP.MAYBE, AR.MUST_ONE, true), + ASD.new(TOKEN_ID.SEMICOLON) + ] + + var TEMPLATE_IMPORT : Array = [ + funcref(self, "desc_import"), + ASD.new(TOKEN_ID.IMPORT, SP.MUST), + ASD.new(TOKEN_ID.IMPORT_QUALIFICATION, SP.MUST, AR.MAYBE, true), + ASD.new(TOKEN_ID.STRING, SP.MAYBE, AR.MUST_ONE, true), + ASD.new(TOKEN_ID.SEMICOLON) + ] + + var TEMPLATE_PACKAGE : Array = [ + funcref(self, "desc_package"), + ASD.new(TOKEN_ID.PACKAGE, SP.MUST), + ASD.new([TOKEN_ID.IDENT, TOKEN_ID.FULL_IDENT], SP.MAYBE, AR.OR, true), + ASD.new(TOKEN_ID.SEMICOLON) + ] + + var TEMPLATE_OPTION : Array = [ + funcref(self, "desc_option"), + ASD.new(TOKEN_ID.OPTION, SP.MUST), + ASD.new([TOKEN_ID.IDENT, TOKEN_ID.FULL_IDENT], SP.MAYBE, AR.OR, true), + ASD.new(TOKEN_ID.EUQAL), + ASD.new([TOKEN_ID.STRING, TOKEN_ID.INT, TOKEN_ID.FLOAT, TOKEN_ID.LITERAL_BOOL], SP.MAYBE, AR.OR, true), + ASD.new(TOKEN_ID.SEMICOLON) + ] + + var TEMPLATE_FIELD : Array = [ + funcref(self, "desc_field"), + ASD.new(TOKEN_ID.FIELD_QUALIFICATION, SP.MUST, AR.MAYBE, true), + ASD.new([TOKEN_ID.SIMPLE_DATA_TYPE, TOKEN_ID.IDENT, TOKEN_ID.FULL_IDENT], SP.MAYBE, AR.OR, true), + ASD.new(TOKEN_ID.IDENT, SP.MAYBE, AR.MUST_ONE, true), + ASD.new(TOKEN_ID.EUQAL), + ASD.new(TOKEN_ID.INT, SP.MAYBE, AR.MUST_ONE, true), + ASD.new(TOKEN_ID.BRACKET_SQUARE_LEFT, SP.MAYBE, AR.MAYBE_BEGIN), + ASD.new(TOKEN_ID.FIELD_OPTION, SP.MAYBE, AR.MUST_ONE, true), + ASD.new(TOKEN_ID.EUQAL), + ASD.new(TOKEN_ID.LITERAL_BOOL, SP.MAYBE, AR.MUST_ONE, true), + ASD.new(TOKEN_ID.BRACKET_SQUARE_RIGHT, SP.MAYBE, AR.MAYBE_END), + ASD.new(TOKEN_ID.SEMICOLON) + ] + + var TEMPLATE_FIELD_ONEOF : Array = TEMPLATE_FIELD + + var TEMPLATE_MAP_FIELD : Array = [ + funcref(self, "desc_map_field"), + ASD.new(TOKEN_ID.MAP), + ASD.new(TOKEN_ID.BRACKET_ANGLE_LEFT), + ASD.new(TOKEN_ID.SIMPLE_DATA_TYPE, SP.MAYBE, AR.MUST_ONE, true), + ASD.new(TOKEN_ID.COMMA), + ASD.new([TOKEN_ID.SIMPLE_DATA_TYPE, TOKEN_ID.IDENT, TOKEN_ID.FULL_IDENT], SP.MAYBE, AR.OR, true), + ASD.new(TOKEN_ID.BRACKET_ANGLE_RIGHT, SP.MUST), + ASD.new(TOKEN_ID.IDENT, SP.MAYBE, AR.MUST_ONE, true), + ASD.new(TOKEN_ID.EUQAL), + ASD.new(TOKEN_ID.INT, SP.MAYBE, AR.MUST_ONE, true), + ASD.new(TOKEN_ID.BRACKET_SQUARE_LEFT, SP.MAYBE, AR.MAYBE_BEGIN), + ASD.new(TOKEN_ID.FIELD_OPTION, SP.MAYBE, AR.MUST_ONE, true), + ASD.new(TOKEN_ID.EUQAL), + ASD.new(TOKEN_ID.LITERAL_BOOL, SP.MAYBE, AR.MUST_ONE, true), + ASD.new(TOKEN_ID.BRACKET_SQUARE_RIGHT, SP.MAYBE, AR.MAYBE_END), + ASD.new(TOKEN_ID.SEMICOLON) + ] + + var TEMPLATE_MAP_FIELD_ONEOF : Array = TEMPLATE_MAP_FIELD + + var TEMPLATE_ENUM : Array = [ + funcref(self, "desc_enum"), + ASD.new(TOKEN_ID.ENUM, SP.MUST), + ASD.new(TOKEN_ID.IDENT, SP.MAYBE, AR.MUST_ONE, true), + ASD.new(TOKEN_ID.BRACKET_CURLY_LEFT), + ASD.new(TOKEN_ID.OPTION, SP.MUST, AR.MAYBE_BEGIN), + ASD.new(TOKEN_ID.ENUM_OPTION, SP.MAYBE, AR.MUST_ONE, true), + ASD.new(TOKEN_ID.EUQAL), + ASD.new(TOKEN_ID.LITERAL_BOOL, SP.MAYBE, AR.MUST_ONE, true), + ASD.new(TOKEN_ID.SEMICOLON, SP.MAYBE, AR.MAYBE_END), + ASD.new(TOKEN_ID.IDENT, SP.MAYBE, AR.ANY_BEGIN, true), + ASD.new(TOKEN_ID.EUQAL), + ASD.new(TOKEN_ID.INT, SP.MAYBE, AR.MUST_ONE, true), + ASD.new(TOKEN_ID.SEMICOLON, SP.MAYBE, AR.ANY_END), + ASD.new(TOKEN_ID.BRACKET_CURLY_RIGHT) + ] + + var TEMPLATE_MESSAGE_HEAD : Array = [ + funcref(self, "desc_message_head"), + ASD.new(TOKEN_ID.MESSAGE, SP.MUST), + ASD.new(TOKEN_ID.IDENT, SP.MAYBE, AR.MUST_ONE, true), + ASD.new(TOKEN_ID.BRACKET_CURLY_LEFT) + ] + + var TEMPLATE_MESSAGE_TAIL : Array = [ + funcref(self, "desc_message_tail"), + ASD.new(TOKEN_ID.BRACKET_CURLY_RIGHT) + ] + + var TEMPLATE_ONEOF_HEAD : Array = [ + funcref(self, "desc_oneof_head"), + ASD.new(TOKEN_ID.ONEOF, SP.MUST), + ASD.new(TOKEN_ID.IDENT, SP.MAYBE, AR.MUST_ONE, true), + ASD.new(TOKEN_ID.BRACKET_CURLY_LEFT), + ] + + var TEMPLATE_ONEOF_TAIL : Array = [ + funcref(self, "desc_oneof_tail"), + ASD.new(TOKEN_ID.BRACKET_CURLY_RIGHT) + ] + + var TEMPLATE_BEGIN : Array = [ + null, + ASD.new(TOKEN_ID.SPACE, SP.NO, AR.MAYBE) + ] + + var TEMPLATE_END : Array = [ + null + ] + + func get_token_id(tokens : Array, index : int) -> int: + if index < tokens.size(): + return tokens[index].id + return TOKEN_ID.UNDEFINED + + enum COMPARE_STATE { + DONE = 0, + MISMATCH = 1, + INCOMPLETE = 2, + ERROR_VALUE = 3 + } + + class TokenCompare: + func _init(s : int, i : int, d : String = ""): + state = s + index = i + description = d + var state : int + var index : int + var description : String + + func check_space(tokens : Array, index : int, space) -> int: + if get_token_id(tokens, index) == TOKEN_ID.SPACE: + if space == SP.MAYBE: + return 1 + elif space == SP.MUST: + return 1 + elif space == SP.NO: + return -1 + else: + if space == SP.MUST: + return -2 + return 0 + + class IndexedToken: + func _init(t : TokenEntrance, i : int): + token = t + index = i + var token : TokenEntrance + var index : int + + func token_importance_checkadd(template : ASD, token : TokenEntrance, index : int, importance : Array) -> void: + if template.importance: + importance.append(IndexedToken.new(token, index)) + + class CompareSettings: + func _init(ci : int, n : int, pi : int, pn : String = ""): + construction_index = ci + nesting = n + parent_index = pi + parent_name = pn + + var construction_index : int + var nesting : int + var parent_index : int + var parent_name : String + + func description_compare(template : Array, tokens : Array, index : int, settings : CompareSettings) -> TokenCompare: + var j : int = index + var space : int + var rule : int + var rule_flag : bool + var cont : bool + var check : int + var maybe_group_skip : bool = false + var any_group_index : int = -1 + var any_end_group_index : int = -1 + var i : int = 0 + var importance : Array = [] + while true: + i += 1 + if i >= template.size(): + break + rule_flag = false + cont = false + rule = template[i].rule + space = template[i].space + if rule == AR.MAYBE_END && maybe_group_skip: + maybe_group_skip = false + continue + if maybe_group_skip: + continue + if rule == AR.MAYBE: + if template[i].token == get_token_id(tokens, j): + token_importance_checkadd(template[i], tokens[j], j, importance) + rule_flag = true + else: + continue + elif rule == AR.MUST_ONE || rule == AR.MAYBE_END || rule == AR.ANY_END: + if template[i].token == get_token_id(tokens, j): + token_importance_checkadd(template[i], tokens[j], j, importance) + rule_flag = true + elif rule == AR.ANY: + var find_any : bool = false + while true: + if template[i].token == get_token_id(tokens, j): + token_importance_checkadd(template[i], tokens[j], j, importance) + find_any = true + j += 1 + check = check_space(tokens, j, space) + if check < 0: + return TokenCompare.new(COMPARE_STATE.INCOMPLETE, j) + else: + j += check + else: + if find_any: + cont = true + break + elif rule == AR.OR: + var or_tokens = template[i].token + for v in or_tokens: + if v == get_token_id(tokens, j): + token_importance_checkadd(template[i], tokens[j], j, importance) + j += 1 + check = check_space(tokens, j, space) + if check < 0: + return TokenCompare.new(COMPARE_STATE.INCOMPLETE, j) + else: + j += check + cont = true + break + elif rule == AR.MAYBE_BEGIN: + if template[i].token == get_token_id(tokens, j): + token_importance_checkadd(template[i], tokens[j], j, importance) + rule_flag = true + else: + maybe_group_skip = true + continue + elif rule == AR.ANY_BEGIN: + if template[i].token == get_token_id(tokens, j): + token_importance_checkadd(template[i], tokens[j], j, importance) + rule_flag = true + any_group_index = i + else: + if any_end_group_index > 0: + any_group_index = -1 + i = any_end_group_index + any_end_group_index = -1 + continue + if cont: + continue + if rule_flag: + j += 1 + check = check_space(tokens, j, space) + if check < 0: + return TokenCompare.new(COMPARE_STATE.INCOMPLETE, j) + else: + j += check + else: + if j > index: + return TokenCompare.new(COMPARE_STATE.INCOMPLETE, j) + else: + return TokenCompare.new(COMPARE_STATE.MISMATCH, j) + if any_group_index >= 0 && rule == AR.ANY_END: + any_end_group_index = i + i = any_group_index - 1 + if template[0] != null: + var result : DescriptionResult = template[0].call_func(importance, settings) + if !result.success: + return TokenCompare.new(COMPARE_STATE.ERROR_VALUE, result.error, result.description) + return TokenCompare.new(COMPARE_STATE.DONE, j) + + var DESCRIPTION : Array = [ + TEMPLATE_BEGIN, #0 + TEMPLATE_SYNTAX, #1 + TEMPLATE_IMPORT, #2 + TEMPLATE_PACKAGE, #3 + TEMPLATE_OPTION, #4 + TEMPLATE_FIELD, #5 + TEMPLATE_FIELD_ONEOF, #6 + TEMPLATE_MAP_FIELD, #7 + TEMPLATE_MAP_FIELD_ONEOF, #8 + TEMPLATE_ENUM, #9 + TEMPLATE_MESSAGE_HEAD, #10 + TEMPLATE_MESSAGE_TAIL, #11 + TEMPLATE_ONEOF_HEAD, #12 + TEMPLATE_ONEOF_TAIL, #13 + TEMPLATE_END #14 + ] + + enum JUMP { + NOTHING = 0, #nothing + SIMPLE = 1, #simple jump + NESTED_INCREMENT = 2, #nested increment + NESTED_DECREMENT = 3, #nested decrement + MUST_NESTED_SIMPLE = 4, #check: must be nested > 0 + MUST_NESTED_INCREMENT = 5, #check: must be nested > 0, then nested increment + MUST_NESTED_DECREMENT = 6, #nested decrement, then check: must be nested > 0 + } + + var TRANSLATION_TABLE : Array = [ + # BEGIN SYNTAX IMPORT PACKAGE OPTION FIELD FIELD_O MAP_F MAP_F_O ENUM MES_H MES_T ONEOF_H ONEOF_T END + [ 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], #BEGIN + [ 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 2, 0, 0, 0, 1], #SYNTAX + [ 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 2, 0, 0, 0, 1], #IMPORT + [ 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 2, 0, 0, 0, 1], #PACKAGE + [ 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 2, 0, 0, 0, 1], #OPTION + [ 0, 0, 0, 0, 0, 4, 0, 4, 0, 1, 2, 3, 5, 0, 0], #FIELD + [ 0, 0, 0, 0, 0, 0, 4, 0, 4, 0, 0, 0, 0, 6, 0], #FIELD_ONEOF + [ 0, 0, 0, 0, 0, 4, 0, 4, 0, 1, 2, 3, 5, 0, 0], #MAP_F + [ 0, 0, 0, 0, 0, 0, 4, 0, 4, 0, 0, 0, 0, 6, 0], #MAP_F_ONEOF + [ 0, 0, 0, 0, 0, 4, 0, 4, 0, 1, 2, 3, 5, 0, 1], #ENUM + [ 0, 0, 0, 0, 0, 4, 0, 4, 0, 1, 2, 3, 5, 0, 0], #MES_H + [ 0, 0, 0, 0, 0, 4, 0, 4, 0, 1, 2, 3, 5, 0, 1], #MES_T + [ 0, 0, 0, 0, 0, 0, 4, 0, 4, 0, 0, 0, 0, 0, 0], #ONEOF_H + [ 0, 0, 0, 0, 0, 4, 0, 4, 0, 1, 2, 3, 5, 0, 1], #ONEOF_T + [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] #END + ] + + class Construction: + func _init(b : int, e : int, d : int): + begin_token_index = b + end_token_index = e + description = d + var begin_token_index : int + var end_token_index : int + var description : int + + class TranslationResult: + var constructions : Array = [] + var done : bool = false + var error_description_id : int = -1 + var error_description_text : String = "" + var parse_token_index : int = 0 + var error_token_index : int = 0 + + func analyze_tokens(tokens : Array) -> TranslationResult: + var i : int = 0 + var result : TranslationResult = TranslationResult.new() + var comp : TokenCompare + var cur_template_id : int = 0 + var error : bool = false + var template_index : int + var comp_set : CompareSettings = CompareSettings.new(result.constructions.size(), 0, -1) + comp = description_compare(DESCRIPTION[cur_template_id], tokens, i, comp_set) + if comp.state == COMPARE_STATE.DONE: + i = comp.index + while true: + var end : bool = true + var find : bool = false + for j in range(TRANSLATION_TABLE[cur_template_id].size()): + template_index = j + if j == DESCRIPTION.size() - 1 && i < tokens.size(): + end = false + if result.error_description_id < 0: + error = true + break + if TRANSLATION_TABLE[cur_template_id][j] > 0: + end = false + comp_set.construction_index = result.constructions.size() + comp = description_compare(DESCRIPTION[j], tokens, i, comp_set) + if comp.state == COMPARE_STATE.DONE: + if TRANSLATION_TABLE[cur_template_id][j] == JUMP.NESTED_INCREMENT: + comp_set.nesting += 1 + elif TRANSLATION_TABLE[cur_template_id][j] == JUMP.NESTED_DECREMENT: + comp_set.nesting -= 1 + if comp_set.nesting < 0: + error = true + break + elif TRANSLATION_TABLE[cur_template_id][j] == JUMP.MUST_NESTED_SIMPLE: + if comp_set.nesting <= 0: + error = true + break + elif TRANSLATION_TABLE[cur_template_id][j] == JUMP.MUST_NESTED_INCREMENT: + if comp_set.nesting <= 0: + error = true + break + comp_set.nesting += 1 + elif TRANSLATION_TABLE[cur_template_id][j] == JUMP.MUST_NESTED_DECREMENT: + comp_set.nesting -= 1 + if comp_set.nesting <= 0: + error = true + break + result.constructions.append(Construction.new(i, comp.index, j)) + find = true + i = comp.index + cur_template_id = j + if i == tokens.size(): + if TRANSLATION_TABLE[cur_template_id][DESCRIPTION.size() - 1] == JUMP.SIMPLE: + if comp_set.nesting == 0: + end = true + else: + error = true + else: + error = true + elif i > tokens.size(): + error = true + break + elif comp.state == COMPARE_STATE.INCOMPLETE: + error = true + break + elif comp.state == COMPARE_STATE.ERROR_VALUE: + error = true + break + if error: + result.error_description_text = comp.description + result.error_description_id = template_index + result.parse_token_index = i + if comp.index >= tokens.size(): + result.error_token_index = tokens.size() - 1 + else: + result.error_token_index = comp.index + if end: + result.done = true + result.error_description_id = -1 + break + if !find: + break + return result + + enum CLASS_TYPE { + ENUM = 0, + MESSAGE = 1, + MAP = 2 + } + + enum FIELD_TYPE { + UNDEFINED = -1, + INT32 = 0, + SINT32 = 1, + UINT32 = 2, + INT64 = 3, + SINT64 = 4, + UINT64 = 5, + BOOL = 6, + ENUM = 7, + FIXED32 = 8, + SFIXED32 = 9, + FLOAT = 10, + FIXED64 = 11, + SFIXED64 = 12, + DOUBLE = 13, + STRING = 14, + BYTES = 15, + MESSAGE = 16, + MAP = 17 + } + + enum FIELD_QUALIFICATOR { + OPTIONAL = 0, + REQUIRED = 1, + REPEATED = 2, + RESERVED = 3 + } + + enum FIELD_OPTION { + PACKED = 0, + NOT_PACKED = 1 + } + + class ASTClass: + func _init(n : String, t : int, p : int, pn : String, o : String, ci : int): + name = n + type = t + parent_index = p + parent_name = pn + option = o + construction_index = ci + values = [] + + var name : String + var type : int + var parent_index : int + var parent_name : String + var option : String + var construction_index + var values : Array + + func copy() -> ASTClass: + var res : ASTClass = ASTClass.new(name, type, parent_index, parent_name, option, construction_index) + for v in values: + res.values.append(v.copy()) + return res + + class ASTEnumValue: + func _init(n : String, v : String): + name = n + value = v + + var name : String + var value : String + + func copy() -> ASTEnumValue: + return ASTEnumValue.new(name, value) + + class ASTField: + func _init(t, n : String, tn : String, p : int, q : int, o : int, ci : int, mf : bool): + tag = t + name = n + type_name = tn + parent_class_id = p + qualificator = q + option = o + construction_index = ci + is_map_field = mf + + var tag + var name : String + var type_name : String + var parent_class_id : int + var qualificator : int + var option : int + var construction_index : int + var is_map_field : bool + var field_type : int = FIELD_TYPE.UNDEFINED + var type_class_id : int = -1 + + func copy() -> ASTField: + var res : ASTField = ASTField.new(tag, name, type_name, parent_class_id, qualificator, option, construction_index, is_map_field) + res.field_type = field_type + res.type_class_id = type_class_id + return res + + enum AST_GROUP_RULE { + ONEOF = 0, + ALL = 1 + } + + class ASTFieldGroup: + func _init(n : String, pi : int, r : int): + name = n + parent_class_id = pi + rule = r + opened = true + + var name : String + var parent_class_id : int + var rule : int + var field_indexes : Array = [] + var opened : bool + + func copy() -> ASTFieldGroup: + var res : ASTFieldGroup = ASTFieldGroup.new(name, parent_class_id, rule) + res.opened = opened + for fi in field_indexes: + res.field_indexes.append(fi) + return res + + class ASTImport: + func _init(a_path : String, a_public : bool, sha : String): + path = a_path + public = a_public + sha256 = sha + + var path : String + var public : bool + var sha256 : String + + var class_table : Array = [] + var field_table : Array = [] + var group_table : Array = [] + var import_table : Array = [] + var proto_version : int = 0 + + class DescriptionResult: + func _init(s : bool = true, e = null, d : String = ""): + success = s + error = e + description = d + var success : bool + var error + var description : String + + static func get_text_from_token(string_token : TokenEntrance) -> String: + return string_token.text.substr(1, string_token.text.length() - 2) + + func desc_syntax(indexed_tokens : Array, settings : CompareSettings) -> DescriptionResult: + var result : DescriptionResult = DescriptionResult.new() + var s : String = get_text_from_token(indexed_tokens[0].token) + if s == "proto2": + proto_version = 2 + elif s == "proto3": + proto_version = 3 + else: + result.success = false + result.error = indexed_tokens[0].index + result.description = "Unspecified version of the protocol. Use \"proto2\" or \"proto3\" syntax string." + return result + + func desc_import(indexed_tokens : Array, settings : CompareSettings) -> DescriptionResult: + var result : DescriptionResult = DescriptionResult.new() + var offset : int = 0 + var public : bool = false + if indexed_tokens[offset].token.id == TOKEN_ID.IMPORT_QUALIFICATION: + if indexed_tokens[offset].token.text == "public": + public = true + offset += 1 + var f_name : String = path_dir + get_text_from_token(indexed_tokens[offset].token) + var file : File = File.new() + var sha : String = file.get_sha256(f_name) + if file.file_exists(f_name): + for i in import_table: + if i.path == f_name: + result.success = false + result.error = indexed_tokens[offset].index + result.description = "File '" + f_name + "' already imported." + return result + if i.sha256 == sha: + result.success = false + result.error = indexed_tokens[offset].index + result.description = "File '" + f_name + "' with matching SHA256 already imported." + return result + import_table.append(ASTImport.new(f_name, public, sha)) + else: + result.success = false + result.error = indexed_tokens[offset].index + result.description = "Import file '" + f_name + "' not found." + return result + + func desc_package(indexed_tokens : Array, settings : CompareSettings) -> DescriptionResult: + printerr("UNRELEASED desc_package: ", indexed_tokens.size(), ", nesting: ", settings.nesting) + var result : DescriptionResult = DescriptionResult.new() + return result + + func desc_option(indexed_tokens : Array, settings : CompareSettings) -> DescriptionResult: + printerr("UNRELEASED desc_option: ", indexed_tokens.size(), ", nesting: ", settings.nesting) + var result : DescriptionResult = DescriptionResult.new() + return result + + func desc_field(indexed_tokens : Array, settings : CompareSettings) -> DescriptionResult: + var result : DescriptionResult = DescriptionResult.new() + var qualifcator : int = FIELD_QUALIFICATOR.OPTIONAL + var option : int + var offset : int = 0 + + if proto_version == 3: + option = FIELD_OPTION.PACKED + if indexed_tokens[offset].token.id == TOKEN_ID.FIELD_QUALIFICATION: + if indexed_tokens[offset].token.text == "repeated": + qualifcator = FIELD_QUALIFICATOR.REPEATED + elif indexed_tokens[offset].token.text == "required" || indexed_tokens[offset].token.text == "optional": + result.success = false + result.error = indexed_tokens[offset].index + result.description = "Using the 'required' or 'optional' qualificator is unacceptable in Protobuf v3." + return result + offset += 1 + if proto_version == 2: + option = FIELD_OPTION.NOT_PACKED + if !(group_table.size() > 0 && group_table[group_table.size() - 1].opened): + if indexed_tokens[offset].token.id == TOKEN_ID.FIELD_QUALIFICATION: + if indexed_tokens[offset].token.text == "repeated": + qualifcator = FIELD_QUALIFICATOR.REPEATED + elif indexed_tokens[offset].token.text == "required": + qualifcator = FIELD_QUALIFICATOR.REQUIRED + elif indexed_tokens[offset].token.text == "optional": + qualifcator = FIELD_QUALIFICATOR.OPTIONAL + offset += 1 + else: + if class_table[settings.parent_index].type == CLASS_TYPE.MESSAGE: + result.success = false + result.error = indexed_tokens[offset].index + result.description = "Using the 'required', 'optional' or 'repeated' qualificator necessarily in Protobuf v2." + return result + var type_name : String = indexed_tokens[offset].token.text; offset += 1 + var field_name : String = indexed_tokens[offset].token.text; offset += 1 + var tag : String = indexed_tokens[offset].token.text; offset += 1 + + if indexed_tokens.size() == offset + 2: + if indexed_tokens[offset].token.text == "packed": + offset += 1 + if indexed_tokens[offset].token.text == "true": + option = FIELD_OPTION.PACKED + else: + option = FIELD_OPTION.NOT_PACKED + else: + result.success = false + result.error = indexed_tokens[offset].index + result.description = "Undefined field option." + return result + + if group_table.size() > 0: + if group_table[group_table.size() - 1].opened: + if indexed_tokens[0].token.id == TOKEN_ID.FIELD_QUALIFICATION: + result.success = false + result.error = indexed_tokens[0].index + result.description = "Using the 'required', 'optional' or 'repeated' qualificator is unacceptable in 'OneOf' field." + return result + group_table[group_table.size() - 1].field_indexes.append(field_table.size()) + field_table.append(ASTField.new(tag, field_name, type_name, settings.parent_index, qualifcator, option, settings.construction_index, false)) + return result + + func desc_map_field(indexed_tokens : Array, settings : CompareSettings) -> DescriptionResult: + var result : DescriptionResult = DescriptionResult.new() + var qualifcator : int = FIELD_QUALIFICATOR.REPEATED + var option : int + var offset : int = 0 + + if proto_version == 3: + option = FIELD_OPTION.PACKED + if proto_version == 2: + option = FIELD_OPTION.NOT_PACKED + + var key_type_name : String = indexed_tokens[offset].token.text; offset += 1 + if key_type_name == "float" || key_type_name == "double" || key_type_name == "bytes": + result.success = false + result.error = indexed_tokens[offset - 1].index + result.description = "Map 'key_type' can't be floating point types and bytes." + var type_name : String = indexed_tokens[offset].token.text; offset += 1 + var field_name : String = indexed_tokens[offset].token.text; offset += 1 + var tag : String = indexed_tokens[offset].token.text; offset += 1 + + if indexed_tokens.size() == offset + 2: + if indexed_tokens[offset].token.text == "packed": + offset += 1 + if indexed_tokens[offset] == "true": + option = FIELD_OPTION.PACKED + else: + option = FIELD_OPTION.NOT_PACKED + else: + result.success = false + result.error = indexed_tokens[offset].index + result.description = "Undefined field option." + + if group_table.size() > 0: + if group_table[group_table.size() - 1].opened: + group_table[group_table.size() - 1].field_indexes.append(field_table.size()) + + class_table.append(ASTClass.new("map_type_" + field_name, CLASS_TYPE.MAP, settings.parent_index, settings.parent_name, "", settings.construction_index)) + field_table.append(ASTField.new(tag, field_name, "map_type_" + field_name, settings.parent_index, qualifcator, option, settings.construction_index, false)) + + field_table.append(ASTField.new(1, "key", key_type_name, class_table.size() - 1, FIELD_QUALIFICATOR.REQUIRED, option, settings.construction_index, true)) + field_table.append(ASTField.new(2, "value", type_name, class_table.size() - 1, FIELD_QUALIFICATOR.REQUIRED, option, settings.construction_index, true)) + + return result + + func desc_enum(indexed_tokens : Array, settings : CompareSettings) -> DescriptionResult: + var result : DescriptionResult = DescriptionResult.new() + var option : String = "" + var offset : int = 0 + var type_name : String = indexed_tokens[offset].token.text; offset += 1 + if indexed_tokens[offset].token.id == TOKEN_ID.ENUM_OPTION: + if indexed_tokens[offset].token.text == "allow_alias" && indexed_tokens[offset + 1].token.text == "true": + option = "allow_alias" + offset += 2 + var value : ASTEnumValue + var enum_class : ASTClass = ASTClass.new(type_name, CLASS_TYPE.ENUM, settings.parent_index, settings.parent_name, option, settings.construction_index) + var first_value : bool = true + while offset < indexed_tokens.size(): + if first_value: + if indexed_tokens[offset + 1].token.text != "0": + result.success = false + result.error = indexed_tokens[offset + 1].index + result.description = "For Enums, the default value is the first defined enum value, which must be 0." + break + first_value = false + #if indexed_tokens[offset + 1].token.text[0] == "+" || indexed_tokens[offset + 1].token.text[0] == "-": + # result.success = false + # result.error = indexed_tokens[offset + 1].index + # result.description = "For Enums, signed values are not allowed." + # break + value = ASTEnumValue.new(indexed_tokens[offset].token.text, indexed_tokens[offset + 1].token.text) + enum_class.values.append(value) + offset += 2 + + class_table.append(enum_class) + return result + + func desc_message_head(indexed_tokens : Array, settings : CompareSettings) -> DescriptionResult: + var result : DescriptionResult = DescriptionResult.new() + class_table.append(ASTClass.new(indexed_tokens[0].token.text, CLASS_TYPE.MESSAGE, settings.parent_index, settings.parent_name, "", settings.construction_index)) + settings.parent_index = class_table.size() - 1 + settings.parent_name = settings.parent_name + "." + indexed_tokens[0].token.text + return result + + func desc_message_tail(indexed_tokens : Array, settings : CompareSettings) -> DescriptionResult: + settings.parent_index = class_table[settings.parent_index].parent_index + settings.parent_name = class_table[settings.parent_index + 1].parent_name + var result : DescriptionResult = DescriptionResult.new() + return result + + func desc_oneof_head(indexed_tokens : Array, settings : CompareSettings) -> DescriptionResult: + var result : DescriptionResult = DescriptionResult.new() + for g in group_table: + if g.parent_class_id == settings.parent_index && g.name == indexed_tokens[0].token.text: + result.success = false + result.error = indexed_tokens[0].index + result.description = "OneOf name must be unique." + return result + group_table.append(ASTFieldGroup.new(indexed_tokens[0].token.text, settings.parent_index, AST_GROUP_RULE.ONEOF)) + return result + + func desc_oneof_tail(indexed_tokens : Array, settings : CompareSettings) -> DescriptionResult: + group_table[group_table.size() - 1].opened = false + var result : DescriptionResult = DescriptionResult.new() + return result + + func analyze() -> AnalyzeResult: + var analyze_result : AnalyzeResult = AnalyzeResult.new() + analyze_result.doc = document + analyze_result.classes = class_table + analyze_result.fields = field_table + analyze_result.groups = group_table + analyze_result.state = false + var result : TokenResult = tokenizer() + if result.errors.size() > 0: + for v in result.errors: + var spos : Helper.StringPosition = Helper.str_pos(document.text, v.position) + var err_text : String = "Unexpected token intersection " + "'" + document.text.substr(v.position.begin, spos.length) + "'" + printerr(Helper.error_string(document.name, spos.str_num, spos.column, err_text)) + else: + var integrity = check_tokens_integrity(result.tokens, document.text.length() - 1) + if integrity.size() > 0: + for v in integrity: + var spos: Helper.StringPosition = Helper.str_pos(document.text, TokenPosition.new(v.begin, v.end)) + var err_text : String = "Unexpected token " + "'" + document.text.substr(v.begin, spos.length) + "'" + printerr(Helper.error_string(document.name, spos.str_num, spos.column, err_text)) + else: + analyze_result.tokens = result.tokens + comment_space_processing(result.tokens) + var syntax : TranslationResult = analyze_tokens(result.tokens) + if !syntax.done: + var pos_main : Helper.TokenPosition = Helper.text_pos(result.tokens, syntax.parse_token_index) + var pos_inner : Helper.TokenPosition = Helper.text_pos(result.tokens, syntax.error_token_index) + var spos_main : Helper.StringPosition = Helper.str_pos(document.text, pos_main) + var spos_inner : Helper.StringPosition = Helper.str_pos(document.text, pos_inner) + var err_text : String = "Syntax error in construction '" + result.tokens[syntax.parse_token_index].text + "'. " + err_text += "Unacceptable use '" + result.tokens[syntax.error_token_index].text + "' at:" + String(spos_inner.str_num) + ":" + String(spos_inner.column) + err_text += "\n" + syntax.error_description_text + printerr(Helper.error_string(document.name, spos_main.str_num, spos_main.column, err_text)) + else: + analyze_result.version = proto_version + analyze_result.imports = import_table + analyze_result.syntax = syntax + analyze_result.state = true + return analyze_result + +class Semantic: + + var class_table : Array + var field_table : Array + var group_table : Array + var syntax : Analysis.TranslationResult + var tokens : Array + var document : Document + + func _init(analyze_result : AnalyzeResult): + class_table = analyze_result.classes + field_table = analyze_result.fields + group_table = analyze_result.groups + syntax = analyze_result.syntax + tokens = analyze_result.tokens + document = analyze_result.doc + + + enum CHECK_SUBJECT { + CLASS_NAME = 0, + FIELD_NAME = 1, + FIELD_TAG_NUMBER = 2, + FIELD_TYPE = 3 + } + + var STRING_FIELD_TYPE = { + "int32": Analysis.FIELD_TYPE.INT32, + "sint32": Analysis.FIELD_TYPE.SINT32, + "uint32": Analysis.FIELD_TYPE.UINT32, + "int64": Analysis.FIELD_TYPE.INT64, + "sint64": Analysis.FIELD_TYPE.SINT64, + "uint64": Analysis.FIELD_TYPE.UINT64, + "bool": Analysis.FIELD_TYPE.BOOL, + "fixed32": Analysis.FIELD_TYPE.FIXED32, + "sfixed32": Analysis.FIELD_TYPE.SFIXED32, + "float": Analysis.FIELD_TYPE.FLOAT, + "fixed64": Analysis.FIELD_TYPE.FIXED64, + "sfixed64": Analysis.FIELD_TYPE.SFIXED64, + "double": Analysis.FIELD_TYPE.DOUBLE, + "string": Analysis.FIELD_TYPE.STRING, + "bytes": Analysis.FIELD_TYPE.BYTES, + "map": Analysis.FIELD_TYPE.MAP + } + + class CheckResult: + func _init(mci : int, aci : int, ti : int, s : int): + main_construction_index = mci + associated_construction_index = aci + table_index = ti + subject = s + + var main_construction_index: int = -1 + var associated_construction_index: int = -1 + var table_index: int = -1 + var subject : int + + func check_class_names() -> Array: + var result : Array = [] + for i in range(class_table.size()): + var the_class_name : String = class_table[i].parent_name + "." + class_table[i].name + for j in range(i + 1, class_table.size(), 1): + var inner_name : String = class_table[j].parent_name + "." + class_table[j].name + if inner_name == the_class_name: + var check : CheckResult = CheckResult.new(class_table[j].construction_index, class_table[i].construction_index, j, CHECK_SUBJECT.CLASS_NAME) + result.append(check) + break + return result + + func check_field_names() -> Array: + var result : Array = [] + for i in range(field_table.size()): + var the_class_name : String = class_table[field_table[i].parent_class_id].parent_name + "." + class_table[field_table[i].parent_class_id].name + for j in range(i + 1, field_table.size(), 1): + var inner_name : String = class_table[field_table[j].parent_class_id].parent_name + "." + class_table[field_table[j].parent_class_id].name + if inner_name == the_class_name: + if field_table[i].name == field_table[j].name: + var check : CheckResult = CheckResult.new(field_table[j].construction_index, field_table[i].construction_index, j, CHECK_SUBJECT.FIELD_NAME) + result.append(check) + break + if field_table[i].tag == field_table[j].tag: + var check : CheckResult = CheckResult.new(field_table[j].construction_index, field_table[i].construction_index, j, CHECK_SUBJECT.FIELD_TAG_NUMBER) + result.append(check) + break + return result + + func find_full_class_name(the_class_name : String) -> int: + for i in range(class_table.size()): + if the_class_name == class_table[i].parent_name + "." + class_table[i].name: + return i + return -1 + + func find_class_name(the_class_name : String) -> int: + for i in range(class_table.size()): + if the_class_name == class_table[i].name: + return i + return -1 + + func get_class_childs(class_index : int) -> Array: + var result : Array = [] + for i in range(class_table.size()): + if class_table[i].parent_index == class_index: + result.append(i) + return result + + func find_in_childs(the_class_name : String, child_indexes : Array) -> int: + for c in child_indexes: + if the_class_name == class_table[c].name: + return c + return -1 + + func determine_field_types() -> Array: + var result : Array = [] + for f in field_table: + if STRING_FIELD_TYPE.has(f.type_name): + f.field_type = STRING_FIELD_TYPE[f.type_name] + else: + if f.type_name[0] == ".": + f.type_class_id = find_full_class_name(f.type_name) + else: + var splited_name : Array = f.type_name.split(".", false) + var cur_class_index : int = f.parent_class_id + var exit : bool = false + while(true): + var find : bool = false + if cur_class_index == -1: + break + for n in splited_name: + var childs_and_parent : Array = get_class_childs(cur_class_index) + var res_index : int = find_in_childs(n, childs_and_parent) + if res_index >= 0: + find = true + cur_class_index = res_index + else: + if find: + exit = true + else: + cur_class_index = class_table[cur_class_index].parent_index + break + if exit: + break + if find: + f.type_class_id = cur_class_index + break + if f.type_class_id == -1: + f.type_class_id = find_full_class_name("." + f.type_name) + for i in range(field_table.size()): + if field_table[i].field_type == Analysis.FIELD_TYPE.UNDEFINED: + if field_table[i].type_class_id == -1: + result.append(CheckResult.new(field_table[i].construction_index, field_table[i].construction_index, i, CHECK_SUBJECT.FIELD_TYPE)) + else: + if class_table[field_table[i].type_class_id].type == Analysis.CLASS_TYPE.ENUM: + field_table[i].field_type = Analysis.FIELD_TYPE.ENUM + elif class_table[field_table[i].type_class_id].type == Analysis.CLASS_TYPE.MESSAGE: + field_table[i].field_type = Analysis.FIELD_TYPE.MESSAGE + elif class_table[field_table[i].type_class_id].type == Analysis.CLASS_TYPE.MAP: + field_table[i].field_type = Analysis.FIELD_TYPE.MAP + else: + result.append(CheckResult.new(field_table[i].construction_index, field_table[i].construction_index, i, CHECK_SUBJECT.FIELD_TYPE)) + return result + + func check_constructions() -> Array: + var cl : Array = check_class_names() + var fl : Array = check_field_names() + var ft : Array = determine_field_types() + return cl + fl + ft + + func check() -> bool: + var check_result : Array = check_constructions() + if check_result.size() == 0: + return true + else: + for v in check_result: + var main_tok : int = syntax.constructions[v.main_construction_index].begin_token_index + var assoc_tok : int = syntax.constructions[v.associated_construction_index].begin_token_index + var main_err_pos : Helper.StringPosition = Helper.str_pos(document.text, Helper.text_pos(tokens, main_tok)) + var assoc_err_pos : Helper.StringPosition = Helper.str_pos(document.text, Helper.text_pos(tokens, assoc_tok)) + var err_text : String + if v.subject == CHECK_SUBJECT.CLASS_NAME: + var class_type = "Undefined" + if class_table[v.table_index].type == Analysis.CLASS_TYPE.ENUM: + class_type = "Enum" + elif class_table[v.table_index].type == Analysis.CLASS_TYPE.MESSAGE: + class_type = "Message" + elif class_table[v.table_index].type == Analysis.CLASS_TYPE.MAP: + class_type = "Map" + err_text = class_type + " name '" + class_table[v.table_index].name + "' is already defined at:" + String(assoc_err_pos.str_num) + ":" + String(assoc_err_pos.column) + elif v.subject == CHECK_SUBJECT.FIELD_NAME: + err_text = "Field name '" + field_table[v.table_index].name + "' is already defined at:" + String(assoc_err_pos.str_num) + ":" + String(assoc_err_pos.column) + elif v.subject == CHECK_SUBJECT.FIELD_TAG_NUMBER: + err_text = "Tag number '" + field_table[v.table_index].tag + "' is already defined at:" + String(assoc_err_pos.str_num) + ":" + String(assoc_err_pos.column) + elif v.subject == CHECK_SUBJECT.FIELD_TYPE: + err_text = "Type '" + field_table[v.table_index].type_name + "' of the '" + field_table[v.table_index].name + "' field undefined" + else: + err_text = "Undefined error" + printerr(Helper.error_string(document.name, main_err_pos.str_num, main_err_pos.column, err_text)) + return false + +class Translator: + + var class_table : Array + var field_table : Array + var group_table : Array + var proto_version : int + + func _init(analyzer_result : AnalyzeResult): + class_table = analyzer_result.classes + field_table = analyzer_result.fields + group_table = analyzer_result.groups + proto_version = analyzer_result.version + + func tabulate(text : String, nesting : int) -> String: + var tab : String = "" + for i in range(nesting): + tab += "\t" + return tab + text + + func default_dict_text() -> String: + if proto_version == 2: + return "DEFAULT_VALUES_2" + elif proto_version == 3: + return "DEFAULT_VALUES_3" + return "TRANSLATION_ERROR" + + func generate_field_type(field : Analysis.ASTField) -> String: + var text : String = "PB_DATA_TYPE." + if field.field_type == Analysis.FIELD_TYPE.INT32: + return text + "INT32" + elif field.field_type == Analysis.FIELD_TYPE.SINT32: + return text + "SINT32" + elif field.field_type == Analysis.FIELD_TYPE.UINT32: + return text + "UINT32" + elif field.field_type == Analysis.FIELD_TYPE.INT64: + return text + "INT64" + elif field.field_type == Analysis.FIELD_TYPE.SINT64: + return text + "SINT64" + elif field.field_type == Analysis.FIELD_TYPE.UINT64: + return text + "UINT64" + elif field.field_type == Analysis.FIELD_TYPE.BOOL: + return text + "BOOL" + elif field.field_type == Analysis.FIELD_TYPE.ENUM: + return text + "ENUM" + elif field.field_type == Analysis.FIELD_TYPE.FIXED32: + return text + "FIXED32" + elif field.field_type == Analysis.FIELD_TYPE.SFIXED32: + return text + "SFIXED32" + elif field.field_type == Analysis.FIELD_TYPE.FLOAT: + return text + "FLOAT" + elif field.field_type == Analysis.FIELD_TYPE.FIXED64: + return text + "FIXED64" + elif field.field_type == Analysis.FIELD_TYPE.SFIXED64: + return text + "SFIXED64" + elif field.field_type == Analysis.FIELD_TYPE.DOUBLE: + return text + "DOUBLE" + elif field.field_type == Analysis.FIELD_TYPE.STRING: + return text + "STRING" + elif field.field_type == Analysis.FIELD_TYPE.BYTES: + return text + "BYTES" + elif field.field_type == Analysis.FIELD_TYPE.MESSAGE: + return text + "MESSAGE" + elif field.field_type == Analysis.FIELD_TYPE.MAP: + return text + "MAP" + return text + + func generate_field_rule(field : Analysis.ASTField) -> String: + var text : String = "PB_RULE." + if field.qualificator == Analysis.FIELD_QUALIFICATOR.OPTIONAL: + return text + "OPTIONAL" + elif field.qualificator == Analysis.FIELD_QUALIFICATOR.REQUIRED: + return text + "REQUIRED" + elif field.qualificator == Analysis.FIELD_QUALIFICATOR.REPEATED: + return text + "REPEATED" + elif field.qualificator == Analysis.FIELD_QUALIFICATOR.RESERVED: + return text + "RESERVED" + return text + + func generate_gdscript_simple_type(field : Analysis.ASTField) -> String: + if field.field_type == Analysis.FIELD_TYPE.INT32: + return "int" + elif field.field_type == Analysis.FIELD_TYPE.SINT32: + return "int" + elif field.field_type == Analysis.FIELD_TYPE.UINT32: + return "int" + elif field.field_type == Analysis.FIELD_TYPE.INT64: + return "int" + elif field.field_type == Analysis.FIELD_TYPE.SINT64: + return "int" + elif field.field_type == Analysis.FIELD_TYPE.UINT64: + return "int" + elif field.field_type == Analysis.FIELD_TYPE.BOOL: + return "bool" + elif field.field_type == Analysis.FIELD_TYPE.ENUM: + return "" + elif field.field_type == Analysis.FIELD_TYPE.FIXED32: + return "int" + elif field.field_type == Analysis.FIELD_TYPE.SFIXED32: + return "int" + elif field.field_type == Analysis.FIELD_TYPE.FLOAT: + return "float" + elif field.field_type == Analysis.FIELD_TYPE.FIXED64: + return "int" + elif field.field_type == Analysis.FIELD_TYPE.SFIXED64: + return "int" + elif field.field_type == Analysis.FIELD_TYPE.DOUBLE: + return "float" + elif field.field_type == Analysis.FIELD_TYPE.STRING: + return "String" + elif field.field_type == Analysis.FIELD_TYPE.BYTES: + return "PoolByteArray" + return "" + + func generate_field_constructor(field_index : int, nesting : int) -> String: + var text : String = "" + var f : Analysis.ASTField = field_table[field_index] + var field_name : String = "_" + f.name + var pbfield_text : String = field_name + " = PBField.new(" + pbfield_text += "\"" + f.name + "\", " + pbfield_text += generate_field_type(f) + ", " + pbfield_text += generate_field_rule(f) + ", " + pbfield_text += String(f.tag) + ", " + if f.option == Analysis.FIELD_OPTION.PACKED: + pbfield_text += "true" + elif f.option == Analysis.FIELD_OPTION.NOT_PACKED: + pbfield_text += "false" + if f.qualificator == Analysis.FIELD_QUALIFICATOR.REPEATED: + pbfield_text += ", []" + else: + pbfield_text += ", " + default_dict_text() + "[" + generate_field_type(f) + "]" + pbfield_text += ")\n" + text += tabulate(pbfield_text, nesting) + if f.is_map_field: + text += tabulate(field_name + ".is_map_field = true\n", nesting) + text += tabulate("service = PBServiceField.new()\n", nesting) + text += tabulate("service.field = " + field_name + "\n", nesting) + if f.field_type == Analysis.FIELD_TYPE.MESSAGE: + if f.qualificator == Analysis.FIELD_QUALIFICATOR.REPEATED: + text += tabulate("service.func_ref = funcref(self, \"add" + field_name + "\")\n", nesting) + else: + text += tabulate("service.func_ref = funcref(self, \"new" + field_name + "\")\n", nesting) + elif f.field_type == Analysis.FIELD_TYPE.MAP: + text += tabulate("service.func_ref = funcref(self, \"add_empty" + field_name + "\")\n", nesting) + text += tabulate("data[" + field_name + ".tag] = service\n", nesting) + + return text + + func generate_group_clear(field_index : int, nesting : int) -> String: + for g in group_table: + var text : String = "" + var find : bool = false + if g.parent_class_id == field_table[field_index].parent_class_id: + for i in g.field_indexes: + if field_index == i: + find = true + text += tabulate("data[" + field_table[i].tag + "].state = PB_SERVICE_STATE.FILLED\n", nesting) + else: + text += tabulate("_" + field_table[i].name + ".value = " + default_dict_text() + "[" + generate_field_type(field_table[i]) + "]\n", nesting) + text += tabulate("data[" + field_table[i].tag + "].state = PB_SERVICE_STATE.UNFILLED\n", nesting) + if find: + return text + return "" + + func generate_has_oneof(field_index : int, nesting : int) -> String: + for g in group_table: + var text : String = "" + if g.parent_class_id == field_table[field_index].parent_class_id: + for i in g.field_indexes: + if field_index == i: + text += tabulate("func has_" + field_table[i].name + "() -> bool:\n", nesting) + nesting += 1 + text += tabulate("return data[" + field_table[i].tag + "].state == PB_SERVICE_STATE.FILLED\n", nesting) + return text + return "" + + func generate_field(field_index : int, nesting : int) -> String: + var text : String = "" + var f : Analysis.ASTField = field_table[field_index] + text += tabulate("var _" + f.name + ": PBField\n", nesting) + if f.field_type == Analysis.FIELD_TYPE.MESSAGE: + var the_class_name : String = class_table[f.type_class_id].parent_name + "." + class_table[f.type_class_id].name + the_class_name = the_class_name.substr(1, the_class_name.length() - 1) + text += generate_has_oneof(field_index, nesting) + if f.qualificator == Analysis.FIELD_QUALIFICATOR.REPEATED: + text += tabulate("func get_" + f.name + "() -> Array:\n", nesting) + else: + text += tabulate("func get_" + f.name + "() -> " + the_class_name + ":\n", nesting) + nesting += 1 + text += tabulate("return _" + f.name + ".value\n", nesting) + nesting -= 1 + text += tabulate("func clear_" + f.name + "() -> void:\n", nesting) + nesting += 1 + text += tabulate("data[" + String(f.tag) + "].state = PB_SERVICE_STATE.UNFILLED\n", nesting) + if f.qualificator == Analysis.FIELD_QUALIFICATOR.REPEATED: + text += tabulate("_" + f.name + ".value = []\n", nesting) + nesting -= 1 + text += tabulate("func add_" + f.name + "() -> " + the_class_name + ":\n", nesting) + nesting += 1 + text += tabulate("var element = " + the_class_name + ".new()\n", nesting) + text += tabulate("_" + f.name + ".value.append(element)\n", nesting) + text += tabulate("return element\n", nesting) + else: + text += tabulate("_" + f.name + ".value = " + default_dict_text() + "[" + generate_field_type(f) + "]\n", nesting) + nesting -= 1 + text += tabulate("func new_" + f.name + "() -> " + the_class_name + ":\n", nesting) + nesting += 1 + text += generate_group_clear(field_index, nesting) + text += tabulate("_" + f.name + ".value = " + the_class_name + ".new()\n", nesting) + text += tabulate("return _" + f.name + ".value\n", nesting) + elif f.field_type == Analysis.FIELD_TYPE.MAP: + var the_class_name : String = class_table[f.type_class_id].parent_name + "." + class_table[f.type_class_id].name + the_class_name = the_class_name.substr(1, the_class_name.length() - 1) + text += generate_has_oneof(field_index, nesting) + text += tabulate("func get_raw_" + f.name + "():\n", nesting) + nesting += 1 + text += tabulate("return _" + f.name + ".value\n", nesting) + nesting -= 1 + text += tabulate("func get_" + f.name + "():\n", nesting) + nesting += 1 + text += tabulate("return PBPacker.construct_map(_" + f.name + ".value)\n", nesting) + nesting -= 1 + text += tabulate("func clear_" + f.name + "():\n", nesting) + nesting += 1 + text += tabulate("data[" + String(f.tag) + "].state = PB_SERVICE_STATE.UNFILLED\n", nesting) + text += tabulate("_" + f.name + ".value = " + default_dict_text() + "[" + generate_field_type(f) + "]\n", nesting) + nesting -= 1 + for i in range(field_table.size()): + if field_table[i].parent_class_id == f.type_class_id && field_table[i].name == "value": + var gd_type : String = generate_gdscript_simple_type(field_table[i]) + var return_type : String = "" + if gd_type != "": + return_type = " -> " + gd_type + elif field_table[i].field_type == Analysis.FIELD_TYPE.MESSAGE: + return_type = " -> " + the_class_name + text += tabulate("func add_empty_" + f.name + "()" + return_type + ":\n", nesting) + nesting += 1 + text += generate_group_clear(field_index, nesting) + text += tabulate("var element = " + the_class_name + ".new()\n", nesting) + text += tabulate("_" + f.name + ".value.append(element)\n", nesting) + text += tabulate("return element\n", nesting) + nesting -= 1 + if field_table[i].field_type == Analysis.FIELD_TYPE.MESSAGE: + text += tabulate("func add_" + f.name + "(a_key)" + return_type + ":\n", nesting) + nesting += 1 + text += generate_group_clear(field_index, nesting) + text += tabulate("var idx = -1\n", nesting) + text += tabulate("for i in range(_" + f.name + ".value.size()):\n", nesting) + nesting += 1 + text += tabulate("if _" + f.name + ".value[i].get_key() == a_key:\n", nesting) + nesting += 1 + text += tabulate("idx = i\n", nesting) + text += tabulate("break\n", nesting) + nesting -= 2 + text += tabulate("var element = " + the_class_name + ".new()\n", nesting) + text += tabulate("element.set_key(a_key)\n", nesting) + text += tabulate("if idx != -1:\n", nesting) + nesting += 1 + text += tabulate("_" + f.name + ".value[idx] = element\n", nesting) + nesting -= 1 + text += tabulate("else:\n", nesting) + nesting += 1 + text += tabulate("_" + f.name + ".value.append(element)\n", nesting) + nesting -= 1 + text += tabulate("return element.new_value()\n", nesting) + else: + text += tabulate("func add_" + f.name + "(a_key, a_value) -> void:\n", nesting) + nesting += 1 + text += generate_group_clear(field_index, nesting) + text += tabulate("var idx = -1\n", nesting) + text += tabulate("for i in range(_" + f.name + ".value.size()):\n", nesting) + nesting += 1 + text += tabulate("if _" + f.name + ".value[i].get_key() == a_key:\n", nesting) + nesting += 1 + text += tabulate("idx = i\n", nesting) + text += tabulate("break\n", nesting) + nesting -= 2 + text += tabulate("var element = " + the_class_name + ".new()\n", nesting) + text += tabulate("element.set_key(a_key)\n", nesting) + text += tabulate("element.set_value(a_value)\n", nesting) + text += tabulate("if idx != -1:\n", nesting) + nesting += 1 + text += tabulate("_" + f.name + ".value[idx] = element\n", nesting) + nesting -= 1 + text += tabulate("else:\n", nesting) + nesting += 1 + text += tabulate("_" + f.name + ".value.append(element)\n", nesting) + nesting -= 1 + break + else: + var gd_type : String = generate_gdscript_simple_type(f) + var return_type : String = "" + var argument_type : String = "" + if gd_type != "": + return_type = " -> " + gd_type + argument_type = " : " + gd_type + text += generate_has_oneof(field_index, nesting) + if f.qualificator == Analysis.FIELD_QUALIFICATOR.REPEATED: + text += tabulate("func get_" + f.name + "() -> Array:\n", nesting) + else: + text += tabulate("func get_" + f.name + "()" + return_type + ":\n", nesting) + nesting += 1 + text += tabulate("return _" + f.name + ".value\n", nesting) + nesting -= 1 + text += tabulate("func clear_" + f.name + "() -> void:\n", nesting) + nesting += 1 + text += tabulate("data[" + String(f.tag) + "].state = PB_SERVICE_STATE.UNFILLED\n", nesting) + if f.qualificator == Analysis.FIELD_QUALIFICATOR.REPEATED: + text += tabulate("_" + f.name + ".value = []\n", nesting) + nesting -= 1 + text += tabulate("func add_" + f.name + "(value" + argument_type + ") -> void:\n", nesting) + nesting += 1 + text += tabulate("_" + f.name + ".value.append(value)\n", nesting) + else: + text += tabulate("_" + f.name + ".value = " + default_dict_text() + "[" + generate_field_type(f) + "]\n", nesting) + nesting -= 1 + text += tabulate("func set_" + f.name + "(value" + argument_type + ") -> void:\n", nesting) + nesting += 1 + text += generate_group_clear(field_index, nesting) + text += tabulate("_" + f.name + ".value = value\n", nesting) + return text + + func generate_class(class_index : int, nesting : int) -> String: + var text : String = "" + if class_table[class_index].type == Analysis.CLASS_TYPE.MESSAGE || class_table[class_index].type == Analysis.CLASS_TYPE.MAP: + var cls_pref : String = "" + cls_pref += tabulate("class " + class_table[class_index].name + ":\n", nesting) + nesting += 1 + cls_pref += tabulate("func _init():\n", nesting) + text += cls_pref + nesting += 1 + text += tabulate("var service\n", nesting) + text += tabulate("\n", nesting) + var field_text : String = "" + for i in range(field_table.size()): + if field_table[i].parent_class_id == class_index: + text += generate_field_constructor(i, nesting) + text += tabulate("\n", nesting) + field_text += generate_field(i, nesting - 1) + field_text += tabulate("\n", nesting - 1) + nesting -= 1 + text += tabulate("var data = {}\n", nesting) + text += tabulate("\n", nesting) + text += field_text + for j in range(class_table.size()): + if class_table[j].parent_index == class_index: + var cl_text = generate_class(j, nesting) + text += cl_text + if class_table[j].type == Analysis.CLASS_TYPE.MESSAGE || class_table[j].type == Analysis.CLASS_TYPE.MAP: + text += generate_class_services(nesting + 1) + text += tabulate("\n", nesting + 1) + elif class_table[class_index].type == Analysis.CLASS_TYPE.ENUM: + text += tabulate("enum " + class_table[class_index].name + " {\n", nesting) + nesting += 1 + for en in range(class_table[class_index].values.size()): + var enum_val = class_table[class_index].values[en].name + " = " + class_table[class_index].values[en].value + if en == class_table[class_index].values.size() - 1: + text += tabulate(enum_val + "\n", nesting) + else: + text += tabulate(enum_val + ",\n", nesting) + nesting -= 1 + text += tabulate("}\n", nesting) + text += tabulate("\n", nesting) + + return text + + func generate_class_services(nesting : int) -> String: + var text : String = "" + text += tabulate("func to_string() -> String:\n", nesting) + nesting += 1 + text += tabulate("return PBPacker.message_to_string(data)\n", nesting) + text += tabulate("\n", nesting) + nesting -= 1 + text += tabulate("func to_bytes() -> PoolByteArray:\n", nesting) + nesting += 1 + text += tabulate("return PBPacker.pack_message(data)\n", nesting) + text += tabulate("\n", nesting) + nesting -= 1 + text += tabulate("func from_bytes(bytes : PoolByteArray, offset : int = 0, limit : int = -1) -> int:\n", nesting) + nesting += 1 + text += tabulate("var cur_limit = bytes.size()\n", nesting) + text += tabulate("if limit != -1:\n", nesting) + nesting += 1 + text += tabulate("cur_limit = limit\n", nesting) + nesting -= 1 + text += tabulate("var result = PBPacker.unpack_message(data, bytes, offset, cur_limit)\n", nesting) + text += tabulate("if result == cur_limit:\n", nesting) + nesting += 1 + text += tabulate("if PBPacker.check_required(data):\n", nesting) + nesting += 1 + text += tabulate("if limit == -1:\n", nesting) + nesting += 1 + text += tabulate("return PB_ERR.NO_ERRORS\n", nesting) + nesting -= 2 + text += tabulate("else:\n", nesting) + nesting += 1 + text += tabulate("return PB_ERR.REQUIRED_FIELDS\n", nesting) + nesting -= 2 + text += tabulate("elif limit == -1 && result > 0:\n", nesting) + nesting += 1 + text += tabulate("return PB_ERR.PARSE_INCOMPLETE\n", nesting) + nesting -= 1 + text += tabulate("return result\n", nesting) + return text + + func translate(file_name : String, core_file_name : String) -> bool: + var file : File = File.new() + if file.open(file_name, File.WRITE) < 0: + printerr("File: '", file_name, "' save error.") + return false + var core_file : File = File.new() + if !core_file.file_exists(core_file_name): + printerr("File: '", core_file_name, "' not found.") + return false + if core_file.open(core_file_name, File.READ) < 0: + printerr("File: '", core_file_name, "' read error.") + return false + var core_text : String = core_file.get_as_text() + core_file.close() + var text : String = "" + var nesting : int = 0 + text += "const PROTO_VERSION = " + String(proto_version) + "\n\n" + text += core_text + "\n\n\n" + text += "############### USER DATA BEGIN ################\n" + var cls_user : String = "" + for i in range(class_table.size()): + if class_table[i].parent_index == -1: + var cls_text = generate_class(i, nesting) + cls_user += cls_text + if class_table[i].type == Analysis.CLASS_TYPE.MESSAGE: + nesting += 1 + cls_user += generate_class_services(nesting) + cls_user += tabulate("\n", nesting) + nesting -= 1 + text += "\n\n" + text += cls_user + text += "################ USER DATA END #################\n" + file.store_string(text) + file.close() + if !file.file_exists(file_name): + printerr("File: '", file_name, "' save error.") + return false + return true + + +class ImportFile: + func _init(sha : String, a_path : String, a_parent : int): + sha256 = sha + path = a_path + parent_index = a_parent + + var sha256 : String + var path : String + var parent_index : int + +func parse_all(analyzes : Dictionary, imports : Array, path : String, full_name : String, parent_index : int) -> bool: + var file : File = File.new() + if !file.file_exists(full_name): + printerr(full_name, ": not found.") + return false + if file.open(full_name, File.READ) < 0: + printerr(full_name, ": read error.") + return false + var doc : Document = Document.new(full_name, file.get_as_text()) + var sha : String = file.get_sha256(full_name) + file.close() + if !analyzes.has(sha): + print(full_name, ": parsing.") + var analysis : Analysis = Analysis.new(path, doc) + var an_result : AnalyzeResult = analysis.analyze() + if an_result.state: + analyzes[sha] = an_result + var parent : int = imports.size() + imports.append(ImportFile.new(sha, doc.name, parent_index)) + for im in an_result.imports: + if !parse_all(analyzes, imports, path, im.path, parent): + return false + else: + printerr(doc.name + ": parsing error.") + return false + else: + print(full_name, ": retrieving data from cache.") + imports.append(ImportFile.new(sha, doc.name, parent_index)) + return true + +func union_analyses(a1 : AnalyzeResult, a2 : AnalyzeResult, only_classes : bool = true) -> void: + var class_offset : int = a1.classes.size() + var field_offset = a1.fields.size() + for cl in a2.classes: + var cur_class : Analysis.ASTClass = cl.copy() + if cur_class.parent_index != -1: + cur_class.parent_index += class_offset + a1.classes.append(cur_class) + if only_classes: + return + for fl in a2.fields: + var cur_field : Analysis.ASTField = fl.copy() + cur_field.parent_class_id += class_offset + cur_field.type_class_id = -1 + a1.fields.append(cur_field) + for gr in a2.groups: + var cur_group : Analysis.ASTFieldGroup = gr.copy() + cur_group.parent_class_id += class_offset + var indexes : Array = [] + for i in cur_group.field_indexes: + indexes.append(i + field_offset) + cur_group.field_indexes = indexes + a1.groups.append(cur_group) + +func union_imports(analyzes : Dictionary, key : String, result : AnalyzeResult, keys : Array, nesting : int, use_public : bool = true, only_classes : bool = true) -> void: + nesting += 1 + for im in analyzes[key].imports: + var find : bool = false + for k in keys: + if im.sha256 == k: + find = true + break + if find: + continue + if (!use_public) || (use_public && ((im.public && nesting > 1) || nesting < 2)): + keys.append(im.sha256) + union_analyses(result, analyzes[im.sha256], only_classes) + union_imports(analyzes, im.sha256, result, keys, nesting, use_public, only_classes) + +func semantic_all(analyzes : Dictionary, imports : Array)-> bool: + for k in analyzes.keys(): + print(analyzes[k].doc.name, ": analysis.") + var keys : Array = [] + var analyze : AnalyzeResult = analyzes[k].soft_copy() + keys.append(k) + analyze.classes = [] + for cl in analyzes[k].classes: + analyze.classes.append(cl.copy()) + union_imports(analyzes, k, analyze, keys, 0) + var semantic : Semantic = Semantic.new(analyze) + if !semantic.check(): + printerr(analyzes[k].doc.name, ": analysis error.") + return false + return true + +func translate_all(analyzes : Dictionary, file_name : String, core_file_name : String) -> bool: + var first_key : String = analyzes.keys()[0] + var analyze : AnalyzeResult = analyzes[first_key] + var keys : Array = [] + keys.append(first_key) + union_imports(analyzes, first_key, analyze, keys, 0, false, false) + print("Perform full semantic analysis.") + var semantic : Semantic = Semantic.new(analyze) + if !semantic.check(): + return false + print("Perform translation.") + var translator : Translator = Translator.new(analyze) + if !translator.translate(file_name, core_file_name): + return false + var first : bool = true + return true + +func work(path : String, in_file : String, out_file : String, core_file : String) -> bool: + var in_full_name : String = path + in_file + var imports : Array = [] + var analyzes : Dictionary = {} + + print("Compile source: '", in_full_name, "', output: '", out_file, "'.") + print("\n1. Parsing:") + if parse_all(analyzes, imports, path, in_full_name, -1): + print("* Parsing completed successfully. *") + else: + return false + print("\n2. Semantic analysis:") + if semantic_all(analyzes, imports): + print("* Semantic analysis completed successfully. *") + else: + return false + print("\n3. Output file creating:") + if translate_all(analyzes, out_file, core_file): + print("* Output file was created successfully. *") + else: + return false + return true + +func _ready(): + var path : String = "res://" + var in_file : String = "A.proto" + var out_file : String = "res://out.gd" + var core_file : String = "res://protobuf_core.gd" + work(path, in_file, out_file, core_file) diff --git a/addons/protobuf/plugin.cfg b/addons/protobuf/plugin.cfg new file mode 100644 index 00000000..44895ef1 --- /dev/null +++ b/addons/protobuf/plugin.cfg @@ -0,0 +1,7 @@ +[plugin] + +name="Godobuf" +description="Google Protobuf implementation for Godot/GDScript" +author="oniksan" +version="0.5.0 for Godot 3.4" +script="protobuf_ui.gd" diff --git a/addons/protobuf/protobuf_cmdln.gd b/addons/protobuf/protobuf_cmdln.gd new file mode 100644 index 00000000..3d66a625 --- /dev/null +++ b/addons/protobuf/protobuf_cmdln.gd @@ -0,0 +1,67 @@ +# +# BSD 3-Clause License +# +# Copyright (c) 2018, Oleg Malyavkin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# * Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +extends SceneTree + +var Parser = preload("res://addons/protobuf/parser.gd") +var Util = preload("res://addons/protobuf/protobuf_util.gd") + +func error(msg : String): + push_error(msg) + OS.exit_code = 1 + quit() + +func _init(): + var arguments = {} + for argument in OS.get_cmdline_args(): + if argument.find("=") > -1: + var key_value = argument.split("=") + arguments[key_value[0].lstrip("--")] = key_value[1] + + if !arguments.has("input") || !arguments.has("output"): + error("Expected 2 Parameters: input and output") + + var input_file_name = arguments["input"] + var output_file_name = arguments["output"] + + var file = File.new() + if file.open(input_file_name, File.READ) < 0: + error("File: '" + input_file_name + "' not found.") + + var parser = Parser.new() + + if parser.work(Util.extract_dir(input_file_name), Util.extract_filename(input_file_name), \ + output_file_name, "res://addons/protobuf/protobuf_core.gd"): + print("Compiled '", input_file_name, "' to '", output_file_name, "'.") + else: + error("Compilation failed.") + + quit() diff --git a/addons/protobuf/protobuf_core.gd b/addons/protobuf/protobuf_core.gd new file mode 100644 index 00000000..c038938c --- /dev/null +++ b/addons/protobuf/protobuf_core.gd @@ -0,0 +1,654 @@ +# +# BSD 3-Clause License +# +# Copyright (c) 2018 - 2022, Oleg Malyavkin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# * Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# DEBUG_TAB redefine this " " if you need, example: const DEBUG_TAB = "\t" +const DEBUG_TAB : String = " " + +enum PB_ERR { + NO_ERRORS = 0, + VARINT_NOT_FOUND = -1, + REPEATED_COUNT_NOT_FOUND = -2, + REPEATED_COUNT_MISMATCH = -3, + LENGTHDEL_SIZE_NOT_FOUND = -4, + LENGTHDEL_SIZE_MISMATCH = -5, + PACKAGE_SIZE_MISMATCH = -6, + UNDEFINED_STATE = -7, + PARSE_INCOMPLETE = -8, + REQUIRED_FIELDS = -9 +} + +enum PB_DATA_TYPE { + INT32 = 0, + SINT32 = 1, + UINT32 = 2, + INT64 = 3, + SINT64 = 4, + UINT64 = 5, + BOOL = 6, + ENUM = 7, + FIXED32 = 8, + SFIXED32 = 9, + FLOAT = 10, + FIXED64 = 11, + SFIXED64 = 12, + DOUBLE = 13, + STRING = 14, + BYTES = 15, + MESSAGE = 16, + MAP = 17 +} + +const DEFAULT_VALUES_2 = { + PB_DATA_TYPE.INT32: null, + PB_DATA_TYPE.SINT32: null, + PB_DATA_TYPE.UINT32: null, + PB_DATA_TYPE.INT64: null, + PB_DATA_TYPE.SINT64: null, + PB_DATA_TYPE.UINT64: null, + PB_DATA_TYPE.BOOL: null, + PB_DATA_TYPE.ENUM: null, + PB_DATA_TYPE.FIXED32: null, + PB_DATA_TYPE.SFIXED32: null, + PB_DATA_TYPE.FLOAT: null, + PB_DATA_TYPE.FIXED64: null, + PB_DATA_TYPE.SFIXED64: null, + PB_DATA_TYPE.DOUBLE: null, + PB_DATA_TYPE.STRING: null, + PB_DATA_TYPE.BYTES: null, + PB_DATA_TYPE.MESSAGE: null, + PB_DATA_TYPE.MAP: null +} + +const DEFAULT_VALUES_3 = { + PB_DATA_TYPE.INT32: 0, + PB_DATA_TYPE.SINT32: 0, + PB_DATA_TYPE.UINT32: 0, + PB_DATA_TYPE.INT64: 0, + PB_DATA_TYPE.SINT64: 0, + PB_DATA_TYPE.UINT64: 0, + PB_DATA_TYPE.BOOL: false, + PB_DATA_TYPE.ENUM: 0, + PB_DATA_TYPE.FIXED32: 0, + PB_DATA_TYPE.SFIXED32: 0, + PB_DATA_TYPE.FLOAT: 0.0, + PB_DATA_TYPE.FIXED64: 0, + PB_DATA_TYPE.SFIXED64: 0, + PB_DATA_TYPE.DOUBLE: 0.0, + PB_DATA_TYPE.STRING: "", + PB_DATA_TYPE.BYTES: [], + PB_DATA_TYPE.MESSAGE: null, + PB_DATA_TYPE.MAP: [] +} + +enum PB_TYPE { + VARINT = 0, + FIX64 = 1, + LENGTHDEL = 2, + STARTGROUP = 3, + ENDGROUP = 4, + FIX32 = 5, + UNDEFINED = 8 +} + +enum PB_RULE { + OPTIONAL = 0, + REQUIRED = 1, + REPEATED = 2, + RESERVED = 3 +} + +enum PB_SERVICE_STATE { + FILLED = 0, + UNFILLED = 1 +} + +class PBField: + func _init(a_name : String, a_type : int, a_rule : int, a_tag : int, packed : bool, a_value = null): + name = a_name + type = a_type + rule = a_rule + tag = a_tag + option_packed = packed + value = a_value + + var name : String + var type : int + var rule : int + var tag : int + var option_packed : bool + var value + var is_map_field : bool = false + var option_default : bool = false + +class PBTypeTag: + var ok : bool = false + var type : int + var tag : int + var offset : int + +class PBServiceField: + var field : PBField + var func_ref = null + var state : int = PB_SERVICE_STATE.UNFILLED + +class PBPacker: + static func convert_signed(n : int) -> int: + if n < -2147483648: + return (n << 1) ^ (n >> 63) + else: + return (n << 1) ^ (n >> 31) + + static func deconvert_signed(n : int) -> int: + if n & 0x01: + return ~(n >> 1) + else: + return (n >> 1) + + static func pack_varint(value) -> PoolByteArray: + var varint : PoolByteArray = PoolByteArray() + if typeof(value) == TYPE_BOOL: + if value: + value = 1 + else: + value = 0 + for _i in range(9): + var b = value & 0x7F + value >>= 7 + if value: + varint.append(b | 0x80) + else: + varint.append(b) + break + if varint.size() == 9 && varint[8] == 0xFF: + varint.append(0x01) + return varint + + static func pack_bytes(value, count : int, data_type : int) -> PoolByteArray: + var bytes : PoolByteArray = PoolByteArray() + if data_type == PB_DATA_TYPE.FLOAT: + var spb : StreamPeerBuffer = StreamPeerBuffer.new() + spb.put_float(value) + bytes = spb.get_data_array() + elif data_type == PB_DATA_TYPE.DOUBLE: + var spb : StreamPeerBuffer = StreamPeerBuffer.new() + spb.put_double(value) + bytes = spb.get_data_array() + else: + for _i in range(count): + bytes.append(value & 0xFF) + value >>= 8 + return bytes + + static func unpack_bytes(bytes : PoolByteArray, index : int, count : int, data_type : int): + var value = 0 + if data_type == PB_DATA_TYPE.FLOAT: + var spb : StreamPeerBuffer = StreamPeerBuffer.new() + for i in range(index, count + index): + spb.put_u8(bytes[i]) + spb.seek(0) + value = spb.get_float() + elif data_type == PB_DATA_TYPE.DOUBLE: + var spb : StreamPeerBuffer = StreamPeerBuffer.new() + for i in range(index, count + index): + spb.put_u8(bytes[i]) + spb.seek(0) + value = spb.get_double() + else: + for i in range(index + count - 1, index - 1, -1): + value |= (bytes[i] & 0xFF) + if i != index: + value <<= 8 + return value + + static func unpack_varint(varint_bytes) -> int: + var value : int = 0 + for i in range(varint_bytes.size() - 1, -1, -1): + value |= varint_bytes[i] & 0x7F + if i != 0: + value <<= 7 + return value + + static func pack_type_tag(type : int, tag : int) -> PoolByteArray: + return pack_varint((tag << 3) | type) + + static func isolate_varint(bytes : PoolByteArray, index : int) -> PoolByteArray: + var result : PoolByteArray = PoolByteArray() + for i in range(index, bytes.size()): + result.append(bytes[i]) + if !(bytes[i] & 0x80): + break + return result + + static func unpack_type_tag(bytes : PoolByteArray, index : int) -> PBTypeTag: + var varint_bytes : PoolByteArray = isolate_varint(bytes, index) + var result : PBTypeTag = PBTypeTag.new() + if varint_bytes.size() != 0: + result.ok = true + result.offset = varint_bytes.size() + var unpacked : int = unpack_varint(varint_bytes) + result.type = unpacked & 0x07 + result.tag = unpacked >> 3 + return result + + static func pack_length_delimeted(type : int, tag : int, bytes : PoolByteArray) -> PoolByteArray: + var result : PoolByteArray = pack_type_tag(type, tag) + result.append_array(pack_varint(bytes.size())) + result.append_array(bytes) + return result + + static func pb_type_from_data_type(data_type : int) -> int: + if data_type == PB_DATA_TYPE.INT32 || data_type == PB_DATA_TYPE.SINT32 || data_type == PB_DATA_TYPE.UINT32 || data_type == PB_DATA_TYPE.INT64 || data_type == PB_DATA_TYPE.SINT64 || data_type == PB_DATA_TYPE.UINT64 || data_type == PB_DATA_TYPE.BOOL || data_type == PB_DATA_TYPE.ENUM: + return PB_TYPE.VARINT + elif data_type == PB_DATA_TYPE.FIXED32 || data_type == PB_DATA_TYPE.SFIXED32 || data_type == PB_DATA_TYPE.FLOAT: + return PB_TYPE.FIX32 + elif data_type == PB_DATA_TYPE.FIXED64 || data_type == PB_DATA_TYPE.SFIXED64 || data_type == PB_DATA_TYPE.DOUBLE: + return PB_TYPE.FIX64 + elif data_type == PB_DATA_TYPE.STRING || data_type == PB_DATA_TYPE.BYTES || data_type == PB_DATA_TYPE.MESSAGE || data_type == PB_DATA_TYPE.MAP: + return PB_TYPE.LENGTHDEL + else: + return PB_TYPE.UNDEFINED + + static func pack_field(field : PBField) -> PoolByteArray: + var type : int = pb_type_from_data_type(field.type) + var type_copy : int = type + if field.rule == PB_RULE.REPEATED && field.option_packed: + type = PB_TYPE.LENGTHDEL + var head : PoolByteArray = pack_type_tag(type, field.tag) + var data : PoolByteArray = PoolByteArray() + if type == PB_TYPE.VARINT: + var value + if field.rule == PB_RULE.REPEATED: + for v in field.value: + data.append_array(head) + if field.type == PB_DATA_TYPE.SINT32 || field.type == PB_DATA_TYPE.SINT64: + value = convert_signed(v) + else: + value = v + data.append_array(pack_varint(value)) + return data + else: + if field.type == PB_DATA_TYPE.SINT32 || field.type == PB_DATA_TYPE.SINT64: + value = convert_signed(field.value) + else: + value = field.value + data = pack_varint(value) + elif type == PB_TYPE.FIX32: + if field.rule == PB_RULE.REPEATED: + for v in field.value: + data.append_array(head) + data.append_array(pack_bytes(v, 4, field.type)) + return data + else: + data.append_array(pack_bytes(field.value, 4, field.type)) + elif type == PB_TYPE.FIX64: + if field.rule == PB_RULE.REPEATED: + for v in field.value: + data.append_array(head) + data.append_array(pack_bytes(v, 8, field.type)) + return data + else: + data.append_array(pack_bytes(field.value, 8, field.type)) + elif type == PB_TYPE.LENGTHDEL: + if field.rule == PB_RULE.REPEATED: + if type_copy == PB_TYPE.VARINT: + if field.type == PB_DATA_TYPE.SINT32 || field.type == PB_DATA_TYPE.SINT64: + var signed_value : int + for v in field.value: + signed_value = convert_signed(v) + data.append_array(pack_varint(signed_value)) + else: + for v in field.value: + data.append_array(pack_varint(v)) + return pack_length_delimeted(type, field.tag, data) + elif type_copy == PB_TYPE.FIX32: + for v in field.value: + data.append_array(pack_bytes(v, 4, field.type)) + return pack_length_delimeted(type, field.tag, data) + elif type_copy == PB_TYPE.FIX64: + for v in field.value: + data.append_array(pack_bytes(v, 8, field.type)) + return pack_length_delimeted(type, field.tag, data) + elif field.type == PB_DATA_TYPE.STRING: + for v in field.value: + var obj = v.to_utf8() + data.append_array(pack_length_delimeted(type, field.tag, obj)) + return data + elif field.type == PB_DATA_TYPE.BYTES: + for v in field.value: + data.append_array(pack_length_delimeted(type, field.tag, v)) + return data + elif typeof(field.value[0]) == TYPE_OBJECT: + for v in field.value: + var obj : PoolByteArray = v.to_bytes() + data.append_array(pack_length_delimeted(type, field.tag, obj)) + return data + else: + if field.type == PB_DATA_TYPE.STRING: + var str_bytes : PoolByteArray = field.value.to_utf8() + if PROTO_VERSION == 2 || (PROTO_VERSION == 3 && str_bytes.size() > 0): + data.append_array(str_bytes) + return pack_length_delimeted(type, field.tag, data) + if field.type == PB_DATA_TYPE.BYTES: + if PROTO_VERSION == 2 || (PROTO_VERSION == 3 && field.value.size() > 0): + data.append_array(field.value) + return pack_length_delimeted(type, field.tag, data) + elif typeof(field.value) == TYPE_OBJECT: + var obj : PoolByteArray = field.value.to_bytes() + if obj.size() > 0: + data.append_array(obj) + return pack_length_delimeted(type, field.tag, data) + else: + pass + if data.size() > 0: + head.append_array(data) + return head + else: + return data + + static func unpack_field(bytes : PoolByteArray, offset : int, field : PBField, type : int, message_func_ref) -> int: + if field.rule == PB_RULE.REPEATED && type != PB_TYPE.LENGTHDEL && field.option_packed: + var count = isolate_varint(bytes, offset) + if count.size() > 0: + offset += count.size() + count = unpack_varint(count) + if type == PB_TYPE.VARINT: + var val + var counter = offset + count + while offset < counter: + val = isolate_varint(bytes, offset) + if val.size() > 0: + offset += val.size() + val = unpack_varint(val) + if field.type == PB_DATA_TYPE.SINT32 || field.type == PB_DATA_TYPE.SINT64: + val = deconvert_signed(val) + elif field.type == PB_DATA_TYPE.BOOL: + if val: + val = true + else: + val = false + field.value.append(val) + else: + return PB_ERR.REPEATED_COUNT_MISMATCH + return offset + elif type == PB_TYPE.FIX32 || type == PB_TYPE.FIX64: + var type_size + if type == PB_TYPE.FIX32: + type_size = 4 + else: + type_size = 8 + var val + var counter = offset + count + while offset < counter: + if (offset + type_size) > bytes.size(): + return PB_ERR.REPEATED_COUNT_MISMATCH + val = unpack_bytes(bytes, offset, type_size, field.type) + offset += type_size + field.value.append(val) + return offset + else: + return PB_ERR.REPEATED_COUNT_NOT_FOUND + else: + if type == PB_TYPE.VARINT: + var val = isolate_varint(bytes, offset) + if val.size() > 0: + offset += val.size() + val = unpack_varint(val) + if field.type == PB_DATA_TYPE.SINT32 || field.type == PB_DATA_TYPE.SINT64: + val = deconvert_signed(val) + elif field.type == PB_DATA_TYPE.BOOL: + if val: + val = true + else: + val = false + if field.rule == PB_RULE.REPEATED: + field.value.append(val) + else: + field.value = val + else: + return PB_ERR.VARINT_NOT_FOUND + return offset + elif type == PB_TYPE.FIX32 || type == PB_TYPE.FIX64: + var type_size + if type == PB_TYPE.FIX32: + type_size = 4 + else: + type_size = 8 + var val + if (offset + type_size) > bytes.size(): + return PB_ERR.REPEATED_COUNT_MISMATCH + val = unpack_bytes(bytes, offset, type_size, field.type) + offset += type_size + if field.rule == PB_RULE.REPEATED: + field.value.append(val) + else: + field.value = val + return offset + elif type == PB_TYPE.LENGTHDEL: + var inner_size = isolate_varint(bytes, offset) + if inner_size.size() > 0: + offset += inner_size.size() + inner_size = unpack_varint(inner_size) + if inner_size >= 0: + if inner_size + offset > bytes.size(): + return PB_ERR.LENGTHDEL_SIZE_MISMATCH + if message_func_ref != null: + var message = message_func_ref.call_func() + if inner_size > 0: + var sub_offset = message.from_bytes(bytes, offset, inner_size + offset) + if sub_offset > 0: + if sub_offset - offset >= inner_size: + offset = sub_offset + return offset + else: + return PB_ERR.LENGTHDEL_SIZE_MISMATCH + return sub_offset + else: + return offset + elif field.type == PB_DATA_TYPE.STRING: + var str_bytes : PoolByteArray = PoolByteArray() + for i in range(offset, inner_size + offset): + str_bytes.append(bytes[i]) + if field.rule == PB_RULE.REPEATED: + field.value.append(str_bytes.get_string_from_utf8()) + else: + field.value = str_bytes.get_string_from_utf8() + return offset + inner_size + elif field.type == PB_DATA_TYPE.BYTES: + var val_bytes : PoolByteArray = PoolByteArray() + for i in range(offset, inner_size + offset): + val_bytes.append(bytes[i]) + if field.rule == PB_RULE.REPEATED: + field.value.append(val_bytes) + else: + field.value = val_bytes + return offset + inner_size + else: + return PB_ERR.LENGTHDEL_SIZE_NOT_FOUND + else: + return PB_ERR.LENGTHDEL_SIZE_NOT_FOUND + return PB_ERR.UNDEFINED_STATE + + static func unpack_message(data, bytes : PoolByteArray, offset : int, limit : int) -> int: + while true: + var tt : PBTypeTag = unpack_type_tag(bytes, offset) + if tt.ok: + offset += tt.offset + if data.has(tt.tag): + var service : PBServiceField = data[tt.tag] + var type : int = pb_type_from_data_type(service.field.type) + if type == tt.type || (tt.type == PB_TYPE.LENGTHDEL && service.field.rule == PB_RULE.REPEATED && service.field.option_packed): + var res : int = unpack_field(bytes, offset, service.field, type, service.func_ref) + if res > 0: + service.state = PB_SERVICE_STATE.FILLED + offset = res + if offset == limit: + return offset + elif offset > limit: + return PB_ERR.PACKAGE_SIZE_MISMATCH + elif res < 0: + return res + else: + break + else: + return offset + return PB_ERR.UNDEFINED_STATE + + static func pack_message(data) -> PoolByteArray: + var DEFAULT_VALUES + if PROTO_VERSION == 2: + DEFAULT_VALUES = DEFAULT_VALUES_2 + elif PROTO_VERSION == 3: + DEFAULT_VALUES = DEFAULT_VALUES_3 + var result : PoolByteArray = PoolByteArray() + var keys : Array = data.keys() + keys.sort() + for i in keys: + if data[i].field.value != null: + if data[i].state == PB_SERVICE_STATE.UNFILLED \ + && !data[i].field.is_map_field \ + && typeof(data[i].field.value) == typeof(DEFAULT_VALUES[data[i].field.type]) \ + && data[i].field.value == DEFAULT_VALUES[data[i].field.type]: + continue + elif data[i].field.rule == PB_RULE.REPEATED && data[i].field.value.size() == 0: + continue + result.append_array(pack_field(data[i].field)) + elif data[i].field.rule == PB_RULE.REQUIRED: + print("Error: required field is not filled: Tag:", data[i].field.tag) + return PoolByteArray() + return result + + static func check_required(data) -> bool: + var keys : Array = data.keys() + for i in keys: + if data[i].field.rule == PB_RULE.REQUIRED && data[i].state == PB_SERVICE_STATE.UNFILLED: + return false + return true + + static func construct_map(key_values): + var result = {} + for kv in key_values: + result[kv.get_key()] = kv.get_value() + return result + + static func tabulate(text : String, nesting : int) -> String: + var tab : String = "" + for _i in range(nesting): + tab += DEBUG_TAB + return tab + text + + static func value_to_string(value, field : PBField, nesting : int) -> String: + var result : String = "" + var text : String + if field.type == PB_DATA_TYPE.MESSAGE: + result += "{" + nesting += 1 + text = message_to_string(value.data, nesting) + if text != "": + result += "\n" + text + nesting -= 1 + result += tabulate("}", nesting) + else: + nesting -= 1 + result += "}" + elif field.type == PB_DATA_TYPE.BYTES: + result += "<" + for i in range(value.size()): + result += String(value[i]) + if i != (value.size() - 1): + result += ", " + result += ">" + elif field.type == PB_DATA_TYPE.STRING: + result += "\"" + value + "\"" + elif field.type == PB_DATA_TYPE.ENUM: + result += "ENUM::" + String(value) + else: + result += String(value) + return result + + static func field_to_string(field : PBField, nesting : int) -> String: + var result : String = tabulate(field.name + ": ", nesting) + if field.type == PB_DATA_TYPE.MAP: + if field.value.size() > 0: + result += "(\n" + nesting += 1 + for i in range(field.value.size()): + var local_key_value = field.value[i].data[1].field + result += tabulate(value_to_string(local_key_value.value, local_key_value, nesting), nesting) + ": " + local_key_value = field.value[i].data[2].field + result += value_to_string(local_key_value.value, local_key_value, nesting) + if i != (field.value.size() - 1): + result += "," + result += "\n" + nesting -= 1 + result += tabulate(")", nesting) + else: + result += "()" + elif field.rule == PB_RULE.REPEATED: + if field.value.size() > 0: + result += "[\n" + nesting += 1 + for i in range(field.value.size()): + result += tabulate(String(i) + ": ", nesting) + result += value_to_string(field.value[i], field, nesting) + if i != (field.value.size() - 1): + result += "," + result += "\n" + nesting -= 1 + result += tabulate("]", nesting) + else: + result += "[]" + else: + result += value_to_string(field.value, field, nesting) + result += ";\n" + return result + + static func message_to_string(data, nesting : int = 0) -> String: + var DEFAULT_VALUES + if PROTO_VERSION == 2: + DEFAULT_VALUES = DEFAULT_VALUES_2 + elif PROTO_VERSION == 3: + DEFAULT_VALUES = DEFAULT_VALUES_3 + var result : String = "" + var keys : Array = data.keys() + keys.sort() + for i in keys: + if data[i].field.value != null: + if data[i].state == PB_SERVICE_STATE.UNFILLED \ + && !data[i].field.is_map_field \ + && typeof(data[i].field.value) == typeof(DEFAULT_VALUES[data[i].field.type]) \ + && data[i].field.value == DEFAULT_VALUES[data[i].field.type]: + continue + elif data[i].field.rule == PB_RULE.REPEATED && data[i].field.value.size() == 0: + continue + result += field_to_string(data[i].field, nesting) + elif data[i].field.rule == PB_RULE.REQUIRED: + result += data[i].field.name + ": " + "error" + return result diff --git a/addons/protobuf/protobuf_ui.gd b/addons/protobuf/protobuf_ui.gd new file mode 100644 index 00000000..f241ec61 --- /dev/null +++ b/addons/protobuf/protobuf_ui.gd @@ -0,0 +1,50 @@ +# +# BSD 3-Clause License +# +# Copyright (c) 2018, Oleg Malyavkin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# * Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +tool +extends EditorPlugin + +var dock + +func _enter_tree(): + # Initialization of the plugin goes here + # First load the dock scene and instance it: + dock = preload("res://addons/protobuf/protobuf_ui_dock.tscn").instance() + + # Add the loaded scene to the docks: + add_control_to_dock(DOCK_SLOT_LEFT_BR, dock) + # Note that LEFT_UL means the left of the editor, upper-left dock + +func _exit_tree(): + # Clean-up of the plugin goes here + # Remove the scene from the docks: + remove_control_from_docks( dock ) # Remove the dock + dock.free() # Erase the control from the memory diff --git a/addons/protobuf/protobuf_ui_dock.gd b/addons/protobuf/protobuf_ui_dock.gd new file mode 100644 index 00000000..7ba2b4fd --- /dev/null +++ b/addons/protobuf/protobuf_ui_dock.gd @@ -0,0 +1,131 @@ +# +# BSD 3-Clause License +# +# Copyright (c) 2018 - 2022, Oleg Malyavkin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# * Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +tool +extends VBoxContainer + +var Parser = preload("res://addons/protobuf/parser.gd") +var Util = preload("res://addons/protobuf/protobuf_util.gd") + +var input_file_name = null +var output_file_name = null + +func _ready(): + var screen_size = OS.get_screen_size() + pass + +func _on_InputFileButton_pressed(): + show_dialog($InputFileDialog) + $InputFileDialog.invalidate() + +func _on_OutputFileButton_pressed(): + show_dialog($OutputFileDialog) + $OutputFileDialog.invalidate() + +func _on_InputFileDialog_file_selected(path): + input_file_name = path + $HBoxContainer/InputFileEdit.text = path + +func _on_OutputFileDialog_file_selected(path): + output_file_name = path + $HBoxContainer2/OutputFileEdit.text = path + +func show_dialog(dialog): + var posX + var posY + if get_viewport().size.x <= dialog.get_rect().size.x: + posX = 0 + else: + posX = (get_viewport().size.x - dialog.get_rect().size.x) / 2 + if get_viewport().size.y <= dialog.get_rect().size.y: + posY = 0 + else: + posY = (get_viewport().size.y - dialog.get_rect().size.y) / 2 + dialog.set_position(Vector2(posX, posY)) + dialog.show_modal(true) + +func _on_CompileButton_pressed(): + if input_file_name == null || output_file_name == null: + show_dialog($FilesErrorAcceptDialog) + return + + var file = File.new() + if file.open(input_file_name, File.READ) < 0: + print("File: '", input_file_name, "' not found.") + show_dialog($FailAcceptDialog) + return + + var parser = Parser.new() + + if parser.work(Util.extract_dir(input_file_name), Util.extract_filename(input_file_name), \ + output_file_name, "res://addons/protobuf/protobuf_core.gd"): + show_dialog($SuccessAcceptDialog) + else: + show_dialog($FailAcceptDialog) + + return + +func execute_unit_tests(source_name, script_name, compiled_script_name): + + var test_path = "res://addons/protobuf/test/" + var test_file = File.new() + var input_file_path = test_path + "source/" + source_name + var output_dir_path = test_path + "temp" + var output_file_path = output_dir_path + "/" + compiled_script_name + + var output_dir = Directory.new(); + output_dir.make_dir(output_dir_path) + + if test_file.open(input_file_path, File.READ) < 0: + print("File: '", input_file_path, "' not found.") + show_dialog($FailAcceptDialog) + return + + var parser = Parser.new() + + if parser.work("", input_file_path, output_file_path, "res://addons/protobuf/protobuf_core.gd"): + var test_script = load(test_path + "script/" + script_name).new(test_path, output_file_path) + if test_script.exec_all(false): + show_dialog($SuccessTestDialog) + else: + show_dialog($FailTestDialog) + else: + show_dialog($FailAcceptDialog) + + test_file.close() + + return + +func _on_TestButton2_pressed() : + execute_unit_tests("pbtest2.proto", "unit_tests_proto2.gd", "proto2.gd") + +func _on_TestButton3_pressed() : + execute_unit_tests("pbtest3.proto", "unit_tests_proto3.gd", "proto3.gd") diff --git a/addons/protobuf/protobuf_ui_dock.tscn b/addons/protobuf/protobuf_ui_dock.tscn new file mode 100644 index 00000000..f5cb1ee2 --- /dev/null +++ b/addons/protobuf/protobuf_ui_dock.tscn @@ -0,0 +1,176 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://addons/protobuf/protobuf_ui_dock.gd" type="Script" id=1] + +[node name="Godobuf" type="VBoxContainer"] +anchor_right = 1.0 +anchor_bottom = 1.0 +margin_right = -731.0 +margin_bottom = -374.0 +size_flags_horizontal = 0 +script = ExtResource( 1 ) + +[node name="InputFileLabel" type="Label" parent="."] +margin_right = 293.0 +margin_bottom = 14.0 +text = "Input protobuf file:" + +[node name="HBoxContainer" type="HBoxContainer" parent="."] +margin_top = 18.0 +margin_right = 293.0 +margin_bottom = 42.0 + +[node name="InputFileEdit" type="LineEdit" parent="HBoxContainer"] +margin_right = 150.0 +margin_bottom = 24.0 +rect_min_size = Vector2( 150, 0 ) +editable = false + +[node name="InputFileButton" type="Button" parent="HBoxContainer"] +margin_left = 154.0 +margin_right = 178.0 +margin_bottom = 24.0 +text = "..." + +[node name="OutputFileButton" type="Label" parent="."] +margin_top = 46.0 +margin_right = 293.0 +margin_bottom = 60.0 +text = "Output GDScript file:" + +[node name="HBoxContainer2" type="HBoxContainer" parent="."] +margin_top = 64.0 +margin_right = 293.0 +margin_bottom = 88.0 + +[node name="OutputFileEdit" type="LineEdit" parent="HBoxContainer2"] +margin_right = 150.0 +margin_bottom = 24.0 +rect_min_size = Vector2( 150, 0 ) +editable = false + +[node name="OutputFileButton" type="Button" parent="HBoxContainer2"] +margin_left = 154.0 +margin_right = 178.0 +margin_bottom = 24.0 +text = "..." + +[node name="Control" type="Control" parent="."] +margin_top = 92.0 +margin_right = 293.0 +margin_bottom = 92.0 + +[node name="CompileButton" type="Button" parent="Control"] +margin_top = 15.0 +margin_right = 178.0 +margin_bottom = 35.0 +text = "Compile" +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="TestButton2" type="Button" parent="Control"] +margin_top = 81.0 +margin_right = 178.0 +margin_bottom = 101.0 +text = "Run unit tests (proto 2)" + +[node name="TestButton3" type="Button" parent="Control"] +margin_top = 109.0 +margin_right = 178.0 +margin_bottom = 129.0 +text = "Run unit tests (proto 3)" +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="InputFileDialog" type="FileDialog" parent="."] +margin_left = 200.0 +margin_top = 200.0 +margin_right = 700.0 +margin_bottom = 500.0 +popup_exclusive = true +window_title = "Открыть файл" +resizable = true +mode = 0 +access = 2 +filters = PoolStringArray( "*.proto; Google Protobuf File" ) +current_dir = "/Projects/godot/godobuf" +current_path = "/Projects/godot/godobuf/" + +[node name="InputFileDialog2" type="FileDialog" parent="."] +margin_left = 200.0 +margin_top = 200.0 +margin_right = 700.0 +margin_bottom = 500.0 +popup_exclusive = true +window_title = "Открыть файл" +resizable = true +mode = 0 +access = 2 +filters = PoolStringArray( "*.proto; Google Protobuf File" ) +current_dir = "/Projects/godot/godobuf" +current_path = "/Projects/godot/godobuf/" + +[node name="OutputFileDialog" type="FileDialog" parent="."] +margin_left = 200.0 +margin_top = 200.0 +margin_right = 700.0 +margin_bottom = 500.0 +popup_exclusive = true +window_title = "Save file" +resizable = true +access = 2 +filters = PoolStringArray( "*.gd; GDScript" ) +current_dir = "/Projects/godot/godobuf" +current_path = "/Projects/godot/godobuf/" + +[node name="FilesErrorAcceptDialog" type="AcceptDialog" parent="."] +margin_right = 83.0 +margin_bottom = 58.0 +popup_exclusive = true +window_title = "Error" +dialog_text = "Need select both output & input files!" + +[node name="SuccessAcceptDialog" type="AcceptDialog" parent="."] +margin_top = 96.0 +margin_right = 293.0 +margin_bottom = 154.0 +popup_exclusive = true +window_title = "Success" +dialog_text = "Compile success done." + +[node name="FailAcceptDialog" type="AcceptDialog" parent="."] +margin_top = 96.0 +margin_right = 293.0 +margin_bottom = 154.0 +popup_exclusive = true +window_title = "Error" +dialog_text = "Compile fail. See details in console output." + +[node name="SuccessTestDialog" type="AcceptDialog" parent="."] +margin_top = 96.0 +margin_right = 293.0 +margin_bottom = 171.0 +popup_exclusive = true +window_title = "Tests completed" +dialog_text = "All tests were completed successfully. +See console for details." + +[node name="FailTestDialog" type="AcceptDialog" parent="."] +margin_top = 96.0 +margin_right = 293.0 +margin_bottom = 171.0 +popup_exclusive = true +window_title = "Error" +dialog_text = "Errors occurred while running tests! +See console for details." + +[connection signal="pressed" from="HBoxContainer/InputFileButton" to="." method="_on_InputFileButton_pressed"] +[connection signal="pressed" from="HBoxContainer2/OutputFileButton" to="." method="_on_OutputFileButton_pressed"] +[connection signal="pressed" from="Control/CompileButton" to="." method="_on_CompileButton_pressed"] +[connection signal="pressed" from="Control/TestButton2" to="." method="_on_TestButton2_pressed"] +[connection signal="pressed" from="Control/TestButton3" to="." method="_on_TestButton3_pressed"] +[connection signal="file_selected" from="InputFileDialog" to="." method="_on_InputFileDialog_file_selected"] +[connection signal="file_selected" from="InputFileDialog2" to="." method="_on_InputFileDialog_file_selected"] +[connection signal="file_selected" from="OutputFileDialog" to="." method="_on_OutputFileDialog_file_selected"] diff --git a/addons/protobuf/protobuf_util.gd b/addons/protobuf/protobuf_util.gd new file mode 100644 index 00000000..4b5830da --- /dev/null +++ b/addons/protobuf/protobuf_util.gd @@ -0,0 +1,46 @@ +# +# BSD 3-Clause License +# +# Copyright (c) 2018, Oleg Malyavkin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# * Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +static func extract_dir(file_path): + var parts = file_path.split("/", false) + parts.remove(parts.size() - 1) + var path + if file_path.begins_with("/"): + path = "/" + else: + path = "" + for part in parts: + path += part + "/" + return path + +static func extract_filename(file_path): + var parts = file_path.split("/", false) + return parts[parts.size() - 1] diff --git a/addons/protobuf/test/expected_bin/proto2/f_bool.v2ref b/addons/protobuf/test/expected_bin/proto2/f_bool.v2ref new file mode 100644 index 0000000000000000000000000000000000000000..41c879eed25b083137e3e053a5d6131d90a4f0e3 GIT binary patch literal 2 Jcmc~`0002e0BHaK literal 0 HcmV?d00001 diff --git a/addons/protobuf/test/expected_bin/proto2/f_bytes.v2ref b/addons/protobuf/test/expected_bin/proto2/f_bytes.v2ref new file mode 100644 index 00000000..3b7fdd65 --- /dev/null +++ b/addons/protobuf/test/expected_bin/proto2/f_bytes.v2ref @@ -0,0 +1 @@ +z \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto2/f_bytes_default.v2ref b/addons/protobuf/test/expected_bin/proto2/f_bytes_default.v2ref new file mode 100644 index 0000000000000000000000000000000000000000..f71ac66a63ac339d7af6ffdfa9d67f1fdb33791c GIT binary patch literal 2 Jcmbia6Q?_0RS;c1myq# literal 0 HcmV?d00001 diff --git a/addons/protobuf/test/expected_bin/proto2/rf_double_empty.v2ref b/addons/protobuf/test/expected_bin/proto2/rf_double_empty.v2ref new file mode 100644 index 00000000..e69de29b diff --git a/addons/protobuf/test/expected_bin/proto2/rf_empty_inner.v2ref b/addons/protobuf/test/expected_bin/proto2/rf_empty_inner.v2ref new file mode 100644 index 0000000000000000000000000000000000000000..4e34545a48775e87126fda093d1ee722c35f78cb GIT binary patch literal 9 McmX@a#Bd0V01e9mO#lD@ literal 0 HcmV?d00001 diff --git a/addons/protobuf/test/expected_bin/proto2/rf_empty_out.v2ref b/addons/protobuf/test/expected_bin/proto2/rf_empty_out.v2ref new file mode 100644 index 0000000000000000000000000000000000000000..0e641b38df8b9a0763091757c358efde9838ad79 GIT binary patch literal 9 McmdnQ#IOmB01T@F9RL6T literal 0 HcmV?d00001 diff --git a/addons/protobuf/test/expected_bin/proto2/rf_enum_inner.v2ref b/addons/protobuf/test/expected_bin/proto2/rf_enum_inner.v2ref new file mode 100644 index 00000000..6e8f4348 --- /dev/null +++ b/addons/protobuf/test/expected_bin/proto2/rf_enum_inner.v2ref @@ -0,0 +1 @@ +ÈÈÈ \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto2/rf_enum_out.v2ref b/addons/protobuf/test/expected_bin/proto2/rf_enum_out.v2ref new file mode 100644 index 00000000..efa07d65 --- /dev/null +++ b/addons/protobuf/test/expected_bin/proto2/rf_enum_out.v2ref @@ -0,0 +1 @@ +¸¸¸ \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto2/rf_fixed32.v2ref b/addons/protobuf/test/expected_bin/proto2/rf_fixed32.v2ref new file mode 100644 index 0000000000000000000000000000000000000000..a8d2f91c3847c344e6e3847b31f2267f68f0963c GIT binary patch literal 12 Tcmey%c!`C9;V+|}7y|xX%{mC02HnQf&c&j literal 0 HcmV?d00001 diff --git a/addons/protobuf/test/expected_bin/proto2/rf_inner_nen.v2ref b/addons/protobuf/test/expected_bin/proto2/rf_inner_nen.v2ref new file mode 100644 index 0000000000000000000000000000000000000000..94bb8b0e34a1c80289004ce892bd2103d15ef36c GIT binary patch literal 17 UcmdnR%)-GVptOsbVHbo203A94%m4rY literal 0 HcmV?d00001 diff --git a/addons/protobuf/test/expected_bin/proto2/rf_int32.v2ref b/addons/protobuf/test/expected_bin/proto2/rf_int32.v2ref new file mode 100644 index 00000000..b0652c8f --- /dev/null +++ b/addons/protobuf/test/expected_bin/proto2/rf_int32.v2ref @@ -0,0 +1 @@ +ÈÒ È®, \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto2/rf_int32_empty.v2ref b/addons/protobuf/test/expected_bin/proto2/rf_int32_empty.v2ref new file mode 100644 index 00000000..e69de29b diff --git a/addons/protobuf/test/expected_bin/proto2/rf_int32_with_clear.v2ref b/addons/protobuf/test/expected_bin/proto2/rf_int32_with_clear.v2ref new file mode 100644 index 00000000..b0652c8f --- /dev/null +++ b/addons/protobuf/test/expected_bin/proto2/rf_int32_with_clear.v2ref @@ -0,0 +1 @@ +ÈÒ È®, \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto2/rf_int64.v2ref b/addons/protobuf/test/expected_bin/proto2/rf_int64.v2ref new file mode 100644 index 00000000..618a6f08 --- /dev/null +++ b/addons/protobuf/test/expected_bin/proto2/rf_int64.v2ref @@ -0,0 +1 @@ +ÐÒ Ð®, \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto2/rf_int64_empty.v2ref b/addons/protobuf/test/expected_bin/proto2/rf_int64_empty.v2ref new file mode 100644 index 00000000..e69de29b diff --git a/addons/protobuf/test/expected_bin/proto2/rf_sfixed32.v2ref b/addons/protobuf/test/expected_bin/proto2/rf_sfixed32.v2ref new file mode 100644 index 0000000000000000000000000000000000000000..e1826d5b6c4386e0436cf5a2b28a43f146b4234e GIT binary patch literal 12 TcmeBWy2Qf3(95JJ#=rmo6KDcC literal 0 HcmV?d00001 diff --git a/addons/protobuf/test/expected_bin/proto2/rf_sfixed32_empty.v2ref b/addons/protobuf/test/expected_bin/proto2/rf_sfixed32_empty.v2ref new file mode 100644 index 00000000..e69de29b diff --git a/addons/protobuf/test/expected_bin/proto2/rf_sfixed64.v2ref b/addons/protobuf/test/expected_bin/proto2/rf_sfixed64.v2ref new file mode 100644 index 0000000000000000000000000000000000000000..abc4ebaa2d83041ffdd3ee7817bfe543328dca11 GIT binary patch literal 20 TcmbQpbcuxl3??$^i9uKZB3uGN literal 0 HcmV?d00001 diff --git a/addons/protobuf/test/expected_bin/proto2/rf_sfixed64_empty.v2ref b/addons/protobuf/test/expected_bin/proto2/rf_sfixed64_empty.v2ref new file mode 100644 index 00000000..e69de29b diff --git a/addons/protobuf/test/expected_bin/proto2/rf_sint32.v2ref b/addons/protobuf/test/expected_bin/proto2/rf_sint32.v2ref new file mode 100644 index 00000000..7ffe18b9 --- /dev/null +++ b/addons/protobuf/test/expected_bin/proto2/rf_sint32.v2ref @@ -0,0 +1 @@ +è¤èÜX \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto2/rf_sint32_empty.v2ref b/addons/protobuf/test/expected_bin/proto2/rf_sint32_empty.v2ref new file mode 100644 index 00000000..e69de29b diff --git a/addons/protobuf/test/expected_bin/proto2/rf_sint64.v2ref b/addons/protobuf/test/expected_bin/proto2/rf_sint64.v2ref new file mode 100644 index 00000000..79ad41a5 --- /dev/null +++ b/addons/protobuf/test/expected_bin/proto2/rf_sint64.v2ref @@ -0,0 +1 @@ +ð¤ðÜX \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto2/rf_sint64_empty.v2ref b/addons/protobuf/test/expected_bin/proto2/rf_sint64_empty.v2ref new file mode 100644 index 00000000..e69de29b diff --git a/addons/protobuf/test/expected_bin/proto2/rf_string.v2ref b/addons/protobuf/test/expected_bin/proto2/rf_string.v2ref new file mode 100644 index 00000000..0516d414 --- /dev/null +++ b/addons/protobuf/test/expected_bin/proto2/rf_string.v2ref @@ -0,0 +1 @@ +¢string value one¢string value two \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto2/rf_string_empty.v2ref b/addons/protobuf/test/expected_bin/proto2/rf_string_empty.v2ref new file mode 100644 index 00000000..e69de29b diff --git a/addons/protobuf/test/expected_bin/proto2/rf_uint32.v2ref b/addons/protobuf/test/expected_bin/proto2/rf_uint32.v2ref new file mode 100644 index 00000000..4c48587a --- /dev/null +++ b/addons/protobuf/test/expected_bin/proto2/rf_uint32.v2ref @@ -0,0 +1 @@ +ØÒ Ø®, \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto2/rf_uint32_empty.v2ref b/addons/protobuf/test/expected_bin/proto2/rf_uint32_empty.v2ref new file mode 100644 index 00000000..e69de29b diff --git a/addons/protobuf/test/expected_bin/proto2/rf_uint64.v2ref b/addons/protobuf/test/expected_bin/proto2/rf_uint64.v2ref new file mode 100644 index 00000000..d4ec43e4 --- /dev/null +++ b/addons/protobuf/test/expected_bin/proto2/rf_uint64.v2ref @@ -0,0 +1 @@ +àÒ à®, \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto2/rf_uint64_empty.v2ref b/addons/protobuf/test/expected_bin/proto2/rf_uint64_empty.v2ref new file mode 100644 index 00000000..e69de29b diff --git a/addons/protobuf/test/expected_bin/proto2/rfu_bool.v2ref b/addons/protobuf/test/expected_bin/proto2/rfu_bool.v2ref new file mode 100644 index 0000000000000000000000000000000000000000..c3b6099e292adb47fed6b979e82305ba82327e69 GIT binary patch literal 6 NcmdnQ%*?>Z000C}0J;DG literal 0 HcmV?d00001 diff --git a/addons/protobuf/test/expected_bin/proto2/rfu_double.v2ref b/addons/protobuf/test/expected_bin/proto2/rfu_double.v2ref new file mode 100644 index 0000000000000000000000000000000000000000..5ee196804dcb2f52435d313e6a797fe207c1d372 GIT binary patch literal 19 Zcmcb_B*4JH&>*r-!vRP$Tu=6K001cT1XTb4 literal 0 HcmV?d00001 diff --git a/addons/protobuf/test/expected_bin/proto2/rfu_fixed32.v2ref b/addons/protobuf/test/expected_bin/proto2/rfu_fixed32.v2ref new file mode 100644 index 0000000000000000000000000000000000000000..776982364310db9ce3b2d16fb23fff7a7ee33f77 GIT binary patch literal 11 ScmbQl%yEf@fk97-cN literal 0 HcmV?d00001 diff --git a/addons/protobuf/test/expected_bin/proto2/rfu_fixed64.v2ref b/addons/protobuf/test/expected_bin/proto2/rfu_fixed64.v2ref new file mode 100644 index 0000000000000000000000000000000000000000..ba5a0898ee1cec2c294582b48134f49c8f8600c7 GIT binary patch literal 19 ScmbQmEO3d10SxrSAT$6REdj^? literal 0 HcmV?d00001 diff --git a/addons/protobuf/test/expected_bin/proto2/rfu_float.v2ref b/addons/protobuf/test/expected_bin/proto2/rfu_float.v2ref new file mode 100644 index 00000000..e482f017 --- /dev/null +++ b/addons/protobuf/test/expected_bin/proto2/rfu_float.v2ref @@ -0,0 +1 @@ +Ú¤pEA¸cB \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto2/rfu_int32.v2ref b/addons/protobuf/test/expected_bin/proto2/rfu_int32.v2ref new file mode 100644 index 00000000..ebc40d9c --- /dev/null +++ b/addons/protobuf/test/expected_bin/proto2/rfu_int32.v2ref @@ -0,0 +1 @@ +âÒ ®, \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto2/rfu_int64.v2ref b/addons/protobuf/test/expected_bin/proto2/rfu_int64.v2ref new file mode 100644 index 00000000..0b271741 --- /dev/null +++ b/addons/protobuf/test/expected_bin/proto2/rfu_int64.v2ref @@ -0,0 +1 @@ +êÒ ®, \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto2/rfu_sfixed32.v2ref b/addons/protobuf/test/expected_bin/proto2/rfu_sfixed32.v2ref new file mode 100644 index 0000000000000000000000000000000000000000..29f5d3b42a2d6bb442899e37ed8647e9bc039541 GIT binary patch literal 11 ScmZ3)%yEf@fk97;nt literal 0 HcmV?d00001 diff --git a/addons/protobuf/test/expected_bin/proto2/rfu_sint32.v2ref b/addons/protobuf/test/expected_bin/proto2/rfu_sint32.v2ref new file mode 100644 index 00000000..ee53800d --- /dev/null +++ b/addons/protobuf/test/expected_bin/proto2/rfu_sint32.v2ref @@ -0,0 +1 @@ +‚¤ÜX \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto2/rfu_sint64.v2ref b/addons/protobuf/test/expected_bin/proto2/rfu_sint64.v2ref new file mode 100644 index 00000000..606c5e1d --- /dev/null +++ b/addons/protobuf/test/expected_bin/proto2/rfu_sint64.v2ref @@ -0,0 +1 @@ +Š¤ÜX \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto2/rfu_uint32.v2ref b/addons/protobuf/test/expected_bin/proto2/rfu_uint32.v2ref new file mode 100644 index 00000000..c0367234 --- /dev/null +++ b/addons/protobuf/test/expected_bin/proto2/rfu_uint32.v2ref @@ -0,0 +1 @@ +òÒ ®, \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto2/rfu_uint64.v2ref b/addons/protobuf/test/expected_bin/proto2/rfu_uint64.v2ref new file mode 100644 index 00000000..20d2ca61 --- /dev/null +++ b/addons/protobuf/test/expected_bin/proto2/rfu_uint64.v2ref @@ -0,0 +1 @@ +úÒ ®, \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto2/simple_all.v2ref b/addons/protobuf/test/expected_bin/proto2/simple_all.v2ref new file mode 100644 index 0000000000000000000000000000000000000000..937d8adcf6a85a055bf3e11df53a17cefa53ef85 GIT binary patch literal 503 zcmZXPKS)AB9LImZ-@Wu51wD8bP2uPu(b#A~TMlh54I=gjLc^?}DIEm|o5U&PO%4)H zuQd?fD7PfxAWhOFje*eb-tjEzIPP=5`yF@Rj|71GwO%s4?p+@2Z7P{iGO6T_lDnRp z_S}rJ0FLyc$FbhzqUsFFD_52BdGR!Hle@Ss+*wG%s-b10Lp6-q)3`HSt>bd3SSX#C zJ8gtV#4f@U;xqD-;pgEFUh{|P0qPtB^tbZ+0V)|_FEwNinIqwL-09A@oR!P@-G{Un+ST`5_=Az#sXc6+-A?LSOg7g19s@#^k6#6ojVsX1q zV5U##6Zs@w2+Rx!1EPS0B8Ovy#yXGoeIr{7Yu$IUlwL-09A@oR!P@-G{Un+ST`5_=Az#sXc6+-A?LSOg7g19s@#^k6#6ojVsX1q zV5U##6Zs@w2+Rx!1EPS0B8Ovy#yXGoeIr{7Yu$IUl*r-!vRP$Tu=6K001W%1Uvu$ literal 0 HcmV?d00001 diff --git a/addons/protobuf/test/expected_bin/proto3/rf_double_empty.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_double_empty.v3ref new file mode 100644 index 00000000..e69de29b diff --git a/addons/protobuf/test/expected_bin/proto3/rf_empty_inner.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_empty_inner.v3ref new file mode 100644 index 0000000000000000000000000000000000000000..4e34545a48775e87126fda093d1ee722c35f78cb GIT binary patch literal 9 McmX@a#Bd0V01e9mO#lD@ literal 0 HcmV?d00001 diff --git a/addons/protobuf/test/expected_bin/proto3/rf_empty_out.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_empty_out.v3ref new file mode 100644 index 0000000000000000000000000000000000000000..0e641b38df8b9a0763091757c358efde9838ad79 GIT binary patch literal 9 McmdnQ#IOmB01T@F9RL6T literal 0 HcmV?d00001 diff --git a/addons/protobuf/test/expected_bin/proto3/rf_enum_inner.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_enum_inner.v3ref new file mode 100644 index 00000000..630678d2 --- /dev/null +++ b/addons/protobuf/test/expected_bin/proto3/rf_enum_inner.v3ref @@ -0,0 +1 @@ +Ê \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto3/rf_enum_out.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_enum_out.v3ref new file mode 100644 index 00000000..2cbdb175 --- /dev/null +++ b/addons/protobuf/test/expected_bin/proto3/rf_enum_out.v3ref @@ -0,0 +1 @@ +º \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto3/rf_fixed32.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_fixed32.v3ref new file mode 100644 index 0000000000000000000000000000000000000000..c2cbcd1c3f3ac70b7876ca6dfcfa56a9ff26b6c4 GIT binary patch literal 11 Scmeyx$Z?5|00w$u5E=j)Qvt64 literal 0 HcmV?d00001 diff --git a/addons/protobuf/test/expected_bin/proto3/rf_fixed64_empty.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_fixed64_empty.v3ref new file mode 100644 index 00000000..e69de29b diff --git a/addons/protobuf/test/expected_bin/proto3/rf_float.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_float.v3ref new file mode 100644 index 00000000..32cf1e55 --- /dev/null +++ b/addons/protobuf/test/expected_bin/proto3/rf_float.v3ref @@ -0,0 +1 @@ +¤pEA¸cB \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto3/rf_float_empty.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_float_empty.v3ref new file mode 100644 index 00000000..e69de29b diff --git a/addons/protobuf/test/expected_bin/proto3/rf_inner_ene.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_inner_ene.v3ref new file mode 100644 index 0000000000000000000000000000000000000000..83a495754c37dd007109cbff162b773dbd7c5275 GIT binary patch literal 13 UcmdnR%&?1@g@Z>xX%{mC02HnQf&c&j literal 0 HcmV?d00001 diff --git a/addons/protobuf/test/expected_bin/proto3/rf_inner_nen.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_inner_nen.v3ref new file mode 100644 index 0000000000000000000000000000000000000000..94bb8b0e34a1c80289004ce892bd2103d15ef36c GIT binary patch literal 17 UcmdnR%)-GVptOsbVHbo203A94%m4rY literal 0 HcmV?d00001 diff --git a/addons/protobuf/test/expected_bin/proto3/rf_int32.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_int32.v3ref new file mode 100644 index 00000000..8dba6e61 --- /dev/null +++ b/addons/protobuf/test/expected_bin/proto3/rf_int32.v3ref @@ -0,0 +1 @@ +ÊÒ ®, \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto3/rf_int32_empty.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_int32_empty.v3ref new file mode 100644 index 00000000..e69de29b diff --git a/addons/protobuf/test/expected_bin/proto3/rf_int32_with_clear.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_int32_with_clear.v3ref new file mode 100644 index 00000000..8dba6e61 --- /dev/null +++ b/addons/protobuf/test/expected_bin/proto3/rf_int32_with_clear.v3ref @@ -0,0 +1 @@ +ÊÒ ®, \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto3/rf_int64.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_int64.v3ref new file mode 100644 index 00000000..41482a7e --- /dev/null +++ b/addons/protobuf/test/expected_bin/proto3/rf_int64.v3ref @@ -0,0 +1 @@ +ÒÒ ®, \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto3/rf_int64_empty.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_int64_empty.v3ref new file mode 100644 index 00000000..e69de29b diff --git a/addons/protobuf/test/expected_bin/proto3/rf_sfixed32.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_sfixed32.v3ref new file mode 100644 index 0000000000000000000000000000000000000000..9981b370a48e1635026716f652d6f46e40708362 GIT binary patch literal 11 ScmeBT;<&`Zz@R6_zyJUZ`vI>2 literal 0 HcmV?d00001 diff --git a/addons/protobuf/test/expected_bin/proto3/rf_sfixed32_empty.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_sfixed32_empty.v3ref new file mode 100644 index 00000000..e69de29b diff --git a/addons/protobuf/test/expected_bin/proto3/rf_sfixed64.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_sfixed64.v3ref new file mode 100644 index 0000000000000000000000000000000000000000..32e3364df366082f6790b5e00b57329bf2885353 GIT binary patch literal 19 ScmbQlByfp^0SxrSAT$6Qg8{z) literal 0 HcmV?d00001 diff --git a/addons/protobuf/test/expected_bin/proto3/rf_sfixed64_empty.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_sfixed64_empty.v3ref new file mode 100644 index 00000000..e69de29b diff --git a/addons/protobuf/test/expected_bin/proto3/rf_sint32.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_sint32.v3ref new file mode 100644 index 00000000..b0776afe --- /dev/null +++ b/addons/protobuf/test/expected_bin/proto3/rf_sint32.v3ref @@ -0,0 +1 @@ +ê¤ÜX \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto3/rf_sint32_empty.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_sint32_empty.v3ref new file mode 100644 index 00000000..e69de29b diff --git a/addons/protobuf/test/expected_bin/proto3/rf_sint64.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_sint64.v3ref new file mode 100644 index 00000000..ddcbe0fc --- /dev/null +++ b/addons/protobuf/test/expected_bin/proto3/rf_sint64.v3ref @@ -0,0 +1 @@ +ò¤ÜX \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto3/rf_sint64_empty.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_sint64_empty.v3ref new file mode 100644 index 00000000..e69de29b diff --git a/addons/protobuf/test/expected_bin/proto3/rf_string.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_string.v3ref new file mode 100644 index 00000000..0516d414 --- /dev/null +++ b/addons/protobuf/test/expected_bin/proto3/rf_string.v3ref @@ -0,0 +1 @@ +¢string value one¢string value two \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto3/rf_string_empty.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_string_empty.v3ref new file mode 100644 index 00000000..e69de29b diff --git a/addons/protobuf/test/expected_bin/proto3/rf_uint32.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_uint32.v3ref new file mode 100644 index 00000000..3e73b2d4 --- /dev/null +++ b/addons/protobuf/test/expected_bin/proto3/rf_uint32.v3ref @@ -0,0 +1 @@ +ÚÒ ®, \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto3/rf_uint32_empty.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_uint32_empty.v3ref new file mode 100644 index 00000000..e69de29b diff --git a/addons/protobuf/test/expected_bin/proto3/rf_uint64.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_uint64.v3ref new file mode 100644 index 00000000..6145edb6 --- /dev/null +++ b/addons/protobuf/test/expected_bin/proto3/rf_uint64.v3ref @@ -0,0 +1 @@ +âÒ ®, \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto3/rf_uint64_empty.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_uint64_empty.v3ref new file mode 100644 index 00000000..e69de29b diff --git a/addons/protobuf/test/expected_bin/proto3/rfu_bool.v3ref b/addons/protobuf/test/expected_bin/proto3/rfu_bool.v3ref new file mode 100644 index 0000000000000000000000000000000000000000..14654be4534b40c4901d595defa84df6e2ca75b3 GIT binary patch literal 9 QcmdnM%&>u(aRW0001TP}8vpFP&s&-O0Xjx^5+=lZh>sAT=mh>S^%de9T^VS51E5Ua zd^Ra%RcX<^|KDwp0)$8Mev8C-;J-)3+kBg>AY&;Kb)N{r=#gUYK0z1*TfP#1ZPjdM zV#1s-r_3pH#+)%rD)38cn5r-<%$gFfni8wJ&Bd*5Yss4StZD1k OqTgEdy9&ArdH(@Ih<$kg literal 0 HcmV?d00001 diff --git a/addons/protobuf/test/expected_bin/proto3/simple_all_1.v3ref b/addons/protobuf/test/expected_bin/proto3/simple_all_1.v3ref new file mode 100644 index 0000000000000000000000000000000000000000..ece278126e11284f8bb12cd5e5c6ca39ff8d8d1a GIT binary patch literal 495 zcmZXPF-U?z6oB7*_ox3+&<}q_Q#d+EG&Wk$RzsUhgNQ{C8fFDe;v|lNgH92@gAO81 z;ppg8w*;XeP0}Py($stRqeLB#``){E+`Uf&KxwTLPp$`-2YZ`F$Bd2}y<_xl;3otB z$T$GUvdKD;Bt5SRD_6zBdG0KBlfJml-Z@ChDWl_}M`et-lc@KyTE*pjE}K6M?=%n| z5Zee{#2$M5qWxQ*e#;yt`{>FP&s&-O0Xjx^5+=lZh>sAT=mh>S^%de9T^VS51E5Ua zd^Ra%RcX<^|KDwp0)$8Mev8C-;J-)3+kBg>AY&;Kb)N{r=#gUYK0z1*TfP#1ZPjdM zV#1s-r_3pH#+)%rD)38cn5r-<%$gFfni8wJ&Bd*5Yss4StZD1k OqTgEdy9&ArdH(@7F@1Re literal 0 HcmV?d00001 diff --git a/addons/protobuf/test/expected_bin/proto3/test2_1.v3ref b/addons/protobuf/test/expected_bin/proto3/test2_1.v3ref new file mode 100644 index 0000000000000000000000000000000000000000..2ef3b7673ed5585fe0159368c000ba36b2475ebe GIT binary patch literal 68 xcmd<$E=eseQ7B2RDA6_KLgE-9bBqNqu`qyvlt5)_i9%vteo01Z5m=iR0|2wY6VCtu literal 0 HcmV?d00001 diff --git a/addons/protobuf/test/expected_bin/proto3/test2_2.v3ref b/addons/protobuf/test/expected_bin/proto3/test2_2.v3ref new file mode 100644 index 0000000000000000000000000000000000000000..89cd7b2eda235ffac2fb444908d202d61103b22a GIT binary patch literal 35 qcmXp~ BinCheckResult: + var result_string : String + var result : bool = false + var binary_string : String = "[no data]" + var ref_file = File.new() + var ref_file_path = root_path + "/expected_bin/proto" + protobuf_version + "/" + test_name + ".v" + protobuf_version + "ref"; + var ref_rv = null + if ref_file.file_exists(ref_file_path): + if ref_file.open(ref_file_path, ref_file.READ) == 0: + ref_rv = ref_file.get_buffer(ref_file.get_len()) + binary_string = str_raw_array(ref_rv) + if godot_rv.size() == ref_rv.size(): + var equal = true + var fail_index + for index in range(godot_rv.size()): + if godot_rv[index] != ref_rv[index]: + equal = false + fail_index = index + break + if equal: + result_string = "SUCCESS" + result = true; + else: + result_string = "FAIL: test data for '" + test_name + "' not equal at " + str(fail_index) + else: + result_string = "FAIL: test data length for '" + test_name + "' not equal" + else: + result_string = "FAIL: can't read '" + ref_file_path + "'" + else: + result_string = "FAIL: '" + ref_file_path + "' not exist" + return BinCheckResult.new(binary_string, result_string, ref_rv, result); + +const FUNC_NAME = 0 +const CLASS_NAME = 1 + +func exec(test, save_to_file, test_names) -> bool: + print("======================= BEGIN TESTS v" + protobuf_version + " =======================") + var tests_counter = 0 + var success_pack_counter = 0 + var godot_success_unpack_counter = 0 + var protobuf_success_unpack_counter = 0 + for test_name in test_names: + tests_counter += 1 + print("----- ", test_name[FUNC_NAME], " -----") + var test_func = funcref(test, test_name[FUNC_NAME]) + var packed_object = test_name[CLASS_NAME].new() + var godot_rv = test_func.call_func(packed_object) + if save_to_file: + var out_file_name = root_path + "/temp/" + test_name[FUNC_NAME] + ".v" + protobuf_version + "godobuf"; + var out_file = File.new() + if out_file.open(out_file_name, out_file.WRITE) == 0: + out_file.store_buffer(godot_rv) + out_file.close() + else: + print("failed write out file: ", out_file_name) + + # compare bin dumps + var iteration = 0; + var bin_result = binary_check(test_name[FUNC_NAME], godot_rv) + if !bin_result.result: + while test_name.size() > iteration + 2: + iteration += 1 + bin_result = binary_check(test_name[FUNC_NAME] + "_" + str(test_name[iteration + 1]), godot_rv) + if bin_result.result: + break + + if bin_result.result: + success_pack_counter += 1 + + print(packed_object.to_string()) + print("[bin actual ] ", str_raw_array(godot_rv)) + print("[bin expected ] ", bin_result.binary_string) + print("[bin compare ] ", bin_result.result_string) + + var restored_object_godot = test_name[CLASS_NAME].new() + var error_godot = restored_object_godot.from_bytes(godot_rv) + if object_equal(packed_object, restored_object_godot): + godot_success_unpack_counter += 1 + if error_godot == P.PB_ERR.NO_ERRORS: + print("[unpack godobuf ] SUCCESS") + else: + print("[unpack godobuf ] FAIL: ", err_to_str(error_godot)) + else: + print("[unpack godobuf ] FAIL: packed_object & restored_object not equals") + + if bin_result.reference_array != null: + var restored_object_erl = test_name[CLASS_NAME].new() + var error_erl = restored_object_erl.from_bytes(bin_result.reference_array) + if object_equal(packed_object, restored_object_erl): + protobuf_success_unpack_counter += 1 + if error_erl == P.PB_ERR.NO_ERRORS: + print("[unpack protobuf] SUCCESS") + else: + print("[unpack protobuf] FAIL: ", err_to_str(error_erl)) + else: + print("[unpack protobuf] FAIL: packed_object & restored_object not equals") + else: + print("[unpack protobuf] FAIL: no protobuf binary") + print("") + print("===================== TESTS v" + protobuf_version + " COMLETED ======================") + print("godobuf & protobuf compare success done " + str(success_pack_counter) + " of " + str(tests_counter)) + print("godobuf unpack success done " + str(godot_success_unpack_counter) + " of " + str(tests_counter)) + print("protobuf unpack success done " + str(protobuf_success_unpack_counter) + " of " + str(tests_counter)) + + return success_pack_counter == tests_counter \ + && godot_success_unpack_counter == tests_counter \ + && protobuf_success_unpack_counter == tests_counter + +func object_equal(packed_object, restored_object): + for data_key in packed_object.data: + # checks for existence of a key + if !restored_object.data.has(data_key): + return false + + var po_rule = packed_object.data[data_key].field.rule + var ro_rule = restored_object.data[data_key].field.rule + + var po_value = packed_object.data[data_key].field.value + var ro_value = restored_object.data[data_key].field.value + + if po_value == null && ro_value == null: + return true + + if (po_value == null && ro_value != null) \ + || (po_value != null && ro_value == null): + return false + + var po_type = packed_object.data[data_key].field.type + var ro_type = restored_object.data[data_key].field.type + + # checks for existence of a repeated + if po_rule != ro_rule: + return false + # checks for type matching + if po_type != ro_type: + return false + + # differents checks according the types + if po_type == P.PB_DATA_TYPE.INT32 \ + || po_type == P.PB_DATA_TYPE.SINT32 \ + || po_type == P.PB_DATA_TYPE.UINT32 \ + || po_type == P.PB_DATA_TYPE.INT64 \ + || po_type == P.PB_DATA_TYPE.SINT64 \ + || po_type == P.PB_DATA_TYPE.UINT64 \ + || po_type == P.PB_DATA_TYPE.BOOL \ + || po_type == P.PB_DATA_TYPE.ENUM \ + || po_type == P.PB_DATA_TYPE.FIXED32 \ + || po_type == P.PB_DATA_TYPE.SFIXED32 \ + || po_type == P.PB_DATA_TYPE.FLOAT \ + || po_type == P.PB_DATA_TYPE.FIXED64 \ + || po_type == P.PB_DATA_TYPE.SFIXED64 \ + || po_type == P.PB_DATA_TYPE.DOUBLE \ + || po_type == P.PB_DATA_TYPE.STRING: + + # checks objects values + if po_rule == P.PB_RULE.REPEATED: + # ...for repeated fields + if po_value.size() != ro_value.size(): + return false + for i in range(po_value.size()): + if po_value[i] != ro_value[i]: + return false + else: + # ...for not-repeated fields + if po_value != ro_value: + return false + elif po_type == P.PB_DATA_TYPE.BYTES: + if po_rule == P.PB_RULE.REPEATED: + # ...for repeated fields + if po_value.size() != ro_value.size(): + return false + for i in range(po_value.size()): + for j in range(po_value[i].size()): + if po_value[i][j] != ro_value[i][j]: + return false + else: + # ...for not-repeated fields + if po_value.size() != ro_value.size(): + return false + for i in range(po_value.size()): + if po_value[i] != ro_value[i]: + return false + elif po_type == P.PB_DATA_TYPE.MESSAGE: + if po_rule == P.PB_RULE.REPEATED: + # ...for repeated fields + if po_value.size() != ro_value.size(): + return false + for i in range(po_value.size()): + if !object_equal(po_value[i], ro_value[i]): + return false + else: + # ...for not-repeated fields + if !object_equal(po_value, ro_value): + return false + elif po_type == P.PB_DATA_TYPE.MAP: + var po_map = P.PBPacker.construct_map(po_value) + var ro_map = P.PBPacker.construct_map(ro_value) + if po_map.size() != po_map.size(): + return false + + for key in po_map.keys(): + var po_found = -1 + for i in range(po_value.size() - 1, -1, -1): + if key == po_value[i].get_key(): + if !ro_map.has(key): + return false + po_found = i + break + + if po_found == -1: + return false + + var ro_found = -1 + for i in range(ro_value.size() - 1, -1, -1): + if key == ro_value[i].get_key(): + ro_found = i + break + + if ro_found == -1: + return false + + if !object_equal(po_value[po_found], ro_value[ro_found]): + return false + elif po_type == P.PB_DATA_TYPE.ONEOF: + return object_equal(po_value, ro_value) + return true + +func err_to_str(err_code): + if err_code == P.PB_ERR.NO_ERRORS: + return "NO_ERRORS(" + str(err_code) + ")" + elif err_code == P.PB_ERR.VARINT_NOT_FOUND: + return "VARINT_NOT_FOUND(" + str(err_code) + ")" + elif err_code == P.PB_ERR.REPEATED_COUNT_NOT_FOUND: + return "REPEATED_COUNT_NOT_FOUND(" + str(err_code) + ")" + elif err_code == P.PB_ERR.REPEATED_COUNT_MISMATCH: + return "REPEATED_COUNT_MISMATCH(" + str(err_code) + ")" + elif err_code == P.PB_ERR.LENGTHDEL_SIZE_NOT_FOUND: + return "LENGTHDEL_SIZE_NOT_FOUND(" + str(err_code) + ")" + elif err_code == P.PB_ERR.LENGTHDEL_SIZE_MISMATCH: + return "LENGTHDEL_SIZE_MISMATCH(" + str(err_code) + ")" + elif err_code == P.PB_ERR.PACKAGE_SIZE_MISMATCH: + return "PACKAGE_SIZE_MISMATCH(" + str(err_code) + ")" + elif err_code == P.PB_ERR.UNDEFINED_STATE: + return "UNDEFINED_STATE(" + str(err_code) + ")" + elif err_code == P.PB_ERR.PARSE_INCOMPLETE: + return "PARSE_INCOMPLETE(" + str(err_code) + ")" + elif err_code == P.PB_ERR.REQUIRED_FIELDS: + return "REQUIRED_FIELDS(" + str(err_code) + ")" + else: + return "UNKNOWN(" + str(err_code) + ")" + + +static func str_raw_array(arr): + if arr.size() == 0: + return "[]" + + var res = "[" + for i in range(arr.size()): + var hex : String = "%X" % arr[i] + if hex.length() == 1: + hex = "0" + hex + if i == (arr.size() - 1): + res += hex + "]" + else: + res += hex + " " + return res diff --git a/addons/protobuf/test/script/unit_tests_proto2.gd b/addons/protobuf/test/script/unit_tests_proto2.gd new file mode 100644 index 00000000..65a3a5d0 --- /dev/null +++ b/addons/protobuf/test/script/unit_tests_proto2.gd @@ -0,0 +1,746 @@ +# +# BSD 3-Clause License +# +# Copyright (c) 2018 - 2022, Kittenseater, Oleg Malyavkin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# * Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +extends Node + +const VERSION : String = "2" +var P +var Test + +func _init(path : String, compiled_file_path : String): + P = load(compiled_file_path) + Test = load(path + "/script/unit_tests_common.gd").new(P, path, VERSION) + +func exec_all(save_to_file) -> bool: + return Test.exec(self, save_to_file, [ + ["f_double", P.Test1], + ["f_float", P.Test1], + ["f_int32", P.Test1], + ["f_int64", P.Test1], + ["f_uint32", P.Test1], + ["f_uint64", P.Test1], + ["f_sint32", P.Test1], + ["f_sint64", P.Test1], + ["f_fixed32", P.Test1], + ["f_fixed64", P.Test1], + ["f_sfixed32", P.Test1], + ["f_sfixed64", P.Test1], + ["f_bool", P.Test1], + ["f_string", P.Test1], + ["f_bytes", P.Test1], + ["f_map", P.Test1, 1], + ["f_oneof_f1", P.Test1], + ["f_oneof_f2", P.Test1], + ["f_empty_out", P.Test1], + ["f_enum_out", P.Test1], + ["f_empty_inner", P.Test1], + ["f_enum_inner", P.Test1], + + ["rf_double", P.Test1], + ["rf_float", P.Test1], + ["rf_int32", P.Test1], + ["rf_int32_with_clear", P.Test1], + ["rf_int64", P.Test1], + ["rf_uint32", P.Test1], + ["rf_uint64", P.Test1], + ["rf_sint32", P.Test1], + ["rf_sint64", P.Test1], + ["rf_fixed32", P.Test1], + ["rf_fixed64", P.Test1], + ["rf_sfixed32", P.Test1], + ["rf_sfixed64", P.Test1], + ["rf_bool", P.Test1], + ["rf_string", P.Test1], + ["rf_bytes", P.Test1], + ["rf_empty_out", P.Test1], + ["rf_enum_out", P.Test1], + ["rf_empty_inner", P.Test1], + ["rf_enum_inner", P.Test1], + + ["rf_double_empty", P.Test1], + ["rf_float_empty", P.Test1], + ["rf_int32_empty", P.Test1], + ["rf_int64_empty", P.Test1], + ["rf_uint32_empty", P.Test1], + ["rf_uint64_empty", P.Test1], + ["rf_sint32_empty", P.Test1], + ["rf_sint64_empty", P.Test1], + ["rf_fixed32_empty", P.Test1], + ["rf_fixed64_empty", P.Test1], + ["rf_sfixed32_empty", P.Test1], + ["rf_sfixed64_empty", P.Test1], + ["rf_bool_empty", P.Test1], + ["rf_string_empty", P.Test1], + ["rf_bytes_empty", P.Test1], + + ["rfu_double", P.Test1], + ["rfu_float", P.Test1], + ["rfu_int32", P.Test1], + ["rfu_int64", P.Test1], + ["rfu_uint32", P.Test1], + ["rfu_uint64", P.Test1], + ["rfu_sint32", P.Test1], + ["rfu_sint64", P.Test1], + ["rfu_fixed32", P.Test1], + ["rfu_fixed64", P.Test1], + ["rfu_sfixed32", P.Test1], + ["rfu_sfixed64", P.Test1], + ["rfu_bool", P.Test1], + + ["f_int32_default", P.Test1], + ["f_string_default", P.Test1], + ["f_bytes_default", P.Test1], + ["test2_testinner3_testinner32", P.Test2.TestInner3.TestInner3_2], + ["test2_testinner3_testinner32_empty", P.Test2.TestInner3.TestInner3_2], + ["rf_inner_ene", P.Test1], + ["rf_inner_nen", P.Test1], + + ["simple_all", P.Test1, 1], + + ["test2_1", P.Test2], + ["test2_2", P.Test2, 1], + ["test2_3", P.Test2], + ["test2_4", P.Test2, 1], + + ["test4", P.Test4], + ["test4_map", P.Test4, 1, 2, 3, 4, 5], + ["test4_map_dup", P.Test4], + ["test4_map_zero_key", P.Test4] + ]) + + +####################### +######## Test1 ######## +####################### + +# single values # +func f_double(t): + t.set_f_double(1.2340000152587890625e1) + return t.to_bytes() + +func f_float(t): + t.set_f_float(1.2340000152587890625e1) + return t.to_bytes() + +func f_int32(t): + t.set_f_int32(1234) + return t.to_bytes() + +func f_int64(t): + t.set_f_int64(1234) + return t.to_bytes() + +func f_uint32(t): + t.set_f_uint32(1234) + return t.to_bytes() + +func f_uint64(t): + t.set_f_uint64(1234) + return t.to_bytes() + +func f_sint32(t): + t.set_f_sint32(1234) + return t.to_bytes() + +func f_sint64(t): + t.set_f_sint64(1234) + return t.to_bytes() + +func f_fixed32(t): + t.set_f_fixed32(1234) + return t.to_bytes() + +func f_fixed64(t): + t.set_f_fixed64(1234) + return t.to_bytes() + +func f_sfixed32(t): + t.set_f_sfixed32(1234) + return t.to_bytes() + +func f_sfixed64(t): + t.set_f_sfixed64(1234) + return t.to_bytes() + +func f_bool(t): + t.set_f_bool(false) + return t.to_bytes() + +func f_string(t): + t.set_f_string("string value") + return t.to_bytes() + +func f_bytes(t): + t.set_f_bytes([1, 2, 3, 4]) + return t.to_bytes() + +func f_map(t): + t.add_f_map(1, 2) + t.add_f_map(1000, 2000) + return t.to_bytes() + +func f_oneof_f1(t): + t.set_f_oneof_f1("oneof value") + return t.to_bytes() + +func f_oneof_f2(t): + t.set_f_oneof_f2(1234) + return t.to_bytes() + +func f_empty_out(t): + t.new_f_empty_out() + return t.to_bytes() + +func f_enum_out(t): + t.set_f_enum_out(P.Enum0.ONE) + return t.to_bytes() + +func f_empty_inner(t): + t.new_f_empty_inner() + return t.to_bytes() + +func f_enum_inner(t): + t.set_f_enum_inner(P.Test2.TestEnum.VALUE_1) + return t.to_bytes() + +# repeated values # +func rf_double(t): + t.add_rf_double(1.2340000152587890625e1) + t.add_rf_double(5.6779998779296875e1) + return t.to_bytes() + +func rf_float(t): + t.add_rf_float(1.2340000152587890625e1) + t.add_rf_float(5.6779998779296875e1) + return t.to_bytes() + +func rf_int32(t): + t.add_rf_int32(1234) + t.add_rf_int32(5678) + return t.to_bytes() + +func rf_int32_with_clear(t): + t.add_rf_int32(10) + t.add_rf_int32(20) + t.clear_rf_int32() + t.add_rf_int32(1234) + t.add_rf_int32(5678) + return t.to_bytes() + +func rf_int64(t): + t.add_rf_int64(1234) + t.add_rf_int64(5678) + return t.to_bytes() + +func rf_uint32(t): + t.add_rf_uint32(1234) + t.add_rf_uint32(5678) + return t.to_bytes() + +func rf_uint64(t): + t.add_rf_uint64(1234) + t.add_rf_uint64(5678) + return t.to_bytes() + +func rf_sint32(t): + t.add_rf_sint32(1234) + t.add_rf_sint32(5678) + return t.to_bytes() + +func rf_sint64(t): + t.add_rf_sint64(1234) + t.add_rf_sint64(5678) + return t.to_bytes() + +func rf_fixed32(t): + t.add_rf_fixed32(1234) + t.add_rf_fixed32(5678) + return t.to_bytes() + +func rf_fixed64(t): + t.add_rf_fixed64(1234) + t.add_rf_fixed64(5678) + return t.to_bytes() + +func rf_sfixed32(t): + t.add_rf_sfixed32(1234) + t.add_rf_sfixed32(5678) + return t.to_bytes() + +func rf_sfixed64(t): + t.add_rf_sfixed64(1234) + t.add_rf_sfixed64(5678) + return t.to_bytes() + +func rf_bool(t): + t.add_rf_bool(false) + t.add_rf_bool(true) + t.add_rf_bool(false) + return t.to_bytes() + +func rf_string(t): + t.add_rf_string("string value one") + t.add_rf_string("string value two") + return t.to_bytes() + +func rf_bytes(t): + t.add_rf_bytes([1, 2, 3, 4]) + t.add_rf_bytes([5, 6, 7, 8]) + return t.to_bytes() + +func rf_empty_out(t): + t.add_rf_empty_out() + t.add_rf_empty_out() + t.add_rf_empty_out() + return t.to_bytes() + +func rf_enum_out(t): + t.add_rf_enum_out(P.Enum0.ONE) + t.add_rf_enum_out(P.Enum0.TWO) + t.add_rf_enum_out(P.Enum0.THREE) + return t.to_bytes() + +func rf_empty_inner(t): + t.add_rf_empty_inner() + t.add_rf_empty_inner() + t.add_rf_empty_inner() + return t.to_bytes() + +func rf_enum_inner(t): + t.add_rf_enum_inner(P.Test2.TestEnum.VALUE_1) + t.add_rf_enum_inner(P.Test2.TestEnum.VALUE_2) + t.add_rf_enum_inner(P.Test2.TestEnum.VALUE_3) + return t.to_bytes() + +func rf_double_empty(t): + return t.to_bytes() + +func rf_float_empty(t): + return t.to_bytes() + +func rf_int32_empty(t): + return t.to_bytes() + +func rf_int64_empty(t): + return t.to_bytes() + +func rf_uint32_empty(t): + return t.to_bytes() + +func rf_uint64_empty(t): + return t.to_bytes() + +func rf_sint32_empty(t): + return t.to_bytes() + +func rf_sint64_empty(t): + return t.to_bytes() + +func rf_fixed32_empty(t): + return t.to_bytes() + +func rf_fixed64_empty(t): + return t.to_bytes() + +func rf_sfixed32_empty(t): + return t.to_bytes() + +func rf_sfixed64_empty(t): + return t.to_bytes() + +func rf_bool_empty(t): + return t.to_bytes() + +func rf_string_empty(t): + return t.to_bytes() + +func rf_bytes_empty(t): + return t.to_bytes() + +func rfu_double(t): + t.add_rfu_double(1.2340000152587890625e1) + t.add_rfu_double(5.6779998779296875e1) + return t.to_bytes() + +func rfu_float(t): + t.add_rfu_float(1.2340000152587890625e1) + t.add_rfu_float(5.6779998779296875e1) + return t.to_bytes() + +func rfu_int32(t): + t.add_rfu_int32(1234) + t.add_rfu_int32(5678) + return t.to_bytes() + +func rfu_int64(t): + t.add_rfu_int64(1234) + t.add_rfu_int64(5678) + return t.to_bytes() + +func rfu_uint32(t): + t.add_rfu_uint32(1234) + t.add_rfu_uint32(5678) + return t.to_bytes() + +func rfu_uint64(t): + t.add_rfu_uint64(1234) + t.add_rfu_uint64(5678) + return t.to_bytes() + +func rfu_sint32(t): + t.add_rfu_sint32(1234) + t.add_rfu_sint32(5678) + return t.to_bytes() + +func rfu_sint64(t): + t.add_rfu_sint64(1234) + t.add_rfu_sint64(5678) + return t.to_bytes() + +func rfu_fixed32(t): + t.add_rfu_fixed32(1234) + t.add_rfu_fixed32(5678) + return t.to_bytes() + +func rfu_fixed64(t): + t.add_rfu_fixed64(1234) + t.add_rfu_fixed64(5678) + return t.to_bytes() + +func rfu_sfixed32(t): + t.add_rfu_sfixed32(1234) + t.add_rfu_sfixed32(5678) + return t.to_bytes() + +func rfu_sfixed64(t): + t.add_rfu_sfixed64(1234) + t.add_rfu_sfixed64(5678) + return t.to_bytes() + +func rfu_bool(t): + t.add_rfu_bool(false) + t.add_rfu_bool(true) + t.add_rfu_bool(false) + return t.to_bytes() + +func f_int32_default(t): + t.set_f_int32(0) + return t.to_bytes() + +func f_string_default(t): + t.set_f_string("") + return t.to_bytes() + +func f_bytes_default(t): + t.set_f_bytes([]) + return t.to_bytes() + +func test2_testinner3_testinner32(t): + t.set_f1(12) + t.set_f2(34) + return t.to_bytes() + +func test2_testinner3_testinner32_empty(t): + return t.to_bytes() + +func rf_inner_ene(t): + var i0 = t.add_rf_inner() + var i1 = t.add_rf_inner() + var i2 = t.add_rf_inner() + + i1.set_f1(12) + i1.set_f2(34) + + return t.to_bytes() + +func rf_inner_nen(t): + var i0 = t.add_rf_inner() + var i1 = t.add_rf_inner() + var i2 = t.add_rf_inner() + + i0.set_f1(12) + i0.set_f2(34) + i2.set_f1(12) + i2.set_f2(34) + + return t.to_bytes() + +func simple_all(t): + t.set_f_double(1.2340000152587890625e1) + t.set_f_float(1.2340000152587890625e1) + t.set_f_int32(1234) + t.set_f_int64(1234) + t.set_f_uint32(1234) + t.set_f_uint64(1234) + t.set_f_sint32(1234) + t.set_f_sint64(1234) + t.set_f_fixed32(1234) + t.set_f_fixed64(1234) + t.set_f_sfixed32(1234) + t.set_f_sfixed64(1234) + t.set_f_bool(false) + t.set_f_string("string value") + t.set_f_bytes([1, 2, 3, 4]) + t.add_f_map(1, 2) + t.add_f_map(1000, 2000) + t.set_f_oneof_f1("oneof value") + t.new_f_empty_out() + t.set_f_enum_out(P.Enum0.ONE) + t.new_f_empty_inner() + t.set_f_enum_inner(P.Test2.TestEnum.VALUE_1) + # ----- + t.add_rf_double(1.2340000152587890625e1) + t.add_rf_double(5.6779998779296875e1) + + t.add_rf_float(1.2340000152587890625e1) + t.add_rf_float(5.6779998779296875e1) + + t.add_rf_int32(1234) + t.add_rf_int32(5678) + + t.add_rf_int64(1234) + t.add_rf_int64(5678) + + t.add_rf_uint32(1234) + t.add_rf_uint32(5678) + + t.add_rf_uint64(1234) + t.add_rf_uint64(5678) + + t.add_rf_sint32(1234) + t.add_rf_sint32(5678) + + t.add_rf_sint64(1234) + t.add_rf_sint64(5678) + + t.add_rf_fixed32(1234) + t.add_rf_fixed32(5678) + + t.add_rf_fixed64(1234) + t.add_rf_fixed64(5678) + + t.add_rf_sfixed32(1234) + t.add_rf_sfixed32(5678) + + t.add_rf_sfixed64(1234) + t.add_rf_sfixed64(5678) + + t.add_rf_bool(false) + t.add_rf_bool(true) + t.add_rf_bool(false) + + t.add_rf_string("string value one") + t.add_rf_string("string value two") + + t.add_rf_bytes([1, 2, 3, 4]) + t.add_rf_bytes([5, 6, 7, 8]) + + t.add_rf_empty_out() + t.add_rf_empty_out() + t.add_rf_empty_out() + + t.add_rf_enum_out(P.Enum0.ONE) + t.add_rf_enum_out(P.Enum0.TWO) + t.add_rf_enum_out(P.Enum0.THREE) + + t.add_rf_empty_inner() + t.add_rf_empty_inner() + t.add_rf_empty_inner() + + t.add_rf_enum_inner(P.Test2.TestEnum.VALUE_1) + t.add_rf_enum_inner(P.Test2.TestEnum.VALUE_2) + t.add_rf_enum_inner(P.Test2.TestEnum.VALUE_3) + # ----- + t.add_rfu_double(1.2340000152587890625e1) + t.add_rfu_double(5.6779998779296875e1) + + t.add_rfu_float(1.2340000152587890625e1) + t.add_rfu_float(5.6779998779296875e1) + + t.add_rfu_int32(1234) + t.add_rfu_int32(5678) + + t.add_rfu_int64(1234) + t.add_rfu_int64(5678) + + t.add_rfu_uint32(1234) + t.add_rfu_uint32(5678) + + t.add_rfu_uint64(1234) + t.add_rfu_uint64(5678) + + t.add_rfu_sint32(1234) + t.add_rfu_sint32(5678) + + t.add_rfu_sint64(1234) + t.add_rfu_sint64(5678) + + t.add_rfu_fixed32(1234) + t.add_rfu_fixed32(5678) + + t.add_rfu_fixed64(1234) + t.add_rfu_fixed64(5678) + + t.add_rfu_sfixed32(1234) + t.add_rfu_sfixed32(5678) + + t.add_rfu_sfixed64(1234) + t.add_rfu_sfixed64(5678) + + t.add_rfu_bool(false) + t.add_rfu_bool(true) + t.add_rfu_bool(false) + + return t.to_bytes() + +####################### +######## Test2 ######## +####################### + +func test2_1(t): + + # repeated string + t.add_f1("test text-1") + t.add_f1("test text-2") + t.add_f1("test text-3") + + # fixed64 + t.set_f2(1234) + + # oneof string + t.set_f3("yet another text") + + # empty message + t.new_f5() + + return t.to_bytes() + +func test2_2(t): + + # Test2.TestInner3 + var f6 = t.new_f6() + var f6_f1 = f6.add_f1("one") + f6_f1.set_f1(111) + f6_f1.set_f2(1111) + f6_f1 = f6.add_f1("two") + f6_f1.set_f1(222) + f6_f1.set_f2(2222) + + f6.set_f2(P.Test2.TestEnum.VALUE_1) + + f6.new_f3() + + return t.to_bytes() + +func test2_3(t): + # repeated string + t.add_f1("test text-1") + t.add_f1("test text-2") + t.add_f1("test text-3") + + # fixed64 + t.set_f2(1234) + + # oneof + var f4 = t.new_f4() + var f4_f1 = f4.add_f1("one") + f4_f1.set_f1(111) + f4_f1.set_f2(1111) + + f4.set_f2(t.TestEnum.VALUE_1) + f4.new_f3() + + # empty message + t.new_f5() + + # Test2.TestInner3 + var f6 = t.new_f6() + var f6_f1 = f6.add_f1("two") + f6_f1.set_f1(111) + f6_f1.set_f2(1111) + + f6.set_f2(t.TestEnum.VALUE_1) + + f6.new_f3() + + # Test2.TestInner1 + var f7 = t.new_f7() + f7.add_f1(1.2340000152587890625e1) + f7.add_f1(5.6779998779296875e1) + + f7.set_f2(1.2340000152587890625e1) + + f7.set_f3("sample text") + + return t.to_bytes() + +func test2_4(t): + # Test2.TestInner3 + var f6 = t.new_f6() + var f6_f1 = f6.add_f1("one") + f6_f1.set_f1(111) + f6_f1.set_f2(1111) + f6_f1 = f6.add_f1("two") + f6_f1.set_f1(222) + f6_f1.set_f2(2222) + f6_f1 = f6.add_f1("one") + f6_f1.set_f1(333) + f6_f1.set_f2(3333) + f6_f1 = f6.add_f1("two") + f6_f1.set_f1(444) + f6_f1.set_f2(4444) + + return t.to_bytes() + +func test4(t): + t.set_f1(1234) + t.set_f2("hello") + t.set_f3(1.2340000152587890625e1) + t.set_f4(1.2340000152587890625e1) + return t.to_bytes() + +func test4_map(t): + t.add_f5(5, 6) + t.add_f5(1, 2) + t.add_f5(3, 4) + return t.to_bytes() + +func test4_map_dup(t): # 1, 10}, {2, 20}, {1, 20}, {2, 200 + t.add_f5(1, 10) + t.add_f5(2, 20) + t.add_f5(1, 20) + t.add_f5(2, 200) + return t.to_bytes() + +func test4_map_zero_key(t): + t.add_f5(0, 1) + return t.to_bytes() diff --git a/addons/protobuf/test/script/unit_tests_proto3.gd b/addons/protobuf/test/script/unit_tests_proto3.gd new file mode 100644 index 00000000..b3b8048d --- /dev/null +++ b/addons/protobuf/test/script/unit_tests_proto3.gd @@ -0,0 +1,746 @@ +# +# BSD 3-Clause License +# +# Copyright (c) 2018 - 2022, Kittenseater, Oleg Malyavkin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# * Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +extends Node + +const VERSION : String = "3" +var P +var Test + +func _init(path : String, compiled_file_path : String): + P = load(compiled_file_path) + Test = load(path + "/script/unit_tests_common.gd").new(P, path, VERSION) + +func exec_all(save_to_file) -> bool: + return Test.exec(self, save_to_file, [ + ["f_double", P.Test1], + ["f_float", P.Test1], + ["f_int32", P.Test1], + ["f_int64", P.Test1], + ["f_uint32", P.Test1], + ["f_uint64", P.Test1], + ["f_sint32", P.Test1], + ["f_sint64", P.Test1], + ["f_fixed32", P.Test1], + ["f_fixed64", P.Test1], + ["f_sfixed32", P.Test1], + ["f_sfixed64", P.Test1], + ["f_bool", P.Test1], + ["f_string", P.Test1], + ["f_bytes", P.Test1], + ["f_map", P.Test1, 1], + ["f_oneof_f1", P.Test1], + ["f_oneof_f2", P.Test1], + ["f_empty_out", P.Test1], + ["f_enum_out", P.Test1], + ["f_empty_inner", P.Test1], + ["f_enum_inner", P.Test1], + + ["rf_double", P.Test1], + ["rf_float", P.Test1], + ["rf_int32", P.Test1], + ["rf_int32_with_clear", P.Test1], + ["rf_int64", P.Test1], + ["rf_uint32", P.Test1], + ["rf_uint64", P.Test1], + ["rf_sint32", P.Test1], + ["rf_sint64", P.Test1], + ["rf_fixed32", P.Test1], + ["rf_fixed64", P.Test1], + ["rf_sfixed32", P.Test1], + ["rf_sfixed64", P.Test1], + ["rf_bool", P.Test1], + ["rf_string", P.Test1], + ["rf_bytes", P.Test1], + ["rf_empty_out", P.Test1], + ["rf_enum_out", P.Test1], + ["rf_empty_inner", P.Test1], + ["rf_enum_inner", P.Test1], + + ["rf_double_empty", P.Test1], + ["rf_float_empty", P.Test1], + ["rf_int32_empty", P.Test1], + ["rf_int64_empty", P.Test1], + ["rf_uint32_empty", P.Test1], + ["rf_uint64_empty", P.Test1], + ["rf_sint32_empty", P.Test1], + ["rf_sint64_empty", P.Test1], + ["rf_fixed32_empty", P.Test1], + ["rf_fixed64_empty", P.Test1], + ["rf_sfixed32_empty", P.Test1], + ["rf_sfixed64_empty", P.Test1], + ["rf_bool_empty", P.Test1], + ["rf_string_empty", P.Test1], + ["rf_bytes_empty", P.Test1], + + ["rfu_double", P.Test1], + ["rfu_float", P.Test1], + ["rfu_int32", P.Test1], + ["rfu_int64", P.Test1], + ["rfu_uint32", P.Test1], + ["rfu_uint64", P.Test1], + ["rfu_sint32", P.Test1], + ["rfu_sint64", P.Test1], + ["rfu_fixed32", P.Test1], + ["rfu_fixed64", P.Test1], + ["rfu_sfixed32", P.Test1], + ["rfu_sfixed64", P.Test1], + ["rfu_bool", P.Test1], + + ["f_int32_default", P.Test1], + ["f_string_default", P.Test1], + ["f_bytes_default", P.Test1], + ["test2_testinner3_testinner32", P.Test2.TestInner3.TestInner3_2], + ["test2_testinner3_testinner32_empty", P.Test2.TestInner3.TestInner3_2], + ["rf_inner_ene", P.Test1], + ["rf_inner_nen", P.Test1], + + ["simple_all", P.Test1, 1], + + ["test2_1", P.Test2], + ["test2_2", P.Test2, 1], + ["test2_3", P.Test2], + ["test2_4", P.Test2, 1], + + ["test4", P.Test4], + ["test4_map", P.Test4, 1, 2, 3, 4, 5], + ["test4_map_dup", P.Test4], + ["test4_map_zero_key", P.Test4] + ]) + + +####################### +######## Test1 ######## +####################### + +# single values # +func f_double(t): + t.set_f_double(1.2340000152587890625e1) + return t.to_bytes() + +func f_float(t): + t.set_f_float(1.2340000152587890625e1) + return t.to_bytes() + +func f_int32(t): + t.set_f_int32(1234) + return t.to_bytes() + +func f_int64(t): + t.set_f_int64(1234) + return t.to_bytes() + +func f_uint32(t): + t.set_f_uint32(1234) + return t.to_bytes() + +func f_uint64(t): + t.set_f_uint64(1234) + return t.to_bytes() + +func f_sint32(t): + t.set_f_sint32(1234) + return t.to_bytes() + +func f_sint64(t): + t.set_f_sint64(1234) + return t.to_bytes() + +func f_fixed32(t): + t.set_f_fixed32(1234) + return t.to_bytes() + +func f_fixed64(t): + t.set_f_fixed64(1234) + return t.to_bytes() + +func f_sfixed32(t): + t.set_f_sfixed32(1234) + return t.to_bytes() + +func f_sfixed64(t): + t.set_f_sfixed64(1234) + return t.to_bytes() + +func f_bool(t): + t.set_f_bool(false) + return t.to_bytes() + +func f_string(t): + t.set_f_string("string value") + return t.to_bytes() + +func f_bytes(t): + t.set_f_bytes([1, 2, 3, 4]) + return t.to_bytes() + +func f_map(t): + t.add_f_map(1, 2) + t.add_f_map(1000, 2000) + return t.to_bytes() + +func f_oneof_f1(t): + t.set_f_oneof_f1("oneof value") + return t.to_bytes() + +func f_oneof_f2(t): + t.set_f_oneof_f2(1234) + return t.to_bytes() + +func f_empty_out(t): + t.new_f_empty_out() + return t.to_bytes() + +func f_enum_out(t): + t.set_f_enum_out(P.Enum0.ONE) + return t.to_bytes() + +func f_empty_inner(t): + t.new_f_empty_inner() + return t.to_bytes() + +func f_enum_inner(t): + t.set_f_enum_inner(P.Test2.TestEnum.VALUE_1) + return t.to_bytes() + +# repeated values # +func rf_double(t): + t.add_rf_double(1.2340000152587890625e1) + t.add_rf_double(5.6779998779296875e1) + return t.to_bytes() + +func rf_float(t): + t.add_rf_float(1.2340000152587890625e1) + t.add_rf_float(5.6779998779296875e1) + return t.to_bytes() + +func rf_int32(t): + t.add_rf_int32(1234) + t.add_rf_int32(5678) + return t.to_bytes() + +func rf_int32_with_clear(t): + t.add_rf_int32(10) + t.add_rf_int32(20) + t.clear_rf_int32() + t.add_rf_int32(1234) + t.add_rf_int32(5678) + return t.to_bytes() + +func rf_int64(t): + t.add_rf_int64(1234) + t.add_rf_int64(5678) + return t.to_bytes() + +func rf_uint32(t): + t.add_rf_uint32(1234) + t.add_rf_uint32(5678) + return t.to_bytes() + +func rf_uint64(t): + t.add_rf_uint64(1234) + t.add_rf_uint64(5678) + return t.to_bytes() + +func rf_sint32(t): + t.add_rf_sint32(1234) + t.add_rf_sint32(5678) + return t.to_bytes() + +func rf_sint64(t): + t.add_rf_sint64(1234) + t.add_rf_sint64(5678) + return t.to_bytes() + +func rf_fixed32(t): + t.add_rf_fixed32(1234) + t.add_rf_fixed32(5678) + return t.to_bytes() + +func rf_fixed64(t): + t.add_rf_fixed64(1234) + t.add_rf_fixed64(5678) + return t.to_bytes() + +func rf_sfixed32(t): + t.add_rf_sfixed32(1234) + t.add_rf_sfixed32(5678) + return t.to_bytes() + +func rf_sfixed64(t): + t.add_rf_sfixed64(1234) + t.add_rf_sfixed64(5678) + return t.to_bytes() + +func rf_bool(t): + t.add_rf_bool(false) + t.add_rf_bool(true) + t.add_rf_bool(false) + return t.to_bytes() + +func rf_string(t): + t.add_rf_string("string value one") + t.add_rf_string("string value two") + return t.to_bytes() + +func rf_bytes(t): + t.add_rf_bytes([1, 2, 3, 4]) + t.add_rf_bytes([5, 6, 7, 8]) + return t.to_bytes() + +func rf_empty_out(t): + t.add_rf_empty_out() + t.add_rf_empty_out() + t.add_rf_empty_out() + return t.to_bytes() + +func rf_enum_out(t): + t.add_rf_enum_out(P.Enum0.ONE) + t.add_rf_enum_out(P.Enum0.TWO) + t.add_rf_enum_out(P.Enum0.THREE) + return t.to_bytes() + +func rf_empty_inner(t): + t.add_rf_empty_inner() + t.add_rf_empty_inner() + t.add_rf_empty_inner() + return t.to_bytes() + +func rf_enum_inner(t): + t.add_rf_enum_inner(P.Test2.TestEnum.VALUE_1) + t.add_rf_enum_inner(P.Test2.TestEnum.VALUE_2) + t.add_rf_enum_inner(P.Test2.TestEnum.VALUE_3) + return t.to_bytes() + +func rf_double_empty(t): + return t.to_bytes() + +func rf_float_empty(t): + return t.to_bytes() + +func rf_int32_empty(t): + return t.to_bytes() + +func rf_int64_empty(t): + return t.to_bytes() + +func rf_uint32_empty(t): + return t.to_bytes() + +func rf_uint64_empty(t): + return t.to_bytes() + +func rf_sint32_empty(t): + return t.to_bytes() + +func rf_sint64_empty(t): + return t.to_bytes() + +func rf_fixed32_empty(t): + return t.to_bytes() + +func rf_fixed64_empty(t): + return t.to_bytes() + +func rf_sfixed32_empty(t): + return t.to_bytes() + +func rf_sfixed64_empty(t): + return t.to_bytes() + +func rf_bool_empty(t): + return t.to_bytes() + +func rf_string_empty(t): + return t.to_bytes() + +func rf_bytes_empty(t): + return t.to_bytes() + +func rfu_double(t): + t.add_rfu_double(1.2340000152587890625e1) + t.add_rfu_double(5.6779998779296875e1) + return t.to_bytes() + +func rfu_float(t): + t.add_rfu_float(1.2340000152587890625e1) + t.add_rfu_float(5.6779998779296875e1) + return t.to_bytes() + +func rfu_int32(t): + t.add_rfu_int32f(1234) + t.add_rfu_int32f(5678) + return t.to_bytes() + +func rfu_int64(t): + t.add_rfu_int64f(1234) + t.add_rfu_int64f(5678) + return t.to_bytes() + +func rfu_uint32(t): + t.add_rfu_uint32(1234) + t.add_rfu_uint32(5678) + return t.to_bytes() + +func rfu_uint64(t): + t.add_rfu_uint64(1234) + t.add_rfu_uint64(5678) + return t.to_bytes() + +func rfu_sint32(t): + t.add_rfu_sint32(1234) + t.add_rfu_sint32(5678) + return t.to_bytes() + +func rfu_sint64(t): + t.add_rfu_sint64(1234) + t.add_rfu_sint64(5678) + return t.to_bytes() + +func rfu_fixed32(t): + t.add_rfu_fixed32(1234) + t.add_rfu_fixed32(5678) + return t.to_bytes() + +func rfu_fixed64(t): + t.add_rfu_fixed64(1234) + t.add_rfu_fixed64(5678) + return t.to_bytes() + +func rfu_sfixed32(t): + t.add_rfu_sfixed32(1234) + t.add_rfu_sfixed32(5678) + return t.to_bytes() + +func rfu_sfixed64(t): + t.add_rfu_sfixed64(1234) + t.add_rfu_sfixed64(5678) + return t.to_bytes() + +func rfu_bool(t): + t.add_rfu_bool(false) + t.add_rfu_bool(true) + t.add_rfu_bool(false) + return t.to_bytes() + +func f_int32_default(t): + t.set_f_int32(0) + return t.to_bytes() + +func f_string_default(t): + t.set_f_string("") + return t.to_bytes() + +func f_bytes_default(t): + t.set_f_bytes([]) + return t.to_bytes() + +func test2_testinner3_testinner32(t): + t.set_f1(12) + t.set_f2(34) + return t.to_bytes() + +func test2_testinner3_testinner32_empty(t): + return t.to_bytes() + +func rf_inner_ene(t): + var i0 = t.add_rf_inner() + var i1 = t.add_rf_inner() + var i2 = t.add_rf_inner() + + i1.set_f1(12) + i1.set_f2(34) + + return t.to_bytes() + +func rf_inner_nen(t): + var i0 = t.add_rf_inner() + var i1 = t.add_rf_inner() + var i2 = t.add_rf_inner() + + i0.set_f1(12) + i0.set_f2(34) + i2.set_f1(12) + i2.set_f2(34) + + return t.to_bytes() + +func simple_all(t): + t.set_f_double(1.2340000152587890625e1) + t.set_f_float(1.2340000152587890625e1) + t.set_f_int32(1234) + t.set_f_int64(1234) + t.set_f_uint32(1234) + t.set_f_uint64(1234) + t.set_f_sint32(1234) + t.set_f_sint64(1234) + t.set_f_fixed32(1234) + t.set_f_fixed64(1234) + t.set_f_sfixed32(1234) + t.set_f_sfixed64(1234) + t.set_f_bool(false) + t.set_f_string("string value") + t.set_f_bytes([1, 2, 3, 4]) + t.add_f_map(1, 2) + t.add_f_map(1000, 2000) + t.set_f_oneof_f1("oneof value") + t.new_f_empty_out() + t.set_f_enum_out(P.Enum0.ONE) + t.new_f_empty_inner() + t.set_f_enum_inner(P.Test2.TestEnum.VALUE_1) + # ----- + t.add_rf_double(1.2340000152587890625e1) + t.add_rf_double(5.6779998779296875e1) + + t.add_rf_float(1.2340000152587890625e1) + t.add_rf_float(5.6779998779296875e1) + + t.add_rf_int32(1234) + t.add_rf_int32(5678) + + t.add_rf_int64(1234) + t.add_rf_int64(5678) + + t.add_rf_uint32(1234) + t.add_rf_uint32(5678) + + t.add_rf_uint64(1234) + t.add_rf_uint64(5678) + + t.add_rf_sint32(1234) + t.add_rf_sint32(5678) + + t.add_rf_sint64(1234) + t.add_rf_sint64(5678) + + t.add_rf_fixed32(1234) + t.add_rf_fixed32(5678) + + t.add_rf_fixed64(1234) + t.add_rf_fixed64(5678) + + t.add_rf_sfixed32(1234) + t.add_rf_sfixed32(5678) + + t.add_rf_sfixed64(1234) + t.add_rf_sfixed64(5678) + + t.add_rf_bool(false) + t.add_rf_bool(true) + t.add_rf_bool(false) + + t.add_rf_string("string value one") + t.add_rf_string("string value two") + + t.add_rf_bytes([1, 2, 3, 4]) + t.add_rf_bytes([5, 6, 7, 8]) + + t.add_rf_empty_out() + t.add_rf_empty_out() + t.add_rf_empty_out() + + t.add_rf_enum_out(P.Enum0.ONE) + t.add_rf_enum_out(P.Enum0.TWO) + t.add_rf_enum_out(P.Enum0.THREE) + + t.add_rf_empty_inner() + t.add_rf_empty_inner() + t.add_rf_empty_inner() + + t.add_rf_enum_inner(P.Test2.TestEnum.VALUE_1) + t.add_rf_enum_inner(P.Test2.TestEnum.VALUE_2) + t.add_rf_enum_inner(P.Test2.TestEnum.VALUE_3) + # ----- + t.add_rfu_double(1.2340000152587890625e1) + t.add_rfu_double(5.6779998779296875e1) + + t.add_rfu_float(1.2340000152587890625e1) + t.add_rfu_float(5.6779998779296875e1) + + t.add_rfu_int32f(1234) + t.add_rfu_int32f(5678) + + t.add_rfu_int64f(1234) + t.add_rfu_int64f(5678) + + t.add_rfu_uint32(1234) + t.add_rfu_uint32(5678) + + t.add_rfu_uint64(1234) + t.add_rfu_uint64(5678) + + t.add_rfu_sint32(1234) + t.add_rfu_sint32(5678) + + t.add_rfu_sint64(1234) + t.add_rfu_sint64(5678) + + t.add_rfu_fixed32(1234) + t.add_rfu_fixed32(5678) + + t.add_rfu_fixed64(1234) + t.add_rfu_fixed64(5678) + + t.add_rfu_sfixed32(1234) + t.add_rfu_sfixed32(5678) + + t.add_rfu_sfixed64(1234) + t.add_rfu_sfixed64(5678) + + t.add_rfu_bool(false) + t.add_rfu_bool(true) + t.add_rfu_bool(false) + + return t.to_bytes() + +####################### +######## Test2 ######## +####################### + +func test2_1(t): + + # repeated string + t.add_f1("test text-1") + t.add_f1("test text-2") + t.add_f1("test text-3") + + # fixed64 + t.set_f2(1234) + + # oneof string + t.set_f3("yet another text") + + # empty message + t.new_f5() + + return t.to_bytes() + +func test2_2(t): + + # Test2.TestInner3 + var f6 = t.new_f6() + var f6_f1 = f6.add_f1("one") + f6_f1.set_f1(111) + f6_f1.set_f2(1111) + f6_f1 = f6.add_f1("two") + f6_f1.set_f1(222) + f6_f1.set_f2(2222) + + f6.set_f2(P.Test2.TestEnum.VALUE_1) + + f6.new_f3() + + return t.to_bytes() + +func test2_3(t): + # repeated string + t.add_f1("test text-1") + t.add_f1("test text-2") + t.add_f1("test text-3") + + # fixed64 + t.set_f2(1234) + + # oneof + var f4 = t.new_f4() + var f4_f1 = f4.add_f1("one") + f4_f1.set_f1(111) + f4_f1.set_f2(1111) + + f4.set_f2(t.TestEnum.VALUE_1) + f4.new_f3() + + # empty message + t.new_f5() + + # Test2.TestInner3 + var f6 = t.new_f6() + var f6_f1 = f6.add_f1("two") + f6_f1.set_f1(111) + f6_f1.set_f2(1111) + + f6.set_f2(t.TestEnum.VALUE_1) + + f6.new_f3() + + # Test2.TestInner1 + var f7 = t.new_f7() + f7.add_f1(1.2340000152587890625e1) + f7.add_f1(5.6779998779296875e1) + + f7.set_f2(1.2340000152587890625e1) + + f7.set_f3("sample text") + + return t.to_bytes() + +func test2_4(t): + # Test2.TestInner3 + var f6 = t.new_f6() + var f6_f1 = f6.add_f1("one") + f6_f1.set_f1(111) + f6_f1.set_f2(1111) + f6_f1 = f6.add_f1("two") + f6_f1.set_f1(222) + f6_f1.set_f2(2222) + f6_f1 = f6.add_f1("one") + f6_f1.set_f1(333) + f6_f1.set_f2(3333) + f6_f1 = f6.add_f1("two") + f6_f1.set_f1(444) + f6_f1.set_f2(4444) + + return t.to_bytes() + +func test4(t): + t.set_f1(1234) + t.set_f2("hello") + t.set_f3(1.2340000152587890625e1) + t.set_f4(1.2340000152587890625e1) + return t.to_bytes() + +func test4_map(t): + t.add_f5(5, 6) + t.add_f5(1, 2) + t.add_f5(3, 4) + return t.to_bytes() + +func test4_map_dup(t): # 1, 10}, {2, 20}, {1, 20}, {2, 200 + t.add_f5(1, 10) + t.add_f5(2, 20) + t.add_f5(1, 20) + t.add_f5(2, 200) + return t.to_bytes() + +func test4_map_zero_key(t): + t.add_f5(0, 1) + return t.to_bytes() diff --git a/addons/protobuf/test/source/pbtest2.proto b/addons/protobuf/test/source/pbtest2.proto new file mode 100644 index 00000000..2e165dcf --- /dev/null +++ b/addons/protobuf/test/source/pbtest2.proto @@ -0,0 +1,159 @@ +syntax="proto2"; + +message Test0 { + +} + +enum Enum0 { + NULL = 0; + ONE = 1; + TWO = 2; + THREE = 3; + FOUR = 4; +} + +message Test1 { + optional double f_double = 1; + optional float f_float = 2; + optional int32 f_int32 = 3; + optional int64 f_int64 = 4; + optional uint32 f_uint32 = 5; + optional uint64 f_uint64 = 6; + optional sint32 f_sint32 = 7; + optional sint64 f_sint64 = 8; + optional fixed32 f_fixed32 = 9; + optional fixed64 f_fixed64 = 10; + optional sfixed32 f_sfixed32 = 11; + optional sfixed64 f_sfixed64 = 12; + optional bool f_bool = 13; + optional string f_string = 14; + optional bytes f_bytes = 15; + map f_map = 16; + oneof f_oneof { + string f_oneof_f1 = 17; + int32 f_oneof_f2 = 18; + } + optional Test0 f_empty_out = 19; + optional Enum0 f_enum_out = 20; + optional Test2.TestInner2 f_empty_inner = 21; + optional Test2.TestEnum f_enum_inner = 22; + + repeated double rf_double = 23; + repeated float rf_float = 24; + repeated int32 rf_int32 = 25; + repeated int64 rf_int64 = 26; + repeated uint32 rf_uint32 = 27; + repeated uint64 rf_uint64 = 28; + repeated sint32 rf_sint32 = 29; + repeated sint64 rf_sint64 = 30; + repeated fixed32 rf_fixed32 = 31; + repeated fixed64 rf_fixed64 = 32; + repeated sfixed32 rf_sfixed32 = 33; + repeated sfixed64 rf_sfixed64 = 34; + repeated bool rf_bool = 35; + repeated string rf_string = 36; + repeated bytes rf_bytes = 37; + + repeated Test0 rf_empty_out = 38; + repeated Enum0 rf_enum_out = 39; + repeated Test2.TestInner2 rf_empty_inner = 40; + repeated Test2.TestEnum rf_enum_inner = 41; + + repeated double rfu_double = 42 [packed = true]; + repeated float rfu_float = 43 [packed = true]; + repeated int32 rfu_int32 = 44 [packed = true]; + repeated int64 rfu_int64 = 45 [packed = true]; + repeated uint32 rfu_uint32 = 46 [packed = true]; + repeated uint64 rfu_uint64 = 47 [packed = true]; + repeated sint32 rfu_sint32 = 48 [packed = true]; + repeated sint64 rfu_sint64 = 49 [packed = true]; + repeated fixed32 rfu_fixed32 = 50 [packed = true]; + repeated fixed64 rfu_fixed64 = 51 [packed = true]; + repeated sfixed32 rfu_sfixed32 = 52 [packed = true]; + repeated sfixed64 rfu_sfixed64 = 53 [packed = true]; + repeated bool rfu_bool = 54 [packed = true]; + + repeated Test2.TestInner3.TestInner3_2 rf_inner = 55; +} + +message Test2 { + enum TestEnum { + VALUE_0 = 0; + VALUE_1 = 1; + VALUE_2 = 2; + VALUE_3 = 3; + } + + message TestInner1 { + repeated double f1 = 1; + optional float f2 = 2; + optional string f3 = 3; + } + + message TestInner2 { } + + message TestInner3 { + message TestInner3_1 { } + message TestInner3_2 { + optional int32 f1 = 1; + optional uint64 f2 = 2; + } + + map f1 = 1; + optional TestEnum f2 = 2; + optional TestInner3_1 f3 = 3; + } + + repeated string f1 = 1; + optional fixed64 f2 = 2; + oneof test_oneof { + string f3 = 3; + TestInner3 f4 = 4; + } + optional TestInner2 f5 = 5; + optional TestInner3 f6 = 6; + optional TestInner1 f7 = 7; +} + +message Test3 { + message InnerReq { + required int32 f1 = 1; + } + + message InnerOpt { + optional int32 f1 = 1; + } + + message InnerRep { + repeated int32 f1 = 1; + } + + required int32 f_req_int32 = 1; + required float f_req_float = 2; + required string f_req_string = 3; + required InnerReq f_req_inner_req = 4; + required InnerOpt f_req_inner_opt = 5; + required InnerRep f_req_inner_rep = 6; + + optional int32 f_opt_int32 = 7; + optional float f_opt_float = 8; + optional string f_opt_string = 9; + optional InnerReq f_opt_inner_req = 10; + optional InnerOpt f_opt_inner_opt = 11; + optional InnerRep f_opt_inner_rep = 12; + + repeated int32 f_rep_int32 = 13; + repeated float f_rep_float = 14; + repeated string f_rep_string = 15; + repeated InnerReq f_rep_inner_req = 16; + repeated InnerOpt f_rep_inner_opt = 17; + repeated InnerRep f_rep_inner_rep = 18; +} + +message Test4 { + optional int32 f1 = 10; + optional string f2 = 3; + optional float f3 = 2; + optional double f4 = 160; + map f5 = 99; +} \ No newline at end of file diff --git a/addons/protobuf/test/source/pbtest3.proto b/addons/protobuf/test/source/pbtest3.proto new file mode 100644 index 00000000..2ac743aa --- /dev/null +++ b/addons/protobuf/test/source/pbtest3.proto @@ -0,0 +1,124 @@ +syntax="proto3"; + +message Test0 { + +} + +enum Enum0 { + NULL = 0; + ONE = 1; + TWO = 2; + THREE = 3; + FOUR = 4; +} + +message Test1 { + double f_double = 1; + float f_float = 2; + int32 f_int32 = 3; + int64 f_int64 = 4; + uint32 f_uint32 = 5; + uint64 f_uint64 = 6; + sint32 f_sint32 = 7; + sint64 f_sint64 = 8; + fixed32 f_fixed32 = 9; + fixed64 f_fixed64 = 10; + sfixed32 f_sfixed32 = 11; + sfixed64 f_sfixed64 = 12; + bool f_bool = 13; + string f_string = 14; + bytes f_bytes = 15; + map f_map = 16; + oneof f_oneof { + string f_oneof_f1 = 17; + int32 f_oneof_f2 = 18; + } + Test0 f_empty_out = 19; + Enum0 f_enum_out = 20; + Test2.TestInner2 f_empty_inner = 21; + Test2.TestEnum f_enum_inner = 22; + + repeated double rf_double = 23; + repeated float rf_float = 24; + repeated int32 rf_int32 = 25; + repeated int64 rf_int64 = 26; + repeated uint32 rf_uint32 = 27; + repeated uint64 rf_uint64 = 28; + repeated sint32 rf_sint32 = 29; + repeated sint64 rf_sint64 = 30; + repeated fixed32 rf_fixed32 = 31; + repeated fixed64 rf_fixed64 = 32; + repeated sfixed32 rf_sfixed32 = 33; + repeated sfixed64 rf_sfixed64 = 34; + repeated bool rf_bool = 35; + repeated string rf_string = 36; + repeated bytes rf_bytes = 37; + + repeated Test0 rf_empty_out = 38; + repeated Enum0 rf_enum_out = 39; + repeated Test2.TestInner2 rf_empty_inner = 40; + repeated Test2.TestEnum rf_enum_inner = 41; + + repeated double rfu_double = 42 [packed = false]; + repeated float rfu_float = 43 [packed = false]; + repeated int32 rfu_int32f = 44 [packed = false]; + repeated int64 rfu_int64f = 45 [packed = false]; + repeated uint32 rfu_uint32 = 46 [packed = false]; + repeated uint64 rfu_uint64 = 47 [packed = false]; + repeated sint32 rfu_sint32 = 48 [packed = false]; + repeated sint64 rfu_sint64 = 49 [packed = false]; + repeated fixed32 rfu_fixed32 = 50 [packed = false]; + repeated fixed64 rfu_fixed64 = 51 [packed = false]; + repeated sfixed32 rfu_sfixed32 = 52 [packed = false]; + repeated sfixed64 rfu_sfixed64 = 53 [packed = false]; + repeated bool rfu_bool = 54 [packed = false]; + + repeated Test2.TestInner3.TestInner3_2 rf_inner = 55; +} + +message Test2 { + enum TestEnum { + VALUE_0 = 0; + VALUE_1 = 1; + VALUE_2 = 2; + VALUE_3 = 3; + } + + message TestInner1 { + repeated double f1 = 1; + float f2 = 2; + string f3 = 3; + } + + message TestInner2 { } + + message TestInner3 { + message TestInner3_1 { } + message TestInner3_2 { + int32 f1 = 1; + uint64 f2 = 2; + } + + map f1 = 1; + TestEnum f2 = 2; + TestInner3_1 f3 = 3; + } + + repeated string f1 = 1; + fixed64 f2 = 2; + oneof test_oneof { + string f3 = 3; + TestInner3 f4 = 4; + } + TestInner2 f5 = 5; + TestInner3 f6 = 6; + TestInner1 f7 = 7; +} + +message Test4 { + int32 f1 = 10; + string f2 = 3; + float f3 = 2; + double f4 = 160; + map f5 = 99; +} diff --git a/addons/protobuf/test/temp/proto3.gd b/addons/protobuf/test/temp/proto3.gd new file mode 100644 index 00000000..84259529 --- /dev/null +++ b/addons/protobuf/test/temp/proto3.gd @@ -0,0 +1,2241 @@ +const PROTO_VERSION = 3 + +# +# BSD 3-Clause License +# +# Copyright (c) 2018 - 2022, Oleg Malyavkin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# * Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# DEBUG_TAB redefine this " " if you need, example: const DEBUG_TAB = "\t" +const DEBUG_TAB : String = " " + +enum PB_ERR { + NO_ERRORS = 0, + VARINT_NOT_FOUND = -1, + REPEATED_COUNT_NOT_FOUND = -2, + REPEATED_COUNT_MISMATCH = -3, + LENGTHDEL_SIZE_NOT_FOUND = -4, + LENGTHDEL_SIZE_MISMATCH = -5, + PACKAGE_SIZE_MISMATCH = -6, + UNDEFINED_STATE = -7, + PARSE_INCOMPLETE = -8, + REQUIRED_FIELDS = -9 +} + +enum PB_DATA_TYPE { + INT32 = 0, + SINT32 = 1, + UINT32 = 2, + INT64 = 3, + SINT64 = 4, + UINT64 = 5, + BOOL = 6, + ENUM = 7, + FIXED32 = 8, + SFIXED32 = 9, + FLOAT = 10, + FIXED64 = 11, + SFIXED64 = 12, + DOUBLE = 13, + STRING = 14, + BYTES = 15, + MESSAGE = 16, + MAP = 17 +} + +const DEFAULT_VALUES_2 = { + PB_DATA_TYPE.INT32: null, + PB_DATA_TYPE.SINT32: null, + PB_DATA_TYPE.UINT32: null, + PB_DATA_TYPE.INT64: null, + PB_DATA_TYPE.SINT64: null, + PB_DATA_TYPE.UINT64: null, + PB_DATA_TYPE.BOOL: null, + PB_DATA_TYPE.ENUM: null, + PB_DATA_TYPE.FIXED32: null, + PB_DATA_TYPE.SFIXED32: null, + PB_DATA_TYPE.FLOAT: null, + PB_DATA_TYPE.FIXED64: null, + PB_DATA_TYPE.SFIXED64: null, + PB_DATA_TYPE.DOUBLE: null, + PB_DATA_TYPE.STRING: null, + PB_DATA_TYPE.BYTES: null, + PB_DATA_TYPE.MESSAGE: null, + PB_DATA_TYPE.MAP: null +} + +const DEFAULT_VALUES_3 = { + PB_DATA_TYPE.INT32: 0, + PB_DATA_TYPE.SINT32: 0, + PB_DATA_TYPE.UINT32: 0, + PB_DATA_TYPE.INT64: 0, + PB_DATA_TYPE.SINT64: 0, + PB_DATA_TYPE.UINT64: 0, + PB_DATA_TYPE.BOOL: false, + PB_DATA_TYPE.ENUM: 0, + PB_DATA_TYPE.FIXED32: 0, + PB_DATA_TYPE.SFIXED32: 0, + PB_DATA_TYPE.FLOAT: 0.0, + PB_DATA_TYPE.FIXED64: 0, + PB_DATA_TYPE.SFIXED64: 0, + PB_DATA_TYPE.DOUBLE: 0.0, + PB_DATA_TYPE.STRING: "", + PB_DATA_TYPE.BYTES: [], + PB_DATA_TYPE.MESSAGE: null, + PB_DATA_TYPE.MAP: [] +} + +enum PB_TYPE { + VARINT = 0, + FIX64 = 1, + LENGTHDEL = 2, + STARTGROUP = 3, + ENDGROUP = 4, + FIX32 = 5, + UNDEFINED = 8 +} + +enum PB_RULE { + OPTIONAL = 0, + REQUIRED = 1, + REPEATED = 2, + RESERVED = 3 +} + +enum PB_SERVICE_STATE { + FILLED = 0, + UNFILLED = 1 +} + +class PBField: + func _init(a_name : String, a_type : int, a_rule : int, a_tag : int, packed : bool, a_value = null): + name = a_name + type = a_type + rule = a_rule + tag = a_tag + option_packed = packed + value = a_value + + var name : String + var type : int + var rule : int + var tag : int + var option_packed : bool + var value + var is_map_field : bool = false + var option_default : bool = false + +class PBTypeTag: + var ok : bool = false + var type : int + var tag : int + var offset : int + +class PBServiceField: + var field : PBField + var func_ref = null + var state : int = PB_SERVICE_STATE.UNFILLED + +class PBPacker: + static func convert_signed(n : int) -> int: + if n < -2147483648: + return (n << 1) ^ (n >> 63) + else: + return (n << 1) ^ (n >> 31) + + static func deconvert_signed(n : int) -> int: + if n & 0x01: + return ~(n >> 1) + else: + return (n >> 1) + + static func pack_varint(value) -> PoolByteArray: + var varint : PoolByteArray = PoolByteArray() + if typeof(value) == TYPE_BOOL: + if value: + value = 1 + else: + value = 0 + for _i in range(9): + var b = value & 0x7F + value >>= 7 + if value: + varint.append(b | 0x80) + else: + varint.append(b) + break + if varint.size() == 9 && varint[8] == 0xFF: + varint.append(0x01) + return varint + + static func pack_bytes(value, count : int, data_type : int) -> PoolByteArray: + var bytes : PoolByteArray = PoolByteArray() + if data_type == PB_DATA_TYPE.FLOAT: + var spb : StreamPeerBuffer = StreamPeerBuffer.new() + spb.put_float(value) + bytes = spb.get_data_array() + elif data_type == PB_DATA_TYPE.DOUBLE: + var spb : StreamPeerBuffer = StreamPeerBuffer.new() + spb.put_double(value) + bytes = spb.get_data_array() + else: + for _i in range(count): + bytes.append(value & 0xFF) + value >>= 8 + return bytes + + static func unpack_bytes(bytes : PoolByteArray, index : int, count : int, data_type : int): + var value = 0 + if data_type == PB_DATA_TYPE.FLOAT: + var spb : StreamPeerBuffer = StreamPeerBuffer.new() + for i in range(index, count + index): + spb.put_u8(bytes[i]) + spb.seek(0) + value = spb.get_float() + elif data_type == PB_DATA_TYPE.DOUBLE: + var spb : StreamPeerBuffer = StreamPeerBuffer.new() + for i in range(index, count + index): + spb.put_u8(bytes[i]) + spb.seek(0) + value = spb.get_double() + else: + for i in range(index + count - 1, index - 1, -1): + value |= (bytes[i] & 0xFF) + if i != index: + value <<= 8 + return value + + static func unpack_varint(varint_bytes) -> int: + var value : int = 0 + for i in range(varint_bytes.size() - 1, -1, -1): + value |= varint_bytes[i] & 0x7F + if i != 0: + value <<= 7 + return value + + static func pack_type_tag(type : int, tag : int) -> PoolByteArray: + return pack_varint((tag << 3) | type) + + static func isolate_varint(bytes : PoolByteArray, index : int) -> PoolByteArray: + var result : PoolByteArray = PoolByteArray() + for i in range(index, bytes.size()): + result.append(bytes[i]) + if !(bytes[i] & 0x80): + break + return result + + static func unpack_type_tag(bytes : PoolByteArray, index : int) -> PBTypeTag: + var varint_bytes : PoolByteArray = isolate_varint(bytes, index) + var result : PBTypeTag = PBTypeTag.new() + if varint_bytes.size() != 0: + result.ok = true + result.offset = varint_bytes.size() + var unpacked : int = unpack_varint(varint_bytes) + result.type = unpacked & 0x07 + result.tag = unpacked >> 3 + return result + + static func pack_length_delimeted(type : int, tag : int, bytes : PoolByteArray) -> PoolByteArray: + var result : PoolByteArray = pack_type_tag(type, tag) + result.append_array(pack_varint(bytes.size())) + result.append_array(bytes) + return result + + static func pb_type_from_data_type(data_type : int) -> int: + if data_type == PB_DATA_TYPE.INT32 || data_type == PB_DATA_TYPE.SINT32 || data_type == PB_DATA_TYPE.UINT32 || data_type == PB_DATA_TYPE.INT64 || data_type == PB_DATA_TYPE.SINT64 || data_type == PB_DATA_TYPE.UINT64 || data_type == PB_DATA_TYPE.BOOL || data_type == PB_DATA_TYPE.ENUM: + return PB_TYPE.VARINT + elif data_type == PB_DATA_TYPE.FIXED32 || data_type == PB_DATA_TYPE.SFIXED32 || data_type == PB_DATA_TYPE.FLOAT: + return PB_TYPE.FIX32 + elif data_type == PB_DATA_TYPE.FIXED64 || data_type == PB_DATA_TYPE.SFIXED64 || data_type == PB_DATA_TYPE.DOUBLE: + return PB_TYPE.FIX64 + elif data_type == PB_DATA_TYPE.STRING || data_type == PB_DATA_TYPE.BYTES || data_type == PB_DATA_TYPE.MESSAGE || data_type == PB_DATA_TYPE.MAP: + return PB_TYPE.LENGTHDEL + else: + return PB_TYPE.UNDEFINED + + static func pack_field(field : PBField) -> PoolByteArray: + var type : int = pb_type_from_data_type(field.type) + var type_copy : int = type + if field.rule == PB_RULE.REPEATED && field.option_packed: + type = PB_TYPE.LENGTHDEL + var head : PoolByteArray = pack_type_tag(type, field.tag) + var data : PoolByteArray = PoolByteArray() + if type == PB_TYPE.VARINT: + var value + if field.rule == PB_RULE.REPEATED: + for v in field.value: + data.append_array(head) + if field.type == PB_DATA_TYPE.SINT32 || field.type == PB_DATA_TYPE.SINT64: + value = convert_signed(v) + else: + value = v + data.append_array(pack_varint(value)) + return data + else: + if field.type == PB_DATA_TYPE.SINT32 || field.type == PB_DATA_TYPE.SINT64: + value = convert_signed(field.value) + else: + value = field.value + data = pack_varint(value) + elif type == PB_TYPE.FIX32: + if field.rule == PB_RULE.REPEATED: + for v in field.value: + data.append_array(head) + data.append_array(pack_bytes(v, 4, field.type)) + return data + else: + data.append_array(pack_bytes(field.value, 4, field.type)) + elif type == PB_TYPE.FIX64: + if field.rule == PB_RULE.REPEATED: + for v in field.value: + data.append_array(head) + data.append_array(pack_bytes(v, 8, field.type)) + return data + else: + data.append_array(pack_bytes(field.value, 8, field.type)) + elif type == PB_TYPE.LENGTHDEL: + if field.rule == PB_RULE.REPEATED: + if type_copy == PB_TYPE.VARINT: + if field.type == PB_DATA_TYPE.SINT32 || field.type == PB_DATA_TYPE.SINT64: + var signed_value : int + for v in field.value: + signed_value = convert_signed(v) + data.append_array(pack_varint(signed_value)) + else: + for v in field.value: + data.append_array(pack_varint(v)) + return pack_length_delimeted(type, field.tag, data) + elif type_copy == PB_TYPE.FIX32: + for v in field.value: + data.append_array(pack_bytes(v, 4, field.type)) + return pack_length_delimeted(type, field.tag, data) + elif type_copy == PB_TYPE.FIX64: + for v in field.value: + data.append_array(pack_bytes(v, 8, field.type)) + return pack_length_delimeted(type, field.tag, data) + elif field.type == PB_DATA_TYPE.STRING: + for v in field.value: + var obj = v.to_utf8() + data.append_array(pack_length_delimeted(type, field.tag, obj)) + return data + elif field.type == PB_DATA_TYPE.BYTES: + for v in field.value: + data.append_array(pack_length_delimeted(type, field.tag, v)) + return data + elif typeof(field.value[0]) == TYPE_OBJECT: + for v in field.value: + var obj : PoolByteArray = v.to_bytes() + data.append_array(pack_length_delimeted(type, field.tag, obj)) + return data + else: + if field.type == PB_DATA_TYPE.STRING: + var str_bytes : PoolByteArray = field.value.to_utf8() + if PROTO_VERSION == 2 || (PROTO_VERSION == 3 && str_bytes.size() > 0): + data.append_array(str_bytes) + return pack_length_delimeted(type, field.tag, data) + if field.type == PB_DATA_TYPE.BYTES: + if PROTO_VERSION == 2 || (PROTO_VERSION == 3 && field.value.size() > 0): + data.append_array(field.value) + return pack_length_delimeted(type, field.tag, data) + elif typeof(field.value) == TYPE_OBJECT: + var obj : PoolByteArray = field.value.to_bytes() + if obj.size() > 0: + data.append_array(obj) + return pack_length_delimeted(type, field.tag, data) + else: + pass + if data.size() > 0: + head.append_array(data) + return head + else: + return data + + static func unpack_field(bytes : PoolByteArray, offset : int, field : PBField, type : int, message_func_ref) -> int: + if field.rule == PB_RULE.REPEATED && type != PB_TYPE.LENGTHDEL && field.option_packed: + var count = isolate_varint(bytes, offset) + if count.size() > 0: + offset += count.size() + count = unpack_varint(count) + if type == PB_TYPE.VARINT: + var val + var counter = offset + count + while offset < counter: + val = isolate_varint(bytes, offset) + if val.size() > 0: + offset += val.size() + val = unpack_varint(val) + if field.type == PB_DATA_TYPE.SINT32 || field.type == PB_DATA_TYPE.SINT64: + val = deconvert_signed(val) + elif field.type == PB_DATA_TYPE.BOOL: + if val: + val = true + else: + val = false + field.value.append(val) + else: + return PB_ERR.REPEATED_COUNT_MISMATCH + return offset + elif type == PB_TYPE.FIX32 || type == PB_TYPE.FIX64: + var type_size + if type == PB_TYPE.FIX32: + type_size = 4 + else: + type_size = 8 + var val + var counter = offset + count + while offset < counter: + if (offset + type_size) > bytes.size(): + return PB_ERR.REPEATED_COUNT_MISMATCH + val = unpack_bytes(bytes, offset, type_size, field.type) + offset += type_size + field.value.append(val) + return offset + else: + return PB_ERR.REPEATED_COUNT_NOT_FOUND + else: + if type == PB_TYPE.VARINT: + var val = isolate_varint(bytes, offset) + if val.size() > 0: + offset += val.size() + val = unpack_varint(val) + if field.type == PB_DATA_TYPE.SINT32 || field.type == PB_DATA_TYPE.SINT64: + val = deconvert_signed(val) + elif field.type == PB_DATA_TYPE.BOOL: + if val: + val = true + else: + val = false + if field.rule == PB_RULE.REPEATED: + field.value.append(val) + else: + field.value = val + else: + return PB_ERR.VARINT_NOT_FOUND + return offset + elif type == PB_TYPE.FIX32 || type == PB_TYPE.FIX64: + var type_size + if type == PB_TYPE.FIX32: + type_size = 4 + else: + type_size = 8 + var val + if (offset + type_size) > bytes.size(): + return PB_ERR.REPEATED_COUNT_MISMATCH + val = unpack_bytes(bytes, offset, type_size, field.type) + offset += type_size + if field.rule == PB_RULE.REPEATED: + field.value.append(val) + else: + field.value = val + return offset + elif type == PB_TYPE.LENGTHDEL: + var inner_size = isolate_varint(bytes, offset) + if inner_size.size() > 0: + offset += inner_size.size() + inner_size = unpack_varint(inner_size) + if inner_size >= 0: + if inner_size + offset > bytes.size(): + return PB_ERR.LENGTHDEL_SIZE_MISMATCH + if message_func_ref != null: + var message = message_func_ref.call_func() + if inner_size > 0: + var sub_offset = message.from_bytes(bytes, offset, inner_size + offset) + if sub_offset > 0: + if sub_offset - offset >= inner_size: + offset = sub_offset + return offset + else: + return PB_ERR.LENGTHDEL_SIZE_MISMATCH + return sub_offset + else: + return offset + elif field.type == PB_DATA_TYPE.STRING: + var str_bytes : PoolByteArray = PoolByteArray() + for i in range(offset, inner_size + offset): + str_bytes.append(bytes[i]) + if field.rule == PB_RULE.REPEATED: + field.value.append(str_bytes.get_string_from_utf8()) + else: + field.value = str_bytes.get_string_from_utf8() + return offset + inner_size + elif field.type == PB_DATA_TYPE.BYTES: + var val_bytes : PoolByteArray = PoolByteArray() + for i in range(offset, inner_size + offset): + val_bytes.append(bytes[i]) + if field.rule == PB_RULE.REPEATED: + field.value.append(val_bytes) + else: + field.value = val_bytes + return offset + inner_size + else: + return PB_ERR.LENGTHDEL_SIZE_NOT_FOUND + else: + return PB_ERR.LENGTHDEL_SIZE_NOT_FOUND + return PB_ERR.UNDEFINED_STATE + + static func unpack_message(data, bytes : PoolByteArray, offset : int, limit : int) -> int: + while true: + var tt : PBTypeTag = unpack_type_tag(bytes, offset) + if tt.ok: + offset += tt.offset + if data.has(tt.tag): + var service : PBServiceField = data[tt.tag] + var type : int = pb_type_from_data_type(service.field.type) + if type == tt.type || (tt.type == PB_TYPE.LENGTHDEL && service.field.rule == PB_RULE.REPEATED && service.field.option_packed): + var res : int = unpack_field(bytes, offset, service.field, type, service.func_ref) + if res > 0: + service.state = PB_SERVICE_STATE.FILLED + offset = res + if offset == limit: + return offset + elif offset > limit: + return PB_ERR.PACKAGE_SIZE_MISMATCH + elif res < 0: + return res + else: + break + else: + return offset + return PB_ERR.UNDEFINED_STATE + + static func pack_message(data) -> PoolByteArray: + var DEFAULT_VALUES + if PROTO_VERSION == 2: + DEFAULT_VALUES = DEFAULT_VALUES_2 + elif PROTO_VERSION == 3: + DEFAULT_VALUES = DEFAULT_VALUES_3 + var result : PoolByteArray = PoolByteArray() + var keys : Array = data.keys() + keys.sort() + for i in keys: + if data[i].field.value != null: + if data[i].state == PB_SERVICE_STATE.UNFILLED \ + && !data[i].field.is_map_field \ + && typeof(data[i].field.value) == typeof(DEFAULT_VALUES[data[i].field.type]) \ + && data[i].field.value == DEFAULT_VALUES[data[i].field.type]: + continue + elif data[i].field.rule == PB_RULE.REPEATED && data[i].field.value.size() == 0: + continue + result.append_array(pack_field(data[i].field)) + elif data[i].field.rule == PB_RULE.REQUIRED: + print("Error: required field is not filled: Tag:", data[i].field.tag) + return PoolByteArray() + return result + + static func check_required(data) -> bool: + var keys : Array = data.keys() + for i in keys: + if data[i].field.rule == PB_RULE.REQUIRED && data[i].state == PB_SERVICE_STATE.UNFILLED: + return false + return true + + static func construct_map(key_values): + var result = {} + for kv in key_values: + result[kv.get_key()] = kv.get_value() + return result + + static func tabulate(text : String, nesting : int) -> String: + var tab : String = "" + for _i in range(nesting): + tab += DEBUG_TAB + return tab + text + + static func value_to_string(value, field : PBField, nesting : int) -> String: + var result : String = "" + var text : String + if field.type == PB_DATA_TYPE.MESSAGE: + result += "{" + nesting += 1 + text = message_to_string(value.data, nesting) + if text != "": + result += "\n" + text + nesting -= 1 + result += tabulate("}", nesting) + else: + nesting -= 1 + result += "}" + elif field.type == PB_DATA_TYPE.BYTES: + result += "<" + for i in range(value.size()): + result += String(value[i]) + if i != (value.size() - 1): + result += ", " + result += ">" + elif field.type == PB_DATA_TYPE.STRING: + result += "\"" + value + "\"" + elif field.type == PB_DATA_TYPE.ENUM: + result += "ENUM::" + String(value) + else: + result += String(value) + return result + + static func field_to_string(field : PBField, nesting : int) -> String: + var result : String = tabulate(field.name + ": ", nesting) + if field.type == PB_DATA_TYPE.MAP: + if field.value.size() > 0: + result += "(\n" + nesting += 1 + for i in range(field.value.size()): + var local_key_value = field.value[i].data[1].field + result += tabulate(value_to_string(local_key_value.value, local_key_value, nesting), nesting) + ": " + local_key_value = field.value[i].data[2].field + result += value_to_string(local_key_value.value, local_key_value, nesting) + if i != (field.value.size() - 1): + result += "," + result += "\n" + nesting -= 1 + result += tabulate(")", nesting) + else: + result += "()" + elif field.rule == PB_RULE.REPEATED: + if field.value.size() > 0: + result += "[\n" + nesting += 1 + for i in range(field.value.size()): + result += tabulate(String(i) + ": ", nesting) + result += value_to_string(field.value[i], field, nesting) + if i != (field.value.size() - 1): + result += "," + result += "\n" + nesting -= 1 + result += tabulate("]", nesting) + else: + result += "[]" + else: + result += value_to_string(field.value, field, nesting) + result += ";\n" + return result + + static func message_to_string(data, nesting : int = 0) -> String: + var DEFAULT_VALUES + if PROTO_VERSION == 2: + DEFAULT_VALUES = DEFAULT_VALUES_2 + elif PROTO_VERSION == 3: + DEFAULT_VALUES = DEFAULT_VALUES_3 + var result : String = "" + var keys : Array = data.keys() + keys.sort() + for i in keys: + if data[i].field.value != null: + if data[i].state == PB_SERVICE_STATE.UNFILLED \ + && !data[i].field.is_map_field \ + && typeof(data[i].field.value) == typeof(DEFAULT_VALUES[data[i].field.type]) \ + && data[i].field.value == DEFAULT_VALUES[data[i].field.type]: + continue + elif data[i].field.rule == PB_RULE.REPEATED && data[i].field.value.size() == 0: + continue + result += field_to_string(data[i].field, nesting) + elif data[i].field.rule == PB_RULE.REQUIRED: + result += data[i].field.name + ": " + "error" + return result + + + +############### USER DATA BEGIN ################ + + +class Test0: + func _init(): + var service + + var data = {} + + func to_string() -> String: + return PBPacker.message_to_string(data) + + func to_bytes() -> PoolByteArray: + return PBPacker.pack_message(data) + + func from_bytes(bytes : PoolByteArray, offset : int = 0, limit : int = -1) -> int: + var cur_limit = bytes.size() + if limit != -1: + cur_limit = limit + var result = PBPacker.unpack_message(data, bytes, offset, cur_limit) + if result == cur_limit: + if PBPacker.check_required(data): + if limit == -1: + return PB_ERR.NO_ERRORS + else: + return PB_ERR.REQUIRED_FIELDS + elif limit == -1 && result > 0: + return PB_ERR.PARSE_INCOMPLETE + return result + +enum Enum0 { + NULL = 0, + ONE = 1, + TWO = 2, + THREE = 3, + FOUR = 4 +} + +class Test1: + func _init(): + var service + + _f_double = PBField.new("f_double", PB_DATA_TYPE.DOUBLE, PB_RULE.OPTIONAL, 1, true, DEFAULT_VALUES_3[PB_DATA_TYPE.DOUBLE]) + service = PBServiceField.new() + service.field = _f_double + data[_f_double.tag] = service + + _f_float = PBField.new("f_float", PB_DATA_TYPE.FLOAT, PB_RULE.OPTIONAL, 2, true, DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT]) + service = PBServiceField.new() + service.field = _f_float + data[_f_float.tag] = service + + _f_int32 = PBField.new("f_int32", PB_DATA_TYPE.INT32, PB_RULE.OPTIONAL, 3, true, DEFAULT_VALUES_3[PB_DATA_TYPE.INT32]) + service = PBServiceField.new() + service.field = _f_int32 + data[_f_int32.tag] = service + + _f_int64 = PBField.new("f_int64", PB_DATA_TYPE.INT64, PB_RULE.OPTIONAL, 4, true, DEFAULT_VALUES_3[PB_DATA_TYPE.INT64]) + service = PBServiceField.new() + service.field = _f_int64 + data[_f_int64.tag] = service + + _f_uint32 = PBField.new("f_uint32", PB_DATA_TYPE.UINT32, PB_RULE.OPTIONAL, 5, true, DEFAULT_VALUES_3[PB_DATA_TYPE.UINT32]) + service = PBServiceField.new() + service.field = _f_uint32 + data[_f_uint32.tag] = service + + _f_uint64 = PBField.new("f_uint64", PB_DATA_TYPE.UINT64, PB_RULE.OPTIONAL, 6, true, DEFAULT_VALUES_3[PB_DATA_TYPE.UINT64]) + service = PBServiceField.new() + service.field = _f_uint64 + data[_f_uint64.tag] = service + + _f_sint32 = PBField.new("f_sint32", PB_DATA_TYPE.SINT32, PB_RULE.OPTIONAL, 7, true, DEFAULT_VALUES_3[PB_DATA_TYPE.SINT32]) + service = PBServiceField.new() + service.field = _f_sint32 + data[_f_sint32.tag] = service + + _f_sint64 = PBField.new("f_sint64", PB_DATA_TYPE.SINT64, PB_RULE.OPTIONAL, 8, true, DEFAULT_VALUES_3[PB_DATA_TYPE.SINT64]) + service = PBServiceField.new() + service.field = _f_sint64 + data[_f_sint64.tag] = service + + _f_fixed32 = PBField.new("f_fixed32", PB_DATA_TYPE.FIXED32, PB_RULE.OPTIONAL, 9, true, DEFAULT_VALUES_3[PB_DATA_TYPE.FIXED32]) + service = PBServiceField.new() + service.field = _f_fixed32 + data[_f_fixed32.tag] = service + + _f_fixed64 = PBField.new("f_fixed64", PB_DATA_TYPE.FIXED64, PB_RULE.OPTIONAL, 10, true, DEFAULT_VALUES_3[PB_DATA_TYPE.FIXED64]) + service = PBServiceField.new() + service.field = _f_fixed64 + data[_f_fixed64.tag] = service + + _f_sfixed32 = PBField.new("f_sfixed32", PB_DATA_TYPE.SFIXED32, PB_RULE.OPTIONAL, 11, true, DEFAULT_VALUES_3[PB_DATA_TYPE.SFIXED32]) + service = PBServiceField.new() + service.field = _f_sfixed32 + data[_f_sfixed32.tag] = service + + _f_sfixed64 = PBField.new("f_sfixed64", PB_DATA_TYPE.SFIXED64, PB_RULE.OPTIONAL, 12, true, DEFAULT_VALUES_3[PB_DATA_TYPE.SFIXED64]) + service = PBServiceField.new() + service.field = _f_sfixed64 + data[_f_sfixed64.tag] = service + + _f_bool = PBField.new("f_bool", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 13, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _f_bool + data[_f_bool.tag] = service + + _f_string = PBField.new("f_string", PB_DATA_TYPE.STRING, PB_RULE.OPTIONAL, 14, true, DEFAULT_VALUES_3[PB_DATA_TYPE.STRING]) + service = PBServiceField.new() + service.field = _f_string + data[_f_string.tag] = service + + _f_bytes = PBField.new("f_bytes", PB_DATA_TYPE.BYTES, PB_RULE.OPTIONAL, 15, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BYTES]) + service = PBServiceField.new() + service.field = _f_bytes + data[_f_bytes.tag] = service + + _f_map = PBField.new("f_map", PB_DATA_TYPE.MAP, PB_RULE.REPEATED, 16, true, []) + service = PBServiceField.new() + service.field = _f_map + service.func_ref = funcref(self, "add_empty_f_map") + data[_f_map.tag] = service + + _f_oneof_f1 = PBField.new("f_oneof_f1", PB_DATA_TYPE.STRING, PB_RULE.OPTIONAL, 17, true, DEFAULT_VALUES_3[PB_DATA_TYPE.STRING]) + service = PBServiceField.new() + service.field = _f_oneof_f1 + data[_f_oneof_f1.tag] = service + + _f_oneof_f2 = PBField.new("f_oneof_f2", PB_DATA_TYPE.INT32, PB_RULE.OPTIONAL, 18, true, DEFAULT_VALUES_3[PB_DATA_TYPE.INT32]) + service = PBServiceField.new() + service.field = _f_oneof_f2 + data[_f_oneof_f2.tag] = service + + _f_empty_out = PBField.new("f_empty_out", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 19, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) + service = PBServiceField.new() + service.field = _f_empty_out + service.func_ref = funcref(self, "new_f_empty_out") + data[_f_empty_out.tag] = service + + _f_enum_out = PBField.new("f_enum_out", PB_DATA_TYPE.ENUM, PB_RULE.OPTIONAL, 20, true, DEFAULT_VALUES_3[PB_DATA_TYPE.ENUM]) + service = PBServiceField.new() + service.field = _f_enum_out + data[_f_enum_out.tag] = service + + _f_empty_inner = PBField.new("f_empty_inner", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 21, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) + service = PBServiceField.new() + service.field = _f_empty_inner + service.func_ref = funcref(self, "new_f_empty_inner") + data[_f_empty_inner.tag] = service + + _f_enum_inner = PBField.new("f_enum_inner", PB_DATA_TYPE.ENUM, PB_RULE.OPTIONAL, 22, true, DEFAULT_VALUES_3[PB_DATA_TYPE.ENUM]) + service = PBServiceField.new() + service.field = _f_enum_inner + data[_f_enum_inner.tag] = service + + _rf_double = PBField.new("rf_double", PB_DATA_TYPE.DOUBLE, PB_RULE.REPEATED, 23, true, []) + service = PBServiceField.new() + service.field = _rf_double + data[_rf_double.tag] = service + + _rf_float = PBField.new("rf_float", PB_DATA_TYPE.FLOAT, PB_RULE.REPEATED, 24, true, []) + service = PBServiceField.new() + service.field = _rf_float + data[_rf_float.tag] = service + + _rf_int32 = PBField.new("rf_int32", PB_DATA_TYPE.INT32, PB_RULE.REPEATED, 25, true, []) + service = PBServiceField.new() + service.field = _rf_int32 + data[_rf_int32.tag] = service + + _rf_int64 = PBField.new("rf_int64", PB_DATA_TYPE.INT64, PB_RULE.REPEATED, 26, true, []) + service = PBServiceField.new() + service.field = _rf_int64 + data[_rf_int64.tag] = service + + _rf_uint32 = PBField.new("rf_uint32", PB_DATA_TYPE.UINT32, PB_RULE.REPEATED, 27, true, []) + service = PBServiceField.new() + service.field = _rf_uint32 + data[_rf_uint32.tag] = service + + _rf_uint64 = PBField.new("rf_uint64", PB_DATA_TYPE.UINT64, PB_RULE.REPEATED, 28, true, []) + service = PBServiceField.new() + service.field = _rf_uint64 + data[_rf_uint64.tag] = service + + _rf_sint32 = PBField.new("rf_sint32", PB_DATA_TYPE.SINT32, PB_RULE.REPEATED, 29, true, []) + service = PBServiceField.new() + service.field = _rf_sint32 + data[_rf_sint32.tag] = service + + _rf_sint64 = PBField.new("rf_sint64", PB_DATA_TYPE.SINT64, PB_RULE.REPEATED, 30, true, []) + service = PBServiceField.new() + service.field = _rf_sint64 + data[_rf_sint64.tag] = service + + _rf_fixed32 = PBField.new("rf_fixed32", PB_DATA_TYPE.FIXED32, PB_RULE.REPEATED, 31, true, []) + service = PBServiceField.new() + service.field = _rf_fixed32 + data[_rf_fixed32.tag] = service + + _rf_fixed64 = PBField.new("rf_fixed64", PB_DATA_TYPE.FIXED64, PB_RULE.REPEATED, 32, true, []) + service = PBServiceField.new() + service.field = _rf_fixed64 + data[_rf_fixed64.tag] = service + + _rf_sfixed32 = PBField.new("rf_sfixed32", PB_DATA_TYPE.SFIXED32, PB_RULE.REPEATED, 33, true, []) + service = PBServiceField.new() + service.field = _rf_sfixed32 + data[_rf_sfixed32.tag] = service + + _rf_sfixed64 = PBField.new("rf_sfixed64", PB_DATA_TYPE.SFIXED64, PB_RULE.REPEATED, 34, true, []) + service = PBServiceField.new() + service.field = _rf_sfixed64 + data[_rf_sfixed64.tag] = service + + _rf_bool = PBField.new("rf_bool", PB_DATA_TYPE.BOOL, PB_RULE.REPEATED, 35, true, []) + service = PBServiceField.new() + service.field = _rf_bool + data[_rf_bool.tag] = service + + _rf_string = PBField.new("rf_string", PB_DATA_TYPE.STRING, PB_RULE.REPEATED, 36, true, []) + service = PBServiceField.new() + service.field = _rf_string + data[_rf_string.tag] = service + + _rf_bytes = PBField.new("rf_bytes", PB_DATA_TYPE.BYTES, PB_RULE.REPEATED, 37, true, []) + service = PBServiceField.new() + service.field = _rf_bytes + data[_rf_bytes.tag] = service + + _rf_empty_out = PBField.new("rf_empty_out", PB_DATA_TYPE.MESSAGE, PB_RULE.REPEATED, 38, true, []) + service = PBServiceField.new() + service.field = _rf_empty_out + service.func_ref = funcref(self, "add_rf_empty_out") + data[_rf_empty_out.tag] = service + + _rf_enum_out = PBField.new("rf_enum_out", PB_DATA_TYPE.ENUM, PB_RULE.REPEATED, 39, true, []) + service = PBServiceField.new() + service.field = _rf_enum_out + data[_rf_enum_out.tag] = service + + _rf_empty_inner = PBField.new("rf_empty_inner", PB_DATA_TYPE.MESSAGE, PB_RULE.REPEATED, 40, true, []) + service = PBServiceField.new() + service.field = _rf_empty_inner + service.func_ref = funcref(self, "add_rf_empty_inner") + data[_rf_empty_inner.tag] = service + + _rf_enum_inner = PBField.new("rf_enum_inner", PB_DATA_TYPE.ENUM, PB_RULE.REPEATED, 41, true, []) + service = PBServiceField.new() + service.field = _rf_enum_inner + data[_rf_enum_inner.tag] = service + + _rfu_double = PBField.new("rfu_double", PB_DATA_TYPE.DOUBLE, PB_RULE.REPEATED, 42, false, []) + service = PBServiceField.new() + service.field = _rfu_double + data[_rfu_double.tag] = service + + _rfu_float = PBField.new("rfu_float", PB_DATA_TYPE.FLOAT, PB_RULE.REPEATED, 43, false, []) + service = PBServiceField.new() + service.field = _rfu_float + data[_rfu_float.tag] = service + + _rfu_int32f = PBField.new("rfu_int32f", PB_DATA_TYPE.INT32, PB_RULE.REPEATED, 44, false, []) + service = PBServiceField.new() + service.field = _rfu_int32f + data[_rfu_int32f.tag] = service + + _rfu_int64f = PBField.new("rfu_int64f", PB_DATA_TYPE.INT64, PB_RULE.REPEATED, 45, false, []) + service = PBServiceField.new() + service.field = _rfu_int64f + data[_rfu_int64f.tag] = service + + _rfu_uint32 = PBField.new("rfu_uint32", PB_DATA_TYPE.UINT32, PB_RULE.REPEATED, 46, false, []) + service = PBServiceField.new() + service.field = _rfu_uint32 + data[_rfu_uint32.tag] = service + + _rfu_uint64 = PBField.new("rfu_uint64", PB_DATA_TYPE.UINT64, PB_RULE.REPEATED, 47, false, []) + service = PBServiceField.new() + service.field = _rfu_uint64 + data[_rfu_uint64.tag] = service + + _rfu_sint32 = PBField.new("rfu_sint32", PB_DATA_TYPE.SINT32, PB_RULE.REPEATED, 48, false, []) + service = PBServiceField.new() + service.field = _rfu_sint32 + data[_rfu_sint32.tag] = service + + _rfu_sint64 = PBField.new("rfu_sint64", PB_DATA_TYPE.SINT64, PB_RULE.REPEATED, 49, false, []) + service = PBServiceField.new() + service.field = _rfu_sint64 + data[_rfu_sint64.tag] = service + + _rfu_fixed32 = PBField.new("rfu_fixed32", PB_DATA_TYPE.FIXED32, PB_RULE.REPEATED, 50, false, []) + service = PBServiceField.new() + service.field = _rfu_fixed32 + data[_rfu_fixed32.tag] = service + + _rfu_fixed64 = PBField.new("rfu_fixed64", PB_DATA_TYPE.FIXED64, PB_RULE.REPEATED, 51, false, []) + service = PBServiceField.new() + service.field = _rfu_fixed64 + data[_rfu_fixed64.tag] = service + + _rfu_sfixed32 = PBField.new("rfu_sfixed32", PB_DATA_TYPE.SFIXED32, PB_RULE.REPEATED, 52, false, []) + service = PBServiceField.new() + service.field = _rfu_sfixed32 + data[_rfu_sfixed32.tag] = service + + _rfu_sfixed64 = PBField.new("rfu_sfixed64", PB_DATA_TYPE.SFIXED64, PB_RULE.REPEATED, 53, false, []) + service = PBServiceField.new() + service.field = _rfu_sfixed64 + data[_rfu_sfixed64.tag] = service + + _rfu_bool = PBField.new("rfu_bool", PB_DATA_TYPE.BOOL, PB_RULE.REPEATED, 54, false, []) + service = PBServiceField.new() + service.field = _rfu_bool + data[_rfu_bool.tag] = service + + _rf_inner = PBField.new("rf_inner", PB_DATA_TYPE.MESSAGE, PB_RULE.REPEATED, 55, true, []) + service = PBServiceField.new() + service.field = _rf_inner + service.func_ref = funcref(self, "add_rf_inner") + data[_rf_inner.tag] = service + + var data = {} + + var _f_double: PBField + func get_f_double() -> float: + return _f_double.value + func clear_f_double() -> void: + data[1].state = PB_SERVICE_STATE.UNFILLED + _f_double.value = DEFAULT_VALUES_3[PB_DATA_TYPE.DOUBLE] + func set_f_double(value : float) -> void: + _f_double.value = value + + var _f_float: PBField + func get_f_float() -> float: + return _f_float.value + func clear_f_float() -> void: + data[2].state = PB_SERVICE_STATE.UNFILLED + _f_float.value = DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT] + func set_f_float(value : float) -> void: + _f_float.value = value + + var _f_int32: PBField + func get_f_int32() -> int: + return _f_int32.value + func clear_f_int32() -> void: + data[3].state = PB_SERVICE_STATE.UNFILLED + _f_int32.value = DEFAULT_VALUES_3[PB_DATA_TYPE.INT32] + func set_f_int32(value : int) -> void: + _f_int32.value = value + + var _f_int64: PBField + func get_f_int64() -> int: + return _f_int64.value + func clear_f_int64() -> void: + data[4].state = PB_SERVICE_STATE.UNFILLED + _f_int64.value = DEFAULT_VALUES_3[PB_DATA_TYPE.INT64] + func set_f_int64(value : int) -> void: + _f_int64.value = value + + var _f_uint32: PBField + func get_f_uint32() -> int: + return _f_uint32.value + func clear_f_uint32() -> void: + data[5].state = PB_SERVICE_STATE.UNFILLED + _f_uint32.value = DEFAULT_VALUES_3[PB_DATA_TYPE.UINT32] + func set_f_uint32(value : int) -> void: + _f_uint32.value = value + + var _f_uint64: PBField + func get_f_uint64() -> int: + return _f_uint64.value + func clear_f_uint64() -> void: + data[6].state = PB_SERVICE_STATE.UNFILLED + _f_uint64.value = DEFAULT_VALUES_3[PB_DATA_TYPE.UINT64] + func set_f_uint64(value : int) -> void: + _f_uint64.value = value + + var _f_sint32: PBField + func get_f_sint32() -> int: + return _f_sint32.value + func clear_f_sint32() -> void: + data[7].state = PB_SERVICE_STATE.UNFILLED + _f_sint32.value = DEFAULT_VALUES_3[PB_DATA_TYPE.SINT32] + func set_f_sint32(value : int) -> void: + _f_sint32.value = value + + var _f_sint64: PBField + func get_f_sint64() -> int: + return _f_sint64.value + func clear_f_sint64() -> void: + data[8].state = PB_SERVICE_STATE.UNFILLED + _f_sint64.value = DEFAULT_VALUES_3[PB_DATA_TYPE.SINT64] + func set_f_sint64(value : int) -> void: + _f_sint64.value = value + + var _f_fixed32: PBField + func get_f_fixed32() -> int: + return _f_fixed32.value + func clear_f_fixed32() -> void: + data[9].state = PB_SERVICE_STATE.UNFILLED + _f_fixed32.value = DEFAULT_VALUES_3[PB_DATA_TYPE.FIXED32] + func set_f_fixed32(value : int) -> void: + _f_fixed32.value = value + + var _f_fixed64: PBField + func get_f_fixed64() -> int: + return _f_fixed64.value + func clear_f_fixed64() -> void: + data[10].state = PB_SERVICE_STATE.UNFILLED + _f_fixed64.value = DEFAULT_VALUES_3[PB_DATA_TYPE.FIXED64] + func set_f_fixed64(value : int) -> void: + _f_fixed64.value = value + + var _f_sfixed32: PBField + func get_f_sfixed32() -> int: + return _f_sfixed32.value + func clear_f_sfixed32() -> void: + data[11].state = PB_SERVICE_STATE.UNFILLED + _f_sfixed32.value = DEFAULT_VALUES_3[PB_DATA_TYPE.SFIXED32] + func set_f_sfixed32(value : int) -> void: + _f_sfixed32.value = value + + var _f_sfixed64: PBField + func get_f_sfixed64() -> int: + return _f_sfixed64.value + func clear_f_sfixed64() -> void: + data[12].state = PB_SERVICE_STATE.UNFILLED + _f_sfixed64.value = DEFAULT_VALUES_3[PB_DATA_TYPE.SFIXED64] + func set_f_sfixed64(value : int) -> void: + _f_sfixed64.value = value + + var _f_bool: PBField + func get_f_bool() -> bool: + return _f_bool.value + func clear_f_bool() -> void: + data[13].state = PB_SERVICE_STATE.UNFILLED + _f_bool.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_f_bool(value : bool) -> void: + _f_bool.value = value + + var _f_string: PBField + func get_f_string() -> String: + return _f_string.value + func clear_f_string() -> void: + data[14].state = PB_SERVICE_STATE.UNFILLED + _f_string.value = DEFAULT_VALUES_3[PB_DATA_TYPE.STRING] + func set_f_string(value : String) -> void: + _f_string.value = value + + var _f_bytes: PBField + func get_f_bytes() -> PoolByteArray: + return _f_bytes.value + func clear_f_bytes() -> void: + data[15].state = PB_SERVICE_STATE.UNFILLED + _f_bytes.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BYTES] + func set_f_bytes(value : PoolByteArray) -> void: + _f_bytes.value = value + + var _f_map: PBField + func get_raw_f_map(): + return _f_map.value + func get_f_map(): + return PBPacker.construct_map(_f_map.value) + func clear_f_map(): + data[16].state = PB_SERVICE_STATE.UNFILLED + _f_map.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MAP] + func add_empty_f_map() -> int: + var element = Test1.map_type_f_map.new() + _f_map.value.append(element) + return element + func add_f_map(a_key, a_value) -> void: + var idx = -1 + for i in range(_f_map.value.size()): + if _f_map.value[i].get_key() == a_key: + idx = i + break + var element = Test1.map_type_f_map.new() + element.set_key(a_key) + element.set_value(a_value) + if idx != -1: + _f_map.value[idx] = element + else: + _f_map.value.append(element) + + var _f_oneof_f1: PBField + func has_f_oneof_f1() -> bool: + return data[17].state == PB_SERVICE_STATE.FILLED + func get_f_oneof_f1() -> String: + return _f_oneof_f1.value + func clear_f_oneof_f1() -> void: + data[17].state = PB_SERVICE_STATE.UNFILLED + _f_oneof_f1.value = DEFAULT_VALUES_3[PB_DATA_TYPE.STRING] + func set_f_oneof_f1(value : String) -> void: + data[17].state = PB_SERVICE_STATE.FILLED + _f_oneof_f2.value = DEFAULT_VALUES_3[PB_DATA_TYPE.INT32] + data[18].state = PB_SERVICE_STATE.UNFILLED + _f_oneof_f1.value = value + + var _f_oneof_f2: PBField + func has_f_oneof_f2() -> bool: + return data[18].state == PB_SERVICE_STATE.FILLED + func get_f_oneof_f2() -> int: + return _f_oneof_f2.value + func clear_f_oneof_f2() -> void: + data[18].state = PB_SERVICE_STATE.UNFILLED + _f_oneof_f2.value = DEFAULT_VALUES_3[PB_DATA_TYPE.INT32] + func set_f_oneof_f2(value : int) -> void: + _f_oneof_f1.value = DEFAULT_VALUES_3[PB_DATA_TYPE.STRING] + data[17].state = PB_SERVICE_STATE.UNFILLED + data[18].state = PB_SERVICE_STATE.FILLED + _f_oneof_f2.value = value + + var _f_empty_out: PBField + func get_f_empty_out() -> Test0: + return _f_empty_out.value + func clear_f_empty_out() -> void: + data[19].state = PB_SERVICE_STATE.UNFILLED + _f_empty_out.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] + func new_f_empty_out() -> Test0: + _f_empty_out.value = Test0.new() + return _f_empty_out.value + + var _f_enum_out: PBField + func get_f_enum_out(): + return _f_enum_out.value + func clear_f_enum_out() -> void: + data[20].state = PB_SERVICE_STATE.UNFILLED + _f_enum_out.value = DEFAULT_VALUES_3[PB_DATA_TYPE.ENUM] + func set_f_enum_out(value) -> void: + _f_enum_out.value = value + + var _f_empty_inner: PBField + func get_f_empty_inner() -> Test2.TestInner2: + return _f_empty_inner.value + func clear_f_empty_inner() -> void: + data[21].state = PB_SERVICE_STATE.UNFILLED + _f_empty_inner.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] + func new_f_empty_inner() -> Test2.TestInner2: + _f_empty_inner.value = Test2.TestInner2.new() + return _f_empty_inner.value + + var _f_enum_inner: PBField + func get_f_enum_inner(): + return _f_enum_inner.value + func clear_f_enum_inner() -> void: + data[22].state = PB_SERVICE_STATE.UNFILLED + _f_enum_inner.value = DEFAULT_VALUES_3[PB_DATA_TYPE.ENUM] + func set_f_enum_inner(value) -> void: + _f_enum_inner.value = value + + var _rf_double: PBField + func get_rf_double() -> Array: + return _rf_double.value + func clear_rf_double() -> void: + data[23].state = PB_SERVICE_STATE.UNFILLED + _rf_double.value = [] + func add_rf_double(value : float) -> void: + _rf_double.value.append(value) + + var _rf_float: PBField + func get_rf_float() -> Array: + return _rf_float.value + func clear_rf_float() -> void: + data[24].state = PB_SERVICE_STATE.UNFILLED + _rf_float.value = [] + func add_rf_float(value : float) -> void: + _rf_float.value.append(value) + + var _rf_int32: PBField + func get_rf_int32() -> Array: + return _rf_int32.value + func clear_rf_int32() -> void: + data[25].state = PB_SERVICE_STATE.UNFILLED + _rf_int32.value = [] + func add_rf_int32(value : int) -> void: + _rf_int32.value.append(value) + + var _rf_int64: PBField + func get_rf_int64() -> Array: + return _rf_int64.value + func clear_rf_int64() -> void: + data[26].state = PB_SERVICE_STATE.UNFILLED + _rf_int64.value = [] + func add_rf_int64(value : int) -> void: + _rf_int64.value.append(value) + + var _rf_uint32: PBField + func get_rf_uint32() -> Array: + return _rf_uint32.value + func clear_rf_uint32() -> void: + data[27].state = PB_SERVICE_STATE.UNFILLED + _rf_uint32.value = [] + func add_rf_uint32(value : int) -> void: + _rf_uint32.value.append(value) + + var _rf_uint64: PBField + func get_rf_uint64() -> Array: + return _rf_uint64.value + func clear_rf_uint64() -> void: + data[28].state = PB_SERVICE_STATE.UNFILLED + _rf_uint64.value = [] + func add_rf_uint64(value : int) -> void: + _rf_uint64.value.append(value) + + var _rf_sint32: PBField + func get_rf_sint32() -> Array: + return _rf_sint32.value + func clear_rf_sint32() -> void: + data[29].state = PB_SERVICE_STATE.UNFILLED + _rf_sint32.value = [] + func add_rf_sint32(value : int) -> void: + _rf_sint32.value.append(value) + + var _rf_sint64: PBField + func get_rf_sint64() -> Array: + return _rf_sint64.value + func clear_rf_sint64() -> void: + data[30].state = PB_SERVICE_STATE.UNFILLED + _rf_sint64.value = [] + func add_rf_sint64(value : int) -> void: + _rf_sint64.value.append(value) + + var _rf_fixed32: PBField + func get_rf_fixed32() -> Array: + return _rf_fixed32.value + func clear_rf_fixed32() -> void: + data[31].state = PB_SERVICE_STATE.UNFILLED + _rf_fixed32.value = [] + func add_rf_fixed32(value : int) -> void: + _rf_fixed32.value.append(value) + + var _rf_fixed64: PBField + func get_rf_fixed64() -> Array: + return _rf_fixed64.value + func clear_rf_fixed64() -> void: + data[32].state = PB_SERVICE_STATE.UNFILLED + _rf_fixed64.value = [] + func add_rf_fixed64(value : int) -> void: + _rf_fixed64.value.append(value) + + var _rf_sfixed32: PBField + func get_rf_sfixed32() -> Array: + return _rf_sfixed32.value + func clear_rf_sfixed32() -> void: + data[33].state = PB_SERVICE_STATE.UNFILLED + _rf_sfixed32.value = [] + func add_rf_sfixed32(value : int) -> void: + _rf_sfixed32.value.append(value) + + var _rf_sfixed64: PBField + func get_rf_sfixed64() -> Array: + return _rf_sfixed64.value + func clear_rf_sfixed64() -> void: + data[34].state = PB_SERVICE_STATE.UNFILLED + _rf_sfixed64.value = [] + func add_rf_sfixed64(value : int) -> void: + _rf_sfixed64.value.append(value) + + var _rf_bool: PBField + func get_rf_bool() -> Array: + return _rf_bool.value + func clear_rf_bool() -> void: + data[35].state = PB_SERVICE_STATE.UNFILLED + _rf_bool.value = [] + func add_rf_bool(value : bool) -> void: + _rf_bool.value.append(value) + + var _rf_string: PBField + func get_rf_string() -> Array: + return _rf_string.value + func clear_rf_string() -> void: + data[36].state = PB_SERVICE_STATE.UNFILLED + _rf_string.value = [] + func add_rf_string(value : String) -> void: + _rf_string.value.append(value) + + var _rf_bytes: PBField + func get_rf_bytes() -> Array: + return _rf_bytes.value + func clear_rf_bytes() -> void: + data[37].state = PB_SERVICE_STATE.UNFILLED + _rf_bytes.value = [] + func add_rf_bytes(value : PoolByteArray) -> void: + _rf_bytes.value.append(value) + + var _rf_empty_out: PBField + func get_rf_empty_out() -> Array: + return _rf_empty_out.value + func clear_rf_empty_out() -> void: + data[38].state = PB_SERVICE_STATE.UNFILLED + _rf_empty_out.value = [] + func add_rf_empty_out() -> Test0: + var element = Test0.new() + _rf_empty_out.value.append(element) + return element + + var _rf_enum_out: PBField + func get_rf_enum_out() -> Array: + return _rf_enum_out.value + func clear_rf_enum_out() -> void: + data[39].state = PB_SERVICE_STATE.UNFILLED + _rf_enum_out.value = [] + func add_rf_enum_out(value) -> void: + _rf_enum_out.value.append(value) + + var _rf_empty_inner: PBField + func get_rf_empty_inner() -> Array: + return _rf_empty_inner.value + func clear_rf_empty_inner() -> void: + data[40].state = PB_SERVICE_STATE.UNFILLED + _rf_empty_inner.value = [] + func add_rf_empty_inner() -> Test2.TestInner2: + var element = Test2.TestInner2.new() + _rf_empty_inner.value.append(element) + return element + + var _rf_enum_inner: PBField + func get_rf_enum_inner() -> Array: + return _rf_enum_inner.value + func clear_rf_enum_inner() -> void: + data[41].state = PB_SERVICE_STATE.UNFILLED + _rf_enum_inner.value = [] + func add_rf_enum_inner(value) -> void: + _rf_enum_inner.value.append(value) + + var _rfu_double: PBField + func get_rfu_double() -> Array: + return _rfu_double.value + func clear_rfu_double() -> void: + data[42].state = PB_SERVICE_STATE.UNFILLED + _rfu_double.value = [] + func add_rfu_double(value : float) -> void: + _rfu_double.value.append(value) + + var _rfu_float: PBField + func get_rfu_float() -> Array: + return _rfu_float.value + func clear_rfu_float() -> void: + data[43].state = PB_SERVICE_STATE.UNFILLED + _rfu_float.value = [] + func add_rfu_float(value : float) -> void: + _rfu_float.value.append(value) + + var _rfu_int32f: PBField + func get_rfu_int32f() -> Array: + return _rfu_int32f.value + func clear_rfu_int32f() -> void: + data[44].state = PB_SERVICE_STATE.UNFILLED + _rfu_int32f.value = [] + func add_rfu_int32f(value : int) -> void: + _rfu_int32f.value.append(value) + + var _rfu_int64f: PBField + func get_rfu_int64f() -> Array: + return _rfu_int64f.value + func clear_rfu_int64f() -> void: + data[45].state = PB_SERVICE_STATE.UNFILLED + _rfu_int64f.value = [] + func add_rfu_int64f(value : int) -> void: + _rfu_int64f.value.append(value) + + var _rfu_uint32: PBField + func get_rfu_uint32() -> Array: + return _rfu_uint32.value + func clear_rfu_uint32() -> void: + data[46].state = PB_SERVICE_STATE.UNFILLED + _rfu_uint32.value = [] + func add_rfu_uint32(value : int) -> void: + _rfu_uint32.value.append(value) + + var _rfu_uint64: PBField + func get_rfu_uint64() -> Array: + return _rfu_uint64.value + func clear_rfu_uint64() -> void: + data[47].state = PB_SERVICE_STATE.UNFILLED + _rfu_uint64.value = [] + func add_rfu_uint64(value : int) -> void: + _rfu_uint64.value.append(value) + + var _rfu_sint32: PBField + func get_rfu_sint32() -> Array: + return _rfu_sint32.value + func clear_rfu_sint32() -> void: + data[48].state = PB_SERVICE_STATE.UNFILLED + _rfu_sint32.value = [] + func add_rfu_sint32(value : int) -> void: + _rfu_sint32.value.append(value) + + var _rfu_sint64: PBField + func get_rfu_sint64() -> Array: + return _rfu_sint64.value + func clear_rfu_sint64() -> void: + data[49].state = PB_SERVICE_STATE.UNFILLED + _rfu_sint64.value = [] + func add_rfu_sint64(value : int) -> void: + _rfu_sint64.value.append(value) + + var _rfu_fixed32: PBField + func get_rfu_fixed32() -> Array: + return _rfu_fixed32.value + func clear_rfu_fixed32() -> void: + data[50].state = PB_SERVICE_STATE.UNFILLED + _rfu_fixed32.value = [] + func add_rfu_fixed32(value : int) -> void: + _rfu_fixed32.value.append(value) + + var _rfu_fixed64: PBField + func get_rfu_fixed64() -> Array: + return _rfu_fixed64.value + func clear_rfu_fixed64() -> void: + data[51].state = PB_SERVICE_STATE.UNFILLED + _rfu_fixed64.value = [] + func add_rfu_fixed64(value : int) -> void: + _rfu_fixed64.value.append(value) + + var _rfu_sfixed32: PBField + func get_rfu_sfixed32() -> Array: + return _rfu_sfixed32.value + func clear_rfu_sfixed32() -> void: + data[52].state = PB_SERVICE_STATE.UNFILLED + _rfu_sfixed32.value = [] + func add_rfu_sfixed32(value : int) -> void: + _rfu_sfixed32.value.append(value) + + var _rfu_sfixed64: PBField + func get_rfu_sfixed64() -> Array: + return _rfu_sfixed64.value + func clear_rfu_sfixed64() -> void: + data[53].state = PB_SERVICE_STATE.UNFILLED + _rfu_sfixed64.value = [] + func add_rfu_sfixed64(value : int) -> void: + _rfu_sfixed64.value.append(value) + + var _rfu_bool: PBField + func get_rfu_bool() -> Array: + return _rfu_bool.value + func clear_rfu_bool() -> void: + data[54].state = PB_SERVICE_STATE.UNFILLED + _rfu_bool.value = [] + func add_rfu_bool(value : bool) -> void: + _rfu_bool.value.append(value) + + var _rf_inner: PBField + func get_rf_inner() -> Array: + return _rf_inner.value + func clear_rf_inner() -> void: + data[55].state = PB_SERVICE_STATE.UNFILLED + _rf_inner.value = [] + func add_rf_inner() -> Test2.TestInner3.TestInner3_2: + var element = Test2.TestInner3.TestInner3_2.new() + _rf_inner.value.append(element) + return element + + class map_type_f_map: + func _init(): + var service + + _key = PBField.new("key", PB_DATA_TYPE.INT32, PB_RULE.REQUIRED, 1, true, DEFAULT_VALUES_3[PB_DATA_TYPE.INT32]) + _key.is_map_field = true + service = PBServiceField.new() + service.field = _key + data[_key.tag] = service + + _value = PBField.new("value", PB_DATA_TYPE.INT32, PB_RULE.REQUIRED, 2, true, DEFAULT_VALUES_3[PB_DATA_TYPE.INT32]) + _value.is_map_field = true + service = PBServiceField.new() + service.field = _value + data[_value.tag] = service + + var data = {} + + var _key: PBField + func get_key() -> int: + return _key.value + func clear_key() -> void: + data[1].state = PB_SERVICE_STATE.UNFILLED + _key.value = DEFAULT_VALUES_3[PB_DATA_TYPE.INT32] + func set_key(value : int) -> void: + _key.value = value + + var _value: PBField + func get_value() -> int: + return _value.value + func clear_value() -> void: + data[2].state = PB_SERVICE_STATE.UNFILLED + _value.value = DEFAULT_VALUES_3[PB_DATA_TYPE.INT32] + func set_value(value : int) -> void: + _value.value = value + + func to_string() -> String: + return PBPacker.message_to_string(data) + + func to_bytes() -> PoolByteArray: + return PBPacker.pack_message(data) + + func from_bytes(bytes : PoolByteArray, offset : int = 0, limit : int = -1) -> int: + var cur_limit = bytes.size() + if limit != -1: + cur_limit = limit + var result = PBPacker.unpack_message(data, bytes, offset, cur_limit) + if result == cur_limit: + if PBPacker.check_required(data): + if limit == -1: + return PB_ERR.NO_ERRORS + else: + return PB_ERR.REQUIRED_FIELDS + elif limit == -1 && result > 0: + return PB_ERR.PARSE_INCOMPLETE + return result + + func to_string() -> String: + return PBPacker.message_to_string(data) + + func to_bytes() -> PoolByteArray: + return PBPacker.pack_message(data) + + func from_bytes(bytes : PoolByteArray, offset : int = 0, limit : int = -1) -> int: + var cur_limit = bytes.size() + if limit != -1: + cur_limit = limit + var result = PBPacker.unpack_message(data, bytes, offset, cur_limit) + if result == cur_limit: + if PBPacker.check_required(data): + if limit == -1: + return PB_ERR.NO_ERRORS + else: + return PB_ERR.REQUIRED_FIELDS + elif limit == -1 && result > 0: + return PB_ERR.PARSE_INCOMPLETE + return result + +class Test2: + func _init(): + var service + + _f1 = PBField.new("f1", PB_DATA_TYPE.STRING, PB_RULE.REPEATED, 1, true, []) + service = PBServiceField.new() + service.field = _f1 + data[_f1.tag] = service + + _f2 = PBField.new("f2", PB_DATA_TYPE.FIXED64, PB_RULE.OPTIONAL, 2, true, DEFAULT_VALUES_3[PB_DATA_TYPE.FIXED64]) + service = PBServiceField.new() + service.field = _f2 + data[_f2.tag] = service + + _f3 = PBField.new("f3", PB_DATA_TYPE.STRING, PB_RULE.OPTIONAL, 3, true, DEFAULT_VALUES_3[PB_DATA_TYPE.STRING]) + service = PBServiceField.new() + service.field = _f3 + data[_f3.tag] = service + + _f4 = PBField.new("f4", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 4, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) + service = PBServiceField.new() + service.field = _f4 + service.func_ref = funcref(self, "new_f4") + data[_f4.tag] = service + + _f5 = PBField.new("f5", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 5, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) + service = PBServiceField.new() + service.field = _f5 + service.func_ref = funcref(self, "new_f5") + data[_f5.tag] = service + + _f6 = PBField.new("f6", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 6, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) + service = PBServiceField.new() + service.field = _f6 + service.func_ref = funcref(self, "new_f6") + data[_f6.tag] = service + + _f7 = PBField.new("f7", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 7, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) + service = PBServiceField.new() + service.field = _f7 + service.func_ref = funcref(self, "new_f7") + data[_f7.tag] = service + + var data = {} + + var _f1: PBField + func get_f1() -> Array: + return _f1.value + func clear_f1() -> void: + data[1].state = PB_SERVICE_STATE.UNFILLED + _f1.value = [] + func add_f1(value : String) -> void: + _f1.value.append(value) + + var _f2: PBField + func get_f2() -> int: + return _f2.value + func clear_f2() -> void: + data[2].state = PB_SERVICE_STATE.UNFILLED + _f2.value = DEFAULT_VALUES_3[PB_DATA_TYPE.FIXED64] + func set_f2(value : int) -> void: + _f2.value = value + + var _f3: PBField + func has_f3() -> bool: + return data[3].state == PB_SERVICE_STATE.FILLED + func get_f3() -> String: + return _f3.value + func clear_f3() -> void: + data[3].state = PB_SERVICE_STATE.UNFILLED + _f3.value = DEFAULT_VALUES_3[PB_DATA_TYPE.STRING] + func set_f3(value : String) -> void: + data[3].state = PB_SERVICE_STATE.FILLED + _f4.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] + data[4].state = PB_SERVICE_STATE.UNFILLED + _f3.value = value + + var _f4: PBField + func has_f4() -> bool: + return data[4].state == PB_SERVICE_STATE.FILLED + func get_f4() -> Test2.TestInner3: + return _f4.value + func clear_f4() -> void: + data[4].state = PB_SERVICE_STATE.UNFILLED + _f4.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] + func new_f4() -> Test2.TestInner3: + _f3.value = DEFAULT_VALUES_3[PB_DATA_TYPE.STRING] + data[3].state = PB_SERVICE_STATE.UNFILLED + data[4].state = PB_SERVICE_STATE.FILLED + _f4.value = Test2.TestInner3.new() + return _f4.value + + var _f5: PBField + func get_f5() -> Test2.TestInner2: + return _f5.value + func clear_f5() -> void: + data[5].state = PB_SERVICE_STATE.UNFILLED + _f5.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] + func new_f5() -> Test2.TestInner2: + _f5.value = Test2.TestInner2.new() + return _f5.value + + var _f6: PBField + func get_f6() -> Test2.TestInner3: + return _f6.value + func clear_f6() -> void: + data[6].state = PB_SERVICE_STATE.UNFILLED + _f6.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] + func new_f6() -> Test2.TestInner3: + _f6.value = Test2.TestInner3.new() + return _f6.value + + var _f7: PBField + func get_f7() -> Test2.TestInner1: + return _f7.value + func clear_f7() -> void: + data[7].state = PB_SERVICE_STATE.UNFILLED + _f7.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] + func new_f7() -> Test2.TestInner1: + _f7.value = Test2.TestInner1.new() + return _f7.value + + enum TestEnum { + VALUE_0 = 0, + VALUE_1 = 1, + VALUE_2 = 2, + VALUE_3 = 3 + } + + class TestInner1: + func _init(): + var service + + _f1 = PBField.new("f1", PB_DATA_TYPE.DOUBLE, PB_RULE.REPEATED, 1, true, []) + service = PBServiceField.new() + service.field = _f1 + data[_f1.tag] = service + + _f2 = PBField.new("f2", PB_DATA_TYPE.FLOAT, PB_RULE.OPTIONAL, 2, true, DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT]) + service = PBServiceField.new() + service.field = _f2 + data[_f2.tag] = service + + _f3 = PBField.new("f3", PB_DATA_TYPE.STRING, PB_RULE.OPTIONAL, 3, true, DEFAULT_VALUES_3[PB_DATA_TYPE.STRING]) + service = PBServiceField.new() + service.field = _f3 + data[_f3.tag] = service + + var data = {} + + var _f1: PBField + func get_f1() -> Array: + return _f1.value + func clear_f1() -> void: + data[1].state = PB_SERVICE_STATE.UNFILLED + _f1.value = [] + func add_f1(value : float) -> void: + _f1.value.append(value) + + var _f2: PBField + func get_f2() -> float: + return _f2.value + func clear_f2() -> void: + data[2].state = PB_SERVICE_STATE.UNFILLED + _f2.value = DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT] + func set_f2(value : float) -> void: + _f2.value = value + + var _f3: PBField + func get_f3() -> String: + return _f3.value + func clear_f3() -> void: + data[3].state = PB_SERVICE_STATE.UNFILLED + _f3.value = DEFAULT_VALUES_3[PB_DATA_TYPE.STRING] + func set_f3(value : String) -> void: + _f3.value = value + + func to_string() -> String: + return PBPacker.message_to_string(data) + + func to_bytes() -> PoolByteArray: + return PBPacker.pack_message(data) + + func from_bytes(bytes : PoolByteArray, offset : int = 0, limit : int = -1) -> int: + var cur_limit = bytes.size() + if limit != -1: + cur_limit = limit + var result = PBPacker.unpack_message(data, bytes, offset, cur_limit) + if result == cur_limit: + if PBPacker.check_required(data): + if limit == -1: + return PB_ERR.NO_ERRORS + else: + return PB_ERR.REQUIRED_FIELDS + elif limit == -1 && result > 0: + return PB_ERR.PARSE_INCOMPLETE + return result + + class TestInner2: + func _init(): + var service + + var data = {} + + func to_string() -> String: + return PBPacker.message_to_string(data) + + func to_bytes() -> PoolByteArray: + return PBPacker.pack_message(data) + + func from_bytes(bytes : PoolByteArray, offset : int = 0, limit : int = -1) -> int: + var cur_limit = bytes.size() + if limit != -1: + cur_limit = limit + var result = PBPacker.unpack_message(data, bytes, offset, cur_limit) + if result == cur_limit: + if PBPacker.check_required(data): + if limit == -1: + return PB_ERR.NO_ERRORS + else: + return PB_ERR.REQUIRED_FIELDS + elif limit == -1 && result > 0: + return PB_ERR.PARSE_INCOMPLETE + return result + + class TestInner3: + func _init(): + var service + + _f1 = PBField.new("f1", PB_DATA_TYPE.MAP, PB_RULE.REPEATED, 1, true, []) + service = PBServiceField.new() + service.field = _f1 + service.func_ref = funcref(self, "add_empty_f1") + data[_f1.tag] = service + + _f2 = PBField.new("f2", PB_DATA_TYPE.ENUM, PB_RULE.OPTIONAL, 2, true, DEFAULT_VALUES_3[PB_DATA_TYPE.ENUM]) + service = PBServiceField.new() + service.field = _f2 + data[_f2.tag] = service + + _f3 = PBField.new("f3", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 3, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) + service = PBServiceField.new() + service.field = _f3 + service.func_ref = funcref(self, "new_f3") + data[_f3.tag] = service + + var data = {} + + var _f1: PBField + func get_raw_f1(): + return _f1.value + func get_f1(): + return PBPacker.construct_map(_f1.value) + func clear_f1(): + data[1].state = PB_SERVICE_STATE.UNFILLED + _f1.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MAP] + func add_empty_f1() -> Test2.TestInner3.map_type_f1: + var element = Test2.TestInner3.map_type_f1.new() + _f1.value.append(element) + return element + func add_f1(a_key) -> Test2.TestInner3.map_type_f1: + var idx = -1 + for i in range(_f1.value.size()): + if _f1.value[i].get_key() == a_key: + idx = i + break + var element = Test2.TestInner3.map_type_f1.new() + element.set_key(a_key) + if idx != -1: + _f1.value[idx] = element + else: + _f1.value.append(element) + return element.new_value() + + var _f2: PBField + func get_f2(): + return _f2.value + func clear_f2() -> void: + data[2].state = PB_SERVICE_STATE.UNFILLED + _f2.value = DEFAULT_VALUES_3[PB_DATA_TYPE.ENUM] + func set_f2(value) -> void: + _f2.value = value + + var _f3: PBField + func get_f3() -> Test2.TestInner3.TestInner3_1: + return _f3.value + func clear_f3() -> void: + data[3].state = PB_SERVICE_STATE.UNFILLED + _f3.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] + func new_f3() -> Test2.TestInner3.TestInner3_1: + _f3.value = Test2.TestInner3.TestInner3_1.new() + return _f3.value + + class TestInner3_1: + func _init(): + var service + + var data = {} + + func to_string() -> String: + return PBPacker.message_to_string(data) + + func to_bytes() -> PoolByteArray: + return PBPacker.pack_message(data) + + func from_bytes(bytes : PoolByteArray, offset : int = 0, limit : int = -1) -> int: + var cur_limit = bytes.size() + if limit != -1: + cur_limit = limit + var result = PBPacker.unpack_message(data, bytes, offset, cur_limit) + if result == cur_limit: + if PBPacker.check_required(data): + if limit == -1: + return PB_ERR.NO_ERRORS + else: + return PB_ERR.REQUIRED_FIELDS + elif limit == -1 && result > 0: + return PB_ERR.PARSE_INCOMPLETE + return result + + class TestInner3_2: + func _init(): + var service + + _f1 = PBField.new("f1", PB_DATA_TYPE.INT32, PB_RULE.OPTIONAL, 1, true, DEFAULT_VALUES_3[PB_DATA_TYPE.INT32]) + service = PBServiceField.new() + service.field = _f1 + data[_f1.tag] = service + + _f2 = PBField.new("f2", PB_DATA_TYPE.UINT64, PB_RULE.OPTIONAL, 2, true, DEFAULT_VALUES_3[PB_DATA_TYPE.UINT64]) + service = PBServiceField.new() + service.field = _f2 + data[_f2.tag] = service + + var data = {} + + var _f1: PBField + func get_f1() -> int: + return _f1.value + func clear_f1() -> void: + data[1].state = PB_SERVICE_STATE.UNFILLED + _f1.value = DEFAULT_VALUES_3[PB_DATA_TYPE.INT32] + func set_f1(value : int) -> void: + _f1.value = value + + var _f2: PBField + func get_f2() -> int: + return _f2.value + func clear_f2() -> void: + data[2].state = PB_SERVICE_STATE.UNFILLED + _f2.value = DEFAULT_VALUES_3[PB_DATA_TYPE.UINT64] + func set_f2(value : int) -> void: + _f2.value = value + + func to_string() -> String: + return PBPacker.message_to_string(data) + + func to_bytes() -> PoolByteArray: + return PBPacker.pack_message(data) + + func from_bytes(bytes : PoolByteArray, offset : int = 0, limit : int = -1) -> int: + var cur_limit = bytes.size() + if limit != -1: + cur_limit = limit + var result = PBPacker.unpack_message(data, bytes, offset, cur_limit) + if result == cur_limit: + if PBPacker.check_required(data): + if limit == -1: + return PB_ERR.NO_ERRORS + else: + return PB_ERR.REQUIRED_FIELDS + elif limit == -1 && result > 0: + return PB_ERR.PARSE_INCOMPLETE + return result + + class map_type_f1: + func _init(): + var service + + _key = PBField.new("key", PB_DATA_TYPE.STRING, PB_RULE.REQUIRED, 1, true, DEFAULT_VALUES_3[PB_DATA_TYPE.STRING]) + _key.is_map_field = true + service = PBServiceField.new() + service.field = _key + data[_key.tag] = service + + _value = PBField.new("value", PB_DATA_TYPE.MESSAGE, PB_RULE.REQUIRED, 2, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) + _value.is_map_field = true + service = PBServiceField.new() + service.field = _value + service.func_ref = funcref(self, "new_value") + data[_value.tag] = service + + var data = {} + + var _key: PBField + func get_key() -> String: + return _key.value + func clear_key() -> void: + data[1].state = PB_SERVICE_STATE.UNFILLED + _key.value = DEFAULT_VALUES_3[PB_DATA_TYPE.STRING] + func set_key(value : String) -> void: + _key.value = value + + var _value: PBField + func get_value() -> Test2.TestInner3.TestInner3_2: + return _value.value + func clear_value() -> void: + data[2].state = PB_SERVICE_STATE.UNFILLED + _value.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] + func new_value() -> Test2.TestInner3.TestInner3_2: + _value.value = Test2.TestInner3.TestInner3_2.new() + return _value.value + + func to_string() -> String: + return PBPacker.message_to_string(data) + + func to_bytes() -> PoolByteArray: + return PBPacker.pack_message(data) + + func from_bytes(bytes : PoolByteArray, offset : int = 0, limit : int = -1) -> int: + var cur_limit = bytes.size() + if limit != -1: + cur_limit = limit + var result = PBPacker.unpack_message(data, bytes, offset, cur_limit) + if result == cur_limit: + if PBPacker.check_required(data): + if limit == -1: + return PB_ERR.NO_ERRORS + else: + return PB_ERR.REQUIRED_FIELDS + elif limit == -1 && result > 0: + return PB_ERR.PARSE_INCOMPLETE + return result + + func to_string() -> String: + return PBPacker.message_to_string(data) + + func to_bytes() -> PoolByteArray: + return PBPacker.pack_message(data) + + func from_bytes(bytes : PoolByteArray, offset : int = 0, limit : int = -1) -> int: + var cur_limit = bytes.size() + if limit != -1: + cur_limit = limit + var result = PBPacker.unpack_message(data, bytes, offset, cur_limit) + if result == cur_limit: + if PBPacker.check_required(data): + if limit == -1: + return PB_ERR.NO_ERRORS + else: + return PB_ERR.REQUIRED_FIELDS + elif limit == -1 && result > 0: + return PB_ERR.PARSE_INCOMPLETE + return result + + func to_string() -> String: + return PBPacker.message_to_string(data) + + func to_bytes() -> PoolByteArray: + return PBPacker.pack_message(data) + + func from_bytes(bytes : PoolByteArray, offset : int = 0, limit : int = -1) -> int: + var cur_limit = bytes.size() + if limit != -1: + cur_limit = limit + var result = PBPacker.unpack_message(data, bytes, offset, cur_limit) + if result == cur_limit: + if PBPacker.check_required(data): + if limit == -1: + return PB_ERR.NO_ERRORS + else: + return PB_ERR.REQUIRED_FIELDS + elif limit == -1 && result > 0: + return PB_ERR.PARSE_INCOMPLETE + return result + +class Test4: + func _init(): + var service + + _f1 = PBField.new("f1", PB_DATA_TYPE.INT32, PB_RULE.OPTIONAL, 10, true, DEFAULT_VALUES_3[PB_DATA_TYPE.INT32]) + service = PBServiceField.new() + service.field = _f1 + data[_f1.tag] = service + + _f2 = PBField.new("f2", PB_DATA_TYPE.STRING, PB_RULE.OPTIONAL, 3, true, DEFAULT_VALUES_3[PB_DATA_TYPE.STRING]) + service = PBServiceField.new() + service.field = _f2 + data[_f2.tag] = service + + _f3 = PBField.new("f3", PB_DATA_TYPE.FLOAT, PB_RULE.OPTIONAL, 2, true, DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT]) + service = PBServiceField.new() + service.field = _f3 + data[_f3.tag] = service + + _f4 = PBField.new("f4", PB_DATA_TYPE.DOUBLE, PB_RULE.OPTIONAL, 160, true, DEFAULT_VALUES_3[PB_DATA_TYPE.DOUBLE]) + service = PBServiceField.new() + service.field = _f4 + data[_f4.tag] = service + + _f5 = PBField.new("f5", PB_DATA_TYPE.MAP, PB_RULE.REPEATED, 99, true, []) + service = PBServiceField.new() + service.field = _f5 + service.func_ref = funcref(self, "add_empty_f5") + data[_f5.tag] = service + + var data = {} + + var _f1: PBField + func get_f1() -> int: + return _f1.value + func clear_f1() -> void: + data[10].state = PB_SERVICE_STATE.UNFILLED + _f1.value = DEFAULT_VALUES_3[PB_DATA_TYPE.INT32] + func set_f1(value : int) -> void: + _f1.value = value + + var _f2: PBField + func get_f2() -> String: + return _f2.value + func clear_f2() -> void: + data[3].state = PB_SERVICE_STATE.UNFILLED + _f2.value = DEFAULT_VALUES_3[PB_DATA_TYPE.STRING] + func set_f2(value : String) -> void: + _f2.value = value + + var _f3: PBField + func get_f3() -> float: + return _f3.value + func clear_f3() -> void: + data[2].state = PB_SERVICE_STATE.UNFILLED + _f3.value = DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT] + func set_f3(value : float) -> void: + _f3.value = value + + var _f4: PBField + func get_f4() -> float: + return _f4.value + func clear_f4() -> void: + data[160].state = PB_SERVICE_STATE.UNFILLED + _f4.value = DEFAULT_VALUES_3[PB_DATA_TYPE.DOUBLE] + func set_f4(value : float) -> void: + _f4.value = value + + var _f5: PBField + func get_raw_f5(): + return _f5.value + func get_f5(): + return PBPacker.construct_map(_f5.value) + func clear_f5(): + data[99].state = PB_SERVICE_STATE.UNFILLED + _f5.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MAP] + func add_empty_f5() -> int: + var element = Test4.map_type_f5.new() + _f5.value.append(element) + return element + func add_f5(a_key, a_value) -> void: + var idx = -1 + for i in range(_f5.value.size()): + if _f5.value[i].get_key() == a_key: + idx = i + break + var element = Test4.map_type_f5.new() + element.set_key(a_key) + element.set_value(a_value) + if idx != -1: + _f5.value[idx] = element + else: + _f5.value.append(element) + + class map_type_f5: + func _init(): + var service + + _key = PBField.new("key", PB_DATA_TYPE.INT32, PB_RULE.REQUIRED, 1, true, DEFAULT_VALUES_3[PB_DATA_TYPE.INT32]) + _key.is_map_field = true + service = PBServiceField.new() + service.field = _key + data[_key.tag] = service + + _value = PBField.new("value", PB_DATA_TYPE.INT32, PB_RULE.REQUIRED, 2, true, DEFAULT_VALUES_3[PB_DATA_TYPE.INT32]) + _value.is_map_field = true + service = PBServiceField.new() + service.field = _value + data[_value.tag] = service + + var data = {} + + var _key: PBField + func get_key() -> int: + return _key.value + func clear_key() -> void: + data[1].state = PB_SERVICE_STATE.UNFILLED + _key.value = DEFAULT_VALUES_3[PB_DATA_TYPE.INT32] + func set_key(value : int) -> void: + _key.value = value + + var _value: PBField + func get_value() -> int: + return _value.value + func clear_value() -> void: + data[2].state = PB_SERVICE_STATE.UNFILLED + _value.value = DEFAULT_VALUES_3[PB_DATA_TYPE.INT32] + func set_value(value : int) -> void: + _value.value = value + + func to_string() -> String: + return PBPacker.message_to_string(data) + + func to_bytes() -> PoolByteArray: + return PBPacker.pack_message(data) + + func from_bytes(bytes : PoolByteArray, offset : int = 0, limit : int = -1) -> int: + var cur_limit = bytes.size() + if limit != -1: + cur_limit = limit + var result = PBPacker.unpack_message(data, bytes, offset, cur_limit) + if result == cur_limit: + if PBPacker.check_required(data): + if limit == -1: + return PB_ERR.NO_ERRORS + else: + return PB_ERR.REQUIRED_FIELDS + elif limit == -1 && result > 0: + return PB_ERR.PARSE_INCOMPLETE + return result + + func to_string() -> String: + return PBPacker.message_to_string(data) + + func to_bytes() -> PoolByteArray: + return PBPacker.pack_message(data) + + func from_bytes(bytes : PoolByteArray, offset : int = 0, limit : int = -1) -> int: + var cur_limit = bytes.size() + if limit != -1: + cur_limit = limit + var result = PBPacker.unpack_message(data, bytes, offset, cur_limit) + if result == cur_limit: + if PBPacker.check_required(data): + if limit == -1: + return PB_ERR.NO_ERRORS + else: + return PB_ERR.REQUIRED_FIELDS + elif limit == -1 && result > 0: + return PB_ERR.PARSE_INCOMPLETE + return result + +################ USER DATA END ################# diff --git a/project.godot b/project.godot index 7cd22479..252a10dd 100644 --- a/project.godot +++ b/project.godot @@ -47,6 +47,10 @@ window/vsync/use_vsync=false window/per_pixel_transparency/allowed=true window/per_pixel_transparency/enabled=true +[editor_plugins] + +enabled=PoolStringArray( "res://addons/protobuf/plugin.cfg" ) + [global] logg=true diff --git a/waypoint.gd b/waypoint.gd new file mode 100644 index 00000000..ab27ee95 --- /dev/null +++ b/waypoint.gd @@ -0,0 +1,4328 @@ +const PROTO_VERSION = 3 + +# +# BSD 3-Clause License +# +# Copyright (c) 2018 - 2022, Oleg Malyavkin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# * Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# DEBUG_TAB redefine this " " if you need, example: const DEBUG_TAB = "\t" +const DEBUG_TAB : String = " " + +enum PB_ERR { + NO_ERRORS = 0, + VARINT_NOT_FOUND = -1, + REPEATED_COUNT_NOT_FOUND = -2, + REPEATED_COUNT_MISMATCH = -3, + LENGTHDEL_SIZE_NOT_FOUND = -4, + LENGTHDEL_SIZE_MISMATCH = -5, + PACKAGE_SIZE_MISMATCH = -6, + UNDEFINED_STATE = -7, + PARSE_INCOMPLETE = -8, + REQUIRED_FIELDS = -9 +} + +enum PB_DATA_TYPE { + INT32 = 0, + SINT32 = 1, + UINT32 = 2, + INT64 = 3, + SINT64 = 4, + UINT64 = 5, + BOOL = 6, + ENUM = 7, + FIXED32 = 8, + SFIXED32 = 9, + FLOAT = 10, + FIXED64 = 11, + SFIXED64 = 12, + DOUBLE = 13, + STRING = 14, + BYTES = 15, + MESSAGE = 16, + MAP = 17 +} + +const DEFAULT_VALUES_2 = { + PB_DATA_TYPE.INT32: null, + PB_DATA_TYPE.SINT32: null, + PB_DATA_TYPE.UINT32: null, + PB_DATA_TYPE.INT64: null, + PB_DATA_TYPE.SINT64: null, + PB_DATA_TYPE.UINT64: null, + PB_DATA_TYPE.BOOL: null, + PB_DATA_TYPE.ENUM: null, + PB_DATA_TYPE.FIXED32: null, + PB_DATA_TYPE.SFIXED32: null, + PB_DATA_TYPE.FLOAT: null, + PB_DATA_TYPE.FIXED64: null, + PB_DATA_TYPE.SFIXED64: null, + PB_DATA_TYPE.DOUBLE: null, + PB_DATA_TYPE.STRING: null, + PB_DATA_TYPE.BYTES: null, + PB_DATA_TYPE.MESSAGE: null, + PB_DATA_TYPE.MAP: null +} + +const DEFAULT_VALUES_3 = { + PB_DATA_TYPE.INT32: 0, + PB_DATA_TYPE.SINT32: 0, + PB_DATA_TYPE.UINT32: 0, + PB_DATA_TYPE.INT64: 0, + PB_DATA_TYPE.SINT64: 0, + PB_DATA_TYPE.UINT64: 0, + PB_DATA_TYPE.BOOL: false, + PB_DATA_TYPE.ENUM: 0, + PB_DATA_TYPE.FIXED32: 0, + PB_DATA_TYPE.SFIXED32: 0, + PB_DATA_TYPE.FLOAT: 0.0, + PB_DATA_TYPE.FIXED64: 0, + PB_DATA_TYPE.SFIXED64: 0, + PB_DATA_TYPE.DOUBLE: 0.0, + PB_DATA_TYPE.STRING: "", + PB_DATA_TYPE.BYTES: [], + PB_DATA_TYPE.MESSAGE: null, + PB_DATA_TYPE.MAP: [] +} + +enum PB_TYPE { + VARINT = 0, + FIX64 = 1, + LENGTHDEL = 2, + STARTGROUP = 3, + ENDGROUP = 4, + FIX32 = 5, + UNDEFINED = 8 +} + +enum PB_RULE { + OPTIONAL = 0, + REQUIRED = 1, + REPEATED = 2, + RESERVED = 3 +} + +enum PB_SERVICE_STATE { + FILLED = 0, + UNFILLED = 1 +} + +class PBField: + func _init(a_name : String, a_type : int, a_rule : int, a_tag : int, packed : bool, a_value = null): + name = a_name + type = a_type + rule = a_rule + tag = a_tag + option_packed = packed + value = a_value + + var name : String + var type : int + var rule : int + var tag : int + var option_packed : bool + var value + var is_map_field : bool = false + var option_default : bool = false + +class PBTypeTag: + var ok : bool = false + var type : int + var tag : int + var offset : int + +class PBServiceField: + var field : PBField + var func_ref = null + var state : int = PB_SERVICE_STATE.UNFILLED + +class PBPacker: + static func convert_signed(n : int) -> int: + if n < -2147483648: + return (n << 1) ^ (n >> 63) + else: + return (n << 1) ^ (n >> 31) + + static func deconvert_signed(n : int) -> int: + if n & 0x01: + return ~(n >> 1) + else: + return (n >> 1) + + static func pack_varint(value) -> PoolByteArray: + var varint : PoolByteArray = PoolByteArray() + if typeof(value) == TYPE_BOOL: + if value: + value = 1 + else: + value = 0 + for _i in range(9): + var b = value & 0x7F + value >>= 7 + if value: + varint.append(b | 0x80) + else: + varint.append(b) + break + if varint.size() == 9 && varint[8] == 0xFF: + varint.append(0x01) + return varint + + static func pack_bytes(value, count : int, data_type : int) -> PoolByteArray: + var bytes : PoolByteArray = PoolByteArray() + if data_type == PB_DATA_TYPE.FLOAT: + var spb : StreamPeerBuffer = StreamPeerBuffer.new() + spb.put_float(value) + bytes = spb.get_data_array() + elif data_type == PB_DATA_TYPE.DOUBLE: + var spb : StreamPeerBuffer = StreamPeerBuffer.new() + spb.put_double(value) + bytes = spb.get_data_array() + else: + for _i in range(count): + bytes.append(value & 0xFF) + value >>= 8 + return bytes + + static func unpack_bytes(bytes : PoolByteArray, index : int, count : int, data_type : int): + var value = 0 + if data_type == PB_DATA_TYPE.FLOAT: + var spb : StreamPeerBuffer = StreamPeerBuffer.new() + for i in range(index, count + index): + spb.put_u8(bytes[i]) + spb.seek(0) + value = spb.get_float() + elif data_type == PB_DATA_TYPE.DOUBLE: + var spb : StreamPeerBuffer = StreamPeerBuffer.new() + for i in range(index, count + index): + spb.put_u8(bytes[i]) + spb.seek(0) + value = spb.get_double() + else: + for i in range(index + count - 1, index - 1, -1): + value |= (bytes[i] & 0xFF) + if i != index: + value <<= 8 + return value + + static func unpack_varint(varint_bytes) -> int: + var value : int = 0 + for i in range(varint_bytes.size() - 1, -1, -1): + value |= varint_bytes[i] & 0x7F + if i != 0: + value <<= 7 + return value + + static func pack_type_tag(type : int, tag : int) -> PoolByteArray: + return pack_varint((tag << 3) | type) + + static func isolate_varint(bytes : PoolByteArray, index : int) -> PoolByteArray: + var result : PoolByteArray = PoolByteArray() + for i in range(index, bytes.size()): + result.append(bytes[i]) + if !(bytes[i] & 0x80): + break + return result + + static func unpack_type_tag(bytes : PoolByteArray, index : int) -> PBTypeTag: + var varint_bytes : PoolByteArray = isolate_varint(bytes, index) + var result : PBTypeTag = PBTypeTag.new() + if varint_bytes.size() != 0: + result.ok = true + result.offset = varint_bytes.size() + var unpacked : int = unpack_varint(varint_bytes) + result.type = unpacked & 0x07 + result.tag = unpacked >> 3 + return result + + static func pack_length_delimeted(type : int, tag : int, bytes : PoolByteArray) -> PoolByteArray: + var result : PoolByteArray = pack_type_tag(type, tag) + result.append_array(pack_varint(bytes.size())) + result.append_array(bytes) + return result + + static func pb_type_from_data_type(data_type : int) -> int: + if data_type == PB_DATA_TYPE.INT32 || data_type == PB_DATA_TYPE.SINT32 || data_type == PB_DATA_TYPE.UINT32 || data_type == PB_DATA_TYPE.INT64 || data_type == PB_DATA_TYPE.SINT64 || data_type == PB_DATA_TYPE.UINT64 || data_type == PB_DATA_TYPE.BOOL || data_type == PB_DATA_TYPE.ENUM: + return PB_TYPE.VARINT + elif data_type == PB_DATA_TYPE.FIXED32 || data_type == PB_DATA_TYPE.SFIXED32 || data_type == PB_DATA_TYPE.FLOAT: + return PB_TYPE.FIX32 + elif data_type == PB_DATA_TYPE.FIXED64 || data_type == PB_DATA_TYPE.SFIXED64 || data_type == PB_DATA_TYPE.DOUBLE: + return PB_TYPE.FIX64 + elif data_type == PB_DATA_TYPE.STRING || data_type == PB_DATA_TYPE.BYTES || data_type == PB_DATA_TYPE.MESSAGE || data_type == PB_DATA_TYPE.MAP: + return PB_TYPE.LENGTHDEL + else: + return PB_TYPE.UNDEFINED + + static func pack_field(field : PBField) -> PoolByteArray: + var type : int = pb_type_from_data_type(field.type) + var type_copy : int = type + if field.rule == PB_RULE.REPEATED && field.option_packed: + type = PB_TYPE.LENGTHDEL + var head : PoolByteArray = pack_type_tag(type, field.tag) + var data : PoolByteArray = PoolByteArray() + if type == PB_TYPE.VARINT: + var value + if field.rule == PB_RULE.REPEATED: + for v in field.value: + data.append_array(head) + if field.type == PB_DATA_TYPE.SINT32 || field.type == PB_DATA_TYPE.SINT64: + value = convert_signed(v) + else: + value = v + data.append_array(pack_varint(value)) + return data + else: + if field.type == PB_DATA_TYPE.SINT32 || field.type == PB_DATA_TYPE.SINT64: + value = convert_signed(field.value) + else: + value = field.value + data = pack_varint(value) + elif type == PB_TYPE.FIX32: + if field.rule == PB_RULE.REPEATED: + for v in field.value: + data.append_array(head) + data.append_array(pack_bytes(v, 4, field.type)) + return data + else: + data.append_array(pack_bytes(field.value, 4, field.type)) + elif type == PB_TYPE.FIX64: + if field.rule == PB_RULE.REPEATED: + for v in field.value: + data.append_array(head) + data.append_array(pack_bytes(v, 8, field.type)) + return data + else: + data.append_array(pack_bytes(field.value, 8, field.type)) + elif type == PB_TYPE.LENGTHDEL: + if field.rule == PB_RULE.REPEATED: + if type_copy == PB_TYPE.VARINT: + if field.type == PB_DATA_TYPE.SINT32 || field.type == PB_DATA_TYPE.SINT64: + var signed_value : int + for v in field.value: + signed_value = convert_signed(v) + data.append_array(pack_varint(signed_value)) + else: + for v in field.value: + data.append_array(pack_varint(v)) + return pack_length_delimeted(type, field.tag, data) + elif type_copy == PB_TYPE.FIX32: + for v in field.value: + data.append_array(pack_bytes(v, 4, field.type)) + return pack_length_delimeted(type, field.tag, data) + elif type_copy == PB_TYPE.FIX64: + for v in field.value: + data.append_array(pack_bytes(v, 8, field.type)) + return pack_length_delimeted(type, field.tag, data) + elif field.type == PB_DATA_TYPE.STRING: + for v in field.value: + var obj = v.to_utf8() + data.append_array(pack_length_delimeted(type, field.tag, obj)) + return data + elif field.type == PB_DATA_TYPE.BYTES: + for v in field.value: + data.append_array(pack_length_delimeted(type, field.tag, v)) + return data + elif typeof(field.value[0]) == TYPE_OBJECT: + for v in field.value: + var obj : PoolByteArray = v.to_bytes() + data.append_array(pack_length_delimeted(type, field.tag, obj)) + return data + else: + if field.type == PB_DATA_TYPE.STRING: + var str_bytes : PoolByteArray = field.value.to_utf8() + if PROTO_VERSION == 2 || (PROTO_VERSION == 3 && str_bytes.size() > 0): + data.append_array(str_bytes) + return pack_length_delimeted(type, field.tag, data) + if field.type == PB_DATA_TYPE.BYTES: + if PROTO_VERSION == 2 || (PROTO_VERSION == 3 && field.value.size() > 0): + data.append_array(field.value) + return pack_length_delimeted(type, field.tag, data) + elif typeof(field.value) == TYPE_OBJECT: + var obj : PoolByteArray = field.value.to_bytes() + if obj.size() > 0: + data.append_array(obj) + return pack_length_delimeted(type, field.tag, data) + else: + pass + if data.size() > 0: + head.append_array(data) + return head + else: + return data + + static func unpack_field(bytes : PoolByteArray, offset : int, field : PBField, type : int, message_func_ref) -> int: + if field.rule == PB_RULE.REPEATED && type != PB_TYPE.LENGTHDEL && field.option_packed: + var count = isolate_varint(bytes, offset) + if count.size() > 0: + offset += count.size() + count = unpack_varint(count) + if type == PB_TYPE.VARINT: + var val + var counter = offset + count + while offset < counter: + val = isolate_varint(bytes, offset) + if val.size() > 0: + offset += val.size() + val = unpack_varint(val) + if field.type == PB_DATA_TYPE.SINT32 || field.type == PB_DATA_TYPE.SINT64: + val = deconvert_signed(val) + elif field.type == PB_DATA_TYPE.BOOL: + if val: + val = true + else: + val = false + field.value.append(val) + else: + return PB_ERR.REPEATED_COUNT_MISMATCH + return offset + elif type == PB_TYPE.FIX32 || type == PB_TYPE.FIX64: + var type_size + if type == PB_TYPE.FIX32: + type_size = 4 + else: + type_size = 8 + var val + var counter = offset + count + while offset < counter: + if (offset + type_size) > bytes.size(): + return PB_ERR.REPEATED_COUNT_MISMATCH + val = unpack_bytes(bytes, offset, type_size, field.type) + offset += type_size + field.value.append(val) + return offset + else: + return PB_ERR.REPEATED_COUNT_NOT_FOUND + else: + if type == PB_TYPE.VARINT: + var val = isolate_varint(bytes, offset) + if val.size() > 0: + offset += val.size() + val = unpack_varint(val) + if field.type == PB_DATA_TYPE.SINT32 || field.type == PB_DATA_TYPE.SINT64: + val = deconvert_signed(val) + elif field.type == PB_DATA_TYPE.BOOL: + if val: + val = true + else: + val = false + if field.rule == PB_RULE.REPEATED: + field.value.append(val) + else: + field.value = val + else: + return PB_ERR.VARINT_NOT_FOUND + return offset + elif type == PB_TYPE.FIX32 || type == PB_TYPE.FIX64: + var type_size + if type == PB_TYPE.FIX32: + type_size = 4 + else: + type_size = 8 + var val + if (offset + type_size) > bytes.size(): + return PB_ERR.REPEATED_COUNT_MISMATCH + val = unpack_bytes(bytes, offset, type_size, field.type) + offset += type_size + if field.rule == PB_RULE.REPEATED: + field.value.append(val) + else: + field.value = val + return offset + elif type == PB_TYPE.LENGTHDEL: + var inner_size = isolate_varint(bytes, offset) + if inner_size.size() > 0: + offset += inner_size.size() + inner_size = unpack_varint(inner_size) + if inner_size >= 0: + if inner_size + offset > bytes.size(): + return PB_ERR.LENGTHDEL_SIZE_MISMATCH + if message_func_ref != null: + var message = message_func_ref.call_func() + if inner_size > 0: + var sub_offset = message.from_bytes(bytes, offset, inner_size + offset) + if sub_offset > 0: + if sub_offset - offset >= inner_size: + offset = sub_offset + return offset + else: + return PB_ERR.LENGTHDEL_SIZE_MISMATCH + return sub_offset + else: + return offset + elif field.type == PB_DATA_TYPE.STRING: + var str_bytes : PoolByteArray = PoolByteArray() + for i in range(offset, inner_size + offset): + str_bytes.append(bytes[i]) + if field.rule == PB_RULE.REPEATED: + field.value.append(str_bytes.get_string_from_utf8()) + else: + field.value = str_bytes.get_string_from_utf8() + return offset + inner_size + elif field.type == PB_DATA_TYPE.BYTES: + var val_bytes : PoolByteArray = PoolByteArray() + for i in range(offset, inner_size + offset): + val_bytes.append(bytes[i]) + if field.rule == PB_RULE.REPEATED: + field.value.append(val_bytes) + else: + field.value = val_bytes + return offset + inner_size + else: + return PB_ERR.LENGTHDEL_SIZE_NOT_FOUND + else: + return PB_ERR.LENGTHDEL_SIZE_NOT_FOUND + return PB_ERR.UNDEFINED_STATE + + static func unpack_message(data, bytes : PoolByteArray, offset : int, limit : int) -> int: + while true: + var tt : PBTypeTag = unpack_type_tag(bytes, offset) + if tt.ok: + offset += tt.offset + if data.has(tt.tag): + var service : PBServiceField = data[tt.tag] + var type : int = pb_type_from_data_type(service.field.type) + if type == tt.type || (tt.type == PB_TYPE.LENGTHDEL && service.field.rule == PB_RULE.REPEATED && service.field.option_packed): + var res : int = unpack_field(bytes, offset, service.field, type, service.func_ref) + if res > 0: + service.state = PB_SERVICE_STATE.FILLED + offset = res + if offset == limit: + return offset + elif offset > limit: + return PB_ERR.PACKAGE_SIZE_MISMATCH + elif res < 0: + return res + else: + break + else: + return offset + return PB_ERR.UNDEFINED_STATE + + static func pack_message(data) -> PoolByteArray: + var DEFAULT_VALUES + if PROTO_VERSION == 2: + DEFAULT_VALUES = DEFAULT_VALUES_2 + elif PROTO_VERSION == 3: + DEFAULT_VALUES = DEFAULT_VALUES_3 + var result : PoolByteArray = PoolByteArray() + var keys : Array = data.keys() + keys.sort() + for i in keys: + if data[i].field.value != null: + if data[i].state == PB_SERVICE_STATE.UNFILLED \ + && !data[i].field.is_map_field \ + && typeof(data[i].field.value) == typeof(DEFAULT_VALUES[data[i].field.type]) \ + && data[i].field.value == DEFAULT_VALUES[data[i].field.type]: + continue + elif data[i].field.rule == PB_RULE.REPEATED && data[i].field.value.size() == 0: + continue + result.append_array(pack_field(data[i].field)) + elif data[i].field.rule == PB_RULE.REQUIRED: + print("Error: required field is not filled: Tag:", data[i].field.tag) + return PoolByteArray() + return result + + static func check_required(data) -> bool: + var keys : Array = data.keys() + for i in keys: + if data[i].field.rule == PB_RULE.REQUIRED && data[i].state == PB_SERVICE_STATE.UNFILLED: + return false + return true + + static func construct_map(key_values): + var result = {} + for kv in key_values: + result[kv.get_key()] = kv.get_value() + return result + + static func tabulate(text : String, nesting : int) -> String: + var tab : String = "" + for _i in range(nesting): + tab += DEBUG_TAB + return tab + text + + static func value_to_string(value, field : PBField, nesting : int) -> String: + var result : String = "" + var text : String + if field.type == PB_DATA_TYPE.MESSAGE: + result += "{" + nesting += 1 + text = message_to_string(value.data, nesting) + if text != "": + result += "\n" + text + nesting -= 1 + result += tabulate("}", nesting) + else: + nesting -= 1 + result += "}" + elif field.type == PB_DATA_TYPE.BYTES: + result += "<" + for i in range(value.size()): + result += String(value[i]) + if i != (value.size() - 1): + result += ", " + result += ">" + elif field.type == PB_DATA_TYPE.STRING: + result += "\"" + value + "\"" + elif field.type == PB_DATA_TYPE.ENUM: + result += "ENUM::" + String(value) + else: + result += String(value) + return result + + static func field_to_string(field : PBField, nesting : int) -> String: + var result : String = tabulate(field.name + ": ", nesting) + if field.type == PB_DATA_TYPE.MAP: + if field.value.size() > 0: + result += "(\n" + nesting += 1 + for i in range(field.value.size()): + var local_key_value = field.value[i].data[1].field + result += tabulate(value_to_string(local_key_value.value, local_key_value, nesting), nesting) + ": " + local_key_value = field.value[i].data[2].field + result += value_to_string(local_key_value.value, local_key_value, nesting) + if i != (field.value.size() - 1): + result += "," + result += "\n" + nesting -= 1 + result += tabulate(")", nesting) + else: + result += "()" + elif field.rule == PB_RULE.REPEATED: + if field.value.size() > 0: + result += "[\n" + nesting += 1 + for i in range(field.value.size()): + result += tabulate(String(i) + ": ", nesting) + result += value_to_string(field.value[i], field, nesting) + if i != (field.value.size() - 1): + result += "," + result += "\n" + nesting -= 1 + result += tabulate("]", nesting) + else: + result += "[]" + else: + result += value_to_string(field.value, field, nesting) + result += ";\n" + return result + + static func message_to_string(data, nesting : int = 0) -> String: + var DEFAULT_VALUES + if PROTO_VERSION == 2: + DEFAULT_VALUES = DEFAULT_VALUES_2 + elif PROTO_VERSION == 3: + DEFAULT_VALUES = DEFAULT_VALUES_3 + var result : String = "" + var keys : Array = data.keys() + keys.sort() + for i in keys: + if data[i].field.value != null: + if data[i].state == PB_SERVICE_STATE.UNFILLED \ + && !data[i].field.is_map_field \ + && typeof(data[i].field.value) == typeof(DEFAULT_VALUES[data[i].field.type]) \ + && data[i].field.value == DEFAULT_VALUES[data[i].field.type]: + continue + elif data[i].field.rule == PB_RULE.REPEATED && data[i].field.value.size() == 0: + continue + result += field_to_string(data[i].field, nesting) + elif data[i].field.rule == PB_RULE.REQUIRED: + result += data[i].field.name + ": " + "error" + return result + + + +############### USER DATA BEGIN ################ + + +class Waypoint: + func _init(): + var service + + _category = PBField.new("category", PB_DATA_TYPE.MESSAGE, PB_RULE.REPEATED, 1, true, []) + service = PBServiceField.new() + service.field = _category + service.func_ref = funcref(self, "add_category") + data[_category.tag] = service + + _icon = PBField.new("icon", PB_DATA_TYPE.MESSAGE, PB_RULE.REPEATED, 2, true, []) + service = PBServiceField.new() + service.field = _icon + service.func_ref = funcref(self, "add_icon") + data[_icon.tag] = service + + _trail = PBField.new("trail", PB_DATA_TYPE.MESSAGE, PB_RULE.REPEATED, 3, true, []) + service = PBServiceField.new() + service.field = _trail + service.func_ref = funcref(self, "add_trail") + data[_trail.tag] = service + + var data = {} + + var _category: PBField + func get_category() -> Array: + return _category.value + func clear_category() -> void: + data[1].state = PB_SERVICE_STATE.UNFILLED + _category.value = [] + func add_category() -> Category: + var element = Category.new() + _category.value.append(element) + return element + + var _icon: PBField + func get_icon() -> Array: + return _icon.value + func clear_icon() -> void: + data[2].state = PB_SERVICE_STATE.UNFILLED + _icon.value = [] + func add_icon() -> Icon: + var element = Icon.new() + _icon.value.append(element) + return element + + var _trail: PBField + func get_trail() -> Array: + return _trail.value + func clear_trail() -> void: + data[3].state = PB_SERVICE_STATE.UNFILLED + _trail.value = [] + func add_trail() -> Trail: + var element = Trail.new() + _trail.value.append(element) + return element + + func to_string() -> String: + return PBPacker.message_to_string(data) + + func to_bytes() -> PoolByteArray: + return PBPacker.pack_message(data) + + func from_bytes(bytes : PoolByteArray, offset : int = 0, limit : int = -1) -> int: + var cur_limit = bytes.size() + if limit != -1: + cur_limit = limit + var result = PBPacker.unpack_message(data, bytes, offset, cur_limit) + if result == cur_limit: + if PBPacker.check_required(data): + if limit == -1: + return PB_ERR.NO_ERRORS + else: + return PB_ERR.REQUIRED_FIELDS + elif limit == -1 && result > 0: + return PB_ERR.PARSE_INCOMPLETE + return result + +class Category: + func _init(): + var service + + _default_visibility = PBField.new("default_visibility", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 1, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _default_visibility + data[_default_visibility.tag] = service + + _display_name = PBField.new("display_name", PB_DATA_TYPE.STRING, PB_RULE.OPTIONAL, 2, true, DEFAULT_VALUES_3[PB_DATA_TYPE.STRING]) + service = PBServiceField.new() + service.field = _display_name + data[_display_name.tag] = service + + _is_separator = PBField.new("is_separator", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 3, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _is_separator + data[_is_separator.tag] = service + + _name = PBField.new("name", PB_DATA_TYPE.STRING, PB_RULE.OPTIONAL, 4, true, DEFAULT_VALUES_3[PB_DATA_TYPE.STRING]) + service = PBServiceField.new() + service.field = _name + data[_name.tag] = service + + _tip_description = PBField.new("tip_description", PB_DATA_TYPE.STRING, PB_RULE.OPTIONAL, 5, true, DEFAULT_VALUES_3[PB_DATA_TYPE.STRING]) + service = PBServiceField.new() + service.field = _tip_description + data[_tip_description.tag] = service + + _children = PBField.new("children", PB_DATA_TYPE.MESSAGE, PB_RULE.REPEATED, 6, true, []) + service = PBServiceField.new() + service.field = _children + service.func_ref = funcref(self, "add_children") + data[_children.tag] = service + + var data = {} + + var _default_visibility: PBField + func get_default_visibility() -> bool: + return _default_visibility.value + func clear_default_visibility() -> void: + data[1].state = PB_SERVICE_STATE.UNFILLED + _default_visibility.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_default_visibility(value : bool) -> void: + _default_visibility.value = value + + var _display_name: PBField + func get_display_name() -> String: + return _display_name.value + func clear_display_name() -> void: + data[2].state = PB_SERVICE_STATE.UNFILLED + _display_name.value = DEFAULT_VALUES_3[PB_DATA_TYPE.STRING] + func set_display_name(value : String) -> void: + _display_name.value = value + + var _is_separator: PBField + func get_is_separator() -> bool: + return _is_separator.value + func clear_is_separator() -> void: + data[3].state = PB_SERVICE_STATE.UNFILLED + _is_separator.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_is_separator(value : bool) -> void: + _is_separator.value = value + + var _name: PBField + func get_name() -> String: + return _name.value + func clear_name() -> void: + data[4].state = PB_SERVICE_STATE.UNFILLED + _name.value = DEFAULT_VALUES_3[PB_DATA_TYPE.STRING] + func set_name(value : String) -> void: + _name.value = value + + var _tip_description: PBField + func get_tip_description() -> String: + return _tip_description.value + func clear_tip_description() -> void: + data[5].state = PB_SERVICE_STATE.UNFILLED + _tip_description.value = DEFAULT_VALUES_3[PB_DATA_TYPE.STRING] + func set_tip_description(value : String) -> void: + _tip_description.value = value + + var _children: PBField + func get_children() -> Array: + return _children.value + func clear_children() -> void: + data[6].state = PB_SERVICE_STATE.UNFILLED + _children.value = [] + func add_children() -> Category: + var element = Category.new() + _children.value.append(element) + return element + + func to_string() -> String: + return PBPacker.message_to_string(data) + + func to_bytes() -> PoolByteArray: + return PBPacker.pack_message(data) + + func from_bytes(bytes : PoolByteArray, offset : int = 0, limit : int = -1) -> int: + var cur_limit = bytes.size() + if limit != -1: + cur_limit = limit + var result = PBPacker.unpack_message(data, bytes, offset, cur_limit) + if result == cur_limit: + if PBPacker.check_required(data): + if limit == -1: + return PB_ERR.NO_ERRORS + else: + return PB_ERR.REQUIRED_FIELDS + elif limit == -1 && result > 0: + return PB_ERR.PARSE_INCOMPLETE + return result + +class Icon: + func _init(): + var service + + _category = PBField.new("category", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 1, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) + service = PBServiceField.new() + service.field = _category + service.func_ref = funcref(self, "new_category") + data[_category.tag] = service + + _texture = PBField.new("texture", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 2, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) + service = PBServiceField.new() + service.field = _texture + service.func_ref = funcref(self, "new_texture") + data[_texture.tag] = service + + _guid = PBField.new("guid", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 3, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) + service = PBServiceField.new() + service.field = _guid + service.func_ref = funcref(self, "new_guid") + data[_guid.tag] = service + + _map_id = PBField.new("map_id", PB_DATA_TYPE.INT32, PB_RULE.OPTIONAL, 4, true, DEFAULT_VALUES_3[PB_DATA_TYPE.INT32]) + service = PBServiceField.new() + service.field = _map_id + data[_map_id.tag] = service + + _distance_fade_end = PBField.new("distance_fade_end", PB_DATA_TYPE.FLOAT, PB_RULE.OPTIONAL, 5, true, DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT]) + service = PBServiceField.new() + service.field = _distance_fade_end + data[_distance_fade_end.tag] = service + + _distance_fade_start = PBField.new("distance_fade_start", PB_DATA_TYPE.FLOAT, PB_RULE.OPTIONAL, 6, true, DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT]) + service = PBServiceField.new() + service.field = _distance_fade_start + data[_distance_fade_start.tag] = service + + _height_offset = PBField.new("height_offset", PB_DATA_TYPE.FLOAT, PB_RULE.OPTIONAL, 7, true, DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT]) + service = PBServiceField.new() + service.field = _height_offset + data[_height_offset.tag] = service + + _position = PBField.new("position", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 8, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) + service = PBServiceField.new() + service.field = _position + service.func_ref = funcref(self, "new_position") + data[_position.tag] = service + + _trigger = PBField.new("trigger", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 9, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) + service = PBServiceField.new() + service.field = _trigger + service.func_ref = funcref(self, "new_trigger") + data[_trigger.tag] = service + + _euler_rotation = PBField.new("euler_rotation", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 10, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) + service = PBServiceField.new() + service.field = _euler_rotation + service.func_ref = funcref(self, "new_euler_rotation") + data[_euler_rotation.tag] = service + + _achievement_bit = PBField.new("achievement_bit", PB_DATA_TYPE.FIXED32, PB_RULE.OPTIONAL, 16, true, DEFAULT_VALUES_3[PB_DATA_TYPE.FIXED32]) + service = PBServiceField.new() + service.field = _achievement_bit + data[_achievement_bit.tag] = service + + _achievement_id = PBField.new("achievement_id", PB_DATA_TYPE.INT32, PB_RULE.OPTIONAL, 17, true, DEFAULT_VALUES_3[PB_DATA_TYPE.INT32]) + service = PBServiceField.new() + service.field = _achievement_id + data[_achievement_id.tag] = service + + _alpha = PBField.new("alpha", PB_DATA_TYPE.FLOAT, PB_RULE.OPTIONAL, 18, true, DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT]) + service = PBServiceField.new() + service.field = _alpha + data[_alpha.tag] = service + + _can_fade = PBField.new("can_fade", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 19, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _can_fade + data[_can_fade.tag] = service + + _minimum_size_on_screen = PBField.new("minimum_size_on_screen", PB_DATA_TYPE.INT32, PB_RULE.OPTIONAL, 20, true, DEFAULT_VALUES_3[PB_DATA_TYPE.INT32]) + service = PBServiceField.new() + service.field = _minimum_size_on_screen + data[_minimum_size_on_screen.tag] = service + + _map_display_size = PBField.new("map_display_size", PB_DATA_TYPE.INT32, PB_RULE.OPTIONAL, 21, true, DEFAULT_VALUES_3[PB_DATA_TYPE.INT32]) + service = PBServiceField.new() + service.field = _map_display_size + data[_map_display_size.tag] = service + + _maximum_size_on_screen = PBField.new("maximum_size_on_screen", PB_DATA_TYPE.INT32, PB_RULE.OPTIONAL, 22, true, DEFAULT_VALUES_3[PB_DATA_TYPE.INT32]) + service = PBServiceField.new() + service.field = _maximum_size_on_screen + data[_maximum_size_on_screen.tag] = service + + _scale_on_map_with_zoom = PBField.new("scale_on_map_with_zoom", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 23, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _scale_on_map_with_zoom + data[_scale_on_map_with_zoom.tag] = service + + _tip_description = PBField.new("tip_description", PB_DATA_TYPE.STRING, PB_RULE.OPTIONAL, 24, true, DEFAULT_VALUES_3[PB_DATA_TYPE.STRING]) + service = PBServiceField.new() + service.field = _tip_description + data[_tip_description.tag] = service + + _tip_name = PBField.new("tip_name", PB_DATA_TYPE.STRING, PB_RULE.OPTIONAL, 25, true, DEFAULT_VALUES_3[PB_DATA_TYPE.STRING]) + service = PBServiceField.new() + service.field = _tip_name + data[_tip_name.tag] = service + + _color = PBField.new("color", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 26, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) + service = PBServiceField.new() + service.field = _color + service.func_ref = funcref(self, "new_color") + data[_color.tag] = service + + _festival_filter = PBField.new("festival_filter", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 27, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) + service = PBServiceField.new() + service.field = _festival_filter + service.func_ref = funcref(self, "new_festival_filter") + data[_festival_filter.tag] = service + + _map_type_filter = PBField.new("map_type_filter", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 28, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) + service = PBServiceField.new() + service.field = _map_type_filter + service.func_ref = funcref(self, "new_map_type_filter") + data[_map_type_filter.tag] = service + + _mount_filter = PBField.new("mount_filter", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 29, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) + service = PBServiceField.new() + service.field = _mount_filter + service.func_ref = funcref(self, "new_mount_filter") + data[_mount_filter.tag] = service + + _profession_filter = PBField.new("profession_filter", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 30, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) + service = PBServiceField.new() + service.field = _profession_filter + service.func_ref = funcref(self, "new_profession_filter") + data[_profession_filter.tag] = service + + _specialization_filter = PBField.new("specialization_filter", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 31, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) + service = PBServiceField.new() + service.field = _specialization_filter + service.func_ref = funcref(self, "new_specialization_filter") + data[_specialization_filter.tag] = service + + _species_filter = PBField.new("species_filter", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 32, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) + service = PBServiceField.new() + service.field = _species_filter + service.func_ref = funcref(self, "new_species_filter") + data[_species_filter.tag] = service + + _cull_chirality = PBField.new("cull_chirality", PB_DATA_TYPE.ENUM, PB_RULE.OPTIONAL, 33, true, DEFAULT_VALUES_3[PB_DATA_TYPE.ENUM]) + service = PBServiceField.new() + service.field = _cull_chirality + data[_cull_chirality.tag] = service + + _tentative__scale = PBField.new("tentative__scale", PB_DATA_TYPE.FLOAT, PB_RULE.OPTIONAL, 2048, true, DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT]) + service = PBServiceField.new() + service.field = _tentative__scale + data[_tentative__scale.tag] = service + + _tentative__render_ingame = PBField.new("tentative__render_ingame", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 2049, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _tentative__render_ingame + data[_tentative__render_ingame.tag] = service + + _tentative__render_on_map = PBField.new("tentative__render_on_map", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 2050, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _tentative__render_on_map + data[_tentative__render_on_map.tag] = service + + _tentative__render_on_minimap = PBField.new("tentative__render_on_minimap", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 2051, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _tentative__render_on_minimap + data[_tentative__render_on_minimap.tag] = service + + _bhdraft__schedule = PBField.new("bhdraft__schedule", PB_DATA_TYPE.STRING, PB_RULE.OPTIONAL, 2052, true, DEFAULT_VALUES_3[PB_DATA_TYPE.STRING]) + service = PBServiceField.new() + service.field = _bhdraft__schedule + data[_bhdraft__schedule.tag] = service + + _bhdraft__schedule_duration = PBField.new("bhdraft__schedule_duration", PB_DATA_TYPE.FLOAT, PB_RULE.OPTIONAL, 2053, true, DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT]) + service = PBServiceField.new() + service.field = _bhdraft__schedule_duration + data[_bhdraft__schedule_duration.tag] = service + + var data = {} + + var _category: PBField + func get_category() -> Category: + return _category.value + func clear_category() -> void: + data[1].state = PB_SERVICE_STATE.UNFILLED + _category.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] + func new_category() -> Category: + _category.value = Category.new() + return _category.value + + var _texture: PBField + func get_texture() -> Texture: + return _texture.value + func clear_texture() -> void: + data[2].state = PB_SERVICE_STATE.UNFILLED + _texture.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] + func new_texture() -> Texture: + _texture.value = Texture.new() + return _texture.value + + var _guid: PBField + func get_guid() -> GUID: + return _guid.value + func clear_guid() -> void: + data[3].state = PB_SERVICE_STATE.UNFILLED + _guid.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] + func new_guid() -> GUID: + _guid.value = GUID.new() + return _guid.value + + var _map_id: PBField + func get_map_id() -> int: + return _map_id.value + func clear_map_id() -> void: + data[4].state = PB_SERVICE_STATE.UNFILLED + _map_id.value = DEFAULT_VALUES_3[PB_DATA_TYPE.INT32] + func set_map_id(value : int) -> void: + _map_id.value = value + + var _distance_fade_end: PBField + func get_distance_fade_end() -> float: + return _distance_fade_end.value + func clear_distance_fade_end() -> void: + data[5].state = PB_SERVICE_STATE.UNFILLED + _distance_fade_end.value = DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT] + func set_distance_fade_end(value : float) -> void: + _distance_fade_end.value = value + + var _distance_fade_start: PBField + func get_distance_fade_start() -> float: + return _distance_fade_start.value + func clear_distance_fade_start() -> void: + data[6].state = PB_SERVICE_STATE.UNFILLED + _distance_fade_start.value = DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT] + func set_distance_fade_start(value : float) -> void: + _distance_fade_start.value = value + + var _height_offset: PBField + func get_height_offset() -> float: + return _height_offset.value + func clear_height_offset() -> void: + data[7].state = PB_SERVICE_STATE.UNFILLED + _height_offset.value = DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT] + func set_height_offset(value : float) -> void: + _height_offset.value = value + + var _position: PBField + func get_position() -> Position: + return _position.value + func clear_position() -> void: + data[8].state = PB_SERVICE_STATE.UNFILLED + _position.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] + func new_position() -> Position: + _position.value = Position.new() + return _position.value + + var _trigger: PBField + func get_trigger() -> Trigger: + return _trigger.value + func clear_trigger() -> void: + data[9].state = PB_SERVICE_STATE.UNFILLED + _trigger.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] + func new_trigger() -> Trigger: + _trigger.value = Trigger.new() + return _trigger.value + + var _euler_rotation: PBField + func get_euler_rotation() -> EulerRotation: + return _euler_rotation.value + func clear_euler_rotation() -> void: + data[10].state = PB_SERVICE_STATE.UNFILLED + _euler_rotation.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] + func new_euler_rotation() -> EulerRotation: + _euler_rotation.value = EulerRotation.new() + return _euler_rotation.value + + var _achievement_bit: PBField + func get_achievement_bit() -> int: + return _achievement_bit.value + func clear_achievement_bit() -> void: + data[16].state = PB_SERVICE_STATE.UNFILLED + _achievement_bit.value = DEFAULT_VALUES_3[PB_DATA_TYPE.FIXED32] + func set_achievement_bit(value : int) -> void: + _achievement_bit.value = value + + var _achievement_id: PBField + func get_achievement_id() -> int: + return _achievement_id.value + func clear_achievement_id() -> void: + data[17].state = PB_SERVICE_STATE.UNFILLED + _achievement_id.value = DEFAULT_VALUES_3[PB_DATA_TYPE.INT32] + func set_achievement_id(value : int) -> void: + _achievement_id.value = value + + var _alpha: PBField + func get_alpha() -> float: + return _alpha.value + func clear_alpha() -> void: + data[18].state = PB_SERVICE_STATE.UNFILLED + _alpha.value = DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT] + func set_alpha(value : float) -> void: + _alpha.value = value + + var _can_fade: PBField + func get_can_fade() -> bool: + return _can_fade.value + func clear_can_fade() -> void: + data[19].state = PB_SERVICE_STATE.UNFILLED + _can_fade.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_can_fade(value : bool) -> void: + _can_fade.value = value + + var _minimum_size_on_screen: PBField + func get_minimum_size_on_screen() -> int: + return _minimum_size_on_screen.value + func clear_minimum_size_on_screen() -> void: + data[20].state = PB_SERVICE_STATE.UNFILLED + _minimum_size_on_screen.value = DEFAULT_VALUES_3[PB_DATA_TYPE.INT32] + func set_minimum_size_on_screen(value : int) -> void: + _minimum_size_on_screen.value = value + + var _map_display_size: PBField + func get_map_display_size() -> int: + return _map_display_size.value + func clear_map_display_size() -> void: + data[21].state = PB_SERVICE_STATE.UNFILLED + _map_display_size.value = DEFAULT_VALUES_3[PB_DATA_TYPE.INT32] + func set_map_display_size(value : int) -> void: + _map_display_size.value = value + + var _maximum_size_on_screen: PBField + func get_maximum_size_on_screen() -> int: + return _maximum_size_on_screen.value + func clear_maximum_size_on_screen() -> void: + data[22].state = PB_SERVICE_STATE.UNFILLED + _maximum_size_on_screen.value = DEFAULT_VALUES_3[PB_DATA_TYPE.INT32] + func set_maximum_size_on_screen(value : int) -> void: + _maximum_size_on_screen.value = value + + var _scale_on_map_with_zoom: PBField + func get_scale_on_map_with_zoom() -> bool: + return _scale_on_map_with_zoom.value + func clear_scale_on_map_with_zoom() -> void: + data[23].state = PB_SERVICE_STATE.UNFILLED + _scale_on_map_with_zoom.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_scale_on_map_with_zoom(value : bool) -> void: + _scale_on_map_with_zoom.value = value + + var _tip_description: PBField + func get_tip_description() -> String: + return _tip_description.value + func clear_tip_description() -> void: + data[24].state = PB_SERVICE_STATE.UNFILLED + _tip_description.value = DEFAULT_VALUES_3[PB_DATA_TYPE.STRING] + func set_tip_description(value : String) -> void: + _tip_description.value = value + + var _tip_name: PBField + func get_tip_name() -> String: + return _tip_name.value + func clear_tip_name() -> void: + data[25].state = PB_SERVICE_STATE.UNFILLED + _tip_name.value = DEFAULT_VALUES_3[PB_DATA_TYPE.STRING] + func set_tip_name(value : String) -> void: + _tip_name.value = value + + var _color: PBField + func get_color() -> Color: + return _color.value + func clear_color() -> void: + data[26].state = PB_SERVICE_STATE.UNFILLED + _color.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] + func new_color() -> Color: + _color.value = Color.new() + return _color.value + + var _festival_filter: PBField + func get_festival_filter() -> FestivalFilter: + return _festival_filter.value + func clear_festival_filter() -> void: + data[27].state = PB_SERVICE_STATE.UNFILLED + _festival_filter.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] + func new_festival_filter() -> FestivalFilter: + _festival_filter.value = FestivalFilter.new() + return _festival_filter.value + + var _map_type_filter: PBField + func get_map_type_filter() -> MapTypeFilter: + return _map_type_filter.value + func clear_map_type_filter() -> void: + data[28].state = PB_SERVICE_STATE.UNFILLED + _map_type_filter.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] + func new_map_type_filter() -> MapTypeFilter: + _map_type_filter.value = MapTypeFilter.new() + return _map_type_filter.value + + var _mount_filter: PBField + func get_mount_filter() -> MountFilter: + return _mount_filter.value + func clear_mount_filter() -> void: + data[29].state = PB_SERVICE_STATE.UNFILLED + _mount_filter.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] + func new_mount_filter() -> MountFilter: + _mount_filter.value = MountFilter.new() + return _mount_filter.value + + var _profession_filter: PBField + func get_profession_filter() -> ProfessionFilter: + return _profession_filter.value + func clear_profession_filter() -> void: + data[30].state = PB_SERVICE_STATE.UNFILLED + _profession_filter.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] + func new_profession_filter() -> ProfessionFilter: + _profession_filter.value = ProfessionFilter.new() + return _profession_filter.value + + var _specialization_filter: PBField + func get_specialization_filter() -> SpecializationFilter: + return _specialization_filter.value + func clear_specialization_filter() -> void: + data[31].state = PB_SERVICE_STATE.UNFILLED + _specialization_filter.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] + func new_specialization_filter() -> SpecializationFilter: + _specialization_filter.value = SpecializationFilter.new() + return _specialization_filter.value + + var _species_filter: PBField + func get_species_filter() -> SpeciesFilter: + return _species_filter.value + func clear_species_filter() -> void: + data[32].state = PB_SERVICE_STATE.UNFILLED + _species_filter.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] + func new_species_filter() -> SpeciesFilter: + _species_filter.value = SpeciesFilter.new() + return _species_filter.value + + var _cull_chirality: PBField + func get_cull_chirality(): + return _cull_chirality.value + func clear_cull_chirality() -> void: + data[33].state = PB_SERVICE_STATE.UNFILLED + _cull_chirality.value = DEFAULT_VALUES_3[PB_DATA_TYPE.ENUM] + func set_cull_chirality(value) -> void: + _cull_chirality.value = value + + var _tentative__scale: PBField + func get_tentative__scale() -> float: + return _tentative__scale.value + func clear_tentative__scale() -> void: + data[2048].state = PB_SERVICE_STATE.UNFILLED + _tentative__scale.value = DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT] + func set_tentative__scale(value : float) -> void: + _tentative__scale.value = value + + var _tentative__render_ingame: PBField + func get_tentative__render_ingame() -> bool: + return _tentative__render_ingame.value + func clear_tentative__render_ingame() -> void: + data[2049].state = PB_SERVICE_STATE.UNFILLED + _tentative__render_ingame.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_tentative__render_ingame(value : bool) -> void: + _tentative__render_ingame.value = value + + var _tentative__render_on_map: PBField + func get_tentative__render_on_map() -> bool: + return _tentative__render_on_map.value + func clear_tentative__render_on_map() -> void: + data[2050].state = PB_SERVICE_STATE.UNFILLED + _tentative__render_on_map.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_tentative__render_on_map(value : bool) -> void: + _tentative__render_on_map.value = value + + var _tentative__render_on_minimap: PBField + func get_tentative__render_on_minimap() -> bool: + return _tentative__render_on_minimap.value + func clear_tentative__render_on_minimap() -> void: + data[2051].state = PB_SERVICE_STATE.UNFILLED + _tentative__render_on_minimap.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_tentative__render_on_minimap(value : bool) -> void: + _tentative__render_on_minimap.value = value + + var _bhdraft__schedule: PBField + func get_bhdraft__schedule() -> String: + return _bhdraft__schedule.value + func clear_bhdraft__schedule() -> void: + data[2052].state = PB_SERVICE_STATE.UNFILLED + _bhdraft__schedule.value = DEFAULT_VALUES_3[PB_DATA_TYPE.STRING] + func set_bhdraft__schedule(value : String) -> void: + _bhdraft__schedule.value = value + + var _bhdraft__schedule_duration: PBField + func get_bhdraft__schedule_duration() -> float: + return _bhdraft__schedule_duration.value + func clear_bhdraft__schedule_duration() -> void: + data[2053].state = PB_SERVICE_STATE.UNFILLED + _bhdraft__schedule_duration.value = DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT] + func set_bhdraft__schedule_duration(value : float) -> void: + _bhdraft__schedule_duration.value = value + + func to_string() -> String: + return PBPacker.message_to_string(data) + + func to_bytes() -> PoolByteArray: + return PBPacker.pack_message(data) + + func from_bytes(bytes : PoolByteArray, offset : int = 0, limit : int = -1) -> int: + var cur_limit = bytes.size() + if limit != -1: + cur_limit = limit + var result = PBPacker.unpack_message(data, bytes, offset, cur_limit) + if result == cur_limit: + if PBPacker.check_required(data): + if limit == -1: + return PB_ERR.NO_ERRORS + else: + return PB_ERR.REQUIRED_FIELDS + elif limit == -1 && result > 0: + return PB_ERR.PARSE_INCOMPLETE + return result + +class Trail: + func _init(): + var service + + _category = PBField.new("category", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 1, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) + service = PBServiceField.new() + service.field = _category + service.func_ref = funcref(self, "new_category") + data[_category.tag] = service + + _texture = PBField.new("texture", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 2, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) + service = PBServiceField.new() + service.field = _texture + service.func_ref = funcref(self, "new_texture") + data[_texture.tag] = service + + _guid = PBField.new("guid", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 3, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) + service = PBServiceField.new() + service.field = _guid + service.func_ref = funcref(self, "new_guid") + data[_guid.tag] = service + + _map_id = PBField.new("map_id", PB_DATA_TYPE.INT32, PB_RULE.OPTIONAL, 4, true, DEFAULT_VALUES_3[PB_DATA_TYPE.INT32]) + service = PBServiceField.new() + service.field = _map_id + data[_map_id.tag] = service + + _distance_fade_end = PBField.new("distance_fade_end", PB_DATA_TYPE.FLOAT, PB_RULE.OPTIONAL, 5, true, DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT]) + service = PBServiceField.new() + service.field = _distance_fade_end + data[_distance_fade_end.tag] = service + + _distance_fade_start = PBField.new("distance_fade_start", PB_DATA_TYPE.FLOAT, PB_RULE.OPTIONAL, 6, true, DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT]) + service = PBServiceField.new() + service.field = _distance_fade_start + data[_distance_fade_start.tag] = service + + _trail_data = PBField.new("trail_data", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 7, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) + service = PBServiceField.new() + service.field = _trail_data + service.func_ref = funcref(self, "new_trail_data") + data[_trail_data.tag] = service + + _animation_speed = PBField.new("animation_speed", PB_DATA_TYPE.FLOAT, PB_RULE.OPTIONAL, 8, true, DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT]) + service = PBServiceField.new() + service.field = _animation_speed + data[_animation_speed.tag] = service + + _achievement_bit = PBField.new("achievement_bit", PB_DATA_TYPE.FIXED32, PB_RULE.OPTIONAL, 16, true, DEFAULT_VALUES_3[PB_DATA_TYPE.FIXED32]) + service = PBServiceField.new() + service.field = _achievement_bit + data[_achievement_bit.tag] = service + + _achievement_id = PBField.new("achievement_id", PB_DATA_TYPE.INT32, PB_RULE.OPTIONAL, 17, true, DEFAULT_VALUES_3[PB_DATA_TYPE.INT32]) + service = PBServiceField.new() + service.field = _achievement_id + data[_achievement_id.tag] = service + + _alpha = PBField.new("alpha", PB_DATA_TYPE.FLOAT, PB_RULE.OPTIONAL, 18, true, DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT]) + service = PBServiceField.new() + service.field = _alpha + data[_alpha.tag] = service + + _can_fade = PBField.new("can_fade", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 19, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _can_fade + data[_can_fade.tag] = service + + _is_wall = PBField.new("is_wall", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 20, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _is_wall + data[_is_wall.tag] = service + + _scale = PBField.new("scale", PB_DATA_TYPE.FLOAT, PB_RULE.OPTIONAL, 21, true, DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT]) + service = PBServiceField.new() + service.field = _scale + data[_scale.tag] = service + + _color = PBField.new("color", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 22, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) + service = PBServiceField.new() + service.field = _color + service.func_ref = funcref(self, "new_color") + data[_color.tag] = service + + _festival_filter = PBField.new("festival_filter", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 23, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) + service = PBServiceField.new() + service.field = _festival_filter + service.func_ref = funcref(self, "new_festival_filter") + data[_festival_filter.tag] = service + + _map_type_filter = PBField.new("map_type_filter", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 24, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) + service = PBServiceField.new() + service.field = _map_type_filter + service.func_ref = funcref(self, "new_map_type_filter") + data[_map_type_filter.tag] = service + + _mount_filter = PBField.new("mount_filter", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 25, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) + service = PBServiceField.new() + service.field = _mount_filter + service.func_ref = funcref(self, "new_mount_filter") + data[_mount_filter.tag] = service + + _profession_filter = PBField.new("profession_filter", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 26, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) + service = PBServiceField.new() + service.field = _profession_filter + service.func_ref = funcref(self, "new_profession_filter") + data[_profession_filter.tag] = service + + _specialization_filter = PBField.new("specialization_filter", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 27, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) + service = PBServiceField.new() + service.field = _specialization_filter + service.func_ref = funcref(self, "new_specialization_filter") + data[_specialization_filter.tag] = service + + _species_filter = PBField.new("species_filter", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 28, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) + service = PBServiceField.new() + service.field = _species_filter + service.func_ref = funcref(self, "new_species_filter") + data[_species_filter.tag] = service + + _map_display_size = PBField.new("map_display_size", PB_DATA_TYPE.INT32, PB_RULE.OPTIONAL, 29, true, DEFAULT_VALUES_3[PB_DATA_TYPE.INT32]) + service = PBServiceField.new() + service.field = _map_display_size + data[_map_display_size.tag] = service + + _cull_chirality = PBField.new("cull_chirality", PB_DATA_TYPE.ENUM, PB_RULE.OPTIONAL, 30, true, DEFAULT_VALUES_3[PB_DATA_TYPE.ENUM]) + service = PBServiceField.new() + service.field = _cull_chirality + data[_cull_chirality.tag] = service + + _tentative__render_ingame = PBField.new("tentative__render_ingame", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 2049, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _tentative__render_ingame + data[_tentative__render_ingame.tag] = service + + _tentative__render_on_map = PBField.new("tentative__render_on_map", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 2050, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _tentative__render_on_map + data[_tentative__render_on_map.tag] = service + + _tentative__render_on_minimap = PBField.new("tentative__render_on_minimap", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 2051, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _tentative__render_on_minimap + data[_tentative__render_on_minimap.tag] = service + + _bhdraft__schedule = PBField.new("bhdraft__schedule", PB_DATA_TYPE.STRING, PB_RULE.OPTIONAL, 2052, true, DEFAULT_VALUES_3[PB_DATA_TYPE.STRING]) + service = PBServiceField.new() + service.field = _bhdraft__schedule + data[_bhdraft__schedule.tag] = service + + _bhdraft__schedule_duration = PBField.new("bhdraft__schedule_duration", PB_DATA_TYPE.FLOAT, PB_RULE.OPTIONAL, 2053, true, DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT]) + service = PBServiceField.new() + service.field = _bhdraft__schedule_duration + data[_bhdraft__schedule_duration.tag] = service + + var data = {} + + var _category: PBField + func get_category() -> Category: + return _category.value + func clear_category() -> void: + data[1].state = PB_SERVICE_STATE.UNFILLED + _category.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] + func new_category() -> Category: + _category.value = Category.new() + return _category.value + + var _texture: PBField + func get_texture() -> Texture: + return _texture.value + func clear_texture() -> void: + data[2].state = PB_SERVICE_STATE.UNFILLED + _texture.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] + func new_texture() -> Texture: + _texture.value = Texture.new() + return _texture.value + + var _guid: PBField + func get_guid() -> GUID: + return _guid.value + func clear_guid() -> void: + data[3].state = PB_SERVICE_STATE.UNFILLED + _guid.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] + func new_guid() -> GUID: + _guid.value = GUID.new() + return _guid.value + + var _map_id: PBField + func get_map_id() -> int: + return _map_id.value + func clear_map_id() -> void: + data[4].state = PB_SERVICE_STATE.UNFILLED + _map_id.value = DEFAULT_VALUES_3[PB_DATA_TYPE.INT32] + func set_map_id(value : int) -> void: + _map_id.value = value + + var _distance_fade_end: PBField + func get_distance_fade_end() -> float: + return _distance_fade_end.value + func clear_distance_fade_end() -> void: + data[5].state = PB_SERVICE_STATE.UNFILLED + _distance_fade_end.value = DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT] + func set_distance_fade_end(value : float) -> void: + _distance_fade_end.value = value + + var _distance_fade_start: PBField + func get_distance_fade_start() -> float: + return _distance_fade_start.value + func clear_distance_fade_start() -> void: + data[6].state = PB_SERVICE_STATE.UNFILLED + _distance_fade_start.value = DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT] + func set_distance_fade_start(value : float) -> void: + _distance_fade_start.value = value + + var _trail_data: PBField + func get_trail_data() -> TrailData: + return _trail_data.value + func clear_trail_data() -> void: + data[7].state = PB_SERVICE_STATE.UNFILLED + _trail_data.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] + func new_trail_data() -> TrailData: + _trail_data.value = TrailData.new() + return _trail_data.value + + var _animation_speed: PBField + func get_animation_speed() -> float: + return _animation_speed.value + func clear_animation_speed() -> void: + data[8].state = PB_SERVICE_STATE.UNFILLED + _animation_speed.value = DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT] + func set_animation_speed(value : float) -> void: + _animation_speed.value = value + + var _achievement_bit: PBField + func get_achievement_bit() -> int: + return _achievement_bit.value + func clear_achievement_bit() -> void: + data[16].state = PB_SERVICE_STATE.UNFILLED + _achievement_bit.value = DEFAULT_VALUES_3[PB_DATA_TYPE.FIXED32] + func set_achievement_bit(value : int) -> void: + _achievement_bit.value = value + + var _achievement_id: PBField + func get_achievement_id() -> int: + return _achievement_id.value + func clear_achievement_id() -> void: + data[17].state = PB_SERVICE_STATE.UNFILLED + _achievement_id.value = DEFAULT_VALUES_3[PB_DATA_TYPE.INT32] + func set_achievement_id(value : int) -> void: + _achievement_id.value = value + + var _alpha: PBField + func get_alpha() -> float: + return _alpha.value + func clear_alpha() -> void: + data[18].state = PB_SERVICE_STATE.UNFILLED + _alpha.value = DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT] + func set_alpha(value : float) -> void: + _alpha.value = value + + var _can_fade: PBField + func get_can_fade() -> bool: + return _can_fade.value + func clear_can_fade() -> void: + data[19].state = PB_SERVICE_STATE.UNFILLED + _can_fade.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_can_fade(value : bool) -> void: + _can_fade.value = value + + var _is_wall: PBField + func get_is_wall() -> bool: + return _is_wall.value + func clear_is_wall() -> void: + data[20].state = PB_SERVICE_STATE.UNFILLED + _is_wall.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_is_wall(value : bool) -> void: + _is_wall.value = value + + var _scale: PBField + func get_scale() -> float: + return _scale.value + func clear_scale() -> void: + data[21].state = PB_SERVICE_STATE.UNFILLED + _scale.value = DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT] + func set_scale(value : float) -> void: + _scale.value = value + + var _color: PBField + func get_color() -> Color: + return _color.value + func clear_color() -> void: + data[22].state = PB_SERVICE_STATE.UNFILLED + _color.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] + func new_color() -> Color: + _color.value = Color.new() + return _color.value + + var _festival_filter: PBField + func get_festival_filter() -> FestivalFilter: + return _festival_filter.value + func clear_festival_filter() -> void: + data[23].state = PB_SERVICE_STATE.UNFILLED + _festival_filter.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] + func new_festival_filter() -> FestivalFilter: + _festival_filter.value = FestivalFilter.new() + return _festival_filter.value + + var _map_type_filter: PBField + func get_map_type_filter() -> MapTypeFilter: + return _map_type_filter.value + func clear_map_type_filter() -> void: + data[24].state = PB_SERVICE_STATE.UNFILLED + _map_type_filter.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] + func new_map_type_filter() -> MapTypeFilter: + _map_type_filter.value = MapTypeFilter.new() + return _map_type_filter.value + + var _mount_filter: PBField + func get_mount_filter() -> MountFilter: + return _mount_filter.value + func clear_mount_filter() -> void: + data[25].state = PB_SERVICE_STATE.UNFILLED + _mount_filter.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] + func new_mount_filter() -> MountFilter: + _mount_filter.value = MountFilter.new() + return _mount_filter.value + + var _profession_filter: PBField + func get_profession_filter() -> ProfessionFilter: + return _profession_filter.value + func clear_profession_filter() -> void: + data[26].state = PB_SERVICE_STATE.UNFILLED + _profession_filter.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] + func new_profession_filter() -> ProfessionFilter: + _profession_filter.value = ProfessionFilter.new() + return _profession_filter.value + + var _specialization_filter: PBField + func get_specialization_filter() -> SpecializationFilter: + return _specialization_filter.value + func clear_specialization_filter() -> void: + data[27].state = PB_SERVICE_STATE.UNFILLED + _specialization_filter.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] + func new_specialization_filter() -> SpecializationFilter: + _specialization_filter.value = SpecializationFilter.new() + return _specialization_filter.value + + var _species_filter: PBField + func get_species_filter() -> SpeciesFilter: + return _species_filter.value + func clear_species_filter() -> void: + data[28].state = PB_SERVICE_STATE.UNFILLED + _species_filter.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] + func new_species_filter() -> SpeciesFilter: + _species_filter.value = SpeciesFilter.new() + return _species_filter.value + + var _map_display_size: PBField + func get_map_display_size() -> int: + return _map_display_size.value + func clear_map_display_size() -> void: + data[29].state = PB_SERVICE_STATE.UNFILLED + _map_display_size.value = DEFAULT_VALUES_3[PB_DATA_TYPE.INT32] + func set_map_display_size(value : int) -> void: + _map_display_size.value = value + + var _cull_chirality: PBField + func get_cull_chirality(): + return _cull_chirality.value + func clear_cull_chirality() -> void: + data[30].state = PB_SERVICE_STATE.UNFILLED + _cull_chirality.value = DEFAULT_VALUES_3[PB_DATA_TYPE.ENUM] + func set_cull_chirality(value) -> void: + _cull_chirality.value = value + + var _tentative__render_ingame: PBField + func get_tentative__render_ingame() -> bool: + return _tentative__render_ingame.value + func clear_tentative__render_ingame() -> void: + data[2049].state = PB_SERVICE_STATE.UNFILLED + _tentative__render_ingame.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_tentative__render_ingame(value : bool) -> void: + _tentative__render_ingame.value = value + + var _tentative__render_on_map: PBField + func get_tentative__render_on_map() -> bool: + return _tentative__render_on_map.value + func clear_tentative__render_on_map() -> void: + data[2050].state = PB_SERVICE_STATE.UNFILLED + _tentative__render_on_map.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_tentative__render_on_map(value : bool) -> void: + _tentative__render_on_map.value = value + + var _tentative__render_on_minimap: PBField + func get_tentative__render_on_minimap() -> bool: + return _tentative__render_on_minimap.value + func clear_tentative__render_on_minimap() -> void: + data[2051].state = PB_SERVICE_STATE.UNFILLED + _tentative__render_on_minimap.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_tentative__render_on_minimap(value : bool) -> void: + _tentative__render_on_minimap.value = value + + var _bhdraft__schedule: PBField + func get_bhdraft__schedule() -> String: + return _bhdraft__schedule.value + func clear_bhdraft__schedule() -> void: + data[2052].state = PB_SERVICE_STATE.UNFILLED + _bhdraft__schedule.value = DEFAULT_VALUES_3[PB_DATA_TYPE.STRING] + func set_bhdraft__schedule(value : String) -> void: + _bhdraft__schedule.value = value + + var _bhdraft__schedule_duration: PBField + func get_bhdraft__schedule_duration() -> float: + return _bhdraft__schedule_duration.value + func clear_bhdraft__schedule_duration() -> void: + data[2053].state = PB_SERVICE_STATE.UNFILLED + _bhdraft__schedule_duration.value = DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT] + func set_bhdraft__schedule_duration(value : float) -> void: + _bhdraft__schedule_duration.value = value + + func to_string() -> String: + return PBPacker.message_to_string(data) + + func to_bytes() -> PoolByteArray: + return PBPacker.pack_message(data) + + func from_bytes(bytes : PoolByteArray, offset : int = 0, limit : int = -1) -> int: + var cur_limit = bytes.size() + if limit != -1: + cur_limit = limit + var result = PBPacker.unpack_message(data, bytes, offset, cur_limit) + if result == cur_limit: + if PBPacker.check_required(data): + if limit == -1: + return PB_ERR.NO_ERRORS + else: + return PB_ERR.REQUIRED_FIELDS + elif limit == -1 && result > 0: + return PB_ERR.PARSE_INCOMPLETE + return result + +class Texture: + func _init(): + var service + + _path = PBField.new("path", PB_DATA_TYPE.STRING, PB_RULE.OPTIONAL, 1, true, DEFAULT_VALUES_3[PB_DATA_TYPE.STRING]) + service = PBServiceField.new() + service.field = _path + data[_path.tag] = service + + var data = {} + + var _path: PBField + func get_path() -> String: + return _path.value + func clear_path() -> void: + data[1].state = PB_SERVICE_STATE.UNFILLED + _path.value = DEFAULT_VALUES_3[PB_DATA_TYPE.STRING] + func set_path(value : String) -> void: + _path.value = value + + func to_string() -> String: + return PBPacker.message_to_string(data) + + func to_bytes() -> PoolByteArray: + return PBPacker.pack_message(data) + + func from_bytes(bytes : PoolByteArray, offset : int = 0, limit : int = -1) -> int: + var cur_limit = bytes.size() + if limit != -1: + cur_limit = limit + var result = PBPacker.unpack_message(data, bytes, offset, cur_limit) + if result == cur_limit: + if PBPacker.check_required(data): + if limit == -1: + return PB_ERR.NO_ERRORS + else: + return PB_ERR.REQUIRED_FIELDS + elif limit == -1 && result > 0: + return PB_ERR.PARSE_INCOMPLETE + return result + +class Position: + func _init(): + var service + + _x = PBField.new("x", PB_DATA_TYPE.FLOAT, PB_RULE.OPTIONAL, 1, true, DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT]) + service = PBServiceField.new() + service.field = _x + data[_x.tag] = service + + _y = PBField.new("y", PB_DATA_TYPE.FLOAT, PB_RULE.OPTIONAL, 2, true, DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT]) + service = PBServiceField.new() + service.field = _y + data[_y.tag] = service + + _z = PBField.new("z", PB_DATA_TYPE.FLOAT, PB_RULE.OPTIONAL, 3, true, DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT]) + service = PBServiceField.new() + service.field = _z + data[_z.tag] = service + + var data = {} + + var _x: PBField + func get_x() -> float: + return _x.value + func clear_x() -> void: + data[1].state = PB_SERVICE_STATE.UNFILLED + _x.value = DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT] + func set_x(value : float) -> void: + _x.value = value + + var _y: PBField + func get_y() -> float: + return _y.value + func clear_y() -> void: + data[2].state = PB_SERVICE_STATE.UNFILLED + _y.value = DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT] + func set_y(value : float) -> void: + _y.value = value + + var _z: PBField + func get_z() -> float: + return _z.value + func clear_z() -> void: + data[3].state = PB_SERVICE_STATE.UNFILLED + _z.value = DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT] + func set_z(value : float) -> void: + _z.value = value + + func to_string() -> String: + return PBPacker.message_to_string(data) + + func to_bytes() -> PoolByteArray: + return PBPacker.pack_message(data) + + func from_bytes(bytes : PoolByteArray, offset : int = 0, limit : int = -1) -> int: + var cur_limit = bytes.size() + if limit != -1: + cur_limit = limit + var result = PBPacker.unpack_message(data, bytes, offset, cur_limit) + if result == cur_limit: + if PBPacker.check_required(data): + if limit == -1: + return PB_ERR.NO_ERRORS + else: + return PB_ERR.REQUIRED_FIELDS + elif limit == -1 && result > 0: + return PB_ERR.PARSE_INCOMPLETE + return result + +class EulerRotation: + func _init(): + var service + + _x = PBField.new("x", PB_DATA_TYPE.FLOAT, PB_RULE.OPTIONAL, 1, true, DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT]) + service = PBServiceField.new() + service.field = _x + data[_x.tag] = service + + _y = PBField.new("y", PB_DATA_TYPE.FLOAT, PB_RULE.OPTIONAL, 2, true, DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT]) + service = PBServiceField.new() + service.field = _y + data[_y.tag] = service + + _z = PBField.new("z", PB_DATA_TYPE.FLOAT, PB_RULE.OPTIONAL, 3, true, DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT]) + service = PBServiceField.new() + service.field = _z + data[_z.tag] = service + + var data = {} + + var _x: PBField + func get_x() -> float: + return _x.value + func clear_x() -> void: + data[1].state = PB_SERVICE_STATE.UNFILLED + _x.value = DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT] + func set_x(value : float) -> void: + _x.value = value + + var _y: PBField + func get_y() -> float: + return _y.value + func clear_y() -> void: + data[2].state = PB_SERVICE_STATE.UNFILLED + _y.value = DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT] + func set_y(value : float) -> void: + _y.value = value + + var _z: PBField + func get_z() -> float: + return _z.value + func clear_z() -> void: + data[3].state = PB_SERVICE_STATE.UNFILLED + _z.value = DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT] + func set_z(value : float) -> void: + _z.value = value + + func to_string() -> String: + return PBPacker.message_to_string(data) + + func to_bytes() -> PoolByteArray: + return PBPacker.pack_message(data) + + func from_bytes(bytes : PoolByteArray, offset : int = 0, limit : int = -1) -> int: + var cur_limit = bytes.size() + if limit != -1: + cur_limit = limit + var result = PBPacker.unpack_message(data, bytes, offset, cur_limit) + if result == cur_limit: + if PBPacker.check_required(data): + if limit == -1: + return PB_ERR.NO_ERRORS + else: + return PB_ERR.REQUIRED_FIELDS + elif limit == -1 && result > 0: + return PB_ERR.PARSE_INCOMPLETE + return result + +class Trigger: + func _init(): + var service + + _auto_trigger = PBField.new("auto_trigger", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 1, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _auto_trigger + data[_auto_trigger.tag] = service + + _bounce_delay = PBField.new("bounce_delay", PB_DATA_TYPE.FLOAT, PB_RULE.OPTIONAL, 2, true, DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT]) + service = PBServiceField.new() + service.field = _bounce_delay + data[_bounce_delay.tag] = service + + _bounce_duration = PBField.new("bounce_duration", PB_DATA_TYPE.FLOAT, PB_RULE.OPTIONAL, 3, true, DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT]) + service = PBServiceField.new() + service.field = _bounce_duration + data[_bounce_duration.tag] = service + + _bounce_height = PBField.new("bounce_height", PB_DATA_TYPE.FLOAT, PB_RULE.OPTIONAL, 4, true, DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT]) + service = PBServiceField.new() + service.field = _bounce_height + data[_bounce_height.tag] = service + + _action_copy_clipboard = PBField.new("action_copy_clipboard", PB_DATA_TYPE.STRING, PB_RULE.OPTIONAL, 5, true, DEFAULT_VALUES_3[PB_DATA_TYPE.STRING]) + service = PBServiceField.new() + service.field = _action_copy_clipboard + data[_action_copy_clipboard.tag] = service + + _action_copy_message = PBField.new("action_copy_message", PB_DATA_TYPE.STRING, PB_RULE.OPTIONAL, 6, true, DEFAULT_VALUES_3[PB_DATA_TYPE.STRING]) + service = PBServiceField.new() + service.field = _action_copy_message + data[_action_copy_message.tag] = service + + _has_countdown = PBField.new("has_countdown", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 7, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _has_countdown + data[_has_countdown.tag] = service + + _action_info_message = PBField.new("action_info_message", PB_DATA_TYPE.STRING, PB_RULE.OPTIONAL, 8, true, DEFAULT_VALUES_3[PB_DATA_TYPE.STRING]) + service = PBServiceField.new() + service.field = _action_info_message + data[_action_info_message.tag] = service + + _invert_display = PBField.new("invert_display", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 9, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _invert_display + data[_invert_display.tag] = service + + _reset_length = PBField.new("reset_length", PB_DATA_TYPE.FLOAT, PB_RULE.OPTIONAL, 10, true, DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT]) + service = PBServiceField.new() + service.field = _reset_length + data[_reset_length.tag] = service + + _range = PBField.new("range", PB_DATA_TYPE.FLOAT, PB_RULE.OPTIONAL, 11, true, DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT]) + service = PBServiceField.new() + service.field = _range + data[_range.tag] = service + + _action_hide_category = PBField.new("action_hide_category", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 12, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) + service = PBServiceField.new() + service.field = _action_hide_category + service.func_ref = funcref(self, "new_action_hide_category") + data[_action_hide_category.tag] = service + + _action_show_category = PBField.new("action_show_category", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 13, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) + service = PBServiceField.new() + service.field = _action_show_category + service.func_ref = funcref(self, "new_action_show_category") + data[_action_show_category.tag] = service + + _action_toggle_category = PBField.new("action_toggle_category", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 14, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) + service = PBServiceField.new() + service.field = _action_toggle_category + service.func_ref = funcref(self, "new_action_toggle_category") + data[_action_toggle_category.tag] = service + + _reset_behavior = PBField.new("reset_behavior", PB_DATA_TYPE.ENUM, PB_RULE.OPTIONAL, 15, true, DEFAULT_VALUES_3[PB_DATA_TYPE.ENUM]) + service = PBServiceField.new() + service.field = _reset_behavior + data[_reset_behavior.tag] = service + + var data = {} + + var _auto_trigger: PBField + func get_auto_trigger() -> bool: + return _auto_trigger.value + func clear_auto_trigger() -> void: + data[1].state = PB_SERVICE_STATE.UNFILLED + _auto_trigger.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_auto_trigger(value : bool) -> void: + _auto_trigger.value = value + + var _bounce_delay: PBField + func get_bounce_delay() -> float: + return _bounce_delay.value + func clear_bounce_delay() -> void: + data[2].state = PB_SERVICE_STATE.UNFILLED + _bounce_delay.value = DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT] + func set_bounce_delay(value : float) -> void: + _bounce_delay.value = value + + var _bounce_duration: PBField + func get_bounce_duration() -> float: + return _bounce_duration.value + func clear_bounce_duration() -> void: + data[3].state = PB_SERVICE_STATE.UNFILLED + _bounce_duration.value = DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT] + func set_bounce_duration(value : float) -> void: + _bounce_duration.value = value + + var _bounce_height: PBField + func get_bounce_height() -> float: + return _bounce_height.value + func clear_bounce_height() -> void: + data[4].state = PB_SERVICE_STATE.UNFILLED + _bounce_height.value = DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT] + func set_bounce_height(value : float) -> void: + _bounce_height.value = value + + var _action_copy_clipboard: PBField + func get_action_copy_clipboard() -> String: + return _action_copy_clipboard.value + func clear_action_copy_clipboard() -> void: + data[5].state = PB_SERVICE_STATE.UNFILLED + _action_copy_clipboard.value = DEFAULT_VALUES_3[PB_DATA_TYPE.STRING] + func set_action_copy_clipboard(value : String) -> void: + _action_copy_clipboard.value = value + + var _action_copy_message: PBField + func get_action_copy_message() -> String: + return _action_copy_message.value + func clear_action_copy_message() -> void: + data[6].state = PB_SERVICE_STATE.UNFILLED + _action_copy_message.value = DEFAULT_VALUES_3[PB_DATA_TYPE.STRING] + func set_action_copy_message(value : String) -> void: + _action_copy_message.value = value + + var _has_countdown: PBField + func get_has_countdown() -> bool: + return _has_countdown.value + func clear_has_countdown() -> void: + data[7].state = PB_SERVICE_STATE.UNFILLED + _has_countdown.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_has_countdown(value : bool) -> void: + _has_countdown.value = value + + var _action_info_message: PBField + func get_action_info_message() -> String: + return _action_info_message.value + func clear_action_info_message() -> void: + data[8].state = PB_SERVICE_STATE.UNFILLED + _action_info_message.value = DEFAULT_VALUES_3[PB_DATA_TYPE.STRING] + func set_action_info_message(value : String) -> void: + _action_info_message.value = value + + var _invert_display: PBField + func get_invert_display() -> bool: + return _invert_display.value + func clear_invert_display() -> void: + data[9].state = PB_SERVICE_STATE.UNFILLED + _invert_display.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_invert_display(value : bool) -> void: + _invert_display.value = value + + var _reset_length: PBField + func get_reset_length() -> float: + return _reset_length.value + func clear_reset_length() -> void: + data[10].state = PB_SERVICE_STATE.UNFILLED + _reset_length.value = DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT] + func set_reset_length(value : float) -> void: + _reset_length.value = value + + var _range: PBField + func get_range() -> float: + return _range.value + func clear_range() -> void: + data[11].state = PB_SERVICE_STATE.UNFILLED + _range.value = DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT] + func set_range(value : float) -> void: + _range.value = value + + var _action_hide_category: PBField + func get_action_hide_category() -> Category: + return _action_hide_category.value + func clear_action_hide_category() -> void: + data[12].state = PB_SERVICE_STATE.UNFILLED + _action_hide_category.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] + func new_action_hide_category() -> Category: + _action_hide_category.value = Category.new() + return _action_hide_category.value + + var _action_show_category: PBField + func get_action_show_category() -> Category: + return _action_show_category.value + func clear_action_show_category() -> void: + data[13].state = PB_SERVICE_STATE.UNFILLED + _action_show_category.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] + func new_action_show_category() -> Category: + _action_show_category.value = Category.new() + return _action_show_category.value + + var _action_toggle_category: PBField + func get_action_toggle_category() -> Category: + return _action_toggle_category.value + func clear_action_toggle_category() -> void: + data[14].state = PB_SERVICE_STATE.UNFILLED + _action_toggle_category.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] + func new_action_toggle_category() -> Category: + _action_toggle_category.value = Category.new() + return _action_toggle_category.value + + var _reset_behavior: PBField + func get_reset_behavior(): + return _reset_behavior.value + func clear_reset_behavior() -> void: + data[15].state = PB_SERVICE_STATE.UNFILLED + _reset_behavior.value = DEFAULT_VALUES_3[PB_DATA_TYPE.ENUM] + func set_reset_behavior(value) -> void: + _reset_behavior.value = value + + func to_string() -> String: + return PBPacker.message_to_string(data) + + func to_bytes() -> PoolByteArray: + return PBPacker.pack_message(data) + + func from_bytes(bytes : PoolByteArray, offset : int = 0, limit : int = -1) -> int: + var cur_limit = bytes.size() + if limit != -1: + cur_limit = limit + var result = PBPacker.unpack_message(data, bytes, offset, cur_limit) + if result == cur_limit: + if PBPacker.check_required(data): + if limit == -1: + return PB_ERR.NO_ERRORS + else: + return PB_ERR.REQUIRED_FIELDS + elif limit == -1 && result > 0: + return PB_ERR.PARSE_INCOMPLETE + return result + +class GUID: + func _init(): + var service + + _guid = PBField.new("guid", PB_DATA_TYPE.BYTES, PB_RULE.OPTIONAL, 1, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BYTES]) + service = PBServiceField.new() + service.field = _guid + data[_guid.tag] = service + + var data = {} + + var _guid: PBField + func get_guid() -> PoolByteArray: + return _guid.value + func clear_guid() -> void: + data[1].state = PB_SERVICE_STATE.UNFILLED + _guid.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BYTES] + func set_guid(value : PoolByteArray) -> void: + _guid.value = value + + func to_string() -> String: + return PBPacker.message_to_string(data) + + func to_bytes() -> PoolByteArray: + return PBPacker.pack_message(data) + + func from_bytes(bytes : PoolByteArray, offset : int = 0, limit : int = -1) -> int: + var cur_limit = bytes.size() + if limit != -1: + cur_limit = limit + var result = PBPacker.unpack_message(data, bytes, offset, cur_limit) + if result == cur_limit: + if PBPacker.check_required(data): + if limit == -1: + return PB_ERR.NO_ERRORS + else: + return PB_ERR.REQUIRED_FIELDS + elif limit == -1 && result > 0: + return PB_ERR.PARSE_INCOMPLETE + return result + +class Color: + func _init(): + var service + + _hex = PBField.new("hex", PB_DATA_TYPE.STRING, PB_RULE.OPTIONAL, 1, true, DEFAULT_VALUES_3[PB_DATA_TYPE.STRING]) + service = PBServiceField.new() + service.field = _hex + data[_hex.tag] = service + + var data = {} + + var _hex: PBField + func get_hex() -> String: + return _hex.value + func clear_hex() -> void: + data[1].state = PB_SERVICE_STATE.UNFILLED + _hex.value = DEFAULT_VALUES_3[PB_DATA_TYPE.STRING] + func set_hex(value : String) -> void: + _hex.value = value + + func to_string() -> String: + return PBPacker.message_to_string(data) + + func to_bytes() -> PoolByteArray: + return PBPacker.pack_message(data) + + func from_bytes(bytes : PoolByteArray, offset : int = 0, limit : int = -1) -> int: + var cur_limit = bytes.size() + if limit != -1: + cur_limit = limit + var result = PBPacker.unpack_message(data, bytes, offset, cur_limit) + if result == cur_limit: + if PBPacker.check_required(data): + if limit == -1: + return PB_ERR.NO_ERRORS + else: + return PB_ERR.REQUIRED_FIELDS + elif limit == -1 && result > 0: + return PB_ERR.PARSE_INCOMPLETE + return result + +enum CullChirality { + none = 0, + clockwise = 1, + counter_clockwise = 2 +} + +enum ResetBehavior { + always_visible = 0, + map_change = 1, + daily_reset = 2, + never = 3, + timer = 4, + map_reset = 5, + instance_change = 6, + daily_reset_per_character = 7, + weekly_reset = 8 +} + +class FestivalFilter: + func _init(): + var service + + _dragonbash = PBField.new("dragonbash", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 1, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _dragonbash + data[_dragonbash.tag] = service + + _festival_of_the_four_winds = PBField.new("festival_of_the_four_winds", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 2, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _festival_of_the_four_winds + data[_festival_of_the_four_winds.tag] = service + + _halloween = PBField.new("halloween", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 3, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _halloween + data[_halloween.tag] = service + + _lunar_new_year = PBField.new("lunar_new_year", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 4, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _lunar_new_year + data[_lunar_new_year.tag] = service + + _super_adventure_festival = PBField.new("super_adventure_festival", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 5, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _super_adventure_festival + data[_super_adventure_festival.tag] = service + + _wintersday = PBField.new("wintersday", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 6, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _wintersday + data[_wintersday.tag] = service + + _none = PBField.new("none", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 7, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _none + data[_none.tag] = service + + var data = {} + + var _dragonbash: PBField + func get_dragonbash() -> bool: + return _dragonbash.value + func clear_dragonbash() -> void: + data[1].state = PB_SERVICE_STATE.UNFILLED + _dragonbash.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_dragonbash(value : bool) -> void: + _dragonbash.value = value + + var _festival_of_the_four_winds: PBField + func get_festival_of_the_four_winds() -> bool: + return _festival_of_the_four_winds.value + func clear_festival_of_the_four_winds() -> void: + data[2].state = PB_SERVICE_STATE.UNFILLED + _festival_of_the_four_winds.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_festival_of_the_four_winds(value : bool) -> void: + _festival_of_the_four_winds.value = value + + var _halloween: PBField + func get_halloween() -> bool: + return _halloween.value + func clear_halloween() -> void: + data[3].state = PB_SERVICE_STATE.UNFILLED + _halloween.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_halloween(value : bool) -> void: + _halloween.value = value + + var _lunar_new_year: PBField + func get_lunar_new_year() -> bool: + return _lunar_new_year.value + func clear_lunar_new_year() -> void: + data[4].state = PB_SERVICE_STATE.UNFILLED + _lunar_new_year.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_lunar_new_year(value : bool) -> void: + _lunar_new_year.value = value + + var _super_adventure_festival: PBField + func get_super_adventure_festival() -> bool: + return _super_adventure_festival.value + func clear_super_adventure_festival() -> void: + data[5].state = PB_SERVICE_STATE.UNFILLED + _super_adventure_festival.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_super_adventure_festival(value : bool) -> void: + _super_adventure_festival.value = value + + var _wintersday: PBField + func get_wintersday() -> bool: + return _wintersday.value + func clear_wintersday() -> void: + data[6].state = PB_SERVICE_STATE.UNFILLED + _wintersday.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_wintersday(value : bool) -> void: + _wintersday.value = value + + var _none: PBField + func get_none() -> bool: + return _none.value + func clear_none() -> void: + data[7].state = PB_SERVICE_STATE.UNFILLED + _none.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_none(value : bool) -> void: + _none.value = value + + func to_string() -> String: + return PBPacker.message_to_string(data) + + func to_bytes() -> PoolByteArray: + return PBPacker.pack_message(data) + + func from_bytes(bytes : PoolByteArray, offset : int = 0, limit : int = -1) -> int: + var cur_limit = bytes.size() + if limit != -1: + cur_limit = limit + var result = PBPacker.unpack_message(data, bytes, offset, cur_limit) + if result == cur_limit: + if PBPacker.check_required(data): + if limit == -1: + return PB_ERR.NO_ERRORS + else: + return PB_ERR.REQUIRED_FIELDS + elif limit == -1 && result > 0: + return PB_ERR.PARSE_INCOMPLETE + return result + +class MapTypeFilter: + func _init(): + var service + + _unknown_map = PBField.new("unknown_map", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 1, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _unknown_map + data[_unknown_map.tag] = service + + _redirect_map = PBField.new("redirect_map", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 2, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _redirect_map + data[_redirect_map.tag] = service + + _character_create_map = PBField.new("character_create_map", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 3, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _character_create_map + data[_character_create_map.tag] = service + + _pvp_map = PBField.new("pvp_map", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 4, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _pvp_map + data[_pvp_map.tag] = service + + _gvg_map = PBField.new("gvg_map", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 5, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _gvg_map + data[_gvg_map.tag] = service + + _instance_map = PBField.new("instance_map", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 6, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _instance_map + data[_instance_map.tag] = service + + _public_map = PBField.new("public_map", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 7, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _public_map + data[_public_map.tag] = service + + _tournament_map = PBField.new("tournament_map", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 8, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _tournament_map + data[_tournament_map.tag] = service + + _tutorial_map = PBField.new("tutorial_map", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 9, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _tutorial_map + data[_tutorial_map.tag] = service + + _user_tournament_map = PBField.new("user_tournament_map", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 10, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _user_tournament_map + data[_user_tournament_map.tag] = service + + _center_map = PBField.new("center_map", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 11, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _center_map + data[_center_map.tag] = service + + _eternal_battlegrounds_map = PBField.new("eternal_battlegrounds_map", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 12, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _eternal_battlegrounds_map + data[_eternal_battlegrounds_map.tag] = service + + _bluehome_map = PBField.new("bluehome_map", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 13, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _bluehome_map + data[_bluehome_map.tag] = service + + _blue_borderlands_map = PBField.new("blue_borderlands_map", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 14, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _blue_borderlands_map + data[_blue_borderlands_map.tag] = service + + _green_home_map = PBField.new("green_home_map", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 15, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _green_home_map + data[_green_home_map.tag] = service + + _green_borderlands_map = PBField.new("green_borderlands_map", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 16, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _green_borderlands_map + data[_green_borderlands_map.tag] = service + + _red_home_map = PBField.new("red_home_map", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 17, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _red_home_map + data[_red_home_map.tag] = service + + _red_borderlands_map = PBField.new("red_borderlands_map", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 18, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _red_borderlands_map + data[_red_borderlands_map.tag] = service + + _fortunes_vale_map = PBField.new("fortunes_vale_map", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 19, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _fortunes_vale_map + data[_fortunes_vale_map.tag] = service + + _jump_puzzle_map = PBField.new("jump_puzzle_map", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 20, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _jump_puzzle_map + data[_jump_puzzle_map.tag] = service + + _obsidian_sanctum_map = PBField.new("obsidian_sanctum_map", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 21, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _obsidian_sanctum_map + data[_obsidian_sanctum_map.tag] = service + + _edge_of_the_mists_map = PBField.new("edge_of_the_mists_map", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 22, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _edge_of_the_mists_map + data[_edge_of_the_mists_map.tag] = service + + _public_mini_map = PBField.new("public_mini_map", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 23, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _public_mini_map + data[_public_mini_map.tag] = service + + _wvw_lounge_map = PBField.new("wvw_lounge_map", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 24, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _wvw_lounge_map + data[_wvw_lounge_map.tag] = service + + var data = {} + + var _unknown_map: PBField + func get_unknown_map() -> bool: + return _unknown_map.value + func clear_unknown_map() -> void: + data[1].state = PB_SERVICE_STATE.UNFILLED + _unknown_map.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_unknown_map(value : bool) -> void: + _unknown_map.value = value + + var _redirect_map: PBField + func get_redirect_map() -> bool: + return _redirect_map.value + func clear_redirect_map() -> void: + data[2].state = PB_SERVICE_STATE.UNFILLED + _redirect_map.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_redirect_map(value : bool) -> void: + _redirect_map.value = value + + var _character_create_map: PBField + func get_character_create_map() -> bool: + return _character_create_map.value + func clear_character_create_map() -> void: + data[3].state = PB_SERVICE_STATE.UNFILLED + _character_create_map.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_character_create_map(value : bool) -> void: + _character_create_map.value = value + + var _pvp_map: PBField + func get_pvp_map() -> bool: + return _pvp_map.value + func clear_pvp_map() -> void: + data[4].state = PB_SERVICE_STATE.UNFILLED + _pvp_map.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_pvp_map(value : bool) -> void: + _pvp_map.value = value + + var _gvg_map: PBField + func get_gvg_map() -> bool: + return _gvg_map.value + func clear_gvg_map() -> void: + data[5].state = PB_SERVICE_STATE.UNFILLED + _gvg_map.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_gvg_map(value : bool) -> void: + _gvg_map.value = value + + var _instance_map: PBField + func get_instance_map() -> bool: + return _instance_map.value + func clear_instance_map() -> void: + data[6].state = PB_SERVICE_STATE.UNFILLED + _instance_map.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_instance_map(value : bool) -> void: + _instance_map.value = value + + var _public_map: PBField + func get_public_map() -> bool: + return _public_map.value + func clear_public_map() -> void: + data[7].state = PB_SERVICE_STATE.UNFILLED + _public_map.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_public_map(value : bool) -> void: + _public_map.value = value + + var _tournament_map: PBField + func get_tournament_map() -> bool: + return _tournament_map.value + func clear_tournament_map() -> void: + data[8].state = PB_SERVICE_STATE.UNFILLED + _tournament_map.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_tournament_map(value : bool) -> void: + _tournament_map.value = value + + var _tutorial_map: PBField + func get_tutorial_map() -> bool: + return _tutorial_map.value + func clear_tutorial_map() -> void: + data[9].state = PB_SERVICE_STATE.UNFILLED + _tutorial_map.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_tutorial_map(value : bool) -> void: + _tutorial_map.value = value + + var _user_tournament_map: PBField + func get_user_tournament_map() -> bool: + return _user_tournament_map.value + func clear_user_tournament_map() -> void: + data[10].state = PB_SERVICE_STATE.UNFILLED + _user_tournament_map.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_user_tournament_map(value : bool) -> void: + _user_tournament_map.value = value + + var _center_map: PBField + func get_center_map() -> bool: + return _center_map.value + func clear_center_map() -> void: + data[11].state = PB_SERVICE_STATE.UNFILLED + _center_map.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_center_map(value : bool) -> void: + _center_map.value = value + + var _eternal_battlegrounds_map: PBField + func get_eternal_battlegrounds_map() -> bool: + return _eternal_battlegrounds_map.value + func clear_eternal_battlegrounds_map() -> void: + data[12].state = PB_SERVICE_STATE.UNFILLED + _eternal_battlegrounds_map.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_eternal_battlegrounds_map(value : bool) -> void: + _eternal_battlegrounds_map.value = value + + var _bluehome_map: PBField + func get_bluehome_map() -> bool: + return _bluehome_map.value + func clear_bluehome_map() -> void: + data[13].state = PB_SERVICE_STATE.UNFILLED + _bluehome_map.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_bluehome_map(value : bool) -> void: + _bluehome_map.value = value + + var _blue_borderlands_map: PBField + func get_blue_borderlands_map() -> bool: + return _blue_borderlands_map.value + func clear_blue_borderlands_map() -> void: + data[14].state = PB_SERVICE_STATE.UNFILLED + _blue_borderlands_map.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_blue_borderlands_map(value : bool) -> void: + _blue_borderlands_map.value = value + + var _green_home_map: PBField + func get_green_home_map() -> bool: + return _green_home_map.value + func clear_green_home_map() -> void: + data[15].state = PB_SERVICE_STATE.UNFILLED + _green_home_map.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_green_home_map(value : bool) -> void: + _green_home_map.value = value + + var _green_borderlands_map: PBField + func get_green_borderlands_map() -> bool: + return _green_borderlands_map.value + func clear_green_borderlands_map() -> void: + data[16].state = PB_SERVICE_STATE.UNFILLED + _green_borderlands_map.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_green_borderlands_map(value : bool) -> void: + _green_borderlands_map.value = value + + var _red_home_map: PBField + func get_red_home_map() -> bool: + return _red_home_map.value + func clear_red_home_map() -> void: + data[17].state = PB_SERVICE_STATE.UNFILLED + _red_home_map.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_red_home_map(value : bool) -> void: + _red_home_map.value = value + + var _red_borderlands_map: PBField + func get_red_borderlands_map() -> bool: + return _red_borderlands_map.value + func clear_red_borderlands_map() -> void: + data[18].state = PB_SERVICE_STATE.UNFILLED + _red_borderlands_map.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_red_borderlands_map(value : bool) -> void: + _red_borderlands_map.value = value + + var _fortunes_vale_map: PBField + func get_fortunes_vale_map() -> bool: + return _fortunes_vale_map.value + func clear_fortunes_vale_map() -> void: + data[19].state = PB_SERVICE_STATE.UNFILLED + _fortunes_vale_map.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_fortunes_vale_map(value : bool) -> void: + _fortunes_vale_map.value = value + + var _jump_puzzle_map: PBField + func get_jump_puzzle_map() -> bool: + return _jump_puzzle_map.value + func clear_jump_puzzle_map() -> void: + data[20].state = PB_SERVICE_STATE.UNFILLED + _jump_puzzle_map.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_jump_puzzle_map(value : bool) -> void: + _jump_puzzle_map.value = value + + var _obsidian_sanctum_map: PBField + func get_obsidian_sanctum_map() -> bool: + return _obsidian_sanctum_map.value + func clear_obsidian_sanctum_map() -> void: + data[21].state = PB_SERVICE_STATE.UNFILLED + _obsidian_sanctum_map.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_obsidian_sanctum_map(value : bool) -> void: + _obsidian_sanctum_map.value = value + + var _edge_of_the_mists_map: PBField + func get_edge_of_the_mists_map() -> bool: + return _edge_of_the_mists_map.value + func clear_edge_of_the_mists_map() -> void: + data[22].state = PB_SERVICE_STATE.UNFILLED + _edge_of_the_mists_map.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_edge_of_the_mists_map(value : bool) -> void: + _edge_of_the_mists_map.value = value + + var _public_mini_map: PBField + func get_public_mini_map() -> bool: + return _public_mini_map.value + func clear_public_mini_map() -> void: + data[23].state = PB_SERVICE_STATE.UNFILLED + _public_mini_map.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_public_mini_map(value : bool) -> void: + _public_mini_map.value = value + + var _wvw_lounge_map: PBField + func get_wvw_lounge_map() -> bool: + return _wvw_lounge_map.value + func clear_wvw_lounge_map() -> void: + data[24].state = PB_SERVICE_STATE.UNFILLED + _wvw_lounge_map.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_wvw_lounge_map(value : bool) -> void: + _wvw_lounge_map.value = value + + func to_string() -> String: + return PBPacker.message_to_string(data) + + func to_bytes() -> PoolByteArray: + return PBPacker.pack_message(data) + + func from_bytes(bytes : PoolByteArray, offset : int = 0, limit : int = -1) -> int: + var cur_limit = bytes.size() + if limit != -1: + cur_limit = limit + var result = PBPacker.unpack_message(data, bytes, offset, cur_limit) + if result == cur_limit: + if PBPacker.check_required(data): + if limit == -1: + return PB_ERR.NO_ERRORS + else: + return PB_ERR.REQUIRED_FIELDS + elif limit == -1 && result > 0: + return PB_ERR.PARSE_INCOMPLETE + return result + +class MountFilter: + func _init(): + var service + + _raptor = PBField.new("raptor", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 1, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _raptor + data[_raptor.tag] = service + + _springer = PBField.new("springer", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 2, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _springer + data[_springer.tag] = service + + _skimmer = PBField.new("skimmer", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 3, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _skimmer + data[_skimmer.tag] = service + + _jackal = PBField.new("jackal", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 4, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _jackal + data[_jackal.tag] = service + + _griffon = PBField.new("griffon", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 5, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _griffon + data[_griffon.tag] = service + + _roller_beetle = PBField.new("roller_beetle", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 6, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _roller_beetle + data[_roller_beetle.tag] = service + + _warclaw = PBField.new("warclaw", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 7, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _warclaw + data[_warclaw.tag] = service + + _skyscale = PBField.new("skyscale", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 8, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _skyscale + data[_skyscale.tag] = service + + _skiff = PBField.new("skiff", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 9, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _skiff + data[_skiff.tag] = service + + _seige_turtle = PBField.new("seige_turtle", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 10, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _seige_turtle + data[_seige_turtle.tag] = service + + var data = {} + + var _raptor: PBField + func get_raptor() -> bool: + return _raptor.value + func clear_raptor() -> void: + data[1].state = PB_SERVICE_STATE.UNFILLED + _raptor.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_raptor(value : bool) -> void: + _raptor.value = value + + var _springer: PBField + func get_springer() -> bool: + return _springer.value + func clear_springer() -> void: + data[2].state = PB_SERVICE_STATE.UNFILLED + _springer.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_springer(value : bool) -> void: + _springer.value = value + + var _skimmer: PBField + func get_skimmer() -> bool: + return _skimmer.value + func clear_skimmer() -> void: + data[3].state = PB_SERVICE_STATE.UNFILLED + _skimmer.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_skimmer(value : bool) -> void: + _skimmer.value = value + + var _jackal: PBField + func get_jackal() -> bool: + return _jackal.value + func clear_jackal() -> void: + data[4].state = PB_SERVICE_STATE.UNFILLED + _jackal.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_jackal(value : bool) -> void: + _jackal.value = value + + var _griffon: PBField + func get_griffon() -> bool: + return _griffon.value + func clear_griffon() -> void: + data[5].state = PB_SERVICE_STATE.UNFILLED + _griffon.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_griffon(value : bool) -> void: + _griffon.value = value + + var _roller_beetle: PBField + func get_roller_beetle() -> bool: + return _roller_beetle.value + func clear_roller_beetle() -> void: + data[6].state = PB_SERVICE_STATE.UNFILLED + _roller_beetle.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_roller_beetle(value : bool) -> void: + _roller_beetle.value = value + + var _warclaw: PBField + func get_warclaw() -> bool: + return _warclaw.value + func clear_warclaw() -> void: + data[7].state = PB_SERVICE_STATE.UNFILLED + _warclaw.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_warclaw(value : bool) -> void: + _warclaw.value = value + + var _skyscale: PBField + func get_skyscale() -> bool: + return _skyscale.value + func clear_skyscale() -> void: + data[8].state = PB_SERVICE_STATE.UNFILLED + _skyscale.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_skyscale(value : bool) -> void: + _skyscale.value = value + + var _skiff: PBField + func get_skiff() -> bool: + return _skiff.value + func clear_skiff() -> void: + data[9].state = PB_SERVICE_STATE.UNFILLED + _skiff.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_skiff(value : bool) -> void: + _skiff.value = value + + var _seige_turtle: PBField + func get_seige_turtle() -> bool: + return _seige_turtle.value + func clear_seige_turtle() -> void: + data[10].state = PB_SERVICE_STATE.UNFILLED + _seige_turtle.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_seige_turtle(value : bool) -> void: + _seige_turtle.value = value + + func to_string() -> String: + return PBPacker.message_to_string(data) + + func to_bytes() -> PoolByteArray: + return PBPacker.pack_message(data) + + func from_bytes(bytes : PoolByteArray, offset : int = 0, limit : int = -1) -> int: + var cur_limit = bytes.size() + if limit != -1: + cur_limit = limit + var result = PBPacker.unpack_message(data, bytes, offset, cur_limit) + if result == cur_limit: + if PBPacker.check_required(data): + if limit == -1: + return PB_ERR.NO_ERRORS + else: + return PB_ERR.REQUIRED_FIELDS + elif limit == -1 && result > 0: + return PB_ERR.PARSE_INCOMPLETE + return result + +class ProfessionFilter: + func _init(): + var service + + _guardian = PBField.new("guardian", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 1, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _guardian + data[_guardian.tag] = service + + _warrior = PBField.new("warrior", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 2, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _warrior + data[_warrior.tag] = service + + _engineer = PBField.new("engineer", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 3, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _engineer + data[_engineer.tag] = service + + _ranger = PBField.new("ranger", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 4, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _ranger + data[_ranger.tag] = service + + _thief = PBField.new("thief", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 5, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _thief + data[_thief.tag] = service + + _elementalist = PBField.new("elementalist", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 6, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _elementalist + data[_elementalist.tag] = service + + _mesmer = PBField.new("mesmer", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 7, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _mesmer + data[_mesmer.tag] = service + + _necromancer = PBField.new("necromancer", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 8, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _necromancer + data[_necromancer.tag] = service + + _revenant = PBField.new("revenant", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 9, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _revenant + data[_revenant.tag] = service + + var data = {} + + var _guardian: PBField + func get_guardian() -> bool: + return _guardian.value + func clear_guardian() -> void: + data[1].state = PB_SERVICE_STATE.UNFILLED + _guardian.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_guardian(value : bool) -> void: + _guardian.value = value + + var _warrior: PBField + func get_warrior() -> bool: + return _warrior.value + func clear_warrior() -> void: + data[2].state = PB_SERVICE_STATE.UNFILLED + _warrior.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_warrior(value : bool) -> void: + _warrior.value = value + + var _engineer: PBField + func get_engineer() -> bool: + return _engineer.value + func clear_engineer() -> void: + data[3].state = PB_SERVICE_STATE.UNFILLED + _engineer.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_engineer(value : bool) -> void: + _engineer.value = value + + var _ranger: PBField + func get_ranger() -> bool: + return _ranger.value + func clear_ranger() -> void: + data[4].state = PB_SERVICE_STATE.UNFILLED + _ranger.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_ranger(value : bool) -> void: + _ranger.value = value + + var _thief: PBField + func get_thief() -> bool: + return _thief.value + func clear_thief() -> void: + data[5].state = PB_SERVICE_STATE.UNFILLED + _thief.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_thief(value : bool) -> void: + _thief.value = value + + var _elementalist: PBField + func get_elementalist() -> bool: + return _elementalist.value + func clear_elementalist() -> void: + data[6].state = PB_SERVICE_STATE.UNFILLED + _elementalist.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_elementalist(value : bool) -> void: + _elementalist.value = value + + var _mesmer: PBField + func get_mesmer() -> bool: + return _mesmer.value + func clear_mesmer() -> void: + data[7].state = PB_SERVICE_STATE.UNFILLED + _mesmer.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_mesmer(value : bool) -> void: + _mesmer.value = value + + var _necromancer: PBField + func get_necromancer() -> bool: + return _necromancer.value + func clear_necromancer() -> void: + data[8].state = PB_SERVICE_STATE.UNFILLED + _necromancer.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_necromancer(value : bool) -> void: + _necromancer.value = value + + var _revenant: PBField + func get_revenant() -> bool: + return _revenant.value + func clear_revenant() -> void: + data[9].state = PB_SERVICE_STATE.UNFILLED + _revenant.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_revenant(value : bool) -> void: + _revenant.value = value + + func to_string() -> String: + return PBPacker.message_to_string(data) + + func to_bytes() -> PoolByteArray: + return PBPacker.pack_message(data) + + func from_bytes(bytes : PoolByteArray, offset : int = 0, limit : int = -1) -> int: + var cur_limit = bytes.size() + if limit != -1: + cur_limit = limit + var result = PBPacker.unpack_message(data, bytes, offset, cur_limit) + if result == cur_limit: + if PBPacker.check_required(data): + if limit == -1: + return PB_ERR.NO_ERRORS + else: + return PB_ERR.REQUIRED_FIELDS + elif limit == -1 && result > 0: + return PB_ERR.PARSE_INCOMPLETE + return result + +class SpecializationFilter: + func _init(): + var service + + _elementalist_tempest = PBField.new("elementalist_tempest", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 1, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _elementalist_tempest + data[_elementalist_tempest.tag] = service + + _engineer_scrapper = PBField.new("engineer_scrapper", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 2, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _engineer_scrapper + data[_engineer_scrapper.tag] = service + + _guardian_dragonhunter = PBField.new("guardian_dragonhunter", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 3, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _guardian_dragonhunter + data[_guardian_dragonhunter.tag] = service + + _mesmer_chronomancer = PBField.new("mesmer_chronomancer", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 4, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _mesmer_chronomancer + data[_mesmer_chronomancer.tag] = service + + _necromancer_reaper = PBField.new("necromancer_reaper", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 5, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _necromancer_reaper + data[_necromancer_reaper.tag] = service + + _ranger_druid = PBField.new("ranger_druid", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 6, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _ranger_druid + data[_ranger_druid.tag] = service + + _revenant_herald = PBField.new("revenant_herald", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 7, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _revenant_herald + data[_revenant_herald.tag] = service + + _thief_daredevil = PBField.new("thief_daredevil", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 8, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _thief_daredevil + data[_thief_daredevil.tag] = service + + _warrior_berserker = PBField.new("warrior_berserker", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 9, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _warrior_berserker + data[_warrior_berserker.tag] = service + + _elementalist_weaver = PBField.new("elementalist_weaver", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 10, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _elementalist_weaver + data[_elementalist_weaver.tag] = service + + _engineer_holosmith = PBField.new("engineer_holosmith", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 11, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _engineer_holosmith + data[_engineer_holosmith.tag] = service + + _guardian_firebrand = PBField.new("guardian_firebrand", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 12, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _guardian_firebrand + data[_guardian_firebrand.tag] = service + + _mesmer_mirage = PBField.new("mesmer_mirage", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 13, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _mesmer_mirage + data[_mesmer_mirage.tag] = service + + _necromancer_scourge = PBField.new("necromancer_scourge", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 14, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _necromancer_scourge + data[_necromancer_scourge.tag] = service + + _ranger_soulbeast = PBField.new("ranger_soulbeast", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 15, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _ranger_soulbeast + data[_ranger_soulbeast.tag] = service + + _revenant_renegade = PBField.new("revenant_renegade", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 16, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _revenant_renegade + data[_revenant_renegade.tag] = service + + _thief_deadeye = PBField.new("thief_deadeye", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 17, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _thief_deadeye + data[_thief_deadeye.tag] = service + + _warrior_spellbreaker = PBField.new("warrior_spellbreaker", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 18, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _warrior_spellbreaker + data[_warrior_spellbreaker.tag] = service + + _elementalist_catalyst = PBField.new("elementalist_catalyst", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 19, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _elementalist_catalyst + data[_elementalist_catalyst.tag] = service + + _engineer_mechanist = PBField.new("engineer_mechanist", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 20, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _engineer_mechanist + data[_engineer_mechanist.tag] = service + + _guardian_willbender = PBField.new("guardian_willbender", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 21, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _guardian_willbender + data[_guardian_willbender.tag] = service + + _mesmer_virtuoso = PBField.new("mesmer_virtuoso", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 22, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _mesmer_virtuoso + data[_mesmer_virtuoso.tag] = service + + _necromancer_harbinger = PBField.new("necromancer_harbinger", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 23, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _necromancer_harbinger + data[_necromancer_harbinger.tag] = service + + _ranger_untamed = PBField.new("ranger_untamed", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 24, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _ranger_untamed + data[_ranger_untamed.tag] = service + + _revenant_vindicator = PBField.new("revenant_vindicator", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 25, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _revenant_vindicator + data[_revenant_vindicator.tag] = service + + _thief_specter = PBField.new("thief_specter", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 26, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _thief_specter + data[_thief_specter.tag] = service + + _warrior_bladesworn = PBField.new("warrior_bladesworn", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 27, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _warrior_bladesworn + data[_warrior_bladesworn.tag] = service + + _elementalist_air = PBField.new("elementalist_air", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 28, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _elementalist_air + data[_elementalist_air.tag] = service + + _elementalist_arcane = PBField.new("elementalist_arcane", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 29, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _elementalist_arcane + data[_elementalist_arcane.tag] = service + + _elementalist_earth = PBField.new("elementalist_earth", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 30, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _elementalist_earth + data[_elementalist_earth.tag] = service + + _elementalist_fire = PBField.new("elementalist_fire", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 31, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _elementalist_fire + data[_elementalist_fire.tag] = service + + _elementalist_water = PBField.new("elementalist_water", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 32, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _elementalist_water + data[_elementalist_water.tag] = service + + _engineer_alchemy = PBField.new("engineer_alchemy", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 33, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _engineer_alchemy + data[_engineer_alchemy.tag] = service + + _engineer_explosives = PBField.new("engineer_explosives", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 34, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _engineer_explosives + data[_engineer_explosives.tag] = service + + _engineer_firearms = PBField.new("engineer_firearms", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 35, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _engineer_firearms + data[_engineer_firearms.tag] = service + + _engineer_inventions = PBField.new("engineer_inventions", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 36, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _engineer_inventions + data[_engineer_inventions.tag] = service + + _engineer_tools = PBField.new("engineer_tools", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 37, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _engineer_tools + data[_engineer_tools.tag] = service + + _guardian_honor = PBField.new("guardian_honor", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 38, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _guardian_honor + data[_guardian_honor.tag] = service + + _guardian_radiance = PBField.new("guardian_radiance", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 39, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _guardian_radiance + data[_guardian_radiance.tag] = service + + _guardian_valor = PBField.new("guardian_valor", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 40, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _guardian_valor + data[_guardian_valor.tag] = service + + _guardian_virtues = PBField.new("guardian_virtues", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 41, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _guardian_virtues + data[_guardian_virtues.tag] = service + + _guardian_zeal = PBField.new("guardian_zeal", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 42, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _guardian_zeal + data[_guardian_zeal.tag] = service + + _mesmer_chaos = PBField.new("mesmer_chaos", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 43, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _mesmer_chaos + data[_mesmer_chaos.tag] = service + + _mesmer_domination = PBField.new("mesmer_domination", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 44, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _mesmer_domination + data[_mesmer_domination.tag] = service + + _mesmer_dueling = PBField.new("mesmer_dueling", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 45, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _mesmer_dueling + data[_mesmer_dueling.tag] = service + + _mesmer_illusions = PBField.new("mesmer_illusions", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 46, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _mesmer_illusions + data[_mesmer_illusions.tag] = service + + _mesmer_inspiration = PBField.new("mesmer_inspiration", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 47, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _mesmer_inspiration + data[_mesmer_inspiration.tag] = service + + _necromancer_blood_magic = PBField.new("necromancer_blood_magic", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 48, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _necromancer_blood_magic + data[_necromancer_blood_magic.tag] = service + + _necromancer_curses = PBField.new("necromancer_curses", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 49, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _necromancer_curses + data[_necromancer_curses.tag] = service + + _necromancer_death_magic = PBField.new("necromancer_death_magic", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 50, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _necromancer_death_magic + data[_necromancer_death_magic.tag] = service + + _necromancer_soul_reaping = PBField.new("necromancer_soul_reaping", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 51, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _necromancer_soul_reaping + data[_necromancer_soul_reaping.tag] = service + + _necromancer_spite = PBField.new("necromancer_spite", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 52, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _necromancer_spite + data[_necromancer_spite.tag] = service + + _ranger_beastmastery = PBField.new("ranger_beastmastery", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 53, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _ranger_beastmastery + data[_ranger_beastmastery.tag] = service + + _ranger_marksmanship = PBField.new("ranger_marksmanship", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 54, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _ranger_marksmanship + data[_ranger_marksmanship.tag] = service + + _ranger_nature_magic = PBField.new("ranger_nature_magic", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 55, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _ranger_nature_magic + data[_ranger_nature_magic.tag] = service + + _ranger_skirmishing = PBField.new("ranger_skirmishing", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 56, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _ranger_skirmishing + data[_ranger_skirmishing.tag] = service + + _ranger_wilderness_survival = PBField.new("ranger_wilderness_survival", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 57, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _ranger_wilderness_survival + data[_ranger_wilderness_survival.tag] = service + + _revenant_corruption = PBField.new("revenant_corruption", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 58, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _revenant_corruption + data[_revenant_corruption.tag] = service + + _revenant_devastation = PBField.new("revenant_devastation", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 59, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _revenant_devastation + data[_revenant_devastation.tag] = service + + _revenant_invocation = PBField.new("revenant_invocation", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 60, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _revenant_invocation + data[_revenant_invocation.tag] = service + + _revenant_retribution = PBField.new("revenant_retribution", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 61, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _revenant_retribution + data[_revenant_retribution.tag] = service + + _revenant_salvation = PBField.new("revenant_salvation", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 62, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _revenant_salvation + data[_revenant_salvation.tag] = service + + _thief_acrobatics = PBField.new("thief_acrobatics", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 63, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _thief_acrobatics + data[_thief_acrobatics.tag] = service + + _thief_critical_strikes = PBField.new("thief_critical_strikes", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 64, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _thief_critical_strikes + data[_thief_critical_strikes.tag] = service + + _thief_deadly_arts = PBField.new("thief_deadly_arts", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 65, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _thief_deadly_arts + data[_thief_deadly_arts.tag] = service + + _thief_shadow_arts = PBField.new("thief_shadow_arts", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 66, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _thief_shadow_arts + data[_thief_shadow_arts.tag] = service + + _thief_trickery = PBField.new("thief_trickery", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 67, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _thief_trickery + data[_thief_trickery.tag] = service + + _warrior_arms = PBField.new("warrior_arms", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 68, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _warrior_arms + data[_warrior_arms.tag] = service + + _warrior_defense = PBField.new("warrior_defense", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 69, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _warrior_defense + data[_warrior_defense.tag] = service + + _warrior_discipline = PBField.new("warrior_discipline", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 70, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _warrior_discipline + data[_warrior_discipline.tag] = service + + _warrior_strength = PBField.new("warrior_strength", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 71, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _warrior_strength + data[_warrior_strength.tag] = service + + _warrior_tactics = PBField.new("warrior_tactics", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 72, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _warrior_tactics + data[_warrior_tactics.tag] = service + + var data = {} + + var _elementalist_tempest: PBField + func get_elementalist_tempest() -> bool: + return _elementalist_tempest.value + func clear_elementalist_tempest() -> void: + data[1].state = PB_SERVICE_STATE.UNFILLED + _elementalist_tempest.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_elementalist_tempest(value : bool) -> void: + _elementalist_tempest.value = value + + var _engineer_scrapper: PBField + func get_engineer_scrapper() -> bool: + return _engineer_scrapper.value + func clear_engineer_scrapper() -> void: + data[2].state = PB_SERVICE_STATE.UNFILLED + _engineer_scrapper.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_engineer_scrapper(value : bool) -> void: + _engineer_scrapper.value = value + + var _guardian_dragonhunter: PBField + func get_guardian_dragonhunter() -> bool: + return _guardian_dragonhunter.value + func clear_guardian_dragonhunter() -> void: + data[3].state = PB_SERVICE_STATE.UNFILLED + _guardian_dragonhunter.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_guardian_dragonhunter(value : bool) -> void: + _guardian_dragonhunter.value = value + + var _mesmer_chronomancer: PBField + func get_mesmer_chronomancer() -> bool: + return _mesmer_chronomancer.value + func clear_mesmer_chronomancer() -> void: + data[4].state = PB_SERVICE_STATE.UNFILLED + _mesmer_chronomancer.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_mesmer_chronomancer(value : bool) -> void: + _mesmer_chronomancer.value = value + + var _necromancer_reaper: PBField + func get_necromancer_reaper() -> bool: + return _necromancer_reaper.value + func clear_necromancer_reaper() -> void: + data[5].state = PB_SERVICE_STATE.UNFILLED + _necromancer_reaper.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_necromancer_reaper(value : bool) -> void: + _necromancer_reaper.value = value + + var _ranger_druid: PBField + func get_ranger_druid() -> bool: + return _ranger_druid.value + func clear_ranger_druid() -> void: + data[6].state = PB_SERVICE_STATE.UNFILLED + _ranger_druid.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_ranger_druid(value : bool) -> void: + _ranger_druid.value = value + + var _revenant_herald: PBField + func get_revenant_herald() -> bool: + return _revenant_herald.value + func clear_revenant_herald() -> void: + data[7].state = PB_SERVICE_STATE.UNFILLED + _revenant_herald.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_revenant_herald(value : bool) -> void: + _revenant_herald.value = value + + var _thief_daredevil: PBField + func get_thief_daredevil() -> bool: + return _thief_daredevil.value + func clear_thief_daredevil() -> void: + data[8].state = PB_SERVICE_STATE.UNFILLED + _thief_daredevil.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_thief_daredevil(value : bool) -> void: + _thief_daredevil.value = value + + var _warrior_berserker: PBField + func get_warrior_berserker() -> bool: + return _warrior_berserker.value + func clear_warrior_berserker() -> void: + data[9].state = PB_SERVICE_STATE.UNFILLED + _warrior_berserker.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_warrior_berserker(value : bool) -> void: + _warrior_berserker.value = value + + var _elementalist_weaver: PBField + func get_elementalist_weaver() -> bool: + return _elementalist_weaver.value + func clear_elementalist_weaver() -> void: + data[10].state = PB_SERVICE_STATE.UNFILLED + _elementalist_weaver.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_elementalist_weaver(value : bool) -> void: + _elementalist_weaver.value = value + + var _engineer_holosmith: PBField + func get_engineer_holosmith() -> bool: + return _engineer_holosmith.value + func clear_engineer_holosmith() -> void: + data[11].state = PB_SERVICE_STATE.UNFILLED + _engineer_holosmith.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_engineer_holosmith(value : bool) -> void: + _engineer_holosmith.value = value + + var _guardian_firebrand: PBField + func get_guardian_firebrand() -> bool: + return _guardian_firebrand.value + func clear_guardian_firebrand() -> void: + data[12].state = PB_SERVICE_STATE.UNFILLED + _guardian_firebrand.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_guardian_firebrand(value : bool) -> void: + _guardian_firebrand.value = value + + var _mesmer_mirage: PBField + func get_mesmer_mirage() -> bool: + return _mesmer_mirage.value + func clear_mesmer_mirage() -> void: + data[13].state = PB_SERVICE_STATE.UNFILLED + _mesmer_mirage.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_mesmer_mirage(value : bool) -> void: + _mesmer_mirage.value = value + + var _necromancer_scourge: PBField + func get_necromancer_scourge() -> bool: + return _necromancer_scourge.value + func clear_necromancer_scourge() -> void: + data[14].state = PB_SERVICE_STATE.UNFILLED + _necromancer_scourge.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_necromancer_scourge(value : bool) -> void: + _necromancer_scourge.value = value + + var _ranger_soulbeast: PBField + func get_ranger_soulbeast() -> bool: + return _ranger_soulbeast.value + func clear_ranger_soulbeast() -> void: + data[15].state = PB_SERVICE_STATE.UNFILLED + _ranger_soulbeast.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_ranger_soulbeast(value : bool) -> void: + _ranger_soulbeast.value = value + + var _revenant_renegade: PBField + func get_revenant_renegade() -> bool: + return _revenant_renegade.value + func clear_revenant_renegade() -> void: + data[16].state = PB_SERVICE_STATE.UNFILLED + _revenant_renegade.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_revenant_renegade(value : bool) -> void: + _revenant_renegade.value = value + + var _thief_deadeye: PBField + func get_thief_deadeye() -> bool: + return _thief_deadeye.value + func clear_thief_deadeye() -> void: + data[17].state = PB_SERVICE_STATE.UNFILLED + _thief_deadeye.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_thief_deadeye(value : bool) -> void: + _thief_deadeye.value = value + + var _warrior_spellbreaker: PBField + func get_warrior_spellbreaker() -> bool: + return _warrior_spellbreaker.value + func clear_warrior_spellbreaker() -> void: + data[18].state = PB_SERVICE_STATE.UNFILLED + _warrior_spellbreaker.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_warrior_spellbreaker(value : bool) -> void: + _warrior_spellbreaker.value = value + + var _elementalist_catalyst: PBField + func get_elementalist_catalyst() -> bool: + return _elementalist_catalyst.value + func clear_elementalist_catalyst() -> void: + data[19].state = PB_SERVICE_STATE.UNFILLED + _elementalist_catalyst.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_elementalist_catalyst(value : bool) -> void: + _elementalist_catalyst.value = value + + var _engineer_mechanist: PBField + func get_engineer_mechanist() -> bool: + return _engineer_mechanist.value + func clear_engineer_mechanist() -> void: + data[20].state = PB_SERVICE_STATE.UNFILLED + _engineer_mechanist.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_engineer_mechanist(value : bool) -> void: + _engineer_mechanist.value = value + + var _guardian_willbender: PBField + func get_guardian_willbender() -> bool: + return _guardian_willbender.value + func clear_guardian_willbender() -> void: + data[21].state = PB_SERVICE_STATE.UNFILLED + _guardian_willbender.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_guardian_willbender(value : bool) -> void: + _guardian_willbender.value = value + + var _mesmer_virtuoso: PBField + func get_mesmer_virtuoso() -> bool: + return _mesmer_virtuoso.value + func clear_mesmer_virtuoso() -> void: + data[22].state = PB_SERVICE_STATE.UNFILLED + _mesmer_virtuoso.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_mesmer_virtuoso(value : bool) -> void: + _mesmer_virtuoso.value = value + + var _necromancer_harbinger: PBField + func get_necromancer_harbinger() -> bool: + return _necromancer_harbinger.value + func clear_necromancer_harbinger() -> void: + data[23].state = PB_SERVICE_STATE.UNFILLED + _necromancer_harbinger.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_necromancer_harbinger(value : bool) -> void: + _necromancer_harbinger.value = value + + var _ranger_untamed: PBField + func get_ranger_untamed() -> bool: + return _ranger_untamed.value + func clear_ranger_untamed() -> void: + data[24].state = PB_SERVICE_STATE.UNFILLED + _ranger_untamed.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_ranger_untamed(value : bool) -> void: + _ranger_untamed.value = value + + var _revenant_vindicator: PBField + func get_revenant_vindicator() -> bool: + return _revenant_vindicator.value + func clear_revenant_vindicator() -> void: + data[25].state = PB_SERVICE_STATE.UNFILLED + _revenant_vindicator.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_revenant_vindicator(value : bool) -> void: + _revenant_vindicator.value = value + + var _thief_specter: PBField + func get_thief_specter() -> bool: + return _thief_specter.value + func clear_thief_specter() -> void: + data[26].state = PB_SERVICE_STATE.UNFILLED + _thief_specter.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_thief_specter(value : bool) -> void: + _thief_specter.value = value + + var _warrior_bladesworn: PBField + func get_warrior_bladesworn() -> bool: + return _warrior_bladesworn.value + func clear_warrior_bladesworn() -> void: + data[27].state = PB_SERVICE_STATE.UNFILLED + _warrior_bladesworn.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_warrior_bladesworn(value : bool) -> void: + _warrior_bladesworn.value = value + + var _elementalist_air: PBField + func get_elementalist_air() -> bool: + return _elementalist_air.value + func clear_elementalist_air() -> void: + data[28].state = PB_SERVICE_STATE.UNFILLED + _elementalist_air.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_elementalist_air(value : bool) -> void: + _elementalist_air.value = value + + var _elementalist_arcane: PBField + func get_elementalist_arcane() -> bool: + return _elementalist_arcane.value + func clear_elementalist_arcane() -> void: + data[29].state = PB_SERVICE_STATE.UNFILLED + _elementalist_arcane.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_elementalist_arcane(value : bool) -> void: + _elementalist_arcane.value = value + + var _elementalist_earth: PBField + func get_elementalist_earth() -> bool: + return _elementalist_earth.value + func clear_elementalist_earth() -> void: + data[30].state = PB_SERVICE_STATE.UNFILLED + _elementalist_earth.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_elementalist_earth(value : bool) -> void: + _elementalist_earth.value = value + + var _elementalist_fire: PBField + func get_elementalist_fire() -> bool: + return _elementalist_fire.value + func clear_elementalist_fire() -> void: + data[31].state = PB_SERVICE_STATE.UNFILLED + _elementalist_fire.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_elementalist_fire(value : bool) -> void: + _elementalist_fire.value = value + + var _elementalist_water: PBField + func get_elementalist_water() -> bool: + return _elementalist_water.value + func clear_elementalist_water() -> void: + data[32].state = PB_SERVICE_STATE.UNFILLED + _elementalist_water.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_elementalist_water(value : bool) -> void: + _elementalist_water.value = value + + var _engineer_alchemy: PBField + func get_engineer_alchemy() -> bool: + return _engineer_alchemy.value + func clear_engineer_alchemy() -> void: + data[33].state = PB_SERVICE_STATE.UNFILLED + _engineer_alchemy.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_engineer_alchemy(value : bool) -> void: + _engineer_alchemy.value = value + + var _engineer_explosives: PBField + func get_engineer_explosives() -> bool: + return _engineer_explosives.value + func clear_engineer_explosives() -> void: + data[34].state = PB_SERVICE_STATE.UNFILLED + _engineer_explosives.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_engineer_explosives(value : bool) -> void: + _engineer_explosives.value = value + + var _engineer_firearms: PBField + func get_engineer_firearms() -> bool: + return _engineer_firearms.value + func clear_engineer_firearms() -> void: + data[35].state = PB_SERVICE_STATE.UNFILLED + _engineer_firearms.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_engineer_firearms(value : bool) -> void: + _engineer_firearms.value = value + + var _engineer_inventions: PBField + func get_engineer_inventions() -> bool: + return _engineer_inventions.value + func clear_engineer_inventions() -> void: + data[36].state = PB_SERVICE_STATE.UNFILLED + _engineer_inventions.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_engineer_inventions(value : bool) -> void: + _engineer_inventions.value = value + + var _engineer_tools: PBField + func get_engineer_tools() -> bool: + return _engineer_tools.value + func clear_engineer_tools() -> void: + data[37].state = PB_SERVICE_STATE.UNFILLED + _engineer_tools.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_engineer_tools(value : bool) -> void: + _engineer_tools.value = value + + var _guardian_honor: PBField + func get_guardian_honor() -> bool: + return _guardian_honor.value + func clear_guardian_honor() -> void: + data[38].state = PB_SERVICE_STATE.UNFILLED + _guardian_honor.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_guardian_honor(value : bool) -> void: + _guardian_honor.value = value + + var _guardian_radiance: PBField + func get_guardian_radiance() -> bool: + return _guardian_radiance.value + func clear_guardian_radiance() -> void: + data[39].state = PB_SERVICE_STATE.UNFILLED + _guardian_radiance.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_guardian_radiance(value : bool) -> void: + _guardian_radiance.value = value + + var _guardian_valor: PBField + func get_guardian_valor() -> bool: + return _guardian_valor.value + func clear_guardian_valor() -> void: + data[40].state = PB_SERVICE_STATE.UNFILLED + _guardian_valor.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_guardian_valor(value : bool) -> void: + _guardian_valor.value = value + + var _guardian_virtues: PBField + func get_guardian_virtues() -> bool: + return _guardian_virtues.value + func clear_guardian_virtues() -> void: + data[41].state = PB_SERVICE_STATE.UNFILLED + _guardian_virtues.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_guardian_virtues(value : bool) -> void: + _guardian_virtues.value = value + + var _guardian_zeal: PBField + func get_guardian_zeal() -> bool: + return _guardian_zeal.value + func clear_guardian_zeal() -> void: + data[42].state = PB_SERVICE_STATE.UNFILLED + _guardian_zeal.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_guardian_zeal(value : bool) -> void: + _guardian_zeal.value = value + + var _mesmer_chaos: PBField + func get_mesmer_chaos() -> bool: + return _mesmer_chaos.value + func clear_mesmer_chaos() -> void: + data[43].state = PB_SERVICE_STATE.UNFILLED + _mesmer_chaos.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_mesmer_chaos(value : bool) -> void: + _mesmer_chaos.value = value + + var _mesmer_domination: PBField + func get_mesmer_domination() -> bool: + return _mesmer_domination.value + func clear_mesmer_domination() -> void: + data[44].state = PB_SERVICE_STATE.UNFILLED + _mesmer_domination.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_mesmer_domination(value : bool) -> void: + _mesmer_domination.value = value + + var _mesmer_dueling: PBField + func get_mesmer_dueling() -> bool: + return _mesmer_dueling.value + func clear_mesmer_dueling() -> void: + data[45].state = PB_SERVICE_STATE.UNFILLED + _mesmer_dueling.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_mesmer_dueling(value : bool) -> void: + _mesmer_dueling.value = value + + var _mesmer_illusions: PBField + func get_mesmer_illusions() -> bool: + return _mesmer_illusions.value + func clear_mesmer_illusions() -> void: + data[46].state = PB_SERVICE_STATE.UNFILLED + _mesmer_illusions.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_mesmer_illusions(value : bool) -> void: + _mesmer_illusions.value = value + + var _mesmer_inspiration: PBField + func get_mesmer_inspiration() -> bool: + return _mesmer_inspiration.value + func clear_mesmer_inspiration() -> void: + data[47].state = PB_SERVICE_STATE.UNFILLED + _mesmer_inspiration.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_mesmer_inspiration(value : bool) -> void: + _mesmer_inspiration.value = value + + var _necromancer_blood_magic: PBField + func get_necromancer_blood_magic() -> bool: + return _necromancer_blood_magic.value + func clear_necromancer_blood_magic() -> void: + data[48].state = PB_SERVICE_STATE.UNFILLED + _necromancer_blood_magic.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_necromancer_blood_magic(value : bool) -> void: + _necromancer_blood_magic.value = value + + var _necromancer_curses: PBField + func get_necromancer_curses() -> bool: + return _necromancer_curses.value + func clear_necromancer_curses() -> void: + data[49].state = PB_SERVICE_STATE.UNFILLED + _necromancer_curses.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_necromancer_curses(value : bool) -> void: + _necromancer_curses.value = value + + var _necromancer_death_magic: PBField + func get_necromancer_death_magic() -> bool: + return _necromancer_death_magic.value + func clear_necromancer_death_magic() -> void: + data[50].state = PB_SERVICE_STATE.UNFILLED + _necromancer_death_magic.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_necromancer_death_magic(value : bool) -> void: + _necromancer_death_magic.value = value + + var _necromancer_soul_reaping: PBField + func get_necromancer_soul_reaping() -> bool: + return _necromancer_soul_reaping.value + func clear_necromancer_soul_reaping() -> void: + data[51].state = PB_SERVICE_STATE.UNFILLED + _necromancer_soul_reaping.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_necromancer_soul_reaping(value : bool) -> void: + _necromancer_soul_reaping.value = value + + var _necromancer_spite: PBField + func get_necromancer_spite() -> bool: + return _necromancer_spite.value + func clear_necromancer_spite() -> void: + data[52].state = PB_SERVICE_STATE.UNFILLED + _necromancer_spite.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_necromancer_spite(value : bool) -> void: + _necromancer_spite.value = value + + var _ranger_beastmastery: PBField + func get_ranger_beastmastery() -> bool: + return _ranger_beastmastery.value + func clear_ranger_beastmastery() -> void: + data[53].state = PB_SERVICE_STATE.UNFILLED + _ranger_beastmastery.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_ranger_beastmastery(value : bool) -> void: + _ranger_beastmastery.value = value + + var _ranger_marksmanship: PBField + func get_ranger_marksmanship() -> bool: + return _ranger_marksmanship.value + func clear_ranger_marksmanship() -> void: + data[54].state = PB_SERVICE_STATE.UNFILLED + _ranger_marksmanship.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_ranger_marksmanship(value : bool) -> void: + _ranger_marksmanship.value = value + + var _ranger_nature_magic: PBField + func get_ranger_nature_magic() -> bool: + return _ranger_nature_magic.value + func clear_ranger_nature_magic() -> void: + data[55].state = PB_SERVICE_STATE.UNFILLED + _ranger_nature_magic.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_ranger_nature_magic(value : bool) -> void: + _ranger_nature_magic.value = value + + var _ranger_skirmishing: PBField + func get_ranger_skirmishing() -> bool: + return _ranger_skirmishing.value + func clear_ranger_skirmishing() -> void: + data[56].state = PB_SERVICE_STATE.UNFILLED + _ranger_skirmishing.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_ranger_skirmishing(value : bool) -> void: + _ranger_skirmishing.value = value + + var _ranger_wilderness_survival: PBField + func get_ranger_wilderness_survival() -> bool: + return _ranger_wilderness_survival.value + func clear_ranger_wilderness_survival() -> void: + data[57].state = PB_SERVICE_STATE.UNFILLED + _ranger_wilderness_survival.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_ranger_wilderness_survival(value : bool) -> void: + _ranger_wilderness_survival.value = value + + var _revenant_corruption: PBField + func get_revenant_corruption() -> bool: + return _revenant_corruption.value + func clear_revenant_corruption() -> void: + data[58].state = PB_SERVICE_STATE.UNFILLED + _revenant_corruption.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_revenant_corruption(value : bool) -> void: + _revenant_corruption.value = value + + var _revenant_devastation: PBField + func get_revenant_devastation() -> bool: + return _revenant_devastation.value + func clear_revenant_devastation() -> void: + data[59].state = PB_SERVICE_STATE.UNFILLED + _revenant_devastation.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_revenant_devastation(value : bool) -> void: + _revenant_devastation.value = value + + var _revenant_invocation: PBField + func get_revenant_invocation() -> bool: + return _revenant_invocation.value + func clear_revenant_invocation() -> void: + data[60].state = PB_SERVICE_STATE.UNFILLED + _revenant_invocation.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_revenant_invocation(value : bool) -> void: + _revenant_invocation.value = value + + var _revenant_retribution: PBField + func get_revenant_retribution() -> bool: + return _revenant_retribution.value + func clear_revenant_retribution() -> void: + data[61].state = PB_SERVICE_STATE.UNFILLED + _revenant_retribution.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_revenant_retribution(value : bool) -> void: + _revenant_retribution.value = value + + var _revenant_salvation: PBField + func get_revenant_salvation() -> bool: + return _revenant_salvation.value + func clear_revenant_salvation() -> void: + data[62].state = PB_SERVICE_STATE.UNFILLED + _revenant_salvation.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_revenant_salvation(value : bool) -> void: + _revenant_salvation.value = value + + var _thief_acrobatics: PBField + func get_thief_acrobatics() -> bool: + return _thief_acrobatics.value + func clear_thief_acrobatics() -> void: + data[63].state = PB_SERVICE_STATE.UNFILLED + _thief_acrobatics.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_thief_acrobatics(value : bool) -> void: + _thief_acrobatics.value = value + + var _thief_critical_strikes: PBField + func get_thief_critical_strikes() -> bool: + return _thief_critical_strikes.value + func clear_thief_critical_strikes() -> void: + data[64].state = PB_SERVICE_STATE.UNFILLED + _thief_critical_strikes.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_thief_critical_strikes(value : bool) -> void: + _thief_critical_strikes.value = value + + var _thief_deadly_arts: PBField + func get_thief_deadly_arts() -> bool: + return _thief_deadly_arts.value + func clear_thief_deadly_arts() -> void: + data[65].state = PB_SERVICE_STATE.UNFILLED + _thief_deadly_arts.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_thief_deadly_arts(value : bool) -> void: + _thief_deadly_arts.value = value + + var _thief_shadow_arts: PBField + func get_thief_shadow_arts() -> bool: + return _thief_shadow_arts.value + func clear_thief_shadow_arts() -> void: + data[66].state = PB_SERVICE_STATE.UNFILLED + _thief_shadow_arts.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_thief_shadow_arts(value : bool) -> void: + _thief_shadow_arts.value = value + + var _thief_trickery: PBField + func get_thief_trickery() -> bool: + return _thief_trickery.value + func clear_thief_trickery() -> void: + data[67].state = PB_SERVICE_STATE.UNFILLED + _thief_trickery.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_thief_trickery(value : bool) -> void: + _thief_trickery.value = value + + var _warrior_arms: PBField + func get_warrior_arms() -> bool: + return _warrior_arms.value + func clear_warrior_arms() -> void: + data[68].state = PB_SERVICE_STATE.UNFILLED + _warrior_arms.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_warrior_arms(value : bool) -> void: + _warrior_arms.value = value + + var _warrior_defense: PBField + func get_warrior_defense() -> bool: + return _warrior_defense.value + func clear_warrior_defense() -> void: + data[69].state = PB_SERVICE_STATE.UNFILLED + _warrior_defense.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_warrior_defense(value : bool) -> void: + _warrior_defense.value = value + + var _warrior_discipline: PBField + func get_warrior_discipline() -> bool: + return _warrior_discipline.value + func clear_warrior_discipline() -> void: + data[70].state = PB_SERVICE_STATE.UNFILLED + _warrior_discipline.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_warrior_discipline(value : bool) -> void: + _warrior_discipline.value = value + + var _warrior_strength: PBField + func get_warrior_strength() -> bool: + return _warrior_strength.value + func clear_warrior_strength() -> void: + data[71].state = PB_SERVICE_STATE.UNFILLED + _warrior_strength.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_warrior_strength(value : bool) -> void: + _warrior_strength.value = value + + var _warrior_tactics: PBField + func get_warrior_tactics() -> bool: + return _warrior_tactics.value + func clear_warrior_tactics() -> void: + data[72].state = PB_SERVICE_STATE.UNFILLED + _warrior_tactics.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_warrior_tactics(value : bool) -> void: + _warrior_tactics.value = value + + func to_string() -> String: + return PBPacker.message_to_string(data) + + func to_bytes() -> PoolByteArray: + return PBPacker.pack_message(data) + + func from_bytes(bytes : PoolByteArray, offset : int = 0, limit : int = -1) -> int: + var cur_limit = bytes.size() + if limit != -1: + cur_limit = limit + var result = PBPacker.unpack_message(data, bytes, offset, cur_limit) + if result == cur_limit: + if PBPacker.check_required(data): + if limit == -1: + return PB_ERR.NO_ERRORS + else: + return PB_ERR.REQUIRED_FIELDS + elif limit == -1 && result > 0: + return PB_ERR.PARSE_INCOMPLETE + return result + +class SpeciesFilter: + func _init(): + var service + + _asura = PBField.new("asura", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 1, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _asura + data[_asura.tag] = service + + _charr = PBField.new("charr", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 2, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _charr + data[_charr.tag] = service + + _human = PBField.new("human", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 3, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _human + data[_human.tag] = service + + _norn = PBField.new("norn", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 4, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _norn + data[_norn.tag] = service + + _sylvari = PBField.new("sylvari", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 5, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _sylvari + data[_sylvari.tag] = service + + var data = {} + + var _asura: PBField + func get_asura() -> bool: + return _asura.value + func clear_asura() -> void: + data[1].state = PB_SERVICE_STATE.UNFILLED + _asura.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_asura(value : bool) -> void: + _asura.value = value + + var _charr: PBField + func get_charr() -> bool: + return _charr.value + func clear_charr() -> void: + data[2].state = PB_SERVICE_STATE.UNFILLED + _charr.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_charr(value : bool) -> void: + _charr.value = value + + var _human: PBField + func get_human() -> bool: + return _human.value + func clear_human() -> void: + data[3].state = PB_SERVICE_STATE.UNFILLED + _human.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_human(value : bool) -> void: + _human.value = value + + var _norn: PBField + func get_norn() -> bool: + return _norn.value + func clear_norn() -> void: + data[4].state = PB_SERVICE_STATE.UNFILLED + _norn.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_norn(value : bool) -> void: + _norn.value = value + + var _sylvari: PBField + func get_sylvari() -> bool: + return _sylvari.value + func clear_sylvari() -> void: + data[5].state = PB_SERVICE_STATE.UNFILLED + _sylvari.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_sylvari(value : bool) -> void: + _sylvari.value = value + + func to_string() -> String: + return PBPacker.message_to_string(data) + + func to_bytes() -> PoolByteArray: + return PBPacker.pack_message(data) + + func from_bytes(bytes : PoolByteArray, offset : int = 0, limit : int = -1) -> int: + var cur_limit = bytes.size() + if limit != -1: + cur_limit = limit + var result = PBPacker.unpack_message(data, bytes, offset, cur_limit) + if result == cur_limit: + if PBPacker.check_required(data): + if limit == -1: + return PB_ERR.NO_ERRORS + else: + return PB_ERR.REQUIRED_FIELDS + elif limit == -1 && result > 0: + return PB_ERR.PARSE_INCOMPLETE + return result + +class TrailData: + func _init(): + var service + + _trail_data = PBField.new("trail_data", PB_DATA_TYPE.STRING, PB_RULE.OPTIONAL, 1, true, DEFAULT_VALUES_3[PB_DATA_TYPE.STRING]) + service = PBServiceField.new() + service.field = _trail_data + data[_trail_data.tag] = service + + var data = {} + + var _trail_data: PBField + func get_trail_data() -> String: + return _trail_data.value + func clear_trail_data() -> void: + data[1].state = PB_SERVICE_STATE.UNFILLED + _trail_data.value = DEFAULT_VALUES_3[PB_DATA_TYPE.STRING] + func set_trail_data(value : String) -> void: + _trail_data.value = value + + func to_string() -> String: + return PBPacker.message_to_string(data) + + func to_bytes() -> PoolByteArray: + return PBPacker.pack_message(data) + + func from_bytes(bytes : PoolByteArray, offset : int = 0, limit : int = -1) -> int: + var cur_limit = bytes.size() + if limit != -1: + cur_limit = limit + var result = PBPacker.unpack_message(data, bytes, offset, cur_limit) + if result == cur_limit: + if PBPacker.check_required(data): + if limit == -1: + return PB_ERR.NO_ERRORS + else: + return PB_ERR.REQUIRED_FIELDS + elif limit == -1 && result > 0: + return PB_ERR.PARSE_INCOMPLETE + return result + +################ USER DATA END ################# diff --git a/xml_converter/doc/rendering/render_ingame.md b/xml_converter/doc/rendering/render_ingame.md index 0794b34c..1ce760a5 100644 --- a/xml_converter/doc/rendering/render_ingame.md +++ b/xml_converter/doc/rendering/render_ingame.md @@ -3,7 +3,7 @@ name: Render Ingame type: Boolean applies_to: [Icon, Trail] xml_fields: [IngameVisibility, BHIngameVisibility] -protobuf_field: __tentative__render_ingame +protobuf_field: tentative__render_ingame compatability: [TacO, BlishHUD, Burrito] --- diff --git a/xml_converter/doc/rendering/render_on_map.md b/xml_converter/doc/rendering/render_on_map.md index e63e3020..397ed8a3 100644 --- a/xml_converter/doc/rendering/render_on_map.md +++ b/xml_converter/doc/rendering/render_on_map.md @@ -3,7 +3,7 @@ name: Render on Map type: Boolean applies_to: [Icon, Trail] xml_fields: [MapVisibility, BHMapVisibility] -protobuf_field: __tentative__render_on_map +protobuf_field: tentative__render_on_map compatability: [TacO, BlishHUD, Burrito] --- Allows or Prevents this object from being rendered on the world map. diff --git a/xml_converter/doc/rendering/render_on_minimap.md b/xml_converter/doc/rendering/render_on_minimap.md index 77fb2322..42eeb0eb 100644 --- a/xml_converter/doc/rendering/render_on_minimap.md +++ b/xml_converter/doc/rendering/render_on_minimap.md @@ -3,7 +3,7 @@ name: Render on Minimap type: Boolean applies_to: [Icon, Trail] xml_fields: [MinimapVisibility, BHMinimapVisibility] -protobuf_field: __tentative__render_on_minimap +protobuf_field: tentative__render_on_minimap compatability: [TacO, BlishHUD, Burrito] --- diff --git a/xml_converter/doc/scale/icon_size.md b/xml_converter/doc/scale/icon_size.md index 8b8322ba..a84a7c3c 100644 --- a/xml_converter/doc/scale/icon_size.md +++ b/xml_converter/doc/scale/icon_size.md @@ -3,7 +3,7 @@ name: Icon Size type: Float32 applies_to: [Icon] xml_fields: [IconSize] -protobuf_field: __tentative__scale +protobuf_field: tentative__scale compatability: [TacO, BlishHUD, Burrito] --- Unclear) Some value representation of how large an icon should be. Is this a scale multiplier or a fixed size value? How does this relate to MinSize and MaxSize. diff --git a/xml_converter/proto/waypoint.proto b/xml_converter/proto/waypoint.proto index f4ea5d6b..99bef6be 100644 --- a/xml_converter/proto/waypoint.proto +++ b/xml_converter/proto/waypoint.proto @@ -48,10 +48,10 @@ message Icon { SpeciesFilter species_filter = 32; CullChirality cull_chirality = 33; - float __tentative__scale = 2048; - bool __tentative__render_ingame = 2049; - bool __tentative__render_on_map = 2050; - bool __tentative__render_on_minimap = 2051; + float tentative__scale = 2048; + bool tentative__render_ingame = 2049; + bool tentative__render_on_map = 2050; + bool tentative__render_on_minimap = 2051; string bhdraft__schedule = 2052; float bhdraft__schedule_duration = 2053; } @@ -82,9 +82,9 @@ message Trail { int32 map_display_size = 29; CullChirality cull_chirality = 30; - bool __tentative__render_ingame = 2049; - bool __tentative__render_on_map = 2050; - bool __tentative__render_on_minimap = 2051; + bool tentative__render_ingame = 2049; + bool tentative__render_on_map = 2050; + bool tentative__render_on_minimap = 2051; string bhdraft__schedule = 2052; float bhdraft__schedule_duration = 2053; } diff --git a/xml_converter/src/icon_gen.cpp b/xml_converter/src/icon_gen.cpp index 6fc3ee1c..c0e7fca7 100644 --- a/xml_converter/src/icon_gen.cpp +++ b/xml_converter/src/icon_gen.cpp @@ -554,7 +554,7 @@ waypoint::Icon Icon::as_protobuf() const { proto_icon.set_allocated_texture(to_proto_image(this->icon)); } if (this->icon_size_is_set) { - proto_icon.set___tentative__scale(this->icon_size); + proto_icon.set_tentative__scale(this->icon_size); } if (this->info_message_is_set) { if (trigger == nullptr) { @@ -593,13 +593,13 @@ waypoint::Icon Icon::as_protobuf() const { proto_icon.set_allocated_profession_filter(to_proto_profession_filter(this->profession_filter)); } if (this->render_ingame_is_set) { - proto_icon.set___tentative__render_ingame(this->render_ingame); + proto_icon.set_tentative__render_ingame(this->render_ingame); } if (this->render_on_map_is_set) { - proto_icon.set___tentative__render_on_map(this->render_on_map); + proto_icon.set_tentative__render_on_map(this->render_on_map); } if (this->render_on_minimap_is_set) { - proto_icon.set___tentative__render_on_minimap(this->render_on_minimap); + proto_icon.set_tentative__render_on_minimap(this->render_on_minimap); } if (this->reset_behavior_is_set) { if (trigger == nullptr) { @@ -748,8 +748,8 @@ void Icon::parse_protobuf(waypoint::Icon proto_icon) { this->icon = from_proto_image(proto_icon.texture()); this->icon_is_set = true; } - if (proto_icon.__tentative__scale() != 0) { - this->icon_size = proto_icon.__tentative__scale(); + if (proto_icon.tentative__scale() != 0) { + this->icon_size = proto_icon.tentative__scale(); this->icon_size_is_set = true; } if (trigger.action_info_message() != "") { @@ -792,16 +792,16 @@ void Icon::parse_protobuf(waypoint::Icon proto_icon) { this->profession_filter = from_proto_profession_filter(proto_icon.profession_filter()); this->profession_filter_is_set = true; } - if (proto_icon.__tentative__render_ingame() != 0) { - this->render_ingame = proto_icon.__tentative__render_ingame(); + if (proto_icon.tentative__render_ingame() != 0) { + this->render_ingame = proto_icon.tentative__render_ingame(); this->render_ingame_is_set = true; } - if (proto_icon.__tentative__render_on_map() != 0) { - this->render_on_map = proto_icon.__tentative__render_on_map(); + if (proto_icon.tentative__render_on_map() != 0) { + this->render_on_map = proto_icon.tentative__render_on_map(); this->render_on_map_is_set = true; } - if (proto_icon.__tentative__render_on_minimap() != 0) { - this->render_on_minimap = proto_icon.__tentative__render_on_minimap(); + if (proto_icon.tentative__render_on_minimap() != 0) { + this->render_on_minimap = proto_icon.tentative__render_on_minimap(); this->render_on_minimap_is_set = true; } if (trigger.reset_behavior() != 0) { diff --git a/xml_converter/src/trail_gen.cpp b/xml_converter/src/trail_gen.cpp index c5cc81fe..ba1622c3 100644 --- a/xml_converter/src/trail_gen.cpp +++ b/xml_converter/src/trail_gen.cpp @@ -324,13 +324,13 @@ waypoint::Trail Trail::as_protobuf() const { proto_trail.set_allocated_profession_filter(to_proto_profession_filter(this->profession_filter)); } if (this->render_ingame_is_set) { - proto_trail.set___tentative__render_ingame(this->render_ingame); + proto_trail.set_tentative__render_ingame(this->render_ingame); } if (this->render_on_map_is_set) { - proto_trail.set___tentative__render_on_map(this->render_on_map); + proto_trail.set_tentative__render_on_map(this->render_on_map); } if (this->render_on_minimap_is_set) { - proto_trail.set___tentative__render_on_minimap(this->render_on_minimap); + proto_trail.set_tentative__render_on_minimap(this->render_on_minimap); } if (this->schedule_is_set) { proto_trail.set_bhdraft__schedule(this->schedule); @@ -429,16 +429,16 @@ void Trail::parse_protobuf(waypoint::Trail proto_trail) { this->profession_filter = from_proto_profession_filter(proto_trail.profession_filter()); this->profession_filter_is_set = true; } - if (proto_trail.__tentative__render_ingame() != 0) { - this->render_ingame = proto_trail.__tentative__render_ingame(); + if (proto_trail.tentative__render_ingame() != 0) { + this->render_ingame = proto_trail.tentative__render_ingame(); this->render_ingame_is_set = true; } - if (proto_trail.__tentative__render_on_map() != 0) { - this->render_on_map = proto_trail.__tentative__render_on_map(); + if (proto_trail.tentative__render_on_map() != 0) { + this->render_on_map = proto_trail.tentative__render_on_map(); this->render_on_map_is_set = true; } - if (proto_trail.__tentative__render_on_minimap() != 0) { - this->render_on_minimap = proto_trail.__tentative__render_on_minimap(); + if (proto_trail.tentative__render_on_minimap() != 0) { + this->render_on_minimap = proto_trail.tentative__render_on_minimap(); this->render_on_minimap_is_set = true; } if (proto_trail.bhdraft__schedule() != "") { diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 6b20ef8f..4ae5aac7 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -5,6 +5,10 @@ #include #include #include +#include +#include +#include +#include #include #include #include @@ -91,6 +95,43 @@ void remove_proto_child(waypoint::Category* proto_category, set category proto_category->mutable_children()->DeleteSubrange(keep, proto_category->children_size() - keep); } +void read_trail_data_file(waypoint::Trail* trail){ + ifstream trail_data_file; + string trail_path = "./" + trail->trail_data().trail_data(); + trail_data_file.open(trail_path, ios::in | ios::binary); + + char version[4]; + trail_data_file.read(version, 4); + + char map_id[4]; + + trail_data_file.read(map_id, 4); + uint32_t map_num = *(uint32_t *)map_id; + trail->set_map_id(map_num); + + vector points_x; + vector points_y; + vector points_z; + + while (trail_data_file.tellg() > 0) { + char point_x[4]; + trail_data_file.read(point_x, 4); + points_x.push_back(*(float *)point_x); + char point_y[4]; + trail_data_file.read(point_y, 4); + points_y.push_back(*(float *)point_y); + char point_z[4]; + trail_data_file.read(point_z, 4); + points_z.push_back(*(float *)point_z); + } + + *trail->mutable_trail_data()->mutable_points_x() = {points_x.begin(), points_x.end()}; + *trail->mutable_trail_data()->mutable_points_y() = {points_y.begin(), points_y.end()}; + *trail->mutable_trail_data()->mutable_points_z() = {points_z.begin(), points_z.end()}; + + trail_data_file.close(); +} + void write_protobuf_file(string proto_filepath, map* marker_categories, vector* parsed_pois) { if (mkdir(proto_filepath.c_str(), 0700) == -1 && errno != EEXIST) { cout << "Error making ./protobins" << endl; @@ -104,21 +145,30 @@ void write_protobuf_file(string proto_filepath, map* marker_ca all_categories.add_category()->CopyFrom(proto_category); create_proto_categories(proto_category, &proto_categories); } + // Converts vector to Waypoint::Icon and Waypoint::Trail waypoint::Waypoint proto_pois; std::set map_ids; + ofstream trail_data_file; for (const auto& parsed_poi : *parsed_pois) { if (parsed_poi->classname() == "POI") { Icon* icon = dynamic_cast(parsed_poi); + if (icon->map_id_is_set){ + map_ids.insert(icon->map_id); + } waypoint::Icon poi = icon->as_protobuf(); proto_pois.add_icon()->CopyFrom(poi); map_ids.insert(icon->map_id); } else if (parsed_poi->classname() == "Trail") { Trail* trail = dynamic_cast(parsed_poi); + if (trail->map_id_is_set){ + map_ids.insert(trail->map_id); + } waypoint::Trail poi = trail->as_protobuf(); + read_trail_data_file(&poi); proto_pois.add_trail()->CopyFrom(poi); - map_ids.insert(trail->map_id); + } } @@ -174,12 +224,21 @@ void write_protobuf_file(string proto_filepath, map* marker_ca // It would be impractical to include all of the data from each category except for the children and then re-add the children. // That would require coping every non-child attribute individually and iterating over all the children. // This pruning method is slower but ensures that the all wanted information is kept. + int keep = 0; for (int i = 0; i < output_message.category_size(); i++) { remove_proto_child(output_message.mutable_category(i), category_includes, output_message.category(i).name()); + if (output_message.mutable_category(i)->children_size() == 0) { output_message.mutable_category(i)->Clear(); + } + else { + if (keep < i) { + output_message.mutable_category()->SwapElements(i, keep); + } + ++keep; } } + output_message.mutable_category()->DeleteSubrange(keep, output_message.category_size() - keep); output_message.SerializeToOstream(&outfile); outfile.close(); output_message.Clear(); @@ -399,8 +458,10 @@ vector get_xml_files(string directory) { } void convert_taco_directory(string directory, map* marker_categories, vector* parsed_pois) { + string data = "rsync -a " + directory + "/Data ./"; + system(data.c_str()); + cout << directory << endl; vector xml_files = get_xml_files(directory); - for (const string& path : xml_files) { parse_xml_file(path, marker_categories, parsed_pois); } @@ -427,13 +488,19 @@ int main() { map marker_categories; test_proto(); + if (mkdir("./Data", 0700) == -1 && errno != EEXIST) { + cout << "Error making ./Data" << endl; + throw std::error_code(); + } + string directory = "./packs"; DIR* dir = opendir(directory.c_str()); struct dirent* entry = readdir(dir); while ((entry = readdir(dir)) != NULL) { - if (entry->d_type == DT_DIR) { + if (entry->d_type == DT_DIR && strcmp(entry->d_name, ".")) { string path = directory + "/"; path += entry->d_name; + cout << path << endl; convert_taco_directory(path, &marker_categories, &parsed_pois); } } @@ -458,26 +525,26 @@ int main() { ms = std::chrono::duration_cast(dur).count(); cout << "The protobuf write function took " << ms << " milliseconds to run" << endl; - //////////////////////////////////////////////////////////////////////////////////////// - /// This section tests that the protobuf file can be parsed back to xml - //////////////////////////////////////////////////////////////////////////////////////// + // ////////////////////////////////////////////////////////////////////////////////////// + // / This section tests that the protobuf file can be parsed back to xml + // ////////////////////////////////////////////////////////////////////////////////////// - // parsed_pois.clear(); - // marker_categories.clear(); + parsed_pois.clear(); + marker_categories.clear(); - // begin = chrono::high_resolution_clock::now(); - // read_protobuf_file("./protobins/1037.data", &marker_categories, &parsed_pois); - // end = chrono::high_resolution_clock::now(); - // dur = end - begin; - // ms = std::chrono::duration_cast(dur).count(); - // cout << "The protobuf read function took " << ms << " milliseconds to run" << endl; + begin = chrono::high_resolution_clock::now(); + read_protobuf_file("./protobins/15.data", &marker_categories, &parsed_pois); + end = chrono::high_resolution_clock::now(); + dur = end - begin; + ms = std::chrono::duration_cast(dur).count(); + cout << "The protobuf read function took " << ms << " milliseconds to run" << endl; - // begin = chrono::high_resolution_clock::now(); - // write_xml_file("./protobins/1037.xml", &marker_categories, &parsed_pois); - // end = chrono::high_resolution_clock::now(); - // dur = end - begin; - // ms = std::chrono::duration_cast(dur).count(); - // cout << "The xml write function took " << ms << " milliseconds to run" << endl; + begin = chrono::high_resolution_clock::now(); + write_xml_file("./protobins/15.xml", &marker_categories, &parsed_pois); + end = chrono::high_resolution_clock::now(); + dur = end - begin; + ms = std::chrono::duration_cast(dur).count(); + cout << "The xml write function took " << ms << " milliseconds to run" << endl; return 0; -} + } From fe04d873eaf7aeb4cea0dcaa257aa39292ba9351 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Wed, 18 Jan 2023 22:16:16 -0500 Subject: [PATCH 148/539] Addressing code review --- xml_converter/src/xml_converter.cpp | 155 ++++++++++++++++------------ 1 file changed, 91 insertions(+), 64 deletions(-) diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 6b20ef8f..e0f9e8f5 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -64,6 +64,18 @@ void write_xml_file(string xml_filepath, map* marker_categorie outfile.close(); } +//////////////////////////////////////////////////////////////////////////////// +// create_proto_categories +// +// Fills a set of the names of categories for validation purposes +// eg. +// { +// "mypath", +// "easypath", +// "trail", +// "hardpath", +// } +//////////////////////////////////////////////////////////////////////////////// void create_proto_categories(waypoint::Category proto_category, set* proto_categories) { proto_categories->insert(lowercase(proto_category.name())); for (int i = 0; i < proto_category.children_size(); i++) { @@ -71,6 +83,19 @@ void create_proto_categories(waypoint::Category proto_category, set* pro } } +//////////////////////////////////////////////////////////////////////////////// +// remove_proto_child +// +// Compares the relative name of the category against a set of the names of POIS +// eg. +// { +// "mypath", +// "mypath.easypath", +// "mypath.easypath.trail", +// "mypath.hardpath", +// "mypath.hardpath.trail", +// } +//////////////////////////////////////////////////////////////////////////////// void remove_proto_child(waypoint::Category* proto_category, set category_includes, string parent_name) { int keep = 0; for (int i = 0; i < proto_category->children_size(); i++) { @@ -96,7 +121,7 @@ void write_protobuf_file(string proto_filepath, map* marker_ca cout << "Error making ./protobins" << endl; throw std::error_code(); } - // Converts map to Waypoint::Categories + // Converts map to a Waypoint::Category waypoint::Waypoint all_categories; std::set proto_categories; for (const auto& category : *marker_categories) { @@ -104,24 +129,18 @@ void write_protobuf_file(string proto_filepath, map* marker_ca all_categories.add_category()->CopyFrom(proto_category); create_proto_categories(proto_category, &proto_categories); } - // Converts vector to Waypoint::Icon and Waypoint::Trail - waypoint::Waypoint proto_pois; + // Collects a set of map ids from vector std::set map_ids; for (const auto& parsed_poi : *parsed_pois) { if (parsed_poi->classname() == "POI") { Icon* icon = dynamic_cast(parsed_poi); - waypoint::Icon poi = icon->as_protobuf(); - proto_pois.add_icon()->CopyFrom(poi); map_ids.insert(icon->map_id); } else if (parsed_poi->classname() == "Trail") { Trail* trail = dynamic_cast(parsed_poi); - waypoint::Trail poi = trail->as_protobuf(); - proto_pois.add_trail()->CopyFrom(poi); map_ids.insert(trail->map_id); } } - waypoint::Waypoint output_message; std::set category_includes; for (int map_id : map_ids) { @@ -130,50 +149,58 @@ void write_protobuf_file(string proto_filepath, map* marker_ca outfile.open(output_filepath, ios::out | ios::binary); output_message.CopyFrom(all_categories); - for (int i = 0; i < proto_pois.icon_size(); i++) { - if (proto_pois.icon(i).map_id() == map_id) { - vector split_categories = split(proto_pois.icon(i).category().name(), "."); - auto category = proto_categories.find(lowercase(split_categories[split_categories.size() - 1])); - if (category == proto_categories.end()) { - cout << "Unknown MarkerCategory " << proto_pois.icon(i).category().name() << endl; - } - else { - // This loop adds the name of the category and all of it's parents - string name; - for (unsigned int j = 0; j < split_categories.size(); j++) { - name += split_categories[j]; - category_includes.insert(name); - name += "."; + for (const auto& parsed_poi : *parsed_pois) { + if (parsed_poi->classname() == "POI") { + Icon* icon = dynamic_cast(parsed_poi); + if (icon->map_id == map_id) { + waypoint::Icon proto_icon = icon->as_protobuf(); + vector split_categories = split(proto_icon.category().name(), "."); + auto category = proto_categories.find(lowercase(split_categories[split_categories.size() - 1])); + if (category == proto_categories.end()) { + cout << "Unknown MarkerCategory " << proto_icon.category().name() << endl; + } + else { + // This loop adds the name of the category and all of it's parents + string name; + for (unsigned int j = 0; j < split_categories.size(); j++) { + name += split_categories[j]; + category_includes.insert(name); + name += "."; + } } + output_message.add_icon()->CopyFrom(proto_icon); } - output_message.add_icon()->CopyFrom(proto_pois.icon(i)); } - } - for (int i = 0; i < proto_pois.trail_size(); i++) { - if (proto_pois.trail(i).map_id() == map_id) { - vector split_categories = split(proto_pois.trail(i).category().name(), "."); - auto category = proto_categories.find(lowercase(split_categories[split_categories.size() - 1])); - if (category == proto_categories.end()) { - cout << "Unknown MarkerCategory " << proto_pois.trail(i).category().name() << endl; - } - else { - // This loop adds the name of the category and all of it's parents - string name; - for (unsigned int j = 0; j < split_categories.size(); j++) { - name += split_categories[j]; - category_includes.insert(name); - name += "."; + else if (parsed_poi->classname() == "Trail") { + Trail* trail = dynamic_cast(parsed_poi); + if (trail->map_id == map_id) { + waypoint::Trail proto_trail = trail->as_protobuf(); + vector split_categories = split(proto_trail.category().name(), "."); + auto category = proto_categories.find(lowercase(split_categories[split_categories.size() - 1])); + if (category == proto_categories.end()) { + cout << "Unknown MarkerCategory " << proto_trail.category().name() << endl; + } + else { + // This loop adds the name of the category and all of it's parents + string name; + for (unsigned int j = 0; j < split_categories.size(); j++) { + name += split_categories[j]; + category_includes.insert(name); + name += "."; + } } + output_message.add_trail()->CopyFrom(proto_trail); } - output_message.add_trail()->CopyFrom(proto_pois.trail(i)); } } - // In XML, Marker_Categories has a tree hierarchy while POIS have a flat hierarchy. + // In the XML, Marker_Categories is a tree hierarchy while + // POIS have a flat hierarchy. // This is preserved in the protobuf for ease of translation. - // We are doing a removal instead of an insertion because each parent category contains the data for all of its children. - // It would be impractical to include all of the data from each category except for the children and then re-add the children. - // That would require coping every non-child attribute individually and iterating over all the children. - // This pruning method is slower but ensures that the all wanted information is kept. + // We are doing a removal instead of an insertion because each parent + // category contains the data for all of its children. + // It would be impractical to include all of the data from each category + // except for the children and then iterating over all the children. + // This pruning method is slower but ensures that information is kept. for (int i = 0; i < output_message.category_size(); i++) { remove_proto_child(output_message.mutable_category(i), category_includes, output_message.category(i).name()); if (output_message.mutable_category(i)->children_size() == 0) { @@ -458,26 +485,26 @@ int main() { ms = std::chrono::duration_cast(dur).count(); cout << "The protobuf write function took " << ms << " milliseconds to run" << endl; - //////////////////////////////////////////////////////////////////////////////////////// - /// This section tests that the protobuf file can be parsed back to xml - //////////////////////////////////////////////////////////////////////////////////////// - - // parsed_pois.clear(); - // marker_categories.clear(); - - // begin = chrono::high_resolution_clock::now(); - // read_protobuf_file("./protobins/1037.data", &marker_categories, &parsed_pois); - // end = chrono::high_resolution_clock::now(); - // dur = end - begin; - // ms = std::chrono::duration_cast(dur).count(); - // cout << "The protobuf read function took " << ms << " milliseconds to run" << endl; - - // begin = chrono::high_resolution_clock::now(); - // write_xml_file("./protobins/1037.xml", &marker_categories, &parsed_pois); - // end = chrono::high_resolution_clock::now(); - // dur = end - begin; - // ms = std::chrono::duration_cast(dur).count(); - // cout << "The xml write function took " << ms << " milliseconds to run" << endl; + //////////////////////////////////////////////////////////////////////////// + // This section tests that the protobuf file can be parsed back to xml + //////////////////////////////////////////////////////////////////////////// + + parsed_pois.clear(); + marker_categories.clear(); + + begin = chrono::high_resolution_clock::now(); + read_protobuf_file("./protobins/15.data", &marker_categories, &parsed_pois); + end = chrono::high_resolution_clock::now(); + dur = end - begin; + ms = std::chrono::duration_cast(dur).count(); + cout << "The protobuf read function took " << ms << " milliseconds to run" << endl; + + begin = chrono::high_resolution_clock::now(); + write_xml_file("./protobins/15.xml", &marker_categories, &parsed_pois); + end = chrono::high_resolution_clock::now(); + dur = end - begin; + ms = std::chrono::duration_cast(dur).count(); + cout << "The xml write function took " << ms << " milliseconds to run" << endl; return 0; } From f4ee7760683098e63d8a3ceb9596404031456dc9 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 23 Jan 2023 21:30:19 -0500 Subject: [PATCH 149/539] Moved repeated logic into seperate function, renamed functions, and rewrote comments --- xml_converter/src/xml_converter.cpp | 105 ++++++++++++---------------- 1 file changed, 43 insertions(+), 62 deletions(-) diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index e0f9e8f5..828e32c6 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -65,36 +65,46 @@ void write_xml_file(string xml_filepath, map* marker_categorie } //////////////////////////////////////////////////////////////////////////////// -// create_proto_categories -// -// Fills a set of the names of categories for validation purposes +// Adds the name of a category and all of its children to a setgit // eg. // { // "mypath", -// "easypath", -// "trail", -// "hardpath", +// "mypath.easypath", +// "mypath.easypath.trail", +// "mypath.hardpath", +// "mypath.hardpath.trail", // } //////////////////////////////////////////////////////////////////////////////// -void create_proto_categories(waypoint::Category proto_category, set* proto_categories) { - proto_categories->insert(lowercase(proto_category.name())); +void add_children_names(waypoint::Category proto_category, set* proto_categories, string parent_name) { + string name = parent_name + "." + lowercase(proto_category.name()); + proto_categories->insert(name); for (int i = 0; i < proto_category.children_size(); i++) { - create_proto_categories(proto_category.children(i), proto_categories); + add_children_names(proto_category.children(i), proto_categories, name); } } //////////////////////////////////////////////////////////////////////////////// -// remove_proto_child -// -// Compares the relative name of the category against a set of the names of POIS -// eg. -// { -// "mypath", -// "mypath.easypath", -// "mypath.easypath.trail", -// "mypath.hardpath", -// "mypath.hardpath.trail", -// } +// Adds the name of a category and all of it's parents to a set +//////////////////////////////////////////////////////////////////////////////// +void add_parent_names(string category_name, set proto_categories, set* category_includes) { + auto category = proto_categories.find(category_name); + if (category == proto_categories.end()) { + cout << "Unknown MarkerCategory " << category_name << endl; + } + else { + string name; + vector split_categories = split(category_name, "."); + for (unsigned int j = 0; j < split_categories.size(); j++) { + name += split_categories[j]; + category_includes->insert(name); + name += "."; + } + } +} + +//////////////////////////////////////////////////////////////////////////////// +// Iterates through all children of a Category and removes those that do not +// have POIs with corresponding names //////////////////////////////////////////////////////////////////////////////// void remove_proto_child(waypoint::Category* proto_category, set category_includes, string parent_name) { int keep = 0; @@ -121,15 +131,15 @@ void write_protobuf_file(string proto_filepath, map* marker_ca cout << "Error making ./protobins" << endl; throw std::error_code(); } - // Converts map to a Waypoint::Category + // Collects a set of category names and their children waypoint::Waypoint all_categories; std::set proto_categories; for (const auto& category : *marker_categories) { waypoint::Category proto_category = category.second.as_protobuf(); all_categories.add_category()->CopyFrom(proto_category); - create_proto_categories(proto_category, &proto_categories); + add_children_names(proto_category, &proto_categories, proto_category.name()); } - // Collects a set of map ids from vector + // Collects a set of map ids from Icon and Trail data std::set map_ids; for (const auto& parsed_poi : *parsed_pois) { if (parsed_poi->classname() == "POI") { @@ -147,58 +157,29 @@ void write_protobuf_file(string proto_filepath, map* marker_ca ofstream outfile; string output_filepath = proto_filepath + "/" + to_string(map_id) + ".data"; outfile.open(output_filepath, ios::out | ios::binary); - output_message.CopyFrom(all_categories); + output_message.MergeFrom(all_categories); for (const auto& parsed_poi : *parsed_pois) { if (parsed_poi->classname() == "POI") { Icon* icon = dynamic_cast(parsed_poi); if (icon->map_id == map_id) { - waypoint::Icon proto_icon = icon->as_protobuf(); - vector split_categories = split(proto_icon.category().name(), "."); - auto category = proto_categories.find(lowercase(split_categories[split_categories.size() - 1])); - if (category == proto_categories.end()) { - cout << "Unknown MarkerCategory " << proto_icon.category().name() << endl; - } - else { - // This loop adds the name of the category and all of it's parents - string name; - for (unsigned int j = 0; j < split_categories.size(); j++) { - name += split_categories[j]; - category_includes.insert(name); - name += "."; - } - } - output_message.add_icon()->CopyFrom(proto_icon); + add_parent_names(icon->category.category, proto_categories, &category_includes); + output_message.add_icon()->MergeFrom(icon->as_protobuf()); } } else if (parsed_poi->classname() == "Trail") { Trail* trail = dynamic_cast(parsed_poi); if (trail->map_id == map_id) { - waypoint::Trail proto_trail = trail->as_protobuf(); - vector split_categories = split(proto_trail.category().name(), "."); - auto category = proto_categories.find(lowercase(split_categories[split_categories.size() - 1])); - if (category == proto_categories.end()) { - cout << "Unknown MarkerCategory " << proto_trail.category().name() << endl; - } - else { - // This loop adds the name of the category and all of it's parents - string name; - for (unsigned int j = 0; j < split_categories.size(); j++) { - name += split_categories[j]; - category_includes.insert(name); - name += "."; - } - } - output_message.add_trail()->CopyFrom(proto_trail); + add_parent_names(trail->category.category, proto_categories, &category_includes); + output_message.add_trail()->MergeFrom(trail->as_protobuf()); } } } - // In the XML, Marker_Categories is a tree hierarchy while - // POIS have a flat hierarchy. - // This is preserved in the protobuf for ease of translation. - // We are doing a removal instead of an insertion because each parent - // category contains the data for all of its children. - // It would be impractical to include all of the data from each category + // In the XML, MarkerCategories have a tree hierarchy while POIS have a + // flat hierarchy. This is preserved in the protobuf for ease of + // translation. We are doing a removal instead of an insertion because + // each parent category contains the data for all of its children. It + // would be impractical to include all of the data from each category // except for the children and then iterating over all the children. // This pruning method is slower but ensures that information is kept. for (int i = 0; i < output_message.category_size(); i++) { From 97b106ef080efaa8f56a4e8189d26fedd23f78bf Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 23 Jan 2023 21:34:13 -0500 Subject: [PATCH 150/539] Typo --- xml_converter/src/xml_converter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 828e32c6..af194c00 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -65,7 +65,7 @@ void write_xml_file(string xml_filepath, map* marker_categorie } //////////////////////////////////////////////////////////////////////////////// -// Adds the name of a category and all of its children to a setgit +// Adds the name of a category and all of its children to a set // eg. // { // "mypath", From 510a4e0602046e329eb0d5de88c8a36e532fc5da Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 23 Jan 2023 21:35:59 -0500 Subject: [PATCH 151/539] Missed an include --- xml_converter/src/xml_converter.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index af194c00..f78de6fc 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -15,6 +15,7 @@ #include #include +#include "attribute/marker_category.hpp" #include "category_gen.hpp" #include "icon_gen.hpp" #include "parseable.hpp" From 7c07faa1e52a3db4ad4c0b3ccb6530052bd8fa33 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 23 Jan 2023 21:44:31 -0500 Subject: [PATCH 152/539] Extra space --- xml_converter/src/xml_converter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index f78de6fc..58a2193d 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -15,7 +15,7 @@ #include #include -#include "attribute/marker_category.hpp" +#include "attribute/marker_category.hpp" #include "category_gen.hpp" #include "icon_gen.hpp" #include "parseable.hpp" From 0c3dda32747a6219dacd78ebcfae8f338431e932 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Fri, 17 Feb 2023 20:47:10 -0500 Subject: [PATCH 153/539] Burrito can now read proto binary files and display icons and trails --- Icon.tscn | 5 - Route.tres | 9 +- Spatial.gd | 92 ++++++----- Spatial.tscn | 26 +-- project.godot | 4 +- waypoint.gd | 154 ++++++++++-------- xml_converter/doc/alpha/alpha.md | 2 +- xml_converter/doc/texture/color.md | 2 +- xml_converter/generators/code_generator.py | 6 +- .../cpp_templates/class_template.cpp | 54 ++++-- .../cpp_templates/class_template.hpp | 4 + xml_converter/proto/waypoint.proto | 19 ++- xml_converter/refresh.sh | 13 ++ xml_converter/src/attribute/color.cpp | 48 +++++- xml_converter/src/attribute/color.hpp | 7 +- xml_converter/src/attribute/image.cpp | 6 +- xml_converter/src/attribute/image.hpp | 6 +- xml_converter/src/icon_gen.cpp | 73 ++++----- xml_converter/src/icon_gen.hpp | 12 -- xml_converter/src/trail_gen.cpp | 25 ++- xml_converter/src/xml_converter.cpp | 10 +- 21 files changed, 321 insertions(+), 256 deletions(-) create mode 100755 xml_converter/refresh.sh diff --git a/Icon.tscn b/Icon.tscn index c8e13879..62801850 100644 --- a/Icon.tscn +++ b/Icon.tscn @@ -45,11 +45,6 @@ void fragment() { [sub_resource type="ShaderMaterial" id=2] resource_local_to_scene = true shader = SubResource( 1 ) -shader_param/map_size = null -shader_param/map_flipped = null -shader_param/map_bottom_offset = 36.0 -shader_param/smallest_scale = 0.0 -shader_param/texture_albedo = ExtResource( 1 ) [node name="Icon" type="Sprite3D"] material_override = SubResource( 2 ) diff --git a/Route.tres b/Route.tres index 749dd3ce..8067ca8d 100644 --- a/Route.tres +++ b/Route.tres @@ -1,6 +1,4 @@ -[gd_resource type="ShaderMaterial" load_steps=3 format=2] - -[ext_resource path="res://icon.png" type="Texture" id=1] +[gd_resource type="ShaderMaterial" load_steps=2 format=2] [sub_resource type="Shader" id=1] code = "shader_type spatial; @@ -44,8 +42,3 @@ void fragment() { [resource] resource_local_to_scene = true shader = SubResource( 1 ) -shader_param/map_size = Vector2( 0, 0 ) -shader_param/map_flipped = null -shader_param/map_bottom_offset = 36.0 -shader_param/interval = 1.0 -shader_param/texture_albedo = ExtResource( 1 ) diff --git a/Spatial.gd b/Spatial.gd index 4cd6b8ae..07c69621 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -5,7 +5,7 @@ var peers = [] var map_id:int = 0 - +var Waypoint = preload("res://waypoint.gd") var map_is_open: bool var compass_is_top_right: bool @@ -226,18 +226,18 @@ func decode_context_packet(spb: StreamPeerBuffer): var old_map_id = self.map_id self.map_id = spb.get_32() - var x11_window_id_gw2 = spb.get_32() - if !is_transient: - is_transient = x11_fg.set_transient_for(x11_window_id_burrito, x11_window_id_gw2) + #var x11_window_id_gw2 = spb.get_32() + #if !is_transient: + # is_transient = x11_fg.set_transient_for(x11_window_id_burrito, x11_window_id_gw2) - var size = Vector2(800, 600) + var size = Vector2(1920, 1800) if Settings.override_size_enabled: size.x = Settings.override_size_width size.y = Settings.override_size_height - else: - var size_tuple = x11_fg.get_window_geometry(x11_window_id_gw2) - size.x = size_tuple[0] - size.y = size_tuple[1] + #else: + #var size_tuple = x11_fg.get_window_geometry(x11_window_id_gw2) + # size.x = size_tuple[0] + # size.y = size_tuple[1] OS.window_size = size var identity_length: int = spb.get_32() var identity_str = spb.get_utf8_string(identity_length) @@ -255,9 +255,9 @@ func decode_context_packet(spb: StreamPeerBuffer): if self.map_id != old_map_id: print("New Map") - + load_waypoint_markers(self.map_id) print("Saving Old Map") - self.markerdata[str(old_map_id)] = data_from_renderview() + #self.markerdata[str(old_map_id)] = data_from_renderview() print("Loading New Map") gen_map_markers() @@ -287,35 +287,35 @@ func reset_minimap_masks(): minimap_path.material.set_shader_param("minimap_corner", compass_corner1) minimap_path.material.set_shader_param("minimap_corner2", compass_corner2) -var markerdata = waypoint.Waypoint.new() +var markerdata = Waypoint.Waypoint.new() var marker_file_path = "" func load_taco_markers(marker_file): self.marker_file_path = marker_file - if is_xml_file(marker_json_file): - print("Loading XML file from path ", marker_file) - var parsed_taco_tuple = taco_parser.parse_taco_xml(marker_file) - var json_payload = parsed_taco_tuple[0] - var error_message = parsed_taco_tuple[1] - if error_message != "": - print("XML parsing failed with error message: ", error_message) - self.markerdata = JSON.parse(json_payload).result + #if is_xml_file(marker_file): + #print("Loading XML file from path ", marker_file) + #var parsed_taco_tuple = taco_parser.parse_taco_xml(marker_file) + #var json_payload = parsed_taco_tuple[0] + #var error_message = parsed_taco_tuple[1] + #if error_message != "": + # print("XML parsing failed with error message: ", error_message) + #self.markerdata = JSON.parse(json_payload).result # else: # print("Loading Json file from path ", marker_json_file) # var file = File.new() # file.open(marker_json_file, file.READ) # var text = file.get_as_text() # self.markerdata = JSON.parse(text).result - else: #$$$COVERT TO PROTO$$$ - print("Loading protobuf file from path ", marker_file) - var file = File.new() - file.open(marker_file, file.READ) - var data = file.get_buffer() - self.markerdata.from_bytes(data) - if result_code == waypoint.PB_ERR.NO_ERRORS: - print("OK") - else: - return + #else: #$$$COVERT TO PROTO$$$ + print("Loading protobuf file from path ", marker_file) + var file = File.new() + file.open(marker_file, file.READ) + var data = file.get_buffer(file.get_len()) + self.markerdata.from_bytes(data) + if !Waypoint.PB_ERR.NO_ERRORS: + print("OK") + else: + print(Waypoint.PB_ERR) relative_textures_to_absolute_textures(marker_file_path.get_base_dir()) @@ -325,17 +325,14 @@ func is_xml_file(input_file): return input_file.split(".")[-1] == "xml" func relative_textures_to_absolute_textures(marker_file_dir): - var icons = markerdata.get_icon() - for icon in icons: + for icon in self.markerdata.get_icon(): var texture = icon.get_texture() if !texture.get_path().is_abs_path(): - icon.set_path() = marker_file_dir + "/" + icon.get_path() - #print("ABS", icon["texture"]) - var paths = markerdata.get_trail() - for path in paths: + texture.set_path(marker_file_dir + "/" + texture.get_path()) + for path in self.markerdata.get_trail(): var texture = path.get_texture() if !texture.get_path().is_abs_path(): - path.set_path() = marker_file_dir + "/" + path.get_path() + texture.set_path(marker_file_dir + "/" + texture.get_path()) var route_scene = load("res://Route.tscn") @@ -430,14 +427,21 @@ func gen_map_markers(): icon.queue_free() # Load the data from the markers $$$COVERT TO PROTO$$$ - var paths = markerdata.get_trail() - for path in paths: - gen_new_path(path["points"], path["texture"]) - var icons = markerdata.get_icon() - for icon in icons: + for path in self.markerdata.get_trail(): + var path_points := PoolVector3Array() + var trail_data = path.get_trail_data() + if trail_data.get_points_x().size() > 0: + print("trail data contains ", trail_data.get_points_x().size()) + for index in range(0, trail_data.get_points_x().size()): + path_points.append(Vector3(trail_data.get_points_x()[index], trail_data.get_points_y()[index], trail_data.get_points_z()[index])) + gen_new_path(path_points, path.get_texture().get_path()) + for icon in self.markerdata.get_icon(): var position = icon.get_position() + if position == null: + #print("Warning: Position Not Found") + continue var position_vector = Vector3(position.get_x(), position.get_y(), position.get_z()) - gen_new_icon(position_vector, icon.get_path()) + gen_new_icon(position_vector, icon.get_texture().get_path()) func gen_new_path(points: Array, texture_path: String): var points_2d: PoolVector2Array = [] @@ -771,7 +775,7 @@ func _on_SnapSelectedToPlayer_pressed(): self.currently_selected_node.translation.x = self.player_position.x self.currently_selected_node.translation.z = -self.player_position.z self.currently_selected_node.translation.y = self.player_position.y - + print(self.player_position.x, " ", -self.player_position.z, " ",self.player_position.y) func _on_SetActivePath_pressed(): if self.currently_selected_node.point_type == "icon": diff --git a/Spatial.tscn b/Spatial.tscn index 825a6da9..d4302a57 100644 --- a/Spatial.tscn +++ b/Spatial.tscn @@ -53,6 +53,7 @@ script = ExtResource( 1 ) [node name="CameraMount" type="Spatial" parent="."] [node name="Camera" type="Camera" parent="CameraMount"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.00229228, 0.00791723, 0.0117152 ) fov = 51.0 [node name="Control" type="Control" parent="."] @@ -74,9 +75,6 @@ scale = Vector2( 2, 2 ) margin_left = 287.348 margin_right = 314.348 margin_bottom = 32.0 -__meta__ = { -"_edit_use_anchors_": false -} [node name="TextureRect" type="TextureRect" parent="Control/GlobalMenuButton"] modulate = Color( 1, 1, 1, 0.439216 ) @@ -85,17 +83,11 @@ margin_top = 3.18198 margin_right = 26.591 margin_bottom = 28.182 texture = ExtResource( 3 ) -__meta__ = { -"_edit_use_anchors_": false -} [node name="main_menu_toggle" type="Button" parent="Control/GlobalMenuButton"] modulate = Color( 1, 1, 1, 0 ) margin_right = 27.0 margin_bottom = 32.0 -__meta__ = { -"_edit_use_anchors_": false -} [node name="EditorQuckPanel" type="PanelContainer" parent="Control/GlobalMenuButton"] visible = false @@ -185,9 +177,8 @@ margin_bottom = 672.0 window_title = "Open a File" mode = 0 access = 2 -current_dir = "." -current_file = "." -current_path = "." +current_dir = "/home/steph/Code/Projects/Burrito" +current_path = "/home/steph/Code/Projects/Burrito/" __meta__ = { "_edit_use_anchors_": false } @@ -483,9 +474,8 @@ window_title = "Open a File" mode = 0 access = 2 filters = PoolStringArray( "*.png" ) -current_dir = "." -current_file = "." -current_path = "." +current_dir = "/home/steph/Code/Projects/Burrito" +current_path = "/home/steph/Code/Projects/Burrito/" __meta__ = { "_edit_use_anchors_": false } @@ -498,9 +488,8 @@ margin_bottom = 624.833 window_title = "Save Path" resizable = true access = 2 -current_dir = "." -current_file = "." -current_path = "." +current_dir = "/home/steph/Code/Projects/Burrito" +current_path = "/home/steph/Code/Projects/Burrito/" __meta__ = { "_edit_use_anchors_": false } @@ -793,6 +782,7 @@ margin_top = -6.0 color = Color( 0, 0, 0, 1 ) [node name="Paths" type="Spatial" parent="."] +transform = Transform( 1, 0, 0, 0, 0.999999, 0, 0, 0, 1, 0, 0, 0 ) [node name="Icons" type="Spatial" parent="."] diff --git a/project.godot b/project.godot index 252a10dd..808a984f 100644 --- a/project.godot +++ b/project.godot @@ -9,7 +9,7 @@ config_version=4 _global_script_classes=[ { -"base": "", +"base": "Node", "class": "TacoParser", "language": "NativeScript", "path": "res://tacoparser.gdns" @@ -49,7 +49,7 @@ window/per_pixel_transparency/enabled=true [editor_plugins] -enabled=PoolStringArray( "res://addons/protobuf/plugin.cfg" ) +enabled=PoolStringArray( ) [global] diff --git a/waypoint.gd b/waypoint.gd index ab27ee95..71645a2c 100644 --- a/waypoint.gd +++ b/waypoint.gd @@ -922,11 +922,6 @@ class Icon: service.field = _achievement_id data[_achievement_id.tag] = service - _alpha = PBField.new("alpha", PB_DATA_TYPE.FLOAT, PB_RULE.OPTIONAL, 18, true, DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT]) - service = PBServiceField.new() - service.field = _alpha - data[_alpha.tag] = service - _can_fade = PBField.new("can_fade", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 19, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) service = PBServiceField.new() service.field = _can_fade @@ -962,11 +957,11 @@ class Icon: service.field = _tip_name data[_tip_name.tag] = service - _color = PBField.new("color", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 26, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) + _rgba = PBField.new("rgba", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 26, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) service = PBServiceField.new() - service.field = _color - service.func_ref = funcref(self, "new_color") - data[_color.tag] = service + service.field = _rgba + service.func_ref = funcref(self, "new_rgba") + data[_rgba.tag] = service _festival_filter = PBField.new("festival_filter", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 27, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) service = PBServiceField.new() @@ -1052,13 +1047,13 @@ class Icon: return _category.value var _texture: PBField - func get_texture() -> Texture: + func get_texture() -> TexturePath: return _texture.value func clear_texture() -> void: data[2].state = PB_SERVICE_STATE.UNFILLED _texture.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] - func new_texture() -> Texture: - _texture.value = Texture.new() + func new_texture() -> TexturePath: + _texture.value = TexturePath.new() return _texture.value var _guid: PBField @@ -1155,15 +1150,6 @@ class Icon: func set_achievement_id(value : int) -> void: _achievement_id.value = value - var _alpha: PBField - func get_alpha() -> float: - return _alpha.value - func clear_alpha() -> void: - data[18].state = PB_SERVICE_STATE.UNFILLED - _alpha.value = DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT] - func set_alpha(value : float) -> void: - _alpha.value = value - var _can_fade: PBField func get_can_fade() -> bool: return _can_fade.value @@ -1227,15 +1213,15 @@ class Icon: func set_tip_name(value : String) -> void: _tip_name.value = value - var _color: PBField - func get_color() -> Color: - return _color.value - func clear_color() -> void: + var _rgba: PBField + func get_rgba() -> RGBA: + return _rgba.value + func clear_rgba() -> void: data[26].state = PB_SERVICE_STATE.UNFILLED - _color.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] - func new_color() -> Color: - _color.value = Color.new() - return _color.value + _rgba.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] + func new_rgba() -> RGBA: + _rgba.value = RGBA.new() + return _rgba.value var _festival_filter: PBField func get_festival_filter() -> FestivalFilter: @@ -1439,11 +1425,6 @@ class Trail: service.field = _achievement_id data[_achievement_id.tag] = service - _alpha = PBField.new("alpha", PB_DATA_TYPE.FLOAT, PB_RULE.OPTIONAL, 18, true, DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT]) - service = PBServiceField.new() - service.field = _alpha - data[_alpha.tag] = service - _can_fade = PBField.new("can_fade", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 19, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) service = PBServiceField.new() service.field = _can_fade @@ -1459,11 +1440,11 @@ class Trail: service.field = _scale data[_scale.tag] = service - _color = PBField.new("color", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 22, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) + _rgba = PBField.new("rgba", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 22, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) service = PBServiceField.new() - service.field = _color - service.func_ref = funcref(self, "new_color") - data[_color.tag] = service + service.field = _rgba + service.func_ref = funcref(self, "new_rgba") + data[_rgba.tag] = service _festival_filter = PBField.new("festival_filter", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 23, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) service = PBServiceField.new() @@ -1549,13 +1530,13 @@ class Trail: return _category.value var _texture: PBField - func get_texture() -> Texture: + func get_texture() -> TexturePath: return _texture.value func clear_texture() -> void: data[2].state = PB_SERVICE_STATE.UNFILLED _texture.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] - func new_texture() -> Texture: - _texture.value = Texture.new() + func new_texture() -> TexturePath: + _texture.value = TexturePath.new() return _texture.value var _guid: PBField @@ -1632,15 +1613,6 @@ class Trail: func set_achievement_id(value : int) -> void: _achievement_id.value = value - var _alpha: PBField - func get_alpha() -> float: - return _alpha.value - func clear_alpha() -> void: - data[18].state = PB_SERVICE_STATE.UNFILLED - _alpha.value = DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT] - func set_alpha(value : float) -> void: - _alpha.value = value - var _can_fade: PBField func get_can_fade() -> bool: return _can_fade.value @@ -1668,15 +1640,15 @@ class Trail: func set_scale(value : float) -> void: _scale.value = value - var _color: PBField - func get_color() -> Color: - return _color.value - func clear_color() -> void: + var _rgba: PBField + func get_rgba() -> RGBA: + return _rgba.value + func clear_rgba() -> void: data[22].state = PB_SERVICE_STATE.UNFILLED - _color.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] - func new_color() -> Color: - _color.value = Color.new() - return _color.value + _rgba.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] + func new_rgba() -> RGBA: + _rgba.value = RGBA.new() + return _rgba.value var _festival_filter: PBField func get_festival_filter() -> FestivalFilter: @@ -1822,7 +1794,7 @@ class Trail: return PB_ERR.PARSE_INCOMPLETE return result -class Texture: +class TexturePath: func _init(): var service @@ -2285,25 +2257,25 @@ class GUID: return PB_ERR.PARSE_INCOMPLETE return result -class Color: +class RGBA: func _init(): var service - _hex = PBField.new("hex", PB_DATA_TYPE.STRING, PB_RULE.OPTIONAL, 1, true, DEFAULT_VALUES_3[PB_DATA_TYPE.STRING]) + _rgba = PBField.new("rgba", PB_DATA_TYPE.INT32, PB_RULE.OPTIONAL, 1, true, DEFAULT_VALUES_3[PB_DATA_TYPE.INT32]) service = PBServiceField.new() - service.field = _hex - data[_hex.tag] = service + service.field = _rgba + data[_rgba.tag] = service var data = {} - var _hex: PBField - func get_hex() -> String: - return _hex.value - func clear_hex() -> void: + var _rgba: PBField + func get_rgba() -> int: + return _rgba.value + func clear_rgba() -> void: data[1].state = PB_SERVICE_STATE.UNFILLED - _hex.value = DEFAULT_VALUES_3[PB_DATA_TYPE.STRING] - func set_hex(value : String) -> void: - _hex.value = value + _rgba.value = DEFAULT_VALUES_3[PB_DATA_TYPE.INT32] + func set_rgba(value : int) -> void: + _rgba.value = value func to_string() -> String: return PBPacker.message_to_string(data) @@ -4293,6 +4265,21 @@ class TrailData: service.field = _trail_data data[_trail_data.tag] = service + _points_x = PBField.new("points_x", PB_DATA_TYPE.FLOAT, PB_RULE.REPEATED, 2, true, []) + service = PBServiceField.new() + service.field = _points_x + data[_points_x.tag] = service + + _points_y = PBField.new("points_y", PB_DATA_TYPE.FLOAT, PB_RULE.REPEATED, 3, true, []) + service = PBServiceField.new() + service.field = _points_y + data[_points_y.tag] = service + + _points_z = PBField.new("points_z", PB_DATA_TYPE.FLOAT, PB_RULE.REPEATED, 4, true, []) + service = PBServiceField.new() + service.field = _points_z + data[_points_z.tag] = service + var data = {} var _trail_data: PBField @@ -4304,6 +4291,33 @@ class TrailData: func set_trail_data(value : String) -> void: _trail_data.value = value + var _points_x: PBField + func get_points_x() -> Array: + return _points_x.value + func clear_points_x() -> void: + data[2].state = PB_SERVICE_STATE.UNFILLED + _points_x.value = [] + func add_points_x(value : float) -> void: + _points_x.value.append(value) + + var _points_y: PBField + func get_points_y() -> Array: + return _points_y.value + func clear_points_y() -> void: + data[3].state = PB_SERVICE_STATE.UNFILLED + _points_y.value = [] + func add_points_y(value : float) -> void: + _points_y.value.append(value) + + var _points_z: PBField + func get_points_z() -> Array: + return _points_z.value + func clear_points_z() -> void: + data[4].state = PB_SERVICE_STATE.UNFILLED + _points_z.value = [] + func add_points_z(value : float) -> void: + _points_z.value.append(value) + func to_string() -> String: return PBPacker.message_to_string(data) diff --git a/xml_converter/doc/alpha/alpha.md b/xml_converter/doc/alpha/alpha.md index f25752a8..cd53cec4 100644 --- a/xml_converter/doc/alpha/alpha.md +++ b/xml_converter/doc/alpha/alpha.md @@ -3,7 +3,7 @@ name: Alpha type: Float32 applies_to: [Icon, Trail] xml_fields: [Alpha] -protobuf_field: alpha +protobuf_field: rgba compatability: [TacO, BlishHUD, Burrito] --- The opacity of the object diff --git a/xml_converter/doc/texture/color.md b/xml_converter/doc/texture/color.md index 3b657cac..c0b58100 100644 --- a/xml_converter/doc/texture/color.md +++ b/xml_converter/doc/texture/color.md @@ -4,7 +4,7 @@ type: Custom class: Color applies_to: [Icon, Trail] xml_fields: [Color] -protobuf_field: color +protobuf_field: rgba compatability: [TacO, BlishHUD, Burrito] --- A multiplier color to tint the raw albedo texture of a marker of trail texture. (Unclear) Solid white will result in no change, solid black will result in a black texture. diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 49a4cf4c..f4aa342d 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -2,7 +2,7 @@ from jsonschema.exceptions import ValidationError # type:ignore import yaml import frontmatter # type:ignore -from typing import Any, Dict, List, Tuple, Set +from typing import Any, Dict, List, Tuple, Set, Optional import os import markdown from dataclasses import dataclass, field @@ -287,7 +287,7 @@ class AttributeVariable: protobuf_field: str default_xml_fields: List[str] = field(default_factory=list) xml_export: str = "" - is_child: bool = False + compound_name: Optional[str] = None is_trigger: bool = False @@ -502,7 +502,7 @@ def generate_cpp_variable_data( default_xml_fields=component_default_xml_fields, xml_export=xml_export, protobuf_field=component["protobuf_field"], - is_child=True, + compound_name=lowercase(fieldval['name'], delimiter="_"), ) attribute_variables.append(component_attribute_variable) diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index 3d7dd6d9..d7c1f055 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -44,10 +44,15 @@ bool {{cpp_class}}::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vec this->{{attribute_variable.attribute_name}} = parse_{{attribute_variable.class_name}}(attribute, errors); this->{{attribute_variable.attribute_name}}_is_set = true; } - {% elif (attribute_variable.attribute_type == "CompoundValue" and attribute_variable.is_child == true) %} + {% elif (attribute_variable.attribute_name == "alpha") %} else if (attributename == "{{value}}") { - this->{{attribute_variable.attribute_name}} = parse_float(attribute, errors); + this->color.{{attribute_variable.attribute_name}} = parse_{{attribute_variable.class_name}}(attribute, errors); this->{{attribute_variable.attribute_name}}_is_set = true; + } + {% elif (attribute_variable.attribute_type == "CompoundValue" and attribute_variable.compound_name != None) %} + else if (attributename == "{{value}}") { + this->{{attribute_variable.compound_name}}.{{attribute_variable.attribute_name}} = parse_float(attribute, errors); + this->{{attribute_variable.compound_name}}_is_set = true; } {% else: %} else if (attributename == "{{value}}") { @@ -78,11 +83,11 @@ vector {{cpp_class}}::as_xml() const { xml_node_contents.push_back("<{{xml_class_name}} "); {% for attribute_variable in attribute_variables %} {% if (attribute_variable.attribute_type == "CompoundValue") %} - {% if (attribute_variable.xml_export == "Children" and attribute_variable.is_child == true) %} - if (this->{{attribute_variable.attribute_name}}_is_set) { - xml_node_contents.push_back(" {{attribute_variable.default_xml_fields[0]}}=\"" + to_string(this->{{attribute_variable.attribute_name}}) + "\""); + {% if (attribute_variable.xml_export == "Children" and attribute_variable.compound_name != None) %} + if (this->{{attribute_variable.compound_name}}_is_set) { + xml_node_contents.push_back(" {{attribute_variable.default_xml_fields[0]}}=\"" + to_string(this->{{attribute_variable.compound_name}}.{{attribute_variable.attribute_name}}) + "\""); } - {% elif (attribute_variable.xml_export == "Parent" and attribute_variable.is_child == false)%} + {% elif (attribute_variable.xml_export == "Parent" and attribute_variable.compound_name == None)%} if (this->{{attribute_variable.attribute_name}}_is_set) { xml_node_contents.push_back(" {{attribute_variable.default_xml_fields[0]}}=\"" + stringify_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}}) + "\""); } @@ -94,10 +99,16 @@ vector {{cpp_class}}::as_xml() const { } {% endif %} {% else: %} + {% if (attribute_variable.attribute_name == "alpha")%} + if (this->{{attribute_variable.attribute_name}}_is_set) { + xml_node_contents.push_back(" {{attribute_variable.default_xml_fields[0]}}=\"" + stringify_{{attribute_variable.class_name}}(this->color.{{attribute_variable.attribute_name}}) + "\""); + } + {% else: %} if (this->{{attribute_variable.attribute_name}}_is_set) { xml_node_contents.push_back(" {{attribute_variable.default_xml_fields[0]}}=\"" + stringify_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}}) + "\""); } {% endif %} + {% endif %} {% endfor %} {% if cpp_class == "Category": %} xml_node_contents.push_back(">\n"); @@ -154,11 +165,23 @@ waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf() const { if (this->{{attribute_variable.attribute_name}}_is_set) { proto_{{cpp_class_header}}.set_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); } - {% elif (attribute_variable.attribute_type in ["MultiflagValue", "CompoundValue", "Custom"]) and attribute_variable.is_child == false%} + {% elif (attribute_variable.attribute_type in ["MultiflagValue", "CompoundValue", "Custom"]) and attribute_variable.compound_name == None%} + {% if (attribute_variable.class_name == "color")%} + if (this->{{attribute_variable.attribute_name}}_is_set) { + if (this->alpha_is_set){ + proto_{{cpp_class_header}}.set_allocated_rgba(to_proto_color(this->color, this->color.alpha)); + } + else{ + proto_{{cpp_class_header}}.set_allocated_rgba(to_proto_color(this->color, 1.0)); + } + } + {% else: %} if (this->{{attribute_variable.attribute_name}}_is_set) { proto_{{cpp_class_header}}.set_allocated_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); } - {% elif attribute_variable.is_child == true%} + {% endif %} + {% elif (attribute_variable.compound_name != None)%} + {% elif (attribute_variable.attribute_name == "alpha")%} {% else: %} if (this->{{attribute_variable.attribute_name}}_is_set) { proto_{{cpp_class_header}}.set_{{attribute_variable.protobuf_field}}(this->{{attribute_variable.attribute_name}}); @@ -214,17 +237,26 @@ void {{cpp_class}}::parse_protobuf(waypoint::{{cpp_class}} proto_{{cpp_class_hea this->{{attribute_variable.attribute_name}} = from_proto_{{attribute_variable.class_name}}(proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}()); this->{{attribute_variable.attribute_name}}_is_set = true; } - {% elif (attribute_variable.attribute_type in ["MultiflagValue", "CompoundValue", "Custom"]) and attribute_variable.is_child == false%} + {% elif (attribute_variable.attribute_type in ["MultiflagValue", "CompoundValue", "Custom"]) and attribute_variable.compound_name == None%} + {% if (attribute_variable.protobuf_field == "rgba")%} + if (proto_{{cpp_class_header}}.has_{{attribute_variable.protobuf_field}}()) { + this->color = from_proto_color(proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}()); + this->color_is_set = true; + this->alpha_is_set = true; + } + {% else: %} if (proto_{{cpp_class_header}}.has_{{attribute_variable.protobuf_field}}()) { this->{{attribute_variable.attribute_name}} = from_proto_{{attribute_variable.class_name}}(proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}()); this->{{attribute_variable.attribute_name}}_is_set = true; } - {% elif attribute_variable.is_child == true%} - {% elif attribute_variable.class_name == "string" %} + {% endif %} + {% elif (attribute_variable.compound_name != None) %} + {% elif (attribute_variable.class_name == "string") %} if (proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}() != "") { this->{{attribute_variable.attribute_name}} = proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}(); this->{{attribute_variable.attribute_name}}_is_set = true; } + {% elif (attribute_variable.attribute_name == "alpha")%} {% else: %} if (proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}() != 0) { this->{{attribute_variable.attribute_name}} = proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}(); diff --git a/xml_converter/generators/cpp_templates/class_template.hpp b/xml_converter/generators/cpp_templates/class_template.hpp index fdc11c36..9d34ed4c 100644 --- a/xml_converter/generators/cpp_templates/class_template.hpp +++ b/xml_converter/generators/cpp_templates/class_template.hpp @@ -15,10 +15,14 @@ class {{forward_declaration}}; class {{cpp_class}} : public Parseable { public: {% for attribute_variable in attribute_variables: %} + {% if attribute_variable.compound_name == None: %} {{attribute_variable.cpp_type}} {{attribute_variable.attribute_name}}; + {% endif %} {% endfor %} {% for attribute_variable in attribute_variables: %} + {% if attribute_variable.compound_name == None: %} bool {{attribute_variable.attribute_name}}_is_set = false; + {% endif %} {% endfor %} {% if cpp_class == "Category": %} std::map children; diff --git a/xml_converter/proto/waypoint.proto b/xml_converter/proto/waypoint.proto index 99bef6be..46de33ec 100644 --- a/xml_converter/proto/waypoint.proto +++ b/xml_converter/proto/waypoint.proto @@ -19,7 +19,7 @@ message Category { message Icon { Category category = 1; - Texture texture = 2; + TexturePath texture = 2; GUID guid = 3; int32 map_id = 4; float distance_fade_end = 5; @@ -31,7 +31,6 @@ message Icon { fixed32 achievement_bit = 16; int32 achievement_id = 17; - float alpha = 18; bool can_fade = 19; int32 minimum_size_on_screen = 20; int32 map_display_size = 21; @@ -39,7 +38,7 @@ message Icon { bool scale_on_map_with_zoom = 23; string tip_description = 24; string tip_name = 25; - Color color = 26; + RGBA rgba = 26; FestivalFilter festival_filter = 27; MapTypeFilter map_type_filter = 28; MountFilter mount_filter = 29; @@ -58,7 +57,7 @@ message Icon { message Trail { Category category = 1; - Texture texture = 2; + TexturePath texture = 2; GUID guid = 3; int32 map_id = 4; float distance_fade_end = 5; @@ -68,11 +67,10 @@ message Trail { fixed32 achievement_bit = 16; int32 achievement_id = 17; - float alpha = 18; bool can_fade = 19; bool is_wall = 20; float scale = 21; - Color color = 22; + RGBA rgba = 22; FestivalFilter festival_filter = 23; MapTypeFilter map_type_filter = 24; MountFilter mount_filter = 25; @@ -89,7 +87,7 @@ message Trail { float bhdraft__schedule_duration = 2053; } -message Texture { +message TexturePath { string path = 1; } @@ -127,8 +125,8 @@ message GUID { bytes guid = 1; } -message Color { - string hex = 1; +message RGBA { + int32 rgba = 1; } enum CullChirality { @@ -300,5 +298,8 @@ message SpeciesFilter { message TrailData { string trail_data = 1; + repeated float points_x = 2; + repeated float points_y = 3; + repeated float points_z = 4; } diff --git a/xml_converter/refresh.sh b/xml_converter/refresh.sh new file mode 100755 index 00000000..88ef844f --- /dev/null +++ b/xml_converter/refresh.sh @@ -0,0 +1,13 @@ +cd .. + +cd ./generators + +python code_generator.py + +cd .. + +cd ./build +cmake .. +make + +# cd ./generators \ No newline at end of file diff --git a/xml_converter/src/attribute/color.cpp b/xml_converter/src/attribute/color.cpp index d687c918..c458db97 100644 --- a/xml_converter/src/attribute/color.cpp +++ b/xml_converter/src/attribute/color.cpp @@ -1,6 +1,12 @@ #include "color.hpp" +#include +#include +#include +#include +#include #include +#include #include #include @@ -18,7 +24,13 @@ using namespace std; //////////////////////////////////////////////////////////////////////////////// Color parse_color(rapidxml::xml_attribute<>* input, vector*) { Color color; - color.hex = get_attribute_value(input); + std::string hex = get_attribute_value(input); + if (hex.length() == 6 or 7){ + if (hex.compare(0, 1, "#")){ + hex = hex.erase(0,1); + } + color.hex = hex; + } return color; } @@ -28,7 +40,7 @@ Color parse_color(rapidxml::xml_attribute<>* input, vector*) { // Converts a Color into a stringy value so it can be saved to xml. //////////////////////////////////////////////////////////////////////////////// string stringify_color(Color attribute_value) { - return attribute_value.hex; + return "#" + attribute_value.hex; } //////////////////////////////////////////////////////////////////////////////// @@ -36,10 +48,25 @@ string stringify_color(Color attribute_value) { // // Converts a Color into a proto message //////////////////////////////////////////////////////////////////////////////// -waypoint::Color* to_proto_color(Color attribute_value) { - waypoint::Color* color = new waypoint::Color(); - color->set_hex(attribute_value.hex); - return color; +waypoint::RGBA* to_proto_color(Color attribute_value, float alpha) { + waypoint::RGBA* rgba = new waypoint::RGBA(); + string hex = attribute_value.hex; + int r = stoi(hex.substr(0,2), 0, 16); + int g = stoi(hex.substr(2,2), 0, 16); + int b = stoi(hex.substr(4,2), 0, 16); + + int a; + if (alpha == 1.0){ + a = 255; + } + else{ + a = std::floor(alpha*256); + } + + uint32_t rgba_int = ((r & 0xff) << 24) + ((g & 0xff) << 16) + ((b & 0xff) << 8) + (a & 0xff); + + rgba->set_rgba(rgba_int); + return rgba; } //////////////////////////////////////////////////////////////////////////////// @@ -47,8 +74,13 @@ waypoint::Color* to_proto_color(Color attribute_value) { // // Converts a proto message into a Color //////////////////////////////////////////////////////////////////////////////// -Color from_proto_color(waypoint::Color attribute_value) { +Color from_proto_color(waypoint::RGBA attribute_value) { Color color; - color.hex = attribute_value.hex(); + std::stringstream stream; + stream << std::hex << attribute_value.rgba(); + std::string rgba = stream.str(); + + color.hex = rgba.substr(0,6); + color.alpha = std::stof(rgba.substr(6,2)); return color; } diff --git a/xml_converter/src/attribute/color.hpp b/xml_converter/src/attribute/color.hpp index 43c76d61..850c4132 100644 --- a/xml_converter/src/attribute/color.hpp +++ b/xml_converter/src/attribute/color.hpp @@ -7,18 +7,19 @@ class XMLError; namespace waypoint { -class Color; +class RGBA; } class Color { public: std::string hex; + float alpha; }; Color parse_color(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_color(Color attribute_value); -waypoint::Color* to_proto_color(Color attribute_value); +waypoint::RGBA* to_proto_color(Color attribute_value, float alpha); -Color from_proto_color(waypoint::Color attribute_value); +Color from_proto_color(waypoint::RGBA attribute_value); diff --git a/xml_converter/src/attribute/image.cpp b/xml_converter/src/attribute/image.cpp index 637f15c8..b85b1eaa 100644 --- a/xml_converter/src/attribute/image.cpp +++ b/xml_converter/src/attribute/image.cpp @@ -35,8 +35,8 @@ string stringify_image(Image attribute_value) { // // Converts an Image into a waypoint::Image pointer to save to proto. //////////////////////////////////////////////////////////////////////////////// -waypoint::Texture* to_proto_image(Image attribute_value) { - waypoint::Texture* texture = new waypoint::Texture(); +waypoint::TexturePath* to_proto_image(Image attribute_value) { + waypoint::TexturePath* texture = new waypoint::TexturePath(); texture->set_path(attribute_value.path); return texture; } @@ -46,7 +46,7 @@ waypoint::Texture* to_proto_image(Image attribute_value) { // // Parses a waypoint::Image from proto //////////////////////////////////////////////////////////////////////////////// -Image from_proto_image(waypoint::Texture attribute_value) { +Image from_proto_image(waypoint::TexturePath attribute_value) { Image image; image.path = attribute_value.path(); return image; diff --git a/xml_converter/src/attribute/image.hpp b/xml_converter/src/attribute/image.hpp index 0e3c684b..c9a83e54 100644 --- a/xml_converter/src/attribute/image.hpp +++ b/xml_converter/src/attribute/image.hpp @@ -7,7 +7,7 @@ class XMLError; namespace waypoint { -class Texture; +class TexturePath; } class Image { @@ -19,6 +19,6 @@ Image parse_image(rapidxml::xml_attribute<>* input, std::vector* erro std::string stringify_image(Image attribute_value); -waypoint::Texture* to_proto_image(Image attribute_value); +waypoint::TexturePath* to_proto_image(Image attribute_value); -Image from_proto_image(waypoint::Texture attribute_value); +Image from_proto_image(waypoint::TexturePath attribute_value); diff --git a/xml_converter/src/icon_gen.cpp b/xml_converter/src/icon_gen.cpp index c0e7fca7..c215219a 100644 --- a/xml_converter/src/icon_gen.cpp +++ b/xml_converter/src/icon_gen.cpp @@ -31,9 +31,9 @@ bool Icon::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectorachievement_id_is_set = true; } else if (attributename == "alpha") { - this->alpha = parse_float(attribute, errors); + this->color.alpha = parse_float(attribute, errors); this->alpha_is_set = true; - } + } else if (attributename == "autotrigger") { this->auto_trigger = parse_bool(attribute, errors); this->auto_trigger_is_set = true; @@ -255,40 +255,40 @@ bool Icon::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectortrigger_range_is_set = true; } else if (attributename == "xpos") { - this->x_position = parse_float(attribute, errors); - this->x_position_is_set = true; + this->position.x_position = parse_float(attribute, errors); + this->position_is_set = true; } else if (attributename == "positionx") { - this->x_position = parse_float(attribute, errors); - this->x_position_is_set = true; + this->position.x_position = parse_float(attribute, errors); + this->position_is_set = true; } else if (attributename == "rotatex") { - this->x_rotation = parse_float(attribute, errors); - this->x_rotation_is_set = true; + this->euler_rotation.x_rotation = parse_float(attribute, errors); + this->euler_rotation_is_set = true; } else if (attributename == "ypos") { - this->y_position = parse_float(attribute, errors); - this->y_position_is_set = true; + this->position.y_position = parse_float(attribute, errors); + this->position_is_set = true; } else if (attributename == "positiony") { - this->y_position = parse_float(attribute, errors); - this->y_position_is_set = true; + this->position.y_position = parse_float(attribute, errors); + this->position_is_set = true; } else if (attributename == "rotatey") { - this->y_rotation = parse_float(attribute, errors); - this->y_rotation_is_set = true; + this->euler_rotation.y_rotation = parse_float(attribute, errors); + this->euler_rotation_is_set = true; } else if (attributename == "zpos") { - this->z_position = parse_float(attribute, errors); - this->z_position_is_set = true; + this->position.z_position = parse_float(attribute, errors); + this->position_is_set = true; } else if (attributename == "positionz") { - this->z_position = parse_float(attribute, errors); - this->z_position_is_set = true; + this->position.z_position = parse_float(attribute, errors); + this->position_is_set = true; } else if (attributename == "rotatez") { - this->z_rotation = parse_float(attribute, errors); - this->z_rotation_is_set = true; + this->euler_rotation.z_rotation = parse_float(attribute, errors); + this->euler_rotation_is_set = true; } else { return false; @@ -313,7 +313,7 @@ vector Icon::as_xml() const { xml_node_contents.push_back(" AchievementId=\"" + stringify_int(this->achievement_id) + "\""); } if (this->alpha_is_set) { - xml_node_contents.push_back(" Alpha=\"" + stringify_float(this->alpha) + "\""); + xml_node_contents.push_back(" Alpha=\"" + stringify_float(this->color.alpha) + "\""); } if (this->auto_trigger_is_set) { xml_node_contents.push_back(" AutoTrigger=\"" + stringify_bool(this->auto_trigger) + "\""); @@ -447,14 +447,14 @@ vector Icon::as_xml() const { if (this->trigger_range_is_set) { xml_node_contents.push_back(" TriggerRange=\"" + stringify_float(this->trigger_range) + "\""); } - if (this->x_position_is_set) { - xml_node_contents.push_back(" XPos=\"" + to_string(this->x_position) + "\""); + if (this->position_is_set) { + xml_node_contents.push_back(" XPos=\"" + to_string(this->position.x_position) + "\""); } - if (this->y_position_is_set) { - xml_node_contents.push_back(" YPos=\"" + to_string(this->y_position) + "\""); + if (this->position_is_set) { + xml_node_contents.push_back(" YPos=\"" + to_string(this->position.y_position) + "\""); } - if (this->z_position_is_set) { - xml_node_contents.push_back(" ZPos=\"" + to_string(this->z_position) + "\""); + if (this->position_is_set) { + xml_node_contents.push_back(" ZPos=\"" + to_string(this->position.z_position) + "\""); } xml_node_contents.push_back("/>"); return xml_node_contents; @@ -469,9 +469,6 @@ waypoint::Icon Icon::as_protobuf() const { if (this->achievement_id_is_set) { proto_icon.set_achievement_id(this->achievement_id); } - if (this->alpha_is_set) { - proto_icon.set_alpha(this->alpha); - } if (this->auto_trigger_is_set) { if (trigger == nullptr) { trigger = new waypoint::Trigger(); @@ -503,7 +500,12 @@ waypoint::Icon Icon::as_protobuf() const { proto_icon.set_allocated_category(to_proto_marker_category(this->category)); } if (this->color_is_set) { - proto_icon.set_allocated_color(to_proto_color(this->color)); + if (this->alpha_is_set){ + proto_icon.set_allocated_rgba(to_proto_color(this->color, this->color.alpha)); + } + else{ + proto_icon.set_allocated_rgba(to_proto_color(this->color, 1.0)); + } } if (this->copy_clipboard_is_set) { if (trigger == nullptr) { @@ -668,10 +670,6 @@ void Icon::parse_protobuf(waypoint::Icon proto_icon) { this->achievement_id = proto_icon.achievement_id(); this->achievement_id_is_set = true; } - if (proto_icon.alpha() != 0) { - this->alpha = proto_icon.alpha(); - this->alpha_is_set = true; - } if (trigger.auto_trigger() != 0) { this->auto_trigger = trigger.auto_trigger(); this->auto_trigger_is_set = true; @@ -696,9 +694,10 @@ void Icon::parse_protobuf(waypoint::Icon proto_icon) { this->category = from_proto_marker_category(proto_icon.category()); this->category_is_set = true; } - if (proto_icon.has_color()) { - this->color = from_proto_color(proto_icon.color()); + if (proto_icon.has_rgba()) { + this->color = from_proto_color(proto_icon.rgba()); this->color_is_set = true; + this->alpha_is_set = true; } if (trigger.action_copy_clipboard() != "") { this->copy_clipboard = trigger.action_copy_clipboard(); diff --git a/xml_converter/src/icon_gen.hpp b/xml_converter/src/icon_gen.hpp index c53a0d16..1a105d4e 100644 --- a/xml_converter/src/icon_gen.hpp +++ b/xml_converter/src/icon_gen.hpp @@ -73,12 +73,6 @@ class Icon : public Parseable { std::string tooltip_description; std::string tooltip_name; float trigger_range; - float x_position; - float x_rotation; - float y_position; - float y_rotation; - float z_position; - float z_rotation; bool achievement_bitmask_is_set = false; bool achievement_id_is_set = false; bool alpha_is_set = false; @@ -127,12 +121,6 @@ class Icon : public Parseable { bool tooltip_description_is_set = false; bool tooltip_name_is_set = false; bool trigger_range_is_set = false; - bool x_position_is_set = false; - bool x_rotation_is_set = false; - bool y_position_is_set = false; - bool y_rotation_is_set = false; - bool z_position_is_set = false; - bool z_rotation_is_set = false; virtual std::vector as_xml() const; virtual std::string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors); diff --git a/xml_converter/src/trail_gen.cpp b/xml_converter/src/trail_gen.cpp index ba1622c3..34359784 100644 --- a/xml_converter/src/trail_gen.cpp +++ b/xml_converter/src/trail_gen.cpp @@ -31,9 +31,9 @@ bool Trail::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectorachievement_id_is_set = true; } else if (attributename == "alpha") { - this->alpha = parse_float(attribute, errors); + this->color.alpha = parse_float(attribute, errors); this->alpha_is_set = true; - } + } else if (attributename == "animspeed") { this->animation_speed = parse_float(attribute, errors); this->animation_speed_is_set = true; @@ -186,7 +186,7 @@ vector Trail::as_xml() const { xml_node_contents.push_back(" AchievementId=\"" + stringify_int(this->achievement_id) + "\""); } if (this->alpha_is_set) { - xml_node_contents.push_back(" Alpha=\"" + stringify_float(this->alpha) + "\""); + xml_node_contents.push_back(" Alpha=\"" + stringify_float(this->color.alpha) + "\""); } if (this->animation_speed_is_set) { xml_node_contents.push_back(" AnimSpeed=\"" + stringify_float(this->animation_speed) + "\""); @@ -275,9 +275,6 @@ waypoint::Trail Trail::as_protobuf() const { if (this->achievement_id_is_set) { proto_trail.set_achievement_id(this->achievement_id); } - if (this->alpha_is_set) { - proto_trail.set_alpha(this->alpha); - } if (this->animation_speed_is_set) { proto_trail.set_animation_speed(this->animation_speed); } @@ -288,7 +285,12 @@ waypoint::Trail Trail::as_protobuf() const { proto_trail.set_allocated_category(to_proto_marker_category(this->category)); } if (this->color_is_set) { - proto_trail.set_allocated_color(to_proto_color(this->color)); + if (this->alpha_is_set){ + proto_trail.set_allocated_rgba(to_proto_color(this->color, this->color.alpha)); + } + else{ + proto_trail.set_allocated_rgba(to_proto_color(this->color, 1.0)); + } } if (this->cull_chirality_is_set) { proto_trail.set_cull_chirality(to_proto_cull_chirality(this->cull_chirality)); @@ -365,10 +367,6 @@ void Trail::parse_protobuf(waypoint::Trail proto_trail) { this->achievement_id = proto_trail.achievement_id(); this->achievement_id_is_set = true; } - if (proto_trail.alpha() != 0) { - this->alpha = proto_trail.alpha(); - this->alpha_is_set = true; - } if (proto_trail.animation_speed() != 0) { this->animation_speed = proto_trail.animation_speed(); this->animation_speed_is_set = true; @@ -381,9 +379,10 @@ void Trail::parse_protobuf(waypoint::Trail proto_trail) { this->category = from_proto_marker_category(proto_trail.category()); this->category_is_set = true; } - if (proto_trail.has_color()) { - this->color = from_proto_color(proto_trail.color()); + if (proto_trail.has_rgba()) { + this->color = from_proto_color(proto_trail.rgba()); this->color_is_set = true; + this->alpha_is_set = true; } if (proto_trail.cull_chirality() != 0) { this->cull_chirality = from_proto_cull_chirality(proto_trail.cull_chirality()); diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 4ae5aac7..1f5e4a5d 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -458,7 +458,7 @@ vector get_xml_files(string directory) { } void convert_taco_directory(string directory, map* marker_categories, vector* parsed_pois) { - string data = "rsync -a " + directory + "/Data ./"; + string data = "rsync -a " + directory + "/Data ./protobins"; system(data.c_str()); cout << directory << endl; vector xml_files = get_xml_files(directory); @@ -488,8 +488,8 @@ int main() { map marker_categories; test_proto(); - if (mkdir("./Data", 0700) == -1 && errno != EEXIST) { - cout << "Error making ./Data" << endl; + if (mkdir("./protobins/Data", 0700) == -1 && errno != EEXIST) { + cout << "Error making ./protobins/Data" << endl; throw std::error_code(); } @@ -533,14 +533,14 @@ int main() { marker_categories.clear(); begin = chrono::high_resolution_clock::now(); - read_protobuf_file("./protobins/15.data", &marker_categories, &parsed_pois); + read_protobuf_file("./protobins/50.data", &marker_categories, &parsed_pois); end = chrono::high_resolution_clock::now(); dur = end - begin; ms = std::chrono::duration_cast(dur).count(); cout << "The protobuf read function took " << ms << " milliseconds to run" << endl; begin = chrono::high_resolution_clock::now(); - write_xml_file("./protobins/15.xml", &marker_categories, &parsed_pois); + write_xml_file("./protobins/50.xml", &marker_categories, &parsed_pois); end = chrono::high_resolution_clock::now(); dur = end - begin; ms = std::chrono::duration_cast(dur).count(); From 332fd8ffc4bd44e99de27a41a71b8e156332f237 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Fri, 17 Feb 2023 23:55:36 -0500 Subject: [PATCH 154/539] Added auto marker loading on map switch --- Spatial.gd | 43 +++++++++++++++------------ xml_converter/src/attribute/color.cpp | 2 ++ 2 files changed, 26 insertions(+), 19 deletions(-) diff --git a/Spatial.gd b/Spatial.gd index 07c69621..fb8a4b5d 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -255,10 +255,12 @@ func decode_context_packet(spb: StreamPeerBuffer): if self.map_id != old_map_id: print("New Map") - load_waypoint_markers(self.map_id) + print("Saving Old Map") #self.markerdata[str(old_map_id)] = data_from_renderview() print("Loading New Map") + + load_waypoint_markers(self.map_id) gen_map_markers() # TODO move this to reset_minimap_masks @@ -289,24 +291,29 @@ func reset_minimap_masks(): var markerdata = Waypoint.Waypoint.new() var marker_file_path = "" + +func load_waypoint_markers(map_id): + self.marker_file_path = "res://xml_converter/protobins/" + String(map_id) + ".data" + print("Loading protobuf file from path ", self.marker_file_path) + #self.markerdata.clear_category() + #self.markerdata.clear_icon() + #self.markerdata.clear_trail() + self.markerdata.data = {} + var file = File.new() + file.open(self.marker_file_path, file.READ) + var data = file.get_buffer(file.get_len()) + self.markerdata.from_bytes(data) + if !Waypoint.PB_ERR.NO_ERRORS: + print("OK") + else: + print(Waypoint.PB_ERR) + + relative_textures_to_absolute_textures(marker_file_path.get_base_dir()) + + gen_map_markers() + func load_taco_markers(marker_file): self.marker_file_path = marker_file - - #if is_xml_file(marker_file): - #print("Loading XML file from path ", marker_file) - #var parsed_taco_tuple = taco_parser.parse_taco_xml(marker_file) - #var json_payload = parsed_taco_tuple[0] - #var error_message = parsed_taco_tuple[1] - #if error_message != "": - # print("XML parsing failed with error message: ", error_message) - #self.markerdata = JSON.parse(json_payload).result - # else: - # print("Loading Json file from path ", marker_json_file) - # var file = File.new() - # file.open(marker_json_file, file.READ) - # var text = file.get_as_text() - # self.markerdata = JSON.parse(text).result - #else: #$$$COVERT TO PROTO$$$ print("Loading protobuf file from path ", marker_file) var file = File.new() file.open(marker_file, file.READ) @@ -431,14 +438,12 @@ func gen_map_markers(): var path_points := PoolVector3Array() var trail_data = path.get_trail_data() if trail_data.get_points_x().size() > 0: - print("trail data contains ", trail_data.get_points_x().size()) for index in range(0, trail_data.get_points_x().size()): path_points.append(Vector3(trail_data.get_points_x()[index], trail_data.get_points_y()[index], trail_data.get_points_z()[index])) gen_new_path(path_points, path.get_texture().get_path()) for icon in self.markerdata.get_icon(): var position = icon.get_position() if position == null: - #print("Warning: Position Not Found") continue var position_vector = Vector3(position.get_x(), position.get_y(), position.get_z()) gen_new_icon(position_vector, icon.get_texture().get_path()) diff --git a/xml_converter/src/attribute/color.cpp b/xml_converter/src/attribute/color.cpp index c458db97..218f8a6c 100644 --- a/xml_converter/src/attribute/color.cpp +++ b/xml_converter/src/attribute/color.cpp @@ -21,6 +21,7 @@ using namespace std; // // Parses a Color from the value of a rapidxml::xml_attribute. // TODO(#98): Color should be saved in a better format then the raw hex string. +// TODO: Every node that has a Hex needs an alpha but not every alpha needs Hex //////////////////////////////////////////////////////////////////////////////// Color parse_color(rapidxml::xml_attribute<>* input, vector*) { Color color; @@ -47,6 +48,7 @@ string stringify_color(Color attribute_value) { // to_proto_color // // Converts a Color into a proto message +// TODO: Find a way to transfer alpha when color hex is not set //////////////////////////////////////////////////////////////////////////////// waypoint::RGBA* to_proto_color(Color attribute_value, float alpha) { waypoint::RGBA* rgba = new waypoint::RGBA(); From c7e27cbd6ee266ef5a7e75cd00662508410b3bb2 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 19 Feb 2023 16:23:59 -0500 Subject: [PATCH 155/539] Cleaning up code --- Spatial.gd | 23 +++++++------- Spatial.tscn | 12 ++++---- .../cpp_templates/class_template.cpp | 6 ++-- xml_converter/src/attribute/color.cpp | 30 +++++++++---------- xml_converter/src/icon_gen.cpp | 6 ++-- xml_converter/src/trail_gen.cpp | 6 ++-- xml_converter/src/xml_converter.cpp | 28 ++++++++--------- 7 files changed, 53 insertions(+), 58 deletions(-) diff --git a/Spatial.gd b/Spatial.gd index fb8a4b5d..163f2e49 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -226,18 +226,18 @@ func decode_context_packet(spb: StreamPeerBuffer): var old_map_id = self.map_id self.map_id = spb.get_32() - #var x11_window_id_gw2 = spb.get_32() - #if !is_transient: - # is_transient = x11_fg.set_transient_for(x11_window_id_burrito, x11_window_id_gw2) + var x11_window_id_gw2 = spb.get_32() + if !is_transient: + is_transient = x11_fg.set_transient_for(x11_window_id_burrito, x11_window_id_gw2) - var size = Vector2(1920, 1800) + var size = Vector2(800, 600) if Settings.override_size_enabled: size.x = Settings.override_size_width size.y = Settings.override_size_height - #else: - #var size_tuple = x11_fg.get_window_geometry(x11_window_id_gw2) - # size.x = size_tuple[0] - # size.y = size_tuple[1] + else: + var size_tuple = x11_fg.get_window_geometry(x11_window_id_gw2) + size.x = size_tuple[0] + size.y = size_tuple[1] OS.window_size = size var identity_length: int = spb.get_32() var identity_str = spb.get_utf8_string(identity_length) @@ -295,10 +295,9 @@ var marker_file_path = "" func load_waypoint_markers(map_id): self.marker_file_path = "res://xml_converter/protobins/" + String(map_id) + ".data" print("Loading protobuf file from path ", self.marker_file_path) - #self.markerdata.clear_category() - #self.markerdata.clear_icon() - #self.markerdata.clear_trail() - self.markerdata.data = {} + self.markerdata.clear_category() + self.markerdata.clear_icon() + self.markerdata.clear_trail() var file = File.new() file.open(self.marker_file_path, file.READ) var data = file.get_buffer(file.get_len()) diff --git a/Spatial.tscn b/Spatial.tscn index d4302a57..1f90172e 100644 --- a/Spatial.tscn +++ b/Spatial.tscn @@ -177,8 +177,8 @@ margin_bottom = 672.0 window_title = "Open a File" mode = 0 access = 2 -current_dir = "/home/steph/Code/Projects/Burrito" -current_path = "/home/steph/Code/Projects/Burrito/" +current_dir = "." +current_path = "." __meta__ = { "_edit_use_anchors_": false } @@ -474,8 +474,8 @@ window_title = "Open a File" mode = 0 access = 2 filters = PoolStringArray( "*.png" ) -current_dir = "/home/steph/Code/Projects/Burrito" -current_path = "/home/steph/Code/Projects/Burrito/" +current_dir = "." +current_path = "." __meta__ = { "_edit_use_anchors_": false } @@ -488,8 +488,8 @@ margin_bottom = 624.833 window_title = "Save Path" resizable = true access = 2 -current_dir = "/home/steph/Code/Projects/Burrito" -current_path = "/home/steph/Code/Projects/Burrito/" +current_dir = "." +current_path = "." __meta__ = { "_edit_use_anchors_": false } diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index d7c1f055..6a0cee84 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -48,7 +48,7 @@ bool {{cpp_class}}::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vec else if (attributename == "{{value}}") { this->color.{{attribute_variable.attribute_name}} = parse_{{attribute_variable.class_name}}(attribute, errors); this->{{attribute_variable.attribute_name}}_is_set = true; - } + } {% elif (attribute_variable.attribute_type == "CompoundValue" and attribute_variable.compound_name != None) %} else if (attributename == "{{value}}") { this->{{attribute_variable.compound_name}}.{{attribute_variable.attribute_name}} = parse_float(attribute, errors); @@ -168,10 +168,10 @@ waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf() const { {% elif (attribute_variable.attribute_type in ["MultiflagValue", "CompoundValue", "Custom"]) and attribute_variable.compound_name == None%} {% if (attribute_variable.class_name == "color")%} if (this->{{attribute_variable.attribute_name}}_is_set) { - if (this->alpha_is_set){ + if (this->alpha_is_set) { proto_{{cpp_class_header}}.set_allocated_rgba(to_proto_color(this->color, this->color.alpha)); } - else{ + else { proto_{{cpp_class_header}}.set_allocated_rgba(to_proto_color(this->color, 1.0)); } } diff --git a/xml_converter/src/attribute/color.cpp b/xml_converter/src/attribute/color.cpp index 218f8a6c..d7a18ce5 100644 --- a/xml_converter/src/attribute/color.cpp +++ b/xml_converter/src/attribute/color.cpp @@ -1,10 +1,8 @@ #include "color.hpp" -#include -#include -#include +#include + #include -#include #include #include #include @@ -26,9 +24,9 @@ using namespace std; Color parse_color(rapidxml::xml_attribute<>* input, vector*) { Color color; std::string hex = get_attribute_value(input); - if (hex.length() == 6 or 7){ - if (hex.compare(0, 1, "#")){ - hex = hex.erase(0,1); + if (hex.length() == 6 || 7) { + if (hex.compare(0, 1, "#")) { + hex = hex.erase(0, 1); } color.hex = hex; } @@ -53,16 +51,16 @@ string stringify_color(Color attribute_value) { waypoint::RGBA* to_proto_color(Color attribute_value, float alpha) { waypoint::RGBA* rgba = new waypoint::RGBA(); string hex = attribute_value.hex; - int r = stoi(hex.substr(0,2), 0, 16); - int g = stoi(hex.substr(2,2), 0, 16); - int b = stoi(hex.substr(4,2), 0, 16); + int r = stoi(hex.substr(0, 2), 0, 16); + int g = stoi(hex.substr(2, 2), 0, 16); + int b = stoi(hex.substr(4, 2), 0, 16); int a; - if (alpha == 1.0){ + if (alpha == 1.0) { a = 255; } - else{ - a = std::floor(alpha*256); + else { + a = std::floor(alpha * 256); } uint32_t rgba_int = ((r & 0xff) << 24) + ((g & 0xff) << 16) + ((b & 0xff) << 8) + (a & 0xff); @@ -78,11 +76,11 @@ waypoint::RGBA* to_proto_color(Color attribute_value, float alpha) { //////////////////////////////////////////////////////////////////////////////// Color from_proto_color(waypoint::RGBA attribute_value) { Color color; - std::stringstream stream; + std::stringstream stream; stream << std::hex << attribute_value.rgba(); std::string rgba = stream.str(); - color.hex = rgba.substr(0,6); - color.alpha = std::stof(rgba.substr(6,2)); + color.hex = rgba.substr(0, 6); + color.alpha = std::stof(rgba.substr(6, 2)); return color; } diff --git a/xml_converter/src/icon_gen.cpp b/xml_converter/src/icon_gen.cpp index c215219a..cf87f171 100644 --- a/xml_converter/src/icon_gen.cpp +++ b/xml_converter/src/icon_gen.cpp @@ -33,7 +33,7 @@ bool Icon::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectorcolor.alpha = parse_float(attribute, errors); this->alpha_is_set = true; - } + } else if (attributename == "autotrigger") { this->auto_trigger = parse_bool(attribute, errors); this->auto_trigger_is_set = true; @@ -500,10 +500,10 @@ waypoint::Icon Icon::as_protobuf() const { proto_icon.set_allocated_category(to_proto_marker_category(this->category)); } if (this->color_is_set) { - if (this->alpha_is_set){ + if (this->alpha_is_set) { proto_icon.set_allocated_rgba(to_proto_color(this->color, this->color.alpha)); } - else{ + else { proto_icon.set_allocated_rgba(to_proto_color(this->color, 1.0)); } } diff --git a/xml_converter/src/trail_gen.cpp b/xml_converter/src/trail_gen.cpp index 34359784..6663ff9b 100644 --- a/xml_converter/src/trail_gen.cpp +++ b/xml_converter/src/trail_gen.cpp @@ -33,7 +33,7 @@ bool Trail::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectorcolor.alpha = parse_float(attribute, errors); this->alpha_is_set = true; - } + } else if (attributename == "animspeed") { this->animation_speed = parse_float(attribute, errors); this->animation_speed_is_set = true; @@ -285,10 +285,10 @@ waypoint::Trail Trail::as_protobuf() const { proto_trail.set_allocated_category(to_proto_marker_category(this->category)); } if (this->color_is_set) { - if (this->alpha_is_set){ + if (this->alpha_is_set) { proto_trail.set_allocated_rgba(to_proto_color(this->color, this->color.alpha)); } - else{ + else { proto_trail.set_allocated_rgba(to_proto_color(this->color, 1.0)); } } diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 1f5e4a5d..2e6ef6a5 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -95,7 +95,7 @@ void remove_proto_child(waypoint::Category* proto_category, set category proto_category->mutable_children()->DeleteSubrange(keep, proto_category->children_size() - keep); } -void read_trail_data_file(waypoint::Trail* trail){ +void read_trail_data_file(waypoint::Trail* trail) { ifstream trail_data_file; string trail_path = "./" + trail->trail_data().trail_data(); trail_data_file.open(trail_path, ios::in | ios::binary); @@ -106,23 +106,23 @@ void read_trail_data_file(waypoint::Trail* trail){ char map_id[4]; trail_data_file.read(map_id, 4); - uint32_t map_num = *(uint32_t *)map_id; + uint32_t map_num = *reinterpret_cast(map_id); trail->set_map_id(map_num); - vector points_x; - vector points_y; - vector points_z; + vector points_x; + vector points_y; + vector points_z; - while (trail_data_file.tellg() > 0) { + while (trail_data_file.tellg() > 0) { char point_x[4]; trail_data_file.read(point_x, 4); - points_x.push_back(*(float *)point_x); + points_x.push_back(*reinterpret_cast(point_x)); char point_y[4]; trail_data_file.read(point_y, 4); - points_y.push_back(*(float *)point_y); + points_y.push_back(*reinterpret_cast(point_y)); char point_z[4]; trail_data_file.read(point_z, 4); - points_z.push_back(*(float *)point_z); + points_z.push_back(*reinterpret_cast(point_z)); } *trail->mutable_trail_data()->mutable_points_x() = {points_x.begin(), points_x.end()}; @@ -153,7 +153,7 @@ void write_protobuf_file(string proto_filepath, map* marker_ca for (const auto& parsed_poi : *parsed_pois) { if (parsed_poi->classname() == "POI") { Icon* icon = dynamic_cast(parsed_poi); - if (icon->map_id_is_set){ + if (icon->map_id_is_set) { map_ids.insert(icon->map_id); } waypoint::Icon poi = icon->as_protobuf(); @@ -162,13 +162,12 @@ void write_protobuf_file(string proto_filepath, map* marker_ca } else if (parsed_poi->classname() == "Trail") { Trail* trail = dynamic_cast(parsed_poi); - if (trail->map_id_is_set){ + if (trail->map_id_is_set) { map_ids.insert(trail->map_id); } waypoint::Trail poi = trail->as_protobuf(); read_trail_data_file(&poi); proto_pois.add_trail()->CopyFrom(poi); - } } @@ -230,7 +229,7 @@ void write_protobuf_file(string proto_filepath, map* marker_ca if (output_message.mutable_category(i)->children_size() == 0) { output_message.mutable_category(i)->Clear(); - } + } else { if (keep < i) { output_message.mutable_category()->SwapElements(i, keep); @@ -460,7 +459,6 @@ vector get_xml_files(string directory) { void convert_taco_directory(string directory, map* marker_categories, vector* parsed_pois) { string data = "rsync -a " + directory + "/Data ./protobins"; system(data.c_str()); - cout << directory << endl; vector xml_files = get_xml_files(directory); for (const string& path : xml_files) { parse_xml_file(path, marker_categories, parsed_pois); @@ -547,4 +545,4 @@ int main() { cout << "The xml write function took " << ms << " milliseconds to run" << endl; return 0; - } +} From 72f4fba848d9ca06d176c72bd607fa70b3e80f53 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 19 Feb 2023 17:30:52 -0500 Subject: [PATCH 156/539] Cleaning up Spatial.gd --- Spatial.gd | 14 -------------- Spatial.tscn | 1 - 2 files changed, 15 deletions(-) diff --git a/Spatial.gd b/Spatial.gd index 163f2e49..1ffea06f 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -273,7 +273,6 @@ func decode_context_packet(spb: StreamPeerBuffer): reset_minimap_masks() - func reset_minimap_masks(): var viewport_size = get_viewport().size compass_corner1 = Vector2(0, 0) @@ -340,7 +339,6 @@ func relative_textures_to_absolute_textures(marker_file_dir): if !texture.get_path().is_abs_path(): texture.set_path(marker_file_dir + "/" + texture.get_path()) - var route_scene = load("res://Route.tscn") var icon_scene = load("res://Icon.tscn") var path2d_scene = load("res://Route2D.tscn") @@ -449,8 +447,6 @@ func gen_map_markers(): func gen_new_path(points: Array, texture_path: String): var points_2d: PoolVector2Array = [] - - # Create the texture to use from an image file # TODO: We want to be able to cache this data so that if a texture is used # by multiple objects we only need to keep ony copy of it in memory. #22. @@ -469,8 +465,6 @@ func gen_new_path(points: Array, texture_path: String): texture.storage = ImageTexture.STORAGE_COMPRESS_LOSSLESS texture.create_from_image(image, 22) - - # Create a new 3D route var new_route = route_scene.instance() # var new_curve = Curve3D.new() @@ -490,16 +484,9 @@ func gen_new_path(points: Array, texture_path: String): new_route.set_texture(texture) paths.add_child(new_route) - - - - - - for point in points: points_2d.append(Vector2(point[0], -point[2])) - # Create a new 2D Path var new_2d_path = path2d_scene.instance() new_2d_path.points = points_2d @@ -509,7 +496,6 @@ func gen_new_path(points: Array, texture_path: String): self.currently_active_path = new_route self.currently_active_path_2d = new_2d_path - ################################################################################ # ################################################################################ diff --git a/Spatial.tscn b/Spatial.tscn index 1f90172e..56823156 100644 --- a/Spatial.tscn +++ b/Spatial.tscn @@ -53,7 +53,6 @@ script = ExtResource( 1 ) [node name="CameraMount" type="Spatial" parent="."] [node name="Camera" type="Camera" parent="CameraMount"] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.00229228, 0.00791723, 0.0117152 ) fov = 51.0 [node name="Control" type="Control" parent="."] From 8ac6cd0bfd9936aee3240450782518db80c8470b Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 19 Feb 2023 17:34:36 -0500 Subject: [PATCH 157/539] Removing unnessecary commits --- xml_converter/src/attribute/color.cpp | 1 - xml_converter/src/xml_converter.cpp | 1 - 2 files changed, 2 deletions(-) diff --git a/xml_converter/src/attribute/color.cpp b/xml_converter/src/attribute/color.cpp index d7a18ce5..8b287ae9 100644 --- a/xml_converter/src/attribute/color.cpp +++ b/xml_converter/src/attribute/color.cpp @@ -2,7 +2,6 @@ #include -#include #include #include #include diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 2e6ef6a5..5e990e65 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -6,7 +6,6 @@ #include #include #include -#include #include #include #include From d3a580d84b560b579e67fc461eea0d44bcfbb2b0 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 19 Feb 2023 17:48:53 -0500 Subject: [PATCH 158/539] Small change to rounding --- xml_converter/src/attribute/color.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xml_converter/src/attribute/color.cpp b/xml_converter/src/attribute/color.cpp index 8b287ae9..3fe701d4 100644 --- a/xml_converter/src/attribute/color.cpp +++ b/xml_converter/src/attribute/color.cpp @@ -2,6 +2,7 @@ #include +#include #include #include #include @@ -59,7 +60,7 @@ waypoint::RGBA* to_proto_color(Color attribute_value, float alpha) { a = 255; } else { - a = std::floor(alpha * 256); + a = (int)(alpha * 256); } uint32_t rgba_int = ((r & 0xff) << 24) + ((g & 0xff) << 16) + ((b & 0xff) << 8) + (a & 0xff); From 9de11855eaa53493f657f9ee22444255992b2119 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 19 Feb 2023 18:01:35 -0500 Subject: [PATCH 159/539] Removed include --- xml_converter/src/attribute/color.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/xml_converter/src/attribute/color.cpp b/xml_converter/src/attribute/color.cpp index 3fe701d4..3894ed53 100644 --- a/xml_converter/src/attribute/color.cpp +++ b/xml_converter/src/attribute/color.cpp @@ -2,7 +2,6 @@ #include -#include #include #include #include From 74b06f47b1c4f1b40c8a94d7d64868188e32fecb Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 19 Feb 2023 18:05:42 -0500 Subject: [PATCH 160/539] Changed casting --- xml_converter/src/attribute/color.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml_converter/src/attribute/color.cpp b/xml_converter/src/attribute/color.cpp index 3894ed53..afce854d 100644 --- a/xml_converter/src/attribute/color.cpp +++ b/xml_converter/src/attribute/color.cpp @@ -59,7 +59,7 @@ waypoint::RGBA* to_proto_color(Color attribute_value, float alpha) { a = 255; } else { - a = (int)(alpha * 256); + a = static_cast(alpha * 256); } uint32_t rgba_int = ((r & 0xff) << 24) + ((g & 0xff) << 16) + ((b & 0xff) << 8) + (a & 0xff); From 752fc2d4980fda5d46f798f68dd367182b1c5804 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 20 Feb 2023 18:56:47 -0500 Subject: [PATCH 161/539] Removing the godobuf plugin for now --- addons/protobuf/parser.gd | 2199 ---------------- addons/protobuf/plugin.cfg | 7 - addons/protobuf/protobuf_cmdln.gd | 67 - addons/protobuf/protobuf_core.gd | 654 ----- addons/protobuf/protobuf_ui.gd | 50 - addons/protobuf/protobuf_ui_dock.gd | 131 - addons/protobuf/protobuf_ui_dock.tscn | 176 -- addons/protobuf/protobuf_util.gd | 46 - .../test/expected_bin/proto2/f_bool.v2ref | Bin 2 -> 0 bytes .../test/expected_bin/proto2/f_bytes.v2ref | 1 - .../expected_bin/proto2/f_bytes_default.v2ref | Bin 2 -> 0 bytes .../test/expected_bin/proto2/f_double.v2ref | Bin 9 -> 0 bytes .../expected_bin/proto2/f_empty_inner.v2ref | Bin 3 -> 0 bytes .../expected_bin/proto2/f_empty_out.v2ref | Bin 3 -> 0 bytes .../expected_bin/proto2/f_enum_inner.v2ref | 1 - .../test/expected_bin/proto2/f_enum_out.v2ref | 1 - .../test/expected_bin/proto2/f_fixed32.v2ref | Bin 5 -> 0 bytes .../test/expected_bin/proto2/f_fixed64.v2ref | Bin 9 -> 0 bytes .../test/expected_bin/proto2/f_float.v2ref | 1 - .../test/expected_bin/proto2/f_int32.v2ref | 1 - .../expected_bin/proto2/f_int32_default.v2ref | Bin 2 -> 0 bytes .../test/expected_bin/proto2/f_int64.v2ref | 1 - .../test/expected_bin/proto2/f_map.v2ref | 1 - .../test/expected_bin/proto2/f_map_1.v2ref | 1 - .../test/expected_bin/proto2/f_oneof_f1.v2ref | 1 - .../test/expected_bin/proto2/f_oneof_f2.v2ref | 1 - .../test/expected_bin/proto2/f_sfixed32.v2ref | Bin 5 -> 0 bytes .../test/expected_bin/proto2/f_sfixed64.v2ref | Bin 9 -> 0 bytes .../test/expected_bin/proto2/f_sint32.v2ref | 1 - .../test/expected_bin/proto2/f_sint64.v2ref | 1 - .../test/expected_bin/proto2/f_string.v2ref | 1 - .../proto2/f_string_default.v2ref | Bin 2 -> 0 bytes .../test/expected_bin/proto2/f_uint32.v2ref | 1 - .../test/expected_bin/proto2/f_uint64.v2ref | 1 - .../test/expected_bin/proto2/rf_bool.v2ref | Bin 9 -> 0 bytes .../expected_bin/proto2/rf_bool_empty.v2ref | 0 .../test/expected_bin/proto2/rf_bytes.v2ref | 1 - .../expected_bin/proto2/rf_bytes_empty.v2ref | 0 .../test/expected_bin/proto2/rf_double.v2ref | Bin 20 -> 0 bytes .../expected_bin/proto2/rf_double_empty.v2ref | 0 .../expected_bin/proto2/rf_empty_inner.v2ref | Bin 9 -> 0 bytes .../expected_bin/proto2/rf_empty_out.v2ref | Bin 9 -> 0 bytes .../expected_bin/proto2/rf_enum_inner.v2ref | 1 - .../expected_bin/proto2/rf_enum_out.v2ref | 1 - .../test/expected_bin/proto2/rf_fixed32.v2ref | Bin 12 -> 0 bytes .../proto2/rf_fixed32_empty.v2ref | 0 .../test/expected_bin/proto2/rf_fixed64.v2ref | Bin 20 -> 0 bytes .../proto2/rf_fixed64_empty.v2ref | 0 .../test/expected_bin/proto2/rf_float.v2ref | 1 - .../expected_bin/proto2/rf_float_empty.v2ref | 0 .../expected_bin/proto2/rf_inner_ene.v2ref | Bin 13 -> 0 bytes .../expected_bin/proto2/rf_inner_nen.v2ref | Bin 17 -> 0 bytes .../test/expected_bin/proto2/rf_int32.v2ref | 1 - .../expected_bin/proto2/rf_int32_empty.v2ref | 0 .../proto2/rf_int32_with_clear.v2ref | 1 - .../test/expected_bin/proto2/rf_int64.v2ref | 1 - .../expected_bin/proto2/rf_int64_empty.v2ref | 0 .../expected_bin/proto2/rf_sfixed32.v2ref | Bin 12 -> 0 bytes .../proto2/rf_sfixed32_empty.v2ref | 0 .../expected_bin/proto2/rf_sfixed64.v2ref | Bin 20 -> 0 bytes .../proto2/rf_sfixed64_empty.v2ref | 0 .../test/expected_bin/proto2/rf_sint32.v2ref | 1 - .../expected_bin/proto2/rf_sint32_empty.v2ref | 0 .../test/expected_bin/proto2/rf_sint64.v2ref | 1 - .../expected_bin/proto2/rf_sint64_empty.v2ref | 0 .../test/expected_bin/proto2/rf_string.v2ref | 1 - .../expected_bin/proto2/rf_string_empty.v2ref | 0 .../test/expected_bin/proto2/rf_uint32.v2ref | 1 - .../expected_bin/proto2/rf_uint32_empty.v2ref | 0 .../test/expected_bin/proto2/rf_uint64.v2ref | 1 - .../expected_bin/proto2/rf_uint64_empty.v2ref | 0 .../test/expected_bin/proto2/rfu_bool.v2ref | Bin 6 -> 0 bytes .../test/expected_bin/proto2/rfu_double.v2ref | Bin 19 -> 0 bytes .../expected_bin/proto2/rfu_fixed32.v2ref | Bin 11 -> 0 bytes .../expected_bin/proto2/rfu_fixed64.v2ref | Bin 19 -> 0 bytes .../test/expected_bin/proto2/rfu_float.v2ref | 1 - .../test/expected_bin/proto2/rfu_int32.v2ref | 1 - .../test/expected_bin/proto2/rfu_int64.v2ref | 1 - .../expected_bin/proto2/rfu_sfixed32.v2ref | Bin 11 -> 0 bytes .../expected_bin/proto2/rfu_sfixed64.v2ref | Bin 19 -> 0 bytes .../test/expected_bin/proto2/rfu_sint32.v2ref | 1 - .../test/expected_bin/proto2/rfu_sint64.v2ref | 1 - .../test/expected_bin/proto2/rfu_uint32.v2ref | 1 - .../test/expected_bin/proto2/rfu_uint64.v2ref | 1 - .../test/expected_bin/proto2/simple_all.v2ref | Bin 503 -> 0 bytes .../expected_bin/proto2/simple_all_1.v2ref | Bin 503 -> 0 bytes .../test/expected_bin/proto2/test2_1.v2ref | Bin 68 -> 0 bytes .../test/expected_bin/proto2/test2_2.v2ref | Bin 35 -> 0 bytes .../test/expected_bin/proto2/test2_2_1.v2ref | Bin 35 -> 0 bytes .../test/expected_bin/proto2/test2_3.v2ref | Bin 128 -> 0 bytes .../test/expected_bin/proto2/test2_4.v2ref | 5 - .../test/expected_bin/proto2/test2_4_1.v2ref | 5 - .../proto2/test2_testinner3_testinner32.v2ref | 1 - .../test2_testinner3_testinner32_empty.v2ref | 0 .../test/expected_bin/proto2/test4.v2ref | Bin 25 -> 0 bytes .../test/expected_bin/proto2/test4_map.v2ref | 1 - .../expected_bin/proto2/test4_map_1.v2ref | 1 - .../expected_bin/proto2/test4_map_2.v2ref | 1 - .../expected_bin/proto2/test4_map_3.v2ref | 1 - .../expected_bin/proto2/test4_map_4.v2ref | 1 - .../expected_bin/proto2/test4_map_5.v2ref | 1 - .../expected_bin/proto2/test4_map_dup.v2ref | 1 - .../proto2/test4_map_zero_key.v2ref | Bin 7 -> 0 bytes .../test/expected_bin/proto3/f_bool.v3ref | 0 .../test/expected_bin/proto3/f_bytes.v3ref | 1 - .../expected_bin/proto3/f_bytes_default.v3ref | 0 .../test/expected_bin/proto3/f_double.v3ref | Bin 9 -> 0 bytes .../expected_bin/proto3/f_empty_inner.v3ref | Bin 3 -> 0 bytes .../expected_bin/proto3/f_empty_out.v3ref | Bin 3 -> 0 bytes .../expected_bin/proto3/f_enum_inner.v3ref | 1 - .../test/expected_bin/proto3/f_enum_out.v3ref | 1 - .../test/expected_bin/proto3/f_fixed32.v3ref | Bin 5 -> 0 bytes .../test/expected_bin/proto3/f_fixed64.v3ref | Bin 9 -> 0 bytes .../test/expected_bin/proto3/f_float.v3ref | 1 - .../test/expected_bin/proto3/f_int32.v3ref | 1 - .../expected_bin/proto3/f_int32_default.v3ref | 0 .../test/expected_bin/proto3/f_int64.v3ref | 1 - .../test/expected_bin/proto3/f_map.v3ref | 1 - .../test/expected_bin/proto3/f_map_1.v3ref | 1 - .../test/expected_bin/proto3/f_oneof_f1.v3ref | 1 - .../test/expected_bin/proto3/f_oneof_f2.v3ref | 1 - .../test/expected_bin/proto3/f_sfixed32.v3ref | Bin 5 -> 0 bytes .../test/expected_bin/proto3/f_sfixed64.v3ref | Bin 9 -> 0 bytes .../test/expected_bin/proto3/f_sint32.v3ref | 1 - .../test/expected_bin/proto3/f_sint64.v3ref | 1 - .../test/expected_bin/proto3/f_string.v3ref | 1 - .../proto3/f_string_default.v3ref | 0 .../test/expected_bin/proto3/f_uint32.v3ref | 1 - .../test/expected_bin/proto3/f_uint64.v3ref | 1 - .../test/expected_bin/proto3/rf_bool.v3ref | Bin 6 -> 0 bytes .../expected_bin/proto3/rf_bool_empty.v3ref | 0 .../test/expected_bin/proto3/rf_bytes.v3ref | 1 - .../expected_bin/proto3/rf_bytes_empty.v3ref | 0 .../test/expected_bin/proto3/rf_double.v3ref | Bin 19 -> 0 bytes .../expected_bin/proto3/rf_double_empty.v3ref | 0 .../expected_bin/proto3/rf_empty_inner.v3ref | Bin 9 -> 0 bytes .../expected_bin/proto3/rf_empty_out.v3ref | Bin 9 -> 0 bytes .../expected_bin/proto3/rf_enum_inner.v3ref | 1 - .../expected_bin/proto3/rf_enum_out.v3ref | 1 - .../test/expected_bin/proto3/rf_fixed32.v3ref | Bin 11 -> 0 bytes .../proto3/rf_fixed32_empty.v3ref | 0 .../test/expected_bin/proto3/rf_fixed64.v3ref | Bin 19 -> 0 bytes .../proto3/rf_fixed64_empty.v3ref | 0 .../test/expected_bin/proto3/rf_float.v3ref | 1 - .../expected_bin/proto3/rf_float_empty.v3ref | 0 .../expected_bin/proto3/rf_inner_ene.v3ref | Bin 13 -> 0 bytes .../expected_bin/proto3/rf_inner_nen.v3ref | Bin 17 -> 0 bytes .../test/expected_bin/proto3/rf_int32.v3ref | 1 - .../expected_bin/proto3/rf_int32_empty.v3ref | 0 .../proto3/rf_int32_with_clear.v3ref | 1 - .../test/expected_bin/proto3/rf_int64.v3ref | 1 - .../expected_bin/proto3/rf_int64_empty.v3ref | 0 .../expected_bin/proto3/rf_sfixed32.v3ref | Bin 11 -> 0 bytes .../proto3/rf_sfixed32_empty.v3ref | 0 .../expected_bin/proto3/rf_sfixed64.v3ref | Bin 19 -> 0 bytes .../proto3/rf_sfixed64_empty.v3ref | 0 .../test/expected_bin/proto3/rf_sint32.v3ref | 1 - .../expected_bin/proto3/rf_sint32_empty.v3ref | 0 .../test/expected_bin/proto3/rf_sint64.v3ref | 1 - .../expected_bin/proto3/rf_sint64_empty.v3ref | 0 .../test/expected_bin/proto3/rf_string.v3ref | 1 - .../expected_bin/proto3/rf_string_empty.v3ref | 0 .../test/expected_bin/proto3/rf_uint32.v3ref | 1 - .../expected_bin/proto3/rf_uint32_empty.v3ref | 0 .../test/expected_bin/proto3/rf_uint64.v3ref | 1 - .../expected_bin/proto3/rf_uint64_empty.v3ref | 0 .../test/expected_bin/proto3/rfu_bool.v3ref | Bin 9 -> 0 bytes .../test/expected_bin/proto3/rfu_double.v3ref | Bin 20 -> 0 bytes .../expected_bin/proto3/rfu_fixed32.v3ref | Bin 12 -> 0 bytes .../expected_bin/proto3/rfu_fixed64.v3ref | Bin 20 -> 0 bytes .../test/expected_bin/proto3/rfu_float.v3ref | 1 - .../test/expected_bin/proto3/rfu_int32.v3ref | 1 - .../test/expected_bin/proto3/rfu_int64.v3ref | 1 - .../expected_bin/proto3/rfu_sfixed32.v3ref | Bin 12 -> 0 bytes .../expected_bin/proto3/rfu_sfixed64.v3ref | Bin 20 -> 0 bytes .../test/expected_bin/proto3/rfu_sint32.v3ref | 1 - .../test/expected_bin/proto3/rfu_sint64.v3ref | 1 - .../test/expected_bin/proto3/rfu_uint32.v3ref | 1 - .../test/expected_bin/proto3/rfu_uint64.v3ref | 1 - .../test/expected_bin/proto3/simple_all.v3ref | Bin 495 -> 0 bytes .../expected_bin/proto3/simple_all_1.v3ref | Bin 495 -> 0 bytes .../test/expected_bin/proto3/test2_1.v3ref | Bin 68 -> 0 bytes .../test/expected_bin/proto3/test2_2.v3ref | Bin 35 -> 0 bytes .../test/expected_bin/proto3/test2_2_1.v3ref | Bin 35 -> 0 bytes .../test/expected_bin/proto3/test2_3.v3ref | Bin 128 -> 0 bytes .../test/expected_bin/proto3/test2_4.v3ref | 5 - .../test/expected_bin/proto3/test2_4_1.v3ref | 5 - .../proto3/test2_testinner3_testinner32.v3ref | 1 - .../test2_testinner3_testinner32_empty.v3ref | 0 .../test/expected_bin/proto3/test4.v3ref | Bin 25 -> 0 bytes .../test/expected_bin/proto3/test4_map.v3ref | 1 - .../expected_bin/proto3/test4_map_1.v3ref | 1 - .../expected_bin/proto3/test4_map_2.v3ref | 1 - .../expected_bin/proto3/test4_map_3.v3ref | 1 - .../expected_bin/proto3/test4_map_4.v3ref | 1 - .../expected_bin/proto3/test4_map_5.v3ref | 1 - .../expected_bin/proto3/test4_map_dup.v3ref | 1 - .../proto3/test4_map_zero_key.v3ref | Bin 7 -> 0 bytes .../protobuf/test/script/unit_tests_common.gd | 324 --- .../protobuf/test/script/unit_tests_proto2.gd | 746 ------ .../protobuf/test/script/unit_tests_proto3.gd | 746 ------ addons/protobuf/test/source/pbtest2.proto | 159 -- addons/protobuf/test/source/pbtest3.proto | 124 - addons/protobuf/test/temp/proto3.gd | 2241 ----------------- 204 files changed, 7774 deletions(-) delete mode 100644 addons/protobuf/parser.gd delete mode 100644 addons/protobuf/plugin.cfg delete mode 100644 addons/protobuf/protobuf_cmdln.gd delete mode 100644 addons/protobuf/protobuf_core.gd delete mode 100644 addons/protobuf/protobuf_ui.gd delete mode 100644 addons/protobuf/protobuf_ui_dock.gd delete mode 100644 addons/protobuf/protobuf_ui_dock.tscn delete mode 100644 addons/protobuf/protobuf_util.gd delete mode 100644 addons/protobuf/test/expected_bin/proto2/f_bool.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/f_bytes.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/f_bytes_default.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/f_double.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/f_empty_inner.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/f_empty_out.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/f_enum_inner.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/f_enum_out.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/f_fixed32.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/f_fixed64.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/f_float.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/f_int32.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/f_int32_default.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/f_int64.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/f_map.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/f_map_1.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/f_oneof_f1.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/f_oneof_f2.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/f_sfixed32.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/f_sfixed64.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/f_sint32.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/f_sint64.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/f_string.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/f_string_default.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/f_uint32.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/f_uint64.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/rf_bool.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/rf_bool_empty.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/rf_bytes.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/rf_bytes_empty.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/rf_double.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/rf_double_empty.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/rf_empty_inner.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/rf_empty_out.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/rf_enum_inner.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/rf_enum_out.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/rf_fixed32.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/rf_fixed32_empty.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/rf_fixed64.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/rf_fixed64_empty.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/rf_float.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/rf_float_empty.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/rf_inner_ene.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/rf_inner_nen.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/rf_int32.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/rf_int32_empty.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/rf_int32_with_clear.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/rf_int64.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/rf_int64_empty.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/rf_sfixed32.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/rf_sfixed32_empty.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/rf_sfixed64.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/rf_sfixed64_empty.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/rf_sint32.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/rf_sint32_empty.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/rf_sint64.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/rf_sint64_empty.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/rf_string.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/rf_string_empty.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/rf_uint32.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/rf_uint32_empty.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/rf_uint64.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/rf_uint64_empty.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/rfu_bool.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/rfu_double.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/rfu_fixed32.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/rfu_fixed64.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/rfu_float.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/rfu_int32.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/rfu_int64.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/rfu_sfixed32.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/rfu_sfixed64.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/rfu_sint32.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/rfu_sint64.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/rfu_uint32.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/rfu_uint64.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/simple_all.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/simple_all_1.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/test2_1.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/test2_2.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/test2_2_1.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/test2_3.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/test2_4.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/test2_4_1.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/test2_testinner3_testinner32.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/test2_testinner3_testinner32_empty.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/test4.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/test4_map.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/test4_map_1.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/test4_map_2.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/test4_map_3.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/test4_map_4.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/test4_map_5.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/test4_map_dup.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto2/test4_map_zero_key.v2ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/f_bool.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/f_bytes.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/f_bytes_default.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/f_double.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/f_empty_inner.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/f_empty_out.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/f_enum_inner.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/f_enum_out.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/f_fixed32.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/f_fixed64.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/f_float.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/f_int32.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/f_int32_default.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/f_int64.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/f_map.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/f_map_1.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/f_oneof_f1.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/f_oneof_f2.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/f_sfixed32.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/f_sfixed64.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/f_sint32.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/f_sint64.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/f_string.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/f_string_default.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/f_uint32.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/f_uint64.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/rf_bool.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/rf_bool_empty.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/rf_bytes.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/rf_bytes_empty.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/rf_double.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/rf_double_empty.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/rf_empty_inner.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/rf_empty_out.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/rf_enum_inner.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/rf_enum_out.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/rf_fixed32.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/rf_fixed32_empty.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/rf_fixed64.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/rf_fixed64_empty.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/rf_float.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/rf_float_empty.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/rf_inner_ene.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/rf_inner_nen.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/rf_int32.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/rf_int32_empty.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/rf_int32_with_clear.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/rf_int64.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/rf_int64_empty.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/rf_sfixed32.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/rf_sfixed32_empty.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/rf_sfixed64.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/rf_sfixed64_empty.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/rf_sint32.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/rf_sint32_empty.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/rf_sint64.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/rf_sint64_empty.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/rf_string.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/rf_string_empty.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/rf_uint32.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/rf_uint32_empty.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/rf_uint64.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/rf_uint64_empty.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/rfu_bool.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/rfu_double.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/rfu_fixed32.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/rfu_fixed64.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/rfu_float.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/rfu_int32.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/rfu_int64.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/rfu_sfixed32.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/rfu_sfixed64.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/rfu_sint32.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/rfu_sint64.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/rfu_uint32.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/rfu_uint64.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/simple_all.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/simple_all_1.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/test2_1.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/test2_2.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/test2_2_1.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/test2_3.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/test2_4.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/test2_4_1.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/test2_testinner3_testinner32.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/test2_testinner3_testinner32_empty.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/test4.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/test4_map.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/test4_map_1.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/test4_map_2.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/test4_map_3.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/test4_map_4.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/test4_map_5.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/test4_map_dup.v3ref delete mode 100644 addons/protobuf/test/expected_bin/proto3/test4_map_zero_key.v3ref delete mode 100644 addons/protobuf/test/script/unit_tests_common.gd delete mode 100644 addons/protobuf/test/script/unit_tests_proto2.gd delete mode 100644 addons/protobuf/test/script/unit_tests_proto3.gd delete mode 100644 addons/protobuf/test/source/pbtest2.proto delete mode 100644 addons/protobuf/test/source/pbtest3.proto delete mode 100644 addons/protobuf/test/temp/proto3.gd diff --git a/addons/protobuf/parser.gd b/addons/protobuf/parser.gd deleted file mode 100644 index 9fecb429..00000000 --- a/addons/protobuf/parser.gd +++ /dev/null @@ -1,2199 +0,0 @@ -# -# BSD 3-Clause License -# -# Copyright (c) 2018 - 2022, Oleg Malyavkin -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# * Redistributions of source code must retain the above copyright notice, this -# list of conditions and the following disclaimer. -# -# * Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# * Neither the name of the copyright holder nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -tool -extends Node - -class Document: - - func _init(doc_name : String, doc_text : String): - name = doc_name - text = doc_text - - var name : String - var text : String - -class TokenPosition: - func _init(b : int, e : int): - begin = b - end = e - var begin : int = 0 - var end : int = 0 - -class Helper: - - class StringPosition: - func _init(s : int, c : int, l : int): - str_num = s - column = c - length = l - var str_num : int - var column : int - var length : int - - static func str_pos(text : String, position : TokenPosition) -> StringPosition: - var cur_str : int = 1 - var cur_col : int = 1 - var res_str : int = 0 - var res_col : int = 0 - var res_length : int = 0 - for i in range(text.length()): - if text[i] == "\n": - cur_str += 1 - cur_col = 0 - if position.begin == i: - res_str = cur_str - res_col = cur_col - res_length = position.end - position.begin + 1 - break - cur_col += 1 - return StringPosition.new(res_str, res_col, res_length) - - static func text_pos(tokens : Array, index : int) -> TokenPosition: - var res_begin : int = 0 - var res_end : int = 0 - if index < tokens.size() && index >= 0: - res_begin = tokens[index].position.begin - res_end = tokens[index].position.end - return TokenPosition.new(res_begin, res_end) - - static func error_string(file_name, col, row, error_text): - return file_name + ":" + String(col) + ":" + String(row) + ": error: " + error_text - -class AnalyzeResult: - var classes : Array = [] - var fields : Array = [] - var groups : Array = [] - var version : int = 0 - var state : bool = false - var tokens : Array = [] - var syntax : Analysis.TranslationResult - var imports : Array = [] - var doc : Document - - func soft_copy() -> AnalyzeResult: - var res : AnalyzeResult = AnalyzeResult.new() - res.classes = classes - res.fields = fields - res.groups = groups - res.version = version - res.state = state - res.tokens = tokens - res.syntax = syntax - res.imports = imports - res.doc = doc - return res - -class Analysis: - - func _init(path : String, doc : Document): - path_dir = path - document = doc - - var document : Document - var path_dir : String - - const LEX = { - LETTER = "[A-Za-z]", - DIGIT_DEC = "[0-9]", - DIGIT_OCT = "[0-7]", - DIGIT_HEX = "[0-9]|[A-F]|[a-f]", - BRACKET_ROUND_LEFT = "\\(", - BRACKET_ROUND_RIGHT = "\\)", - BRACKET_CURLY_LEFT = "\\{", - BRACKET_CURLY_RIGHT = "\\}", - BRACKET_SQUARE_LEFT = "\\[", - BRACKET_SQUARE_RIGHT = "\\]", - BRACKET_ANGLE_LEFT = "\\<", - BRACKET_ANGLE_RIGHT = "\\>", - SEMICOLON = ";", - COMMA = ",", - EQUAL = "=", - SIGN = "\\+|\\-", - SPACE = "\\s", - QUOTE_SINGLE = "'", - QUOTE_DOUBLE = "\"", - } - - const TOKEN_IDENT : String = "(" + LEX.LETTER + "+" + "(" + LEX.LETTER + "|" + LEX.DIGIT_DEC + "|" + "_)*)" - const TOKEN_FULL_IDENT : String = TOKEN_IDENT + "{0,1}(\\." + TOKEN_IDENT + ")+" - const TOKEN_BRACKET_ROUND_LEFT : String = "(" + LEX.BRACKET_ROUND_LEFT + ")" - const TOKEN_BRACKET_ROUND_RIGHT : String = "(" + LEX.BRACKET_ROUND_RIGHT + ")" - const TOKEN_BRACKET_CURLY_LEFT : String = "(" + LEX.BRACKET_CURLY_LEFT + ")" - const TOKEN_BRACKET_CURLY_RIGHT : String = "(" + LEX.BRACKET_CURLY_RIGHT + ")" - const TOKEN_BRACKET_SQUARE_LEFT : String = "(" + LEX.BRACKET_SQUARE_LEFT + ")" - const TOKEN_BRACKET_SQUARE_RIGHT : String = "(" + LEX.BRACKET_SQUARE_RIGHT + ")" - const TOKEN_BRACKET_ANGLE_LEFT : String = "(" + LEX.BRACKET_ANGLE_LEFT + ")" - const TOKEN_BRACKET_ANGLE_RIGHT : String = "(" + LEX.BRACKET_ANGLE_RIGHT + ")" - const TOKEN_SEMICOLON : String = "(" + LEX.SEMICOLON + ")" - const TOKEN_EUQAL : String = "(" + LEX.EQUAL + ")" - const TOKEN_SIGN : String = "(" + LEX.SIGN + ")" - const TOKEN_LITERAL_DEC : String = "(([1-9])" + LEX.DIGIT_DEC +"*)" - const TOKEN_LITERAL_OCT : String = "(0" + LEX.DIGIT_OCT +"*)" - const TOKEN_LITERAL_HEX : String = "(0(x|X)(" + LEX.DIGIT_HEX +")+)" - const TOKEN_LITERAL_INT : String = "((\\+|\\-){0,1}" + TOKEN_LITERAL_DEC + "|" + TOKEN_LITERAL_OCT + "|" + TOKEN_LITERAL_HEX + ")" - const TOKEN_LITERAL_FLOAT_DEC : String = "(" + LEX.DIGIT_DEC + "+)" - const TOKEN_LITERAL_FLOAT_EXP : String = "((e|E)(\\+|\\-)?" + TOKEN_LITERAL_FLOAT_DEC + "+)" - const TOKEN_LITERAL_FLOAT : String = "((\\+|\\-){0,1}(" + TOKEN_LITERAL_FLOAT_DEC + "\\." + TOKEN_LITERAL_FLOAT_DEC + "?" + TOKEN_LITERAL_FLOAT_EXP + "?)|(" + TOKEN_LITERAL_FLOAT_DEC + TOKEN_LITERAL_FLOAT_EXP + ")|(\\." + TOKEN_LITERAL_FLOAT_DEC + TOKEN_LITERAL_FLOAT_EXP + "?))" - const TOKEN_SPACE : String = "(" + LEX.SPACE + ")+" - const TOKEN_COMMA : String = "(" + LEX.COMMA + ")" - const TOKEN_CHAR_ESC : String = "[\\\\(a|b|f|n|r|t|v|\\\\|'|\")]" - const TOKEN_OCT_ESC : String = "[\\\\" + LEX.DIGIT_OCT + "{3}]" - const TOKEN_HEX_ESC : String = "[\\\\(x|X)" + LEX.DIGIT_HEX + "{2}]" - const TOKEN_CHAR_EXCLUDE : String = "[^\\0\\n\\\\]" - const TOKEN_CHAR_VALUE : String = "(" + TOKEN_HEX_ESC + "|" + TOKEN_OCT_ESC + "|" + TOKEN_CHAR_ESC + "|" + TOKEN_CHAR_EXCLUDE + ")" - const TOKEN_STRING_SINGLE : String = "('" + TOKEN_CHAR_VALUE + "*?')" - const TOKEN_STRING_DOUBLE : String = "(\"" + TOKEN_CHAR_VALUE + "*?\")" - const TOKEN_COMMENT_SINGLE : String = "((//[^\\n\\r]*[^\\s])|//)" - const TOKEN_COMMENT_MULTI : String = "/\\*(.|[\\n\\r])*?\\*/" - - const TOKEN_SECOND_MESSAGE : String = "^message$" - const TOKEN_SECOND_SIMPLE_DATA_TYPE : String = "^(double|float|int32|int64|uint32|uint64|sint32|sint64|fixed32|fixed64|sfixed32|sfixed64|bool|string|bytes)$" - const TOKEN_SECOND_ENUM : String = "^enum$" - const TOKEN_SECOND_MAP : String = "^map$" - const TOKEN_SECOND_ONEOF : String = "^oneof$" - const TOKEN_SECOND_LITERAL_BOOL : String = "^(true|false)$" - const TOKEN_SECOND_SYNTAX : String = "^syntax$" - const TOKEN_SECOND_IMPORT : String = "^import$" - const TOKEN_SECOND_PACKAGE : String = "^package$" - const TOKEN_SECOND_OPTION : String = "^option$" - const TOKEN_SECOND_SERVICE : String = "^service$" - const TOKEN_SECOND_RESERVED : String = "^reserved$" - const TOKEN_SECOND_IMPORT_QUALIFICATION : String = "^(weak|public)$" - const TOKEN_SECOND_FIELD_QUALIFICATION : String = "^(repeated|required|optional)$" - const TOKEN_SECOND_ENUM_OPTION : String = "^allow_alias$" - const TOKEN_SECOND_QUALIFICATION : String = "^(custom_option|extensions)$" - const TOKEN_SECOND_FIELD_OPTION : String = "^packed$" - - class TokenEntrance: - func _init(i : int, b : int, e : int, t : String): - position = TokenPosition.new(b, e) - text = t - id = i - var position : TokenPosition - var text : String - var id : int - - enum RANGE_STATE { - INCLUDE = 0, - EXCLUDE_LEFT = 1, - EXCLUDE_RIGHT = 2, - OVERLAY = 3, - EQUAL = 4, - ENTERS = 5 - } - - class TokenRange: - func _init(b : int, e : int, s): - position = TokenPosition.new(b, e) - state = s - var position : TokenPosition - var state - - class Token: - var _regex : RegEx - var _entrance : TokenEntrance = null - var _entrances : Array = [] - var _entrance_index : int = 0 - var _id : int - var _ignore : bool - var _clarification : String - - func _init(id : int, clarification : String, regex_str : String, ignore = false): - _id = id - _regex = RegEx.new() - _regex.compile(regex_str) - _clarification = clarification - _ignore = ignore - - func find(text : String, start : int) -> TokenEntrance: - _entrance = null - if !_regex.is_valid(): - return null - var match_result : RegExMatch = _regex.search(text, start) - if match_result != null: - var capture - capture = match_result.get_string(0) - if capture.empty(): - return null - _entrance = TokenEntrance.new(_id, match_result.get_start(0), capture.length() - 1 + match_result.get_start(0), capture) - return _entrance - - func find_all(text : String) -> Array: - var pos : int = 0 - clear() - while find(text, pos) != null: - _entrances.append(_entrance) - pos = _entrance.position.end + 1 - return _entrances - - func add_entrance(entrance) -> void: - _entrances.append(entrance) - - func clear() -> void: - _entrance = null - _entrances = [] - _entrance_index = 0 - - func get_entrances() -> Array: - return _entrances - - func remove_entrance(index) -> void: - if index < _entrances.size(): - _entrances.remove(index) - - func get_index() -> int: - return _entrance_index - - func set_index(index : int) -> void: - if index < _entrances.size(): - _entrance_index = index - else: - _entrance_index = 0 - - func is_ignore() -> bool: - return _ignore - - func get_clarification() -> String: - return _clarification - - class TokenResult: - var tokens : Array = [] - var errors : Array = [] - - enum TOKEN_ID { - UNDEFINED = -1, - IDENT = 0, - FULL_IDENT = 1, - BRACKET_ROUND_LEFT = 2, - BRACKET_ROUND_RIGHT = 3, - BRACKET_CURLY_LEFT = 4, - BRACKET_CURLY_RIGHT = 5, - BRACKET_SQUARE_LEFT = 6, - BRACKET_SQUARE_RIGHT = 7, - BRACKET_ANGLE_LEFT = 8, - BRACKET_ANGLE_RIGHT = 9, - SEMICOLON = 10, - EUQAL = 11, - SIGN = 12, - INT = 13, - FLOAT = 14, - SPACE = 15, - COMMA = 16, - STRING_SINGLE = 17, - STRING_DOUBLE = 18, - COMMENT_SINGLE = 19, - COMMENT_MULTI = 20, - - MESSAGE = 21, - SIMPLE_DATA_TYPE = 22, - ENUM = 23, - MAP = 24, - ONEOF = 25, - LITERAL_BOOL = 26, - SYNTAX = 27, - IMPORT = 28, - PACKAGE = 29, - OPTION = 30, - SERVICE = 31, - RESERVED = 32, - IMPORT_QUALIFICATION = 33, - FIELD_QUALIFICATION = 34, - ENUM_OPTION = 35, - QUALIFICATION = 36, - FIELD_OPTION = 37, - - STRING = 38 - } - - var TOKEN = { - TOKEN_ID.IDENT: Token.new(TOKEN_ID.IDENT, "Identifier", TOKEN_IDENT), - TOKEN_ID.FULL_IDENT: Token.new(TOKEN_ID.FULL_IDENT, "Full identifier", TOKEN_FULL_IDENT), - TOKEN_ID.BRACKET_ROUND_LEFT: Token.new(TOKEN_ID.BRACKET_ROUND_LEFT, "(", TOKEN_BRACKET_ROUND_LEFT), - TOKEN_ID.BRACKET_ROUND_RIGHT: Token.new(TOKEN_ID.BRACKET_ROUND_RIGHT, ")", TOKEN_BRACKET_ROUND_RIGHT), - TOKEN_ID.BRACKET_CURLY_LEFT: Token.new(TOKEN_ID.BRACKET_CURLY_LEFT, "{", TOKEN_BRACKET_CURLY_LEFT), - TOKEN_ID.BRACKET_CURLY_RIGHT: Token.new(TOKEN_ID.BRACKET_CURLY_RIGHT, "}", TOKEN_BRACKET_CURLY_RIGHT), - TOKEN_ID.BRACKET_SQUARE_LEFT: Token.new(TOKEN_ID.BRACKET_SQUARE_LEFT, "[", TOKEN_BRACKET_SQUARE_LEFT), - TOKEN_ID.BRACKET_SQUARE_RIGHT: Token.new(TOKEN_ID.BRACKET_SQUARE_RIGHT, "]", TOKEN_BRACKET_SQUARE_RIGHT), - TOKEN_ID.BRACKET_ANGLE_LEFT: Token.new(TOKEN_ID.BRACKET_ANGLE_LEFT, "<", TOKEN_BRACKET_ANGLE_LEFT), - TOKEN_ID.BRACKET_ANGLE_RIGHT: Token.new(TOKEN_ID.BRACKET_ANGLE_RIGHT, ">", TOKEN_BRACKET_ANGLE_RIGHT), - TOKEN_ID.SEMICOLON: Token.new(TOKEN_ID.SEMICOLON, ";", TOKEN_SEMICOLON), - TOKEN_ID.EUQAL: Token.new(TOKEN_ID.EUQAL, "=", TOKEN_EUQAL), - TOKEN_ID.INT: Token.new(TOKEN_ID.INT, "Integer", TOKEN_LITERAL_INT), - TOKEN_ID.FLOAT: Token.new(TOKEN_ID.FLOAT, "Float", TOKEN_LITERAL_FLOAT), - TOKEN_ID.SPACE: Token.new(TOKEN_ID.SPACE, "Space", TOKEN_SPACE), - TOKEN_ID.COMMA: Token.new(TOKEN_ID.COMMA, ",", TOKEN_COMMA), - TOKEN_ID.STRING_SINGLE: Token.new(TOKEN_ID.STRING_SINGLE, "'String'", TOKEN_STRING_SINGLE), - TOKEN_ID.STRING_DOUBLE: Token.new(TOKEN_ID.STRING_DOUBLE, "\"String\"", TOKEN_STRING_DOUBLE), - TOKEN_ID.COMMENT_SINGLE: Token.new(TOKEN_ID.COMMENT_SINGLE, "//Comment", TOKEN_COMMENT_SINGLE), - TOKEN_ID.COMMENT_MULTI: Token.new(TOKEN_ID.COMMENT_MULTI, "/*Comment*/", TOKEN_COMMENT_MULTI), - - TOKEN_ID.MESSAGE: Token.new(TOKEN_ID.MESSAGE, "Message", TOKEN_SECOND_MESSAGE, true), - TOKEN_ID.SIMPLE_DATA_TYPE: Token.new(TOKEN_ID.SIMPLE_DATA_TYPE, "Data type", TOKEN_SECOND_SIMPLE_DATA_TYPE, true), - TOKEN_ID.ENUM: Token.new(TOKEN_ID.ENUM, "Enum", TOKEN_SECOND_ENUM, true), - TOKEN_ID.MAP: Token.new(TOKEN_ID.MAP, "Map", TOKEN_SECOND_MAP, true), - TOKEN_ID.ONEOF: Token.new(TOKEN_ID.ONEOF, "OneOf", TOKEN_SECOND_ONEOF, true), - TOKEN_ID.LITERAL_BOOL: Token.new(TOKEN_ID.LITERAL_BOOL, "Bool literal", TOKEN_SECOND_LITERAL_BOOL, true), - TOKEN_ID.SYNTAX: Token.new(TOKEN_ID.SYNTAX, "Syntax", TOKEN_SECOND_SYNTAX, true), - TOKEN_ID.IMPORT: Token.new(TOKEN_ID.IMPORT, "Import", TOKEN_SECOND_IMPORT, true), - TOKEN_ID.PACKAGE: Token.new(TOKEN_ID.PACKAGE, "Package", TOKEN_SECOND_PACKAGE, true), - TOKEN_ID.OPTION: Token.new(TOKEN_ID.OPTION, "Option", TOKEN_SECOND_OPTION, true), - TOKEN_ID.SERVICE: Token.new(TOKEN_ID.SERVICE, "Service", TOKEN_SECOND_SERVICE, true), - TOKEN_ID.RESERVED: Token.new(TOKEN_ID.RESERVED, "Reserved", TOKEN_SECOND_RESERVED, true), - TOKEN_ID.IMPORT_QUALIFICATION: Token.new(TOKEN_ID.IMPORT_QUALIFICATION, "Import qualification", TOKEN_SECOND_IMPORT_QUALIFICATION, true), - TOKEN_ID.FIELD_QUALIFICATION: Token.new(TOKEN_ID.FIELD_QUALIFICATION, "Field qualification", TOKEN_SECOND_FIELD_QUALIFICATION, true), - TOKEN_ID.ENUM_OPTION: Token.new(TOKEN_ID.ENUM_OPTION, "Enum option", TOKEN_SECOND_ENUM_OPTION, true), - TOKEN_ID.QUALIFICATION: Token.new(TOKEN_ID.QUALIFICATION, "Qualification", TOKEN_SECOND_QUALIFICATION, true), - TOKEN_ID.FIELD_OPTION: Token.new(TOKEN_ID.FIELD_OPTION, "Field option", TOKEN_SECOND_FIELD_OPTION, true), - - TOKEN_ID.STRING: Token.new(TOKEN_ID.STRING, "String", "", true) - } - - static func check_range(main : TokenEntrance, current : TokenEntrance) -> TokenRange: - if main.position.begin > current.position.begin: - if main.position.end > current.position.end: - if main.position.begin >= current.position.end: - return TokenRange.new(current.position.begin, current.position.end, RANGE_STATE.EXCLUDE_LEFT) - else: - return TokenRange.new(main.position.begin, current.position.end, RANGE_STATE.OVERLAY) - else: - return TokenRange.new(current.position.begin, current.position.end, RANGE_STATE.ENTERS) - elif main.position.begin < current.position.begin: - if main.position.end >= current.position.end: - return TokenRange.new(main.position.begin, main.position.end, RANGE_STATE.INCLUDE) - else: - if main.position.end < current.position.begin: - return TokenRange.new(main.position.begin, main.position.end, RANGE_STATE.EXCLUDE_RIGHT) - else: - return TokenRange.new(main.position.begin, current.position.end, RANGE_STATE.OVERLAY) - else: - if main.position.end == current.position.end: - return TokenRange.new(main.position.begin, main.position.end, RANGE_STATE.EQUAL) - elif main.position.end > current.position.end: - return TokenRange.new(main.position.begin, main.position.end, RANGE_STATE.INCLUDE) - else: - return TokenRange.new(current.position.begin, current.position.end, RANGE_STATE.ENTERS) - - func tokenizer() -> TokenResult: - for k in TOKEN: - if !TOKEN[k].is_ignore(): - TOKEN[k].find_all(document.text) - var second_tokens : Array = [] - second_tokens.append(TOKEN[TOKEN_ID.MESSAGE]) - second_tokens.append(TOKEN[TOKEN_ID.SIMPLE_DATA_TYPE]) - second_tokens.append(TOKEN[TOKEN_ID.ENUM]) - second_tokens.append(TOKEN[TOKEN_ID.MAP]) - second_tokens.append(TOKEN[TOKEN_ID.ONEOF]) - second_tokens.append(TOKEN[TOKEN_ID.LITERAL_BOOL]) - second_tokens.append(TOKEN[TOKEN_ID.SYNTAX]) - second_tokens.append(TOKEN[TOKEN_ID.IMPORT]) - second_tokens.append(TOKEN[TOKEN_ID.PACKAGE]) - second_tokens.append(TOKEN[TOKEN_ID.OPTION]) - second_tokens.append(TOKEN[TOKEN_ID.SERVICE]) - second_tokens.append(TOKEN[TOKEN_ID.RESERVED]) - second_tokens.append(TOKEN[TOKEN_ID.IMPORT_QUALIFICATION]) - second_tokens.append(TOKEN[TOKEN_ID.FIELD_QUALIFICATION]) - second_tokens.append(TOKEN[TOKEN_ID.ENUM_OPTION]) - second_tokens.append(TOKEN[TOKEN_ID.QUALIFICATION]) - second_tokens.append(TOKEN[TOKEN_ID.FIELD_OPTION]) - - var ident_token : Token = TOKEN[TOKEN_ID.IDENT] - for sec_token in second_tokens: - var remove_indexes : Array = [] - for i in range(ident_token.get_entrances().size()): - var entrance : TokenEntrance = sec_token.find(ident_token.get_entrances()[i].text, 0) - if entrance != null: - entrance.position.begin = ident_token.get_entrances()[i].position.begin - entrance.position.end = ident_token.get_entrances()[i].position.end - sec_token.add_entrance(entrance) - remove_indexes.append(i) - for i in range(remove_indexes.size()): - ident_token.remove_entrance(remove_indexes[i] - i) - for v in TOKEN[TOKEN_ID.STRING_DOUBLE].get_entrances(): - v.id = TOKEN_ID.STRING - TOKEN[TOKEN_ID.STRING].add_entrance(v) - TOKEN[TOKEN_ID.STRING_DOUBLE].clear() - for v in TOKEN[TOKEN_ID.STRING_SINGLE].get_entrances(): - v.id = TOKEN_ID.STRING - TOKEN[TOKEN_ID.STRING].add_entrance(v) - TOKEN[TOKEN_ID.STRING_SINGLE].clear() - var main_token : TokenEntrance - var cur_token : TokenEntrance - var main_index : int = -1 - var token_index_flag : bool = false - var result : TokenResult = TokenResult.new() - var check : TokenRange - var end : bool = false - var all : bool = false - var repeat : bool = false - while true: - all = true - for k in TOKEN: - if main_index == k: - continue - repeat = false - while TOKEN[k].get_entrances().size() > 0: - all = false - if !token_index_flag: - main_index = k - main_token = TOKEN[main_index].get_entrances()[0] - token_index_flag = true - break - else: - cur_token = TOKEN[k].get_entrances()[0] - check = check_range(main_token, cur_token) - if check.state == RANGE_STATE.INCLUDE: - TOKEN[k].remove_entrance(0) - end = true - elif check.state == RANGE_STATE.EXCLUDE_LEFT: - main_token = cur_token - main_index = k - end = false - repeat = true - break - elif check.state == RANGE_STATE.EXCLUDE_RIGHT: - end = true - break - elif check.state == RANGE_STATE.OVERLAY || check.state == RANGE_STATE.EQUAL: - result.errors.append(check) - TOKEN[main_index].remove_entrance(0) - TOKEN[k].remove_entrance(0) - token_index_flag = false - end = false - repeat = true - break - elif check.state == RANGE_STATE.ENTERS: - TOKEN[main_index].remove_entrance(0) - main_token = cur_token - main_index = k - end = false - repeat = true - break - if repeat: - break - if end: - if TOKEN[main_index].get_entrances().size() > 0: - result.tokens.append(main_token) - TOKEN[main_index].remove_entrance(0) - token_index_flag = false - if all: - break - return result - - static func check_tokens_integrity(tokens : Array, end : int) -> Array: - var cur_index : int = 0 - var result : Array = [] - for v in tokens: - if v.position.begin > cur_index: - result.append(TokenPosition.new(cur_index, v.position.begin)) - cur_index = v.position.end + 1 - if cur_index < end: - result.append(TokenPosition.new(cur_index, end)) - return result - - static func comment_space_processing(tokens : Array) -> void: - var remove_indexes : Array = [] - for i in range(tokens.size()): - if tokens[i].id == TOKEN_ID.COMMENT_SINGLE || tokens[i].id == TOKEN_ID.COMMENT_MULTI: - tokens[i].id = TOKEN_ID.SPACE - var space_index : int = -1 - for i in range(tokens.size()): - if tokens[i].id == TOKEN_ID.SPACE: - if space_index >= 0: - tokens[space_index].position.end = tokens[i].position.end - tokens[space_index].text = tokens[space_index].text + tokens[i].text - remove_indexes.append(i) - else: - space_index = i - else: - space_index = -1 - for i in range(remove_indexes.size()): - tokens.remove(remove_indexes[i] - i) - - #Analysis rule - enum AR { - MAYBE = 1, - MUST_ONE = 2, - ANY = 3, - OR = 4, - MAYBE_BEGIN = 5, - MAYBE_END = 6, - ANY_BEGIN = 7, - ANY_END = 8 - } - - #Space rule (space after token) - enum SP { - MAYBE = 1, - MUST = 2, - NO = 3 - } - - #Analysis Syntax Description - class ASD: - func _init(t, s : int = SP.MAYBE, r : int = AR.MUST_ONE, i : bool = false): - token = t - space = s - rule = r - importance = i - var token - var space : int - var rule : int - var importance : bool - - var TEMPLATE_SYNTAX : Array = [ - funcref(self, "desc_syntax"), - ASD.new(TOKEN_ID.SYNTAX), - ASD.new(TOKEN_ID.EUQAL), - ASD.new(TOKEN_ID.STRING, SP.MAYBE, AR.MUST_ONE, true), - ASD.new(TOKEN_ID.SEMICOLON) - ] - - var TEMPLATE_IMPORT : Array = [ - funcref(self, "desc_import"), - ASD.new(TOKEN_ID.IMPORT, SP.MUST), - ASD.new(TOKEN_ID.IMPORT_QUALIFICATION, SP.MUST, AR.MAYBE, true), - ASD.new(TOKEN_ID.STRING, SP.MAYBE, AR.MUST_ONE, true), - ASD.new(TOKEN_ID.SEMICOLON) - ] - - var TEMPLATE_PACKAGE : Array = [ - funcref(self, "desc_package"), - ASD.new(TOKEN_ID.PACKAGE, SP.MUST), - ASD.new([TOKEN_ID.IDENT, TOKEN_ID.FULL_IDENT], SP.MAYBE, AR.OR, true), - ASD.new(TOKEN_ID.SEMICOLON) - ] - - var TEMPLATE_OPTION : Array = [ - funcref(self, "desc_option"), - ASD.new(TOKEN_ID.OPTION, SP.MUST), - ASD.new([TOKEN_ID.IDENT, TOKEN_ID.FULL_IDENT], SP.MAYBE, AR.OR, true), - ASD.new(TOKEN_ID.EUQAL), - ASD.new([TOKEN_ID.STRING, TOKEN_ID.INT, TOKEN_ID.FLOAT, TOKEN_ID.LITERAL_BOOL], SP.MAYBE, AR.OR, true), - ASD.new(TOKEN_ID.SEMICOLON) - ] - - var TEMPLATE_FIELD : Array = [ - funcref(self, "desc_field"), - ASD.new(TOKEN_ID.FIELD_QUALIFICATION, SP.MUST, AR.MAYBE, true), - ASD.new([TOKEN_ID.SIMPLE_DATA_TYPE, TOKEN_ID.IDENT, TOKEN_ID.FULL_IDENT], SP.MAYBE, AR.OR, true), - ASD.new(TOKEN_ID.IDENT, SP.MAYBE, AR.MUST_ONE, true), - ASD.new(TOKEN_ID.EUQAL), - ASD.new(TOKEN_ID.INT, SP.MAYBE, AR.MUST_ONE, true), - ASD.new(TOKEN_ID.BRACKET_SQUARE_LEFT, SP.MAYBE, AR.MAYBE_BEGIN), - ASD.new(TOKEN_ID.FIELD_OPTION, SP.MAYBE, AR.MUST_ONE, true), - ASD.new(TOKEN_ID.EUQAL), - ASD.new(TOKEN_ID.LITERAL_BOOL, SP.MAYBE, AR.MUST_ONE, true), - ASD.new(TOKEN_ID.BRACKET_SQUARE_RIGHT, SP.MAYBE, AR.MAYBE_END), - ASD.new(TOKEN_ID.SEMICOLON) - ] - - var TEMPLATE_FIELD_ONEOF : Array = TEMPLATE_FIELD - - var TEMPLATE_MAP_FIELD : Array = [ - funcref(self, "desc_map_field"), - ASD.new(TOKEN_ID.MAP), - ASD.new(TOKEN_ID.BRACKET_ANGLE_LEFT), - ASD.new(TOKEN_ID.SIMPLE_DATA_TYPE, SP.MAYBE, AR.MUST_ONE, true), - ASD.new(TOKEN_ID.COMMA), - ASD.new([TOKEN_ID.SIMPLE_DATA_TYPE, TOKEN_ID.IDENT, TOKEN_ID.FULL_IDENT], SP.MAYBE, AR.OR, true), - ASD.new(TOKEN_ID.BRACKET_ANGLE_RIGHT, SP.MUST), - ASD.new(TOKEN_ID.IDENT, SP.MAYBE, AR.MUST_ONE, true), - ASD.new(TOKEN_ID.EUQAL), - ASD.new(TOKEN_ID.INT, SP.MAYBE, AR.MUST_ONE, true), - ASD.new(TOKEN_ID.BRACKET_SQUARE_LEFT, SP.MAYBE, AR.MAYBE_BEGIN), - ASD.new(TOKEN_ID.FIELD_OPTION, SP.MAYBE, AR.MUST_ONE, true), - ASD.new(TOKEN_ID.EUQAL), - ASD.new(TOKEN_ID.LITERAL_BOOL, SP.MAYBE, AR.MUST_ONE, true), - ASD.new(TOKEN_ID.BRACKET_SQUARE_RIGHT, SP.MAYBE, AR.MAYBE_END), - ASD.new(TOKEN_ID.SEMICOLON) - ] - - var TEMPLATE_MAP_FIELD_ONEOF : Array = TEMPLATE_MAP_FIELD - - var TEMPLATE_ENUM : Array = [ - funcref(self, "desc_enum"), - ASD.new(TOKEN_ID.ENUM, SP.MUST), - ASD.new(TOKEN_ID.IDENT, SP.MAYBE, AR.MUST_ONE, true), - ASD.new(TOKEN_ID.BRACKET_CURLY_LEFT), - ASD.new(TOKEN_ID.OPTION, SP.MUST, AR.MAYBE_BEGIN), - ASD.new(TOKEN_ID.ENUM_OPTION, SP.MAYBE, AR.MUST_ONE, true), - ASD.new(TOKEN_ID.EUQAL), - ASD.new(TOKEN_ID.LITERAL_BOOL, SP.MAYBE, AR.MUST_ONE, true), - ASD.new(TOKEN_ID.SEMICOLON, SP.MAYBE, AR.MAYBE_END), - ASD.new(TOKEN_ID.IDENT, SP.MAYBE, AR.ANY_BEGIN, true), - ASD.new(TOKEN_ID.EUQAL), - ASD.new(TOKEN_ID.INT, SP.MAYBE, AR.MUST_ONE, true), - ASD.new(TOKEN_ID.SEMICOLON, SP.MAYBE, AR.ANY_END), - ASD.new(TOKEN_ID.BRACKET_CURLY_RIGHT) - ] - - var TEMPLATE_MESSAGE_HEAD : Array = [ - funcref(self, "desc_message_head"), - ASD.new(TOKEN_ID.MESSAGE, SP.MUST), - ASD.new(TOKEN_ID.IDENT, SP.MAYBE, AR.MUST_ONE, true), - ASD.new(TOKEN_ID.BRACKET_CURLY_LEFT) - ] - - var TEMPLATE_MESSAGE_TAIL : Array = [ - funcref(self, "desc_message_tail"), - ASD.new(TOKEN_ID.BRACKET_CURLY_RIGHT) - ] - - var TEMPLATE_ONEOF_HEAD : Array = [ - funcref(self, "desc_oneof_head"), - ASD.new(TOKEN_ID.ONEOF, SP.MUST), - ASD.new(TOKEN_ID.IDENT, SP.MAYBE, AR.MUST_ONE, true), - ASD.new(TOKEN_ID.BRACKET_CURLY_LEFT), - ] - - var TEMPLATE_ONEOF_TAIL : Array = [ - funcref(self, "desc_oneof_tail"), - ASD.new(TOKEN_ID.BRACKET_CURLY_RIGHT) - ] - - var TEMPLATE_BEGIN : Array = [ - null, - ASD.new(TOKEN_ID.SPACE, SP.NO, AR.MAYBE) - ] - - var TEMPLATE_END : Array = [ - null - ] - - func get_token_id(tokens : Array, index : int) -> int: - if index < tokens.size(): - return tokens[index].id - return TOKEN_ID.UNDEFINED - - enum COMPARE_STATE { - DONE = 0, - MISMATCH = 1, - INCOMPLETE = 2, - ERROR_VALUE = 3 - } - - class TokenCompare: - func _init(s : int, i : int, d : String = ""): - state = s - index = i - description = d - var state : int - var index : int - var description : String - - func check_space(tokens : Array, index : int, space) -> int: - if get_token_id(tokens, index) == TOKEN_ID.SPACE: - if space == SP.MAYBE: - return 1 - elif space == SP.MUST: - return 1 - elif space == SP.NO: - return -1 - else: - if space == SP.MUST: - return -2 - return 0 - - class IndexedToken: - func _init(t : TokenEntrance, i : int): - token = t - index = i - var token : TokenEntrance - var index : int - - func token_importance_checkadd(template : ASD, token : TokenEntrance, index : int, importance : Array) -> void: - if template.importance: - importance.append(IndexedToken.new(token, index)) - - class CompareSettings: - func _init(ci : int, n : int, pi : int, pn : String = ""): - construction_index = ci - nesting = n - parent_index = pi - parent_name = pn - - var construction_index : int - var nesting : int - var parent_index : int - var parent_name : String - - func description_compare(template : Array, tokens : Array, index : int, settings : CompareSettings) -> TokenCompare: - var j : int = index - var space : int - var rule : int - var rule_flag : bool - var cont : bool - var check : int - var maybe_group_skip : bool = false - var any_group_index : int = -1 - var any_end_group_index : int = -1 - var i : int = 0 - var importance : Array = [] - while true: - i += 1 - if i >= template.size(): - break - rule_flag = false - cont = false - rule = template[i].rule - space = template[i].space - if rule == AR.MAYBE_END && maybe_group_skip: - maybe_group_skip = false - continue - if maybe_group_skip: - continue - if rule == AR.MAYBE: - if template[i].token == get_token_id(tokens, j): - token_importance_checkadd(template[i], tokens[j], j, importance) - rule_flag = true - else: - continue - elif rule == AR.MUST_ONE || rule == AR.MAYBE_END || rule == AR.ANY_END: - if template[i].token == get_token_id(tokens, j): - token_importance_checkadd(template[i], tokens[j], j, importance) - rule_flag = true - elif rule == AR.ANY: - var find_any : bool = false - while true: - if template[i].token == get_token_id(tokens, j): - token_importance_checkadd(template[i], tokens[j], j, importance) - find_any = true - j += 1 - check = check_space(tokens, j, space) - if check < 0: - return TokenCompare.new(COMPARE_STATE.INCOMPLETE, j) - else: - j += check - else: - if find_any: - cont = true - break - elif rule == AR.OR: - var or_tokens = template[i].token - for v in or_tokens: - if v == get_token_id(tokens, j): - token_importance_checkadd(template[i], tokens[j], j, importance) - j += 1 - check = check_space(tokens, j, space) - if check < 0: - return TokenCompare.new(COMPARE_STATE.INCOMPLETE, j) - else: - j += check - cont = true - break - elif rule == AR.MAYBE_BEGIN: - if template[i].token == get_token_id(tokens, j): - token_importance_checkadd(template[i], tokens[j], j, importance) - rule_flag = true - else: - maybe_group_skip = true - continue - elif rule == AR.ANY_BEGIN: - if template[i].token == get_token_id(tokens, j): - token_importance_checkadd(template[i], tokens[j], j, importance) - rule_flag = true - any_group_index = i - else: - if any_end_group_index > 0: - any_group_index = -1 - i = any_end_group_index - any_end_group_index = -1 - continue - if cont: - continue - if rule_flag: - j += 1 - check = check_space(tokens, j, space) - if check < 0: - return TokenCompare.new(COMPARE_STATE.INCOMPLETE, j) - else: - j += check - else: - if j > index: - return TokenCompare.new(COMPARE_STATE.INCOMPLETE, j) - else: - return TokenCompare.new(COMPARE_STATE.MISMATCH, j) - if any_group_index >= 0 && rule == AR.ANY_END: - any_end_group_index = i - i = any_group_index - 1 - if template[0] != null: - var result : DescriptionResult = template[0].call_func(importance, settings) - if !result.success: - return TokenCompare.new(COMPARE_STATE.ERROR_VALUE, result.error, result.description) - return TokenCompare.new(COMPARE_STATE.DONE, j) - - var DESCRIPTION : Array = [ - TEMPLATE_BEGIN, #0 - TEMPLATE_SYNTAX, #1 - TEMPLATE_IMPORT, #2 - TEMPLATE_PACKAGE, #3 - TEMPLATE_OPTION, #4 - TEMPLATE_FIELD, #5 - TEMPLATE_FIELD_ONEOF, #6 - TEMPLATE_MAP_FIELD, #7 - TEMPLATE_MAP_FIELD_ONEOF, #8 - TEMPLATE_ENUM, #9 - TEMPLATE_MESSAGE_HEAD, #10 - TEMPLATE_MESSAGE_TAIL, #11 - TEMPLATE_ONEOF_HEAD, #12 - TEMPLATE_ONEOF_TAIL, #13 - TEMPLATE_END #14 - ] - - enum JUMP { - NOTHING = 0, #nothing - SIMPLE = 1, #simple jump - NESTED_INCREMENT = 2, #nested increment - NESTED_DECREMENT = 3, #nested decrement - MUST_NESTED_SIMPLE = 4, #check: must be nested > 0 - MUST_NESTED_INCREMENT = 5, #check: must be nested > 0, then nested increment - MUST_NESTED_DECREMENT = 6, #nested decrement, then check: must be nested > 0 - } - - var TRANSLATION_TABLE : Array = [ - # BEGIN SYNTAX IMPORT PACKAGE OPTION FIELD FIELD_O MAP_F MAP_F_O ENUM MES_H MES_T ONEOF_H ONEOF_T END - [ 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], #BEGIN - [ 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 2, 0, 0, 0, 1], #SYNTAX - [ 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 2, 0, 0, 0, 1], #IMPORT - [ 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 2, 0, 0, 0, 1], #PACKAGE - [ 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 2, 0, 0, 0, 1], #OPTION - [ 0, 0, 0, 0, 0, 4, 0, 4, 0, 1, 2, 3, 5, 0, 0], #FIELD - [ 0, 0, 0, 0, 0, 0, 4, 0, 4, 0, 0, 0, 0, 6, 0], #FIELD_ONEOF - [ 0, 0, 0, 0, 0, 4, 0, 4, 0, 1, 2, 3, 5, 0, 0], #MAP_F - [ 0, 0, 0, 0, 0, 0, 4, 0, 4, 0, 0, 0, 0, 6, 0], #MAP_F_ONEOF - [ 0, 0, 0, 0, 0, 4, 0, 4, 0, 1, 2, 3, 5, 0, 1], #ENUM - [ 0, 0, 0, 0, 0, 4, 0, 4, 0, 1, 2, 3, 5, 0, 0], #MES_H - [ 0, 0, 0, 0, 0, 4, 0, 4, 0, 1, 2, 3, 5, 0, 1], #MES_T - [ 0, 0, 0, 0, 0, 0, 4, 0, 4, 0, 0, 0, 0, 0, 0], #ONEOF_H - [ 0, 0, 0, 0, 0, 4, 0, 4, 0, 1, 2, 3, 5, 0, 1], #ONEOF_T - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] #END - ] - - class Construction: - func _init(b : int, e : int, d : int): - begin_token_index = b - end_token_index = e - description = d - var begin_token_index : int - var end_token_index : int - var description : int - - class TranslationResult: - var constructions : Array = [] - var done : bool = false - var error_description_id : int = -1 - var error_description_text : String = "" - var parse_token_index : int = 0 - var error_token_index : int = 0 - - func analyze_tokens(tokens : Array) -> TranslationResult: - var i : int = 0 - var result : TranslationResult = TranslationResult.new() - var comp : TokenCompare - var cur_template_id : int = 0 - var error : bool = false - var template_index : int - var comp_set : CompareSettings = CompareSettings.new(result.constructions.size(), 0, -1) - comp = description_compare(DESCRIPTION[cur_template_id], tokens, i, comp_set) - if comp.state == COMPARE_STATE.DONE: - i = comp.index - while true: - var end : bool = true - var find : bool = false - for j in range(TRANSLATION_TABLE[cur_template_id].size()): - template_index = j - if j == DESCRIPTION.size() - 1 && i < tokens.size(): - end = false - if result.error_description_id < 0: - error = true - break - if TRANSLATION_TABLE[cur_template_id][j] > 0: - end = false - comp_set.construction_index = result.constructions.size() - comp = description_compare(DESCRIPTION[j], tokens, i, comp_set) - if comp.state == COMPARE_STATE.DONE: - if TRANSLATION_TABLE[cur_template_id][j] == JUMP.NESTED_INCREMENT: - comp_set.nesting += 1 - elif TRANSLATION_TABLE[cur_template_id][j] == JUMP.NESTED_DECREMENT: - comp_set.nesting -= 1 - if comp_set.nesting < 0: - error = true - break - elif TRANSLATION_TABLE[cur_template_id][j] == JUMP.MUST_NESTED_SIMPLE: - if comp_set.nesting <= 0: - error = true - break - elif TRANSLATION_TABLE[cur_template_id][j] == JUMP.MUST_NESTED_INCREMENT: - if comp_set.nesting <= 0: - error = true - break - comp_set.nesting += 1 - elif TRANSLATION_TABLE[cur_template_id][j] == JUMP.MUST_NESTED_DECREMENT: - comp_set.nesting -= 1 - if comp_set.nesting <= 0: - error = true - break - result.constructions.append(Construction.new(i, comp.index, j)) - find = true - i = comp.index - cur_template_id = j - if i == tokens.size(): - if TRANSLATION_TABLE[cur_template_id][DESCRIPTION.size() - 1] == JUMP.SIMPLE: - if comp_set.nesting == 0: - end = true - else: - error = true - else: - error = true - elif i > tokens.size(): - error = true - break - elif comp.state == COMPARE_STATE.INCOMPLETE: - error = true - break - elif comp.state == COMPARE_STATE.ERROR_VALUE: - error = true - break - if error: - result.error_description_text = comp.description - result.error_description_id = template_index - result.parse_token_index = i - if comp.index >= tokens.size(): - result.error_token_index = tokens.size() - 1 - else: - result.error_token_index = comp.index - if end: - result.done = true - result.error_description_id = -1 - break - if !find: - break - return result - - enum CLASS_TYPE { - ENUM = 0, - MESSAGE = 1, - MAP = 2 - } - - enum FIELD_TYPE { - UNDEFINED = -1, - INT32 = 0, - SINT32 = 1, - UINT32 = 2, - INT64 = 3, - SINT64 = 4, - UINT64 = 5, - BOOL = 6, - ENUM = 7, - FIXED32 = 8, - SFIXED32 = 9, - FLOAT = 10, - FIXED64 = 11, - SFIXED64 = 12, - DOUBLE = 13, - STRING = 14, - BYTES = 15, - MESSAGE = 16, - MAP = 17 - } - - enum FIELD_QUALIFICATOR { - OPTIONAL = 0, - REQUIRED = 1, - REPEATED = 2, - RESERVED = 3 - } - - enum FIELD_OPTION { - PACKED = 0, - NOT_PACKED = 1 - } - - class ASTClass: - func _init(n : String, t : int, p : int, pn : String, o : String, ci : int): - name = n - type = t - parent_index = p - parent_name = pn - option = o - construction_index = ci - values = [] - - var name : String - var type : int - var parent_index : int - var parent_name : String - var option : String - var construction_index - var values : Array - - func copy() -> ASTClass: - var res : ASTClass = ASTClass.new(name, type, parent_index, parent_name, option, construction_index) - for v in values: - res.values.append(v.copy()) - return res - - class ASTEnumValue: - func _init(n : String, v : String): - name = n - value = v - - var name : String - var value : String - - func copy() -> ASTEnumValue: - return ASTEnumValue.new(name, value) - - class ASTField: - func _init(t, n : String, tn : String, p : int, q : int, o : int, ci : int, mf : bool): - tag = t - name = n - type_name = tn - parent_class_id = p - qualificator = q - option = o - construction_index = ci - is_map_field = mf - - var tag - var name : String - var type_name : String - var parent_class_id : int - var qualificator : int - var option : int - var construction_index : int - var is_map_field : bool - var field_type : int = FIELD_TYPE.UNDEFINED - var type_class_id : int = -1 - - func copy() -> ASTField: - var res : ASTField = ASTField.new(tag, name, type_name, parent_class_id, qualificator, option, construction_index, is_map_field) - res.field_type = field_type - res.type_class_id = type_class_id - return res - - enum AST_GROUP_RULE { - ONEOF = 0, - ALL = 1 - } - - class ASTFieldGroup: - func _init(n : String, pi : int, r : int): - name = n - parent_class_id = pi - rule = r - opened = true - - var name : String - var parent_class_id : int - var rule : int - var field_indexes : Array = [] - var opened : bool - - func copy() -> ASTFieldGroup: - var res : ASTFieldGroup = ASTFieldGroup.new(name, parent_class_id, rule) - res.opened = opened - for fi in field_indexes: - res.field_indexes.append(fi) - return res - - class ASTImport: - func _init(a_path : String, a_public : bool, sha : String): - path = a_path - public = a_public - sha256 = sha - - var path : String - var public : bool - var sha256 : String - - var class_table : Array = [] - var field_table : Array = [] - var group_table : Array = [] - var import_table : Array = [] - var proto_version : int = 0 - - class DescriptionResult: - func _init(s : bool = true, e = null, d : String = ""): - success = s - error = e - description = d - var success : bool - var error - var description : String - - static func get_text_from_token(string_token : TokenEntrance) -> String: - return string_token.text.substr(1, string_token.text.length() - 2) - - func desc_syntax(indexed_tokens : Array, settings : CompareSettings) -> DescriptionResult: - var result : DescriptionResult = DescriptionResult.new() - var s : String = get_text_from_token(indexed_tokens[0].token) - if s == "proto2": - proto_version = 2 - elif s == "proto3": - proto_version = 3 - else: - result.success = false - result.error = indexed_tokens[0].index - result.description = "Unspecified version of the protocol. Use \"proto2\" or \"proto3\" syntax string." - return result - - func desc_import(indexed_tokens : Array, settings : CompareSettings) -> DescriptionResult: - var result : DescriptionResult = DescriptionResult.new() - var offset : int = 0 - var public : bool = false - if indexed_tokens[offset].token.id == TOKEN_ID.IMPORT_QUALIFICATION: - if indexed_tokens[offset].token.text == "public": - public = true - offset += 1 - var f_name : String = path_dir + get_text_from_token(indexed_tokens[offset].token) - var file : File = File.new() - var sha : String = file.get_sha256(f_name) - if file.file_exists(f_name): - for i in import_table: - if i.path == f_name: - result.success = false - result.error = indexed_tokens[offset].index - result.description = "File '" + f_name + "' already imported." - return result - if i.sha256 == sha: - result.success = false - result.error = indexed_tokens[offset].index - result.description = "File '" + f_name + "' with matching SHA256 already imported." - return result - import_table.append(ASTImport.new(f_name, public, sha)) - else: - result.success = false - result.error = indexed_tokens[offset].index - result.description = "Import file '" + f_name + "' not found." - return result - - func desc_package(indexed_tokens : Array, settings : CompareSettings) -> DescriptionResult: - printerr("UNRELEASED desc_package: ", indexed_tokens.size(), ", nesting: ", settings.nesting) - var result : DescriptionResult = DescriptionResult.new() - return result - - func desc_option(indexed_tokens : Array, settings : CompareSettings) -> DescriptionResult: - printerr("UNRELEASED desc_option: ", indexed_tokens.size(), ", nesting: ", settings.nesting) - var result : DescriptionResult = DescriptionResult.new() - return result - - func desc_field(indexed_tokens : Array, settings : CompareSettings) -> DescriptionResult: - var result : DescriptionResult = DescriptionResult.new() - var qualifcator : int = FIELD_QUALIFICATOR.OPTIONAL - var option : int - var offset : int = 0 - - if proto_version == 3: - option = FIELD_OPTION.PACKED - if indexed_tokens[offset].token.id == TOKEN_ID.FIELD_QUALIFICATION: - if indexed_tokens[offset].token.text == "repeated": - qualifcator = FIELD_QUALIFICATOR.REPEATED - elif indexed_tokens[offset].token.text == "required" || indexed_tokens[offset].token.text == "optional": - result.success = false - result.error = indexed_tokens[offset].index - result.description = "Using the 'required' or 'optional' qualificator is unacceptable in Protobuf v3." - return result - offset += 1 - if proto_version == 2: - option = FIELD_OPTION.NOT_PACKED - if !(group_table.size() > 0 && group_table[group_table.size() - 1].opened): - if indexed_tokens[offset].token.id == TOKEN_ID.FIELD_QUALIFICATION: - if indexed_tokens[offset].token.text == "repeated": - qualifcator = FIELD_QUALIFICATOR.REPEATED - elif indexed_tokens[offset].token.text == "required": - qualifcator = FIELD_QUALIFICATOR.REQUIRED - elif indexed_tokens[offset].token.text == "optional": - qualifcator = FIELD_QUALIFICATOR.OPTIONAL - offset += 1 - else: - if class_table[settings.parent_index].type == CLASS_TYPE.MESSAGE: - result.success = false - result.error = indexed_tokens[offset].index - result.description = "Using the 'required', 'optional' or 'repeated' qualificator necessarily in Protobuf v2." - return result - var type_name : String = indexed_tokens[offset].token.text; offset += 1 - var field_name : String = indexed_tokens[offset].token.text; offset += 1 - var tag : String = indexed_tokens[offset].token.text; offset += 1 - - if indexed_tokens.size() == offset + 2: - if indexed_tokens[offset].token.text == "packed": - offset += 1 - if indexed_tokens[offset].token.text == "true": - option = FIELD_OPTION.PACKED - else: - option = FIELD_OPTION.NOT_PACKED - else: - result.success = false - result.error = indexed_tokens[offset].index - result.description = "Undefined field option." - return result - - if group_table.size() > 0: - if group_table[group_table.size() - 1].opened: - if indexed_tokens[0].token.id == TOKEN_ID.FIELD_QUALIFICATION: - result.success = false - result.error = indexed_tokens[0].index - result.description = "Using the 'required', 'optional' or 'repeated' qualificator is unacceptable in 'OneOf' field." - return result - group_table[group_table.size() - 1].field_indexes.append(field_table.size()) - field_table.append(ASTField.new(tag, field_name, type_name, settings.parent_index, qualifcator, option, settings.construction_index, false)) - return result - - func desc_map_field(indexed_tokens : Array, settings : CompareSettings) -> DescriptionResult: - var result : DescriptionResult = DescriptionResult.new() - var qualifcator : int = FIELD_QUALIFICATOR.REPEATED - var option : int - var offset : int = 0 - - if proto_version == 3: - option = FIELD_OPTION.PACKED - if proto_version == 2: - option = FIELD_OPTION.NOT_PACKED - - var key_type_name : String = indexed_tokens[offset].token.text; offset += 1 - if key_type_name == "float" || key_type_name == "double" || key_type_name == "bytes": - result.success = false - result.error = indexed_tokens[offset - 1].index - result.description = "Map 'key_type' can't be floating point types and bytes." - var type_name : String = indexed_tokens[offset].token.text; offset += 1 - var field_name : String = indexed_tokens[offset].token.text; offset += 1 - var tag : String = indexed_tokens[offset].token.text; offset += 1 - - if indexed_tokens.size() == offset + 2: - if indexed_tokens[offset].token.text == "packed": - offset += 1 - if indexed_tokens[offset] == "true": - option = FIELD_OPTION.PACKED - else: - option = FIELD_OPTION.NOT_PACKED - else: - result.success = false - result.error = indexed_tokens[offset].index - result.description = "Undefined field option." - - if group_table.size() > 0: - if group_table[group_table.size() - 1].opened: - group_table[group_table.size() - 1].field_indexes.append(field_table.size()) - - class_table.append(ASTClass.new("map_type_" + field_name, CLASS_TYPE.MAP, settings.parent_index, settings.parent_name, "", settings.construction_index)) - field_table.append(ASTField.new(tag, field_name, "map_type_" + field_name, settings.parent_index, qualifcator, option, settings.construction_index, false)) - - field_table.append(ASTField.new(1, "key", key_type_name, class_table.size() - 1, FIELD_QUALIFICATOR.REQUIRED, option, settings.construction_index, true)) - field_table.append(ASTField.new(2, "value", type_name, class_table.size() - 1, FIELD_QUALIFICATOR.REQUIRED, option, settings.construction_index, true)) - - return result - - func desc_enum(indexed_tokens : Array, settings : CompareSettings) -> DescriptionResult: - var result : DescriptionResult = DescriptionResult.new() - var option : String = "" - var offset : int = 0 - var type_name : String = indexed_tokens[offset].token.text; offset += 1 - if indexed_tokens[offset].token.id == TOKEN_ID.ENUM_OPTION: - if indexed_tokens[offset].token.text == "allow_alias" && indexed_tokens[offset + 1].token.text == "true": - option = "allow_alias" - offset += 2 - var value : ASTEnumValue - var enum_class : ASTClass = ASTClass.new(type_name, CLASS_TYPE.ENUM, settings.parent_index, settings.parent_name, option, settings.construction_index) - var first_value : bool = true - while offset < indexed_tokens.size(): - if first_value: - if indexed_tokens[offset + 1].token.text != "0": - result.success = false - result.error = indexed_tokens[offset + 1].index - result.description = "For Enums, the default value is the first defined enum value, which must be 0." - break - first_value = false - #if indexed_tokens[offset + 1].token.text[0] == "+" || indexed_tokens[offset + 1].token.text[0] == "-": - # result.success = false - # result.error = indexed_tokens[offset + 1].index - # result.description = "For Enums, signed values are not allowed." - # break - value = ASTEnumValue.new(indexed_tokens[offset].token.text, indexed_tokens[offset + 1].token.text) - enum_class.values.append(value) - offset += 2 - - class_table.append(enum_class) - return result - - func desc_message_head(indexed_tokens : Array, settings : CompareSettings) -> DescriptionResult: - var result : DescriptionResult = DescriptionResult.new() - class_table.append(ASTClass.new(indexed_tokens[0].token.text, CLASS_TYPE.MESSAGE, settings.parent_index, settings.parent_name, "", settings.construction_index)) - settings.parent_index = class_table.size() - 1 - settings.parent_name = settings.parent_name + "." + indexed_tokens[0].token.text - return result - - func desc_message_tail(indexed_tokens : Array, settings : CompareSettings) -> DescriptionResult: - settings.parent_index = class_table[settings.parent_index].parent_index - settings.parent_name = class_table[settings.parent_index + 1].parent_name - var result : DescriptionResult = DescriptionResult.new() - return result - - func desc_oneof_head(indexed_tokens : Array, settings : CompareSettings) -> DescriptionResult: - var result : DescriptionResult = DescriptionResult.new() - for g in group_table: - if g.parent_class_id == settings.parent_index && g.name == indexed_tokens[0].token.text: - result.success = false - result.error = indexed_tokens[0].index - result.description = "OneOf name must be unique." - return result - group_table.append(ASTFieldGroup.new(indexed_tokens[0].token.text, settings.parent_index, AST_GROUP_RULE.ONEOF)) - return result - - func desc_oneof_tail(indexed_tokens : Array, settings : CompareSettings) -> DescriptionResult: - group_table[group_table.size() - 1].opened = false - var result : DescriptionResult = DescriptionResult.new() - return result - - func analyze() -> AnalyzeResult: - var analyze_result : AnalyzeResult = AnalyzeResult.new() - analyze_result.doc = document - analyze_result.classes = class_table - analyze_result.fields = field_table - analyze_result.groups = group_table - analyze_result.state = false - var result : TokenResult = tokenizer() - if result.errors.size() > 0: - for v in result.errors: - var spos : Helper.StringPosition = Helper.str_pos(document.text, v.position) - var err_text : String = "Unexpected token intersection " + "'" + document.text.substr(v.position.begin, spos.length) + "'" - printerr(Helper.error_string(document.name, spos.str_num, spos.column, err_text)) - else: - var integrity = check_tokens_integrity(result.tokens, document.text.length() - 1) - if integrity.size() > 0: - for v in integrity: - var spos: Helper.StringPosition = Helper.str_pos(document.text, TokenPosition.new(v.begin, v.end)) - var err_text : String = "Unexpected token " + "'" + document.text.substr(v.begin, spos.length) + "'" - printerr(Helper.error_string(document.name, spos.str_num, spos.column, err_text)) - else: - analyze_result.tokens = result.tokens - comment_space_processing(result.tokens) - var syntax : TranslationResult = analyze_tokens(result.tokens) - if !syntax.done: - var pos_main : Helper.TokenPosition = Helper.text_pos(result.tokens, syntax.parse_token_index) - var pos_inner : Helper.TokenPosition = Helper.text_pos(result.tokens, syntax.error_token_index) - var spos_main : Helper.StringPosition = Helper.str_pos(document.text, pos_main) - var spos_inner : Helper.StringPosition = Helper.str_pos(document.text, pos_inner) - var err_text : String = "Syntax error in construction '" + result.tokens[syntax.parse_token_index].text + "'. " - err_text += "Unacceptable use '" + result.tokens[syntax.error_token_index].text + "' at:" + String(spos_inner.str_num) + ":" + String(spos_inner.column) - err_text += "\n" + syntax.error_description_text - printerr(Helper.error_string(document.name, spos_main.str_num, spos_main.column, err_text)) - else: - analyze_result.version = proto_version - analyze_result.imports = import_table - analyze_result.syntax = syntax - analyze_result.state = true - return analyze_result - -class Semantic: - - var class_table : Array - var field_table : Array - var group_table : Array - var syntax : Analysis.TranslationResult - var tokens : Array - var document : Document - - func _init(analyze_result : AnalyzeResult): - class_table = analyze_result.classes - field_table = analyze_result.fields - group_table = analyze_result.groups - syntax = analyze_result.syntax - tokens = analyze_result.tokens - document = analyze_result.doc - - - enum CHECK_SUBJECT { - CLASS_NAME = 0, - FIELD_NAME = 1, - FIELD_TAG_NUMBER = 2, - FIELD_TYPE = 3 - } - - var STRING_FIELD_TYPE = { - "int32": Analysis.FIELD_TYPE.INT32, - "sint32": Analysis.FIELD_TYPE.SINT32, - "uint32": Analysis.FIELD_TYPE.UINT32, - "int64": Analysis.FIELD_TYPE.INT64, - "sint64": Analysis.FIELD_TYPE.SINT64, - "uint64": Analysis.FIELD_TYPE.UINT64, - "bool": Analysis.FIELD_TYPE.BOOL, - "fixed32": Analysis.FIELD_TYPE.FIXED32, - "sfixed32": Analysis.FIELD_TYPE.SFIXED32, - "float": Analysis.FIELD_TYPE.FLOAT, - "fixed64": Analysis.FIELD_TYPE.FIXED64, - "sfixed64": Analysis.FIELD_TYPE.SFIXED64, - "double": Analysis.FIELD_TYPE.DOUBLE, - "string": Analysis.FIELD_TYPE.STRING, - "bytes": Analysis.FIELD_TYPE.BYTES, - "map": Analysis.FIELD_TYPE.MAP - } - - class CheckResult: - func _init(mci : int, aci : int, ti : int, s : int): - main_construction_index = mci - associated_construction_index = aci - table_index = ti - subject = s - - var main_construction_index: int = -1 - var associated_construction_index: int = -1 - var table_index: int = -1 - var subject : int - - func check_class_names() -> Array: - var result : Array = [] - for i in range(class_table.size()): - var the_class_name : String = class_table[i].parent_name + "." + class_table[i].name - for j in range(i + 1, class_table.size(), 1): - var inner_name : String = class_table[j].parent_name + "." + class_table[j].name - if inner_name == the_class_name: - var check : CheckResult = CheckResult.new(class_table[j].construction_index, class_table[i].construction_index, j, CHECK_SUBJECT.CLASS_NAME) - result.append(check) - break - return result - - func check_field_names() -> Array: - var result : Array = [] - for i in range(field_table.size()): - var the_class_name : String = class_table[field_table[i].parent_class_id].parent_name + "." + class_table[field_table[i].parent_class_id].name - for j in range(i + 1, field_table.size(), 1): - var inner_name : String = class_table[field_table[j].parent_class_id].parent_name + "." + class_table[field_table[j].parent_class_id].name - if inner_name == the_class_name: - if field_table[i].name == field_table[j].name: - var check : CheckResult = CheckResult.new(field_table[j].construction_index, field_table[i].construction_index, j, CHECK_SUBJECT.FIELD_NAME) - result.append(check) - break - if field_table[i].tag == field_table[j].tag: - var check : CheckResult = CheckResult.new(field_table[j].construction_index, field_table[i].construction_index, j, CHECK_SUBJECT.FIELD_TAG_NUMBER) - result.append(check) - break - return result - - func find_full_class_name(the_class_name : String) -> int: - for i in range(class_table.size()): - if the_class_name == class_table[i].parent_name + "." + class_table[i].name: - return i - return -1 - - func find_class_name(the_class_name : String) -> int: - for i in range(class_table.size()): - if the_class_name == class_table[i].name: - return i - return -1 - - func get_class_childs(class_index : int) -> Array: - var result : Array = [] - for i in range(class_table.size()): - if class_table[i].parent_index == class_index: - result.append(i) - return result - - func find_in_childs(the_class_name : String, child_indexes : Array) -> int: - for c in child_indexes: - if the_class_name == class_table[c].name: - return c - return -1 - - func determine_field_types() -> Array: - var result : Array = [] - for f in field_table: - if STRING_FIELD_TYPE.has(f.type_name): - f.field_type = STRING_FIELD_TYPE[f.type_name] - else: - if f.type_name[0] == ".": - f.type_class_id = find_full_class_name(f.type_name) - else: - var splited_name : Array = f.type_name.split(".", false) - var cur_class_index : int = f.parent_class_id - var exit : bool = false - while(true): - var find : bool = false - if cur_class_index == -1: - break - for n in splited_name: - var childs_and_parent : Array = get_class_childs(cur_class_index) - var res_index : int = find_in_childs(n, childs_and_parent) - if res_index >= 0: - find = true - cur_class_index = res_index - else: - if find: - exit = true - else: - cur_class_index = class_table[cur_class_index].parent_index - break - if exit: - break - if find: - f.type_class_id = cur_class_index - break - if f.type_class_id == -1: - f.type_class_id = find_full_class_name("." + f.type_name) - for i in range(field_table.size()): - if field_table[i].field_type == Analysis.FIELD_TYPE.UNDEFINED: - if field_table[i].type_class_id == -1: - result.append(CheckResult.new(field_table[i].construction_index, field_table[i].construction_index, i, CHECK_SUBJECT.FIELD_TYPE)) - else: - if class_table[field_table[i].type_class_id].type == Analysis.CLASS_TYPE.ENUM: - field_table[i].field_type = Analysis.FIELD_TYPE.ENUM - elif class_table[field_table[i].type_class_id].type == Analysis.CLASS_TYPE.MESSAGE: - field_table[i].field_type = Analysis.FIELD_TYPE.MESSAGE - elif class_table[field_table[i].type_class_id].type == Analysis.CLASS_TYPE.MAP: - field_table[i].field_type = Analysis.FIELD_TYPE.MAP - else: - result.append(CheckResult.new(field_table[i].construction_index, field_table[i].construction_index, i, CHECK_SUBJECT.FIELD_TYPE)) - return result - - func check_constructions() -> Array: - var cl : Array = check_class_names() - var fl : Array = check_field_names() - var ft : Array = determine_field_types() - return cl + fl + ft - - func check() -> bool: - var check_result : Array = check_constructions() - if check_result.size() == 0: - return true - else: - for v in check_result: - var main_tok : int = syntax.constructions[v.main_construction_index].begin_token_index - var assoc_tok : int = syntax.constructions[v.associated_construction_index].begin_token_index - var main_err_pos : Helper.StringPosition = Helper.str_pos(document.text, Helper.text_pos(tokens, main_tok)) - var assoc_err_pos : Helper.StringPosition = Helper.str_pos(document.text, Helper.text_pos(tokens, assoc_tok)) - var err_text : String - if v.subject == CHECK_SUBJECT.CLASS_NAME: - var class_type = "Undefined" - if class_table[v.table_index].type == Analysis.CLASS_TYPE.ENUM: - class_type = "Enum" - elif class_table[v.table_index].type == Analysis.CLASS_TYPE.MESSAGE: - class_type = "Message" - elif class_table[v.table_index].type == Analysis.CLASS_TYPE.MAP: - class_type = "Map" - err_text = class_type + " name '" + class_table[v.table_index].name + "' is already defined at:" + String(assoc_err_pos.str_num) + ":" + String(assoc_err_pos.column) - elif v.subject == CHECK_SUBJECT.FIELD_NAME: - err_text = "Field name '" + field_table[v.table_index].name + "' is already defined at:" + String(assoc_err_pos.str_num) + ":" + String(assoc_err_pos.column) - elif v.subject == CHECK_SUBJECT.FIELD_TAG_NUMBER: - err_text = "Tag number '" + field_table[v.table_index].tag + "' is already defined at:" + String(assoc_err_pos.str_num) + ":" + String(assoc_err_pos.column) - elif v.subject == CHECK_SUBJECT.FIELD_TYPE: - err_text = "Type '" + field_table[v.table_index].type_name + "' of the '" + field_table[v.table_index].name + "' field undefined" - else: - err_text = "Undefined error" - printerr(Helper.error_string(document.name, main_err_pos.str_num, main_err_pos.column, err_text)) - return false - -class Translator: - - var class_table : Array - var field_table : Array - var group_table : Array - var proto_version : int - - func _init(analyzer_result : AnalyzeResult): - class_table = analyzer_result.classes - field_table = analyzer_result.fields - group_table = analyzer_result.groups - proto_version = analyzer_result.version - - func tabulate(text : String, nesting : int) -> String: - var tab : String = "" - for i in range(nesting): - tab += "\t" - return tab + text - - func default_dict_text() -> String: - if proto_version == 2: - return "DEFAULT_VALUES_2" - elif proto_version == 3: - return "DEFAULT_VALUES_3" - return "TRANSLATION_ERROR" - - func generate_field_type(field : Analysis.ASTField) -> String: - var text : String = "PB_DATA_TYPE." - if field.field_type == Analysis.FIELD_TYPE.INT32: - return text + "INT32" - elif field.field_type == Analysis.FIELD_TYPE.SINT32: - return text + "SINT32" - elif field.field_type == Analysis.FIELD_TYPE.UINT32: - return text + "UINT32" - elif field.field_type == Analysis.FIELD_TYPE.INT64: - return text + "INT64" - elif field.field_type == Analysis.FIELD_TYPE.SINT64: - return text + "SINT64" - elif field.field_type == Analysis.FIELD_TYPE.UINT64: - return text + "UINT64" - elif field.field_type == Analysis.FIELD_TYPE.BOOL: - return text + "BOOL" - elif field.field_type == Analysis.FIELD_TYPE.ENUM: - return text + "ENUM" - elif field.field_type == Analysis.FIELD_TYPE.FIXED32: - return text + "FIXED32" - elif field.field_type == Analysis.FIELD_TYPE.SFIXED32: - return text + "SFIXED32" - elif field.field_type == Analysis.FIELD_TYPE.FLOAT: - return text + "FLOAT" - elif field.field_type == Analysis.FIELD_TYPE.FIXED64: - return text + "FIXED64" - elif field.field_type == Analysis.FIELD_TYPE.SFIXED64: - return text + "SFIXED64" - elif field.field_type == Analysis.FIELD_TYPE.DOUBLE: - return text + "DOUBLE" - elif field.field_type == Analysis.FIELD_TYPE.STRING: - return text + "STRING" - elif field.field_type == Analysis.FIELD_TYPE.BYTES: - return text + "BYTES" - elif field.field_type == Analysis.FIELD_TYPE.MESSAGE: - return text + "MESSAGE" - elif field.field_type == Analysis.FIELD_TYPE.MAP: - return text + "MAP" - return text - - func generate_field_rule(field : Analysis.ASTField) -> String: - var text : String = "PB_RULE." - if field.qualificator == Analysis.FIELD_QUALIFICATOR.OPTIONAL: - return text + "OPTIONAL" - elif field.qualificator == Analysis.FIELD_QUALIFICATOR.REQUIRED: - return text + "REQUIRED" - elif field.qualificator == Analysis.FIELD_QUALIFICATOR.REPEATED: - return text + "REPEATED" - elif field.qualificator == Analysis.FIELD_QUALIFICATOR.RESERVED: - return text + "RESERVED" - return text - - func generate_gdscript_simple_type(field : Analysis.ASTField) -> String: - if field.field_type == Analysis.FIELD_TYPE.INT32: - return "int" - elif field.field_type == Analysis.FIELD_TYPE.SINT32: - return "int" - elif field.field_type == Analysis.FIELD_TYPE.UINT32: - return "int" - elif field.field_type == Analysis.FIELD_TYPE.INT64: - return "int" - elif field.field_type == Analysis.FIELD_TYPE.SINT64: - return "int" - elif field.field_type == Analysis.FIELD_TYPE.UINT64: - return "int" - elif field.field_type == Analysis.FIELD_TYPE.BOOL: - return "bool" - elif field.field_type == Analysis.FIELD_TYPE.ENUM: - return "" - elif field.field_type == Analysis.FIELD_TYPE.FIXED32: - return "int" - elif field.field_type == Analysis.FIELD_TYPE.SFIXED32: - return "int" - elif field.field_type == Analysis.FIELD_TYPE.FLOAT: - return "float" - elif field.field_type == Analysis.FIELD_TYPE.FIXED64: - return "int" - elif field.field_type == Analysis.FIELD_TYPE.SFIXED64: - return "int" - elif field.field_type == Analysis.FIELD_TYPE.DOUBLE: - return "float" - elif field.field_type == Analysis.FIELD_TYPE.STRING: - return "String" - elif field.field_type == Analysis.FIELD_TYPE.BYTES: - return "PoolByteArray" - return "" - - func generate_field_constructor(field_index : int, nesting : int) -> String: - var text : String = "" - var f : Analysis.ASTField = field_table[field_index] - var field_name : String = "_" + f.name - var pbfield_text : String = field_name + " = PBField.new(" - pbfield_text += "\"" + f.name + "\", " - pbfield_text += generate_field_type(f) + ", " - pbfield_text += generate_field_rule(f) + ", " - pbfield_text += String(f.tag) + ", " - if f.option == Analysis.FIELD_OPTION.PACKED: - pbfield_text += "true" - elif f.option == Analysis.FIELD_OPTION.NOT_PACKED: - pbfield_text += "false" - if f.qualificator == Analysis.FIELD_QUALIFICATOR.REPEATED: - pbfield_text += ", []" - else: - pbfield_text += ", " + default_dict_text() + "[" + generate_field_type(f) + "]" - pbfield_text += ")\n" - text += tabulate(pbfield_text, nesting) - if f.is_map_field: - text += tabulate(field_name + ".is_map_field = true\n", nesting) - text += tabulate("service = PBServiceField.new()\n", nesting) - text += tabulate("service.field = " + field_name + "\n", nesting) - if f.field_type == Analysis.FIELD_TYPE.MESSAGE: - if f.qualificator == Analysis.FIELD_QUALIFICATOR.REPEATED: - text += tabulate("service.func_ref = funcref(self, \"add" + field_name + "\")\n", nesting) - else: - text += tabulate("service.func_ref = funcref(self, \"new" + field_name + "\")\n", nesting) - elif f.field_type == Analysis.FIELD_TYPE.MAP: - text += tabulate("service.func_ref = funcref(self, \"add_empty" + field_name + "\")\n", nesting) - text += tabulate("data[" + field_name + ".tag] = service\n", nesting) - - return text - - func generate_group_clear(field_index : int, nesting : int) -> String: - for g in group_table: - var text : String = "" - var find : bool = false - if g.parent_class_id == field_table[field_index].parent_class_id: - for i in g.field_indexes: - if field_index == i: - find = true - text += tabulate("data[" + field_table[i].tag + "].state = PB_SERVICE_STATE.FILLED\n", nesting) - else: - text += tabulate("_" + field_table[i].name + ".value = " + default_dict_text() + "[" + generate_field_type(field_table[i]) + "]\n", nesting) - text += tabulate("data[" + field_table[i].tag + "].state = PB_SERVICE_STATE.UNFILLED\n", nesting) - if find: - return text - return "" - - func generate_has_oneof(field_index : int, nesting : int) -> String: - for g in group_table: - var text : String = "" - if g.parent_class_id == field_table[field_index].parent_class_id: - for i in g.field_indexes: - if field_index == i: - text += tabulate("func has_" + field_table[i].name + "() -> bool:\n", nesting) - nesting += 1 - text += tabulate("return data[" + field_table[i].tag + "].state == PB_SERVICE_STATE.FILLED\n", nesting) - return text - return "" - - func generate_field(field_index : int, nesting : int) -> String: - var text : String = "" - var f : Analysis.ASTField = field_table[field_index] - text += tabulate("var _" + f.name + ": PBField\n", nesting) - if f.field_type == Analysis.FIELD_TYPE.MESSAGE: - var the_class_name : String = class_table[f.type_class_id].parent_name + "." + class_table[f.type_class_id].name - the_class_name = the_class_name.substr(1, the_class_name.length() - 1) - text += generate_has_oneof(field_index, nesting) - if f.qualificator == Analysis.FIELD_QUALIFICATOR.REPEATED: - text += tabulate("func get_" + f.name + "() -> Array:\n", nesting) - else: - text += tabulate("func get_" + f.name + "() -> " + the_class_name + ":\n", nesting) - nesting += 1 - text += tabulate("return _" + f.name + ".value\n", nesting) - nesting -= 1 - text += tabulate("func clear_" + f.name + "() -> void:\n", nesting) - nesting += 1 - text += tabulate("data[" + String(f.tag) + "].state = PB_SERVICE_STATE.UNFILLED\n", nesting) - if f.qualificator == Analysis.FIELD_QUALIFICATOR.REPEATED: - text += tabulate("_" + f.name + ".value = []\n", nesting) - nesting -= 1 - text += tabulate("func add_" + f.name + "() -> " + the_class_name + ":\n", nesting) - nesting += 1 - text += tabulate("var element = " + the_class_name + ".new()\n", nesting) - text += tabulate("_" + f.name + ".value.append(element)\n", nesting) - text += tabulate("return element\n", nesting) - else: - text += tabulate("_" + f.name + ".value = " + default_dict_text() + "[" + generate_field_type(f) + "]\n", nesting) - nesting -= 1 - text += tabulate("func new_" + f.name + "() -> " + the_class_name + ":\n", nesting) - nesting += 1 - text += generate_group_clear(field_index, nesting) - text += tabulate("_" + f.name + ".value = " + the_class_name + ".new()\n", nesting) - text += tabulate("return _" + f.name + ".value\n", nesting) - elif f.field_type == Analysis.FIELD_TYPE.MAP: - var the_class_name : String = class_table[f.type_class_id].parent_name + "." + class_table[f.type_class_id].name - the_class_name = the_class_name.substr(1, the_class_name.length() - 1) - text += generate_has_oneof(field_index, nesting) - text += tabulate("func get_raw_" + f.name + "():\n", nesting) - nesting += 1 - text += tabulate("return _" + f.name + ".value\n", nesting) - nesting -= 1 - text += tabulate("func get_" + f.name + "():\n", nesting) - nesting += 1 - text += tabulate("return PBPacker.construct_map(_" + f.name + ".value)\n", nesting) - nesting -= 1 - text += tabulate("func clear_" + f.name + "():\n", nesting) - nesting += 1 - text += tabulate("data[" + String(f.tag) + "].state = PB_SERVICE_STATE.UNFILLED\n", nesting) - text += tabulate("_" + f.name + ".value = " + default_dict_text() + "[" + generate_field_type(f) + "]\n", nesting) - nesting -= 1 - for i in range(field_table.size()): - if field_table[i].parent_class_id == f.type_class_id && field_table[i].name == "value": - var gd_type : String = generate_gdscript_simple_type(field_table[i]) - var return_type : String = "" - if gd_type != "": - return_type = " -> " + gd_type - elif field_table[i].field_type == Analysis.FIELD_TYPE.MESSAGE: - return_type = " -> " + the_class_name - text += tabulate("func add_empty_" + f.name + "()" + return_type + ":\n", nesting) - nesting += 1 - text += generate_group_clear(field_index, nesting) - text += tabulate("var element = " + the_class_name + ".new()\n", nesting) - text += tabulate("_" + f.name + ".value.append(element)\n", nesting) - text += tabulate("return element\n", nesting) - nesting -= 1 - if field_table[i].field_type == Analysis.FIELD_TYPE.MESSAGE: - text += tabulate("func add_" + f.name + "(a_key)" + return_type + ":\n", nesting) - nesting += 1 - text += generate_group_clear(field_index, nesting) - text += tabulate("var idx = -1\n", nesting) - text += tabulate("for i in range(_" + f.name + ".value.size()):\n", nesting) - nesting += 1 - text += tabulate("if _" + f.name + ".value[i].get_key() == a_key:\n", nesting) - nesting += 1 - text += tabulate("idx = i\n", nesting) - text += tabulate("break\n", nesting) - nesting -= 2 - text += tabulate("var element = " + the_class_name + ".new()\n", nesting) - text += tabulate("element.set_key(a_key)\n", nesting) - text += tabulate("if idx != -1:\n", nesting) - nesting += 1 - text += tabulate("_" + f.name + ".value[idx] = element\n", nesting) - nesting -= 1 - text += tabulate("else:\n", nesting) - nesting += 1 - text += tabulate("_" + f.name + ".value.append(element)\n", nesting) - nesting -= 1 - text += tabulate("return element.new_value()\n", nesting) - else: - text += tabulate("func add_" + f.name + "(a_key, a_value) -> void:\n", nesting) - nesting += 1 - text += generate_group_clear(field_index, nesting) - text += tabulate("var idx = -1\n", nesting) - text += tabulate("for i in range(_" + f.name + ".value.size()):\n", nesting) - nesting += 1 - text += tabulate("if _" + f.name + ".value[i].get_key() == a_key:\n", nesting) - nesting += 1 - text += tabulate("idx = i\n", nesting) - text += tabulate("break\n", nesting) - nesting -= 2 - text += tabulate("var element = " + the_class_name + ".new()\n", nesting) - text += tabulate("element.set_key(a_key)\n", nesting) - text += tabulate("element.set_value(a_value)\n", nesting) - text += tabulate("if idx != -1:\n", nesting) - nesting += 1 - text += tabulate("_" + f.name + ".value[idx] = element\n", nesting) - nesting -= 1 - text += tabulate("else:\n", nesting) - nesting += 1 - text += tabulate("_" + f.name + ".value.append(element)\n", nesting) - nesting -= 1 - break - else: - var gd_type : String = generate_gdscript_simple_type(f) - var return_type : String = "" - var argument_type : String = "" - if gd_type != "": - return_type = " -> " + gd_type - argument_type = " : " + gd_type - text += generate_has_oneof(field_index, nesting) - if f.qualificator == Analysis.FIELD_QUALIFICATOR.REPEATED: - text += tabulate("func get_" + f.name + "() -> Array:\n", nesting) - else: - text += tabulate("func get_" + f.name + "()" + return_type + ":\n", nesting) - nesting += 1 - text += tabulate("return _" + f.name + ".value\n", nesting) - nesting -= 1 - text += tabulate("func clear_" + f.name + "() -> void:\n", nesting) - nesting += 1 - text += tabulate("data[" + String(f.tag) + "].state = PB_SERVICE_STATE.UNFILLED\n", nesting) - if f.qualificator == Analysis.FIELD_QUALIFICATOR.REPEATED: - text += tabulate("_" + f.name + ".value = []\n", nesting) - nesting -= 1 - text += tabulate("func add_" + f.name + "(value" + argument_type + ") -> void:\n", nesting) - nesting += 1 - text += tabulate("_" + f.name + ".value.append(value)\n", nesting) - else: - text += tabulate("_" + f.name + ".value = " + default_dict_text() + "[" + generate_field_type(f) + "]\n", nesting) - nesting -= 1 - text += tabulate("func set_" + f.name + "(value" + argument_type + ") -> void:\n", nesting) - nesting += 1 - text += generate_group_clear(field_index, nesting) - text += tabulate("_" + f.name + ".value = value\n", nesting) - return text - - func generate_class(class_index : int, nesting : int) -> String: - var text : String = "" - if class_table[class_index].type == Analysis.CLASS_TYPE.MESSAGE || class_table[class_index].type == Analysis.CLASS_TYPE.MAP: - var cls_pref : String = "" - cls_pref += tabulate("class " + class_table[class_index].name + ":\n", nesting) - nesting += 1 - cls_pref += tabulate("func _init():\n", nesting) - text += cls_pref - nesting += 1 - text += tabulate("var service\n", nesting) - text += tabulate("\n", nesting) - var field_text : String = "" - for i in range(field_table.size()): - if field_table[i].parent_class_id == class_index: - text += generate_field_constructor(i, nesting) - text += tabulate("\n", nesting) - field_text += generate_field(i, nesting - 1) - field_text += tabulate("\n", nesting - 1) - nesting -= 1 - text += tabulate("var data = {}\n", nesting) - text += tabulate("\n", nesting) - text += field_text - for j in range(class_table.size()): - if class_table[j].parent_index == class_index: - var cl_text = generate_class(j, nesting) - text += cl_text - if class_table[j].type == Analysis.CLASS_TYPE.MESSAGE || class_table[j].type == Analysis.CLASS_TYPE.MAP: - text += generate_class_services(nesting + 1) - text += tabulate("\n", nesting + 1) - elif class_table[class_index].type == Analysis.CLASS_TYPE.ENUM: - text += tabulate("enum " + class_table[class_index].name + " {\n", nesting) - nesting += 1 - for en in range(class_table[class_index].values.size()): - var enum_val = class_table[class_index].values[en].name + " = " + class_table[class_index].values[en].value - if en == class_table[class_index].values.size() - 1: - text += tabulate(enum_val + "\n", nesting) - else: - text += tabulate(enum_val + ",\n", nesting) - nesting -= 1 - text += tabulate("}\n", nesting) - text += tabulate("\n", nesting) - - return text - - func generate_class_services(nesting : int) -> String: - var text : String = "" - text += tabulate("func to_string() -> String:\n", nesting) - nesting += 1 - text += tabulate("return PBPacker.message_to_string(data)\n", nesting) - text += tabulate("\n", nesting) - nesting -= 1 - text += tabulate("func to_bytes() -> PoolByteArray:\n", nesting) - nesting += 1 - text += tabulate("return PBPacker.pack_message(data)\n", nesting) - text += tabulate("\n", nesting) - nesting -= 1 - text += tabulate("func from_bytes(bytes : PoolByteArray, offset : int = 0, limit : int = -1) -> int:\n", nesting) - nesting += 1 - text += tabulate("var cur_limit = bytes.size()\n", nesting) - text += tabulate("if limit != -1:\n", nesting) - nesting += 1 - text += tabulate("cur_limit = limit\n", nesting) - nesting -= 1 - text += tabulate("var result = PBPacker.unpack_message(data, bytes, offset, cur_limit)\n", nesting) - text += tabulate("if result == cur_limit:\n", nesting) - nesting += 1 - text += tabulate("if PBPacker.check_required(data):\n", nesting) - nesting += 1 - text += tabulate("if limit == -1:\n", nesting) - nesting += 1 - text += tabulate("return PB_ERR.NO_ERRORS\n", nesting) - nesting -= 2 - text += tabulate("else:\n", nesting) - nesting += 1 - text += tabulate("return PB_ERR.REQUIRED_FIELDS\n", nesting) - nesting -= 2 - text += tabulate("elif limit == -1 && result > 0:\n", nesting) - nesting += 1 - text += tabulate("return PB_ERR.PARSE_INCOMPLETE\n", nesting) - nesting -= 1 - text += tabulate("return result\n", nesting) - return text - - func translate(file_name : String, core_file_name : String) -> bool: - var file : File = File.new() - if file.open(file_name, File.WRITE) < 0: - printerr("File: '", file_name, "' save error.") - return false - var core_file : File = File.new() - if !core_file.file_exists(core_file_name): - printerr("File: '", core_file_name, "' not found.") - return false - if core_file.open(core_file_name, File.READ) < 0: - printerr("File: '", core_file_name, "' read error.") - return false - var core_text : String = core_file.get_as_text() - core_file.close() - var text : String = "" - var nesting : int = 0 - text += "const PROTO_VERSION = " + String(proto_version) + "\n\n" - text += core_text + "\n\n\n" - text += "############### USER DATA BEGIN ################\n" - var cls_user : String = "" - for i in range(class_table.size()): - if class_table[i].parent_index == -1: - var cls_text = generate_class(i, nesting) - cls_user += cls_text - if class_table[i].type == Analysis.CLASS_TYPE.MESSAGE: - nesting += 1 - cls_user += generate_class_services(nesting) - cls_user += tabulate("\n", nesting) - nesting -= 1 - text += "\n\n" - text += cls_user - text += "################ USER DATA END #################\n" - file.store_string(text) - file.close() - if !file.file_exists(file_name): - printerr("File: '", file_name, "' save error.") - return false - return true - - -class ImportFile: - func _init(sha : String, a_path : String, a_parent : int): - sha256 = sha - path = a_path - parent_index = a_parent - - var sha256 : String - var path : String - var parent_index : int - -func parse_all(analyzes : Dictionary, imports : Array, path : String, full_name : String, parent_index : int) -> bool: - var file : File = File.new() - if !file.file_exists(full_name): - printerr(full_name, ": not found.") - return false - if file.open(full_name, File.READ) < 0: - printerr(full_name, ": read error.") - return false - var doc : Document = Document.new(full_name, file.get_as_text()) - var sha : String = file.get_sha256(full_name) - file.close() - if !analyzes.has(sha): - print(full_name, ": parsing.") - var analysis : Analysis = Analysis.new(path, doc) - var an_result : AnalyzeResult = analysis.analyze() - if an_result.state: - analyzes[sha] = an_result - var parent : int = imports.size() - imports.append(ImportFile.new(sha, doc.name, parent_index)) - for im in an_result.imports: - if !parse_all(analyzes, imports, path, im.path, parent): - return false - else: - printerr(doc.name + ": parsing error.") - return false - else: - print(full_name, ": retrieving data from cache.") - imports.append(ImportFile.new(sha, doc.name, parent_index)) - return true - -func union_analyses(a1 : AnalyzeResult, a2 : AnalyzeResult, only_classes : bool = true) -> void: - var class_offset : int = a1.classes.size() - var field_offset = a1.fields.size() - for cl in a2.classes: - var cur_class : Analysis.ASTClass = cl.copy() - if cur_class.parent_index != -1: - cur_class.parent_index += class_offset - a1.classes.append(cur_class) - if only_classes: - return - for fl in a2.fields: - var cur_field : Analysis.ASTField = fl.copy() - cur_field.parent_class_id += class_offset - cur_field.type_class_id = -1 - a1.fields.append(cur_field) - for gr in a2.groups: - var cur_group : Analysis.ASTFieldGroup = gr.copy() - cur_group.parent_class_id += class_offset - var indexes : Array = [] - for i in cur_group.field_indexes: - indexes.append(i + field_offset) - cur_group.field_indexes = indexes - a1.groups.append(cur_group) - -func union_imports(analyzes : Dictionary, key : String, result : AnalyzeResult, keys : Array, nesting : int, use_public : bool = true, only_classes : bool = true) -> void: - nesting += 1 - for im in analyzes[key].imports: - var find : bool = false - for k in keys: - if im.sha256 == k: - find = true - break - if find: - continue - if (!use_public) || (use_public && ((im.public && nesting > 1) || nesting < 2)): - keys.append(im.sha256) - union_analyses(result, analyzes[im.sha256], only_classes) - union_imports(analyzes, im.sha256, result, keys, nesting, use_public, only_classes) - -func semantic_all(analyzes : Dictionary, imports : Array)-> bool: - for k in analyzes.keys(): - print(analyzes[k].doc.name, ": analysis.") - var keys : Array = [] - var analyze : AnalyzeResult = analyzes[k].soft_copy() - keys.append(k) - analyze.classes = [] - for cl in analyzes[k].classes: - analyze.classes.append(cl.copy()) - union_imports(analyzes, k, analyze, keys, 0) - var semantic : Semantic = Semantic.new(analyze) - if !semantic.check(): - printerr(analyzes[k].doc.name, ": analysis error.") - return false - return true - -func translate_all(analyzes : Dictionary, file_name : String, core_file_name : String) -> bool: - var first_key : String = analyzes.keys()[0] - var analyze : AnalyzeResult = analyzes[first_key] - var keys : Array = [] - keys.append(first_key) - union_imports(analyzes, first_key, analyze, keys, 0, false, false) - print("Perform full semantic analysis.") - var semantic : Semantic = Semantic.new(analyze) - if !semantic.check(): - return false - print("Perform translation.") - var translator : Translator = Translator.new(analyze) - if !translator.translate(file_name, core_file_name): - return false - var first : bool = true - return true - -func work(path : String, in_file : String, out_file : String, core_file : String) -> bool: - var in_full_name : String = path + in_file - var imports : Array = [] - var analyzes : Dictionary = {} - - print("Compile source: '", in_full_name, "', output: '", out_file, "'.") - print("\n1. Parsing:") - if parse_all(analyzes, imports, path, in_full_name, -1): - print("* Parsing completed successfully. *") - else: - return false - print("\n2. Semantic analysis:") - if semantic_all(analyzes, imports): - print("* Semantic analysis completed successfully. *") - else: - return false - print("\n3. Output file creating:") - if translate_all(analyzes, out_file, core_file): - print("* Output file was created successfully. *") - else: - return false - return true - -func _ready(): - var path : String = "res://" - var in_file : String = "A.proto" - var out_file : String = "res://out.gd" - var core_file : String = "res://protobuf_core.gd" - work(path, in_file, out_file, core_file) diff --git a/addons/protobuf/plugin.cfg b/addons/protobuf/plugin.cfg deleted file mode 100644 index 44895ef1..00000000 --- a/addons/protobuf/plugin.cfg +++ /dev/null @@ -1,7 +0,0 @@ -[plugin] - -name="Godobuf" -description="Google Protobuf implementation for Godot/GDScript" -author="oniksan" -version="0.5.0 for Godot 3.4" -script="protobuf_ui.gd" diff --git a/addons/protobuf/protobuf_cmdln.gd b/addons/protobuf/protobuf_cmdln.gd deleted file mode 100644 index 3d66a625..00000000 --- a/addons/protobuf/protobuf_cmdln.gd +++ /dev/null @@ -1,67 +0,0 @@ -# -# BSD 3-Clause License -# -# Copyright (c) 2018, Oleg Malyavkin -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# * Redistributions of source code must retain the above copyright notice, this -# list of conditions and the following disclaimer. -# -# * Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# * Neither the name of the copyright holder nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -extends SceneTree - -var Parser = preload("res://addons/protobuf/parser.gd") -var Util = preload("res://addons/protobuf/protobuf_util.gd") - -func error(msg : String): - push_error(msg) - OS.exit_code = 1 - quit() - -func _init(): - var arguments = {} - for argument in OS.get_cmdline_args(): - if argument.find("=") > -1: - var key_value = argument.split("=") - arguments[key_value[0].lstrip("--")] = key_value[1] - - if !arguments.has("input") || !arguments.has("output"): - error("Expected 2 Parameters: input and output") - - var input_file_name = arguments["input"] - var output_file_name = arguments["output"] - - var file = File.new() - if file.open(input_file_name, File.READ) < 0: - error("File: '" + input_file_name + "' not found.") - - var parser = Parser.new() - - if parser.work(Util.extract_dir(input_file_name), Util.extract_filename(input_file_name), \ - output_file_name, "res://addons/protobuf/protobuf_core.gd"): - print("Compiled '", input_file_name, "' to '", output_file_name, "'.") - else: - error("Compilation failed.") - - quit() diff --git a/addons/protobuf/protobuf_core.gd b/addons/protobuf/protobuf_core.gd deleted file mode 100644 index c038938c..00000000 --- a/addons/protobuf/protobuf_core.gd +++ /dev/null @@ -1,654 +0,0 @@ -# -# BSD 3-Clause License -# -# Copyright (c) 2018 - 2022, Oleg Malyavkin -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# * Redistributions of source code must retain the above copyright notice, this -# list of conditions and the following disclaimer. -# -# * Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# * Neither the name of the copyright holder nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# DEBUG_TAB redefine this " " if you need, example: const DEBUG_TAB = "\t" -const DEBUG_TAB : String = " " - -enum PB_ERR { - NO_ERRORS = 0, - VARINT_NOT_FOUND = -1, - REPEATED_COUNT_NOT_FOUND = -2, - REPEATED_COUNT_MISMATCH = -3, - LENGTHDEL_SIZE_NOT_FOUND = -4, - LENGTHDEL_SIZE_MISMATCH = -5, - PACKAGE_SIZE_MISMATCH = -6, - UNDEFINED_STATE = -7, - PARSE_INCOMPLETE = -8, - REQUIRED_FIELDS = -9 -} - -enum PB_DATA_TYPE { - INT32 = 0, - SINT32 = 1, - UINT32 = 2, - INT64 = 3, - SINT64 = 4, - UINT64 = 5, - BOOL = 6, - ENUM = 7, - FIXED32 = 8, - SFIXED32 = 9, - FLOAT = 10, - FIXED64 = 11, - SFIXED64 = 12, - DOUBLE = 13, - STRING = 14, - BYTES = 15, - MESSAGE = 16, - MAP = 17 -} - -const DEFAULT_VALUES_2 = { - PB_DATA_TYPE.INT32: null, - PB_DATA_TYPE.SINT32: null, - PB_DATA_TYPE.UINT32: null, - PB_DATA_TYPE.INT64: null, - PB_DATA_TYPE.SINT64: null, - PB_DATA_TYPE.UINT64: null, - PB_DATA_TYPE.BOOL: null, - PB_DATA_TYPE.ENUM: null, - PB_DATA_TYPE.FIXED32: null, - PB_DATA_TYPE.SFIXED32: null, - PB_DATA_TYPE.FLOAT: null, - PB_DATA_TYPE.FIXED64: null, - PB_DATA_TYPE.SFIXED64: null, - PB_DATA_TYPE.DOUBLE: null, - PB_DATA_TYPE.STRING: null, - PB_DATA_TYPE.BYTES: null, - PB_DATA_TYPE.MESSAGE: null, - PB_DATA_TYPE.MAP: null -} - -const DEFAULT_VALUES_3 = { - PB_DATA_TYPE.INT32: 0, - PB_DATA_TYPE.SINT32: 0, - PB_DATA_TYPE.UINT32: 0, - PB_DATA_TYPE.INT64: 0, - PB_DATA_TYPE.SINT64: 0, - PB_DATA_TYPE.UINT64: 0, - PB_DATA_TYPE.BOOL: false, - PB_DATA_TYPE.ENUM: 0, - PB_DATA_TYPE.FIXED32: 0, - PB_DATA_TYPE.SFIXED32: 0, - PB_DATA_TYPE.FLOAT: 0.0, - PB_DATA_TYPE.FIXED64: 0, - PB_DATA_TYPE.SFIXED64: 0, - PB_DATA_TYPE.DOUBLE: 0.0, - PB_DATA_TYPE.STRING: "", - PB_DATA_TYPE.BYTES: [], - PB_DATA_TYPE.MESSAGE: null, - PB_DATA_TYPE.MAP: [] -} - -enum PB_TYPE { - VARINT = 0, - FIX64 = 1, - LENGTHDEL = 2, - STARTGROUP = 3, - ENDGROUP = 4, - FIX32 = 5, - UNDEFINED = 8 -} - -enum PB_RULE { - OPTIONAL = 0, - REQUIRED = 1, - REPEATED = 2, - RESERVED = 3 -} - -enum PB_SERVICE_STATE { - FILLED = 0, - UNFILLED = 1 -} - -class PBField: - func _init(a_name : String, a_type : int, a_rule : int, a_tag : int, packed : bool, a_value = null): - name = a_name - type = a_type - rule = a_rule - tag = a_tag - option_packed = packed - value = a_value - - var name : String - var type : int - var rule : int - var tag : int - var option_packed : bool - var value - var is_map_field : bool = false - var option_default : bool = false - -class PBTypeTag: - var ok : bool = false - var type : int - var tag : int - var offset : int - -class PBServiceField: - var field : PBField - var func_ref = null - var state : int = PB_SERVICE_STATE.UNFILLED - -class PBPacker: - static func convert_signed(n : int) -> int: - if n < -2147483648: - return (n << 1) ^ (n >> 63) - else: - return (n << 1) ^ (n >> 31) - - static func deconvert_signed(n : int) -> int: - if n & 0x01: - return ~(n >> 1) - else: - return (n >> 1) - - static func pack_varint(value) -> PoolByteArray: - var varint : PoolByteArray = PoolByteArray() - if typeof(value) == TYPE_BOOL: - if value: - value = 1 - else: - value = 0 - for _i in range(9): - var b = value & 0x7F - value >>= 7 - if value: - varint.append(b | 0x80) - else: - varint.append(b) - break - if varint.size() == 9 && varint[8] == 0xFF: - varint.append(0x01) - return varint - - static func pack_bytes(value, count : int, data_type : int) -> PoolByteArray: - var bytes : PoolByteArray = PoolByteArray() - if data_type == PB_DATA_TYPE.FLOAT: - var spb : StreamPeerBuffer = StreamPeerBuffer.new() - spb.put_float(value) - bytes = spb.get_data_array() - elif data_type == PB_DATA_TYPE.DOUBLE: - var spb : StreamPeerBuffer = StreamPeerBuffer.new() - spb.put_double(value) - bytes = spb.get_data_array() - else: - for _i in range(count): - bytes.append(value & 0xFF) - value >>= 8 - return bytes - - static func unpack_bytes(bytes : PoolByteArray, index : int, count : int, data_type : int): - var value = 0 - if data_type == PB_DATA_TYPE.FLOAT: - var spb : StreamPeerBuffer = StreamPeerBuffer.new() - for i in range(index, count + index): - spb.put_u8(bytes[i]) - spb.seek(0) - value = spb.get_float() - elif data_type == PB_DATA_TYPE.DOUBLE: - var spb : StreamPeerBuffer = StreamPeerBuffer.new() - for i in range(index, count + index): - spb.put_u8(bytes[i]) - spb.seek(0) - value = spb.get_double() - else: - for i in range(index + count - 1, index - 1, -1): - value |= (bytes[i] & 0xFF) - if i != index: - value <<= 8 - return value - - static func unpack_varint(varint_bytes) -> int: - var value : int = 0 - for i in range(varint_bytes.size() - 1, -1, -1): - value |= varint_bytes[i] & 0x7F - if i != 0: - value <<= 7 - return value - - static func pack_type_tag(type : int, tag : int) -> PoolByteArray: - return pack_varint((tag << 3) | type) - - static func isolate_varint(bytes : PoolByteArray, index : int) -> PoolByteArray: - var result : PoolByteArray = PoolByteArray() - for i in range(index, bytes.size()): - result.append(bytes[i]) - if !(bytes[i] & 0x80): - break - return result - - static func unpack_type_tag(bytes : PoolByteArray, index : int) -> PBTypeTag: - var varint_bytes : PoolByteArray = isolate_varint(bytes, index) - var result : PBTypeTag = PBTypeTag.new() - if varint_bytes.size() != 0: - result.ok = true - result.offset = varint_bytes.size() - var unpacked : int = unpack_varint(varint_bytes) - result.type = unpacked & 0x07 - result.tag = unpacked >> 3 - return result - - static func pack_length_delimeted(type : int, tag : int, bytes : PoolByteArray) -> PoolByteArray: - var result : PoolByteArray = pack_type_tag(type, tag) - result.append_array(pack_varint(bytes.size())) - result.append_array(bytes) - return result - - static func pb_type_from_data_type(data_type : int) -> int: - if data_type == PB_DATA_TYPE.INT32 || data_type == PB_DATA_TYPE.SINT32 || data_type == PB_DATA_TYPE.UINT32 || data_type == PB_DATA_TYPE.INT64 || data_type == PB_DATA_TYPE.SINT64 || data_type == PB_DATA_TYPE.UINT64 || data_type == PB_DATA_TYPE.BOOL || data_type == PB_DATA_TYPE.ENUM: - return PB_TYPE.VARINT - elif data_type == PB_DATA_TYPE.FIXED32 || data_type == PB_DATA_TYPE.SFIXED32 || data_type == PB_DATA_TYPE.FLOAT: - return PB_TYPE.FIX32 - elif data_type == PB_DATA_TYPE.FIXED64 || data_type == PB_DATA_TYPE.SFIXED64 || data_type == PB_DATA_TYPE.DOUBLE: - return PB_TYPE.FIX64 - elif data_type == PB_DATA_TYPE.STRING || data_type == PB_DATA_TYPE.BYTES || data_type == PB_DATA_TYPE.MESSAGE || data_type == PB_DATA_TYPE.MAP: - return PB_TYPE.LENGTHDEL - else: - return PB_TYPE.UNDEFINED - - static func pack_field(field : PBField) -> PoolByteArray: - var type : int = pb_type_from_data_type(field.type) - var type_copy : int = type - if field.rule == PB_RULE.REPEATED && field.option_packed: - type = PB_TYPE.LENGTHDEL - var head : PoolByteArray = pack_type_tag(type, field.tag) - var data : PoolByteArray = PoolByteArray() - if type == PB_TYPE.VARINT: - var value - if field.rule == PB_RULE.REPEATED: - for v in field.value: - data.append_array(head) - if field.type == PB_DATA_TYPE.SINT32 || field.type == PB_DATA_TYPE.SINT64: - value = convert_signed(v) - else: - value = v - data.append_array(pack_varint(value)) - return data - else: - if field.type == PB_DATA_TYPE.SINT32 || field.type == PB_DATA_TYPE.SINT64: - value = convert_signed(field.value) - else: - value = field.value - data = pack_varint(value) - elif type == PB_TYPE.FIX32: - if field.rule == PB_RULE.REPEATED: - for v in field.value: - data.append_array(head) - data.append_array(pack_bytes(v, 4, field.type)) - return data - else: - data.append_array(pack_bytes(field.value, 4, field.type)) - elif type == PB_TYPE.FIX64: - if field.rule == PB_RULE.REPEATED: - for v in field.value: - data.append_array(head) - data.append_array(pack_bytes(v, 8, field.type)) - return data - else: - data.append_array(pack_bytes(field.value, 8, field.type)) - elif type == PB_TYPE.LENGTHDEL: - if field.rule == PB_RULE.REPEATED: - if type_copy == PB_TYPE.VARINT: - if field.type == PB_DATA_TYPE.SINT32 || field.type == PB_DATA_TYPE.SINT64: - var signed_value : int - for v in field.value: - signed_value = convert_signed(v) - data.append_array(pack_varint(signed_value)) - else: - for v in field.value: - data.append_array(pack_varint(v)) - return pack_length_delimeted(type, field.tag, data) - elif type_copy == PB_TYPE.FIX32: - for v in field.value: - data.append_array(pack_bytes(v, 4, field.type)) - return pack_length_delimeted(type, field.tag, data) - elif type_copy == PB_TYPE.FIX64: - for v in field.value: - data.append_array(pack_bytes(v, 8, field.type)) - return pack_length_delimeted(type, field.tag, data) - elif field.type == PB_DATA_TYPE.STRING: - for v in field.value: - var obj = v.to_utf8() - data.append_array(pack_length_delimeted(type, field.tag, obj)) - return data - elif field.type == PB_DATA_TYPE.BYTES: - for v in field.value: - data.append_array(pack_length_delimeted(type, field.tag, v)) - return data - elif typeof(field.value[0]) == TYPE_OBJECT: - for v in field.value: - var obj : PoolByteArray = v.to_bytes() - data.append_array(pack_length_delimeted(type, field.tag, obj)) - return data - else: - if field.type == PB_DATA_TYPE.STRING: - var str_bytes : PoolByteArray = field.value.to_utf8() - if PROTO_VERSION == 2 || (PROTO_VERSION == 3 && str_bytes.size() > 0): - data.append_array(str_bytes) - return pack_length_delimeted(type, field.tag, data) - if field.type == PB_DATA_TYPE.BYTES: - if PROTO_VERSION == 2 || (PROTO_VERSION == 3 && field.value.size() > 0): - data.append_array(field.value) - return pack_length_delimeted(type, field.tag, data) - elif typeof(field.value) == TYPE_OBJECT: - var obj : PoolByteArray = field.value.to_bytes() - if obj.size() > 0: - data.append_array(obj) - return pack_length_delimeted(type, field.tag, data) - else: - pass - if data.size() > 0: - head.append_array(data) - return head - else: - return data - - static func unpack_field(bytes : PoolByteArray, offset : int, field : PBField, type : int, message_func_ref) -> int: - if field.rule == PB_RULE.REPEATED && type != PB_TYPE.LENGTHDEL && field.option_packed: - var count = isolate_varint(bytes, offset) - if count.size() > 0: - offset += count.size() - count = unpack_varint(count) - if type == PB_TYPE.VARINT: - var val - var counter = offset + count - while offset < counter: - val = isolate_varint(bytes, offset) - if val.size() > 0: - offset += val.size() - val = unpack_varint(val) - if field.type == PB_DATA_TYPE.SINT32 || field.type == PB_DATA_TYPE.SINT64: - val = deconvert_signed(val) - elif field.type == PB_DATA_TYPE.BOOL: - if val: - val = true - else: - val = false - field.value.append(val) - else: - return PB_ERR.REPEATED_COUNT_MISMATCH - return offset - elif type == PB_TYPE.FIX32 || type == PB_TYPE.FIX64: - var type_size - if type == PB_TYPE.FIX32: - type_size = 4 - else: - type_size = 8 - var val - var counter = offset + count - while offset < counter: - if (offset + type_size) > bytes.size(): - return PB_ERR.REPEATED_COUNT_MISMATCH - val = unpack_bytes(bytes, offset, type_size, field.type) - offset += type_size - field.value.append(val) - return offset - else: - return PB_ERR.REPEATED_COUNT_NOT_FOUND - else: - if type == PB_TYPE.VARINT: - var val = isolate_varint(bytes, offset) - if val.size() > 0: - offset += val.size() - val = unpack_varint(val) - if field.type == PB_DATA_TYPE.SINT32 || field.type == PB_DATA_TYPE.SINT64: - val = deconvert_signed(val) - elif field.type == PB_DATA_TYPE.BOOL: - if val: - val = true - else: - val = false - if field.rule == PB_RULE.REPEATED: - field.value.append(val) - else: - field.value = val - else: - return PB_ERR.VARINT_NOT_FOUND - return offset - elif type == PB_TYPE.FIX32 || type == PB_TYPE.FIX64: - var type_size - if type == PB_TYPE.FIX32: - type_size = 4 - else: - type_size = 8 - var val - if (offset + type_size) > bytes.size(): - return PB_ERR.REPEATED_COUNT_MISMATCH - val = unpack_bytes(bytes, offset, type_size, field.type) - offset += type_size - if field.rule == PB_RULE.REPEATED: - field.value.append(val) - else: - field.value = val - return offset - elif type == PB_TYPE.LENGTHDEL: - var inner_size = isolate_varint(bytes, offset) - if inner_size.size() > 0: - offset += inner_size.size() - inner_size = unpack_varint(inner_size) - if inner_size >= 0: - if inner_size + offset > bytes.size(): - return PB_ERR.LENGTHDEL_SIZE_MISMATCH - if message_func_ref != null: - var message = message_func_ref.call_func() - if inner_size > 0: - var sub_offset = message.from_bytes(bytes, offset, inner_size + offset) - if sub_offset > 0: - if sub_offset - offset >= inner_size: - offset = sub_offset - return offset - else: - return PB_ERR.LENGTHDEL_SIZE_MISMATCH - return sub_offset - else: - return offset - elif field.type == PB_DATA_TYPE.STRING: - var str_bytes : PoolByteArray = PoolByteArray() - for i in range(offset, inner_size + offset): - str_bytes.append(bytes[i]) - if field.rule == PB_RULE.REPEATED: - field.value.append(str_bytes.get_string_from_utf8()) - else: - field.value = str_bytes.get_string_from_utf8() - return offset + inner_size - elif field.type == PB_DATA_TYPE.BYTES: - var val_bytes : PoolByteArray = PoolByteArray() - for i in range(offset, inner_size + offset): - val_bytes.append(bytes[i]) - if field.rule == PB_RULE.REPEATED: - field.value.append(val_bytes) - else: - field.value = val_bytes - return offset + inner_size - else: - return PB_ERR.LENGTHDEL_SIZE_NOT_FOUND - else: - return PB_ERR.LENGTHDEL_SIZE_NOT_FOUND - return PB_ERR.UNDEFINED_STATE - - static func unpack_message(data, bytes : PoolByteArray, offset : int, limit : int) -> int: - while true: - var tt : PBTypeTag = unpack_type_tag(bytes, offset) - if tt.ok: - offset += tt.offset - if data.has(tt.tag): - var service : PBServiceField = data[tt.tag] - var type : int = pb_type_from_data_type(service.field.type) - if type == tt.type || (tt.type == PB_TYPE.LENGTHDEL && service.field.rule == PB_RULE.REPEATED && service.field.option_packed): - var res : int = unpack_field(bytes, offset, service.field, type, service.func_ref) - if res > 0: - service.state = PB_SERVICE_STATE.FILLED - offset = res - if offset == limit: - return offset - elif offset > limit: - return PB_ERR.PACKAGE_SIZE_MISMATCH - elif res < 0: - return res - else: - break - else: - return offset - return PB_ERR.UNDEFINED_STATE - - static func pack_message(data) -> PoolByteArray: - var DEFAULT_VALUES - if PROTO_VERSION == 2: - DEFAULT_VALUES = DEFAULT_VALUES_2 - elif PROTO_VERSION == 3: - DEFAULT_VALUES = DEFAULT_VALUES_3 - var result : PoolByteArray = PoolByteArray() - var keys : Array = data.keys() - keys.sort() - for i in keys: - if data[i].field.value != null: - if data[i].state == PB_SERVICE_STATE.UNFILLED \ - && !data[i].field.is_map_field \ - && typeof(data[i].field.value) == typeof(DEFAULT_VALUES[data[i].field.type]) \ - && data[i].field.value == DEFAULT_VALUES[data[i].field.type]: - continue - elif data[i].field.rule == PB_RULE.REPEATED && data[i].field.value.size() == 0: - continue - result.append_array(pack_field(data[i].field)) - elif data[i].field.rule == PB_RULE.REQUIRED: - print("Error: required field is not filled: Tag:", data[i].field.tag) - return PoolByteArray() - return result - - static func check_required(data) -> bool: - var keys : Array = data.keys() - for i in keys: - if data[i].field.rule == PB_RULE.REQUIRED && data[i].state == PB_SERVICE_STATE.UNFILLED: - return false - return true - - static func construct_map(key_values): - var result = {} - for kv in key_values: - result[kv.get_key()] = kv.get_value() - return result - - static func tabulate(text : String, nesting : int) -> String: - var tab : String = "" - for _i in range(nesting): - tab += DEBUG_TAB - return tab + text - - static func value_to_string(value, field : PBField, nesting : int) -> String: - var result : String = "" - var text : String - if field.type == PB_DATA_TYPE.MESSAGE: - result += "{" - nesting += 1 - text = message_to_string(value.data, nesting) - if text != "": - result += "\n" + text - nesting -= 1 - result += tabulate("}", nesting) - else: - nesting -= 1 - result += "}" - elif field.type == PB_DATA_TYPE.BYTES: - result += "<" - for i in range(value.size()): - result += String(value[i]) - if i != (value.size() - 1): - result += ", " - result += ">" - elif field.type == PB_DATA_TYPE.STRING: - result += "\"" + value + "\"" - elif field.type == PB_DATA_TYPE.ENUM: - result += "ENUM::" + String(value) - else: - result += String(value) - return result - - static func field_to_string(field : PBField, nesting : int) -> String: - var result : String = tabulate(field.name + ": ", nesting) - if field.type == PB_DATA_TYPE.MAP: - if field.value.size() > 0: - result += "(\n" - nesting += 1 - for i in range(field.value.size()): - var local_key_value = field.value[i].data[1].field - result += tabulate(value_to_string(local_key_value.value, local_key_value, nesting), nesting) + ": " - local_key_value = field.value[i].data[2].field - result += value_to_string(local_key_value.value, local_key_value, nesting) - if i != (field.value.size() - 1): - result += "," - result += "\n" - nesting -= 1 - result += tabulate(")", nesting) - else: - result += "()" - elif field.rule == PB_RULE.REPEATED: - if field.value.size() > 0: - result += "[\n" - nesting += 1 - for i in range(field.value.size()): - result += tabulate(String(i) + ": ", nesting) - result += value_to_string(field.value[i], field, nesting) - if i != (field.value.size() - 1): - result += "," - result += "\n" - nesting -= 1 - result += tabulate("]", nesting) - else: - result += "[]" - else: - result += value_to_string(field.value, field, nesting) - result += ";\n" - return result - - static func message_to_string(data, nesting : int = 0) -> String: - var DEFAULT_VALUES - if PROTO_VERSION == 2: - DEFAULT_VALUES = DEFAULT_VALUES_2 - elif PROTO_VERSION == 3: - DEFAULT_VALUES = DEFAULT_VALUES_3 - var result : String = "" - var keys : Array = data.keys() - keys.sort() - for i in keys: - if data[i].field.value != null: - if data[i].state == PB_SERVICE_STATE.UNFILLED \ - && !data[i].field.is_map_field \ - && typeof(data[i].field.value) == typeof(DEFAULT_VALUES[data[i].field.type]) \ - && data[i].field.value == DEFAULT_VALUES[data[i].field.type]: - continue - elif data[i].field.rule == PB_RULE.REPEATED && data[i].field.value.size() == 0: - continue - result += field_to_string(data[i].field, nesting) - elif data[i].field.rule == PB_RULE.REQUIRED: - result += data[i].field.name + ": " + "error" - return result diff --git a/addons/protobuf/protobuf_ui.gd b/addons/protobuf/protobuf_ui.gd deleted file mode 100644 index f241ec61..00000000 --- a/addons/protobuf/protobuf_ui.gd +++ /dev/null @@ -1,50 +0,0 @@ -# -# BSD 3-Clause License -# -# Copyright (c) 2018, Oleg Malyavkin -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# * Redistributions of source code must retain the above copyright notice, this -# list of conditions and the following disclaimer. -# -# * Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# * Neither the name of the copyright holder nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -tool -extends EditorPlugin - -var dock - -func _enter_tree(): - # Initialization of the plugin goes here - # First load the dock scene and instance it: - dock = preload("res://addons/protobuf/protobuf_ui_dock.tscn").instance() - - # Add the loaded scene to the docks: - add_control_to_dock(DOCK_SLOT_LEFT_BR, dock) - # Note that LEFT_UL means the left of the editor, upper-left dock - -func _exit_tree(): - # Clean-up of the plugin goes here - # Remove the scene from the docks: - remove_control_from_docks( dock ) # Remove the dock - dock.free() # Erase the control from the memory diff --git a/addons/protobuf/protobuf_ui_dock.gd b/addons/protobuf/protobuf_ui_dock.gd deleted file mode 100644 index 7ba2b4fd..00000000 --- a/addons/protobuf/protobuf_ui_dock.gd +++ /dev/null @@ -1,131 +0,0 @@ -# -# BSD 3-Clause License -# -# Copyright (c) 2018 - 2022, Oleg Malyavkin -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# * Redistributions of source code must retain the above copyright notice, this -# list of conditions and the following disclaimer. -# -# * Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# * Neither the name of the copyright holder nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -tool -extends VBoxContainer - -var Parser = preload("res://addons/protobuf/parser.gd") -var Util = preload("res://addons/protobuf/protobuf_util.gd") - -var input_file_name = null -var output_file_name = null - -func _ready(): - var screen_size = OS.get_screen_size() - pass - -func _on_InputFileButton_pressed(): - show_dialog($InputFileDialog) - $InputFileDialog.invalidate() - -func _on_OutputFileButton_pressed(): - show_dialog($OutputFileDialog) - $OutputFileDialog.invalidate() - -func _on_InputFileDialog_file_selected(path): - input_file_name = path - $HBoxContainer/InputFileEdit.text = path - -func _on_OutputFileDialog_file_selected(path): - output_file_name = path - $HBoxContainer2/OutputFileEdit.text = path - -func show_dialog(dialog): - var posX - var posY - if get_viewport().size.x <= dialog.get_rect().size.x: - posX = 0 - else: - posX = (get_viewport().size.x - dialog.get_rect().size.x) / 2 - if get_viewport().size.y <= dialog.get_rect().size.y: - posY = 0 - else: - posY = (get_viewport().size.y - dialog.get_rect().size.y) / 2 - dialog.set_position(Vector2(posX, posY)) - dialog.show_modal(true) - -func _on_CompileButton_pressed(): - if input_file_name == null || output_file_name == null: - show_dialog($FilesErrorAcceptDialog) - return - - var file = File.new() - if file.open(input_file_name, File.READ) < 0: - print("File: '", input_file_name, "' not found.") - show_dialog($FailAcceptDialog) - return - - var parser = Parser.new() - - if parser.work(Util.extract_dir(input_file_name), Util.extract_filename(input_file_name), \ - output_file_name, "res://addons/protobuf/protobuf_core.gd"): - show_dialog($SuccessAcceptDialog) - else: - show_dialog($FailAcceptDialog) - - return - -func execute_unit_tests(source_name, script_name, compiled_script_name): - - var test_path = "res://addons/protobuf/test/" - var test_file = File.new() - var input_file_path = test_path + "source/" + source_name - var output_dir_path = test_path + "temp" - var output_file_path = output_dir_path + "/" + compiled_script_name - - var output_dir = Directory.new(); - output_dir.make_dir(output_dir_path) - - if test_file.open(input_file_path, File.READ) < 0: - print("File: '", input_file_path, "' not found.") - show_dialog($FailAcceptDialog) - return - - var parser = Parser.new() - - if parser.work("", input_file_path, output_file_path, "res://addons/protobuf/protobuf_core.gd"): - var test_script = load(test_path + "script/" + script_name).new(test_path, output_file_path) - if test_script.exec_all(false): - show_dialog($SuccessTestDialog) - else: - show_dialog($FailTestDialog) - else: - show_dialog($FailAcceptDialog) - - test_file.close() - - return - -func _on_TestButton2_pressed() : - execute_unit_tests("pbtest2.proto", "unit_tests_proto2.gd", "proto2.gd") - -func _on_TestButton3_pressed() : - execute_unit_tests("pbtest3.proto", "unit_tests_proto3.gd", "proto3.gd") diff --git a/addons/protobuf/protobuf_ui_dock.tscn b/addons/protobuf/protobuf_ui_dock.tscn deleted file mode 100644 index f5cb1ee2..00000000 --- a/addons/protobuf/protobuf_ui_dock.tscn +++ /dev/null @@ -1,176 +0,0 @@ -[gd_scene load_steps=2 format=2] - -[ext_resource path="res://addons/protobuf/protobuf_ui_dock.gd" type="Script" id=1] - -[node name="Godobuf" type="VBoxContainer"] -anchor_right = 1.0 -anchor_bottom = 1.0 -margin_right = -731.0 -margin_bottom = -374.0 -size_flags_horizontal = 0 -script = ExtResource( 1 ) - -[node name="InputFileLabel" type="Label" parent="."] -margin_right = 293.0 -margin_bottom = 14.0 -text = "Input protobuf file:" - -[node name="HBoxContainer" type="HBoxContainer" parent="."] -margin_top = 18.0 -margin_right = 293.0 -margin_bottom = 42.0 - -[node name="InputFileEdit" type="LineEdit" parent="HBoxContainer"] -margin_right = 150.0 -margin_bottom = 24.0 -rect_min_size = Vector2( 150, 0 ) -editable = false - -[node name="InputFileButton" type="Button" parent="HBoxContainer"] -margin_left = 154.0 -margin_right = 178.0 -margin_bottom = 24.0 -text = "..." - -[node name="OutputFileButton" type="Label" parent="."] -margin_top = 46.0 -margin_right = 293.0 -margin_bottom = 60.0 -text = "Output GDScript file:" - -[node name="HBoxContainer2" type="HBoxContainer" parent="."] -margin_top = 64.0 -margin_right = 293.0 -margin_bottom = 88.0 - -[node name="OutputFileEdit" type="LineEdit" parent="HBoxContainer2"] -margin_right = 150.0 -margin_bottom = 24.0 -rect_min_size = Vector2( 150, 0 ) -editable = false - -[node name="OutputFileButton" type="Button" parent="HBoxContainer2"] -margin_left = 154.0 -margin_right = 178.0 -margin_bottom = 24.0 -text = "..." - -[node name="Control" type="Control" parent="."] -margin_top = 92.0 -margin_right = 293.0 -margin_bottom = 92.0 - -[node name="CompileButton" type="Button" parent="Control"] -margin_top = 15.0 -margin_right = 178.0 -margin_bottom = 35.0 -text = "Compile" -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="TestButton2" type="Button" parent="Control"] -margin_top = 81.0 -margin_right = 178.0 -margin_bottom = 101.0 -text = "Run unit tests (proto 2)" - -[node name="TestButton3" type="Button" parent="Control"] -margin_top = 109.0 -margin_right = 178.0 -margin_bottom = 129.0 -text = "Run unit tests (proto 3)" -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="InputFileDialog" type="FileDialog" parent="."] -margin_left = 200.0 -margin_top = 200.0 -margin_right = 700.0 -margin_bottom = 500.0 -popup_exclusive = true -window_title = "Открыть файл" -resizable = true -mode = 0 -access = 2 -filters = PoolStringArray( "*.proto; Google Protobuf File" ) -current_dir = "/Projects/godot/godobuf" -current_path = "/Projects/godot/godobuf/" - -[node name="InputFileDialog2" type="FileDialog" parent="."] -margin_left = 200.0 -margin_top = 200.0 -margin_right = 700.0 -margin_bottom = 500.0 -popup_exclusive = true -window_title = "Открыть файл" -resizable = true -mode = 0 -access = 2 -filters = PoolStringArray( "*.proto; Google Protobuf File" ) -current_dir = "/Projects/godot/godobuf" -current_path = "/Projects/godot/godobuf/" - -[node name="OutputFileDialog" type="FileDialog" parent="."] -margin_left = 200.0 -margin_top = 200.0 -margin_right = 700.0 -margin_bottom = 500.0 -popup_exclusive = true -window_title = "Save file" -resizable = true -access = 2 -filters = PoolStringArray( "*.gd; GDScript" ) -current_dir = "/Projects/godot/godobuf" -current_path = "/Projects/godot/godobuf/" - -[node name="FilesErrorAcceptDialog" type="AcceptDialog" parent="."] -margin_right = 83.0 -margin_bottom = 58.0 -popup_exclusive = true -window_title = "Error" -dialog_text = "Need select both output & input files!" - -[node name="SuccessAcceptDialog" type="AcceptDialog" parent="."] -margin_top = 96.0 -margin_right = 293.0 -margin_bottom = 154.0 -popup_exclusive = true -window_title = "Success" -dialog_text = "Compile success done." - -[node name="FailAcceptDialog" type="AcceptDialog" parent="."] -margin_top = 96.0 -margin_right = 293.0 -margin_bottom = 154.0 -popup_exclusive = true -window_title = "Error" -dialog_text = "Compile fail. See details in console output." - -[node name="SuccessTestDialog" type="AcceptDialog" parent="."] -margin_top = 96.0 -margin_right = 293.0 -margin_bottom = 171.0 -popup_exclusive = true -window_title = "Tests completed" -dialog_text = "All tests were completed successfully. -See console for details." - -[node name="FailTestDialog" type="AcceptDialog" parent="."] -margin_top = 96.0 -margin_right = 293.0 -margin_bottom = 171.0 -popup_exclusive = true -window_title = "Error" -dialog_text = "Errors occurred while running tests! -See console for details." - -[connection signal="pressed" from="HBoxContainer/InputFileButton" to="." method="_on_InputFileButton_pressed"] -[connection signal="pressed" from="HBoxContainer2/OutputFileButton" to="." method="_on_OutputFileButton_pressed"] -[connection signal="pressed" from="Control/CompileButton" to="." method="_on_CompileButton_pressed"] -[connection signal="pressed" from="Control/TestButton2" to="." method="_on_TestButton2_pressed"] -[connection signal="pressed" from="Control/TestButton3" to="." method="_on_TestButton3_pressed"] -[connection signal="file_selected" from="InputFileDialog" to="." method="_on_InputFileDialog_file_selected"] -[connection signal="file_selected" from="InputFileDialog2" to="." method="_on_InputFileDialog_file_selected"] -[connection signal="file_selected" from="OutputFileDialog" to="." method="_on_OutputFileDialog_file_selected"] diff --git a/addons/protobuf/protobuf_util.gd b/addons/protobuf/protobuf_util.gd deleted file mode 100644 index 4b5830da..00000000 --- a/addons/protobuf/protobuf_util.gd +++ /dev/null @@ -1,46 +0,0 @@ -# -# BSD 3-Clause License -# -# Copyright (c) 2018, Oleg Malyavkin -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# * Redistributions of source code must retain the above copyright notice, this -# list of conditions and the following disclaimer. -# -# * Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# * Neither the name of the copyright holder nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -static func extract_dir(file_path): - var parts = file_path.split("/", false) - parts.remove(parts.size() - 1) - var path - if file_path.begins_with("/"): - path = "/" - else: - path = "" - for part in parts: - path += part + "/" - return path - -static func extract_filename(file_path): - var parts = file_path.split("/", false) - return parts[parts.size() - 1] diff --git a/addons/protobuf/test/expected_bin/proto2/f_bool.v2ref b/addons/protobuf/test/expected_bin/proto2/f_bool.v2ref deleted file mode 100644 index 41c879eed25b083137e3e053a5d6131d90a4f0e3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2 Jcmc~`0002e0BHaK diff --git a/addons/protobuf/test/expected_bin/proto2/f_bytes.v2ref b/addons/protobuf/test/expected_bin/proto2/f_bytes.v2ref deleted file mode 100644 index 3b7fdd65..00000000 --- a/addons/protobuf/test/expected_bin/proto2/f_bytes.v2ref +++ /dev/null @@ -1 +0,0 @@ -z \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto2/f_bytes_default.v2ref b/addons/protobuf/test/expected_bin/proto2/f_bytes_default.v2ref deleted file mode 100644 index f71ac66a63ac339d7af6ffdfa9d67f1fdb33791c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2 Jcmbia6Q?_0RS;c1myq# diff --git a/addons/protobuf/test/expected_bin/proto2/rf_double_empty.v2ref b/addons/protobuf/test/expected_bin/proto2/rf_double_empty.v2ref deleted file mode 100644 index e69de29b..00000000 diff --git a/addons/protobuf/test/expected_bin/proto2/rf_empty_inner.v2ref b/addons/protobuf/test/expected_bin/proto2/rf_empty_inner.v2ref deleted file mode 100644 index 4e34545a48775e87126fda093d1ee722c35f78cb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9 McmX@a#Bd0V01e9mO#lD@ diff --git a/addons/protobuf/test/expected_bin/proto2/rf_empty_out.v2ref b/addons/protobuf/test/expected_bin/proto2/rf_empty_out.v2ref deleted file mode 100644 index 0e641b38df8b9a0763091757c358efde9838ad79..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9 McmdnQ#IOmB01T@F9RL6T diff --git a/addons/protobuf/test/expected_bin/proto2/rf_enum_inner.v2ref b/addons/protobuf/test/expected_bin/proto2/rf_enum_inner.v2ref deleted file mode 100644 index 6e8f4348..00000000 --- a/addons/protobuf/test/expected_bin/proto2/rf_enum_inner.v2ref +++ /dev/null @@ -1 +0,0 @@ -ÈÈÈ \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto2/rf_enum_out.v2ref b/addons/protobuf/test/expected_bin/proto2/rf_enum_out.v2ref deleted file mode 100644 index efa07d65..00000000 --- a/addons/protobuf/test/expected_bin/proto2/rf_enum_out.v2ref +++ /dev/null @@ -1 +0,0 @@ -¸¸¸ \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto2/rf_fixed32.v2ref b/addons/protobuf/test/expected_bin/proto2/rf_fixed32.v2ref deleted file mode 100644 index a8d2f91c3847c344e6e3847b31f2267f68f0963c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12 Tcmey%c!`C9;V+|}7y|xX%{mC02HnQf&c&j diff --git a/addons/protobuf/test/expected_bin/proto2/rf_inner_nen.v2ref b/addons/protobuf/test/expected_bin/proto2/rf_inner_nen.v2ref deleted file mode 100644 index 94bb8b0e34a1c80289004ce892bd2103d15ef36c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 17 UcmdnR%)-GVptOsbVHbo203A94%m4rY diff --git a/addons/protobuf/test/expected_bin/proto2/rf_int32.v2ref b/addons/protobuf/test/expected_bin/proto2/rf_int32.v2ref deleted file mode 100644 index b0652c8f..00000000 --- a/addons/protobuf/test/expected_bin/proto2/rf_int32.v2ref +++ /dev/null @@ -1 +0,0 @@ -ÈÒ È®, \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto2/rf_int32_empty.v2ref b/addons/protobuf/test/expected_bin/proto2/rf_int32_empty.v2ref deleted file mode 100644 index e69de29b..00000000 diff --git a/addons/protobuf/test/expected_bin/proto2/rf_int32_with_clear.v2ref b/addons/protobuf/test/expected_bin/proto2/rf_int32_with_clear.v2ref deleted file mode 100644 index b0652c8f..00000000 --- a/addons/protobuf/test/expected_bin/proto2/rf_int32_with_clear.v2ref +++ /dev/null @@ -1 +0,0 @@ -ÈÒ È®, \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto2/rf_int64.v2ref b/addons/protobuf/test/expected_bin/proto2/rf_int64.v2ref deleted file mode 100644 index 618a6f08..00000000 --- a/addons/protobuf/test/expected_bin/proto2/rf_int64.v2ref +++ /dev/null @@ -1 +0,0 @@ -ÐÒ Ð®, \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto2/rf_int64_empty.v2ref b/addons/protobuf/test/expected_bin/proto2/rf_int64_empty.v2ref deleted file mode 100644 index e69de29b..00000000 diff --git a/addons/protobuf/test/expected_bin/proto2/rf_sfixed32.v2ref b/addons/protobuf/test/expected_bin/proto2/rf_sfixed32.v2ref deleted file mode 100644 index e1826d5b6c4386e0436cf5a2b28a43f146b4234e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12 TcmeBWy2Qf3(95JJ#=rmo6KDcC diff --git a/addons/protobuf/test/expected_bin/proto2/rf_sfixed32_empty.v2ref b/addons/protobuf/test/expected_bin/proto2/rf_sfixed32_empty.v2ref deleted file mode 100644 index e69de29b..00000000 diff --git a/addons/protobuf/test/expected_bin/proto2/rf_sfixed64.v2ref b/addons/protobuf/test/expected_bin/proto2/rf_sfixed64.v2ref deleted file mode 100644 index abc4ebaa2d83041ffdd3ee7817bfe543328dca11..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 20 TcmbQpbcuxl3??$^i9uKZB3uGN diff --git a/addons/protobuf/test/expected_bin/proto2/rf_sfixed64_empty.v2ref b/addons/protobuf/test/expected_bin/proto2/rf_sfixed64_empty.v2ref deleted file mode 100644 index e69de29b..00000000 diff --git a/addons/protobuf/test/expected_bin/proto2/rf_sint32.v2ref b/addons/protobuf/test/expected_bin/proto2/rf_sint32.v2ref deleted file mode 100644 index 7ffe18b9..00000000 --- a/addons/protobuf/test/expected_bin/proto2/rf_sint32.v2ref +++ /dev/null @@ -1 +0,0 @@ -è¤èÜX \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto2/rf_sint32_empty.v2ref b/addons/protobuf/test/expected_bin/proto2/rf_sint32_empty.v2ref deleted file mode 100644 index e69de29b..00000000 diff --git a/addons/protobuf/test/expected_bin/proto2/rf_sint64.v2ref b/addons/protobuf/test/expected_bin/proto2/rf_sint64.v2ref deleted file mode 100644 index 79ad41a5..00000000 --- a/addons/protobuf/test/expected_bin/proto2/rf_sint64.v2ref +++ /dev/null @@ -1 +0,0 @@ -ð¤ðÜX \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto2/rf_sint64_empty.v2ref b/addons/protobuf/test/expected_bin/proto2/rf_sint64_empty.v2ref deleted file mode 100644 index e69de29b..00000000 diff --git a/addons/protobuf/test/expected_bin/proto2/rf_string.v2ref b/addons/protobuf/test/expected_bin/proto2/rf_string.v2ref deleted file mode 100644 index 0516d414..00000000 --- a/addons/protobuf/test/expected_bin/proto2/rf_string.v2ref +++ /dev/null @@ -1 +0,0 @@ -¢string value one¢string value two \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto2/rf_string_empty.v2ref b/addons/protobuf/test/expected_bin/proto2/rf_string_empty.v2ref deleted file mode 100644 index e69de29b..00000000 diff --git a/addons/protobuf/test/expected_bin/proto2/rf_uint32.v2ref b/addons/protobuf/test/expected_bin/proto2/rf_uint32.v2ref deleted file mode 100644 index 4c48587a..00000000 --- a/addons/protobuf/test/expected_bin/proto2/rf_uint32.v2ref +++ /dev/null @@ -1 +0,0 @@ -ØÒ Ø®, \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto2/rf_uint32_empty.v2ref b/addons/protobuf/test/expected_bin/proto2/rf_uint32_empty.v2ref deleted file mode 100644 index e69de29b..00000000 diff --git a/addons/protobuf/test/expected_bin/proto2/rf_uint64.v2ref b/addons/protobuf/test/expected_bin/proto2/rf_uint64.v2ref deleted file mode 100644 index d4ec43e4..00000000 --- a/addons/protobuf/test/expected_bin/proto2/rf_uint64.v2ref +++ /dev/null @@ -1 +0,0 @@ -àÒ à®, \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto2/rf_uint64_empty.v2ref b/addons/protobuf/test/expected_bin/proto2/rf_uint64_empty.v2ref deleted file mode 100644 index e69de29b..00000000 diff --git a/addons/protobuf/test/expected_bin/proto2/rfu_bool.v2ref b/addons/protobuf/test/expected_bin/proto2/rfu_bool.v2ref deleted file mode 100644 index c3b6099e292adb47fed6b979e82305ba82327e69..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6 NcmdnQ%*?>Z000C}0J;DG diff --git a/addons/protobuf/test/expected_bin/proto2/rfu_double.v2ref b/addons/protobuf/test/expected_bin/proto2/rfu_double.v2ref deleted file mode 100644 index 5ee196804dcb2f52435d313e6a797fe207c1d372..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 19 Zcmcb_B*4JH&>*r-!vRP$Tu=6K001cT1XTb4 diff --git a/addons/protobuf/test/expected_bin/proto2/rfu_fixed32.v2ref b/addons/protobuf/test/expected_bin/proto2/rfu_fixed32.v2ref deleted file mode 100644 index 776982364310db9ce3b2d16fb23fff7a7ee33f77..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 11 ScmbQl%yEf@fk97-cN diff --git a/addons/protobuf/test/expected_bin/proto2/rfu_fixed64.v2ref b/addons/protobuf/test/expected_bin/proto2/rfu_fixed64.v2ref deleted file mode 100644 index ba5a0898ee1cec2c294582b48134f49c8f8600c7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 19 ScmbQmEO3d10SxrSAT$6REdj^? diff --git a/addons/protobuf/test/expected_bin/proto2/rfu_float.v2ref b/addons/protobuf/test/expected_bin/proto2/rfu_float.v2ref deleted file mode 100644 index e482f017..00000000 --- a/addons/protobuf/test/expected_bin/proto2/rfu_float.v2ref +++ /dev/null @@ -1 +0,0 @@ -Ú¤pEA¸cB \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto2/rfu_int32.v2ref b/addons/protobuf/test/expected_bin/proto2/rfu_int32.v2ref deleted file mode 100644 index ebc40d9c..00000000 --- a/addons/protobuf/test/expected_bin/proto2/rfu_int32.v2ref +++ /dev/null @@ -1 +0,0 @@ -âÒ ®, \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto2/rfu_int64.v2ref b/addons/protobuf/test/expected_bin/proto2/rfu_int64.v2ref deleted file mode 100644 index 0b271741..00000000 --- a/addons/protobuf/test/expected_bin/proto2/rfu_int64.v2ref +++ /dev/null @@ -1 +0,0 @@ -êÒ ®, \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto2/rfu_sfixed32.v2ref b/addons/protobuf/test/expected_bin/proto2/rfu_sfixed32.v2ref deleted file mode 100644 index 29f5d3b42a2d6bb442899e37ed8647e9bc039541..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 11 ScmZ3)%yEf@fk97;nt diff --git a/addons/protobuf/test/expected_bin/proto2/rfu_sint32.v2ref b/addons/protobuf/test/expected_bin/proto2/rfu_sint32.v2ref deleted file mode 100644 index ee53800d..00000000 --- a/addons/protobuf/test/expected_bin/proto2/rfu_sint32.v2ref +++ /dev/null @@ -1 +0,0 @@ -‚¤ÜX \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto2/rfu_sint64.v2ref b/addons/protobuf/test/expected_bin/proto2/rfu_sint64.v2ref deleted file mode 100644 index 606c5e1d..00000000 --- a/addons/protobuf/test/expected_bin/proto2/rfu_sint64.v2ref +++ /dev/null @@ -1 +0,0 @@ -Š¤ÜX \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto2/rfu_uint32.v2ref b/addons/protobuf/test/expected_bin/proto2/rfu_uint32.v2ref deleted file mode 100644 index c0367234..00000000 --- a/addons/protobuf/test/expected_bin/proto2/rfu_uint32.v2ref +++ /dev/null @@ -1 +0,0 @@ -òÒ ®, \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto2/rfu_uint64.v2ref b/addons/protobuf/test/expected_bin/proto2/rfu_uint64.v2ref deleted file mode 100644 index 20d2ca61..00000000 --- a/addons/protobuf/test/expected_bin/proto2/rfu_uint64.v2ref +++ /dev/null @@ -1 +0,0 @@ -úÒ ®, \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto2/simple_all.v2ref b/addons/protobuf/test/expected_bin/proto2/simple_all.v2ref deleted file mode 100644 index 937d8adcf6a85a055bf3e11df53a17cefa53ef85..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 503 zcmZXPKS)AB9LImZ-@Wu51wD8bP2uPu(b#A~TMlh54I=gjLc^?}DIEm|o5U&PO%4)H zuQd?fD7PfxAWhOFje*eb-tjEzIPP=5`yF@Rj|71GwO%s4?p+@2Z7P{iGO6T_lDnRp z_S}rJ0FLyc$FbhzqUsFFD_52BdGR!Hle@Ss+*wG%s-b10Lp6-q)3`HSt>bd3SSX#C zJ8gtV#4f@U;xqD-;pgEFUh{|P0qPtB^tbZ+0V)|_FEwNinIqwL-09A@oR!P@-G{Un+ST`5_=Az#sXc6+-A?LSOg7g19s@#^k6#6ojVsX1q zV5U##6Zs@w2+Rx!1EPS0B8Ovy#yXGoeIr{7Yu$IUlwL-09A@oR!P@-G{Un+ST`5_=Az#sXc6+-A?LSOg7g19s@#^k6#6ojVsX1q zV5U##6Zs@w2+Rx!1EPS0B8Ovy#yXGoeIr{7Yu$IUl*r-!vRP$Tu=6K001W%1Uvu$ diff --git a/addons/protobuf/test/expected_bin/proto3/rf_double_empty.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_double_empty.v3ref deleted file mode 100644 index e69de29b..00000000 diff --git a/addons/protobuf/test/expected_bin/proto3/rf_empty_inner.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_empty_inner.v3ref deleted file mode 100644 index 4e34545a48775e87126fda093d1ee722c35f78cb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9 McmX@a#Bd0V01e9mO#lD@ diff --git a/addons/protobuf/test/expected_bin/proto3/rf_empty_out.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_empty_out.v3ref deleted file mode 100644 index 0e641b38df8b9a0763091757c358efde9838ad79..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9 McmdnQ#IOmB01T@F9RL6T diff --git a/addons/protobuf/test/expected_bin/proto3/rf_enum_inner.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_enum_inner.v3ref deleted file mode 100644 index 630678d2..00000000 --- a/addons/protobuf/test/expected_bin/proto3/rf_enum_inner.v3ref +++ /dev/null @@ -1 +0,0 @@ -Ê \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto3/rf_enum_out.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_enum_out.v3ref deleted file mode 100644 index 2cbdb175..00000000 --- a/addons/protobuf/test/expected_bin/proto3/rf_enum_out.v3ref +++ /dev/null @@ -1 +0,0 @@ -º \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto3/rf_fixed32.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_fixed32.v3ref deleted file mode 100644 index c2cbcd1c3f3ac70b7876ca6dfcfa56a9ff26b6c4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 11 Scmeyx$Z?5|00w$u5E=j)Qvt64 diff --git a/addons/protobuf/test/expected_bin/proto3/rf_fixed64_empty.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_fixed64_empty.v3ref deleted file mode 100644 index e69de29b..00000000 diff --git a/addons/protobuf/test/expected_bin/proto3/rf_float.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_float.v3ref deleted file mode 100644 index 32cf1e55..00000000 --- a/addons/protobuf/test/expected_bin/proto3/rf_float.v3ref +++ /dev/null @@ -1 +0,0 @@ -¤pEA¸cB \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto3/rf_float_empty.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_float_empty.v3ref deleted file mode 100644 index e69de29b..00000000 diff --git a/addons/protobuf/test/expected_bin/proto3/rf_inner_ene.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_inner_ene.v3ref deleted file mode 100644 index 83a495754c37dd007109cbff162b773dbd7c5275..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 13 UcmdnR%&?1@g@Z>xX%{mC02HnQf&c&j diff --git a/addons/protobuf/test/expected_bin/proto3/rf_inner_nen.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_inner_nen.v3ref deleted file mode 100644 index 94bb8b0e34a1c80289004ce892bd2103d15ef36c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 17 UcmdnR%)-GVptOsbVHbo203A94%m4rY diff --git a/addons/protobuf/test/expected_bin/proto3/rf_int32.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_int32.v3ref deleted file mode 100644 index 8dba6e61..00000000 --- a/addons/protobuf/test/expected_bin/proto3/rf_int32.v3ref +++ /dev/null @@ -1 +0,0 @@ -ÊÒ ®, \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto3/rf_int32_empty.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_int32_empty.v3ref deleted file mode 100644 index e69de29b..00000000 diff --git a/addons/protobuf/test/expected_bin/proto3/rf_int32_with_clear.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_int32_with_clear.v3ref deleted file mode 100644 index 8dba6e61..00000000 --- a/addons/protobuf/test/expected_bin/proto3/rf_int32_with_clear.v3ref +++ /dev/null @@ -1 +0,0 @@ -ÊÒ ®, \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto3/rf_int64.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_int64.v3ref deleted file mode 100644 index 41482a7e..00000000 --- a/addons/protobuf/test/expected_bin/proto3/rf_int64.v3ref +++ /dev/null @@ -1 +0,0 @@ -ÒÒ ®, \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto3/rf_int64_empty.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_int64_empty.v3ref deleted file mode 100644 index e69de29b..00000000 diff --git a/addons/protobuf/test/expected_bin/proto3/rf_sfixed32.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_sfixed32.v3ref deleted file mode 100644 index 9981b370a48e1635026716f652d6f46e40708362..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 11 ScmeBT;<&`Zz@R6_zyJUZ`vI>2 diff --git a/addons/protobuf/test/expected_bin/proto3/rf_sfixed32_empty.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_sfixed32_empty.v3ref deleted file mode 100644 index e69de29b..00000000 diff --git a/addons/protobuf/test/expected_bin/proto3/rf_sfixed64.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_sfixed64.v3ref deleted file mode 100644 index 32e3364df366082f6790b5e00b57329bf2885353..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 19 ScmbQlByfp^0SxrSAT$6Qg8{z) diff --git a/addons/protobuf/test/expected_bin/proto3/rf_sfixed64_empty.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_sfixed64_empty.v3ref deleted file mode 100644 index e69de29b..00000000 diff --git a/addons/protobuf/test/expected_bin/proto3/rf_sint32.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_sint32.v3ref deleted file mode 100644 index b0776afe..00000000 --- a/addons/protobuf/test/expected_bin/proto3/rf_sint32.v3ref +++ /dev/null @@ -1 +0,0 @@ -ê¤ÜX \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto3/rf_sint32_empty.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_sint32_empty.v3ref deleted file mode 100644 index e69de29b..00000000 diff --git a/addons/protobuf/test/expected_bin/proto3/rf_sint64.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_sint64.v3ref deleted file mode 100644 index ddcbe0fc..00000000 --- a/addons/protobuf/test/expected_bin/proto3/rf_sint64.v3ref +++ /dev/null @@ -1 +0,0 @@ -ò¤ÜX \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto3/rf_sint64_empty.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_sint64_empty.v3ref deleted file mode 100644 index e69de29b..00000000 diff --git a/addons/protobuf/test/expected_bin/proto3/rf_string.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_string.v3ref deleted file mode 100644 index 0516d414..00000000 --- a/addons/protobuf/test/expected_bin/proto3/rf_string.v3ref +++ /dev/null @@ -1 +0,0 @@ -¢string value one¢string value two \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto3/rf_string_empty.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_string_empty.v3ref deleted file mode 100644 index e69de29b..00000000 diff --git a/addons/protobuf/test/expected_bin/proto3/rf_uint32.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_uint32.v3ref deleted file mode 100644 index 3e73b2d4..00000000 --- a/addons/protobuf/test/expected_bin/proto3/rf_uint32.v3ref +++ /dev/null @@ -1 +0,0 @@ -ÚÒ ®, \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto3/rf_uint32_empty.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_uint32_empty.v3ref deleted file mode 100644 index e69de29b..00000000 diff --git a/addons/protobuf/test/expected_bin/proto3/rf_uint64.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_uint64.v3ref deleted file mode 100644 index 6145edb6..00000000 --- a/addons/protobuf/test/expected_bin/proto3/rf_uint64.v3ref +++ /dev/null @@ -1 +0,0 @@ -âÒ ®, \ No newline at end of file diff --git a/addons/protobuf/test/expected_bin/proto3/rf_uint64_empty.v3ref b/addons/protobuf/test/expected_bin/proto3/rf_uint64_empty.v3ref deleted file mode 100644 index e69de29b..00000000 diff --git a/addons/protobuf/test/expected_bin/proto3/rfu_bool.v3ref b/addons/protobuf/test/expected_bin/proto3/rfu_bool.v3ref deleted file mode 100644 index 14654be4534b40c4901d595defa84df6e2ca75b3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9 QcmdnM%&>u(aRW0001TP}8vpFP&s&-O0Xjx^5+=lZh>sAT=mh>S^%de9T^VS51E5Ua zd^Ra%RcX<^|KDwp0)$8Mev8C-;J-)3+kBg>AY&;Kb)N{r=#gUYK0z1*TfP#1ZPjdM zV#1s-r_3pH#+)%rD)38cn5r-<%$gFfni8wJ&Bd*5Yss4StZD1k OqTgEdy9&ArdH(@Ih<$kg diff --git a/addons/protobuf/test/expected_bin/proto3/simple_all_1.v3ref b/addons/protobuf/test/expected_bin/proto3/simple_all_1.v3ref deleted file mode 100644 index ece278126e11284f8bb12cd5e5c6ca39ff8d8d1a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 495 zcmZXPF-U?z6oB7*_ox3+&<}q_Q#d+EG&Wk$RzsUhgNQ{C8fFDe;v|lNgH92@gAO81 z;ppg8w*;XeP0}Py($stRqeLB#``){E+`Uf&KxwTLPp$`-2YZ`F$Bd2}y<_xl;3otB z$T$GUvdKD;Bt5SRD_6zBdG0KBlfJml-Z@ChDWl_}M`et-lc@KyTE*pjE}K6M?=%n| z5Zee{#2$M5qWxQ*e#;yt`{>FP&s&-O0Xjx^5+=lZh>sAT=mh>S^%de9T^VS51E5Ua zd^Ra%RcX<^|KDwp0)$8Mev8C-;J-)3+kBg>AY&;Kb)N{r=#gUYK0z1*TfP#1ZPjdM zV#1s-r_3pH#+)%rD)38cn5r-<%$gFfni8wJ&Bd*5Yss4StZD1k OqTgEdy9&ArdH(@7F@1Re diff --git a/addons/protobuf/test/expected_bin/proto3/test2_1.v3ref b/addons/protobuf/test/expected_bin/proto3/test2_1.v3ref deleted file mode 100644 index 2ef3b7673ed5585fe0159368c000ba36b2475ebe..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 68 xcmd<$E=eseQ7B2RDA6_KLgE-9bBqNqu`qyvlt5)_i9%vteo01Z5m=iR0|2wY6VCtu diff --git a/addons/protobuf/test/expected_bin/proto3/test2_2.v3ref b/addons/protobuf/test/expected_bin/proto3/test2_2.v3ref deleted file mode 100644 index 89cd7b2eda235ffac2fb444908d202d61103b22a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 35 qcmXp~ BinCheckResult: - var result_string : String - var result : bool = false - var binary_string : String = "[no data]" - var ref_file = File.new() - var ref_file_path = root_path + "/expected_bin/proto" + protobuf_version + "/" + test_name + ".v" + protobuf_version + "ref"; - var ref_rv = null - if ref_file.file_exists(ref_file_path): - if ref_file.open(ref_file_path, ref_file.READ) == 0: - ref_rv = ref_file.get_buffer(ref_file.get_len()) - binary_string = str_raw_array(ref_rv) - if godot_rv.size() == ref_rv.size(): - var equal = true - var fail_index - for index in range(godot_rv.size()): - if godot_rv[index] != ref_rv[index]: - equal = false - fail_index = index - break - if equal: - result_string = "SUCCESS" - result = true; - else: - result_string = "FAIL: test data for '" + test_name + "' not equal at " + str(fail_index) - else: - result_string = "FAIL: test data length for '" + test_name + "' not equal" - else: - result_string = "FAIL: can't read '" + ref_file_path + "'" - else: - result_string = "FAIL: '" + ref_file_path + "' not exist" - return BinCheckResult.new(binary_string, result_string, ref_rv, result); - -const FUNC_NAME = 0 -const CLASS_NAME = 1 - -func exec(test, save_to_file, test_names) -> bool: - print("======================= BEGIN TESTS v" + protobuf_version + " =======================") - var tests_counter = 0 - var success_pack_counter = 0 - var godot_success_unpack_counter = 0 - var protobuf_success_unpack_counter = 0 - for test_name in test_names: - tests_counter += 1 - print("----- ", test_name[FUNC_NAME], " -----") - var test_func = funcref(test, test_name[FUNC_NAME]) - var packed_object = test_name[CLASS_NAME].new() - var godot_rv = test_func.call_func(packed_object) - if save_to_file: - var out_file_name = root_path + "/temp/" + test_name[FUNC_NAME] + ".v" + protobuf_version + "godobuf"; - var out_file = File.new() - if out_file.open(out_file_name, out_file.WRITE) == 0: - out_file.store_buffer(godot_rv) - out_file.close() - else: - print("failed write out file: ", out_file_name) - - # compare bin dumps - var iteration = 0; - var bin_result = binary_check(test_name[FUNC_NAME], godot_rv) - if !bin_result.result: - while test_name.size() > iteration + 2: - iteration += 1 - bin_result = binary_check(test_name[FUNC_NAME] + "_" + str(test_name[iteration + 1]), godot_rv) - if bin_result.result: - break - - if bin_result.result: - success_pack_counter += 1 - - print(packed_object.to_string()) - print("[bin actual ] ", str_raw_array(godot_rv)) - print("[bin expected ] ", bin_result.binary_string) - print("[bin compare ] ", bin_result.result_string) - - var restored_object_godot = test_name[CLASS_NAME].new() - var error_godot = restored_object_godot.from_bytes(godot_rv) - if object_equal(packed_object, restored_object_godot): - godot_success_unpack_counter += 1 - if error_godot == P.PB_ERR.NO_ERRORS: - print("[unpack godobuf ] SUCCESS") - else: - print("[unpack godobuf ] FAIL: ", err_to_str(error_godot)) - else: - print("[unpack godobuf ] FAIL: packed_object & restored_object not equals") - - if bin_result.reference_array != null: - var restored_object_erl = test_name[CLASS_NAME].new() - var error_erl = restored_object_erl.from_bytes(bin_result.reference_array) - if object_equal(packed_object, restored_object_erl): - protobuf_success_unpack_counter += 1 - if error_erl == P.PB_ERR.NO_ERRORS: - print("[unpack protobuf] SUCCESS") - else: - print("[unpack protobuf] FAIL: ", err_to_str(error_erl)) - else: - print("[unpack protobuf] FAIL: packed_object & restored_object not equals") - else: - print("[unpack protobuf] FAIL: no protobuf binary") - print("") - print("===================== TESTS v" + protobuf_version + " COMLETED ======================") - print("godobuf & protobuf compare success done " + str(success_pack_counter) + " of " + str(tests_counter)) - print("godobuf unpack success done " + str(godot_success_unpack_counter) + " of " + str(tests_counter)) - print("protobuf unpack success done " + str(protobuf_success_unpack_counter) + " of " + str(tests_counter)) - - return success_pack_counter == tests_counter \ - && godot_success_unpack_counter == tests_counter \ - && protobuf_success_unpack_counter == tests_counter - -func object_equal(packed_object, restored_object): - for data_key in packed_object.data: - # checks for existence of a key - if !restored_object.data.has(data_key): - return false - - var po_rule = packed_object.data[data_key].field.rule - var ro_rule = restored_object.data[data_key].field.rule - - var po_value = packed_object.data[data_key].field.value - var ro_value = restored_object.data[data_key].field.value - - if po_value == null && ro_value == null: - return true - - if (po_value == null && ro_value != null) \ - || (po_value != null && ro_value == null): - return false - - var po_type = packed_object.data[data_key].field.type - var ro_type = restored_object.data[data_key].field.type - - # checks for existence of a repeated - if po_rule != ro_rule: - return false - # checks for type matching - if po_type != ro_type: - return false - - # differents checks according the types - if po_type == P.PB_DATA_TYPE.INT32 \ - || po_type == P.PB_DATA_TYPE.SINT32 \ - || po_type == P.PB_DATA_TYPE.UINT32 \ - || po_type == P.PB_DATA_TYPE.INT64 \ - || po_type == P.PB_DATA_TYPE.SINT64 \ - || po_type == P.PB_DATA_TYPE.UINT64 \ - || po_type == P.PB_DATA_TYPE.BOOL \ - || po_type == P.PB_DATA_TYPE.ENUM \ - || po_type == P.PB_DATA_TYPE.FIXED32 \ - || po_type == P.PB_DATA_TYPE.SFIXED32 \ - || po_type == P.PB_DATA_TYPE.FLOAT \ - || po_type == P.PB_DATA_TYPE.FIXED64 \ - || po_type == P.PB_DATA_TYPE.SFIXED64 \ - || po_type == P.PB_DATA_TYPE.DOUBLE \ - || po_type == P.PB_DATA_TYPE.STRING: - - # checks objects values - if po_rule == P.PB_RULE.REPEATED: - # ...for repeated fields - if po_value.size() != ro_value.size(): - return false - for i in range(po_value.size()): - if po_value[i] != ro_value[i]: - return false - else: - # ...for not-repeated fields - if po_value != ro_value: - return false - elif po_type == P.PB_DATA_TYPE.BYTES: - if po_rule == P.PB_RULE.REPEATED: - # ...for repeated fields - if po_value.size() != ro_value.size(): - return false - for i in range(po_value.size()): - for j in range(po_value[i].size()): - if po_value[i][j] != ro_value[i][j]: - return false - else: - # ...for not-repeated fields - if po_value.size() != ro_value.size(): - return false - for i in range(po_value.size()): - if po_value[i] != ro_value[i]: - return false - elif po_type == P.PB_DATA_TYPE.MESSAGE: - if po_rule == P.PB_RULE.REPEATED: - # ...for repeated fields - if po_value.size() != ro_value.size(): - return false - for i in range(po_value.size()): - if !object_equal(po_value[i], ro_value[i]): - return false - else: - # ...for not-repeated fields - if !object_equal(po_value, ro_value): - return false - elif po_type == P.PB_DATA_TYPE.MAP: - var po_map = P.PBPacker.construct_map(po_value) - var ro_map = P.PBPacker.construct_map(ro_value) - if po_map.size() != po_map.size(): - return false - - for key in po_map.keys(): - var po_found = -1 - for i in range(po_value.size() - 1, -1, -1): - if key == po_value[i].get_key(): - if !ro_map.has(key): - return false - po_found = i - break - - if po_found == -1: - return false - - var ro_found = -1 - for i in range(ro_value.size() - 1, -1, -1): - if key == ro_value[i].get_key(): - ro_found = i - break - - if ro_found == -1: - return false - - if !object_equal(po_value[po_found], ro_value[ro_found]): - return false - elif po_type == P.PB_DATA_TYPE.ONEOF: - return object_equal(po_value, ro_value) - return true - -func err_to_str(err_code): - if err_code == P.PB_ERR.NO_ERRORS: - return "NO_ERRORS(" + str(err_code) + ")" - elif err_code == P.PB_ERR.VARINT_NOT_FOUND: - return "VARINT_NOT_FOUND(" + str(err_code) + ")" - elif err_code == P.PB_ERR.REPEATED_COUNT_NOT_FOUND: - return "REPEATED_COUNT_NOT_FOUND(" + str(err_code) + ")" - elif err_code == P.PB_ERR.REPEATED_COUNT_MISMATCH: - return "REPEATED_COUNT_MISMATCH(" + str(err_code) + ")" - elif err_code == P.PB_ERR.LENGTHDEL_SIZE_NOT_FOUND: - return "LENGTHDEL_SIZE_NOT_FOUND(" + str(err_code) + ")" - elif err_code == P.PB_ERR.LENGTHDEL_SIZE_MISMATCH: - return "LENGTHDEL_SIZE_MISMATCH(" + str(err_code) + ")" - elif err_code == P.PB_ERR.PACKAGE_SIZE_MISMATCH: - return "PACKAGE_SIZE_MISMATCH(" + str(err_code) + ")" - elif err_code == P.PB_ERR.UNDEFINED_STATE: - return "UNDEFINED_STATE(" + str(err_code) + ")" - elif err_code == P.PB_ERR.PARSE_INCOMPLETE: - return "PARSE_INCOMPLETE(" + str(err_code) + ")" - elif err_code == P.PB_ERR.REQUIRED_FIELDS: - return "REQUIRED_FIELDS(" + str(err_code) + ")" - else: - return "UNKNOWN(" + str(err_code) + ")" - - -static func str_raw_array(arr): - if arr.size() == 0: - return "[]" - - var res = "[" - for i in range(arr.size()): - var hex : String = "%X" % arr[i] - if hex.length() == 1: - hex = "0" + hex - if i == (arr.size() - 1): - res += hex + "]" - else: - res += hex + " " - return res diff --git a/addons/protobuf/test/script/unit_tests_proto2.gd b/addons/protobuf/test/script/unit_tests_proto2.gd deleted file mode 100644 index 65a3a5d0..00000000 --- a/addons/protobuf/test/script/unit_tests_proto2.gd +++ /dev/null @@ -1,746 +0,0 @@ -# -# BSD 3-Clause License -# -# Copyright (c) 2018 - 2022, Kittenseater, Oleg Malyavkin -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# * Redistributions of source code must retain the above copyright notice, this -# list of conditions and the following disclaimer. -# -# * Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# * Neither the name of the copyright holder nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -extends Node - -const VERSION : String = "2" -var P -var Test - -func _init(path : String, compiled_file_path : String): - P = load(compiled_file_path) - Test = load(path + "/script/unit_tests_common.gd").new(P, path, VERSION) - -func exec_all(save_to_file) -> bool: - return Test.exec(self, save_to_file, [ - ["f_double", P.Test1], - ["f_float", P.Test1], - ["f_int32", P.Test1], - ["f_int64", P.Test1], - ["f_uint32", P.Test1], - ["f_uint64", P.Test1], - ["f_sint32", P.Test1], - ["f_sint64", P.Test1], - ["f_fixed32", P.Test1], - ["f_fixed64", P.Test1], - ["f_sfixed32", P.Test1], - ["f_sfixed64", P.Test1], - ["f_bool", P.Test1], - ["f_string", P.Test1], - ["f_bytes", P.Test1], - ["f_map", P.Test1, 1], - ["f_oneof_f1", P.Test1], - ["f_oneof_f2", P.Test1], - ["f_empty_out", P.Test1], - ["f_enum_out", P.Test1], - ["f_empty_inner", P.Test1], - ["f_enum_inner", P.Test1], - - ["rf_double", P.Test1], - ["rf_float", P.Test1], - ["rf_int32", P.Test1], - ["rf_int32_with_clear", P.Test1], - ["rf_int64", P.Test1], - ["rf_uint32", P.Test1], - ["rf_uint64", P.Test1], - ["rf_sint32", P.Test1], - ["rf_sint64", P.Test1], - ["rf_fixed32", P.Test1], - ["rf_fixed64", P.Test1], - ["rf_sfixed32", P.Test1], - ["rf_sfixed64", P.Test1], - ["rf_bool", P.Test1], - ["rf_string", P.Test1], - ["rf_bytes", P.Test1], - ["rf_empty_out", P.Test1], - ["rf_enum_out", P.Test1], - ["rf_empty_inner", P.Test1], - ["rf_enum_inner", P.Test1], - - ["rf_double_empty", P.Test1], - ["rf_float_empty", P.Test1], - ["rf_int32_empty", P.Test1], - ["rf_int64_empty", P.Test1], - ["rf_uint32_empty", P.Test1], - ["rf_uint64_empty", P.Test1], - ["rf_sint32_empty", P.Test1], - ["rf_sint64_empty", P.Test1], - ["rf_fixed32_empty", P.Test1], - ["rf_fixed64_empty", P.Test1], - ["rf_sfixed32_empty", P.Test1], - ["rf_sfixed64_empty", P.Test1], - ["rf_bool_empty", P.Test1], - ["rf_string_empty", P.Test1], - ["rf_bytes_empty", P.Test1], - - ["rfu_double", P.Test1], - ["rfu_float", P.Test1], - ["rfu_int32", P.Test1], - ["rfu_int64", P.Test1], - ["rfu_uint32", P.Test1], - ["rfu_uint64", P.Test1], - ["rfu_sint32", P.Test1], - ["rfu_sint64", P.Test1], - ["rfu_fixed32", P.Test1], - ["rfu_fixed64", P.Test1], - ["rfu_sfixed32", P.Test1], - ["rfu_sfixed64", P.Test1], - ["rfu_bool", P.Test1], - - ["f_int32_default", P.Test1], - ["f_string_default", P.Test1], - ["f_bytes_default", P.Test1], - ["test2_testinner3_testinner32", P.Test2.TestInner3.TestInner3_2], - ["test2_testinner3_testinner32_empty", P.Test2.TestInner3.TestInner3_2], - ["rf_inner_ene", P.Test1], - ["rf_inner_nen", P.Test1], - - ["simple_all", P.Test1, 1], - - ["test2_1", P.Test2], - ["test2_2", P.Test2, 1], - ["test2_3", P.Test2], - ["test2_4", P.Test2, 1], - - ["test4", P.Test4], - ["test4_map", P.Test4, 1, 2, 3, 4, 5], - ["test4_map_dup", P.Test4], - ["test4_map_zero_key", P.Test4] - ]) - - -####################### -######## Test1 ######## -####################### - -# single values # -func f_double(t): - t.set_f_double(1.2340000152587890625e1) - return t.to_bytes() - -func f_float(t): - t.set_f_float(1.2340000152587890625e1) - return t.to_bytes() - -func f_int32(t): - t.set_f_int32(1234) - return t.to_bytes() - -func f_int64(t): - t.set_f_int64(1234) - return t.to_bytes() - -func f_uint32(t): - t.set_f_uint32(1234) - return t.to_bytes() - -func f_uint64(t): - t.set_f_uint64(1234) - return t.to_bytes() - -func f_sint32(t): - t.set_f_sint32(1234) - return t.to_bytes() - -func f_sint64(t): - t.set_f_sint64(1234) - return t.to_bytes() - -func f_fixed32(t): - t.set_f_fixed32(1234) - return t.to_bytes() - -func f_fixed64(t): - t.set_f_fixed64(1234) - return t.to_bytes() - -func f_sfixed32(t): - t.set_f_sfixed32(1234) - return t.to_bytes() - -func f_sfixed64(t): - t.set_f_sfixed64(1234) - return t.to_bytes() - -func f_bool(t): - t.set_f_bool(false) - return t.to_bytes() - -func f_string(t): - t.set_f_string("string value") - return t.to_bytes() - -func f_bytes(t): - t.set_f_bytes([1, 2, 3, 4]) - return t.to_bytes() - -func f_map(t): - t.add_f_map(1, 2) - t.add_f_map(1000, 2000) - return t.to_bytes() - -func f_oneof_f1(t): - t.set_f_oneof_f1("oneof value") - return t.to_bytes() - -func f_oneof_f2(t): - t.set_f_oneof_f2(1234) - return t.to_bytes() - -func f_empty_out(t): - t.new_f_empty_out() - return t.to_bytes() - -func f_enum_out(t): - t.set_f_enum_out(P.Enum0.ONE) - return t.to_bytes() - -func f_empty_inner(t): - t.new_f_empty_inner() - return t.to_bytes() - -func f_enum_inner(t): - t.set_f_enum_inner(P.Test2.TestEnum.VALUE_1) - return t.to_bytes() - -# repeated values # -func rf_double(t): - t.add_rf_double(1.2340000152587890625e1) - t.add_rf_double(5.6779998779296875e1) - return t.to_bytes() - -func rf_float(t): - t.add_rf_float(1.2340000152587890625e1) - t.add_rf_float(5.6779998779296875e1) - return t.to_bytes() - -func rf_int32(t): - t.add_rf_int32(1234) - t.add_rf_int32(5678) - return t.to_bytes() - -func rf_int32_with_clear(t): - t.add_rf_int32(10) - t.add_rf_int32(20) - t.clear_rf_int32() - t.add_rf_int32(1234) - t.add_rf_int32(5678) - return t.to_bytes() - -func rf_int64(t): - t.add_rf_int64(1234) - t.add_rf_int64(5678) - return t.to_bytes() - -func rf_uint32(t): - t.add_rf_uint32(1234) - t.add_rf_uint32(5678) - return t.to_bytes() - -func rf_uint64(t): - t.add_rf_uint64(1234) - t.add_rf_uint64(5678) - return t.to_bytes() - -func rf_sint32(t): - t.add_rf_sint32(1234) - t.add_rf_sint32(5678) - return t.to_bytes() - -func rf_sint64(t): - t.add_rf_sint64(1234) - t.add_rf_sint64(5678) - return t.to_bytes() - -func rf_fixed32(t): - t.add_rf_fixed32(1234) - t.add_rf_fixed32(5678) - return t.to_bytes() - -func rf_fixed64(t): - t.add_rf_fixed64(1234) - t.add_rf_fixed64(5678) - return t.to_bytes() - -func rf_sfixed32(t): - t.add_rf_sfixed32(1234) - t.add_rf_sfixed32(5678) - return t.to_bytes() - -func rf_sfixed64(t): - t.add_rf_sfixed64(1234) - t.add_rf_sfixed64(5678) - return t.to_bytes() - -func rf_bool(t): - t.add_rf_bool(false) - t.add_rf_bool(true) - t.add_rf_bool(false) - return t.to_bytes() - -func rf_string(t): - t.add_rf_string("string value one") - t.add_rf_string("string value two") - return t.to_bytes() - -func rf_bytes(t): - t.add_rf_bytes([1, 2, 3, 4]) - t.add_rf_bytes([5, 6, 7, 8]) - return t.to_bytes() - -func rf_empty_out(t): - t.add_rf_empty_out() - t.add_rf_empty_out() - t.add_rf_empty_out() - return t.to_bytes() - -func rf_enum_out(t): - t.add_rf_enum_out(P.Enum0.ONE) - t.add_rf_enum_out(P.Enum0.TWO) - t.add_rf_enum_out(P.Enum0.THREE) - return t.to_bytes() - -func rf_empty_inner(t): - t.add_rf_empty_inner() - t.add_rf_empty_inner() - t.add_rf_empty_inner() - return t.to_bytes() - -func rf_enum_inner(t): - t.add_rf_enum_inner(P.Test2.TestEnum.VALUE_1) - t.add_rf_enum_inner(P.Test2.TestEnum.VALUE_2) - t.add_rf_enum_inner(P.Test2.TestEnum.VALUE_3) - return t.to_bytes() - -func rf_double_empty(t): - return t.to_bytes() - -func rf_float_empty(t): - return t.to_bytes() - -func rf_int32_empty(t): - return t.to_bytes() - -func rf_int64_empty(t): - return t.to_bytes() - -func rf_uint32_empty(t): - return t.to_bytes() - -func rf_uint64_empty(t): - return t.to_bytes() - -func rf_sint32_empty(t): - return t.to_bytes() - -func rf_sint64_empty(t): - return t.to_bytes() - -func rf_fixed32_empty(t): - return t.to_bytes() - -func rf_fixed64_empty(t): - return t.to_bytes() - -func rf_sfixed32_empty(t): - return t.to_bytes() - -func rf_sfixed64_empty(t): - return t.to_bytes() - -func rf_bool_empty(t): - return t.to_bytes() - -func rf_string_empty(t): - return t.to_bytes() - -func rf_bytes_empty(t): - return t.to_bytes() - -func rfu_double(t): - t.add_rfu_double(1.2340000152587890625e1) - t.add_rfu_double(5.6779998779296875e1) - return t.to_bytes() - -func rfu_float(t): - t.add_rfu_float(1.2340000152587890625e1) - t.add_rfu_float(5.6779998779296875e1) - return t.to_bytes() - -func rfu_int32(t): - t.add_rfu_int32(1234) - t.add_rfu_int32(5678) - return t.to_bytes() - -func rfu_int64(t): - t.add_rfu_int64(1234) - t.add_rfu_int64(5678) - return t.to_bytes() - -func rfu_uint32(t): - t.add_rfu_uint32(1234) - t.add_rfu_uint32(5678) - return t.to_bytes() - -func rfu_uint64(t): - t.add_rfu_uint64(1234) - t.add_rfu_uint64(5678) - return t.to_bytes() - -func rfu_sint32(t): - t.add_rfu_sint32(1234) - t.add_rfu_sint32(5678) - return t.to_bytes() - -func rfu_sint64(t): - t.add_rfu_sint64(1234) - t.add_rfu_sint64(5678) - return t.to_bytes() - -func rfu_fixed32(t): - t.add_rfu_fixed32(1234) - t.add_rfu_fixed32(5678) - return t.to_bytes() - -func rfu_fixed64(t): - t.add_rfu_fixed64(1234) - t.add_rfu_fixed64(5678) - return t.to_bytes() - -func rfu_sfixed32(t): - t.add_rfu_sfixed32(1234) - t.add_rfu_sfixed32(5678) - return t.to_bytes() - -func rfu_sfixed64(t): - t.add_rfu_sfixed64(1234) - t.add_rfu_sfixed64(5678) - return t.to_bytes() - -func rfu_bool(t): - t.add_rfu_bool(false) - t.add_rfu_bool(true) - t.add_rfu_bool(false) - return t.to_bytes() - -func f_int32_default(t): - t.set_f_int32(0) - return t.to_bytes() - -func f_string_default(t): - t.set_f_string("") - return t.to_bytes() - -func f_bytes_default(t): - t.set_f_bytes([]) - return t.to_bytes() - -func test2_testinner3_testinner32(t): - t.set_f1(12) - t.set_f2(34) - return t.to_bytes() - -func test2_testinner3_testinner32_empty(t): - return t.to_bytes() - -func rf_inner_ene(t): - var i0 = t.add_rf_inner() - var i1 = t.add_rf_inner() - var i2 = t.add_rf_inner() - - i1.set_f1(12) - i1.set_f2(34) - - return t.to_bytes() - -func rf_inner_nen(t): - var i0 = t.add_rf_inner() - var i1 = t.add_rf_inner() - var i2 = t.add_rf_inner() - - i0.set_f1(12) - i0.set_f2(34) - i2.set_f1(12) - i2.set_f2(34) - - return t.to_bytes() - -func simple_all(t): - t.set_f_double(1.2340000152587890625e1) - t.set_f_float(1.2340000152587890625e1) - t.set_f_int32(1234) - t.set_f_int64(1234) - t.set_f_uint32(1234) - t.set_f_uint64(1234) - t.set_f_sint32(1234) - t.set_f_sint64(1234) - t.set_f_fixed32(1234) - t.set_f_fixed64(1234) - t.set_f_sfixed32(1234) - t.set_f_sfixed64(1234) - t.set_f_bool(false) - t.set_f_string("string value") - t.set_f_bytes([1, 2, 3, 4]) - t.add_f_map(1, 2) - t.add_f_map(1000, 2000) - t.set_f_oneof_f1("oneof value") - t.new_f_empty_out() - t.set_f_enum_out(P.Enum0.ONE) - t.new_f_empty_inner() - t.set_f_enum_inner(P.Test2.TestEnum.VALUE_1) - # ----- - t.add_rf_double(1.2340000152587890625e1) - t.add_rf_double(5.6779998779296875e1) - - t.add_rf_float(1.2340000152587890625e1) - t.add_rf_float(5.6779998779296875e1) - - t.add_rf_int32(1234) - t.add_rf_int32(5678) - - t.add_rf_int64(1234) - t.add_rf_int64(5678) - - t.add_rf_uint32(1234) - t.add_rf_uint32(5678) - - t.add_rf_uint64(1234) - t.add_rf_uint64(5678) - - t.add_rf_sint32(1234) - t.add_rf_sint32(5678) - - t.add_rf_sint64(1234) - t.add_rf_sint64(5678) - - t.add_rf_fixed32(1234) - t.add_rf_fixed32(5678) - - t.add_rf_fixed64(1234) - t.add_rf_fixed64(5678) - - t.add_rf_sfixed32(1234) - t.add_rf_sfixed32(5678) - - t.add_rf_sfixed64(1234) - t.add_rf_sfixed64(5678) - - t.add_rf_bool(false) - t.add_rf_bool(true) - t.add_rf_bool(false) - - t.add_rf_string("string value one") - t.add_rf_string("string value two") - - t.add_rf_bytes([1, 2, 3, 4]) - t.add_rf_bytes([5, 6, 7, 8]) - - t.add_rf_empty_out() - t.add_rf_empty_out() - t.add_rf_empty_out() - - t.add_rf_enum_out(P.Enum0.ONE) - t.add_rf_enum_out(P.Enum0.TWO) - t.add_rf_enum_out(P.Enum0.THREE) - - t.add_rf_empty_inner() - t.add_rf_empty_inner() - t.add_rf_empty_inner() - - t.add_rf_enum_inner(P.Test2.TestEnum.VALUE_1) - t.add_rf_enum_inner(P.Test2.TestEnum.VALUE_2) - t.add_rf_enum_inner(P.Test2.TestEnum.VALUE_3) - # ----- - t.add_rfu_double(1.2340000152587890625e1) - t.add_rfu_double(5.6779998779296875e1) - - t.add_rfu_float(1.2340000152587890625e1) - t.add_rfu_float(5.6779998779296875e1) - - t.add_rfu_int32(1234) - t.add_rfu_int32(5678) - - t.add_rfu_int64(1234) - t.add_rfu_int64(5678) - - t.add_rfu_uint32(1234) - t.add_rfu_uint32(5678) - - t.add_rfu_uint64(1234) - t.add_rfu_uint64(5678) - - t.add_rfu_sint32(1234) - t.add_rfu_sint32(5678) - - t.add_rfu_sint64(1234) - t.add_rfu_sint64(5678) - - t.add_rfu_fixed32(1234) - t.add_rfu_fixed32(5678) - - t.add_rfu_fixed64(1234) - t.add_rfu_fixed64(5678) - - t.add_rfu_sfixed32(1234) - t.add_rfu_sfixed32(5678) - - t.add_rfu_sfixed64(1234) - t.add_rfu_sfixed64(5678) - - t.add_rfu_bool(false) - t.add_rfu_bool(true) - t.add_rfu_bool(false) - - return t.to_bytes() - -####################### -######## Test2 ######## -####################### - -func test2_1(t): - - # repeated string - t.add_f1("test text-1") - t.add_f1("test text-2") - t.add_f1("test text-3") - - # fixed64 - t.set_f2(1234) - - # oneof string - t.set_f3("yet another text") - - # empty message - t.new_f5() - - return t.to_bytes() - -func test2_2(t): - - # Test2.TestInner3 - var f6 = t.new_f6() - var f6_f1 = f6.add_f1("one") - f6_f1.set_f1(111) - f6_f1.set_f2(1111) - f6_f1 = f6.add_f1("two") - f6_f1.set_f1(222) - f6_f1.set_f2(2222) - - f6.set_f2(P.Test2.TestEnum.VALUE_1) - - f6.new_f3() - - return t.to_bytes() - -func test2_3(t): - # repeated string - t.add_f1("test text-1") - t.add_f1("test text-2") - t.add_f1("test text-3") - - # fixed64 - t.set_f2(1234) - - # oneof - var f4 = t.new_f4() - var f4_f1 = f4.add_f1("one") - f4_f1.set_f1(111) - f4_f1.set_f2(1111) - - f4.set_f2(t.TestEnum.VALUE_1) - f4.new_f3() - - # empty message - t.new_f5() - - # Test2.TestInner3 - var f6 = t.new_f6() - var f6_f1 = f6.add_f1("two") - f6_f1.set_f1(111) - f6_f1.set_f2(1111) - - f6.set_f2(t.TestEnum.VALUE_1) - - f6.new_f3() - - # Test2.TestInner1 - var f7 = t.new_f7() - f7.add_f1(1.2340000152587890625e1) - f7.add_f1(5.6779998779296875e1) - - f7.set_f2(1.2340000152587890625e1) - - f7.set_f3("sample text") - - return t.to_bytes() - -func test2_4(t): - # Test2.TestInner3 - var f6 = t.new_f6() - var f6_f1 = f6.add_f1("one") - f6_f1.set_f1(111) - f6_f1.set_f2(1111) - f6_f1 = f6.add_f1("two") - f6_f1.set_f1(222) - f6_f1.set_f2(2222) - f6_f1 = f6.add_f1("one") - f6_f1.set_f1(333) - f6_f1.set_f2(3333) - f6_f1 = f6.add_f1("two") - f6_f1.set_f1(444) - f6_f1.set_f2(4444) - - return t.to_bytes() - -func test4(t): - t.set_f1(1234) - t.set_f2("hello") - t.set_f3(1.2340000152587890625e1) - t.set_f4(1.2340000152587890625e1) - return t.to_bytes() - -func test4_map(t): - t.add_f5(5, 6) - t.add_f5(1, 2) - t.add_f5(3, 4) - return t.to_bytes() - -func test4_map_dup(t): # 1, 10}, {2, 20}, {1, 20}, {2, 200 - t.add_f5(1, 10) - t.add_f5(2, 20) - t.add_f5(1, 20) - t.add_f5(2, 200) - return t.to_bytes() - -func test4_map_zero_key(t): - t.add_f5(0, 1) - return t.to_bytes() diff --git a/addons/protobuf/test/script/unit_tests_proto3.gd b/addons/protobuf/test/script/unit_tests_proto3.gd deleted file mode 100644 index b3b8048d..00000000 --- a/addons/protobuf/test/script/unit_tests_proto3.gd +++ /dev/null @@ -1,746 +0,0 @@ -# -# BSD 3-Clause License -# -# Copyright (c) 2018 - 2022, Kittenseater, Oleg Malyavkin -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# * Redistributions of source code must retain the above copyright notice, this -# list of conditions and the following disclaimer. -# -# * Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# * Neither the name of the copyright holder nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -extends Node - -const VERSION : String = "3" -var P -var Test - -func _init(path : String, compiled_file_path : String): - P = load(compiled_file_path) - Test = load(path + "/script/unit_tests_common.gd").new(P, path, VERSION) - -func exec_all(save_to_file) -> bool: - return Test.exec(self, save_to_file, [ - ["f_double", P.Test1], - ["f_float", P.Test1], - ["f_int32", P.Test1], - ["f_int64", P.Test1], - ["f_uint32", P.Test1], - ["f_uint64", P.Test1], - ["f_sint32", P.Test1], - ["f_sint64", P.Test1], - ["f_fixed32", P.Test1], - ["f_fixed64", P.Test1], - ["f_sfixed32", P.Test1], - ["f_sfixed64", P.Test1], - ["f_bool", P.Test1], - ["f_string", P.Test1], - ["f_bytes", P.Test1], - ["f_map", P.Test1, 1], - ["f_oneof_f1", P.Test1], - ["f_oneof_f2", P.Test1], - ["f_empty_out", P.Test1], - ["f_enum_out", P.Test1], - ["f_empty_inner", P.Test1], - ["f_enum_inner", P.Test1], - - ["rf_double", P.Test1], - ["rf_float", P.Test1], - ["rf_int32", P.Test1], - ["rf_int32_with_clear", P.Test1], - ["rf_int64", P.Test1], - ["rf_uint32", P.Test1], - ["rf_uint64", P.Test1], - ["rf_sint32", P.Test1], - ["rf_sint64", P.Test1], - ["rf_fixed32", P.Test1], - ["rf_fixed64", P.Test1], - ["rf_sfixed32", P.Test1], - ["rf_sfixed64", P.Test1], - ["rf_bool", P.Test1], - ["rf_string", P.Test1], - ["rf_bytes", P.Test1], - ["rf_empty_out", P.Test1], - ["rf_enum_out", P.Test1], - ["rf_empty_inner", P.Test1], - ["rf_enum_inner", P.Test1], - - ["rf_double_empty", P.Test1], - ["rf_float_empty", P.Test1], - ["rf_int32_empty", P.Test1], - ["rf_int64_empty", P.Test1], - ["rf_uint32_empty", P.Test1], - ["rf_uint64_empty", P.Test1], - ["rf_sint32_empty", P.Test1], - ["rf_sint64_empty", P.Test1], - ["rf_fixed32_empty", P.Test1], - ["rf_fixed64_empty", P.Test1], - ["rf_sfixed32_empty", P.Test1], - ["rf_sfixed64_empty", P.Test1], - ["rf_bool_empty", P.Test1], - ["rf_string_empty", P.Test1], - ["rf_bytes_empty", P.Test1], - - ["rfu_double", P.Test1], - ["rfu_float", P.Test1], - ["rfu_int32", P.Test1], - ["rfu_int64", P.Test1], - ["rfu_uint32", P.Test1], - ["rfu_uint64", P.Test1], - ["rfu_sint32", P.Test1], - ["rfu_sint64", P.Test1], - ["rfu_fixed32", P.Test1], - ["rfu_fixed64", P.Test1], - ["rfu_sfixed32", P.Test1], - ["rfu_sfixed64", P.Test1], - ["rfu_bool", P.Test1], - - ["f_int32_default", P.Test1], - ["f_string_default", P.Test1], - ["f_bytes_default", P.Test1], - ["test2_testinner3_testinner32", P.Test2.TestInner3.TestInner3_2], - ["test2_testinner3_testinner32_empty", P.Test2.TestInner3.TestInner3_2], - ["rf_inner_ene", P.Test1], - ["rf_inner_nen", P.Test1], - - ["simple_all", P.Test1, 1], - - ["test2_1", P.Test2], - ["test2_2", P.Test2, 1], - ["test2_3", P.Test2], - ["test2_4", P.Test2, 1], - - ["test4", P.Test4], - ["test4_map", P.Test4, 1, 2, 3, 4, 5], - ["test4_map_dup", P.Test4], - ["test4_map_zero_key", P.Test4] - ]) - - -####################### -######## Test1 ######## -####################### - -# single values # -func f_double(t): - t.set_f_double(1.2340000152587890625e1) - return t.to_bytes() - -func f_float(t): - t.set_f_float(1.2340000152587890625e1) - return t.to_bytes() - -func f_int32(t): - t.set_f_int32(1234) - return t.to_bytes() - -func f_int64(t): - t.set_f_int64(1234) - return t.to_bytes() - -func f_uint32(t): - t.set_f_uint32(1234) - return t.to_bytes() - -func f_uint64(t): - t.set_f_uint64(1234) - return t.to_bytes() - -func f_sint32(t): - t.set_f_sint32(1234) - return t.to_bytes() - -func f_sint64(t): - t.set_f_sint64(1234) - return t.to_bytes() - -func f_fixed32(t): - t.set_f_fixed32(1234) - return t.to_bytes() - -func f_fixed64(t): - t.set_f_fixed64(1234) - return t.to_bytes() - -func f_sfixed32(t): - t.set_f_sfixed32(1234) - return t.to_bytes() - -func f_sfixed64(t): - t.set_f_sfixed64(1234) - return t.to_bytes() - -func f_bool(t): - t.set_f_bool(false) - return t.to_bytes() - -func f_string(t): - t.set_f_string("string value") - return t.to_bytes() - -func f_bytes(t): - t.set_f_bytes([1, 2, 3, 4]) - return t.to_bytes() - -func f_map(t): - t.add_f_map(1, 2) - t.add_f_map(1000, 2000) - return t.to_bytes() - -func f_oneof_f1(t): - t.set_f_oneof_f1("oneof value") - return t.to_bytes() - -func f_oneof_f2(t): - t.set_f_oneof_f2(1234) - return t.to_bytes() - -func f_empty_out(t): - t.new_f_empty_out() - return t.to_bytes() - -func f_enum_out(t): - t.set_f_enum_out(P.Enum0.ONE) - return t.to_bytes() - -func f_empty_inner(t): - t.new_f_empty_inner() - return t.to_bytes() - -func f_enum_inner(t): - t.set_f_enum_inner(P.Test2.TestEnum.VALUE_1) - return t.to_bytes() - -# repeated values # -func rf_double(t): - t.add_rf_double(1.2340000152587890625e1) - t.add_rf_double(5.6779998779296875e1) - return t.to_bytes() - -func rf_float(t): - t.add_rf_float(1.2340000152587890625e1) - t.add_rf_float(5.6779998779296875e1) - return t.to_bytes() - -func rf_int32(t): - t.add_rf_int32(1234) - t.add_rf_int32(5678) - return t.to_bytes() - -func rf_int32_with_clear(t): - t.add_rf_int32(10) - t.add_rf_int32(20) - t.clear_rf_int32() - t.add_rf_int32(1234) - t.add_rf_int32(5678) - return t.to_bytes() - -func rf_int64(t): - t.add_rf_int64(1234) - t.add_rf_int64(5678) - return t.to_bytes() - -func rf_uint32(t): - t.add_rf_uint32(1234) - t.add_rf_uint32(5678) - return t.to_bytes() - -func rf_uint64(t): - t.add_rf_uint64(1234) - t.add_rf_uint64(5678) - return t.to_bytes() - -func rf_sint32(t): - t.add_rf_sint32(1234) - t.add_rf_sint32(5678) - return t.to_bytes() - -func rf_sint64(t): - t.add_rf_sint64(1234) - t.add_rf_sint64(5678) - return t.to_bytes() - -func rf_fixed32(t): - t.add_rf_fixed32(1234) - t.add_rf_fixed32(5678) - return t.to_bytes() - -func rf_fixed64(t): - t.add_rf_fixed64(1234) - t.add_rf_fixed64(5678) - return t.to_bytes() - -func rf_sfixed32(t): - t.add_rf_sfixed32(1234) - t.add_rf_sfixed32(5678) - return t.to_bytes() - -func rf_sfixed64(t): - t.add_rf_sfixed64(1234) - t.add_rf_sfixed64(5678) - return t.to_bytes() - -func rf_bool(t): - t.add_rf_bool(false) - t.add_rf_bool(true) - t.add_rf_bool(false) - return t.to_bytes() - -func rf_string(t): - t.add_rf_string("string value one") - t.add_rf_string("string value two") - return t.to_bytes() - -func rf_bytes(t): - t.add_rf_bytes([1, 2, 3, 4]) - t.add_rf_bytes([5, 6, 7, 8]) - return t.to_bytes() - -func rf_empty_out(t): - t.add_rf_empty_out() - t.add_rf_empty_out() - t.add_rf_empty_out() - return t.to_bytes() - -func rf_enum_out(t): - t.add_rf_enum_out(P.Enum0.ONE) - t.add_rf_enum_out(P.Enum0.TWO) - t.add_rf_enum_out(P.Enum0.THREE) - return t.to_bytes() - -func rf_empty_inner(t): - t.add_rf_empty_inner() - t.add_rf_empty_inner() - t.add_rf_empty_inner() - return t.to_bytes() - -func rf_enum_inner(t): - t.add_rf_enum_inner(P.Test2.TestEnum.VALUE_1) - t.add_rf_enum_inner(P.Test2.TestEnum.VALUE_2) - t.add_rf_enum_inner(P.Test2.TestEnum.VALUE_3) - return t.to_bytes() - -func rf_double_empty(t): - return t.to_bytes() - -func rf_float_empty(t): - return t.to_bytes() - -func rf_int32_empty(t): - return t.to_bytes() - -func rf_int64_empty(t): - return t.to_bytes() - -func rf_uint32_empty(t): - return t.to_bytes() - -func rf_uint64_empty(t): - return t.to_bytes() - -func rf_sint32_empty(t): - return t.to_bytes() - -func rf_sint64_empty(t): - return t.to_bytes() - -func rf_fixed32_empty(t): - return t.to_bytes() - -func rf_fixed64_empty(t): - return t.to_bytes() - -func rf_sfixed32_empty(t): - return t.to_bytes() - -func rf_sfixed64_empty(t): - return t.to_bytes() - -func rf_bool_empty(t): - return t.to_bytes() - -func rf_string_empty(t): - return t.to_bytes() - -func rf_bytes_empty(t): - return t.to_bytes() - -func rfu_double(t): - t.add_rfu_double(1.2340000152587890625e1) - t.add_rfu_double(5.6779998779296875e1) - return t.to_bytes() - -func rfu_float(t): - t.add_rfu_float(1.2340000152587890625e1) - t.add_rfu_float(5.6779998779296875e1) - return t.to_bytes() - -func rfu_int32(t): - t.add_rfu_int32f(1234) - t.add_rfu_int32f(5678) - return t.to_bytes() - -func rfu_int64(t): - t.add_rfu_int64f(1234) - t.add_rfu_int64f(5678) - return t.to_bytes() - -func rfu_uint32(t): - t.add_rfu_uint32(1234) - t.add_rfu_uint32(5678) - return t.to_bytes() - -func rfu_uint64(t): - t.add_rfu_uint64(1234) - t.add_rfu_uint64(5678) - return t.to_bytes() - -func rfu_sint32(t): - t.add_rfu_sint32(1234) - t.add_rfu_sint32(5678) - return t.to_bytes() - -func rfu_sint64(t): - t.add_rfu_sint64(1234) - t.add_rfu_sint64(5678) - return t.to_bytes() - -func rfu_fixed32(t): - t.add_rfu_fixed32(1234) - t.add_rfu_fixed32(5678) - return t.to_bytes() - -func rfu_fixed64(t): - t.add_rfu_fixed64(1234) - t.add_rfu_fixed64(5678) - return t.to_bytes() - -func rfu_sfixed32(t): - t.add_rfu_sfixed32(1234) - t.add_rfu_sfixed32(5678) - return t.to_bytes() - -func rfu_sfixed64(t): - t.add_rfu_sfixed64(1234) - t.add_rfu_sfixed64(5678) - return t.to_bytes() - -func rfu_bool(t): - t.add_rfu_bool(false) - t.add_rfu_bool(true) - t.add_rfu_bool(false) - return t.to_bytes() - -func f_int32_default(t): - t.set_f_int32(0) - return t.to_bytes() - -func f_string_default(t): - t.set_f_string("") - return t.to_bytes() - -func f_bytes_default(t): - t.set_f_bytes([]) - return t.to_bytes() - -func test2_testinner3_testinner32(t): - t.set_f1(12) - t.set_f2(34) - return t.to_bytes() - -func test2_testinner3_testinner32_empty(t): - return t.to_bytes() - -func rf_inner_ene(t): - var i0 = t.add_rf_inner() - var i1 = t.add_rf_inner() - var i2 = t.add_rf_inner() - - i1.set_f1(12) - i1.set_f2(34) - - return t.to_bytes() - -func rf_inner_nen(t): - var i0 = t.add_rf_inner() - var i1 = t.add_rf_inner() - var i2 = t.add_rf_inner() - - i0.set_f1(12) - i0.set_f2(34) - i2.set_f1(12) - i2.set_f2(34) - - return t.to_bytes() - -func simple_all(t): - t.set_f_double(1.2340000152587890625e1) - t.set_f_float(1.2340000152587890625e1) - t.set_f_int32(1234) - t.set_f_int64(1234) - t.set_f_uint32(1234) - t.set_f_uint64(1234) - t.set_f_sint32(1234) - t.set_f_sint64(1234) - t.set_f_fixed32(1234) - t.set_f_fixed64(1234) - t.set_f_sfixed32(1234) - t.set_f_sfixed64(1234) - t.set_f_bool(false) - t.set_f_string("string value") - t.set_f_bytes([1, 2, 3, 4]) - t.add_f_map(1, 2) - t.add_f_map(1000, 2000) - t.set_f_oneof_f1("oneof value") - t.new_f_empty_out() - t.set_f_enum_out(P.Enum0.ONE) - t.new_f_empty_inner() - t.set_f_enum_inner(P.Test2.TestEnum.VALUE_1) - # ----- - t.add_rf_double(1.2340000152587890625e1) - t.add_rf_double(5.6779998779296875e1) - - t.add_rf_float(1.2340000152587890625e1) - t.add_rf_float(5.6779998779296875e1) - - t.add_rf_int32(1234) - t.add_rf_int32(5678) - - t.add_rf_int64(1234) - t.add_rf_int64(5678) - - t.add_rf_uint32(1234) - t.add_rf_uint32(5678) - - t.add_rf_uint64(1234) - t.add_rf_uint64(5678) - - t.add_rf_sint32(1234) - t.add_rf_sint32(5678) - - t.add_rf_sint64(1234) - t.add_rf_sint64(5678) - - t.add_rf_fixed32(1234) - t.add_rf_fixed32(5678) - - t.add_rf_fixed64(1234) - t.add_rf_fixed64(5678) - - t.add_rf_sfixed32(1234) - t.add_rf_sfixed32(5678) - - t.add_rf_sfixed64(1234) - t.add_rf_sfixed64(5678) - - t.add_rf_bool(false) - t.add_rf_bool(true) - t.add_rf_bool(false) - - t.add_rf_string("string value one") - t.add_rf_string("string value two") - - t.add_rf_bytes([1, 2, 3, 4]) - t.add_rf_bytes([5, 6, 7, 8]) - - t.add_rf_empty_out() - t.add_rf_empty_out() - t.add_rf_empty_out() - - t.add_rf_enum_out(P.Enum0.ONE) - t.add_rf_enum_out(P.Enum0.TWO) - t.add_rf_enum_out(P.Enum0.THREE) - - t.add_rf_empty_inner() - t.add_rf_empty_inner() - t.add_rf_empty_inner() - - t.add_rf_enum_inner(P.Test2.TestEnum.VALUE_1) - t.add_rf_enum_inner(P.Test2.TestEnum.VALUE_2) - t.add_rf_enum_inner(P.Test2.TestEnum.VALUE_3) - # ----- - t.add_rfu_double(1.2340000152587890625e1) - t.add_rfu_double(5.6779998779296875e1) - - t.add_rfu_float(1.2340000152587890625e1) - t.add_rfu_float(5.6779998779296875e1) - - t.add_rfu_int32f(1234) - t.add_rfu_int32f(5678) - - t.add_rfu_int64f(1234) - t.add_rfu_int64f(5678) - - t.add_rfu_uint32(1234) - t.add_rfu_uint32(5678) - - t.add_rfu_uint64(1234) - t.add_rfu_uint64(5678) - - t.add_rfu_sint32(1234) - t.add_rfu_sint32(5678) - - t.add_rfu_sint64(1234) - t.add_rfu_sint64(5678) - - t.add_rfu_fixed32(1234) - t.add_rfu_fixed32(5678) - - t.add_rfu_fixed64(1234) - t.add_rfu_fixed64(5678) - - t.add_rfu_sfixed32(1234) - t.add_rfu_sfixed32(5678) - - t.add_rfu_sfixed64(1234) - t.add_rfu_sfixed64(5678) - - t.add_rfu_bool(false) - t.add_rfu_bool(true) - t.add_rfu_bool(false) - - return t.to_bytes() - -####################### -######## Test2 ######## -####################### - -func test2_1(t): - - # repeated string - t.add_f1("test text-1") - t.add_f1("test text-2") - t.add_f1("test text-3") - - # fixed64 - t.set_f2(1234) - - # oneof string - t.set_f3("yet another text") - - # empty message - t.new_f5() - - return t.to_bytes() - -func test2_2(t): - - # Test2.TestInner3 - var f6 = t.new_f6() - var f6_f1 = f6.add_f1("one") - f6_f1.set_f1(111) - f6_f1.set_f2(1111) - f6_f1 = f6.add_f1("two") - f6_f1.set_f1(222) - f6_f1.set_f2(2222) - - f6.set_f2(P.Test2.TestEnum.VALUE_1) - - f6.new_f3() - - return t.to_bytes() - -func test2_3(t): - # repeated string - t.add_f1("test text-1") - t.add_f1("test text-2") - t.add_f1("test text-3") - - # fixed64 - t.set_f2(1234) - - # oneof - var f4 = t.new_f4() - var f4_f1 = f4.add_f1("one") - f4_f1.set_f1(111) - f4_f1.set_f2(1111) - - f4.set_f2(t.TestEnum.VALUE_1) - f4.new_f3() - - # empty message - t.new_f5() - - # Test2.TestInner3 - var f6 = t.new_f6() - var f6_f1 = f6.add_f1("two") - f6_f1.set_f1(111) - f6_f1.set_f2(1111) - - f6.set_f2(t.TestEnum.VALUE_1) - - f6.new_f3() - - # Test2.TestInner1 - var f7 = t.new_f7() - f7.add_f1(1.2340000152587890625e1) - f7.add_f1(5.6779998779296875e1) - - f7.set_f2(1.2340000152587890625e1) - - f7.set_f3("sample text") - - return t.to_bytes() - -func test2_4(t): - # Test2.TestInner3 - var f6 = t.new_f6() - var f6_f1 = f6.add_f1("one") - f6_f1.set_f1(111) - f6_f1.set_f2(1111) - f6_f1 = f6.add_f1("two") - f6_f1.set_f1(222) - f6_f1.set_f2(2222) - f6_f1 = f6.add_f1("one") - f6_f1.set_f1(333) - f6_f1.set_f2(3333) - f6_f1 = f6.add_f1("two") - f6_f1.set_f1(444) - f6_f1.set_f2(4444) - - return t.to_bytes() - -func test4(t): - t.set_f1(1234) - t.set_f2("hello") - t.set_f3(1.2340000152587890625e1) - t.set_f4(1.2340000152587890625e1) - return t.to_bytes() - -func test4_map(t): - t.add_f5(5, 6) - t.add_f5(1, 2) - t.add_f5(3, 4) - return t.to_bytes() - -func test4_map_dup(t): # 1, 10}, {2, 20}, {1, 20}, {2, 200 - t.add_f5(1, 10) - t.add_f5(2, 20) - t.add_f5(1, 20) - t.add_f5(2, 200) - return t.to_bytes() - -func test4_map_zero_key(t): - t.add_f5(0, 1) - return t.to_bytes() diff --git a/addons/protobuf/test/source/pbtest2.proto b/addons/protobuf/test/source/pbtest2.proto deleted file mode 100644 index 2e165dcf..00000000 --- a/addons/protobuf/test/source/pbtest2.proto +++ /dev/null @@ -1,159 +0,0 @@ -syntax="proto2"; - -message Test0 { - -} - -enum Enum0 { - NULL = 0; - ONE = 1; - TWO = 2; - THREE = 3; - FOUR = 4; -} - -message Test1 { - optional double f_double = 1; - optional float f_float = 2; - optional int32 f_int32 = 3; - optional int64 f_int64 = 4; - optional uint32 f_uint32 = 5; - optional uint64 f_uint64 = 6; - optional sint32 f_sint32 = 7; - optional sint64 f_sint64 = 8; - optional fixed32 f_fixed32 = 9; - optional fixed64 f_fixed64 = 10; - optional sfixed32 f_sfixed32 = 11; - optional sfixed64 f_sfixed64 = 12; - optional bool f_bool = 13; - optional string f_string = 14; - optional bytes f_bytes = 15; - map f_map = 16; - oneof f_oneof { - string f_oneof_f1 = 17; - int32 f_oneof_f2 = 18; - } - optional Test0 f_empty_out = 19; - optional Enum0 f_enum_out = 20; - optional Test2.TestInner2 f_empty_inner = 21; - optional Test2.TestEnum f_enum_inner = 22; - - repeated double rf_double = 23; - repeated float rf_float = 24; - repeated int32 rf_int32 = 25; - repeated int64 rf_int64 = 26; - repeated uint32 rf_uint32 = 27; - repeated uint64 rf_uint64 = 28; - repeated sint32 rf_sint32 = 29; - repeated sint64 rf_sint64 = 30; - repeated fixed32 rf_fixed32 = 31; - repeated fixed64 rf_fixed64 = 32; - repeated sfixed32 rf_sfixed32 = 33; - repeated sfixed64 rf_sfixed64 = 34; - repeated bool rf_bool = 35; - repeated string rf_string = 36; - repeated bytes rf_bytes = 37; - - repeated Test0 rf_empty_out = 38; - repeated Enum0 rf_enum_out = 39; - repeated Test2.TestInner2 rf_empty_inner = 40; - repeated Test2.TestEnum rf_enum_inner = 41; - - repeated double rfu_double = 42 [packed = true]; - repeated float rfu_float = 43 [packed = true]; - repeated int32 rfu_int32 = 44 [packed = true]; - repeated int64 rfu_int64 = 45 [packed = true]; - repeated uint32 rfu_uint32 = 46 [packed = true]; - repeated uint64 rfu_uint64 = 47 [packed = true]; - repeated sint32 rfu_sint32 = 48 [packed = true]; - repeated sint64 rfu_sint64 = 49 [packed = true]; - repeated fixed32 rfu_fixed32 = 50 [packed = true]; - repeated fixed64 rfu_fixed64 = 51 [packed = true]; - repeated sfixed32 rfu_sfixed32 = 52 [packed = true]; - repeated sfixed64 rfu_sfixed64 = 53 [packed = true]; - repeated bool rfu_bool = 54 [packed = true]; - - repeated Test2.TestInner3.TestInner3_2 rf_inner = 55; -} - -message Test2 { - enum TestEnum { - VALUE_0 = 0; - VALUE_1 = 1; - VALUE_2 = 2; - VALUE_3 = 3; - } - - message TestInner1 { - repeated double f1 = 1; - optional float f2 = 2; - optional string f3 = 3; - } - - message TestInner2 { } - - message TestInner3 { - message TestInner3_1 { } - message TestInner3_2 { - optional int32 f1 = 1; - optional uint64 f2 = 2; - } - - map f1 = 1; - optional TestEnum f2 = 2; - optional TestInner3_1 f3 = 3; - } - - repeated string f1 = 1; - optional fixed64 f2 = 2; - oneof test_oneof { - string f3 = 3; - TestInner3 f4 = 4; - } - optional TestInner2 f5 = 5; - optional TestInner3 f6 = 6; - optional TestInner1 f7 = 7; -} - -message Test3 { - message InnerReq { - required int32 f1 = 1; - } - - message InnerOpt { - optional int32 f1 = 1; - } - - message InnerRep { - repeated int32 f1 = 1; - } - - required int32 f_req_int32 = 1; - required float f_req_float = 2; - required string f_req_string = 3; - required InnerReq f_req_inner_req = 4; - required InnerOpt f_req_inner_opt = 5; - required InnerRep f_req_inner_rep = 6; - - optional int32 f_opt_int32 = 7; - optional float f_opt_float = 8; - optional string f_opt_string = 9; - optional InnerReq f_opt_inner_req = 10; - optional InnerOpt f_opt_inner_opt = 11; - optional InnerRep f_opt_inner_rep = 12; - - repeated int32 f_rep_int32 = 13; - repeated float f_rep_float = 14; - repeated string f_rep_string = 15; - repeated InnerReq f_rep_inner_req = 16; - repeated InnerOpt f_rep_inner_opt = 17; - repeated InnerRep f_rep_inner_rep = 18; -} - -message Test4 { - optional int32 f1 = 10; - optional string f2 = 3; - optional float f3 = 2; - optional double f4 = 160; - map f5 = 99; -} \ No newline at end of file diff --git a/addons/protobuf/test/source/pbtest3.proto b/addons/protobuf/test/source/pbtest3.proto deleted file mode 100644 index 2ac743aa..00000000 --- a/addons/protobuf/test/source/pbtest3.proto +++ /dev/null @@ -1,124 +0,0 @@ -syntax="proto3"; - -message Test0 { - -} - -enum Enum0 { - NULL = 0; - ONE = 1; - TWO = 2; - THREE = 3; - FOUR = 4; -} - -message Test1 { - double f_double = 1; - float f_float = 2; - int32 f_int32 = 3; - int64 f_int64 = 4; - uint32 f_uint32 = 5; - uint64 f_uint64 = 6; - sint32 f_sint32 = 7; - sint64 f_sint64 = 8; - fixed32 f_fixed32 = 9; - fixed64 f_fixed64 = 10; - sfixed32 f_sfixed32 = 11; - sfixed64 f_sfixed64 = 12; - bool f_bool = 13; - string f_string = 14; - bytes f_bytes = 15; - map f_map = 16; - oneof f_oneof { - string f_oneof_f1 = 17; - int32 f_oneof_f2 = 18; - } - Test0 f_empty_out = 19; - Enum0 f_enum_out = 20; - Test2.TestInner2 f_empty_inner = 21; - Test2.TestEnum f_enum_inner = 22; - - repeated double rf_double = 23; - repeated float rf_float = 24; - repeated int32 rf_int32 = 25; - repeated int64 rf_int64 = 26; - repeated uint32 rf_uint32 = 27; - repeated uint64 rf_uint64 = 28; - repeated sint32 rf_sint32 = 29; - repeated sint64 rf_sint64 = 30; - repeated fixed32 rf_fixed32 = 31; - repeated fixed64 rf_fixed64 = 32; - repeated sfixed32 rf_sfixed32 = 33; - repeated sfixed64 rf_sfixed64 = 34; - repeated bool rf_bool = 35; - repeated string rf_string = 36; - repeated bytes rf_bytes = 37; - - repeated Test0 rf_empty_out = 38; - repeated Enum0 rf_enum_out = 39; - repeated Test2.TestInner2 rf_empty_inner = 40; - repeated Test2.TestEnum rf_enum_inner = 41; - - repeated double rfu_double = 42 [packed = false]; - repeated float rfu_float = 43 [packed = false]; - repeated int32 rfu_int32f = 44 [packed = false]; - repeated int64 rfu_int64f = 45 [packed = false]; - repeated uint32 rfu_uint32 = 46 [packed = false]; - repeated uint64 rfu_uint64 = 47 [packed = false]; - repeated sint32 rfu_sint32 = 48 [packed = false]; - repeated sint64 rfu_sint64 = 49 [packed = false]; - repeated fixed32 rfu_fixed32 = 50 [packed = false]; - repeated fixed64 rfu_fixed64 = 51 [packed = false]; - repeated sfixed32 rfu_sfixed32 = 52 [packed = false]; - repeated sfixed64 rfu_sfixed64 = 53 [packed = false]; - repeated bool rfu_bool = 54 [packed = false]; - - repeated Test2.TestInner3.TestInner3_2 rf_inner = 55; -} - -message Test2 { - enum TestEnum { - VALUE_0 = 0; - VALUE_1 = 1; - VALUE_2 = 2; - VALUE_3 = 3; - } - - message TestInner1 { - repeated double f1 = 1; - float f2 = 2; - string f3 = 3; - } - - message TestInner2 { } - - message TestInner3 { - message TestInner3_1 { } - message TestInner3_2 { - int32 f1 = 1; - uint64 f2 = 2; - } - - map f1 = 1; - TestEnum f2 = 2; - TestInner3_1 f3 = 3; - } - - repeated string f1 = 1; - fixed64 f2 = 2; - oneof test_oneof { - string f3 = 3; - TestInner3 f4 = 4; - } - TestInner2 f5 = 5; - TestInner3 f6 = 6; - TestInner1 f7 = 7; -} - -message Test4 { - int32 f1 = 10; - string f2 = 3; - float f3 = 2; - double f4 = 160; - map f5 = 99; -} diff --git a/addons/protobuf/test/temp/proto3.gd b/addons/protobuf/test/temp/proto3.gd deleted file mode 100644 index 84259529..00000000 --- a/addons/protobuf/test/temp/proto3.gd +++ /dev/null @@ -1,2241 +0,0 @@ -const PROTO_VERSION = 3 - -# -# BSD 3-Clause License -# -# Copyright (c) 2018 - 2022, Oleg Malyavkin -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# * Redistributions of source code must retain the above copyright notice, this -# list of conditions and the following disclaimer. -# -# * Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# * Neither the name of the copyright holder nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# DEBUG_TAB redefine this " " if you need, example: const DEBUG_TAB = "\t" -const DEBUG_TAB : String = " " - -enum PB_ERR { - NO_ERRORS = 0, - VARINT_NOT_FOUND = -1, - REPEATED_COUNT_NOT_FOUND = -2, - REPEATED_COUNT_MISMATCH = -3, - LENGTHDEL_SIZE_NOT_FOUND = -4, - LENGTHDEL_SIZE_MISMATCH = -5, - PACKAGE_SIZE_MISMATCH = -6, - UNDEFINED_STATE = -7, - PARSE_INCOMPLETE = -8, - REQUIRED_FIELDS = -9 -} - -enum PB_DATA_TYPE { - INT32 = 0, - SINT32 = 1, - UINT32 = 2, - INT64 = 3, - SINT64 = 4, - UINT64 = 5, - BOOL = 6, - ENUM = 7, - FIXED32 = 8, - SFIXED32 = 9, - FLOAT = 10, - FIXED64 = 11, - SFIXED64 = 12, - DOUBLE = 13, - STRING = 14, - BYTES = 15, - MESSAGE = 16, - MAP = 17 -} - -const DEFAULT_VALUES_2 = { - PB_DATA_TYPE.INT32: null, - PB_DATA_TYPE.SINT32: null, - PB_DATA_TYPE.UINT32: null, - PB_DATA_TYPE.INT64: null, - PB_DATA_TYPE.SINT64: null, - PB_DATA_TYPE.UINT64: null, - PB_DATA_TYPE.BOOL: null, - PB_DATA_TYPE.ENUM: null, - PB_DATA_TYPE.FIXED32: null, - PB_DATA_TYPE.SFIXED32: null, - PB_DATA_TYPE.FLOAT: null, - PB_DATA_TYPE.FIXED64: null, - PB_DATA_TYPE.SFIXED64: null, - PB_DATA_TYPE.DOUBLE: null, - PB_DATA_TYPE.STRING: null, - PB_DATA_TYPE.BYTES: null, - PB_DATA_TYPE.MESSAGE: null, - PB_DATA_TYPE.MAP: null -} - -const DEFAULT_VALUES_3 = { - PB_DATA_TYPE.INT32: 0, - PB_DATA_TYPE.SINT32: 0, - PB_DATA_TYPE.UINT32: 0, - PB_DATA_TYPE.INT64: 0, - PB_DATA_TYPE.SINT64: 0, - PB_DATA_TYPE.UINT64: 0, - PB_DATA_TYPE.BOOL: false, - PB_DATA_TYPE.ENUM: 0, - PB_DATA_TYPE.FIXED32: 0, - PB_DATA_TYPE.SFIXED32: 0, - PB_DATA_TYPE.FLOAT: 0.0, - PB_DATA_TYPE.FIXED64: 0, - PB_DATA_TYPE.SFIXED64: 0, - PB_DATA_TYPE.DOUBLE: 0.0, - PB_DATA_TYPE.STRING: "", - PB_DATA_TYPE.BYTES: [], - PB_DATA_TYPE.MESSAGE: null, - PB_DATA_TYPE.MAP: [] -} - -enum PB_TYPE { - VARINT = 0, - FIX64 = 1, - LENGTHDEL = 2, - STARTGROUP = 3, - ENDGROUP = 4, - FIX32 = 5, - UNDEFINED = 8 -} - -enum PB_RULE { - OPTIONAL = 0, - REQUIRED = 1, - REPEATED = 2, - RESERVED = 3 -} - -enum PB_SERVICE_STATE { - FILLED = 0, - UNFILLED = 1 -} - -class PBField: - func _init(a_name : String, a_type : int, a_rule : int, a_tag : int, packed : bool, a_value = null): - name = a_name - type = a_type - rule = a_rule - tag = a_tag - option_packed = packed - value = a_value - - var name : String - var type : int - var rule : int - var tag : int - var option_packed : bool - var value - var is_map_field : bool = false - var option_default : bool = false - -class PBTypeTag: - var ok : bool = false - var type : int - var tag : int - var offset : int - -class PBServiceField: - var field : PBField - var func_ref = null - var state : int = PB_SERVICE_STATE.UNFILLED - -class PBPacker: - static func convert_signed(n : int) -> int: - if n < -2147483648: - return (n << 1) ^ (n >> 63) - else: - return (n << 1) ^ (n >> 31) - - static func deconvert_signed(n : int) -> int: - if n & 0x01: - return ~(n >> 1) - else: - return (n >> 1) - - static func pack_varint(value) -> PoolByteArray: - var varint : PoolByteArray = PoolByteArray() - if typeof(value) == TYPE_BOOL: - if value: - value = 1 - else: - value = 0 - for _i in range(9): - var b = value & 0x7F - value >>= 7 - if value: - varint.append(b | 0x80) - else: - varint.append(b) - break - if varint.size() == 9 && varint[8] == 0xFF: - varint.append(0x01) - return varint - - static func pack_bytes(value, count : int, data_type : int) -> PoolByteArray: - var bytes : PoolByteArray = PoolByteArray() - if data_type == PB_DATA_TYPE.FLOAT: - var spb : StreamPeerBuffer = StreamPeerBuffer.new() - spb.put_float(value) - bytes = spb.get_data_array() - elif data_type == PB_DATA_TYPE.DOUBLE: - var spb : StreamPeerBuffer = StreamPeerBuffer.new() - spb.put_double(value) - bytes = spb.get_data_array() - else: - for _i in range(count): - bytes.append(value & 0xFF) - value >>= 8 - return bytes - - static func unpack_bytes(bytes : PoolByteArray, index : int, count : int, data_type : int): - var value = 0 - if data_type == PB_DATA_TYPE.FLOAT: - var spb : StreamPeerBuffer = StreamPeerBuffer.new() - for i in range(index, count + index): - spb.put_u8(bytes[i]) - spb.seek(0) - value = spb.get_float() - elif data_type == PB_DATA_TYPE.DOUBLE: - var spb : StreamPeerBuffer = StreamPeerBuffer.new() - for i in range(index, count + index): - spb.put_u8(bytes[i]) - spb.seek(0) - value = spb.get_double() - else: - for i in range(index + count - 1, index - 1, -1): - value |= (bytes[i] & 0xFF) - if i != index: - value <<= 8 - return value - - static func unpack_varint(varint_bytes) -> int: - var value : int = 0 - for i in range(varint_bytes.size() - 1, -1, -1): - value |= varint_bytes[i] & 0x7F - if i != 0: - value <<= 7 - return value - - static func pack_type_tag(type : int, tag : int) -> PoolByteArray: - return pack_varint((tag << 3) | type) - - static func isolate_varint(bytes : PoolByteArray, index : int) -> PoolByteArray: - var result : PoolByteArray = PoolByteArray() - for i in range(index, bytes.size()): - result.append(bytes[i]) - if !(bytes[i] & 0x80): - break - return result - - static func unpack_type_tag(bytes : PoolByteArray, index : int) -> PBTypeTag: - var varint_bytes : PoolByteArray = isolate_varint(bytes, index) - var result : PBTypeTag = PBTypeTag.new() - if varint_bytes.size() != 0: - result.ok = true - result.offset = varint_bytes.size() - var unpacked : int = unpack_varint(varint_bytes) - result.type = unpacked & 0x07 - result.tag = unpacked >> 3 - return result - - static func pack_length_delimeted(type : int, tag : int, bytes : PoolByteArray) -> PoolByteArray: - var result : PoolByteArray = pack_type_tag(type, tag) - result.append_array(pack_varint(bytes.size())) - result.append_array(bytes) - return result - - static func pb_type_from_data_type(data_type : int) -> int: - if data_type == PB_DATA_TYPE.INT32 || data_type == PB_DATA_TYPE.SINT32 || data_type == PB_DATA_TYPE.UINT32 || data_type == PB_DATA_TYPE.INT64 || data_type == PB_DATA_TYPE.SINT64 || data_type == PB_DATA_TYPE.UINT64 || data_type == PB_DATA_TYPE.BOOL || data_type == PB_DATA_TYPE.ENUM: - return PB_TYPE.VARINT - elif data_type == PB_DATA_TYPE.FIXED32 || data_type == PB_DATA_TYPE.SFIXED32 || data_type == PB_DATA_TYPE.FLOAT: - return PB_TYPE.FIX32 - elif data_type == PB_DATA_TYPE.FIXED64 || data_type == PB_DATA_TYPE.SFIXED64 || data_type == PB_DATA_TYPE.DOUBLE: - return PB_TYPE.FIX64 - elif data_type == PB_DATA_TYPE.STRING || data_type == PB_DATA_TYPE.BYTES || data_type == PB_DATA_TYPE.MESSAGE || data_type == PB_DATA_TYPE.MAP: - return PB_TYPE.LENGTHDEL - else: - return PB_TYPE.UNDEFINED - - static func pack_field(field : PBField) -> PoolByteArray: - var type : int = pb_type_from_data_type(field.type) - var type_copy : int = type - if field.rule == PB_RULE.REPEATED && field.option_packed: - type = PB_TYPE.LENGTHDEL - var head : PoolByteArray = pack_type_tag(type, field.tag) - var data : PoolByteArray = PoolByteArray() - if type == PB_TYPE.VARINT: - var value - if field.rule == PB_RULE.REPEATED: - for v in field.value: - data.append_array(head) - if field.type == PB_DATA_TYPE.SINT32 || field.type == PB_DATA_TYPE.SINT64: - value = convert_signed(v) - else: - value = v - data.append_array(pack_varint(value)) - return data - else: - if field.type == PB_DATA_TYPE.SINT32 || field.type == PB_DATA_TYPE.SINT64: - value = convert_signed(field.value) - else: - value = field.value - data = pack_varint(value) - elif type == PB_TYPE.FIX32: - if field.rule == PB_RULE.REPEATED: - for v in field.value: - data.append_array(head) - data.append_array(pack_bytes(v, 4, field.type)) - return data - else: - data.append_array(pack_bytes(field.value, 4, field.type)) - elif type == PB_TYPE.FIX64: - if field.rule == PB_RULE.REPEATED: - for v in field.value: - data.append_array(head) - data.append_array(pack_bytes(v, 8, field.type)) - return data - else: - data.append_array(pack_bytes(field.value, 8, field.type)) - elif type == PB_TYPE.LENGTHDEL: - if field.rule == PB_RULE.REPEATED: - if type_copy == PB_TYPE.VARINT: - if field.type == PB_DATA_TYPE.SINT32 || field.type == PB_DATA_TYPE.SINT64: - var signed_value : int - for v in field.value: - signed_value = convert_signed(v) - data.append_array(pack_varint(signed_value)) - else: - for v in field.value: - data.append_array(pack_varint(v)) - return pack_length_delimeted(type, field.tag, data) - elif type_copy == PB_TYPE.FIX32: - for v in field.value: - data.append_array(pack_bytes(v, 4, field.type)) - return pack_length_delimeted(type, field.tag, data) - elif type_copy == PB_TYPE.FIX64: - for v in field.value: - data.append_array(pack_bytes(v, 8, field.type)) - return pack_length_delimeted(type, field.tag, data) - elif field.type == PB_DATA_TYPE.STRING: - for v in field.value: - var obj = v.to_utf8() - data.append_array(pack_length_delimeted(type, field.tag, obj)) - return data - elif field.type == PB_DATA_TYPE.BYTES: - for v in field.value: - data.append_array(pack_length_delimeted(type, field.tag, v)) - return data - elif typeof(field.value[0]) == TYPE_OBJECT: - for v in field.value: - var obj : PoolByteArray = v.to_bytes() - data.append_array(pack_length_delimeted(type, field.tag, obj)) - return data - else: - if field.type == PB_DATA_TYPE.STRING: - var str_bytes : PoolByteArray = field.value.to_utf8() - if PROTO_VERSION == 2 || (PROTO_VERSION == 3 && str_bytes.size() > 0): - data.append_array(str_bytes) - return pack_length_delimeted(type, field.tag, data) - if field.type == PB_DATA_TYPE.BYTES: - if PROTO_VERSION == 2 || (PROTO_VERSION == 3 && field.value.size() > 0): - data.append_array(field.value) - return pack_length_delimeted(type, field.tag, data) - elif typeof(field.value) == TYPE_OBJECT: - var obj : PoolByteArray = field.value.to_bytes() - if obj.size() > 0: - data.append_array(obj) - return pack_length_delimeted(type, field.tag, data) - else: - pass - if data.size() > 0: - head.append_array(data) - return head - else: - return data - - static func unpack_field(bytes : PoolByteArray, offset : int, field : PBField, type : int, message_func_ref) -> int: - if field.rule == PB_RULE.REPEATED && type != PB_TYPE.LENGTHDEL && field.option_packed: - var count = isolate_varint(bytes, offset) - if count.size() > 0: - offset += count.size() - count = unpack_varint(count) - if type == PB_TYPE.VARINT: - var val - var counter = offset + count - while offset < counter: - val = isolate_varint(bytes, offset) - if val.size() > 0: - offset += val.size() - val = unpack_varint(val) - if field.type == PB_DATA_TYPE.SINT32 || field.type == PB_DATA_TYPE.SINT64: - val = deconvert_signed(val) - elif field.type == PB_DATA_TYPE.BOOL: - if val: - val = true - else: - val = false - field.value.append(val) - else: - return PB_ERR.REPEATED_COUNT_MISMATCH - return offset - elif type == PB_TYPE.FIX32 || type == PB_TYPE.FIX64: - var type_size - if type == PB_TYPE.FIX32: - type_size = 4 - else: - type_size = 8 - var val - var counter = offset + count - while offset < counter: - if (offset + type_size) > bytes.size(): - return PB_ERR.REPEATED_COUNT_MISMATCH - val = unpack_bytes(bytes, offset, type_size, field.type) - offset += type_size - field.value.append(val) - return offset - else: - return PB_ERR.REPEATED_COUNT_NOT_FOUND - else: - if type == PB_TYPE.VARINT: - var val = isolate_varint(bytes, offset) - if val.size() > 0: - offset += val.size() - val = unpack_varint(val) - if field.type == PB_DATA_TYPE.SINT32 || field.type == PB_DATA_TYPE.SINT64: - val = deconvert_signed(val) - elif field.type == PB_DATA_TYPE.BOOL: - if val: - val = true - else: - val = false - if field.rule == PB_RULE.REPEATED: - field.value.append(val) - else: - field.value = val - else: - return PB_ERR.VARINT_NOT_FOUND - return offset - elif type == PB_TYPE.FIX32 || type == PB_TYPE.FIX64: - var type_size - if type == PB_TYPE.FIX32: - type_size = 4 - else: - type_size = 8 - var val - if (offset + type_size) > bytes.size(): - return PB_ERR.REPEATED_COUNT_MISMATCH - val = unpack_bytes(bytes, offset, type_size, field.type) - offset += type_size - if field.rule == PB_RULE.REPEATED: - field.value.append(val) - else: - field.value = val - return offset - elif type == PB_TYPE.LENGTHDEL: - var inner_size = isolate_varint(bytes, offset) - if inner_size.size() > 0: - offset += inner_size.size() - inner_size = unpack_varint(inner_size) - if inner_size >= 0: - if inner_size + offset > bytes.size(): - return PB_ERR.LENGTHDEL_SIZE_MISMATCH - if message_func_ref != null: - var message = message_func_ref.call_func() - if inner_size > 0: - var sub_offset = message.from_bytes(bytes, offset, inner_size + offset) - if sub_offset > 0: - if sub_offset - offset >= inner_size: - offset = sub_offset - return offset - else: - return PB_ERR.LENGTHDEL_SIZE_MISMATCH - return sub_offset - else: - return offset - elif field.type == PB_DATA_TYPE.STRING: - var str_bytes : PoolByteArray = PoolByteArray() - for i in range(offset, inner_size + offset): - str_bytes.append(bytes[i]) - if field.rule == PB_RULE.REPEATED: - field.value.append(str_bytes.get_string_from_utf8()) - else: - field.value = str_bytes.get_string_from_utf8() - return offset + inner_size - elif field.type == PB_DATA_TYPE.BYTES: - var val_bytes : PoolByteArray = PoolByteArray() - for i in range(offset, inner_size + offset): - val_bytes.append(bytes[i]) - if field.rule == PB_RULE.REPEATED: - field.value.append(val_bytes) - else: - field.value = val_bytes - return offset + inner_size - else: - return PB_ERR.LENGTHDEL_SIZE_NOT_FOUND - else: - return PB_ERR.LENGTHDEL_SIZE_NOT_FOUND - return PB_ERR.UNDEFINED_STATE - - static func unpack_message(data, bytes : PoolByteArray, offset : int, limit : int) -> int: - while true: - var tt : PBTypeTag = unpack_type_tag(bytes, offset) - if tt.ok: - offset += tt.offset - if data.has(tt.tag): - var service : PBServiceField = data[tt.tag] - var type : int = pb_type_from_data_type(service.field.type) - if type == tt.type || (tt.type == PB_TYPE.LENGTHDEL && service.field.rule == PB_RULE.REPEATED && service.field.option_packed): - var res : int = unpack_field(bytes, offset, service.field, type, service.func_ref) - if res > 0: - service.state = PB_SERVICE_STATE.FILLED - offset = res - if offset == limit: - return offset - elif offset > limit: - return PB_ERR.PACKAGE_SIZE_MISMATCH - elif res < 0: - return res - else: - break - else: - return offset - return PB_ERR.UNDEFINED_STATE - - static func pack_message(data) -> PoolByteArray: - var DEFAULT_VALUES - if PROTO_VERSION == 2: - DEFAULT_VALUES = DEFAULT_VALUES_2 - elif PROTO_VERSION == 3: - DEFAULT_VALUES = DEFAULT_VALUES_3 - var result : PoolByteArray = PoolByteArray() - var keys : Array = data.keys() - keys.sort() - for i in keys: - if data[i].field.value != null: - if data[i].state == PB_SERVICE_STATE.UNFILLED \ - && !data[i].field.is_map_field \ - && typeof(data[i].field.value) == typeof(DEFAULT_VALUES[data[i].field.type]) \ - && data[i].field.value == DEFAULT_VALUES[data[i].field.type]: - continue - elif data[i].field.rule == PB_RULE.REPEATED && data[i].field.value.size() == 0: - continue - result.append_array(pack_field(data[i].field)) - elif data[i].field.rule == PB_RULE.REQUIRED: - print("Error: required field is not filled: Tag:", data[i].field.tag) - return PoolByteArray() - return result - - static func check_required(data) -> bool: - var keys : Array = data.keys() - for i in keys: - if data[i].field.rule == PB_RULE.REQUIRED && data[i].state == PB_SERVICE_STATE.UNFILLED: - return false - return true - - static func construct_map(key_values): - var result = {} - for kv in key_values: - result[kv.get_key()] = kv.get_value() - return result - - static func tabulate(text : String, nesting : int) -> String: - var tab : String = "" - for _i in range(nesting): - tab += DEBUG_TAB - return tab + text - - static func value_to_string(value, field : PBField, nesting : int) -> String: - var result : String = "" - var text : String - if field.type == PB_DATA_TYPE.MESSAGE: - result += "{" - nesting += 1 - text = message_to_string(value.data, nesting) - if text != "": - result += "\n" + text - nesting -= 1 - result += tabulate("}", nesting) - else: - nesting -= 1 - result += "}" - elif field.type == PB_DATA_TYPE.BYTES: - result += "<" - for i in range(value.size()): - result += String(value[i]) - if i != (value.size() - 1): - result += ", " - result += ">" - elif field.type == PB_DATA_TYPE.STRING: - result += "\"" + value + "\"" - elif field.type == PB_DATA_TYPE.ENUM: - result += "ENUM::" + String(value) - else: - result += String(value) - return result - - static func field_to_string(field : PBField, nesting : int) -> String: - var result : String = tabulate(field.name + ": ", nesting) - if field.type == PB_DATA_TYPE.MAP: - if field.value.size() > 0: - result += "(\n" - nesting += 1 - for i in range(field.value.size()): - var local_key_value = field.value[i].data[1].field - result += tabulate(value_to_string(local_key_value.value, local_key_value, nesting), nesting) + ": " - local_key_value = field.value[i].data[2].field - result += value_to_string(local_key_value.value, local_key_value, nesting) - if i != (field.value.size() - 1): - result += "," - result += "\n" - nesting -= 1 - result += tabulate(")", nesting) - else: - result += "()" - elif field.rule == PB_RULE.REPEATED: - if field.value.size() > 0: - result += "[\n" - nesting += 1 - for i in range(field.value.size()): - result += tabulate(String(i) + ": ", nesting) - result += value_to_string(field.value[i], field, nesting) - if i != (field.value.size() - 1): - result += "," - result += "\n" - nesting -= 1 - result += tabulate("]", nesting) - else: - result += "[]" - else: - result += value_to_string(field.value, field, nesting) - result += ";\n" - return result - - static func message_to_string(data, nesting : int = 0) -> String: - var DEFAULT_VALUES - if PROTO_VERSION == 2: - DEFAULT_VALUES = DEFAULT_VALUES_2 - elif PROTO_VERSION == 3: - DEFAULT_VALUES = DEFAULT_VALUES_3 - var result : String = "" - var keys : Array = data.keys() - keys.sort() - for i in keys: - if data[i].field.value != null: - if data[i].state == PB_SERVICE_STATE.UNFILLED \ - && !data[i].field.is_map_field \ - && typeof(data[i].field.value) == typeof(DEFAULT_VALUES[data[i].field.type]) \ - && data[i].field.value == DEFAULT_VALUES[data[i].field.type]: - continue - elif data[i].field.rule == PB_RULE.REPEATED && data[i].field.value.size() == 0: - continue - result += field_to_string(data[i].field, nesting) - elif data[i].field.rule == PB_RULE.REQUIRED: - result += data[i].field.name + ": " + "error" - return result - - - -############### USER DATA BEGIN ################ - - -class Test0: - func _init(): - var service - - var data = {} - - func to_string() -> String: - return PBPacker.message_to_string(data) - - func to_bytes() -> PoolByteArray: - return PBPacker.pack_message(data) - - func from_bytes(bytes : PoolByteArray, offset : int = 0, limit : int = -1) -> int: - var cur_limit = bytes.size() - if limit != -1: - cur_limit = limit - var result = PBPacker.unpack_message(data, bytes, offset, cur_limit) - if result == cur_limit: - if PBPacker.check_required(data): - if limit == -1: - return PB_ERR.NO_ERRORS - else: - return PB_ERR.REQUIRED_FIELDS - elif limit == -1 && result > 0: - return PB_ERR.PARSE_INCOMPLETE - return result - -enum Enum0 { - NULL = 0, - ONE = 1, - TWO = 2, - THREE = 3, - FOUR = 4 -} - -class Test1: - func _init(): - var service - - _f_double = PBField.new("f_double", PB_DATA_TYPE.DOUBLE, PB_RULE.OPTIONAL, 1, true, DEFAULT_VALUES_3[PB_DATA_TYPE.DOUBLE]) - service = PBServiceField.new() - service.field = _f_double - data[_f_double.tag] = service - - _f_float = PBField.new("f_float", PB_DATA_TYPE.FLOAT, PB_RULE.OPTIONAL, 2, true, DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT]) - service = PBServiceField.new() - service.field = _f_float - data[_f_float.tag] = service - - _f_int32 = PBField.new("f_int32", PB_DATA_TYPE.INT32, PB_RULE.OPTIONAL, 3, true, DEFAULT_VALUES_3[PB_DATA_TYPE.INT32]) - service = PBServiceField.new() - service.field = _f_int32 - data[_f_int32.tag] = service - - _f_int64 = PBField.new("f_int64", PB_DATA_TYPE.INT64, PB_RULE.OPTIONAL, 4, true, DEFAULT_VALUES_3[PB_DATA_TYPE.INT64]) - service = PBServiceField.new() - service.field = _f_int64 - data[_f_int64.tag] = service - - _f_uint32 = PBField.new("f_uint32", PB_DATA_TYPE.UINT32, PB_RULE.OPTIONAL, 5, true, DEFAULT_VALUES_3[PB_DATA_TYPE.UINT32]) - service = PBServiceField.new() - service.field = _f_uint32 - data[_f_uint32.tag] = service - - _f_uint64 = PBField.new("f_uint64", PB_DATA_TYPE.UINT64, PB_RULE.OPTIONAL, 6, true, DEFAULT_VALUES_3[PB_DATA_TYPE.UINT64]) - service = PBServiceField.new() - service.field = _f_uint64 - data[_f_uint64.tag] = service - - _f_sint32 = PBField.new("f_sint32", PB_DATA_TYPE.SINT32, PB_RULE.OPTIONAL, 7, true, DEFAULT_VALUES_3[PB_DATA_TYPE.SINT32]) - service = PBServiceField.new() - service.field = _f_sint32 - data[_f_sint32.tag] = service - - _f_sint64 = PBField.new("f_sint64", PB_DATA_TYPE.SINT64, PB_RULE.OPTIONAL, 8, true, DEFAULT_VALUES_3[PB_DATA_TYPE.SINT64]) - service = PBServiceField.new() - service.field = _f_sint64 - data[_f_sint64.tag] = service - - _f_fixed32 = PBField.new("f_fixed32", PB_DATA_TYPE.FIXED32, PB_RULE.OPTIONAL, 9, true, DEFAULT_VALUES_3[PB_DATA_TYPE.FIXED32]) - service = PBServiceField.new() - service.field = _f_fixed32 - data[_f_fixed32.tag] = service - - _f_fixed64 = PBField.new("f_fixed64", PB_DATA_TYPE.FIXED64, PB_RULE.OPTIONAL, 10, true, DEFAULT_VALUES_3[PB_DATA_TYPE.FIXED64]) - service = PBServiceField.new() - service.field = _f_fixed64 - data[_f_fixed64.tag] = service - - _f_sfixed32 = PBField.new("f_sfixed32", PB_DATA_TYPE.SFIXED32, PB_RULE.OPTIONAL, 11, true, DEFAULT_VALUES_3[PB_DATA_TYPE.SFIXED32]) - service = PBServiceField.new() - service.field = _f_sfixed32 - data[_f_sfixed32.tag] = service - - _f_sfixed64 = PBField.new("f_sfixed64", PB_DATA_TYPE.SFIXED64, PB_RULE.OPTIONAL, 12, true, DEFAULT_VALUES_3[PB_DATA_TYPE.SFIXED64]) - service = PBServiceField.new() - service.field = _f_sfixed64 - data[_f_sfixed64.tag] = service - - _f_bool = PBField.new("f_bool", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 13, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) - service = PBServiceField.new() - service.field = _f_bool - data[_f_bool.tag] = service - - _f_string = PBField.new("f_string", PB_DATA_TYPE.STRING, PB_RULE.OPTIONAL, 14, true, DEFAULT_VALUES_3[PB_DATA_TYPE.STRING]) - service = PBServiceField.new() - service.field = _f_string - data[_f_string.tag] = service - - _f_bytes = PBField.new("f_bytes", PB_DATA_TYPE.BYTES, PB_RULE.OPTIONAL, 15, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BYTES]) - service = PBServiceField.new() - service.field = _f_bytes - data[_f_bytes.tag] = service - - _f_map = PBField.new("f_map", PB_DATA_TYPE.MAP, PB_RULE.REPEATED, 16, true, []) - service = PBServiceField.new() - service.field = _f_map - service.func_ref = funcref(self, "add_empty_f_map") - data[_f_map.tag] = service - - _f_oneof_f1 = PBField.new("f_oneof_f1", PB_DATA_TYPE.STRING, PB_RULE.OPTIONAL, 17, true, DEFAULT_VALUES_3[PB_DATA_TYPE.STRING]) - service = PBServiceField.new() - service.field = _f_oneof_f1 - data[_f_oneof_f1.tag] = service - - _f_oneof_f2 = PBField.new("f_oneof_f2", PB_DATA_TYPE.INT32, PB_RULE.OPTIONAL, 18, true, DEFAULT_VALUES_3[PB_DATA_TYPE.INT32]) - service = PBServiceField.new() - service.field = _f_oneof_f2 - data[_f_oneof_f2.tag] = service - - _f_empty_out = PBField.new("f_empty_out", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 19, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) - service = PBServiceField.new() - service.field = _f_empty_out - service.func_ref = funcref(self, "new_f_empty_out") - data[_f_empty_out.tag] = service - - _f_enum_out = PBField.new("f_enum_out", PB_DATA_TYPE.ENUM, PB_RULE.OPTIONAL, 20, true, DEFAULT_VALUES_3[PB_DATA_TYPE.ENUM]) - service = PBServiceField.new() - service.field = _f_enum_out - data[_f_enum_out.tag] = service - - _f_empty_inner = PBField.new("f_empty_inner", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 21, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) - service = PBServiceField.new() - service.field = _f_empty_inner - service.func_ref = funcref(self, "new_f_empty_inner") - data[_f_empty_inner.tag] = service - - _f_enum_inner = PBField.new("f_enum_inner", PB_DATA_TYPE.ENUM, PB_RULE.OPTIONAL, 22, true, DEFAULT_VALUES_3[PB_DATA_TYPE.ENUM]) - service = PBServiceField.new() - service.field = _f_enum_inner - data[_f_enum_inner.tag] = service - - _rf_double = PBField.new("rf_double", PB_DATA_TYPE.DOUBLE, PB_RULE.REPEATED, 23, true, []) - service = PBServiceField.new() - service.field = _rf_double - data[_rf_double.tag] = service - - _rf_float = PBField.new("rf_float", PB_DATA_TYPE.FLOAT, PB_RULE.REPEATED, 24, true, []) - service = PBServiceField.new() - service.field = _rf_float - data[_rf_float.tag] = service - - _rf_int32 = PBField.new("rf_int32", PB_DATA_TYPE.INT32, PB_RULE.REPEATED, 25, true, []) - service = PBServiceField.new() - service.field = _rf_int32 - data[_rf_int32.tag] = service - - _rf_int64 = PBField.new("rf_int64", PB_DATA_TYPE.INT64, PB_RULE.REPEATED, 26, true, []) - service = PBServiceField.new() - service.field = _rf_int64 - data[_rf_int64.tag] = service - - _rf_uint32 = PBField.new("rf_uint32", PB_DATA_TYPE.UINT32, PB_RULE.REPEATED, 27, true, []) - service = PBServiceField.new() - service.field = _rf_uint32 - data[_rf_uint32.tag] = service - - _rf_uint64 = PBField.new("rf_uint64", PB_DATA_TYPE.UINT64, PB_RULE.REPEATED, 28, true, []) - service = PBServiceField.new() - service.field = _rf_uint64 - data[_rf_uint64.tag] = service - - _rf_sint32 = PBField.new("rf_sint32", PB_DATA_TYPE.SINT32, PB_RULE.REPEATED, 29, true, []) - service = PBServiceField.new() - service.field = _rf_sint32 - data[_rf_sint32.tag] = service - - _rf_sint64 = PBField.new("rf_sint64", PB_DATA_TYPE.SINT64, PB_RULE.REPEATED, 30, true, []) - service = PBServiceField.new() - service.field = _rf_sint64 - data[_rf_sint64.tag] = service - - _rf_fixed32 = PBField.new("rf_fixed32", PB_DATA_TYPE.FIXED32, PB_RULE.REPEATED, 31, true, []) - service = PBServiceField.new() - service.field = _rf_fixed32 - data[_rf_fixed32.tag] = service - - _rf_fixed64 = PBField.new("rf_fixed64", PB_DATA_TYPE.FIXED64, PB_RULE.REPEATED, 32, true, []) - service = PBServiceField.new() - service.field = _rf_fixed64 - data[_rf_fixed64.tag] = service - - _rf_sfixed32 = PBField.new("rf_sfixed32", PB_DATA_TYPE.SFIXED32, PB_RULE.REPEATED, 33, true, []) - service = PBServiceField.new() - service.field = _rf_sfixed32 - data[_rf_sfixed32.tag] = service - - _rf_sfixed64 = PBField.new("rf_sfixed64", PB_DATA_TYPE.SFIXED64, PB_RULE.REPEATED, 34, true, []) - service = PBServiceField.new() - service.field = _rf_sfixed64 - data[_rf_sfixed64.tag] = service - - _rf_bool = PBField.new("rf_bool", PB_DATA_TYPE.BOOL, PB_RULE.REPEATED, 35, true, []) - service = PBServiceField.new() - service.field = _rf_bool - data[_rf_bool.tag] = service - - _rf_string = PBField.new("rf_string", PB_DATA_TYPE.STRING, PB_RULE.REPEATED, 36, true, []) - service = PBServiceField.new() - service.field = _rf_string - data[_rf_string.tag] = service - - _rf_bytes = PBField.new("rf_bytes", PB_DATA_TYPE.BYTES, PB_RULE.REPEATED, 37, true, []) - service = PBServiceField.new() - service.field = _rf_bytes - data[_rf_bytes.tag] = service - - _rf_empty_out = PBField.new("rf_empty_out", PB_DATA_TYPE.MESSAGE, PB_RULE.REPEATED, 38, true, []) - service = PBServiceField.new() - service.field = _rf_empty_out - service.func_ref = funcref(self, "add_rf_empty_out") - data[_rf_empty_out.tag] = service - - _rf_enum_out = PBField.new("rf_enum_out", PB_DATA_TYPE.ENUM, PB_RULE.REPEATED, 39, true, []) - service = PBServiceField.new() - service.field = _rf_enum_out - data[_rf_enum_out.tag] = service - - _rf_empty_inner = PBField.new("rf_empty_inner", PB_DATA_TYPE.MESSAGE, PB_RULE.REPEATED, 40, true, []) - service = PBServiceField.new() - service.field = _rf_empty_inner - service.func_ref = funcref(self, "add_rf_empty_inner") - data[_rf_empty_inner.tag] = service - - _rf_enum_inner = PBField.new("rf_enum_inner", PB_DATA_TYPE.ENUM, PB_RULE.REPEATED, 41, true, []) - service = PBServiceField.new() - service.field = _rf_enum_inner - data[_rf_enum_inner.tag] = service - - _rfu_double = PBField.new("rfu_double", PB_DATA_TYPE.DOUBLE, PB_RULE.REPEATED, 42, false, []) - service = PBServiceField.new() - service.field = _rfu_double - data[_rfu_double.tag] = service - - _rfu_float = PBField.new("rfu_float", PB_DATA_TYPE.FLOAT, PB_RULE.REPEATED, 43, false, []) - service = PBServiceField.new() - service.field = _rfu_float - data[_rfu_float.tag] = service - - _rfu_int32f = PBField.new("rfu_int32f", PB_DATA_TYPE.INT32, PB_RULE.REPEATED, 44, false, []) - service = PBServiceField.new() - service.field = _rfu_int32f - data[_rfu_int32f.tag] = service - - _rfu_int64f = PBField.new("rfu_int64f", PB_DATA_TYPE.INT64, PB_RULE.REPEATED, 45, false, []) - service = PBServiceField.new() - service.field = _rfu_int64f - data[_rfu_int64f.tag] = service - - _rfu_uint32 = PBField.new("rfu_uint32", PB_DATA_TYPE.UINT32, PB_RULE.REPEATED, 46, false, []) - service = PBServiceField.new() - service.field = _rfu_uint32 - data[_rfu_uint32.tag] = service - - _rfu_uint64 = PBField.new("rfu_uint64", PB_DATA_TYPE.UINT64, PB_RULE.REPEATED, 47, false, []) - service = PBServiceField.new() - service.field = _rfu_uint64 - data[_rfu_uint64.tag] = service - - _rfu_sint32 = PBField.new("rfu_sint32", PB_DATA_TYPE.SINT32, PB_RULE.REPEATED, 48, false, []) - service = PBServiceField.new() - service.field = _rfu_sint32 - data[_rfu_sint32.tag] = service - - _rfu_sint64 = PBField.new("rfu_sint64", PB_DATA_TYPE.SINT64, PB_RULE.REPEATED, 49, false, []) - service = PBServiceField.new() - service.field = _rfu_sint64 - data[_rfu_sint64.tag] = service - - _rfu_fixed32 = PBField.new("rfu_fixed32", PB_DATA_TYPE.FIXED32, PB_RULE.REPEATED, 50, false, []) - service = PBServiceField.new() - service.field = _rfu_fixed32 - data[_rfu_fixed32.tag] = service - - _rfu_fixed64 = PBField.new("rfu_fixed64", PB_DATA_TYPE.FIXED64, PB_RULE.REPEATED, 51, false, []) - service = PBServiceField.new() - service.field = _rfu_fixed64 - data[_rfu_fixed64.tag] = service - - _rfu_sfixed32 = PBField.new("rfu_sfixed32", PB_DATA_TYPE.SFIXED32, PB_RULE.REPEATED, 52, false, []) - service = PBServiceField.new() - service.field = _rfu_sfixed32 - data[_rfu_sfixed32.tag] = service - - _rfu_sfixed64 = PBField.new("rfu_sfixed64", PB_DATA_TYPE.SFIXED64, PB_RULE.REPEATED, 53, false, []) - service = PBServiceField.new() - service.field = _rfu_sfixed64 - data[_rfu_sfixed64.tag] = service - - _rfu_bool = PBField.new("rfu_bool", PB_DATA_TYPE.BOOL, PB_RULE.REPEATED, 54, false, []) - service = PBServiceField.new() - service.field = _rfu_bool - data[_rfu_bool.tag] = service - - _rf_inner = PBField.new("rf_inner", PB_DATA_TYPE.MESSAGE, PB_RULE.REPEATED, 55, true, []) - service = PBServiceField.new() - service.field = _rf_inner - service.func_ref = funcref(self, "add_rf_inner") - data[_rf_inner.tag] = service - - var data = {} - - var _f_double: PBField - func get_f_double() -> float: - return _f_double.value - func clear_f_double() -> void: - data[1].state = PB_SERVICE_STATE.UNFILLED - _f_double.value = DEFAULT_VALUES_3[PB_DATA_TYPE.DOUBLE] - func set_f_double(value : float) -> void: - _f_double.value = value - - var _f_float: PBField - func get_f_float() -> float: - return _f_float.value - func clear_f_float() -> void: - data[2].state = PB_SERVICE_STATE.UNFILLED - _f_float.value = DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT] - func set_f_float(value : float) -> void: - _f_float.value = value - - var _f_int32: PBField - func get_f_int32() -> int: - return _f_int32.value - func clear_f_int32() -> void: - data[3].state = PB_SERVICE_STATE.UNFILLED - _f_int32.value = DEFAULT_VALUES_3[PB_DATA_TYPE.INT32] - func set_f_int32(value : int) -> void: - _f_int32.value = value - - var _f_int64: PBField - func get_f_int64() -> int: - return _f_int64.value - func clear_f_int64() -> void: - data[4].state = PB_SERVICE_STATE.UNFILLED - _f_int64.value = DEFAULT_VALUES_3[PB_DATA_TYPE.INT64] - func set_f_int64(value : int) -> void: - _f_int64.value = value - - var _f_uint32: PBField - func get_f_uint32() -> int: - return _f_uint32.value - func clear_f_uint32() -> void: - data[5].state = PB_SERVICE_STATE.UNFILLED - _f_uint32.value = DEFAULT_VALUES_3[PB_DATA_TYPE.UINT32] - func set_f_uint32(value : int) -> void: - _f_uint32.value = value - - var _f_uint64: PBField - func get_f_uint64() -> int: - return _f_uint64.value - func clear_f_uint64() -> void: - data[6].state = PB_SERVICE_STATE.UNFILLED - _f_uint64.value = DEFAULT_VALUES_3[PB_DATA_TYPE.UINT64] - func set_f_uint64(value : int) -> void: - _f_uint64.value = value - - var _f_sint32: PBField - func get_f_sint32() -> int: - return _f_sint32.value - func clear_f_sint32() -> void: - data[7].state = PB_SERVICE_STATE.UNFILLED - _f_sint32.value = DEFAULT_VALUES_3[PB_DATA_TYPE.SINT32] - func set_f_sint32(value : int) -> void: - _f_sint32.value = value - - var _f_sint64: PBField - func get_f_sint64() -> int: - return _f_sint64.value - func clear_f_sint64() -> void: - data[8].state = PB_SERVICE_STATE.UNFILLED - _f_sint64.value = DEFAULT_VALUES_3[PB_DATA_TYPE.SINT64] - func set_f_sint64(value : int) -> void: - _f_sint64.value = value - - var _f_fixed32: PBField - func get_f_fixed32() -> int: - return _f_fixed32.value - func clear_f_fixed32() -> void: - data[9].state = PB_SERVICE_STATE.UNFILLED - _f_fixed32.value = DEFAULT_VALUES_3[PB_DATA_TYPE.FIXED32] - func set_f_fixed32(value : int) -> void: - _f_fixed32.value = value - - var _f_fixed64: PBField - func get_f_fixed64() -> int: - return _f_fixed64.value - func clear_f_fixed64() -> void: - data[10].state = PB_SERVICE_STATE.UNFILLED - _f_fixed64.value = DEFAULT_VALUES_3[PB_DATA_TYPE.FIXED64] - func set_f_fixed64(value : int) -> void: - _f_fixed64.value = value - - var _f_sfixed32: PBField - func get_f_sfixed32() -> int: - return _f_sfixed32.value - func clear_f_sfixed32() -> void: - data[11].state = PB_SERVICE_STATE.UNFILLED - _f_sfixed32.value = DEFAULT_VALUES_3[PB_DATA_TYPE.SFIXED32] - func set_f_sfixed32(value : int) -> void: - _f_sfixed32.value = value - - var _f_sfixed64: PBField - func get_f_sfixed64() -> int: - return _f_sfixed64.value - func clear_f_sfixed64() -> void: - data[12].state = PB_SERVICE_STATE.UNFILLED - _f_sfixed64.value = DEFAULT_VALUES_3[PB_DATA_TYPE.SFIXED64] - func set_f_sfixed64(value : int) -> void: - _f_sfixed64.value = value - - var _f_bool: PBField - func get_f_bool() -> bool: - return _f_bool.value - func clear_f_bool() -> void: - data[13].state = PB_SERVICE_STATE.UNFILLED - _f_bool.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] - func set_f_bool(value : bool) -> void: - _f_bool.value = value - - var _f_string: PBField - func get_f_string() -> String: - return _f_string.value - func clear_f_string() -> void: - data[14].state = PB_SERVICE_STATE.UNFILLED - _f_string.value = DEFAULT_VALUES_3[PB_DATA_TYPE.STRING] - func set_f_string(value : String) -> void: - _f_string.value = value - - var _f_bytes: PBField - func get_f_bytes() -> PoolByteArray: - return _f_bytes.value - func clear_f_bytes() -> void: - data[15].state = PB_SERVICE_STATE.UNFILLED - _f_bytes.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BYTES] - func set_f_bytes(value : PoolByteArray) -> void: - _f_bytes.value = value - - var _f_map: PBField - func get_raw_f_map(): - return _f_map.value - func get_f_map(): - return PBPacker.construct_map(_f_map.value) - func clear_f_map(): - data[16].state = PB_SERVICE_STATE.UNFILLED - _f_map.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MAP] - func add_empty_f_map() -> int: - var element = Test1.map_type_f_map.new() - _f_map.value.append(element) - return element - func add_f_map(a_key, a_value) -> void: - var idx = -1 - for i in range(_f_map.value.size()): - if _f_map.value[i].get_key() == a_key: - idx = i - break - var element = Test1.map_type_f_map.new() - element.set_key(a_key) - element.set_value(a_value) - if idx != -1: - _f_map.value[idx] = element - else: - _f_map.value.append(element) - - var _f_oneof_f1: PBField - func has_f_oneof_f1() -> bool: - return data[17].state == PB_SERVICE_STATE.FILLED - func get_f_oneof_f1() -> String: - return _f_oneof_f1.value - func clear_f_oneof_f1() -> void: - data[17].state = PB_SERVICE_STATE.UNFILLED - _f_oneof_f1.value = DEFAULT_VALUES_3[PB_DATA_TYPE.STRING] - func set_f_oneof_f1(value : String) -> void: - data[17].state = PB_SERVICE_STATE.FILLED - _f_oneof_f2.value = DEFAULT_VALUES_3[PB_DATA_TYPE.INT32] - data[18].state = PB_SERVICE_STATE.UNFILLED - _f_oneof_f1.value = value - - var _f_oneof_f2: PBField - func has_f_oneof_f2() -> bool: - return data[18].state == PB_SERVICE_STATE.FILLED - func get_f_oneof_f2() -> int: - return _f_oneof_f2.value - func clear_f_oneof_f2() -> void: - data[18].state = PB_SERVICE_STATE.UNFILLED - _f_oneof_f2.value = DEFAULT_VALUES_3[PB_DATA_TYPE.INT32] - func set_f_oneof_f2(value : int) -> void: - _f_oneof_f1.value = DEFAULT_VALUES_3[PB_DATA_TYPE.STRING] - data[17].state = PB_SERVICE_STATE.UNFILLED - data[18].state = PB_SERVICE_STATE.FILLED - _f_oneof_f2.value = value - - var _f_empty_out: PBField - func get_f_empty_out() -> Test0: - return _f_empty_out.value - func clear_f_empty_out() -> void: - data[19].state = PB_SERVICE_STATE.UNFILLED - _f_empty_out.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] - func new_f_empty_out() -> Test0: - _f_empty_out.value = Test0.new() - return _f_empty_out.value - - var _f_enum_out: PBField - func get_f_enum_out(): - return _f_enum_out.value - func clear_f_enum_out() -> void: - data[20].state = PB_SERVICE_STATE.UNFILLED - _f_enum_out.value = DEFAULT_VALUES_3[PB_DATA_TYPE.ENUM] - func set_f_enum_out(value) -> void: - _f_enum_out.value = value - - var _f_empty_inner: PBField - func get_f_empty_inner() -> Test2.TestInner2: - return _f_empty_inner.value - func clear_f_empty_inner() -> void: - data[21].state = PB_SERVICE_STATE.UNFILLED - _f_empty_inner.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] - func new_f_empty_inner() -> Test2.TestInner2: - _f_empty_inner.value = Test2.TestInner2.new() - return _f_empty_inner.value - - var _f_enum_inner: PBField - func get_f_enum_inner(): - return _f_enum_inner.value - func clear_f_enum_inner() -> void: - data[22].state = PB_SERVICE_STATE.UNFILLED - _f_enum_inner.value = DEFAULT_VALUES_3[PB_DATA_TYPE.ENUM] - func set_f_enum_inner(value) -> void: - _f_enum_inner.value = value - - var _rf_double: PBField - func get_rf_double() -> Array: - return _rf_double.value - func clear_rf_double() -> void: - data[23].state = PB_SERVICE_STATE.UNFILLED - _rf_double.value = [] - func add_rf_double(value : float) -> void: - _rf_double.value.append(value) - - var _rf_float: PBField - func get_rf_float() -> Array: - return _rf_float.value - func clear_rf_float() -> void: - data[24].state = PB_SERVICE_STATE.UNFILLED - _rf_float.value = [] - func add_rf_float(value : float) -> void: - _rf_float.value.append(value) - - var _rf_int32: PBField - func get_rf_int32() -> Array: - return _rf_int32.value - func clear_rf_int32() -> void: - data[25].state = PB_SERVICE_STATE.UNFILLED - _rf_int32.value = [] - func add_rf_int32(value : int) -> void: - _rf_int32.value.append(value) - - var _rf_int64: PBField - func get_rf_int64() -> Array: - return _rf_int64.value - func clear_rf_int64() -> void: - data[26].state = PB_SERVICE_STATE.UNFILLED - _rf_int64.value = [] - func add_rf_int64(value : int) -> void: - _rf_int64.value.append(value) - - var _rf_uint32: PBField - func get_rf_uint32() -> Array: - return _rf_uint32.value - func clear_rf_uint32() -> void: - data[27].state = PB_SERVICE_STATE.UNFILLED - _rf_uint32.value = [] - func add_rf_uint32(value : int) -> void: - _rf_uint32.value.append(value) - - var _rf_uint64: PBField - func get_rf_uint64() -> Array: - return _rf_uint64.value - func clear_rf_uint64() -> void: - data[28].state = PB_SERVICE_STATE.UNFILLED - _rf_uint64.value = [] - func add_rf_uint64(value : int) -> void: - _rf_uint64.value.append(value) - - var _rf_sint32: PBField - func get_rf_sint32() -> Array: - return _rf_sint32.value - func clear_rf_sint32() -> void: - data[29].state = PB_SERVICE_STATE.UNFILLED - _rf_sint32.value = [] - func add_rf_sint32(value : int) -> void: - _rf_sint32.value.append(value) - - var _rf_sint64: PBField - func get_rf_sint64() -> Array: - return _rf_sint64.value - func clear_rf_sint64() -> void: - data[30].state = PB_SERVICE_STATE.UNFILLED - _rf_sint64.value = [] - func add_rf_sint64(value : int) -> void: - _rf_sint64.value.append(value) - - var _rf_fixed32: PBField - func get_rf_fixed32() -> Array: - return _rf_fixed32.value - func clear_rf_fixed32() -> void: - data[31].state = PB_SERVICE_STATE.UNFILLED - _rf_fixed32.value = [] - func add_rf_fixed32(value : int) -> void: - _rf_fixed32.value.append(value) - - var _rf_fixed64: PBField - func get_rf_fixed64() -> Array: - return _rf_fixed64.value - func clear_rf_fixed64() -> void: - data[32].state = PB_SERVICE_STATE.UNFILLED - _rf_fixed64.value = [] - func add_rf_fixed64(value : int) -> void: - _rf_fixed64.value.append(value) - - var _rf_sfixed32: PBField - func get_rf_sfixed32() -> Array: - return _rf_sfixed32.value - func clear_rf_sfixed32() -> void: - data[33].state = PB_SERVICE_STATE.UNFILLED - _rf_sfixed32.value = [] - func add_rf_sfixed32(value : int) -> void: - _rf_sfixed32.value.append(value) - - var _rf_sfixed64: PBField - func get_rf_sfixed64() -> Array: - return _rf_sfixed64.value - func clear_rf_sfixed64() -> void: - data[34].state = PB_SERVICE_STATE.UNFILLED - _rf_sfixed64.value = [] - func add_rf_sfixed64(value : int) -> void: - _rf_sfixed64.value.append(value) - - var _rf_bool: PBField - func get_rf_bool() -> Array: - return _rf_bool.value - func clear_rf_bool() -> void: - data[35].state = PB_SERVICE_STATE.UNFILLED - _rf_bool.value = [] - func add_rf_bool(value : bool) -> void: - _rf_bool.value.append(value) - - var _rf_string: PBField - func get_rf_string() -> Array: - return _rf_string.value - func clear_rf_string() -> void: - data[36].state = PB_SERVICE_STATE.UNFILLED - _rf_string.value = [] - func add_rf_string(value : String) -> void: - _rf_string.value.append(value) - - var _rf_bytes: PBField - func get_rf_bytes() -> Array: - return _rf_bytes.value - func clear_rf_bytes() -> void: - data[37].state = PB_SERVICE_STATE.UNFILLED - _rf_bytes.value = [] - func add_rf_bytes(value : PoolByteArray) -> void: - _rf_bytes.value.append(value) - - var _rf_empty_out: PBField - func get_rf_empty_out() -> Array: - return _rf_empty_out.value - func clear_rf_empty_out() -> void: - data[38].state = PB_SERVICE_STATE.UNFILLED - _rf_empty_out.value = [] - func add_rf_empty_out() -> Test0: - var element = Test0.new() - _rf_empty_out.value.append(element) - return element - - var _rf_enum_out: PBField - func get_rf_enum_out() -> Array: - return _rf_enum_out.value - func clear_rf_enum_out() -> void: - data[39].state = PB_SERVICE_STATE.UNFILLED - _rf_enum_out.value = [] - func add_rf_enum_out(value) -> void: - _rf_enum_out.value.append(value) - - var _rf_empty_inner: PBField - func get_rf_empty_inner() -> Array: - return _rf_empty_inner.value - func clear_rf_empty_inner() -> void: - data[40].state = PB_SERVICE_STATE.UNFILLED - _rf_empty_inner.value = [] - func add_rf_empty_inner() -> Test2.TestInner2: - var element = Test2.TestInner2.new() - _rf_empty_inner.value.append(element) - return element - - var _rf_enum_inner: PBField - func get_rf_enum_inner() -> Array: - return _rf_enum_inner.value - func clear_rf_enum_inner() -> void: - data[41].state = PB_SERVICE_STATE.UNFILLED - _rf_enum_inner.value = [] - func add_rf_enum_inner(value) -> void: - _rf_enum_inner.value.append(value) - - var _rfu_double: PBField - func get_rfu_double() -> Array: - return _rfu_double.value - func clear_rfu_double() -> void: - data[42].state = PB_SERVICE_STATE.UNFILLED - _rfu_double.value = [] - func add_rfu_double(value : float) -> void: - _rfu_double.value.append(value) - - var _rfu_float: PBField - func get_rfu_float() -> Array: - return _rfu_float.value - func clear_rfu_float() -> void: - data[43].state = PB_SERVICE_STATE.UNFILLED - _rfu_float.value = [] - func add_rfu_float(value : float) -> void: - _rfu_float.value.append(value) - - var _rfu_int32f: PBField - func get_rfu_int32f() -> Array: - return _rfu_int32f.value - func clear_rfu_int32f() -> void: - data[44].state = PB_SERVICE_STATE.UNFILLED - _rfu_int32f.value = [] - func add_rfu_int32f(value : int) -> void: - _rfu_int32f.value.append(value) - - var _rfu_int64f: PBField - func get_rfu_int64f() -> Array: - return _rfu_int64f.value - func clear_rfu_int64f() -> void: - data[45].state = PB_SERVICE_STATE.UNFILLED - _rfu_int64f.value = [] - func add_rfu_int64f(value : int) -> void: - _rfu_int64f.value.append(value) - - var _rfu_uint32: PBField - func get_rfu_uint32() -> Array: - return _rfu_uint32.value - func clear_rfu_uint32() -> void: - data[46].state = PB_SERVICE_STATE.UNFILLED - _rfu_uint32.value = [] - func add_rfu_uint32(value : int) -> void: - _rfu_uint32.value.append(value) - - var _rfu_uint64: PBField - func get_rfu_uint64() -> Array: - return _rfu_uint64.value - func clear_rfu_uint64() -> void: - data[47].state = PB_SERVICE_STATE.UNFILLED - _rfu_uint64.value = [] - func add_rfu_uint64(value : int) -> void: - _rfu_uint64.value.append(value) - - var _rfu_sint32: PBField - func get_rfu_sint32() -> Array: - return _rfu_sint32.value - func clear_rfu_sint32() -> void: - data[48].state = PB_SERVICE_STATE.UNFILLED - _rfu_sint32.value = [] - func add_rfu_sint32(value : int) -> void: - _rfu_sint32.value.append(value) - - var _rfu_sint64: PBField - func get_rfu_sint64() -> Array: - return _rfu_sint64.value - func clear_rfu_sint64() -> void: - data[49].state = PB_SERVICE_STATE.UNFILLED - _rfu_sint64.value = [] - func add_rfu_sint64(value : int) -> void: - _rfu_sint64.value.append(value) - - var _rfu_fixed32: PBField - func get_rfu_fixed32() -> Array: - return _rfu_fixed32.value - func clear_rfu_fixed32() -> void: - data[50].state = PB_SERVICE_STATE.UNFILLED - _rfu_fixed32.value = [] - func add_rfu_fixed32(value : int) -> void: - _rfu_fixed32.value.append(value) - - var _rfu_fixed64: PBField - func get_rfu_fixed64() -> Array: - return _rfu_fixed64.value - func clear_rfu_fixed64() -> void: - data[51].state = PB_SERVICE_STATE.UNFILLED - _rfu_fixed64.value = [] - func add_rfu_fixed64(value : int) -> void: - _rfu_fixed64.value.append(value) - - var _rfu_sfixed32: PBField - func get_rfu_sfixed32() -> Array: - return _rfu_sfixed32.value - func clear_rfu_sfixed32() -> void: - data[52].state = PB_SERVICE_STATE.UNFILLED - _rfu_sfixed32.value = [] - func add_rfu_sfixed32(value : int) -> void: - _rfu_sfixed32.value.append(value) - - var _rfu_sfixed64: PBField - func get_rfu_sfixed64() -> Array: - return _rfu_sfixed64.value - func clear_rfu_sfixed64() -> void: - data[53].state = PB_SERVICE_STATE.UNFILLED - _rfu_sfixed64.value = [] - func add_rfu_sfixed64(value : int) -> void: - _rfu_sfixed64.value.append(value) - - var _rfu_bool: PBField - func get_rfu_bool() -> Array: - return _rfu_bool.value - func clear_rfu_bool() -> void: - data[54].state = PB_SERVICE_STATE.UNFILLED - _rfu_bool.value = [] - func add_rfu_bool(value : bool) -> void: - _rfu_bool.value.append(value) - - var _rf_inner: PBField - func get_rf_inner() -> Array: - return _rf_inner.value - func clear_rf_inner() -> void: - data[55].state = PB_SERVICE_STATE.UNFILLED - _rf_inner.value = [] - func add_rf_inner() -> Test2.TestInner3.TestInner3_2: - var element = Test2.TestInner3.TestInner3_2.new() - _rf_inner.value.append(element) - return element - - class map_type_f_map: - func _init(): - var service - - _key = PBField.new("key", PB_DATA_TYPE.INT32, PB_RULE.REQUIRED, 1, true, DEFAULT_VALUES_3[PB_DATA_TYPE.INT32]) - _key.is_map_field = true - service = PBServiceField.new() - service.field = _key - data[_key.tag] = service - - _value = PBField.new("value", PB_DATA_TYPE.INT32, PB_RULE.REQUIRED, 2, true, DEFAULT_VALUES_3[PB_DATA_TYPE.INT32]) - _value.is_map_field = true - service = PBServiceField.new() - service.field = _value - data[_value.tag] = service - - var data = {} - - var _key: PBField - func get_key() -> int: - return _key.value - func clear_key() -> void: - data[1].state = PB_SERVICE_STATE.UNFILLED - _key.value = DEFAULT_VALUES_3[PB_DATA_TYPE.INT32] - func set_key(value : int) -> void: - _key.value = value - - var _value: PBField - func get_value() -> int: - return _value.value - func clear_value() -> void: - data[2].state = PB_SERVICE_STATE.UNFILLED - _value.value = DEFAULT_VALUES_3[PB_DATA_TYPE.INT32] - func set_value(value : int) -> void: - _value.value = value - - func to_string() -> String: - return PBPacker.message_to_string(data) - - func to_bytes() -> PoolByteArray: - return PBPacker.pack_message(data) - - func from_bytes(bytes : PoolByteArray, offset : int = 0, limit : int = -1) -> int: - var cur_limit = bytes.size() - if limit != -1: - cur_limit = limit - var result = PBPacker.unpack_message(data, bytes, offset, cur_limit) - if result == cur_limit: - if PBPacker.check_required(data): - if limit == -1: - return PB_ERR.NO_ERRORS - else: - return PB_ERR.REQUIRED_FIELDS - elif limit == -1 && result > 0: - return PB_ERR.PARSE_INCOMPLETE - return result - - func to_string() -> String: - return PBPacker.message_to_string(data) - - func to_bytes() -> PoolByteArray: - return PBPacker.pack_message(data) - - func from_bytes(bytes : PoolByteArray, offset : int = 0, limit : int = -1) -> int: - var cur_limit = bytes.size() - if limit != -1: - cur_limit = limit - var result = PBPacker.unpack_message(data, bytes, offset, cur_limit) - if result == cur_limit: - if PBPacker.check_required(data): - if limit == -1: - return PB_ERR.NO_ERRORS - else: - return PB_ERR.REQUIRED_FIELDS - elif limit == -1 && result > 0: - return PB_ERR.PARSE_INCOMPLETE - return result - -class Test2: - func _init(): - var service - - _f1 = PBField.new("f1", PB_DATA_TYPE.STRING, PB_RULE.REPEATED, 1, true, []) - service = PBServiceField.new() - service.field = _f1 - data[_f1.tag] = service - - _f2 = PBField.new("f2", PB_DATA_TYPE.FIXED64, PB_RULE.OPTIONAL, 2, true, DEFAULT_VALUES_3[PB_DATA_TYPE.FIXED64]) - service = PBServiceField.new() - service.field = _f2 - data[_f2.tag] = service - - _f3 = PBField.new("f3", PB_DATA_TYPE.STRING, PB_RULE.OPTIONAL, 3, true, DEFAULT_VALUES_3[PB_DATA_TYPE.STRING]) - service = PBServiceField.new() - service.field = _f3 - data[_f3.tag] = service - - _f4 = PBField.new("f4", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 4, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) - service = PBServiceField.new() - service.field = _f4 - service.func_ref = funcref(self, "new_f4") - data[_f4.tag] = service - - _f5 = PBField.new("f5", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 5, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) - service = PBServiceField.new() - service.field = _f5 - service.func_ref = funcref(self, "new_f5") - data[_f5.tag] = service - - _f6 = PBField.new("f6", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 6, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) - service = PBServiceField.new() - service.field = _f6 - service.func_ref = funcref(self, "new_f6") - data[_f6.tag] = service - - _f7 = PBField.new("f7", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 7, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) - service = PBServiceField.new() - service.field = _f7 - service.func_ref = funcref(self, "new_f7") - data[_f7.tag] = service - - var data = {} - - var _f1: PBField - func get_f1() -> Array: - return _f1.value - func clear_f1() -> void: - data[1].state = PB_SERVICE_STATE.UNFILLED - _f1.value = [] - func add_f1(value : String) -> void: - _f1.value.append(value) - - var _f2: PBField - func get_f2() -> int: - return _f2.value - func clear_f2() -> void: - data[2].state = PB_SERVICE_STATE.UNFILLED - _f2.value = DEFAULT_VALUES_3[PB_DATA_TYPE.FIXED64] - func set_f2(value : int) -> void: - _f2.value = value - - var _f3: PBField - func has_f3() -> bool: - return data[3].state == PB_SERVICE_STATE.FILLED - func get_f3() -> String: - return _f3.value - func clear_f3() -> void: - data[3].state = PB_SERVICE_STATE.UNFILLED - _f3.value = DEFAULT_VALUES_3[PB_DATA_TYPE.STRING] - func set_f3(value : String) -> void: - data[3].state = PB_SERVICE_STATE.FILLED - _f4.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] - data[4].state = PB_SERVICE_STATE.UNFILLED - _f3.value = value - - var _f4: PBField - func has_f4() -> bool: - return data[4].state == PB_SERVICE_STATE.FILLED - func get_f4() -> Test2.TestInner3: - return _f4.value - func clear_f4() -> void: - data[4].state = PB_SERVICE_STATE.UNFILLED - _f4.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] - func new_f4() -> Test2.TestInner3: - _f3.value = DEFAULT_VALUES_3[PB_DATA_TYPE.STRING] - data[3].state = PB_SERVICE_STATE.UNFILLED - data[4].state = PB_SERVICE_STATE.FILLED - _f4.value = Test2.TestInner3.new() - return _f4.value - - var _f5: PBField - func get_f5() -> Test2.TestInner2: - return _f5.value - func clear_f5() -> void: - data[5].state = PB_SERVICE_STATE.UNFILLED - _f5.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] - func new_f5() -> Test2.TestInner2: - _f5.value = Test2.TestInner2.new() - return _f5.value - - var _f6: PBField - func get_f6() -> Test2.TestInner3: - return _f6.value - func clear_f6() -> void: - data[6].state = PB_SERVICE_STATE.UNFILLED - _f6.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] - func new_f6() -> Test2.TestInner3: - _f6.value = Test2.TestInner3.new() - return _f6.value - - var _f7: PBField - func get_f7() -> Test2.TestInner1: - return _f7.value - func clear_f7() -> void: - data[7].state = PB_SERVICE_STATE.UNFILLED - _f7.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] - func new_f7() -> Test2.TestInner1: - _f7.value = Test2.TestInner1.new() - return _f7.value - - enum TestEnum { - VALUE_0 = 0, - VALUE_1 = 1, - VALUE_2 = 2, - VALUE_3 = 3 - } - - class TestInner1: - func _init(): - var service - - _f1 = PBField.new("f1", PB_DATA_TYPE.DOUBLE, PB_RULE.REPEATED, 1, true, []) - service = PBServiceField.new() - service.field = _f1 - data[_f1.tag] = service - - _f2 = PBField.new("f2", PB_DATA_TYPE.FLOAT, PB_RULE.OPTIONAL, 2, true, DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT]) - service = PBServiceField.new() - service.field = _f2 - data[_f2.tag] = service - - _f3 = PBField.new("f3", PB_DATA_TYPE.STRING, PB_RULE.OPTIONAL, 3, true, DEFAULT_VALUES_3[PB_DATA_TYPE.STRING]) - service = PBServiceField.new() - service.field = _f3 - data[_f3.tag] = service - - var data = {} - - var _f1: PBField - func get_f1() -> Array: - return _f1.value - func clear_f1() -> void: - data[1].state = PB_SERVICE_STATE.UNFILLED - _f1.value = [] - func add_f1(value : float) -> void: - _f1.value.append(value) - - var _f2: PBField - func get_f2() -> float: - return _f2.value - func clear_f2() -> void: - data[2].state = PB_SERVICE_STATE.UNFILLED - _f2.value = DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT] - func set_f2(value : float) -> void: - _f2.value = value - - var _f3: PBField - func get_f3() -> String: - return _f3.value - func clear_f3() -> void: - data[3].state = PB_SERVICE_STATE.UNFILLED - _f3.value = DEFAULT_VALUES_3[PB_DATA_TYPE.STRING] - func set_f3(value : String) -> void: - _f3.value = value - - func to_string() -> String: - return PBPacker.message_to_string(data) - - func to_bytes() -> PoolByteArray: - return PBPacker.pack_message(data) - - func from_bytes(bytes : PoolByteArray, offset : int = 0, limit : int = -1) -> int: - var cur_limit = bytes.size() - if limit != -1: - cur_limit = limit - var result = PBPacker.unpack_message(data, bytes, offset, cur_limit) - if result == cur_limit: - if PBPacker.check_required(data): - if limit == -1: - return PB_ERR.NO_ERRORS - else: - return PB_ERR.REQUIRED_FIELDS - elif limit == -1 && result > 0: - return PB_ERR.PARSE_INCOMPLETE - return result - - class TestInner2: - func _init(): - var service - - var data = {} - - func to_string() -> String: - return PBPacker.message_to_string(data) - - func to_bytes() -> PoolByteArray: - return PBPacker.pack_message(data) - - func from_bytes(bytes : PoolByteArray, offset : int = 0, limit : int = -1) -> int: - var cur_limit = bytes.size() - if limit != -1: - cur_limit = limit - var result = PBPacker.unpack_message(data, bytes, offset, cur_limit) - if result == cur_limit: - if PBPacker.check_required(data): - if limit == -1: - return PB_ERR.NO_ERRORS - else: - return PB_ERR.REQUIRED_FIELDS - elif limit == -1 && result > 0: - return PB_ERR.PARSE_INCOMPLETE - return result - - class TestInner3: - func _init(): - var service - - _f1 = PBField.new("f1", PB_DATA_TYPE.MAP, PB_RULE.REPEATED, 1, true, []) - service = PBServiceField.new() - service.field = _f1 - service.func_ref = funcref(self, "add_empty_f1") - data[_f1.tag] = service - - _f2 = PBField.new("f2", PB_DATA_TYPE.ENUM, PB_RULE.OPTIONAL, 2, true, DEFAULT_VALUES_3[PB_DATA_TYPE.ENUM]) - service = PBServiceField.new() - service.field = _f2 - data[_f2.tag] = service - - _f3 = PBField.new("f3", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 3, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) - service = PBServiceField.new() - service.field = _f3 - service.func_ref = funcref(self, "new_f3") - data[_f3.tag] = service - - var data = {} - - var _f1: PBField - func get_raw_f1(): - return _f1.value - func get_f1(): - return PBPacker.construct_map(_f1.value) - func clear_f1(): - data[1].state = PB_SERVICE_STATE.UNFILLED - _f1.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MAP] - func add_empty_f1() -> Test2.TestInner3.map_type_f1: - var element = Test2.TestInner3.map_type_f1.new() - _f1.value.append(element) - return element - func add_f1(a_key) -> Test2.TestInner3.map_type_f1: - var idx = -1 - for i in range(_f1.value.size()): - if _f1.value[i].get_key() == a_key: - idx = i - break - var element = Test2.TestInner3.map_type_f1.new() - element.set_key(a_key) - if idx != -1: - _f1.value[idx] = element - else: - _f1.value.append(element) - return element.new_value() - - var _f2: PBField - func get_f2(): - return _f2.value - func clear_f2() -> void: - data[2].state = PB_SERVICE_STATE.UNFILLED - _f2.value = DEFAULT_VALUES_3[PB_DATA_TYPE.ENUM] - func set_f2(value) -> void: - _f2.value = value - - var _f3: PBField - func get_f3() -> Test2.TestInner3.TestInner3_1: - return _f3.value - func clear_f3() -> void: - data[3].state = PB_SERVICE_STATE.UNFILLED - _f3.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] - func new_f3() -> Test2.TestInner3.TestInner3_1: - _f3.value = Test2.TestInner3.TestInner3_1.new() - return _f3.value - - class TestInner3_1: - func _init(): - var service - - var data = {} - - func to_string() -> String: - return PBPacker.message_to_string(data) - - func to_bytes() -> PoolByteArray: - return PBPacker.pack_message(data) - - func from_bytes(bytes : PoolByteArray, offset : int = 0, limit : int = -1) -> int: - var cur_limit = bytes.size() - if limit != -1: - cur_limit = limit - var result = PBPacker.unpack_message(data, bytes, offset, cur_limit) - if result == cur_limit: - if PBPacker.check_required(data): - if limit == -1: - return PB_ERR.NO_ERRORS - else: - return PB_ERR.REQUIRED_FIELDS - elif limit == -1 && result > 0: - return PB_ERR.PARSE_INCOMPLETE - return result - - class TestInner3_2: - func _init(): - var service - - _f1 = PBField.new("f1", PB_DATA_TYPE.INT32, PB_RULE.OPTIONAL, 1, true, DEFAULT_VALUES_3[PB_DATA_TYPE.INT32]) - service = PBServiceField.new() - service.field = _f1 - data[_f1.tag] = service - - _f2 = PBField.new("f2", PB_DATA_TYPE.UINT64, PB_RULE.OPTIONAL, 2, true, DEFAULT_VALUES_3[PB_DATA_TYPE.UINT64]) - service = PBServiceField.new() - service.field = _f2 - data[_f2.tag] = service - - var data = {} - - var _f1: PBField - func get_f1() -> int: - return _f1.value - func clear_f1() -> void: - data[1].state = PB_SERVICE_STATE.UNFILLED - _f1.value = DEFAULT_VALUES_3[PB_DATA_TYPE.INT32] - func set_f1(value : int) -> void: - _f1.value = value - - var _f2: PBField - func get_f2() -> int: - return _f2.value - func clear_f2() -> void: - data[2].state = PB_SERVICE_STATE.UNFILLED - _f2.value = DEFAULT_VALUES_3[PB_DATA_TYPE.UINT64] - func set_f2(value : int) -> void: - _f2.value = value - - func to_string() -> String: - return PBPacker.message_to_string(data) - - func to_bytes() -> PoolByteArray: - return PBPacker.pack_message(data) - - func from_bytes(bytes : PoolByteArray, offset : int = 0, limit : int = -1) -> int: - var cur_limit = bytes.size() - if limit != -1: - cur_limit = limit - var result = PBPacker.unpack_message(data, bytes, offset, cur_limit) - if result == cur_limit: - if PBPacker.check_required(data): - if limit == -1: - return PB_ERR.NO_ERRORS - else: - return PB_ERR.REQUIRED_FIELDS - elif limit == -1 && result > 0: - return PB_ERR.PARSE_INCOMPLETE - return result - - class map_type_f1: - func _init(): - var service - - _key = PBField.new("key", PB_DATA_TYPE.STRING, PB_RULE.REQUIRED, 1, true, DEFAULT_VALUES_3[PB_DATA_TYPE.STRING]) - _key.is_map_field = true - service = PBServiceField.new() - service.field = _key - data[_key.tag] = service - - _value = PBField.new("value", PB_DATA_TYPE.MESSAGE, PB_RULE.REQUIRED, 2, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) - _value.is_map_field = true - service = PBServiceField.new() - service.field = _value - service.func_ref = funcref(self, "new_value") - data[_value.tag] = service - - var data = {} - - var _key: PBField - func get_key() -> String: - return _key.value - func clear_key() -> void: - data[1].state = PB_SERVICE_STATE.UNFILLED - _key.value = DEFAULT_VALUES_3[PB_DATA_TYPE.STRING] - func set_key(value : String) -> void: - _key.value = value - - var _value: PBField - func get_value() -> Test2.TestInner3.TestInner3_2: - return _value.value - func clear_value() -> void: - data[2].state = PB_SERVICE_STATE.UNFILLED - _value.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] - func new_value() -> Test2.TestInner3.TestInner3_2: - _value.value = Test2.TestInner3.TestInner3_2.new() - return _value.value - - func to_string() -> String: - return PBPacker.message_to_string(data) - - func to_bytes() -> PoolByteArray: - return PBPacker.pack_message(data) - - func from_bytes(bytes : PoolByteArray, offset : int = 0, limit : int = -1) -> int: - var cur_limit = bytes.size() - if limit != -1: - cur_limit = limit - var result = PBPacker.unpack_message(data, bytes, offset, cur_limit) - if result == cur_limit: - if PBPacker.check_required(data): - if limit == -1: - return PB_ERR.NO_ERRORS - else: - return PB_ERR.REQUIRED_FIELDS - elif limit == -1 && result > 0: - return PB_ERR.PARSE_INCOMPLETE - return result - - func to_string() -> String: - return PBPacker.message_to_string(data) - - func to_bytes() -> PoolByteArray: - return PBPacker.pack_message(data) - - func from_bytes(bytes : PoolByteArray, offset : int = 0, limit : int = -1) -> int: - var cur_limit = bytes.size() - if limit != -1: - cur_limit = limit - var result = PBPacker.unpack_message(data, bytes, offset, cur_limit) - if result == cur_limit: - if PBPacker.check_required(data): - if limit == -1: - return PB_ERR.NO_ERRORS - else: - return PB_ERR.REQUIRED_FIELDS - elif limit == -1 && result > 0: - return PB_ERR.PARSE_INCOMPLETE - return result - - func to_string() -> String: - return PBPacker.message_to_string(data) - - func to_bytes() -> PoolByteArray: - return PBPacker.pack_message(data) - - func from_bytes(bytes : PoolByteArray, offset : int = 0, limit : int = -1) -> int: - var cur_limit = bytes.size() - if limit != -1: - cur_limit = limit - var result = PBPacker.unpack_message(data, bytes, offset, cur_limit) - if result == cur_limit: - if PBPacker.check_required(data): - if limit == -1: - return PB_ERR.NO_ERRORS - else: - return PB_ERR.REQUIRED_FIELDS - elif limit == -1 && result > 0: - return PB_ERR.PARSE_INCOMPLETE - return result - -class Test4: - func _init(): - var service - - _f1 = PBField.new("f1", PB_DATA_TYPE.INT32, PB_RULE.OPTIONAL, 10, true, DEFAULT_VALUES_3[PB_DATA_TYPE.INT32]) - service = PBServiceField.new() - service.field = _f1 - data[_f1.tag] = service - - _f2 = PBField.new("f2", PB_DATA_TYPE.STRING, PB_RULE.OPTIONAL, 3, true, DEFAULT_VALUES_3[PB_DATA_TYPE.STRING]) - service = PBServiceField.new() - service.field = _f2 - data[_f2.tag] = service - - _f3 = PBField.new("f3", PB_DATA_TYPE.FLOAT, PB_RULE.OPTIONAL, 2, true, DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT]) - service = PBServiceField.new() - service.field = _f3 - data[_f3.tag] = service - - _f4 = PBField.new("f4", PB_DATA_TYPE.DOUBLE, PB_RULE.OPTIONAL, 160, true, DEFAULT_VALUES_3[PB_DATA_TYPE.DOUBLE]) - service = PBServiceField.new() - service.field = _f4 - data[_f4.tag] = service - - _f5 = PBField.new("f5", PB_DATA_TYPE.MAP, PB_RULE.REPEATED, 99, true, []) - service = PBServiceField.new() - service.field = _f5 - service.func_ref = funcref(self, "add_empty_f5") - data[_f5.tag] = service - - var data = {} - - var _f1: PBField - func get_f1() -> int: - return _f1.value - func clear_f1() -> void: - data[10].state = PB_SERVICE_STATE.UNFILLED - _f1.value = DEFAULT_VALUES_3[PB_DATA_TYPE.INT32] - func set_f1(value : int) -> void: - _f1.value = value - - var _f2: PBField - func get_f2() -> String: - return _f2.value - func clear_f2() -> void: - data[3].state = PB_SERVICE_STATE.UNFILLED - _f2.value = DEFAULT_VALUES_3[PB_DATA_TYPE.STRING] - func set_f2(value : String) -> void: - _f2.value = value - - var _f3: PBField - func get_f3() -> float: - return _f3.value - func clear_f3() -> void: - data[2].state = PB_SERVICE_STATE.UNFILLED - _f3.value = DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT] - func set_f3(value : float) -> void: - _f3.value = value - - var _f4: PBField - func get_f4() -> float: - return _f4.value - func clear_f4() -> void: - data[160].state = PB_SERVICE_STATE.UNFILLED - _f4.value = DEFAULT_VALUES_3[PB_DATA_TYPE.DOUBLE] - func set_f4(value : float) -> void: - _f4.value = value - - var _f5: PBField - func get_raw_f5(): - return _f5.value - func get_f5(): - return PBPacker.construct_map(_f5.value) - func clear_f5(): - data[99].state = PB_SERVICE_STATE.UNFILLED - _f5.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MAP] - func add_empty_f5() -> int: - var element = Test4.map_type_f5.new() - _f5.value.append(element) - return element - func add_f5(a_key, a_value) -> void: - var idx = -1 - for i in range(_f5.value.size()): - if _f5.value[i].get_key() == a_key: - idx = i - break - var element = Test4.map_type_f5.new() - element.set_key(a_key) - element.set_value(a_value) - if idx != -1: - _f5.value[idx] = element - else: - _f5.value.append(element) - - class map_type_f5: - func _init(): - var service - - _key = PBField.new("key", PB_DATA_TYPE.INT32, PB_RULE.REQUIRED, 1, true, DEFAULT_VALUES_3[PB_DATA_TYPE.INT32]) - _key.is_map_field = true - service = PBServiceField.new() - service.field = _key - data[_key.tag] = service - - _value = PBField.new("value", PB_DATA_TYPE.INT32, PB_RULE.REQUIRED, 2, true, DEFAULT_VALUES_3[PB_DATA_TYPE.INT32]) - _value.is_map_field = true - service = PBServiceField.new() - service.field = _value - data[_value.tag] = service - - var data = {} - - var _key: PBField - func get_key() -> int: - return _key.value - func clear_key() -> void: - data[1].state = PB_SERVICE_STATE.UNFILLED - _key.value = DEFAULT_VALUES_3[PB_DATA_TYPE.INT32] - func set_key(value : int) -> void: - _key.value = value - - var _value: PBField - func get_value() -> int: - return _value.value - func clear_value() -> void: - data[2].state = PB_SERVICE_STATE.UNFILLED - _value.value = DEFAULT_VALUES_3[PB_DATA_TYPE.INT32] - func set_value(value : int) -> void: - _value.value = value - - func to_string() -> String: - return PBPacker.message_to_string(data) - - func to_bytes() -> PoolByteArray: - return PBPacker.pack_message(data) - - func from_bytes(bytes : PoolByteArray, offset : int = 0, limit : int = -1) -> int: - var cur_limit = bytes.size() - if limit != -1: - cur_limit = limit - var result = PBPacker.unpack_message(data, bytes, offset, cur_limit) - if result == cur_limit: - if PBPacker.check_required(data): - if limit == -1: - return PB_ERR.NO_ERRORS - else: - return PB_ERR.REQUIRED_FIELDS - elif limit == -1 && result > 0: - return PB_ERR.PARSE_INCOMPLETE - return result - - func to_string() -> String: - return PBPacker.message_to_string(data) - - func to_bytes() -> PoolByteArray: - return PBPacker.pack_message(data) - - func from_bytes(bytes : PoolByteArray, offset : int = 0, limit : int = -1) -> int: - var cur_limit = bytes.size() - if limit != -1: - cur_limit = limit - var result = PBPacker.unpack_message(data, bytes, offset, cur_limit) - if result == cur_limit: - if PBPacker.check_required(data): - if limit == -1: - return PB_ERR.NO_ERRORS - else: - return PB_ERR.REQUIRED_FIELDS - elif limit == -1 && result > 0: - return PB_ERR.PARSE_INCOMPLETE - return result - -################ USER DATA END ################# From 44e15af2a8619cf73add52120bbd8e9be2a1f4c3 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Wed, 1 Mar 2023 23:19:54 -0500 Subject: [PATCH 162/539] Renamed function for creating retain set and deleted duplicate data checks --- xml_converter/src/xml_converter.cpp | 57 ++++++++++------------------- 1 file changed, 19 insertions(+), 38 deletions(-) diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 58a2193d..e200a023 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -66,7 +66,7 @@ void write_xml_file(string xml_filepath, map* marker_categorie } //////////////////////////////////////////////////////////////////////////////// -// Adds the name of a category and all of its children to a set +// Adds the name of a category and all of it's parents to a set // eg. // { // "mypath", @@ -76,48 +76,31 @@ void write_xml_file(string xml_filepath, map* marker_categorie // "mypath.hardpath.trail", // } //////////////////////////////////////////////////////////////////////////////// -void add_children_names(waypoint::Category proto_category, set* proto_categories, string parent_name) { - string name = parent_name + "." + lowercase(proto_category.name()); - proto_categories->insert(name); - for (int i = 0; i < proto_category.children_size(); i++) { - add_children_names(proto_category.children(i), proto_categories, name); - } -} - -//////////////////////////////////////////////////////////////////////////////// -// Adds the name of a category and all of it's parents to a set -//////////////////////////////////////////////////////////////////////////////// -void add_parent_names(string category_name, set proto_categories, set* category_includes) { - auto category = proto_categories.find(category_name); - if (category == proto_categories.end()) { - cout << "Unknown MarkerCategory " << category_name << endl; - } - else { - string name; - vector split_categories = split(category_name, "."); - for (unsigned int j = 0; j < split_categories.size(); j++) { - name += split_categories[j]; - category_includes->insert(name); - name += "."; - } +void populate_categories_to_retain (string category_name, set* categories_to_retain) { + string name; + vector split_categories = split(category_name, "."); + for (unsigned int j = 0; j < split_categories.size(); j++) { + name += split_categories[j]; + categories_to_retain->insert(name); + name += "."; } } //////////////////////////////////////////////////////////////////////////////// // Iterates through all children of a Category and removes those that do not -// have POIs with corresponding names +// have a nodes that belongs to it. //////////////////////////////////////////////////////////////////////////////// -void remove_proto_child(waypoint::Category* proto_category, set category_includes, string parent_name) { +void remove_proto_child(waypoint::Category* proto_category, set categories_to_retain, string parent_name) { int keep = 0; for (int i = 0; i < proto_category->children_size(); i++) { string name = parent_name + "." + proto_category->children(i).name(); - auto pos = category_includes.find(lowercase(name)); - if (pos != category_includes.end()) { + auto pos = categories_to_retain.find(lowercase(name)); + if (pos != categories_to_retain.end()) { if (keep < i) { proto_category->mutable_children()->SwapElements(i, keep); if (proto_category->children(i).children_size() >= 0) { for (int j = 0; j < proto_category->children_size(); j++) { - remove_proto_child(proto_category->mutable_children(j), category_includes, name); + remove_proto_child(proto_category->mutable_children(j), categories_to_retain, name); } } } @@ -132,13 +115,11 @@ void write_protobuf_file(string proto_filepath, map* marker_ca cout << "Error making ./protobins" << endl; throw std::error_code(); } - // Collects a set of category names and their children + // Creates a Waypoint message that contains all categories waypoint::Waypoint all_categories; - std::set proto_categories; for (const auto& category : *marker_categories) { waypoint::Category proto_category = category.second.as_protobuf(); all_categories.add_category()->CopyFrom(proto_category); - add_children_names(proto_category, &proto_categories, proto_category.name()); } // Collects a set of map ids from Icon and Trail data std::set map_ids; @@ -153,7 +134,7 @@ void write_protobuf_file(string proto_filepath, map* marker_ca } } waypoint::Waypoint output_message; - std::set category_includes; + std::set categories_to_retain; for (int map_id : map_ids) { ofstream outfile; string output_filepath = proto_filepath + "/" + to_string(map_id) + ".data"; @@ -164,14 +145,14 @@ void write_protobuf_file(string proto_filepath, map* marker_ca if (parsed_poi->classname() == "POI") { Icon* icon = dynamic_cast(parsed_poi); if (icon->map_id == map_id) { - add_parent_names(icon->category.category, proto_categories, &category_includes); + populate_categories_to_retain(icon->category.category, &categories_to_retain); output_message.add_icon()->MergeFrom(icon->as_protobuf()); } } else if (parsed_poi->classname() == "Trail") { Trail* trail = dynamic_cast(parsed_poi); if (trail->map_id == map_id) { - add_parent_names(trail->category.category, proto_categories, &category_includes); + populate_categories_to_retain(trail->category.category, &categories_to_retain); output_message.add_trail()->MergeFrom(trail->as_protobuf()); } } @@ -184,7 +165,7 @@ void write_protobuf_file(string proto_filepath, map* marker_ca // except for the children and then iterating over all the children. // This pruning method is slower but ensures that information is kept. for (int i = 0; i < output_message.category_size(); i++) { - remove_proto_child(output_message.mutable_category(i), category_includes, output_message.category(i).name()); + remove_proto_child(output_message.mutable_category(i), categories_to_retain, output_message.category(i).name()); if (output_message.mutable_category(i)->children_size() == 0) { output_message.mutable_category(i)->Clear(); } @@ -192,7 +173,7 @@ void write_protobuf_file(string proto_filepath, map* marker_ca output_message.SerializeToOstream(&outfile); outfile.close(); output_message.Clear(); - category_includes.clear(); + categories_to_retain.clear(); } } From 030e3a86ce2eff1cdef34c64e88873302d3192b2 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Wed, 1 Mar 2023 23:23:33 -0500 Subject: [PATCH 163/539] Delete space --- xml_converter/src/xml_converter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index e200a023..eebcdcf6 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -76,7 +76,7 @@ void write_xml_file(string xml_filepath, map* marker_categorie // "mypath.hardpath.trail", // } //////////////////////////////////////////////////////////////////////////////// -void populate_categories_to_retain (string category_name, set* categories_to_retain) { +void populate_categories_to_retain(string category_name, set* categories_to_retain) { string name; vector split_categories = split(category_name, "."); for (unsigned int j = 0; j < split_categories.size(); j++) { From d12a01a4494ca00d8270e45c50b5a2dcaba75252 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Wed, 1 Mar 2023 23:46:03 -0500 Subject: [PATCH 164/539] Changes to xml_converter preparing for merge --- xml_converter/src/xml_converter.cpp | 125 ++++++++++++++-------------- 1 file changed, 63 insertions(+), 62 deletions(-) diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 5e990e65..1b14ff20 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -18,6 +18,7 @@ #include #include +#include "attribute/trail_data.hpp" #include "category_gen.hpp" #include "icon_gen.hpp" #include "parseable.hpp" @@ -30,15 +31,6 @@ using namespace std; -bool has_suffix(std::string const& fullString, std::string const& ending) { - if (fullString.length() >= ending.length()) { - return (0 == fullString.compare(fullString.length() - ending.length(), ending.length(), ending)); - } - else { - return false; - } -} - void write_xml_file(string xml_filepath, map* marker_categories, vector* parsed_pois) { ofstream outfile; string tab_string; @@ -94,9 +86,9 @@ void remove_proto_child(waypoint::Category* proto_category, set category proto_category->mutable_children()->DeleteSubrange(keep, proto_category->children_size() - keep); } -void read_trail_data_file(waypoint::Trail* trail) { +void read_trail_data_file(string base_dir, waypoint::Trail* trail) { ifstream trail_data_file; - string trail_path = "./" + trail->trail_data().trail_data(); + string trail_path = base_dir + "/" + trail->trail_data().trail_data(); trail_data_file.open(trail_path, ios::in | ios::binary); char version[4]; @@ -124,6 +116,10 @@ void read_trail_data_file(waypoint::Trail* trail) { points_z.push_back(*reinterpret_cast(point_z)); } + if (points_x.size() != points_z.size()) { + cout << "Unexpected number of bits in trail file " << trail_path << endl; + } + *trail->mutable_trail_data()->mutable_points_x() = {points_x.begin(), points_x.end()}; *trail->mutable_trail_data()->mutable_points_y() = {points_y.begin(), points_y.end()}; *trail->mutable_trail_data()->mutable_points_z() = {points_z.begin(), points_z.end()}; @@ -131,11 +127,7 @@ void read_trail_data_file(waypoint::Trail* trail) { trail_data_file.close(); } -void write_protobuf_file(string proto_filepath, map* marker_categories, vector* parsed_pois) { - if (mkdir(proto_filepath.c_str(), 0700) == -1 && errno != EEXIST) { - cout << "Error making ./protobins" << endl; - throw std::error_code(); - } +void write_protobuf_file(string proto_directory, map* marker_categories, vector* parsed_pois) { // Converts map to Waypoint::Categories waypoint::Waypoint all_categories; std::set proto_categories; @@ -165,7 +157,7 @@ void write_protobuf_file(string proto_filepath, map* marker_ca map_ids.insert(trail->map_id); } waypoint::Trail poi = trail->as_protobuf(); - read_trail_data_file(&poi); + read_trail_data_file(trail->trail_data.base_dir, &poi); proto_pois.add_trail()->CopyFrom(poi); } } @@ -174,7 +166,7 @@ void write_protobuf_file(string proto_filepath, map* marker_ca std::set category_includes; for (int map_id : map_ids) { ofstream outfile; - string output_filepath = proto_filepath + "/" + to_string(map_id) + ".data"; + string output_filepath = proto_directory + "/" + to_string(map_id) + ".data"; outfile.open(output_filepath, ios::out | ios::binary); output_message.CopyFrom(all_categories); @@ -287,7 +279,7 @@ Category* get_category(rapidxml::xml_node<>* node, map* marker // // Parse the xml block into an in-memory array of Markers. //////////////////////////////////////////////////////////////////////////////// -vector parse_pois(rapidxml::xml_node<>* root_node, map* marker_categories, vector* errors) { +vector parse_pois(string base_dir, rapidxml::xml_node<>* root_node, map* marker_categories, vector* errors) { vector markers; for (rapidxml::xml_node<>* node = root_node->first_node(); node; node = node->next_sibling()) { @@ -313,6 +305,9 @@ vector parse_pois(rapidxml::xml_node<>* root_node, mapinit_from_xml(node, errors); + if (trail->trail_data_is_set) { + trail->trail_data.base_dir = base_dir; + } markers.push_back(trail); } else { @@ -368,7 +363,6 @@ void parse_proto_marker_categories(::waypoint::Category proto_category, map* marker_categories, vector* parsed_pois) { vector errors; - rapidxml::xml_document<> doc; rapidxml::xml_node<>* root_node; @@ -376,6 +370,7 @@ void parse_xml_file(string xml_filepath, map* marker_categorie doc.parse(xml_file.data(), xml_filepath.c_str()); root_node = doc.first_node(); + string base_dir = get_base_dir(xml_filepath); // Validate the Root Node if (get_node_name(root_node) != "OverlayData") { @@ -390,7 +385,7 @@ void parse_xml_file(string xml_filepath, map* marker_categorie parse_marker_categories(node, marker_categories, &errors); } else if (get_node_name(node) == "POIs") { - vector temp_vector = parse_pois(node, marker_categories, &errors); + vector temp_vector = parse_pois(base_dir, node, marker_categories, &errors); move(temp_vector.begin(), temp_vector.end(), back_inserter(*parsed_pois)); } else { @@ -420,45 +415,46 @@ bool filename_comp(string a, string b) { return lowercase(a) < lowercase(b); } -vector get_xml_files(string directory) { +vector get_xml_files(string directory, string data_directory) { vector files; - vector subfolders; - string path; DIR* dir = opendir(directory.c_str()); - struct dirent* entry = readdir(dir); + struct dirent* entry; while ((entry = readdir(dir)) != NULL) { - if (entry->d_type == DT_DIR && has_suffix(directory, ".") == false) { - path = directory + "/"; - path += entry->d_name; - subfolders.push_back(path); - } - else if (has_suffix(entry->d_name, ".xml")) { - path = directory + "/"; - path += entry->d_name; - files.push_back(path); - } - else { - continue; + string filename = entry->d_name; + if (filename != "." && filename != "..") { + string path = directory + "/" + filename; + if (entry->d_type == DT_DIR) { + string new_folder = data_directory + "/" + filename; + if (mkdir(new_folder.c_str(), 0700) == -1 && errno != EEXIST) { + cout << "Error making " << new_folder << endl; + continue; + } + vector subfiles = get_xml_files(path, new_folder); + for (string subfile : subfiles) { + cout << subfile << endl; + files.push_back(subfile); + } + } + else if (entry->d_type == DT_REG) { + if (has_suffix(filename, ".xml")) { + files.push_back(path); + } + else if (has_suffix(filename, ".trl") == false) { + string new_path = data_directory + "/" + filename; + ifstream infile(path, ios::binary); + ofstream outfile(new_path, ios::binary); + outfile << infile.rdbuf(); + } + } } } closedir(dir); - std::sort(files.begin(), files.end(), filename_comp); - std::sort(subfolders.begin(), subfolders.end(), filename_comp); - - for (const std::string& subfolder : subfolders) { - if (has_suffix(subfolder, ".") == false && has_suffix(subfolder, "..") == false) { - vector subfiles = get_xml_files(subfolder); - files.insert(files.end(), subfiles.begin(), subfiles.end()); - } - } return files; } -void convert_taco_directory(string directory, map* marker_categories, vector* parsed_pois) { - string data = "rsync -a " + directory + "/Data ./protobins"; - system(data.c_str()); - vector xml_files = get_xml_files(directory); +void convert_taco_directory(string directory, string data_directory, map* marker_categories, vector* parsed_pois) { + vector xml_files = get_xml_files(directory, data_directory); for (const string& path : xml_files) { parse_xml_file(path, marker_categories, parsed_pois); } @@ -485,20 +481,25 @@ int main() { map marker_categories; test_proto(); - if (mkdir("./protobins/Data", 0700) == -1 && errno != EEXIST) { - cout << "Error making ./protobins/Data" << endl; + string output_directory = "./protobins"; + + if (mkdir(output_directory.c_str(), 0700) == -1 && errno != EEXIST) { + cout << "Error making ./protobins/" << endl; throw std::error_code(); } - string directory = "./packs"; - DIR* dir = opendir(directory.c_str()); + string input_directory = "./packs"; + vector marker_packs; + + DIR* dir = opendir(input_directory.c_str()); struct dirent* entry = readdir(dir); while ((entry = readdir(dir)) != NULL) { - if (entry->d_type == DT_DIR && strcmp(entry->d_name, ".")) { - string path = directory + "/"; - path += entry->d_name; + string filename = entry->d_name; + if (entry->d_type == DT_DIR && filename != "." && filename != "..") { + string path = input_directory + "/" + filename; + marker_packs.push_back(path); cout << path << endl; - convert_taco_directory(path, &marker_categories, &parsed_pois); + convert_taco_directory(path, output_directory, &marker_categories, &parsed_pois); } } closedir(dir); @@ -516,15 +517,15 @@ int main() { cout << "The xml write function took " << ms << " milliseconds to run" << endl; begin = chrono::high_resolution_clock::now(); - write_protobuf_file("./protobins", &marker_categories, &parsed_pois); + write_protobuf_file(output_directory, &marker_categories, &parsed_pois); end = chrono::high_resolution_clock::now(); dur = end - begin; ms = std::chrono::duration_cast(dur).count(); cout << "The protobuf write function took " << ms << " milliseconds to run" << endl; - // ////////////////////////////////////////////////////////////////////////////////////// - // / This section tests that the protobuf file can be parsed back to xml - // ////////////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////////////// + // This section tests that the protobuf file can be parsed back to xml + //////////////////////////////////////////////////////////////////////////////////////// parsed_pois.clear(); marker_categories.clear(); From 2d249f46aa182e16d8a874454586c4ae7b4665a9 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sat, 4 Mar 2023 16:25:14 -0500 Subject: [PATCH 165/539] Merged with previous PR and addressed code review --- Icon.tscn | 5 + Spatial.gd | 65 ++----- Spatial.tscn | 15 +- waypoint.gd | 178 +++++++++--------- xml_converter/doc/alpha/alpha.md | 13 -- xml_converter/doc/position/heightoffset.md | 2 +- xml_converter/doc/texture/color.md | 5 +- xml_converter/doc/texture/icon.md | 2 +- xml_converter/doc/texture/texture.md | 2 +- xml_converter/generators/code_generator.py | 2 +- .../cpp_templates/class_template.cpp | 48 +---- xml_converter/proto/waypoint.proto | 16 +- xml_converter/src/attribute/color.cpp | 59 +++--- xml_converter/src/attribute/color.hpp | 5 +- xml_converter/src/attribute/trail_data.hpp | 1 + xml_converter/src/category_gen.cpp | 15 -- xml_converter/src/icon_gen.cpp | 90 ++------- xml_converter/src/icon_gen.hpp | 2 - xml_converter/src/string_helper.cpp | 14 ++ xml_converter/src/string_helper.hpp | 3 + xml_converter/src/trail_gen.cpp | 74 +------- xml_converter/src/trail_gen.hpp | 2 - xml_converter/src/xml_converter.cpp | 33 +++- 23 files changed, 237 insertions(+), 414 deletions(-) delete mode 100644 xml_converter/doc/alpha/alpha.md diff --git a/Icon.tscn b/Icon.tscn index 62801850..c8e13879 100644 --- a/Icon.tscn +++ b/Icon.tscn @@ -45,6 +45,11 @@ void fragment() { [sub_resource type="ShaderMaterial" id=2] resource_local_to_scene = true shader = SubResource( 1 ) +shader_param/map_size = null +shader_param/map_flipped = null +shader_param/map_bottom_offset = 36.0 +shader_param/smallest_scale = 0.0 +shader_param/texture_albedo = ExtResource( 1 ) [node name="Icon" type="Sprite3D"] material_override = SubResource( 2 ) diff --git a/Spatial.gd b/Spatial.gd index 1ffea06f..a11793cf 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -254,12 +254,7 @@ func decode_context_packet(spb: StreamPeerBuffer): # this to just be a radian to degree conversion. if self.map_id != old_map_id: - print("New Map") - - print("Saving Old Map") - #self.markerdata[str(old_map_id)] = data_from_renderview() print("Loading New Map") - load_waypoint_markers(self.map_id) gen_map_markers() @@ -289,10 +284,11 @@ func reset_minimap_masks(): minimap_path.material.set_shader_param("minimap_corner2", compass_corner2) var markerdata = Waypoint.Waypoint.new() +var marker_file_dir = "res://xml_converter/protobins/" var marker_file_path = "" func load_waypoint_markers(map_id): - self.marker_file_path = "res://xml_converter/protobins/" + String(map_id) + ".data" + self.marker_file_path = self.marker_file_dir + String(map_id) + ".data" print("Loading protobuf file from path ", self.marker_file_path) self.markerdata.clear_category() self.markerdata.clear_icon() @@ -305,39 +301,7 @@ func load_waypoint_markers(map_id): print("OK") else: print(Waypoint.PB_ERR) - - relative_textures_to_absolute_textures(marker_file_path.get_base_dir()) - - gen_map_markers() - -func load_taco_markers(marker_file): - self.marker_file_path = marker_file - print("Loading protobuf file from path ", marker_file) - var file = File.new() - file.open(marker_file, file.READ) - var data = file.get_buffer(file.get_len()) - self.markerdata.from_bytes(data) - if !Waypoint.PB_ERR.NO_ERRORS: - print("OK") - else: - print(Waypoint.PB_ERR) - - relative_textures_to_absolute_textures(marker_file_path.get_base_dir()) - - gen_map_markers() -func is_xml_file(input_file): - return input_file.split(".")[-1] == "xml" - -func relative_textures_to_absolute_textures(marker_file_dir): - for icon in self.markerdata.get_icon(): - var texture = icon.get_texture() - if !texture.get_path().is_abs_path(): - texture.set_path(marker_file_dir + "/" + texture.get_path()) - for path in self.markerdata.get_trail(): - var texture = path.get_texture() - if !texture.get_path().is_abs_path(): - texture.set_path(marker_file_dir + "/" + texture.get_path()) var route_scene = load("res://Route.tscn") var icon_scene = load("res://Icon.tscn") @@ -430,20 +394,27 @@ func gen_map_markers(): for icon in icons.get_children(): icon.queue_free() - # Load the data from the markers $$$COVERT TO PROTO$$$ + # Load the data from the markers for path in self.markerdata.get_trail(): var path_points := PoolVector3Array() var trail_data = path.get_trail_data() - if trail_data.get_points_x().size() > 0: - for index in range(0, trail_data.get_points_x().size()): - path_points.append(Vector3(trail_data.get_points_x()[index], trail_data.get_points_y()[index], trail_data.get_points_z()[index])) - gen_new_path(path_points, path.get_texture().get_path()) + for index in range(0, trail_data.get_points_x().size()): + path_points.append(Vector3(trail_data.get_points_x()[index], trail_data.get_points_y()[index], trail_data.get_points_z()[index])) + var texture_path = path.get_texture_path() + var full_texture_path = self.marker_file_dir + texture_path.get_path() + gen_new_path(path_points, full_texture_path) for icon in self.markerdata.get_icon(): var position = icon.get_position() if position == null: + print("Warning: No position found for icon ", icon.get_category().name()) continue var position_vector = Vector3(position.get_x(), position.get_y(), position.get_z()) - gen_new_icon(position_vector, icon.get_texture().get_path()) + var texture_path = icon.get_texture_path() + if texture_path == null: + print("Warning: No texture found for icon") + continue + var full_texture_path = self.marker_file_dir + texture_path.get_path() + gen_new_icon(position_vector, full_texture_path) func gen_new_path(points: Array, texture_path: String): var points_2d: PoolVector2Array = [] @@ -499,7 +470,7 @@ func gen_new_path(points: Array, texture_path: String): ################################################################################ # ################################################################################ -func gen_new_icon(position: Vector3, texture_path: String): #$$$COVERT TO PROTO$$$ +func gen_new_icon(position: Vector3, texture_path: String): position.z = -position.z var new_icon = icon_scene.instance() new_icon.translation = position @@ -539,7 +510,8 @@ func _on_main_menu_toggle_pressed(): set_maximal_mouse_block() func _on_FileDialog_file_selected(path): - load_taco_markers(path) + #Godot required + print(path) ################################################################################ @@ -765,7 +737,6 @@ func _on_SnapSelectedToPlayer_pressed(): self.currently_selected_node.translation.x = self.player_position.x self.currently_selected_node.translation.z = -self.player_position.z self.currently_selected_node.translation.y = self.player_position.y - print(self.player_position.x, " ", -self.player_position.z, " ",self.player_position.y) func _on_SetActivePath_pressed(): if self.currently_selected_node.point_type == "icon": diff --git a/Spatial.tscn b/Spatial.tscn index 56823156..180612d8 100644 --- a/Spatial.tscn +++ b/Spatial.tscn @@ -176,8 +176,9 @@ margin_bottom = 672.0 window_title = "Open a File" mode = 0 access = 2 -current_dir = "." -current_path = "." +current_dir = "/home/steph/Code/Projects/Burrito" +current_file = "." +current_path = "/home/steph/Code/Projects/Burrito/." __meta__ = { "_edit_use_anchors_": false } @@ -473,8 +474,9 @@ window_title = "Open a File" mode = 0 access = 2 filters = PoolStringArray( "*.png" ) -current_dir = "." -current_path = "." +current_dir = "/home/steph/Code/Projects/Burrito" +current_file = "." +current_path = "/home/steph/Code/Projects/Burrito/." __meta__ = { "_edit_use_anchors_": false } @@ -487,8 +489,9 @@ margin_bottom = 624.833 window_title = "Save Path" resizable = true access = 2 -current_dir = "." -current_path = "." +current_dir = "/home/steph/Code/Projects/Burrito" +current_file = "." +current_path = "/home/steph/Code/Projects/Burrito/." __meta__ = { "_edit_use_anchors_": false } diff --git a/waypoint.gd b/waypoint.gd index 71645a2c..0e9da02b 100644 --- a/waypoint.gd +++ b/waypoint.gd @@ -862,11 +862,11 @@ class Icon: service.func_ref = funcref(self, "new_category") data[_category.tag] = service - _texture = PBField.new("texture", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 2, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) + _texture_path = PBField.new("texture_path", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 2, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) service = PBServiceField.new() - service.field = _texture - service.func_ref = funcref(self, "new_texture") - data[_texture.tag] = service + service.field = _texture_path + service.func_ref = funcref(self, "new_texture_path") + data[_texture_path.tag] = service _guid = PBField.new("guid", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 3, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) service = PBServiceField.new() @@ -957,11 +957,11 @@ class Icon: service.field = _tip_name data[_tip_name.tag] = service - _rgba = PBField.new("rgba", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 26, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) + _rgba_color = PBField.new("rgba_color", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 26, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) service = PBServiceField.new() - service.field = _rgba - service.func_ref = funcref(self, "new_rgba") - data[_rgba.tag] = service + service.field = _rgba_color + service.func_ref = funcref(self, "new_rgba_color") + data[_rgba_color.tag] = service _festival_filter = PBField.new("festival_filter", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 27, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) service = PBServiceField.new() @@ -1046,15 +1046,15 @@ class Icon: _category.value = Category.new() return _category.value - var _texture: PBField - func get_texture() -> TexturePath: - return _texture.value - func clear_texture() -> void: + var _texture_path: PBField + func get_texture_path() -> TexturePath: + return _texture_path.value + func clear_texture_path() -> void: data[2].state = PB_SERVICE_STATE.UNFILLED - _texture.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] - func new_texture() -> TexturePath: - _texture.value = TexturePath.new() - return _texture.value + _texture_path.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] + func new_texture_path() -> TexturePath: + _texture_path.value = TexturePath.new() + return _texture_path.value var _guid: PBField func get_guid() -> GUID: @@ -1213,15 +1213,15 @@ class Icon: func set_tip_name(value : String) -> void: _tip_name.value = value - var _rgba: PBField - func get_rgba() -> RGBA: - return _rgba.value - func clear_rgba() -> void: + var _rgba_color: PBField + func get_rgba_color() -> RGBAColor: + return _rgba_color.value + func clear_rgba_color() -> void: data[26].state = PB_SERVICE_STATE.UNFILLED - _rgba.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] - func new_rgba() -> RGBA: - _rgba.value = RGBA.new() - return _rgba.value + _rgba_color.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] + func new_rgba_color() -> RGBAColor: + _rgba_color.value = RGBAColor.new() + return _rgba_color.value var _festival_filter: PBField func get_festival_filter() -> FestivalFilter: @@ -1377,11 +1377,11 @@ class Trail: service.func_ref = funcref(self, "new_category") data[_category.tag] = service - _texture = PBField.new("texture", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 2, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) + _texture_path = PBField.new("texture_path", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 2, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) service = PBServiceField.new() - service.field = _texture - service.func_ref = funcref(self, "new_texture") - data[_texture.tag] = service + service.field = _texture_path + service.func_ref = funcref(self, "new_texture_path") + data[_texture_path.tag] = service _guid = PBField.new("guid", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 3, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) service = PBServiceField.new() @@ -1440,11 +1440,11 @@ class Trail: service.field = _scale data[_scale.tag] = service - _rgba = PBField.new("rgba", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 22, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) + _rgba_color = PBField.new("rgba_color", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 22, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) service = PBServiceField.new() - service.field = _rgba - service.func_ref = funcref(self, "new_rgba") - data[_rgba.tag] = service + service.field = _rgba_color + service.func_ref = funcref(self, "new_rgba_color") + data[_rgba_color.tag] = service _festival_filter = PBField.new("festival_filter", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 23, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) service = PBServiceField.new() @@ -1529,15 +1529,15 @@ class Trail: _category.value = Category.new() return _category.value - var _texture: PBField - func get_texture() -> TexturePath: - return _texture.value - func clear_texture() -> void: + var _texture_path: PBField + func get_texture_path() -> TexturePath: + return _texture_path.value + func clear_texture_path() -> void: data[2].state = PB_SERVICE_STATE.UNFILLED - _texture.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] - func new_texture() -> TexturePath: - _texture.value = TexturePath.new() - return _texture.value + _texture_path.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] + func new_texture_path() -> TexturePath: + _texture_path.value = TexturePath.new() + return _texture_path.value var _guid: PBField func get_guid() -> GUID: @@ -1640,15 +1640,15 @@ class Trail: func set_scale(value : float) -> void: _scale.value = value - var _rgba: PBField - func get_rgba() -> RGBA: - return _rgba.value - func clear_rgba() -> void: + var _rgba_color: PBField + func get_rgba_color() -> RGBAColor: + return _rgba_color.value + func clear_rgba_color() -> void: data[22].state = PB_SERVICE_STATE.UNFILLED - _rgba.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] - func new_rgba() -> RGBA: - _rgba.value = RGBA.new() - return _rgba.value + _rgba_color.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] + func new_rgba_color() -> RGBAColor: + _rgba_color.value = RGBAColor.new() + return _rgba_color.value var _festival_filter: PBField func get_festival_filter() -> FestivalFilter: @@ -1835,6 +1835,47 @@ class TexturePath: return PB_ERR.PARSE_INCOMPLETE return result +class RGBAColor: + func _init(): + var service + + _rgba_color = PBField.new("rgba_color", PB_DATA_TYPE.INT32, PB_RULE.OPTIONAL, 1, true, DEFAULT_VALUES_3[PB_DATA_TYPE.INT32]) + service = PBServiceField.new() + service.field = _rgba_color + data[_rgba_color.tag] = service + + var data = {} + + var _rgba_color: PBField + func get_rgba_color() -> int: + return _rgba_color.value + func clear_rgba_color() -> void: + data[1].state = PB_SERVICE_STATE.UNFILLED + _rgba_color.value = DEFAULT_VALUES_3[PB_DATA_TYPE.INT32] + func set_rgba_color(value : int) -> void: + _rgba_color.value = value + + func to_string() -> String: + return PBPacker.message_to_string(data) + + func to_bytes() -> PoolByteArray: + return PBPacker.pack_message(data) + + func from_bytes(bytes : PoolByteArray, offset : int = 0, limit : int = -1) -> int: + var cur_limit = bytes.size() + if limit != -1: + cur_limit = limit + var result = PBPacker.unpack_message(data, bytes, offset, cur_limit) + if result == cur_limit: + if PBPacker.check_required(data): + if limit == -1: + return PB_ERR.NO_ERRORS + else: + return PB_ERR.REQUIRED_FIELDS + elif limit == -1 && result > 0: + return PB_ERR.PARSE_INCOMPLETE + return result + class Position: func _init(): var service @@ -2257,47 +2298,6 @@ class GUID: return PB_ERR.PARSE_INCOMPLETE return result -class RGBA: - func _init(): - var service - - _rgba = PBField.new("rgba", PB_DATA_TYPE.INT32, PB_RULE.OPTIONAL, 1, true, DEFAULT_VALUES_3[PB_DATA_TYPE.INT32]) - service = PBServiceField.new() - service.field = _rgba - data[_rgba.tag] = service - - var data = {} - - var _rgba: PBField - func get_rgba() -> int: - return _rgba.value - func clear_rgba() -> void: - data[1].state = PB_SERVICE_STATE.UNFILLED - _rgba.value = DEFAULT_VALUES_3[PB_DATA_TYPE.INT32] - func set_rgba(value : int) -> void: - _rgba.value = value - - func to_string() -> String: - return PBPacker.message_to_string(data) - - func to_bytes() -> PoolByteArray: - return PBPacker.pack_message(data) - - func from_bytes(bytes : PoolByteArray, offset : int = 0, limit : int = -1) -> int: - var cur_limit = bytes.size() - if limit != -1: - cur_limit = limit - var result = PBPacker.unpack_message(data, bytes, offset, cur_limit) - if result == cur_limit: - if PBPacker.check_required(data): - if limit == -1: - return PB_ERR.NO_ERRORS - else: - return PB_ERR.REQUIRED_FIELDS - elif limit == -1 && result > 0: - return PB_ERR.PARSE_INCOMPLETE - return result - enum CullChirality { none = 0, clockwise = 1, diff --git a/xml_converter/doc/alpha/alpha.md b/xml_converter/doc/alpha/alpha.md deleted file mode 100644 index cd53cec4..00000000 --- a/xml_converter/doc/alpha/alpha.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -name: Alpha -type: Float32 -applies_to: [Icon, Trail] -xml_fields: [Alpha] -protobuf_field: rgba -compatability: [TacO, BlishHUD, Burrito] ---- -The opacity of the object - -Notes -===== -https://blishhud.com/docs/markers/attributes/alpha diff --git a/xml_converter/doc/position/heightoffset.md b/xml_converter/doc/position/heightoffset.md index 21aab22d..e4d044d9 100644 --- a/xml_converter/doc/position/heightoffset.md +++ b/xml_converter/doc/position/heightoffset.md @@ -2,7 +2,7 @@ name: Height Offset type: Float32 applies_to: ["Icon"] -xml_fields: ["HeightOffset"] +xml_fields: ["HeightOffset", "BH-HeightOffset"] compatability: [TacO, Burrito, BlishHUD] protobuf_field: height_offset --- diff --git a/xml_converter/doc/texture/color.md b/xml_converter/doc/texture/color.md index c0b58100..8dd31278 100644 --- a/xml_converter/doc/texture/color.md +++ b/xml_converter/doc/texture/color.md @@ -3,8 +3,8 @@ name: Color type: Custom class: Color applies_to: [Icon, Trail] -xml_fields: [Color] -protobuf_field: rgba +xml_fields: [Color, BHColor] +protobuf_field: rgba_color compatability: [TacO, BlishHUD, Burrito] --- A multiplier color to tint the raw albedo texture of a marker of trail texture. (Unclear) Solid white will result in no change, solid black will result in a black texture. @@ -15,3 +15,4 @@ https://blishhud.com/docs/markers/attributes/texture https://blishhud.com/docs/markers/attributes/iconfile https://blishhud.com/docs/markers/attributes/color https://blishhud.com/docs/markers/attributes/animspeed + diff --git a/xml_converter/doc/texture/icon.md b/xml_converter/doc/texture/icon.md index 716aaf99..9332648b 100644 --- a/xml_converter/doc/texture/icon.md +++ b/xml_converter/doc/texture/icon.md @@ -4,7 +4,7 @@ type: Custom class: Image applies_to: [Icon] xml_fields: [IconFile] -protobuf_field: texture +protobuf_field: texture_path compatability: [TacO, BlishHUD, Burrito] --- The path to an image which contains the texture that will be present on an icon. diff --git a/xml_converter/doc/texture/texture.md b/xml_converter/doc/texture/texture.md index 7823cbc5..2baa288e 100644 --- a/xml_converter/doc/texture/texture.md +++ b/xml_converter/doc/texture/texture.md @@ -4,7 +4,7 @@ type: Custom class: Image applies_to: [Trail] xml_fields: [Texture] -protobuf_field: texture +protobuf_field: texture_path compatability: [TacO, BlishHUD, Burrito] --- The path to an image which contains the texture that will be present on a trail. diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index f4aa342d..347e32b2 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -204,7 +204,7 @@ type: array items: type: string - pattern: "^[A-Za-z]+$" + pattern: "^[A-Za-z-]+$" protobuf_field: type: string pattern: "^[a-z_.]+$" diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index 6a0cee84..618b5eae 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -44,11 +44,6 @@ bool {{cpp_class}}::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vec this->{{attribute_variable.attribute_name}} = parse_{{attribute_variable.class_name}}(attribute, errors); this->{{attribute_variable.attribute_name}}_is_set = true; } - {% elif (attribute_variable.attribute_name == "alpha") %} - else if (attributename == "{{value}}") { - this->color.{{attribute_variable.attribute_name}} = parse_{{attribute_variable.class_name}}(attribute, errors); - this->{{attribute_variable.attribute_name}}_is_set = true; - } {% elif (attribute_variable.attribute_type == "CompoundValue" and attribute_variable.compound_name != None) %} else if (attributename == "{{value}}") { this->{{attribute_variable.compound_name}}.{{attribute_variable.attribute_name}} = parse_float(attribute, errors); @@ -83,32 +78,26 @@ vector {{cpp_class}}::as_xml() const { xml_node_contents.push_back("<{{xml_class_name}} "); {% for attribute_variable in attribute_variables %} {% if (attribute_variable.attribute_type == "CompoundValue") %} - {% if (attribute_variable.xml_export == "Children" and attribute_variable.compound_name != None) %} + {% if (attribute_variable.xml_export == "Children" and attribute_variable.compound_name != None) %} if (this->{{attribute_variable.compound_name}}_is_set) { xml_node_contents.push_back(" {{attribute_variable.default_xml_fields[0]}}=\"" + to_string(this->{{attribute_variable.compound_name}}.{{attribute_variable.attribute_name}}) + "\""); } - {% elif (attribute_variable.xml_export == "Parent" and attribute_variable.compound_name == None)%} + {% elif (attribute_variable.xml_export == "Parent" and attribute_variable.compound_name == None)%} if (this->{{attribute_variable.attribute_name}}_is_set) { xml_node_contents.push_back(" {{attribute_variable.default_xml_fields[0]}}=\"" + stringify_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}}) + "\""); } - {% elif (attribute_variable.xml_export == "Parent and Children")%} - {% for value in attribute_variable.xml_fields %} + {% elif (attribute_variable.xml_export == "Parent and Children")%} + {% for value in attribute_variable.xml_fields %} if (this->{{attribute_variable.attribute_name}}_is_set) { xml_node_contents.push_back(" {{value}}=\"" + stringify_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}}) + "\""); - {% endfor %} - } - {% endif %} - {% else: %} - {% if (attribute_variable.attribute_name == "alpha")%} - if (this->{{attribute_variable.attribute_name}}_is_set) { - xml_node_contents.push_back(" {{attribute_variable.default_xml_fields[0]}}=\"" + stringify_{{attribute_variable.class_name}}(this->color.{{attribute_variable.attribute_name}}) + "\""); + {% endfor %} } + {% endif %} {% else: %} if (this->{{attribute_variable.attribute_name}}_is_set) { xml_node_contents.push_back(" {{attribute_variable.default_xml_fields[0]}}=\"" + stringify_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}}) + "\""); } {% endif %} - {% endif %} {% endfor %} {% if cpp_class == "Category": %} xml_node_contents.push_back(">\n"); @@ -166,26 +155,10 @@ waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf() const { proto_{{cpp_class_header}}.set_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); } {% elif (attribute_variable.attribute_type in ["MultiflagValue", "CompoundValue", "Custom"]) and attribute_variable.compound_name == None%} - {% if (attribute_variable.class_name == "color")%} - if (this->{{attribute_variable.attribute_name}}_is_set) { - if (this->alpha_is_set) { - proto_{{cpp_class_header}}.set_allocated_rgba(to_proto_color(this->color, this->color.alpha)); - } - else { - proto_{{cpp_class_header}}.set_allocated_rgba(to_proto_color(this->color, 1.0)); - } - } - {% else: %} if (this->{{attribute_variable.attribute_name}}_is_set) { proto_{{cpp_class_header}}.set_allocated_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); } - {% endif %} {% elif (attribute_variable.compound_name != None)%} - {% elif (attribute_variable.attribute_name == "alpha")%} - {% else: %} - if (this->{{attribute_variable.attribute_name}}_is_set) { - proto_{{cpp_class_header}}.set_{{attribute_variable.protobuf_field}}(this->{{attribute_variable.attribute_name}}); - } {% endif %} {% endif %} {% endfor %} @@ -238,25 +211,16 @@ void {{cpp_class}}::parse_protobuf(waypoint::{{cpp_class}} proto_{{cpp_class_hea this->{{attribute_variable.attribute_name}}_is_set = true; } {% elif (attribute_variable.attribute_type in ["MultiflagValue", "CompoundValue", "Custom"]) and attribute_variable.compound_name == None%} - {% if (attribute_variable.protobuf_field == "rgba")%} - if (proto_{{cpp_class_header}}.has_{{attribute_variable.protobuf_field}}()) { - this->color = from_proto_color(proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}()); - this->color_is_set = true; - this->alpha_is_set = true; - } - {% else: %} if (proto_{{cpp_class_header}}.has_{{attribute_variable.protobuf_field}}()) { this->{{attribute_variable.attribute_name}} = from_proto_{{attribute_variable.class_name}}(proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}()); this->{{attribute_variable.attribute_name}}_is_set = true; } - {% endif %} {% elif (attribute_variable.compound_name != None) %} {% elif (attribute_variable.class_name == "string") %} if (proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}() != "") { this->{{attribute_variable.attribute_name}} = proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}(); this->{{attribute_variable.attribute_name}}_is_set = true; } - {% elif (attribute_variable.attribute_name == "alpha")%} {% else: %} if (proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}() != 0) { this->{{attribute_variable.attribute_name}} = proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}(); diff --git a/xml_converter/proto/waypoint.proto b/xml_converter/proto/waypoint.proto index 46de33ec..d7925a6b 100644 --- a/xml_converter/proto/waypoint.proto +++ b/xml_converter/proto/waypoint.proto @@ -19,7 +19,7 @@ message Category { message Icon { Category category = 1; - TexturePath texture = 2; + TexturePath texture_path = 2; GUID guid = 3; int32 map_id = 4; float distance_fade_end = 5; @@ -38,7 +38,7 @@ message Icon { bool scale_on_map_with_zoom = 23; string tip_description = 24; string tip_name = 25; - RGBA rgba = 26; + RGBAColor rgba_color = 26; FestivalFilter festival_filter = 27; MapTypeFilter map_type_filter = 28; MountFilter mount_filter = 29; @@ -57,7 +57,7 @@ message Icon { message Trail { Category category = 1; - TexturePath texture = 2; + TexturePath texture_path = 2; GUID guid = 3; int32 map_id = 4; float distance_fade_end = 5; @@ -70,7 +70,7 @@ message Trail { bool can_fade = 19; bool is_wall = 20; float scale = 21; - RGBA rgba = 22; + RGBAColor rgba_color = 22; FestivalFilter festival_filter = 23; MapTypeFilter map_type_filter = 24; MountFilter mount_filter = 25; @@ -90,6 +90,10 @@ message Trail { message TexturePath { string path = 1; } + +message RGBAColor{ + int32 rgba_color = 1; +} message Position { float x = 1; @@ -125,10 +129,6 @@ message GUID { bytes guid = 1; } -message RGBA { - int32 rgba = 1; -} - enum CullChirality { none = 0; clockwise = 1; diff --git a/xml_converter/src/attribute/color.cpp b/xml_converter/src/attribute/color.cpp index afce854d..3d1d7ccd 100644 --- a/xml_converter/src/attribute/color.cpp +++ b/xml_converter/src/attribute/color.cpp @@ -1,7 +1,10 @@ #include "color.hpp" +#include +#include -#include - +#include +#include +#include #include #include #include @@ -18,17 +21,11 @@ using namespace std; // // Parses a Color from the value of a rapidxml::xml_attribute. // TODO(#98): Color should be saved in a better format then the raw hex string. -// TODO: Every node that has a Hex needs an alpha but not every alpha needs Hex +// TODO(#129): Compound Value XML Export //////////////////////////////////////////////////////////////////////////////// Color parse_color(rapidxml::xml_attribute<>* input, vector*) { Color color; - std::string hex = get_attribute_value(input); - if (hex.length() == 6 || 7) { - if (hex.compare(0, 1, "#")) { - hex = hex.erase(0, 1); - } - color.hex = hex; - } + color.hex = get_attribute_value(input); return color; } @@ -38,34 +35,25 @@ Color parse_color(rapidxml::xml_attribute<>* input, vector*) { // Converts a Color into a stringy value so it can be saved to xml. //////////////////////////////////////////////////////////////////////////////// string stringify_color(Color attribute_value) { - return "#" + attribute_value.hex; + return attribute_value.hex; } //////////////////////////////////////////////////////////////////////////////// // to_proto_color // // Converts a Color into a proto message -// TODO: Find a way to transfer alpha when color hex is not set //////////////////////////////////////////////////////////////////////////////// -waypoint::RGBA* to_proto_color(Color attribute_value, float alpha) { - waypoint::RGBA* rgba = new waypoint::RGBA(); +waypoint::RGBAColor* to_proto_color(Color attribute_value) { string hex = attribute_value.hex; - int r = stoi(hex.substr(0, 2), 0, 16); - int g = stoi(hex.substr(2, 2), 0, 16); - int b = stoi(hex.substr(4, 2), 0, 16); - - int a; - if (alpha == 1.0) { - a = 255; - } - else { - a = static_cast(alpha * 256); - } - - uint32_t rgba_int = ((r & 0xff) << 24) + ((g & 0xff) << 16) + ((b & 0xff) << 8) + (a & 0xff); - - rgba->set_rgba(rgba_int); - return rgba; + waypoint::RGBAColor* color = new waypoint::RGBAColor; + // Adding default values until TODO #98 + int r = 255; + int g = 255; + int b = 255; + int a = 255; + uint32_t rgba = ((r & 0xff) << 24) + ((g & 0xff) << 16) + ((b & 0xff) << 8) + (a & 0xff); + color->set_rgba_color(rgba); + return color; } //////////////////////////////////////////////////////////////////////////////// @@ -73,13 +61,14 @@ waypoint::RGBA* to_proto_color(Color attribute_value, float alpha) { // // Converts a proto message into a Color //////////////////////////////////////////////////////////////////////////////// -Color from_proto_color(waypoint::RGBA attribute_value) { +Color from_proto_color(waypoint::RGBAColor attribute_value) { Color color; - std::stringstream stream; - stream << std::hex << attribute_value.rgba(); + std::stringstream stream; + stream << std::hex << attribute_value.rgba_color(); std::string rgba = stream.str(); - color.hex = rgba.substr(0, 6); - color.alpha = std::stof(rgba.substr(6, 2)); + color.hex = rgba.substr(0,6); + // Adding default values until TODO #98 + color.alpha = 1.0; return color; } diff --git a/xml_converter/src/attribute/color.hpp b/xml_converter/src/attribute/color.hpp index 850c4132..6b789658 100644 --- a/xml_converter/src/attribute/color.hpp +++ b/xml_converter/src/attribute/color.hpp @@ -4,6 +4,7 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "waypoint.pb.h" class XMLError; namespace waypoint { @@ -20,6 +21,6 @@ Color parse_color(rapidxml::xml_attribute<>* input, std::vector* erro std::string stringify_color(Color attribute_value); -waypoint::RGBA* to_proto_color(Color attribute_value, float alpha); +waypoint::RGBAColor* to_proto_color(Color attribute_value); -Color from_proto_color(waypoint::RGBA attribute_value); +Color from_proto_color(waypoint::RGBAColor attribute_value); diff --git a/xml_converter/src/attribute/trail_data.hpp b/xml_converter/src/attribute/trail_data.hpp index 7df31c48..08f31995 100644 --- a/xml_converter/src/attribute/trail_data.hpp +++ b/xml_converter/src/attribute/trail_data.hpp @@ -13,6 +13,7 @@ class TrailData; class TrailData { public: std::string trail_data; + std::string base_dir; }; TrailData parse_trail_data(rapidxml::xml_attribute<>* input, std::vector* errors); diff --git a/xml_converter/src/category_gen.cpp b/xml_converter/src/category_gen.cpp index 50dddab3..6fed761e 100644 --- a/xml_converter/src/category_gen.cpp +++ b/xml_converter/src/category_gen.cpp @@ -95,21 +95,6 @@ vector Category::as_xml() const { waypoint::Category Category::as_protobuf() const { waypoint::Category proto_category; - if (this->default_visibility_is_set) { - proto_category.set_default_visibility(this->default_visibility); - } - if (this->display_name_is_set) { - proto_category.set_display_name(this->display_name); - } - if (this->is_separator_is_set) { - proto_category.set_is_separator(this->is_separator); - } - if (this->name_is_set) { - proto_category.set_name(this->name); - } - if (this->tooltip_description_is_set) { - proto_category.set_tip_description(this->tooltip_description); - } for (const auto& [key, val] : this->children) { waypoint::Category proto_category_child = val.as_protobuf(); proto_category.add_children()->CopyFrom(proto_category_child); diff --git a/xml_converter/src/icon_gen.cpp b/xml_converter/src/icon_gen.cpp index cf87f171..6a07dacd 100644 --- a/xml_converter/src/icon_gen.cpp +++ b/xml_converter/src/icon_gen.cpp @@ -30,10 +30,6 @@ bool Icon::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectorachievement_id = parse_int(attribute, errors); this->achievement_id_is_set = true; } - else if (attributename == "alpha") { - this->color.alpha = parse_float(attribute, errors); - this->alpha_is_set = true; - } else if (attributename == "autotrigger") { this->auto_trigger = parse_bool(attribute, errors); this->auto_trigger_is_set = true; @@ -66,6 +62,10 @@ bool Icon::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectorcolor = parse_color(attribute, errors); this->color_is_set = true; } + else if (attributename == "bhcolor") { + this->color = parse_color(attribute, errors); + this->color_is_set = true; + } else if (attributename == "copy") { this->copy_clipboard = parse_string(attribute, errors); this->copy_clipboard_is_set = true; @@ -118,6 +118,10 @@ bool Icon::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectorheightoffset = parse_float(attribute, errors); this->heightoffset_is_set = true; } + else if (attributename == "bh-heightoffset") { + this->heightoffset = parse_float(attribute, errors); + this->heightoffset_is_set = true; + } else if (attributename == "hide") { this->hide_category = parse_marker_category(attribute, errors); this->hide_category_is_set = true; @@ -312,9 +316,6 @@ vector Icon::as_xml() const { if (this->achievement_id_is_set) { xml_node_contents.push_back(" AchievementId=\"" + stringify_int(this->achievement_id) + "\""); } - if (this->alpha_is_set) { - xml_node_contents.push_back(" Alpha=\"" + stringify_float(this->color.alpha) + "\""); - } if (this->auto_trigger_is_set) { xml_node_contents.push_back(" AutoTrigger=\"" + stringify_bool(this->auto_trigger) + "\""); } @@ -463,12 +464,6 @@ vector Icon::as_xml() const { waypoint::Icon Icon::as_protobuf() const { waypoint::Icon proto_icon; waypoint::Trigger* trigger = nullptr; - if (this->achievement_bitmask_is_set) { - proto_icon.set_achievement_bit(this->achievement_bitmask); - } - if (this->achievement_id_is_set) { - proto_icon.set_achievement_id(this->achievement_id); - } if (this->auto_trigger_is_set) { if (trigger == nullptr) { trigger = new waypoint::Trigger(); @@ -493,19 +488,11 @@ waypoint::Icon Icon::as_protobuf() const { } trigger->set_bounce_height(this->bounce_height); } - if (this->can_fade_is_set) { - proto_icon.set_can_fade(this->can_fade); - } if (this->category_is_set) { proto_icon.set_allocated_category(to_proto_marker_category(this->category)); } if (this->color_is_set) { - if (this->alpha_is_set) { - proto_icon.set_allocated_rgba(to_proto_color(this->color, this->color.alpha)); - } - else { - proto_icon.set_allocated_rgba(to_proto_color(this->color, 1.0)); - } + proto_icon.set_allocated_rgba_color(to_proto_color(this->color)); } if (this->copy_clipboard_is_set) { if (trigger == nullptr) { @@ -522,12 +509,6 @@ waypoint::Icon Icon::as_protobuf() const { if (this->cull_chirality_is_set) { proto_icon.set_cull_chirality(to_proto_cull_chirality(this->cull_chirality)); } - if (this->distance_fade_end_is_set) { - proto_icon.set_distance_fade_end(this->distance_fade_end); - } - if (this->distance_fade_start_is_set) { - proto_icon.set_distance_fade_start(this->distance_fade_start); - } if (this->euler_rotation_is_set) { proto_icon.set_allocated_euler_rotation(to_proto_euler_rotation(this->euler_rotation)); } @@ -543,9 +524,6 @@ waypoint::Icon Icon::as_protobuf() const { } trigger->set_has_countdown(this->has_countdown); } - if (this->heightoffset_is_set) { - proto_icon.set_height_offset(this->heightoffset); - } if (this->hide_category_is_set) { if (trigger == nullptr) { trigger = new waypoint::Trigger(); @@ -553,10 +531,7 @@ waypoint::Icon Icon::as_protobuf() const { trigger->set_allocated_action_hide_category(to_proto_marker_category(this->hide_category)); } if (this->icon_is_set) { - proto_icon.set_allocated_texture(to_proto_image(this->icon)); - } - if (this->icon_size_is_set) { - proto_icon.set_tentative__scale(this->icon_size); + proto_icon.set_allocated_texture_path(to_proto_image(this->icon)); } if (this->info_message_is_set) { if (trigger == nullptr) { @@ -570,21 +545,9 @@ waypoint::Icon Icon::as_protobuf() const { } trigger->set_invert_display(this->invert_visibility); } - if (this->map_display_size_is_set) { - proto_icon.set_map_display_size(this->map_display_size); - } - if (this->map_id_is_set) { - proto_icon.set_map_id(this->map_id); - } if (this->map_type_filter_is_set) { proto_icon.set_allocated_map_type_filter(to_proto_map_type_filter(this->map_type_filter)); } - if (this->maximum_size_on_screen_is_set) { - proto_icon.set_maximum_size_on_screen(this->maximum_size_on_screen); - } - if (this->minimum_size_on_screen_is_set) { - proto_icon.set_minimum_size_on_screen(this->minimum_size_on_screen); - } if (this->mount_filter_is_set) { proto_icon.set_allocated_mount_filter(to_proto_mount_filter(this->mount_filter)); } @@ -594,15 +557,6 @@ waypoint::Icon Icon::as_protobuf() const { if (this->profession_filter_is_set) { proto_icon.set_allocated_profession_filter(to_proto_profession_filter(this->profession_filter)); } - if (this->render_ingame_is_set) { - proto_icon.set_tentative__render_ingame(this->render_ingame); - } - if (this->render_on_map_is_set) { - proto_icon.set_tentative__render_on_map(this->render_on_map); - } - if (this->render_on_minimap_is_set) { - proto_icon.set_tentative__render_on_minimap(this->render_on_minimap); - } if (this->reset_behavior_is_set) { if (trigger == nullptr) { trigger = new waypoint::Trigger(); @@ -615,15 +569,6 @@ waypoint::Icon Icon::as_protobuf() const { } trigger->set_reset_length(this->reset_length); } - if (this->scale_on_map_with_zoom_is_set) { - proto_icon.set_scale_on_map_with_zoom(this->scale_on_map_with_zoom); - } - if (this->schedule_is_set) { - proto_icon.set_bhdraft__schedule(this->schedule); - } - if (this->schedule_duration_is_set) { - proto_icon.set_bhdraft__schedule_duration(this->schedule_duration); - } if (this->show_category_is_set) { if (trigger == nullptr) { trigger = new waypoint::Trigger(); @@ -642,12 +587,6 @@ waypoint::Icon Icon::as_protobuf() const { } trigger->set_allocated_action_toggle_category(to_proto_marker_category(this->toggle_category)); } - if (this->tooltip_description_is_set) { - proto_icon.set_tip_description(this->tooltip_description); - } - if (this->tooltip_name_is_set) { - proto_icon.set_tip_name(this->tooltip_name); - } if (this->trigger_range_is_set) { if (trigger == nullptr) { trigger = new waypoint::Trigger(); @@ -694,10 +633,9 @@ void Icon::parse_protobuf(waypoint::Icon proto_icon) { this->category = from_proto_marker_category(proto_icon.category()); this->category_is_set = true; } - if (proto_icon.has_rgba()) { - this->color = from_proto_color(proto_icon.rgba()); + if (proto_icon.has_rgba_color()) { + this->color = from_proto_color(proto_icon.rgba_color()); this->color_is_set = true; - this->alpha_is_set = true; } if (trigger.action_copy_clipboard() != "") { this->copy_clipboard = trigger.action_copy_clipboard(); @@ -743,8 +681,8 @@ void Icon::parse_protobuf(waypoint::Icon proto_icon) { this->hide_category = from_proto_marker_category(trigger.action_hide_category()); this->hide_category_is_set = true; } - if (proto_icon.has_texture()) { - this->icon = from_proto_image(proto_icon.texture()); + if (proto_icon.has_texture_path()) { + this->icon = from_proto_image(proto_icon.texture_path()); this->icon_is_set = true; } if (proto_icon.tentative__scale() != 0) { diff --git a/xml_converter/src/icon_gen.hpp b/xml_converter/src/icon_gen.hpp index 1a105d4e..1374dbb4 100644 --- a/xml_converter/src/icon_gen.hpp +++ b/xml_converter/src/icon_gen.hpp @@ -27,7 +27,6 @@ class Icon : public Parseable { public: int achievement_bitmask; int achievement_id; - float alpha; bool auto_trigger; float bounce_delay; float bounce_duration; @@ -75,7 +74,6 @@ class Icon : public Parseable { float trigger_range; bool achievement_bitmask_is_set = false; bool achievement_id_is_set = false; - bool alpha_is_set = false; bool auto_trigger_is_set = false; bool bounce_delay_is_set = false; bool bounce_duration_is_set = false; diff --git a/xml_converter/src/string_helper.cpp b/xml_converter/src/string_helper.cpp index 07b92128..ccb358fa 100644 --- a/xml_converter/src/string_helper.cpp +++ b/xml_converter/src/string_helper.cpp @@ -254,3 +254,17 @@ std::vector base64_decode(std::string const& encoded_string) { return ret; } + +string get_base_dir(string filepath) { + size_t s = filepath.find_last_of("/"); + return filepath.substr(0, s); +} + +bool has_suffix(std::string const& fullString, std::string const& ending) { + if (fullString.length() >= ending.length()) { + return (0 == fullString.compare(fullString.length() - ending.length(), ending.length(), ending)); + } + else { + return false; + } +} diff --git a/xml_converter/src/string_helper.hpp b/xml_converter/src/string_helper.hpp index d1ecffad..96333bda 100644 --- a/xml_converter/src/string_helper.hpp +++ b/xml_converter/src/string_helper.hpp @@ -17,3 +17,6 @@ std::string normalize(std::string input_string); std::string base64_encode(uint8_t const* buf, unsigned int bufLen); std::vector base64_decode(std::string const&); + +std::string get_base_dir(std::string filepath); +bool has_suffix(std::string const& fullString, std::string const& ending); diff --git a/xml_converter/src/trail_gen.cpp b/xml_converter/src/trail_gen.cpp index 6663ff9b..d6d54846 100644 --- a/xml_converter/src/trail_gen.cpp +++ b/xml_converter/src/trail_gen.cpp @@ -30,10 +30,6 @@ bool Trail::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectorachievement_id = parse_int(attribute, errors); this->achievement_id_is_set = true; } - else if (attributename == "alpha") { - this->color.alpha = parse_float(attribute, errors); - this->alpha_is_set = true; - } else if (attributename == "animspeed") { this->animation_speed = parse_float(attribute, errors); this->animation_speed_is_set = true; @@ -58,6 +54,10 @@ bool Trail::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectorcolor = parse_color(attribute, errors); this->color_is_set = true; } + else if (attributename == "bhcolor") { + this->color = parse_color(attribute, errors); + this->color_is_set = true; + } else if (attributename == "cull") { this->cull_chirality = parse_cull_chirality(attribute, errors); this->cull_chirality_is_set = true; @@ -185,9 +185,6 @@ vector Trail::as_xml() const { if (this->achievement_id_is_set) { xml_node_contents.push_back(" AchievementId=\"" + stringify_int(this->achievement_id) + "\""); } - if (this->alpha_is_set) { - xml_node_contents.push_back(" Alpha=\"" + stringify_float(this->color.alpha) + "\""); - } if (this->animation_speed_is_set) { xml_node_contents.push_back(" AnimSpeed=\"" + stringify_float(this->animation_speed) + "\""); } @@ -269,53 +266,21 @@ vector Trail::as_xml() const { waypoint::Trail Trail::as_protobuf() const { waypoint::Trail proto_trail; - if (this->achievement_bitmask_is_set) { - proto_trail.set_achievement_bit(this->achievement_bitmask); - } - if (this->achievement_id_is_set) { - proto_trail.set_achievement_id(this->achievement_id); - } - if (this->animation_speed_is_set) { - proto_trail.set_animation_speed(this->animation_speed); - } - if (this->can_fade_is_set) { - proto_trail.set_can_fade(this->can_fade); - } if (this->category_is_set) { proto_trail.set_allocated_category(to_proto_marker_category(this->category)); } if (this->color_is_set) { - if (this->alpha_is_set) { - proto_trail.set_allocated_rgba(to_proto_color(this->color, this->color.alpha)); - } - else { - proto_trail.set_allocated_rgba(to_proto_color(this->color, 1.0)); - } + proto_trail.set_allocated_rgba_color(to_proto_color(this->color)); } if (this->cull_chirality_is_set) { proto_trail.set_cull_chirality(to_proto_cull_chirality(this->cull_chirality)); } - if (this->distance_fade_end_is_set) { - proto_trail.set_distance_fade_end(this->distance_fade_end); - } - if (this->distance_fade_start_is_set) { - proto_trail.set_distance_fade_start(this->distance_fade_start); - } if (this->festival_filter_is_set) { proto_trail.set_allocated_festival_filter(to_proto_festival_filter(this->festival_filter)); } if (this->guid_is_set) { proto_trail.set_allocated_guid(to_proto_unique_id(this->guid)); } - if (this->is_wall_is_set) { - proto_trail.set_is_wall(this->is_wall); - } - if (this->map_display_size_is_set) { - proto_trail.set_map_display_size(this->map_display_size); - } - if (this->map_id_is_set) { - proto_trail.set_map_id(this->map_id); - } if (this->map_type_filter_is_set) { proto_trail.set_allocated_map_type_filter(to_proto_map_type_filter(this->map_type_filter)); } @@ -325,21 +290,6 @@ waypoint::Trail Trail::as_protobuf() const { if (this->profession_filter_is_set) { proto_trail.set_allocated_profession_filter(to_proto_profession_filter(this->profession_filter)); } - if (this->render_ingame_is_set) { - proto_trail.set_tentative__render_ingame(this->render_ingame); - } - if (this->render_on_map_is_set) { - proto_trail.set_tentative__render_on_map(this->render_on_map); - } - if (this->render_on_minimap_is_set) { - proto_trail.set_tentative__render_on_minimap(this->render_on_minimap); - } - if (this->schedule_is_set) { - proto_trail.set_bhdraft__schedule(this->schedule); - } - if (this->schedule_duration_is_set) { - proto_trail.set_bhdraft__schedule_duration(this->schedule_duration); - } if (this->specialization_filter_is_set) { proto_trail.set_allocated_specialization_filter(to_proto_specialization_filter(this->specialization_filter)); } @@ -347,14 +297,11 @@ waypoint::Trail Trail::as_protobuf() const { proto_trail.set_allocated_species_filter(to_proto_species_filter(this->species_filter)); } if (this->texture_is_set) { - proto_trail.set_allocated_texture(to_proto_image(this->texture)); + proto_trail.set_allocated_texture_path(to_proto_image(this->texture)); } if (this->trail_data_is_set) { proto_trail.set_allocated_trail_data(to_proto_trail_data(this->trail_data)); } - if (this->trail_scale_is_set) { - proto_trail.set_scale(this->trail_scale); - } return proto_trail; } @@ -379,10 +326,9 @@ void Trail::parse_protobuf(waypoint::Trail proto_trail) { this->category = from_proto_marker_category(proto_trail.category()); this->category_is_set = true; } - if (proto_trail.has_rgba()) { - this->color = from_proto_color(proto_trail.rgba()); + if (proto_trail.has_rgba_color()) { + this->color = from_proto_color(proto_trail.rgba_color()); this->color_is_set = true; - this->alpha_is_set = true; } if (proto_trail.cull_chirality() != 0) { this->cull_chirality = from_proto_cull_chirality(proto_trail.cull_chirality()); @@ -456,8 +402,8 @@ void Trail::parse_protobuf(waypoint::Trail proto_trail) { this->species_filter = from_proto_species_filter(proto_trail.species_filter()); this->species_filter_is_set = true; } - if (proto_trail.has_texture()) { - this->texture = from_proto_image(proto_trail.texture()); + if (proto_trail.has_texture_path()) { + this->texture = from_proto_image(proto_trail.texture_path()); this->texture_is_set = true; } if (proto_trail.has_trail_data()) { diff --git a/xml_converter/src/trail_gen.hpp b/xml_converter/src/trail_gen.hpp index c54eb32d..de79bdb8 100644 --- a/xml_converter/src/trail_gen.hpp +++ b/xml_converter/src/trail_gen.hpp @@ -25,7 +25,6 @@ class Trail : public Parseable { public: int achievement_bitmask; int achievement_id; - float alpha; float animation_speed; bool can_fade; MarkerCategory category; @@ -53,7 +52,6 @@ class Trail : public Parseable { float trail_scale; bool achievement_bitmask_is_set = false; bool achievement_id_is_set = false; - bool alpha_is_set = false; bool animation_speed_is_set = false; bool can_fade_is_set = false; bool category_is_set = false; diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index dfe59604..0b6f6e48 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -105,9 +105,9 @@ void remove_proto_child(waypoint::Category* proto_category, set categori proto_category->mutable_children()->DeleteSubrange(keep, proto_category->children_size() - keep); } -void read_trail_data_file(string base_dir, waypoint::Trail* trail) { +int get_trail_map_id(Trail* trail) { ifstream trail_data_file; - string trail_path = base_dir + "/" + trail->trail_data().trail_data(); + string trail_path = trail->trail_data.base_dir + "/" + trail->trail_data.trail_data; trail_data_file.open(trail_path, ios::in | ios::binary); char version[4]; @@ -117,7 +117,23 @@ void read_trail_data_file(string base_dir, waypoint::Trail* trail) { trail_data_file.read(map_id, 4); uint32_t map_num = *reinterpret_cast(map_id); - trail->set_map_id(map_num); + trail_data_file.close(); + return map_num; +} + +void read_trail_data_file(Trail* trail, waypoint::Trail* proto_trail) { + ifstream trail_data_file; + string trail_path = trail->trail_data.base_dir + "/" + trail->trail_data.trail_data; + trail_data_file.open(trail_path, ios::in | ios::binary); + + char version[4]; + trail_data_file.read(version, 4); + + char map_id[4]; + + trail_data_file.read(map_id, 4); + uint32_t map_num = *reinterpret_cast(map_id); + proto_trail->set_map_id(map_num); vector points_x; vector points_y; @@ -139,9 +155,9 @@ void read_trail_data_file(string base_dir, waypoint::Trail* trail) { cout << "Unexpected number of bits in trail file " << trail_path << endl; } - *trail->mutable_trail_data()->mutable_points_x() = {points_x.begin(), points_x.end()}; - *trail->mutable_trail_data()->mutable_points_y() = {points_y.begin(), points_y.end()}; - *trail->mutable_trail_data()->mutable_points_z() = {points_z.begin(), points_z.end()}; + *proto_trail->mutable_trail_data()->mutable_points_x() = {points_x.begin(), points_x.end()}; + *proto_trail->mutable_trail_data()->mutable_points_y() = {points_y.begin(), points_y.end()}; + *proto_trail->mutable_trail_data()->mutable_points_z() = {points_z.begin(), points_z.end()}; trail_data_file.close(); } @@ -188,7 +204,9 @@ void write_protobuf_file(string proto_directory, map* marker_c Trail* trail = dynamic_cast(parsed_poi); if (trail->map_id == map_id) { populate_categories_to_retain(trail->category.category, &categories_to_retain); - output_message.add_trail()->MergeFrom(trail->as_protobuf()); + waypoint::Trail proto_trail = trail->as_protobuf(); + read_trail_data_file(trail, &proto_trail); + output_message.add_trail()->MergeFrom(proto_trail); } } } @@ -283,6 +301,7 @@ vector parse_pois(string base_dir, rapidxml::xml_node<>* root_node, trail->init_from_xml(node, errors); if (trail->trail_data_is_set) { trail->trail_data.base_dir = base_dir; + trail->map_id = get_trail_map_id(trail); } markers.push_back(trail); } From 4fa05cb6d2d86c6cac6752c0746275d31dad5b26 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sat, 4 Mar 2023 16:33:55 -0500 Subject: [PATCH 166/539] Fixing IWYU error --- xml_converter/src/attribute/color.cpp | 10 +++------- xml_converter/src/attribute/color.hpp | 3 +-- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/xml_converter/src/attribute/color.cpp b/xml_converter/src/attribute/color.cpp index 3d1d7ccd..696ece29 100644 --- a/xml_converter/src/attribute/color.cpp +++ b/xml_converter/src/attribute/color.cpp @@ -1,10 +1,6 @@ #include "color.hpp" -#include -#include +#include -#include -#include -#include #include #include #include @@ -63,11 +59,11 @@ waypoint::RGBAColor* to_proto_color(Color attribute_value) { //////////////////////////////////////////////////////////////////////////////// Color from_proto_color(waypoint::RGBAColor attribute_value) { Color color; - std::stringstream stream; + std::stringstream stream; stream << std::hex << attribute_value.rgba_color(); std::string rgba = stream.str(); - color.hex = rgba.substr(0,6); + color.hex = rgba.substr(0, 6); // Adding default values until TODO #98 color.alpha = 1.0; return color; diff --git a/xml_converter/src/attribute/color.hpp b/xml_converter/src/attribute/color.hpp index 6b789658..7f5f4fab 100644 --- a/xml_converter/src/attribute/color.hpp +++ b/xml_converter/src/attribute/color.hpp @@ -4,11 +4,10 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" -#include "waypoint.pb.h" class XMLError; namespace waypoint { -class RGBA; +class RGBAColor; } class Color { From 732d37a91e59099cdbaeee0cd5ddefed9c8e4026 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sat, 4 Mar 2023 16:57:29 -0500 Subject: [PATCH 167/539] Potential Clang fix --- xml_converter/src/attribute/color.cpp | 2 +- xml_converter/src/xml_converter.cpp | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/xml_converter/src/attribute/color.cpp b/xml_converter/src/attribute/color.cpp index 696ece29..7bc9b2a8 100644 --- a/xml_converter/src/attribute/color.cpp +++ b/xml_converter/src/attribute/color.cpp @@ -1,6 +1,6 @@ #include "color.hpp" -#include +#include #include #include #include diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 0b6f6e48..83044da7 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -6,8 +6,6 @@ #include #include #include -#include -#include #include #include #include From 68973856c7c2f1b5560d9a96b99c68552dc72faa Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sat, 4 Mar 2023 17:58:20 -0500 Subject: [PATCH 168/539] Clang formatted --- xml_converter/src/attribute/color.cpp | 1 + xml_converter/src/xml_converter.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/xml_converter/src/attribute/color.cpp b/xml_converter/src/attribute/color.cpp index 7bc9b2a8..5b93d9b2 100644 --- a/xml_converter/src/attribute/color.cpp +++ b/xml_converter/src/attribute/color.cpp @@ -1,6 +1,7 @@ #include "color.hpp" #include + #include #include #include diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 83044da7..188d8ef6 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -16,8 +16,8 @@ #include #include -#include "attribute/trail_data.hpp" #include "attribute/marker_category.hpp" +#include "attribute/trail_data.hpp" #include "category_gen.hpp" #include "icon_gen.hpp" #include "parseable.hpp" From 4ef48ef1937f398d19d7b1337480b9bd97829da7 Mon Sep 17 00:00:00 2001 From: klingbolt <89052698+klingbolt@users.noreply.github.com> Date: Sat, 4 Mar 2023 18:06:41 -0500 Subject: [PATCH 169/539] Delete Spatial.tscn --- Spatial.tscn | 848 --------------------------------------------------- 1 file changed, 848 deletions(-) delete mode 100644 Spatial.tscn diff --git a/Spatial.tscn b/Spatial.tscn deleted file mode 100644 index 180612d8..00000000 --- a/Spatial.tscn +++ /dev/null @@ -1,848 +0,0 @@ -[gd_scene load_steps=17 format=2] - -[ext_resource path="res://Spatial.gd" type="Script" id=1] -[ext_resource path="res://shaders/range_indicators.shader" type="Shader" id=2] -[ext_resource path="res://burrito.png" type="Texture" id=3] -[ext_resource path="res://Route2D.tscn" type="PackedScene" id=4] -[ext_resource path="res://icon_close.png" type="Texture" id=5] -[ext_resource path="res://RangeDialog.gd" type="Script" id=6] -[ext_resource path="res://icon_new_icon.png" type="Texture" id=7] -[ext_resource path="res://icon_change_texture.png" type="Texture" id=8] -[ext_resource path="res://icon_adjust_points.png" type="Texture" id=9] -[ext_resource path="res://icon_new_path.png" type="Texture" id=10] -[ext_resource path="res://icon_new_point.png" type="Texture" id=11] -[ext_resource path="res://SettingsDialog.gd" type="Script" id=12] - -[sub_resource type="Shader" id=1] -code = "shader_type canvas_item; -render_mode blend_mix; - -void fragment(){ - COLOR = texture(TEXTURE, vec2(UV.y, -UV.x)); -}" - -[sub_resource type="ShaderMaterial" id=2] -shader = SubResource( 1 ) - -[sub_resource type="PlaneMesh" id=3] -size = Vector2( 76.2, 76.2 ) - -[sub_resource type="ShaderMaterial" id=4] -shader = ExtResource( 2 ) -shader_param/line_color = null -shader_param/line_width = 0.044 -shader_param/transparency = 1.0 -shader_param/custom_1 = false -shader_param/custom_1_value = null -shader_param/custom_2 = null -shader_param/custom_2_value = null -shader_param/custom_3 = false -shader_param/custom_3_value = null -shader_param/custom_4 = null -shader_param/custom_4_value = null -shader_param/custom_5 = null -shader_param/custom_5_value = null -shader_param/custom_6 = null -shader_param/custom_6_value = null -shader_param/custom_7 = false -shader_param/custom_7_value = 500.0 - -[node name="Spatial" type="Spatial"] -script = ExtResource( 1 ) - -[node name="CameraMount" type="Spatial" parent="."] - -[node name="Camera" type="Camera" parent="CameraMount"] -fov = 51.0 - -[node name="Control" type="Control" parent="."] -anchor_right = 1.0 -anchor_bottom = 1.0 -mouse_filter = 2 -__meta__ = { -"_edit_lock_": true, -"_edit_use_anchors_": false -} - -[node name="MiniMap" type="Node2D" parent="Control"] -material = SubResource( 2 ) -scale = Vector2( 2, 2 ) - -[node name="Line2D" parent="Control/MiniMap" instance=ExtResource( 4 )] - -[node name="GlobalMenuButton" type="Control" parent="Control"] -margin_left = 287.348 -margin_right = 314.348 -margin_bottom = 32.0 - -[node name="TextureRect" type="TextureRect" parent="Control/GlobalMenuButton"] -modulate = Color( 1, 1, 1, 0.439216 ) -margin_left = 1.591 -margin_top = 3.18198 -margin_right = 26.591 -margin_bottom = 28.182 -texture = ExtResource( 3 ) - -[node name="main_menu_toggle" type="Button" parent="Control/GlobalMenuButton"] -modulate = Color( 1, 1, 1, 0 ) -margin_right = 27.0 -margin_bottom = 32.0 - -[node name="EditorQuckPanel" type="PanelContainer" parent="Control/GlobalMenuButton"] -visible = false -margin_left = 32.0 -margin_top = -2.0 -margin_right = 306.0 -margin_bottom = 52.0 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="HBoxContainer" type="HBoxContainer" parent="Control/GlobalMenuButton/EditorQuckPanel"] -margin_left = 7.0 -margin_top = 7.0 -margin_right = 303.0 -margin_bottom = 47.0 - -[node name="CloseEditorQuickPanel" type="Button" parent="Control/GlobalMenuButton/EditorQuckPanel/HBoxContainer"] -margin_right = 46.0 -margin_bottom = 40.0 -hint_tooltip = "Close Editor Panel" -icon = ExtResource( 5 ) - -[node name="ChangeTexture" type="Button" parent="Control/GlobalMenuButton/EditorQuckPanel/HBoxContainer"] -margin_left = 50.0 -margin_right = 96.0 -margin_bottom = 40.0 -rect_min_size = Vector2( 40, 0 ) -hint_tooltip = "Change Texture" -icon = ExtResource( 8 ) - -[node name="NewArea" type="Button" parent="Control/GlobalMenuButton/EditorQuckPanel/HBoxContainer"] -visible = false -margin_left = 94.0 -margin_right = 135.0 -margin_bottom = 40.0 -text = "Area" - -[node name="NewAreaPoint" type="Button" parent="Control/GlobalMenuButton/EditorQuckPanel/HBoxContainer"] -visible = false -margin_left = 62.0 -margin_right = 116.0 -margin_bottom = 35.0 -text = "APoint" - -[node name="NewPath" type="Button" parent="Control/GlobalMenuButton/EditorQuckPanel/HBoxContainer"] -margin_left = 100.0 -margin_right = 146.0 -margin_bottom = 40.0 -rect_min_size = Vector2( 40, 0 ) -hint_tooltip = "Create New Path" -icon = ExtResource( 10 ) - -[node name="NewPathPoint" type="Button" parent="Control/GlobalMenuButton/EditorQuckPanel/HBoxContainer"] -margin_left = 150.0 -margin_right = 196.0 -margin_bottom = 40.0 -hint_tooltip = "Create New Point on Active Path" -icon = ExtResource( 11 ) - -[node name="NewIcon" type="Button" parent="Control/GlobalMenuButton/EditorQuckPanel/HBoxContainer"] -margin_left = 200.0 -margin_right = 246.0 -margin_bottom = 40.0 -hint_tooltip = "Create New Icon" -icon = ExtResource( 7 ) - -[node name="AdjustPoints" type="Button" parent="Control/GlobalMenuButton/EditorQuckPanel/HBoxContainer"] -margin_left = 250.0 -margin_right = 296.0 -margin_bottom = 40.0 -hint_tooltip = "Adjust Path and Icon Positions" -icon = ExtResource( 9 ) - -[node name="Dialogs" type="Control" parent="Control"] -margin_right = 40.0 -margin_bottom = 40.0 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="FileDialog" type="FileDialog" parent="Control/Dialogs"] -margin_left = 636.0 -margin_top = 174.0 -margin_right = 1307.0 -margin_bottom = 672.0 -window_title = "Open a File" -mode = 0 -access = 2 -current_dir = "/home/steph/Code/Projects/Burrito" -current_file = "." -current_path = "/home/steph/Code/Projects/Burrito/." -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="MainMenu" type="WindowDialog" parent="Control/Dialogs"] -margin_left = 48.1808 -margin_top = 88.7138 -margin_right = 261.181 -margin_bottom = 714.714 -window_title = "Main Menu" -resizable = true -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="ScrollContainer" type="ScrollContainer" parent="Control/Dialogs/MainMenu"] -anchor_right = 1.0 -anchor_bottom = 1.0 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="VBoxContainer" type="VBoxContainer" parent="Control/Dialogs/MainMenu/ScrollContainer"] -margin_right = 213.0 -margin_bottom = 284.0 -size_flags_horizontal = 3 - -[node name="LoadPath" type="Button" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] -margin_right = 213.0 -margin_bottom = 40.0 -rect_min_size = Vector2( 0, 40 ) -text = "Open Markers File" - -[node name="SavePath" type="Button" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] -margin_top = 44.0 -margin_right = 213.0 -margin_bottom = 84.0 -rect_min_size = Vector2( 0, 40 ) -text = "Save Markers File" - -[node name="HSeparator" type="HSeparator" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] -margin_top = 88.0 -margin_right = 213.0 -margin_bottom = 92.0 - -[node name="PointEditor" type="Button" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] -visible = false -margin_top = 96.0 -margin_right = 213.0 -margin_bottom = 136.0 -rect_min_size = Vector2( 0, 40 ) -text = "Editor Panel" - -[node name="OpenEditorQuickPanel" type="Button" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] -margin_top = 96.0 -margin_right = 213.0 -margin_bottom = 136.0 -rect_min_size = Vector2( 0, 40 ) -text = "Editor Panel" - -[node name="HSeparator3" type="HSeparator" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] -margin_top = 140.0 -margin_right = 213.0 -margin_bottom = 144.0 - -[node name="Ranges" type="Button" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] -margin_top = 148.0 -margin_right = 213.0 -margin_bottom = 188.0 -rect_min_size = Vector2( 0, 40 ) -text = "Range Indicators" - -[node name="Compass" type="Button" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] -visible = false -margin_top = 192.0 -margin_right = 213.0 -margin_bottom = 232.0 -rect_min_size = Vector2( 0, 40 ) -text = "Compass" - -[node name="GuacamoleScript" type="Button" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] -visible = false -margin_top = 192.0 -margin_right = 213.0 -margin_bottom = 232.0 -rect_min_size = Vector2( 0, 40 ) -text = "Guacamole Script Editor" - -[node name="HSeparator4" type="HSeparator" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] -margin_top = 192.0 -margin_right = 213.0 -margin_bottom = 196.0 - -[node name="Settings" type="Button" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] -margin_top = 200.0 -margin_right = 213.0 -margin_bottom = 240.0 -rect_min_size = Vector2( 0, 40 ) -text = "Settings" - -[node name="RichTextLabel2" type="RichTextLabel" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] -visible = false -margin_top = 219.0 -margin_right = 213.0 -margin_bottom = 264.0 -bbcode_enabled = true -bbcode_text = "[u]Active Path[/u]: Draws a line from your character to the final node in the currently active path." -text = "Active Path: Draws a line from your character to the final node in the currently active path." -fit_content_height = true -scroll_active = false -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="ActivePath" type="CheckButton" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] -visible = false -margin_top = 268.0 -margin_right = 213.0 -margin_bottom = 308.0 -text = "Active Path" - -[node name="ExitButton" type="Button" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] -margin_top = 244.0 -margin_right = 213.0 -margin_bottom = 284.0 -rect_min_size = Vector2( 0, 40 ) -text = "Exit Burrito" - -[node name="RangesDialog" type="WindowDialog" parent="Control/Dialogs"] -margin_left = 375.0 -margin_top = 100.0 -margin_right = 698.0 -margin_bottom = 407.0 -window_title = "Ranges Menu" -script = ExtResource( 6 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="GridContainer" type="GridContainer" parent="Control/Dialogs/RangesDialog"] -anchor_right = 1.0 -anchor_bottom = 1.0 -margin_bottom = -25.0 -columns = 2 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="CheckButton" type="CheckButton" parent="Control/Dialogs/RangesDialog/GridContainer"] -margin_right = 159.0 -margin_bottom = 40.0 -size_flags_horizontal = 3 -text = "Range 1" - -[node name="SpinBox" type="SpinBox" parent="Control/Dialogs/RangesDialog/GridContainer"] -margin_left = 163.0 -margin_right = 322.0 -margin_bottom = 40.0 -size_flags_horizontal = 3 -min_value = 1.0 -max_value = 1500.0 -value = 1.0 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="CheckButton2" type="CheckButton" parent="Control/Dialogs/RangesDialog/GridContainer"] -margin_top = 44.0 -margin_right = 159.0 -margin_bottom = 84.0 -size_flags_horizontal = 3 -text = "Range 2" - -[node name="SpinBox2" type="SpinBox" parent="Control/Dialogs/RangesDialog/GridContainer"] -margin_left = 163.0 -margin_top = 44.0 -margin_right = 322.0 -margin_bottom = 84.0 -size_flags_horizontal = 3 -min_value = 1.0 -max_value = 1500.0 -value = 1.0 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="CheckButton3" type="CheckButton" parent="Control/Dialogs/RangesDialog/GridContainer"] -margin_top = 88.0 -margin_right = 159.0 -margin_bottom = 128.0 -size_flags_horizontal = 3 -text = "Range 3" - -[node name="SpinBox3" type="SpinBox" parent="Control/Dialogs/RangesDialog/GridContainer"] -margin_left = 163.0 -margin_top = 88.0 -margin_right = 322.0 -margin_bottom = 128.0 -size_flags_horizontal = 3 -min_value = 1.0 -max_value = 1500.0 -value = 1.0 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="CheckButton4" type="CheckButton" parent="Control/Dialogs/RangesDialog/GridContainer"] -margin_top = 132.0 -margin_right = 159.0 -margin_bottom = 172.0 -size_flags_horizontal = 3 -text = "Range 4" - -[node name="SpinBox4" type="SpinBox" parent="Control/Dialogs/RangesDialog/GridContainer"] -margin_left = 163.0 -margin_top = 132.0 -margin_right = 322.0 -margin_bottom = 172.0 -size_flags_horizontal = 3 -min_value = 1.0 -max_value = 1500.0 -value = 1.0 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="CheckButton5" type="CheckButton" parent="Control/Dialogs/RangesDialog/GridContainer"] -margin_top = 176.0 -margin_right = 159.0 -margin_bottom = 216.0 -size_flags_horizontal = 3 -text = "Range 5" - -[node name="SpinBox5" type="SpinBox" parent="Control/Dialogs/RangesDialog/GridContainer"] -margin_left = 163.0 -margin_top = 176.0 -margin_right = 322.0 -margin_bottom = 216.0 -size_flags_horizontal = 3 -min_value = 1.0 -max_value = 1500.0 -value = 1.0 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="CheckButton6" type="CheckButton" parent="Control/Dialogs/RangesDialog/GridContainer"] -margin_top = 220.0 -margin_right = 159.0 -margin_bottom = 260.0 -size_flags_horizontal = 3 -text = "Range 6" - -[node name="SpinBox6" type="SpinBox" parent="Control/Dialogs/RangesDialog/GridContainer"] -margin_left = 163.0 -margin_top = 220.0 -margin_right = 322.0 -margin_bottom = 260.0 -size_flags_horizontal = 3 -min_value = 1.0 -max_value = 1500.0 -value = 1.0 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="CheckButton7" type="CheckButton" parent="Control/Dialogs/RangesDialog/GridContainer"] -margin_top = 264.0 -margin_right = 159.0 -margin_bottom = 304.0 -size_flags_horizontal = 3 -text = "Range 7" - -[node name="SpinBox7" type="SpinBox" parent="Control/Dialogs/RangesDialog/GridContainer"] -margin_left = 163.0 -margin_top = 264.0 -margin_right = 322.0 -margin_bottom = 304.0 -size_flags_horizontal = 3 -min_value = 1.0 -max_value = 1500.0 -value = 1.0 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="TexturePathOpen" type="FileDialog" parent="Control/Dialogs"] -margin_left = 740.978 -margin_top = 139.437 -margin_right = 1343.98 -margin_bottom = 602.437 -window_title = "Open a File" -mode = 0 -access = 2 -filters = PoolStringArray( "*.png" ) -current_dir = "/home/steph/Code/Projects/Burrito" -current_file = "." -current_path = "/home/steph/Code/Projects/Burrito/." -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="SaveDialog" type="FileDialog" parent="Control/Dialogs"] -margin_left = 180.169 -margin_top = 105.833 -margin_right = 883.169 -margin_bottom = 624.833 -window_title = "Save Path" -resizable = true -access = 2 -current_dir = "/home/steph/Code/Projects/Burrito" -current_file = "." -current_path = "/home/steph/Code/Projects/Burrito/." -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="NodeEditorDialog" type="WindowDialog" parent="Control/Dialogs"] -margin_left = 241.0 -margin_top = 229.0 -margin_right = 564.0 -margin_bottom = 538.0 -window_title = "Node Editor" -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="ScrollContainer" type="ScrollContainer" parent="Control/Dialogs/NodeEditorDialog"] -anchor_right = 1.0 -anchor_bottom = 1.0 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="VBoxContainer" type="VBoxContainer" parent="Control/Dialogs/NodeEditorDialog/ScrollContainer"] -margin_right = 323.0 -margin_bottom = 304.0 -size_flags_horizontal = 3 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="DeleteNode" type="Button" parent="Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer"] -margin_right = 323.0 -margin_bottom = 40.0 -rect_min_size = Vector2( 0, 40 ) -size_flags_horizontal = 3 -disabled = true -text = "Delete Selected" - -[node name="NewNodeAfter" type="Button" parent="Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer"] -margin_top = 44.0 -margin_right = 323.0 -margin_bottom = 84.0 -rect_min_size = Vector2( 0, 40 ) -size_flags_horizontal = 3 -disabled = true -text = "New Node After Selected" - -[node name="SnapSelectedToPlayer" type="Button" parent="Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer"] -margin_top = 88.0 -margin_right = 323.0 -margin_bottom = 128.0 -rect_min_size = Vector2( 0, 40 ) -size_flags_horizontal = 3 -disabled = true -text = "Snap Selected To Player" - -[node name="XZSnapToPlayer" type="Button" parent="Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer"] -margin_top = 132.0 -margin_right = 323.0 -margin_bottom = 172.0 -rect_min_size = Vector2( 0, 40 ) -size_flags_horizontal = 3 -disabled = true -text = "Horizontal Snap Selected To Player" - -[node name="YSnapToPlayer" type="Button" parent="Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer"] -margin_top = 176.0 -margin_right = 323.0 -margin_bottom = 216.0 -rect_min_size = Vector2( 0, 40 ) -size_flags_horizontal = 3 -disabled = true -text = "Vertical Snap Selected To Player" - -[node name="SetActivePath" type="Button" parent="Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer"] -margin_top = 220.0 -margin_right = 323.0 -margin_bottom = 260.0 -rect_min_size = Vector2( 0, 40 ) -size_flags_horizontal = 3 -disabled = true -text = "SetActivePath" - -[node name="ReversePathDirection" type="Button" parent="Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer"] -margin_top = 264.0 -margin_right = 323.0 -margin_bottom = 304.0 -rect_min_size = Vector2( 0, 40 ) -size_flags_horizontal = 3 -disabled = true -text = "Reverse Path Direction" - -[node name="Set Floating Mark" type="Button" parent="Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer"] -visible = false -margin_top = 308.0 -margin_right = 311.0 -margin_bottom = 348.0 -rect_min_size = Vector2( 0, 40 ) -size_flags_horizontal = 3 -disabled = true -text = "Reverse Path Direction" - -[node name="SettingsDialog" type="WindowDialog" parent="Control/Dialogs"] -margin_left = 592.0 -margin_top = 146.0 -margin_right = 981.0 -margin_bottom = 575.0 -window_title = "Settings" -script = ExtResource( 12 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="GridContainer" type="GridContainer" parent="Control/Dialogs/SettingsDialog"] -anchor_right = 1.0 -anchor_bottom = 1.0 -margin_left = 10.0 -margin_top = 10.0 -margin_right = -10.0 -margin_bottom = -10.0 -columns = 2 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="OverrideSizeLabel" type="Label" parent="Control/Dialogs/SettingsDialog/GridContainer"] -margin_top = 13.0 -margin_right = 102.0 -margin_bottom = 27.0 -text = "Override Size" - -[node name="OverrideSize" type="CheckButton" parent="Control/Dialogs/SettingsDialog/GridContainer"] -margin_left = 106.0 -margin_right = 369.0 -margin_bottom = 40.0 -size_flags_horizontal = 3 - -[node name="OverrideWidthLabel" type="Label" parent="Control/Dialogs/SettingsDialog/GridContainer"] -margin_top = 49.0 -margin_right = 102.0 -margin_bottom = 63.0 -text = "Override Width" - -[node name="OverrideWidth" type="LineEdit" parent="Control/Dialogs/SettingsDialog/GridContainer"] -margin_left = 106.0 -margin_top = 44.0 -margin_right = 369.0 -margin_bottom = 68.0 -size_flags_horizontal = 3 - -[node name="OverrideHeightLabel" type="Label" parent="Control/Dialogs/SettingsDialog/GridContainer"] -margin_top = 77.0 -margin_right = 102.0 -margin_bottom = 91.0 -text = "Override Height" - -[node name="OverrideHeight" type="LineEdit" parent="Control/Dialogs/SettingsDialog/GridContainer"] -margin_left = 106.0 -margin_top = 72.0 -margin_right = 369.0 -margin_bottom = 96.0 -size_flags_horizontal = 3 - -[node name="HSeparator" type="HSeparator" parent="Control/Dialogs/SettingsDialog/GridContainer"] -visible = false -margin_top = 100.0 -margin_right = 112.0 -margin_bottom = 104.0 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="HSeparator2" type="HSeparator" parent="Control/Dialogs/SettingsDialog/GridContainer"] -visible = false -margin_top = 100.0 -margin_right = 182.0 -margin_bottom = 131.0 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="AutoLaunchBurritoLinkLabel" type="Label" parent="Control/Dialogs/SettingsDialog/GridContainer"] -visible = false -margin_top = 104.0 -margin_right = 112.0 -margin_bottom = 135.0 -text = "Auto Launch -Burrito Link" - -[node name="AutoLaunchBurritoLink" type="CheckButton" parent="Control/Dialogs/SettingsDialog/GridContainer"] -visible = false -margin_top = 100.0 -margin_right = 182.0 -margin_bottom = 140.0 -size_flags_horizontal = 3 - -[node name="WinePathLabel" type="Label" parent="Control/Dialogs/SettingsDialog/GridContainer"] -visible = false -margin_top = 105.0 -margin_right = 112.0 -margin_bottom = 119.0 -text = "Wine Path" - -[node name="WinePath" type="LineEdit" parent="Control/Dialogs/SettingsDialog/GridContainer"] -visible = false -margin_top = 100.0 -margin_right = 182.0 -margin_bottom = 124.0 -size_flags_horizontal = 3 - -[node name="EnvironmentVarsLabel" type="Label" parent="Control/Dialogs/SettingsDialog/GridContainer"] -visible = false -margin_top = 143.0 -margin_right = 112.0 -margin_bottom = 157.0 -text = "Environment Vars" - -[node name="EnvironmentVars" type="TextEdit" parent="Control/Dialogs/SettingsDialog/GridContainer"] -visible = false -margin_top = 100.0 -margin_right = 182.0 -margin_bottom = 200.0 -rect_min_size = Vector2( 0, 100 ) -size_flags_horizontal = 3 - -[node name="Border" type="Control" parent="Control"] -visible = false -anchor_right = 1.0 -anchor_bottom = 1.0 -mouse_filter = 2 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="ColorRect5" type="ColorRect" parent="Control/Border"] -anchor_right = 1.0 -margin_bottom = 4.0 -color = Color( 1, 0, 0, 1 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="ColorRect2" type="ColorRect" parent="Control/Border"] -anchor_left = 1.0 -anchor_right = 1.0 -anchor_bottom = 1.0 -margin_left = -4.0 -color = Color( 1, 0, 0, 1 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="ColorRect4" type="ColorRect" parent="Control/Border"] -anchor_top = 1.0 -anchor_right = 1.0 -anchor_bottom = 1.0 -margin_top = -4.0 -color = Color( 1, 0, 0, 1 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="ColorRect3" type="ColorRect" parent="Control/Border"] -anchor_bottom = 1.0 -margin_right = 4.0 -color = Color( 1, 0, 0, 1 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="Position" type="Label" parent="Control"] -visible = false -anchor_left = 1.0 -anchor_top = 1.0 -anchor_right = 1.0 -anchor_bottom = 1.0 -margin_left = -429.0 -margin_top = -14.0 -text = "X:11 Y:11 Z:10" -align = 2 -valign = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="ColorRect" type="ColorRect" parent="Control/Position"] -show_behind_parent = true -anchor_right = 1.0 -anchor_bottom = 1.0 -margin_top = -6.0 -color = Color( 0, 0, 0, 1 ) - -[node name="Paths" type="Spatial" parent="."] -transform = Transform( 1, 0, 0, 0, 0.999999, 0, 0, 0, 1, 0, 0, 0 ) - -[node name="Icons" type="Spatial" parent="."] - -[node name="Gizmos" type="Spatial" parent="."] - -[node name="FeetLocation" type="Spatial" parent="."] - -[node name="DistanceIndicator" type="MeshInstance" parent="FeetLocation"] -mesh = SubResource( 3 ) -material/0 = SubResource( 4 ) - -[connection signal="pressed" from="Control/GlobalMenuButton/main_menu_toggle" to="." method="_on_main_menu_toggle_pressed"] -[connection signal="pressed" from="Control/GlobalMenuButton/EditorQuckPanel/HBoxContainer/CloseEditorQuickPanel" to="." method="_on_CloseEditorQuickPanel_pressed"] -[connection signal="pressed" from="Control/GlobalMenuButton/EditorQuckPanel/HBoxContainer/ChangeTexture" to="." method="_on_ChangeTexture_pressed"] -[connection signal="pressed" from="Control/GlobalMenuButton/EditorQuckPanel/HBoxContainer/NewPath" to="." method="_on_NewPath_pressed"] -[connection signal="pressed" from="Control/GlobalMenuButton/EditorQuckPanel/HBoxContainer/NewPathPoint" to="." method="_on_NewPathPoint_pressed"] -[connection signal="pressed" from="Control/GlobalMenuButton/EditorQuckPanel/HBoxContainer/NewIcon" to="." method="_on_NewIcon_pressed"] -[connection signal="pressed" from="Control/GlobalMenuButton/EditorQuckPanel/HBoxContainer/AdjustPoints" to="." method="_on_AdjustNodesButton_pressed"] -[connection signal="file_selected" from="Control/Dialogs/FileDialog" to="." method="_on_FileDialog_file_selected"] -[connection signal="hide" from="Control/Dialogs/FileDialog" to="." method="_on_Dialog_hide"] -[connection signal="hide" from="Control/Dialogs/MainMenu" to="." method="_on_Dialog_hide"] -[connection signal="pressed" from="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer/LoadPath" to="." method="_on_LoadPath_pressed"] -[connection signal="pressed" from="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer/SavePath" to="." method="_on_SavePath_pressed"] -[connection signal="pressed" from="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer/OpenEditorQuickPanel" to="." method="_on_OpenEditorQuickPanel_pressed"] -[connection signal="pressed" from="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer/Ranges" to="." method="_on_RangesButton_pressed"] -[connection signal="pressed" from="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer/Settings" to="." method="_on_Settings_pressed"] -[connection signal="pressed" from="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer/ExitButton" to="." method="_on_ExitButton_pressed"] -[connection signal="hide" from="Control/Dialogs/RangesDialog" to="." method="_on_Dialog_hide"] -[connection signal="pressed" from="Control/Dialogs/RangesDialog/GridContainer/CheckButton" to="Control/Dialogs/RangesDialog" method="on_change"] -[connection signal="value_changed" from="Control/Dialogs/RangesDialog/GridContainer/SpinBox" to="Control/Dialogs/RangesDialog" method="on_change"] -[connection signal="pressed" from="Control/Dialogs/RangesDialog/GridContainer/CheckButton2" to="Control/Dialogs/RangesDialog" method="on_change"] -[connection signal="value_changed" from="Control/Dialogs/RangesDialog/GridContainer/SpinBox2" to="Control/Dialogs/RangesDialog" method="on_change"] -[connection signal="pressed" from="Control/Dialogs/RangesDialog/GridContainer/CheckButton3" to="Control/Dialogs/RangesDialog" method="on_change"] -[connection signal="value_changed" from="Control/Dialogs/RangesDialog/GridContainer/SpinBox3" to="Control/Dialogs/RangesDialog" method="on_change"] -[connection signal="pressed" from="Control/Dialogs/RangesDialog/GridContainer/CheckButton4" to="Control/Dialogs/RangesDialog" method="on_change"] -[connection signal="value_changed" from="Control/Dialogs/RangesDialog/GridContainer/SpinBox4" to="Control/Dialogs/RangesDialog" method="on_change"] -[connection signal="pressed" from="Control/Dialogs/RangesDialog/GridContainer/CheckButton5" to="Control/Dialogs/RangesDialog" method="on_change"] -[connection signal="value_changed" from="Control/Dialogs/RangesDialog/GridContainer/SpinBox5" to="Control/Dialogs/RangesDialog" method="on_change"] -[connection signal="pressed" from="Control/Dialogs/RangesDialog/GridContainer/CheckButton6" to="Control/Dialogs/RangesDialog" method="on_change"] -[connection signal="value_changed" from="Control/Dialogs/RangesDialog/GridContainer/SpinBox6" to="Control/Dialogs/RangesDialog" method="on_change"] -[connection signal="pressed" from="Control/Dialogs/RangesDialog/GridContainer/CheckButton7" to="Control/Dialogs/RangesDialog" method="on_change"] -[connection signal="value_changed" from="Control/Dialogs/RangesDialog/GridContainer/SpinBox7" to="Control/Dialogs/RangesDialog" method="on_change"] -[connection signal="file_selected" from="Control/Dialogs/TexturePathOpen" to="." method="_on_TexturePathOpen_file_selected"] -[connection signal="hide" from="Control/Dialogs/TexturePathOpen" to="." method="_on_Dialog_hide"] -[connection signal="file_selected" from="Control/Dialogs/SaveDialog" to="." method="_on_SaveDialog_file_selected"] -[connection signal="hide" from="Control/Dialogs/SaveDialog" to="." method="_on_Dialog_hide"] -[connection signal="hide" from="Control/Dialogs/NodeEditorDialog" to="." method="_on_NodeEditorDialog_hide"] -[connection signal="pressed" from="Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/DeleteNode" to="." method="_on_DeleteNode_pressed"] -[connection signal="pressed" from="Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/NewNodeAfter" to="." method="_on_NewNodeAfter_pressed"] -[connection signal="pressed" from="Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/SnapSelectedToPlayer" to="." method="_on_SnapSelectedToPlayer_pressed"] -[connection signal="pressed" from="Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/XZSnapToPlayer" to="." method="_on_XZSnapToPlayer_pressed"] -[connection signal="pressed" from="Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/YSnapToPlayer" to="." method="_on_YSnapToPlayer_pressed"] -[connection signal="pressed" from="Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/SetActivePath" to="." method="_on_SetActivePath_pressed"] -[connection signal="pressed" from="Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/ReversePathDirection" to="." method="_on_ReversePathDirection_pressed"] -[connection signal="hide" from="Control/Dialogs/SettingsDialog" to="." method="_on_NodeEditorDialog_hide"] -[connection signal="pressed" from="Control/Dialogs/SettingsDialog/GridContainer/OverrideSize" to="Control/Dialogs/SettingsDialog" method="save_settings"] -[connection signal="text_changed" from="Control/Dialogs/SettingsDialog/GridContainer/OverrideWidth" to="Control/Dialogs/SettingsDialog" method="save_settings"] -[connection signal="text_changed" from="Control/Dialogs/SettingsDialog/GridContainer/OverrideHeight" to="Control/Dialogs/SettingsDialog" method="save_settings"] -[connection signal="pressed" from="Control/Dialogs/SettingsDialog/GridContainer/AutoLaunchBurritoLink" to="Control/Dialogs/SettingsDialog" method="save_settings"] -[connection signal="text_changed" from="Control/Dialogs/SettingsDialog/GridContainer/WinePath" to="Control/Dialogs/SettingsDialog" method="save_settings"] -[connection signal="text_changed" from="Control/Dialogs/SettingsDialog/GridContainer/EnvironmentVars" to="Control/Dialogs/SettingsDialog" method="save_settings"] From 5b0b29948e05d2fd7b958d5920d30b76b3849299 Mon Sep 17 00:00:00 2001 From: klingbolt <89052698+klingbolt@users.noreply.github.com> Date: Sat, 4 Mar 2023 18:07:44 -0500 Subject: [PATCH 170/539] Delete refresh.sh --- xml_converter/refresh.sh | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100755 xml_converter/refresh.sh diff --git a/xml_converter/refresh.sh b/xml_converter/refresh.sh deleted file mode 100755 index 88ef844f..00000000 --- a/xml_converter/refresh.sh +++ /dev/null @@ -1,13 +0,0 @@ -cd .. - -cd ./generators - -python code_generator.py - -cd .. - -cd ./build -cmake .. -make - -# cd ./generators \ No newline at end of file From 7b0efae1c8b7c551a9505c3027c6e6ced69dfd7a Mon Sep 17 00:00:00 2001 From: klingbolt <89052698+klingbolt@users.noreply.github.com> Date: Sat, 4 Mar 2023 18:07:57 -0500 Subject: [PATCH 171/539] Delete Route.tres --- Route.tres | 44 -------------------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 Route.tres diff --git a/Route.tres b/Route.tres deleted file mode 100644 index 8067ca8d..00000000 --- a/Route.tres +++ /dev/null @@ -1,44 +0,0 @@ -[gd_resource type="ShaderMaterial" load_steps=2 format=2] - -[sub_resource type="Shader" id=1] -code = "shader_type spatial; -//render_mode blend_mix,depth_draw_opaque,cull_back,diffuse_burley,specular_schlick_ggx; -render_mode unshaded, blend_mix, depth_draw_opaque, cull_disabled, diffuse_burley, specular_schlick_ggx; - -uniform sampler2D texture_albedo : hint_albedo; // TODO: Make instance uniform sampler2D when 4.0 is released -uniform vec2 map_size; -uniform bool map_flipped; -uniform float map_bottom_offset = 36.0; - -uniform float interval = 1.0; - -void vertex() {} - - - - -void fragment() { - if (SCREEN_UV.x * VIEWPORT_SIZE.x > VIEWPORT_SIZE.x - map_size.x) { - if (map_flipped && SCREEN_UV.y * VIEWPORT_SIZE.y > VIEWPORT_SIZE.y - map_size.y) { - return; - } - if (!map_flipped && SCREEN_UV.y * VIEWPORT_SIZE.y < map_size.y + map_bottom_offset) { - return; - } - } - - vec2 base_uv = vec2(UV.y, -UV.x * interval); - base_uv = vec2(UV.x, -UV.y); - vec4 albedo_tex = texture(texture_albedo,base_uv); - ALBEDO = albedo_tex.rgb; - ALPHA = albedo_tex.a; - //EMISSION = albedo_tex.rgb; - //METALLIC = 0.0; - //ROUGHNESS = 1.0; - //SPECULAR = 0.0; -} -" - -[resource] -resource_local_to_scene = true -shader = SubResource( 1 ) From 76ccbdf59638605d8273101264997faa6e69a658 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 5 Mar 2023 15:44:02 -0500 Subject: [PATCH 172/539] Error in generator. Cleaning up comments --- Route.tres | 9 ++- Spatial.gd | 4 +- Spatial.tscn | 22 ++++--- project.godot | 2 +- .../cpp_templates/class_template.cpp | 18 +++--- xml_converter/src/category_gen.cpp | 15 +++++ xml_converter/src/icon_gen.cpp | 57 +++++++++++++++++++ xml_converter/src/trail_gen.cpp | 45 +++++++++++++++ 8 files changed, 154 insertions(+), 18 deletions(-) diff --git a/Route.tres b/Route.tres index 8067ca8d..749dd3ce 100644 --- a/Route.tres +++ b/Route.tres @@ -1,4 +1,6 @@ -[gd_resource type="ShaderMaterial" load_steps=2 format=2] +[gd_resource type="ShaderMaterial" load_steps=3 format=2] + +[ext_resource path="res://icon.png" type="Texture" id=1] [sub_resource type="Shader" id=1] code = "shader_type spatial; @@ -42,3 +44,8 @@ void fragment() { [resource] resource_local_to_scene = true shader = SubResource( 1 ) +shader_param/map_size = Vector2( 0, 0 ) +shader_param/map_flipped = null +shader_param/map_bottom_offset = 36.0 +shader_param/interval = 1.0 +shader_param/texture_albedo = ExtResource( 1 ) diff --git a/Spatial.gd b/Spatial.gd index a11793cf..ec1adf6d 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -510,8 +510,8 @@ func _on_main_menu_toggle_pressed(): set_maximal_mouse_block() func _on_FileDialog_file_selected(path): - #Godot required - print(path) + #Godot required something be included in this function + print(path, " This button currently does nothing") ################################################################################ diff --git a/Spatial.tscn b/Spatial.tscn index 180612d8..825a6da9 100644 --- a/Spatial.tscn +++ b/Spatial.tscn @@ -74,6 +74,9 @@ scale = Vector2( 2, 2 ) margin_left = 287.348 margin_right = 314.348 margin_bottom = 32.0 +__meta__ = { +"_edit_use_anchors_": false +} [node name="TextureRect" type="TextureRect" parent="Control/GlobalMenuButton"] modulate = Color( 1, 1, 1, 0.439216 ) @@ -82,11 +85,17 @@ margin_top = 3.18198 margin_right = 26.591 margin_bottom = 28.182 texture = ExtResource( 3 ) +__meta__ = { +"_edit_use_anchors_": false +} [node name="main_menu_toggle" type="Button" parent="Control/GlobalMenuButton"] modulate = Color( 1, 1, 1, 0 ) margin_right = 27.0 margin_bottom = 32.0 +__meta__ = { +"_edit_use_anchors_": false +} [node name="EditorQuckPanel" type="PanelContainer" parent="Control/GlobalMenuButton"] visible = false @@ -176,9 +185,9 @@ margin_bottom = 672.0 window_title = "Open a File" mode = 0 access = 2 -current_dir = "/home/steph/Code/Projects/Burrito" +current_dir = "." current_file = "." -current_path = "/home/steph/Code/Projects/Burrito/." +current_path = "." __meta__ = { "_edit_use_anchors_": false } @@ -474,9 +483,9 @@ window_title = "Open a File" mode = 0 access = 2 filters = PoolStringArray( "*.png" ) -current_dir = "/home/steph/Code/Projects/Burrito" +current_dir = "." current_file = "." -current_path = "/home/steph/Code/Projects/Burrito/." +current_path = "." __meta__ = { "_edit_use_anchors_": false } @@ -489,9 +498,9 @@ margin_bottom = 624.833 window_title = "Save Path" resizable = true access = 2 -current_dir = "/home/steph/Code/Projects/Burrito" +current_dir = "." current_file = "." -current_path = "/home/steph/Code/Projects/Burrito/." +current_path = "." __meta__ = { "_edit_use_anchors_": false } @@ -784,7 +793,6 @@ margin_top = -6.0 color = Color( 0, 0, 0, 1 ) [node name="Paths" type="Spatial" parent="."] -transform = Transform( 1, 0, 0, 0, 0.999999, 0, 0, 0, 1, 0, 0, 0 ) [node name="Icons" type="Spatial" parent="."] diff --git a/project.godot b/project.godot index 808a984f..c8c06b63 100644 --- a/project.godot +++ b/project.godot @@ -49,7 +49,7 @@ window/per_pixel_transparency/enabled=true [editor_plugins] -enabled=PoolStringArray( ) +enabled=PoolStringArray( "res://addons/protobuf/plugin.cfg" ) [global] diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index 618b5eae..d0ab1362 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -78,27 +78,27 @@ vector {{cpp_class}}::as_xml() const { xml_node_contents.push_back("<{{xml_class_name}} "); {% for attribute_variable in attribute_variables %} {% if (attribute_variable.attribute_type == "CompoundValue") %} - {% if (attribute_variable.xml_export == "Children" and attribute_variable.compound_name != None) %} + {% if (attribute_variable.xml_export == "Children" and attribute_variable.compound_name != None) %} if (this->{{attribute_variable.compound_name}}_is_set) { xml_node_contents.push_back(" {{attribute_variable.default_xml_fields[0]}}=\"" + to_string(this->{{attribute_variable.compound_name}}.{{attribute_variable.attribute_name}}) + "\""); } - {% elif (attribute_variable.xml_export == "Parent" and attribute_variable.compound_name == None)%} + {% elif (attribute_variable.xml_export == "Parent" and attribute_variable.compound_name == None)%} if (this->{{attribute_variable.attribute_name}}_is_set) { xml_node_contents.push_back(" {{attribute_variable.default_xml_fields[0]}}=\"" + stringify_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}}) + "\""); } - {% elif (attribute_variable.xml_export == "Parent and Children")%} - {% for value in attribute_variable.xml_fields %} + {% elif (attribute_variable.xml_export == "Parent and Children")%} + {% for value in attribute_variable.xml_fields %} if (this->{{attribute_variable.attribute_name}}_is_set) { xml_node_contents.push_back(" {{value}}=\"" + stringify_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}}) + "\""); - {% endfor %} + {% endfor %} } - {% endif %} + {% endif %} {% else: %} if (this->{{attribute_variable.attribute_name}}_is_set) { xml_node_contents.push_back(" {{attribute_variable.default_xml_fields[0]}}=\"" + stringify_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}}) + "\""); } {% endif %} -{% endfor %} + {% endfor %} {% if cpp_class == "Category": %} xml_node_contents.push_back(">\n"); @@ -159,6 +159,10 @@ waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf() const { proto_{{cpp_class_header}}.set_allocated_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); } {% elif (attribute_variable.compound_name != None)%} + {% else: %} + if (this->{{attribute_variable.attribute_name}}_is_set) { + proto_{{cpp_class_header}}.set_{{attribute_variable.protobuf_field}}(this->{{attribute_variable.attribute_name}}); + } {% endif %} {% endif %} {% endfor %} diff --git a/xml_converter/src/category_gen.cpp b/xml_converter/src/category_gen.cpp index 6fed761e..50dddab3 100644 --- a/xml_converter/src/category_gen.cpp +++ b/xml_converter/src/category_gen.cpp @@ -95,6 +95,21 @@ vector Category::as_xml() const { waypoint::Category Category::as_protobuf() const { waypoint::Category proto_category; + if (this->default_visibility_is_set) { + proto_category.set_default_visibility(this->default_visibility); + } + if (this->display_name_is_set) { + proto_category.set_display_name(this->display_name); + } + if (this->is_separator_is_set) { + proto_category.set_is_separator(this->is_separator); + } + if (this->name_is_set) { + proto_category.set_name(this->name); + } + if (this->tooltip_description_is_set) { + proto_category.set_tip_description(this->tooltip_description); + } for (const auto& [key, val] : this->children) { waypoint::Category proto_category_child = val.as_protobuf(); proto_category.add_children()->CopyFrom(proto_category_child); diff --git a/xml_converter/src/icon_gen.cpp b/xml_converter/src/icon_gen.cpp index 6a07dacd..73317c88 100644 --- a/xml_converter/src/icon_gen.cpp +++ b/xml_converter/src/icon_gen.cpp @@ -464,6 +464,12 @@ vector Icon::as_xml() const { waypoint::Icon Icon::as_protobuf() const { waypoint::Icon proto_icon; waypoint::Trigger* trigger = nullptr; + if (this->achievement_bitmask_is_set) { + proto_icon.set_achievement_bit(this->achievement_bitmask); + } + if (this->achievement_id_is_set) { + proto_icon.set_achievement_id(this->achievement_id); + } if (this->auto_trigger_is_set) { if (trigger == nullptr) { trigger = new waypoint::Trigger(); @@ -488,6 +494,9 @@ waypoint::Icon Icon::as_protobuf() const { } trigger->set_bounce_height(this->bounce_height); } + if (this->can_fade_is_set) { + proto_icon.set_can_fade(this->can_fade); + } if (this->category_is_set) { proto_icon.set_allocated_category(to_proto_marker_category(this->category)); } @@ -509,6 +518,12 @@ waypoint::Icon Icon::as_protobuf() const { if (this->cull_chirality_is_set) { proto_icon.set_cull_chirality(to_proto_cull_chirality(this->cull_chirality)); } + if (this->distance_fade_end_is_set) { + proto_icon.set_distance_fade_end(this->distance_fade_end); + } + if (this->distance_fade_start_is_set) { + proto_icon.set_distance_fade_start(this->distance_fade_start); + } if (this->euler_rotation_is_set) { proto_icon.set_allocated_euler_rotation(to_proto_euler_rotation(this->euler_rotation)); } @@ -524,6 +539,9 @@ waypoint::Icon Icon::as_protobuf() const { } trigger->set_has_countdown(this->has_countdown); } + if (this->heightoffset_is_set) { + proto_icon.set_height_offset(this->heightoffset); + } if (this->hide_category_is_set) { if (trigger == nullptr) { trigger = new waypoint::Trigger(); @@ -533,6 +551,9 @@ waypoint::Icon Icon::as_protobuf() const { if (this->icon_is_set) { proto_icon.set_allocated_texture_path(to_proto_image(this->icon)); } + if (this->icon_size_is_set) { + proto_icon.set_tentative__scale(this->icon_size); + } if (this->info_message_is_set) { if (trigger == nullptr) { trigger = new waypoint::Trigger(); @@ -545,9 +566,21 @@ waypoint::Icon Icon::as_protobuf() const { } trigger->set_invert_display(this->invert_visibility); } + if (this->map_display_size_is_set) { + proto_icon.set_map_display_size(this->map_display_size); + } + if (this->map_id_is_set) { + proto_icon.set_map_id(this->map_id); + } if (this->map_type_filter_is_set) { proto_icon.set_allocated_map_type_filter(to_proto_map_type_filter(this->map_type_filter)); } + if (this->maximum_size_on_screen_is_set) { + proto_icon.set_maximum_size_on_screen(this->maximum_size_on_screen); + } + if (this->minimum_size_on_screen_is_set) { + proto_icon.set_minimum_size_on_screen(this->minimum_size_on_screen); + } if (this->mount_filter_is_set) { proto_icon.set_allocated_mount_filter(to_proto_mount_filter(this->mount_filter)); } @@ -557,6 +590,15 @@ waypoint::Icon Icon::as_protobuf() const { if (this->profession_filter_is_set) { proto_icon.set_allocated_profession_filter(to_proto_profession_filter(this->profession_filter)); } + if (this->render_ingame_is_set) { + proto_icon.set_tentative__render_ingame(this->render_ingame); + } + if (this->render_on_map_is_set) { + proto_icon.set_tentative__render_on_map(this->render_on_map); + } + if (this->render_on_minimap_is_set) { + proto_icon.set_tentative__render_on_minimap(this->render_on_minimap); + } if (this->reset_behavior_is_set) { if (trigger == nullptr) { trigger = new waypoint::Trigger(); @@ -569,6 +611,15 @@ waypoint::Icon Icon::as_protobuf() const { } trigger->set_reset_length(this->reset_length); } + if (this->scale_on_map_with_zoom_is_set) { + proto_icon.set_scale_on_map_with_zoom(this->scale_on_map_with_zoom); + } + if (this->schedule_is_set) { + proto_icon.set_bhdraft__schedule(this->schedule); + } + if (this->schedule_duration_is_set) { + proto_icon.set_bhdraft__schedule_duration(this->schedule_duration); + } if (this->show_category_is_set) { if (trigger == nullptr) { trigger = new waypoint::Trigger(); @@ -587,6 +638,12 @@ waypoint::Icon Icon::as_protobuf() const { } trigger->set_allocated_action_toggle_category(to_proto_marker_category(this->toggle_category)); } + if (this->tooltip_description_is_set) { + proto_icon.set_tip_description(this->tooltip_description); + } + if (this->tooltip_name_is_set) { + proto_icon.set_tip_name(this->tooltip_name); + } if (this->trigger_range_is_set) { if (trigger == nullptr) { trigger = new waypoint::Trigger(); diff --git a/xml_converter/src/trail_gen.cpp b/xml_converter/src/trail_gen.cpp index d6d54846..ddca7345 100644 --- a/xml_converter/src/trail_gen.cpp +++ b/xml_converter/src/trail_gen.cpp @@ -266,6 +266,18 @@ vector Trail::as_xml() const { waypoint::Trail Trail::as_protobuf() const { waypoint::Trail proto_trail; + if (this->achievement_bitmask_is_set) { + proto_trail.set_achievement_bit(this->achievement_bitmask); + } + if (this->achievement_id_is_set) { + proto_trail.set_achievement_id(this->achievement_id); + } + if (this->animation_speed_is_set) { + proto_trail.set_animation_speed(this->animation_speed); + } + if (this->can_fade_is_set) { + proto_trail.set_can_fade(this->can_fade); + } if (this->category_is_set) { proto_trail.set_allocated_category(to_proto_marker_category(this->category)); } @@ -275,12 +287,27 @@ waypoint::Trail Trail::as_protobuf() const { if (this->cull_chirality_is_set) { proto_trail.set_cull_chirality(to_proto_cull_chirality(this->cull_chirality)); } + if (this->distance_fade_end_is_set) { + proto_trail.set_distance_fade_end(this->distance_fade_end); + } + if (this->distance_fade_start_is_set) { + proto_trail.set_distance_fade_start(this->distance_fade_start); + } if (this->festival_filter_is_set) { proto_trail.set_allocated_festival_filter(to_proto_festival_filter(this->festival_filter)); } if (this->guid_is_set) { proto_trail.set_allocated_guid(to_proto_unique_id(this->guid)); } + if (this->is_wall_is_set) { + proto_trail.set_is_wall(this->is_wall); + } + if (this->map_display_size_is_set) { + proto_trail.set_map_display_size(this->map_display_size); + } + if (this->map_id_is_set) { + proto_trail.set_map_id(this->map_id); + } if (this->map_type_filter_is_set) { proto_trail.set_allocated_map_type_filter(to_proto_map_type_filter(this->map_type_filter)); } @@ -290,6 +317,21 @@ waypoint::Trail Trail::as_protobuf() const { if (this->profession_filter_is_set) { proto_trail.set_allocated_profession_filter(to_proto_profession_filter(this->profession_filter)); } + if (this->render_ingame_is_set) { + proto_trail.set_tentative__render_ingame(this->render_ingame); + } + if (this->render_on_map_is_set) { + proto_trail.set_tentative__render_on_map(this->render_on_map); + } + if (this->render_on_minimap_is_set) { + proto_trail.set_tentative__render_on_minimap(this->render_on_minimap); + } + if (this->schedule_is_set) { + proto_trail.set_bhdraft__schedule(this->schedule); + } + if (this->schedule_duration_is_set) { + proto_trail.set_bhdraft__schedule_duration(this->schedule_duration); + } if (this->specialization_filter_is_set) { proto_trail.set_allocated_specialization_filter(to_proto_specialization_filter(this->specialization_filter)); } @@ -302,6 +344,9 @@ waypoint::Trail Trail::as_protobuf() const { if (this->trail_data_is_set) { proto_trail.set_allocated_trail_data(to_proto_trail_data(this->trail_data)); } + if (this->trail_scale_is_set) { + proto_trail.set_scale(this->trail_scale); + } return proto_trail; } From 12cdd930ea597f9fcc37a9eb7d8bb4fbaaa44cd6 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Fri, 21 Apr 2023 22:10:42 -0400 Subject: [PATCH 173/539] Addressing code review --- Spatial.gd | 9 +- xml_converter/doc/position/heightoffset.md | 2 +- xml_converter/doc/texture/icon.md | 1 + xml_converter/doc/texture/texture.md | 1 + xml_converter/doc/trail_data/trail_data.md | 1 + .../doc/trail_data/trail_data_map_id.md | 37 ----- xml_converter/generators/code_generator.py | 27 +++- .../cpp_templates/class_template.cpp | 18 +-- .../cpp_templates/class_template.hpp | 4 +- xml_converter/proto/waypoint.proto | 2 +- xml_converter/src/attribute/trail_data.cpp | 56 +++++++- xml_converter/src/attribute/trail_data.hpp | 9 +- .../src/attribute/trail_data_map_id.cpp | 32 ----- .../src/attribute/trail_data_map_id.hpp | 17 --- xml_converter/src/category_gen.cpp | 6 +- xml_converter/src/category_gen.hpp | 4 +- xml_converter/src/file_helper.cpp | 13 ++ xml_converter/src/file_helper.hpp | 4 + xml_converter/src/icon_gen.cpp | 4 +- xml_converter/src/icon_gen.hpp | 2 +- xml_converter/src/parseable.cpp | 6 +- xml_converter/src/parseable.hpp | 4 +- xml_converter/src/trail_gen.cpp | 4 +- xml_converter/src/trail_gen.hpp | 2 +- xml_converter/src/xml_converter.cpp | 134 ++++++------------ 25 files changed, 178 insertions(+), 221 deletions(-) delete mode 100644 xml_converter/doc/trail_data/trail_data_map_id.md delete mode 100644 xml_converter/src/attribute/trail_data_map_id.cpp delete mode 100644 xml_converter/src/attribute/trail_data_map_id.hpp create mode 100644 xml_converter/src/file_helper.cpp create mode 100644 xml_converter/src/file_helper.hpp diff --git a/Spatial.gd b/Spatial.gd index ec1adf6d..74c90986 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -284,7 +284,7 @@ func reset_minimap_masks(): minimap_path.material.set_shader_param("minimap_corner2", compass_corner2) var markerdata = Waypoint.Waypoint.new() -var marker_file_dir = "res://xml_converter/protobins/" +var marker_file_dir = "user://protobins/" var marker_file_path = "" func load_waypoint_markers(map_id): @@ -398,7 +398,9 @@ func gen_map_markers(): for path in self.markerdata.get_trail(): var path_points := PoolVector3Array() var trail_data = path.get_trail_data() - for index in range(0, trail_data.get_points_x().size()): + if trail_data.get_points_x().size() != trail_data.get_points_y().size() or trail_data.get_points_x().size() != trail_data.get_points_z().size() + print("Warning: Trail ", trail.get_category.get_name(), " does not have equal number of X, Y, and Z coordinates.") + for index in range(0, trail_data.get_points_z().size()): path_points.append(Vector3(trail_data.get_points_x()[index], trail_data.get_points_y()[index], trail_data.get_points_z()[index])) var texture_path = path.get_texture_path() var full_texture_path = self.marker_file_dir + texture_path.get_path() @@ -510,8 +512,7 @@ func _on_main_menu_toggle_pressed(): set_maximal_mouse_block() func _on_FileDialog_file_selected(path): - #Godot required something be included in this function - print(path, " This button currently does nothing") + pass ################################################################################ diff --git a/xml_converter/doc/position/heightoffset.md b/xml_converter/doc/position/heightoffset.md index e4d044d9..cca2f424 100644 --- a/xml_converter/doc/position/heightoffset.md +++ b/xml_converter/doc/position/heightoffset.md @@ -2,7 +2,7 @@ name: Height Offset type: Float32 applies_to: ["Icon"] -xml_fields: ["HeightOffset", "BH-HeightOffset"] +xml_fields: ["HeightOffset", "BHHeightOffset"] compatability: [TacO, Burrito, BlishHUD] protobuf_field: height_offset --- diff --git a/xml_converter/doc/texture/icon.md b/xml_converter/doc/texture/icon.md index 9332648b..9ab130f0 100644 --- a/xml_converter/doc/texture/icon.md +++ b/xml_converter/doc/texture/icon.md @@ -4,6 +4,7 @@ type: Custom class: Image applies_to: [Icon] xml_fields: [IconFile] +uses_file_path: false protobuf_field: texture_path compatability: [TacO, BlishHUD, Burrito] --- diff --git a/xml_converter/doc/texture/texture.md b/xml_converter/doc/texture/texture.md index 2baa288e..85cc3e15 100644 --- a/xml_converter/doc/texture/texture.md +++ b/xml_converter/doc/texture/texture.md @@ -4,6 +4,7 @@ type: Custom class: Image applies_to: [Trail] xml_fields: [Texture] +uses_file_path: false protobuf_field: texture_path compatability: [TacO, BlishHUD, Burrito] --- diff --git a/xml_converter/doc/trail_data/trail_data.md b/xml_converter/doc/trail_data/trail_data.md index 25ab60b9..3438954a 100644 --- a/xml_converter/doc/trail_data/trail_data.md +++ b/xml_converter/doc/trail_data/trail_data.md @@ -3,6 +3,7 @@ name: Trail Data type: Custom class: TrailData xml_fields: ["TrailData"] +uses_file_path: true protobuf_field: trail_data side_effects: [Map ID] applies_to: [Trail] diff --git a/xml_converter/doc/trail_data/trail_data_map_id.md b/xml_converter/doc/trail_data/trail_data_map_id.md deleted file mode 100644 index 7d2c8773..00000000 --- a/xml_converter/doc/trail_data/trail_data_map_id.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -name: Trail Data Map ID -type: Custom -class: TrailDataMapId -xml_fields: ["TrailData"] -protobuf_field: map_id -applies_to: [Trail] -compatability: [TacO, BlishHUD, Burrito] ---- -The map id is embedded inside of the trail binary for some ungodly reason. - -Notes -===== - - - -TrailData - - -GetFromXML(xml_node) -WriteToXML(self) # not quite right. - - -GetFromProtobuf(protobuf_node_object) # not quite right -SetProtobuf() # not quite right - - - -the return value of the set should be the value that needs to be set. -But also we can just pass in the number of variables to be "set" or "get" - - - -so really - GetFromProtobuf(arg1type* argument1, arg2type* argument2) -so really - SetProtobuf(arg1type* argument1, arg2type* argument2) \ No newline at end of file diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 347e32b2..cb72b808 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -184,6 +184,8 @@ type: array items: type: string + uses_file_path: + type: boolean """.format( shared_field_properties="""type: @@ -204,7 +206,7 @@ type: array items: type: string - pattern: "^[A-Za-z-]+$" + pattern: "^[A-Za-z]+$" protobuf_field: type: string pattern: "^[a-z_.]+$" @@ -289,6 +291,7 @@ class AttributeVariable: xml_export: str = "" compound_name: Optional[str] = None is_trigger: bool = False + uses_file_path: bool = False ################################################################################ @@ -380,7 +383,7 @@ def write_cpp_classes(self, output_directory: str) -> None: attributes_of_type_marker_category = [] attribute_variables: List[AttributeVariable] - attribute_variables, cpp_includes = self.generate_cpp_variable_data(cpp_class) + attribute_variables, cpp_includes, file_path_used = self.generate_cpp_variable_data(cpp_class) for attribute_variable in attribute_variables: if attribute_variable.class_name == "marker_category": @@ -393,6 +396,7 @@ def write_cpp_classes(self, output_directory: str) -> None: cpp_includes=cpp_includes, cpp_class_header=lowercase(cpp_class), attributes_of_type_marker_category=attributes_of_type_marker_category, + file_path_used=file_path_used, )) with open(os.path.join(output_directory, lowercase(cpp_class) + "_gen.cpp"), 'w') as f: @@ -404,6 +408,7 @@ def write_cpp_classes(self, output_directory: str) -> None: attribute_variables=sorted(attribute_variables, key=get_attribute_variable_key), enumerate=enumerate, attributes_of_type_marker_category=attributes_of_type_marker_category, + file_path_used=file_path_used, )) ############################################################################ @@ -416,7 +421,7 @@ def write_cpp_classes(self, output_directory: str) -> None: def generate_cpp_variable_data( self, doc_type: str, - ) -> Tuple[List[AttributeVariable], CPPInclude]: + ) -> Tuple[List[AttributeVariable], CPPInclude, bool]: cpp_includes: CPPInclude = CPPInclude() attribute_name: str = "" @@ -426,6 +431,8 @@ def generate_cpp_variable_data( xml_export: str = "" protobuf_field: str = "" is_trigger: bool = False + uses_file_path: bool = False + file_path_used: bool = False cpp_includes.hpp_absolute_includes.add("string") cpp_includes.hpp_absolute_includes.add("vector") @@ -463,8 +470,6 @@ def generate_cpp_variable_data( cpp_includes.cpp_relative_includes.add("attribute/{}.hpp".format(class_name)) elif fieldval['type'] == "Custom": - if fieldval['class'] == "TrailDataMapId": - continue cpp_type = fieldval['class'] class_name = insert_delimiter(fieldval['class'], delimiter="_") cpp_includes.hpp_relative_includes.add("attribute/{}.hpp".format(class_name)) @@ -517,6 +522,15 @@ def generate_cpp_variable_data( is_trigger = False protobuf_field = fieldval["protobuf_field"] + if "uses_file_path" in fieldval: + if fieldval["uses_file_path"]: + uses_file_path = True + file_path_used = True + else: + uses_file_path = False + else: + uses_file_path = False + attribute_variable = AttributeVariable( attribute_name=attribute_name, attribute_type=fieldval["type"], @@ -527,10 +541,11 @@ def generate_cpp_variable_data( xml_export=xml_export, protobuf_field=protobuf_field, is_trigger=is_trigger, + uses_file_path=uses_file_path, ) attribute_variables.append(attribute_variable) - return attribute_variables, cpp_includes + return attribute_variables, cpp_includes, file_path_used ############################################################################ # variable_name_from_markdown_path diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index d0ab1362..57e7c2cc 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -18,12 +18,12 @@ string {{cpp_class}}::classname() { return "{{xml_class_name}}"; } {% if cpp_class == "Category": %} -void {{cpp_class}}::init_from_xml(rapidxml::xml_node<>* node, vector* errors) { +void {{cpp_class}}::init_from_xml(rapidxml::xml_node<>* node, vector* errors, string* base_dir) { for (rapidxml::xml_attribute<>* attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()) { bool is_icon_value = this->default_icon.init_xml_attribute(attribute, errors); bool is_trail_value = this->default_trail.init_xml_attribute(attribute, errors); - if (init_xml_attribute(attribute, errors)) { + if (init_xml_attribute(attribute, errors, base_dir)) { } else if (is_icon_value || is_trail_value) { } @@ -34,7 +34,7 @@ void {{cpp_class}}::init_from_xml(rapidxml::xml_node<>* node, vector* } {% endif %} -bool {{cpp_class}}::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector* errors) { +bool {{cpp_class}}::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector* errors, string* base_dir) { string attributename; attributename = normalize(get_attribute_name(attribute)); {% for n, attribute_variable in enumerate(attribute_variables) %} @@ -49,6 +49,11 @@ bool {{cpp_class}}::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vec this->{{attribute_variable.compound_name}}.{{attribute_variable.attribute_name}} = parse_float(attribute, errors); this->{{attribute_variable.compound_name}}_is_set = true; } + {% elif (attribute_variable.uses_file_path)%} + else if (attributename == "{{value}}") { + this->{{attribute_variable.attribute_name}} = parse_{{attribute_variable.class_name}}(base_dir, attribute, errors); + this->{{attribute_variable.attribute_name}}_is_set = true; + } {% else: %} else if (attributename == "{{value}}") { this->{{attribute_variable.attribute_name}} = parse_{{attribute_variable.class_name}}(attribute, errors); @@ -148,9 +153,7 @@ waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf() const { } {% endif %} {% else: %} - {% if (attribute_variable.attribute_type == "Custom" and attribute_variable.class_name == "TrailDataMapId")%} -//TODO: TrailDataMapID is currently not implemented - {% elif (attribute_variable.attribute_type == "Enum")%} + {% if (attribute_variable.attribute_type == "Enum")%} if (this->{{attribute_variable.attribute_name}}_is_set) { proto_{{cpp_class_header}}.set_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); } @@ -208,8 +211,7 @@ void {{cpp_class}}::parse_protobuf(waypoint::{{cpp_class}} proto_{{cpp_class_hea } {% endif %} {% else: %} - {% if (attribute_variable.attribute_type == "Custom" and attribute_variable.class_name == "TrailDataMapId")%} - {% elif (attribute_variable.attribute_type == "Enum") %} + {% if (attribute_variable.attribute_type == "Enum") %} if (proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}() != 0) { this->{{attribute_variable.attribute_name}} = from_proto_{{attribute_variable.class_name}}(proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}()); this->{{attribute_variable.attribute_name}}_is_set = true; diff --git a/xml_converter/generators/cpp_templates/class_template.hpp b/xml_converter/generators/cpp_templates/class_template.hpp index 9d34ed4c..ac600cc8 100644 --- a/xml_converter/generators/cpp_templates/class_template.hpp +++ b/xml_converter/generators/cpp_templates/class_template.hpp @@ -29,11 +29,11 @@ class {{cpp_class}} : public Parseable { Icon default_icon; Trail default_trail; - void init_from_xml(rapidxml::xml_node<>* node, std::vector* errors); + void init_from_xml(rapidxml::xml_node<>* node, std::vector* errors, std::string* base_dir = nullptr); {% endif %} virtual std::vector as_xml() const; virtual std::string classname(); - bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors); + bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, std::string* base_dir = nullptr); waypoint::{{cpp_class}} as_protobuf() const; void parse_protobuf(waypoint::{{cpp_class}} proto_{{cpp_class_header}}); {% if attributes_of_type_marker_category %} diff --git a/xml_converter/proto/waypoint.proto b/xml_converter/proto/waypoint.proto index d7925a6b..23d77124 100644 --- a/xml_converter/proto/waypoint.proto +++ b/xml_converter/proto/waypoint.proto @@ -297,7 +297,7 @@ message SpeciesFilter { } message TrailData { - string trail_data = 1; + string trail_data_relative_path = 1; repeated float points_x = 2; repeated float points_y = 3; repeated float points_z = 4; diff --git a/xml_converter/src/attribute/trail_data.cpp b/xml_converter/src/attribute/trail_data.cpp index 89ef298f..139390a7 100644 --- a/xml_converter/src/attribute/trail_data.cpp +++ b/xml_converter/src/attribute/trail_data.cpp @@ -1,5 +1,9 @@ #include "trail_data.hpp" +#include +#include + +#include #include #include #include @@ -15,19 +19,49 @@ using namespace std; // // Parses a TrailData from the value of a rapidxml::xml_attribute. //////////////////////////////////////////////////////////////////////////////// -TrailData parse_trail_data(rapidxml::xml_attribute<>* input, vector*) { +TrailData parse_trail_data(string* base_dir, rapidxml::xml_attribute<>* input, vector*) { TrailData trail_data; - trail_data.trail_data = get_attribute_value(input); + trail_data.trail_data_relative_path = get_attribute_value(input); + ifstream trail_data_file; + string trail_path = *base_dir + "/" + trail_data.trail_data_relative_path; + trail_data_file.open(trail_path, ios::in | ios::binary); + + char version[4]; + trail_data_file.read(version, 4); + + char map_id_char[4]; + + trail_data_file.read(map_id_char, 4); + trail_data.map_id = *reinterpret_cast(map_id_char); + + while (trail_data_file.tellg() > 0) { + char point_x[4]; + trail_data_file.read(point_x, 4); + trail_data.points_x.push_back(*reinterpret_cast(point_x)); + char point_y[4]; + trail_data_file.read(point_y, 4); + trail_data.points_y.push_back(*reinterpret_cast(point_y)); + char point_z[4]; + trail_data_file.read(point_z, 4); + trail_data.points_z.push_back(*reinterpret_cast(point_z)); + } + + if (trail_data.points_x.size() != trail_data.points_z.size()) { + cout << "Unexpected number of bits in trail file " << trail_path << endl; + } + + trail_data_file.close(); return trail_data; } //////////////////////////////////////////////////////////////////////////////// // stringify_trail_data // -// Converts a TrailData into a stringy value so that it can be saved to xml +// Returns the relative path of the trail_data to the xml files +// TODO: Write ".trl" files from data //////////////////////////////////////////////////////////////////////////////// string stringify_trail_data(TrailData attribute_value) { - return attribute_value.trail_data; + return attribute_value.trail_data_relative_path; } //////////////////////////////////////////////////////////////////////////////// @@ -37,7 +71,12 @@ string stringify_trail_data(TrailData attribute_value) { //////////////////////////////////////////////////////////////////////////////// waypoint::TrailData* to_proto_trail_data(TrailData attribute_value) { waypoint::TrailData* trail_data = new waypoint::TrailData(); - trail_data->set_trail_data(attribute_value.trail_data); + trail_data->set_trail_data_relative_path(attribute_value.trail_data_relative_path); + for (u_int i = 0; i < attribute_value.points_x.size(); i++) { + trail_data->add_points_x(attribute_value.points_x[i]); + trail_data->add_points_y(attribute_value.points_y[i]); + trail_data->add_points_z(attribute_value.points_z[i]); + } return trail_data; } @@ -48,6 +87,11 @@ waypoint::TrailData* to_proto_trail_data(TrailData attribute_value) { //////////////////////////////////////////////////////////////////////////////// TrailData from_proto_trail_data(waypoint::TrailData attribute_value) { TrailData trail_data; - trail_data.trail_data = attribute_value.trail_data(); + trail_data.trail_data_relative_path = attribute_value.trail_data_relative_path(); + for (int i = 0; i < attribute_value.points_x_size(); i++) { + trail_data.points_x.push_back(attribute_value.points_x(i)); + trail_data.points_y.push_back(attribute_value.points_y(i)); + trail_data.points_z.push_back(attribute_value.points_z(i)); + } return trail_data; } diff --git a/xml_converter/src/attribute/trail_data.hpp b/xml_converter/src/attribute/trail_data.hpp index 08f31995..c8a8f079 100644 --- a/xml_converter/src/attribute/trail_data.hpp +++ b/xml_converter/src/attribute/trail_data.hpp @@ -12,11 +12,14 @@ class TrailData; class TrailData { public: - std::string trail_data; - std::string base_dir; + std::string trail_data_relative_path; + int map_id; + std::vector points_x; + std::vector points_y; + std::vector points_z; }; -TrailData parse_trail_data(rapidxml::xml_attribute<>* input, std::vector* errors); +TrailData parse_trail_data(std::string* base_dir, rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_trail_data(TrailData attribute_value); diff --git a/xml_converter/src/attribute/trail_data_map_id.cpp b/xml_converter/src/attribute/trail_data_map_id.cpp deleted file mode 100644 index c86b94e6..00000000 --- a/xml_converter/src/attribute/trail_data_map_id.cpp +++ /dev/null @@ -1,32 +0,0 @@ -#include "trail_data_map_id.hpp" - -#include -#include -#include - -#include "../rapid_helpers.hpp" -#include "../rapidxml-1.13/rapidxml.hpp" - -using namespace std; - -// TODO: trail_data_map_id is currently unused in the convertor - -//////////////////////////////////////////////////////////////////////////////// -// parse_trail_data -// -// Parses a TrailDataMapID from the value of a rapidxml::xml_attribute. -//////////////////////////////////////////////////////////////////////////////// -TrailDataMapId parse_trail_data_map_id(rapidxml::xml_attribute<>* input, vector*) { - TrailDataMapId trail_data_map_id; - trail_data_map_id.trail_data_map_id = std::stof(get_attribute_value(input)); - return trail_data_map_id; -} - -//////////////////////////////////////////////////////////////////////////////// -// stringify_trail_data -// -// Converts a TrailDataMapID into a stringy value so that it can be saved to xml -//////////////////////////////////////////////////////////////////////////////// -string stringify_trail_data_map_id(TrailDataMapId attribute_value) { - return to_string(attribute_value.trail_data_map_id); -} diff --git a/xml_converter/src/attribute/trail_data_map_id.hpp b/xml_converter/src/attribute/trail_data_map_id.hpp deleted file mode 100644 index 440fa5ae..00000000 --- a/xml_converter/src/attribute/trail_data_map_id.hpp +++ /dev/null @@ -1,17 +0,0 @@ -#pragma once - -#include -#include - -#include "../rapidxml-1.13/rapidxml.hpp" - -class XMLError; - -class TrailDataMapId { - public: - int trail_data_map_id; -}; - -TrailDataMapId parse_trail_data_map_id(rapidxml::xml_attribute<>* input, std::vector* errors); - -std::string stringify_trail_data_map_id(TrailDataMapId attribute_value); diff --git a/xml_converter/src/category_gen.cpp b/xml_converter/src/category_gen.cpp index 50dddab3..fc223367 100644 --- a/xml_converter/src/category_gen.cpp +++ b/xml_converter/src/category_gen.cpp @@ -17,12 +17,12 @@ using namespace std; string Category::classname() { return "MarkerCategory"; } -void Category::init_from_xml(rapidxml::xml_node<>* node, vector* errors) { +void Category::init_from_xml(rapidxml::xml_node<>* node, vector* errors, string* base_dir) { for (rapidxml::xml_attribute<>* attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()) { bool is_icon_value = this->default_icon.init_xml_attribute(attribute, errors); bool is_trail_value = this->default_trail.init_xml_attribute(attribute, errors); - if (init_xml_attribute(attribute, errors)) { + if (init_xml_attribute(attribute, errors, base_dir)) { } else if (is_icon_value || is_trail_value) { } @@ -32,7 +32,7 @@ void Category::init_from_xml(rapidxml::xml_node<>* node, vector* erro } } -bool Category::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector* errors) { +bool Category::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector* errors, string* base_dir) { string attributename; attributename = normalize(get_attribute_name(attribute)); if (attributename == "defaulttoggle") { diff --git a/xml_converter/src/category_gen.hpp b/xml_converter/src/category_gen.hpp index a29fed10..478370f8 100644 --- a/xml_converter/src/category_gen.hpp +++ b/xml_converter/src/category_gen.hpp @@ -28,10 +28,10 @@ class Category : public Parseable { Icon default_icon; Trail default_trail; - void init_from_xml(rapidxml::xml_node<>* node, std::vector* errors); + void init_from_xml(rapidxml::xml_node<>* node, std::vector* errors, std::string* base_dir = nullptr); virtual std::vector as_xml() const; virtual std::string classname(); - bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors); + bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, std::string* base_dir = nullptr); waypoint::Category as_protobuf() const; void parse_protobuf(waypoint::Category proto_category); }; diff --git a/xml_converter/src/file_helper.cpp b/xml_converter/src/file_helper.cpp new file mode 100644 index 00000000..d019979b --- /dev/null +++ b/xml_converter/src/file_helper.cpp @@ -0,0 +1,13 @@ +#include "file_helper.hpp" + +#include +#include +#include + +using namespace std; + +void copy_file(string path, string new_path) { + ifstream infile(path, ios::binary); + ofstream outfile(new_path, ios::binary); + outfile << infile.rdbuf(); +} diff --git a/xml_converter/src/file_helper.hpp b/xml_converter/src/file_helper.hpp new file mode 100644 index 00000000..5487eedb --- /dev/null +++ b/xml_converter/src/file_helper.hpp @@ -0,0 +1,4 @@ +#pragma once +#include + +void copy_file(std::string path, std::string new_path); diff --git a/xml_converter/src/icon_gen.cpp b/xml_converter/src/icon_gen.cpp index 73317c88..81fb7611 100644 --- a/xml_converter/src/icon_gen.cpp +++ b/xml_converter/src/icon_gen.cpp @@ -19,7 +19,7 @@ string Icon::classname() { return "POI"; } -bool Icon::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector* errors) { +bool Icon::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector* errors, string* base_dir) { string attributename; attributename = normalize(get_attribute_name(attribute)); if (attributename == "achievementbit") { @@ -118,7 +118,7 @@ bool Icon::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectorheightoffset = parse_float(attribute, errors); this->heightoffset_is_set = true; } - else if (attributename == "bh-heightoffset") { + else if (attributename == "bhheightoffset") { this->heightoffset = parse_float(attribute, errors); this->heightoffset_is_set = true; } diff --git a/xml_converter/src/icon_gen.hpp b/xml_converter/src/icon_gen.hpp index 1374dbb4..1167164f 100644 --- a/xml_converter/src/icon_gen.hpp +++ b/xml_converter/src/icon_gen.hpp @@ -121,7 +121,7 @@ class Icon : public Parseable { bool trigger_range_is_set = false; virtual std::vector as_xml() const; virtual std::string classname(); - bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors); + bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, std::string* base_dir = nullptr); waypoint::Icon as_protobuf() const; void parse_protobuf(waypoint::Icon proto_icon); bool validate_attributes_of_type_marker_category(); diff --git a/xml_converter/src/parseable.cpp b/xml_converter/src/parseable.cpp index b5299275..6f89cf56 100644 --- a/xml_converter/src/parseable.cpp +++ b/xml_converter/src/parseable.cpp @@ -11,9 +11,9 @@ std::string Parseable::classname() { return "Parseable"; } -void Parseable::init_from_xml(rapidxml::xml_node<>* node, std::vector* errors) { +void Parseable::init_from_xml(rapidxml::xml_node<>* node, std::vector* errors, std::string* base_dir) { for (rapidxml::xml_attribute<>* attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()) { - if (init_xml_attribute(attribute, errors)) { + if (init_xml_attribute(attribute, errors, base_dir)) { } else { errors->push_back(new XMLAttributeNameError("Unknown " + this->classname() + " attribute ", attribute)); @@ -28,7 +28,7 @@ void Parseable::init_from_xml(rapidxml::xml_node<>* node, std::vector // all of the other parsible classes. So just return false right away without // doing anything. //////////////////////////////////////////////////////////////////////////////// -bool Parseable::init_xml_attribute(rapidxml::xml_attribute<>*, std::vector*) { +bool Parseable::init_xml_attribute(rapidxml::xml_attribute<>*, std::vector*, std::string*) { return false; } diff --git a/xml_converter/src/parseable.hpp b/xml_converter/src/parseable.hpp index 42f63088..d7f17305 100644 --- a/xml_converter/src/parseable.hpp +++ b/xml_converter/src/parseable.hpp @@ -12,10 +12,10 @@ class Parseable { virtual std::string classname(); // A default parser function to parse an entire XML node into the class. - void init_from_xml(rapidxml::xml_node<>* node, std::vector* errors); + void init_from_xml(rapidxml::xml_node<>* node, std::vector* errors, std::string* base_dir = nullptr); // A default parser function to parse a single XML attribute into the class. - virtual bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors); + virtual bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, std::string* base_dir = nullptr); virtual std::vector as_xml() const; }; diff --git a/xml_converter/src/trail_gen.cpp b/xml_converter/src/trail_gen.cpp index ddca7345..59cd23d4 100644 --- a/xml_converter/src/trail_gen.cpp +++ b/xml_converter/src/trail_gen.cpp @@ -19,7 +19,7 @@ string Trail::classname() { return "Trail"; } -bool Trail::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector* errors) { +bool Trail::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector* errors, string* base_dir) { string attributename; attributename = normalize(get_attribute_name(attribute)); if (attributename == "achievementbit") { @@ -159,7 +159,7 @@ bool Trail::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectortexture_is_set = true; } else if (attributename == "traildata") { - this->trail_data = parse_trail_data(attribute, errors); + this->trail_data = parse_trail_data(base_dir, attribute, errors); this->trail_data_is_set = true; } else if (attributename == "trailscale") { diff --git a/xml_converter/src/trail_gen.hpp b/xml_converter/src/trail_gen.hpp index de79bdb8..47bdfcaa 100644 --- a/xml_converter/src/trail_gen.hpp +++ b/xml_converter/src/trail_gen.hpp @@ -79,7 +79,7 @@ class Trail : public Parseable { bool trail_scale_is_set = false; virtual std::vector as_xml() const; virtual std::string classname(); - bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors); + bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, std::string* base_dir = nullptr); waypoint::Trail as_protobuf() const; void parse_protobuf(waypoint::Trail proto_trail); bool validate_attributes_of_type_marker_category(); diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 188d8ef6..2772f76e 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -5,7 +5,6 @@ #include #include #include -#include #include #include #include @@ -19,6 +18,7 @@ #include "attribute/marker_category.hpp" #include "attribute/trail_data.hpp" #include "category_gen.hpp" +#include "file_helper.hpp" #include "icon_gen.hpp" #include "parseable.hpp" #include "rapid_helpers.hpp" @@ -103,63 +103,6 @@ void remove_proto_child(waypoint::Category* proto_category, set categori proto_category->mutable_children()->DeleteSubrange(keep, proto_category->children_size() - keep); } -int get_trail_map_id(Trail* trail) { - ifstream trail_data_file; - string trail_path = trail->trail_data.base_dir + "/" + trail->trail_data.trail_data; - trail_data_file.open(trail_path, ios::in | ios::binary); - - char version[4]; - trail_data_file.read(version, 4); - - char map_id[4]; - - trail_data_file.read(map_id, 4); - uint32_t map_num = *reinterpret_cast(map_id); - trail_data_file.close(); - return map_num; -} - -void read_trail_data_file(Trail* trail, waypoint::Trail* proto_trail) { - ifstream trail_data_file; - string trail_path = trail->trail_data.base_dir + "/" + trail->trail_data.trail_data; - trail_data_file.open(trail_path, ios::in | ios::binary); - - char version[4]; - trail_data_file.read(version, 4); - - char map_id[4]; - - trail_data_file.read(map_id, 4); - uint32_t map_num = *reinterpret_cast(map_id); - proto_trail->set_map_id(map_num); - - vector points_x; - vector points_y; - vector points_z; - - while (trail_data_file.tellg() > 0) { - char point_x[4]; - trail_data_file.read(point_x, 4); - points_x.push_back(*reinterpret_cast(point_x)); - char point_y[4]; - trail_data_file.read(point_y, 4); - points_y.push_back(*reinterpret_cast(point_y)); - char point_z[4]; - trail_data_file.read(point_z, 4); - points_z.push_back(*reinterpret_cast(point_z)); - } - - if (points_x.size() != points_z.size()) { - cout << "Unexpected number of bits in trail file " << trail_path << endl; - } - - *proto_trail->mutable_trail_data()->mutable_points_x() = {points_x.begin(), points_x.end()}; - *proto_trail->mutable_trail_data()->mutable_points_y() = {points_y.begin(), points_y.end()}; - *proto_trail->mutable_trail_data()->mutable_points_z() = {points_z.begin(), points_z.end()}; - - trail_data_file.close(); -} - void write_protobuf_file(string proto_directory, map* marker_categories, vector* parsed_pois) { // Creates a Waypoint message that contains all categories waypoint::Waypoint all_categories; @@ -179,7 +122,7 @@ void write_protobuf_file(string proto_directory, map* marker_c } else if (parsed_poi->classname() == "Trail") { Trail* trail = dynamic_cast(parsed_poi); - map_ids.insert(trail->map_id); + map_ids.insert(trail->trail_data.map_id); } } waypoint::Waypoint output_message; @@ -203,7 +146,6 @@ void write_protobuf_file(string proto_directory, map* marker_c if (trail->map_id == map_id) { populate_categories_to_retain(trail->category.category, &categories_to_retain); waypoint::Trail proto_trail = trail->as_protobuf(); - read_trail_data_file(trail, &proto_trail); output_message.add_trail()->MergeFrom(proto_trail); } } @@ -271,7 +213,7 @@ Category* get_category(rapidxml::xml_node<>* node, map* marker // // Parse the xml block into an in-memory array of Markers. //////////////////////////////////////////////////////////////////////////////// -vector parse_pois(string base_dir, rapidxml::xml_node<>* root_node, map* marker_categories, vector* errors) { +vector parse_pois(string* base_dir, rapidxml::xml_node<>* root_node, map* marker_categories, vector* errors) { vector markers; for (rapidxml::xml_node<>* node = root_node->first_node(); node; node = node->next_sibling()) { @@ -296,11 +238,7 @@ vector parse_pois(string base_dir, rapidxml::xml_node<>* root_node, *trail = default_category->default_trail; } - trail->init_from_xml(node, errors); - if (trail->trail_data_is_set) { - trail->trail_data.base_dir = base_dir; - trail->map_id = get_trail_map_id(trail); - } + trail->init_from_xml(node, errors, base_dir); markers.push_back(trail); } else { @@ -378,7 +316,7 @@ void parse_xml_file(string xml_filepath, map* marker_categorie parse_marker_categories(node, marker_categories, &errors); } else if (get_node_name(node) == "POIs") { - vector temp_vector = parse_pois(base_dir, node, marker_categories, &errors); + vector temp_vector = parse_pois(&base_dir, node, marker_categories, &errors); move(temp_vector.begin(), temp_vector.end(), back_inserter(*parsed_pois)); } else { @@ -408,7 +346,7 @@ bool filename_comp(string a, string b) { return lowercase(a) < lowercase(b); } -vector get_xml_files(string directory, string data_directory) { +vector get_xml_files(string directory) { vector files; DIR* dir = opendir(directory.c_str()); struct dirent* entry; @@ -417,27 +355,15 @@ vector get_xml_files(string directory, string data_directory) { if (filename != "." && filename != "..") { string path = directory + "/" + filename; if (entry->d_type == DT_DIR) { - string new_folder = data_directory + "/" + filename; - if (mkdir(new_folder.c_str(), 0700) == -1 && errno != EEXIST) { - cout << "Error making " << new_folder << endl; - continue; - } - vector subfiles = get_xml_files(path, new_folder); + vector subfiles = get_xml_files(path); + // Default: markerpacks have all xml files in the first directory for (string subfile : subfiles) { - cout << subfile << endl; + cout << subfile << " found in subfolder" << endl; files.push_back(subfile); } } - else if (entry->d_type == DT_REG) { - if (has_suffix(filename, ".xml")) { - files.push_back(path); - } - else if (has_suffix(filename, ".trl") == false) { - string new_path = data_directory + "/" + filename; - ifstream infile(path, ios::binary); - ofstream outfile(new_path, ios::binary); - outfile << infile.rdbuf(); - } + else if (has_suffix(filename, ".xml")) { + files.push_back(path); } } } @@ -446,8 +372,36 @@ vector get_xml_files(string directory, string data_directory) { return files; } -void convert_taco_directory(string directory, string data_directory, map* marker_categories, vector* parsed_pois) { - vector xml_files = get_xml_files(directory, data_directory); +void move_supplimentary_files(string input_directory, string output_directory) { + DIR* dir = opendir(input_directory.c_str()); + struct dirent* entry; + while ((entry = readdir(dir)) != NULL) { + string filename = entry->d_name; + if (filename != "." && filename != "..") { + string path = input_directory + "/" + filename; + if (entry->d_type == DT_DIR) { + string new_directory = output_directory + "/" + filename; + if (mkdir(new_directory.c_str(), 0700) == -1 && errno != EEXIST) { + cout << "Error making " << new_directory << endl; + continue; + } + move_supplimentary_files(path, new_directory); + } + else if (has_suffix(filename, ".trl") || has_suffix(filename, ".xml")) { + continue; + } + else { + // TODO: Only include files that have references + string new_path = output_directory + "/" + filename; + copy_file(path, new_path); + } + } + } +} + +void convert_taco_directory(string directory, string output_directory, map* marker_categories, vector* parsed_pois) { + vector xml_files = get_xml_files(directory); + move_supplimentary_files(directory, output_directory); for (const string& path : xml_files) { parse_xml_file(path, marker_categories, parsed_pois); } @@ -474,13 +428,17 @@ int main() { map marker_categories; test_proto(); - string output_directory = "./protobins"; + // For Linux, the deafult for "user://"" in Godot is + // ~/.local/share/godot/app_userdata/[project_name] + // Output_directory can be thought of as "user://Burrito/protobins" + string output_directory = "~/.local/share/godot/app_userdata/Burrito/protobins"; if (mkdir(output_directory.c_str(), 0700) == -1 && errno != EEXIST) { cout << "Error making ./protobins/" << endl; throw std::error_code(); } + // Input will be supplied via FileDialog in Godot string input_directory = "./packs"; vector marker_packs; From dd2924be41cc51a0189ddc80a90ab5a1e7dac8ec Mon Sep 17 00:00:00 2001 From: klingbolt Date: Fri, 21 Apr 2023 22:30:04 -0400 Subject: [PATCH 174/539] Addressing IWYU --- xml_converter/src/attribute/trail_data.cpp | 4 ++-- xml_converter/src/file_helper.cpp | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/xml_converter/src/attribute/trail_data.cpp b/xml_converter/src/attribute/trail_data.cpp index 139390a7..1d8714f9 100644 --- a/xml_converter/src/attribute/trail_data.cpp +++ b/xml_converter/src/attribute/trail_data.cpp @@ -3,8 +3,8 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/xml_converter/src/file_helper.cpp b/xml_converter/src/file_helper.cpp index d019979b..650d9e37 100644 --- a/xml_converter/src/file_helper.cpp +++ b/xml_converter/src/file_helper.cpp @@ -1,7 +1,6 @@ #include "file_helper.hpp" #include -#include #include using namespace std; From 7319002ffa5b03a0f8a8d12e1d866acf2b860474 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Fri, 21 Apr 2023 22:48:20 -0400 Subject: [PATCH 175/539] Temp removing ICYU --- xml_converter/presubmit.sh | 32 +++++++++++----------- xml_converter/src/attribute/trail_data.cpp | 1 + 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/xml_converter/presubmit.sh b/xml_converter/presubmit.sh index 1e1534d6..5ac91168 100755 --- a/xml_converter/presubmit.sh +++ b/xml_converter/presubmit.sh @@ -34,22 +34,22 @@ if (( $? > 0 )); then error_count=`expr $error_count + 1` fi -# Run Include What You Use -# -# We have 2 sed filters here, they could be combined but they are split for clarity -# The first one removes all blank lines -# The second one removes all "everything is good" lines from iwyu -# -# TODO: When this or newer versions of iwyu_tool that carry over the exit codes -# from the include-what-you-use command calls are more widely standard this can -# be replaced with just a call to iwyu_tool instead. -echo "Include What You Use" -echo "--------------------" -../third_party/iwyu_tool.py -p . -o quiet -# include-what-you-use has a "success code" of 2 for a legacy reason. -if [[ $? -ne 2 ]]; then - error_count=`expr $error_count + 1` -fi +# # Run Include What You Use +# # +# # We have 2 sed filters here, they could be combined but they are split for clarity +# # The first one removes all blank lines +# # The second one removes all "everything is good" lines from iwyu +# # +# # TODO: When this or newer versions of iwyu_tool that carry over the exit codes +# # from the include-what-you-use command calls are more widely standard this can +# # be replaced with just a call to iwyu_tool instead. +# echo "Include What You Use" +# echo "--------------------" +# ../third_party/iwyu_tool.py -p . -o quiet +# # include-what-you-use has a "success code" of 2 for a legacy reason. +# if [[ $? -ne 2 ]]; then +# error_count=`expr $error_count + 1` +# fi # Validate that clang-format would make no changes diff --git a/xml_converter/src/attribute/trail_data.cpp b/xml_converter/src/attribute/trail_data.cpp index 1d8714f9..f49d93bd 100644 --- a/xml_converter/src/attribute/trail_data.cpp +++ b/xml_converter/src/attribute/trail_data.cpp @@ -4,6 +4,7 @@ #include #include +#include #include #include #include From 6f19d28b3ca82458f3c71e46f718092cf2dff1b7 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Fri, 21 Apr 2023 23:47:18 -0400 Subject: [PATCH 176/539] Addressing the removal of fstream by IWYU --- xml_converter/presubmit.sh | 32 +++++++++++----------- xml_converter/src/attribute/trail_data.cpp | 7 ++++- 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/xml_converter/presubmit.sh b/xml_converter/presubmit.sh index 5ac91168..1e1534d6 100755 --- a/xml_converter/presubmit.sh +++ b/xml_converter/presubmit.sh @@ -34,22 +34,22 @@ if (( $? > 0 )); then error_count=`expr $error_count + 1` fi -# # Run Include What You Use -# # -# # We have 2 sed filters here, they could be combined but they are split for clarity -# # The first one removes all blank lines -# # The second one removes all "everything is good" lines from iwyu -# # -# # TODO: When this or newer versions of iwyu_tool that carry over the exit codes -# # from the include-what-you-use command calls are more widely standard this can -# # be replaced with just a call to iwyu_tool instead. -# echo "Include What You Use" -# echo "--------------------" -# ../third_party/iwyu_tool.py -p . -o quiet -# # include-what-you-use has a "success code" of 2 for a legacy reason. -# if [[ $? -ne 2 ]]; then -# error_count=`expr $error_count + 1` -# fi +# Run Include What You Use +# +# We have 2 sed filters here, they could be combined but they are split for clarity +# The first one removes all blank lines +# The second one removes all "everything is good" lines from iwyu +# +# TODO: When this or newer versions of iwyu_tool that carry over the exit codes +# from the include-what-you-use command calls are more widely standard this can +# be replaced with just a call to iwyu_tool instead. +echo "Include What You Use" +echo "--------------------" +../third_party/iwyu_tool.py -p . -o quiet +# include-what-you-use has a "success code" of 2 for a legacy reason. +if [[ $? -ne 2 ]]; then + error_count=`expr $error_count + 1` +fi # Validate that clang-format would make no changes diff --git a/xml_converter/src/attribute/trail_data.cpp b/xml_converter/src/attribute/trail_data.cpp index f49d93bd..6aaca05c 100644 --- a/xml_converter/src/attribute/trail_data.cpp +++ b/xml_converter/src/attribute/trail_data.cpp @@ -4,7 +4,12 @@ #include #include -#include +// IWYU is incorrectly removing fstream here +#include // IWYU pragma: keep +// iostream is typedef'ing ifstream as basic_ifstream +// basic_ifstream is definied in fstream +// This might be a bug in std or the linter. +// https://gcc.gnu.org/onlinedocs/libstdc++/libstdc++-html-USERS-4.2/group__s27__2__iosfwd.html #include #include #include From 2312d2fb51c7118874514beed14459eec4af2b6e Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sat, 22 Apr 2023 00:14:30 -0400 Subject: [PATCH 177/539] Removed unsused variable --- xml_converter/generators/code_generator.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index cb72b808..ff2faf20 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -383,7 +383,7 @@ def write_cpp_classes(self, output_directory: str) -> None: attributes_of_type_marker_category = [] attribute_variables: List[AttributeVariable] - attribute_variables, cpp_includes, file_path_used = self.generate_cpp_variable_data(cpp_class) + attribute_variables, cpp_includes = self.generate_cpp_variable_data(cpp_class) for attribute_variable in attribute_variables: if attribute_variable.class_name == "marker_category": @@ -396,7 +396,6 @@ def write_cpp_classes(self, output_directory: str) -> None: cpp_includes=cpp_includes, cpp_class_header=lowercase(cpp_class), attributes_of_type_marker_category=attributes_of_type_marker_category, - file_path_used=file_path_used, )) with open(os.path.join(output_directory, lowercase(cpp_class) + "_gen.cpp"), 'w') as f: @@ -408,7 +407,6 @@ def write_cpp_classes(self, output_directory: str) -> None: attribute_variables=sorted(attribute_variables, key=get_attribute_variable_key), enumerate=enumerate, attributes_of_type_marker_category=attributes_of_type_marker_category, - file_path_used=file_path_used, )) ############################################################################ @@ -421,7 +419,7 @@ def write_cpp_classes(self, output_directory: str) -> None: def generate_cpp_variable_data( self, doc_type: str, - ) -> Tuple[List[AttributeVariable], CPPInclude, bool]: + ) -> Tuple[List[AttributeVariable], CPPInclude]: cpp_includes: CPPInclude = CPPInclude() attribute_name: str = "" @@ -432,7 +430,6 @@ def generate_cpp_variable_data( protobuf_field: str = "" is_trigger: bool = False uses_file_path: bool = False - file_path_used: bool = False cpp_includes.hpp_absolute_includes.add("string") cpp_includes.hpp_absolute_includes.add("vector") @@ -525,7 +522,6 @@ def generate_cpp_variable_data( if "uses_file_path" in fieldval: if fieldval["uses_file_path"]: uses_file_path = True - file_path_used = True else: uses_file_path = False else: @@ -545,7 +541,7 @@ def generate_cpp_variable_data( ) attribute_variables.append(attribute_variable) - return attribute_variables, cpp_includes, file_path_used + return attribute_variables, cpp_includes ############################################################################ # variable_name_from_markdown_path From b886f9eb0ceb91914a4881e3a3db3b8af60a9880 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sat, 22 Apr 2023 12:01:34 -0400 Subject: [PATCH 178/539] Adjusting error check in trail_data --- xml_converter/src/attribute/trail_data.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xml_converter/src/attribute/trail_data.cpp b/xml_converter/src/attribute/trail_data.cpp index 6aaca05c..a6b50f4f 100644 --- a/xml_converter/src/attribute/trail_data.cpp +++ b/xml_converter/src/attribute/trail_data.cpp @@ -52,8 +52,8 @@ TrailData parse_trail_data(string* base_dir, rapidxml::xml_attribute<>* input, v trail_data.points_z.push_back(*reinterpret_cast(point_z)); } - if (trail_data.points_x.size() != trail_data.points_z.size()) { - cout << "Unexpected number of bits in trail file " << trail_path << endl; + if (trail_data.points_x.size() != trail_data.points_y.size() || trail_data.points_x.size() != trail_data.points_z.size()) { + cout << "Unexpected number of bits in trail file " << trail_path << ". Does not have equal number of X, Y, and Z coordinates." << endl; } trail_data_file.close(); From 4ca40e05c970b405b4ca3029c119cf3b87a1516c Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sat, 22 Apr 2023 12:47:37 -0400 Subject: [PATCH 179/539] Added side_effect code --- xml_converter/generators/code_generator.py | 8 ++++++++ xml_converter/generators/cpp_templates/class_template.cpp | 4 ++++ xml_converter/src/trail_gen.cpp | 2 ++ 3 files changed, 14 insertions(+) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index ff2faf20..cf63d9bb 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -289,6 +289,7 @@ class AttributeVariable: protobuf_field: str default_xml_fields: List[str] = field(default_factory=list) xml_export: str = "" + side_effects: List[str] = field(default_factory=list) compound_name: Optional[str] = None is_trigger: bool = False uses_file_path: bool = False @@ -426,6 +427,7 @@ def generate_cpp_variable_data( attribute_variables: List[AttributeVariable] = [] xml_fields: List[str] = [] default_xml_fields: List[str] = [] + side_effects: List[str] = [] xml_export: str = "" protobuf_field: str = "" is_trigger: bool = False @@ -459,6 +461,7 @@ def generate_cpp_variable_data( if doc_type in fieldval['applies_to']: xml_fields = [] default_xml_fields = [] + side_effects = [] xml_export = "" if fieldval['type'] in documentation_type_data: @@ -527,6 +530,10 @@ def generate_cpp_variable_data( else: uses_file_path = False + if "side_effects" in fieldval: + for side_effect in fieldval['side_effects']: + side_effects.append(lowercase(side_effect, "_")) + attribute_variable = AttributeVariable( attribute_name=attribute_name, attribute_type=fieldval["type"], @@ -538,6 +545,7 @@ def generate_cpp_variable_data( protobuf_field=protobuf_field, is_trigger=is_trigger, uses_file_path=uses_file_path, + side_effects=side_effects, ) attribute_variables.append(attribute_variable) diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index 57e7c2cc..fe8641bb 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -53,6 +53,10 @@ bool {{cpp_class}}::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vec else if (attributename == "{{value}}") { this->{{attribute_variable.attribute_name}} = parse_{{attribute_variable.class_name}}(base_dir, attribute, errors); this->{{attribute_variable.attribute_name}}_is_set = true; + {% for side_effect in attribute_variable.side_effects %} + this->{{side_effect}} = this->{{attribute_variable.class_name}}.{{side_effect}}; + this->{{side_effect}}_is_set = true; + {% endfor %} } {% else: %} else if (attributename == "{{value}}") { diff --git a/xml_converter/src/trail_gen.cpp b/xml_converter/src/trail_gen.cpp index 59cd23d4..8ce16d6b 100644 --- a/xml_converter/src/trail_gen.cpp +++ b/xml_converter/src/trail_gen.cpp @@ -161,6 +161,8 @@ bool Trail::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectortrail_data = parse_trail_data(base_dir, attribute, errors); this->trail_data_is_set = true; + this->map_id = this->trail_data.map_id; + this->map_id_is_set = true; } else if (attributename == "trailscale") { this->trail_scale = parse_float(attribute, errors); From 3ed98d15b95f9e4e75c71827e968442baaa8c142 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 23 Apr 2023 13:38:02 -0400 Subject: [PATCH 180/539] Addressing code review. Resolved issues with creating folders --- xml_converter/doc/map_id/map_type_filter.md | 2 +- .../{heightoffset.md => height_offset.md} | 0 xml_converter/generators/code_generator.py | 21 ++-- .../cpp_templates/class_template.cpp | 19 ++-- .../cpp_templates/class_template.hpp | 4 +- xml_converter/src/attribute/trail_data.cpp | 76 ++++++++------- xml_converter/src/attribute/trail_data.hpp | 4 +- xml_converter/src/category_gen.cpp | 4 +- xml_converter/src/category_gen.hpp | 4 +- xml_converter/src/icon_gen.cpp | 26 ++--- xml_converter/src/icon_gen.hpp | 6 +- xml_converter/src/parseable.cpp | 4 +- xml_converter/src/parseable.hpp | 4 +- xml_converter/src/trail_gen.cpp | 10 +- xml_converter/src/trail_gen.hpp | 2 +- xml_converter/src/xml_converter.cpp | 96 ++++++++++++------- 16 files changed, 155 insertions(+), 127 deletions(-) rename xml_converter/doc/position/{heightoffset.md => height_offset.md} (100%) diff --git a/xml_converter/doc/map_id/map_type_filter.md b/xml_converter/doc/map_id/map_type_filter.md index fde01d54..369af7eb 100644 --- a/xml_converter/doc/map_id/map_type_filter.md +++ b/xml_converter/doc/map_id/map_type_filter.md @@ -2,7 +2,7 @@ name: Map Type Filter type: MultiflagValue applies_to: [Icon, Trail] -xml_fields: [MapID] +xml_fields: [MapType] protobuf_field: map_type_filter compatability: [TacO, BlishHUD, Burrito] flags: diff --git a/xml_converter/doc/position/heightoffset.md b/xml_converter/doc/position/height_offset.md similarity index 100% rename from xml_converter/doc/position/heightoffset.md rename to xml_converter/doc/position/height_offset.md diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index cf63d9bb..a9bcb443 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -287,6 +287,7 @@ class AttributeVariable: class_name: str xml_fields: List[str] protobuf_field: str + args: List[str] = field(default_factory=list) default_xml_fields: List[str] = field(default_factory=list) xml_export: str = "" side_effects: List[str] = field(default_factory=list) @@ -428,10 +429,10 @@ def generate_cpp_variable_data( xml_fields: List[str] = [] default_xml_fields: List[str] = [] side_effects: List[str] = [] + default_args: List[str] = ["attribute", "errors"] xml_export: str = "" protobuf_field: str = "" is_trigger: bool = False - uses_file_path: bool = False cpp_includes.hpp_absolute_includes.add("string") cpp_includes.hpp_absolute_includes.add("vector") @@ -455,14 +456,18 @@ def generate_cpp_variable_data( cpp_includes.cpp_absolute_includes.add("type_traits") for filepath, document in sorted(self.data.items()): - attribute_name = self.variable_name_from_markdown_path(filepath) fieldval = document.metadata + attribute_name = lowercase(fieldval['name'], "_") if doc_type in fieldval['applies_to']: xml_fields = [] default_xml_fields = [] side_effects = [] xml_export = "" + args = [] + + for arg in default_args: + args.append(arg) if fieldval['type'] in documentation_type_data: cpp_type = documentation_type_data[fieldval['type']]["cpp_type"] @@ -508,6 +513,7 @@ def generate_cpp_variable_data( xml_export=xml_export, protobuf_field=component["protobuf_field"], compound_name=lowercase(fieldval['name'], delimiter="_"), + args=args, ) attribute_variables.append(component_attribute_variable) @@ -522,13 +528,8 @@ def generate_cpp_variable_data( is_trigger = False protobuf_field = fieldval["protobuf_field"] - if "uses_file_path" in fieldval: - if fieldval["uses_file_path"]: - uses_file_path = True - else: - uses_file_path = False - else: - uses_file_path = False + if fieldval.get("uses_file_path", False): + args.append("base_dir") if "side_effects" in fieldval: for side_effect in fieldval['side_effects']: @@ -544,7 +545,7 @@ def generate_cpp_variable_data( xml_export=xml_export, protobuf_field=protobuf_field, is_trigger=is_trigger, - uses_file_path=uses_file_path, + args=args, side_effects=side_effects, ) attribute_variables.append(attribute_variable) diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index fe8641bb..fc847c1a 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -18,7 +18,7 @@ string {{cpp_class}}::classname() { return "{{xml_class_name}}"; } {% if cpp_class == "Category": %} -void {{cpp_class}}::init_from_xml(rapidxml::xml_node<>* node, vector* errors, string* base_dir) { +void {{cpp_class}}::init_from_xml(rapidxml::xml_node<>* node, vector* errors, string base_dir) { for (rapidxml::xml_attribute<>* attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()) { bool is_icon_value = this->default_icon.init_xml_attribute(attribute, errors); bool is_trail_value = this->default_trail.init_xml_attribute(attribute, errors); @@ -34,35 +34,30 @@ void {{cpp_class}}::init_from_xml(rapidxml::xml_node<>* node, vector* } {% endif %} -bool {{cpp_class}}::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector* errors, string* base_dir) { +bool {{cpp_class}}::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector* errors, string base_dir) { string attributename; attributename = normalize(get_attribute_name(attribute)); {% for n, attribute_variable in enumerate(attribute_variables) %} {% for i, value in enumerate(attribute_variable.xml_fields) %} {% if i == 0 and n == 0: %} if (attributename == "{{value}}") { - this->{{attribute_variable.attribute_name}} = parse_{{attribute_variable.class_name}}(attribute, errors); + this->{{attribute_variable.attribute_name}} = parse_{{attribute_variable.class_name}}({{", ".join(attribute_variable.args)}}); this->{{attribute_variable.attribute_name}}_is_set = true; } {% elif (attribute_variable.attribute_type == "CompoundValue" and attribute_variable.compound_name != None) %} else if (attributename == "{{value}}") { - this->{{attribute_variable.compound_name}}.{{attribute_variable.attribute_name}} = parse_float(attribute, errors); + this->{{attribute_variable.compound_name}}.{{attribute_variable.attribute_name}} = parse_float({{", ".join(attribute_variable.args)}}); this->{{attribute_variable.compound_name}}_is_set = true; } - {% elif (attribute_variable.uses_file_path)%} + {% else: %} else if (attributename == "{{value}}") { - this->{{attribute_variable.attribute_name}} = parse_{{attribute_variable.class_name}}(base_dir, attribute, errors); + this->{{attribute_variable.attribute_name}} = parse_{{attribute_variable.class_name}}({{", ".join(attribute_variable.args)}}); this->{{attribute_variable.attribute_name}}_is_set = true; {% for side_effect in attribute_variable.side_effects %} - this->{{side_effect}} = this->{{attribute_variable.class_name}}.{{side_effect}}; + this->{{side_effect}} = this->{{attribute_variable.class_name}}.side_effect_{{side_effect}}; this->{{side_effect}}_is_set = true; {% endfor %} } - {% else: %} - else if (attributename == "{{value}}") { - this->{{attribute_variable.attribute_name}} = parse_{{attribute_variable.class_name}}(attribute, errors); - this->{{attribute_variable.attribute_name}}_is_set = true; - } {% endif %} {% endfor %} {% endfor %} diff --git a/xml_converter/generators/cpp_templates/class_template.hpp b/xml_converter/generators/cpp_templates/class_template.hpp index ac600cc8..587ee7f2 100644 --- a/xml_converter/generators/cpp_templates/class_template.hpp +++ b/xml_converter/generators/cpp_templates/class_template.hpp @@ -29,11 +29,11 @@ class {{cpp_class}} : public Parseable { Icon default_icon; Trail default_trail; - void init_from_xml(rapidxml::xml_node<>* node, std::vector* errors, std::string* base_dir = nullptr); + void init_from_xml(rapidxml::xml_node<>* node, std::vector* errors, std::string base_dir = ""); {% endif %} virtual std::vector as_xml() const; virtual std::string classname(); - bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, std::string* base_dir = nullptr); + bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, std::string base_dir = ""); waypoint::{{cpp_class}} as_protobuf() const; void parse_protobuf(waypoint::{{cpp_class}} proto_{{cpp_class_header}}); {% if attributes_of_type_marker_category %} diff --git a/xml_converter/src/attribute/trail_data.cpp b/xml_converter/src/attribute/trail_data.cpp index a6b50f4f..95b7a626 100644 --- a/xml_converter/src/attribute/trail_data.cpp +++ b/xml_converter/src/attribute/trail_data.cpp @@ -4,12 +4,12 @@ #include #include -// IWYU is incorrectly removing fstream here -#include // IWYU pragma: keep -// iostream is typedef'ing ifstream as basic_ifstream -// basic_ifstream is definied in fstream -// This might be a bug in std or the linter. +// IWYU is incorrectly removing fstream here because it thinks ifstream is +// defined in iostream, not fstream. But iostream is typedef'ing ifstream as a +// basic_ifstream which is forward declared from fstream, according to: // https://gcc.gnu.org/onlinedocs/libstdc++/libstdc++-html-USERS-4.2/group__s27__2__iosfwd.html +// This might be a bug in std library or iwyu so it is being ignored here. +#include // IWYU pragma: keep #include #include #include @@ -25,38 +25,44 @@ using namespace std; // // Parses a TrailData from the value of a rapidxml::xml_attribute. //////////////////////////////////////////////////////////////////////////////// -TrailData parse_trail_data(string* base_dir, rapidxml::xml_attribute<>* input, vector*) { +TrailData parse_trail_data(rapidxml::xml_attribute<>* input, vector* errors, string base_dir) { TrailData trail_data; trail_data.trail_data_relative_path = get_attribute_value(input); + if (base_dir == "" || trail_data.trail_data_relative_path == ""){ + errors->push_back(new XMLAttributeValueError("", input)); + } ifstream trail_data_file; - string trail_path = *base_dir + "/" + trail_data.trail_data_relative_path; + string trail_path = base_dir + "/" + trail_data.trail_data_relative_path; trail_data_file.open(trail_path, ios::in | ios::binary); + if (trail_data_file.good()){ + char version[4]; + trail_data_file.read(version, 4); - char version[4]; - trail_data_file.read(version, 4); + char map_id_char[4]; - char map_id_char[4]; + trail_data_file.read(map_id_char, 4); + trail_data.side_effect_map_id = *reinterpret_cast(map_id_char); - trail_data_file.read(map_id_char, 4); - trail_data.map_id = *reinterpret_cast(map_id_char); + while (trail_data_file.tellg() > 0) { + char point_x[4]; + trail_data_file.read(point_x, 4); + trail_data.points_x.push_back(*reinterpret_cast(point_x)); + char point_y[4]; + trail_data_file.read(point_y, 4); + trail_data.points_y.push_back(*reinterpret_cast(point_y)); + char point_z[4]; + trail_data_file.read(point_z, 4); + trail_data.points_z.push_back(*reinterpret_cast(point_z)); + } - while (trail_data_file.tellg() > 0) { - char point_x[4]; - trail_data_file.read(point_x, 4); - trail_data.points_x.push_back(*reinterpret_cast(point_x)); - char point_y[4]; - trail_data_file.read(point_y, 4); - trail_data.points_y.push_back(*reinterpret_cast(point_y)); - char point_z[4]; - trail_data_file.read(point_z, 4); - trail_data.points_z.push_back(*reinterpret_cast(point_z)); - } + if (trail_data.points_x.size() != trail_data.points_y.size() || trail_data.points_x.size() != trail_data.points_z.size()) { + errors->push_back(new XMLAttributeValueError("Unexpected number of bits in trail file. Does not have equal number of X, Y, and Z coordinates." + trail_path, input)); + } - if (trail_data.points_x.size() != trail_data.points_y.size() || trail_data.points_x.size() != trail_data.points_z.size()) { - cout << "Unexpected number of bits in trail file " << trail_path << ". Does not have equal number of X, Y, and Z coordinates." << endl; + trail_data_file.close(); } - - trail_data_file.close(); + else + errors->push_back(new XMLAttributeValueError("No trail file found at " + trail_path, input)); return trail_data; } @@ -78,11 +84,9 @@ string stringify_trail_data(TrailData attribute_value) { waypoint::TrailData* to_proto_trail_data(TrailData attribute_value) { waypoint::TrailData* trail_data = new waypoint::TrailData(); trail_data->set_trail_data_relative_path(attribute_value.trail_data_relative_path); - for (u_int i = 0; i < attribute_value.points_x.size(); i++) { - trail_data->add_points_x(attribute_value.points_x[i]); - trail_data->add_points_y(attribute_value.points_y[i]); - trail_data->add_points_z(attribute_value.points_z[i]); - } + trail_data->mutable_points_x()->Add(attribute_value.points_x.begin(), attribute_value.points_x.end()); + trail_data->mutable_points_y()->Add(attribute_value.points_y.begin(), attribute_value.points_y.end()); + trail_data->mutable_points_z()->Add(attribute_value.points_z.begin(), attribute_value.points_z.end()); return trail_data; } @@ -94,10 +98,8 @@ waypoint::TrailData* to_proto_trail_data(TrailData attribute_value) { TrailData from_proto_trail_data(waypoint::TrailData attribute_value) { TrailData trail_data; trail_data.trail_data_relative_path = attribute_value.trail_data_relative_path(); - for (int i = 0; i < attribute_value.points_x_size(); i++) { - trail_data.points_x.push_back(attribute_value.points_x(i)); - trail_data.points_y.push_back(attribute_value.points_y(i)); - trail_data.points_z.push_back(attribute_value.points_z(i)); - } + trail_data.points_x = {attribute_value.points_x().begin(), attribute_value.points_x().end()}; + trail_data.points_y = {attribute_value.points_y().begin(), attribute_value.points_y().end()}; + trail_data.points_z = {attribute_value.points_z().begin(), attribute_value.points_z().end()}; return trail_data; } diff --git a/xml_converter/src/attribute/trail_data.hpp b/xml_converter/src/attribute/trail_data.hpp index c8a8f079..d1a80489 100644 --- a/xml_converter/src/attribute/trail_data.hpp +++ b/xml_converter/src/attribute/trail_data.hpp @@ -13,13 +13,13 @@ class TrailData; class TrailData { public: std::string trail_data_relative_path; - int map_id; + int side_effect_map_id; std::vector points_x; std::vector points_y; std::vector points_z; }; -TrailData parse_trail_data(std::string* base_dir, rapidxml::xml_attribute<>* input, std::vector* errors); +TrailData parse_trail_data(rapidxml::xml_attribute<>* input, std::vector* errors, std::string base_dir); std::string stringify_trail_data(TrailData attribute_value); diff --git a/xml_converter/src/category_gen.cpp b/xml_converter/src/category_gen.cpp index fc223367..e5c22706 100644 --- a/xml_converter/src/category_gen.cpp +++ b/xml_converter/src/category_gen.cpp @@ -17,7 +17,7 @@ using namespace std; string Category::classname() { return "MarkerCategory"; } -void Category::init_from_xml(rapidxml::xml_node<>* node, vector* errors, string* base_dir) { +void Category::init_from_xml(rapidxml::xml_node<>* node, vector* errors, string base_dir) { for (rapidxml::xml_attribute<>* attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()) { bool is_icon_value = this->default_icon.init_xml_attribute(attribute, errors); bool is_trail_value = this->default_trail.init_xml_attribute(attribute, errors); @@ -32,7 +32,7 @@ void Category::init_from_xml(rapidxml::xml_node<>* node, vector* erro } } -bool Category::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector* errors, string* base_dir) { +bool Category::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector* errors, string base_dir) { string attributename; attributename = normalize(get_attribute_name(attribute)); if (attributename == "defaulttoggle") { diff --git a/xml_converter/src/category_gen.hpp b/xml_converter/src/category_gen.hpp index 478370f8..3ef42874 100644 --- a/xml_converter/src/category_gen.hpp +++ b/xml_converter/src/category_gen.hpp @@ -28,10 +28,10 @@ class Category : public Parseable { Icon default_icon; Trail default_trail; - void init_from_xml(rapidxml::xml_node<>* node, std::vector* errors, std::string* base_dir = nullptr); + void init_from_xml(rapidxml::xml_node<>* node, std::vector* errors, std::string base_dir = ""); virtual std::vector as_xml() const; virtual std::string classname(); - bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, std::string* base_dir = nullptr); + bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, std::string base_dir = ""); waypoint::Category as_protobuf() const; void parse_protobuf(waypoint::Category proto_category); }; diff --git a/xml_converter/src/icon_gen.cpp b/xml_converter/src/icon_gen.cpp index 81fb7611..f1db5a3e 100644 --- a/xml_converter/src/icon_gen.cpp +++ b/xml_converter/src/icon_gen.cpp @@ -19,7 +19,7 @@ string Icon::classname() { return "POI"; } -bool Icon::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector* errors, string* base_dir) { +bool Icon::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector* errors, string base_dir) { string attributename; attributename = normalize(get_attribute_name(attribute)); if (attributename == "achievementbit") { @@ -115,12 +115,12 @@ bool Icon::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectorhas_countdown_is_set = true; } else if (attributename == "heightoffset") { - this->heightoffset = parse_float(attribute, errors); - this->heightoffset_is_set = true; + this->height_offset = parse_float(attribute, errors); + this->height_offset_is_set = true; } else if (attributename == "bhheightoffset") { - this->heightoffset = parse_float(attribute, errors); - this->heightoffset_is_set = true; + this->height_offset = parse_float(attribute, errors); + this->height_offset_is_set = true; } else if (attributename == "hide") { this->hide_category = parse_marker_category(attribute, errors); @@ -150,7 +150,7 @@ bool Icon::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectormap_id = parse_int(attribute, errors); this->map_id_is_set = true; } - else if (attributename == "mapid") { + else if (attributename == "maptype") { this->map_type_filter = parse_map_type_filter(attribute, errors); this->map_type_filter_is_set = true; } @@ -364,8 +364,8 @@ vector Icon::as_xml() const { if (this->has_countdown_is_set) { xml_node_contents.push_back(" HasCountdown=\"" + stringify_bool(this->has_countdown) + "\""); } - if (this->heightoffset_is_set) { - xml_node_contents.push_back(" HeightOffset=\"" + stringify_float(this->heightoffset) + "\""); + if (this->height_offset_is_set) { + xml_node_contents.push_back(" HeightOffset=\"" + stringify_float(this->height_offset) + "\""); } if (this->hide_category_is_set) { xml_node_contents.push_back(" Hide=\"" + stringify_marker_category(this->hide_category) + "\""); @@ -389,7 +389,7 @@ vector Icon::as_xml() const { xml_node_contents.push_back(" MapID=\"" + stringify_int(this->map_id) + "\""); } if (this->map_type_filter_is_set) { - xml_node_contents.push_back(" MapID=\"" + stringify_map_type_filter(this->map_type_filter) + "\""); + xml_node_contents.push_back(" MapType=\"" + stringify_map_type_filter(this->map_type_filter) + "\""); } if (this->maximum_size_on_screen_is_set) { xml_node_contents.push_back(" MaxSize=\"" + stringify_int(this->maximum_size_on_screen) + "\""); @@ -539,8 +539,8 @@ waypoint::Icon Icon::as_protobuf() const { } trigger->set_has_countdown(this->has_countdown); } - if (this->heightoffset_is_set) { - proto_icon.set_height_offset(this->heightoffset); + if (this->height_offset_is_set) { + proto_icon.set_height_offset(this->height_offset); } if (this->hide_category_is_set) { if (trigger == nullptr) { @@ -731,8 +731,8 @@ void Icon::parse_protobuf(waypoint::Icon proto_icon) { this->has_countdown_is_set = true; } if (proto_icon.height_offset() != 0) { - this->heightoffset = proto_icon.height_offset(); - this->heightoffset_is_set = true; + this->height_offset = proto_icon.height_offset(); + this->height_offset_is_set = true; } if (trigger.has_action_hide_category()) { this->hide_category = from_proto_marker_category(trigger.action_hide_category()); diff --git a/xml_converter/src/icon_gen.hpp b/xml_converter/src/icon_gen.hpp index 1167164f..771b72fa 100644 --- a/xml_converter/src/icon_gen.hpp +++ b/xml_converter/src/icon_gen.hpp @@ -43,7 +43,7 @@ class Icon : public Parseable { FestivalFilter festival_filter; UniqueId guid; bool has_countdown; - float heightoffset; + float height_offset; MarkerCategory hide_category; Image icon; float icon_size; @@ -90,7 +90,7 @@ class Icon : public Parseable { bool festival_filter_is_set = false; bool guid_is_set = false; bool has_countdown_is_set = false; - bool heightoffset_is_set = false; + bool height_offset_is_set = false; bool hide_category_is_set = false; bool icon_is_set = false; bool icon_size_is_set = false; @@ -121,7 +121,7 @@ class Icon : public Parseable { bool trigger_range_is_set = false; virtual std::vector as_xml() const; virtual std::string classname(); - bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, std::string* base_dir = nullptr); + bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, std::string base_dir = ""); waypoint::Icon as_protobuf() const; void parse_protobuf(waypoint::Icon proto_icon); bool validate_attributes_of_type_marker_category(); diff --git a/xml_converter/src/parseable.cpp b/xml_converter/src/parseable.cpp index 6f89cf56..bd5bee47 100644 --- a/xml_converter/src/parseable.cpp +++ b/xml_converter/src/parseable.cpp @@ -11,7 +11,7 @@ std::string Parseable::classname() { return "Parseable"; } -void Parseable::init_from_xml(rapidxml::xml_node<>* node, std::vector* errors, std::string* base_dir) { +void Parseable::init_from_xml(rapidxml::xml_node<>* node, std::vector* errors, std::string base_dir) { for (rapidxml::xml_attribute<>* attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()) { if (init_xml_attribute(attribute, errors, base_dir)) { } @@ -28,7 +28,7 @@ void Parseable::init_from_xml(rapidxml::xml_node<>* node, std::vector // all of the other parsible classes. So just return false right away without // doing anything. //////////////////////////////////////////////////////////////////////////////// -bool Parseable::init_xml_attribute(rapidxml::xml_attribute<>*, std::vector*, std::string*) { +bool Parseable::init_xml_attribute(rapidxml::xml_attribute<>*, std::vector*, std::string) { return false; } diff --git a/xml_converter/src/parseable.hpp b/xml_converter/src/parseable.hpp index d7f17305..455886e6 100644 --- a/xml_converter/src/parseable.hpp +++ b/xml_converter/src/parseable.hpp @@ -12,10 +12,10 @@ class Parseable { virtual std::string classname(); // A default parser function to parse an entire XML node into the class. - void init_from_xml(rapidxml::xml_node<>* node, std::vector* errors, std::string* base_dir = nullptr); + void init_from_xml(rapidxml::xml_node<>* node, std::vector* errors, std::string base_dir = ""); // A default parser function to parse a single XML attribute into the class. - virtual bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, std::string* base_dir = nullptr); + virtual bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, std::string base_dir = ""); virtual std::vector as_xml() const; }; diff --git a/xml_converter/src/trail_gen.cpp b/xml_converter/src/trail_gen.cpp index 8ce16d6b..57676fb4 100644 --- a/xml_converter/src/trail_gen.cpp +++ b/xml_converter/src/trail_gen.cpp @@ -19,7 +19,7 @@ string Trail::classname() { return "Trail"; } -bool Trail::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector* errors, string* base_dir) { +bool Trail::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector* errors, string base_dir) { string attributename; attributename = normalize(get_attribute_name(attribute)); if (attributename == "achievementbit") { @@ -98,7 +98,7 @@ bool Trail::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectormap_id = parse_int(attribute, errors); this->map_id_is_set = true; } - else if (attributename == "mapid") { + else if (attributename == "maptype") { this->map_type_filter = parse_map_type_filter(attribute, errors); this->map_type_filter_is_set = true; } @@ -159,9 +159,9 @@ bool Trail::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectortexture_is_set = true; } else if (attributename == "traildata") { - this->trail_data = parse_trail_data(base_dir, attribute, errors); + this->trail_data = parse_trail_data(attribute, errors, base_dir); this->trail_data_is_set = true; - this->map_id = this->trail_data.map_id; + this->map_id = this->trail_data.side_effect_map_id; this->map_id_is_set = true; } else if (attributename == "trailscale") { @@ -224,7 +224,7 @@ vector Trail::as_xml() const { xml_node_contents.push_back(" MapID=\"" + stringify_int(this->map_id) + "\""); } if (this->map_type_filter_is_set) { - xml_node_contents.push_back(" MapID=\"" + stringify_map_type_filter(this->map_type_filter) + "\""); + xml_node_contents.push_back(" MapType=\"" + stringify_map_type_filter(this->map_type_filter) + "\""); } if (this->mount_filter_is_set) { xml_node_contents.push_back(" Mount=\"" + stringify_mount_filter(this->mount_filter) + "\""); diff --git a/xml_converter/src/trail_gen.hpp b/xml_converter/src/trail_gen.hpp index 47bdfcaa..d2a5d488 100644 --- a/xml_converter/src/trail_gen.hpp +++ b/xml_converter/src/trail_gen.hpp @@ -79,7 +79,7 @@ class Trail : public Parseable { bool trail_scale_is_set = false; virtual std::vector as_xml() const; virtual std::string classname(); - bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, std::string* base_dir = nullptr); + bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, std::string base_dir = ""); waypoint::Trail as_protobuf() const; void parse_protobuf(waypoint::Trail proto_trail); bool validate_attributes_of_type_marker_category(); diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 2772f76e..53cd483c 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -122,7 +122,7 @@ void write_protobuf_file(string proto_directory, map* marker_c } else if (parsed_poi->classname() == "Trail") { Trail* trail = dynamic_cast(parsed_poi); - map_ids.insert(trail->trail_data.map_id); + map_ids.insert(trail->map_id); } } waypoint::Waypoint output_message; @@ -213,7 +213,7 @@ Category* get_category(rapidxml::xml_node<>* node, map* marker // // Parse the xml block into an in-memory array of Markers. //////////////////////////////////////////////////////////////////////////////// -vector parse_pois(string* base_dir, rapidxml::xml_node<>* root_node, map* marker_categories, vector* errors) { +vector parse_pois(string base_dir, rapidxml::xml_node<>* root_node, map* marker_categories, vector* errors) { vector markers; for (rapidxml::xml_node<>* node = root_node->first_node(); node; node = node->next_sibling()) { @@ -229,7 +229,7 @@ vector parse_pois(string* base_dir, rapidxml::xml_node<>* root_node, icon->init_from_xml(node, errors); markers.push_back(icon); } - else if (get_node_name(node) == "Trail") { + else if (normalize(get_node_name(node)) == "trail") { Category* default_category = get_category(node, marker_categories, errors); Trail* trail = new Trail(); @@ -316,7 +316,7 @@ void parse_xml_file(string xml_filepath, map* marker_categorie parse_marker_categories(node, marker_categories, &errors); } else if (get_node_name(node) == "POIs") { - vector temp_vector = parse_pois(&base_dir, node, marker_categories, &errors); + vector temp_vector = parse_pois(base_dir, node, marker_categories, &errors); move(temp_vector.begin(), temp_vector.end(), back_inserter(*parsed_pois)); } else { @@ -346,7 +346,7 @@ bool filename_comp(string a, string b) { return lowercase(a) < lowercase(b); } -vector get_xml_files(string directory) { +vector get_files_by_suffix(string directory, string suffix) { vector files; DIR* dir = opendir(directory.c_str()); struct dirent* entry; @@ -355,14 +355,14 @@ vector get_xml_files(string directory) { if (filename != "." && filename != "..") { string path = directory + "/" + filename; if (entry->d_type == DT_DIR) { - vector subfiles = get_xml_files(path); + vector subfiles = get_files_by_suffix(path, suffix); // Default: markerpacks have all xml files in the first directory for (string subfile : subfiles) { cout << subfile << " found in subfolder" << endl; files.push_back(subfile); } } - else if (has_suffix(filename, ".xml")) { + else if (has_suffix(filename, suffix)) { files.push_back(path); } } @@ -372,7 +372,7 @@ vector get_xml_files(string directory) { return files; } -void move_supplimentary_files(string input_directory, string output_directory) { +void move_supplementary_files(string input_directory, string output_directory) { DIR* dir = opendir(input_directory.c_str()); struct dirent* entry; while ((entry = readdir(dir)) != NULL) { @@ -385,28 +385,41 @@ void move_supplimentary_files(string input_directory, string output_directory) { cout << "Error making " << new_directory << endl; continue; } - move_supplimentary_files(path, new_directory); + move_supplementary_files(path, new_directory); } else if (has_suffix(filename, ".trl") || has_suffix(filename, ".xml")) { continue; } else { - // TODO: Only include files that have references + // TODO: Only include files that are referenced by the + // individual markers in order to avoid any unnessecary files string new_path = output_directory + "/" + filename; + // This function is a workaround that simulates the copy + // function in filesystem in C++17. Can be changed in future copy_file(path, new_path); } } } } -void convert_taco_directory(string directory, string output_directory, map* marker_categories, vector* parsed_pois) { - vector xml_files = get_xml_files(directory); - move_supplimentary_files(directory, output_directory); +void read_taco_directory(string directory, map* marker_categories, vector* parsed_pois) { + vector xml_files = get_files_by_suffix(directory, ".xml"); for (const string& path : xml_files) { parse_xml_file(path, marker_categories, parsed_pois); } } +void write_taco_directory(string directory, map* marker_categories, vector* parsed_pois){ + // TODO: Exportion of XML Marker Packs File Structure #111 + string xml_filepath = directory + "xml_file.xml"; + write_xml_file(xml_filepath, marker_categories, parsed_pois); +} + +void convert_taco_directory(string directory, string output_directory, map* marker_categories, vector* parsed_pois) { + move_supplementary_files(directory, output_directory); + read_taco_directory(directory, marker_categories, parsed_pois); +} + void test_proto() { waypoint::Category testcategory; testcategory.set_display_name("TEST"); @@ -421,25 +434,7 @@ void test_proto() { } } -int main() { - auto begin = chrono::high_resolution_clock::now(); - - vector parsed_pois; - map marker_categories; - test_proto(); - - // For Linux, the deafult for "user://"" in Godot is - // ~/.local/share/godot/app_userdata/[project_name] - // Output_directory can be thought of as "user://Burrito/protobins" - string output_directory = "~/.local/share/godot/app_userdata/Burrito/protobins"; - - if (mkdir(output_directory.c_str(), 0700) == -1 && errno != EEXIST) { - cout << "Error making ./protobins/" << endl; - throw std::error_code(); - } - - // Input will be supplied via FileDialog in Godot - string input_directory = "./packs"; +void convert_all_markerpacks(string input_directory, string output_directory, map* marker_categories, vector* parsed_pois){ vector marker_packs; DIR* dir = opendir(input_directory.c_str()); @@ -450,10 +445,45 @@ int main() { string path = input_directory + "/" + filename; marker_packs.push_back(path); cout << path << endl; - convert_taco_directory(path, output_directory, &marker_categories, &parsed_pois); + convert_taco_directory(path, output_directory, marker_categories, parsed_pois); } } closedir(dir); +} + +string create_burrito_data_folder() { + // Get the home directory path + const char* home_dir = getenv("HOME"); + if (home_dir == nullptr) { + std::cerr << "Error: HOME environment variable is not set." << std::endl; + return ""; + } + // For Linux, the deafult for "user://"" in Godot is + // ~/.local/share/godot/app_userdata/[project_name] + // Output_directory can be thought of as "user://Burrito/protobins" + string data_directory = "/.local/share/godot/app_userdata/Burrito/protobins"; + // Construct the folder path + string folder_path = string(home_dir) + data_directory; + + // Create the folder with permissions 0700 (read/write/execute for owner only) + int result = mkdir(folder_path.c_str(), S_IRWXU); + if (result != 0 && errno != EEXIST) { + std::cerr << "Error: Failed to create folder " << folder_path << "." << std::endl; + } + return folder_path; +} + +int main() { + auto begin = chrono::high_resolution_clock::now(); + + vector parsed_pois; + map marker_categories; + test_proto(); + + string output_directory = create_burrito_data_folder(); + // Input will be supplied via FileDialog in Godot + string input_directory = "./packs"; + convert_all_markerpacks(input_directory, output_directory, &marker_categories, &parsed_pois); auto end = chrono::high_resolution_clock::now(); auto dur = end - begin; From 9586192765bf643ee157b6c5e7b85380c19e48a5 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 23 Apr 2023 13:45:40 -0400 Subject: [PATCH 181/539] IWYU is now working correctly --- xml_converter/src/attribute/trail_data.cpp | 15 ++++----------- xml_converter/src/xml_converter.cpp | 9 ++++----- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/xml_converter/src/attribute/trail_data.cpp b/xml_converter/src/attribute/trail_data.cpp index 95b7a626..9e6fcc35 100644 --- a/xml_converter/src/attribute/trail_data.cpp +++ b/xml_converter/src/attribute/trail_data.cpp @@ -1,16 +1,9 @@ #include "trail_data.hpp" #include -#include #include -// IWYU is incorrectly removing fstream here because it thinks ifstream is -// defined in iostream, not fstream. But iostream is typedef'ing ifstream as a -// basic_ifstream which is forward declared from fstream, according to: -// https://gcc.gnu.org/onlinedocs/libstdc++/libstdc++-html-USERS-4.2/group__s27__2__iosfwd.html -// This might be a bug in std library or iwyu so it is being ignored here. -#include // IWYU pragma: keep -#include +#include #include #include @@ -28,13 +21,13 @@ using namespace std; TrailData parse_trail_data(rapidxml::xml_attribute<>* input, vector* errors, string base_dir) { TrailData trail_data; trail_data.trail_data_relative_path = get_attribute_value(input); - if (base_dir == "" || trail_data.trail_data_relative_path == ""){ + if (base_dir == "" || trail_data.trail_data_relative_path == "") { errors->push_back(new XMLAttributeValueError("", input)); } ifstream trail_data_file; string trail_path = base_dir + "/" + trail_data.trail_data_relative_path; trail_data_file.open(trail_path, ios::in | ios::binary); - if (trail_data_file.good()){ + if (trail_data_file.good()) { char version[4]; trail_data_file.read(version, 4); @@ -61,7 +54,7 @@ TrailData parse_trail_data(rapidxml::xml_attribute<>* input, vector* trail_data_file.close(); } - else + else errors->push_back(new XMLAttributeValueError("No trail file found at " + trail_path, input)); return trail_data; } diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 53cd483c..e917ee3b 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include @@ -25,7 +26,6 @@ #include "rapidxml-1.13/rapidxml.hpp" #include "rapidxml-1.13/rapidxml_utils.hpp" #include "string_helper.hpp" -#include "trail_gen.hpp" #include "waypoint.pb.h" using namespace std; @@ -391,7 +391,7 @@ void move_supplementary_files(string input_directory, string output_directory) { continue; } else { - // TODO: Only include files that are referenced by the + // TODO: Only include files that are referenced by the // individual markers in order to avoid any unnessecary files string new_path = output_directory + "/" + filename; // This function is a workaround that simulates the copy @@ -409,7 +409,7 @@ void read_taco_directory(string directory, map* marker_categor } } -void write_taco_directory(string directory, map* marker_categories, vector* parsed_pois){ +void write_taco_directory(string directory, map* marker_categories, vector* parsed_pois) { // TODO: Exportion of XML Marker Packs File Structure #111 string xml_filepath = directory + "xml_file.xml"; write_xml_file(xml_filepath, marker_categories, parsed_pois); @@ -434,7 +434,7 @@ void test_proto() { } } -void convert_all_markerpacks(string input_directory, string output_directory, map* marker_categories, vector* parsed_pois){ +void convert_all_markerpacks(string input_directory, string output_directory, map* marker_categories, vector* parsed_pois) { vector marker_packs; DIR* dir = opendir(input_directory.c_str()); @@ -464,7 +464,6 @@ string create_burrito_data_folder() { string data_directory = "/.local/share/godot/app_userdata/Burrito/protobins"; // Construct the folder path string folder_path = string(home_dir) + data_directory; - // Create the folder with permissions 0700 (read/write/execute for owner only) int result = mkdir(folder_path.c_str(), S_IRWXU); if (result != 0 && errno != EEXIST) { From c576357ea7d0d1c475a500f68e73b8c1571adb64 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 23 Apr 2023 16:05:23 -0400 Subject: [PATCH 182/539] Using different method to copy array --- xml_converter/generators/code_generator.py | 2 +- xml_converter/src/attribute/trail_data.cpp | 6 +++--- xml_converter/src/xml_converter.cpp | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index a9bcb443..3b421a3f 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -465,7 +465,7 @@ def generate_cpp_variable_data( side_effects = [] xml_export = "" args = [] - + for arg in default_args: args.append(arg) diff --git a/xml_converter/src/attribute/trail_data.cpp b/xml_converter/src/attribute/trail_data.cpp index 9e6fcc35..9e1729e7 100644 --- a/xml_converter/src/attribute/trail_data.cpp +++ b/xml_converter/src/attribute/trail_data.cpp @@ -77,9 +77,9 @@ string stringify_trail_data(TrailData attribute_value) { waypoint::TrailData* to_proto_trail_data(TrailData attribute_value) { waypoint::TrailData* trail_data = new waypoint::TrailData(); trail_data->set_trail_data_relative_path(attribute_value.trail_data_relative_path); - trail_data->mutable_points_x()->Add(attribute_value.points_x.begin(), attribute_value.points_x.end()); - trail_data->mutable_points_y()->Add(attribute_value.points_y.begin(), attribute_value.points_y.end()); - trail_data->mutable_points_z()->Add(attribute_value.points_z.begin(), attribute_value.points_z.end()); + *trail_data->mutable_points_x() = {attribute_value.points_x.begin(), attribute_value.points_x.end()}; + *trail_data->mutable_points_y() = {attribute_value.points_y.begin(), attribute_value.points_y.end()}; + *trail_data->mutable_points_z() = {attribute_value.points_z.begin(), attribute_value.points_z.end()}; return trail_data; } diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index e917ee3b..763a583b 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -17,7 +17,6 @@ #include #include "attribute/marker_category.hpp" -#include "attribute/trail_data.hpp" #include "category_gen.hpp" #include "file_helper.hpp" #include "icon_gen.hpp" @@ -26,6 +25,7 @@ #include "rapidxml-1.13/rapidxml.hpp" #include "rapidxml-1.13/rapidxml_utils.hpp" #include "string_helper.hpp" +#include "trail_gen.hpp" #include "waypoint.pb.h" using namespace std; @@ -452,7 +452,7 @@ void convert_all_markerpacks(string input_directory, string output_directory, ma } string create_burrito_data_folder() { - // Get the home directory path + // Get the home directory path const char* home_dir = getenv("HOME"); if (home_dir == nullptr) { std::cerr << "Error: HOME environment variable is not set." << std::endl; From aa02d8844abe3af7c52c56c26e7a0778bce3f845 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Wed, 3 May 2023 23:17:20 -0400 Subject: [PATCH 183/539] Addressing comments --- xml_converter/generators/code_generator.py | 71 ++++++++++--------- .../cpp_templates/class_template.cpp | 2 +- xml_converter/proto/waypoint.proto | 1 - xml_converter/src/attribute/trail_data.cpp | 65 +++++++++-------- xml_converter/src/file_helper.cpp | 2 + xml_converter/src/xml_converter.cpp | 16 ++--- 6 files changed, 83 insertions(+), 74 deletions(-) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 3b421a3f..5881b095 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -2,7 +2,7 @@ from jsonschema.exceptions import ValidationError # type:ignore import yaml import frontmatter # type:ignore -from typing import Any, Dict, List, Tuple, Set, Optional +from typing import Any, Dict, List, Tuple, Set, Optional, Final import os import markdown from dataclasses import dataclass, field @@ -296,6 +296,9 @@ class AttributeVariable: uses_file_path: bool = False +DEFAULT_ARGUMENTS: Final[List[str]] = ["attribute", "errors"] + + ################################################################################ # CPPInclude # @@ -429,8 +432,8 @@ def generate_cpp_variable_data( xml_fields: List[str] = [] default_xml_fields: List[str] = [] side_effects: List[str] = [] - default_args: List[str] = ["attribute", "errors"] xml_export: str = "" + args: List[str] = [] protobuf_field: str = "" is_trigger: bool = False @@ -457,17 +460,14 @@ def generate_cpp_variable_data( for filepath, document in sorted(self.data.items()): fieldval = document.metadata - attribute_name = lowercase(fieldval['name'], "_") + attribute_name = attribute_name_from_markdown_data(fieldval['name']) if doc_type in fieldval['applies_to']: xml_fields = [] default_xml_fields = [] side_effects = [] xml_export = "" - args = [] - - for arg in default_args: - args.append(arg) + args = DEFAULT_ARGUMENTS.copy() if fieldval['type'] in documentation_type_data: cpp_type = documentation_type_data[fieldval['type']]["cpp_type"] @@ -491,7 +491,25 @@ def generate_cpp_variable_data( attribute_name=attribute_name, )) - # Compound Values are unique in that the components have xml fields in addition to the compound variable + for x in fieldval['xml_fields']: + xml_fields.append(lowercase(x, delimiter="")) + default_xml_fields.append(fieldval['xml_fields'][0]) + + if fieldval["protobuf_field"].startswith("trigger"): + is_trigger = True + protobuf_field = fieldval["protobuf_field"].split('.')[1] + else: + is_trigger = False + protobuf_field = fieldval["protobuf_field"] + + if fieldval.get("uses_file_path", False): + args.append("base_dir") + + if "side_effects" in fieldval: + for side_effect in fieldval['side_effects']: + side_effects.append(attribute_name_from_markdown_data(side_effect)) + + # Compound Values are unique in that the components have xml fields in addition to the compound variable if fieldval['type'] == "CompoundValue": xml_export = fieldval['xml_export'] for component in fieldval['components']: @@ -517,24 +535,6 @@ def generate_cpp_variable_data( ) attribute_variables.append(component_attribute_variable) - for x in fieldval['xml_fields']: - xml_fields.append(lowercase(x, delimiter="")) - default_xml_fields.append(fieldval['xml_fields'][0]) - - if fieldval["protobuf_field"].startswith("trigger"): - is_trigger = True - protobuf_field = fieldval["protobuf_field"].split('.')[1] - else: - is_trigger = False - protobuf_field = fieldval["protobuf_field"] - - if fieldval.get("uses_file_path", False): - args.append("base_dir") - - if "side_effects" in fieldval: - for side_effect in fieldval['side_effects']: - side_effects.append(lowercase(side_effect, "_")) - attribute_variable = AttributeVariable( attribute_name=attribute_name, attribute_type=fieldval["type"], @@ -552,15 +552,6 @@ def generate_cpp_variable_data( return attribute_variables, cpp_includes - ############################################################################ - # variable_name_from_markdown_path - # - # Takes the name of a markdown file and returns the variable name that - # should be used internally to store that value. - ############################################################################ - def variable_name_from_markdown_path(self, filepath: str) -> str: - return os.path.splitext(os.path.basename(filepath))[0] - ############################################################################ # write_attributes # @@ -873,6 +864,16 @@ def generate_auto_docs(self, metadata: Dict[str, SchemaType], content: Dict[str, return template.render(field_rows=field_rows), field_rows +############################################################################ +# attribute_name_from_markdown_data +# +# Takes the name of an attribute from the markdown file and returns the name +# that should be used internally to store that value. +############################################################################ +def attribute_name_from_markdown_data(attribute_name: str) -> str: + return lowercase(attribute_name, "_") + + ################################################################################ # capitalize # diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index fc847c1a..98090b6c 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -46,7 +46,7 @@ bool {{cpp_class}}::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vec } {% elif (attribute_variable.attribute_type == "CompoundValue" and attribute_variable.compound_name != None) %} else if (attributename == "{{value}}") { - this->{{attribute_variable.compound_name}}.{{attribute_variable.attribute_name}} = parse_float({{", ".join(attribute_variable.args)}}); + this->{{attribute_variable.compound_name}}.{{attribute_variable.attribute_name}} = parse_float(attribute, errors); this->{{attribute_variable.compound_name}}_is_set = true; } {% else: %} diff --git a/xml_converter/proto/waypoint.proto b/xml_converter/proto/waypoint.proto index 23d77124..1e62199e 100644 --- a/xml_converter/proto/waypoint.proto +++ b/xml_converter/proto/waypoint.proto @@ -297,7 +297,6 @@ message SpeciesFilter { } message TrailData { - string trail_data_relative_path = 1; repeated float points_x = 2; repeated float points_y = 3; repeated float points_z = 4; diff --git a/xml_converter/src/attribute/trail_data.cpp b/xml_converter/src/attribute/trail_data.cpp index 9e1729e7..f63d6112 100644 --- a/xml_converter/src/attribute/trail_data.cpp +++ b/xml_converter/src/attribute/trail_data.cpp @@ -21,41 +21,52 @@ using namespace std; TrailData parse_trail_data(rapidxml::xml_attribute<>* input, vector* errors, string base_dir) { TrailData trail_data; trail_data.trail_data_relative_path = get_attribute_value(input); - if (base_dir == "" || trail_data.trail_data_relative_path == "") { - errors->push_back(new XMLAttributeValueError("", input)); + if (base_dir == "") { + errors->push_back(new XMLAttributeValueError("Marker pack file name is empty", input)); } + if (trail_data.trail_data_relative_path == "") { + errors->push_back(new XMLAttributeValueError("Path to trail file is empty", input)); + return trail_data; + } + ifstream trail_data_file; string trail_path = base_dir + "/" + trail_data.trail_data_relative_path; trail_data_file.open(trail_path, ios::in | ios::binary); - if (trail_data_file.good()) { - char version[4]; - trail_data_file.read(version, 4); - - char map_id_char[4]; + if (!trail_data_file.good()) { + errors->push_back(new XMLAttributeValueError("No trail file found at " + trail_path, input)); + return trail_data; + } + char version[4]; + trail_data_file.read(version, 4); + // Validate the version number. Currently supports versions [0] + if (!(*reinterpret_cast(version) == 0)) { + errors->push_back(new XMLAttributeValueError("Unsupported version for trail data at " + trail_path, input)); + return trail_data; + } - trail_data_file.read(map_id_char, 4); - trail_data.side_effect_map_id = *reinterpret_cast(map_id_char); + char map_id_char[4]; - while (trail_data_file.tellg() > 0) { - char point_x[4]; - trail_data_file.read(point_x, 4); - trail_data.points_x.push_back(*reinterpret_cast(point_x)); - char point_y[4]; - trail_data_file.read(point_y, 4); - trail_data.points_y.push_back(*reinterpret_cast(point_y)); - char point_z[4]; - trail_data_file.read(point_z, 4); - trail_data.points_z.push_back(*reinterpret_cast(point_z)); - } + trail_data_file.read(map_id_char, 4); + trail_data.side_effect_map_id = *reinterpret_cast(map_id_char); - if (trail_data.points_x.size() != trail_data.points_y.size() || trail_data.points_x.size() != trail_data.points_z.size()) { - errors->push_back(new XMLAttributeValueError("Unexpected number of bits in trail file. Does not have equal number of X, Y, and Z coordinates." + trail_path, input)); - } + while (trail_data_file.tellg() > 0) { + char point_x[4]; + trail_data_file.read(point_x, 4); + trail_data.points_x.push_back(*reinterpret_cast(point_x)); + char point_y[4]; + trail_data_file.read(point_y, 4); + trail_data.points_y.push_back(*reinterpret_cast(point_y)); + char point_z[4]; + trail_data_file.read(point_z, 4); + trail_data.points_z.push_back(*reinterpret_cast(point_z)); + } - trail_data_file.close(); + if (trail_data.points_x.size() != trail_data.points_y.size() || trail_data.points_x.size() != trail_data.points_z.size()) { + errors->push_back(new XMLAttributeValueError("Unexpected number of bits in trail file. Does not have equal number of X, Y, and Z coordinates." + trail_path, input)); } - else - errors->push_back(new XMLAttributeValueError("No trail file found at " + trail_path, input)); + + trail_data_file.close(); + return trail_data; } @@ -76,7 +87,6 @@ string stringify_trail_data(TrailData attribute_value) { //////////////////////////////////////////////////////////////////////////////// waypoint::TrailData* to_proto_trail_data(TrailData attribute_value) { waypoint::TrailData* trail_data = new waypoint::TrailData(); - trail_data->set_trail_data_relative_path(attribute_value.trail_data_relative_path); *trail_data->mutable_points_x() = {attribute_value.points_x.begin(), attribute_value.points_x.end()}; *trail_data->mutable_points_y() = {attribute_value.points_y.begin(), attribute_value.points_y.end()}; *trail_data->mutable_points_z() = {attribute_value.points_z.begin(), attribute_value.points_z.end()}; @@ -90,7 +100,6 @@ waypoint::TrailData* to_proto_trail_data(TrailData attribute_value) { //////////////////////////////////////////////////////////////////////////////// TrailData from_proto_trail_data(waypoint::TrailData attribute_value) { TrailData trail_data; - trail_data.trail_data_relative_path = attribute_value.trail_data_relative_path(); trail_data.points_x = {attribute_value.points_x().begin(), attribute_value.points_x().end()}; trail_data.points_y = {attribute_value.points_y().begin(), attribute_value.points_y().end()}; trail_data.points_z = {attribute_value.points_z().begin(), attribute_value.points_z().end()}; diff --git a/xml_converter/src/file_helper.cpp b/xml_converter/src/file_helper.cpp index 650d9e37..b4020042 100644 --- a/xml_converter/src/file_helper.cpp +++ b/xml_converter/src/file_helper.cpp @@ -5,6 +5,8 @@ using namespace std; +// This function is a workaround that simulates the copy +// function in filesystem in C++17. Can be changed in future. void copy_file(string path, string new_path) { ifstream infile(path, ios::binary); ofstream outfile(new_path, ios::binary); diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 763a583b..41c19b8f 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -213,7 +213,7 @@ Category* get_category(rapidxml::xml_node<>* node, map* marker // // Parse the xml block into an in-memory array of Markers. //////////////////////////////////////////////////////////////////////////////// -vector parse_pois(string base_dir, rapidxml::xml_node<>* root_node, map* marker_categories, vector* errors) { +vector parse_pois(rapidxml::xml_node<>* root_node, map* marker_categories, vector* errors, string base_dir) { vector markers; for (rapidxml::xml_node<>* node = root_node->first_node(); node; node = node->next_sibling()) { @@ -229,7 +229,7 @@ vector parse_pois(string base_dir, rapidxml::xml_node<>* root_node, icon->init_from_xml(node, errors); markers.push_back(icon); } - else if (normalize(get_node_name(node)) == "trail") { + else if (get_node_name(node) == "Trail") { Category* default_category = get_category(node, marker_categories, errors); Trail* trail = new Trail(); @@ -316,7 +316,7 @@ void parse_xml_file(string xml_filepath, map* marker_categorie parse_marker_categories(node, marker_categories, &errors); } else if (get_node_name(node) == "POIs") { - vector temp_vector = parse_pois(base_dir, node, marker_categories, &errors); + vector temp_vector = parse_pois(node, marker_categories, &errors, base_dir); move(temp_vector.begin(), temp_vector.end(), back_inserter(*parsed_pois)); } else { @@ -394,8 +394,6 @@ void move_supplementary_files(string input_directory, string output_directory) { // TODO: Only include files that are referenced by the // individual markers in order to avoid any unnessecary files string new_path = output_directory + "/" + filename; - // This function is a workaround that simulates the copy - // function in filesystem in C++17. Can be changed in future copy_file(path, new_path); } } @@ -456,14 +454,14 @@ string create_burrito_data_folder() { const char* home_dir = getenv("HOME"); if (home_dir == nullptr) { std::cerr << "Error: HOME environment variable is not set." << std::endl; - return ""; + exit(0); } // For Linux, the deafult for "user://"" in Godot is // ~/.local/share/godot/app_userdata/[project_name] - // Output_directory can be thought of as "user://Burrito/protobins" - string data_directory = "/.local/share/godot/app_userdata/Burrito/protobins"; + // Variable folder_path can be thought of as "user://Burrito/protobins" + string data_directory = ".local/share/godot/app_userdata/Burrito/protobins"; // Construct the folder path - string folder_path = string(home_dir) + data_directory; + string folder_path = string(home_dir) + "/" + data_directory; // Create the folder with permissions 0700 (read/write/execute for owner only) int result = mkdir(folder_path.c_str(), S_IRWXU); if (result != 0 && errno != EEXIST) { From da304bf2224027b1ec4673068976dea4290bfce3 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Thu, 4 May 2023 23:00:55 -0400 Subject: [PATCH 184/539] Renamed variables and added try/throw/catch error messages --- xml_converter/generators/code_generator.py | 4 ++-- xml_converter/src/attribute/trail_data.cpp | 10 ++++----- xml_converter/src/attribute/trail_data.hpp | 1 - xml_converter/src/xml_converter.cpp | 24 +++++++++++++--------- 4 files changed, 21 insertions(+), 18 deletions(-) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 5881b095..bfa6f904 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -296,7 +296,7 @@ class AttributeVariable: uses_file_path: bool = False -DEFAULT_ARGUMENTS: Final[List[str]] = ["attribute", "errors"] +XML_ATTRIBUTE_PARSER_DEFAULT_ARGUMENTS: Final[List[str]] = ["attribute", "errors"] ################################################################################ @@ -467,7 +467,7 @@ def generate_cpp_variable_data( default_xml_fields = [] side_effects = [] xml_export = "" - args = DEFAULT_ARGUMENTS.copy() + args = XML_ATTRIBUTE_PARSER_DEFAULT_ARGUMENTS.copy() if fieldval['type'] in documentation_type_data: cpp_type = documentation_type_data[fieldval['type']]["cpp_type"] diff --git a/xml_converter/src/attribute/trail_data.cpp b/xml_converter/src/attribute/trail_data.cpp index f63d6112..5414cbfd 100644 --- a/xml_converter/src/attribute/trail_data.cpp +++ b/xml_converter/src/attribute/trail_data.cpp @@ -20,17 +20,17 @@ using namespace std; //////////////////////////////////////////////////////////////////////////////// TrailData parse_trail_data(rapidxml::xml_attribute<>* input, vector* errors, string base_dir) { TrailData trail_data; - trail_data.trail_data_relative_path = get_attribute_value(input); + string trail_data_relative_path = get_attribute_value(input); if (base_dir == "") { - errors->push_back(new XMLAttributeValueError("Marker pack file name is empty", input)); + throw "Error: Marker pack base directory is an empty string"; } - if (trail_data.trail_data_relative_path == "") { + if (trail_data_relative_path == "") { errors->push_back(new XMLAttributeValueError("Path to trail file is empty", input)); return trail_data; } ifstream trail_data_file; - string trail_path = base_dir + "/" + trail_data.trail_data_relative_path; + string trail_path = base_dir + "/" + trail_data_relative_path; trail_data_file.open(trail_path, ios::in | ios::binary); if (!trail_data_file.good()) { errors->push_back(new XMLAttributeValueError("No trail file found at " + trail_path, input)); @@ -77,7 +77,7 @@ TrailData parse_trail_data(rapidxml::xml_attribute<>* input, vector* // TODO: Write ".trl" files from data //////////////////////////////////////////////////////////////////////////////// string stringify_trail_data(TrailData attribute_value) { - return attribute_value.trail_data_relative_path; + return "temp_name_of_trail.trl"; } //////////////////////////////////////////////////////////////////////////////// diff --git a/xml_converter/src/attribute/trail_data.hpp b/xml_converter/src/attribute/trail_data.hpp index d1a80489..211d5739 100644 --- a/xml_converter/src/attribute/trail_data.hpp +++ b/xml_converter/src/attribute/trail_data.hpp @@ -12,7 +12,6 @@ class TrailData; class TrailData { public: - std::string trail_data_relative_path; int side_effect_map_id; std::vector points_x; std::vector points_y; diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 41c19b8f..1617b099 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -302,7 +302,6 @@ void parse_xml_file(string xml_filepath, map* marker_categorie root_node = doc.first_node(); string base_dir = get_base_dir(xml_filepath); - // Validate the Root Node if (get_node_name(root_node) != "OverlayData") { errors.push_back(new XMLNodeNameError("Root node should be of type OverlayData", root_node)); @@ -453,14 +452,14 @@ string create_burrito_data_folder() { // Get the home directory path const char* home_dir = getenv("HOME"); if (home_dir == nullptr) { - std::cerr << "Error: HOME environment variable is not set." << std::endl; - exit(0); + throw "Error: HOME environment variable is not set."; } + + string data_directory = ".local/share/godot/app_userdata/Burrito/protobins"; + // Construct the folder path // For Linux, the deafult for "user://"" in Godot is // ~/.local/share/godot/app_userdata/[project_name] // Variable folder_path can be thought of as "user://Burrito/protobins" - string data_directory = ".local/share/godot/app_userdata/Burrito/protobins"; - // Construct the folder path string folder_path = string(home_dir) + "/" + data_directory; // Create the folder with permissions 0700 (read/write/execute for owner only) int result = mkdir(folder_path.c_str(), S_IRWXU); @@ -476,12 +475,17 @@ int main() { vector parsed_pois; map marker_categories; test_proto(); + string output_directory; - string output_directory = create_burrito_data_folder(); - // Input will be supplied via FileDialog in Godot - string input_directory = "./packs"; - convert_all_markerpacks(input_directory, output_directory, &marker_categories, &parsed_pois); - + try { + output_directory = create_burrito_data_folder(); + // Input will be supplied via FileDialog in Godot + string input_directory = "./packs"; + convert_all_markerpacks(input_directory, output_directory, &marker_categories, &parsed_pois); + } + catch (const char* msg) { + cout << msg << endl; + } auto end = chrono::high_resolution_clock::now(); auto dur = end - begin; auto ms = std::chrono::duration_cast(dur).count(); From 347f7b9d8cfb83ef1d27097eee5556f5608f986b Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Mon, 27 Feb 2023 01:59:40 -0600 Subject: [PATCH 185/539] Adding plugin to unindent jinja blocks Plugin is very rudementary right now and will not work for all situations, however it works for all existing situations --- xml_converter/generators/code_generator.py | 17 +- .../cpp_templates/attribute_template.hpp | 44 +-- .../cpp_templates/class_template.cpp | 342 +++++++++--------- .../cpp_templates/class_template.hpp | 29 +- .../cpp_templates/compoundvalue.cpp | 38 +- .../generators/cpp_templates/enum.cpp | 60 +-- .../cpp_templates/multiflagvalue.cpp | 42 +-- xml_converter/generators/jinja_helpers.py | 213 +++++++++++ 8 files changed, 506 insertions(+), 279 deletions(-) create mode 100644 xml_converter/generators/jinja_helpers.py diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index bfa6f904..f7c041e3 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -7,6 +7,7 @@ import markdown from dataclasses import dataclass, field from jinja2 import Template, FileSystemLoader, Environment +from jinja_helpers import UnindentBlocks SchemaType = Dict[str, Any] schema = """ @@ -374,7 +375,13 @@ def load_input_doc(self, dir_path: str) -> None: def write_cpp_classes(self, output_directory: str) -> None: print("Writing XML Node Cpp Classes") file_loader = FileSystemLoader('cpp_templates') - env = Environment(loader=file_loader, keep_trailing_newline=True, trim_blocks=True, lstrip_blocks=True) + env = Environment( + loader=file_loader, + extensions=["jinja_helpers.UnindentBlocks"], + keep_trailing_newline=True, + trim_blocks=True, + lstrip_blocks=True + ) header_template: Template = env.get_template("class_template.hpp") code_template: Template = env.get_template("class_template.cpp") attributes_of_type_marker_category: List[str] = [] @@ -562,7 +569,13 @@ def write_attribute(self, output_directory: str) -> None: os.makedirs(output_directory, exist_ok=True) file_loader = FileSystemLoader('cpp_templates') - env = Environment(loader=file_loader, keep_trailing_newline=True, trim_blocks=True, lstrip_blocks=True) + env = Environment( + loader=file_loader, + extensions=["jinja_helpers.UnindentBlocks"], + keep_trailing_newline=True, + trim_blocks=True, + lstrip_blocks=True + ) attribute_names: Dict[str, str] = {} attribute_variables: List[AttributeVariable] = [] attribute_variable: AttributeVariable diff --git a/xml_converter/generators/cpp_templates/attribute_template.hpp b/xml_converter/generators/cpp_templates/attribute_template.hpp index eae924a5..f6bf31cd 100644 --- a/xml_converter/generators/cpp_templates/attribute_template.hpp +++ b/xml_converter/generators/cpp_templates/attribute_template.hpp @@ -5,37 +5,37 @@ #include "../rapidxml-1.13/rapidxml.hpp" {% if type == "Enum":%} -#include "waypoint.pb.h" + #include "waypoint.pb.h" -class XMLError; + class XMLError; -enum {{class_name}} { - {% for attribute_variable in attribute_variables: %} - {{attribute_variable.attribute_name}}, - {% endfor %} -}; + enum {{class_name}} { + {% for attribute_variable in attribute_variables: %} + {{attribute_variable.attribute_name}}, + {% endfor %} + }; {% else: %} -class XMLError; -namespace waypoint { -class {{class_name}}; -} + class XMLError; + namespace waypoint { + class {{class_name}}; + } -class {{class_name}} { - public: - {% for attribute_variable in attribute_variables: %} - {{attribute_variable.cpp_type}} {{attribute_variable.attribute_name}}; - {% endfor %} + class {{class_name}} { + public: + {% for attribute_variable in attribute_variables: %} + {{attribute_variable.cpp_type}} {{attribute_variable.attribute_name}}; + {% endfor %} - virtual std::string classname() { - return "{{class_name}}"; - } -}; + virtual std::string classname() { + return "{{class_name}}"; + } + }; {% endif %} {{class_name}} parse_{{attribute_name}}(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_{{attribute_name}}({{class_name}} attribute_value); {% if type == "Enum":%} -waypoint::{{class_name}} to_proto_{{attribute_name}}({{class_name}} attribute_value); + waypoint::{{class_name}} to_proto_{{attribute_name}}({{class_name}} attribute_value); {% else: %} -waypoint::{{class_name}}* to_proto_{{attribute_name}}({{class_name}} attribute_value); + waypoint::{{class_name}}* to_proto_{{attribute_name}}({{class_name}} attribute_value); {% endif %} {{class_name}} from_proto_{{attribute_name}}(waypoint::{{class_name}} proto_{{attribute_name}}); diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index 98090b6c..b9fa7839 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -2,15 +2,15 @@ #include {% for absolute_include in cpp_includes.sorted_cpp_absolute_includes() %} -#include <{{absolute_include}}> + #include <{{absolute_include}}> {% endfor %} {% for relative_include in cpp_includes.sorted_cpp_relative_includes() %} -#include "{{relative_include}}" + #include "{{relative_include}}" {% endfor %} {% for forward_declaration in cpp_includes.sorted_cpp_forward_declarations() %} -class {{forward_declaration}}; + class {{forward_declaration}}; {% endfor %} using namespace std; @@ -18,48 +18,48 @@ string {{cpp_class}}::classname() { return "{{xml_class_name}}"; } {% if cpp_class == "Category": %} -void {{cpp_class}}::init_from_xml(rapidxml::xml_node<>* node, vector* errors, string base_dir) { - for (rapidxml::xml_attribute<>* attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()) { - bool is_icon_value = this->default_icon.init_xml_attribute(attribute, errors); - bool is_trail_value = this->default_trail.init_xml_attribute(attribute, errors); + void {{cpp_class}}::init_from_xml(rapidxml::xml_node<>* node, vector* errors, string base_dir) { + for (rapidxml::xml_attribute<>* attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()) { + bool is_icon_value = this->default_icon.init_xml_attribute(attribute, errors); + bool is_trail_value = this->default_trail.init_xml_attribute(attribute, errors); - if (init_xml_attribute(attribute, errors, base_dir)) { - } - else if (is_icon_value || is_trail_value) { - } - else { - errors->push_back(new XMLAttributeNameError("Unknown " + this->classname() + " attribute ", attribute)); + if (init_xml_attribute(attribute, errors, base_dir)) { + } + else if (is_icon_value || is_trail_value) { + } + else { + errors->push_back(new XMLAttributeNameError("Unknown " + this->classname() + " attribute ", attribute)); + } } } -} {% endif %} bool {{cpp_class}}::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector* errors, string base_dir) { string attributename; attributename = normalize(get_attribute_name(attribute)); {% for n, attribute_variable in enumerate(attribute_variables) %} - {% for i, value in enumerate(attribute_variable.xml_fields) %} - {% if i == 0 and n == 0: %} - if (attributename == "{{value}}") { - this->{{attribute_variable.attribute_name}} = parse_{{attribute_variable.class_name}}({{", ".join(attribute_variable.args)}}); - this->{{attribute_variable.attribute_name}}_is_set = true; - } - {% elif (attribute_variable.attribute_type == "CompoundValue" and attribute_variable.compound_name != None) %} - else if (attributename == "{{value}}") { - this->{{attribute_variable.compound_name}}.{{attribute_variable.attribute_name}} = parse_float(attribute, errors); - this->{{attribute_variable.compound_name}}_is_set = true; - } - {% else: %} - else if (attributename == "{{value}}") { - this->{{attribute_variable.attribute_name}} = parse_{{attribute_variable.class_name}}({{", ".join(attribute_variable.args)}}); - this->{{attribute_variable.attribute_name}}_is_set = true; - {% for side_effect in attribute_variable.side_effects %} - this->{{side_effect}} = this->{{attribute_variable.class_name}}.side_effect_{{side_effect}}; - this->{{side_effect}}_is_set = true; + {% for i, value in enumerate(attribute_variable.xml_fields) %} + {% if i == 0 and n == 0: %} + if (attributename == "{{value}}") { + this->{{attribute_variable.attribute_name}} = parse_{{attribute_variable.class_name}}({{", ".join(attribute_variable.args)}}); + this->{{attribute_variable.attribute_name}}_is_set = true; + } + {% elif (attribute_variable.attribute_type == "CompoundValue" and attribute_variable.compound_name != None) %} + else if (attributename == "{{value}}") { + this->{{attribute_variable.compound_name}}.{{attribute_variable.attribute_name}} = parse_float(attribute, errors); + this->{{attribute_variable.compound_name}}_is_set = true; + } + {% else: %} + else if (attributename == "{{value}}") { + this->{{attribute_variable.attribute_name}} = parse_{{attribute_variable.class_name}}({{", ".join(attribute_variable.args)}}); + this->{{attribute_variable.attribute_name}}_is_set = true; + {% for side_effect in attribute_variable.side_effects %} + this->{{side_effect}} = this->{{attribute_variable.class_name}}.side_effect_{{side_effect}}; + this->{{side_effect}}_is_set = true; + {% endfor %} + } + {% endif %} {% endfor %} - } - {% endif %} - {% endfor %} {% endfor %} else { return false; @@ -69,169 +69,169 @@ bool {{cpp_class}}::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vec {%- if attributes_of_type_marker_category %} -bool {{cpp_class}}::validate_attributes_of_type_marker_category() { - {% for attribute in attributes_of_type_marker_category %} - // TODO: validate "{{attribute}}" - {% endfor %} - return true; -} + bool {{cpp_class}}::validate_attributes_of_type_marker_category() { + {% for attribute in attributes_of_type_marker_category %} + // TODO: validate "{{attribute}}" + {% endfor %} + return true; + } {% endif %} vector {{cpp_class}}::as_xml() const { vector xml_node_contents; xml_node_contents.push_back("<{{xml_class_name}} "); {% for attribute_variable in attribute_variables %} - {% if (attribute_variable.attribute_type == "CompoundValue") %} - {% if (attribute_variable.xml_export == "Children" and attribute_variable.compound_name != None) %} - if (this->{{attribute_variable.compound_name}}_is_set) { - xml_node_contents.push_back(" {{attribute_variable.default_xml_fields[0]}}=\"" + to_string(this->{{attribute_variable.compound_name}}.{{attribute_variable.attribute_name}}) + "\""); - } - {% elif (attribute_variable.xml_export == "Parent" and attribute_variable.compound_name == None)%} - if (this->{{attribute_variable.attribute_name}}_is_set) { - xml_node_contents.push_back(" {{attribute_variable.default_xml_fields[0]}}=\"" + stringify_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}}) + "\""); - } - {% elif (attribute_variable.xml_export == "Parent and Children")%} - {% for value in attribute_variable.xml_fields %} - if (this->{{attribute_variable.attribute_name}}_is_set) { - xml_node_contents.push_back(" {{value}}=\"" + stringify_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}}) + "\""); + {% if (attribute_variable.attribute_type == "CompoundValue") %} + {% if (attribute_variable.xml_export == "Children" and attribute_variable.compound_name != None) %} + if (this->{{attribute_variable.compound_name}}_is_set) { + xml_node_contents.push_back(" {{attribute_variable.default_xml_fields[0]}}=\"" + to_string(this->{{attribute_variable.compound_name}}.{{attribute_variable.attribute_name}}) + "\""); + } + {% elif (attribute_variable.xml_export == "Parent" and attribute_variable.compound_name == None)%} + if (this->{{attribute_variable.attribute_name}}_is_set) { + xml_node_contents.push_back(" {{attribute_variable.default_xml_fields[0]}}=\"" + stringify_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}}) + "\""); + } + {% elif (attribute_variable.xml_export == "Parent and Children")%} + {% for value in attribute_variable.xml_fields %} + if (this->{{attribute_variable.attribute_name}}_is_set) { + xml_node_contents.push_back(" {{value}}=\"" + stringify_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}}) + "\""); + {% endfor %} + } + {% endif %} + {% else: %} + if (this->{{attribute_variable.attribute_name}}_is_set) { + xml_node_contents.push_back(" {{attribute_variable.default_xml_fields[0]}}=\"" + stringify_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}}) + "\""); + } + {% endif %} {% endfor %} - } - {% endif %} - {% else: %} - if (this->{{attribute_variable.attribute_name}}_is_set) { - xml_node_contents.push_back(" {{attribute_variable.default_xml_fields[0]}}=\"" + stringify_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}}) + "\""); - } - {% endif %} - {% endfor %} -{% if cpp_class == "Category": %} - xml_node_contents.push_back(">\n"); + {% if cpp_class == "Category": %} + xml_node_contents.push_back(">\n"); - for (const auto& [key, val] : this->children) { - string text; - for (const auto& s : val.as_xml()) { - text += s; - } + for (const auto& [key, val] : this->children) { + string text; + for (const auto& s : val.as_xml()) { + text += s; + } - xml_node_contents.push_back("\t" + text); - } + xml_node_contents.push_back("\t" + text); + } - xml_node_contents.push_back("\n"); -{% else: %} - xml_node_contents.push_back("/>"); -{% endif %} + xml_node_contents.push_back("\n"); + {% else: %} + xml_node_contents.push_back("/>"); + {% endif %} return xml_node_contents; } waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf() const { waypoint::{{cpp_class}} proto_{{cpp_class_header}}; {% if cpp_class == "Icon": %} - waypoint::Trigger* trigger = nullptr; - {% endif %} - {%for attribute_variable in attribute_variables%} - {% if (attribute_variable.is_trigger == true)%} - {% if (attribute_variable.attribute_type == "Custom")%} - if (this->{{attribute_variable.attribute_name}}_is_set) { - if (trigger == nullptr) { - trigger = new waypoint::Trigger(); - } - trigger->set_allocated_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); - } - {% elif (attribute_variable.attribute_type == "Enum")%} - if (this->{{attribute_variable.attribute_name}}_is_set) { - if (trigger == nullptr) { - trigger = new waypoint::Trigger(); - } - trigger->set_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); - } - {% else: %} - if (this->{{attribute_variable.attribute_name}}_is_set) { - if (trigger == nullptr) { - trigger = new waypoint::Trigger(); - } - trigger->set_{{attribute_variable.protobuf_field}}(this->{{attribute_variable.attribute_name}}); - } - {% endif %} - {% else: %} - {% if (attribute_variable.attribute_type == "Enum")%} - if (this->{{attribute_variable.attribute_name}}_is_set) { - proto_{{cpp_class_header}}.set_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); - } - {% elif (attribute_variable.attribute_type in ["MultiflagValue", "CompoundValue", "Custom"]) and attribute_variable.compound_name == None%} - if (this->{{attribute_variable.attribute_name}}_is_set) { - proto_{{cpp_class_header}}.set_allocated_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); - } - {% elif (attribute_variable.compound_name != None)%} - {% else: %} - if (this->{{attribute_variable.attribute_name}}_is_set) { - proto_{{cpp_class_header}}.set_{{attribute_variable.protobuf_field}}(this->{{attribute_variable.attribute_name}}); - } - {% endif %} + waypoint::Trigger* trigger = nullptr; {% endif %} + {% for attribute_variable in attribute_variables %} + {% if (attribute_variable.is_trigger == true)%} + {% if (attribute_variable.attribute_type == "Custom")%} + if (this->{{attribute_variable.attribute_name}}_is_set) { + if (trigger == nullptr) { + trigger = new waypoint::Trigger(); + } + trigger->set_allocated_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); + } + {% elif (attribute_variable.attribute_type == "Enum")%} + if (this->{{attribute_variable.attribute_name}}_is_set) { + if (trigger == nullptr) { + trigger = new waypoint::Trigger(); + } + trigger->set_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); + } + {% else: %} + if (this->{{attribute_variable.attribute_name}}_is_set) { + if (trigger == nullptr) { + trigger = new waypoint::Trigger(); + } + trigger->set_{{attribute_variable.protobuf_field}}(this->{{attribute_variable.attribute_name}}); + } + {% endif %} + {% else: %} + {% if (attribute_variable.attribute_type == "Enum")%} + if (this->{{attribute_variable.attribute_name}}_is_set) { + proto_{{cpp_class_header}}.set_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); + } + {% elif (attribute_variable.attribute_type in ["MultiflagValue", "CompoundValue", "Custom"]) and attribute_variable.compound_name == None%} + if (this->{{attribute_variable.attribute_name}}_is_set) { + proto_{{cpp_class_header}}.set_allocated_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); + } + {% elif (attribute_variable.compound_name != None)%} + {% else: %} + if (this->{{attribute_variable.attribute_name}}_is_set) { + proto_{{cpp_class_header}}.set_{{attribute_variable.protobuf_field}}(this->{{attribute_variable.attribute_name}}); + } + {% endif %} + {% endif %} {% endfor %} {% if cpp_class == "Icon": %} - if (trigger != nullptr) { - proto_{{cpp_class_header}}.set_allocated_trigger(trigger); - } + if (trigger != nullptr) { + proto_{{cpp_class_header}}.set_allocated_trigger(trigger); + } {% endif %} {% if cpp_class == "Category": %} - for (const auto& [key, val] : this->children) { - waypoint::{{cpp_class}} proto_{{cpp_class_header}}_child = val.as_protobuf(); - proto_{{cpp_class_header}}.add_children()->CopyFrom(proto_{{cpp_class_header}}_child); - } + for (const auto& [key, val] : this->children) { + waypoint::{{cpp_class}} proto_{{cpp_class_header}}_child = val.as_protobuf(); + proto_{{cpp_class_header}}.add_children()->CopyFrom(proto_{{cpp_class_header}}_child); + } {% endif %} return proto_{{cpp_class_header}}; } void {{cpp_class}}::parse_protobuf(waypoint::{{cpp_class}} proto_{{cpp_class_header}}) { {% if cpp_class == "Icon": %} - waypoint::Trigger trigger = proto_{{cpp_class_header}}.trigger(); - {% endif %} - {%for attribute_variable in attribute_variables%} - {% if (attribute_variable.is_trigger == true)%} - {% if (attribute_variable.attribute_type == "Custom")%} - if (trigger.has_{{attribute_variable.protobuf_field}}()) { - this->{{attribute_variable.attribute_name}} = from_proto_{{attribute_variable.class_name}}(trigger.{{attribute_variable.protobuf_field}}()); - this->{{attribute_variable.attribute_name}}_is_set = true; - } - {% elif attribute_variable.class_name == "string" %} - if (trigger.{{attribute_variable.protobuf_field}}() != "") { - this->{{attribute_variable.attribute_name}} = trigger.{{attribute_variable.protobuf_field}}(); - this->{{attribute_variable.attribute_name}}_is_set = true; - } - {% elif (attribute_variable.attribute_type == "Enum") %} - if (trigger.{{attribute_variable.protobuf_field}}() != 0) { - this->{{attribute_variable.attribute_name}} = from_proto_{{attribute_variable.class_name}}(trigger.{{attribute_variable.protobuf_field}}()); - this->{{attribute_variable.attribute_name}}_is_set = true; - } - {% else: %} - if (trigger.{{attribute_variable.protobuf_field}}() != 0) { - this->{{attribute_variable.attribute_name}} = trigger.{{attribute_variable.protobuf_field}}(); - this->{{attribute_variable.attribute_name}}_is_set = true; - } - {% endif %} - {% else: %} - {% if (attribute_variable.attribute_type == "Enum") %} - if (proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}() != 0) { - this->{{attribute_variable.attribute_name}} = from_proto_{{attribute_variable.class_name}}(proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}()); - this->{{attribute_variable.attribute_name}}_is_set = true; - } - {% elif (attribute_variable.attribute_type in ["MultiflagValue", "CompoundValue", "Custom"]) and attribute_variable.compound_name == None%} - if (proto_{{cpp_class_header}}.has_{{attribute_variable.protobuf_field}}()) { - this->{{attribute_variable.attribute_name}} = from_proto_{{attribute_variable.class_name}}(proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}()); - this->{{attribute_variable.attribute_name}}_is_set = true; - } - {% elif (attribute_variable.compound_name != None) %} - {% elif (attribute_variable.class_name == "string") %} - if (proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}() != "") { - this->{{attribute_variable.attribute_name}} = proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}(); - this->{{attribute_variable.attribute_name}}_is_set = true; - } - {% else: %} - if (proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}() != 0) { - this->{{attribute_variable.attribute_name}} = proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}(); - this->{{attribute_variable.attribute_name}}_is_set = true; - } - {% endif %} + waypoint::Trigger trigger = proto_{{cpp_class_header}}.trigger(); {% endif %} + {% for attribute_variable in attribute_variables %} + {% if (attribute_variable.is_trigger == true) %} + {% if (attribute_variable.attribute_type == "Custom") %} + if (trigger.has_{{attribute_variable.protobuf_field}}()) { + this->{{attribute_variable.attribute_name}} = from_proto_{{attribute_variable.class_name}}(trigger.{{attribute_variable.protobuf_field}}()); + this->{{attribute_variable.attribute_name}}_is_set = true; + } + {% elif attribute_variable.class_name == "string" %} + if (trigger.{{attribute_variable.protobuf_field}}() != "") { + this->{{attribute_variable.attribute_name}} = trigger.{{attribute_variable.protobuf_field}}(); + this->{{attribute_variable.attribute_name}}_is_set = true; + } + {% elif (attribute_variable.attribute_type == "Enum") %} + if (trigger.{{attribute_variable.protobuf_field}}() != 0) { + this->{{attribute_variable.attribute_name}} = from_proto_{{attribute_variable.class_name}}(trigger.{{attribute_variable.protobuf_field}}()); + this->{{attribute_variable.attribute_name}}_is_set = true; + } + {% else: %} + if (trigger.{{attribute_variable.protobuf_field}}() != 0) { + this->{{attribute_variable.attribute_name}} = trigger.{{attribute_variable.protobuf_field}}(); + this->{{attribute_variable.attribute_name}}_is_set = true; + } + {% endif %} + {% else: %} + {% if (attribute_variable.attribute_type == "Enum") %} + if (proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}() != 0) { + this->{{attribute_variable.attribute_name}} = from_proto_{{attribute_variable.class_name}}(proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}()); + this->{{attribute_variable.attribute_name}}_is_set = true; + } + {% elif (attribute_variable.attribute_type in ["MultiflagValue", "CompoundValue", "Custom"]) and attribute_variable.compound_name == None%} + if (proto_{{cpp_class_header}}.has_{{attribute_variable.protobuf_field}}()) { + this->{{attribute_variable.attribute_name}} = from_proto_{{attribute_variable.class_name}}(proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}()); + this->{{attribute_variable.attribute_name}}_is_set = true; + } + {% elif (attribute_variable.compound_name != None) %} + {% elif (attribute_variable.class_name == "string") %} + if (proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}() != "") { + this->{{attribute_variable.attribute_name}} = proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}(); + this->{{attribute_variable.attribute_name}}_is_set = true; + } + {% else: %} + if (proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}() != 0) { + this->{{attribute_variable.attribute_name}} = proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}(); + this->{{attribute_variable.attribute_name}}_is_set = true; + } + {% endif %} + {% endif %} {% endfor %} } diff --git a/xml_converter/generators/cpp_templates/class_template.hpp b/xml_converter/generators/cpp_templates/class_template.hpp index 587ee7f2..e92df2b0 100644 --- a/xml_converter/generators/cpp_templates/class_template.hpp +++ b/xml_converter/generators/cpp_templates/class_template.hpp @@ -1,35 +1,36 @@ #pragma once {% for absolute_include in cpp_includes.sorted_hpp_absolute_includes() %} -#include <{{absolute_include}}> + #include <{{absolute_include}}> {% endfor %} {% for relative_include in cpp_includes.sorted_hpp_relative_includes() %} -#include "{{relative_include}}" + #include "{{relative_include}}" {% endfor %} {% for forward_declaration in cpp_includes.sorted_hpp_forward_declarations() %} -class {{forward_declaration}}; + class {{forward_declaration}}; {% endfor %} class {{cpp_class}} : public Parseable { public: {% for attribute_variable in attribute_variables: %} - {% if attribute_variable.compound_name == None: %} - {{attribute_variable.cpp_type}} {{attribute_variable.attribute_name}}; - {% endif %} + {% if attribute_variable.compound_name == None: %} + {{attribute_variable.cpp_type}} {{attribute_variable.attribute_name}}; + {% endif %} {% endfor %} {% for attribute_variable in attribute_variables: %} - {% if attribute_variable.compound_name == None: %} - bool {{attribute_variable.attribute_name}}_is_set = false; - {% endif %} + {% if attribute_variable.compound_name == None: %} + bool {{attribute_variable.attribute_name}}_is_set = false; + {% endif %} {% endfor %} {% if cpp_class == "Category": %} - std::map children; - Icon default_icon; - Trail default_trail; + std::map children; + Icon default_icon; + Trail default_trail; - void init_from_xml(rapidxml::xml_node<>* node, std::vector* errors, std::string base_dir = ""); + void init_from_xml(rapidxml::xml_node<>* node, std::vector* errors, std::string base_dir = ""); + void init_from_xml(rapidxml::xml_node<>* node, std::vector* errors); {% endif %} virtual std::vector as_xml() const; virtual std::string classname(); @@ -37,6 +38,6 @@ class {{cpp_class}} : public Parseable { waypoint::{{cpp_class}} as_protobuf() const; void parse_protobuf(waypoint::{{cpp_class}} proto_{{cpp_class_header}}); {% if attributes_of_type_marker_category %} - bool validate_attributes_of_type_marker_category(); + bool validate_attributes_of_type_marker_category(); {% endif %} }; diff --git a/xml_converter/generators/cpp_templates/compoundvalue.cpp b/xml_converter/generators/cpp_templates/compoundvalue.cpp index caeecd6f..eb5ab4c6 100644 --- a/xml_converter/generators/cpp_templates/compoundvalue.cpp +++ b/xml_converter/generators/cpp_templates/compoundvalue.cpp @@ -15,36 +15,36 @@ using namespace std; {{class_name}} {{attribute_name}}; vector compound_values; string attributename; -{% for attribute_variable in attribute_variables: %} - {{attribute_name}}.{{attribute_variable.attribute_name}} = 0; -{% endfor %} + {% for attribute_variable in attribute_variables: %} + {{attribute_name}}.{{attribute_variable.attribute_name}} = 0; + {% endfor %} attributename = get_attribute_name(input); compound_values = split(get_attribute_value(input), ","); if (compound_values.size() == {{ attribute_variables|length }}) { -{% for n, attribute_variable in enumerate(attribute_variables) %} - {{attribute_name}}.{{attribute_variables[n].attribute_name}} = std::stof(compound_values[{{n}}]); -{% endfor %} + {% for n, attribute_variable in enumerate(attribute_variables) %} + {{attribute_name}}.{{attribute_variables[n].attribute_name}} = std::stof(compound_values[{{n}}]); + {% endfor %} } return {{attribute_name}}; } {% if attribute_variables[0].xml_export == "Parent" %} -string stringify_{{attribute_name}}({{class_name}} attribute_value) { - string output; - {% for n, attribute_variable in enumerate(attribute_variables) %} - {% if n == 0: %} - output = to_string(attribute_value.{{attribute_variables[n].attribute_name}}); - {% else %} - output = output + "," + to_string(attribute_value.{{attribute_variables[n].attribute_name}}); - {% endif %} - {% endfor %} - return output; -} + string stringify_{{attribute_name}}({{class_name}} attribute_value) { + string output; + {% for n, attribute_variable in enumerate(attribute_variables) %} + {% if n == 0: %} + output = to_string(attribute_value.{{attribute_variables[n].attribute_name}}); + {% else %} + output = output + "," + to_string(attribute_value.{{attribute_variables[n].attribute_name}}); + {% endif %} + {% endfor %} + return output; + } {% endif %} waypoint::{{class_name}}* to_proto_{{attribute_name}}({{class_name}} attribute_value) { waypoint::{{class_name}}* proto_{{attribute_name}} = new waypoint::{{class_name}}(); {% for attribute_variable in attribute_variables %} - proto_{{attribute_name}}->set_{{attribute_variable.protobuf_field}}(attribute_value.{{attribute_variable.attribute_name}}); + proto_{{attribute_name}}->set_{{attribute_variable.protobuf_field}}(attribute_value.{{attribute_variable.attribute_name}}); {% endfor %} return proto_{{attribute_name}}; } @@ -52,7 +52,7 @@ waypoint::{{class_name}}* to_proto_{{attribute_name}}({{class_name}} attribute_v {{class_name}} from_proto_{{attribute_name}}(waypoint::{{class_name}} proto_{{attribute_name}}) { {{class_name}} {{attribute_name}}; {% for attribute_variable in attribute_variables: %} - {{attribute_name}}.{{attribute_variable.attribute_name}} = proto_{{attribute_name}}.{{attribute_variable.protobuf_field}}(); + {{attribute_name}}.{{attribute_variable.attribute_name}} = proto_{{attribute_name}}.{{attribute_variable.protobuf_field}}(); {% endfor %} return {{attribute_name}}; } diff --git a/xml_converter/generators/cpp_templates/enum.cpp b/xml_converter/generators/cpp_templates/enum.cpp index ce599a7d..b97dc242 100644 --- a/xml_converter/generators/cpp_templates/enum.cpp +++ b/xml_converter/generators/cpp_templates/enum.cpp @@ -16,17 +16,17 @@ using namespace std; {{class_name}} {{attribute_name}}; string normalized_value = normalize(get_attribute_value(input)); {% for n, attribute_variable in enumerate(attribute_variables) %} - {% for i, value in enumerate(attribute_variable.xml_fields) %} - {% if i == 0 and n == 0: %} - if (normalized_value == "{{value}}") { - {{attribute_name}} = {{class_name}}::{{attribute_variable.attribute_name}}; - } - {% else: %} - else if (normalized_value == "{{value}}") { - {{attribute_name}} = {{class_name}}::{{attribute_variable.attribute_name}}; - } - {% endif %} - {% endfor %} + {% for i, value in enumerate(attribute_variable.xml_fields) %} + {% if i == 0 and n == 0: %} + if (normalized_value == "{{value}}") { + {{attribute_name}} = {{class_name}}::{{attribute_variable.attribute_name}}; + } + {% else %} + else if (normalized_value == "{{value}}") { + {{attribute_name}} = {{class_name}}::{{attribute_variable.attribute_name}}; + } + {% endif %} + {% endfor %} {% endfor %} else { errors->push_back(new XMLAttributeValueError("Found an invalid value that was not in the Enum {{class_name}}", input)); @@ -37,17 +37,17 @@ using namespace std; string stringify_{{attribute_name}}({{class_name}} attribute_value) { {% for n, attribute_variable in enumerate(attribute_variables) %} - {% for i, value in enumerate(attribute_variable.xml_fields) %} - {%-if i == 0 and n == 0:%} - if (attribute_value == {{class_name}}::{{attribute_variable.attribute_name}}) { - return "{{value}}"; - } - {% else: %} - else if (attribute_value == {{class_name}}::{{attribute_variable.attribute_name}}) { - return "{{value}}"; - } - {% endif %} - {% endfor %} + {% for i, value in enumerate(attribute_variable.xml_fields) %} + {%-if i == 0 and n == 0:%} + if (attribute_value == {{class_name}}::{{attribute_variable.attribute_name}}) { + return "{{value}}"; + } + {% else: %} + else if (attribute_value == {{class_name}}::{{attribute_variable.attribute_name}}) { + return "{{value}}"; + } + {% endif %} + {% endfor %} {% endfor %} else { return "{{class_name}}::{{attribute_variables[0].xml_fields[0]}}"; @@ -56,10 +56,10 @@ string stringify_{{attribute_name}}({{class_name}} attribute_value) { waypoint::{{class_name}} to_proto_{{attribute_name}}({{class_name}} attribute_value) { switch (attribute_value) { - {% for attribute_variable in attribute_variables %} - case {{class_name}}::{{attribute_variable.attribute_name}}: - return waypoint::{{class_name}}::{{attribute_variable.attribute_name}}; - {% endfor %} + {% for attribute_variable in attribute_variables %} + case {{class_name}}::{{attribute_variable.attribute_name}}: + return waypoint::{{class_name}}::{{attribute_variable.attribute_name}}; + {% endfor %} default: return waypoint::{{class_name}}::{{attribute_variables[0].attribute_name}}; } @@ -67,10 +67,10 @@ waypoint::{{class_name}} to_proto_{{attribute_name}}({{class_name}} attribute_va {{class_name}} from_proto_{{attribute_name}}(waypoint::{{class_name}} proto_{{attribute_name}}) { switch (proto_{{attribute_name}}) { - {% for attribute_variable in attribute_variables %} - case waypoint::{{class_name}}::{{attribute_variable.attribute_name}}: - return {{class_name}}::{{attribute_variable.attribute_name}}; - {% endfor %} + {% for attribute_variable in attribute_variables %} + case waypoint::{{class_name}}::{{attribute_variable.attribute_name}}: + return {{class_name}}::{{attribute_variable.attribute_name}}; + {% endfor %} default: return {{class_name}}::{{attribute_variables[0].attribute_name}}; } diff --git a/xml_converter/generators/cpp_templates/multiflagvalue.cpp b/xml_converter/generators/cpp_templates/multiflagvalue.cpp index 47abae16..11fe543a 100644 --- a/xml_converter/generators/cpp_templates/multiflagvalue.cpp +++ b/xml_converter/generators/cpp_templates/multiflagvalue.cpp @@ -16,24 +16,24 @@ using namespace std; {{class_name}} {{attribute_name}}; vector flag_values; flag_values = split(get_attribute_value(input), ","); -{% for attribute_variable in attribute_variables %} - {{attribute_name}}.{{attribute_variable.attribute_name}} = false; -{% endfor %} + {% for attribute_variable in attribute_variables %} + {{attribute_name}}.{{attribute_variable.attribute_name}} = false; + {% endfor %} for (string flag_value : flag_values) { string normalized_flag_value = normalize(flag_value); {% for n, attribute_variable in enumerate(attribute_variables) %} - {% for i, value in enumerate(attribute_variable.xml_fields) %} - {% if i == 0 and n == 0: %} - if (normalized_flag_value == "{{value}}") { - {{attribute_name}}.{{attribute_variable.attribute_name}} = true; - } - {% else: %} - else if (normalized_flag_value == "{{value}}") { - {{attribute_name}}.{{attribute_variable.attribute_name}} = true; - } - {% endif %} - {%- endfor %} + {% for i, value in enumerate(attribute_variable.xml_fields) %} + {% if i == 0 and n == 0: %} + if (normalized_flag_value == "{{value}}") { + {{attribute_name}}.{{attribute_variable.attribute_name}} = true; + } + {% else: %} + else if (normalized_flag_value == "{{value}}") { + {{attribute_name}}.{{attribute_variable.attribute_name}} = true; + } + {% endif %} + {%- endfor %} {%- endfor %} else { errors->push_back(new XMLAttributeValueError("Invalid Filter for {{class_name}}. Found " + flag_value, input)); @@ -45,18 +45,18 @@ using namespace std; string stringify_{{attribute_name}}({{class_name}} attribute_value) { string output = ""; -{% for n, attribute_variable in enumerate(attribute_variables)%} - if (attribute_value.{{attribute_variable.attribute_name}} == true) { - output = output + "{{attribute_variable.xml_fields[0]}}"; - } -{% endfor %} + {% for n, attribute_variable in enumerate(attribute_variables)%} + if (attribute_value.{{attribute_variable.attribute_name}} == true) { + output = output + "{{attribute_variable.xml_fields[0]}}"; + } + {% endfor %} return output; } waypoint::{{class_name}}* to_proto_{{attribute_name}}({{class_name}} attribute_value) { waypoint::{{class_name}}* proto_{{attribute_name}} = new waypoint::{{class_name}}(); {% for n, attribute_variable in enumerate(attribute_variables)%} - proto_{{attribute_name}}->set_{{attribute_variable.attribute_name}}(attribute_value.{{attribute_variable.attribute_name}}); + proto_{{attribute_name}}->set_{{attribute_variable.attribute_name}}(attribute_value.{{attribute_variable.attribute_name}}); {% endfor %} return proto_{{attribute_name}}; } @@ -64,7 +64,7 @@ waypoint::{{class_name}}* to_proto_{{attribute_name}}({{class_name}} attribute_v {{class_name}} from_proto_{{attribute_name}}(waypoint::{{class_name}} proto_{{attribute_name}}) { {{class_name}} {{attribute_name}}; {% for n, attribute_variable in enumerate(attribute_variables)%} - {{attribute_name}}.{{attribute_variable.attribute_name}} = proto_{{attribute_name}}.{{attribute_variable.attribute_name}}(); + {{attribute_name}}.{{attribute_variable.attribute_name}} = proto_{{attribute_name}}.{{attribute_variable.attribute_name}}(); {% endfor %} return {{attribute_name}}; } diff --git a/xml_converter/generators/jinja_helpers.py b/xml_converter/generators/jinja_helpers.py new file mode 100644 index 00000000..299b2720 --- /dev/null +++ b/xml_converter/generators/jinja_helpers.py @@ -0,0 +1,213 @@ +from dataclasses import dataclass +from jinja2.ext import Extension +from typing import Tuple, Optional, List +import enum +import re + + +################################################################################ +# IndentFlow +# +# An enum to represent the different actions that can be taken for a given line +# of the jinja template. +################################################################################ +class IndentFlow(enum.Enum): + push = enum.auto() + keep = enum.auto() + pop = enum.auto() + poppush = enum.auto() + + +################################################################################ +# IndentStackElem +# +# A dataclass that keeps track of the indentation of a specific block of the +# template and can apply the indentation to all the lines in that block easily. +################################################################################ +@dataclass +class IndentStackElem(): + indentation: str + token: str + startline: str + lines: List[str] + + def apply_indent(self): + + indented_lines = [self.indentation + self.startline] + + for line in unindent_block(self.lines): + if line == "": + indented_lines.append(line) + continue + indented_lines.append(self.indentation + line) + + return indented_lines + + +################################################################################ +# unindent_blocks +# +# Attempts to read a jinja format string and +################################################################################ +tag_regex = re.compile(r".*\{\%-?(.*)\-?%\}.*") + +indentation_regex = re.compile(r"^(?P[ \t]*)(?P.*)") + +class UnindentBlocks(Extension): + def preprocess(self, source, name, filename=None) -> str: + indentation_stack: List[IndentStackElem] = [IndentStackElem("", "", "", [])] + + output_lines: List[str] = [] + + for line in source.split("\n"): + + + indentation_match = re.match(indentation_regex, line) + if indentation_match == None: + raise ValueError("Cannot Identify Indentation") + + whitespace = indentation_match.groupdict()["indent"] + unindented_line = indentation_match.groupdict()["line"] + + + flow = self.indent_flow(unindented_line) + + if flow[0] == IndentFlow.push: + indentation_stack.append(IndentStackElem(whitespace, flow[1], unindented_line, [])) + + + elif flow[0] == IndentFlow.keep: + # if we are not in a block just do the normal thing + if len(indentation_stack) == 0: + output_lines.append(whitespace + unindented_line) + else: + # TODO check flow[1] + indentation_stack[-1].lines.append(line) + + elif flow[0] == IndentFlow.poppush: + chunk = indentation_stack.pop() + indentation_stack[-1].lines += chunk.apply_indent() + indentation_stack.append(IndentStackElem( + chunk.indentation, + chunk.token, + unindented_line, + [] + )) + + elif flow[0] == IndentFlow.pop: + # TODO check flow[1] + chunk = indentation_stack.pop() + indentation_stack[-1].lines += chunk.apply_indent() + indentation_stack[-1].lines.append(chunk.indentation + unindented_line) + + # TODO: sanitycheck that indentation stack has only 1 element + return "\n".join(indentation_stack[0].lines) + + ############################################################################ + # indent_flow + # + # Returns how the indenting should change for subsequent lines + # + # First argument is push, keep, or pop to indicate what to do with the indentation stack + # the second argument is the control block, for push that block should be added + # for keep or pop, that value should be checked, or checked and removed + # + # if keep and the value is None then dont check and keep going. + # The second value is mostly for sanity checking that all these blocks have pairs. + # There will definitely be issues with this if there is a block that starts on a line by itself + # but does not end on a line by itself + ############################################################################ + def indent_flow(self, line: str) -> Tuple[IndentFlow, str]: + tag_match = re.match(tag_regex, line) + + if tag_match == None: + return IndentFlow.keep, "" + + parsed_tag_line = tag_match.groups()[0].strip() + + if parsed_tag_line.startswith("for"): + return IndentFlow.push, "for" + elif parsed_tag_line.startswith("endfor"): + return IndentFlow.pop, "for" + elif parsed_tag_line.startswith("if"): + return IndentFlow.push, "if" + elif parsed_tag_line.startswith("elif"): + return IndentFlow.poppush, "if" + elif parsed_tag_line.startswith("else"): + return IndentFlow.poppush, "if" + elif parsed_tag_line.startswith("endif"): + return IndentFlow.pop, "if" + + # # TODO: Make tests for macro, call, filter + # elif parsed_tag_line.startswith("macro"): + # return IndentFlow.push, "macro" + # elif parsed_tag_line.startswith("endmacro"): + # return IndentFlow.pop, "macro" + # elif parsed_tag_line.startswith("call"): + # return IndentFlow.push, "call" + # elif parsed_tag_line.startswith("endcall"): + # return IndentFlow.pop, "call" + # elif parsed_tag_line.startswith("filter"): + # return IndentFlow.push, "filter" + # elif parsed_tag_line.startswith("endfilter"): + # return IndentFlow.pop, "filter" + + # # TODO: Do more testing to branch between set and blockset + # elif parsed_tag_line.startswith("set"): + # return IndentFlow.push, "set" # or maybe `IndentFlow.keep, ""` if not a block set + # elif parsed_tag_line.startswith("endset"): + # return IndentFlow.pop, "set" + + raise ValueError("Unknown Jinja2 Statement " + parsed_tag_line) + + +################################################################################ +# unindent_block +# +# Takes a list of text lines and removes a uniform indent for every line. +# TODO: The organization of this function is pretty poor and should be redone. +# The best way to do this is probably by writing some tests first and then +# refactoring this function afterwards. +################################################################################ +def unindent_block(block: List[str]) -> List[str]: + common_indent = "" + next_indent: Optional[str] = None + index = -1 + + searching = True + while searching: + index += 1 + + for line in block: + # Ignore blank lines so that they dont cause the removed indent to + # be 0 characters long. + if line == "": + continue + + # Exit if we reach the end of a line + if index >= len(line): + searching = False + break + + if next_indent == None: + next_indent = line[index] + + # Stop searching when you get to non-whitespace + if next_indent not in {" ", "\t"}: + searching = False + break + + # Exit if we find a non matching indent character in one of the other lines + if next_indent != line[index]: + searching = False + break + + # A sanity check for if we never triggered anything in the for loop + # EG: all empty lines + if next_indent == None: + break + + common_indent += next_indent + next_indent = None + + return [line[index:] for line in block] From 761b6b56f542b8156cca342dc0b713d3fb149490 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Mon, 27 Feb 2023 02:15:48 -0600 Subject: [PATCH 186/539] fixing linter errors --- xml_converter/generators/code_generator.py | 4 +-- xml_converter/generators/jinja_helpers.py | 33 +++++++++++----------- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index f7c041e3..8359d919 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -377,7 +377,7 @@ def write_cpp_classes(self, output_directory: str) -> None: file_loader = FileSystemLoader('cpp_templates') env = Environment( loader=file_loader, - extensions=["jinja_helpers.UnindentBlocks"], + extensions=[UnindentBlocks], keep_trailing_newline=True, trim_blocks=True, lstrip_blocks=True @@ -571,7 +571,7 @@ def write_attribute(self, output_directory: str) -> None: file_loader = FileSystemLoader('cpp_templates') env = Environment( loader=file_loader, - extensions=["jinja_helpers.UnindentBlocks"], + extensions=[UnindentBlocks], keep_trailing_newline=True, trim_blocks=True, lstrip_blocks=True diff --git a/xml_converter/generators/jinja_helpers.py b/xml_converter/generators/jinja_helpers.py index 299b2720..5fd117f6 100644 --- a/xml_converter/generators/jinja_helpers.py +++ b/xml_converter/generators/jinja_helpers.py @@ -31,7 +31,7 @@ class IndentStackElem(): startline: str lines: List[str] - def apply_indent(self): + def apply_indent(self) -> List[str]: indented_lines = [self.indentation + self.startline] @@ -44,46 +44,45 @@ def apply_indent(self): return indented_lines +tag_regex = re.compile(r".*\{\%-?(.*)\-?%\}.*") +indentation_regex = re.compile(r"^(?P[ \t]*)(?P.*)") + + ################################################################################ # unindent_blocks # -# Attempts to read a jinja format string and +# Attempts to read a jinja format string and remove extra indentation used only +# in the jinja templates due to things like {% for %} or {% if %} blocks. ################################################################################ -tag_regex = re.compile(r".*\{\%-?(.*)\-?%\}.*") - -indentation_regex = re.compile(r"^(?P[ \t]*)(?P.*)") - class UnindentBlocks(Extension): - def preprocess(self, source, name, filename=None) -> str: + def preprocess(self, source: str, name: Optional[str], filename: Optional[str] = None) -> str: + indentation_stack: List[IndentStackElem] = [IndentStackElem("", "", "", [])] output_lines: List[str] = [] for line in source.split("\n"): - indentation_match = re.match(indentation_regex, line) - if indentation_match == None: + if indentation_match is None: raise ValueError("Cannot Identify Indentation") whitespace = indentation_match.groupdict()["indent"] unindented_line = indentation_match.groupdict()["line"] - flow = self.indent_flow(unindented_line) if flow[0] == IndentFlow.push: indentation_stack.append(IndentStackElem(whitespace, flow[1], unindented_line, [])) - elif flow[0] == IndentFlow.keep: # if we are not in a block just do the normal thing if len(indentation_stack) == 0: output_lines.append(whitespace + unindented_line) else: - # TODO check flow[1] + # TODO check flow[1] indentation_stack[-1].lines.append(line) - + elif flow[0] == IndentFlow.poppush: chunk = indentation_stack.pop() indentation_stack[-1].lines += chunk.apply_indent() @@ -120,7 +119,7 @@ def preprocess(self, source, name, filename=None) -> str: def indent_flow(self, line: str) -> Tuple[IndentFlow, str]: tag_match = re.match(tag_regex, line) - if tag_match == None: + if tag_match is None: return IndentFlow.keep, "" parsed_tag_line = tag_match.groups()[0].strip() @@ -189,7 +188,7 @@ def unindent_block(block: List[str]) -> List[str]: searching = False break - if next_indent == None: + if next_indent is None: next_indent = line[index] # Stop searching when you get to non-whitespace @@ -204,10 +203,10 @@ def unindent_block(block: List[str]) -> List[str]: # A sanity check for if we never triggered anything in the for loop # EG: all empty lines - if next_indent == None: + if next_indent is None: break common_indent += next_indent next_indent = None - + return [line[index:] for line in block] From 1eafc06b822a1d4ff6d387a95c563c9bd3595af7 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Fri, 5 May 2023 02:01:20 -0500 Subject: [PATCH 187/539] Removing outdated cloned line added in bad rebase --- xml_converter/generators/cpp_templates/class_template.hpp | 1 - 1 file changed, 1 deletion(-) diff --git a/xml_converter/generators/cpp_templates/class_template.hpp b/xml_converter/generators/cpp_templates/class_template.hpp index e92df2b0..7574f46a 100644 --- a/xml_converter/generators/cpp_templates/class_template.hpp +++ b/xml_converter/generators/cpp_templates/class_template.hpp @@ -30,7 +30,6 @@ class {{cpp_class}} : public Parseable { Trail default_trail; void init_from_xml(rapidxml::xml_node<>* node, std::vector* errors, std::string base_dir = ""); - void init_from_xml(rapidxml::xml_node<>* node, std::vector* errors); {% endif %} virtual std::vector as_xml() const; virtual std::string classname(); From c07d88e55b60ae5d74557196301e5168f6d812e6 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Tue, 21 Mar 2023 20:51:41 -0400 Subject: [PATCH 188/539] Redoing Color to a CompoundCustomClass and other changes to the base xml parser --- xml_converter/doc/position/position.md | 6 +- xml_converter/doc/rotation/euler_rotation.md | 3 +- xml_converter/doc/texture/color.md | 32 ++++++- xml_converter/doc/trigger/reset_length.md | 4 +- xml_converter/doc/trigger/reset_offset.md | 12 +++ xml_converter/generators/code_generator.py | 45 +++++++--- .../cpp_templates/class_template.cpp | 44 ++++----- .../cpp_templates/compoundvalue.cpp | 4 +- xml_converter/proto/waypoint.proto | 3 +- xml_converter/src/attribute/color.cpp | 89 +++++++++++++++---- xml_converter/src/attribute/color.hpp | 8 +- xml_converter/src/icon_gen.cpp | 49 ++++++++-- xml_converter/src/icon_gen.hpp | 8 ++ xml_converter/src/trail_gen.cpp | 12 +++ xml_converter/src/trail_gen.hpp | 6 ++ xml_converter/src/xml_converter.cpp | 4 +- 16 files changed, 251 insertions(+), 78 deletions(-) create mode 100644 xml_converter/doc/trigger/reset_offset.md diff --git a/xml_converter/doc/position/position.md b/xml_converter/doc/position/position.md index 719d8d44..a6898767 100644 --- a/xml_converter/doc/position/position.md +++ b/xml_converter/doc/position/position.md @@ -5,8 +5,10 @@ applies_to: ["Icon"] xml_fields: ["Position"] compatability: [TacO, Burrito, BlishHUD] protobuf_field: position +xml_parent_export: "" +xml_child_export: ["X Position", "Y Position", "Z Position"] components: - + - name: X Position type: Float32 xml_fields: [XPos, PositionX] @@ -26,8 +28,6 @@ components: xml_fields: [ZPos, PositionZ] protobuf_field: "z" compatability: [TacO, Burrito, BlishHUD] - -xml_export: "Children" --- An XYZ location of a point in the game world. diff --git a/xml_converter/doc/rotation/euler_rotation.md b/xml_converter/doc/rotation/euler_rotation.md index 90ea3ff1..71e56289 100644 --- a/xml_converter/doc/rotation/euler_rotation.md +++ b/xml_converter/doc/rotation/euler_rotation.md @@ -5,6 +5,8 @@ applies_to: ["Icon"] xml_fields: ["Rotate"] compatability: [TacO, Burrito, BlishHUD] protobuf_field: euler_rotation +xml_parent_export: "'X Rotation', 'Y Rotation', 'Z Rotation'" +xml_child_export: [] components: - name: X Rotation type: Float32 @@ -26,7 +28,6 @@ components: protobuf_field: "z" compatability: [TacO, Burrito, BlishHUD] -xml_export: "Parent" --- Euler X Y Z rotation. diff --git a/xml_converter/doc/texture/color.md b/xml_converter/doc/texture/color.md index 8dd31278..d1b69e1d 100644 --- a/xml_converter/doc/texture/color.md +++ b/xml_converter/doc/texture/color.md @@ -1,11 +1,41 @@ --- name: Color -type: Custom +type: CompoundCustomClass class: Color applies_to: [Icon, Trail] xml_fields: [Color, BHColor] protobuf_field: rgba_color compatability: [TacO, BlishHUD, Burrito] +xml_parent_export: "{Red},{Green},{Blue}" +xml_child_export: ["Alpha"] + +components: + + - name: Red # fake, to make thing "square" + type: Float32 + xml_fields: [Red] + protobuf_field: rgba_color + compatability: [TacO, Burrito, BlishHUD] + + - name: Green + type: Float32 + xml_fields: [Green] + protobuf_field: rgba_color + compatability: [TacO, Burrito, BlishHUD] + + - name: Blue + type: Float32 + xml_fields: [Blue] + protobuf_field: rgba_color + compatability: [TacO, Burrito, BlishHUD] + + - name: Alpha + type: Float32 + xml_fields: [Alpha] + protobuf_field: rgba_color + compatability: [TacO, Burrito, BlishHUD] + + --- A multiplier color to tint the raw albedo texture of a marker of trail texture. (Unclear) Solid white will result in no change, solid black will result in a black texture. diff --git a/xml_converter/doc/trigger/reset_length.md b/xml_converter/doc/trigger/reset_length.md index 30bb9bb7..64a6279a 100644 --- a/xml_converter/doc/trigger/reset_length.md +++ b/xml_converter/doc/trigger/reset_length.md @@ -2,8 +2,8 @@ name: Reset Length type: Float32 applies_to: [Icon] -xml_fields: [ResetLength] -protobuf_field: trigger.reset_length +xml_fields: [ResetOffset] +protobuf_field: trigger.reset_offset compatability: [TacO, BlishHUD, Burrito] --- When using behavior 4 (reappear after timer) this value defines, in seconds, the duration until the marker is reset after being activated. diff --git a/xml_converter/doc/trigger/reset_offset.md b/xml_converter/doc/trigger/reset_offset.md new file mode 100644 index 00000000..38e75bee --- /dev/null +++ b/xml_converter/doc/trigger/reset_offset.md @@ -0,0 +1,12 @@ +--- +name: Reset Offset +type: Float32 +applies_to: [Icon] +xml_fields: [ResetLength] +protobuf_field: trigger.reset_length +compatability: [] +--- +When using behavior 5 ('Reappear on map reset') this value defines, in seconds, when the first map cycle of the day begins after the daily reset. +Notes +===== +Behavior 5 is Not implemented by TacO or BlishHUD \ No newline at end of file diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 8359d919..d512637d 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -15,7 +15,7 @@ properties: type: type: string - enum: [Int32, Fixed32, Float32, String, Boolean, MultiflagValue, Enum, CompoundValue, Custom] + enum: [Int32, Fixed32, Float32, String, Boolean, MultiflagValue, Enum, CompoundValue, Custom, CompoundCustomClass] allOf: ############################# # Int32 Type @@ -131,15 +131,16 @@ const: CompoundValue then: additionalProperties: false - required: [{shared_fields}, xml_export, components] + required: [{shared_fields}, components] properties: {shared_field_properties} - xml_export: + xml_parent_export: type: string - enum: - - Parent - - Parent and Children - - Children + xml_child_export: + type: array + items: + type: string + pattern: "^[A-Za-z' ]+$" components: type: array items: @@ -156,7 +157,7 @@ type: array items: type: string - pattern: "^[A-Za-z]+$" + pattern: "^[A-Za-z ]+$" protobuf_field: type: string pattern: "^[a-z_.]+$" @@ -187,6 +188,13 @@ type: string uses_file_path: type: boolean + xml_parent_export: + type: string + xml_child_export: + type: array + items: + type: string + pattern: "^[A-Za-z' ]+$" """.format( shared_field_properties="""type: @@ -290,9 +298,12 @@ class AttributeVariable: protobuf_field: str args: List[str] = field(default_factory=list) default_xml_fields: List[str] = field(default_factory=list) - xml_export: str = "" side_effects: List[str] = field(default_factory=list) compound_name: Optional[str] = None + xml_child_export: str = "" + xml_parent_export: str = "" + compound_name: Optional[str] = None + is_xml_export: bool = True is_trigger: bool = False uses_file_path: bool = False @@ -439,9 +450,11 @@ def generate_cpp_variable_data( xml_fields: List[str] = [] default_xml_fields: List[str] = [] side_effects: List[str] = [] - xml_export: str = "" args: List[str] = [] + xml_child_export: List[str] = [] + xml_parent_export: List[str] = [] protobuf_field: str = "" + is_xml_export: bool = True is_trigger: bool = False cpp_includes.hpp_absolute_includes.add("string") @@ -474,14 +487,15 @@ def generate_cpp_variable_data( default_xml_fields = [] side_effects = [] xml_export = "" - args = XML_ATTRIBUTE_PARSER_DEFAULT_ARGUMENTS.copy() + args = XML_ATTRIBUTE_PARSER_DEFAULT_ARGUMENTS.copy( if fieldval['type'] in documentation_type_data: cpp_type = documentation_type_data[fieldval['type']]["cpp_type"] class_name = documentation_type_data[fieldval['type']]["class_name"] cpp_includes.cpp_relative_includes.add("attribute/{}.hpp".format(class_name)) - elif fieldval['type'] == "Custom": + + elif fieldval['type'] in ["Custom", "CompoundCustomClass"]: cpp_type = fieldval['class'] class_name = insert_delimiter(fieldval['class'], delimiter="_") cpp_includes.hpp_relative_includes.add("attribute/{}.hpp".format(class_name)) @@ -549,11 +563,13 @@ def generate_cpp_variable_data( class_name=class_name, xml_fields=xml_fields, default_xml_fields=default_xml_fields, - xml_export=xml_export, + xml_child_export=xml_child_export, + xml_parent_export=xml_parent_export, protobuf_field=protobuf_field, is_trigger=is_trigger, args=args, side_effects=side_effects, + is_xml_export=is_xml_export, ) attribute_variables.append(attribute_variable) @@ -636,7 +652,8 @@ def write_attribute(self, output_directory: str) -> None: cpp_type=doc_type_to_cpp_type[component['type']], class_name=attribute_name, xml_fields=xml_fields, - xml_export=metadata[filepath]["xml_export"], + xml_child_export=metadata[filepath]["xml_child_export"], + xml_parent_export=metadata[filepath]["xml_parent_export"], protobuf_field=component["protobuf_field"], is_trigger=is_trigger, ) diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index b9fa7839..78483ff2 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -44,7 +44,7 @@ bool {{cpp_class}}::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vec this->{{attribute_variable.attribute_name}} = parse_{{attribute_variable.class_name}}({{", ".join(attribute_variable.args)}}); this->{{attribute_variable.attribute_name}}_is_set = true; } - {% elif (attribute_variable.attribute_type == "CompoundValue" and attribute_variable.compound_name != None) %} + {% elif (attribute_variable.attribute_type in ["CompoundValue", "CompoundCustomClass"] and attribute_variable.compound_name != None) %} else if (attributename == "{{value}}") { this->{{attribute_variable.compound_name}}.{{attribute_variable.attribute_name}} = parse_float(attribute, errors); this->{{attribute_variable.compound_name}}_is_set = true; @@ -81,30 +81,20 @@ vector {{cpp_class}}::as_xml() const { vector xml_node_contents; xml_node_contents.push_back("<{{xml_class_name}} "); {% for attribute_variable in attribute_variables %} - {% if (attribute_variable.attribute_type == "CompoundValue") %} - {% if (attribute_variable.xml_export == "Children" and attribute_variable.compound_name != None) %} - if (this->{{attribute_variable.compound_name}}_is_set) { - xml_node_contents.push_back(" {{attribute_variable.default_xml_fields[0]}}=\"" + to_string(this->{{attribute_variable.compound_name}}.{{attribute_variable.attribute_name}}) + "\""); - } - {% elif (attribute_variable.xml_export == "Parent" and attribute_variable.compound_name == None)%} - if (this->{{attribute_variable.attribute_name}}_is_set) { - xml_node_contents.push_back(" {{attribute_variable.default_xml_fields[0]}}=\"" + stringify_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}}) + "\""); - } - {% elif (attribute_variable.xml_export == "Parent and Children")%} - {% for value in attribute_variable.xml_fields %} - if (this->{{attribute_variable.attribute_name}}_is_set) { - xml_node_contents.push_back(" {{value}}=\"" + stringify_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}}) + "\""); - {% endfor %} - } - {% endif %} - {% else: %} - if (this->{{attribute_variable.attribute_name}}_is_set) { - xml_node_contents.push_back(" {{attribute_variable.default_xml_fields[0]}}=\"" + stringify_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}}) + "\""); - } - {% endif %} - {% endfor %} - {% if cpp_class == "Category": %} - xml_node_contents.push_back(">\n"); + {% if attribute_variable.is_xml_export == true %} + {% if (attribute_variable.attribute_type in ["CompoundValue", "CompoundCustomClass"] and attribute_variable.compound_name != None) %} + if (this->{{attribute_variable.compound_name}}_is_set) { + xml_node_contents.push_back(" {{attribute_variable.default_xml_fields[0]}}=\"" + stringify_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}}) + "\""); + } + {% else %} + if (this->{{attribute_variable.attribute_name}}_is_set) { + xml_node_contents.push_back(" {{attribute_variable.default_xml_fields[0]}}=\"" + stringify_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}}) + "\""); + } + {% endif %} + {% endif %} +{% endfor %} +{% if cpp_class == "Category": %} + xml_node_contents.push_back(">\n"); for (const auto& [key, val] : this->children) { string text; @@ -156,7 +146,7 @@ waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf() const { if (this->{{attribute_variable.attribute_name}}_is_set) { proto_{{cpp_class_header}}.set_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); } - {% elif (attribute_variable.attribute_type in ["MultiflagValue", "CompoundValue", "Custom"]) and attribute_variable.compound_name == None%} + {% elif (attribute_variable.attribute_type in ["MultiflagValue", "CompoundValue", "Custom", "CompoundCustomClass"]) and attribute_variable.compound_name == None%} if (this->{{attribute_variable.attribute_name}}_is_set) { proto_{{cpp_class_header}}.set_allocated_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); } @@ -215,7 +205,7 @@ void {{cpp_class}}::parse_protobuf(waypoint::{{cpp_class}} proto_{{cpp_class_hea this->{{attribute_variable.attribute_name}} = from_proto_{{attribute_variable.class_name}}(proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}()); this->{{attribute_variable.attribute_name}}_is_set = true; } - {% elif (attribute_variable.attribute_type in ["MultiflagValue", "CompoundValue", "Custom"]) and attribute_variable.compound_name == None%} + {% elif (attribute_variable.attribute_type in ["MultiflagValue", "CompoundValue", "Custom", "CompoundCustomClass"]) and attribute_variable.compound_name == None%} if (proto_{{cpp_class_header}}.has_{{attribute_variable.protobuf_field}}()) { this->{{attribute_variable.attribute_name}} = from_proto_{{attribute_variable.class_name}}(proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}()); this->{{attribute_variable.attribute_name}}_is_set = true; diff --git a/xml_converter/generators/cpp_templates/compoundvalue.cpp b/xml_converter/generators/cpp_templates/compoundvalue.cpp index eb5ab4c6..97d22ff8 100644 --- a/xml_converter/generators/cpp_templates/compoundvalue.cpp +++ b/xml_converter/generators/cpp_templates/compoundvalue.cpp @@ -27,7 +27,7 @@ using namespace std; } return {{attribute_name}}; } -{% if attribute_variables[0].xml_export == "Parent" %} +{% if attribute_variables[0].xml_parent_export != "" %} string stringify_{{attribute_name}}({{class_name}} attribute_value) { string output; {% for n, attribute_variable in enumerate(attribute_variables) %} @@ -38,7 +38,7 @@ using namespace std; {% endif %} {% endfor %} return output; - } +} {% endif %} waypoint::{{class_name}}* to_proto_{{attribute_name}}({{class_name}} attribute_value) { diff --git a/xml_converter/proto/waypoint.proto b/xml_converter/proto/waypoint.proto index 1e62199e..65156ca2 100644 --- a/xml_converter/proto/waypoint.proto +++ b/xml_converter/proto/waypoint.proto @@ -122,7 +122,8 @@ message Trigger { Category action_hide_category = 12; Category action_show_category = 13; Category action_toggle_category = 14; - ResetBehavior reset_behavior= 15; + ResetBehavior reset_behavior = 15; + int32 reset_offset = 16; } message GUID { diff --git a/xml_converter/src/attribute/color.cpp b/xml_converter/src/attribute/color.cpp index 5b93d9b2..83fe3a50 100644 --- a/xml_converter/src/attribute/color.cpp +++ b/xml_converter/src/attribute/color.cpp @@ -4,6 +4,7 @@ #include #include +#include #include #include @@ -17,12 +18,35 @@ using namespace std; // parse_color // // Parses a Color from the value of a rapidxml::xml_attribute. -// TODO(#98): Color should be saved in a better format then the raw hex string. -// TODO(#129): Compound Value XML Export //////////////////////////////////////////////////////////////////////////////// Color parse_color(rapidxml::xml_attribute<>* input, vector*) { Color color; - color.hex = get_attribute_value(input); + std::string input_string = get_attribute_value(input); + std::string hex_string; + + if (input_string.size() > 0 && input_string[0] == '#') { + hex_string = input_string.substr(1); + } + else { + hex_string = input_string; + } + + std::regex hex_pattern("^([A-Fa-f0-9]{6})$|^([A-Fa-f0-9]{8})$"); + + if (std::regex_match(hex_string, hex_pattern)) { + // Extract the R, G, B, and A values from the Hex string + if (hex_string.size() == 6 || hex_string.size() == 8) { + color.r = std::stoi(hex_string.substr(0, 2), nullptr, 16); + color.g = std::stoi(hex_string.substr(2, 2), nullptr, 16); + color.b = std::stoi(hex_string.substr(4, 2), nullptr, 16); + if (hex_string.size() == 8) { + color.a = std::stoi(hex_string.substr(6, 2), nullptr, 16); + } + else { + color.a = 255; + } + } + } return color; } @@ -32,7 +56,20 @@ Color parse_color(rapidxml::xml_attribute<>* input, vector*) { // Converts a Color into a stringy value so it can be saved to xml. //////////////////////////////////////////////////////////////////////////////// string stringify_color(Color attribute_value) { - return attribute_value.hex; + std::stringstream stream; + std::string hex_string = "#"; + + stream << std::hex << attribute_value.r; + hex_string += stream.str(); + + stream << std::hex << attribute_value.g; + hex_string += stream.str(); + + stream << std::hex << attribute_value.b; + hex_string += stream.str(); + + std::string rgb = hex_string; + return rgb; } //////////////////////////////////////////////////////////////////////////////// @@ -41,14 +78,27 @@ string stringify_color(Color attribute_value) { // Converts a Color into a proto message //////////////////////////////////////////////////////////////////////////////// waypoint::RGBAColor* to_proto_color(Color attribute_value) { - string hex = attribute_value.hex; - waypoint::RGBAColor* color = new waypoint::RGBAColor; - // Adding default values until TODO #98 - int r = 255; - int g = 255; - int b = 255; - int a = 255; - uint32_t rgba = ((r & 0xff) << 24) + ((g & 0xff) << 16) + ((b & 0xff) << 8) + (a & 0xff); + waypoint::RGBAColor* color = new waypoint::RGBAColor(); + // The default RGB in burrito will be 000000 (i.e. black) + + // If alpha (float) is not the default value, convert to int + if (attribute_value.alpha != 0) { + int alpha_int = static_cast(attribute_value.alpha * 255); + // Check that it doesnt exceed the bounds of {0,255} + if (alpha_int > 255) { + alpha_int = 255; + } + if (alpha_int < 0) { + alpha_int = 0; + } + attribute_value.a = alpha_int; + } + else { + // Default value of alpha in Burrito + attribute_value.a = 255; + } + + uint32_t rgba = ((attribute_value.r & 0xff) << 24) + ((attribute_value.g & 0xff) << 16) + ((attribute_value.b & 0xff) << 8) + (attribute_value.a & 0xff); color->set_rgba_color(rgba); return color; } @@ -62,10 +112,17 @@ Color from_proto_color(waypoint::RGBAColor attribute_value) { Color color; std::stringstream stream; stream << std::hex << attribute_value.rgba_color(); - std::string rgba = stream.str(); + std::string hex_string = stream.str(); + + color.r = std::stoi(hex_string.substr(0, 2), nullptr, 16); + color.g = std::stoi(hex_string.substr(2, 2), nullptr, 16); + color.b = std::stoi(hex_string.substr(4, 2), nullptr, 16); + color.a = std::stoi(hex_string.substr(6, 2), nullptr, 16); - color.hex = rgba.substr(0, 6); - // Adding default values until TODO #98 - color.alpha = 1.0; + color.red = static_cast(color.r) / 255.0f; + color.green = static_cast(color.g) / 255.0f; + color.blue = static_cast(color.b) / 255.0f; + color.alpha = static_cast(color.a) / 255.0f; + return color; } diff --git a/xml_converter/src/attribute/color.hpp b/xml_converter/src/attribute/color.hpp index 7f5f4fab..08449ddd 100644 --- a/xml_converter/src/attribute/color.hpp +++ b/xml_converter/src/attribute/color.hpp @@ -12,8 +12,14 @@ class RGBAColor; class Color { public: - std::string hex; + float red; + float green; + float blue; float alpha; + int r; + int g; + int b; + int a; }; Color parse_color(rapidxml::xml_attribute<>* input, std::vector* errors); diff --git a/xml_converter/src/icon_gen.cpp b/xml_converter/src/icon_gen.cpp index f1db5a3e..92ddddb8 100644 --- a/xml_converter/src/icon_gen.cpp +++ b/xml_converter/src/icon_gen.cpp @@ -30,10 +30,18 @@ bool Icon::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectorachievement_id = parse_int(attribute, errors); this->achievement_id_is_set = true; } + else if (attributename == "alpha") { + this->color.alpha = parse_float(attribute, errors); + this->color_is_set = true; + } else if (attributename == "autotrigger") { this->auto_trigger = parse_bool(attribute, errors); this->auto_trigger_is_set = true; } + else if (attributename == "blue") { + this->color.blue = parse_float(attribute, errors); + this->color_is_set = true; + } else if (attributename == "bouncedelay") { this->bounce_delay = parse_float(attribute, errors); this->bounce_delay_is_set = true; @@ -106,6 +114,10 @@ bool Icon::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectorfestival_filter = parse_festival_filter(attribute, errors); this->festival_filter_is_set = true; } + else if (attributename == "green") { + this->color.green = parse_float(attribute, errors); + this->color_is_set = true; + } else if (attributename == "guid") { this->guid = parse_unique_id(attribute, errors); this->guid_is_set = true; @@ -174,6 +186,10 @@ bool Icon::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectorprofession_filter = parse_profession_filter(attribute, errors); this->profession_filter_is_set = true; } + else if (attributename == "red") { + this->color.red = parse_float(attribute, errors); + this->color_is_set = true; + } else if (attributename == "ingamevisibility") { this->render_ingame = parse_bool(attribute, errors); this->render_ingame_is_set = true; @@ -202,10 +218,14 @@ bool Icon::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectorreset_behavior = parse_reset_behavior(attribute, errors); this->reset_behavior_is_set = true; } - else if (attributename == "resetlength") { + else if (attributename == "resetoffset") { this->reset_length = parse_float(attribute, errors); this->reset_length_is_set = true; } + else if (attributename == "resetlength") { + this->reset_offset = parse_float(attribute, errors); + this->reset_offset_is_set = true; + } else if (attributename == "scaleonmapwithzoom") { this->scale_on_map_with_zoom = parse_bool(attribute, errors); this->scale_on_map_with_zoom_is_set = true; @@ -316,6 +336,9 @@ vector Icon::as_xml() const { if (this->achievement_id_is_set) { xml_node_contents.push_back(" AchievementId=\"" + stringify_int(this->achievement_id) + "\""); } + if (this->color_is_set) { + xml_node_contents.push_back(" Alpha=\"" + stringify_float(this->color.alpha) + "\""); + } if (this->auto_trigger_is_set) { xml_node_contents.push_back(" AutoTrigger=\"" + stringify_bool(this->auto_trigger) + "\""); } @@ -352,9 +375,6 @@ vector Icon::as_xml() const { if (this->distance_fade_start_is_set) { xml_node_contents.push_back(" FadeNear=\"" + stringify_float(this->distance_fade_start) + "\""); } - if (this->euler_rotation_is_set) { - xml_node_contents.push_back(" Rotate=\"" + stringify_euler_rotation(this->euler_rotation) + "\""); - } if (this->festival_filter_is_set) { xml_node_contents.push_back(" Festival=\"" + stringify_festival_filter(this->festival_filter) + "\""); } @@ -416,7 +436,10 @@ vector Icon::as_xml() const { xml_node_contents.push_back(" Behavior=\"" + stringify_reset_behavior(this->reset_behavior) + "\""); } if (this->reset_length_is_set) { - xml_node_contents.push_back(" ResetLength=\"" + stringify_float(this->reset_length) + "\""); + xml_node_contents.push_back(" ResetOffset=\"" + stringify_float(this->reset_length) + "\""); + } + if (this->reset_offset_is_set) { + xml_node_contents.push_back(" ResetLength=\"" + stringify_float(this->reset_offset) + "\""); } if (this->scale_on_map_with_zoom_is_set) { xml_node_contents.push_back(" ScaleOnMapWithZoom=\"" + stringify_bool(this->scale_on_map_with_zoom) + "\""); @@ -609,7 +632,13 @@ waypoint::Icon Icon::as_protobuf() const { if (trigger == nullptr) { trigger = new waypoint::Trigger(); } - trigger->set_reset_length(this->reset_length); + trigger->set_reset_offset(this->reset_length); + } + if (this->reset_offset_is_set) { + if (trigger == nullptr) { + trigger = new waypoint::Trigger(); + } + trigger->set_reset_length(this->reset_offset); } if (this->scale_on_map_with_zoom_is_set) { proto_icon.set_scale_on_map_with_zoom(this->scale_on_map_with_zoom); @@ -802,10 +831,14 @@ void Icon::parse_protobuf(waypoint::Icon proto_icon) { this->reset_behavior = from_proto_reset_behavior(trigger.reset_behavior()); this->reset_behavior_is_set = true; } - if (trigger.reset_length() != 0) { - this->reset_length = trigger.reset_length(); + if (trigger.reset_offset() != 0) { + this->reset_length = trigger.reset_offset(); this->reset_length_is_set = true; } + if (trigger.reset_length() != 0) { + this->reset_offset = trigger.reset_length(); + this->reset_offset_is_set = true; + } if (proto_icon.scale_on_map_with_zoom() != 0) { this->scale_on_map_with_zoom = proto_icon.scale_on_map_with_zoom(); this->scale_on_map_with_zoom_is_set = true; diff --git a/xml_converter/src/icon_gen.hpp b/xml_converter/src/icon_gen.hpp index 771b72fa..d35f058a 100644 --- a/xml_converter/src/icon_gen.hpp +++ b/xml_converter/src/icon_gen.hpp @@ -28,6 +28,7 @@ class Icon : public Parseable { int achievement_bitmask; int achievement_id; bool auto_trigger; + float blue; float bounce_delay; float bounce_duration; float bounce_height; @@ -41,6 +42,7 @@ class Icon : public Parseable { float distance_fade_start; EulerRotation euler_rotation; FestivalFilter festival_filter; + float green; UniqueId guid; bool has_countdown; float height_offset; @@ -57,11 +59,13 @@ class Icon : public Parseable { MountFilter mount_filter; Position position; ProfessionFilter profession_filter; + float red; bool render_ingame; bool render_on_map; bool render_on_minimap; ResetBehavior reset_behavior; float reset_length; + float reset_offset; bool scale_on_map_with_zoom; std::string schedule; float schedule_duration; @@ -75,6 +79,7 @@ class Icon : public Parseable { bool achievement_bitmask_is_set = false; bool achievement_id_is_set = false; bool auto_trigger_is_set = false; + bool blue_is_set = false; bool bounce_delay_is_set = false; bool bounce_duration_is_set = false; bool bounce_height_is_set = false; @@ -88,6 +93,7 @@ class Icon : public Parseable { bool distance_fade_start_is_set = false; bool euler_rotation_is_set = false; bool festival_filter_is_set = false; + bool green_is_set = false; bool guid_is_set = false; bool has_countdown_is_set = false; bool height_offset_is_set = false; @@ -104,11 +110,13 @@ class Icon : public Parseable { bool mount_filter_is_set = false; bool position_is_set = false; bool profession_filter_is_set = false; + bool red_is_set = false; bool render_ingame_is_set = false; bool render_on_map_is_set = false; bool render_on_minimap_is_set = false; bool reset_behavior_is_set = false; bool reset_length_is_set = false; + bool reset_offset_is_set = false; bool scale_on_map_with_zoom_is_set = false; bool schedule_is_set = false; bool schedule_duration_is_set = false; diff --git a/xml_converter/src/trail_gen.cpp b/xml_converter/src/trail_gen.cpp index 57676fb4..d5465b9e 100644 --- a/xml_converter/src/trail_gen.cpp +++ b/xml_converter/src/trail_gen.cpp @@ -38,6 +38,10 @@ bool Trail::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectoranimation_speed = parse_float(attribute, errors); this->animation_speed_is_set = true; } + else if (attributename == "blue") { + this->color.blue = parse_float(attribute, errors); + this->color_is_set = true; + } else if (attributename == "canfade") { this->can_fade = parse_bool(attribute, errors); this->can_fade_is_set = true; @@ -82,6 +86,10 @@ bool Trail::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectorfestival_filter = parse_festival_filter(attribute, errors); this->festival_filter_is_set = true; } + else if (attributename == "green") { + this->color.green = parse_float(attribute, errors); + this->color_is_set = true; + } else if (attributename == "guid") { this->guid = parse_unique_id(attribute, errors); this->guid_is_set = true; @@ -110,6 +118,10 @@ bool Trail::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectorprofession_filter = parse_profession_filter(attribute, errors); this->profession_filter_is_set = true; } + else if (attributename == "red") { + this->color.red = parse_float(attribute, errors); + this->color_is_set = true; + } else if (attributename == "ingamevisibility") { this->render_ingame = parse_bool(attribute, errors); this->render_ingame_is_set = true; diff --git a/xml_converter/src/trail_gen.hpp b/xml_converter/src/trail_gen.hpp index d2a5d488..5f58444a 100644 --- a/xml_converter/src/trail_gen.hpp +++ b/xml_converter/src/trail_gen.hpp @@ -26,6 +26,7 @@ class Trail : public Parseable { int achievement_bitmask; int achievement_id; float animation_speed; + float blue; bool can_fade; MarkerCategory category; Color color; @@ -33,6 +34,7 @@ class Trail : public Parseable { float distance_fade_end; float distance_fade_start; FestivalFilter festival_filter; + float green; UniqueId guid; bool is_wall; int map_display_size; @@ -40,6 +42,7 @@ class Trail : public Parseable { MapTypeFilter map_type_filter; MountFilter mount_filter; ProfessionFilter profession_filter; + float red; bool render_ingame; bool render_on_map; bool render_on_minimap; @@ -53,6 +56,7 @@ class Trail : public Parseable { bool achievement_bitmask_is_set = false; bool achievement_id_is_set = false; bool animation_speed_is_set = false; + bool blue_is_set = false; bool can_fade_is_set = false; bool category_is_set = false; bool color_is_set = false; @@ -60,6 +64,7 @@ class Trail : public Parseable { bool distance_fade_end_is_set = false; bool distance_fade_start_is_set = false; bool festival_filter_is_set = false; + bool green_is_set = false; bool guid_is_set = false; bool is_wall_is_set = false; bool map_display_size_is_set = false; @@ -67,6 +72,7 @@ class Trail : public Parseable { bool map_type_filter_is_set = false; bool mount_filter_is_set = false; bool profession_filter_is_set = false; + bool red_is_set = false; bool render_ingame_is_set = false; bool render_on_map_is_set = false; bool render_on_minimap_is_set = false; diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 1617b099..84bed650 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -217,7 +217,7 @@ vector parse_pois(rapidxml::xml_node<>* root_node, map markers; for (rapidxml::xml_node<>* node = root_node->first_node(); node; node = node->next_sibling()) { - if (get_node_name(node) == "POI") { + if (normalize(get_node_name(node)) == "poi") { Category* default_category = get_category(node, marker_categories, errors); Icon* icon = new Icon(); @@ -229,7 +229,7 @@ vector parse_pois(rapidxml::xml_node<>* root_node, mapinit_from_xml(node, errors); markers.push_back(icon); } - else if (get_node_name(node) == "Trail") { + else if (normalize(get_node_name(node)) == "trail") { Category* default_category = get_category(node, marker_categories, errors); Trail* trail = new Trail(); From 608e08b652d9ef2ba1cf54f627ba5b4972f7b67b Mon Sep 17 00:00:00 2001 From: klingbolt Date: Tue, 21 Mar 2023 20:58:24 -0400 Subject: [PATCH 189/539] Fixing small errors --- xml_converter/doc/trigger/reset_length.md | 4 ++-- xml_converter/generators/code_generator.py | 3 ++- xml_converter/src/icon_gen.cpp | 10 +++++----- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/xml_converter/doc/trigger/reset_length.md b/xml_converter/doc/trigger/reset_length.md index 64a6279a..30bb9bb7 100644 --- a/xml_converter/doc/trigger/reset_length.md +++ b/xml_converter/doc/trigger/reset_length.md @@ -2,8 +2,8 @@ name: Reset Length type: Float32 applies_to: [Icon] -xml_fields: [ResetOffset] -protobuf_field: trigger.reset_offset +xml_fields: [ResetLength] +protobuf_field: trigger.reset_length compatability: [TacO, BlishHUD, Burrito] --- When using behavior 4 (reappear after timer) this value defines, in seconds, the duration until the marker is reset after being activated. diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index d512637d..03e42ae7 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -452,7 +452,7 @@ def generate_cpp_variable_data( side_effects: List[str] = [] args: List[str] = [] xml_child_export: List[str] = [] - xml_parent_export: List[str] = [] + xml_parent_export: str = "" protobuf_field: str = "" is_xml_export: bool = True is_trigger: bool = False @@ -489,6 +489,7 @@ def generate_cpp_variable_data( xml_export = "" args = XML_ATTRIBUTE_PARSER_DEFAULT_ARGUMENTS.copy( + if fieldval['type'] in documentation_type_data: cpp_type = documentation_type_data[fieldval['type']]["cpp_type"] class_name = documentation_type_data[fieldval['type']]["class_name"] diff --git a/xml_converter/src/icon_gen.cpp b/xml_converter/src/icon_gen.cpp index 92ddddb8..5f7fb7e8 100644 --- a/xml_converter/src/icon_gen.cpp +++ b/xml_converter/src/icon_gen.cpp @@ -218,7 +218,7 @@ bool Icon::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectorreset_behavior = parse_reset_behavior(attribute, errors); this->reset_behavior_is_set = true; } - else if (attributename == "resetoffset") { + else if (attributename == "resetlength") { this->reset_length = parse_float(attribute, errors); this->reset_length_is_set = true; } @@ -436,7 +436,7 @@ vector Icon::as_xml() const { xml_node_contents.push_back(" Behavior=\"" + stringify_reset_behavior(this->reset_behavior) + "\""); } if (this->reset_length_is_set) { - xml_node_contents.push_back(" ResetOffset=\"" + stringify_float(this->reset_length) + "\""); + xml_node_contents.push_back(" ResetLength=\"" + stringify_float(this->reset_length) + "\""); } if (this->reset_offset_is_set) { xml_node_contents.push_back(" ResetLength=\"" + stringify_float(this->reset_offset) + "\""); @@ -632,7 +632,7 @@ waypoint::Icon Icon::as_protobuf() const { if (trigger == nullptr) { trigger = new waypoint::Trigger(); } - trigger->set_reset_offset(this->reset_length); + trigger->set_reset_length(this->reset_length); } if (this->reset_offset_is_set) { if (trigger == nullptr) { @@ -831,8 +831,8 @@ void Icon::parse_protobuf(waypoint::Icon proto_icon) { this->reset_behavior = from_proto_reset_behavior(trigger.reset_behavior()); this->reset_behavior_is_set = true; } - if (trigger.reset_offset() != 0) { - this->reset_length = trigger.reset_offset(); + if (trigger.reset_length() != 0) { + this->reset_length = trigger.reset_length(); this->reset_length_is_set = true; } if (trigger.reset_length() != 0) { From 625ded075f28aec7b21033b22cd00ca1628b003d Mon Sep 17 00:00:00 2001 From: klingbolt Date: Tue, 21 Mar 2023 21:09:45 -0400 Subject: [PATCH 190/539] Removing unused variables --- xml_converter/generators/cpp_templates/class_template.cpp | 2 +- xml_converter/src/icon_gen.cpp | 6 +++--- xml_converter/src/icon_gen.hpp | 6 ------ xml_converter/src/trail_gen.cpp | 3 +++ xml_converter/src/trail_gen.hpp | 6 ------ 5 files changed, 7 insertions(+), 16 deletions(-) diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index 78483ff2..9d0f74e9 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -84,7 +84,7 @@ vector {{cpp_class}}::as_xml() const { {% if attribute_variable.is_xml_export == true %} {% if (attribute_variable.attribute_type in ["CompoundValue", "CompoundCustomClass"] and attribute_variable.compound_name != None) %} if (this->{{attribute_variable.compound_name}}_is_set) { - xml_node_contents.push_back(" {{attribute_variable.default_xml_fields[0]}}=\"" + stringify_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}}) + "\""); + xml_node_contents.push_back(" {{attribute_variable.default_xml_fields[0]}}=\"" + stringify_{{attribute_variable.class_name}}(this->{{attribute_variable.compound_name}}.{{attribute_variable.attribute_name}}) + "\""); } {% else %} if (this->{{attribute_variable.attribute_name}}_is_set) { diff --git a/xml_converter/src/icon_gen.cpp b/xml_converter/src/icon_gen.cpp index 5f7fb7e8..085d1529 100644 --- a/xml_converter/src/icon_gen.cpp +++ b/xml_converter/src/icon_gen.cpp @@ -472,13 +472,13 @@ vector Icon::as_xml() const { xml_node_contents.push_back(" TriggerRange=\"" + stringify_float(this->trigger_range) + "\""); } if (this->position_is_set) { - xml_node_contents.push_back(" XPos=\"" + to_string(this->position.x_position) + "\""); + xml_node_contents.push_back(" XPos=\"" + stringify_float(this->position.x_position) + "\""); } if (this->position_is_set) { - xml_node_contents.push_back(" YPos=\"" + to_string(this->position.y_position) + "\""); + xml_node_contents.push_back(" YPos=\"" + stringify_float(this->position.y_position) + "\""); } if (this->position_is_set) { - xml_node_contents.push_back(" ZPos=\"" + to_string(this->position.z_position) + "\""); + xml_node_contents.push_back(" ZPos=\"" + stringify_float(this->position.z_position) + "\""); } xml_node_contents.push_back("/>"); return xml_node_contents; diff --git a/xml_converter/src/icon_gen.hpp b/xml_converter/src/icon_gen.hpp index d35f058a..919d36b4 100644 --- a/xml_converter/src/icon_gen.hpp +++ b/xml_converter/src/icon_gen.hpp @@ -28,7 +28,6 @@ class Icon : public Parseable { int achievement_bitmask; int achievement_id; bool auto_trigger; - float blue; float bounce_delay; float bounce_duration; float bounce_height; @@ -42,7 +41,6 @@ class Icon : public Parseable { float distance_fade_start; EulerRotation euler_rotation; FestivalFilter festival_filter; - float green; UniqueId guid; bool has_countdown; float height_offset; @@ -59,7 +57,6 @@ class Icon : public Parseable { MountFilter mount_filter; Position position; ProfessionFilter profession_filter; - float red; bool render_ingame; bool render_on_map; bool render_on_minimap; @@ -79,7 +76,6 @@ class Icon : public Parseable { bool achievement_bitmask_is_set = false; bool achievement_id_is_set = false; bool auto_trigger_is_set = false; - bool blue_is_set = false; bool bounce_delay_is_set = false; bool bounce_duration_is_set = false; bool bounce_height_is_set = false; @@ -93,7 +89,6 @@ class Icon : public Parseable { bool distance_fade_start_is_set = false; bool euler_rotation_is_set = false; bool festival_filter_is_set = false; - bool green_is_set = false; bool guid_is_set = false; bool has_countdown_is_set = false; bool height_offset_is_set = false; @@ -110,7 +105,6 @@ class Icon : public Parseable { bool mount_filter_is_set = false; bool position_is_set = false; bool profession_filter_is_set = false; - bool red_is_set = false; bool render_ingame_is_set = false; bool render_on_map_is_set = false; bool render_on_minimap_is_set = false; diff --git a/xml_converter/src/trail_gen.cpp b/xml_converter/src/trail_gen.cpp index d5465b9e..d065b3de 100644 --- a/xml_converter/src/trail_gen.cpp +++ b/xml_converter/src/trail_gen.cpp @@ -199,6 +199,9 @@ vector Trail::as_xml() const { if (this->achievement_id_is_set) { xml_node_contents.push_back(" AchievementId=\"" + stringify_int(this->achievement_id) + "\""); } + if (this->color_is_set) { + xml_node_contents.push_back(" Alpha=\"" + stringify_float(this->color.alpha) + "\""); + } if (this->animation_speed_is_set) { xml_node_contents.push_back(" AnimSpeed=\"" + stringify_float(this->animation_speed) + "\""); } diff --git a/xml_converter/src/trail_gen.hpp b/xml_converter/src/trail_gen.hpp index 5f58444a..d2a5d488 100644 --- a/xml_converter/src/trail_gen.hpp +++ b/xml_converter/src/trail_gen.hpp @@ -26,7 +26,6 @@ class Trail : public Parseable { int achievement_bitmask; int achievement_id; float animation_speed; - float blue; bool can_fade; MarkerCategory category; Color color; @@ -34,7 +33,6 @@ class Trail : public Parseable { float distance_fade_end; float distance_fade_start; FestivalFilter festival_filter; - float green; UniqueId guid; bool is_wall; int map_display_size; @@ -42,7 +40,6 @@ class Trail : public Parseable { MapTypeFilter map_type_filter; MountFilter mount_filter; ProfessionFilter profession_filter; - float red; bool render_ingame; bool render_on_map; bool render_on_minimap; @@ -56,7 +53,6 @@ class Trail : public Parseable { bool achievement_bitmask_is_set = false; bool achievement_id_is_set = false; bool animation_speed_is_set = false; - bool blue_is_set = false; bool can_fade_is_set = false; bool category_is_set = false; bool color_is_set = false; @@ -64,7 +60,6 @@ class Trail : public Parseable { bool distance_fade_end_is_set = false; bool distance_fade_start_is_set = false; bool festival_filter_is_set = false; - bool green_is_set = false; bool guid_is_set = false; bool is_wall_is_set = false; bool map_display_size_is_set = false; @@ -72,7 +67,6 @@ class Trail : public Parseable { bool map_type_filter_is_set = false; bool mount_filter_is_set = false; bool profession_filter_is_set = false; - bool red_is_set = false; bool render_ingame_is_set = false; bool render_on_map_is_set = false; bool render_on_minimap_is_set = false; From 21b1a5126794a7222e7a8e5b997041a53e7f170c Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sat, 6 May 2023 20:30:26 -0400 Subject: [PATCH 191/539] Made changes to color and generated code templates and generator --- xml_converter/doc/position/position.md | 2 +- xml_converter/doc/rotation/euler_rotation.md | 2 +- xml_converter/doc/texture/color.md | 4 +- xml_converter/generators/code_generator.py | 88 ++++---- .../cpp_templates/class_template.cpp | 207 ++++++++---------- .../cpp_templates/class_template.hpp | 4 +- .../cpp_templates/compoundvalue.cpp | 23 +- xml_converter/src/attribute/color.cpp | 83 ++++--- xml_converter/src/attribute/color.hpp | 4 - .../src/attribute/euler_rotation_gen.cpp | 1 + xml_converter/src/category_gen.cpp | 1 + xml_converter/src/icon_gen.cpp | 129 +++++------ xml_converter/src/trail_gen.cpp | 35 +-- 13 files changed, 296 insertions(+), 287 deletions(-) diff --git a/xml_converter/doc/position/position.md b/xml_converter/doc/position/position.md index a6898767..390cc514 100644 --- a/xml_converter/doc/position/position.md +++ b/xml_converter/doc/position/position.md @@ -5,7 +5,7 @@ applies_to: ["Icon"] xml_fields: ["Position"] compatability: [TacO, Burrito, BlishHUD] protobuf_field: position -xml_parent_export: "" +xml_parent_export: [] xml_child_export: ["X Position", "Y Position", "Z Position"] components: diff --git a/xml_converter/doc/rotation/euler_rotation.md b/xml_converter/doc/rotation/euler_rotation.md index 71e56289..d8c3004e 100644 --- a/xml_converter/doc/rotation/euler_rotation.md +++ b/xml_converter/doc/rotation/euler_rotation.md @@ -5,7 +5,7 @@ applies_to: ["Icon"] xml_fields: ["Rotate"] compatability: [TacO, Burrito, BlishHUD] protobuf_field: euler_rotation -xml_parent_export: "'X Rotation', 'Y Rotation', 'Z Rotation'" +xml_parent_export: ['X Rotation', 'Y Rotation', 'Z Rotation'] xml_child_export: [] components: - name: X Rotation diff --git a/xml_converter/doc/texture/color.md b/xml_converter/doc/texture/color.md index d1b69e1d..df6e7965 100644 --- a/xml_converter/doc/texture/color.md +++ b/xml_converter/doc/texture/color.md @@ -6,8 +6,8 @@ applies_to: [Icon, Trail] xml_fields: [Color, BHColor] protobuf_field: rgba_color compatability: [TacO, BlishHUD, Burrito] -xml_parent_export: "{Red},{Green},{Blue}" -xml_child_export: ["Alpha"] +xml_parent_export: ['Red', 'Green', 'Blue'] +xml_child_export: ['Alpha'] components: diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 03e42ae7..e9ab74f3 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -135,12 +135,15 @@ properties: {shared_field_properties} xml_parent_export: - type: string + type: array + items: + type: string + pattern: "^[A-Za-z ]+$" xml_child_export: type: array items: type: string - pattern: "^[A-Za-z' ]+$" + pattern: "^[A-Za-z ]+$" components: type: array items: @@ -157,7 +160,7 @@ type: array items: type: string - pattern: "^[A-Za-z ]+$" + pattern: "^[A-Za-z]+$" protobuf_field: type: string pattern: "^[a-z_.]+$" @@ -189,12 +192,15 @@ uses_file_path: type: boolean xml_parent_export: - type: string + type: array + items: + type: string + pattern: "^[A-Za-z ]+$" xml_child_export: type: array items: type: string - pattern: "^[A-Za-z' ]+$" + pattern: "^[A-Za-z ]+$" """.format( shared_field_properties="""type: @@ -297,15 +303,14 @@ class AttributeVariable: xml_fields: List[str] protobuf_field: str args: List[str] = field(default_factory=list) - default_xml_fields: List[str] = field(default_factory=list) + default_xml_field: str = "" side_effects: List[str] = field(default_factory=list) - compound_name: Optional[str] = None - xml_child_export: str = "" - xml_parent_export: str = "" - compound_name: Optional[str] = None - is_xml_export: bool = True + xml_parent_export: List[str] = field(default_factory=list) + parser_flag_name: Optional[str] = "" + write_to_xml: bool = True is_trigger: bool = False uses_file_path: bool = False + is_component: bool = False XML_ATTRIBUTE_PARSER_DEFAULT_ARGUMENTS: Final[List[str]] = ["attribute", "errors"] @@ -448,13 +453,11 @@ def generate_cpp_variable_data( attribute_name: str = "" attribute_variables: List[AttributeVariable] = [] xml_fields: List[str] = [] - default_xml_fields: List[str] = [] + default_xml_field: str = "" side_effects: List[str] = [] args: List[str] = [] - xml_child_export: List[str] = [] - xml_parent_export: str = "" protobuf_field: str = "" - is_xml_export: bool = True + write_to_xml: bool = True is_trigger: bool = False cpp_includes.hpp_absolute_includes.add("string") @@ -484,18 +487,16 @@ def generate_cpp_variable_data( if doc_type in fieldval['applies_to']: xml_fields = [] - default_xml_fields = [] + default_xml_field = "" side_effects = [] - xml_export = "" - args = XML_ATTRIBUTE_PARSER_DEFAULT_ARGUMENTS.copy( - + write_to_xml = True + args = XML_ATTRIBUTE_PARSER_DEFAULT_ARGUMENTS.copy() if fieldval['type'] in documentation_type_data: cpp_type = documentation_type_data[fieldval['type']]["cpp_type"] class_name = documentation_type_data[fieldval['type']]["class_name"] cpp_includes.cpp_relative_includes.add("attribute/{}.hpp".format(class_name)) - elif fieldval['type'] in ["Custom", "CompoundCustomClass"]: cpp_type = fieldval['class'] class_name = insert_delimiter(fieldval['class'], delimiter="_") @@ -515,7 +516,7 @@ def generate_cpp_variable_data( for x in fieldval['xml_fields']: xml_fields.append(lowercase(x, delimiter="")) - default_xml_fields.append(fieldval['xml_fields'][0]) + default_xml_field = fieldval['xml_fields'][0] if fieldval["protobuf_field"].startswith("trigger"): is_trigger = True @@ -532,30 +533,35 @@ def generate_cpp_variable_data( side_effects.append(attribute_name_from_markdown_data(side_effect)) # Compound Values are unique in that the components have xml fields in addition to the compound variable - if fieldval['type'] == "CompoundValue": - xml_export = fieldval['xml_export'] + if fieldval['type'] in ["CompoundValue", "CompoundCustomClass"]: for component in fieldval['components']: - component_xml_fields = [] - component_default_xml_fields = [] - for item in component['xml_fields']: - if xml_export == "Children": - component_default_xml_fields.append(item) - if xml_export == "Parent": - component_default_xml_fields.append(fieldval["xml_fields"][0]) - component_xml_fields.append(lowercase(item, delimiter="")) + component_xml_fields: List[str] = [] + for x in component['xml_fields']: + component_xml_fields.append(lowercase(x, delimiter="")) + component_default_xml_field: str = "" + component_class_name = documentation_type_data[component['type']]["class_name"] + if component['name'] in fieldval['xml_child_export']: + component_default_xml_field = component['xml_fields'][0] + write_to_xml = True + if component['name'] in fieldval['xml_parent_export']: + component_default_xml_field = fieldval['xml_fields'][0] + write_to_xml = False component_attribute_variable = AttributeVariable( - attribute_name=lowercase(component['name'], delimiter="_"), + attribute_name=lowercase(fieldval['name'], delimiter="_") + "." + lowercase(component['name'], delimiter="_"), attribute_type="CompoundValue", cpp_type=doc_type_to_cpp_type[component['type']], - class_name=class_name, + class_name=component_class_name, xml_fields=component_xml_fields, - default_xml_fields=component_default_xml_fields, - xml_export=xml_export, + default_xml_field=component_default_xml_field, protobuf_field=component["protobuf_field"], - compound_name=lowercase(fieldval['name'], delimiter="_"), + parser_flag_name=lowercase(fieldval['name'], delimiter="_"), + write_to_xml=write_to_xml, + is_component=True, args=args, ) attribute_variables.append(component_attribute_variable) + if fieldval['xml_parent_export'] == []: + write_to_xml = False attribute_variable = AttributeVariable( attribute_name=attribute_name, @@ -563,14 +569,13 @@ def generate_cpp_variable_data( cpp_type=cpp_type, class_name=class_name, xml_fields=xml_fields, - default_xml_fields=default_xml_fields, - xml_child_export=xml_child_export, - xml_parent_export=xml_parent_export, + default_xml_field=default_xml_field, protobuf_field=protobuf_field, is_trigger=is_trigger, args=args, + write_to_xml=write_to_xml, + parser_flag_name=attribute_name, side_effects=side_effects, - is_xml_export=is_xml_export, ) attribute_variables.append(attribute_variable) @@ -653,8 +658,7 @@ def write_attribute(self, output_directory: str) -> None: cpp_type=doc_type_to_cpp_type[component['type']], class_name=attribute_name, xml_fields=xml_fields, - xml_child_export=metadata[filepath]["xml_child_export"], - xml_parent_export=metadata[filepath]["xml_parent_export"], + xml_parent_export=metadata[filepath]['xml_parent_export'], protobuf_field=component["protobuf_field"], is_trigger=is_trigger, ) diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index 9d0f74e9..a5741248 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -39,26 +39,14 @@ bool {{cpp_class}}::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vec attributename = normalize(get_attribute_name(attribute)); {% for n, attribute_variable in enumerate(attribute_variables) %} {% for i, value in enumerate(attribute_variable.xml_fields) %} - {% if i == 0 and n == 0: %} - if (attributename == "{{value}}") { - this->{{attribute_variable.attribute_name}} = parse_{{attribute_variable.class_name}}({{", ".join(attribute_variable.args)}}); - this->{{attribute_variable.attribute_name}}_is_set = true; - } - {% elif (attribute_variable.attribute_type in ["CompoundValue", "CompoundCustomClass"] and attribute_variable.compound_name != None) %} - else if (attributename == "{{value}}") { - this->{{attribute_variable.compound_name}}.{{attribute_variable.attribute_name}} = parse_float(attribute, errors); - this->{{attribute_variable.compound_name}}_is_set = true; - } - {% else: %} - else if (attributename == "{{value}}") { - this->{{attribute_variable.attribute_name}} = parse_{{attribute_variable.class_name}}({{", ".join(attribute_variable.args)}}); - this->{{attribute_variable.attribute_name}}_is_set = true; - {% for side_effect in attribute_variable.side_effects %} - this->{{side_effect}} = this->{{attribute_variable.class_name}}.side_effect_{{side_effect}}; - this->{{side_effect}}_is_set = true; - {% endfor %} - } - {% endif %} + {{ "" if i == 0 and n == 0 else "else " }}if (attributename == "{{value}}") { + this->{{attribute_variable.attribute_name}} = parse_{{attribute_variable.class_name}}({{", ".join(attribute_variable.args)}}); + this->{{attribute_variable.parser_flag_name}}_is_set = true; + {% for side_effect in attribute_variable.side_effects %} + this->{{side_effect}} = this->{{attribute_variable.class_name}}.side_effect_{{side_effect}}; + this->{{side_effect}}_is_set = true; + {% endfor %} + } {% endfor %} {% endfor %} else { @@ -66,8 +54,7 @@ bool {{cpp_class}}::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vec } return true; } - -{%- if attributes_of_type_marker_category %} +{% if attributes_of_type_marker_category %} bool {{cpp_class}}::validate_attributes_of_type_marker_category() { {% for attribute in attributes_of_type_marker_category %} @@ -81,20 +68,14 @@ vector {{cpp_class}}::as_xml() const { vector xml_node_contents; xml_node_contents.push_back("<{{xml_class_name}} "); {% for attribute_variable in attribute_variables %} - {% if attribute_variable.is_xml_export == true %} - {% if (attribute_variable.attribute_type in ["CompoundValue", "CompoundCustomClass"] and attribute_variable.compound_name != None) %} - if (this->{{attribute_variable.compound_name}}_is_set) { - xml_node_contents.push_back(" {{attribute_variable.default_xml_fields[0]}}=\"" + stringify_{{attribute_variable.class_name}}(this->{{attribute_variable.compound_name}}.{{attribute_variable.attribute_name}}) + "\""); - } - {% else %} - if (this->{{attribute_variable.attribute_name}}_is_set) { - xml_node_contents.push_back(" {{attribute_variable.default_xml_fields[0]}}=\"" + stringify_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}}) + "\""); - } - {% endif %} - {% endif %} -{% endfor %} -{% if cpp_class == "Category": %} - xml_node_contents.push_back(">\n"); + {% if attribute_variable.write_to_xml == true %} + if (this->{{attribute_variable.parser_flag_name}}_is_set) { + xml_node_contents.push_back(" {{attribute_variable.default_xml_field}}=\"" + stringify_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}}) + "\""); + } + {% endif %} + {% endfor %} + {% if cpp_class == "Category": %} + xml_node_contents.push_back(">\n"); for (const auto& [key, val] : this->children) { string text; @@ -118,43 +99,44 @@ waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf() const { waypoint::Trigger* trigger = nullptr; {% endif %} {% for attribute_variable in attribute_variables %} - {% if (attribute_variable.is_trigger == true)%} - {% if (attribute_variable.attribute_type == "Custom")%} - if (this->{{attribute_variable.attribute_name}}_is_set) { - if (trigger == nullptr) { - trigger = new waypoint::Trigger(); + {% if attribute_variable.is_component == false %} + {% if (attribute_variable.is_trigger == true)%} + {% if (attribute_variable.attribute_type == "Custom")%} + if (this->{{attribute_variable.attribute_name}}_is_set) { + if (trigger == nullptr) { + trigger = new waypoint::Trigger(); + } + trigger->set_allocated_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); } - trigger->set_allocated_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); - } - {% elif (attribute_variable.attribute_type == "Enum")%} - if (this->{{attribute_variable.attribute_name}}_is_set) { - if (trigger == nullptr) { - trigger = new waypoint::Trigger(); + {% elif (attribute_variable.attribute_type == "Enum")%} + if (this->{{attribute_variable.attribute_name}}_is_set) { + if (trigger == nullptr) { + trigger = new waypoint::Trigger(); + } + trigger->set_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); } - trigger->set_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); - } - {% else: %} - if (this->{{attribute_variable.attribute_name}}_is_set) { - if (trigger == nullptr) { - trigger = new waypoint::Trigger(); + {% else: %} + if (this->{{attribute_variable.attribute_name}}_is_set) { + if (trigger == nullptr) { + trigger = new waypoint::Trigger(); + } + trigger->set_{{attribute_variable.protobuf_field}}(this->{{attribute_variable.attribute_name}}); } - trigger->set_{{attribute_variable.protobuf_field}}(this->{{attribute_variable.attribute_name}}); - } - {% endif %} - {% else: %} - {% if (attribute_variable.attribute_type == "Enum")%} - if (this->{{attribute_variable.attribute_name}}_is_set) { - proto_{{cpp_class_header}}.set_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); - } - {% elif (attribute_variable.attribute_type in ["MultiflagValue", "CompoundValue", "Custom", "CompoundCustomClass"]) and attribute_variable.compound_name == None%} - if (this->{{attribute_variable.attribute_name}}_is_set) { - proto_{{cpp_class_header}}.set_allocated_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); - } - {% elif (attribute_variable.compound_name != None)%} + {% endif %} {% else: %} - if (this->{{attribute_variable.attribute_name}}_is_set) { - proto_{{cpp_class_header}}.set_{{attribute_variable.protobuf_field}}(this->{{attribute_variable.attribute_name}}); - } + {% if (attribute_variable.attribute_type == "Enum")%} + if (this->{{attribute_variable.attribute_name}}_is_set) { + proto_{{cpp_class_header}}.set_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); + } + {% elif (attribute_variable.attribute_type in ["MultiflagValue", "CompoundValue", "Custom", "CompoundCustomClass"])%} + if (this->{{attribute_variable.attribute_name}}_is_set) { + proto_{{cpp_class_header}}.set_allocated_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); + } + {% else: %} + if (this->{{attribute_variable.attribute_name}}_is_set) { + proto_{{cpp_class_header}}.set_{{attribute_variable.protobuf_field}}(this->{{attribute_variable.attribute_name}}); + } + {% endif %} {% endif %} {% endif %} {% endfor %} @@ -177,50 +159,51 @@ void {{cpp_class}}::parse_protobuf(waypoint::{{cpp_class}} proto_{{cpp_class_hea waypoint::Trigger trigger = proto_{{cpp_class_header}}.trigger(); {% endif %} {% for attribute_variable in attribute_variables %} - {% if (attribute_variable.is_trigger == true) %} - {% if (attribute_variable.attribute_type == "Custom") %} - if (trigger.has_{{attribute_variable.protobuf_field}}()) { - this->{{attribute_variable.attribute_name}} = from_proto_{{attribute_variable.class_name}}(trigger.{{attribute_variable.protobuf_field}}()); - this->{{attribute_variable.attribute_name}}_is_set = true; - } - {% elif attribute_variable.class_name == "string" %} - if (trigger.{{attribute_variable.protobuf_field}}() != "") { - this->{{attribute_variable.attribute_name}} = trigger.{{attribute_variable.protobuf_field}}(); - this->{{attribute_variable.attribute_name}}_is_set = true; - } - {% elif (attribute_variable.attribute_type == "Enum") %} - if (trigger.{{attribute_variable.protobuf_field}}() != 0) { - this->{{attribute_variable.attribute_name}} = from_proto_{{attribute_variable.class_name}}(trigger.{{attribute_variable.protobuf_field}}()); - this->{{attribute_variable.attribute_name}}_is_set = true; - } - {% else: %} - if (trigger.{{attribute_variable.protobuf_field}}() != 0) { - this->{{attribute_variable.attribute_name}} = trigger.{{attribute_variable.protobuf_field}}(); - this->{{attribute_variable.attribute_name}}_is_set = true; - } - {% endif %} - {% else: %} - {% if (attribute_variable.attribute_type == "Enum") %} - if (proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}() != 0) { - this->{{attribute_variable.attribute_name}} = from_proto_{{attribute_variable.class_name}}(proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}()); - this->{{attribute_variable.attribute_name}}_is_set = true; - } - {% elif (attribute_variable.attribute_type in ["MultiflagValue", "CompoundValue", "Custom", "CompoundCustomClass"]) and attribute_variable.compound_name == None%} - if (proto_{{cpp_class_header}}.has_{{attribute_variable.protobuf_field}}()) { - this->{{attribute_variable.attribute_name}} = from_proto_{{attribute_variable.class_name}}(proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}()); - this->{{attribute_variable.attribute_name}}_is_set = true; - } - {% elif (attribute_variable.compound_name != None) %} - {% elif (attribute_variable.class_name == "string") %} - if (proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}() != "") { - this->{{attribute_variable.attribute_name}} = proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}(); - this->{{attribute_variable.attribute_name}}_is_set = true; - } + {% if attribute_variable.is_component == false %} + {% if (attribute_variable.is_trigger == true) %} + {% if (attribute_variable.attribute_type == "Custom") %} + if (trigger.has_{{attribute_variable.protobuf_field}}()) { + this->{{attribute_variable.attribute_name}} = from_proto_{{attribute_variable.class_name}}(trigger.{{attribute_variable.protobuf_field}}()); + this->{{attribute_variable.attribute_name}}_is_set = true; + } + {% elif attribute_variable.class_name == "string" %} + if (trigger.{{attribute_variable.protobuf_field}}() != "") { + this->{{attribute_variable.attribute_name}} = trigger.{{attribute_variable.protobuf_field}}(); + this->{{attribute_variable.attribute_name}}_is_set = true; + } + {% elif (attribute_variable.attribute_type == "Enum") %} + if (trigger.{{attribute_variable.protobuf_field}}() != 0) { + this->{{attribute_variable.attribute_name}} = from_proto_{{attribute_variable.class_name}}(trigger.{{attribute_variable.protobuf_field}}()); + this->{{attribute_variable.attribute_name}}_is_set = true; + } + {% else: %} + if (trigger.{{attribute_variable.protobuf_field}}() != 0) { + this->{{attribute_variable.attribute_name}} = trigger.{{attribute_variable.protobuf_field}}(); + this->{{attribute_variable.attribute_name}}_is_set = true; + } + {% endif %} {% else: %} - if (proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}() != 0) { - this->{{attribute_variable.attribute_name}} = proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}(); - this->{{attribute_variable.attribute_name}}_is_set = true; - } + {% if (attribute_variable.attribute_type == "Enum") %} + if (proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}() != 0) { + this->{{attribute_variable.attribute_name}} = from_proto_{{attribute_variable.class_name}}(proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}()); + this->{{attribute_variable.attribute_name}}_is_set = true; + } + {% elif (attribute_variable.attribute_type in ["MultiflagValue", "CompoundValue", "Custom", "CompoundCustomClass"])%} + if (proto_{{cpp_class_header}}.has_{{attribute_variable.protobuf_field}}()) { + this->{{attribute_variable.attribute_name}} = from_proto_{{attribute_variable.class_name}}(proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}()); + this->{{attribute_variable.attribute_name}}_is_set = true; + } + {% elif (attribute_variable.class_name == "string") %} + if (proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}() != "") { + this->{{attribute_variable.attribute_name}} = proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}(); + this->{{attribute_variable.attribute_name}}_is_set = true; + } + {% else: %} + if (proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}() != 0) { + this->{{attribute_variable.attribute_name}} = proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}(); + this->{{attribute_variable.attribute_name}}_is_set = true; + } + {% endif %} {% endif %} {% endif %} {% endfor %} diff --git a/xml_converter/generators/cpp_templates/class_template.hpp b/xml_converter/generators/cpp_templates/class_template.hpp index 7574f46a..014f8431 100644 --- a/xml_converter/generators/cpp_templates/class_template.hpp +++ b/xml_converter/generators/cpp_templates/class_template.hpp @@ -15,12 +15,12 @@ class {{cpp_class}} : public Parseable { public: {% for attribute_variable in attribute_variables: %} - {% if attribute_variable.compound_name == None: %} + {% if attribute_variable.is_component == false: %} {{attribute_variable.cpp_type}} {{attribute_variable.attribute_name}}; {% endif %} {% endfor %} {% for attribute_variable in attribute_variables: %} - {% if attribute_variable.compound_name == None: %} + {% if attribute_variable.is_component == false: %} bool {{attribute_variable.attribute_name}}_is_set = false; {% endif %} {% endfor %} diff --git a/xml_converter/generators/cpp_templates/compoundvalue.cpp b/xml_converter/generators/cpp_templates/compoundvalue.cpp index 97d22ff8..4801beba 100644 --- a/xml_converter/generators/cpp_templates/compoundvalue.cpp +++ b/xml_converter/generators/cpp_templates/compoundvalue.cpp @@ -27,17 +27,18 @@ using namespace std; } return {{attribute_name}}; } -{% if attribute_variables[0].xml_parent_export != "" %} - string stringify_{{attribute_name}}({{class_name}} attribute_value) { - string output; - {% for n, attribute_variable in enumerate(attribute_variables) %} - {% if n == 0: %} - output = to_string(attribute_value.{{attribute_variables[n].attribute_name}}); - {% else %} - output = output + "," + to_string(attribute_value.{{attribute_variables[n].attribute_name}}); - {% endif %} - {% endfor %} - return output; +{% if attribute_variables[0].xml_parent_export != [] %} + +string stringify_{{attribute_name}}({{class_name}} attribute_value) { + string output; + {% for n, attribute_variable in enumerate(attribute_variables) %} + {% if n == 0: %} + output = to_string(attribute_value.{{attribute_variables[n].attribute_name}}); + {% else %} + output = output + "," + to_string(attribute_value.{{attribute_variables[n].attribute_name}}); + {% endif %} + {% endfor %} + return output; } {% endif %} diff --git a/xml_converter/src/attribute/color.cpp b/xml_converter/src/attribute/color.cpp index 83fe3a50..8d418b5f 100644 --- a/xml_converter/src/attribute/color.cpp +++ b/xml_converter/src/attribute/color.cpp @@ -3,7 +3,7 @@ #include #include -#include +#include #include #include #include @@ -14,6 +14,34 @@ using namespace std; +//////////////////////////////////////////////////////////////////////////////// +// int_to_float // float_to_int +// +// Helper functions to convert the value of colors from one type to another. +// Also serves to make sure the values stay within the bounds. +//////////////////////////////////////////////////////////////////////////////// +float int_to_float(int input) { + if (input > 255) { + input = 255; + } + if (input < 0) { + input = 0; + } + float output = static_cast(input) / 255.0f; + return output; +} + +int float_to_int(float input) { + if (input > 1.0) { + input = 1.0; + } + if (input < 0) { + input = 0; + } + int output = static_cast(input * 255); + return output; +} + //////////////////////////////////////////////////////////////////////////////// // parse_color // @@ -36,14 +64,14 @@ Color parse_color(rapidxml::xml_attribute<>* input, vector*) { if (std::regex_match(hex_string, hex_pattern)) { // Extract the R, G, B, and A values from the Hex string if (hex_string.size() == 6 || hex_string.size() == 8) { - color.r = std::stoi(hex_string.substr(0, 2), nullptr, 16); - color.g = std::stoi(hex_string.substr(2, 2), nullptr, 16); - color.b = std::stoi(hex_string.substr(4, 2), nullptr, 16); + color.red = int_to_float(std::stoi(hex_string.substr(0, 2), nullptr, 16)); + color.green = int_to_float(std::stoi(hex_string.substr(2, 2), nullptr, 16)); + color.blue = int_to_float(std::stoi(hex_string.substr(4, 2), nullptr, 16)); if (hex_string.size() == 8) { - color.a = std::stoi(hex_string.substr(6, 2), nullptr, 16); + color.alpha = int_to_float(std::stoi(hex_string.substr(6, 2), nullptr, 16)); } else { - color.a = 255; + color.alpha = 1.0; } } } @@ -59,13 +87,13 @@ string stringify_color(Color attribute_value) { std::stringstream stream; std::string hex_string = "#"; - stream << std::hex << attribute_value.r; + stream << std::hex << float_to_int(attribute_value.red); hex_string += stream.str(); - stream << std::hex << attribute_value.g; + stream << std::hex << float_to_int(attribute_value.green); hex_string += stream.str(); - stream << std::hex << attribute_value.b; + stream << std::hex << float_to_int(attribute_value.blue); hex_string += stream.str(); std::string rgb = hex_string; @@ -80,25 +108,14 @@ string stringify_color(Color attribute_value) { waypoint::RGBAColor* to_proto_color(Color attribute_value) { waypoint::RGBAColor* color = new waypoint::RGBAColor(); // The default RGB in burrito will be 000000 (i.e. black) - + // Default value of alpha in Burrito is 1.0 (i.e. 255) + int int_alpha = 255; // If alpha (float) is not the default value, convert to int if (attribute_value.alpha != 0) { - int alpha_int = static_cast(attribute_value.alpha * 255); - // Check that it doesnt exceed the bounds of {0,255} - if (alpha_int > 255) { - alpha_int = 255; - } - if (alpha_int < 0) { - alpha_int = 0; - } - attribute_value.a = alpha_int; - } - else { - // Default value of alpha in Burrito - attribute_value.a = 255; + int_alpha = float_to_int(attribute_value.alpha); } - uint32_t rgba = ((attribute_value.r & 0xff) << 24) + ((attribute_value.g & 0xff) << 16) + ((attribute_value.b & 0xff) << 8) + (attribute_value.a & 0xff); + uint32_t rgba = ((float_to_int(attribute_value.red) & 0xff) << 24) + ((float_to_int(attribute_value.green) & 0xff) << 16) + ((float_to_int(attribute_value.blue) & 0xff) << 8) + (int_alpha & 0xff); color->set_rgba_color(rgba); return color; } @@ -114,15 +131,15 @@ Color from_proto_color(waypoint::RGBAColor attribute_value) { stream << std::hex << attribute_value.rgba_color(); std::string hex_string = stream.str(); - color.r = std::stoi(hex_string.substr(0, 2), nullptr, 16); - color.g = std::stoi(hex_string.substr(2, 2), nullptr, 16); - color.b = std::stoi(hex_string.substr(4, 2), nullptr, 16); - color.a = std::stoi(hex_string.substr(6, 2), nullptr, 16); + int int_red = std::stoi(hex_string.substr(0, 2), nullptr, 16); + int int_green = std::stoi(hex_string.substr(2, 2), nullptr, 16); + int int_blue = std::stoi(hex_string.substr(4, 2), nullptr, 16); + int int_alpha = std::stoi(hex_string.substr(6, 2), nullptr, 16); + + color.red = int_to_float(int_red); + color.green = int_to_float(int_green); + color.blue = int_to_float(int_blue); + color.alpha = int_to_float(int_alpha); - color.red = static_cast(color.r) / 255.0f; - color.green = static_cast(color.g) / 255.0f; - color.blue = static_cast(color.b) / 255.0f; - color.alpha = static_cast(color.a) / 255.0f; - return color; } diff --git a/xml_converter/src/attribute/color.hpp b/xml_converter/src/attribute/color.hpp index 08449ddd..564e7307 100644 --- a/xml_converter/src/attribute/color.hpp +++ b/xml_converter/src/attribute/color.hpp @@ -16,10 +16,6 @@ class Color { float green; float blue; float alpha; - int r; - int g; - int b; - int a; }; Color parse_color(rapidxml::xml_attribute<>* input, std::vector* errors); diff --git a/xml_converter/src/attribute/euler_rotation_gen.cpp b/xml_converter/src/attribute/euler_rotation_gen.cpp index f960aee7..fcc17686 100644 --- a/xml_converter/src/attribute/euler_rotation_gen.cpp +++ b/xml_converter/src/attribute/euler_rotation_gen.cpp @@ -27,6 +27,7 @@ EulerRotation parse_euler_rotation(rapidxml::xml_attribute<>* input, vector* attribute, vector Category::as_xml() const { vector xml_node_contents; xml_node_contents.push_back("* attribute, vectorachievement_id = parse_int(attribute, errors); this->achievement_id_is_set = true; } - else if (attributename == "alpha") { - this->color.alpha = parse_float(attribute, errors); - this->color_is_set = true; - } else if (attributename == "autotrigger") { this->auto_trigger = parse_bool(attribute, errors); this->auto_trigger_is_set = true; } - else if (attributename == "blue") { - this->color.blue = parse_float(attribute, errors); - this->color_is_set = true; - } else if (attributename == "bouncedelay") { this->bounce_delay = parse_float(attribute, errors); this->bounce_delay_is_set = true; @@ -74,6 +66,22 @@ bool Icon::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectorcolor = parse_color(attribute, errors); this->color_is_set = true; } + else if (attributename == "alpha") { + this->color.alpha = parse_float(attribute, errors); + this->color_is_set = true; + } + else if (attributename == "blue") { + this->color.blue = parse_float(attribute, errors); + this->color_is_set = true; + } + else if (attributename == "green") { + this->color.green = parse_float(attribute, errors); + this->color_is_set = true; + } + else if (attributename == "red") { + this->color.red = parse_float(attribute, errors); + this->color_is_set = true; + } else if (attributename == "copy") { this->copy_clipboard = parse_string(attribute, errors); this->copy_clipboard_is_set = true; @@ -110,14 +118,22 @@ bool Icon::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectoreuler_rotation = parse_euler_rotation(attribute, errors); this->euler_rotation_is_set = true; } + else if (attributename == "rotatex") { + this->euler_rotation.x_rotation = parse_float(attribute, errors); + this->euler_rotation_is_set = true; + } + else if (attributename == "rotatey") { + this->euler_rotation.y_rotation = parse_float(attribute, errors); + this->euler_rotation_is_set = true; + } + else if (attributename == "rotatez") { + this->euler_rotation.z_rotation = parse_float(attribute, errors); + this->euler_rotation_is_set = true; + } else if (attributename == "festival") { this->festival_filter = parse_festival_filter(attribute, errors); this->festival_filter_is_set = true; } - else if (attributename == "green") { - this->color.green = parse_float(attribute, errors); - this->color_is_set = true; - } else if (attributename == "guid") { this->guid = parse_unique_id(attribute, errors); this->guid_is_set = true; @@ -182,14 +198,34 @@ bool Icon::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectorposition = parse_position(attribute, errors); this->position_is_set = true; } + else if (attributename == "xpos") { + this->position.x_position = parse_float(attribute, errors); + this->position_is_set = true; + } + else if (attributename == "positionx") { + this->position.x_position = parse_float(attribute, errors); + this->position_is_set = true; + } + else if (attributename == "ypos") { + this->position.y_position = parse_float(attribute, errors); + this->position_is_set = true; + } + else if (attributename == "positiony") { + this->position.y_position = parse_float(attribute, errors); + this->position_is_set = true; + } + else if (attributename == "zpos") { + this->position.z_position = parse_float(attribute, errors); + this->position_is_set = true; + } + else if (attributename == "positionz") { + this->position.z_position = parse_float(attribute, errors); + this->position_is_set = true; + } else if (attributename == "profession") { this->profession_filter = parse_profession_filter(attribute, errors); this->profession_filter_is_set = true; } - else if (attributename == "red") { - this->color.red = parse_float(attribute, errors); - this->color_is_set = true; - } else if (attributename == "ingamevisibility") { this->render_ingame = parse_bool(attribute, errors); this->render_ingame_is_set = true; @@ -278,47 +314,12 @@ bool Icon::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectortrigger_range = parse_float(attribute, errors); this->trigger_range_is_set = true; } - else if (attributename == "xpos") { - this->position.x_position = parse_float(attribute, errors); - this->position_is_set = true; - } - else if (attributename == "positionx") { - this->position.x_position = parse_float(attribute, errors); - this->position_is_set = true; - } - else if (attributename == "rotatex") { - this->euler_rotation.x_rotation = parse_float(attribute, errors); - this->euler_rotation_is_set = true; - } - else if (attributename == "ypos") { - this->position.y_position = parse_float(attribute, errors); - this->position_is_set = true; - } - else if (attributename == "positiony") { - this->position.y_position = parse_float(attribute, errors); - this->position_is_set = true; - } - else if (attributename == "rotatey") { - this->euler_rotation.y_rotation = parse_float(attribute, errors); - this->euler_rotation_is_set = true; - } - else if (attributename == "zpos") { - this->position.z_position = parse_float(attribute, errors); - this->position_is_set = true; - } - else if (attributename == "positionz") { - this->position.z_position = parse_float(attribute, errors); - this->position_is_set = true; - } - else if (attributename == "rotatez") { - this->euler_rotation.z_rotation = parse_float(attribute, errors); - this->euler_rotation_is_set = true; - } else { return false; } return true; } + bool Icon::validate_attributes_of_type_marker_category() { // TODO: validate "category" // TODO: validate "hide_category" @@ -336,9 +337,6 @@ vector Icon::as_xml() const { if (this->achievement_id_is_set) { xml_node_contents.push_back(" AchievementId=\"" + stringify_int(this->achievement_id) + "\""); } - if (this->color_is_set) { - xml_node_contents.push_back(" Alpha=\"" + stringify_float(this->color.alpha) + "\""); - } if (this->auto_trigger_is_set) { xml_node_contents.push_back(" AutoTrigger=\"" + stringify_bool(this->auto_trigger) + "\""); } @@ -360,6 +358,9 @@ vector Icon::as_xml() const { if (this->color_is_set) { xml_node_contents.push_back(" Color=\"" + stringify_color(this->color) + "\""); } + if (this->color_is_set) { + xml_node_contents.push_back(" Alpha=\"" + stringify_float(this->color.alpha) + "\""); + } if (this->copy_clipboard_is_set) { xml_node_contents.push_back(" Copy=\"" + stringify_string(this->copy_clipboard) + "\""); } @@ -420,6 +421,15 @@ vector Icon::as_xml() const { if (this->mount_filter_is_set) { xml_node_contents.push_back(" Mount=\"" + stringify_mount_filter(this->mount_filter) + "\""); } + if (this->position_is_set) { + xml_node_contents.push_back(" XPos=\"" + stringify_float(this->position.x_position) + "\""); + } + if (this->position_is_set) { + xml_node_contents.push_back(" YPos=\"" + stringify_float(this->position.y_position) + "\""); + } + if (this->position_is_set) { + xml_node_contents.push_back(" ZPos=\"" + stringify_float(this->position.z_position) + "\""); + } if (this->profession_filter_is_set) { xml_node_contents.push_back(" Profession=\"" + stringify_profession_filter(this->profession_filter) + "\""); } @@ -471,15 +481,6 @@ vector Icon::as_xml() const { if (this->trigger_range_is_set) { xml_node_contents.push_back(" TriggerRange=\"" + stringify_float(this->trigger_range) + "\""); } - if (this->position_is_set) { - xml_node_contents.push_back(" XPos=\"" + stringify_float(this->position.x_position) + "\""); - } - if (this->position_is_set) { - xml_node_contents.push_back(" YPos=\"" + stringify_float(this->position.y_position) + "\""); - } - if (this->position_is_set) { - xml_node_contents.push_back(" ZPos=\"" + stringify_float(this->position.z_position) + "\""); - } xml_node_contents.push_back("/>"); return xml_node_contents; } diff --git a/xml_converter/src/trail_gen.cpp b/xml_converter/src/trail_gen.cpp index d065b3de..e2491b5d 100644 --- a/xml_converter/src/trail_gen.cpp +++ b/xml_converter/src/trail_gen.cpp @@ -38,10 +38,6 @@ bool Trail::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectoranimation_speed = parse_float(attribute, errors); this->animation_speed_is_set = true; } - else if (attributename == "blue") { - this->color.blue = parse_float(attribute, errors); - this->color_is_set = true; - } else if (attributename == "canfade") { this->can_fade = parse_bool(attribute, errors); this->can_fade_is_set = true; @@ -62,6 +58,22 @@ bool Trail::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectorcolor = parse_color(attribute, errors); this->color_is_set = true; } + else if (attributename == "alpha") { + this->color.alpha = parse_float(attribute, errors); + this->color_is_set = true; + } + else if (attributename == "blue") { + this->color.blue = parse_float(attribute, errors); + this->color_is_set = true; + } + else if (attributename == "green") { + this->color.green = parse_float(attribute, errors); + this->color_is_set = true; + } + else if (attributename == "red") { + this->color.red = parse_float(attribute, errors); + this->color_is_set = true; + } else if (attributename == "cull") { this->cull_chirality = parse_cull_chirality(attribute, errors); this->cull_chirality_is_set = true; @@ -86,10 +98,6 @@ bool Trail::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectorfestival_filter = parse_festival_filter(attribute, errors); this->festival_filter_is_set = true; } - else if (attributename == "green") { - this->color.green = parse_float(attribute, errors); - this->color_is_set = true; - } else if (attributename == "guid") { this->guid = parse_unique_id(attribute, errors); this->guid_is_set = true; @@ -118,10 +126,6 @@ bool Trail::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectorprofession_filter = parse_profession_filter(attribute, errors); this->profession_filter_is_set = true; } - else if (attributename == "red") { - this->color.red = parse_float(attribute, errors); - this->color_is_set = true; - } else if (attributename == "ingamevisibility") { this->render_ingame = parse_bool(attribute, errors); this->render_ingame_is_set = true; @@ -185,6 +189,7 @@ bool Trail::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector Trail::as_xml() const { if (this->achievement_id_is_set) { xml_node_contents.push_back(" AchievementId=\"" + stringify_int(this->achievement_id) + "\""); } - if (this->color_is_set) { - xml_node_contents.push_back(" Alpha=\"" + stringify_float(this->color.alpha) + "\""); - } if (this->animation_speed_is_set) { xml_node_contents.push_back(" AnimSpeed=\"" + stringify_float(this->animation_speed) + "\""); } @@ -214,6 +216,9 @@ vector Trail::as_xml() const { if (this->color_is_set) { xml_node_contents.push_back(" Color=\"" + stringify_color(this->color) + "\""); } + if (this->color_is_set) { + xml_node_contents.push_back(" Alpha=\"" + stringify_float(this->color.alpha) + "\""); + } if (this->cull_chirality_is_set) { xml_node_contents.push_back(" Cull=\"" + stringify_cull_chirality(this->cull_chirality) + "\""); } From 2514bb71367156fe1c12c704bb74c020af48cd6b Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 7 May 2023 14:00:17 -0400 Subject: [PATCH 192/539] Removing changes that do not pertain to this PR --- xml_converter/doc/trigger/reset_offset.md | 12 ------------ xml_converter/proto/waypoint.proto | 1 - xml_converter/src/icon_gen.cpp | 17 ----------------- xml_converter/src/icon_gen.hpp | 2 -- xml_converter/src/xml_converter.cpp | 4 ++-- 5 files changed, 2 insertions(+), 34 deletions(-) delete mode 100644 xml_converter/doc/trigger/reset_offset.md diff --git a/xml_converter/doc/trigger/reset_offset.md b/xml_converter/doc/trigger/reset_offset.md deleted file mode 100644 index 38e75bee..00000000 --- a/xml_converter/doc/trigger/reset_offset.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -name: Reset Offset -type: Float32 -applies_to: [Icon] -xml_fields: [ResetLength] -protobuf_field: trigger.reset_length -compatability: [] ---- -When using behavior 5 ('Reappear on map reset') this value defines, in seconds, when the first map cycle of the day begins after the daily reset. -Notes -===== -Behavior 5 is Not implemented by TacO or BlishHUD \ No newline at end of file diff --git a/xml_converter/proto/waypoint.proto b/xml_converter/proto/waypoint.proto index 65156ca2..33545ca2 100644 --- a/xml_converter/proto/waypoint.proto +++ b/xml_converter/proto/waypoint.proto @@ -123,7 +123,6 @@ message Trigger { Category action_show_category = 13; Category action_toggle_category = 14; ResetBehavior reset_behavior = 15; - int32 reset_offset = 16; } message GUID { diff --git a/xml_converter/src/icon_gen.cpp b/xml_converter/src/icon_gen.cpp index 0f4c4252..3fff2a59 100644 --- a/xml_converter/src/icon_gen.cpp +++ b/xml_converter/src/icon_gen.cpp @@ -258,10 +258,6 @@ bool Icon::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectorreset_length = parse_float(attribute, errors); this->reset_length_is_set = true; } - else if (attributename == "resetlength") { - this->reset_offset = parse_float(attribute, errors); - this->reset_offset_is_set = true; - } else if (attributename == "scaleonmapwithzoom") { this->scale_on_map_with_zoom = parse_bool(attribute, errors); this->scale_on_map_with_zoom_is_set = true; @@ -448,9 +444,6 @@ vector Icon::as_xml() const { if (this->reset_length_is_set) { xml_node_contents.push_back(" ResetLength=\"" + stringify_float(this->reset_length) + "\""); } - if (this->reset_offset_is_set) { - xml_node_contents.push_back(" ResetLength=\"" + stringify_float(this->reset_offset) + "\""); - } if (this->scale_on_map_with_zoom_is_set) { xml_node_contents.push_back(" ScaleOnMapWithZoom=\"" + stringify_bool(this->scale_on_map_with_zoom) + "\""); } @@ -635,12 +628,6 @@ waypoint::Icon Icon::as_protobuf() const { } trigger->set_reset_length(this->reset_length); } - if (this->reset_offset_is_set) { - if (trigger == nullptr) { - trigger = new waypoint::Trigger(); - } - trigger->set_reset_length(this->reset_offset); - } if (this->scale_on_map_with_zoom_is_set) { proto_icon.set_scale_on_map_with_zoom(this->scale_on_map_with_zoom); } @@ -836,10 +823,6 @@ void Icon::parse_protobuf(waypoint::Icon proto_icon) { this->reset_length = trigger.reset_length(); this->reset_length_is_set = true; } - if (trigger.reset_length() != 0) { - this->reset_offset = trigger.reset_length(); - this->reset_offset_is_set = true; - } if (proto_icon.scale_on_map_with_zoom() != 0) { this->scale_on_map_with_zoom = proto_icon.scale_on_map_with_zoom(); this->scale_on_map_with_zoom_is_set = true; diff --git a/xml_converter/src/icon_gen.hpp b/xml_converter/src/icon_gen.hpp index 919d36b4..771b72fa 100644 --- a/xml_converter/src/icon_gen.hpp +++ b/xml_converter/src/icon_gen.hpp @@ -62,7 +62,6 @@ class Icon : public Parseable { bool render_on_minimap; ResetBehavior reset_behavior; float reset_length; - float reset_offset; bool scale_on_map_with_zoom; std::string schedule; float schedule_duration; @@ -110,7 +109,6 @@ class Icon : public Parseable { bool render_on_minimap_is_set = false; bool reset_behavior_is_set = false; bool reset_length_is_set = false; - bool reset_offset_is_set = false; bool scale_on_map_with_zoom_is_set = false; bool schedule_is_set = false; bool schedule_duration_is_set = false; diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 84bed650..c67414e9 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -217,7 +217,7 @@ vector parse_pois(rapidxml::xml_node<>* root_node, map markers; for (rapidxml::xml_node<>* node = root_node->first_node(); node; node = node->next_sibling()) { - if (normalize(get_node_name(node)) == "poi") { + if (get_node_name(node) == "POI") { Category* default_category = get_category(node, marker_categories, errors); Icon* icon = new Icon(); @@ -229,7 +229,7 @@ vector parse_pois(rapidxml::xml_node<>* root_node, mapinit_from_xml(node, errors); markers.push_back(icon); } - else if (normalize(get_node_name(node)) == "trail") { + else if (get_node_name(node) == "Tcd rail") { Category* default_category = get_category(node, marker_categories, errors); Trail* trail = new Trail(); From 0881b13adb1c6552b7c5a348872ab6cfb281b457 Mon Sep 17 00:00:00 2001 From: klingbolt <89052698+klingbolt@users.noreply.github.com> Date: Sun, 7 May 2023 18:05:45 -0400 Subject: [PATCH 193/539] Update xml_converter.cpp Accidental typo --- xml_converter/src/xml_converter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index c67414e9..1617b099 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -229,7 +229,7 @@ vector parse_pois(rapidxml::xml_node<>* root_node, mapinit_from_xml(node, errors); markers.push_back(icon); } - else if (get_node_name(node) == "Tcd rail") { + else if (get_node_name(node) == "Trail") { Category* default_category = get_category(node, marker_categories, errors); Trail* trail = new Trail(); From a71917a883b3fe03616b1e84dcd855f65b6f87e1 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 12 Mar 2023 00:23:30 -0500 Subject: [PATCH 194/539] Tree menu GUI for Marker Category Selection Addressing #77 --- Icon.gd | 3 + LocalData.gd | 27 +++++++ LocalData.tscn | 3 + Route.gd | 5 +- Route2D.gd | 7 ++ Route2D.tscn | 5 +- Spatial.gd | 212 +++++++++++++++++++++++++++++++++++++++---------- Spatial.tscn | 96 ++++++++++++++++------ project.godot | 1 + 9 files changed, 294 insertions(+), 65 deletions(-) create mode 100644 LocalData.gd create mode 100644 LocalData.tscn create mode 100644 Route2D.gd diff --git a/Icon.gd b/Icon.gd index 1d5dbaef..2cdd61ad 100644 --- a/Icon.gd +++ b/Icon.gd @@ -1,6 +1,9 @@ extends Sprite3D var texture_path +var category_name = "" +var is_editable = false + func set_icon_image(texture_path: String): self.texture_path = texture_path diff --git a/LocalData.gd b/LocalData.gd new file mode 100644 index 00000000..54082204 --- /dev/null +++ b/LocalData.gd @@ -0,0 +1,27 @@ +extends Node + +const LOCAL_DATA_PATH = "user://localdata.json" + +var visible_dict = {} +var _local_data + +func _ready(): + var file = File.new() + file.open(LOCAL_DATA_PATH, file.READ) + var text = file.get_as_text() + var datum = JSON.parse(text) + self._local_data = JSON.parse(text).result + load_local() + +func load_local(): + for key in self._local_data["visible_dict"].keys(): + self.visible_dict[key] = self._local_data["visible_dict"][key] + +func save_local(): + _local_data = { + "visible_dict": visible_dict + } + + var file = File.new() + file.open(LOCAL_DATA_PATH, File.WRITE) + file.store_string(JSON.print(self._local_data)) diff --git a/LocalData.tscn b/LocalData.tscn new file mode 100644 index 00000000..5ec353b0 --- /dev/null +++ b/LocalData.tscn @@ -0,0 +1,3 @@ +[gd_scene format=2] + +[node name="LocalData" type="Node"] diff --git a/Route.gd b/Route.gd index f0132264..7b46b3ee 100644 --- a/Route.gd +++ b/Route.gd @@ -1,8 +1,9 @@ extends Spatial var texture_path - +var category_name = "" var color = Color(0.9, 0.1, 0.1) +var is_editable = false var point_list := PoolVector3Array() @@ -17,6 +18,8 @@ func refresh_mesh(): for point_index in range(len(point_list)-1): var point:Vector3 = point_list[point_index] var next_point:Vector3 = point_list[point_index+1] + if point == Vector3(0,0,0) or next_point == Vector3(0,0,0): + continue var distance: float = point.distance_to(next_point) var normal: Vector3 = (next_point - point).normalized() diff --git a/Route2D.gd b/Route2D.gd new file mode 100644 index 00000000..f19e0214 --- /dev/null +++ b/Route2D.gd @@ -0,0 +1,7 @@ +extends Line2D + +var category_name = "" +var is_editable = false + +func _ready(): + pass # Replace with function body. diff --git a/Route2D.tscn b/Route2D.tscn index 5b3da3ed..8aed8671 100644 --- a/Route2D.tscn +++ b/Route2D.tscn @@ -1,4 +1,6 @@ -[gd_scene load_steps=3 format=2] +[gd_scene load_steps=4 format=2] + +[ext_resource path="res://Route2D.gd" type="Script" id=1] [sub_resource type="Shader" id=1] code = "shader_type canvas_item; @@ -27,3 +29,4 @@ material = SubResource( 2 ) points = PoolVector2Array( 0, 0, 0, 0, 0, 0 ) default_color = Color( 1, 1, 1, 1 ) texture_mode = 1 +script = ExtResource( 1 ) diff --git a/Spatial.gd b/Spatial.gd index 74c90986..a57f722b 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -20,6 +20,7 @@ var next_texture_path: String = "" # will be created. var currently_active_path = null var currently_active_path_2d = null +var currently_active_category = null var map_was_open = false @@ -54,6 +55,7 @@ func _ready(): taco_parser = TacoParser.new() x11_window_id_burrito = OS.get_native_handle(OS.WINDOW_HANDLE) OS.window_maximized = false + print(OS.get_current_screen()) # Start off with a small size before GW2 client is up OS.window_size = Vector2(800, 600) # Postion at top left corner @@ -286,6 +288,8 @@ func reset_minimap_masks(): var markerdata = Waypoint.Waypoint.new() var marker_file_dir = "user://protobins/" var marker_file_path = "" +var marker_packs_array = Array() +onready var marker_packs = get_node("Control/Dialogs/MarkerPacks/MarkerPacks") func load_waypoint_markers(map_id): self.marker_file_path = self.marker_file_dir + String(map_id) + ".data" @@ -384,7 +388,7 @@ onready var paths = $Paths onready var minimap = $Control/MiniMap func gen_map_markers(): - # Clear all the rendered assets to mak way for the new ones + # Clear all the rendered assets to make way for the new ones for path in paths.get_children(): path.queue_free() @@ -394,6 +398,9 @@ func gen_map_markers(): for icon in icons.get_children(): icon.queue_free() + marker_packs.clear() + build_category_tree() + # Load the data from the markers for path in self.markerdata.get_trail(): var path_points := PoolVector3Array() @@ -404,7 +411,7 @@ func gen_map_markers(): path_points.append(Vector3(trail_data.get_points_x()[index], trail_data.get_points_y()[index], trail_data.get_points_z()[index])) var texture_path = path.get_texture_path() var full_texture_path = self.marker_file_dir + texture_path.get_path() - gen_new_path(path_points, full_texture_path) + gen_new_path(path_points, full_texture_path, path.get_category().get_name()) for icon in self.markerdata.get_icon(): var position = icon.get_position() if position == null: @@ -413,13 +420,81 @@ func gen_map_markers(): var position_vector = Vector3(position.get_x(), position.get_y(), position.get_z()) var texture_path = icon.get_texture_path() if texture_path == null: - print("Warning: No texture found for icon") + #Some icons have their texture in a parent of the category. continue var full_texture_path = self.marker_file_dir + texture_path.get_path() - gen_new_icon(position_vector, full_texture_path) + gen_new_icon(position_vector, full_texture_path, icon.get_category().get_name()) + + +onready var local_data = get_node("Control/LocalData") + +func build_category_tree(): + var root = marker_packs.create_item() + root.set_text(0, "Markers available on current map") + root.set_selectable(0, false) + root.set_text(1, "Visible") + + for category in self.markerdata.get_category(): + add_category(root, category, category.get_name(), false) + + +func add_category(item: TreeItem, category, tree_path: String, collapsed: bool): + if category.get_name() != "": + var category_item = marker_packs.create_item(item) + category_item.set_text(0,category.get_display_name()) + category_item.set_metadata(0,category) + category_item.set_cell_mode(1, TreeItem.CELL_MODE_CHECK) + category_item.set_checked(1, self.local_data.visible_dict.get(tree_path, false)) + category_item.set_tooltip(1, "Show/Hide") + category_item.set_editable(1, true) + category_item.set_collapsed(collapsed) + for category_child in category.get_children(): + add_category(category_item, category_child, tree_path + "." + category_child.get_name(), true) + + +func switch_selected_category(category_item: TreeItem): + var selected_category_name = find_pedigree_name(category_item, category_item.get_metadata(0).get_name()) + local_data.visible_dict[selected_category_name] = category_item.is_checked(1) + switch_checkboxes(category_item, category_item.is_checked(1)) + + node_checkmark_switch(selected_category_name, category_item, self.paths) + node_checkmark_switch(selected_category_name, category_item, self.minimap) + node_checkmark_switch(selected_category_name, category_item, self.icons) + + $Control/LocalData.save_local() + + +func find_pedigree_name(category_item: TreeItem, pedigree_name: String): + var parent = category_item.get_parent() + if parent.is_selectable(0): + pedigree_name = parent.get_metadata(0).get_name() + "." + pedigree_name + pedigree_name = find_pedigree_name(parent, pedigree_name) + return pedigree_name + + +func node_checkmark_switch(selected_category_name: String, category_item, nodes): + for node in nodes.get_children(): + if node.category_name.begins_with(selected_category_name): + local_data.visible_dict[node.category_name] = category_item.is_checked(1) + if category_item.is_checked(1): + node.show() + else: + node.hide() + + +func switch_checkboxes(item: TreeItem, checked: bool): + if item.get_cell_mode(1) == TreeItem.CELL_MODE_CHECK: + item.set_checked(1, checked) + local_data.visible_dict[find_pedigree_name(item, item.get_metadata(0).get_name())] = checked + + var child_item = item.get_children() + while child_item != null: + switch_checkboxes(child_item, checked) + child_item = child_item.get_next() + + +func gen_new_path(points: Array, texture_path: String, category_name: String): -func gen_new_path(points: Array, texture_path: String): - var points_2d: PoolVector2Array = [] # Create the texture to use from an image file # TODO: We want to be able to cache this data so that if a texture is used # by multiple objects we only need to keep ony copy of it in memory. #22. @@ -439,13 +514,15 @@ func gen_new_path(points: Array, texture_path: String): texture.create_from_image(image, 22) # Create a new 3D route - var new_route = route_scene.instance() + # var new_curve = Curve3D.new() # for point in points: # new_curve.add_point(Vector3(point[0], point[1], -point[2])) # points_2d.append(Vector2(point[0], -point[2])) - # new_path.curve = new_curve +# path_3d_markers.append(new_path) + + var new_route = route_scene.instance() new_route.texture_path = texture_path # Save the location of the image for later #path_3d_markers.append(new_path) @@ -455,29 +532,44 @@ func gen_new_path(points: Array, texture_path: String): new_route.create_mesh(points_3d) new_route.set_texture(texture) + new_route.visible = self.local_data.visible_dict.get(category_name, false) + new_route.category_name = category_name + paths.add_child(new_route) + var points_2d_array = segment_2D_paths(points) + # Create a new 2D Path + for segment in points_2d_array: + var new_2d_path = path2d_scene.instance() + new_2d_path.points = segment + new_2d_path.texture = texture + new_2d_path.visible = self.local_data.visible_dict.get(category_name, false) + new_2d_path.category_name = category_name + minimap.add_child(new_2d_path) + + +func segment_2D_paths (points: Array): + var points_2d: PoolVector2Array = [] + var points_2d_array = [] for point in points: + if point == Vector3(0,0,0): + points_2d_array.append(points_2d) + points_2d = [] + continue points_2d.append(Vector2(point[0], -point[2])) - - # Create a new 2D Path - var new_2d_path = path2d_scene.instance() - new_2d_path.points = points_2d - new_2d_path.texture = texture - minimap.add_child(new_2d_path) - - self.currently_active_path = new_route - self.currently_active_path_2d = new_2d_path + points_2d_array.append(points_2d) + return points_2d_array ################################################################################ # ################################################################################ -func gen_new_icon(position: Vector3, texture_path: String): +func gen_new_icon(position: Vector3, texture_path: String, category_name: String): position.z = -position.z var new_icon = icon_scene.instance() new_icon.translation = position new_icon.set_icon_image(texture_path) - + new_icon.visible = self.local_data.visible_dict.get(category_name, false) + new_icon.category_name = category_name #icon_markers.append(new_icon) icons.add_child(new_icon) @@ -514,7 +606,6 @@ func _on_main_menu_toggle_pressed(): func _on_FileDialog_file_selected(path): pass - ################################################################################ # The adjust nodes button creates handles at all the node points to allow for # editing of them via in-game interface. (Nodes can only be edited if the input @@ -532,22 +623,22 @@ func gen_adjustment_nodes(): var route = self.paths.get_child(index) var path2d = self.minimap.get_child(index) #var curve: Curve3D = path.curve - for i in range(route.get_point_count()): - var gizmo_position = route.get_point_position(i) + if route.is_editable: + for i in range(route.get_point_count()): + var gizmo_position = route.get_point_position(i) # Simplistic cull to prevent nodes that are too far away to be # visible from being created. Additional work can be done here # if this is not enough of an optimization in the future. - if (gizmo_position.distance_squared_to(self.correct_player_position) > 10000): - continue - - var new_gizmo = gizmo_scene.instance() - new_gizmo.translation = gizmo_position - new_gizmo.link_point("path", route, path2d, i) - new_gizmo.connect("selected", self, "on_gizmo_selected") - new_gizmo.connect("deselected", self, "on_gizmo_deselected") - $Gizmos.add_child(new_gizmo) - + if (gizmo_position.distance_squared_to(self.correct_player_position) > 10000): + continue + var new_gizmo = gizmo_scene.instance() + new_gizmo.translation = gizmo_position + new_gizmo.link_point("path", route, path2d, i) + new_gizmo.connect("selected", self, "on_gizmo_selected") + new_gizmo.connect("deselected", self, "on_gizmo_deselected") + $Gizmos.add_child(new_gizmo) + for index in range(self.icons.get_child_count()): var icon = self.icons.get_child(index) var new_gizmo = gizmo_scene.instance() @@ -597,9 +688,10 @@ func _on_Dialog_hide(): func _on_LoadPath_pressed(): - var open_dialog: FileDialog = $Control/Dialogs/FileDialog - open_dialog.show() - open_dialog.set_current_dir(open_dialog.current_dir) + if $Control/Dialogs/MarkerPacks.is_visible(): + $Control/Dialogs/MarkerPacks.hide() + else: + $Control/Dialogs/MarkerPacks.show() func _on_RangesButton_pressed(): @@ -648,18 +740,27 @@ func _on_NewPath_pressed(): # Create a new icon and give it the texture ################################################################################ func _on_NewIcon_pressed(): - gen_new_icon(self.player_position, self.next_texture_path) + gen_new_icon(self.player_position, self.next_texture_path, "") # A new path point is created func _on_NewPathPoint_pressed(): if self.currently_active_path == null: - gen_new_path([self.player_position], self.next_texture_path) + gen_new_path([self.player_position], self.next_texture_path, self.currently_active_category.get_name()) else: var z_accurate_player_position = player_position z_accurate_player_position.z = -z_accurate_player_position.z self.currently_active_path.add_point(z_accurate_player_position) - self.currently_active_path_2d.add_point(Vector2(self.player_position.x, -self.player_position.z)) - + for path2d in minimap.get_children(): + if path2d.category_name == self.currently_active_path.category_name: + path2d.queue_free() + for segment in segment_2D_paths(self.currently_active_path.points()): + var new_2d_path = path2d_scene.instance() + new_2d_path.points = segment + new_2d_path.texture = self.currently_active_path.texture + new_2d_path.visible = self.currently_active_path.visibility + new_2d_path.category_name = self.currently_active_path.category_name + minimap.add_child(new_2d_path) + new_2d_path.refresh_mesh() ################################################################################ @@ -719,7 +820,7 @@ func _on_NewNodeAfter_pressed(): midpoint = ((start-end)/2) + end path.add_point(midpoint, index+1) - path2d.add_point(Vector2(midpoint.x, midpoint.z), index+1) + #ath2d.add_point(Vector2(midpoint.x, midpoint.z), index+1) clear_adjustment_nodes() gen_adjustment_nodes() @@ -760,3 +861,34 @@ func _on_Settings_pressed(): settings_dialog.load_settings() settings_dialog.show() + +func _on_MarkerPacks_cell_selected(): + var category_item = marker_packs.get_selected() + self.currently_active_category = category_item.get_metadata(0) + for path in self.paths.get_children(): + if path.category_name == find_pedigree_name(category_item, category_item.get_metadata(0).get_name()): + path.is_editable = true + self.currently_active_path = path + else: + path.is_editable = false + + +func _on_MarkerPacks_item_edited(): + var category_item = marker_packs.get_edited() + switch_selected_category(category_item) + + +func _on_ShowAll_pressed(): + var category_item = self.marker_packs.get_root().get_children() + while category_item != null: + category_item.set_checked(1, true) + switch_selected_category(category_item) + category_item = category_item.get_next() + + +func _on_HideAll_pressed(): + var category_item = self.marker_packs.get_root().get_children() + while category_item != null: + category_item.set_checked(1, false) + switch_selected_category(category_item) + category_item = category_item.get_next() diff --git a/Spatial.tscn b/Spatial.tscn index 825a6da9..27547567 100644 --- a/Spatial.tscn +++ b/Spatial.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=17 format=2] +[gd_scene load_steps=18 format=2] [ext_resource path="res://Spatial.gd" type="Script" id=1] [ext_resource path="res://shaders/range_indicators.shader" type="Shader" id=2] @@ -12,6 +12,7 @@ [ext_resource path="res://icon_new_path.png" type="Texture" id=10] [ext_resource path="res://icon_new_point.png" type="Texture" id=11] [ext_resource path="res://SettingsDialog.gd" type="Script" id=12] +[ext_resource path="res://LocalData.gd" type="Script" id=13] [sub_resource type="Shader" id=1] code = "shader_type canvas_item; @@ -185,18 +186,18 @@ margin_bottom = 672.0 window_title = "Open a File" mode = 0 access = 2 -current_dir = "." +current_dir = "/home/steph/Code/Projects/Burrito" current_file = "." -current_path = "." +current_path = "/home/steph/Code/Projects/Burrito/." __meta__ = { "_edit_use_anchors_": false } [node name="MainMenu" type="WindowDialog" parent="Control/Dialogs"] -margin_left = 48.1808 -margin_top = 88.7138 -margin_right = 261.181 -margin_bottom = 714.714 +margin_left = 48.0 +margin_top = 82.0 +margin_right = 268.0 +margin_bottom = 715.0 window_title = "Main Menu" resizable = true __meta__ = { @@ -211,26 +212,26 @@ __meta__ = { } [node name="VBoxContainer" type="VBoxContainer" parent="Control/Dialogs/MainMenu/ScrollContainer"] -margin_right = 213.0 +margin_right = 220.0 margin_bottom = 284.0 size_flags_horizontal = 3 [node name="LoadPath" type="Button" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] -margin_right = 213.0 +margin_right = 220.0 margin_bottom = 40.0 rect_min_size = Vector2( 0, 40 ) text = "Open Markers File" [node name="SavePath" type="Button" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] margin_top = 44.0 -margin_right = 213.0 +margin_right = 220.0 margin_bottom = 84.0 rect_min_size = Vector2( 0, 40 ) text = "Save Markers File" [node name="HSeparator" type="HSeparator" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] margin_top = 88.0 -margin_right = 213.0 +margin_right = 220.0 margin_bottom = 92.0 [node name="PointEditor" type="Button" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] @@ -243,19 +244,19 @@ text = "Editor Panel" [node name="OpenEditorQuickPanel" type="Button" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] margin_top = 96.0 -margin_right = 213.0 +margin_right = 220.0 margin_bottom = 136.0 rect_min_size = Vector2( 0, 40 ) text = "Editor Panel" [node name="HSeparator3" type="HSeparator" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] margin_top = 140.0 -margin_right = 213.0 +margin_right = 220.0 margin_bottom = 144.0 [node name="Ranges" type="Button" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] margin_top = 148.0 -margin_right = 213.0 +margin_right = 220.0 margin_bottom = 188.0 rect_min_size = Vector2( 0, 40 ) text = "Range Indicators" @@ -278,12 +279,12 @@ text = "Guacamole Script Editor" [node name="HSeparator4" type="HSeparator" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] margin_top = 192.0 -margin_right = 213.0 +margin_right = 220.0 margin_bottom = 196.0 [node name="Settings" type="Button" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] margin_top = 200.0 -margin_right = 213.0 +margin_right = 220.0 margin_bottom = 240.0 rect_min_size = Vector2( 0, 40 ) text = "Settings" @@ -304,14 +305,14 @@ __meta__ = { [node name="ActivePath" type="CheckButton" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] visible = false -margin_top = 268.0 +margin_top = 244.0 margin_right = 213.0 -margin_bottom = 308.0 +margin_bottom = 284.0 text = "Active Path" [node name="ExitButton" type="Button" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] margin_top = 244.0 -margin_right = 213.0 +margin_right = 220.0 margin_bottom = 284.0 rect_min_size = Vector2( 0, 40 ) text = "Exit Burrito" @@ -483,9 +484,9 @@ window_title = "Open a File" mode = 0 access = 2 filters = PoolStringArray( "*.png" ) -current_dir = "." +current_dir = "/home/steph/Code/Projects/Burrito" current_file = "." -current_path = "." +current_path = "/home/steph/Code/Projects/Burrito/." __meta__ = { "_edit_use_anchors_": false } @@ -498,9 +499,9 @@ margin_bottom = 624.833 window_title = "Save Path" resizable = true access = 2 -current_dir = "." +current_dir = "/home/steph/Code/Projects/Burrito" current_file = "." -current_path = "." +current_path = "/home/steph/Code/Projects/Burrito/." __meta__ = { "_edit_use_anchors_": false } @@ -725,6 +726,40 @@ margin_bottom = 200.0 rect_min_size = Vector2( 0, 100 ) size_flags_horizontal = 3 +[node name="MarkerPacks" type="WindowDialog" parent="Control/Dialogs"] +margin_left = 280.0 +margin_top = 105.0 +margin_right = 751.0 +margin_bottom = 486.0 +resizable = true +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="MarkerPacks" type="Tree" parent="Control/Dialogs/MarkerPacks"] +anchor_right = 1.0 +anchor_bottom = 1.0 +margin_top = 47.0 +size_flags_vertical = 3 +columns = 2 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="ShowAll" type="Button" parent="Control/Dialogs/MarkerPacks"] +margin_left = 5.0 +margin_top = 4.0 +margin_right = 115.0 +margin_bottom = 42.0 +text = "Show All" + +[node name="HideAll" type="Button" parent="Control/Dialogs/MarkerPacks"] +margin_left = 119.0 +margin_top = 4.0 +margin_right = 229.0 +margin_bottom = 42.0 +text = "Hide All" + [node name="Border" type="Control" parent="Control"] visible = false anchor_right = 1.0 @@ -792,6 +827,14 @@ anchor_bottom = 1.0 margin_top = -6.0 color = Color( 0, 0, 0, 1 ) +[node name="LocalData" type="Control" parent="Control"] +margin_right = 40.0 +margin_bottom = 40.0 +script = ExtResource( 13 ) +__meta__ = { +"_edit_use_anchors_": false +} + [node name="Paths" type="Spatial" parent="."] [node name="Icons" type="Spatial" parent="."] @@ -854,3 +897,10 @@ material/0 = SubResource( 4 ) [connection signal="pressed" from="Control/Dialogs/SettingsDialog/GridContainer/AutoLaunchBurritoLink" to="Control/Dialogs/SettingsDialog" method="save_settings"] [connection signal="text_changed" from="Control/Dialogs/SettingsDialog/GridContainer/WinePath" to="Control/Dialogs/SettingsDialog" method="save_settings"] [connection signal="text_changed" from="Control/Dialogs/SettingsDialog/GridContainer/EnvironmentVars" to="Control/Dialogs/SettingsDialog" method="save_settings"] +[connection signal="hide" from="Control/Dialogs/MarkerPacks" to="." method="_on_Dialog_hide"] +[connection signal="cell_selected" from="Control/Dialogs/MarkerPacks/MarkerPacks" to="." method="_on_MarkerPacks_cell_selected"] +[connection signal="item_edited" from="Control/Dialogs/MarkerPacks/MarkerPacks" to="." method="_on_MarkerPacks_item_edited"] +[connection signal="multi_selected" from="Control/Dialogs/MarkerPacks/MarkerPacks" to="." method="_on_Tree_multi_selected"] +[connection signal="tree_entered" from="Control/Dialogs/MarkerPacks/MarkerPacks" to="." method="_on_Tree_tree_entered"] +[connection signal="pressed" from="Control/Dialogs/MarkerPacks/ShowAll" to="." method="_on_ShowAll_pressed"] +[connection signal="pressed" from="Control/Dialogs/MarkerPacks/HideAll" to="." method="_on_HideAll_pressed"] diff --git a/project.godot b/project.godot index c8c06b63..6df2a49b 100644 --- a/project.godot +++ b/project.godot @@ -35,6 +35,7 @@ config/icon="res://icon.png" [autoload] Settings="*res://Settings.gd" +LocalData="*res://LocalData.gd" [display] From b2803eb62a95e72d3d8b7115eb28b39dbb28ffe5 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 12 Mar 2023 00:29:42 -0500 Subject: [PATCH 195/539] removing absolute path --- Spatial.tscn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Spatial.tscn b/Spatial.tscn index 27547567..c79b6f3e 100644 --- a/Spatial.tscn +++ b/Spatial.tscn @@ -186,9 +186,9 @@ margin_bottom = 672.0 window_title = "Open a File" mode = 0 access = 2 -current_dir = "/home/steph/Code/Projects/Burrito" +current_dir = "." current_file = "." -current_path = "/home/steph/Code/Projects/Burrito/." +current_path = "." __meta__ = { "_edit_use_anchors_": false } From 97ef50c39a58cf931565c5d70bb301baef6d69df Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 12 Mar 2023 18:16:12 -0400 Subject: [PATCH 196/539] Removed other path references --- Spatial.gd | 7 ++++++- Spatial.tscn | 8 ++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Spatial.gd b/Spatial.gd index a57f722b..50956ad7 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -820,7 +820,7 @@ func _on_NewNodeAfter_pressed(): midpoint = ((start-end)/2) + end path.add_point(midpoint, index+1) - #ath2d.add_point(Vector2(midpoint.x, midpoint.z), index+1) + #path2d.add_point(Vector2(midpoint.x, midpoint.z), index+1) clear_adjustment_nodes() gen_adjustment_nodes() @@ -871,6 +871,11 @@ func _on_MarkerPacks_cell_selected(): self.currently_active_path = path else: path.is_editable = false + for icon in self.icons.get_children(): + if icon.category_name == find_pedigree_name(category_item, category_item.get_metadata(0).get_name()): + icon.is_editable = true + else: + icon.is_editable = false func _on_MarkerPacks_item_edited(): diff --git a/Spatial.tscn b/Spatial.tscn index c79b6f3e..a5cd171f 100644 --- a/Spatial.tscn +++ b/Spatial.tscn @@ -484,9 +484,9 @@ window_title = "Open a File" mode = 0 access = 2 filters = PoolStringArray( "*.png" ) -current_dir = "/home/steph/Code/Projects/Burrito" +current_dir = "." current_file = "." -current_path = "/home/steph/Code/Projects/Burrito/." +current_path = "." __meta__ = { "_edit_use_anchors_": false } @@ -499,9 +499,9 @@ margin_bottom = 624.833 window_title = "Save Path" resizable = true access = 2 -current_dir = "/home/steph/Code/Projects/Burrito" +current_dir = "." current_file = "." -current_path = "/home/steph/Code/Projects/Burrito/." +current_path = "." __meta__ = { "_edit_use_anchors_": false } From 661c7716af10788da937962793a9b842ce3bd3ec Mon Sep 17 00:00:00 2001 From: klingbolt Date: Tue, 27 Jun 2023 22:07:28 -0400 Subject: [PATCH 197/539] Addressing code review --- xml_converter/doc/position/position.md | 41 +++---- xml_converter/doc/rotation/euler_rotation.md | 8 +- xml_converter/doc/texture/color.md | 46 ++++---- xml_converter/generators/code_generator.py | 108 ++++++++++++------ .../cpp_templates/class_template.cpp | 4 +- .../cpp_templates/compoundvalue.cpp | 26 ++--- xml_converter/src/attribute/color.cpp | 50 ++++---- 7 files changed, 154 insertions(+), 129 deletions(-) diff --git a/xml_converter/doc/position/position.md b/xml_converter/doc/position/position.md index 390cc514..2e613976 100644 --- a/xml_converter/doc/position/position.md +++ b/xml_converter/doc/position/position.md @@ -5,29 +5,26 @@ applies_to: ["Icon"] xml_fields: ["Position"] compatability: [TacO, Burrito, BlishHUD] protobuf_field: position -xml_parent_export: [] -xml_child_export: ["X Position", "Y Position", "Z Position"] +components_bundled_in_xml: [] +components_separate_in_xml: ["X Position", "Y Position", "Z Position"] components: - - - name: X Position - type: Float32 - xml_fields: [XPos, PositionX] - protobuf_field: "x" - compatability: [TacO, Burrito, BlishHUD] - - - - name: Y Position - type: Float32 - xml_fields: [YPos, PositionY] - protobuf_field: "y" - compatability: [TacO, Burrito, BlishHUD] - - - - name: Z Position - type: Float32 - xml_fields: [ZPos, PositionZ] - protobuf_field: "z" - compatability: [TacO, Burrito, BlishHUD] +- name: X Position + type: Float32 + xml_fields: [XPos, PositionX] + protobuf_field: "x" + compatability: [TacO, Burrito, BlishHUD] + +- name: Y Position + type: Float32 + xml_fields: [YPos, PositionY] + protobuf_field: "y" + compatability: [TacO, Burrito, BlishHUD] + +- name: Z Position + type: Float32 + xml_fields: [ZPos, PositionZ] + protobuf_field: "z" + compatability: [TacO, Burrito, BlishHUD] --- An XYZ location of a point in the game world. diff --git a/xml_converter/doc/rotation/euler_rotation.md b/xml_converter/doc/rotation/euler_rotation.md index d8c3004e..944a2632 100644 --- a/xml_converter/doc/rotation/euler_rotation.md +++ b/xml_converter/doc/rotation/euler_rotation.md @@ -5,29 +5,27 @@ applies_to: ["Icon"] xml_fields: ["Rotate"] compatability: [TacO, Burrito, BlishHUD] protobuf_field: euler_rotation -xml_parent_export: ['X Rotation', 'Y Rotation', 'Z Rotation'] -xml_child_export: [] +components_bundled_in_xml: ['X Rotation', 'Y Rotation', 'Z Rotation'] +components_separate_in_xml: [] components: - name: X Rotation type: Float32 xml_fields: [RotateX] protobuf_field: "x" compatability: [TacO, Burrito, BlishHUD] - - name: Y Rotation type: Float32 xml_fields: [RotateY] protobuf_field: "y" compatability: [TacO, Burrito, BlishHUD] - - name: Z Rotation type: Float32 xml_fields: [RotateZ] protobuf_field: "z" compatability: [TacO, Burrito, BlishHUD] - + --- Euler X Y Z rotation. diff --git a/xml_converter/doc/texture/color.md b/xml_converter/doc/texture/color.md index df6e7965..4824a4df 100644 --- a/xml_converter/doc/texture/color.md +++ b/xml_converter/doc/texture/color.md @@ -6,34 +6,32 @@ applies_to: [Icon, Trail] xml_fields: [Color, BHColor] protobuf_field: rgba_color compatability: [TacO, BlishHUD, Burrito] -xml_parent_export: ['Red', 'Green', 'Blue'] -xml_child_export: ['Alpha'] - +components_bundled_in_xml: ['Red', 'Green', 'Blue'] +components_separate_in_xml: ['Alpha'] components: - - - name: Red # fake, to make thing "square" - type: Float32 - xml_fields: [Red] - protobuf_field: rgba_color - compatability: [TacO, Burrito, BlishHUD] +- name: Red + type: Float32 + xml_fields: [Red] + protobuf_field: rgba_color + compatability: [TacO, Burrito, BlishHUD] - - name: Green - type: Float32 - xml_fields: [Green] - protobuf_field: rgba_color - compatability: [TacO, Burrito, BlishHUD] +- name: Green + type: Float32 + xml_fields: [Green] + protobuf_field: rgba_color + compatability: [TacO, Burrito, BlishHUD] - - name: Blue - type: Float32 - xml_fields: [Blue] - protobuf_field: rgba_color - compatability: [TacO, Burrito, BlishHUD] +- name: Blue + type: Float32 + xml_fields: [Blue] + protobuf_field: rgba_color + compatability: [TacO, Burrito, BlishHUD] - - name: Alpha - type: Float32 - xml_fields: [Alpha] - protobuf_field: rgba_color - compatability: [TacO, Burrito, BlishHUD] +- name: Alpha + type: Float32 + xml_fields: [Alpha] + protobuf_field: rgba_color + compatability: [TacO, Burrito, BlishHUD] --- diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index e9ab74f3..edb0c17b 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -131,19 +131,64 @@ const: CompoundValue then: additionalProperties: false - required: [{shared_fields}, components] + required: [{shared_fields}, components_bundled_in_xml, components_separate_in_xml, components] properties: {shared_field_properties} - xml_parent_export: + components_bundled_in_xml: type: array items: type: string - pattern: "^[A-Za-z ]+$" - xml_child_export: + components_separate_in_xml: + type: array + items: + type: string + components: + type: array + items: + type: object + additionalProperties: false + required: [name, type, xml_fields, protobuf_field, compatability] + properties: + name: + type: string + type: + type: string + enum: [Int32, Fixed32, Float32] + xml_fields: + type: array + items: + type: string + pattern: "^[A-Za-z]+$" + protobuf_field: + type: string + pattern: "^[a-z_.]+$" + compatability: + type: array + items: + type: string + enum: [BlishHUD, Burrito, TacO] + ############################# + # CompoundCustomClass Type + ############################# + - if: + properties: + type: + const: CompoundCustomClass + then: + additionalProperties: false + required: [{shared_fields}, components_bundled_in_xml, components_separate_in_xml, class] + properties: + {shared_field_properties} + class: + type: string + components_bundled_in_xml: + type: array + items: + type: string + components_separate_in_xml: type: array items: type: string - pattern: "^[A-Za-z ]+$" components: type: array items: @@ -169,7 +214,6 @@ items: type: string enum: [BlishHUD, Burrito, TacO] - ############################# # Custom Type @@ -191,16 +235,6 @@ type: string uses_file_path: type: boolean - xml_parent_export: - type: array - items: - type: string - pattern: "^[A-Za-z ]+$" - xml_child_export: - type: array - items: - type: string - pattern: "^[A-Za-z ]+$" """.format( shared_field_properties="""type: @@ -305,7 +339,7 @@ class AttributeVariable: args: List[str] = field(default_factory=list) default_xml_field: str = "" side_effects: List[str] = field(default_factory=list) - xml_parent_export: List[str] = field(default_factory=list) + components_bundled_in_xml: List[str] = field(default_factory=list) parser_flag_name: Optional[str] = "" write_to_xml: bool = True is_trigger: bool = False @@ -449,16 +483,9 @@ def generate_cpp_variable_data( doc_type: str, ) -> Tuple[List[AttributeVariable], CPPInclude]: - cpp_includes: CPPInclude = CPPInclude() - attribute_name: str = "" + # Type defining the outputs attribute_variables: List[AttributeVariable] = [] - xml_fields: List[str] = [] - default_xml_field: str = "" - side_effects: List[str] = [] - args: List[str] = [] - protobuf_field: str = "" - write_to_xml: bool = True - is_trigger: bool = False + cpp_includes: CPPInclude = CPPInclude() cpp_includes.hpp_absolute_includes.add("string") cpp_includes.hpp_absolute_includes.add("vector") @@ -486,11 +513,14 @@ def generate_cpp_variable_data( attribute_name = attribute_name_from_markdown_data(fieldval['name']) if doc_type in fieldval['applies_to']: - xml_fields = [] - default_xml_field = "" - side_effects = [] - write_to_xml = True - args = XML_ATTRIBUTE_PARSER_DEFAULT_ARGUMENTS.copy() + xml_fields: List[str] = [] + side_effects: List[str] = [] + write_to_xml: bool = True + protobuf_field: str = "" + is_trigger: bool = False + default_xml_field: str = "" + + args: List[str] = XML_ATTRIBUTE_PARSER_DEFAULT_ARGUMENTS.copy() if fieldval['type'] in documentation_type_data: cpp_type = documentation_type_data[fieldval['type']]["cpp_type"] @@ -536,31 +566,33 @@ def generate_cpp_variable_data( if fieldval['type'] in ["CompoundValue", "CompoundCustomClass"]: for component in fieldval['components']: component_xml_fields: List[str] = [] + component_name: str = attribute_name_from_markdown_data(component['name']) + component_default_xml_field: str = "" for x in component['xml_fields']: component_xml_fields.append(lowercase(x, delimiter="")) - component_default_xml_field: str = "" component_class_name = documentation_type_data[component['type']]["class_name"] - if component['name'] in fieldval['xml_child_export']: + if component['name'] in fieldval['components_separate_in_xml']: component_default_xml_field = component['xml_fields'][0] write_to_xml = True - if component['name'] in fieldval['xml_parent_export']: + if component['name'] in fieldval['components_bundled_in_xml']: component_default_xml_field = fieldval['xml_fields'][0] write_to_xml = False component_attribute_variable = AttributeVariable( - attribute_name=lowercase(fieldval['name'], delimiter="_") + "." + lowercase(component['name'], delimiter="_"), + attribute_name=attribute_name + "." + component_name, attribute_type="CompoundValue", cpp_type=doc_type_to_cpp_type[component['type']], class_name=component_class_name, xml_fields=component_xml_fields, default_xml_field=component_default_xml_field, protobuf_field=component["protobuf_field"], - parser_flag_name=lowercase(fieldval['name'], delimiter="_"), + parser_flag_name=attribute_name, write_to_xml=write_to_xml, is_component=True, args=args, ) attribute_variables.append(component_attribute_variable) - if fieldval['xml_parent_export'] == []: + # If there aren't any components to bundle, we don't want to render the attribute + if fieldval['components_bundled_in_xml'] == []: write_to_xml = False attribute_variable = AttributeVariable( @@ -658,7 +690,7 @@ def write_attribute(self, output_directory: str) -> None: cpp_type=doc_type_to_cpp_type[component['type']], class_name=attribute_name, xml_fields=xml_fields, - xml_parent_export=metadata[filepath]['xml_parent_export'], + components_bundled_in_xml=metadata[filepath]['components_bundled_in_xml'], protobuf_field=component["protobuf_field"], is_trigger=is_trigger, ) diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index a5741248..f187696b 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -39,7 +39,7 @@ bool {{cpp_class}}::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vec attributename = normalize(get_attribute_name(attribute)); {% for n, attribute_variable in enumerate(attribute_variables) %} {% for i, value in enumerate(attribute_variable.xml_fields) %} - {{ "" if i == 0 and n == 0 else "else " }}if (attributename == "{{value}}") { + {{ "if" if i == n == 0 else "else if" }} (attributename == "{{value}}") { this->{{attribute_variable.attribute_name}} = parse_{{attribute_variable.class_name}}({{", ".join(attribute_variable.args)}}); this->{{attribute_variable.parser_flag_name}}_is_set = true; {% for side_effect in attribute_variable.side_effects %} @@ -87,7 +87,7 @@ vector {{cpp_class}}::as_xml() const { } xml_node_contents.push_back("\n"); - {% else: %} + {% else %} xml_node_contents.push_back("/>"); {% endif %} return xml_node_contents; diff --git a/xml_converter/generators/cpp_templates/compoundvalue.cpp b/xml_converter/generators/cpp_templates/compoundvalue.cpp index 4801beba..36c89cdd 100644 --- a/xml_converter/generators/cpp_templates/compoundvalue.cpp +++ b/xml_converter/generators/cpp_templates/compoundvalue.cpp @@ -27,19 +27,19 @@ using namespace std; } return {{attribute_name}}; } -{% if attribute_variables[0].xml_parent_export != [] %} - -string stringify_{{attribute_name}}({{class_name}} attribute_value) { - string output; - {% for n, attribute_variable in enumerate(attribute_variables) %} - {% if n == 0: %} - output = to_string(attribute_value.{{attribute_variables[n].attribute_name}}); - {% else %} - output = output + "," + to_string(attribute_value.{{attribute_variables[n].attribute_name}}); - {% endif %} - {% endfor %} - return output; -} +{% if attribute_variables[0].components_bundled_in_xml != [] %} + + string stringify_{{attribute_name}}({{class_name}} attribute_value) { + string output; + {% for n, attribute_variable in enumerate(attribute_variables) %} + {% if n == 0: %} + output = to_string(attribute_value.{{attribute_variables[n].attribute_name}}); + {% else %} + output = output + "," + to_string(attribute_value.{{attribute_variables[n].attribute_name}}); + {% endif %} + {% endfor %} + return output; + } {% endif %} waypoint::{{class_name}}* to_proto_{{attribute_name}}({{class_name}} attribute_value) { diff --git a/xml_converter/src/attribute/color.cpp b/xml_converter/src/attribute/color.cpp index 8d418b5f..57f93f36 100644 --- a/xml_converter/src/attribute/color.cpp +++ b/xml_converter/src/attribute/color.cpp @@ -20,7 +20,7 @@ using namespace std; // Helper functions to convert the value of colors from one type to another. // Also serves to make sure the values stay within the bounds. //////////////////////////////////////////////////////////////////////////////// -float int_to_float(int input) { +float convert_color_channel_int_to_float(int input) { if (input > 255) { input = 255; } @@ -31,7 +31,7 @@ float int_to_float(int input) { return output; } -int float_to_int(float input) { +int convert_color_channel_float_to_int(float input) { if (input > 1.0) { input = 1.0; } @@ -47,7 +47,7 @@ int float_to_int(float input) { // // Parses a Color from the value of a rapidxml::xml_attribute. //////////////////////////////////////////////////////////////////////////////// -Color parse_color(rapidxml::xml_attribute<>* input, vector*) { +Color parse_color(rapidxml::xml_attribute<>* input, vector* errors) { Color color; std::string input_string = get_attribute_value(input); std::string hex_string; @@ -59,21 +59,27 @@ Color parse_color(rapidxml::xml_attribute<>* input, vector*) { hex_string = input_string; } - std::regex hex_pattern("^([A-Fa-f0-9]{6})$|^([A-Fa-f0-9]{8})$"); + std::regex hex_pattern("^([A-Fa-f0-9]+)"); if (std::regex_match(hex_string, hex_pattern)) { // Extract the R, G, B, and A values from the Hex string if (hex_string.size() == 6 || hex_string.size() == 8) { - color.red = int_to_float(std::stoi(hex_string.substr(0, 2), nullptr, 16)); - color.green = int_to_float(std::stoi(hex_string.substr(2, 2), nullptr, 16)); - color.blue = int_to_float(std::stoi(hex_string.substr(4, 2), nullptr, 16)); + color.red = convert_color_channel_int_to_float(std::stoi(hex_string.substr(0, 2), nullptr, 16)); + color.green = convert_color_channel_int_to_float(std::stoi(hex_string.substr(2, 2), nullptr, 16)); + color.blue = convert_color_channel_int_to_float(std::stoi(hex_string.substr(4, 2), nullptr, 16)); if (hex_string.size() == 8) { - color.alpha = int_to_float(std::stoi(hex_string.substr(6, 2), nullptr, 16)); + color.alpha = convert_color_channel_int_to_float(std::stoi(hex_string.substr(6, 2), nullptr, 16)); } else { color.alpha = 1.0; } } + else { + errors->push_back(new XMLAttributeValueError("Found a hex color value that was not 6 or 8 characters", input)); + } + } + else { + errors->push_back(new XMLAttributeValueError("Found a color value not in hex format", input)); } return color; } @@ -87,13 +93,13 @@ string stringify_color(Color attribute_value) { std::stringstream stream; std::string hex_string = "#"; - stream << std::hex << float_to_int(attribute_value.red); + stream << std::hex << convert_color_channel_float_to_int(attribute_value.red); hex_string += stream.str(); - stream << std::hex << float_to_int(attribute_value.green); + stream << std::hex << convert_color_channel_float_to_int(attribute_value.green); hex_string += stream.str(); - stream << std::hex << float_to_int(attribute_value.blue); + stream << std::hex << convert_color_channel_float_to_int(attribute_value.blue); hex_string += stream.str(); std::string rgb = hex_string; @@ -112,10 +118,10 @@ waypoint::RGBAColor* to_proto_color(Color attribute_value) { int int_alpha = 255; // If alpha (float) is not the default value, convert to int if (attribute_value.alpha != 0) { - int_alpha = float_to_int(attribute_value.alpha); + int_alpha = convert_color_channel_float_to_int(attribute_value.alpha); } - uint32_t rgba = ((float_to_int(attribute_value.red) & 0xff) << 24) + ((float_to_int(attribute_value.green) & 0xff) << 16) + ((float_to_int(attribute_value.blue) & 0xff) << 8) + (int_alpha & 0xff); + uint32_t rgba = ((convert_color_channel_float_to_int(attribute_value.red) & 0xff) << 24) + ((convert_color_channel_float_to_int(attribute_value.green) & 0xff) << 16) + ((convert_color_channel_float_to_int(attribute_value.blue) & 0xff) << 8) + (int_alpha & 0xff); color->set_rgba_color(rgba); return color; } @@ -128,18 +134,12 @@ waypoint::RGBAColor* to_proto_color(Color attribute_value) { Color from_proto_color(waypoint::RGBAColor attribute_value) { Color color; std::stringstream stream; - stream << std::hex << attribute_value.rgba_color(); - std::string hex_string = stream.str(); - - int int_red = std::stoi(hex_string.substr(0, 2), nullptr, 16); - int int_green = std::stoi(hex_string.substr(2, 2), nullptr, 16); - int int_blue = std::stoi(hex_string.substr(4, 2), nullptr, 16); - int int_alpha = std::stoi(hex_string.substr(6, 2), nullptr, 16); - - color.red = int_to_float(int_red); - color.green = int_to_float(int_green); - color.blue = int_to_float(int_blue); - color.alpha = int_to_float(int_alpha); + uint32_t rgba = attribute_value.rgba_color(); + + color.red = convert_color_channel_int_to_float((rgba >> 24) & 0xff); + color.green = convert_color_channel_int_to_float((rgba >> 16) & 0xff); + color.blue = convert_color_channel_int_to_float((rgba >> 8) & 0xff); + color.alpha = convert_color_channel_int_to_float(rgba & 0xff); return color; } From eafee064317aaf2280bc8035794270747cd4df91 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Wed, 28 Jun 2023 00:13:31 -0400 Subject: [PATCH 198/539] Changed variable name --- xml_converter/generators/code_generator.py | 6 ++-- .../cpp_templates/class_template.cpp | 32 +++++++++---------- .../cpp_templates/class_template.hpp | 2 +- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index edb0c17b..91bb5232 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -340,7 +340,7 @@ class AttributeVariable: default_xml_field: str = "" side_effects: List[str] = field(default_factory=list) components_bundled_in_xml: List[str] = field(default_factory=list) - parser_flag_name: Optional[str] = "" + attribute_flag_name: Optional[str] = "" write_to_xml: bool = True is_trigger: bool = False uses_file_path: bool = False @@ -585,7 +585,7 @@ def generate_cpp_variable_data( xml_fields=component_xml_fields, default_xml_field=component_default_xml_field, protobuf_field=component["protobuf_field"], - parser_flag_name=attribute_name, + attribute_flag_name=attribute_name + "_is_set", write_to_xml=write_to_xml, is_component=True, args=args, @@ -606,7 +606,7 @@ def generate_cpp_variable_data( is_trigger=is_trigger, args=args, write_to_xml=write_to_xml, - parser_flag_name=attribute_name, + attribute_flag_name=attribute_name + "_is_set", side_effects=side_effects, ) attribute_variables.append(attribute_variable) diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index f187696b..51932b58 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -41,7 +41,7 @@ bool {{cpp_class}}::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vec {% for i, value in enumerate(attribute_variable.xml_fields) %} {{ "if" if i == n == 0 else "else if" }} (attributename == "{{value}}") { this->{{attribute_variable.attribute_name}} = parse_{{attribute_variable.class_name}}({{", ".join(attribute_variable.args)}}); - this->{{attribute_variable.parser_flag_name}}_is_set = true; + this->{{attribute_variable.attribute_flag_name}} = true; {% for side_effect in attribute_variable.side_effects %} this->{{side_effect}} = this->{{attribute_variable.class_name}}.side_effect_{{side_effect}}; this->{{side_effect}}_is_set = true; @@ -69,7 +69,7 @@ vector {{cpp_class}}::as_xml() const { xml_node_contents.push_back("<{{xml_class_name}} "); {% for attribute_variable in attribute_variables %} {% if attribute_variable.write_to_xml == true %} - if (this->{{attribute_variable.parser_flag_name}}_is_set) { + if (this->{{attribute_variable.attribute_flag_name}}) { xml_node_contents.push_back(" {{attribute_variable.default_xml_field}}=\"" + stringify_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}}) + "\""); } {% endif %} @@ -102,21 +102,21 @@ waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf() const { {% if attribute_variable.is_component == false %} {% if (attribute_variable.is_trigger == true)%} {% if (attribute_variable.attribute_type == "Custom")%} - if (this->{{attribute_variable.attribute_name}}_is_set) { + if (this->{{attribute_variable.attribute_flag_name}}) { if (trigger == nullptr) { trigger = new waypoint::Trigger(); } trigger->set_allocated_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); } {% elif (attribute_variable.attribute_type == "Enum")%} - if (this->{{attribute_variable.attribute_name}}_is_set) { + if (this->{{attribute_variable.attribute_flag_name}}) { if (trigger == nullptr) { trigger = new waypoint::Trigger(); } trigger->set_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); } {% else: %} - if (this->{{attribute_variable.attribute_name}}_is_set) { + if (this->{{attribute_variable.attribute_flag_name}}) { if (trigger == nullptr) { trigger = new waypoint::Trigger(); } @@ -125,15 +125,15 @@ waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf() const { {% endif %} {% else: %} {% if (attribute_variable.attribute_type == "Enum")%} - if (this->{{attribute_variable.attribute_name}}_is_set) { + if (this->{{attribute_variable.attribute_flag_name}}) { proto_{{cpp_class_header}}.set_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); } {% elif (attribute_variable.attribute_type in ["MultiflagValue", "CompoundValue", "Custom", "CompoundCustomClass"])%} - if (this->{{attribute_variable.attribute_name}}_is_set) { + if (this->{{attribute_variable.attribute_flag_name}}) { proto_{{cpp_class_header}}.set_allocated_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); } {% else: %} - if (this->{{attribute_variable.attribute_name}}_is_set) { + if (this->{{attribute_variable.attribute_flag_name}}) { proto_{{cpp_class_header}}.set_{{attribute_variable.protobuf_field}}(this->{{attribute_variable.attribute_name}}); } {% endif %} @@ -164,44 +164,44 @@ void {{cpp_class}}::parse_protobuf(waypoint::{{cpp_class}} proto_{{cpp_class_hea {% if (attribute_variable.attribute_type == "Custom") %} if (trigger.has_{{attribute_variable.protobuf_field}}()) { this->{{attribute_variable.attribute_name}} = from_proto_{{attribute_variable.class_name}}(trigger.{{attribute_variable.protobuf_field}}()); - this->{{attribute_variable.attribute_name}}_is_set = true; + this->{{attribute_variable.attribute_flag_name}} = true; } {% elif attribute_variable.class_name == "string" %} if (trigger.{{attribute_variable.protobuf_field}}() != "") { this->{{attribute_variable.attribute_name}} = trigger.{{attribute_variable.protobuf_field}}(); - this->{{attribute_variable.attribute_name}}_is_set = true; + this->{{attribute_variable.attribute_flag_name}} = true; } {% elif (attribute_variable.attribute_type == "Enum") %} if (trigger.{{attribute_variable.protobuf_field}}() != 0) { this->{{attribute_variable.attribute_name}} = from_proto_{{attribute_variable.class_name}}(trigger.{{attribute_variable.protobuf_field}}()); - this->{{attribute_variable.attribute_name}}_is_set = true; + this->{{attribute_variable.attribute_flag_name}} = true; } {% else: %} if (trigger.{{attribute_variable.protobuf_field}}() != 0) { this->{{attribute_variable.attribute_name}} = trigger.{{attribute_variable.protobuf_field}}(); - this->{{attribute_variable.attribute_name}}_is_set = true; + this->{{attribute_variable.attribute_flag_name}} = true; } {% endif %} {% else: %} {% if (attribute_variable.attribute_type == "Enum") %} if (proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}() != 0) { this->{{attribute_variable.attribute_name}} = from_proto_{{attribute_variable.class_name}}(proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}()); - this->{{attribute_variable.attribute_name}}_is_set = true; + this->{{attribute_variable.attribute_flag_name}} = true; } {% elif (attribute_variable.attribute_type in ["MultiflagValue", "CompoundValue", "Custom", "CompoundCustomClass"])%} if (proto_{{cpp_class_header}}.has_{{attribute_variable.protobuf_field}}()) { this->{{attribute_variable.attribute_name}} = from_proto_{{attribute_variable.class_name}}(proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}()); - this->{{attribute_variable.attribute_name}}_is_set = true; + this->{{attribute_variable.attribute_flag_name}} = true; } {% elif (attribute_variable.class_name == "string") %} if (proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}() != "") { this->{{attribute_variable.attribute_name}} = proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}(); - this->{{attribute_variable.attribute_name}}_is_set = true; + this->{{attribute_variable.attribute_flag_name}} = true; } {% else: %} if (proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}() != 0) { this->{{attribute_variable.attribute_name}} = proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}(); - this->{{attribute_variable.attribute_name}}_is_set = true; + this->{{attribute_variable.attribute_flag_name}} = true; } {% endif %} {% endif %} diff --git a/xml_converter/generators/cpp_templates/class_template.hpp b/xml_converter/generators/cpp_templates/class_template.hpp index 014f8431..19d7aa26 100644 --- a/xml_converter/generators/cpp_templates/class_template.hpp +++ b/xml_converter/generators/cpp_templates/class_template.hpp @@ -21,7 +21,7 @@ class {{cpp_class}} : public Parseable { {% endfor %} {% for attribute_variable in attribute_variables: %} {% if attribute_variable.is_component == false: %} - bool {{attribute_variable.attribute_name}}_is_set = false; + bool {{attribute_variable.attribute_flag_name}} = false; {% endif %} {% endfor %} {% if cpp_class == "Category": %} From 15946c93f328930fd41ab8d9d84adcfbda767de1 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Wed, 28 Jun 2023 00:20:17 -0400 Subject: [PATCH 199/539] Addressing IWYU --- xml_converter/src/attribute/color.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/xml_converter/src/attribute/color.cpp b/xml_converter/src/attribute/color.cpp index 57f93f36..24636522 100644 --- a/xml_converter/src/attribute/color.cpp +++ b/xml_converter/src/attribute/color.cpp @@ -2,6 +2,7 @@ #include +#include #include #include #include From 0f49697af6d1fc6ba5559a750fb280cbddd4dbd4 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Thu, 6 Jul 2023 23:36:02 -0400 Subject: [PATCH 200/539] Addressing code review --- xml_converter/generators/code_generator.py | 32 +++++++++++-------- .../cpp_templates/compoundvalue.cpp | 12 ++++--- 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 91bb5232..c35fc1d1 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -131,14 +131,14 @@ const: CompoundValue then: additionalProperties: false - required: [{shared_fields}, components_bundled_in_xml, components_separate_in_xml, components] + required: [{shared_fields}, xml_bundled_components, xml_separate_components, components] properties: {shared_field_properties} - components_bundled_in_xml: + xml_bundled_components: type: array items: type: string - components_separate_in_xml: + xml_separate_components: type: array items: type: string @@ -176,16 +176,16 @@ const: CompoundCustomClass then: additionalProperties: false - required: [{shared_fields}, components_bundled_in_xml, components_separate_in_xml, class] + required: [{shared_fields}, xml_bundled_components, xml_separate_components, class] properties: {shared_field_properties} class: type: string - components_bundled_in_xml: + xml_bundled_components: type: array items: type: string - components_separate_in_xml: + xml_separate_components: type: array items: type: string @@ -339,7 +339,7 @@ class AttributeVariable: args: List[str] = field(default_factory=list) default_xml_field: str = "" side_effects: List[str] = field(default_factory=list) - components_bundled_in_xml: List[str] = field(default_factory=list) + xml_bundled_components: List[str] = field(default_factory=list) attribute_flag_name: Optional[str] = "" write_to_xml: bool = True is_trigger: bool = False @@ -510,7 +510,7 @@ def generate_cpp_variable_data( for filepath, document in sorted(self.data.items()): fieldval = document.metadata - attribute_name = attribute_name_from_markdown_data(fieldval['name']) + attribute_name: str = attribute_name_from_markdown_data(fieldval['name']) if doc_type in fieldval['applies_to']: xml_fields: List[str] = [] @@ -571,10 +571,10 @@ def generate_cpp_variable_data( for x in component['xml_fields']: component_xml_fields.append(lowercase(x, delimiter="")) component_class_name = documentation_type_data[component['type']]["class_name"] - if component['name'] in fieldval['components_separate_in_xml']: + if component['name'] in fieldval['xml_separate_components']: component_default_xml_field = component['xml_fields'][0] write_to_xml = True - if component['name'] in fieldval['components_bundled_in_xml']: + if component['name'] in fieldval['xml_bundled_components']: component_default_xml_field = fieldval['xml_fields'][0] write_to_xml = False component_attribute_variable = AttributeVariable( @@ -592,7 +592,7 @@ def generate_cpp_variable_data( ) attribute_variables.append(component_attribute_variable) # If there aren't any components to bundle, we don't want to render the attribute - if fieldval['components_bundled_in_xml'] == []: + if fieldval['xml_bundled_components'] == []: write_to_xml = False attribute_variable = AttributeVariable( @@ -648,8 +648,9 @@ def write_attribute(self, output_directory: str) -> None: for filepath in attribute_names: attribute_variables = [] - attribute_name = attribute_names[filepath] + xml_bundled_components: List[str] = [] metadata[filepath] = self.data[filepath].metadata + attribute_name = attribute_name_from_markdown_data(metadata[filepath]['name']) if metadata[filepath]["protobuf_field"].startswith("trigger"): is_trigger = True @@ -682,15 +683,17 @@ def write_attribute(self, output_directory: str) -> None: raise ValueError("Unexpected type for component. Look at markdown file {attribute_name}".format( attribute_name=attribute_name )) + component_attribute_name: str = attribute_name_from_markdown_data(component['name']) for item in component['xml_fields']: xml_fields.append(normalize(item)) + if component['name'] in metadata[filepath]['xml_bundled_components']: + xml_bundled_components.append(component_attribute_name) attribute_variable = AttributeVariable( - attribute_name=lowercase(component['name'], delimiter="_"), + attribute_name=component_attribute_name, attribute_type=metadata[filepath]['type'], cpp_type=doc_type_to_cpp_type[component['type']], class_name=attribute_name, xml_fields=xml_fields, - components_bundled_in_xml=metadata[filepath]['components_bundled_in_xml'], protobuf_field=component["protobuf_field"], is_trigger=is_trigger, ) @@ -729,6 +732,7 @@ def write_attribute(self, output_directory: str) -> None: attribute_variables=attribute_variables, class_name=capitalize(attribute_name, delimiter=""), enumerate=enumerate, + xml_bundled_components=xml_bundled_components )) ############################################################################ diff --git a/xml_converter/generators/cpp_templates/compoundvalue.cpp b/xml_converter/generators/cpp_templates/compoundvalue.cpp index 36c89cdd..20ff8247 100644 --- a/xml_converter/generators/cpp_templates/compoundvalue.cpp +++ b/xml_converter/generators/cpp_templates/compoundvalue.cpp @@ -27,15 +27,17 @@ using namespace std; } return {{attribute_name}}; } -{% if attribute_variables[0].components_bundled_in_xml != [] %} +{% if xml_bundled_components != [] %} string stringify_{{attribute_name}}({{class_name}} attribute_value) { string output; {% for n, attribute_variable in enumerate(attribute_variables) %} - {% if n == 0: %} - output = to_string(attribute_value.{{attribute_variables[n].attribute_name}}); - {% else %} - output = output + "," + to_string(attribute_value.{{attribute_variables[n].attribute_name}}); + {% if attribute_variables[n].attribute_name in xml_bundled_components %} + {% if n == 0: %} + output = to_string(attribute_value.{{attribute_variables[n].attribute_name}}); + {% else %} + output = output + "," + to_string(attribute_value.{{attribute_variables[n].attribute_name}}); + {% endif %} {% endif %} {% endfor %} return output; From 72ec83ef8d6f4c0d6448997984bb4564c02817a7 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Fri, 7 Jul 2023 19:48:24 -0400 Subject: [PATCH 201/539] Adding the changes to the markdown files --- xml_converter/doc/position/position.md | 4 ++-- xml_converter/doc/rotation/euler_rotation.md | 4 ++-- xml_converter/doc/texture/color.md | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/xml_converter/doc/position/position.md b/xml_converter/doc/position/position.md index 2e613976..6ddc7514 100644 --- a/xml_converter/doc/position/position.md +++ b/xml_converter/doc/position/position.md @@ -5,8 +5,8 @@ applies_to: ["Icon"] xml_fields: ["Position"] compatability: [TacO, Burrito, BlishHUD] protobuf_field: position -components_bundled_in_xml: [] -components_separate_in_xml: ["X Position", "Y Position", "Z Position"] +xml_bundled_components: [] +xml_separate_components: ["X Position", "Y Position", "Z Position"] components: - name: X Position type: Float32 diff --git a/xml_converter/doc/rotation/euler_rotation.md b/xml_converter/doc/rotation/euler_rotation.md index 944a2632..e628fd67 100644 --- a/xml_converter/doc/rotation/euler_rotation.md +++ b/xml_converter/doc/rotation/euler_rotation.md @@ -5,8 +5,8 @@ applies_to: ["Icon"] xml_fields: ["Rotate"] compatability: [TacO, Burrito, BlishHUD] protobuf_field: euler_rotation -components_bundled_in_xml: ['X Rotation', 'Y Rotation', 'Z Rotation'] -components_separate_in_xml: [] +xml_bundled_components: ['X Rotation', 'Y Rotation', 'Z Rotation'] +xml_separate_components: [] components: - name: X Rotation type: Float32 diff --git a/xml_converter/doc/texture/color.md b/xml_converter/doc/texture/color.md index 4824a4df..eff7724e 100644 --- a/xml_converter/doc/texture/color.md +++ b/xml_converter/doc/texture/color.md @@ -6,8 +6,8 @@ applies_to: [Icon, Trail] xml_fields: [Color, BHColor] protobuf_field: rgba_color compatability: [TacO, BlishHUD, Burrito] -components_bundled_in_xml: ['Red', 'Green', 'Blue'] -components_separate_in_xml: ['Alpha'] +xml_bundled_components: ['Red', 'Green', 'Blue'] +xml_separate_components: ['Alpha'] components: - name: Red type: Float32 From b7b0b6aa96dfc9f7e76dfa04dc06e4e84678456e Mon Sep 17 00:00:00 2001 From: klingbolt Date: Fri, 7 Jul 2023 19:57:47 -0400 Subject: [PATCH 202/539] Changed from using a element in an array to the element itself --- xml_converter/generators/cpp_templates/compoundvalue.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xml_converter/generators/cpp_templates/compoundvalue.cpp b/xml_converter/generators/cpp_templates/compoundvalue.cpp index 20ff8247..3480fe65 100644 --- a/xml_converter/generators/cpp_templates/compoundvalue.cpp +++ b/xml_converter/generators/cpp_templates/compoundvalue.cpp @@ -22,7 +22,7 @@ using namespace std; compound_values = split(get_attribute_value(input), ","); if (compound_values.size() == {{ attribute_variables|length }}) { {% for n, attribute_variable in enumerate(attribute_variables) %} - {{attribute_name}}.{{attribute_variables[n].attribute_name}} = std::stof(compound_values[{{n}}]); + {{attribute_name}}.{{attribute_variable.attribute_name}} = std::stof(compound_values[{{n}}]); {% endfor %} } return {{attribute_name}}; @@ -32,11 +32,11 @@ using namespace std; string stringify_{{attribute_name}}({{class_name}} attribute_value) { string output; {% for n, attribute_variable in enumerate(attribute_variables) %} - {% if attribute_variables[n].attribute_name in xml_bundled_components %} + {% if attribute_variable.attribute_name in xml_bundled_components %} {% if n == 0: %} - output = to_string(attribute_value.{{attribute_variables[n].attribute_name}}); + output = to_string(attribute_value.{{attribute_variable.attribute_name}}); {% else %} - output = output + "," + to_string(attribute_value.{{attribute_variables[n].attribute_name}}); + output = output + "," + to_string(attribute_value.{{attribute_variable.attribute_name}}); {% endif %} {% endif %} {% endfor %} From f6c6b3b0761e95d356fa45252ee607b6e8cdd171 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Tue, 18 Jul 2023 00:05:26 -0400 Subject: [PATCH 203/539] Addressing code review --- Icon.gd | 5 +- LocalData.gd | 27 ------ LocalData.tscn | 3 - Route.gd | 7 +- Route2D.gd | 7 -- Settings.gd | 8 +- Spatial.gd | 247 +++++++++++++++++++++++-------------------------- Spatial.tscn | 32 ++----- 8 files changed, 141 insertions(+), 195 deletions(-) delete mode 100644 LocalData.gd delete mode 100644 LocalData.tscn delete mode 100644 Route2D.gd diff --git a/Icon.gd b/Icon.gd index 2cdd61ad..c2af00cb 100644 --- a/Icon.gd +++ b/Icon.gd @@ -1,8 +1,9 @@ extends Sprite3D +var Waypoint = preload("res://waypoint.gd") + var texture_path -var category_name = "" -var is_editable = false +var waypoint = Waypoint.Icon.new() func set_icon_image(texture_path: String): self.texture_path = texture_path diff --git a/LocalData.gd b/LocalData.gd deleted file mode 100644 index 54082204..00000000 --- a/LocalData.gd +++ /dev/null @@ -1,27 +0,0 @@ -extends Node - -const LOCAL_DATA_PATH = "user://localdata.json" - -var visible_dict = {} -var _local_data - -func _ready(): - var file = File.new() - file.open(LOCAL_DATA_PATH, file.READ) - var text = file.get_as_text() - var datum = JSON.parse(text) - self._local_data = JSON.parse(text).result - load_local() - -func load_local(): - for key in self._local_data["visible_dict"].keys(): - self.visible_dict[key] = self._local_data["visible_dict"][key] - -func save_local(): - _local_data = { - "visible_dict": visible_dict - } - - var file = File.new() - file.open(LOCAL_DATA_PATH, File.WRITE) - file.store_string(JSON.print(self._local_data)) diff --git a/LocalData.tscn b/LocalData.tscn deleted file mode 100644 index 5ec353b0..00000000 --- a/LocalData.tscn +++ /dev/null @@ -1,3 +0,0 @@ -[gd_scene format=2] - -[node name="LocalData" type="Node"] diff --git a/Route.gd b/Route.gd index 7b46b3ee..aafac4fc 100644 --- a/Route.gd +++ b/Route.gd @@ -1,9 +1,10 @@ extends Spatial +var Waypoint = preload("res://waypoint.gd") + var texture_path -var category_name = "" var color = Color(0.9, 0.1, 0.1) -var is_editable = false +var waypoint = Waypoint.Trail.new() var point_list := PoolVector3Array() @@ -18,12 +19,12 @@ func refresh_mesh(): for point_index in range(len(point_list)-1): var point:Vector3 = point_list[point_index] var next_point:Vector3 = point_list[point_index+1] + # If the line starts or ends at map 0, don't draw the line. if point == Vector3(0,0,0) or next_point == Vector3(0,0,0): continue var distance: float = point.distance_to(next_point) var normal: Vector3 = (next_point - point).normalized() - #print(normal) var horizontal_tangent:Vector3 = Vector3(normal.z, 0, -normal.x).normalized() normal = Vector3(0,0,0) diff --git a/Route2D.gd b/Route2D.gd deleted file mode 100644 index f19e0214..00000000 --- a/Route2D.gd +++ /dev/null @@ -1,7 +0,0 @@ -extends Line2D - -var category_name = "" -var is_editable = false - -func _ready(): - pass # Replace with function body. diff --git a/Settings.gd b/Settings.gd index 2d315cbd..880dcd61 100644 --- a/Settings.gd +++ b/Settings.gd @@ -3,6 +3,7 @@ extends Node const CONFIG_PATH = "user://settings.json" var _config_data = {} +var local_category_data = {} var override_size_enabled: bool = false; var override_size_height: int = 1080 @@ -22,6 +23,10 @@ func _ready(): if self._config_data == null: self._config_data = {} + + if "local_category_data" in self._config_data: + for key in self._config_data["local_category_data"].keys(): + self.local_category_data[key] = self._config_data["local_category_data"][key] if "override_size_enabled" in self._config_data: self.override_size_enabled = self._config_data["override_size_enabled"] @@ -45,8 +50,9 @@ func save(): "burrito_link_auto_launch_enabled": burrito_link_auto_launch_enabled, "burrito_link_wine_path": burrito_link_wine_path, "burrito_link_env_args": burrito_link_env_args, + "local_category_data": local_category_data } var file = File.new() file.open(CONFIG_PATH, File.WRITE) - file.store_string(JSON.print(self._config_data)) + file.store_string(JSON.print(self._config_data, " ")) diff --git a/Spatial.gd b/Spatial.gd index 50956ad7..f30e57a3 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -55,7 +55,6 @@ func _ready(): taco_parser = TacoParser.new() x11_window_id_burrito = OS.get_native_handle(OS.WINDOW_HANDLE) OS.window_maximized = false - print(OS.get_current_screen()) # Start off with a small size before GW2 client is up OS.window_size = Vector2(800, 600) # Postion at top left corner @@ -289,7 +288,7 @@ var markerdata = Waypoint.Waypoint.new() var marker_file_dir = "user://protobins/" var marker_file_path = "" var marker_packs_array = Array() -onready var marker_packs = get_node("Control/Dialogs/MarkerPacks/MarkerPacks") +onready var marker_packs = $Control/Dialogs/MarkerPacks/MarkerPacks func load_waypoint_markers(map_id): self.marker_file_path = self.marker_file_dir + String(map_id) + ".data" @@ -405,13 +404,19 @@ func gen_map_markers(): for path in self.markerdata.get_trail(): var path_points := PoolVector3Array() var trail_data = path.get_trail_data() - if trail_data.get_points_x().size() != trail_data.get_points_y().size() or trail_data.get_points_x().size() != trail_data.get_points_z().size() - print("Warning: Trail ", trail.get_category.get_name(), " does not have equal number of X, Y, and Z coordinates.") + if trail_data.get_points_x().size() != trail_data.get_points_y().size() or trail_data.get_points_x().size() != trail_data.get_points_z().size(): + print("Warning: Trail ", trail_data.get_category.get_name(), " does not have equal number of X, Y, and Z coordinates.") for index in range(0, trail_data.get_points_z().size()): path_points.append(Vector3(trail_data.get_points_x()[index], trail_data.get_points_y()[index], trail_data.get_points_z()[index])) var texture_path = path.get_texture_path() + if texture_path == null: + print("Warning: No texture found in " , path.get_category().name()) + continue var full_texture_path = self.marker_file_dir + texture_path.get_path() - gen_new_path(path_points, full_texture_path, path.get_category().get_name()) + #TODO This tree look up is unnescary if we make path a child of Category in protobuf + var split_name = path.get_category().get_name().split(".") + var category_item = search_category_tree(split_name.size(), split_name, self.marker_packs.get_root()) + gen_new_path(path_points, full_texture_path, path, category_item) for icon in self.markerdata.get_icon(): var position = icon.get_position() if position == null: @@ -420,13 +425,25 @@ func gen_map_markers(): var position_vector = Vector3(position.get_x(), position.get_y(), position.get_z()) var texture_path = icon.get_texture_path() if texture_path == null: - #Some icons have their texture in a parent of the category. + print("Warning: No texture found in " , icon.get_category().name()) continue var full_texture_path = self.marker_file_dir + texture_path.get_path() - gen_new_icon(position_vector, full_texture_path, icon.get_category().get_name()) - - -onready var local_data = get_node("Control/LocalData") + #TODO This tree look up is unnescary if we make path a child of Category in protobuf + var split_name = icon.get_category().get_name().split(".") + var category_item = search_category_tree(split_name.size(), split_name, self.marker_packs.get_root()) + gen_new_icon(position_vector, full_texture_path, icon, category_item) + +func search_category_tree(index, split_name, category_item): + if index == split_name.size(): + return category_item + var child_item = category_item.get_children() + while child_item != null: + if child_item.metadata(0) == split_name[index]: + print(child_item.metadata(0)) + return search_category_tree(index + 1, split_name, child_item) + category_item.next() + print("No category found for ", split_name) + return null func build_category_tree(): var root = marker_packs.create_item() @@ -435,65 +452,83 @@ func build_category_tree(): root.set_text(1, "Visible") for category in self.markerdata.get_category(): + marker_packs_array.append(category.get_name()) add_category(root, category, category.get_name(), false) - -func add_category(item: TreeItem, category, tree_path: String, collapsed: bool): - if category.get_name() != "": - var category_item = marker_packs.create_item(item) - category_item.set_text(0,category.get_display_name()) - category_item.set_metadata(0,category) - category_item.set_cell_mode(1, TreeItem.CELL_MODE_CHECK) - category_item.set_checked(1, self.local_data.visible_dict.get(tree_path, false)) - category_item.set_tooltip(1, "Show/Hide") - category_item.set_editable(1, true) - category_item.set_collapsed(collapsed) - for category_child in category.get_children(): - add_category(category_item, category_child, tree_path + "." + category_child.get_name(), true) +func add_category(item: TreeItem, category, full_category_name: String, collapsed: bool): + if category.get_name() == "": + print("Category found with no name. Full name ", full_category_name) + return + var category_item = marker_packs.create_item(item) + category_item.set_text(0,category.get_display_name()) + category_item.set_metadata(0, full_category_name) + category_item.set_cell_mode(1, TreeItem.CELL_MODE_CHECK) + category_item.set_checked(1, Settings.local_category_data.get(full_category_name, {}).get("checked", false)) + category_item.set_tooltip(1, "Show/Hide") + category_item.set_editable(1, true) + category_item.set_collapsed(collapsed) + for category_child in category.get_children(): + add_category(category_item, category_child, full_category_name + "." + category_child.get_name(), true) func switch_selected_category(category_item: TreeItem): - var selected_category_name = find_pedigree_name(category_item, category_item.get_metadata(0).get_name()) - local_data.visible_dict[selected_category_name] = category_item.is_checked(1) - switch_checkboxes(category_item, category_item.is_checked(1)) - - node_checkmark_switch(selected_category_name, category_item, self.paths) - node_checkmark_switch(selected_category_name, category_item, self.minimap) - node_checkmark_switch(selected_category_name, category_item, self.icons) - - $Control/LocalData.save_local() + Settings.local_category_data[category_item.get_metadata(0)] = { + "checked" : category_item.is_checked(1), + } + update_node_visibility(category_item, self.paths) + update_node_visibility(category_item, self.icons) + Settings.save() -func find_pedigree_name(category_item: TreeItem, pedigree_name: String): - var parent = category_item.get_parent() - if parent.is_selectable(0): - pedigree_name = parent.get_metadata(0).get_name() + "." + pedigree_name - pedigree_name = find_pedigree_name(parent, pedigree_name) - return pedigree_name - - -func node_checkmark_switch(selected_category_name: String, category_item, nodes): +func update_node_visibility(category_item: TreeItem, nodes): for node in nodes.get_children(): - if node.category_name.begins_with(selected_category_name): - local_data.visible_dict[node.category_name] = category_item.is_checked(1) - if category_item.is_checked(1): - node.show() + var node_name = node.waypoint.get_category().get_name() + if node_name.begins_with(category_item.get_metadata(0)): + if is_category_visible(category_item): + node.visible = true else: - node.hide() + node.visible = false + if node.get_name() == "Path": + var index = node.get_index() + var route2d = self.minimap.get_child(index) + route2d.visible= node.visible + +#Child visibility is contigent on all parents having permission +func is_category_visible(category_item: TreeItem) -> bool: + if category_item == marker_packs.get_root(): + return true + if category_item.is_checked(1): + return is_category_visible(category_item.get_parent()) + else: + return false -func switch_checkboxes(item: TreeItem, checked: bool): - if item.get_cell_mode(1) == TreeItem.CELL_MODE_CHECK: - item.set_checked(1, checked) - local_data.visible_dict[find_pedigree_name(item, item.get_metadata(0).get_name())] = checked - - var child_item = item.get_children() +func show_or_hide_all(show_or_hide: bool) : + if show_or_hide == false: + Settings.local_category_data.clear() + var category_item = self.marker_packs.get_root().get_children() + while category_item != null: + category_item.set_checked(1, show_or_hide) + change_all_categories(category_item, show_or_hide) + update_node_visibility(category_item, self.paths) + update_node_visibility(category_item, self.icons) + category_item = category_item.get_next() + Settings.save() + + +func change_all_categories(category_item: TreeItem, show_or_hide: bool): + category_item.set_checked(1, show_or_hide) + if show_or_hide == true: + Settings.local_category_data[category_item.get_metadata(0)] = { + "checked" : true, + } + var child_item = category_item.get_children() while child_item != null: - switch_checkboxes(child_item, checked) + change_all_categories(child_item, show_or_hide) child_item = child_item.get_next() -func gen_new_path(points: Array, texture_path: String, category_name: String): +func gen_new_path(points: Array, texture_path: String, waypoint_trail, category_item: TreeItem): # Create the texture to use from an image file # TODO: We want to be able to cache this data so that if a texture is used @@ -513,18 +548,8 @@ func gen_new_path(points: Array, texture_path: String, category_name: String): texture.storage = ImageTexture.STORAGE_COMPRESS_LOSSLESS texture.create_from_image(image, 22) - # Create a new 3D route - -# var new_curve = Curve3D.new() -# for point in points: -# new_curve.add_point(Vector3(point[0], point[1], -point[2])) -# points_2d.append(Vector2(point[0], -point[2])) -# new_path.curve = new_curve -# path_3d_markers.append(new_path) - var new_route = route_scene.instance() new_route.texture_path = texture_path # Save the location of the image for later - #path_3d_markers.append(new_path) var points_3d := PoolVector3Array() for point in points: @@ -532,45 +557,32 @@ func gen_new_path(points: Array, texture_path: String, category_name: String): new_route.create_mesh(points_3d) new_route.set_texture(texture) - new_route.visible = self.local_data.visible_dict.get(category_name, false) - new_route.category_name = category_name + new_route.waypoint = waypoint_trail + new_route.visible = is_category_visible(category_item) paths.add_child(new_route) - var points_2d_array = segment_2D_paths(points) # Create a new 2D Path - for segment in points_2d_array: - var new_2d_path = path2d_scene.instance() - new_2d_path.points = segment - new_2d_path.texture = texture - new_2d_path.visible = self.local_data.visible_dict.get(category_name, false) - new_2d_path.category_name = category_name - minimap.add_child(new_2d_path) - - -func segment_2D_paths (points: Array): - var points_2d: PoolVector2Array = [] - var points_2d_array = [] + var new_2d_path = path2d_scene.instance() + var points_2d := PoolVector2Array() for point in points: - if point == Vector3(0,0,0): - points_2d_array.append(points_2d) - points_2d = [] - continue points_2d.append(Vector2(point[0], -point[2])) - points_2d_array.append(points_2d) - return points_2d_array + new_2d_path.points = points_2d + new_2d_path.texture = texture + new_2d_path.visible = new_route.visible + minimap.add_child(new_2d_path) + ################################################################################ # ################################################################################ -func gen_new_icon(position: Vector3, texture_path: String, category_name: String): +func gen_new_icon(position: Vector3, texture_path: String, waypoint_icon, category_item: TreeItem): position.z = -position.z var new_icon = icon_scene.instance() new_icon.translation = position new_icon.set_icon_image(texture_path) - new_icon.visible = self.local_data.visible_dict.get(category_name, false) - new_icon.category_name = category_name - #icon_markers.append(new_icon) + new_icon.waypoint = waypoint_icon + new_icon.visible = is_category_visible(category_item) icons.add_child(new_icon) # This function take all of the currently rendered objects and converts it into @@ -623,13 +635,13 @@ func gen_adjustment_nodes(): var route = self.paths.get_child(index) var path2d = self.minimap.get_child(index) #var curve: Curve3D = path.curve - if route.is_editable: + if self.currently_active_category.get_metadata(0) == route.waypoint.get_category().get_name(): for i in range(route.get_point_count()): var gizmo_position = route.get_point_position(i) - # Simplistic cull to prevent nodes that are too far away to be - # visible from being created. Additional work can be done here - # if this is not enough of an optimization in the future. + # Simplistic cull to prevent nodes that are too far away to be + # visible from being created. Additional work can be done here + # if this is not enough of an optimization in the future. if (gizmo_position.distance_squared_to(self.correct_player_position) > 10000): continue var new_gizmo = gizmo_scene.instance() @@ -640,6 +652,7 @@ func gen_adjustment_nodes(): $Gizmos.add_child(new_gizmo) for index in range(self.icons.get_child_count()): + #TODO check for currently active category var icon = self.icons.get_child(index) var new_gizmo = gizmo_scene.instance() new_gizmo.translation = icon.translation @@ -740,27 +753,21 @@ func _on_NewPath_pressed(): # Create a new icon and give it the texture ################################################################################ func _on_NewIcon_pressed(): - gen_new_icon(self.player_position, self.next_texture_path, "") + var waypoint_icon = Waypoint.Icon.new() + waypoint_icon.set_name(self.currently_active_category.get_metadata(0)) + gen_new_icon(self.player_position, self.next_texture_path, waypoint_icon, self.currently_active_category) # A new path point is created func _on_NewPathPoint_pressed(): if self.currently_active_path == null: - gen_new_path([self.player_position], self.next_texture_path, self.currently_active_category.get_name()) + var waypoint_trail = Waypoint.Trail.new() + waypoint_trail.set_name(self.currently_active_category.get_metadata(0)) + gen_new_path([self.player_position], self.next_texture_path, waypoint_trail, self.currently_active_category) else: var z_accurate_player_position = player_position z_accurate_player_position.z = -z_accurate_player_position.z self.currently_active_path.add_point(z_accurate_player_position) - for path2d in minimap.get_children(): - if path2d.category_name == self.currently_active_path.category_name: - path2d.queue_free() - for segment in segment_2D_paths(self.currently_active_path.points()): - var new_2d_path = path2d_scene.instance() - new_2d_path.points = segment - new_2d_path.texture = self.currently_active_path.texture - new_2d_path.visible = self.currently_active_path.visibility - new_2d_path.category_name = self.currently_active_path.category_name - minimap.add_child(new_2d_path) - new_2d_path.refresh_mesh() + self.currently_active_path_2d.add_point(Vector2(self.player_position.x, -self.player_position.z)) ################################################################################ @@ -820,7 +827,7 @@ func _on_NewNodeAfter_pressed(): midpoint = ((start-end)/2) + end path.add_point(midpoint, index+1) - #path2d.add_point(Vector2(midpoint.x, midpoint.z), index+1) + path2d.add_point(Vector2(midpoint.x, midpoint.z), index+1) clear_adjustment_nodes() gen_adjustment_nodes() @@ -864,18 +871,7 @@ func _on_Settings_pressed(): func _on_MarkerPacks_cell_selected(): var category_item = marker_packs.get_selected() - self.currently_active_category = category_item.get_metadata(0) - for path in self.paths.get_children(): - if path.category_name == find_pedigree_name(category_item, category_item.get_metadata(0).get_name()): - path.is_editable = true - self.currently_active_path = path - else: - path.is_editable = false - for icon in self.icons.get_children(): - if icon.category_name == find_pedigree_name(category_item, category_item.get_metadata(0).get_name()): - icon.is_editable = true - else: - icon.is_editable = false + self.currently_active_category = category_item func _on_MarkerPacks_item_edited(): @@ -884,16 +880,7 @@ func _on_MarkerPacks_item_edited(): func _on_ShowAll_pressed(): - var category_item = self.marker_packs.get_root().get_children() - while category_item != null: - category_item.set_checked(1, true) - switch_selected_category(category_item) - category_item = category_item.get_next() - + show_or_hide_all(true) func _on_HideAll_pressed(): - var category_item = self.marker_packs.get_root().get_children() - while category_item != null: - category_item.set_checked(1, false) - switch_selected_category(category_item) - category_item = category_item.get_next() + show_or_hide_all(false) diff --git a/Spatial.tscn b/Spatial.tscn index a5cd171f..e674a3fd 100644 --- a/Spatial.tscn +++ b/Spatial.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=18 format=2] +[gd_scene load_steps=17 format=2] [ext_resource path="res://Spatial.gd" type="Script" id=1] [ext_resource path="res://shaders/range_indicators.shader" type="Shader" id=2] @@ -12,7 +12,6 @@ [ext_resource path="res://icon_new_path.png" type="Texture" id=10] [ext_resource path="res://icon_new_point.png" type="Texture" id=11] [ext_resource path="res://SettingsDialog.gd" type="Script" id=12] -[ext_resource path="res://LocalData.gd" type="Script" id=13] [sub_resource type="Shader" id=1] code = "shader_type canvas_item; @@ -185,10 +184,9 @@ margin_right = 1307.0 margin_bottom = 672.0 window_title = "Open a File" mode = 0 -access = 2 -current_dir = "." -current_file = "." -current_path = "." +access = 1 +current_dir = "user://" +current_path = "user://" __meta__ = { "_edit_use_anchors_": false } @@ -482,11 +480,10 @@ margin_right = 1343.98 margin_bottom = 602.437 window_title = "Open a File" mode = 0 -access = 2 +access = 1 filters = PoolStringArray( "*.png" ) -current_dir = "." -current_file = "." -current_path = "." +current_dir = "user://" +current_path = "user://" __meta__ = { "_edit_use_anchors_": false } @@ -498,10 +495,9 @@ margin_right = 883.169 margin_bottom = 624.833 window_title = "Save Path" resizable = true -access = 2 -current_dir = "." -current_file = "." -current_path = "." +access = 1 +current_dir = "user://" +current_path = "user://" __meta__ = { "_edit_use_anchors_": false } @@ -827,14 +823,6 @@ anchor_bottom = 1.0 margin_top = -6.0 color = Color( 0, 0, 0, 1 ) -[node name="LocalData" type="Control" parent="Control"] -margin_right = 40.0 -margin_bottom = 40.0 -script = ExtResource( 13 ) -__meta__ = { -"_edit_use_anchors_": false -} - [node name="Paths" type="Spatial" parent="."] [node name="Icons" type="Spatial" parent="."] From 4a250442e99e6df83316081ef79574303fe103a3 Mon Sep 17 00:00:00 2001 From: klingbolt <89052698+klingbolt@users.noreply.github.com> Date: Tue, 18 Jul 2023 15:34:40 -0400 Subject: [PATCH 204/539] Apply suggestions from code review --- Spatial.gd | 30 +++++++++++++++--------------- project.godot | 1 - 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/Spatial.gd b/Spatial.gd index f30e57a3..21808c5e 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -397,7 +397,7 @@ func gen_map_markers(): for icon in icons.get_children(): icon.queue_free() - marker_packs.clear() + self.marker_packs.clear() build_category_tree() # Load the data from the markers @@ -405,7 +405,7 @@ func gen_map_markers(): var path_points := PoolVector3Array() var trail_data = path.get_trail_data() if trail_data.get_points_x().size() != trail_data.get_points_y().size() or trail_data.get_points_x().size() != trail_data.get_points_z().size(): - print("Warning: Trail ", trail_data.get_category.get_name(), " does not have equal number of X, Y, and Z coordinates.") + print("Warning: Trail ", path.get_category.get_name(), " does not have equal number of X, Y, and Z coordinates.") for index in range(0, trail_data.get_points_z().size()): path_points.append(Vector3(trail_data.get_points_x()[index], trail_data.get_points_y()[index], trail_data.get_points_z()[index])) var texture_path = path.get_texture_path() @@ -446,20 +446,20 @@ func search_category_tree(index, split_name, category_item): return null func build_category_tree(): - var root = marker_packs.create_item() + var root = self.marker_packs.create_item() root.set_text(0, "Markers available on current map") root.set_selectable(0, false) root.set_text(1, "Visible") for category in self.markerdata.get_category(): - marker_packs_array.append(category.get_name()) + self.marker_packs_array.append(category.get_name()) add_category(root, category, category.get_name(), false) func add_category(item: TreeItem, category, full_category_name: String, collapsed: bool): if category.get_name() == "": print("Category found with no name. Full name ", full_category_name) return - var category_item = marker_packs.create_item(item) + var category_item = self.marker_packs.create_item(item) category_item.set_text(0,category.get_display_name()) category_item.set_metadata(0, full_category_name) category_item.set_cell_mode(1, TreeItem.CELL_MODE_CHECK) @@ -503,28 +503,28 @@ func is_category_visible(category_item: TreeItem) -> bool: return false -func show_or_hide_all(show_or_hide: bool) : - if show_or_hide == false: +func show_or_hide_all(is_visible: bool) : + if is_visible == false: Settings.local_category_data.clear() var category_item = self.marker_packs.get_root().get_children() while category_item != null: - category_item.set_checked(1, show_or_hide) - change_all_categories(category_item, show_or_hide) + category_item.set_checked(1, is_visible) + change_all_categories(category_item, is_visible) update_node_visibility(category_item, self.paths) update_node_visibility(category_item, self.icons) category_item = category_item.get_next() Settings.save() -func change_all_categories(category_item: TreeItem, show_or_hide: bool): - category_item.set_checked(1, show_or_hide) - if show_or_hide == true: +func change_all_categories(category_item: TreeItem, is_visible: bool): + category_item.set_checked(1, is_visible) + if is_visible == true: Settings.local_category_data[category_item.get_metadata(0)] = { "checked" : true, } var child_item = category_item.get_children() while child_item != null: - change_all_categories(child_item, show_or_hide) + change_all_categories(child_item, is_visible) child_item = child_item.get_next() @@ -870,12 +870,12 @@ func _on_Settings_pressed(): func _on_MarkerPacks_cell_selected(): - var category_item = marker_packs.get_selected() + var category_item = self.marker_packs.get_selected() self.currently_active_category = category_item func _on_MarkerPacks_item_edited(): - var category_item = marker_packs.get_edited() + var category_item = self.marker_packs.get_edited() switch_selected_category(category_item) diff --git a/project.godot b/project.godot index 6df2a49b..c8c06b63 100644 --- a/project.godot +++ b/project.godot @@ -35,7 +35,6 @@ config/icon="res://icon.png" [autoload] Settings="*res://Settings.gd" -LocalData="*res://LocalData.gd" [display] From c9ae33d7f5a645a4b47772a9d71ebcd50366b885 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Tue, 18 Jul 2023 18:18:40 -0400 Subject: [PATCH 205/539] Added lines to check icon against current category --- Route2D.tscn | 5 +---- Spatial.gd | 15 +++++++-------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/Route2D.tscn b/Route2D.tscn index 8aed8671..5b3da3ed 100644 --- a/Route2D.tscn +++ b/Route2D.tscn @@ -1,6 +1,4 @@ -[gd_scene load_steps=4 format=2] - -[ext_resource path="res://Route2D.gd" type="Script" id=1] +[gd_scene load_steps=3 format=2] [sub_resource type="Shader" id=1] code = "shader_type canvas_item; @@ -29,4 +27,3 @@ material = SubResource( 2 ) points = PoolVector2Array( 0, 0, 0, 0, 0, 0 ) default_color = Color( 1, 1, 1, 1 ) texture_mode = 1 -script = ExtResource( 1 ) diff --git a/Spatial.gd b/Spatial.gd index 21808c5e..bf8c97e6 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -634,7 +634,6 @@ func gen_adjustment_nodes(): for index in range(self.paths.get_child_count()): var route = self.paths.get_child(index) var path2d = self.minimap.get_child(index) - #var curve: Curve3D = path.curve if self.currently_active_category.get_metadata(0) == route.waypoint.get_category().get_name(): for i in range(route.get_point_count()): var gizmo_position = route.get_point_position(i) @@ -652,14 +651,14 @@ func gen_adjustment_nodes(): $Gizmos.add_child(new_gizmo) for index in range(self.icons.get_child_count()): - #TODO check for currently active category var icon = self.icons.get_child(index) - var new_gizmo = gizmo_scene.instance() - new_gizmo.translation = icon.translation - new_gizmo.link_point("icon", icon) - new_gizmo.connect("selected", self, "on_gizmo_selected") - new_gizmo.connect("deselected", self, "on_gizmo_deselected") - $Gizmos.add_child(new_gizmo) + if self.currently_active_category.get_metadata(0) == icon.waypoint.get_category().get_name(): + var new_gizmo = gizmo_scene.instance() + new_gizmo.translation = icon.translation + new_gizmo.link_point("icon", icon) + new_gizmo.connect("selected", self, "on_gizmo_selected") + new_gizmo.connect("deselected", self, "on_gizmo_deselected") + $Gizmos.add_child(new_gizmo) var currently_selected_node = null From 4106383a4ce73b9bdd24b58fd1612d4144269766 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Fri, 21 Jul 2023 21:14:49 -0400 Subject: [PATCH 206/539] Changes to search tree to account for incomplete Waypoints --- Icon.gd | 4 ++-- Route.gd | 6 +++--- Settings.gd | 4 +--- Spatial.gd | 26 +++++++++++++++++--------- 4 files changed, 23 insertions(+), 17 deletions(-) diff --git a/Icon.gd b/Icon.gd index c2af00cb..a86c050c 100644 --- a/Icon.gd +++ b/Icon.gd @@ -1,9 +1,9 @@ extends Sprite3D -var Waypoint = preload("res://waypoint.gd") +const Waypoint = preload("res://waypoint.gd") var texture_path -var waypoint = Waypoint.Icon.new() +var waypoint := Waypoint.Icon.new() as Waypoint.Icon func set_icon_image(texture_path: String): self.texture_path = texture_path diff --git a/Route.gd b/Route.gd index aafac4fc..32d82d5d 100644 --- a/Route.gd +++ b/Route.gd @@ -1,10 +1,10 @@ extends Spatial -var Waypoint = preload("res://waypoint.gd") +const Waypoint = preload("res://waypoint.gd") var texture_path var color = Color(0.9, 0.1, 0.1) -var waypoint = Waypoint.Trail.new() +var waypoint := Waypoint.Trail.new() as Waypoint.Trail var point_list := PoolVector3Array() @@ -19,7 +19,7 @@ func refresh_mesh(): for point_index in range(len(point_list)-1): var point:Vector3 = point_list[point_index] var next_point:Vector3 = point_list[point_index+1] - # If the line starts or ends at map 0, don't draw the line. + # If the line starts or ends at map coordinates (0,0,0), don't draw the line. if point == Vector3(0,0,0) or next_point == Vector3(0,0,0): continue diff --git a/Settings.gd b/Settings.gd index 880dcd61..f163a5ed 100644 --- a/Settings.gd +++ b/Settings.gd @@ -25,9 +25,7 @@ func _ready(): self._config_data = {} if "local_category_data" in self._config_data: - for key in self._config_data["local_category_data"].keys(): - self.local_category_data[key] = self._config_data["local_category_data"][key] - + self.local_category_data = self._config_data["local_category_data"] if "override_size_enabled" in self._config_data: self.override_size_enabled = self._config_data["override_size_enabled"] if "override_size_height" in self._config_data: diff --git a/Spatial.gd b/Spatial.gd index bf8c97e6..f94c2a06 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -415,7 +415,7 @@ func gen_map_markers(): var full_texture_path = self.marker_file_dir + texture_path.get_path() #TODO This tree look up is unnescary if we make path a child of Category in protobuf var split_name = path.get_category().get_name().split(".") - var category_item = search_category_tree(split_name.size(), split_name, self.marker_packs.get_root()) + var category_item = search_category_tree(0, split_name, self.marker_packs.get_root()) gen_new_path(path_points, full_texture_path, path, category_item) for icon in self.markerdata.get_icon(): var position = icon.get_position() @@ -438,10 +438,13 @@ func search_category_tree(index, split_name, category_item): return category_item var child_item = category_item.get_children() while child_item != null: - if child_item.metadata(0) == split_name[index]: - print(child_item.metadata(0)) - return search_category_tree(index + 1, split_name, child_item) - category_item.next() + if child_item.get_text(0) != "No name": + var joined_name = "" + for i in range(index): + joined_name += split_name[i] + if child_item.get_metadata(0) == joined_name: + return search_category_tree(index + 1, split_name, child_item) + child_item = child_item.get_next() print("No category found for ", split_name) return null @@ -456,12 +459,14 @@ func build_category_tree(): add_category(root, category, category.get_name(), false) func add_category(item: TreeItem, category, full_category_name: String, collapsed: bool): + var category_item = self.marker_packs.create_item(item) if category.get_name() == "": + category_item.set_text(0, "No name") print("Category found with no name. Full name ", full_category_name) return - var category_item = self.marker_packs.create_item(item) - category_item.set_text(0,category.get_display_name()) - category_item.set_metadata(0, full_category_name) + else: + category_item.set_text(0,category.get_display_name()) + category_item.set_metadata(0, full_category_name) category_item.set_cell_mode(1, TreeItem.CELL_MODE_CHECK) category_item.set_checked(1, Settings.local_category_data.get(full_category_name, {}).get("checked", false)) category_item.set_tooltip(1, "Show/Hide") @@ -558,7 +563,10 @@ func gen_new_path(points: Array, texture_path: String, waypoint_trail, category_ new_route.create_mesh(points_3d) new_route.set_texture(texture) new_route.waypoint = waypoint_trail - new_route.visible = is_category_visible(category_item) + if category_item != null: + new_route.visible = is_category_visible(category_item) + else: + new_route.visible = false paths.add_child(new_route) From 8581a65888b45808ab8288b5280c114258045e96 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Fri, 28 Jul 2023 19:40:07 -0400 Subject: [PATCH 207/539] Addressing code review --- Icon.gd | 2 +- Route.gd | 2 +- Spatial.gd | 78 +++++++++++++++++++++------------------------------- Spatial.tscn | 16 ----------- 4 files changed, 34 insertions(+), 64 deletions(-) diff --git a/Icon.gd b/Icon.gd index a86c050c..d8d0c120 100644 --- a/Icon.gd +++ b/Icon.gd @@ -3,7 +3,7 @@ extends Sprite3D const Waypoint = preload("res://waypoint.gd") var texture_path -var waypoint := Waypoint.Icon.new() as Waypoint.Icon +var waypoint : Waypoint.Icon func set_icon_image(texture_path: String): self.texture_path = texture_path diff --git a/Route.gd b/Route.gd index 32d82d5d..f5ce246a 100644 --- a/Route.gd +++ b/Route.gd @@ -4,7 +4,7 @@ const Waypoint = preload("res://waypoint.gd") var texture_path var color = Color(0.9, 0.1, 0.1) -var waypoint := Waypoint.Trail.new() as Waypoint.Trail +var waypoint : Waypoint.Trail var point_list := PoolVector3Array() diff --git a/Spatial.gd b/Spatial.gd index f94c2a06..64e870a2 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -458,15 +458,15 @@ func build_category_tree(): self.marker_packs_array.append(category.get_name()) add_category(root, category, category.get_name(), false) + func add_category(item: TreeItem, category, full_category_name: String, collapsed: bool): var category_item = self.marker_packs.create_item(item) if category.get_name() == "": category_item.set_text(0, "No name") - print("Category found with no name. Full name ", full_category_name) + print("Category found with no name.") return - else: - category_item.set_text(0,category.get_display_name()) - category_item.set_metadata(0, full_category_name) + category_item.set_text(0, category.get_display_name()) + category_item.set_metadata(0, full_category_name) category_item.set_cell_mode(1, TreeItem.CELL_MODE_CHECK) category_item.set_checked(1, Settings.local_category_data.get(full_category_name, {}).get("checked", false)) category_item.set_tooltip(1, "Show/Hide") @@ -476,20 +476,31 @@ func add_category(item: TreeItem, category, full_category_name: String, collapse add_category(category_item, category_child, full_category_name + "." + category_child.get_name(), true) -func switch_selected_category(category_item: TreeItem): +func apply_category_visibility_to_nodes(category_item: TreeItem): Settings.local_category_data[category_item.get_metadata(0)] = { "checked" : category_item.is_checked(1), } - update_node_visibility(category_item, self.paths) - update_node_visibility(category_item, self.icons) - Settings.save() + var temporary_cateogry_visibility_data = populate_update_dict(category_item, {}) + update_node_visibility(temporary_cateogry_visibility_data, self.paths) + update_node_visibility(temporary_cateogry_visibility_data, self.icons) + + +# Builds a dictionary of the visibility of a specific category and all children +func populate_update_dict(category_item: TreeItem, category_visibility_data): + category_visibility_data[category_item.get_metadata(0)] = is_category_visible(category_item) + var child_item = category_item.get_children() + while child_item != null: + category_visibility_data = populate_update_dict(child_item, category_visibility_data) + child_item = child_item.get_next() + return category_visibility_data -func update_node_visibility(category_item: TreeItem, nodes): +#Updates the visibilty of a node and all children. +func update_node_visibility(cateogry_data, nodes): for node in nodes.get_children(): - var node_name = node.waypoint.get_category().get_name() - if node_name.begins_with(category_item.get_metadata(0)): - if is_category_visible(category_item): + var node_name = node.waypoint.get_category().get_name() + if node_name in cateogry_data: + if cateogry_data[node_name]: node.visible = true else: node.visible = false @@ -502,37 +513,14 @@ func update_node_visibility(category_item: TreeItem, nodes): func is_category_visible(category_item: TreeItem) -> bool: if category_item == marker_packs.get_root(): return true + if category_item == null: + return false if category_item.is_checked(1): return is_category_visible(category_item.get_parent()) else: return false -func show_or_hide_all(is_visible: bool) : - if is_visible == false: - Settings.local_category_data.clear() - var category_item = self.marker_packs.get_root().get_children() - while category_item != null: - category_item.set_checked(1, is_visible) - change_all_categories(category_item, is_visible) - update_node_visibility(category_item, self.paths) - update_node_visibility(category_item, self.icons) - category_item = category_item.get_next() - Settings.save() - - -func change_all_categories(category_item: TreeItem, is_visible: bool): - category_item.set_checked(1, is_visible) - if is_visible == true: - Settings.local_category_data[category_item.get_metadata(0)] = { - "checked" : true, - } - var child_item = category_item.get_children() - while child_item != null: - change_all_categories(child_item, is_visible) - child_item = child_item.get_next() - - func gen_new_path(points: Array, texture_path: String, waypoint_trail, category_item: TreeItem): # Create the texture to use from an image file @@ -590,7 +578,10 @@ func gen_new_icon(position: Vector3, texture_path: String, waypoint_icon, catego new_icon.translation = position new_icon.set_icon_image(texture_path) new_icon.waypoint = waypoint_icon - new_icon.visible = is_category_visible(category_item) + if category_item != null: + new_icon.visible = is_category_visible(category_item) + else: + new_icon.visible = false icons.add_child(new_icon) # This function take all of the currently rendered objects and converts it into @@ -761,14 +752,14 @@ func _on_NewPath_pressed(): ################################################################################ func _on_NewIcon_pressed(): var waypoint_icon = Waypoint.Icon.new() - waypoint_icon.set_name(self.currently_active_category.get_metadata(0)) + waypoint_icon.new_category().set_name(self.currently_active_category.get_metadata(0)) gen_new_icon(self.player_position, self.next_texture_path, waypoint_icon, self.currently_active_category) # A new path point is created func _on_NewPathPoint_pressed(): if self.currently_active_path == null: var waypoint_trail = Waypoint.Trail.new() - waypoint_trail.set_name(self.currently_active_category.get_metadata(0)) + waypoint_trail.new_category().set_name(self.currently_active_category.get_metadata(0)) gen_new_path([self.player_position], self.next_texture_path, waypoint_trail, self.currently_active_category) else: var z_accurate_player_position = player_position @@ -883,11 +874,6 @@ func _on_MarkerPacks_cell_selected(): func _on_MarkerPacks_item_edited(): var category_item = self.marker_packs.get_edited() - switch_selected_category(category_item) - + apply_category_visibility_to_nodes(category_item) -func _on_ShowAll_pressed(): - show_or_hide_all(true) -func _on_HideAll_pressed(): - show_or_hide_all(false) diff --git a/Spatial.tscn b/Spatial.tscn index e674a3fd..5db276b4 100644 --- a/Spatial.tscn +++ b/Spatial.tscn @@ -742,20 +742,6 @@ __meta__ = { "_edit_use_anchors_": false } -[node name="ShowAll" type="Button" parent="Control/Dialogs/MarkerPacks"] -margin_left = 5.0 -margin_top = 4.0 -margin_right = 115.0 -margin_bottom = 42.0 -text = "Show All" - -[node name="HideAll" type="Button" parent="Control/Dialogs/MarkerPacks"] -margin_left = 119.0 -margin_top = 4.0 -margin_right = 229.0 -margin_bottom = 42.0 -text = "Hide All" - [node name="Border" type="Control" parent="Control"] visible = false anchor_right = 1.0 @@ -890,5 +876,3 @@ material/0 = SubResource( 4 ) [connection signal="item_edited" from="Control/Dialogs/MarkerPacks/MarkerPacks" to="." method="_on_MarkerPacks_item_edited"] [connection signal="multi_selected" from="Control/Dialogs/MarkerPacks/MarkerPacks" to="." method="_on_Tree_multi_selected"] [connection signal="tree_entered" from="Control/Dialogs/MarkerPacks/MarkerPacks" to="." method="_on_Tree_tree_entered"] -[connection signal="pressed" from="Control/Dialogs/MarkerPacks/ShowAll" to="." method="_on_ShowAll_pressed"] -[connection signal="pressed" from="Control/Dialogs/MarkerPacks/HideAll" to="." method="_on_HideAll_pressed"] From c0a7c3c7cfdd5bed102c8836ffd783abbbc79035 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Fri, 28 Jul 2023 20:19:00 -0400 Subject: [PATCH 208/539] Addressed small changes --- Icon.gd | 2 +- Route.gd | 2 +- Spatial.gd | 22 ++++++++++++---------- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/Icon.gd b/Icon.gd index d8d0c120..1cd9164c 100644 --- a/Icon.gd +++ b/Icon.gd @@ -3,7 +3,7 @@ extends Sprite3D const Waypoint = preload("res://waypoint.gd") var texture_path -var waypoint : Waypoint.Icon +var waypoint: Waypoint.Icon func set_icon_image(texture_path: String): self.texture_path = texture_path diff --git a/Route.gd b/Route.gd index f5ce246a..07a87187 100644 --- a/Route.gd +++ b/Route.gd @@ -4,7 +4,7 @@ const Waypoint = preload("res://waypoint.gd") var texture_path var color = Color(0.9, 0.1, 0.1) -var waypoint : Waypoint.Trail +var waypoint: Waypoint.Trail var point_list := PoolVector3Array() diff --git a/Spatial.gd b/Spatial.gd index 64e870a2..e3dd86fa 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -415,7 +415,7 @@ func gen_map_markers(): var full_texture_path = self.marker_file_dir + texture_path.get_path() #TODO This tree look up is unnescary if we make path a child of Category in protobuf var split_name = path.get_category().get_name().split(".") - var category_item = search_category_tree(0, split_name, self.marker_packs.get_root()) + var category_item = search_category_tree(split_name, self.marker_packs.get_root()) gen_new_path(path_points, full_texture_path, path, category_item) for icon in self.markerdata.get_icon(): var position = icon.get_position() @@ -430,20 +430,20 @@ func gen_map_markers(): var full_texture_path = self.marker_file_dir + texture_path.get_path() #TODO This tree look up is unnescary if we make path a child of Category in protobuf var split_name = icon.get_category().get_name().split(".") - var category_item = search_category_tree(split_name.size(), split_name, self.marker_packs.get_root()) + var category_item = search_category_tree(split_name, self.marker_packs.get_root()) gen_new_icon(position_vector, full_texture_path, icon, category_item) -func search_category_tree(index, split_name, category_item): + +func search_category_tree(split_name, category_item, index: int = 0): if index == split_name.size(): return category_item var child_item = category_item.get_children() while child_item != null: - if child_item.get_text(0) != "No name": - var joined_name = "" - for i in range(index): - joined_name += split_name[i] - if child_item.get_metadata(0) == joined_name: - return search_category_tree(index + 1, split_name, child_item) + var joined_name = "" + for i in range(index): + joined_name += split_name[i] + if child_item.get_metadata(0) == joined_name: + return search_category_tree(split_name, child_item, index + 1) child_item = child_item.get_next() print("No category found for ", split_name) return null @@ -462,7 +462,9 @@ func build_category_tree(): func add_category(item: TreeItem, category, full_category_name: String, collapsed: bool): var category_item = self.marker_packs.create_item(item) if category.get_name() == "": + # If this is called, there is an error in the protobuf data category_item.set_text(0, "No name") + category_item.set_metadata(0, "") print("Category found with no name.") return category_item.set_text(0, category.get_display_name()) @@ -498,7 +500,7 @@ func populate_update_dict(category_item: TreeItem, category_visibility_data): #Updates the visibilty of a node and all children. func update_node_visibility(cateogry_data, nodes): for node in nodes.get_children(): - var node_name = node.waypoint.get_category().get_name() + var node_name = node.waypoint.get_category().get_name() if node_name in cateogry_data: if cateogry_data[node_name]: node.visible = true From 64d0c2649ada9749b6e2e469084a8621c96ce328 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Fri, 28 Jul 2023 20:25:01 -0400 Subject: [PATCH 209/539] Added some types --- Spatial.gd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Spatial.gd b/Spatial.gd index e3dd86fa..60c48d98 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -434,7 +434,7 @@ func gen_map_markers(): gen_new_icon(position_vector, full_texture_path, icon, category_item) -func search_category_tree(split_name, category_item, index: int = 0): +func search_category_tree(split_name: PoolStringArray, category_item: TreeItem, index: int = 0): if index == split_name.size(): return category_item var child_item = category_item.get_children() @@ -462,7 +462,7 @@ func build_category_tree(): func add_category(item: TreeItem, category, full_category_name: String, collapsed: bool): var category_item = self.marker_packs.create_item(item) if category.get_name() == "": - # If this is called, there is an error in the protobuf data + # If this is called, there is an error in the Waypoint data category_item.set_text(0, "No name") category_item.set_metadata(0, "") print("Category found with no name.") From 3dc8f0ecb51ab579ef2f7447700de860f9a0d9e5 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 6 Aug 2023 20:55:34 -0400 Subject: [PATCH 210/539] Made Icon and Trail elements of Category --- xml_converter/generators/code_generator.py | 1 + .../cpp_templates/class_template.cpp | 21 +++- .../cpp_templates/class_template.hpp | 2 +- xml_converter/proto/waypoint.proto | 10 +- xml_converter/src/category_gen.cpp | 20 +++- xml_converter/src/category_gen.hpp | 2 +- xml_converter/src/xml_converter.cpp | 99 ++++++++++--------- 7 files changed, 96 insertions(+), 59 deletions(-) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index c35fc1d1..51a64cbb 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -506,6 +506,7 @@ def generate_cpp_variable_data( cpp_includes.hpp_relative_includes.add("icon_gen.hpp") cpp_includes.hpp_relative_includes.add("trail_gen.hpp") + cpp_includes.cpp_absolute_includes.add("map") cpp_includes.cpp_absolute_includes.add("type_traits") for filepath, document in sorted(self.data.items()): diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index 51932b58..a1f51862 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -93,7 +93,12 @@ vector {{cpp_class}}::as_xml() const { return xml_node_contents; } +{% if cpp_class == "Category": %} +waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf(string full_category_name, map* parsed_pois) const { + full_category_name += this->name; +{% else %} waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf() const { +{% endif %} waypoint::{{cpp_class}} proto_{{cpp_class_header}}; {% if cpp_class == "Icon": %} waypoint::Trigger* trigger = nullptr; @@ -146,8 +151,22 @@ waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf() const { } {% endif %} {% if cpp_class == "Category": %} + + auto poi = parsed_pois->find(full_category_name); + + if (poi != parsed_pois->end()) { + if (poi->second->classname() == "POI") { + Icon* icon = dynamic_cast(poi->second); + proto_{{cpp_class_header}}.add_icon()->MergeFrom(icon->as_protobuf()); + } + else if (poi->second->classname() == "Trail") { + Trail* trail = dynamic_cast(poi->second); + proto_{{cpp_class_header}}.add_trail()->MergeFrom(trail->as_protobuf()); + } + } + for (const auto& [key, val] : this->children) { - waypoint::{{cpp_class}} proto_{{cpp_class_header}}_child = val.as_protobuf(); + waypoint::{{cpp_class}} proto_{{cpp_class_header}}_child = val.as_protobuf(full_category_name + ".", parsed_pois); proto_{{cpp_class_header}}.add_children()->CopyFrom(proto_{{cpp_class_header}}_child); } {% endif %} diff --git a/xml_converter/generators/cpp_templates/class_template.hpp b/xml_converter/generators/cpp_templates/class_template.hpp index 19d7aa26..b1250912 100644 --- a/xml_converter/generators/cpp_templates/class_template.hpp +++ b/xml_converter/generators/cpp_templates/class_template.hpp @@ -34,7 +34,7 @@ class {{cpp_class}} : public Parseable { virtual std::vector as_xml() const; virtual std::string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, std::string base_dir = ""); - waypoint::{{cpp_class}} as_protobuf() const; + waypoint::{{cpp_class}} as_protobuf({{"std::string full_category_name, std::map* parsed_pois" if cpp_class == "Category" else ""}}) const; void parse_protobuf(waypoint::{{cpp_class}} proto_{{cpp_class_header}}); {% if attributes_of_type_marker_category %} bool validate_attributes_of_type_marker_category(); diff --git a/xml_converter/proto/waypoint.proto b/xml_converter/proto/waypoint.proto index 33545ca2..aa92cd93 100644 --- a/xml_converter/proto/waypoint.proto +++ b/xml_converter/proto/waypoint.proto @@ -4,8 +4,6 @@ package waypoint; message Waypoint { repeated Category category = 1; - repeated Icon icon = 2; - repeated Trail trail = 3; } message Category { @@ -15,10 +13,11 @@ message Category { string name = 4; string tip_description = 5; repeated Category children = 6; + repeated Icon icon = 7; + repeated Trail trail = 8; } -message Icon { - Category category = 1; +message Icon { TexturePath texture_path = 2; GUID guid = 3; int32 map_id = 4; @@ -53,10 +52,10 @@ message Icon { bool tentative__render_on_minimap = 2051; string bhdraft__schedule = 2052; float bhdraft__schedule_duration = 2053; + Category category = 2054; } message Trail { - Category category = 1; TexturePath texture_path = 2; GUID guid = 3; int32 map_id = 4; @@ -85,6 +84,7 @@ message Trail { bool tentative__render_on_minimap = 2051; string bhdraft__schedule = 2052; float bhdraft__schedule_duration = 2053; + Category category = 2054; } message TexturePath { diff --git a/xml_converter/src/category_gen.cpp b/xml_converter/src/category_gen.cpp index 392eff0b..4d00473b 100644 --- a/xml_converter/src/category_gen.cpp +++ b/xml_converter/src/category_gen.cpp @@ -2,6 +2,7 @@ #include #include +#include #include #include @@ -94,7 +95,8 @@ vector Category::as_xml() const { return xml_node_contents; } -waypoint::Category Category::as_protobuf() const { +waypoint::Category Category::as_protobuf(string full_category_name, map* parsed_pois) const { + full_category_name += this->name; waypoint::Category proto_category; if (this->default_visibility_is_set) { proto_category.set_default_visibility(this->default_visibility); @@ -111,8 +113,22 @@ waypoint::Category Category::as_protobuf() const { if (this->tooltip_description_is_set) { proto_category.set_tip_description(this->tooltip_description); } + + auto poi = parsed_pois->find(full_category_name); + + if (poi != parsed_pois->end()) { + if (poi->second->classname() == "POI") { + Icon* icon = dynamic_cast(poi->second); + proto_category.add_icon()->MergeFrom(icon->as_protobuf()); + } + else if (poi->second->classname() == "Trail") { + Trail* trail = dynamic_cast(poi->second); + proto_category.add_trail()->MergeFrom(trail->as_protobuf()); + } + } + for (const auto& [key, val] : this->children) { - waypoint::Category proto_category_child = val.as_protobuf(); + waypoint::Category proto_category_child = val.as_protobuf(full_category_name + ".", parsed_pois); proto_category.add_children()->CopyFrom(proto_category_child); } return proto_category; diff --git a/xml_converter/src/category_gen.hpp b/xml_converter/src/category_gen.hpp index 3ef42874..b711ea09 100644 --- a/xml_converter/src/category_gen.hpp +++ b/xml_converter/src/category_gen.hpp @@ -32,6 +32,6 @@ class Category : public Parseable { virtual std::vector as_xml() const; virtual std::string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, std::string base_dir = ""); - waypoint::Category as_protobuf() const; + waypoint::Category as_protobuf(std::string full_category_name, std::map* parsed_pois) const; void parse_protobuf(waypoint::Category proto_category); }; diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 1617b099..c632850e 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -104,27 +104,31 @@ void remove_proto_child(waypoint::Category* proto_category, set categori } void write_protobuf_file(string proto_directory, map* marker_categories, vector* parsed_pois) { - // Creates a Waypoint message that contains all categories - waypoint::Waypoint all_categories; - for (const auto& category : *marker_categories) { - waypoint::Category proto_category = category.second.as_protobuf(); - all_categories.add_category()->CopyFrom(proto_category); - } - waypoint::Waypoint proto_pois; // Collects a set of map ids from Icon and Trail data std::set map_ids; ofstream trail_data_file; + map map_of_pois; for (const auto& parsed_poi : *parsed_pois) { if (parsed_poi->classname() == "POI") { Icon* icon = dynamic_cast(parsed_poi); map_ids.insert(icon->map_id); + map_of_pois[icon->category.category] = icon; } else if (parsed_poi->classname() == "Trail") { Trail* trail = dynamic_cast(parsed_poi); map_ids.insert(trail->map_id); + map_of_pois[trail->category.category] = trail; } } + + // Creates a Waypoint message that contains all categories + waypoint::Waypoint all_categories; + for (const auto& category : *marker_categories) { + waypoint::Category proto_category = category.second.as_protobuf("", &map_of_pois); + all_categories.add_category()->CopyFrom(proto_category); + } + waypoint::Waypoint output_message; std::set categories_to_retain; for (int map_id : map_ids) { @@ -138,15 +142,12 @@ void write_protobuf_file(string proto_directory, map* marker_c Icon* icon = dynamic_cast(parsed_poi); if (icon->map_id == map_id) { populate_categories_to_retain(icon->category.category, &categories_to_retain); - output_message.add_icon()->MergeFrom(icon->as_protobuf()); } } else if (parsed_poi->classname() == "Trail") { Trail* trail = dynamic_cast(parsed_poi); if (trail->map_id == map_id) { populate_categories_to_retain(trail->category.category, &categories_to_retain); - waypoint::Trail proto_trail = trail->as_protobuf(); - output_message.add_trail()->MergeFrom(proto_trail); } } } @@ -248,21 +249,6 @@ vector parse_pois(rapidxml::xml_node<>* root_node, map parse_proto_pois(waypoint::Waypoint proto_message) { - vector markers; - - for (int i = 0; i < proto_message.icon_size(); i++) { - Icon* icon = new Icon(); - icon->parse_protobuf(proto_message.icon(i)); - markers.push_back(icon); - } - for (int i = 0; i < proto_message.trail_size(); i++) { - Trail* trail = new Trail(); - trail->parse_protobuf(proto_message.trail(i)); - markers.push_back(trail); - } - return markers; -} void parse_marker_categories(rapidxml::xml_node<>* node, map* marker_categories, vector* errors, int depth = 0) { if (get_node_name(node) == "MarkerCategory") { @@ -278,12 +264,30 @@ void parse_marker_categories(rapidxml::xml_node<>* node, map* errors->push_back(new XMLNodeNameError("Unknown MarkerCategory Tag", node)); } } -void parse_proto_marker_categories(::waypoint::Category proto_category, map* marker_categories) { - string name = proto_category.name(); - Category* this_category = &(*marker_categories)[name]; +void parse_waypoint_categories(string full_category_name, ::waypoint::Category proto_category, map* marker_categories, vector* parsed_pois) { + full_category_name += proto_category.name(); + Category* this_category = &(*marker_categories)[full_category_name]; this_category->parse_protobuf(proto_category); + + for (int i = 0; i < proto_category.icon_size(); i++) { + Icon* icon = new Icon(); + icon->parse_protobuf(proto_category.icon(i)); + //TODO: The field category in Icon is being deprciated + //This overwrites any icon.category with its position in the heirarchy + icon->category.category = full_category_name; + parsed_pois->push_back(icon); + } + for (int i = 0; i < proto_category.trail_size(); i++) { + Trail* trail = new Trail(); + trail->parse_protobuf(proto_category.trail(i)); + //TODO: The field category in Trail is being deprciated + //This overwrites any trail.category with its position in the heirarchy + trail->category.category = full_category_name; + parsed_pois->push_back(trail); + } + for (int i = 0; i < proto_category.children_size(); i++) { - parse_proto_marker_categories(proto_category.children(i), &(this_category->children)); + parse_waypoint_categories(full_category_name + ".", proto_category.children(i), &(this_category->children), parsed_pois); } } @@ -335,10 +339,8 @@ void read_protobuf_file(string proto_filepath, map* marker_cat infile.open(proto_filepath, ios::in | ios::binary); proto_message.ParseFromIstream(&infile); for (int i = 0; i < proto_message.category_size(); i++) { - parse_proto_marker_categories(proto_message.category(i), marker_categories); + parse_waypoint_categories("", proto_message.category(i), marker_categories, parsed_pois); } - vector temp_vector = parse_proto_pois(proto_message); - move(temp_vector.begin(), temp_vector.end(), back_inserter(*parsed_pois)); } bool filename_comp(string a, string b) { @@ -506,24 +508,23 @@ int main() { cout << "The protobuf write function took " << ms << " milliseconds to run" << endl; //////////////////////////////////////////////////////////////////////////// - // This section tests that the protobuf file can be parsed back to xml + // This section can test that a protobuf file can be parsed back to xml //////////////////////////////////////////////////////////////////////////// - parsed_pois.clear(); - marker_categories.clear(); - - begin = chrono::high_resolution_clock::now(); - read_protobuf_file("./protobins/50.data", &marker_categories, &parsed_pois); - end = chrono::high_resolution_clock::now(); - dur = end - begin; - ms = std::chrono::duration_cast(dur).count(); - cout << "The protobuf read function took " << ms << " milliseconds to run" << endl; - - begin = chrono::high_resolution_clock::now(); - write_xml_file("./protobins/50.xml", &marker_categories, &parsed_pois); - end = chrono::high_resolution_clock::now(); - dur = end - begin; - ms = std::chrono::duration_cast(dur).count(); - cout << "The xml write function took " << ms << " milliseconds to run" << endl; + // parsed_pois.clear(); + // marker_categories.clear(); + // begin = chrono::high_resolution_clock::now(); + // read_protobuf_file("./protobins/1.data", &marker_categories, &parsed_pois); + // end = chrono::high_resolution_clock::now(); + // dur = end - begin; + // ms = std::chrono::duration_cast(dur).count(); + // cout << "The protobuf read function took " << ms << " milliseconds to run" << endl; + + // begin = chrono::high_resolution_clock::now(); + // write_xml_file("./protobins/1.xml", &marker_categories, &parsed_pois); + // end = chrono::high_resolution_clock::now(); + // dur = end - begin; + // ms = std::chrono::duration_cast(dur).count(); + // cout << "The xml write function took " << ms << " milliseconds to run" << endl; return 0; } From 80aef0c75f5685b5d11f80171688c0c09c426165 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 6 Aug 2023 21:39:02 -0400 Subject: [PATCH 211/539] Fixed the map to a vector and other small changes --- xml_converter/generators/code_generator.py | 2 +- .../cpp_templates/class_template.cpp | 24 ++++++++++--------- .../cpp_templates/class_template.hpp | 6 ++++- xml_converter/proto/waypoint.proto | 2 +- xml_converter/src/category_gen.cpp | 24 ++++++++++--------- xml_converter/src/category_gen.hpp | 2 +- xml_converter/src/xml_converter.cpp | 14 +++++------ 7 files changed, 41 insertions(+), 33 deletions(-) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 51a64cbb..dbd5c683 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -506,7 +506,7 @@ def generate_cpp_variable_data( cpp_includes.hpp_relative_includes.add("icon_gen.hpp") cpp_includes.hpp_relative_includes.add("trail_gen.hpp") - cpp_includes.cpp_absolute_includes.add("map") + cpp_includes.cpp_absolute_includes.add("utility") cpp_includes.cpp_absolute_includes.add("type_traits") for filepath, document in sorted(self.data.items()): diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index a1f51862..cae3d122 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -94,7 +94,7 @@ vector {{cpp_class}}::as_xml() const { } {% if cpp_class == "Category": %} -waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf(string full_category_name, map* parsed_pois) const { +waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf(string full_category_name, map>* parsed_pois) const { full_category_name += this->name; {% else %} waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf() const { @@ -152,16 +152,18 @@ waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf() const { {% endif %} {% if cpp_class == "Category": %} - auto poi = parsed_pois->find(full_category_name); - - if (poi != parsed_pois->end()) { - if (poi->second->classname() == "POI") { - Icon* icon = dynamic_cast(poi->second); - proto_{{cpp_class_header}}.add_icon()->MergeFrom(icon->as_protobuf()); - } - else if (poi->second->classname() == "Trail") { - Trail* trail = dynamic_cast(poi->second); - proto_{{cpp_class_header}}.add_trail()->MergeFrom(trail->as_protobuf()); + auto pois = parsed_pois->find(full_category_name); + + if (pois != parsed_pois->end()) { + for (unsigned int i = 0; i < pois->second.size(); i++) { + if (pois->second[i]->classname() == "POI") { + Icon* icon = dynamic_cast(pois->second[i]); + proto_{{cpp_class_header}}.add_icon()->MergeFrom(icon->as_protobuf()); + } + else if (pois->second[i]->classname() == "Trail") { + Trail* trail = dynamic_cast(pois->second[i]); + proto_{{cpp_class_header}}.add_trail()->MergeFrom(trail->as_protobuf()); + } } } diff --git a/xml_converter/generators/cpp_templates/class_template.hpp b/xml_converter/generators/cpp_templates/class_template.hpp index b1250912..bd2b3bf9 100644 --- a/xml_converter/generators/cpp_templates/class_template.hpp +++ b/xml_converter/generators/cpp_templates/class_template.hpp @@ -34,7 +34,11 @@ class {{cpp_class}} : public Parseable { virtual std::vector as_xml() const; virtual std::string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, std::string base_dir = ""); - waypoint::{{cpp_class}} as_protobuf({{"std::string full_category_name, std::map* parsed_pois" if cpp_class == "Category" else ""}}) const; + {% if cpp_class == "Category": %} + waypoint::{{cpp_class}} as_protobuf(std::string full_category_name, std::map>* parsed_pois) const; + {% else: %} + waypoint::{{cpp_class}} as_protobuf() const; + {% endif %} void parse_protobuf(waypoint::{{cpp_class}} proto_{{cpp_class_header}}); {% if attributes_of_type_marker_category %} bool validate_attributes_of_type_marker_category(); diff --git a/xml_converter/proto/waypoint.proto b/xml_converter/proto/waypoint.proto index aa92cd93..ab239d57 100644 --- a/xml_converter/proto/waypoint.proto +++ b/xml_converter/proto/waypoint.proto @@ -17,7 +17,7 @@ message Category { repeated Trail trail = 8; } -message Icon { +message Icon { TexturePath texture_path = 2; GUID guid = 3; int32 map_id = 4; diff --git a/xml_converter/src/category_gen.cpp b/xml_converter/src/category_gen.cpp index 4d00473b..0ba4e65a 100644 --- a/xml_converter/src/category_gen.cpp +++ b/xml_converter/src/category_gen.cpp @@ -2,9 +2,9 @@ #include #include -#include #include #include +#include #include "attribute/bool.hpp" #include "attribute/string.hpp" @@ -95,7 +95,7 @@ vector Category::as_xml() const { return xml_node_contents; } -waypoint::Category Category::as_protobuf(string full_category_name, map* parsed_pois) const { +waypoint::Category Category::as_protobuf(string full_category_name, map>* parsed_pois) const { full_category_name += this->name; waypoint::Category proto_category; if (this->default_visibility_is_set) { @@ -114,16 +114,18 @@ waypoint::Category Category::as_protobuf(string full_category_name, maptooltip_description); } - auto poi = parsed_pois->find(full_category_name); + auto pois = parsed_pois->find(full_category_name); - if (poi != parsed_pois->end()) { - if (poi->second->classname() == "POI") { - Icon* icon = dynamic_cast(poi->second); - proto_category.add_icon()->MergeFrom(icon->as_protobuf()); - } - else if (poi->second->classname() == "Trail") { - Trail* trail = dynamic_cast(poi->second); - proto_category.add_trail()->MergeFrom(trail->as_protobuf()); + if (pois != parsed_pois->end()) { + for (unsigned int i = 0; i < pois->second.size(); i++){ + if (pois->second[i]->classname() == "POI") { + Icon* icon = dynamic_cast(pois->second[i]); + proto_category.add_icon()->MergeFrom(icon->as_protobuf()); + } + else if (pois->second[i]->classname() == "Trail") { + Trail* trail = dynamic_cast(pois->second[i]); + proto_category.add_trail()->MergeFrom(trail->as_protobuf()); + } } } diff --git a/xml_converter/src/category_gen.hpp b/xml_converter/src/category_gen.hpp index b711ea09..89e7a96c 100644 --- a/xml_converter/src/category_gen.hpp +++ b/xml_converter/src/category_gen.hpp @@ -32,6 +32,6 @@ class Category : public Parseable { virtual std::vector as_xml() const; virtual std::string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, std::string base_dir = ""); - waypoint::Category as_protobuf(std::string full_category_name, std::map* parsed_pois) const; + waypoint::Category as_protobuf(std::string full_category_name, std::map>* parsed_pois) const; void parse_protobuf(waypoint::Category proto_category); }; diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index c632850e..1753f101 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -108,17 +108,17 @@ void write_protobuf_file(string proto_directory, map* marker_c // Collects a set of map ids from Icon and Trail data std::set map_ids; ofstream trail_data_file; - map map_of_pois; + map> map_of_pois; for (const auto& parsed_poi : *parsed_pois) { if (parsed_poi->classname() == "POI") { Icon* icon = dynamic_cast(parsed_poi); map_ids.insert(icon->map_id); - map_of_pois[icon->category.category] = icon; + map_of_pois[icon->category.category].push_back(icon); } else if (parsed_poi->classname() == "Trail") { Trail* trail = dynamic_cast(parsed_poi); map_ids.insert(trail->map_id); - map_of_pois[trail->category.category] = trail; + map_of_pois[trail->category.category].push_back(trail); } } @@ -272,16 +272,16 @@ void parse_waypoint_categories(string full_category_name, ::waypoint::Category p for (int i = 0; i < proto_category.icon_size(); i++) { Icon* icon = new Icon(); icon->parse_protobuf(proto_category.icon(i)); - //TODO: The field category in Icon is being deprciated - //This overwrites any icon.category with its position in the heirarchy + // TODO: The field category in Icon is being deprciated + // This overwrites any icon.category with its position in the heirarchy icon->category.category = full_category_name; parsed_pois->push_back(icon); } for (int i = 0; i < proto_category.trail_size(); i++) { Trail* trail = new Trail(); trail->parse_protobuf(proto_category.trail(i)); - //TODO: The field category in Trail is being deprciated - //This overwrites any trail.category with its position in the heirarchy + // TODO: The field category in Trail is being deprciated + // This overwrites any trail.category with its position in the heirarchy trail->category.category = full_category_name; parsed_pois->push_back(trail); } From 63764cde4119b4ddf6ba7b0b924ded90ba21a8ae Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 6 Aug 2023 21:42:07 -0400 Subject: [PATCH 212/539] Missed a space --- xml_converter/src/category_gen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml_converter/src/category_gen.cpp b/xml_converter/src/category_gen.cpp index 0ba4e65a..f480a007 100644 --- a/xml_converter/src/category_gen.cpp +++ b/xml_converter/src/category_gen.cpp @@ -117,7 +117,7 @@ waypoint::Category Category::as_protobuf(string full_category_name, mapfind(full_category_name); if (pois != parsed_pois->end()) { - for (unsigned int i = 0; i < pois->second.size(); i++){ + for (unsigned int i = 0; i < pois->second.size(); i++) { if (pois->second[i]->classname() == "POI") { Icon* icon = dynamic_cast(pois->second[i]); proto_category.add_icon()->MergeFrom(icon->as_protobuf()); From 38a3f00a494ffcc463bbc5c247313c458bc325ec Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 6 Aug 2023 21:47:51 -0400 Subject: [PATCH 213/539] Added intents in templates --- xml_converter/generators/cpp_templates/class_template.cpp | 6 +++--- xml_converter/generators/cpp_templates/class_template.hpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index cae3d122..2cf0f2d2 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -94,10 +94,10 @@ vector {{cpp_class}}::as_xml() const { } {% if cpp_class == "Category": %} -waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf(string full_category_name, map>* parsed_pois) const { - full_category_name += this->name; + waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf(string full_category_name, map>* parsed_pois) const { + full_category_name += this->name; {% else %} -waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf() const { + waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf() const { {% endif %} waypoint::{{cpp_class}} proto_{{cpp_class_header}}; {% if cpp_class == "Icon": %} diff --git a/xml_converter/generators/cpp_templates/class_template.hpp b/xml_converter/generators/cpp_templates/class_template.hpp index bd2b3bf9..72102bf5 100644 --- a/xml_converter/generators/cpp_templates/class_template.hpp +++ b/xml_converter/generators/cpp_templates/class_template.hpp @@ -35,9 +35,9 @@ class {{cpp_class}} : public Parseable { virtual std::string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, std::string base_dir = ""); {% if cpp_class == "Category": %} - waypoint::{{cpp_class}} as_protobuf(std::string full_category_name, std::map>* parsed_pois) const; + waypoint::{{cpp_class}} as_protobuf(std::string full_category_name, std::map>* parsed_pois) const; {% else: %} - waypoint::{{cpp_class}} as_protobuf() const; + waypoint::{{cpp_class}} as_protobuf() const; {% endif %} void parse_protobuf(waypoint::{{cpp_class}} proto_{{cpp_class_header}}); {% if attributes_of_type_marker_category %} From 00f2f28ccdbc4558bf26796bce752117069fbcb6 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 6 Aug 2023 22:16:02 -0400 Subject: [PATCH 214/539] Added a line fore formatting --- xml_converter/src/xml_converter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 1753f101..225819ba 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -249,7 +249,6 @@ vector parse_pois(rapidxml::xml_node<>* root_node, map* node, map* marker_categories, vector* errors, int depth = 0) { if (get_node_name(node) == "MarkerCategory") { string name = lowercase(find_attribute_value(node, "name")); @@ -264,6 +263,7 @@ void parse_marker_categories(rapidxml::xml_node<>* node, map* errors->push_back(new XMLNodeNameError("Unknown MarkerCategory Tag", node)); } } + void parse_waypoint_categories(string full_category_name, ::waypoint::Category proto_category, map* marker_categories, vector* parsed_pois) { full_category_name += proto_category.name(); Category* this_category = &(*marker_categories)[full_category_name]; From 62b83739e5687273ef1d4b7bfff565033fb2820d Mon Sep 17 00:00:00 2001 From: klingbolt Date: Tue, 15 Aug 2023 20:59:46 -0400 Subject: [PATCH 215/539] Made changes to remove POIS from Waypoint files based on MapID --- xml_converter/src/xml_converter.cpp | 42 ++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 225819ba..6fffbce5 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -80,22 +80,40 @@ void populate_categories_to_retain(string category_name, set* categories } //////////////////////////////////////////////////////////////////////////////// -// Iterates through all children of a Category and removes those that do not -// have a nodes that belongs to it. +// Iterates through all children of a Category and removes the categories and +// POIs that do not belong on a particular map //////////////////////////////////////////////////////////////////////////////// -void remove_proto_child(waypoint::Category* proto_category, set categories_to_retain, string parent_name) { +void remove_waypoint_elements(waypoint::Category* proto_category, set categories_to_retain, string parent_name, int map_id) { int keep = 0; + for (int i = 0; i < proto_category->icon_size(); i++) { + if (proto_category->icon(i).map_id() == map_id) { + if (keep < i) { + proto_category->mutable_icon()->SwapElements(i, keep); + } + ++keep; + } + } + proto_category->mutable_icon()->DeleteSubrange(keep, proto_category->icon_size() - keep); + + keep = 0; + for (int i = 0; i < proto_category->trail_size(); i++) { + if (proto_category->trail(i).map_id() == map_id) { + if (keep < i) { + proto_category->mutable_trail()->SwapElements(i, keep); + } + ++keep; + } + } + proto_category->mutable_trail()->DeleteSubrange(keep, proto_category->trail_size() - keep); + + keep = 0; for (int i = 0; i < proto_category->children_size(); i++) { string name = parent_name + "." + proto_category->children(i).name(); - auto pos = categories_to_retain.find(lowercase(name)); + auto pos = categories_to_retain.find(name); if (pos != categories_to_retain.end()) { + remove_waypoint_elements(proto_category->mutable_children(i), categories_to_retain, name, map_id); if (keep < i) { proto_category->mutable_children()->SwapElements(i, keep); - if (proto_category->children(i).children_size() >= 0) { - for (int j = 0; j < proto_category->children_size(); j++) { - remove_proto_child(proto_category->mutable_children(j), categories_to_retain, name); - } - } } ++keep; } @@ -152,14 +170,14 @@ void write_protobuf_file(string proto_directory, map* marker_c } } // In the XML, MarkerCategories have a tree hierarchy while POIS have a - // flat hierarchy. This is preserved in the protobuf for ease of - // translation. We are doing a removal instead of an insertion because + // flat hierarchy. In Waypoint, POIs are elements of the category they + // belong to. We are removing instead of inserting because // each parent category contains the data for all of its children. It // would be impractical to include all of the data from each category // except for the children and then iterating over all the children. // This pruning method is slower but ensures that information is kept. for (int i = 0; i < output_message.category_size(); i++) { - remove_proto_child(output_message.mutable_category(i), categories_to_retain, output_message.category(i).name()); + remove_waypoint_elements(output_message.mutable_category(i), categories_to_retain, output_message.category(i).name(), map_id); if (output_message.mutable_category(i)->children_size() == 0) { output_message.mutable_category(i)->Clear(); } From 87dec589e582301cd58b91f6acdcabe7c029959c Mon Sep 17 00:00:00 2001 From: klingbolt Date: Thu, 24 Aug 2023 22:24:24 -0400 Subject: [PATCH 216/539] Reworked to read data from PR #152 --- Spatial.gd | 140 ++++++++++++++++++----------------------------------- 1 file changed, 46 insertions(+), 94 deletions(-) diff --git a/Spatial.gd b/Spatial.gd index 60c48d98..981cec92 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -287,16 +287,23 @@ func reset_minimap_masks(): var markerdata = Waypoint.Waypoint.new() var marker_file_dir = "user://protobins/" var marker_file_path = "" -var marker_packs_array = Array() +var root: TreeItem + +##########Node Connections########### onready var marker_packs = $Control/Dialogs/MarkerPacks/MarkerPacks +onready var icons = $Icons +onready var paths = $Paths +onready var minimap = $Control/MiniMap + func load_waypoint_markers(map_id): - self.marker_file_path = self.marker_file_dir + String(map_id) + ".data" - print("Loading protobuf file from path ", self.marker_file_path) - self.markerdata.clear_category() - self.markerdata.clear_icon() - self.markerdata.clear_trail() + self.marker_file_path = self.marker_file_dir.get_current_dir() + String(map_id) + ".data" + self.Waypoint_data.clear_category() + clear_map_markers() + root.free() + init_category_tree() var file = File.new() + print("Loading protobuf file from path ", self.marker_file_path) file.open(self.marker_file_path, file.READ) var data = file.get_buffer(file.get_len()) self.markerdata.from_bytes(data) @@ -382,11 +389,7 @@ func _unhandled_input(event): ################################################################################ # ################################################################################ -onready var icons = $Icons -onready var paths = $Paths -onready var minimap = $Control/MiniMap - -func gen_map_markers(): +func clear_map_markers(): # Clear all the rendered assets to make way for the new ones for path in paths.get_children(): path.queue_free() @@ -397,56 +400,6 @@ func gen_map_markers(): for icon in icons.get_children(): icon.queue_free() - self.marker_packs.clear() - build_category_tree() - - # Load the data from the markers - for path in self.markerdata.get_trail(): - var path_points := PoolVector3Array() - var trail_data = path.get_trail_data() - if trail_data.get_points_x().size() != trail_data.get_points_y().size() or trail_data.get_points_x().size() != trail_data.get_points_z().size(): - print("Warning: Trail ", path.get_category.get_name(), " does not have equal number of X, Y, and Z coordinates.") - for index in range(0, trail_data.get_points_z().size()): - path_points.append(Vector3(trail_data.get_points_x()[index], trail_data.get_points_y()[index], trail_data.get_points_z()[index])) - var texture_path = path.get_texture_path() - if texture_path == null: - print("Warning: No texture found in " , path.get_category().name()) - continue - var full_texture_path = self.marker_file_dir + texture_path.get_path() - #TODO This tree look up is unnescary if we make path a child of Category in protobuf - var split_name = path.get_category().get_name().split(".") - var category_item = search_category_tree(split_name, self.marker_packs.get_root()) - gen_new_path(path_points, full_texture_path, path, category_item) - for icon in self.markerdata.get_icon(): - var position = icon.get_position() - if position == null: - print("Warning: No position found for icon ", icon.get_category().name()) - continue - var position_vector = Vector3(position.get_x(), position.get_y(), position.get_z()) - var texture_path = icon.get_texture_path() - if texture_path == null: - print("Warning: No texture found in " , icon.get_category().name()) - continue - var full_texture_path = self.marker_file_dir + texture_path.get_path() - #TODO This tree look up is unnescary if we make path a child of Category in protobuf - var split_name = icon.get_category().get_name().split(".") - var category_item = search_category_tree(split_name, self.marker_packs.get_root()) - gen_new_icon(position_vector, full_texture_path, icon, category_item) - - -func search_category_tree(split_name: PoolStringArray, category_item: TreeItem, index: int = 0): - if index == split_name.size(): - return category_item - var child_item = category_item.get_children() - while child_item != null: - var joined_name = "" - for i in range(index): - joined_name += split_name[i] - if child_item.get_metadata(0) == joined_name: - return search_category_tree(split_name, child_item, index + 1) - child_item = child_item.get_next() - print("No category found for ", split_name) - return null func build_category_tree(): var root = self.marker_packs.create_item() @@ -474,6 +427,34 @@ func add_category(item: TreeItem, category, full_category_name: String, collapse category_item.set_tooltip(1, "Show/Hide") category_item.set_editable(1, true) category_item.set_collapsed(collapsed) + + for path in category.get_trail(): + var path_points := PoolVector3Array() + var trail_data = path.get_trail_data() + if trail_data.get_points_x().size() != trail_data.get_points_y().size() or trail_data.get_points_x().size() != trail_data.get_points_z().size(): + print("Warning: Trail ", full_category_name, " does not have equal number of X, Y, and Z coordinates.") + for index in range(0, trail_data.get_points_z().size()): + path_points.append(Vector3(trail_data.get_points_x()[index], trail_data.get_points_y()[index], trail_data.get_points_z()[index])) + var texture_path = path.get_texture_path() + if texture_path == null: + print("Warning: No texture found in " , full_category_name) + continue + var full_texture_path = self.marker_file_dir.get_current_dir() + texture_path.get_path() + gen_new_path(path_points, full_texture_path, path, category_item) + + for icon in category.get_icon(): + var position = icon.get_position() + if position == null: + print("Warning: No position found for icon ", full_category_name) + continue + var position_vector = Vector3(position.get_x(), position.get_y(), position.get_z()) + var texture_path = icon.get_texture_path() + if texture_path == null: + print("Warning: No texture found in " , full_category_name) + continue + var full_texture_path = self.marker_file_dir.get_current_dir() + texture_path.get_path() + gen_new_icon(position_vector, full_texture_path, icon, category_item) + for category_child in category.get_children(): add_category(category_item, category_child, full_category_name + "." + category_child.get_name(), true) @@ -586,32 +567,6 @@ func gen_new_icon(position: Vector3, texture_path: String, waypoint_icon, catego new_icon.visible = false icons.add_child(new_icon) -# This function take all of the currently rendered objects and converts it into -# the data format that is saved/loaded from. -func data_from_renderview(): - var icons_data = [] - var paths_data = [] - - for icon in $Icons.get_children(): - icons_data.append({ - "position": [icon.translation.x, icon.translation.y, -icon.translation.z], - "texture": icon.texture_path - }) - - for path in $Paths.get_children(): - #print(path) - var points = [] - for point in range(path.get_point_count()): - var point_position:Vector3 = path.get_point_position(point) - points.append([point_position.x, point_position.y, -point_position.z]) - paths_data.append({ - "points": points, - "texture": path.texture_path - }) - - var data_out = {"icons": icons_data, "paths": paths_data} - return data_out - func _on_main_menu_toggle_pressed(): $Control/Dialogs/MainMenu.show() set_maximal_mouse_block() @@ -619,6 +574,7 @@ func _on_main_menu_toggle_pressed(): func _on_FileDialog_file_selected(path): pass + ################################################################################ # The adjust nodes button creates handles at all the node points to allow for # editing of them via in-game interface. (Nodes can only be edited if the input @@ -775,17 +731,15 @@ func _on_NewPathPoint_pressed(): # _on_SaveDialog_file_selected() will be called with the user specified path. ################################################################################ func _on_SavePath_pressed(): - $Control/Dialogs/SaveDialog.show() + #TODO: Save to Waypoint + pass ################################################################################ # Save the current markers to a file, this includes all markers in memory not # just the markers on the current map. ################################################################################ func _on_SaveDialog_file_selected(path): - self.markerdata[str(self.map_id)] = data_from_renderview() - var save_game = File.new() - save_game.open(path, File.WRITE) - save_game.store_string(JSON.print(self.markerdata)) + pass func _on_NodeEditorDialog_hide(): @@ -877,5 +831,3 @@ func _on_MarkerPacks_cell_selected(): func _on_MarkerPacks_item_edited(): var category_item = self.marker_packs.get_edited() apply_category_visibility_to_nodes(category_item) - - From 6608991ba30f709d5f1ac5cebfca47279f608b8e Mon Sep 17 00:00:00 2001 From: klingbolt Date: Thu, 24 Aug 2023 22:56:47 -0400 Subject: [PATCH 217/539] Cleaning up from split in PRs --- Spatial.gd | 55 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 29 insertions(+), 26 deletions(-) diff --git a/Spatial.gd b/Spatial.gd index 981cec92..c73946b3 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -257,7 +257,6 @@ func decode_context_packet(spb: StreamPeerBuffer): if self.map_id != old_map_id: print("Loading New Map") load_waypoint_markers(self.map_id) - gen_map_markers() # TODO move this to reset_minimap_masks for child in $Paths.get_children(): @@ -284,7 +283,7 @@ func reset_minimap_masks(): minimap_path.material.set_shader_param("minimap_corner", compass_corner1) minimap_path.material.set_shader_param("minimap_corner2", compass_corner2) -var markerdata = Waypoint.Waypoint.new() +var Waypoint_data = Waypoint.Waypoint.new() var marker_file_dir = "user://protobins/" var marker_file_path = "" var root: TreeItem @@ -306,12 +305,12 @@ func load_waypoint_markers(map_id): print("Loading protobuf file from path ", self.marker_file_path) file.open(self.marker_file_path, file.READ) var data = file.get_buffer(file.get_len()) - self.markerdata.from_bytes(data) + self.Waypoint_data.from_bytes(data) if !Waypoint.PB_ERR.NO_ERRORS: print("OK") else: print(Waypoint.PB_ERR) - + parse_Waypoint() var route_scene = load("res://Route.tscn") var icon_scene = load("res://Icon.tscn") @@ -401,18 +400,19 @@ func clear_map_markers(): icon.queue_free() -func build_category_tree(): - var root = self.marker_packs.create_item() +func init_category_tree(): + self.root = self.marker_packs.create_item() root.set_text(0, "Markers available on current map") root.set_selectable(0, false) root.set_text(1, "Visible") - - for category in self.markerdata.get_category(): - self.marker_packs_array.append(category.get_name()) - add_category(root, category, category.get_name(), false) -func add_category(item: TreeItem, category, full_category_name: String, collapsed: bool): +func parse_Waypoint(): + for category in self.Waypoint_data.get_category(): + parse_category(root, category, category.get_name(), false) + + +func parse_category(item: TreeItem, category, full_category_name: String, collapsed: bool): var category_item = self.marker_packs.create_item(item) if category.get_name() == "": # If this is called, there is an error in the Waypoint data @@ -456,7 +456,7 @@ func add_category(item: TreeItem, category, full_category_name: String, collapse gen_new_icon(position_vector, full_texture_path, icon, category_item) for category_child in category.get_children(): - add_category(category_item, category_child, full_category_name + "." + category_child.get_name(), true) + parse_category(category_item, category_child, full_category_name + "." + category_child.get_name(), true) func apply_category_visibility_to_nodes(category_item: TreeItem): @@ -505,7 +505,6 @@ func is_category_visible(category_item: TreeItem) -> bool: func gen_new_path(points: Array, texture_path: String, waypoint_trail, category_item: TreeItem): - # Create the texture to use from an image file # TODO: We want to be able to cache this data so that if a texture is used # by multiple objects we only need to keep ony copy of it in memory. #22. @@ -552,9 +551,6 @@ func gen_new_path(points: Array, texture_path: String, waypoint_trail, category_ minimap.add_child(new_2d_path) -################################################################################ -# -################################################################################ func gen_new_icon(position: Vector3, texture_path: String, waypoint_icon, category_item: TreeItem): position.z = -position.z var new_icon = icon_scene.instance() @@ -567,14 +563,10 @@ func gen_new_icon(position: Vector3, texture_path: String, waypoint_icon, catego new_icon.visible = false icons.add_child(new_icon) -func _on_main_menu_toggle_pressed(): - $Control/Dialogs/MainMenu.show() - set_maximal_mouse_block() - -func _on_FileDialog_file_selected(path): - pass +################################################################################ +# Adjustment and gizmo functions ################################################################################ # The adjust nodes button creates handles at all the node points to allow for # editing of them via in-game interface. (Nodes can only be edited if the input @@ -588,6 +580,10 @@ func _on_AdjustNodesButton_pressed(): func gen_adjustment_nodes(): + if self.currently_active_category == null: + print("No category selected") + return + for index in range(self.paths.get_child_count()): var route = self.paths.get_child(index) var path2d = self.minimap.get_child(index) @@ -648,6 +644,15 @@ func clear_adjustment_nodes(): $Gizmos.remove_child(child) child.queue_free() +################################################################################ +# Signal Functions +################################################################################ +func _on_main_menu_toggle_pressed(): + $Control/Dialogs/MainMenu.show() + set_maximal_mouse_block() + +func _on_FileDialog_file_selected(path): + pass func _on_Dialog_hide(): for dialog in $Control/Dialogs.get_children(): @@ -727,16 +732,14 @@ func _on_NewPathPoint_pressed(): ################################################################################ -# open the save dialog window. When a path is selected -# _on_SaveDialog_file_selected() will be called with the user specified path. +# ################################################################################ func _on_SavePath_pressed(): #TODO: Save to Waypoint pass ################################################################################ -# Save the current markers to a file, this includes all markers in memory not -# just the markers on the current map. +# TODO: This function will be used when exporting packs ################################################################################ func _on_SaveDialog_file_selected(path): pass From 419f1568cdcf0eec2b2605413623b23d614397f5 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 27 Aug 2023 13:41:52 -0400 Subject: [PATCH 218/539] Needed to add lines for initializing some variables --- Spatial.gd | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Spatial.gd b/Spatial.gd index c73946b3..00e48000 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -60,6 +60,8 @@ func _ready(): # Postion at top left corner OS.set_window_position(Vector2(0,0)) set_minimal_mouse_block() + init_category_tree() + marker_file_dir.open("user://protobins/") server.listen(4242) func set_minimal_mouse_block(): From 10aa509c7bfbc4a5be849e16ce9cd01bd15e737d Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 27 Aug 2023 13:43:49 -0400 Subject: [PATCH 219/539] Regenerated gdscript for proto --- Spatial.gd | 2 +- waypoint.gd | 146 ++++++++++++++++++++++++---------------------------- 2 files changed, 67 insertions(+), 81 deletions(-) diff --git a/Spatial.gd b/Spatial.gd index 00e48000..0ab2d1d7 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -286,7 +286,7 @@ func reset_minimap_masks(): minimap_path.material.set_shader_param("minimap_corner2", compass_corner2) var Waypoint_data = Waypoint.Waypoint.new() -var marker_file_dir = "user://protobins/" +var marker_file_dir = Directory.new() var marker_file_path = "" var root: TreeItem diff --git a/waypoint.gd b/waypoint.gd index 0e9da02b..9af1a9f5 100644 --- a/waypoint.gd +++ b/waypoint.gd @@ -670,18 +670,6 @@ class Waypoint: service.func_ref = funcref(self, "add_category") data[_category.tag] = service - _icon = PBField.new("icon", PB_DATA_TYPE.MESSAGE, PB_RULE.REPEATED, 2, true, []) - service = PBServiceField.new() - service.field = _icon - service.func_ref = funcref(self, "add_icon") - data[_icon.tag] = service - - _trail = PBField.new("trail", PB_DATA_TYPE.MESSAGE, PB_RULE.REPEATED, 3, true, []) - service = PBServiceField.new() - service.field = _trail - service.func_ref = funcref(self, "add_trail") - data[_trail.tag] = service - var data = {} var _category: PBField @@ -695,28 +683,6 @@ class Waypoint: _category.value.append(element) return element - var _icon: PBField - func get_icon() -> Array: - return _icon.value - func clear_icon() -> void: - data[2].state = PB_SERVICE_STATE.UNFILLED - _icon.value = [] - func add_icon() -> Icon: - var element = Icon.new() - _icon.value.append(element) - return element - - var _trail: PBField - func get_trail() -> Array: - return _trail.value - func clear_trail() -> void: - data[3].state = PB_SERVICE_STATE.UNFILLED - _trail.value = [] - func add_trail() -> Trail: - var element = Trail.new() - _trail.value.append(element) - return element - func to_string() -> String: return PBPacker.message_to_string(data) @@ -773,6 +739,18 @@ class Category: service.func_ref = funcref(self, "add_children") data[_children.tag] = service + _icon = PBField.new("icon", PB_DATA_TYPE.MESSAGE, PB_RULE.REPEATED, 7, true, []) + service = PBServiceField.new() + service.field = _icon + service.func_ref = funcref(self, "add_icon") + data[_icon.tag] = service + + _trail = PBField.new("trail", PB_DATA_TYPE.MESSAGE, PB_RULE.REPEATED, 8, true, []) + service = PBServiceField.new() + service.field = _trail + service.func_ref = funcref(self, "add_trail") + data[_trail.tag] = service + var data = {} var _default_visibility: PBField @@ -831,6 +809,28 @@ class Category: _children.value.append(element) return element + var _icon: PBField + func get_icon() -> Array: + return _icon.value + func clear_icon() -> void: + data[7].state = PB_SERVICE_STATE.UNFILLED + _icon.value = [] + func add_icon() -> Icon: + var element = Icon.new() + _icon.value.append(element) + return element + + var _trail: PBField + func get_trail() -> Array: + return _trail.value + func clear_trail() -> void: + data[8].state = PB_SERVICE_STATE.UNFILLED + _trail.value = [] + func add_trail() -> Trail: + var element = Trail.new() + _trail.value.append(element) + return element + func to_string() -> String: return PBPacker.message_to_string(data) @@ -856,12 +856,6 @@ class Icon: func _init(): var service - _category = PBField.new("category", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 1, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) - service = PBServiceField.new() - service.field = _category - service.func_ref = funcref(self, "new_category") - data[_category.tag] = service - _texture_path = PBField.new("texture_path", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 2, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) service = PBServiceField.new() service.field = _texture_path @@ -1034,18 +1028,14 @@ class Icon: service.field = _bhdraft__schedule_duration data[_bhdraft__schedule_duration.tag] = service + _category = PBField.new("category", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 2054, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) + service = PBServiceField.new() + service.field = _category + service.func_ref = funcref(self, "new_category") + data[_category.tag] = service + var data = {} - var _category: PBField - func get_category() -> Category: - return _category.value - func clear_category() -> void: - data[1].state = PB_SERVICE_STATE.UNFILLED - _category.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] - func new_category() -> Category: - _category.value = Category.new() - return _category.value - var _texture_path: PBField func get_texture_path() -> TexturePath: return _texture_path.value @@ -1346,6 +1336,16 @@ class Icon: func set_bhdraft__schedule_duration(value : float) -> void: _bhdraft__schedule_duration.value = value + var _category: PBField + func get_category() -> Category: + return _category.value + func clear_category() -> void: + data[2054].state = PB_SERVICE_STATE.UNFILLED + _category.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] + func new_category() -> Category: + _category.value = Category.new() + return _category.value + func to_string() -> String: return PBPacker.message_to_string(data) @@ -1371,12 +1371,6 @@ class Trail: func _init(): var service - _category = PBField.new("category", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 1, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) - service = PBServiceField.new() - service.field = _category - service.func_ref = funcref(self, "new_category") - data[_category.tag] = service - _texture_path = PBField.new("texture_path", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 2, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) service = PBServiceField.new() service.field = _texture_path @@ -1517,18 +1511,14 @@ class Trail: service.field = _bhdraft__schedule_duration data[_bhdraft__schedule_duration.tag] = service + _category = PBField.new("category", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 2054, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) + service = PBServiceField.new() + service.field = _category + service.func_ref = funcref(self, "new_category") + data[_category.tag] = service + var data = {} - var _category: PBField - func get_category() -> Category: - return _category.value - func clear_category() -> void: - data[1].state = PB_SERVICE_STATE.UNFILLED - _category.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] - func new_category() -> Category: - _category.value = Category.new() - return _category.value - var _texture_path: PBField func get_texture_path() -> TexturePath: return _texture_path.value @@ -1773,6 +1763,16 @@ class Trail: func set_bhdraft__schedule_duration(value : float) -> void: _bhdraft__schedule_duration.value = value + var _category: PBField + func get_category() -> Category: + return _category.value + func clear_category() -> void: + data[2054].state = PB_SERVICE_STATE.UNFILLED + _category.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] + func new_category() -> Category: + _category.value = Category.new() + return _category.value + func to_string() -> String: return PBPacker.message_to_string(data) @@ -4260,11 +4260,6 @@ class TrailData: func _init(): var service - _trail_data = PBField.new("trail_data", PB_DATA_TYPE.STRING, PB_RULE.OPTIONAL, 1, true, DEFAULT_VALUES_3[PB_DATA_TYPE.STRING]) - service = PBServiceField.new() - service.field = _trail_data - data[_trail_data.tag] = service - _points_x = PBField.new("points_x", PB_DATA_TYPE.FLOAT, PB_RULE.REPEATED, 2, true, []) service = PBServiceField.new() service.field = _points_x @@ -4282,15 +4277,6 @@ class TrailData: var data = {} - var _trail_data: PBField - func get_trail_data() -> String: - return _trail_data.value - func clear_trail_data() -> void: - data[1].state = PB_SERVICE_STATE.UNFILLED - _trail_data.value = DEFAULT_VALUES_3[PB_DATA_TYPE.STRING] - func set_trail_data(value : String) -> void: - _trail_data.value = value - var _points_x: PBField func get_points_x() -> Array: return _points_x.value From 2a140d6ec8bf4573e54f621a34e96f596ad0f161 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Thu, 21 Sep 2023 12:50:16 -0500 Subject: [PATCH 220/539] Adding a basic CLI tool to allow for converting markerpacks without hardcoding paths --- xml_converter/src/xml_converter.cpp | 130 ++++++++++++---------------- 1 file changed, 54 insertions(+), 76 deletions(-) diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 6fffbce5..43774fbf 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -437,75 +437,32 @@ void convert_taco_directory(string directory, string output_directory, map* marker_categories, vector* parsed_pois) { - vector marker_packs; - - DIR* dir = opendir(input_directory.c_str()); - struct dirent* entry = readdir(dir); - while ((entry = readdir(dir)) != NULL) { - string filename = entry->d_name; - if (entry->d_type == DT_DIR && filename != "." && filename != "..") { - string path = input_directory + "/" + filename; - marker_packs.push_back(path); - cout << path << endl; - convert_taco_directory(path, output_directory, marker_categories, parsed_pois); - } - } - closedir(dir); -} - -string create_burrito_data_folder() { - // Get the home directory path - const char* home_dir = getenv("HOME"); - if (home_dir == nullptr) { - throw "Error: HOME environment variable is not set."; - } - string data_directory = ".local/share/godot/app_userdata/Burrito/protobins"; - // Construct the folder path - // For Linux, the deafult for "user://"" in Godot is - // ~/.local/share/godot/app_userdata/[project_name] - // Variable folder_path can be thought of as "user://Burrito/protobins" - string folder_path = string(home_dir) + "/" + data_directory; - // Create the folder with permissions 0700 (read/write/execute for owner only) - int result = mkdir(folder_path.c_str(), S_IRWXU); - if (result != 0 && errno != EEXIST) { - std::cerr << "Error: Failed to create folder " << folder_path << "." << std::endl; - } - return folder_path; -} - -int main() { +//////////////////////////////////////////////////////////////////////////////// +// process_data +// +// The universal entrypoint into the xml converter functionality. Both the CLI +// and the library entrypoints direct here to do their actual processing. +//////////////////////////////////////////////////////////////////////////////// +void process_data( + vector input_paths, + string output_directory +) { auto begin = chrono::high_resolution_clock::now(); vector parsed_pois; map marker_categories; - test_proto(); - string output_directory; try { - output_directory = create_burrito_data_folder(); - // Input will be supplied via FileDialog in Godot - string input_directory = "./packs"; - convert_all_markerpacks(input_directory, output_directory, &marker_categories, &parsed_pois); + for (size_t i = 0; i < input_paths.size(); i++) { + cout << input_paths[i] << endl; + convert_taco_directory(input_paths[i], output_directory, &marker_categories, &parsed_pois); + } } catch (const char* msg) { cout << msg << endl; } + auto end = chrono::high_resolution_clock::now(); auto dur = end - begin; auto ms = std::chrono::duration_cast(dur).count(); @@ -524,25 +481,46 @@ int main() { dur = end - begin; ms = std::chrono::duration_cast(dur).count(); cout << "The protobuf write function took " << ms << " milliseconds to run" << endl; +} + + +//////////////////////////////////////////////////////////////////////////////// +// main +// +// Main is the CLI entrypoint to the xml converter. It handles processing all +// of the command line data into a format the internal functions want to +// receive. +// +// Example usage +// ./xml_converter --input-path ../packs/marker_pack --output-path ../output_packs +// ./xml_converter --input-path ../packs/* --output-path ../output_packs +//////////////////////////////////////////////////////////////////////////////// +int main(int argc, char *argv[]) { + + vector input_paths; + + // Typically "~/.local/share/godot/app_userdata/Burrito/protobins" for + // converting from xml markerpacks to internal protobuf files. + vector output_paths; + + vector* arg_target = &input_paths; + + for (int i = 1; i < argc; i++) { + if (!strcmp(argv[i], "--input-path")) { + arg_target = &input_paths; + } + else if (!strcmp(argv[i], "--output-path")) { + arg_target = &output_paths; + } + else { + arg_target->push_back(argv[i]); + } + } + + cout << input_paths[0] << " " << input_paths.size() << endl; + cout << output_paths[0] << " " << output_paths.size() << endl; - //////////////////////////////////////////////////////////////////////////// - // This section can test that a protobuf file can be parsed back to xml - //////////////////////////////////////////////////////////////////////////// - // parsed_pois.clear(); - // marker_categories.clear(); - // begin = chrono::high_resolution_clock::now(); - // read_protobuf_file("./protobins/1.data", &marker_categories, &parsed_pois); - // end = chrono::high_resolution_clock::now(); - // dur = end - begin; - // ms = std::chrono::duration_cast(dur).count(); - // cout << "The protobuf read function took " << ms << " milliseconds to run" << endl; - - // begin = chrono::high_resolution_clock::now(); - // write_xml_file("./protobins/1.xml", &marker_categories, &parsed_pois); - // end = chrono::high_resolution_clock::now(); - // dur = end - begin; - // ms = std::chrono::duration_cast(dur).count(); - // cout << "The xml write function took " << ms << " milliseconds to run" << endl; + process_data(input_paths, output_paths[0]); return 0; } From 35beb27705cc923e7c29f8d9bac7a3ed7accde9f Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Thu, 21 Sep 2023 14:05:37 -0500 Subject: [PATCH 221/539] removing iwyu due to excessive noise --- xml_converter/presubmit.sh | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/xml_converter/presubmit.sh b/xml_converter/presubmit.sh index 1e1534d6..37589602 100755 --- a/xml_converter/presubmit.sh +++ b/xml_converter/presubmit.sh @@ -34,22 +34,21 @@ if (( $? > 0 )); then error_count=`expr $error_count + 1` fi -# Run Include What You Use -# -# We have 2 sed filters here, they could be combined but they are split for clarity -# The first one removes all blank lines -# The second one removes all "everything is good" lines from iwyu -# -# TODO: When this or newer versions of iwyu_tool that carry over the exit codes -# from the include-what-you-use command calls are more widely standard this can -# be replaced with just a call to iwyu_tool instead. -echo "Include What You Use" -echo "--------------------" -../third_party/iwyu_tool.py -p . -o quiet -# include-what-you-use has a "success code" of 2 for a legacy reason. -if [[ $? -ne 2 ]]; then - error_count=`expr $error_count + 1` -fi + +# IWYU is too noisy right now and not always completely correct. It is going +# to be disabled for now but later will be re-enabled once it is wrangled better +# # Run Include What You Use +# # +# # TODO: When this or newer versions of iwyu_tool that carry over the exit codes +# # from the include-what-you-use command calls are more widely standard this can +# # be replaced with just a call to iwyu_tool instead. +# echo "Include What You Use" +# echo "--------------------" +# ../third_party/iwyu_tool.py -p . -o quiet +# # include-what-you-use has a "success code" of 2 for a legacy reason. +# if [[ $? -ne 2 ]]; then +# error_count=`expr $error_count + 1` +# fi # Validate that clang-format would make no changes From a2afc06e4cd3ff20e39f74d2bae01417f557c085 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Thu, 21 Sep 2023 14:06:05 -0500 Subject: [PATCH 222/539] fixing clang format issues --- xml_converter/src/xml_converter.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 43774fbf..cea19c45 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -1,6 +1,5 @@ #include -#include -#include +#include #include #include @@ -437,7 +436,6 @@ void convert_taco_directory(string directory, string output_directory, map input_paths, - string output_directory -) { + string output_directory) { auto begin = chrono::high_resolution_clock::now(); vector parsed_pois; @@ -483,7 +480,6 @@ void process_data( cout << "The protobuf write function took " << ms << " milliseconds to run" << endl; } - //////////////////////////////////////////////////////////////////////////////// // main // @@ -495,8 +491,7 @@ void process_data( // ./xml_converter --input-path ../packs/marker_pack --output-path ../output_packs // ./xml_converter --input-path ../packs/* --output-path ../output_packs //////////////////////////////////////////////////////////////////////////////// -int main(int argc, char *argv[]) { - +int main(int argc, char* argv[]) { vector input_paths; // Typically "~/.local/share/godot/app_userdata/Burrito/protobins" for From c0c8b442ed700a10455e7eff670513271d39c705 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Thu, 21 Sep 2023 15:55:40 -0500 Subject: [PATCH 223/539] updating the entrypoint args this will better reflect the ideal capabilities of the xml converter and will allow us to think about and write proper tests as we get into the final phases of developing this module --- xml_converter/src/xml_converter.cpp | 119 ++++++++++++++++++++-------- 1 file changed, 87 insertions(+), 32 deletions(-) diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index cea19c45..f16eb7ac 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -431,11 +431,6 @@ void write_taco_directory(string directory, map* marker_catego write_xml_file(xml_filepath, marker_categories, parsed_pois); } -void convert_taco_directory(string directory, string output_directory, map* marker_categories, vector* parsed_pois) { - move_supplementary_files(directory, output_directory); - read_taco_directory(directory, marker_categories, parsed_pois); -} - //////////////////////////////////////////////////////////////////////////////// // process_data // @@ -443,37 +438,70 @@ void convert_taco_directory(string directory, string output_directory, map input_paths, - string output_directory) { - auto begin = chrono::high_resolution_clock::now(); - + vector input_taco_paths, + vector input_waypoint_paths, + + // These will eventually have additional arguments for each output path to + // allow for splitting out a single markerpack + vector output_taco_paths, + vector output_waypoint_paths, + + // This is a special output path used for burrito internal use that splits + // the waypoint protobins by map id. + string output_split_waypoint_dir) { + // All of the loaded pois and categories vector parsed_pois; map marker_categories; - try { - for (size_t i = 0; i < input_paths.size(); i++) { - cout << input_paths[i] << endl; - convert_taco_directory(input_paths[i], output_directory, &marker_categories, &parsed_pois); + // Read in all the xml taco markerpacks + auto begin = chrono::high_resolution_clock::now(); + for (size_t i = 0; i < input_taco_paths.size(); i++) { + cout << "Loading taco pack " << input_taco_paths[i] << endl; + read_taco_directory( + input_taco_paths[i], + &marker_categories, + &parsed_pois); + + // TODO: This is wildly incorrect now because we might have a + // different output directory then output_split_waypoint_dir + if (output_split_waypoint_dir != "") { + move_supplementary_files(input_taco_paths[i], output_split_waypoint_dir); } } - catch (const char* msg) { - cout << msg << endl; - } - auto end = chrono::high_resolution_clock::now(); auto dur = end - begin; auto ms = std::chrono::duration_cast(dur).count(); - cout << "The parse function took " << ms << " milliseconds to run" << endl; + cout << "The taco parse function took " << ms << " milliseconds to run" << endl; + + // Read in all the protobin waypoint markerpacks + for (size_t i = 0; i < input_waypoint_paths.size(); i++) { + cout << "Loading waypoint pack " << input_waypoint_paths[i] << endl; + read_protobuf_file( + input_waypoint_paths[i], + &marker_categories, + &parsed_pois); + } + // Write all of the xml taco paths begin = chrono::high_resolution_clock::now(); - write_xml_file("./export_packs/export.xml", &marker_categories, &parsed_pois); + for (size_t i = 0; i < output_taco_paths.size(); i++) { + write_taco_directory(output_taco_paths[i], &marker_categories, &parsed_pois); + } end = chrono::high_resolution_clock::now(); dur = end - begin; ms = std::chrono::duration_cast(dur).count(); cout << "The xml write function took " << ms << " milliseconds to run" << endl; + // Write all of the protobin waypoint paths + for (size_t i = 0; i < output_waypoint_paths.size(); i++) { + write_protobuf_file(output_waypoint_paths[i], &marker_categories, &parsed_pois); + } + + // Write the special map-split protbin waypoint file begin = chrono::high_resolution_clock::now(); - write_protobuf_file(output_directory, &marker_categories, &parsed_pois); + if (output_split_waypoint_dir != "") { + write_protobuf_file(output_split_waypoint_dir, &marker_categories, &parsed_pois); + } end = chrono::high_resolution_clock::now(); dur = end - begin; ms = std::chrono::duration_cast(dur).count(); @@ -488,34 +516,61 @@ void process_data( // receive. // // Example usage -// ./xml_converter --input-path ../packs/marker_pack --output-path ../output_packs -// ./xml_converter --input-path ../packs/* --output-path ../output_packs +// ./xml_converter --input-taco-paths ../packs/marker_pack --output-split-waypoint-path ../output_packs +// ./xml_converter --input-taco-paths ../packs/* --output-split-waypoint-path ../output_packs //////////////////////////////////////////////////////////////////////////////// int main(int argc, char* argv[]) { - vector input_paths; + vector input_taco_paths; + vector output_taco_paths; + vector input_waypoint_paths; + vector output_waypoint_paths; // Typically "~/.local/share/godot/app_userdata/Burrito/protobins" for // converting from xml markerpacks to internal protobuf files. - vector output_paths; + vector output_split_waypoint_paths; - vector* arg_target = &input_paths; + vector* arg_target = &input_taco_paths; for (int i = 1; i < argc; i++) { - if (!strcmp(argv[i], "--input-path")) { - arg_target = &input_paths; + if (!strcmp(argv[i], "--input-taco-path")) { + arg_target = &input_taco_paths; + } + else if (!strcmp(argv[i], "--output-taco-path")) { + arg_target = &output_taco_paths; } - else if (!strcmp(argv[i], "--output-path")) { - arg_target = &output_paths; + else if (!strcmp(argv[i], "--input-waypoint-path")) { + arg_target = &input_waypoint_paths; + } + else if (!strcmp(argv[i], "--output-waypoint-path")) { + arg_target = &output_waypoint_paths; + } + else if (!strcmp(argv[i], "--output-split-waypoint-path")) { + // We dont actually support multiple values for this argument but + // I am leaving this as-is because it is simpler. We can adjust the + // CLI arg parsing later to properly capture this. + arg_target = &output_split_waypoint_paths; } else { arg_target->push_back(argv[i]); } } - cout << input_paths[0] << " " << input_paths.size() << endl; - cout << output_paths[0] << " " << output_paths.size() << endl; + // Strip all but the first output split waypoint argument, because we dont + // actually support multiple arguments. + string output_split_waypoint_dir = ""; + if (output_split_waypoint_paths.size() > 0) { + output_split_waypoint_dir = output_split_waypoint_paths[0]; + } + else if (output_split_waypoint_paths.size() > 1) { + cout << "Only one --output-split-waypoint-path is accepted" << endl; + } - process_data(input_paths, output_paths[0]); + process_data( + input_taco_paths, + input_waypoint_paths, + output_taco_paths, + output_waypoint_paths, + output_split_waypoint_dir); return 0; } From a7ed26b9e9bb0b895023ec1dc635d98fff5a69bf Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Thu, 21 Sep 2023 16:41:16 -0500 Subject: [PATCH 224/539] splitting up encoding decoding logic seperating the protobin and xml encoding decoding will make it easier to maintain them --- xml_converter/src/packaging_protobin.cpp | 201 ++++++++++++++ xml_converter/src/packaging_protobin.hpp | 20 ++ xml_converter/src/packaging_xml.cpp | 180 ++++++++++++ xml_converter/src/packaging_xml.hpp | 20 ++ xml_converter/src/xml_converter.cpp | 333 +---------------------- 5 files changed, 423 insertions(+), 331 deletions(-) create mode 100644 xml_converter/src/packaging_protobin.cpp create mode 100644 xml_converter/src/packaging_protobin.hpp create mode 100644 xml_converter/src/packaging_xml.cpp create mode 100644 xml_converter/src/packaging_xml.hpp diff --git a/xml_converter/src/packaging_protobin.cpp b/xml_converter/src/packaging_protobin.cpp new file mode 100644 index 00000000..f58737af --- /dev/null +++ b/xml_converter/src/packaging_protobin.cpp @@ -0,0 +1,201 @@ +#include "packaging_protobin.hpp" + +#include +#include +#include +#include +#include + +#include "category_gen.hpp" +#include "parseable.hpp" +#include "string_helper.hpp" +#include "waypoint.pb.h" + +using namespace std; + +//////////////////////////////////////////////////////////////////////////////// +////////////////////////////////// SERIALIZE /////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +// +//////////////////////////////////////////////////////////////////////////////// +void parse_waypoint_categories( + string full_category_name, + ::waypoint::Category proto_category, + map* marker_categories, + vector* parsed_pois) { + full_category_name += proto_category.name(); + Category* this_category = &(*marker_categories)[full_category_name]; + this_category->parse_protobuf(proto_category); + + for (int i = 0; i < proto_category.icon_size(); i++) { + Icon* icon = new Icon(); + icon->parse_protobuf(proto_category.icon(i)); + // TODO: The field category in Icon is being deprciated + // This overwrites any icon.category with its position in the heirarchy + icon->category.category = full_category_name; + parsed_pois->push_back(icon); + } + for (int i = 0; i < proto_category.trail_size(); i++) { + Trail* trail = new Trail(); + trail->parse_protobuf(proto_category.trail(i)); + // TODO: The field category in Trail is being deprciated + // This overwrites any trail.category with its position in the heirarchy + trail->category.category = full_category_name; + parsed_pois->push_back(trail); + } + + for (int i = 0; i < proto_category.children_size(); i++) { + parse_waypoint_categories(full_category_name + ".", proto_category.children(i), &(this_category->children), parsed_pois); + } +} + +//////////////////////////////////////////////////////////////////////////////// +// +//////////////////////////////////////////////////////////////////////////////// +void read_protobuf_file(string proto_filepath, map* marker_categories, vector* parsed_pois) { + fstream infile; + waypoint::Waypoint proto_message; + + infile.open(proto_filepath, ios::in | ios::binary); + proto_message.ParseFromIstream(&infile); + for (int i = 0; i < proto_message.category_size(); i++) { + parse_waypoint_categories("", proto_message.category(i), marker_categories, parsed_pois); + } +} + +//////////////////////////////////////////////////////////////////////////////// +///////////////////////////////// DESERIALIZE ////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +// Adds the name of a category and all of it's parents to a set +// eg. +// { +// "mypath", +// "mypath.easypath", +// "mypath.easypath.trail", +// "mypath.hardpath", +// "mypath.hardpath.trail", +// } +//////////////////////////////////////////////////////////////////////////////// +void populate_categories_to_retain(string category_name, set* categories_to_retain) { + string name; + vector split_categories = split(category_name, "."); + for (unsigned int j = 0; j < split_categories.size(); j++) { + name += split_categories[j]; + categories_to_retain->insert(name); + name += "."; + } +} + +//////////////////////////////////////////////////////////////////////////////// +// Iterates through all children of a Category and removes the categories and +// POIs that do not belong on a particular map +//////////////////////////////////////////////////////////////////////////////// +void remove_waypoint_elements(waypoint::Category* proto_category, set categories_to_retain, string parent_name, int map_id) { + int keep = 0; + for (int i = 0; i < proto_category->icon_size(); i++) { + if (proto_category->icon(i).map_id() == map_id) { + if (keep < i) { + proto_category->mutable_icon()->SwapElements(i, keep); + } + ++keep; + } + } + proto_category->mutable_icon()->DeleteSubrange(keep, proto_category->icon_size() - keep); + + keep = 0; + for (int i = 0; i < proto_category->trail_size(); i++) { + if (proto_category->trail(i).map_id() == map_id) { + if (keep < i) { + proto_category->mutable_trail()->SwapElements(i, keep); + } + ++keep; + } + } + proto_category->mutable_trail()->DeleteSubrange(keep, proto_category->trail_size() - keep); + + keep = 0; + for (int i = 0; i < proto_category->children_size(); i++) { + string name = parent_name + "." + proto_category->children(i).name(); + auto pos = categories_to_retain.find(name); + if (pos != categories_to_retain.end()) { + remove_waypoint_elements(proto_category->mutable_children(i), categories_to_retain, name, map_id); + if (keep < i) { + proto_category->mutable_children()->SwapElements(i, keep); + } + ++keep; + } + } + proto_category->mutable_children()->DeleteSubrange(keep, proto_category->children_size() - keep); +} + +void write_protobuf_file(string proto_directory, map* marker_categories, vector* parsed_pois) { + waypoint::Waypoint proto_pois; + // Collects a set of map ids from Icon and Trail data + std::set map_ids; + ofstream trail_data_file; + map> map_of_pois; + for (const auto& parsed_poi : *parsed_pois) { + if (parsed_poi->classname() == "POI") { + Icon* icon = dynamic_cast(parsed_poi); + map_ids.insert(icon->map_id); + map_of_pois[icon->category.category].push_back(icon); + } + else if (parsed_poi->classname() == "Trail") { + Trail* trail = dynamic_cast(parsed_poi); + map_ids.insert(trail->map_id); + map_of_pois[trail->category.category].push_back(trail); + } + } + + // Creates a Waypoint message that contains all categories + waypoint::Waypoint all_categories; + for (const auto& category : *marker_categories) { + waypoint::Category proto_category = category.second.as_protobuf("", &map_of_pois); + all_categories.add_category()->CopyFrom(proto_category); + } + + waypoint::Waypoint output_message; + std::set categories_to_retain; + for (int map_id : map_ids) { + ofstream outfile; + string output_filepath = proto_directory + "/" + to_string(map_id) + ".data"; + outfile.open(output_filepath, ios::out | ios::binary); + output_message.MergeFrom(all_categories); + + for (const auto& parsed_poi : *parsed_pois) { + if (parsed_poi->classname() == "POI") { + Icon* icon = dynamic_cast(parsed_poi); + if (icon->map_id == map_id) { + populate_categories_to_retain(icon->category.category, &categories_to_retain); + } + } + else if (parsed_poi->classname() == "Trail") { + Trail* trail = dynamic_cast(parsed_poi); + if (trail->map_id == map_id) { + populate_categories_to_retain(trail->category.category, &categories_to_retain); + } + } + } + // In the XML, MarkerCategories have a tree hierarchy while POIS have a + // flat hierarchy. In Waypoint, POIs are elements of the category they + // belong to. We are removing instead of inserting because + // each parent category contains the data for all of its children. It + // would be impractical to include all of the data from each category + // except for the children and then iterating over all the children. + // This pruning method is slower but ensures that information is kept. + for (int i = 0; i < output_message.category_size(); i++) { + remove_waypoint_elements(output_message.mutable_category(i), categories_to_retain, output_message.category(i).name(), map_id); + if (output_message.mutable_category(i)->children_size() == 0) { + output_message.mutable_category(i)->Clear(); + } + } + output_message.SerializeToOstream(&outfile); + outfile.close(); + output_message.Clear(); + categories_to_retain.clear(); + } +} diff --git a/xml_converter/src/packaging_protobin.hpp b/xml_converter/src/packaging_protobin.hpp new file mode 100644 index 00000000..b50fdcef --- /dev/null +++ b/xml_converter/src/packaging_protobin.hpp @@ -0,0 +1,20 @@ +#pragma once + +#include +#include +#include +#include + +#include "category_gen.hpp" +#include "parseable.hpp" +#include "waypoint.pb.h" + +void read_protobuf_file( + std::string proto_filepath, + std::map* marker_categories, + std::vector* parsed_pois); + +void write_protobuf_file( + std::string proto_directory, + std::map* marker_categories, + std::vector* parsed_pois); diff --git a/xml_converter/src/packaging_xml.cpp b/xml_converter/src/packaging_xml.cpp new file mode 100644 index 00000000..3101a84d --- /dev/null +++ b/xml_converter/src/packaging_xml.cpp @@ -0,0 +1,180 @@ +#include "packaging_xml.hpp" + +#include + +#include "rapid_helpers.hpp" +#include "rapidxml-1.13/rapidxml.hpp" +#include "rapidxml-1.13/rapidxml_utils.hpp" +#include "string_helper.hpp" + +using namespace std; + +//////////////////////////////////////////////////////////////////////////////// +////////////////////////////////// SERIALIZE /////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// + +void parse_marker_categories(rapidxml::xml_node<>* node, map* marker_categories, vector* errors, int depth = 0) { + if (get_node_name(node) == "MarkerCategory") { + string name = lowercase(find_attribute_value(node, "name")); + + Category* this_category = &(*marker_categories)[name]; + this_category->init_from_xml(node, errors); + for (rapidxml::xml_node<>* child_node = node->first_node(); child_node; child_node = child_node->next_sibling()) { + parse_marker_categories(child_node, &(this_category->children), errors, depth + 1); + } + } + else { + errors->push_back(new XMLNodeNameError("Unknown MarkerCategory Tag", node)); + } +} + +Category* get_category(rapidxml::xml_node<>* node, map* marker_categories, vector* errors) { + // TODO: This is a slow linear search, replace with something faster. + // maybe use data from already parsed node instead of searching for + // the attribute. + rapidxml::xml_attribute<>* attribute = find_attribute(node, "type"); + + if (attribute == 0) { + // TODO: This error should really be for the entire node not just the name + errors->push_back(new XMLNodeNameError("No Attribute Named Type", node)); + return nullptr; + } + + vector split_categories = split(get_attribute_value(attribute), "."); + + if (split_categories.size() == 0) { + errors->push_back(new XMLAttributeValueError("Empty Type", attribute)); + return nullptr; + } + + Category* output = nullptr; + + for (unsigned int i = 0; i < split_categories.size(); i++) { + string category_name = lowercase(split_categories[i]); + + auto category = marker_categories->find(category_name); + + if (category == marker_categories->end()) { + errors->push_back(new XMLAttributeValueError("Category Not Found \"" + category_name + "\"", attribute)); + return nullptr; + } + + output = &category->second; + + marker_categories = &output->children; + } + return output; +} + +//////////////////////////////////////////////////////////////////////////////// +// parse_pois +// +// Parse the xml block into an in-memory array of Markers. +//////////////////////////////////////////////////////////////////////////////// +vector parse_pois(rapidxml::xml_node<>* root_node, map* marker_categories, vector* errors, string base_dir) { + vector markers; + + for (rapidxml::xml_node<>* node = root_node->first_node(); node; node = node->next_sibling()) { + if (get_node_name(node) == "POI") { + Category* default_category = get_category(node, marker_categories, errors); + + Icon* icon = new Icon(); + + if (default_category != nullptr) { + *icon = default_category->default_icon; + } + + icon->init_from_xml(node, errors); + markers.push_back(icon); + } + else if (get_node_name(node) == "Trail") { + Category* default_category = get_category(node, marker_categories, errors); + + Trail* trail = new Trail(); + + if (default_category != nullptr) { + *trail = default_category->default_trail; + } + + trail->init_from_xml(node, errors, base_dir); + markers.push_back(trail); + } + else { + errors->push_back(new XMLNodeNameError("Unknown POIs node name", node)); + } + } + return markers; +} + +//////////////////////////////////////////////////////////////////////////////// +// parse_xml_file +// +// A function which parses a single XML file into their corrisponding classes. +//////////////////////////////////////////////////////////////////////////////// +void parse_xml_file(string xml_filepath, map* marker_categories, vector* parsed_pois) { + vector errors; + rapidxml::xml_document<> doc; + rapidxml::xml_node<>* root_node; + + rapidxml::file<> xml_file(xml_filepath.c_str()); + doc.parse(xml_file.data(), xml_filepath.c_str()); + + root_node = doc.first_node(); + string base_dir = get_base_dir(xml_filepath); + // Validate the Root Node + if (get_node_name(root_node) != "OverlayData") { + errors.push_back(new XMLNodeNameError("Root node should be of type OverlayData", root_node)); + } + if (root_node->first_attribute() != nullptr) { + cout << "Root Node has attributes when it should have none in " << xml_filepath << endl; + } + + for (rapidxml::xml_node<>* node = root_node->first_node(); node; node = node->next_sibling()) { + if (get_node_name(node) == "MarkerCategory") { + parse_marker_categories(node, marker_categories, &errors); + } + else if (get_node_name(node) == "POIs") { + vector temp_vector = parse_pois(node, marker_categories, &errors, base_dir); + move(temp_vector.begin(), temp_vector.end(), back_inserter(*parsed_pois)); + } + else { + errors.push_back(new XMLNodeNameError("Unknown top-level node name", node)); + } + } + + for (auto error : errors) { + error->print_error(); + } +} + +//////////////////////////////////////////////////////////////////////////////// +///////////////////////////////// DESERIALIZE ////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// + +void write_xml_file(string xml_filepath, map* marker_categories, vector* parsed_pois) { + ofstream outfile; + string tab_string; + + outfile.open(xml_filepath, ios::out); + + outfile << "\n"; + for (const auto& category : *marker_categories) { + string text; + for (const auto& s : category.second.as_xml()) { + text += s; + } + outfile << text + "\n"; + } + + outfile << "\n"; + for (const auto& parsed_poi : *parsed_pois) { + string text; + for (const auto& s : parsed_poi->as_xml()) { + text += s; + } + outfile << text + "\n"; + } + outfile << "\n\n"; + + outfile.close(); +} diff --git a/xml_converter/src/packaging_xml.hpp b/xml_converter/src/packaging_xml.hpp new file mode 100644 index 00000000..9ffa1282 --- /dev/null +++ b/xml_converter/src/packaging_xml.hpp @@ -0,0 +1,20 @@ +#pragma once + +#include +#include +#include + +#include "category_gen.hpp" +#include "parseable.hpp" +#include "rapidxml-1.13/rapidxml.hpp" +#include "rapidxml-1.13/rapidxml_utils.hpp" + +void parse_xml_file( + std::string xml_filepath, + std::map* marker_categories, + std::vector* parsed_pois); + +void write_xml_file( + std::string xml_filepath, + std::map* marker_categories, + std::vector* parsed_pois); diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index f16eb7ac..ea2f9107 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -19,6 +19,8 @@ #include "category_gen.hpp" #include "file_helper.hpp" #include "icon_gen.hpp" +#include "packaging_protobin.hpp" +#include "packaging_xml.hpp" #include "parseable.hpp" #include "rapid_helpers.hpp" #include "rapidxml-1.13/rapidxml.hpp" @@ -29,337 +31,6 @@ using namespace std; -void write_xml_file(string xml_filepath, map* marker_categories, vector* parsed_pois) { - ofstream outfile; - string tab_string; - - outfile.open(xml_filepath, ios::out); - - outfile << "\n"; - for (const auto& category : *marker_categories) { - string text; - for (const auto& s : category.second.as_xml()) { - text += s; - } - outfile << text + "\n"; - } - - outfile << "\n"; - for (const auto& parsed_poi : *parsed_pois) { - string text; - for (const auto& s : parsed_poi->as_xml()) { - text += s; - } - outfile << text + "\n"; - } - outfile << "\n\n"; - - outfile.close(); -} - -//////////////////////////////////////////////////////////////////////////////// -// Adds the name of a category and all of it's parents to a set -// eg. -// { -// "mypath", -// "mypath.easypath", -// "mypath.easypath.trail", -// "mypath.hardpath", -// "mypath.hardpath.trail", -// } -//////////////////////////////////////////////////////////////////////////////// -void populate_categories_to_retain(string category_name, set* categories_to_retain) { - string name; - vector split_categories = split(category_name, "."); - for (unsigned int j = 0; j < split_categories.size(); j++) { - name += split_categories[j]; - categories_to_retain->insert(name); - name += "."; - } -} - -//////////////////////////////////////////////////////////////////////////////// -// Iterates through all children of a Category and removes the categories and -// POIs that do not belong on a particular map -//////////////////////////////////////////////////////////////////////////////// -void remove_waypoint_elements(waypoint::Category* proto_category, set categories_to_retain, string parent_name, int map_id) { - int keep = 0; - for (int i = 0; i < proto_category->icon_size(); i++) { - if (proto_category->icon(i).map_id() == map_id) { - if (keep < i) { - proto_category->mutable_icon()->SwapElements(i, keep); - } - ++keep; - } - } - proto_category->mutable_icon()->DeleteSubrange(keep, proto_category->icon_size() - keep); - - keep = 0; - for (int i = 0; i < proto_category->trail_size(); i++) { - if (proto_category->trail(i).map_id() == map_id) { - if (keep < i) { - proto_category->mutable_trail()->SwapElements(i, keep); - } - ++keep; - } - } - proto_category->mutable_trail()->DeleteSubrange(keep, proto_category->trail_size() - keep); - - keep = 0; - for (int i = 0; i < proto_category->children_size(); i++) { - string name = parent_name + "." + proto_category->children(i).name(); - auto pos = categories_to_retain.find(name); - if (pos != categories_to_retain.end()) { - remove_waypoint_elements(proto_category->mutable_children(i), categories_to_retain, name, map_id); - if (keep < i) { - proto_category->mutable_children()->SwapElements(i, keep); - } - ++keep; - } - } - proto_category->mutable_children()->DeleteSubrange(keep, proto_category->children_size() - keep); -} - -void write_protobuf_file(string proto_directory, map* marker_categories, vector* parsed_pois) { - waypoint::Waypoint proto_pois; - // Collects a set of map ids from Icon and Trail data - std::set map_ids; - ofstream trail_data_file; - map> map_of_pois; - for (const auto& parsed_poi : *parsed_pois) { - if (parsed_poi->classname() == "POI") { - Icon* icon = dynamic_cast(parsed_poi); - map_ids.insert(icon->map_id); - map_of_pois[icon->category.category].push_back(icon); - } - else if (parsed_poi->classname() == "Trail") { - Trail* trail = dynamic_cast(parsed_poi); - map_ids.insert(trail->map_id); - map_of_pois[trail->category.category].push_back(trail); - } - } - - // Creates a Waypoint message that contains all categories - waypoint::Waypoint all_categories; - for (const auto& category : *marker_categories) { - waypoint::Category proto_category = category.second.as_protobuf("", &map_of_pois); - all_categories.add_category()->CopyFrom(proto_category); - } - - waypoint::Waypoint output_message; - std::set categories_to_retain; - for (int map_id : map_ids) { - ofstream outfile; - string output_filepath = proto_directory + "/" + to_string(map_id) + ".data"; - outfile.open(output_filepath, ios::out | ios::binary); - output_message.MergeFrom(all_categories); - - for (const auto& parsed_poi : *parsed_pois) { - if (parsed_poi->classname() == "POI") { - Icon* icon = dynamic_cast(parsed_poi); - if (icon->map_id == map_id) { - populate_categories_to_retain(icon->category.category, &categories_to_retain); - } - } - else if (parsed_poi->classname() == "Trail") { - Trail* trail = dynamic_cast(parsed_poi); - if (trail->map_id == map_id) { - populate_categories_to_retain(trail->category.category, &categories_to_retain); - } - } - } - // In the XML, MarkerCategories have a tree hierarchy while POIS have a - // flat hierarchy. In Waypoint, POIs are elements of the category they - // belong to. We are removing instead of inserting because - // each parent category contains the data for all of its children. It - // would be impractical to include all of the data from each category - // except for the children and then iterating over all the children. - // This pruning method is slower but ensures that information is kept. - for (int i = 0; i < output_message.category_size(); i++) { - remove_waypoint_elements(output_message.mutable_category(i), categories_to_retain, output_message.category(i).name(), map_id); - if (output_message.mutable_category(i)->children_size() == 0) { - output_message.mutable_category(i)->Clear(); - } - } - output_message.SerializeToOstream(&outfile); - outfile.close(); - output_message.Clear(); - categories_to_retain.clear(); - } -} - -Category* get_category(rapidxml::xml_node<>* node, map* marker_categories, vector* errors) { - // TODO: This is a slow linear search, replace with something faster. - // maybe use data from already parsed node instead of searching for - // the attribute. - rapidxml::xml_attribute<>* attribute = find_attribute(node, "type"); - - if (attribute == 0) { - // TODO: This error should really be for the entire node not just the name - errors->push_back(new XMLNodeNameError("No Attribute Named Type", node)); - return nullptr; - } - - vector split_categories = split(get_attribute_value(attribute), "."); - - if (split_categories.size() == 0) { - errors->push_back(new XMLAttributeValueError("Empty Type", attribute)); - return nullptr; - } - - Category* output = nullptr; - - for (unsigned int i = 0; i < split_categories.size(); i++) { - string category_name = lowercase(split_categories[i]); - - auto category = marker_categories->find(category_name); - - if (category == marker_categories->end()) { - errors->push_back(new XMLAttributeValueError("Category Not Found \"" + category_name + "\"", attribute)); - return nullptr; - } - - output = &category->second; - - marker_categories = &output->children; - } - return output; -} - -//////////////////////////////////////////////////////////////////////////////// -// parse_pois -// -// Parse the xml block into an in-memory array of Markers. -//////////////////////////////////////////////////////////////////////////////// -vector parse_pois(rapidxml::xml_node<>* root_node, map* marker_categories, vector* errors, string base_dir) { - vector markers; - - for (rapidxml::xml_node<>* node = root_node->first_node(); node; node = node->next_sibling()) { - if (get_node_name(node) == "POI") { - Category* default_category = get_category(node, marker_categories, errors); - - Icon* icon = new Icon(); - - if (default_category != nullptr) { - *icon = default_category->default_icon; - } - - icon->init_from_xml(node, errors); - markers.push_back(icon); - } - else if (get_node_name(node) == "Trail") { - Category* default_category = get_category(node, marker_categories, errors); - - Trail* trail = new Trail(); - - if (default_category != nullptr) { - *trail = default_category->default_trail; - } - - trail->init_from_xml(node, errors, base_dir); - markers.push_back(trail); - } - else { - errors->push_back(new XMLNodeNameError("Unknown POIs node name", node)); - } - } - return markers; -} - -void parse_marker_categories(rapidxml::xml_node<>* node, map* marker_categories, vector* errors, int depth = 0) { - if (get_node_name(node) == "MarkerCategory") { - string name = lowercase(find_attribute_value(node, "name")); - - Category* this_category = &(*marker_categories)[name]; - this_category->init_from_xml(node, errors); - for (rapidxml::xml_node<>* child_node = node->first_node(); child_node; child_node = child_node->next_sibling()) { - parse_marker_categories(child_node, &(this_category->children), errors, depth + 1); - } - } - else { - errors->push_back(new XMLNodeNameError("Unknown MarkerCategory Tag", node)); - } -} - -void parse_waypoint_categories(string full_category_name, ::waypoint::Category proto_category, map* marker_categories, vector* parsed_pois) { - full_category_name += proto_category.name(); - Category* this_category = &(*marker_categories)[full_category_name]; - this_category->parse_protobuf(proto_category); - - for (int i = 0; i < proto_category.icon_size(); i++) { - Icon* icon = new Icon(); - icon->parse_protobuf(proto_category.icon(i)); - // TODO: The field category in Icon is being deprciated - // This overwrites any icon.category with its position in the heirarchy - icon->category.category = full_category_name; - parsed_pois->push_back(icon); - } - for (int i = 0; i < proto_category.trail_size(); i++) { - Trail* trail = new Trail(); - trail->parse_protobuf(proto_category.trail(i)); - // TODO: The field category in Trail is being deprciated - // This overwrites any trail.category with its position in the heirarchy - trail->category.category = full_category_name; - parsed_pois->push_back(trail); - } - - for (int i = 0; i < proto_category.children_size(); i++) { - parse_waypoint_categories(full_category_name + ".", proto_category.children(i), &(this_category->children), parsed_pois); - } -} - -//////////////////////////////////////////////////////////////////////////////// -// parse_xml_file -// -// A function which parses a single XML file into their corrisponding classes. -//////////////////////////////////////////////////////////////////////////////// -void parse_xml_file(string xml_filepath, map* marker_categories, vector* parsed_pois) { - vector errors; - rapidxml::xml_document<> doc; - rapidxml::xml_node<>* root_node; - - rapidxml::file<> xml_file(xml_filepath.c_str()); - doc.parse(xml_file.data(), xml_filepath.c_str()); - - root_node = doc.first_node(); - string base_dir = get_base_dir(xml_filepath); - // Validate the Root Node - if (get_node_name(root_node) != "OverlayData") { - errors.push_back(new XMLNodeNameError("Root node should be of type OverlayData", root_node)); - } - if (root_node->first_attribute() != nullptr) { - cout << "Root Node has attributes when it should have none in " << xml_filepath << endl; - } - - for (rapidxml::xml_node<>* node = root_node->first_node(); node; node = node->next_sibling()) { - if (get_node_name(node) == "MarkerCategory") { - parse_marker_categories(node, marker_categories, &errors); - } - else if (get_node_name(node) == "POIs") { - vector temp_vector = parse_pois(node, marker_categories, &errors, base_dir); - move(temp_vector.begin(), temp_vector.end(), back_inserter(*parsed_pois)); - } - else { - errors.push_back(new XMLNodeNameError("Unknown top-level node name", node)); - } - } - - for (auto error : errors) { - error->print_error(); - } -} - -void read_protobuf_file(string proto_filepath, map* marker_categories, vector* parsed_pois) { - fstream infile; - waypoint::Waypoint proto_message; - - infile.open(proto_filepath, ios::in | ios::binary); - proto_message.ParseFromIstream(&infile); - for (int i = 0; i < proto_message.category_size(); i++) { - parse_waypoint_categories("", proto_message.category(i), marker_categories, parsed_pois); - } -} - bool filename_comp(string a, string b) { return lowercase(a) < lowercase(b); } From 7b1f3b77e754feaa5100826a2f9c7499b0e5252d Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Fri, 22 Sep 2023 03:08:13 -0500 Subject: [PATCH 225/539] adding the string hierarchy and unit tests --- .github/workflows/main.yml | 2 + xml_converter/CMakeLists.txt | 18 ++++++ xml_converter/src/string_hierarchy.cpp | 83 ++++++++++++++++++++++++++ xml_converter/src/string_hierarchy.hpp | 28 +++++++++ 4 files changed, 131 insertions(+) create mode 100644 xml_converter/src/string_hierarchy.cpp create mode 100644 xml_converter/src/string_hierarchy.hpp diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9a10e84b..91b5e529 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -62,6 +62,8 @@ jobs: - name: Install protoc run: sudo apt-get install protobuf-compiler + - name: Install gtest + run: sudo apt-get install libgtest-dev - name: Build xml_converter run: | diff --git a/xml_converter/CMakeLists.txt b/xml_converter/CMakeLists.txt index 40f58e0e..cc1e940d 100644 --- a/xml_converter/CMakeLists.txt +++ b/xml_converter/CMakeLists.txt @@ -31,3 +31,21 @@ if(MSVC) else() target_compile_options(${TARGET_NAME} PRIVATE -Wall -Wextra -Wpedantic) endif() + +### TESTS ###################################################################### +# Enable testing using CMake's built-in functionality +enable_testing() + +set(TEST_TARGET_NAME xml_converter_tests) + +file(GLOB_RECURSE TEST_SOURCES "src/*.cpp") +list(REMOVE_ITEM TEST_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/xml_converter.cpp") + +find_package(GTest REQUIRED) + +add_executable(${TEST_TARGET_NAME} tests/test_string_hierarchy.cpp ${TEST_SOURCES} ${PROTO_SRC}) + +target_link_libraries(${TEST_TARGET_NAME} GTest::GTest GTest::Main) +target_link_libraries(${TEST_TARGET_NAME} ${Protobuf_LIBRARIES}) + +gtest_discover_tests(${TEST_TARGET_NAME}) diff --git a/xml_converter/src/string_hierarchy.cpp b/xml_converter/src/string_hierarchy.cpp new file mode 100644 index 00000000..a98870e1 --- /dev/null +++ b/xml_converter/src/string_hierarchy.cpp @@ -0,0 +1,83 @@ +#include "string_hierarchy.hpp" + +#include + +//////////////////////////////////////////////////////////////////////////////// +// in_hierarchy +// +// Returns if the given path is in the hierarchy or not +//////////////////////////////////////////////////////////////////////////////// +bool StringHierarchy::in_hierarchy( + const std::vector &path) { + return this->_in_hierarchy(path, 0); +} + +//////////////////////////////////////////////////////////////////////////////// +// _in_hirearchy +// +// Recursive helper function to traverse the tree and determine if a path is +// or is not in the current hierarchy. +//////////////////////////////////////////////////////////////////////////////// +bool StringHierarchy::_in_hierarchy( + const std::vector &path, + const size_t continue_index) { + // If all children of this hierarchy node are included then this path exists. + if (this->all_children_included) { + return true; + } + + // If this is the end of the path then the path exists. + if (continue_index >= path.size()) { + return true; + } + + auto iterator = this->children.find(path[continue_index]); + if (iterator == this->children.end()) { + return false; + } + + return iterator->second._in_hierarchy(path, continue_index + 1); +} + +//////////////////////////////////////////////////////////////////////////////// +// add_path +// +// Adds a new path to the StringHierarchy. +//////////////////////////////////////////////////////////////////////////////// +void StringHierarchy::add_path( + const std::vector &path, + const bool include_all_chidren) { + return this->_add_path( + path, + include_all_chidren, + 0); +} + +//////////////////////////////////////////////////////////////////////////////// +// _add_path +// +// Recursive helper function to add new paths into the string hierarchy. +//////////////////////////////////////////////////////////////////////////////// +void StringHierarchy::_add_path( + const std::vector &path, + const bool include_all_chidren, + const size_t continue_index) { + // If all children are already included no need to specify any more children. + if (this->all_children_included) { + return; + } + + // End of the path, if all children are included clear out more specific children. + if (continue_index >= path.size()) { + if (include_all_chidren) { + this->all_children_included = true; + this->children.clear(); + } + return; + } + + this->children[path[continue_index]]._add_path( + path, + include_all_chidren, + continue_index + 1); +} diff --git a/xml_converter/src/string_hierarchy.hpp b/xml_converter/src/string_hierarchy.hpp new file mode 100644 index 00000000..7047b4b2 --- /dev/null +++ b/xml_converter/src/string_hierarchy.hpp @@ -0,0 +1,28 @@ +#pragma once + +#include +#include +#include + +class StringHierarchy { + public: + bool in_hierarchy( + const std::vector &path); + + void add_path( + const std::vector &path, + const bool include_all_chidren); + + private: + bool _in_hierarchy( + const std::vector &path, + const size_t continue_index); + + void _add_path( + const std::vector &path, + const bool include_all_chidren, + const size_t continue_index); + + std::map children; + bool all_children_included = false; +}; From 458d6aa2f2aa92d000774b05b0ebdf87c3f1317c Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Fri, 22 Sep 2023 03:10:59 -0500 Subject: [PATCH 226/539] adding the unit test file --- xml_converter/tests/test_string_hierarchy.cpp | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 xml_converter/tests/test_string_hierarchy.cpp diff --git a/xml_converter/tests/test_string_hierarchy.cpp b/xml_converter/tests/test_string_hierarchy.cpp new file mode 100644 index 00000000..c4c6243e --- /dev/null +++ b/xml_converter/tests/test_string_hierarchy.cpp @@ -0,0 +1,66 @@ +#include "../src/string_hierarchy.hpp" +#include + + +class StringHierarchyTest : public ::testing::Test { + protected: + StringHierarchy string_hierarchy; + + void SetUp() override { + } + void TearDown() override { + } +}; + + +TEST_F(StringHierarchyTest, BasicPath) { + string_hierarchy.add_path({"root", "child1", "child2"}, false); + EXPECT_TRUE(string_hierarchy.in_hierarchy({"root", "child1", "child2"})); +} + +TEST_F(StringHierarchyTest, ParentPath) { + string_hierarchy.add_path({"root", "child1", "child2"}, false); + EXPECT_TRUE(string_hierarchy.in_hierarchy({"root", "child1"})); + EXPECT_TRUE(string_hierarchy.in_hierarchy({"root"})); +} + +TEST_F(StringHierarchyTest, InvalidAdjacentNode) { + string_hierarchy.add_path({"root", "child1", "child2"}, false); + EXPECT_FALSE(string_hierarchy.in_hierarchy({"root", "child1", "invalid_child"})); +} + +TEST_F(StringHierarchyTest, InvalidRoot) { + string_hierarchy.add_path({"root", "child1", "child2"}, false); + EXPECT_FALSE(string_hierarchy.in_hierarchy({"badroot"})); +} + +TEST_F(StringHierarchyTest, NonExistantDepthNode) { + string_hierarchy.add_path({"root", "child1", "child2"}, false); + EXPECT_FALSE(string_hierarchy.in_hierarchy({"root", "child1", "child2", "child3"})); +} + +TEST_F(StringHierarchyTest, AllExistDepthNode) { + string_hierarchy.add_path({"root", "child1", "child2"}, true); + EXPECT_TRUE(string_hierarchy.in_hierarchy({"root", "child1", "child2", "child3"})); +} + +TEST_F(StringHierarchyTest, DoubleNode) { + string_hierarchy.add_path({"root", "child1", "child2"}, true); + string_hierarchy.add_path({"root", "neighbor1", "child2"}, false); + + EXPECT_TRUE(string_hierarchy.in_hierarchy({"root", "neighbor1", "child2"})); + EXPECT_TRUE(string_hierarchy.in_hierarchy({"root", "child1", "child2"})); + EXPECT_FALSE(string_hierarchy.in_hierarchy({"root", "child2"})); +} + +TEST_F(StringHierarchyTest, OverwriteAllChildrenRoot) { + string_hierarchy.add_path({"root", "child1", "child2"}, false); + string_hierarchy.add_path({"root"}, true); + EXPECT_TRUE(string_hierarchy.in_hierarchy({"root", "child1", "child2", "child3"})); + EXPECT_TRUE(string_hierarchy.in_hierarchy({"root", "somethingrandom"})); +} + +int main(int argc, char **argv) { + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} \ No newline at end of file From 847a1fc47d656c150cb9dcdf514c5026fdee693f Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Fri, 22 Sep 2023 04:07:18 -0500 Subject: [PATCH 227/539] adding a couple more corner case tests --- xml_converter/tests/test_string_hierarchy.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/xml_converter/tests/test_string_hierarchy.cpp b/xml_converter/tests/test_string_hierarchy.cpp index c4c6243e..7eed8a30 100644 --- a/xml_converter/tests/test_string_hierarchy.cpp +++ b/xml_converter/tests/test_string_hierarchy.cpp @@ -42,6 +42,8 @@ TEST_F(StringHierarchyTest, NonExistantDepthNode) { TEST_F(StringHierarchyTest, AllExistDepthNode) { string_hierarchy.add_path({"root", "child1", "child2"}, true); EXPECT_TRUE(string_hierarchy.in_hierarchy({"root", "child1", "child2", "child3"})); + EXPECT_TRUE(string_hierarchy.in_hierarchy({"root", "child1", "child2"})); + EXPECT_FALSE(string_hierarchy.in_hierarchy({"root", "child1", "child2b"})); } TEST_F(StringHierarchyTest, DoubleNode) { @@ -60,6 +62,11 @@ TEST_F(StringHierarchyTest, OverwriteAllChildrenRoot) { EXPECT_TRUE(string_hierarchy.in_hierarchy({"root", "somethingrandom"})); } +TEST_F(StringHierarchyTest, AllowAll) { + string_hierarchy.add_path({}, true); + EXPECT_TRUE(string_hierarchy.in_hierarchy({"literally", "anything"})); +} + int main(int argc, char **argv) { ::testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); From eb986761df626e124097a5ae7dd2f2b21ab4efe6 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Fri, 22 Sep 2023 14:32:36 -0500 Subject: [PATCH 228/539] removing the automatic nested protobuf generation --- .../cpp_templates/class_template.cpp | 29 +------------------ .../cpp_templates/class_template.hpp | 6 +--- xml_converter/src/category_gen.cpp | 23 +-------------- xml_converter/src/category_gen.hpp | 2 +- 4 files changed, 4 insertions(+), 56 deletions(-) diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index 2cf0f2d2..867f1d54 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -93,12 +93,7 @@ vector {{cpp_class}}::as_xml() const { return xml_node_contents; } -{% if cpp_class == "Category": %} - waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf(string full_category_name, map>* parsed_pois) const { - full_category_name += this->name; -{% else %} - waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf() const { -{% endif %} +waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf() const { waypoint::{{cpp_class}} proto_{{cpp_class_header}}; {% if cpp_class == "Icon": %} waypoint::Trigger* trigger = nullptr; @@ -150,28 +145,6 @@ vector {{cpp_class}}::as_xml() const { proto_{{cpp_class_header}}.set_allocated_trigger(trigger); } {% endif %} - {% if cpp_class == "Category": %} - - auto pois = parsed_pois->find(full_category_name); - - if (pois != parsed_pois->end()) { - for (unsigned int i = 0; i < pois->second.size(); i++) { - if (pois->second[i]->classname() == "POI") { - Icon* icon = dynamic_cast(pois->second[i]); - proto_{{cpp_class_header}}.add_icon()->MergeFrom(icon->as_protobuf()); - } - else if (pois->second[i]->classname() == "Trail") { - Trail* trail = dynamic_cast(pois->second[i]); - proto_{{cpp_class_header}}.add_trail()->MergeFrom(trail->as_protobuf()); - } - } - } - - for (const auto& [key, val] : this->children) { - waypoint::{{cpp_class}} proto_{{cpp_class_header}}_child = val.as_protobuf(full_category_name + ".", parsed_pois); - proto_{{cpp_class_header}}.add_children()->CopyFrom(proto_{{cpp_class_header}}_child); - } - {% endif %} return proto_{{cpp_class_header}}; } diff --git a/xml_converter/generators/cpp_templates/class_template.hpp b/xml_converter/generators/cpp_templates/class_template.hpp index 72102bf5..19d7aa26 100644 --- a/xml_converter/generators/cpp_templates/class_template.hpp +++ b/xml_converter/generators/cpp_templates/class_template.hpp @@ -34,11 +34,7 @@ class {{cpp_class}} : public Parseable { virtual std::vector as_xml() const; virtual std::string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, std::string base_dir = ""); - {% if cpp_class == "Category": %} - waypoint::{{cpp_class}} as_protobuf(std::string full_category_name, std::map>* parsed_pois) const; - {% else: %} - waypoint::{{cpp_class}} as_protobuf() const; - {% endif %} + waypoint::{{cpp_class}} as_protobuf() const; void parse_protobuf(waypoint::{{cpp_class}} proto_{{cpp_class_header}}); {% if attributes_of_type_marker_category %} bool validate_attributes_of_type_marker_category(); diff --git a/xml_converter/src/category_gen.cpp b/xml_converter/src/category_gen.cpp index f480a007..7ed102ac 100644 --- a/xml_converter/src/category_gen.cpp +++ b/xml_converter/src/category_gen.cpp @@ -95,8 +95,7 @@ vector Category::as_xml() const { return xml_node_contents; } -waypoint::Category Category::as_protobuf(string full_category_name, map>* parsed_pois) const { - full_category_name += this->name; +waypoint::Category Category::as_protobuf() const { waypoint::Category proto_category; if (this->default_visibility_is_set) { proto_category.set_default_visibility(this->default_visibility); @@ -113,26 +112,6 @@ waypoint::Category Category::as_protobuf(string full_category_name, maptooltip_description_is_set) { proto_category.set_tip_description(this->tooltip_description); } - - auto pois = parsed_pois->find(full_category_name); - - if (pois != parsed_pois->end()) { - for (unsigned int i = 0; i < pois->second.size(); i++) { - if (pois->second[i]->classname() == "POI") { - Icon* icon = dynamic_cast(pois->second[i]); - proto_category.add_icon()->MergeFrom(icon->as_protobuf()); - } - else if (pois->second[i]->classname() == "Trail") { - Trail* trail = dynamic_cast(pois->second[i]); - proto_category.add_trail()->MergeFrom(trail->as_protobuf()); - } - } - } - - for (const auto& [key, val] : this->children) { - waypoint::Category proto_category_child = val.as_protobuf(full_category_name + ".", parsed_pois); - proto_category.add_children()->CopyFrom(proto_category_child); - } return proto_category; } diff --git a/xml_converter/src/category_gen.hpp b/xml_converter/src/category_gen.hpp index 89e7a96c..3ef42874 100644 --- a/xml_converter/src/category_gen.hpp +++ b/xml_converter/src/category_gen.hpp @@ -32,6 +32,6 @@ class Category : public Parseable { virtual std::vector as_xml() const; virtual std::string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, std::string base_dir = ""); - waypoint::Category as_protobuf(std::string full_category_name, std::map>* parsed_pois) const; + waypoint::Category as_protobuf() const; void parse_protobuf(waypoint::Category proto_category); }; From 9dd77ab1f9b30874a7dbc74eb46060e26afafe38 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Fri, 22 Sep 2023 14:37:05 -0500 Subject: [PATCH 229/539] replacing protobuf generator logic --- xml_converter/src/packaging_protobin.cpp | 240 +++++++++++++---------- xml_converter/src/packaging_protobin.hpp | 14 +- xml_converter/src/string_helper.cpp | 12 ++ xml_converter/src/string_helper.hpp | 1 + xml_converter/src/string_hierarchy.cpp | 4 +- xml_converter/src/string_hierarchy.hpp | 4 +- xml_converter/src/xml_converter.cpp | 8 +- 7 files changed, 168 insertions(+), 115 deletions(-) diff --git a/xml_converter/src/packaging_protobin.cpp b/xml_converter/src/packaging_protobin.cpp index f58737af..bd3a38d6 100644 --- a/xml_converter/src/packaging_protobin.cpp +++ b/xml_converter/src/packaging_protobin.cpp @@ -10,6 +10,9 @@ #include "parseable.hpp" #include "string_helper.hpp" #include "waypoint.pb.h" +#include "string_hierarchy.hpp" + +#include // For TextProtos using namespace std; @@ -70,132 +73,157 @@ void read_protobuf_file(string proto_filepath, map* marker_cat //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// -// Adds the name of a category and all of it's parents to a set -// eg. -// { -// "mypath", -// "mypath.easypath", -// "mypath.easypath.trail", -// "mypath.hardpath", -// "mypath.hardpath.trail", -// } -//////////////////////////////////////////////////////////////////////////////// -void populate_categories_to_retain(string category_name, set* categories_to_retain) { - string name; - vector split_categories = split(category_name, "."); - for (unsigned int j = 0; j < split_categories.size(); j++) { - name += split_categories[j]; - categories_to_retain->insert(name); - name += "."; - } -} - -//////////////////////////////////////////////////////////////////////////////// -// Iterates through all children of a Category and removes the categories and -// POIs that do not belong on a particular map +// build_category_object +// +// Builds all the hierarchical category object info as long as the category +// has contents that exist in the category filter. //////////////////////////////////////////////////////////////////////////////// -void remove_waypoint_elements(waypoint::Category* proto_category, set categories_to_retain, string parent_name, int map_id) { - int keep = 0; - for (int i = 0; i < proto_category->icon_size(); i++) { - if (proto_category->icon(i).map_id() == map_id) { - if (keep < i) { - proto_category->mutable_icon()->SwapElements(i, keep); +struct MaybeCategory { + waypoint::Category category; + bool is_category; +}; +MaybeCategory build_category_objects( + const Category* category, + const StringHierarchy &category_filter, + const std::map> &category_to_pois, + vector &category_vector +) { + waypoint::Category category_proto = category->as_protobuf(); + bool has_valid_contents = false; + + vector categories_to_write; + + for (map::const_iterator it = category->children.begin(); it != category->children.end(); it++) { + + // This is currently a copy operation which is kind expensive + category_vector.push_back(it->first); + + if (category_filter.in_hierarchy(category_vector)) { + MaybeCategory child_category = build_category_objects( + &it->second, + category_filter, + category_to_pois, + category_vector + ); + + if (child_category.is_category) { + has_valid_contents = true; + category_proto.add_children()->MergeFrom(child_category.category); } - ++keep; } + category_vector.pop_back(); } - proto_category->mutable_icon()->DeleteSubrange(keep, proto_category->icon_size() - keep); - keep = 0; - for (int i = 0; i < proto_category->trail_size(); i++) { - if (proto_category->trail(i).map_id() == map_id) { - if (keep < i) { - proto_category->mutable_trail()->SwapElements(i, keep); + // This is a pretty expensive operation + string full_category_name = join(category_vector, "."); + auto iterator = category_to_pois.find(full_category_name); + if (iterator != category_to_pois.end()) { + for (size_t i = 0; i < iterator->second.size(); i++) { + Parseable* parsed_poi = iterator->second[i]; + + if (parsed_poi->classname() == "POI") { + Icon* icon = dynamic_cast(parsed_poi); + if (category_filter.in_hierarchy(split(icon->category.category,"."))) { + category_proto.add_icon()->MergeFrom(icon->as_protobuf()); + has_valid_contents = true; + } + } + else if (parsed_poi->classname() == "Trail") { + Trail* trail = dynamic_cast(parsed_poi); + if (category_filter.in_hierarchy(split(trail->category.category,"."))) { + category_proto.add_trail()->MergeFrom(trail->as_protobuf()); + has_valid_contents = true; + } } - ++keep; + else { + std::cout << "Unknown type" << std::endl; + } + } } - proto_category->mutable_trail()->DeleteSubrange(keep, proto_category->trail_size() - keep); - - keep = 0; - for (int i = 0; i < proto_category->children_size(); i++) { - string name = parent_name + "." + proto_category->children(i).name(); - auto pos = categories_to_retain.find(name); - if (pos != categories_to_retain.end()) { - remove_waypoint_elements(proto_category->mutable_children(i), categories_to_retain, name, map_id); - if (keep < i) { - proto_category->mutable_children()->SwapElements(i, keep); - } - ++keep; + + MaybeCategory return_value; + return_value.category = category_proto; + return_value.is_category = has_valid_contents; + return return_value; +} + +void write_protobuf_file( + const string &filepath, + const StringHierarchy &category_filter, + const map* marker_categories, + const vector* parsed_pois +) { + // TODO: call _write_protobuf_file +} + +void _write_protobuf_file( + const string &filepath, + const StringHierarchy &category_filter, + const map* marker_categories, + const std::map> &category_to_pois +){ + ofstream outfile; + outfile.open(filepath, ios::out | ios::binary); + + waypoint::Waypoint output_message; + + for (map::const_iterator it = marker_categories->begin(); it != marker_categories->end(); it++) { + string category_name = it->first; + const Category* category_object = &it->second; + + vector category_vector = {it->first}; + MaybeCategory maybe_category = build_category_objects( + category_object, + category_filter, + category_to_pois, + category_vector + ); + + if (maybe_category.is_category) { + output_message.add_category()->MergeFrom(maybe_category.category); } } - proto_category->mutable_children()->DeleteSubrange(keep, proto_category->children_size() - keep); + + output_message.SerializeToOstream(&outfile); + outfile.close(); } -void write_protobuf_file(string proto_directory, map* marker_categories, vector* parsed_pois) { - waypoint::Waypoint proto_pois; - // Collects a set of map ids from Icon and Trail data - std::set map_ids; - ofstream trail_data_file; - map> map_of_pois; - for (const auto& parsed_poi : *parsed_pois) { +// Write protobuf per map id +void write_protobuf_file_per_map_id( + const string &proto_directory, + const StringHierarchy &category_filter, + const map* marker_categories, + const vector* parsed_pois +) { + + std::map>> mapid_to_category_to_pois; + + for (size_t i = 0; i < parsed_pois->size(); i++) { + Parseable* parsed_poi = (*parsed_pois)[i]; if (parsed_poi->classname() == "POI") { Icon* icon = dynamic_cast(parsed_poi); - map_ids.insert(icon->map_id); - map_of_pois[icon->category.category].push_back(icon); + mapid_to_category_to_pois[icon->map_id][icon->category.category].push_back(parsed_poi); } else if (parsed_poi->classname() == "Trail") { Trail* trail = dynamic_cast(parsed_poi); - map_ids.insert(trail->map_id); - map_of_pois[trail->category.category].push_back(trail); + mapid_to_category_to_pois[trail->map_id][trail->category.category].push_back(parsed_poi); + } + else { + std::cout << "Unknown type" << std::endl; } } - // Creates a Waypoint message that contains all categories - waypoint::Waypoint all_categories; - for (const auto& category : *marker_categories) { - waypoint::Category proto_category = category.second.as_protobuf("", &map_of_pois); - all_categories.add_category()->CopyFrom(proto_category); - } + for (auto iterator = mapid_to_category_to_pois.begin(); iterator != mapid_to_category_to_pois.end(); iterator++) { - waypoint::Waypoint output_message; - std::set categories_to_retain; - for (int map_id : map_ids) { - ofstream outfile; - string output_filepath = proto_directory + "/" + to_string(map_id) + ".data"; - outfile.open(output_filepath, ios::out | ios::binary); - output_message.MergeFrom(all_categories); - - for (const auto& parsed_poi : *parsed_pois) { - if (parsed_poi->classname() == "POI") { - Icon* icon = dynamic_cast(parsed_poi); - if (icon->map_id == map_id) { - populate_categories_to_retain(icon->category.category, &categories_to_retain); - } - } - else if (parsed_poi->classname() == "Trail") { - Trail* trail = dynamic_cast(parsed_poi); - if (trail->map_id == map_id) { - populate_categories_to_retain(trail->category.category, &categories_to_retain); - } - } - } - // In the XML, MarkerCategories have a tree hierarchy while POIS have a - // flat hierarchy. In Waypoint, POIs are elements of the category they - // belong to. We are removing instead of inserting because - // each parent category contains the data for all of its children. It - // would be impractical to include all of the data from each category - // except for the children and then iterating over all the children. - // This pruning method is slower but ensures that information is kept. - for (int i = 0; i < output_message.category_size(); i++) { - remove_waypoint_elements(output_message.mutable_category(i), categories_to_retain, output_message.category(i).name(), map_id); - if (output_message.mutable_category(i)->children_size() == 0) { - output_message.mutable_category(i)->Clear(); - } - } - output_message.SerializeToOstream(&outfile); - outfile.close(); - output_message.Clear(); - categories_to_retain.clear(); + string output_filepath = proto_directory + "/" + to_string(iterator->first) + ".data"; + + _write_protobuf_file( + output_filepath, + category_filter, + marker_categories, + iterator->second + ); } } + diff --git a/xml_converter/src/packaging_protobin.hpp b/xml_converter/src/packaging_protobin.hpp index b50fdcef..c537c8bd 100644 --- a/xml_converter/src/packaging_protobin.hpp +++ b/xml_converter/src/packaging_protobin.hpp @@ -8,6 +8,7 @@ #include "category_gen.hpp" #include "parseable.hpp" #include "waypoint.pb.h" +#include "string_hierarchy.hpp" void read_protobuf_file( std::string proto_filepath, @@ -15,6 +16,13 @@ void read_protobuf_file( std::vector* parsed_pois); void write_protobuf_file( - std::string proto_directory, - std::map* marker_categories, - std::vector* parsed_pois); + const std::string &proto_directory, + const StringHierarchy &category_filter, + const std::map* marker_categories, + const std::vector* parsed_pois); + +void write_protobuf_file_per_map_id( + const std::string &proto_directory, + const StringHierarchy &category_filter, + const std::map* marker_categories, + const std::vector* parsed_pois); diff --git a/xml_converter/src/string_helper.cpp b/xml_converter/src/string_helper.cpp index ccb358fa..a236f6fc 100644 --- a/xml_converter/src/string_helper.cpp +++ b/xml_converter/src/string_helper.cpp @@ -48,6 +48,18 @@ vector split(string input, string delimiter) { return output; } +string join(const vector &input, string delimiter) { + string result; + for(size_t i = 0; i < input.size(); i++) { + result += input[i]; + // Don't add delimiter after the last element + if(i < input.size() - 1) { + result += delimiter; + } + } + return result; +} + //////////////////////////////////////////////////////////////////////////////// // normalize // diff --git a/xml_converter/src/string_helper.hpp b/xml_converter/src/string_helper.hpp index 96333bda..68aa5e1c 100644 --- a/xml_converter/src/string_helper.hpp +++ b/xml_converter/src/string_helper.hpp @@ -12,6 +12,7 @@ bool normalized_matches_any(std::string test, std::vector list); std::string lowercase(std::string); std::vector split(std::string input, std::string delimiter); +std::string join(const std::vector &input, std::string delimiter); std::string normalize(std::string input_string); diff --git a/xml_converter/src/string_hierarchy.cpp b/xml_converter/src/string_hierarchy.cpp index a98870e1..0c907c39 100644 --- a/xml_converter/src/string_hierarchy.cpp +++ b/xml_converter/src/string_hierarchy.cpp @@ -8,7 +8,7 @@ // Returns if the given path is in the hierarchy or not //////////////////////////////////////////////////////////////////////////////// bool StringHierarchy::in_hierarchy( - const std::vector &path) { + const std::vector &path) const { return this->_in_hierarchy(path, 0); } @@ -20,7 +20,7 @@ bool StringHierarchy::in_hierarchy( //////////////////////////////////////////////////////////////////////////////// bool StringHierarchy::_in_hierarchy( const std::vector &path, - const size_t continue_index) { + const size_t continue_index) const { // If all children of this hierarchy node are included then this path exists. if (this->all_children_included) { return true; diff --git a/xml_converter/src/string_hierarchy.hpp b/xml_converter/src/string_hierarchy.hpp index 7047b4b2..9a5587db 100644 --- a/xml_converter/src/string_hierarchy.hpp +++ b/xml_converter/src/string_hierarchy.hpp @@ -7,7 +7,7 @@ class StringHierarchy { public: bool in_hierarchy( - const std::vector &path); + const std::vector &path) const; void add_path( const std::vector &path, @@ -16,7 +16,7 @@ class StringHierarchy { private: bool _in_hierarchy( const std::vector &path, - const size_t continue_index); + const size_t continue_index) const; void _add_path( const std::vector &path, diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index ea2f9107..cb39da84 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -165,13 +165,17 @@ void process_data( // Write all of the protobin waypoint paths for (size_t i = 0; i < output_waypoint_paths.size(); i++) { - write_protobuf_file(output_waypoint_paths[i], &marker_categories, &parsed_pois); + StringHierarchy category_filter; + category_filter.add_path({}, true); + write_protobuf_file(output_waypoint_paths[i], category_filter, &marker_categories, &parsed_pois); } // Write the special map-split protbin waypoint file begin = chrono::high_resolution_clock::now(); if (output_split_waypoint_dir != "") { - write_protobuf_file(output_split_waypoint_dir, &marker_categories, &parsed_pois); + StringHierarchy category_filter; + category_filter.add_path({}, true); + write_protobuf_file_per_map_id(output_split_waypoint_dir, category_filter, &marker_categories, &parsed_pois); } end = chrono::high_resolution_clock::now(); dur = end - begin; From c4b38d48b9fd3e32b48c1c319d92548dae99b3ec Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Fri, 22 Sep 2023 14:58:54 -0500 Subject: [PATCH 230/539] implementing writing a single protobuf file --- xml_converter/src/packaging_protobin.cpp | 40 +++++++++++++++++++----- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/xml_converter/src/packaging_protobin.cpp b/xml_converter/src/packaging_protobin.cpp index bd3a38d6..45033a01 100644 --- a/xml_converter/src/packaging_protobin.cpp +++ b/xml_converter/src/packaging_protobin.cpp @@ -148,14 +148,7 @@ MaybeCategory build_category_objects( return return_value; } -void write_protobuf_file( - const string &filepath, - const StringHierarchy &category_filter, - const map* marker_categories, - const vector* parsed_pois -) { - // TODO: call _write_protobuf_file -} + void _write_protobuf_file( const string &filepath, @@ -189,6 +182,37 @@ void _write_protobuf_file( outfile.close(); } +void write_protobuf_file( + const string &filepath, + const StringHierarchy &category_filter, + const map* marker_categories, + const vector* parsed_pois +) { + std::map> category_to_pois; + + for (size_t i = 0; i < parsed_pois->size(); i++) { + Parseable* parsed_poi = (*parsed_pois)[i]; + if (parsed_poi->classname() == "POI") { + Icon* icon = dynamic_cast(parsed_poi); + category_to_pois[icon->category.category].push_back(parsed_poi); + } + else if (parsed_poi->classname() == "Trail") { + Trail* trail = dynamic_cast(parsed_poi); + category_to_pois[trail->category.category].push_back(parsed_poi); + } + else { + std::cout << "Unknown type" << std::endl; + } + } + + _write_protobuf_file( + filepath, + category_filter, + marker_categories, + category_to_pois + ); +} + // Write protobuf per map id void write_protobuf_file_per_map_id( const string &proto_directory, From b8e7a89124695d3016c34a972478ff1cdadadc11 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Fri, 22 Sep 2023 15:05:31 -0500 Subject: [PATCH 231/539] linter fixes --- xml_converter/src/packaging_protobin.cpp | 63 +++++++++--------------- xml_converter/src/packaging_protobin.hpp | 10 ++-- xml_converter/src/string_helper.cpp | 6 +-- xml_converter/src/string_helper.hpp | 2 +- 4 files changed, 32 insertions(+), 49 deletions(-) diff --git a/xml_converter/src/packaging_protobin.cpp b/xml_converter/src/packaging_protobin.cpp index 45033a01..a5129bdb 100644 --- a/xml_converter/src/packaging_protobin.cpp +++ b/xml_converter/src/packaging_protobin.cpp @@ -9,10 +9,8 @@ #include "category_gen.hpp" #include "parseable.hpp" #include "string_helper.hpp" -#include "waypoint.pb.h" #include "string_hierarchy.hpp" - -#include // For TextProtos +#include "waypoint.pb.h" using namespace std; @@ -84,38 +82,35 @@ struct MaybeCategory { }; MaybeCategory build_category_objects( const Category* category, - const StringHierarchy &category_filter, - const std::map> &category_to_pois, - vector &category_vector -) { + const StringHierarchy& category_filter, + const std::map>& category_to_pois, + vector* category_vector) { waypoint::Category category_proto = category->as_protobuf(); bool has_valid_contents = false; vector categories_to_write; for (map::const_iterator it = category->children.begin(); it != category->children.end(); it++) { - // This is currently a copy operation which is kind expensive - category_vector.push_back(it->first); + category_vector->push_back(it->first); - if (category_filter.in_hierarchy(category_vector)) { + if (category_filter.in_hierarchy(*category_vector)) { MaybeCategory child_category = build_category_objects( &it->second, category_filter, category_to_pois, - category_vector - ); + category_vector); if (child_category.is_category) { has_valid_contents = true; category_proto.add_children()->MergeFrom(child_category.category); } } - category_vector.pop_back(); + category_vector->pop_back(); } // This is a pretty expensive operation - string full_category_name = join(category_vector, "."); + string full_category_name = join(*category_vector, "."); auto iterator = category_to_pois.find(full_category_name); if (iterator != category_to_pois.end()) { for (size_t i = 0; i < iterator->second.size(); i++) { @@ -123,14 +118,14 @@ MaybeCategory build_category_objects( if (parsed_poi->classname() == "POI") { Icon* icon = dynamic_cast(parsed_poi); - if (category_filter.in_hierarchy(split(icon->category.category,"."))) { + if (category_filter.in_hierarchy(split(icon->category.category, "."))) { category_proto.add_icon()->MergeFrom(icon->as_protobuf()); has_valid_contents = true; } } else if (parsed_poi->classname() == "Trail") { Trail* trail = dynamic_cast(parsed_poi); - if (category_filter.in_hierarchy(split(trail->category.category,"."))) { + if (category_filter.in_hierarchy(split(trail->category.category, "."))) { category_proto.add_trail()->MergeFrom(trail->as_protobuf()); has_valid_contents = true; } @@ -138,7 +133,6 @@ MaybeCategory build_category_objects( else { std::cout << "Unknown type" << std::endl; } - } } @@ -148,14 +142,11 @@ MaybeCategory build_category_objects( return return_value; } - - void _write_protobuf_file( - const string &filepath, - const StringHierarchy &category_filter, + const string& filepath, + const StringHierarchy& category_filter, const map* marker_categories, - const std::map> &category_to_pois -){ + const std::map>& category_to_pois) { ofstream outfile; outfile.open(filepath, ios::out | ios::binary); @@ -170,8 +161,7 @@ void _write_protobuf_file( category_object, category_filter, category_to_pois, - category_vector - ); + &category_vector); if (maybe_category.is_category) { output_message.add_category()->MergeFrom(maybe_category.category); @@ -183,11 +173,10 @@ void _write_protobuf_file( } void write_protobuf_file( - const string &filepath, - const StringHierarchy &category_filter, + const string& filepath, + const StringHierarchy& category_filter, const map* marker_categories, - const vector* parsed_pois -) { + const vector* parsed_pois) { std::map> category_to_pois; for (size_t i = 0; i < parsed_pois->size(); i++) { @@ -209,18 +198,15 @@ void write_protobuf_file( filepath, category_filter, marker_categories, - category_to_pois - ); + category_to_pois); } // Write protobuf per map id void write_protobuf_file_per_map_id( - const string &proto_directory, - const StringHierarchy &category_filter, + const string& proto_directory, + const StringHierarchy& category_filter, const map* marker_categories, - const vector* parsed_pois -) { - + const vector* parsed_pois) { std::map>> mapid_to_category_to_pois; for (size_t i = 0; i < parsed_pois->size(); i++) { @@ -239,15 +225,12 @@ void write_protobuf_file_per_map_id( } for (auto iterator = mapid_to_category_to_pois.begin(); iterator != mapid_to_category_to_pois.end(); iterator++) { - string output_filepath = proto_directory + "/" + to_string(iterator->first) + ".data"; _write_protobuf_file( output_filepath, category_filter, marker_categories, - iterator->second - ); + iterator->second); } } - diff --git a/xml_converter/src/packaging_protobin.hpp b/xml_converter/src/packaging_protobin.hpp index c537c8bd..a62c02b7 100644 --- a/xml_converter/src/packaging_protobin.hpp +++ b/xml_converter/src/packaging_protobin.hpp @@ -7,8 +7,8 @@ #include "category_gen.hpp" #include "parseable.hpp" -#include "waypoint.pb.h" #include "string_hierarchy.hpp" +#include "waypoint.pb.h" void read_protobuf_file( std::string proto_filepath, @@ -16,13 +16,13 @@ void read_protobuf_file( std::vector* parsed_pois); void write_protobuf_file( - const std::string &proto_directory, - const StringHierarchy &category_filter, + const std::string& proto_directory, + const StringHierarchy& category_filter, const std::map* marker_categories, const std::vector* parsed_pois); void write_protobuf_file_per_map_id( - const std::string &proto_directory, - const StringHierarchy &category_filter, + const std::string& proto_directory, + const StringHierarchy& category_filter, const std::map* marker_categories, const std::vector* parsed_pois); diff --git a/xml_converter/src/string_helper.cpp b/xml_converter/src/string_helper.cpp index a236f6fc..ac18c2e6 100644 --- a/xml_converter/src/string_helper.cpp +++ b/xml_converter/src/string_helper.cpp @@ -48,12 +48,12 @@ vector split(string input, string delimiter) { return output; } -string join(const vector &input, string delimiter) { +string join(const vector& input, string delimiter) { string result; - for(size_t i = 0; i < input.size(); i++) { + for (size_t i = 0; i < input.size(); i++) { result += input[i]; // Don't add delimiter after the last element - if(i < input.size() - 1) { + if (i < input.size() - 1) { result += delimiter; } } diff --git a/xml_converter/src/string_helper.hpp b/xml_converter/src/string_helper.hpp index 68aa5e1c..22bcb4ab 100644 --- a/xml_converter/src/string_helper.hpp +++ b/xml_converter/src/string_helper.hpp @@ -12,7 +12,7 @@ bool normalized_matches_any(std::string test, std::vector list); std::string lowercase(std::string); std::vector split(std::string input, std::string delimiter); -std::string join(const std::vector &input, std::string delimiter); +std::string join(const std::vector& input, std::string delimiter); std::string normalize(std::string input_string); From 371e23985996e3e548adfa81ec0faf96c172dcbf Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Fri, 29 Sep 2023 23:59:39 -0500 Subject: [PATCH 232/539] Adding string hierarchy helper functions, and fixing pointer and reference styling rules --- xml_converter/.clang-format | 3 +- xml_converter/src/string_hierarchy.cpp | 52 ++++++++++++++++++++++++++ xml_converter/src/string_hierarchy.hpp | 9 +++++ 3 files changed, 63 insertions(+), 1 deletion(-) diff --git a/xml_converter/.clang-format b/xml_converter/.clang-format index 71dc1ff2..bf384993 100644 --- a/xml_converter/.clang-format +++ b/xml_converter/.clang-format @@ -57,7 +57,7 @@ ConstructorInitializerIndentWidth: 4 ContinuationIndentWidth: 4 Cpp11BracedListStyle: true DeriveLineEnding: true -DerivePointerAlignment: true +DerivePointerAlignment: false DisableFormat: false ExperimentalAutoDetectBinPacking: false FixNamespaceComments: true @@ -106,6 +106,7 @@ PenaltyBreakTemplateDeclaration: 10 PenaltyExcessCharacter: 1 # 1000000 PenaltyReturnTypeOnItsOwnLine: 200 PointerAlignment: Left +ReferenceAlignment: Right RawStringFormats: - Language: Cpp Delimiters: diff --git a/xml_converter/src/string_hierarchy.cpp b/xml_converter/src/string_hierarchy.cpp index 0c907c39..03371f00 100644 --- a/xml_converter/src/string_hierarchy.cpp +++ b/xml_converter/src/string_hierarchy.cpp @@ -2,6 +2,24 @@ #include +//////////////////////////////////////////////////////////////////////////////// +// in_hierarchy +// +// Returns if a particular node exists at the top level of the hirearchy. +//////////////////////////////////////////////////////////////////////////////// +bool StringHierarchy::in_hierarchy( + const std::string &node) const { + if (this->all_children_included) { + return true; + } + + auto iterator = this->children.find(node); + if (iterator == this->children.end()) { + return false; + } + return true; +} + //////////////////////////////////////////////////////////////////////////////// // in_hierarchy // @@ -39,6 +57,40 @@ bool StringHierarchy::_in_hierarchy( return iterator->second._in_hierarchy(path, continue_index + 1); } +//////////////////////////////////////////////////////////////////////////////// +// sub_hierarchy +// +// A helper function to grab a sub hierarchy one level down from the top. +//////////////////////////////////////////////////////////////////////////////// +const StringHierarchy* StringHierarchy::sub_hierarchy( + const std::string &node) const { + if (this->all_children_included) { + return this; + } + + auto iterator = this->children.find(node); + if (iterator == this->children.end()) { + return nullptr; + } + return &(iterator->second); +} + +//////////////////////////////////////////////////////////////////////////////// +// sub_hierarchy +// +// Get a subtree of the StringHierarchy in order to avoid needing to query the +// entire hierarchy in the case where the use case is traversing down a tree +// anyways and does not want to keep track of the parent's values. +//////////////////////////////////////////////////////////////////////////////// +const StringHierarchy* StringHierarchy::sub_hierarchy( + const std::vector &path) const { + const StringHierarchy* sub_hierarchy = this; + for (size_t i = 0; i < path.size(); i++) { + sub_hierarchy = this->sub_hierarchy(path[i]); + } + return sub_hierarchy; +} + //////////////////////////////////////////////////////////////////////////////// // add_path // diff --git a/xml_converter/src/string_hierarchy.hpp b/xml_converter/src/string_hierarchy.hpp index 9a5587db..47218a97 100644 --- a/xml_converter/src/string_hierarchy.hpp +++ b/xml_converter/src/string_hierarchy.hpp @@ -7,6 +7,15 @@ class StringHierarchy { public: bool in_hierarchy( + const std::string &node) const; + + bool in_hierarchy( + const std::vector &path) const; + + const StringHierarchy* sub_hierarchy( + const std::string &node) const; + + const StringHierarchy* sub_hierarchy( const std::vector &path) const; void add_path( From 3e38ff4750733eea90043104ac3eff0bfb57c157 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sat, 30 Sep 2023 00:49:11 -0500 Subject: [PATCH 233/539] adding intializer list overloads and unit tests --- xml_converter/src/string_hierarchy.cpp | 37 ++++++++++++++- xml_converter/src/string_hierarchy.hpp | 6 +++ xml_converter/tests/test_string_hierarchy.cpp | 45 +++++++++++++++++++ 3 files changed, 87 insertions(+), 1 deletion(-) diff --git a/xml_converter/src/string_hierarchy.cpp b/xml_converter/src/string_hierarchy.cpp index 03371f00..c7583d83 100644 --- a/xml_converter/src/string_hierarchy.cpp +++ b/xml_converter/src/string_hierarchy.cpp @@ -20,6 +20,8 @@ bool StringHierarchy::in_hierarchy( return true; } + + //////////////////////////////////////////////////////////////////////////////// // in_hierarchy // @@ -30,6 +32,20 @@ bool StringHierarchy::in_hierarchy( return this->_in_hierarchy(path, 0); } +//////////////////////////////////////////////////////////////////////////////// +// in_hierarchy +// +// An explicit version of in_hierarchy that takes an initalizer list to prevent +// ambiguity between the vector and string overloads of the function. +//////////////////////////////////////////////////////////////////////////////// +bool StringHierarchy::in_hierarchy( + const std::initializer_list input +) const { + std::vector vec; + vec.insert(vec.end(), input.begin(), input.end()); + return this->in_hierarchy(vec); +} + //////////////////////////////////////////////////////////////////////////////// // _in_hirearchy // @@ -75,6 +91,21 @@ const StringHierarchy* StringHierarchy::sub_hierarchy( return &(iterator->second); } + +//////////////////////////////////////////////////////////////////////////////// +// sub_hierarchy +// +// An explicit version of sub_hierarchy that takes an initalizer list to +// prevent ambiguity between the vector and string overloads of the function. +//////////////////////////////////////////////////////////////////////////////// +const StringHierarchy* StringHierarchy::sub_hierarchy( + const std::initializer_list input) const { + std::vector vec; + vec.insert(vec.end(), input.begin(), input.end()); + return this->sub_hierarchy(vec); +} + + //////////////////////////////////////////////////////////////////////////////// // sub_hierarchy // @@ -86,7 +117,11 @@ const StringHierarchy* StringHierarchy::sub_hierarchy( const std::vector &path) const { const StringHierarchy* sub_hierarchy = this; for (size_t i = 0; i < path.size(); i++) { - sub_hierarchy = this->sub_hierarchy(path[i]); + sub_hierarchy = sub_hierarchy->sub_hierarchy(path[i]); + // Escape before segfaulting. + if (sub_hierarchy == nullptr) { + return nullptr; + } } return sub_hierarchy; } diff --git a/xml_converter/src/string_hierarchy.hpp b/xml_converter/src/string_hierarchy.hpp index 47218a97..94e2fc7c 100644 --- a/xml_converter/src/string_hierarchy.hpp +++ b/xml_converter/src/string_hierarchy.hpp @@ -12,9 +12,15 @@ class StringHierarchy { bool in_hierarchy( const std::vector &path) const; + bool in_hierarchy( + const std::initializer_list) const; + const StringHierarchy* sub_hierarchy( const std::string &node) const; + const StringHierarchy* sub_hierarchy( + const std::initializer_list input) const; + const StringHierarchy* sub_hierarchy( const std::vector &path) const; diff --git a/xml_converter/tests/test_string_hierarchy.cpp b/xml_converter/tests/test_string_hierarchy.cpp index 7eed8a30..4e2d84c8 100644 --- a/xml_converter/tests/test_string_hierarchy.cpp +++ b/xml_converter/tests/test_string_hierarchy.cpp @@ -18,6 +18,11 @@ TEST_F(StringHierarchyTest, BasicPath) { EXPECT_TRUE(string_hierarchy.in_hierarchy({"root", "child1", "child2"})); } +TEST_F(StringHierarchyTest, BasicPathSingle) { + string_hierarchy.add_path({"root", "child1", "child2"}, false); + EXPECT_TRUE(string_hierarchy.in_hierarchy("root")); +} + TEST_F(StringHierarchyTest, ParentPath) { string_hierarchy.add_path({"root", "child1", "child2"}, false); EXPECT_TRUE(string_hierarchy.in_hierarchy({"root", "child1"})); @@ -34,6 +39,11 @@ TEST_F(StringHierarchyTest, InvalidRoot) { EXPECT_FALSE(string_hierarchy.in_hierarchy({"badroot"})); } +TEST_F(StringHierarchyTest, InvalidRootSingle) { + string_hierarchy.add_path({"root", "child1", "child2"}, false); + EXPECT_FALSE(string_hierarchy.in_hierarchy("badroot")); +} + TEST_F(StringHierarchyTest, NonExistantDepthNode) { string_hierarchy.add_path({"root", "child1", "child2"}, false); EXPECT_FALSE(string_hierarchy.in_hierarchy({"root", "child1", "child2", "child3"})); @@ -67,6 +77,41 @@ TEST_F(StringHierarchyTest, AllowAll) { EXPECT_TRUE(string_hierarchy.in_hierarchy({"literally", "anything"})); } +TEST_F(StringHierarchyTest, AllowAllSingle) { + string_hierarchy.add_path({}, true); + EXPECT_TRUE(string_hierarchy.in_hierarchy("everything")); +} + +TEST_F(StringHierarchyTest, InvalidHierarchy) { + string_hierarchy.add_path({"root", "child1", "child2"}, false); + const StringHierarchy* sub_hierarchy = string_hierarchy.sub_hierarchy({"invalid"}); + EXPECT_EQ(sub_hierarchy, nullptr); +} + +TEST_F(StringHierarchyTest, SubHierarchy) { + string_hierarchy.add_path({"root", "child1", "child2"}, false); + const StringHierarchy* sub_hierarchy = string_hierarchy.sub_hierarchy({"root", "child1"}); + EXPECT_NE(sub_hierarchy, nullptr); + EXPECT_FALSE(sub_hierarchy->in_hierarchy("root")); + EXPECT_FALSE(sub_hierarchy->in_hierarchy("child1")); + EXPECT_TRUE(sub_hierarchy->in_hierarchy("child2")); +} + +TEST_F(StringHierarchyTest, InvalidDeepHierarchy) { + string_hierarchy.add_path({"root", "child1", "child2"}, false); + const StringHierarchy* sub_hierarchy = string_hierarchy.sub_hierarchy({"invalid", "nonexistant"}); + EXPECT_EQ(sub_hierarchy, nullptr); +} + +TEST_F(StringHierarchyTest, SubHierarchySingle) { + string_hierarchy.add_path({"root", "child1", "child2"}, false); + const StringHierarchy* sub_hierarchy = string_hierarchy.sub_hierarchy("root"); + EXPECT_NE(sub_hierarchy, nullptr); + EXPECT_FALSE(sub_hierarchy->in_hierarchy("root")); + EXPECT_TRUE(sub_hierarchy->in_hierarchy("child1")); + EXPECT_TRUE(sub_hierarchy->in_hierarchy({"child1", "child2"})); +} + int main(int argc, char **argv) { ::testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); From fba68942192fcf52bc90b76f352d82d7cb1fa72d Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sat, 30 Sep 2023 00:54:24 -0500 Subject: [PATCH 234/539] reverting some of the clang format change becuase it seems to have a wider impact --- xml_converter/.clang-format | 2 +- xml_converter/src/string_hierarchy.cpp | 15 +++++---------- xml_converter/src/string_hierarchy.hpp | 6 +++--- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/xml_converter/.clang-format b/xml_converter/.clang-format index bf384993..76cbc3dc 100644 --- a/xml_converter/.clang-format +++ b/xml_converter/.clang-format @@ -57,7 +57,7 @@ ConstructorInitializerIndentWidth: 4 ContinuationIndentWidth: 4 Cpp11BracedListStyle: true DeriveLineEnding: true -DerivePointerAlignment: false +DerivePointerAlignment: true DisableFormat: false ExperimentalAutoDetectBinPacking: false FixNamespaceComments: true diff --git a/xml_converter/src/string_hierarchy.cpp b/xml_converter/src/string_hierarchy.cpp index c7583d83..62b3c35b 100644 --- a/xml_converter/src/string_hierarchy.cpp +++ b/xml_converter/src/string_hierarchy.cpp @@ -20,8 +20,6 @@ bool StringHierarchy::in_hierarchy( return true; } - - //////////////////////////////////////////////////////////////////////////////// // in_hierarchy // @@ -39,8 +37,7 @@ bool StringHierarchy::in_hierarchy( // ambiguity between the vector and string overloads of the function. //////////////////////////////////////////////////////////////////////////////// bool StringHierarchy::in_hierarchy( - const std::initializer_list input -) const { + const std::initializer_list input) const { std::vector vec; vec.insert(vec.end(), input.begin(), input.end()); return this->in_hierarchy(vec); @@ -78,7 +75,7 @@ bool StringHierarchy::_in_hierarchy( // // A helper function to grab a sub hierarchy one level down from the top. //////////////////////////////////////////////////////////////////////////////// -const StringHierarchy* StringHierarchy::sub_hierarchy( +const StringHierarchy *StringHierarchy::sub_hierarchy( const std::string &node) const { if (this->all_children_included) { return this; @@ -91,21 +88,19 @@ const StringHierarchy* StringHierarchy::sub_hierarchy( return &(iterator->second); } - //////////////////////////////////////////////////////////////////////////////// // sub_hierarchy // // An explicit version of sub_hierarchy that takes an initalizer list to // prevent ambiguity between the vector and string overloads of the function. //////////////////////////////////////////////////////////////////////////////// -const StringHierarchy* StringHierarchy::sub_hierarchy( +const StringHierarchy *StringHierarchy::sub_hierarchy( const std::initializer_list input) const { std::vector vec; vec.insert(vec.end(), input.begin(), input.end()); return this->sub_hierarchy(vec); } - //////////////////////////////////////////////////////////////////////////////// // sub_hierarchy // @@ -113,9 +108,9 @@ const StringHierarchy* StringHierarchy::sub_hierarchy( // entire hierarchy in the case where the use case is traversing down a tree // anyways and does not want to keep track of the parent's values. //////////////////////////////////////////////////////////////////////////////// -const StringHierarchy* StringHierarchy::sub_hierarchy( +const StringHierarchy *StringHierarchy::sub_hierarchy( const std::vector &path) const { - const StringHierarchy* sub_hierarchy = this; + const StringHierarchy *sub_hierarchy = this; for (size_t i = 0; i < path.size(); i++) { sub_hierarchy = sub_hierarchy->sub_hierarchy(path[i]); // Escape before segfaulting. diff --git a/xml_converter/src/string_hierarchy.hpp b/xml_converter/src/string_hierarchy.hpp index 94e2fc7c..3b323b11 100644 --- a/xml_converter/src/string_hierarchy.hpp +++ b/xml_converter/src/string_hierarchy.hpp @@ -15,13 +15,13 @@ class StringHierarchy { bool in_hierarchy( const std::initializer_list) const; - const StringHierarchy* sub_hierarchy( + const StringHierarchy *sub_hierarchy( const std::string &node) const; - const StringHierarchy* sub_hierarchy( + const StringHierarchy *sub_hierarchy( const std::initializer_list input) const; - const StringHierarchy* sub_hierarchy( + const StringHierarchy *sub_hierarchy( const std::vector &path) const; void add_path( From b68be589686b8fdd6e76ef083d36914a76309626 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sat, 30 Sep 2023 01:02:38 -0500 Subject: [PATCH 235/539] fully reverting the clang format change --- xml_converter/.clang-format | 1 - 1 file changed, 1 deletion(-) diff --git a/xml_converter/.clang-format b/xml_converter/.clang-format index 76cbc3dc..71dc1ff2 100644 --- a/xml_converter/.clang-format +++ b/xml_converter/.clang-format @@ -106,7 +106,6 @@ PenaltyBreakTemplateDeclaration: 10 PenaltyExcessCharacter: 1 # 1000000 PenaltyReturnTypeOnItsOwnLine: 200 PointerAlignment: Left -ReferenceAlignment: Right RawStringFormats: - Language: Cpp Delimiters: From 43250087aca86558a8d33ef9de69dd7bcd0cd457 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sat, 30 Sep 2023 01:24:31 -0500 Subject: [PATCH 236/539] Splitting up the github CI workflow to handle builds in parallel --- .github/workflows/main.yml | 190 +++++++++++++++++++++++++++---------- 1 file changed, 142 insertions(+), 48 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 91b5e529..1daa402b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,31 +26,37 @@ on: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: # This workflow contains a single job called "build" - Build-Linux: + Build-XMLConverter-Linux: # The type of runner that the job will run on runs-on: ubuntu-20.04 # Steps represent a sequence of tasks that will be executed as part of the job steps: - - uses: actions/checkout@v2 + - name: Checkout repository + uses: actions/checkout@v4 - name: Create the Output Directory run: mkdir -v -p output - # `clang-9` must be installed here because of a weird unlisted dependency - # on some sort of file that clang-9 installs. Without it iwyu would - # complain about missing files and error out. - - name: Install include-what-you-use - run: | - sudo apt-get install iwyu - sudo apt-get install clang-9 + # IWYU is disabled for now due to noise. It will be re-enabled at a later date + # # `clang-9` must be installed here because of a weird unlisted dependency + # # on some sort of file that clang-9 installs. Without it iwyu would + # # complain about missing files and error out. + # - name: Install include-what-you-use + # run: | + # sudo apt-get install iwyu + # sudo apt-get install clang-9 + + - name: Install protoc + run: sudo apt-get install protobuf-compiler + - name: Install gtest + run: sudo apt-get install libgtest-dev - name: Install cpplint run: | pip3 install cpplint - - name: Install xml_converter/generators Dependencies run: | cd xml_converter/generators @@ -58,13 +64,6 @@ jobs: source venv/bin/activate pip install -r requirements.txt - - - name: Install protoc - run: sudo apt-get install protobuf-compiler - - - name: Install gtest - run: sudo apt-get install libgtest-dev - - name: Build xml_converter run: | cd xml_converter @@ -72,15 +71,88 @@ jobs: cd build cmake .. make - mv xml_converter ../../output/ - cp compile_commands.json ../compile_commands.json - - name: Validate xml_converter run: | cd xml_converter + cp build/compile_commands.json ./compile_commands.json ./presubmit.sh + - name: Upload created file + uses: actions/upload-artifact@v3 + with: + name: xml_converter + path: xml_converter/build/xml_converter + if-no-files-found: error + + Build-BurritoLink-Linux: + runs-on: ubuntu-20.04 + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Create the Output Directory + run: mkdir -v -p output + + - name: Install mingw + run: sudo apt-get install gcc-mingw-w64 + + - name: Build Burrito Link + run: | + cd burrito_link + make + + - name: Upload created file + uses: actions/upload-artifact@v3 + with: + name: burrito_link + path: burrito_link/burrito_link.exe + if-no-files-found: error + + Build-BurritoFG-Linux: + runs-on: ubuntu-20.04 + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Build X11_FG + run: | + cd burrito-fg + cargo build --release + + - name: Upload created file + uses: actions/upload-artifact@v3 + with: + name: BurritoFG + path: burrito-fg/target/release/libburrito_fg.so + if-no-files-found: error + + Build-TacoParser-Linux: + runs-on: ubuntu-20.04 + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Build taco_parser + run: | + cd taco_parser + cargo build --release + + - name: Upload created file + uses: actions/upload-artifact@v3 + with: + name: TacoParser + path: taco_parser/target/release/libgw2_taco_parser.so + if-no-files-found: error + + Build-BurritoUI-Linux: + runs-on: ubuntu-20.04 + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Create the Output Directory + run: mkdir -v -p output # - name: Cache Godot # id: cache-godot @@ -117,47 +189,69 @@ jobs: mv templates/* ~/.local/share/godot/templates/${GODOT_VERSION}.stable/ ls ~/.local/share/godot/templates/${GODOT_VERSION}.stable/ + - name: Fake The GDNative Files + run: | + mkdir -p burrito-fg/target/release/ + touch burrito-fg/target/release/libburrito_fg.so + mkdir -p taco_parser/target/release/ + touch taco_parser/target/release/libgw2_taco_parser.so - - name: Install mingw - run: sudo apt-get install gcc-mingw-w64 - - - - name: Build X11_FG + - name: Build Burrito run: | - cd burrito-fg - cargo build --release + mkdir -v -p build + ./Godot_v${GODOT_VERSION}-stable_linux_headless.64 --export "Linux/X11" + chmod +x build/burrito.x86_64 + - uses: actions/upload-artifact@v3 + with: + name: Burrito_UI + path: build/burrito.x86_64 + if-no-files-found: error - - name: Build taco_parser - run: | - cd taco_parser - cargo build --release + Package-Burrito-Linux: + runs-on: ubuntu-20.04 + needs: + - Build-XMLConverter-Linux + - Build-BurritoLink-Linux + - Build-BurritoUI-Linux + - Build-BurritoFG-Linux + - Build-TacoParser-Linux + steps: + - name: Download Burrito UI + uses: actions/download-artifact@v3 + with: + name: Burrito_UI + - name: Download Burrito FG + uses: actions/download-artifact@v3 + with: + name: BurritoFG - - name: Build Burrito Link - run: | - cd burrito_link - make - mv burrito_link.exe ../output + - name: Download TacoParser + uses: actions/download-artifact@v3 + with: + name: TacoParser + - name: Download XML Converter + uses: actions/download-artifact@v3 + with: + name: xml_converter - - name: Build Burrito - run: | - mkdir -v -p build - ./Godot_v${GODOT_VERSION}-stable_linux_headless.64 --export "Linux/X11" - chmod +x build/burrito.x86_64 - mv build/burrito.x86_64 output/ - mv build/libburrito_fg.so output/ - mv build/libgw2_taco_parser.so output/ + - name: Download Burrito Link + uses: actions/download-artifact@v3 + with: + name: burrito_link + - name: Move Burrito Link + run: | + mkdir burrito_link/ + mv burrito_link.exe burrito_link/ - - uses: actions/upload-artifact@v2.2.4 + - uses: actions/upload-artifact@v3 with: # Artifact name name: "Burrito_Linux" # optional, default is artifact # A file, directory or wildcard pattern that describes what to upload - path: "output/*" + path: "./*" # The desired behavior if no files are found using the provided path. if-no-files-found: error - # Duration after which artifact will expire in days. 0 means using default retention. - retention-days: 7 From aad17db04ca6225c387b38cd98cacf43af650510 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Fri, 29 Sep 2023 23:14:17 -0500 Subject: [PATCH 237/539] new frontmatter schema definitions --- xml_converter/generators/code_generator.py | 258 +-------------------- xml_converter/generators/schema.py | 191 +++++++++++++++ 2 files changed, 194 insertions(+), 255 deletions(-) create mode 100644 xml_converter/generators/schema.py diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index dbd5c683..ef193af6 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -9,264 +9,12 @@ from jinja2 import Template, FileSystemLoader, Environment from jinja_helpers import UnindentBlocks -SchemaType = Dict[str, Any] -schema = """ -type: object -properties: - type: - type: string - enum: [Int32, Fixed32, Float32, String, Boolean, MultiflagValue, Enum, CompoundValue, Custom, CompoundCustomClass] -allOf: - ############################# - # Int32 Type - ############################# - - if: - properties: - type: - const: Int32 - then: - additionalProperties: false - required: [{shared_fields}] - properties: - {shared_field_properties} - - ############################# - # Fixed32 Type - ############################# - - if: - properties: - type: - const: Fixed32 - then: - additionalProperties: false - required: [{shared_fields}] - properties: - {shared_field_properties} - - ############################# - # Float32 Type - ############################# - - if: - properties: - type: - const: Float32 - then: - additionalProperties: false - required: [{shared_fields}] - properties: - {shared_field_properties} - - ############################# - # String Type - ############################# - - if: - properties: - type: - const: String - then: - additionalProperties: false - required: [{shared_fields}] - properties: - {shared_field_properties} - - ############################# - # Boolean Type - ############################# - - if: - properties: - type: - const: Boolean - then: - additionalProperties: false - required: [{shared_fields}] - properties: - {shared_field_properties} - - ############################# - # MultiflagValue Type - ############################# - - if: - properties: - type: - const: MultiflagValue - then: - additionalProperties: false - required: [{shared_fields}, flags] - properties: - {shared_field_properties} - flags: - type: object - patternProperties: - "^[a-z_]+$": - type: array - items: - type: string - - ############################# - # Enum Type - ############################# - - if: - properties: - type: - const: Enum - then: - additionalProperties: false - required: [{shared_fields}, values] - properties: - {shared_field_properties} - values: - type: object - patternProperties: - "^[a-z_]+$": - type: array - items: - type: string - - ############################# - # CompoundValue Type - ############################# - - if: - properties: - type: - const: CompoundValue - then: - additionalProperties: false - required: [{shared_fields}, xml_bundled_components, xml_separate_components, components] - properties: - {shared_field_properties} - xml_bundled_components: - type: array - items: - type: string - xml_separate_components: - type: array - items: - type: string - components: - type: array - items: - type: object - additionalProperties: false - required: [name, type, xml_fields, protobuf_field, compatability] - properties: - name: - type: string - type: - type: string - enum: [Int32, Fixed32, Float32] - xml_fields: - type: array - items: - type: string - pattern: "^[A-Za-z]+$" - protobuf_field: - type: string - pattern: "^[a-z_.]+$" - compatability: - type: array - items: - type: string - enum: [BlishHUD, Burrito, TacO] - ############################# - # CompoundCustomClass Type - ############################# - - if: - properties: - type: - const: CompoundCustomClass - then: - additionalProperties: false - required: [{shared_fields}, xml_bundled_components, xml_separate_components, class] - properties: - {shared_field_properties} - class: - type: string - xml_bundled_components: - type: array - items: - type: string - xml_separate_components: - type: array - items: - type: string - components: - type: array - items: - type: object - additionalProperties: false - required: [name, type, xml_fields, protobuf_field, compatability] - properties: - name: - type: string - type: - type: string - enum: [Int32, Fixed32, Float32] - xml_fields: - type: array - items: - type: string - pattern: "^[A-Za-z]+$" - protobuf_field: - type: string - pattern: "^[a-z_.]+$" - compatability: - type: array - items: - type: string - enum: [BlishHUD, Burrito, TacO] - - ############################# - # Custom Type - ############################# - - if: - properties: - type: - const: Custom - then: - additionalProperties: false - required: [{shared_fields}, class] - properties: - {shared_field_properties} - class: - type: string - side_effects: - type: array - items: - type: string - uses_file_path: - type: boolean - -""".format( - shared_field_properties="""type: - type: string - name: - type: string - applies_to: - type: array - items: - type: string - enum: [Icon, Trail, Category] - compatability: - type: array - items: - type: string - enum: [BlishHUD, Burrito, TacO] - xml_fields: - type: array - items: - type: string - pattern: "^[A-Za-z]+$" - protobuf_field: - type: string - pattern: "^[a-z_.]+$" - """, - shared_fields="type, name, applies_to, compatability, xml_fields, protobuf_field" -) - +from schema import schema +SchemaType = Dict[str, Any] def validate_front_matter_schema(front_matter: Any) -> str: try: - validate(front_matter, yaml.safe_load(schema)) + validate(front_matter, schema) except ValidationError as e: return "Error Message: {} (Path: {}".format(e.message, e.json_path) return "" diff --git a/xml_converter/generators/schema.py b/xml_converter/generators/schema.py new file mode 100644 index 00000000..8a75dd5f --- /dev/null +++ b/xml_converter/generators/schema.py @@ -0,0 +1,191 @@ +from jsonschema import validate # type:ignore +from jsonschema.exceptions import ValidationError # type:ignore +from typing import Any, Optional, List, Dict, Iterable, TypedDict, Literal, Union, Tuple +import yaml + + +################################################################################ +# A union type of all of the different type helpers found below +################################################################################ +DefType = Union[ + "StringDef", + "BooleanDef", + "EnumDef", + "ArrayDef", + "ObjectDef", + "PatternDictionaryDef" +]; + + +################################################################################ +# String Definition Helpers +# +# +################################################################################ +class BaseStringDef(TypedDict): + type: Literal["string"] +class StringDef(BaseStringDef, total=False): + pattern: Optional[str] +def string_t(pattern: Optional[str] = None) -> StringDef: + if pattern is None: + return { + "type": "string" + } + else: + return { + "type": "string", + "pattern": pattern, + } + +class BooleanDef(TypedDict): + type: Literal["boolean"] +def boolean_t() -> BooleanDef: + return { + "type": "boolean" + } + +class EnumDef(TypedDict): + type: Literal["string"] + enum: List[str] +def enum_t(options: Iterable[str]) -> EnumDef: + return { + "type": "string", + "enum": list(options) + } + +class ArrayDef(TypedDict): + type: Literal["array"] + items: DefType +def array_t(element_type: DefType) -> ArrayDef: + return { + "type": "array", + "items": element_type + } + +class ObjectDef(TypedDict): + type: Literal["object"] + additionalProperties: Literal[False] + required: List[str] + properties: Dict[str, DefType] +def object_t(fields: Dict[str, DefType], optional_fields: Dict[str, DefType] = {}) -> ObjectDef: + return { + "type": "object", + "additionalProperties": False, + "required": list(fields.keys()), + "properties": {**fields, **optional_fields} + } + +class PatternDictionaryDef(TypedDict): + type: Literal["object"] + patternProperties: Dict[str, DefType] +def pattern_dictionary_t(pattern_properties: Dict[str, DefType]) -> PatternDictionaryDef: + return { + "type": "object", + "patternProperties": pattern_properties + } + + +# Helper function for the union types +def union_partial_t(*, required: Dict[str, DefType]={}, optional: Dict[str, DefType]={}) ->Tuple[Dict[str, DefType], Dict[str, DefType]]: + return (required, optional) +upt=union_partial_t + + + +def union_t(options: Dict[str, Tuple[Dict[str, DefType], Dict[str, DefType]]]): + union_type = { + "type": "object", + "properties": { + "type": enum_t(options.keys()) + }, + "allOf": [ + { + "if": { + "properties": { + "type": { + "const": key + } + } + }, + "then": { + "additionalProperties": False, + "required": list(value[0].keys()), + "properties": {**value[0], **value[1]} + } + } + for key, value in options.items()] + } + + return union_type + + +shared_field_properties: Dict[str, DefType] = { + "type": string_t(), + "name": string_t(), + "applies_to": array_t(enum_t(["Icon", "Trail", "Category"])), + # To Be Depricated + "compatability": array_t(enum_t(["BlishHUD", "Burrito", "TacO"])), + "xml_fields": array_t(string_t(pattern="^[A-Za-z]+$")), + "protobuf_field": string_t(pattern="^[a-z_.]+$"), +} + +schema = union_t({ + "Int32": union_partial_t(required=shared_field_properties), + "Fixed32": union_partial_t(required=shared_field_properties), + "Float32": union_partial_t(required=shared_field_properties), + "String": union_partial_t(required=shared_field_properties), + "Boolean": union_partial_t(required=shared_field_properties), + "MultiflagValue": union_partial_t( + required = {**shared_field_properties, **{ + "flags": pattern_dictionary_t({"^[a-z_]+$": array_t(string_t())}), + }}, + ), + "Enum": union_partial_t( + required={**shared_field_properties, **{ + "values": pattern_dictionary_t({"^[a-z_]+$": array_t(string_t())}) + }} + ), + "CompoundValue": union_partial_t( + required={**shared_field_properties, **{ + "xml_bundled_components": array_t(string_t()), + "xml_separate_components": array_t(string_t()), + "components": array_t(object_t({ + "name": string_t(), + "type": enum_t(["Int32", "Fixed32", "Float32"]), + "xml_fields": array_t(string_t("^[A-Za-z]+$")), + "protobuf_field": string_t("^[a-z_.]+$"), + # To Be Depricated + "compatability": array_t(enum_t(["BlishHUD", "Burrito", "TacO"])) + })), + }} + ), + + "CompoundCustomClass": union_partial_t( + required={**shared_field_properties, **{ + "class": string_t(), + "xml_bundled_components": array_t(string_t()), + "xml_separate_components": array_t(string_t()), + "components": array_t(object_t({ + "name": string_t(), + "type": enum_t(["Int32", "Fixed32", "Float32"]), + "xml_fields": array_t(string_t("^[A-Za-z]+$")), + "protobuf_field": string_t("^[a-z_.]+$"), + # To Be Depricated + "compatability": array_t(enum_t(["BlishHUD", "Burrito", "TacO"])) + })), + }} + ), + + "Custom": union_partial_t( + required={**shared_field_properties, **{"class": string_t()}}, + optional={ + "side_effects": array_t(string_t()), + "uses_file_path": boolean_t(), + } + ), +}) + + + + + From ec70b0539a3f5a103435506a176decb6699e1ec2 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sat, 30 Sep 2023 03:01:19 -0500 Subject: [PATCH 238/539] linter file cleanups, and upgrading mypy --- xml_converter/generators/code_generator.py | 5 +- xml_converter/generators/requirements.txt | 3 +- xml_converter/generators/schema.py | 66 ++++++++++++++++------ 3 files changed, 53 insertions(+), 21 deletions(-) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index ef193af6..9d47b4cc 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -1,6 +1,5 @@ from jsonschema import validate # type:ignore from jsonschema.exceptions import ValidationError # type:ignore -import yaml import frontmatter # type:ignore from typing import Any, Dict, List, Tuple, Set, Optional, Final import os @@ -8,10 +7,12 @@ from dataclasses import dataclass, field from jinja2 import Template, FileSystemLoader, Environment from jinja_helpers import UnindentBlocks - from schema import schema + SchemaType = Dict[str, Any] + + def validate_front_matter_schema(front_matter: Any) -> str: try: validate(front_matter, schema) diff --git a/xml_converter/generators/requirements.txt b/xml_converter/generators/requirements.txt index 01586b2e..3a17b260 100644 --- a/xml_converter/generators/requirements.txt +++ b/xml_converter/generators/requirements.txt @@ -5,8 +5,7 @@ jsonschema==4.7.2 Markdown==3.4.1 MarkupSafe==2.1.1 mccabe==0.6.1 -mypy==0.971 -mypy-extensions==0.4.3 +mypy==1.5.1 pyaml==21.10.1 pycodestyle==2.8.0 pyflakes==2.4.0 diff --git a/xml_converter/generators/schema.py b/xml_converter/generators/schema.py index 8a75dd5f..335cc2a1 100644 --- a/xml_converter/generators/schema.py +++ b/xml_converter/generators/schema.py @@ -1,7 +1,4 @@ -from jsonschema import validate # type:ignore -from jsonschema.exceptions import ValidationError # type:ignore -from typing import Any, Optional, List, Dict, Iterable, TypedDict, Literal, Union, Tuple -import yaml +from typing import Optional, List, Dict, Iterable, TypedDict, Literal, Union, Tuple ################################################################################ @@ -14,18 +11,22 @@ "ArrayDef", "ObjectDef", "PatternDictionaryDef" -]; +] ################################################################################ # String Definition Helpers # -# +# ################################################################################ class BaseStringDef(TypedDict): type: Literal["string"] + + class StringDef(BaseStringDef, total=False): pattern: Optional[str] + + def string_t(pattern: Optional[str] = None) -> StringDef: if pattern is None: return { @@ -37,36 +38,48 @@ def string_t(pattern: Optional[str] = None) -> StringDef: "pattern": pattern, } + class BooleanDef(TypedDict): type: Literal["boolean"] + + def boolean_t() -> BooleanDef: return { "type": "boolean" } + class EnumDef(TypedDict): type: Literal["string"] enum: List[str] + + def enum_t(options: Iterable[str]) -> EnumDef: return { "type": "string", "enum": list(options) } + class ArrayDef(TypedDict): type: Literal["array"] items: DefType + + def array_t(element_type: DefType) -> ArrayDef: return { "type": "array", "items": element_type } + class ObjectDef(TypedDict): type: Literal["object"] additionalProperties: Literal[False] required: List[str] properties: Dict[str, DefType] + + def object_t(fields: Dict[str, DefType], optional_fields: Dict[str, DefType] = {}) -> ObjectDef: return { "type": "object", @@ -75,9 +88,12 @@ def object_t(fields: Dict[str, DefType], optional_fields: Dict[str, DefType] = { "properties": {**fields, **optional_fields} } + class PatternDictionaryDef(TypedDict): type: Literal["object"] patternProperties: Dict[str, DefType] + + def pattern_dictionary_t(pattern_properties: Dict[str, DefType]) -> PatternDictionaryDef: return { "type": "object", @@ -86,14 +102,34 @@ def pattern_dictionary_t(pattern_properties: Dict[str, DefType]) -> PatternDicti # Helper function for the union types -def union_partial_t(*, required: Dict[str, DefType]={}, optional: Dict[str, DefType]={}) ->Tuple[Dict[str, DefType], Dict[str, DefType]]: +def union_partial_t( + *, + required: Dict[str, DefType] = {}, + optional: Dict[str, DefType] = {} +) -> Tuple[Dict[str, DefType], Dict[str, DefType]]: return (required, optional) -upt=union_partial_t +class UnionBranchThenDef(TypedDict): + additionalProperties: Literal[False] + required: List[str] + properties: Dict[str, DefType] + + +UnionBranchDef = TypedDict('UnionBranchDef', { + 'if': Dict[Literal["properties"], Dict[Literal["type"], Dict[Literal["const"], str]]], + 'then': UnionBranchThenDef, +}) + -def union_t(options: Dict[str, Tuple[Dict[str, DefType], Dict[str, DefType]]]): - union_type = { +class UnionDef(TypedDict): + type: Literal["object"] + properties: Dict[Literal["type"], EnumDef] + allOf: List[UnionBranchDef] + + +def union_t(options: Dict[str, Tuple[Dict[str, DefType], Dict[str, DefType]]]) -> UnionDef: + union_type: UnionDef = { "type": "object", "properties": { "type": enum_t(options.keys()) @@ -113,7 +149,8 @@ def union_t(options: Dict[str, Tuple[Dict[str, DefType], Dict[str, DefType]]]): "properties": {**value[0], **value[1]} } } - for key, value in options.items()] + for key, value in options.items() + ] } return union_type @@ -136,7 +173,7 @@ def union_t(options: Dict[str, Tuple[Dict[str, DefType], Dict[str, DefType]]]): "String": union_partial_t(required=shared_field_properties), "Boolean": union_partial_t(required=shared_field_properties), "MultiflagValue": union_partial_t( - required = {**shared_field_properties, **{ + required={**shared_field_properties, **{ "flags": pattern_dictionary_t({"^[a-z_]+$": array_t(string_t())}), }}, ), @@ -184,8 +221,3 @@ def union_t(options: Dict[str, Tuple[Dict[str, DefType], Dict[str, DefType]]]): } ), }) - - - - - From c68bb42eb0215bebad1a4ea5b06a7eb07f3785ee Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sat, 30 Sep 2023 03:47:27 -0500 Subject: [PATCH 239/539] moving the schema itself back into the main file and adding more comments to the utility functions --- xml_converter/generators/code_generator.py | 67 +++++++++++- xml_converter/generators/schema.py | 117 +++++++++------------ 2 files changed, 114 insertions(+), 70 deletions(-) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 9d47b4cc..b34c6051 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -7,12 +7,77 @@ from dataclasses import dataclass, field from jinja2 import Template, FileSystemLoader, Environment from jinja_helpers import UnindentBlocks -from schema import schema +from schema import string_t, array_t, enum_t, union_t, union_partial_t, pattern_dictionary_t, object_t, boolean_t, DefType SchemaType = Dict[str, Any] +shared_field_properties: Dict[str, DefType] = { + "type": string_t(), + "name": string_t(), + "applies_to": array_t(enum_t(["Icon", "Trail", "Category"])), + # To Be Depricated + "compatability": array_t(enum_t(["BlishHUD", "Burrito", "TacO"])), + "xml_fields": array_t(string_t(pattern="^[A-Za-z]+$")), + "protobuf_field": string_t(pattern="^[a-z_.]+$"), +} + +schema = union_t({ + "Int32": union_partial_t(required=shared_field_properties), + "Fixed32": union_partial_t(required=shared_field_properties), + "Float32": union_partial_t(required=shared_field_properties), + "String": union_partial_t(required=shared_field_properties), + "Boolean": union_partial_t(required=shared_field_properties), + "MultiflagValue": union_partial_t( + required={**shared_field_properties, **{ + "flags": pattern_dictionary_t({"^[a-z_]+$": array_t(string_t())}), + }}, + ), + "Enum": union_partial_t( + required={**shared_field_properties, **{ + "values": pattern_dictionary_t({"^[a-z_]+$": array_t(string_t())}) + }} + ), + "CompoundValue": union_partial_t( + required={**shared_field_properties, **{ + "xml_bundled_components": array_t(string_t()), + "xml_separate_components": array_t(string_t()), + "components": array_t(object_t({ + "name": string_t(), + "type": enum_t(["Int32", "Fixed32", "Float32"]), + "xml_fields": array_t(string_t("^[A-Za-z]+$")), + "protobuf_field": string_t("^[a-z_.]+$"), + # To Be Depricated + "compatability": array_t(enum_t(["BlishHUD", "Burrito", "TacO"])) + })), + }} + ), + "CompoundCustomClass": union_partial_t( + required={**shared_field_properties, **{ + "class": string_t(), + "xml_bundled_components": array_t(string_t()), + "xml_separate_components": array_t(string_t()), + "components": array_t(object_t({ + "name": string_t(), + "type": enum_t(["Int32", "Fixed32", "Float32"]), + "xml_fields": array_t(string_t("^[A-Za-z]+$")), + "protobuf_field": string_t("^[a-z_.]+$"), + # To Be Depricated + "compatability": array_t(enum_t(["BlishHUD", "Burrito", "TacO"])) + })), + }} + ), + "Custom": union_partial_t( + required={**shared_field_properties, **{"class": string_t()}}, + optional={ + "side_effects": array_t(string_t()), + "uses_file_path": boolean_t(), + } + ), +}) + + def validate_front_matter_schema(front_matter: Any) -> str: try: validate(front_matter, schema) diff --git a/xml_converter/generators/schema.py b/xml_converter/generators/schema.py index 335cc2a1..d2e9784b 100644 --- a/xml_converter/generators/schema.py +++ b/xml_converter/generators/schema.py @@ -17,7 +17,9 @@ ################################################################################ # String Definition Helpers # -# +# These are used as helpers for string_t() which is a helper for creating a +# "string" jsonschema definition object. Optionally string_t() can be called +# with a regex pattern that will be applied to the json schema. ################################################################################ class BaseStringDef(TypedDict): type: Literal["string"] @@ -39,6 +41,12 @@ def string_t(pattern: Optional[str] = None) -> StringDef: } +################################################################################ +# Boolean Definition Helpers +# +# These are helpers for creating a "boolean" jsonschema definition object. +# boolean_t() does not take any arguments and will always return the same value +################################################################################ class BooleanDef(TypedDict): type: Literal["boolean"] @@ -49,6 +57,13 @@ def boolean_t() -> BooleanDef: } +################################################################################ +# Enumeration Definition Helpers +# +# These are helpers for creating "enum" jsonschema definition objects. These +# are string values that can only be one of a set number of values. The values +# that are allowed are passed into the enum_t() function. +################################################################################ class EnumDef(TypedDict): type: Literal["string"] enum: List[str] @@ -61,6 +76,12 @@ def enum_t(options: Iterable[str]) -> EnumDef: } +################################################################################ +# Array Definition Helpers +# +# Theses are helpers for creating "array" jsonschema definition objects. Arrays +# Take in a subtype that represents the type of their elements. +################################################################################ class ArrayDef(TypedDict): type: Literal["array"] items: DefType @@ -73,6 +94,15 @@ def array_t(element_type: DefType) -> ArrayDef: } +################################################################################ +# Object Definition Helpers +# +# These are helpers for creating object jsonschema definitions. Objects contain +# both required and optional fields. Objects in jsonschema normally just +# denote fields that might exist, but dont force them to exist or prevent other +# fields from existing by default. This helper automatically forces all of the +# required fields to exist, and restricts any non-required non-optional field. +################################################################################ class ObjectDef(TypedDict): type: Literal["object"] additionalProperties: Literal[False] @@ -89,6 +119,13 @@ def object_t(fields: Dict[str, DefType], optional_fields: Dict[str, DefType] = { } +################################################################################ +# Pattern Dictionary Definition Helpers +# +# These are helpers for creating dictionary types that have pattern +# requirements on their keys. This is a special type for jsonschema and it +# may be replaced in the future with something else given its uniqueness. +################################################################################ class PatternDictionaryDef(TypedDict): type: Literal["object"] patternProperties: Dict[str, DefType] @@ -101,7 +138,16 @@ def pattern_dictionary_t(pattern_properties: Dict[str, DefType]) -> PatternDicti } -# Helper function for the union types +################################################################################ +# Union Definition Type +# +# These are helpers for creating union types in jsonschema. Unions seem to be +# very difficult to accomplish in jsonschema but union_t() will abstract all +# of the complexities away, only requiring a map of strings to required and +# optional fields, similar to an object. +################################################################################ +# Helper function for the union types to more easily write required/optional +# tuples inline. def union_partial_t( *, required: Dict[str, DefType] = {}, @@ -154,70 +200,3 @@ def union_t(options: Dict[str, Tuple[Dict[str, DefType], Dict[str, DefType]]]) - } return union_type - - -shared_field_properties: Dict[str, DefType] = { - "type": string_t(), - "name": string_t(), - "applies_to": array_t(enum_t(["Icon", "Trail", "Category"])), - # To Be Depricated - "compatability": array_t(enum_t(["BlishHUD", "Burrito", "TacO"])), - "xml_fields": array_t(string_t(pattern="^[A-Za-z]+$")), - "protobuf_field": string_t(pattern="^[a-z_.]+$"), -} - -schema = union_t({ - "Int32": union_partial_t(required=shared_field_properties), - "Fixed32": union_partial_t(required=shared_field_properties), - "Float32": union_partial_t(required=shared_field_properties), - "String": union_partial_t(required=shared_field_properties), - "Boolean": union_partial_t(required=shared_field_properties), - "MultiflagValue": union_partial_t( - required={**shared_field_properties, **{ - "flags": pattern_dictionary_t({"^[a-z_]+$": array_t(string_t())}), - }}, - ), - "Enum": union_partial_t( - required={**shared_field_properties, **{ - "values": pattern_dictionary_t({"^[a-z_]+$": array_t(string_t())}) - }} - ), - "CompoundValue": union_partial_t( - required={**shared_field_properties, **{ - "xml_bundled_components": array_t(string_t()), - "xml_separate_components": array_t(string_t()), - "components": array_t(object_t({ - "name": string_t(), - "type": enum_t(["Int32", "Fixed32", "Float32"]), - "xml_fields": array_t(string_t("^[A-Za-z]+$")), - "protobuf_field": string_t("^[a-z_.]+$"), - # To Be Depricated - "compatability": array_t(enum_t(["BlishHUD", "Burrito", "TacO"])) - })), - }} - ), - - "CompoundCustomClass": union_partial_t( - required={**shared_field_properties, **{ - "class": string_t(), - "xml_bundled_components": array_t(string_t()), - "xml_separate_components": array_t(string_t()), - "components": array_t(object_t({ - "name": string_t(), - "type": enum_t(["Int32", "Fixed32", "Float32"]), - "xml_fields": array_t(string_t("^[A-Za-z]+$")), - "protobuf_field": string_t("^[a-z_.]+$"), - # To Be Depricated - "compatability": array_t(enum_t(["BlishHUD", "Burrito", "TacO"])) - })), - }} - ), - - "Custom": union_partial_t( - required={**shared_field_properties, **{"class": string_t()}}, - optional={ - "side_effects": array_t(string_t()), - "uses_file_path": boolean_t(), - } - ), -}) From ad0aa6b2b175ffdeee3e0690dfde91b3b8cbb4d7 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sat, 30 Sep 2023 04:09:10 -0500 Subject: [PATCH 240/539] Removing supported by field, and fixing web templates The web doc templates were aparently never tested after a change was made, which meant that they were not actually navigatable. The supported by field will eventually be replaced by a different solution where each product is its own file instead of each product modifying a field across multiple files to indicate support --- .../doc/acheivement/achievement_bitmask.md | 1 - xml_converter/doc/acheivement/achievement_id.md | 1 - xml_converter/doc/can_fade/can_fade.md | 1 - xml_converter/doc/category/category.md | 1 - xml_converter/doc/fade/distance_fade_end.md | 1 - xml_converter/doc/fade/distance_fade_start.md | 1 - .../doc/festival_filter/festival_filter.md | 1 - xml_converter/doc/is_wall/is_wall.md | 1 - xml_converter/doc/map_id/map_id.md | 1 - xml_converter/doc/map_id/map_type_filter.md | 1 - xml_converter/doc/menu/default_visibility.md | 1 - xml_converter/doc/menu/display_name.md | 1 - xml_converter/doc/menu/is_separator.md | 1 - xml_converter/doc/menu/name.md | 1 - xml_converter/doc/mount_filter/mount_filter.md | 1 - xml_converter/doc/position/height_offset.md | 1 - xml_converter/doc/position/position.md | 4 ---- .../doc/profession_filter/profession_filter.md | 1 - xml_converter/doc/rendering/cull_chirality.md | 1 - xml_converter/doc/rendering/map_display_size.md | 1 - xml_converter/doc/rendering/render_ingame.md | 1 - xml_converter/doc/rendering/render_on_map.md | 1 - xml_converter/doc/rendering/render_on_minimap.md | 1 - .../doc/rendering/scale_on_map_with_zoom.md | 1 - xml_converter/doc/rotation/euler_rotation.md | 4 ---- xml_converter/doc/scale/icon_size.md | 1 - xml_converter/doc/scale/trail_scale.md | 1 - xml_converter/doc/schedule/schedule.md | 1 - xml_converter/doc/schedule/schedule_duration.md | 1 - .../doc/size_on_screen/maximum_size_on_screen.md | 1 - .../doc/size_on_screen/minimum_size_on_screen.md | 1 - .../specialization_filter/specialization_filter.md | 1 - xml_converter/doc/species_filter/species_filter.md | 1 - xml_converter/doc/texture/animation_speed.md | 1 - xml_converter/doc/texture/color.md | 5 ----- xml_converter/doc/texture/icon.md | 1 - xml_converter/doc/texture/texture.md | 1 - xml_converter/doc/tooltip/tooltip_description.md | 1 - xml_converter/doc/tooltip/tooltip_name.md | 1 - xml_converter/doc/trail_data/trail_data.md | 1 - xml_converter/doc/trigger/auto_trigger.md | 1 - xml_converter/doc/trigger/bounce_delay.md | 1 - xml_converter/doc/trigger/bounce_duration.md | 1 - xml_converter/doc/trigger/bounce_height.md | 1 - xml_converter/doc/trigger/copy_clipboard.md | 1 - xml_converter/doc/trigger/copy_message.md | 1 - xml_converter/doc/trigger/guid.md | 1 - xml_converter/doc/trigger/has_countdown.md | 1 - xml_converter/doc/trigger/hide_category.md | 1 - xml_converter/doc/trigger/info_message.md | 1 - xml_converter/doc/trigger/invert_visibility.md | 1 - xml_converter/doc/trigger/reset_behavior.md | 1 - xml_converter/doc/trigger/reset_length.md | 1 - xml_converter/doc/trigger/show_category.md | 1 - xml_converter/doc/trigger/toggle_category.md | 1 - xml_converter/doc/trigger/trigger_range.md | 1 - xml_converter/generators/code_generator.py | 13 ++----------- .../generators/web_templates/infotable.html | 4 ---- 58 files changed, 2 insertions(+), 81 deletions(-) diff --git a/xml_converter/doc/acheivement/achievement_bitmask.md b/xml_converter/doc/acheivement/achievement_bitmask.md index 15d5f871..fc4f2a05 100644 --- a/xml_converter/doc/acheivement/achievement_bitmask.md +++ b/xml_converter/doc/acheivement/achievement_bitmask.md @@ -2,7 +2,6 @@ name: Achievement Bitmask type: Fixed32 applies_to: [Icon, Trail] -compatability: [TacO, BlishHUD, Burrito] xml_fields: ["AchievementBit"] protobuf_field: achievement_bit --- diff --git a/xml_converter/doc/acheivement/achievement_id.md b/xml_converter/doc/acheivement/achievement_id.md index e791c4be..8b9a8d49 100644 --- a/xml_converter/doc/acheivement/achievement_id.md +++ b/xml_converter/doc/acheivement/achievement_id.md @@ -2,7 +2,6 @@ name: Achievement ID type: Int32 applies_to: [Icon, Trail] -compatability: [TacO, BlishHUD, Burrito] xml_fields: ["AchievementId"] protobuf_field: achievement_id --- diff --git a/xml_converter/doc/can_fade/can_fade.md b/xml_converter/doc/can_fade/can_fade.md index e6f5fc1a..07fdaf0c 100644 --- a/xml_converter/doc/can_fade/can_fade.md +++ b/xml_converter/doc/can_fade/can_fade.md @@ -4,7 +4,6 @@ type: Boolean applies_to: [Icon, Trail] xml_fields: [CanFade] protobuf_field: can_fade -compatability: [TacO, BlishHUD, Burrito] --- A flag to determine if an object can be made transparent when it is possibly occluding the player. Notes diff --git a/xml_converter/doc/category/category.md b/xml_converter/doc/category/category.md index 91e68742..8d61135f 100644 --- a/xml_converter/doc/category/category.md +++ b/xml_converter/doc/category/category.md @@ -5,7 +5,6 @@ class: MarkerCategory applies_to: [Icon, Trail] xml_fields: [Type, Category] protobuf_field: category -compatability: [TacO, BlishHUD, Burrito] --- The category this object belongs to. diff --git a/xml_converter/doc/fade/distance_fade_end.md b/xml_converter/doc/fade/distance_fade_end.md index a6082ce3..fcd1fbaf 100644 --- a/xml_converter/doc/fade/distance_fade_end.md +++ b/xml_converter/doc/fade/distance_fade_end.md @@ -4,7 +4,6 @@ type: Float32 applies_to: [Icon, Trail] xml_fields: [FadeFar, DistanceFadeEnd] protobuf_field: distance_fade_end -compatability: [TacO, BlishHUD, Burrito] --- Any part of the object that is farther then this value will be at. diff --git a/xml_converter/doc/fade/distance_fade_start.md b/xml_converter/doc/fade/distance_fade_start.md index db3a1762..24dbc293 100644 --- a/xml_converter/doc/fade/distance_fade_start.md +++ b/xml_converter/doc/fade/distance_fade_start.md @@ -4,7 +4,6 @@ type: Float32 applies_to: [Icon, Trail] xml_fields: [FadeNear, DistanceFadeStart] protobuf_field: distance_fade_start -compatability: [TacO, BlishHUD, Burrito] --- Any part of the object that is farther then this value will begin to alpha fade gradually until it reaches 0 alpha at Distance Fade End. diff --git a/xml_converter/doc/festival_filter/festival_filter.md b/xml_converter/doc/festival_filter/festival_filter.md index 16ec37c0..f6ef03b4 100644 --- a/xml_converter/doc/festival_filter/festival_filter.md +++ b/xml_converter/doc/festival_filter/festival_filter.md @@ -2,7 +2,6 @@ name: Festival Filter type: MultiflagValue applies_to: [Icon, Trail] -compatability: [TacO, BlishHUD, Burrito] xml_fields: [Festival] protobuf_field: festival_filter flags: diff --git a/xml_converter/doc/is_wall/is_wall.md b/xml_converter/doc/is_wall/is_wall.md index 79d1eeaa..d94d55d6 100644 --- a/xml_converter/doc/is_wall/is_wall.md +++ b/xml_converter/doc/is_wall/is_wall.md @@ -4,7 +4,6 @@ type: Boolean applies_to: [Trail] xml_fields: [IsWall] protobuf_field: is_wall -compatability: [BlishHUD] --- Rotate the trail 90 degrees so it is vertical instead of horizontal to represent a wall. diff --git a/xml_converter/doc/map_id/map_id.md b/xml_converter/doc/map_id/map_id.md index 5598e309..b7d6c259 100644 --- a/xml_converter/doc/map_id/map_id.md +++ b/xml_converter/doc/map_id/map_id.md @@ -4,7 +4,6 @@ type: Int32 applies_to: [Icon, Trail] xml_fields: [MapID] protobuf_field: map_id -compatability: [TacO, BlishHUD, Burrito] --- The ID of the map that this object should be displayed on. diff --git a/xml_converter/doc/map_id/map_type_filter.md b/xml_converter/doc/map_id/map_type_filter.md index 369af7eb..8c10c726 100644 --- a/xml_converter/doc/map_id/map_type_filter.md +++ b/xml_converter/doc/map_id/map_type_filter.md @@ -4,7 +4,6 @@ type: MultiflagValue applies_to: [Icon, Trail] xml_fields: [MapType] protobuf_field: map_type_filter -compatability: [TacO, BlishHUD, Burrito] flags: # Unknown map type unknown_map: ["Unknown"] diff --git a/xml_converter/doc/menu/default_visibility.md b/xml_converter/doc/menu/default_visibility.md index 0559489d..b598d83d 100644 --- a/xml_converter/doc/menu/default_visibility.md +++ b/xml_converter/doc/menu/default_visibility.md @@ -4,7 +4,6 @@ type: Boolean applies_to: [Category] xml_fields: [DefaultToggle] protobuf_field: default_visibility -compatability: [TacO, BlishHUD, Burrito] --- Notes diff --git a/xml_converter/doc/menu/display_name.md b/xml_converter/doc/menu/display_name.md index c66d97b5..6528b2cb 100644 --- a/xml_converter/doc/menu/display_name.md +++ b/xml_converter/doc/menu/display_name.md @@ -4,7 +4,6 @@ type: String applies_to: [Category] xml_fields: [DisplayName] protobuf_field: display_name -compatability: [TacO, BlishHUD, Burrito] --- A human readable name of this category. diff --git a/xml_converter/doc/menu/is_separator.md b/xml_converter/doc/menu/is_separator.md index 90caec29..58b4d424 100644 --- a/xml_converter/doc/menu/is_separator.md +++ b/xml_converter/doc/menu/is_separator.md @@ -4,7 +4,6 @@ type: Boolean applies_to: [Category] xml_fields: [IsSeparator] protobuf_field: is_separator -compatability: [TacO, BlishHUD, Burrito] --- Notes diff --git a/xml_converter/doc/menu/name.md b/xml_converter/doc/menu/name.md index 94425156..a6a514e6 100644 --- a/xml_converter/doc/menu/name.md +++ b/xml_converter/doc/menu/name.md @@ -4,7 +4,6 @@ type: String applies_to: [Category] xml_fields: [Name] protobuf_field: name -compatability: [TacO, BlishHUD, Burrito] --- Notes diff --git a/xml_converter/doc/mount_filter/mount_filter.md b/xml_converter/doc/mount_filter/mount_filter.md index 226c7c65..123cc0e6 100644 --- a/xml_converter/doc/mount_filter/mount_filter.md +++ b/xml_converter/doc/mount_filter/mount_filter.md @@ -2,7 +2,6 @@ name: Mount Filter type: MultiflagValue applies_to: [Icon, Trail] -compatability: [TacO, BlishHUD, Burrito] xml_fields: ["Mount"] protobuf_field: mount_filter flags: diff --git a/xml_converter/doc/position/height_offset.md b/xml_converter/doc/position/height_offset.md index cca2f424..aca77314 100644 --- a/xml_converter/doc/position/height_offset.md +++ b/xml_converter/doc/position/height_offset.md @@ -3,7 +3,6 @@ name: Height Offset type: Float32 applies_to: ["Icon"] xml_fields: ["HeightOffset", "BHHeightOffset"] -compatability: [TacO, Burrito, BlishHUD] protobuf_field: height_offset --- A vertical offset of the object from the recorded position. diff --git a/xml_converter/doc/position/position.md b/xml_converter/doc/position/position.md index 6ddc7514..4e083c4f 100644 --- a/xml_converter/doc/position/position.md +++ b/xml_converter/doc/position/position.md @@ -3,7 +3,6 @@ name: Position type: CompoundValue applies_to: ["Icon"] xml_fields: ["Position"] -compatability: [TacO, Burrito, BlishHUD] protobuf_field: position xml_bundled_components: [] xml_separate_components: ["X Position", "Y Position", "Z Position"] @@ -12,19 +11,16 @@ components: type: Float32 xml_fields: [XPos, PositionX] protobuf_field: "x" - compatability: [TacO, Burrito, BlishHUD] - name: Y Position type: Float32 xml_fields: [YPos, PositionY] protobuf_field: "y" - compatability: [TacO, Burrito, BlishHUD] - name: Z Position type: Float32 xml_fields: [ZPos, PositionZ] protobuf_field: "z" - compatability: [TacO, Burrito, BlishHUD] --- An XYZ location of a point in the game world. diff --git a/xml_converter/doc/profession_filter/profession_filter.md b/xml_converter/doc/profession_filter/profession_filter.md index 999c71eb..f073cda2 100644 --- a/xml_converter/doc/profession_filter/profession_filter.md +++ b/xml_converter/doc/profession_filter/profession_filter.md @@ -2,7 +2,6 @@ name: Profession Filter type: MultiflagValue applies_to: [Icon, Trail] -compatability: [TacO, BlishHUD, Burrito] xml_fields: [Profession] protobuf_field: profession_filter flags: diff --git a/xml_converter/doc/rendering/cull_chirality.md b/xml_converter/doc/rendering/cull_chirality.md index 18545d04..c560f3a7 100644 --- a/xml_converter/doc/rendering/cull_chirality.md +++ b/xml_converter/doc/rendering/cull_chirality.md @@ -4,7 +4,6 @@ applies_to: [Icon, Trail] xml_fields: [Cull] protobuf_field: cull_chirality type: Enum -compatability: [TacO, BlishHUD, Burrito] values: none: ["None"] clockwise: ["Clockwise"] diff --git a/xml_converter/doc/rendering/map_display_size.md b/xml_converter/doc/rendering/map_display_size.md index e32543f4..5cd75677 100644 --- a/xml_converter/doc/rendering/map_display_size.md +++ b/xml_converter/doc/rendering/map_display_size.md @@ -4,7 +4,6 @@ type: Int32 applies_to: [Icon, Trail] xml_fields: [MapDisplaySize] protobuf_field: map_display_size -compatability: [TacO, BlishHUD, Burrito] --- The size, in pixels, that the marker should be shown on the minimap or fullscreen map. When applied to a Trail, affects the width of the trail shown on the minimap or fullscreen map. diff --git a/xml_converter/doc/rendering/render_ingame.md b/xml_converter/doc/rendering/render_ingame.md index 1ce760a5..b84edfb2 100644 --- a/xml_converter/doc/rendering/render_ingame.md +++ b/xml_converter/doc/rendering/render_ingame.md @@ -4,7 +4,6 @@ type: Boolean applies_to: [Icon, Trail] xml_fields: [IngameVisibility, BHIngameVisibility] protobuf_field: tentative__render_ingame -compatability: [TacO, BlishHUD, Burrito] --- diff --git a/xml_converter/doc/rendering/render_on_map.md b/xml_converter/doc/rendering/render_on_map.md index 397ed8a3..a5981c7b 100644 --- a/xml_converter/doc/rendering/render_on_map.md +++ b/xml_converter/doc/rendering/render_on_map.md @@ -4,7 +4,6 @@ type: Boolean applies_to: [Icon, Trail] xml_fields: [MapVisibility, BHMapVisibility] protobuf_field: tentative__render_on_map -compatability: [TacO, BlishHUD, Burrito] --- Allows or Prevents this object from being rendered on the world map. diff --git a/xml_converter/doc/rendering/render_on_minimap.md b/xml_converter/doc/rendering/render_on_minimap.md index 42eeb0eb..674c1ce4 100644 --- a/xml_converter/doc/rendering/render_on_minimap.md +++ b/xml_converter/doc/rendering/render_on_minimap.md @@ -4,7 +4,6 @@ type: Boolean applies_to: [Icon, Trail] xml_fields: [MinimapVisibility, BHMinimapVisibility] protobuf_field: tentative__render_on_minimap -compatability: [TacO, BlishHUD, Burrito] --- Allows or Prevents this object from being rendered on the minimap aka compass. diff --git a/xml_converter/doc/rendering/scale_on_map_with_zoom.md b/xml_converter/doc/rendering/scale_on_map_with_zoom.md index 7679a6a5..ff2d3c99 100644 --- a/xml_converter/doc/rendering/scale_on_map_with_zoom.md +++ b/xml_converter/doc/rendering/scale_on_map_with_zoom.md @@ -4,7 +4,6 @@ type: Boolean applies_to: [Icon] xml_fields: [ScaleOnMapWithZoom] protobuf_field: scale_on_map_with_zoom -compatability: [TacO, BlishHUD, Burrito] --- Scale the size of the object to be the same scale as the map. diff --git a/xml_converter/doc/rotation/euler_rotation.md b/xml_converter/doc/rotation/euler_rotation.md index e628fd67..6e65adb0 100644 --- a/xml_converter/doc/rotation/euler_rotation.md +++ b/xml_converter/doc/rotation/euler_rotation.md @@ -3,7 +3,6 @@ name: Euler Rotation type: CompoundValue applies_to: ["Icon"] xml_fields: ["Rotate"] -compatability: [TacO, Burrito, BlishHUD] protobuf_field: euler_rotation xml_bundled_components: ['X Rotation', 'Y Rotation', 'Z Rotation'] xml_separate_components: [] @@ -12,19 +11,16 @@ components: type: Float32 xml_fields: [RotateX] protobuf_field: "x" - compatability: [TacO, Burrito, BlishHUD] - name: Y Rotation type: Float32 xml_fields: [RotateY] protobuf_field: "y" - compatability: [TacO, Burrito, BlishHUD] - name: Z Rotation type: Float32 xml_fields: [RotateZ] protobuf_field: "z" - compatability: [TacO, Burrito, BlishHUD] --- Euler X Y Z rotation. diff --git a/xml_converter/doc/scale/icon_size.md b/xml_converter/doc/scale/icon_size.md index a84a7c3c..7c79b609 100644 --- a/xml_converter/doc/scale/icon_size.md +++ b/xml_converter/doc/scale/icon_size.md @@ -4,7 +4,6 @@ type: Float32 applies_to: [Icon] xml_fields: [IconSize] protobuf_field: tentative__scale -compatability: [TacO, BlishHUD, Burrito] --- Unclear) Some value representation of how large an icon should be. Is this a scale multiplier or a fixed size value? How does this relate to MinSize and MaxSize. diff --git a/xml_converter/doc/scale/trail_scale.md b/xml_converter/doc/scale/trail_scale.md index 6cb6c106..1a9a207e 100644 --- a/xml_converter/doc/scale/trail_scale.md +++ b/xml_converter/doc/scale/trail_scale.md @@ -4,7 +4,6 @@ type: Float32 applies_to: [Trail] xml_fields: [TrailScale] protobuf_field: scale -compatability: [TacO, BlishHUD, Burrito] --- Adjusts the width of a trail mesh as a multiplier to the default width. diff --git a/xml_converter/doc/schedule/schedule.md b/xml_converter/doc/schedule/schedule.md index 91f20e49..14d2f113 100644 --- a/xml_converter/doc/schedule/schedule.md +++ b/xml_converter/doc/schedule/schedule.md @@ -4,7 +4,6 @@ type: String applies_to: [Icon, Trail] xml_fields: [Schedule] protobuf_field: bhdraft__schedule -compatability: [BlishHUD] --- A description of when to hide or show an object based on a realtime schedule. diff --git a/xml_converter/doc/schedule/schedule_duration.md b/xml_converter/doc/schedule/schedule_duration.md index cd573129..c69b1ef5 100644 --- a/xml_converter/doc/schedule/schedule_duration.md +++ b/xml_converter/doc/schedule/schedule_duration.md @@ -4,7 +4,6 @@ type: Float32 applies_to: [Icon, Trail] xml_fields: [ScheduleDuration] protobuf_field: bhdraft__schedule_duration -compatability: [BlishHUD] --- Combined with Schedule to determine how long after the object is shown before it is hidden again. diff --git a/xml_converter/doc/size_on_screen/maximum_size_on_screen.md b/xml_converter/doc/size_on_screen/maximum_size_on_screen.md index 346f48fc..9f483c3e 100644 --- a/xml_converter/doc/size_on_screen/maximum_size_on_screen.md +++ b/xml_converter/doc/size_on_screen/maximum_size_on_screen.md @@ -4,7 +4,6 @@ type: Int32 applies_to: [Icon] xml_fields: [MaxSize] protobuf_field: maximum_size_on_screen -compatability: [TacO, BlishHUD, Burrito] --- The largest width/height of this icon on the screen. Notes diff --git a/xml_converter/doc/size_on_screen/minimum_size_on_screen.md b/xml_converter/doc/size_on_screen/minimum_size_on_screen.md index cf6554c9..3a41674c 100644 --- a/xml_converter/doc/size_on_screen/minimum_size_on_screen.md +++ b/xml_converter/doc/size_on_screen/minimum_size_on_screen.md @@ -4,7 +4,6 @@ type: Int32 applies_to: [Icon] xml_fields: [MinSize] protobuf_field: minimum_size_on_screen -compatability: [TacO, BlishHUD, Burrito] --- The smallest width/height of this icon on the screen. diff --git a/xml_converter/doc/specialization_filter/specialization_filter.md b/xml_converter/doc/specialization_filter/specialization_filter.md index a8d79dd6..3a7a59a6 100644 --- a/xml_converter/doc/specialization_filter/specialization_filter.md +++ b/xml_converter/doc/specialization_filter/specialization_filter.md @@ -2,7 +2,6 @@ name: Specialization Filter type: MultiflagValue applies_to: [Icon, Trail] -compatability: [TacO, BlishHUD, Burrito] xml_fields: ["Specialization"] protobuf_field: specialization_filter flags: diff --git a/xml_converter/doc/species_filter/species_filter.md b/xml_converter/doc/species_filter/species_filter.md index f4e07898..1881e7e1 100644 --- a/xml_converter/doc/species_filter/species_filter.md +++ b/xml_converter/doc/species_filter/species_filter.md @@ -2,7 +2,6 @@ name: Species Filter type: MultiflagValue applies_to: [Icon, Trail] -compatability: [TacO, BlishHUD, Burrito] xml_fields: [Race, Species] protobuf_field: species_filter diff --git a/xml_converter/doc/texture/animation_speed.md b/xml_converter/doc/texture/animation_speed.md index 01b0e217..36e7a055 100644 --- a/xml_converter/doc/texture/animation_speed.md +++ b/xml_converter/doc/texture/animation_speed.md @@ -4,7 +4,6 @@ type: Float32 applies_to: [Trail] xml_fields: ["AnimSpeed", "AnimationSpeed"] protobuf_field: animation_speed -compatability: [TacO, BlishHUD, Burrito] --- The speed which the texture should be moving across the object. diff --git a/xml_converter/doc/texture/color.md b/xml_converter/doc/texture/color.md index eff7724e..73ecfe6b 100644 --- a/xml_converter/doc/texture/color.md +++ b/xml_converter/doc/texture/color.md @@ -5,7 +5,6 @@ class: Color applies_to: [Icon, Trail] xml_fields: [Color, BHColor] protobuf_field: rgba_color -compatability: [TacO, BlishHUD, Burrito] xml_bundled_components: ['Red', 'Green', 'Blue'] xml_separate_components: ['Alpha'] components: @@ -13,25 +12,21 @@ components: type: Float32 xml_fields: [Red] protobuf_field: rgba_color - compatability: [TacO, Burrito, BlishHUD] - name: Green type: Float32 xml_fields: [Green] protobuf_field: rgba_color - compatability: [TacO, Burrito, BlishHUD] - name: Blue type: Float32 xml_fields: [Blue] protobuf_field: rgba_color - compatability: [TacO, Burrito, BlishHUD] - name: Alpha type: Float32 xml_fields: [Alpha] protobuf_field: rgba_color - compatability: [TacO, Burrito, BlishHUD] --- diff --git a/xml_converter/doc/texture/icon.md b/xml_converter/doc/texture/icon.md index 9ab130f0..10666a3a 100644 --- a/xml_converter/doc/texture/icon.md +++ b/xml_converter/doc/texture/icon.md @@ -6,7 +6,6 @@ applies_to: [Icon] xml_fields: [IconFile] uses_file_path: false protobuf_field: texture_path -compatability: [TacO, BlishHUD, Burrito] --- The path to an image which contains the texture that will be present on an icon. diff --git a/xml_converter/doc/texture/texture.md b/xml_converter/doc/texture/texture.md index 85cc3e15..f96faf73 100644 --- a/xml_converter/doc/texture/texture.md +++ b/xml_converter/doc/texture/texture.md @@ -6,7 +6,6 @@ applies_to: [Trail] xml_fields: [Texture] uses_file_path: false protobuf_field: texture_path -compatability: [TacO, BlishHUD, Burrito] --- The path to an image which contains the texture that will be present on a trail. diff --git a/xml_converter/doc/tooltip/tooltip_description.md b/xml_converter/doc/tooltip/tooltip_description.md index 5c315f68..a783c21e 100644 --- a/xml_converter/doc/tooltip/tooltip_description.md +++ b/xml_converter/doc/tooltip/tooltip_description.md @@ -4,7 +4,6 @@ type: String applies_to: [Icon, Category] xml_fields: [TipDescription] protobuf_field: tip_description -compatability: [TacO, BlishHUD, Burrito] --- The full text of the tooltip. diff --git a/xml_converter/doc/tooltip/tooltip_name.md b/xml_converter/doc/tooltip/tooltip_name.md index 0c9df800..769b4321 100644 --- a/xml_converter/doc/tooltip/tooltip_name.md +++ b/xml_converter/doc/tooltip/tooltip_name.md @@ -4,7 +4,6 @@ type: String applies_to: [Icon] xml_fields: [TipName] protobuf_field: tip_name -compatability: [TacO, BlishHUD, Burrito] --- The name of the tooltip when hovering over the minimap. diff --git a/xml_converter/doc/trail_data/trail_data.md b/xml_converter/doc/trail_data/trail_data.md index 3438954a..4f31a526 100644 --- a/xml_converter/doc/trail_data/trail_data.md +++ b/xml_converter/doc/trail_data/trail_data.md @@ -7,7 +7,6 @@ uses_file_path: true protobuf_field: trail_data side_effects: [Map ID] applies_to: [Trail] -compatability: [TacO, BlishHUD, Burrito] --- A binary coordinate array for the path of a trail. diff --git a/xml_converter/doc/trigger/auto_trigger.md b/xml_converter/doc/trigger/auto_trigger.md index 0bf34c53..1252c299 100644 --- a/xml_converter/doc/trigger/auto_trigger.md +++ b/xml_converter/doc/trigger/auto_trigger.md @@ -4,7 +4,6 @@ type: Boolean applies_to: [Icon] xml_fields: [AutoTrigger] protobuf_field: trigger.auto_trigger -compatability: [TacO, BlishHUD, Burrito] --- Any triggers will be triggered automatially when the player enters within range instead of being triggered. diff --git a/xml_converter/doc/trigger/bounce_delay.md b/xml_converter/doc/trigger/bounce_delay.md index 17ca4e55..57b19b25 100644 --- a/xml_converter/doc/trigger/bounce_delay.md +++ b/xml_converter/doc/trigger/bounce_delay.md @@ -4,7 +4,6 @@ type: Float32 applies_to: [Icon] xml_fields: [BounceDelay] protobuf_field: trigger.bounce_delay -compatability: [TacO, BlishHUD, Burrito] --- How many seconds should pass before the bouncing begins. diff --git a/xml_converter/doc/trigger/bounce_duration.md b/xml_converter/doc/trigger/bounce_duration.md index 5d0fc77c..268d2c1f 100644 --- a/xml_converter/doc/trigger/bounce_duration.md +++ b/xml_converter/doc/trigger/bounce_duration.md @@ -4,7 +4,6 @@ type: Float32 applies_to: [Icon] xml_fields: [BounceDuration] protobuf_field: trigger.bounce_duration -compatability: [TacO, BlishHUD, Burrito] --- How long should the icon bounce for when triggered. diff --git a/xml_converter/doc/trigger/bounce_height.md b/xml_converter/doc/trigger/bounce_height.md index b8680437..9b41124e 100644 --- a/xml_converter/doc/trigger/bounce_height.md +++ b/xml_converter/doc/trigger/bounce_height.md @@ -4,7 +4,6 @@ type: Float32 applies_to: [Icon] xml_fields: [BounceHeight] protobuf_field: trigger.bounce_height -compatability: [TacO, BlishHUD, Burrito] --- How high should the icon bounce when triggered. diff --git a/xml_converter/doc/trigger/copy_clipboard.md b/xml_converter/doc/trigger/copy_clipboard.md index 2b6bb748..b9072163 100644 --- a/xml_converter/doc/trigger/copy_clipboard.md +++ b/xml_converter/doc/trigger/copy_clipboard.md @@ -4,7 +4,6 @@ type: String applies_to: [Icon] xml_fields: [Copy, CopyClipboard] protobuf_field: trigger.action_copy_clipboard -compatability: [TacO, BlishHUD, Burrito] --- A value that is copied to the clipboard when triggered. diff --git a/xml_converter/doc/trigger/copy_message.md b/xml_converter/doc/trigger/copy_message.md index 616a66f0..c419a6b5 100644 --- a/xml_converter/doc/trigger/copy_message.md +++ b/xml_converter/doc/trigger/copy_message.md @@ -4,7 +4,6 @@ type: String applies_to: [Icon] xml_fields: [CopyMessage] protobuf_field: trigger.action_copy_message -compatability: [TacO, BlishHUD, Burrito] --- A message that is displayed to the user when an item is copied to the clipboard. diff --git a/xml_converter/doc/trigger/guid.md b/xml_converter/doc/trigger/guid.md index 9e2451da..ad4a8094 100644 --- a/xml_converter/doc/trigger/guid.md +++ b/xml_converter/doc/trigger/guid.md @@ -5,7 +5,6 @@ class: UniqueId xml_fields: ["GUID"] applies_to: ["Icon", "Trail"] protobuf_field: guid -compatability: [TacO, BlishHUD, Burrito] --- A globally unique identifier value to make sure this maker's trigger reset data is always assocaited with this marker and never lost or confused with other markers. diff --git a/xml_converter/doc/trigger/has_countdown.md b/xml_converter/doc/trigger/has_countdown.md index 74c88606..43302f65 100644 --- a/xml_converter/doc/trigger/has_countdown.md +++ b/xml_converter/doc/trigger/has_countdown.md @@ -4,7 +4,6 @@ type: Boolean xml_fields: ["HasCountdown"] applies_to: ["Icon"] protobuf_field: trigger.has_countdown -compatability: ["TacO"] --- ? diff --git a/xml_converter/doc/trigger/hide_category.md b/xml_converter/doc/trigger/hide_category.md index 1df6652b..c7bc53a5 100644 --- a/xml_converter/doc/trigger/hide_category.md +++ b/xml_converter/doc/trigger/hide_category.md @@ -5,7 +5,6 @@ class: MarkerCategory applies_to: [Icon] xml_fields: [Hide] protobuf_field: trigger.action_hide_category -compatability: [TacO, BlishHUD, Burrito] --- Hide the specified category when triggered. diff --git a/xml_converter/doc/trigger/info_message.md b/xml_converter/doc/trigger/info_message.md index 7a21ff9a..907b48a3 100644 --- a/xml_converter/doc/trigger/info_message.md +++ b/xml_converter/doc/trigger/info_message.md @@ -4,7 +4,6 @@ type: String applies_to: [Icon] xml_fields: [Info] protobuf_field: trigger.action_info_message -compatability: [TacO, BlishHUD, Burrito] --- Show a message to the user when triggered diff --git a/xml_converter/doc/trigger/invert_visibility.md b/xml_converter/doc/trigger/invert_visibility.md index 37ea3337..55d93918 100644 --- a/xml_converter/doc/trigger/invert_visibility.md +++ b/xml_converter/doc/trigger/invert_visibility.md @@ -4,7 +4,6 @@ type: Boolean applies_to: [Icon] xml_fields: [InvertBehavior] protobuf_field: trigger.invert_display -compatability: [TacO, BlishHUD, Burrito] --- Inverts the hide show behavior so that it is shown when it is supposed to be hidden and hidden when it is supposed to be shown. diff --git a/xml_converter/doc/trigger/reset_behavior.md b/xml_converter/doc/trigger/reset_behavior.md index 4b07cd66..92086a87 100644 --- a/xml_converter/doc/trigger/reset_behavior.md +++ b/xml_converter/doc/trigger/reset_behavior.md @@ -4,7 +4,6 @@ type: Enum applies_to: [Icon] xml_fields: [Behavior] protobuf_field: trigger.reset_behavior -compatability: [TacO, BlishHUD, Burrito] values: always_visible: ["0", "always_visible"] map_change: ["1", "map_change"] diff --git a/xml_converter/doc/trigger/reset_length.md b/xml_converter/doc/trigger/reset_length.md index 30bb9bb7..ddfb4c0f 100644 --- a/xml_converter/doc/trigger/reset_length.md +++ b/xml_converter/doc/trigger/reset_length.md @@ -4,7 +4,6 @@ type: Float32 applies_to: [Icon] xml_fields: [ResetLength] protobuf_field: trigger.reset_length -compatability: [TacO, BlishHUD, Burrito] --- When using behavior 4 (reappear after timer) this value defines, in seconds, the duration until the marker is reset after being activated. Notes diff --git a/xml_converter/doc/trigger/show_category.md b/xml_converter/doc/trigger/show_category.md index 3bb542fb..e710344c 100644 --- a/xml_converter/doc/trigger/show_category.md +++ b/xml_converter/doc/trigger/show_category.md @@ -5,7 +5,6 @@ class: MarkerCategory applies_to: [Icon] xml_fields: [Show] protobuf_field: trigger.action_show_category -compatability: [TacO, BlishHUD, Burrito] --- Show the specified category when triggered. diff --git a/xml_converter/doc/trigger/toggle_category.md b/xml_converter/doc/trigger/toggle_category.md index eb4b01bb..16161ba8 100644 --- a/xml_converter/doc/trigger/toggle_category.md +++ b/xml_converter/doc/trigger/toggle_category.md @@ -5,7 +5,6 @@ class: MarkerCategory applies_to: [Icon] xml_fields: [Toggle, ToggleCategory] protobuf_field: trigger.action_toggle_category -compatability: [TacO, BlishHUD, Burrito] --- Show if hidden or Hide if shown the specified category when triggered. diff --git a/xml_converter/doc/trigger/trigger_range.md b/xml_converter/doc/trigger/trigger_range.md index f8ddf6a8..621585d8 100644 --- a/xml_converter/doc/trigger/trigger_range.md +++ b/xml_converter/doc/trigger/trigger_range.md @@ -4,7 +4,6 @@ type: Float32 applies_to: [Icon] xml_fields: [TriggerRange, InfoRange] protobuf_field: trigger.range -compatability: [TacO, BlishHUD, Burrito] --- Used to indicate a trigger range. This attribute is used by multiple other attributes to define a distance from the marker in which those attributes will activate their functionality or behavior. diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index b34c6051..a591815a 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -17,8 +17,6 @@ "type": string_t(), "name": string_t(), "applies_to": array_t(enum_t(["Icon", "Trail", "Category"])), - # To Be Depricated - "compatability": array_t(enum_t(["BlishHUD", "Burrito", "TacO"])), "xml_fields": array_t(string_t(pattern="^[A-Za-z]+$")), "protobuf_field": string_t(pattern="^[a-z_.]+$"), } @@ -48,8 +46,6 @@ "type": enum_t(["Int32", "Fixed32", "Float32"]), "xml_fields": array_t(string_t("^[A-Za-z]+$")), "protobuf_field": string_t("^[a-z_.]+$"), - # To Be Depricated - "compatability": array_t(enum_t(["BlishHUD", "Burrito", "TacO"])) })), }} ), @@ -63,8 +59,6 @@ "type": enum_t(["Int32", "Fixed32", "Float32"]), "xml_fields": array_t(string_t("^[A-Za-z]+$")), "protobuf_field": string_t("^[a-z_.]+$"), - # To Be Depricated - "compatability": array_t(enum_t(["BlishHUD", "Burrito", "TacO"])) })), }} ), @@ -99,7 +93,6 @@ class FieldRow: alternate_xml_attributes: List[str] binary_field: str data_type: str - supported_by_html: str usable_on_html: str example: str valid_values_html: str @@ -208,7 +201,7 @@ class Generator: def delete_generated_docs(self, dir_path: str) -> None: for filepath in os.listdir(dir_path): filepath = os.path.join(dir_path, filepath) - if filepath.endswith("_gen.hpp") or filepath.endswith("_gen.cpp") or filepath.endswith("_gen.html"): + if filepath.endswith("_gen.hpp") or filepath.endswith("_gen.cpp") or filepath.endswith(".html"): os.remove(filepath) def load_input_doc(self, dir_path: str) -> None: @@ -589,7 +582,7 @@ def write_webdocs(self, output_directory: str) -> None: for field_row in field_rows: complete_field_row_list.append(field_row) - with open(os.path.join(output_directory, page + "_gen.html"), 'w') as f: + with open(os.path.join(output_directory, page + ".html"), 'w') as f: f.write(template.render( generated_doc=generated_doc, @@ -716,7 +709,6 @@ def generate_auto_docs(self, metadata: Dict[str, SchemaType], content: Dict[str, alternate_xml_attributes=fieldval["xml_fields"][1:], binary_field=fieldval["protobuf_field"], data_type=fieldval["type"], - supported_by_html="
".join(fieldval["compatability"]), usable_on_html="
".join(fieldval["applies_to"]), example=example, valid_values_html=valid_values, @@ -733,7 +725,6 @@ def generate_auto_docs(self, metadata: Dict[str, SchemaType], content: Dict[str, alternate_xml_attributes=component_field["xml_fields"][1:], binary_field=fieldval["protobuf_field"] + "." + component_field["protobuf_field"], data_type=component_field["type"], - supported_by_html="
".join(component_field["compatability"]), usable_on_html="
".join(fieldval["applies_to"]), example=self.build_example( type=component_field["type"], diff --git a/xml_converter/generators/web_templates/infotable.html b/xml_converter/generators/web_templates/infotable.html index 06a7ebe2..6bc9e25d 100644 --- a/xml_converter/generators/web_templates/infotable.html +++ b/xml_converter/generators/web_templates/infotable.html @@ -4,7 +4,6 @@ XML Attribute Binary Field Name Data Type - Supported By Usable On {% for field_row in field_rows %} @@ -13,7 +12,6 @@ {{field_row.xml_attribute}}{% for alternate in field_row.alternate_xml_attributes %}, {{alternate}}{% endfor %} {{field_row.binary_field}} {{field_row.data_type}} - {{field_row.supported_by_html}} {{field_row.usable_on_html}} {% endfor %} @@ -31,7 +29,6 @@

{{field_row.name}}

XML Attribute Binary Field Name Data Type - Supported By Usable On @@ -39,7 +36,6 @@

{{field_row.name}}

{{field_row.xml_attribute}}{% for alternate in field_row.alternate_xml_attributes %}, {{alternate}}{% endfor %} {{field_row.binary_field}} {{field_row.data_type}} - {{field_row.supported_by_html}} {{field_row.usable_on_html}} From 99df68a86fa807f071257f7b42a579d9882619ef Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sat, 30 Sep 2023 04:16:28 -0500 Subject: [PATCH 241/539] pulling out the schema regexes into varibles --- xml_converter/generators/code_generator.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index a591815a..c51eeeff 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -12,13 +12,16 @@ SchemaType = Dict[str, Any] +XML_ATTRIBUTE_REGEX: Final[str] = "^[A-Za-z]+$" +PROTO_FIELD_REGEX: Final[str] = "^[a-z_.]+$" +INTERNAL_VARIABLE_REGEX: Final[str] = "^[a-z_]+$" shared_field_properties: Dict[str, DefType] = { "type": string_t(), "name": string_t(), "applies_to": array_t(enum_t(["Icon", "Trail", "Category"])), - "xml_fields": array_t(string_t(pattern="^[A-Za-z]+$")), - "protobuf_field": string_t(pattern="^[a-z_.]+$"), + "xml_fields": array_t(string_t(pattern=XML_ATTRIBUTE_REGEX)), + "protobuf_field": string_t(pattern=PROTO_FIELD_REGEX), } schema = union_t({ @@ -29,12 +32,12 @@ "Boolean": union_partial_t(required=shared_field_properties), "MultiflagValue": union_partial_t( required={**shared_field_properties, **{ - "flags": pattern_dictionary_t({"^[a-z_]+$": array_t(string_t())}), + "flags": pattern_dictionary_t({INTERNAL_VARIABLE_REGEX: array_t(string_t())}), }}, ), "Enum": union_partial_t( required={**shared_field_properties, **{ - "values": pattern_dictionary_t({"^[a-z_]+$": array_t(string_t())}) + "values": pattern_dictionary_t({INTERNAL_VARIABLE_REGEX: array_t(string_t())}) }} ), "CompoundValue": union_partial_t( @@ -44,8 +47,8 @@ "components": array_t(object_t({ "name": string_t(), "type": enum_t(["Int32", "Fixed32", "Float32"]), - "xml_fields": array_t(string_t("^[A-Za-z]+$")), - "protobuf_field": string_t("^[a-z_.]+$"), + "xml_fields": array_t(string_t(XML_ATTRIBUTE_REGEX)), + "protobuf_field": string_t(PROTO_FIELD_REGEX), })), }} ), @@ -57,8 +60,8 @@ "components": array_t(object_t({ "name": string_t(), "type": enum_t(["Int32", "Fixed32", "Float32"]), - "xml_fields": array_t(string_t("^[A-Za-z]+$")), - "protobuf_field": string_t("^[a-z_.]+$"), + "xml_fields": array_t(string_t(XML_ATTRIBUTE_REGEX)), + "protobuf_field": string_t(PROTO_FIELD_REGEX), })), }} ), From 0272d78a36379462e99427a54bf27cb06c45bcc5 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sat, 30 Sep 2023 12:40:31 -0500 Subject: [PATCH 242/539] Removing doc_type_to_cpp_type variable as it was duplicated --- xml_converter/generators/code_generator.py | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index c51eeeff..1f80f421 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -104,16 +104,6 @@ class FieldRow: description: str -# TODO: Eventually replace all references to `doc_type_to_cpp_type` with -# references to `documentation_type_data` because they contain the same data -doc_type_to_cpp_type: Dict[str, str] = { - "Fixed32": "int", - "Int32": "int", - "Boolean": "bool", - "Float32": "float", - "String": "std::string", -} - documentation_type_data = { "Fixed32": { "class_name": "int", @@ -391,7 +381,7 @@ def generate_cpp_variable_data( component_attribute_variable = AttributeVariable( attribute_name=attribute_name + "." + component_name, attribute_type="CompoundValue", - cpp_type=doc_type_to_cpp_type[component['type']], + cpp_type=documentation_type_data[component['type']]["cpp_type"], class_name=component_class_name, xml_fields=component_xml_fields, default_xml_field=component_default_xml_field, @@ -490,7 +480,7 @@ def write_attribute(self, output_directory: str) -> None: elif metadata[filepath]['type'] == "CompoundValue": for component in metadata[filepath]['components']: xml_fields = [] - if component['type'] not in doc_type_to_cpp_type: + if component['type'] not in documentation_type_data: raise ValueError("Unexpected type for component. Look at markdown file {attribute_name}".format( attribute_name=attribute_name )) @@ -502,7 +492,7 @@ def write_attribute(self, output_directory: str) -> None: attribute_variable = AttributeVariable( attribute_name=component_attribute_name, attribute_type=metadata[filepath]['type'], - cpp_type=doc_type_to_cpp_type[component['type']], + cpp_type=documentation_type_data[component['type']]["cpp_type"], class_name=attribute_name, xml_fields=xml_fields, protobuf_field=component["protobuf_field"], From bbd1c60a7dfa222a69a5db19dfa24cbf7e72501d Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sat, 30 Sep 2023 12:55:09 -0500 Subject: [PATCH 243/539] adding a type to the documentation_type_data --- xml_converter/generators/code_generator.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 1f80f421..f5edbf98 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -1,7 +1,7 @@ from jsonschema import validate # type:ignore from jsonschema.exceptions import ValidationError # type:ignore import frontmatter # type:ignore -from typing import Any, Dict, List, Tuple, Set, Optional, Final +from typing import Any, Dict, List, Tuple, Set, Optional, Final, TypedDict import os import markdown from dataclasses import dataclass, field @@ -104,7 +104,20 @@ class FieldRow: description: str -documentation_type_data = { +################################################################################ +# DocumentationTypeData +# +# A type definition to indicate what information should be included in the +# documentation_type_data variable. +################################################################################ +class DocumentationTypeData(TypedDict): + class_name: str + cpp_type: str + + +# A map between the documentation types, and useful class name info related to +# that type. +documentation_type_data: Dict[str, DocumentationTypeData] = { "Fixed32": { "class_name": "int", "cpp_type": "int", From 031d6a446d1334d2ac4e22be1d1cf0db4bcfd51c Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sat, 30 Sep 2023 13:47:40 -0500 Subject: [PATCH 244/539] Creating Simpler Nested Proto Parse Templates The previous logic had duplicated code chunks. The new logic is much more flexible and unifies the template branches to remove duplicate chunks. --- xml_converter/generators/code_generator.py | 29 +++++--- .../cpp_templates/class_template.cpp | 69 ++++++------------- xml_converter/src/icon_gen.cpp | 61 ++++++++-------- 3 files changed, 69 insertions(+), 90 deletions(-) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index f5edbf98..23eff229 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -155,7 +155,10 @@ class AttributeVariable: xml_bundled_components: List[str] = field(default_factory=list) attribute_flag_name: Optional[str] = "" write_to_xml: bool = True - is_trigger: bool = False + + # The CPP code to inject into the variable getter to drill down to the + # variable we are looking for. eg ".trigger()" or ".one().two()" + proto_drilldown_calls: str = "" uses_file_path: bool = False is_component: bool = False @@ -331,7 +334,7 @@ def generate_cpp_variable_data( side_effects: List[str] = [] write_to_xml: bool = True protobuf_field: str = "" - is_trigger: bool = False + proto_drilldown_calls: str = "" default_xml_field: str = "" args: List[str] = XML_ATTRIBUTE_PARSER_DEFAULT_ARGUMENTS.copy() @@ -362,11 +365,13 @@ def generate_cpp_variable_data( xml_fields.append(lowercase(x, delimiter="")) default_xml_field = fieldval['xml_fields'][0] + # TODO: this should handle more then just `trigger.` variants if fieldval["protobuf_field"].startswith("trigger"): - is_trigger = True + proto_drilldown_calls = ".trigger()" + # TODO this would not properly catch trigger.something.ourvariable protobuf_field = fieldval["protobuf_field"].split('.')[1] else: - is_trigger = False + proto_drilldown_calls = "" protobuf_field = fieldval["protobuf_field"] if fieldval.get("uses_file_path", False): @@ -417,7 +422,7 @@ def generate_cpp_variable_data( xml_fields=xml_fields, default_xml_field=default_xml_field, protobuf_field=protobuf_field, - is_trigger=is_trigger, + proto_drilldown_calls=proto_drilldown_calls, args=args, write_to_xml=write_to_xml, attribute_flag_name=attribute_name + "_is_set", @@ -449,7 +454,7 @@ def write_attribute(self, output_directory: str) -> None: attribute_variable: AttributeVariable metadata: Dict[str, SchemaType] = {} xml_fields: List[str] = [] - is_trigger: bool = False + proto_drilldown_calls: str = "" template: Dict[str, Template] = { "MultiflagValue": env.get_template("multiflagvalue.cpp"), "CompoundValue": env.get_template("compoundvalue.cpp"), @@ -466,11 +471,13 @@ def write_attribute(self, output_directory: str) -> None: metadata[filepath] = self.data[filepath].metadata attribute_name = attribute_name_from_markdown_data(metadata[filepath]['name']) + # TODO this should handle more then just `trigger.` variants if metadata[filepath]["protobuf_field"].startswith("trigger"): - is_trigger = True + proto_drilldown_calls = ".trigger()" + # TODO this would not properly catch trigger.something.ourvariable protobuf_field = metadata[filepath]["protobuf_field"].split('.')[1] else: - is_trigger = False + proto_drilldown_calls = "" protobuf_field = metadata[filepath]["protobuf_field"] if metadata[filepath]['type'] == "MultiflagValue": @@ -486,7 +493,7 @@ def write_attribute(self, output_directory: str) -> None: class_name=attribute_name, xml_fields=xml_fields, protobuf_field=protobuf_field, - is_trigger=is_trigger, + proto_drilldown_calls=proto_drilldown_calls, ) attribute_variables.append(attribute_variable) @@ -509,7 +516,7 @@ def write_attribute(self, output_directory: str) -> None: class_name=attribute_name, xml_fields=xml_fields, protobuf_field=component["protobuf_field"], - is_trigger=is_trigger, + proto_drilldown_calls=proto_drilldown_calls, ) attribute_variables.append(attribute_variable) @@ -525,7 +532,7 @@ def write_attribute(self, output_directory: str) -> None: class_name=attribute_name, xml_fields=xml_fields, protobuf_field=protobuf_field, - is_trigger=is_trigger, + proto_drilldown_calls=proto_drilldown_calls, ) attribute_variables.append(attribute_variable) diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index 867f1d54..752a0f9a 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -100,7 +100,7 @@ waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf() const { {% endif %} {% for attribute_variable in attribute_variables %} {% if attribute_variable.is_component == false %} - {% if (attribute_variable.is_trigger == true)%} + {% if (attribute_variable.proto_drilldown_calls != "")%}{# TODO: This is a hack to preserve functionality when removing is_trigger #} {% if (attribute_variable.attribute_type == "Custom")%} if (this->{{attribute_variable.attribute_flag_name}}) { if (trigger == nullptr) { @@ -149,55 +149,28 @@ waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf() const { } void {{cpp_class}}::parse_protobuf(waypoint::{{cpp_class}} proto_{{cpp_class_header}}) { - {% if cpp_class == "Icon": %} - waypoint::Trigger trigger = proto_{{cpp_class_header}}.trigger(); - {% endif %} {% for attribute_variable in attribute_variables %} {% if attribute_variable.is_component == false %} - {% if (attribute_variable.is_trigger == true) %} - {% if (attribute_variable.attribute_type == "Custom") %} - if (trigger.has_{{attribute_variable.protobuf_field}}()) { - this->{{attribute_variable.attribute_name}} = from_proto_{{attribute_variable.class_name}}(trigger.{{attribute_variable.protobuf_field}}()); - this->{{attribute_variable.attribute_flag_name}} = true; - } - {% elif attribute_variable.class_name == "string" %} - if (trigger.{{attribute_variable.protobuf_field}}() != "") { - this->{{attribute_variable.attribute_name}} = trigger.{{attribute_variable.protobuf_field}}(); - this->{{attribute_variable.attribute_flag_name}} = true; - } - {% elif (attribute_variable.attribute_type == "Enum") %} - if (trigger.{{attribute_variable.protobuf_field}}() != 0) { - this->{{attribute_variable.attribute_name}} = from_proto_{{attribute_variable.class_name}}(trigger.{{attribute_variable.protobuf_field}}()); - this->{{attribute_variable.attribute_flag_name}} = true; - } - {% else: %} - if (trigger.{{attribute_variable.protobuf_field}}() != 0) { - this->{{attribute_variable.attribute_name}} = trigger.{{attribute_variable.protobuf_field}}(); - this->{{attribute_variable.attribute_flag_name}} = true; - } - {% endif %} - {% else: %} - {% if (attribute_variable.attribute_type == "Enum") %} - if (proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}() != 0) { - this->{{attribute_variable.attribute_name}} = from_proto_{{attribute_variable.class_name}}(proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}()); - this->{{attribute_variable.attribute_flag_name}} = true; - } - {% elif (attribute_variable.attribute_type in ["MultiflagValue", "CompoundValue", "Custom", "CompoundCustomClass"])%} - if (proto_{{cpp_class_header}}.has_{{attribute_variable.protobuf_field}}()) { - this->{{attribute_variable.attribute_name}} = from_proto_{{attribute_variable.class_name}}(proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}()); - this->{{attribute_variable.attribute_flag_name}} = true; - } - {% elif (attribute_variable.class_name == "string") %} - if (proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}() != "") { - this->{{attribute_variable.attribute_name}} = proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}(); - this->{{attribute_variable.attribute_flag_name}} = true; - } - {% else: %} - if (proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}() != 0) { - this->{{attribute_variable.attribute_name}} = proto_{{cpp_class_header}}.{{attribute_variable.protobuf_field}}(); - this->{{attribute_variable.attribute_flag_name}} = true; - } - {% endif %} + {% if (attribute_variable.attribute_type in ["MultiflagValue", "CompoundValue", "Custom", "CompoundCustomClass"]) %} + if (proto_{{cpp_class_header}}{{attribute_variable.proto_drilldown_calls}}.has_{{attribute_variable.protobuf_field}}()) { + this->{{attribute_variable.attribute_name}} = from_proto_{{attribute_variable.class_name}}(proto_{{cpp_class_header}}{{attribute_variable.proto_drilldown_calls}}.{{attribute_variable.protobuf_field}}()); + this->{{attribute_variable.attribute_flag_name}} = true; + } + {% elif (attribute_variable.class_name == "string") %}{# TODO: why is this .class_name when the others are .attribute_name #} + if (proto_{{cpp_class_header}}{{attribute_variable.proto_drilldown_calls}}.{{attribute_variable.protobuf_field}}() != "") { + this->{{attribute_variable.attribute_name}} = proto_{{cpp_class_header}}{{attribute_variable.proto_drilldown_calls}}.{{attribute_variable.protobuf_field}}(); + this->{{attribute_variable.attribute_flag_name}} = true; + } + {% elif (attribute_variable.attribute_type == "Enum") %} + if (proto_{{cpp_class_header}}{{attribute_variable.proto_drilldown_calls}}.{{attribute_variable.protobuf_field}}() != 0) { + this->{{attribute_variable.attribute_name}} = from_proto_{{attribute_variable.class_name}}(proto_{{cpp_class_header}}{{attribute_variable.proto_drilldown_calls}}.{{attribute_variable.protobuf_field}}()); + this->{{attribute_variable.attribute_flag_name}} = true; + } + {% else %} + if (proto_{{cpp_class_header}}{{attribute_variable.proto_drilldown_calls}}.{{attribute_variable.protobuf_field}}() != 0) { + this->{{attribute_variable.attribute_name}} = proto_{{cpp_class_header}}{{attribute_variable.proto_drilldown_calls}}.{{attribute_variable.protobuf_field}}(); + this->{{attribute_variable.attribute_flag_name}} = true; + } {% endif %} {% endif %} {% endfor %} diff --git a/xml_converter/src/icon_gen.cpp b/xml_converter/src/icon_gen.cpp index 3fff2a59..2eed3865 100644 --- a/xml_converter/src/icon_gen.cpp +++ b/xml_converter/src/icon_gen.cpp @@ -674,7 +674,6 @@ waypoint::Icon Icon::as_protobuf() const { } void Icon::parse_protobuf(waypoint::Icon proto_icon) { - waypoint::Trigger trigger = proto_icon.trigger(); if (proto_icon.achievement_bit() != 0) { this->achievement_bitmask = proto_icon.achievement_bit(); this->achievement_bitmask_is_set = true; @@ -683,20 +682,20 @@ void Icon::parse_protobuf(waypoint::Icon proto_icon) { this->achievement_id = proto_icon.achievement_id(); this->achievement_id_is_set = true; } - if (trigger.auto_trigger() != 0) { - this->auto_trigger = trigger.auto_trigger(); + if (proto_icon.trigger().auto_trigger() != 0) { + this->auto_trigger = proto_icon.trigger().auto_trigger(); this->auto_trigger_is_set = true; } - if (trigger.bounce_delay() != 0) { - this->bounce_delay = trigger.bounce_delay(); + if (proto_icon.trigger().bounce_delay() != 0) { + this->bounce_delay = proto_icon.trigger().bounce_delay(); this->bounce_delay_is_set = true; } - if (trigger.bounce_duration() != 0) { - this->bounce_duration = trigger.bounce_duration(); + if (proto_icon.trigger().bounce_duration() != 0) { + this->bounce_duration = proto_icon.trigger().bounce_duration(); this->bounce_duration_is_set = true; } - if (trigger.bounce_height() != 0) { - this->bounce_height = trigger.bounce_height(); + if (proto_icon.trigger().bounce_height() != 0) { + this->bounce_height = proto_icon.trigger().bounce_height(); this->bounce_height_is_set = true; } if (proto_icon.can_fade() != 0) { @@ -711,12 +710,12 @@ void Icon::parse_protobuf(waypoint::Icon proto_icon) { this->color = from_proto_color(proto_icon.rgba_color()); this->color_is_set = true; } - if (trigger.action_copy_clipboard() != "") { - this->copy_clipboard = trigger.action_copy_clipboard(); + if (proto_icon.trigger().action_copy_clipboard() != "") { + this->copy_clipboard = proto_icon.trigger().action_copy_clipboard(); this->copy_clipboard_is_set = true; } - if (trigger.action_copy_message() != "") { - this->copy_message = trigger.action_copy_message(); + if (proto_icon.trigger().action_copy_message() != "") { + this->copy_message = proto_icon.trigger().action_copy_message(); this->copy_message_is_set = true; } if (proto_icon.cull_chirality() != 0) { @@ -743,16 +742,16 @@ void Icon::parse_protobuf(waypoint::Icon proto_icon) { this->guid = from_proto_unique_id(proto_icon.guid()); this->guid_is_set = true; } - if (trigger.has_countdown() != 0) { - this->has_countdown = trigger.has_countdown(); + if (proto_icon.trigger().has_countdown() != 0) { + this->has_countdown = proto_icon.trigger().has_countdown(); this->has_countdown_is_set = true; } if (proto_icon.height_offset() != 0) { this->height_offset = proto_icon.height_offset(); this->height_offset_is_set = true; } - if (trigger.has_action_hide_category()) { - this->hide_category = from_proto_marker_category(trigger.action_hide_category()); + if (proto_icon.trigger().has_action_hide_category()) { + this->hide_category = from_proto_marker_category(proto_icon.trigger().action_hide_category()); this->hide_category_is_set = true; } if (proto_icon.has_texture_path()) { @@ -763,12 +762,12 @@ void Icon::parse_protobuf(waypoint::Icon proto_icon) { this->icon_size = proto_icon.tentative__scale(); this->icon_size_is_set = true; } - if (trigger.action_info_message() != "") { - this->info_message = trigger.action_info_message(); + if (proto_icon.trigger().action_info_message() != "") { + this->info_message = proto_icon.trigger().action_info_message(); this->info_message_is_set = true; } - if (trigger.invert_display() != 0) { - this->invert_visibility = trigger.invert_display(); + if (proto_icon.trigger().invert_display() != 0) { + this->invert_visibility = proto_icon.trigger().invert_display(); this->invert_visibility_is_set = true; } if (proto_icon.map_display_size() != 0) { @@ -815,12 +814,12 @@ void Icon::parse_protobuf(waypoint::Icon proto_icon) { this->render_on_minimap = proto_icon.tentative__render_on_minimap(); this->render_on_minimap_is_set = true; } - if (trigger.reset_behavior() != 0) { - this->reset_behavior = from_proto_reset_behavior(trigger.reset_behavior()); + if (proto_icon.trigger().reset_behavior() != 0) { + this->reset_behavior = from_proto_reset_behavior(proto_icon.trigger().reset_behavior()); this->reset_behavior_is_set = true; } - if (trigger.reset_length() != 0) { - this->reset_length = trigger.reset_length(); + if (proto_icon.trigger().reset_length() != 0) { + this->reset_length = proto_icon.trigger().reset_length(); this->reset_length_is_set = true; } if (proto_icon.scale_on_map_with_zoom() != 0) { @@ -835,8 +834,8 @@ void Icon::parse_protobuf(waypoint::Icon proto_icon) { this->schedule_duration = proto_icon.bhdraft__schedule_duration(); this->schedule_duration_is_set = true; } - if (trigger.has_action_show_category()) { - this->show_category = from_proto_marker_category(trigger.action_show_category()); + if (proto_icon.trigger().has_action_show_category()) { + this->show_category = from_proto_marker_category(proto_icon.trigger().action_show_category()); this->show_category_is_set = true; } if (proto_icon.has_specialization_filter()) { @@ -847,8 +846,8 @@ void Icon::parse_protobuf(waypoint::Icon proto_icon) { this->species_filter = from_proto_species_filter(proto_icon.species_filter()); this->species_filter_is_set = true; } - if (trigger.has_action_toggle_category()) { - this->toggle_category = from_proto_marker_category(trigger.action_toggle_category()); + if (proto_icon.trigger().has_action_toggle_category()) { + this->toggle_category = from_proto_marker_category(proto_icon.trigger().action_toggle_category()); this->toggle_category_is_set = true; } if (proto_icon.tip_description() != "") { @@ -859,8 +858,8 @@ void Icon::parse_protobuf(waypoint::Icon proto_icon) { this->tooltip_name = proto_icon.tip_name(); this->tooltip_name_is_set = true; } - if (trigger.range() != 0) { - this->trigger_range = trigger.range(); + if (proto_icon.trigger().range() != 0) { + this->trigger_range = proto_icon.trigger().range(); this->trigger_range_is_set = true; } } From 2bfda562f4dfcc52552ca59378737c05d71d1a9b Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sat, 30 Sep 2023 14:01:51 -0500 Subject: [PATCH 245/539] Making the nested proto field drilldowns more generic They had unique logic specifically for `trigger.` but that means that they wont work for any other nested proto in the future. --- xml_converter/generators/code_generator.py | 34 ++++++++++++---------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 23eff229..87a69075 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -365,14 +365,7 @@ def generate_cpp_variable_data( xml_fields.append(lowercase(x, delimiter="")) default_xml_field = fieldval['xml_fields'][0] - # TODO: this should handle more then just `trigger.` variants - if fieldval["protobuf_field"].startswith("trigger"): - proto_drilldown_calls = ".trigger()" - # TODO this would not properly catch trigger.something.ourvariable - protobuf_field = fieldval["protobuf_field"].split('.')[1] - else: - proto_drilldown_calls = "" - protobuf_field = fieldval["protobuf_field"] + proto_drilldown_calls, protobuf_field = split_field_into_drilldown(fieldval["protobuf_field"]) if fieldval.get("uses_file_path", False): args.append("base_dir") @@ -471,14 +464,7 @@ def write_attribute(self, output_directory: str) -> None: metadata[filepath] = self.data[filepath].metadata attribute_name = attribute_name_from_markdown_data(metadata[filepath]['name']) - # TODO this should handle more then just `trigger.` variants - if metadata[filepath]["protobuf_field"].startswith("trigger"): - proto_drilldown_calls = ".trigger()" - # TODO this would not properly catch trigger.something.ourvariable - protobuf_field = metadata[filepath]["protobuf_field"].split('.')[1] - else: - proto_drilldown_calls = "" - protobuf_field = metadata[filepath]["protobuf_field"] + proto_drilldown_calls, protobuf_field = split_field_into_drilldown(metadata[filepath]["protobuf_field"]) if metadata[filepath]['type'] == "MultiflagValue": for flag in metadata[filepath]['flags']: @@ -754,6 +740,22 @@ def generate_auto_docs(self, metadata: Dict[str, SchemaType], content: Dict[str, return template.render(field_rows=field_rows), field_rows +################################################################################ +# split_field_into_drilldown +# +# Splits the field string into a cpp drilldown function call stack and the +# final proto field name. +# EG: +# field: "trigger.range" +# returns: (".trigger()", "range") +################################################################################ +def split_field_into_drilldown(field: str) -> Tuple[str, str]: + components = field.split(".") + proto_drilldown_calls = "".join([".{}()".format(x) for x in components[:-1]]) + protobuf_field = components[-1] + return proto_drilldown_calls, protobuf_field + + ############################################################################ # attribute_name_from_markdown_data # From eb091af73a600cfbd963276f94bed43a1c1d6ebf Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sat, 30 Sep 2023 14:44:29 -0500 Subject: [PATCH 246/539] Making the ability to set values in nested protos cleaner The previous way handled allocation itself, however the protobuf library seems to be able to handle that themselves without issue. This allows for a simple single line set instead of an additional "if the intermediate layer does not exist then create it" block in every nested variable block. --- xml_converter/generators/code_generator.py | 31 +++++--- .../cpp_templates/class_template.cpp | 55 +++---------- xml_converter/src/icon_gen.cpp | 79 ++++--------------- 3 files changed, 48 insertions(+), 117 deletions(-) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 87a69075..0c814949 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -159,6 +159,11 @@ class AttributeVariable: # The CPP code to inject into the variable getter to drill down to the # variable we are looking for. eg ".trigger()" or ".one().two()" proto_drilldown_calls: str = "" + + # The CPP code to inject into the variable setter to drill down to the + # variable we are looking for. eg ".mutable_trigger()" or "mutable_one()->mutable_two()->" + mutable_proto_drilldown_calls: str = "" + uses_file_path: bool = False is_component: bool = False @@ -333,8 +338,6 @@ def generate_cpp_variable_data( xml_fields: List[str] = [] side_effects: List[str] = [] write_to_xml: bool = True - protobuf_field: str = "" - proto_drilldown_calls: str = "" default_xml_field: str = "" args: List[str] = XML_ATTRIBUTE_PARSER_DEFAULT_ARGUMENTS.copy() @@ -365,7 +368,10 @@ def generate_cpp_variable_data( xml_fields.append(lowercase(x, delimiter="")) default_xml_field = fieldval['xml_fields'][0] - proto_drilldown_calls, protobuf_field = split_field_into_drilldown(fieldval["protobuf_field"]) + proto_drilldown_calls: str + mutable_proto_drilldown_calls: str + protobuf_field: str + proto_drilldown_calls, mutable_proto_drilldown_calls, protobuf_field = split_field_into_drilldown(fieldval["protobuf_field"]) if fieldval.get("uses_file_path", False): args.append("base_dir") @@ -416,6 +422,7 @@ def generate_cpp_variable_data( default_xml_field=default_xml_field, protobuf_field=protobuf_field, proto_drilldown_calls=proto_drilldown_calls, + mutable_proto_drilldown_calls=mutable_proto_drilldown_calls, args=args, write_to_xml=write_to_xml, attribute_flag_name=attribute_name + "_is_set", @@ -447,7 +454,6 @@ def write_attribute(self, output_directory: str) -> None: attribute_variable: AttributeVariable metadata: Dict[str, SchemaType] = {} xml_fields: List[str] = [] - proto_drilldown_calls: str = "" template: Dict[str, Template] = { "MultiflagValue": env.get_template("multiflagvalue.cpp"), "CompoundValue": env.get_template("compoundvalue.cpp"), @@ -464,7 +470,10 @@ def write_attribute(self, output_directory: str) -> None: metadata[filepath] = self.data[filepath].metadata attribute_name = attribute_name_from_markdown_data(metadata[filepath]['name']) - proto_drilldown_calls, protobuf_field = split_field_into_drilldown(metadata[filepath]["protobuf_field"]) + proto_drilldown_calls: str + mutable_proto_drilldown_calls: str + protobuf_field: str + proto_drilldown_calls, mutable_proto_drilldown_calls, protobuf_field = split_field_into_drilldown(metadata[filepath]["protobuf_field"]) if metadata[filepath]['type'] == "MultiflagValue": for flag in metadata[filepath]['flags']: @@ -480,6 +489,7 @@ def write_attribute(self, output_directory: str) -> None: xml_fields=xml_fields, protobuf_field=protobuf_field, proto_drilldown_calls=proto_drilldown_calls, + mutable_proto_drilldown_calls=mutable_proto_drilldown_calls ) attribute_variables.append(attribute_variable) @@ -503,6 +513,7 @@ def write_attribute(self, output_directory: str) -> None: xml_fields=xml_fields, protobuf_field=component["protobuf_field"], proto_drilldown_calls=proto_drilldown_calls, + mutable_proto_drilldown_calls=mutable_proto_drilldown_calls ) attribute_variables.append(attribute_variable) @@ -519,6 +530,7 @@ def write_attribute(self, output_directory: str) -> None: xml_fields=xml_fields, protobuf_field=protobuf_field, proto_drilldown_calls=proto_drilldown_calls, + mutable_proto_drilldown_calls=mutable_proto_drilldown_calls ) attribute_variables.append(attribute_variable) @@ -746,14 +758,15 @@ def generate_auto_docs(self, metadata: Dict[str, SchemaType], content: Dict[str, # Splits the field string into a cpp drilldown function call stack and the # final proto field name. # EG: -# field: "trigger.range" -# returns: (".trigger()", "range") +# field: "trigger.subclass.fieldname" +# returns: (".trigger().subclass()", "mutable_trigger()->mutable_subclass()->", "fieldname") ################################################################################ -def split_field_into_drilldown(field: str) -> Tuple[str, str]: +def split_field_into_drilldown(field: str) -> Tuple[str, str, str]: components = field.split(".") proto_drilldown_calls = "".join([".{}()".format(x) for x in components[:-1]]) + mutable_proto_drilldown_calls = "".join(["mutable_{}()->".format(x) for x in components[:-1]]) protobuf_field = components[-1] - return proto_drilldown_calls, protobuf_field + return proto_drilldown_calls, mutable_proto_drilldown_calls, protobuf_field ############################################################################ diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index 752a0f9a..47433b42 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -95,56 +95,23 @@ vector {{cpp_class}}::as_xml() const { waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf() const { waypoint::{{cpp_class}} proto_{{cpp_class_header}}; - {% if cpp_class == "Icon": %} - waypoint::Trigger* trigger = nullptr; - {% endif %} {% for attribute_variable in attribute_variables %} {% if attribute_variable.is_component == false %} - {% if (attribute_variable.proto_drilldown_calls != "")%}{# TODO: This is a hack to preserve functionality when removing is_trigger #} - {% if (attribute_variable.attribute_type == "Custom")%} - if (this->{{attribute_variable.attribute_flag_name}}) { - if (trigger == nullptr) { - trigger = new waypoint::Trigger(); - } - trigger->set_allocated_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); - } - {% elif (attribute_variable.attribute_type == "Enum")%} - if (this->{{attribute_variable.attribute_flag_name}}) { - if (trigger == nullptr) { - trigger = new waypoint::Trigger(); - } - trigger->set_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); - } - {% else: %} - if (this->{{attribute_variable.attribute_flag_name}}) { - if (trigger == nullptr) { - trigger = new waypoint::Trigger(); - } - trigger->set_{{attribute_variable.protobuf_field}}(this->{{attribute_variable.attribute_name}}); - } - {% endif %} + {% if (attribute_variable.attribute_type in ["MultiflagValue", "CompoundValue", "Custom", "CompoundCustomClass"])%} + if (this->{{attribute_variable.attribute_flag_name}}) { + proto_{{cpp_class_header}}.{{attribute_variable.mutable_proto_drilldown_calls}}set_allocated_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); + } + {% elif (attribute_variable.attribute_type == "Enum")%} + if (this->{{attribute_variable.attribute_flag_name}}) { + proto_{{cpp_class_header}}.{{attribute_variable.mutable_proto_drilldown_calls}}set_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); + } {% else: %} - {% if (attribute_variable.attribute_type == "Enum")%} - if (this->{{attribute_variable.attribute_flag_name}}) { - proto_{{cpp_class_header}}.set_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); - } - {% elif (attribute_variable.attribute_type in ["MultiflagValue", "CompoundValue", "Custom", "CompoundCustomClass"])%} - if (this->{{attribute_variable.attribute_flag_name}}) { - proto_{{cpp_class_header}}.set_allocated_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); - } - {% else: %} - if (this->{{attribute_variable.attribute_flag_name}}) { - proto_{{cpp_class_header}}.set_{{attribute_variable.protobuf_field}}(this->{{attribute_variable.attribute_name}}); - } - {% endif %} + if (this->{{attribute_variable.attribute_flag_name}}) { + proto_{{cpp_class_header}}.{{attribute_variable.mutable_proto_drilldown_calls}}set_{{attribute_variable.protobuf_field}}(this->{{attribute_variable.attribute_name}}); + } {% endif %} {% endif %} {% endfor %} - {% if cpp_class == "Icon": %} - if (trigger != nullptr) { - proto_{{cpp_class_header}}.set_allocated_trigger(trigger); - } - {% endif %} return proto_{{cpp_class_header}}; } diff --git a/xml_converter/src/icon_gen.cpp b/xml_converter/src/icon_gen.cpp index 2eed3865..5cce5459 100644 --- a/xml_converter/src/icon_gen.cpp +++ b/xml_converter/src/icon_gen.cpp @@ -480,7 +480,6 @@ vector Icon::as_xml() const { waypoint::Icon Icon::as_protobuf() const { waypoint::Icon proto_icon; - waypoint::Trigger* trigger = nullptr; if (this->achievement_bitmask_is_set) { proto_icon.set_achievement_bit(this->achievement_bitmask); } @@ -488,28 +487,16 @@ waypoint::Icon Icon::as_protobuf() const { proto_icon.set_achievement_id(this->achievement_id); } if (this->auto_trigger_is_set) { - if (trigger == nullptr) { - trigger = new waypoint::Trigger(); - } - trigger->set_auto_trigger(this->auto_trigger); + proto_icon.mutable_trigger()->set_auto_trigger(this->auto_trigger); } if (this->bounce_delay_is_set) { - if (trigger == nullptr) { - trigger = new waypoint::Trigger(); - } - trigger->set_bounce_delay(this->bounce_delay); + proto_icon.mutable_trigger()->set_bounce_delay(this->bounce_delay); } if (this->bounce_duration_is_set) { - if (trigger == nullptr) { - trigger = new waypoint::Trigger(); - } - trigger->set_bounce_duration(this->bounce_duration); + proto_icon.mutable_trigger()->set_bounce_duration(this->bounce_duration); } if (this->bounce_height_is_set) { - if (trigger == nullptr) { - trigger = new waypoint::Trigger(); - } - trigger->set_bounce_height(this->bounce_height); + proto_icon.mutable_trigger()->set_bounce_height(this->bounce_height); } if (this->can_fade_is_set) { proto_icon.set_can_fade(this->can_fade); @@ -521,16 +508,10 @@ waypoint::Icon Icon::as_protobuf() const { proto_icon.set_allocated_rgba_color(to_proto_color(this->color)); } if (this->copy_clipboard_is_set) { - if (trigger == nullptr) { - trigger = new waypoint::Trigger(); - } - trigger->set_action_copy_clipboard(this->copy_clipboard); + proto_icon.mutable_trigger()->set_action_copy_clipboard(this->copy_clipboard); } if (this->copy_message_is_set) { - if (trigger == nullptr) { - trigger = new waypoint::Trigger(); - } - trigger->set_action_copy_message(this->copy_message); + proto_icon.mutable_trigger()->set_action_copy_message(this->copy_message); } if (this->cull_chirality_is_set) { proto_icon.set_cull_chirality(to_proto_cull_chirality(this->cull_chirality)); @@ -551,19 +532,13 @@ waypoint::Icon Icon::as_protobuf() const { proto_icon.set_allocated_guid(to_proto_unique_id(this->guid)); } if (this->has_countdown_is_set) { - if (trigger == nullptr) { - trigger = new waypoint::Trigger(); - } - trigger->set_has_countdown(this->has_countdown); + proto_icon.mutable_trigger()->set_has_countdown(this->has_countdown); } if (this->height_offset_is_set) { proto_icon.set_height_offset(this->height_offset); } if (this->hide_category_is_set) { - if (trigger == nullptr) { - trigger = new waypoint::Trigger(); - } - trigger->set_allocated_action_hide_category(to_proto_marker_category(this->hide_category)); + proto_icon.mutable_trigger()->set_allocated_action_hide_category(to_proto_marker_category(this->hide_category)); } if (this->icon_is_set) { proto_icon.set_allocated_texture_path(to_proto_image(this->icon)); @@ -572,16 +547,10 @@ waypoint::Icon Icon::as_protobuf() const { proto_icon.set_tentative__scale(this->icon_size); } if (this->info_message_is_set) { - if (trigger == nullptr) { - trigger = new waypoint::Trigger(); - } - trigger->set_action_info_message(this->info_message); + proto_icon.mutable_trigger()->set_action_info_message(this->info_message); } if (this->invert_visibility_is_set) { - if (trigger == nullptr) { - trigger = new waypoint::Trigger(); - } - trigger->set_invert_display(this->invert_visibility); + proto_icon.mutable_trigger()->set_invert_display(this->invert_visibility); } if (this->map_display_size_is_set) { proto_icon.set_map_display_size(this->map_display_size); @@ -617,16 +586,10 @@ waypoint::Icon Icon::as_protobuf() const { proto_icon.set_tentative__render_on_minimap(this->render_on_minimap); } if (this->reset_behavior_is_set) { - if (trigger == nullptr) { - trigger = new waypoint::Trigger(); - } - trigger->set_reset_behavior(to_proto_reset_behavior(this->reset_behavior)); + proto_icon.mutable_trigger()->set_reset_behavior(to_proto_reset_behavior(this->reset_behavior)); } if (this->reset_length_is_set) { - if (trigger == nullptr) { - trigger = new waypoint::Trigger(); - } - trigger->set_reset_length(this->reset_length); + proto_icon.mutable_trigger()->set_reset_length(this->reset_length); } if (this->scale_on_map_with_zoom_is_set) { proto_icon.set_scale_on_map_with_zoom(this->scale_on_map_with_zoom); @@ -638,10 +601,7 @@ waypoint::Icon Icon::as_protobuf() const { proto_icon.set_bhdraft__schedule_duration(this->schedule_duration); } if (this->show_category_is_set) { - if (trigger == nullptr) { - trigger = new waypoint::Trigger(); - } - trigger->set_allocated_action_show_category(to_proto_marker_category(this->show_category)); + proto_icon.mutable_trigger()->set_allocated_action_show_category(to_proto_marker_category(this->show_category)); } if (this->specialization_filter_is_set) { proto_icon.set_allocated_specialization_filter(to_proto_specialization_filter(this->specialization_filter)); @@ -650,10 +610,7 @@ waypoint::Icon Icon::as_protobuf() const { proto_icon.set_allocated_species_filter(to_proto_species_filter(this->species_filter)); } if (this->toggle_category_is_set) { - if (trigger == nullptr) { - trigger = new waypoint::Trigger(); - } - trigger->set_allocated_action_toggle_category(to_proto_marker_category(this->toggle_category)); + proto_icon.mutable_trigger()->set_allocated_action_toggle_category(to_proto_marker_category(this->toggle_category)); } if (this->tooltip_description_is_set) { proto_icon.set_tip_description(this->tooltip_description); @@ -662,13 +619,7 @@ waypoint::Icon Icon::as_protobuf() const { proto_icon.set_tip_name(this->tooltip_name); } if (this->trigger_range_is_set) { - if (trigger == nullptr) { - trigger = new waypoint::Trigger(); - } - trigger->set_range(this->trigger_range); - } - if (trigger != nullptr) { - proto_icon.set_allocated_trigger(trigger); + proto_icon.mutable_trigger()->set_range(this->trigger_range); } return proto_icon; } From 673978087eeb9395b0262cc2c6acd48c5139ff0b Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sat, 30 Sep 2023 16:47:26 -0500 Subject: [PATCH 247/539] Adding zero cost wrappers to the proto serializers This is not entirely nessasary, they are all identify functions. However adding them means that we dont need to differentiate between the scalar/primitive types and instead we can just treat all types generally the same. --- .../cpp_templates/class_template.cpp | 33 ++--- xml_converter/src/attribute/bool.hpp | 4 + xml_converter/src/attribute/float.hpp | 4 + xml_converter/src/attribute/int.hpp | 4 + xml_converter/src/attribute/string.hpp | 4 + xml_converter/src/category_gen.cpp | 20 +-- xml_converter/src/icon_gen.cpp | 120 +++++++++--------- xml_converter/src/trail_gen.cpp | 60 ++++----- 8 files changed, 125 insertions(+), 124 deletions(-) diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index 47433b42..1c01c3ed 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -97,19 +97,13 @@ waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf() const { waypoint::{{cpp_class}} proto_{{cpp_class_header}}; {% for attribute_variable in attribute_variables %} {% if attribute_variable.is_component == false %} - {% if (attribute_variable.attribute_type in ["MultiflagValue", "CompoundValue", "Custom", "CompoundCustomClass"])%} - if (this->{{attribute_variable.attribute_flag_name}}) { + if (this->{{attribute_variable.attribute_flag_name}}) { + {% if (attribute_variable.attribute_type in ["MultiflagValue", "CompoundValue", "Custom", "CompoundCustomClass"]) %} proto_{{cpp_class_header}}.{{attribute_variable.mutable_proto_drilldown_calls}}set_allocated_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); - } - {% elif (attribute_variable.attribute_type == "Enum")%} - if (this->{{attribute_variable.attribute_flag_name}}) { + {% else %} proto_{{cpp_class_header}}.{{attribute_variable.mutable_proto_drilldown_calls}}set_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); - } - {% else: %} - if (this->{{attribute_variable.attribute_flag_name}}) { - proto_{{cpp_class_header}}.{{attribute_variable.mutable_proto_drilldown_calls}}set_{{attribute_variable.protobuf_field}}(this->{{attribute_variable.attribute_name}}); - } - {% endif %} + {% endif %} + } {% endif %} {% endfor %} return proto_{{cpp_class_header}}; @@ -120,25 +114,16 @@ void {{cpp_class}}::parse_protobuf(waypoint::{{cpp_class}} proto_{{cpp_class_hea {% if attribute_variable.is_component == false %} {% if (attribute_variable.attribute_type in ["MultiflagValue", "CompoundValue", "Custom", "CompoundCustomClass"]) %} if (proto_{{cpp_class_header}}{{attribute_variable.proto_drilldown_calls}}.has_{{attribute_variable.protobuf_field}}()) { - this->{{attribute_variable.attribute_name}} = from_proto_{{attribute_variable.class_name}}(proto_{{cpp_class_header}}{{attribute_variable.proto_drilldown_calls}}.{{attribute_variable.protobuf_field}}()); - this->{{attribute_variable.attribute_flag_name}} = true; - } - {% elif (attribute_variable.class_name == "string") %}{# TODO: why is this .class_name when the others are .attribute_name #} + {% elif (attribute_variable.attribute_type == "String") %} if (proto_{{cpp_class_header}}{{attribute_variable.proto_drilldown_calls}}.{{attribute_variable.protobuf_field}}() != "") { - this->{{attribute_variable.attribute_name}} = proto_{{cpp_class_header}}{{attribute_variable.proto_drilldown_calls}}.{{attribute_variable.protobuf_field}}(); - this->{{attribute_variable.attribute_flag_name}} = true; - } {% elif (attribute_variable.attribute_type == "Enum") %} if (proto_{{cpp_class_header}}{{attribute_variable.proto_drilldown_calls}}.{{attribute_variable.protobuf_field}}() != 0) { - this->{{attribute_variable.attribute_name}} = from_proto_{{attribute_variable.class_name}}(proto_{{cpp_class_header}}{{attribute_variable.proto_drilldown_calls}}.{{attribute_variable.protobuf_field}}()); - this->{{attribute_variable.attribute_flag_name}} = true; - } {% else %} if (proto_{{cpp_class_header}}{{attribute_variable.proto_drilldown_calls}}.{{attribute_variable.protobuf_field}}() != 0) { - this->{{attribute_variable.attribute_name}} = proto_{{cpp_class_header}}{{attribute_variable.proto_drilldown_calls}}.{{attribute_variable.protobuf_field}}(); - this->{{attribute_variable.attribute_flag_name}} = true; - } {% endif %} + this->{{attribute_variable.attribute_name}} = from_proto_{{attribute_variable.class_name}}(proto_{{cpp_class_header}}{{attribute_variable.proto_drilldown_calls}}.{{attribute_variable.protobuf_field}}()); + this->{{attribute_variable.attribute_flag_name}} = true; + } {% endif %} {% endfor %} } diff --git a/xml_converter/src/attribute/bool.hpp b/xml_converter/src/attribute/bool.hpp index bd917c5f..07d5f8fb 100644 --- a/xml_converter/src/attribute/bool.hpp +++ b/xml_converter/src/attribute/bool.hpp @@ -10,3 +10,7 @@ class XMLError; bool parse_bool(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_bool(bool attribute_value); + +// Zero Cost Abstraction identity functions to make parsing and writing protobufs more uniform +inline bool const& from_proto_bool(const bool &x) {return x;} +inline bool const& to_proto_bool(const bool &x) {return x;} diff --git a/xml_converter/src/attribute/float.hpp b/xml_converter/src/attribute/float.hpp index b2e9cfe5..4e325512 100644 --- a/xml_converter/src/attribute/float.hpp +++ b/xml_converter/src/attribute/float.hpp @@ -10,3 +10,7 @@ class XMLError; float parse_float(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_float(float attribute_value); + +// Zero Cost Abstraction identity functions to make parsing and writing protobufs more uniform +inline float const& from_proto_float(const float &x) {return x;} +inline float const& to_proto_float(const float &x) {return x;} diff --git a/xml_converter/src/attribute/int.hpp b/xml_converter/src/attribute/int.hpp index 680d7160..fd6539ea 100644 --- a/xml_converter/src/attribute/int.hpp +++ b/xml_converter/src/attribute/int.hpp @@ -10,3 +10,7 @@ class XMLError; int parse_int(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_int(int attribute_value); + +// Zero Cost Abstraction identity functions to make parsing and writing protobufs more uniform +inline int const& from_proto_int(const int &x) {return x;} +inline int const& to_proto_int(const int &x) {return x;} diff --git a/xml_converter/src/attribute/string.hpp b/xml_converter/src/attribute/string.hpp index 6e202248..e5988178 100644 --- a/xml_converter/src/attribute/string.hpp +++ b/xml_converter/src/attribute/string.hpp @@ -10,3 +10,7 @@ class XMLError; std::string parse_string(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_string(std::string attribute_value); + +// Zero Cost Abstraction identity functions to make parsing and writing protobufs more uniform +inline std::string const& from_proto_string(const std::string &x) {return x;} +inline std::string const& to_proto_string(const std::string &x) {return x;} diff --git a/xml_converter/src/category_gen.cpp b/xml_converter/src/category_gen.cpp index 7ed102ac..4ceddc0e 100644 --- a/xml_converter/src/category_gen.cpp +++ b/xml_converter/src/category_gen.cpp @@ -98,42 +98,42 @@ vector Category::as_xml() const { waypoint::Category Category::as_protobuf() const { waypoint::Category proto_category; if (this->default_visibility_is_set) { - proto_category.set_default_visibility(this->default_visibility); + proto_category.set_default_visibility(to_proto_bool(this->default_visibility)); } if (this->display_name_is_set) { - proto_category.set_display_name(this->display_name); + proto_category.set_display_name(to_proto_string(this->display_name)); } if (this->is_separator_is_set) { - proto_category.set_is_separator(this->is_separator); + proto_category.set_is_separator(to_proto_bool(this->is_separator)); } if (this->name_is_set) { - proto_category.set_name(this->name); + proto_category.set_name(to_proto_string(this->name)); } if (this->tooltip_description_is_set) { - proto_category.set_tip_description(this->tooltip_description); + proto_category.set_tip_description(to_proto_string(this->tooltip_description)); } return proto_category; } void Category::parse_protobuf(waypoint::Category proto_category) { if (proto_category.default_visibility() != 0) { - this->default_visibility = proto_category.default_visibility(); + this->default_visibility = from_proto_bool(proto_category.default_visibility()); this->default_visibility_is_set = true; } if (proto_category.display_name() != "") { - this->display_name = proto_category.display_name(); + this->display_name = from_proto_string(proto_category.display_name()); this->display_name_is_set = true; } if (proto_category.is_separator() != 0) { - this->is_separator = proto_category.is_separator(); + this->is_separator = from_proto_bool(proto_category.is_separator()); this->is_separator_is_set = true; } if (proto_category.name() != "") { - this->name = proto_category.name(); + this->name = from_proto_string(proto_category.name()); this->name_is_set = true; } if (proto_category.tip_description() != "") { - this->tooltip_description = proto_category.tip_description(); + this->tooltip_description = from_proto_string(proto_category.tip_description()); this->tooltip_description_is_set = true; } } diff --git a/xml_converter/src/icon_gen.cpp b/xml_converter/src/icon_gen.cpp index 5cce5459..b80f21dc 100644 --- a/xml_converter/src/icon_gen.cpp +++ b/xml_converter/src/icon_gen.cpp @@ -481,25 +481,25 @@ vector Icon::as_xml() const { waypoint::Icon Icon::as_protobuf() const { waypoint::Icon proto_icon; if (this->achievement_bitmask_is_set) { - proto_icon.set_achievement_bit(this->achievement_bitmask); + proto_icon.set_achievement_bit(to_proto_int(this->achievement_bitmask)); } if (this->achievement_id_is_set) { - proto_icon.set_achievement_id(this->achievement_id); + proto_icon.set_achievement_id(to_proto_int(this->achievement_id)); } if (this->auto_trigger_is_set) { - proto_icon.mutable_trigger()->set_auto_trigger(this->auto_trigger); + proto_icon.mutable_trigger()->set_auto_trigger(to_proto_bool(this->auto_trigger)); } if (this->bounce_delay_is_set) { - proto_icon.mutable_trigger()->set_bounce_delay(this->bounce_delay); + proto_icon.mutable_trigger()->set_bounce_delay(to_proto_float(this->bounce_delay)); } if (this->bounce_duration_is_set) { - proto_icon.mutable_trigger()->set_bounce_duration(this->bounce_duration); + proto_icon.mutable_trigger()->set_bounce_duration(to_proto_float(this->bounce_duration)); } if (this->bounce_height_is_set) { - proto_icon.mutable_trigger()->set_bounce_height(this->bounce_height); + proto_icon.mutable_trigger()->set_bounce_height(to_proto_float(this->bounce_height)); } if (this->can_fade_is_set) { - proto_icon.set_can_fade(this->can_fade); + proto_icon.set_can_fade(to_proto_bool(this->can_fade)); } if (this->category_is_set) { proto_icon.set_allocated_category(to_proto_marker_category(this->category)); @@ -508,19 +508,19 @@ waypoint::Icon Icon::as_protobuf() const { proto_icon.set_allocated_rgba_color(to_proto_color(this->color)); } if (this->copy_clipboard_is_set) { - proto_icon.mutable_trigger()->set_action_copy_clipboard(this->copy_clipboard); + proto_icon.mutable_trigger()->set_action_copy_clipboard(to_proto_string(this->copy_clipboard)); } if (this->copy_message_is_set) { - proto_icon.mutable_trigger()->set_action_copy_message(this->copy_message); + proto_icon.mutable_trigger()->set_action_copy_message(to_proto_string(this->copy_message)); } if (this->cull_chirality_is_set) { proto_icon.set_cull_chirality(to_proto_cull_chirality(this->cull_chirality)); } if (this->distance_fade_end_is_set) { - proto_icon.set_distance_fade_end(this->distance_fade_end); + proto_icon.set_distance_fade_end(to_proto_float(this->distance_fade_end)); } if (this->distance_fade_start_is_set) { - proto_icon.set_distance_fade_start(this->distance_fade_start); + proto_icon.set_distance_fade_start(to_proto_float(this->distance_fade_start)); } if (this->euler_rotation_is_set) { proto_icon.set_allocated_euler_rotation(to_proto_euler_rotation(this->euler_rotation)); @@ -532,10 +532,10 @@ waypoint::Icon Icon::as_protobuf() const { proto_icon.set_allocated_guid(to_proto_unique_id(this->guid)); } if (this->has_countdown_is_set) { - proto_icon.mutable_trigger()->set_has_countdown(this->has_countdown); + proto_icon.mutable_trigger()->set_has_countdown(to_proto_bool(this->has_countdown)); } if (this->height_offset_is_set) { - proto_icon.set_height_offset(this->height_offset); + proto_icon.set_height_offset(to_proto_float(this->height_offset)); } if (this->hide_category_is_set) { proto_icon.mutable_trigger()->set_allocated_action_hide_category(to_proto_marker_category(this->hide_category)); @@ -544,28 +544,28 @@ waypoint::Icon Icon::as_protobuf() const { proto_icon.set_allocated_texture_path(to_proto_image(this->icon)); } if (this->icon_size_is_set) { - proto_icon.set_tentative__scale(this->icon_size); + proto_icon.set_tentative__scale(to_proto_float(this->icon_size)); } if (this->info_message_is_set) { - proto_icon.mutable_trigger()->set_action_info_message(this->info_message); + proto_icon.mutable_trigger()->set_action_info_message(to_proto_string(this->info_message)); } if (this->invert_visibility_is_set) { - proto_icon.mutable_trigger()->set_invert_display(this->invert_visibility); + proto_icon.mutable_trigger()->set_invert_display(to_proto_bool(this->invert_visibility)); } if (this->map_display_size_is_set) { - proto_icon.set_map_display_size(this->map_display_size); + proto_icon.set_map_display_size(to_proto_int(this->map_display_size)); } if (this->map_id_is_set) { - proto_icon.set_map_id(this->map_id); + proto_icon.set_map_id(to_proto_int(this->map_id)); } if (this->map_type_filter_is_set) { proto_icon.set_allocated_map_type_filter(to_proto_map_type_filter(this->map_type_filter)); } if (this->maximum_size_on_screen_is_set) { - proto_icon.set_maximum_size_on_screen(this->maximum_size_on_screen); + proto_icon.set_maximum_size_on_screen(to_proto_int(this->maximum_size_on_screen)); } if (this->minimum_size_on_screen_is_set) { - proto_icon.set_minimum_size_on_screen(this->minimum_size_on_screen); + proto_icon.set_minimum_size_on_screen(to_proto_int(this->minimum_size_on_screen)); } if (this->mount_filter_is_set) { proto_icon.set_allocated_mount_filter(to_proto_mount_filter(this->mount_filter)); @@ -577,28 +577,28 @@ waypoint::Icon Icon::as_protobuf() const { proto_icon.set_allocated_profession_filter(to_proto_profession_filter(this->profession_filter)); } if (this->render_ingame_is_set) { - proto_icon.set_tentative__render_ingame(this->render_ingame); + proto_icon.set_tentative__render_ingame(to_proto_bool(this->render_ingame)); } if (this->render_on_map_is_set) { - proto_icon.set_tentative__render_on_map(this->render_on_map); + proto_icon.set_tentative__render_on_map(to_proto_bool(this->render_on_map)); } if (this->render_on_minimap_is_set) { - proto_icon.set_tentative__render_on_minimap(this->render_on_minimap); + proto_icon.set_tentative__render_on_minimap(to_proto_bool(this->render_on_minimap)); } if (this->reset_behavior_is_set) { proto_icon.mutable_trigger()->set_reset_behavior(to_proto_reset_behavior(this->reset_behavior)); } if (this->reset_length_is_set) { - proto_icon.mutable_trigger()->set_reset_length(this->reset_length); + proto_icon.mutable_trigger()->set_reset_length(to_proto_float(this->reset_length)); } if (this->scale_on_map_with_zoom_is_set) { - proto_icon.set_scale_on_map_with_zoom(this->scale_on_map_with_zoom); + proto_icon.set_scale_on_map_with_zoom(to_proto_bool(this->scale_on_map_with_zoom)); } if (this->schedule_is_set) { - proto_icon.set_bhdraft__schedule(this->schedule); + proto_icon.set_bhdraft__schedule(to_proto_string(this->schedule)); } if (this->schedule_duration_is_set) { - proto_icon.set_bhdraft__schedule_duration(this->schedule_duration); + proto_icon.set_bhdraft__schedule_duration(to_proto_float(this->schedule_duration)); } if (this->show_category_is_set) { proto_icon.mutable_trigger()->set_allocated_action_show_category(to_proto_marker_category(this->show_category)); @@ -613,44 +613,44 @@ waypoint::Icon Icon::as_protobuf() const { proto_icon.mutable_trigger()->set_allocated_action_toggle_category(to_proto_marker_category(this->toggle_category)); } if (this->tooltip_description_is_set) { - proto_icon.set_tip_description(this->tooltip_description); + proto_icon.set_tip_description(to_proto_string(this->tooltip_description)); } if (this->tooltip_name_is_set) { - proto_icon.set_tip_name(this->tooltip_name); + proto_icon.set_tip_name(to_proto_string(this->tooltip_name)); } if (this->trigger_range_is_set) { - proto_icon.mutable_trigger()->set_range(this->trigger_range); + proto_icon.mutable_trigger()->set_range(to_proto_float(this->trigger_range)); } return proto_icon; } void Icon::parse_protobuf(waypoint::Icon proto_icon) { if (proto_icon.achievement_bit() != 0) { - this->achievement_bitmask = proto_icon.achievement_bit(); + this->achievement_bitmask = from_proto_int(proto_icon.achievement_bit()); this->achievement_bitmask_is_set = true; } if (proto_icon.achievement_id() != 0) { - this->achievement_id = proto_icon.achievement_id(); + this->achievement_id = from_proto_int(proto_icon.achievement_id()); this->achievement_id_is_set = true; } if (proto_icon.trigger().auto_trigger() != 0) { - this->auto_trigger = proto_icon.trigger().auto_trigger(); + this->auto_trigger = from_proto_bool(proto_icon.trigger().auto_trigger()); this->auto_trigger_is_set = true; } if (proto_icon.trigger().bounce_delay() != 0) { - this->bounce_delay = proto_icon.trigger().bounce_delay(); + this->bounce_delay = from_proto_float(proto_icon.trigger().bounce_delay()); this->bounce_delay_is_set = true; } if (proto_icon.trigger().bounce_duration() != 0) { - this->bounce_duration = proto_icon.trigger().bounce_duration(); + this->bounce_duration = from_proto_float(proto_icon.trigger().bounce_duration()); this->bounce_duration_is_set = true; } if (proto_icon.trigger().bounce_height() != 0) { - this->bounce_height = proto_icon.trigger().bounce_height(); + this->bounce_height = from_proto_float(proto_icon.trigger().bounce_height()); this->bounce_height_is_set = true; } if (proto_icon.can_fade() != 0) { - this->can_fade = proto_icon.can_fade(); + this->can_fade = from_proto_bool(proto_icon.can_fade()); this->can_fade_is_set = true; } if (proto_icon.has_category()) { @@ -662,11 +662,11 @@ void Icon::parse_protobuf(waypoint::Icon proto_icon) { this->color_is_set = true; } if (proto_icon.trigger().action_copy_clipboard() != "") { - this->copy_clipboard = proto_icon.trigger().action_copy_clipboard(); + this->copy_clipboard = from_proto_string(proto_icon.trigger().action_copy_clipboard()); this->copy_clipboard_is_set = true; } if (proto_icon.trigger().action_copy_message() != "") { - this->copy_message = proto_icon.trigger().action_copy_message(); + this->copy_message = from_proto_string(proto_icon.trigger().action_copy_message()); this->copy_message_is_set = true; } if (proto_icon.cull_chirality() != 0) { @@ -674,11 +674,11 @@ void Icon::parse_protobuf(waypoint::Icon proto_icon) { this->cull_chirality_is_set = true; } if (proto_icon.distance_fade_end() != 0) { - this->distance_fade_end = proto_icon.distance_fade_end(); + this->distance_fade_end = from_proto_float(proto_icon.distance_fade_end()); this->distance_fade_end_is_set = true; } if (proto_icon.distance_fade_start() != 0) { - this->distance_fade_start = proto_icon.distance_fade_start(); + this->distance_fade_start = from_proto_float(proto_icon.distance_fade_start()); this->distance_fade_start_is_set = true; } if (proto_icon.has_euler_rotation()) { @@ -694,11 +694,11 @@ void Icon::parse_protobuf(waypoint::Icon proto_icon) { this->guid_is_set = true; } if (proto_icon.trigger().has_countdown() != 0) { - this->has_countdown = proto_icon.trigger().has_countdown(); + this->has_countdown = from_proto_bool(proto_icon.trigger().has_countdown()); this->has_countdown_is_set = true; } if (proto_icon.height_offset() != 0) { - this->height_offset = proto_icon.height_offset(); + this->height_offset = from_proto_float(proto_icon.height_offset()); this->height_offset_is_set = true; } if (proto_icon.trigger().has_action_hide_category()) { @@ -710,23 +710,23 @@ void Icon::parse_protobuf(waypoint::Icon proto_icon) { this->icon_is_set = true; } if (proto_icon.tentative__scale() != 0) { - this->icon_size = proto_icon.tentative__scale(); + this->icon_size = from_proto_float(proto_icon.tentative__scale()); this->icon_size_is_set = true; } if (proto_icon.trigger().action_info_message() != "") { - this->info_message = proto_icon.trigger().action_info_message(); + this->info_message = from_proto_string(proto_icon.trigger().action_info_message()); this->info_message_is_set = true; } if (proto_icon.trigger().invert_display() != 0) { - this->invert_visibility = proto_icon.trigger().invert_display(); + this->invert_visibility = from_proto_bool(proto_icon.trigger().invert_display()); this->invert_visibility_is_set = true; } if (proto_icon.map_display_size() != 0) { - this->map_display_size = proto_icon.map_display_size(); + this->map_display_size = from_proto_int(proto_icon.map_display_size()); this->map_display_size_is_set = true; } if (proto_icon.map_id() != 0) { - this->map_id = proto_icon.map_id(); + this->map_id = from_proto_int(proto_icon.map_id()); this->map_id_is_set = true; } if (proto_icon.has_map_type_filter()) { @@ -734,11 +734,11 @@ void Icon::parse_protobuf(waypoint::Icon proto_icon) { this->map_type_filter_is_set = true; } if (proto_icon.maximum_size_on_screen() != 0) { - this->maximum_size_on_screen = proto_icon.maximum_size_on_screen(); + this->maximum_size_on_screen = from_proto_int(proto_icon.maximum_size_on_screen()); this->maximum_size_on_screen_is_set = true; } if (proto_icon.minimum_size_on_screen() != 0) { - this->minimum_size_on_screen = proto_icon.minimum_size_on_screen(); + this->minimum_size_on_screen = from_proto_int(proto_icon.minimum_size_on_screen()); this->minimum_size_on_screen_is_set = true; } if (proto_icon.has_mount_filter()) { @@ -754,15 +754,15 @@ void Icon::parse_protobuf(waypoint::Icon proto_icon) { this->profession_filter_is_set = true; } if (proto_icon.tentative__render_ingame() != 0) { - this->render_ingame = proto_icon.tentative__render_ingame(); + this->render_ingame = from_proto_bool(proto_icon.tentative__render_ingame()); this->render_ingame_is_set = true; } if (proto_icon.tentative__render_on_map() != 0) { - this->render_on_map = proto_icon.tentative__render_on_map(); + this->render_on_map = from_proto_bool(proto_icon.tentative__render_on_map()); this->render_on_map_is_set = true; } if (proto_icon.tentative__render_on_minimap() != 0) { - this->render_on_minimap = proto_icon.tentative__render_on_minimap(); + this->render_on_minimap = from_proto_bool(proto_icon.tentative__render_on_minimap()); this->render_on_minimap_is_set = true; } if (proto_icon.trigger().reset_behavior() != 0) { @@ -770,19 +770,19 @@ void Icon::parse_protobuf(waypoint::Icon proto_icon) { this->reset_behavior_is_set = true; } if (proto_icon.trigger().reset_length() != 0) { - this->reset_length = proto_icon.trigger().reset_length(); + this->reset_length = from_proto_float(proto_icon.trigger().reset_length()); this->reset_length_is_set = true; } if (proto_icon.scale_on_map_with_zoom() != 0) { - this->scale_on_map_with_zoom = proto_icon.scale_on_map_with_zoom(); + this->scale_on_map_with_zoom = from_proto_bool(proto_icon.scale_on_map_with_zoom()); this->scale_on_map_with_zoom_is_set = true; } if (proto_icon.bhdraft__schedule() != "") { - this->schedule = proto_icon.bhdraft__schedule(); + this->schedule = from_proto_string(proto_icon.bhdraft__schedule()); this->schedule_is_set = true; } if (proto_icon.bhdraft__schedule_duration() != 0) { - this->schedule_duration = proto_icon.bhdraft__schedule_duration(); + this->schedule_duration = from_proto_float(proto_icon.bhdraft__schedule_duration()); this->schedule_duration_is_set = true; } if (proto_icon.trigger().has_action_show_category()) { @@ -802,15 +802,15 @@ void Icon::parse_protobuf(waypoint::Icon proto_icon) { this->toggle_category_is_set = true; } if (proto_icon.tip_description() != "") { - this->tooltip_description = proto_icon.tip_description(); + this->tooltip_description = from_proto_string(proto_icon.tip_description()); this->tooltip_description_is_set = true; } if (proto_icon.tip_name() != "") { - this->tooltip_name = proto_icon.tip_name(); + this->tooltip_name = from_proto_string(proto_icon.tip_name()); this->tooltip_name_is_set = true; } if (proto_icon.trigger().range() != 0) { - this->trigger_range = proto_icon.trigger().range(); + this->trigger_range = from_proto_float(proto_icon.trigger().range()); this->trigger_range_is_set = true; } } diff --git a/xml_converter/src/trail_gen.cpp b/xml_converter/src/trail_gen.cpp index e2491b5d..2d6210e7 100644 --- a/xml_converter/src/trail_gen.cpp +++ b/xml_converter/src/trail_gen.cpp @@ -289,16 +289,16 @@ vector Trail::as_xml() const { waypoint::Trail Trail::as_protobuf() const { waypoint::Trail proto_trail; if (this->achievement_bitmask_is_set) { - proto_trail.set_achievement_bit(this->achievement_bitmask); + proto_trail.set_achievement_bit(to_proto_int(this->achievement_bitmask)); } if (this->achievement_id_is_set) { - proto_trail.set_achievement_id(this->achievement_id); + proto_trail.set_achievement_id(to_proto_int(this->achievement_id)); } if (this->animation_speed_is_set) { - proto_trail.set_animation_speed(this->animation_speed); + proto_trail.set_animation_speed(to_proto_float(this->animation_speed)); } if (this->can_fade_is_set) { - proto_trail.set_can_fade(this->can_fade); + proto_trail.set_can_fade(to_proto_bool(this->can_fade)); } if (this->category_is_set) { proto_trail.set_allocated_category(to_proto_marker_category(this->category)); @@ -310,10 +310,10 @@ waypoint::Trail Trail::as_protobuf() const { proto_trail.set_cull_chirality(to_proto_cull_chirality(this->cull_chirality)); } if (this->distance_fade_end_is_set) { - proto_trail.set_distance_fade_end(this->distance_fade_end); + proto_trail.set_distance_fade_end(to_proto_float(this->distance_fade_end)); } if (this->distance_fade_start_is_set) { - proto_trail.set_distance_fade_start(this->distance_fade_start); + proto_trail.set_distance_fade_start(to_proto_float(this->distance_fade_start)); } if (this->festival_filter_is_set) { proto_trail.set_allocated_festival_filter(to_proto_festival_filter(this->festival_filter)); @@ -322,13 +322,13 @@ waypoint::Trail Trail::as_protobuf() const { proto_trail.set_allocated_guid(to_proto_unique_id(this->guid)); } if (this->is_wall_is_set) { - proto_trail.set_is_wall(this->is_wall); + proto_trail.set_is_wall(to_proto_bool(this->is_wall)); } if (this->map_display_size_is_set) { - proto_trail.set_map_display_size(this->map_display_size); + proto_trail.set_map_display_size(to_proto_int(this->map_display_size)); } if (this->map_id_is_set) { - proto_trail.set_map_id(this->map_id); + proto_trail.set_map_id(to_proto_int(this->map_id)); } if (this->map_type_filter_is_set) { proto_trail.set_allocated_map_type_filter(to_proto_map_type_filter(this->map_type_filter)); @@ -340,19 +340,19 @@ waypoint::Trail Trail::as_protobuf() const { proto_trail.set_allocated_profession_filter(to_proto_profession_filter(this->profession_filter)); } if (this->render_ingame_is_set) { - proto_trail.set_tentative__render_ingame(this->render_ingame); + proto_trail.set_tentative__render_ingame(to_proto_bool(this->render_ingame)); } if (this->render_on_map_is_set) { - proto_trail.set_tentative__render_on_map(this->render_on_map); + proto_trail.set_tentative__render_on_map(to_proto_bool(this->render_on_map)); } if (this->render_on_minimap_is_set) { - proto_trail.set_tentative__render_on_minimap(this->render_on_minimap); + proto_trail.set_tentative__render_on_minimap(to_proto_bool(this->render_on_minimap)); } if (this->schedule_is_set) { - proto_trail.set_bhdraft__schedule(this->schedule); + proto_trail.set_bhdraft__schedule(to_proto_string(this->schedule)); } if (this->schedule_duration_is_set) { - proto_trail.set_bhdraft__schedule_duration(this->schedule_duration); + proto_trail.set_bhdraft__schedule_duration(to_proto_float(this->schedule_duration)); } if (this->specialization_filter_is_set) { proto_trail.set_allocated_specialization_filter(to_proto_specialization_filter(this->specialization_filter)); @@ -367,26 +367,26 @@ waypoint::Trail Trail::as_protobuf() const { proto_trail.set_allocated_trail_data(to_proto_trail_data(this->trail_data)); } if (this->trail_scale_is_set) { - proto_trail.set_scale(this->trail_scale); + proto_trail.set_scale(to_proto_float(this->trail_scale)); } return proto_trail; } void Trail::parse_protobuf(waypoint::Trail proto_trail) { if (proto_trail.achievement_bit() != 0) { - this->achievement_bitmask = proto_trail.achievement_bit(); + this->achievement_bitmask = from_proto_int(proto_trail.achievement_bit()); this->achievement_bitmask_is_set = true; } if (proto_trail.achievement_id() != 0) { - this->achievement_id = proto_trail.achievement_id(); + this->achievement_id = from_proto_int(proto_trail.achievement_id()); this->achievement_id_is_set = true; } if (proto_trail.animation_speed() != 0) { - this->animation_speed = proto_trail.animation_speed(); + this->animation_speed = from_proto_float(proto_trail.animation_speed()); this->animation_speed_is_set = true; } if (proto_trail.can_fade() != 0) { - this->can_fade = proto_trail.can_fade(); + this->can_fade = from_proto_bool(proto_trail.can_fade()); this->can_fade_is_set = true; } if (proto_trail.has_category()) { @@ -402,11 +402,11 @@ void Trail::parse_protobuf(waypoint::Trail proto_trail) { this->cull_chirality_is_set = true; } if (proto_trail.distance_fade_end() != 0) { - this->distance_fade_end = proto_trail.distance_fade_end(); + this->distance_fade_end = from_proto_float(proto_trail.distance_fade_end()); this->distance_fade_end_is_set = true; } if (proto_trail.distance_fade_start() != 0) { - this->distance_fade_start = proto_trail.distance_fade_start(); + this->distance_fade_start = from_proto_float(proto_trail.distance_fade_start()); this->distance_fade_start_is_set = true; } if (proto_trail.has_festival_filter()) { @@ -418,15 +418,15 @@ void Trail::parse_protobuf(waypoint::Trail proto_trail) { this->guid_is_set = true; } if (proto_trail.is_wall() != 0) { - this->is_wall = proto_trail.is_wall(); + this->is_wall = from_proto_bool(proto_trail.is_wall()); this->is_wall_is_set = true; } if (proto_trail.map_display_size() != 0) { - this->map_display_size = proto_trail.map_display_size(); + this->map_display_size = from_proto_int(proto_trail.map_display_size()); this->map_display_size_is_set = true; } if (proto_trail.map_id() != 0) { - this->map_id = proto_trail.map_id(); + this->map_id = from_proto_int(proto_trail.map_id()); this->map_id_is_set = true; } if (proto_trail.has_map_type_filter()) { @@ -442,23 +442,23 @@ void Trail::parse_protobuf(waypoint::Trail proto_trail) { this->profession_filter_is_set = true; } if (proto_trail.tentative__render_ingame() != 0) { - this->render_ingame = proto_trail.tentative__render_ingame(); + this->render_ingame = from_proto_bool(proto_trail.tentative__render_ingame()); this->render_ingame_is_set = true; } if (proto_trail.tentative__render_on_map() != 0) { - this->render_on_map = proto_trail.tentative__render_on_map(); + this->render_on_map = from_proto_bool(proto_trail.tentative__render_on_map()); this->render_on_map_is_set = true; } if (proto_trail.tentative__render_on_minimap() != 0) { - this->render_on_minimap = proto_trail.tentative__render_on_minimap(); + this->render_on_minimap = from_proto_bool(proto_trail.tentative__render_on_minimap()); this->render_on_minimap_is_set = true; } if (proto_trail.bhdraft__schedule() != "") { - this->schedule = proto_trail.bhdraft__schedule(); + this->schedule = from_proto_string(proto_trail.bhdraft__schedule()); this->schedule_is_set = true; } if (proto_trail.bhdraft__schedule_duration() != 0) { - this->schedule_duration = proto_trail.bhdraft__schedule_duration(); + this->schedule_duration = from_proto_float(proto_trail.bhdraft__schedule_duration()); this->schedule_duration_is_set = true; } if (proto_trail.has_specialization_filter()) { @@ -478,7 +478,7 @@ void Trail::parse_protobuf(waypoint::Trail proto_trail) { this->trail_data_is_set = true; } if (proto_trail.scale() != 0) { - this->trail_scale = proto_trail.scale(); + this->trail_scale = from_proto_float(proto_trail.scale()); this->trail_scale_is_set = true; } } From 8e327e86e91b2f63e03a11a51309889202e3e381 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sat, 30 Sep 2023 16:51:29 -0500 Subject: [PATCH 248/539] fixing clang-format errors in the new proto functions --- xml_converter/src/attribute/bool.hpp | 8 ++++++-- xml_converter/src/attribute/float.hpp | 8 ++++++-- xml_converter/src/attribute/int.hpp | 8 ++++++-- xml_converter/src/attribute/string.hpp | 8 ++++++-- 4 files changed, 24 insertions(+), 8 deletions(-) diff --git a/xml_converter/src/attribute/bool.hpp b/xml_converter/src/attribute/bool.hpp index 07d5f8fb..f0d8d582 100644 --- a/xml_converter/src/attribute/bool.hpp +++ b/xml_converter/src/attribute/bool.hpp @@ -12,5 +12,9 @@ bool parse_bool(rapidxml::xml_attribute<>* input, std::vector* errors std::string stringify_bool(bool attribute_value); // Zero Cost Abstraction identity functions to make parsing and writing protobufs more uniform -inline bool const& from_proto_bool(const bool &x) {return x;} -inline bool const& to_proto_bool(const bool &x) {return x;} +inline bool const& from_proto_bool(const bool& x) { + return x; +} +inline bool const& to_proto_bool(const bool& x) { + return x; +} diff --git a/xml_converter/src/attribute/float.hpp b/xml_converter/src/attribute/float.hpp index 4e325512..003dfba0 100644 --- a/xml_converter/src/attribute/float.hpp +++ b/xml_converter/src/attribute/float.hpp @@ -12,5 +12,9 @@ float parse_float(rapidxml::xml_attribute<>* input, std::vector* erro std::string stringify_float(float attribute_value); // Zero Cost Abstraction identity functions to make parsing and writing protobufs more uniform -inline float const& from_proto_float(const float &x) {return x;} -inline float const& to_proto_float(const float &x) {return x;} +inline float const& from_proto_float(const float& x) { + return x; +} +inline float const& to_proto_float(const float& x) { + return x; +} diff --git a/xml_converter/src/attribute/int.hpp b/xml_converter/src/attribute/int.hpp index fd6539ea..4c3446be 100644 --- a/xml_converter/src/attribute/int.hpp +++ b/xml_converter/src/attribute/int.hpp @@ -12,5 +12,9 @@ int parse_int(rapidxml::xml_attribute<>* input, std::vector* errors); std::string stringify_int(int attribute_value); // Zero Cost Abstraction identity functions to make parsing and writing protobufs more uniform -inline int const& from_proto_int(const int &x) {return x;} -inline int const& to_proto_int(const int &x) {return x;} +inline int const& from_proto_int(const int& x) { + return x; +} +inline int const& to_proto_int(const int& x) { + return x; +} diff --git a/xml_converter/src/attribute/string.hpp b/xml_converter/src/attribute/string.hpp index e5988178..a693f834 100644 --- a/xml_converter/src/attribute/string.hpp +++ b/xml_converter/src/attribute/string.hpp @@ -12,5 +12,9 @@ std::string parse_string(rapidxml::xml_attribute<>* input, std::vector Date: Wed, 4 Oct 2023 10:36:45 -0500 Subject: [PATCH 249/539] passing the initalizer list by reference --- xml_converter/src/string_hierarchy.cpp | 4 ++-- xml_converter/src/string_hierarchy.hpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/xml_converter/src/string_hierarchy.cpp b/xml_converter/src/string_hierarchy.cpp index 62b3c35b..f14fe51b 100644 --- a/xml_converter/src/string_hierarchy.cpp +++ b/xml_converter/src/string_hierarchy.cpp @@ -37,7 +37,7 @@ bool StringHierarchy::in_hierarchy( // ambiguity between the vector and string overloads of the function. //////////////////////////////////////////////////////////////////////////////// bool StringHierarchy::in_hierarchy( - const std::initializer_list input) const { + const std::initializer_list &input) const { std::vector vec; vec.insert(vec.end(), input.begin(), input.end()); return this->in_hierarchy(vec); @@ -95,7 +95,7 @@ const StringHierarchy *StringHierarchy::sub_hierarchy( // prevent ambiguity between the vector and string overloads of the function. //////////////////////////////////////////////////////////////////////////////// const StringHierarchy *StringHierarchy::sub_hierarchy( - const std::initializer_list input) const { + const std::initializer_list &input) const { std::vector vec; vec.insert(vec.end(), input.begin(), input.end()); return this->sub_hierarchy(vec); diff --git a/xml_converter/src/string_hierarchy.hpp b/xml_converter/src/string_hierarchy.hpp index 3b323b11..594300ba 100644 --- a/xml_converter/src/string_hierarchy.hpp +++ b/xml_converter/src/string_hierarchy.hpp @@ -13,13 +13,13 @@ class StringHierarchy { const std::vector &path) const; bool in_hierarchy( - const std::initializer_list) const; + const std::initializer_list &input) const; const StringHierarchy *sub_hierarchy( const std::string &node) const; const StringHierarchy *sub_hierarchy( - const std::initializer_list input) const; + const std::initializer_list &input) const; const StringHierarchy *sub_hierarchy( const std::vector &path) const; From 83d1a6000ed22744701cd9844cf8f92de6e51eb6 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Wed, 4 Oct 2023 10:40:02 -0500 Subject: [PATCH 250/539] Removing the unnecessary output directory creation --- .github/workflows/main.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1daa402b..10fe6080 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -35,9 +35,6 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - name: Create the Output Directory - run: mkdir -v -p output - # IWYU is disabled for now due to noise. It will be re-enabled at a later date # # `clang-9` must be installed here because of a weird unlisted dependency # # on some sort of file that clang-9 installs. Without it iwyu would @@ -91,9 +88,6 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - name: Create the Output Directory - run: mkdir -v -p output - - name: Install mingw run: sudo apt-get install gcc-mingw-w64 @@ -151,9 +145,6 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - name: Create the Output Directory - run: mkdir -v -p output - # - name: Cache Godot # id: cache-godot # uses: actions/cache@v2 From 274a8d53caebdc3c021e8c7f59c0381af16a7aba Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Thu, 5 Oct 2023 15:48:44 -0500 Subject: [PATCH 251/539] Speeding up test compilation by re-using the main executable compile steps The previous version of the code recompiled all of the main executable files because they were linked as part of the source code. Now the core modules, everything except for `xml_converter.cpp` are compiled into a library first, then that library is used when linking against the main executable and the test framework executable. --- xml_converter/CMakeLists.txt | 49 +++++++++++-------- xml_converter/tests/main_test.cpp | 7 +++ xml_converter/tests/test_string_hierarchy.cpp | 5 -- 3 files changed, 35 insertions(+), 26 deletions(-) create mode 100644 xml_converter/tests/main_test.cpp diff --git a/xml_converter/CMakeLists.txt b/xml_converter/CMakeLists.txt index cc1e940d..db9747f3 100644 --- a/xml_converter/CMakeLists.txt +++ b/xml_converter/CMakeLists.txt @@ -3,49 +3,56 @@ project (XMLConverter) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + +### Shared Infrastructure ###################################################### +set(CORE_LIB core_lib) + # Generate Protobuf FIND_PACKAGE(Protobuf REQUIRED) INCLUDE_DIRECTORIES(${PROTOBUF_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) PROTOBUF_GENERATE_CPP(PROTO_SRC PROTO_HEADER proto/waypoint.proto) -# Name Output File -set(TARGET_NAME xml_converter) - # Add Dependencies file(GLOB_RECURSE SOURCES "src/*.cpp") +list(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/xml_converter.cpp") -# Set output as executable. -# TODO: This will eventually become a library when it gets integrated into burrito. -add_executable (${TARGET_NAME} ${SOURCES} ${PROTO_SRC}) +# Create a static library for common sources +add_library(${CORE_LIB} STATIC ${SOURCES} ${PROTO_SRC}) -# include libraies -target_link_libraries(${TARGET_NAME} ${Protobuf_LIBRARIES}) +# Include protobuf libraies. +target_link_libraries(${CORE_LIB} PUBLIC ${Protobuf_LIBRARIES}) # Require C++ 17 or newer. -target_compile_features(${TARGET_NAME} PRIVATE cxx_std_17) - -# Enable Extra Warnings and Errors +target_compile_features(${CORE_LIB} PUBLIC cxx_std_17) if(MSVC) - target_compile_options(${TARGET_NAME} PRIVATE /W4 /WX) + target_compile_options(${CORE_LIB} PUBLIC /W4 /WX) else() - target_compile_options(${TARGET_NAME} PRIVATE -Wall -Wextra -Wpedantic) + target_compile_options(${CORE_LIB} PUBLIC -Wall -Wextra -Wpedantic) endif() + +### CLI Executable ############################################################# +# Name Output File +set(TARGET_NAME xml_converter) + +# Set output as executable. +add_executable(${TARGET_NAME} src/xml_converter.cpp) +target_link_libraries(${TARGET_NAME} ${CORE_LIB}) + + ### TESTS ###################################################################### -# Enable testing using CMake's built-in functionality -enable_testing() +set(TEST_TARGET_NAME test_xml_converter) -set(TEST_TARGET_NAME xml_converter_tests) +# Enable testing using CMake's built-in functionality to be able to run `make test` +enable_testing() -file(GLOB_RECURSE TEST_SOURCES "src/*.cpp") -list(REMOVE_ITEM TEST_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/xml_converter.cpp") +file(GLOB_RECURSE TEST_SOURCES "tests/*.cpp") find_package(GTest REQUIRED) -add_executable(${TEST_TARGET_NAME} tests/test_string_hierarchy.cpp ${TEST_SOURCES} ${PROTO_SRC}) - +add_executable(${TEST_TARGET_NAME} ${TEST_SOURCES}) target_link_libraries(${TEST_TARGET_NAME} GTest::GTest GTest::Main) -target_link_libraries(${TEST_TARGET_NAME} ${Protobuf_LIBRARIES}) +target_link_libraries(${TEST_TARGET_NAME} ${CORE_LIB}) gtest_discover_tests(${TEST_TARGET_NAME}) diff --git a/xml_converter/tests/main_test.cpp b/xml_converter/tests/main_test.cpp new file mode 100644 index 00000000..d38e07b9 --- /dev/null +++ b/xml_converter/tests/main_test.cpp @@ -0,0 +1,7 @@ +#include "gtest/gtest.h" + +int main(int argc, char **argv) { + // return 23; + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} diff --git a/xml_converter/tests/test_string_hierarchy.cpp b/xml_converter/tests/test_string_hierarchy.cpp index 4e2d84c8..5b09b71a 100644 --- a/xml_converter/tests/test_string_hierarchy.cpp +++ b/xml_converter/tests/test_string_hierarchy.cpp @@ -111,8 +111,3 @@ TEST_F(StringHierarchyTest, SubHierarchySingle) { EXPECT_TRUE(sub_hierarchy->in_hierarchy("child1")); EXPECT_TRUE(sub_hierarchy->in_hierarchy({"child1", "child2"})); } - -int main(int argc, char **argv) { - ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} \ No newline at end of file From 0ec4c7435ad5fd070c2fddcc9e4d45ea08868f95 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Thu, 5 Oct 2023 15:54:20 -0500 Subject: [PATCH 252/539] removing forgotten comment --- xml_converter/tests/main_test.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/xml_converter/tests/main_test.cpp b/xml_converter/tests/main_test.cpp index d38e07b9..dc42b1a7 100644 --- a/xml_converter/tests/main_test.cpp +++ b/xml_converter/tests/main_test.cpp @@ -1,7 +1,6 @@ #include "gtest/gtest.h" int main(int argc, char **argv) { - // return 23; ::testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); } From 760d9e0a54a4e8b62d317b3506aa8e7d3b833390 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sat, 7 Oct 2023 13:09:30 -0400 Subject: [PATCH 253/539] Addressing code review --- Spatial.gd | 89 ++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 57 insertions(+), 32 deletions(-) diff --git a/Spatial.gd b/Spatial.gd index 0ab2d1d7..92b6d773 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -48,6 +48,20 @@ var taco_parser: TacoParser var x11_window_id_burrito: int var is_transient:bool = false +# Scenes used throughout this scene +var route_scene = load("res://Route.tscn") +var icon_scene = load("res://Icon.tscn") +var path2d_scene = load("res://Route2D.tscn") +var gizmo_scene = load("res://Gizmo/PointEdit.tscn") + +##########Node Connections########### +onready var marker_packs := $Control/Dialogs/MarkerPacks/MarkerPacks as Tree +onready var root := self.marker_packs.create_item() as TreeItem +onready var icons := $Icons as Spatial +onready var paths := $Paths as Spatial +onready var minimap := $Control/MiniMap as Node2D + + # Called when the node enters the scene tree for the first time. func _ready(): get_tree().get_root().set_transparent_background(true) @@ -60,8 +74,7 @@ func _ready(): # Postion at top left corner OS.set_window_position(Vector2(0,0)) set_minimal_mouse_block() - init_category_tree() - marker_file_dir.open("user://protobins/") + server.listen(4242) func set_minimal_mouse_block(): @@ -285,39 +298,26 @@ func reset_minimap_masks(): minimap_path.material.set_shader_param("minimap_corner", compass_corner1) minimap_path.material.set_shader_param("minimap_corner2", compass_corner2) -var Waypoint_data = Waypoint.Waypoint.new() -var marker_file_dir = Directory.new() +var waypoint_data = Waypoint.Waypoint.new() +var marker_file_dir = "user://protobins/" var marker_file_path = "" -var root: TreeItem - -##########Node Connections########### -onready var marker_packs = $Control/Dialogs/MarkerPacks/MarkerPacks -onready var icons = $Icons -onready var paths = $Paths -onready var minimap = $Control/MiniMap - func load_waypoint_markers(map_id): - self.marker_file_path = self.marker_file_dir.get_current_dir() + String(map_id) + ".data" - self.Waypoint_data.clear_category() + self.marker_file_path = self.marker_file_dir + String(map_id) + ".data" + self.waypoint_data.clear_category() clear_map_markers() - root.free() init_category_tree() var file = File.new() print("Loading protobuf file from path ", self.marker_file_path) file.open(self.marker_file_path, file.READ) var data = file.get_buffer(file.get_len()) - self.Waypoint_data.from_bytes(data) + self.waypoint_data.from_bytes(data) if !Waypoint.PB_ERR.NO_ERRORS: print("OK") else: print(Waypoint.PB_ERR) - parse_Waypoint() + Waypoint_categories_to_godot_nodes() -var route_scene = load("res://Route.tscn") -var icon_scene = load("res://Icon.tscn") -var path2d_scene = load("res://Route2D.tscn") -var gizmo_scene = load("res://Gizmo/PointEdit.tscn") ##########Gizmo Stuff########### # How long the ray to search for 3D clickable object should be. @@ -409,12 +409,12 @@ func init_category_tree(): root.set_text(1, "Visible") -func parse_Waypoint(): - for category in self.Waypoint_data.get_category(): - parse_category(root, category, category.get_name(), false) +func Waypoint_categories_to_godot_nodes(): + for category in self.waypoint_data.get_category(): + _Waypoint_categories_to_godot_nodes(root, category, category.get_name(), false) -func parse_category(item: TreeItem, category, full_category_name: String, collapsed: bool): +func _Waypoint_categories_to_godot_nodes(item: TreeItem, category, full_category_name: String, collapsed: bool): var category_item = self.marker_packs.create_item(item) if category.get_name() == "": # If this is called, there is an error in the Waypoint data @@ -441,7 +441,7 @@ func parse_category(item: TreeItem, category, full_category_name: String, collap if texture_path == null: print("Warning: No texture found in " , full_category_name) continue - var full_texture_path = self.marker_file_dir.get_current_dir() + texture_path.get_path() + var full_texture_path = self.marker_file_dir + texture_path.get_path() gen_new_path(path_points, full_texture_path, path, category_item) for icon in category.get_icon(): @@ -454,11 +454,11 @@ func parse_category(item: TreeItem, category, full_category_name: String, collap if texture_path == null: print("Warning: No texture found in " , full_category_name) continue - var full_texture_path = self.marker_file_dir.get_current_dir() + texture_path.get_path() + var full_texture_path = self.marker_file_dir + texture_path.get_path() gen_new_icon(position_vector, full_texture_path, icon, category_item) for category_child in category.get_children(): - parse_category(category_item, category_child, full_category_name + "." + category_child.get_name(), true) + _Waypoint_categories_to_godot_nodes(category_item, category_child, full_category_name + "." + category_child.get_name(), true) func apply_category_visibility_to_nodes(category_item: TreeItem): @@ -565,7 +565,31 @@ func gen_new_icon(position: Vector3, texture_path: String, waypoint_icon, catego new_icon.visible = false icons.add_child(new_icon) +# This function take all of the currently rendered objects and converts it into +# the data format that is saved/loaded from. +func data_from_renderview(): + var icons_data = [] + var paths_data = [] + for icon in $Icons.get_children(): + icons_data.append({ + "position": [icon.translation.x, icon.translation.y, -icon.translation.z], + "texture": icon.texture_path + }) + + for path in $Paths.get_children(): + #print(path) + var points = [] + for point in range(path.get_point_count()): + var point_position:Vector3 = path.get_point_position(point) + points.append([point_position.x, point_position.y, -point_position.z]) + paths_data.append({ + "points": points, + "texture": path.texture_path + }) + + var data_out = {"icons": icons_data, "paths": paths_data} + return data_out ################################################################################ # Adjustment and gizmo functions @@ -737,15 +761,16 @@ func _on_NewPathPoint_pressed(): # ################################################################################ func _on_SavePath_pressed(): - #TODO: Save to Waypoint - pass + $Control/Dialogs/SaveDialog.show() ################################################################################ # TODO: This function will be used when exporting packs ################################################################################ func _on_SaveDialog_file_selected(path): - pass - + self.markerdata[str(self.map_id)] = data_from_renderview() + var save_game = File.new() + save_game.open(path, File.WRITE) + save_game.store_string(JSON.print(self.markerdata)) func _on_NodeEditorDialog_hide(): self.currently_selected_node = null From 8d1eb3c09500f865dc815050203eafe60374b75f Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 8 Oct 2023 15:32:43 -0400 Subject: [PATCH 254/539] Removed capital letters --- Spatial.gd | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Spatial.gd b/Spatial.gd index 92b6d773..b2f8d666 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -316,7 +316,7 @@ func load_waypoint_markers(map_id): print("OK") else: print(Waypoint.PB_ERR) - Waypoint_categories_to_godot_nodes() + waypoint_categories_to_godot_nodes() ##########Gizmo Stuff########### @@ -409,12 +409,12 @@ func init_category_tree(): root.set_text(1, "Visible") -func Waypoint_categories_to_godot_nodes(): +func waypoint_categories_to_godot_nodes(): for category in self.waypoint_data.get_category(): - _Waypoint_categories_to_godot_nodes(root, category, category.get_name(), false) + _waypoint_categories_to_godot_nodes(root, category, category.get_name(), false) -func _Waypoint_categories_to_godot_nodes(item: TreeItem, category, full_category_name: String, collapsed: bool): +func _waypoint_categories_to_godot_nodes(item: TreeItem, category, full_category_name: String, collapsed: bool): var category_item = self.marker_packs.create_item(item) if category.get_name() == "": # If this is called, there is an error in the Waypoint data @@ -458,7 +458,7 @@ func _Waypoint_categories_to_godot_nodes(item: TreeItem, category, full_category gen_new_icon(position_vector, full_texture_path, icon, category_item) for category_child in category.get_children(): - _Waypoint_categories_to_godot_nodes(category_item, category_child, full_category_name + "." + category_child.get_name(), true) + _waypoint_categories_to_godot_nodes(category_item, category_child, full_category_name + "." + category_child.get_name(), true) func apply_category_visibility_to_nodes(category_item: TreeItem): From 75bf1e1b5f57f3fe1a907b890bc73bfd0324052d Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Mon, 9 Oct 2023 04:15:28 -0500 Subject: [PATCH 255/539] Converting GUID to be a scalar string value in protobuf --- xml_converter/doc/trigger/guid.md | 1 + xml_converter/generators/code_generator.py | 10 ++++++++++ .../generators/cpp_templates/class_template.cpp | 8 ++++---- xml_converter/proto/waypoint.proto | 8 ++------ xml_converter/src/attribute/unique_id.cpp | 12 ++++-------- xml_converter/src/attribute/unique_id.hpp | 4 ++-- xml_converter/src/icon_gen.cpp | 4 ++-- xml_converter/src/trail_gen.cpp | 4 ++-- 8 files changed, 27 insertions(+), 24 deletions(-) diff --git a/xml_converter/doc/trigger/guid.md b/xml_converter/doc/trigger/guid.md index ad4a8094..13f5e881 100644 --- a/xml_converter/doc/trigger/guid.md +++ b/xml_converter/doc/trigger/guid.md @@ -5,6 +5,7 @@ class: UniqueId xml_fields: ["GUID"] applies_to: ["Icon", "Trail"] protobuf_field: guid +ptotobuf_type: "String" --- A globally unique identifier value to make sure this maker's trigger reset data is always assocaited with this marker and never lost or confused with other markers. diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 0c814949..1922da6f 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -70,6 +70,7 @@ optional={ "side_effects": array_t(string_t()), "uses_file_path": boolean_t(), + "ptotobuf_type": enum_t(["Int32", "Fixed32", "Float32", "String"]), } ), }) @@ -167,6 +168,9 @@ class AttributeVariable: uses_file_path: bool = False is_component: bool = False + # A flag to override the type that should be used when writing or reading from a protobuf + ptotobuf_type: Optional[str] = None + XML_ATTRIBUTE_PARSER_DEFAULT_ARGUMENTS: Final[List[str]] = ["attribute", "errors"] @@ -413,6 +417,11 @@ def generate_cpp_variable_data( if fieldval['xml_bundled_components'] == []: write_to_xml = False + ptotobuf_type = None + if "ptotobuf_type" in fieldval: + ptotobuf_type = fieldval["ptotobuf_type"] + + attribute_variable = AttributeVariable( attribute_name=attribute_name, attribute_type=fieldval["type"], @@ -427,6 +436,7 @@ def generate_cpp_variable_data( write_to_xml=write_to_xml, attribute_flag_name=attribute_name + "_is_set", side_effects=side_effects, + ptotobuf_type=ptotobuf_type ) attribute_variables.append(attribute_variable) diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index 1c01c3ed..8c98652c 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -98,7 +98,7 @@ waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf() const { {% for attribute_variable in attribute_variables %} {% if attribute_variable.is_component == false %} if (this->{{attribute_variable.attribute_flag_name}}) { - {% if (attribute_variable.attribute_type in ["MultiflagValue", "CompoundValue", "Custom", "CompoundCustomClass"]) %} + {% if (attribute_variable.ptotobuf_type or attribute_variable.attribute_type) in ["MultiflagValue", "CompoundValue", "Custom", "CompoundCustomClass"] %} proto_{{cpp_class_header}}.{{attribute_variable.mutable_proto_drilldown_calls}}set_allocated_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); {% else %} proto_{{cpp_class_header}}.{{attribute_variable.mutable_proto_drilldown_calls}}set_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); @@ -112,11 +112,11 @@ waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf() const { void {{cpp_class}}::parse_protobuf(waypoint::{{cpp_class}} proto_{{cpp_class_header}}) { {% for attribute_variable in attribute_variables %} {% if attribute_variable.is_component == false %} - {% if (attribute_variable.attribute_type in ["MultiflagValue", "CompoundValue", "Custom", "CompoundCustomClass"]) %} + {% if (attribute_variable.ptotobuf_type or attribute_variable.attribute_type) in ["MultiflagValue", "CompoundValue", "Custom", "CompoundCustomClass"] %} if (proto_{{cpp_class_header}}{{attribute_variable.proto_drilldown_calls}}.has_{{attribute_variable.protobuf_field}}()) { - {% elif (attribute_variable.attribute_type == "String") %} + {% elif (attribute_variable.ptotobuf_type or attribute_variable.attribute_type) == "String" %} if (proto_{{cpp_class_header}}{{attribute_variable.proto_drilldown_calls}}.{{attribute_variable.protobuf_field}}() != "") { - {% elif (attribute_variable.attribute_type == "Enum") %} + {% elif (attribute_variable.ptotobuf_type or attribute_variable.attribute_type) == "Enum" %} if (proto_{{cpp_class_header}}{{attribute_variable.proto_drilldown_calls}}.{{attribute_variable.protobuf_field}}() != 0) { {% else %} if (proto_{{cpp_class_header}}{{attribute_variable.proto_drilldown_calls}}.{{attribute_variable.protobuf_field}}() != 0) { diff --git a/xml_converter/proto/waypoint.proto b/xml_converter/proto/waypoint.proto index ab239d57..bfc2f74f 100644 --- a/xml_converter/proto/waypoint.proto +++ b/xml_converter/proto/waypoint.proto @@ -19,7 +19,7 @@ message Category { message Icon { TexturePath texture_path = 2; - GUID guid = 3; + bytes guid = 3; int32 map_id = 4; float distance_fade_end = 5; float distance_fade_start = 6; @@ -57,7 +57,7 @@ message Icon { message Trail { TexturePath texture_path = 2; - GUID guid = 3; + bytes guid = 3; int32 map_id = 4; float distance_fade_end = 5; float distance_fade_start = 6; @@ -125,10 +125,6 @@ message Trigger { ResetBehavior reset_behavior = 15; } -message GUID { - bytes guid = 1; -} - enum CullChirality { none = 0; clockwise = 1; diff --git a/xml_converter/src/attribute/unique_id.cpp b/xml_converter/src/attribute/unique_id.cpp index 5de78428..abad77ec 100644 --- a/xml_converter/src/attribute/unique_id.cpp +++ b/xml_converter/src/attribute/unique_id.cpp @@ -25,17 +25,13 @@ string stringify_unique_id(UniqueId attribute_value) { return base64_encode(&attribute_value.guid[0], attribute_value.guid.size()); } -waypoint::GUID* to_proto_unique_id(UniqueId attribute_value) { - waypoint::GUID* guid = new waypoint::GUID(); - std::string s(attribute_value.guid.begin(), attribute_value.guid.end()); - guid->set_guid(s); - return guid; +string to_proto_unique_id(UniqueId attribute_value) { + return std::string(attribute_value.guid.begin(), attribute_value.guid.end()); } -UniqueId from_proto_unique_id(waypoint::GUID attribute_value) { +UniqueId from_proto_unique_id(string attribute_value) { UniqueId unique_id; - string s = attribute_value.guid(); - std::vector guid(s.begin(), s.end()); + std::vector guid(attribute_value.begin(), attribute_value.end()); unique_id.guid = guid; return unique_id; } diff --git a/xml_converter/src/attribute/unique_id.hpp b/xml_converter/src/attribute/unique_id.hpp index 44755836..59853469 100644 --- a/xml_converter/src/attribute/unique_id.hpp +++ b/xml_converter/src/attribute/unique_id.hpp @@ -20,6 +20,6 @@ UniqueId parse_unique_id(rapidxml::xml_attribute<>* input, std::vectorfestival_filter)); } if (this->guid_is_set) { - proto_icon.set_allocated_guid(to_proto_unique_id(this->guid)); + proto_icon.set_guid(to_proto_unique_id(this->guid)); } if (this->has_countdown_is_set) { proto_icon.mutable_trigger()->set_has_countdown(to_proto_bool(this->has_countdown)); @@ -689,7 +689,7 @@ void Icon::parse_protobuf(waypoint::Icon proto_icon) { this->festival_filter = from_proto_festival_filter(proto_icon.festival_filter()); this->festival_filter_is_set = true; } - if (proto_icon.has_guid()) { + if (proto_icon.guid() != "") { this->guid = from_proto_unique_id(proto_icon.guid()); this->guid_is_set = true; } diff --git a/xml_converter/src/trail_gen.cpp b/xml_converter/src/trail_gen.cpp index 2d6210e7..26881f17 100644 --- a/xml_converter/src/trail_gen.cpp +++ b/xml_converter/src/trail_gen.cpp @@ -319,7 +319,7 @@ waypoint::Trail Trail::as_protobuf() const { proto_trail.set_allocated_festival_filter(to_proto_festival_filter(this->festival_filter)); } if (this->guid_is_set) { - proto_trail.set_allocated_guid(to_proto_unique_id(this->guid)); + proto_trail.set_guid(to_proto_unique_id(this->guid)); } if (this->is_wall_is_set) { proto_trail.set_is_wall(to_proto_bool(this->is_wall)); @@ -413,7 +413,7 @@ void Trail::parse_protobuf(waypoint::Trail proto_trail) { this->festival_filter = from_proto_festival_filter(proto_trail.festival_filter()); this->festival_filter_is_set = true; } - if (proto_trail.has_guid()) { + if (proto_trail.guid() != "") { this->guid = from_proto_unique_id(proto_trail.guid()); this->guid_is_set = true; } From 5b72f6247cee6d637092d73824847a3dfc182a1b Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Mon, 9 Oct 2023 04:18:52 -0500 Subject: [PATCH 256/539] removing extra line warning from python linter --- xml_converter/generators/code_generator.py | 1 - 1 file changed, 1 deletion(-) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 1922da6f..6f60cf58 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -421,7 +421,6 @@ def generate_cpp_variable_data( if "ptotobuf_type" in fieldval: ptotobuf_type = fieldval["ptotobuf_type"] - attribute_variable = AttributeVariable( attribute_name=attribute_name, attribute_type=fieldval["type"], From 7e8cd83f7620910e684062ff016fa1b0494739bc Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Mon, 9 Oct 2023 04:42:29 -0500 Subject: [PATCH 257/539] simplifying genrator code with sane default value setting --- xml_converter/generators/code_generator.py | 8 ++++++-- xml_converter/generators/cpp_templates/class_template.cpp | 8 ++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 6f60cf58..7d2235b3 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -169,7 +169,11 @@ class AttributeVariable: is_component: bool = False # A flag to override the type that should be used when writing or reading from a protobuf - ptotobuf_type: Optional[str] = None + ptotobuf_type: str = "" + + def __post_init__(self) -> None: + if self.ptotobuf_type == "": + self.ptotobuf_type = self.attribute_type XML_ATTRIBUTE_PARSER_DEFAULT_ARGUMENTS: Final[List[str]] = ["attribute", "errors"] @@ -417,7 +421,7 @@ def generate_cpp_variable_data( if fieldval['xml_bundled_components'] == []: write_to_xml = False - ptotobuf_type = None + ptotobuf_type = "" if "ptotobuf_type" in fieldval: ptotobuf_type = fieldval["ptotobuf_type"] diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index 8c98652c..3009e8ab 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -98,7 +98,7 @@ waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf() const { {% for attribute_variable in attribute_variables %} {% if attribute_variable.is_component == false %} if (this->{{attribute_variable.attribute_flag_name}}) { - {% if (attribute_variable.ptotobuf_type or attribute_variable.attribute_type) in ["MultiflagValue", "CompoundValue", "Custom", "CompoundCustomClass"] %} + {% if attribute_variable.ptotobuf_type in ["MultiflagValue", "CompoundValue", "Custom", "CompoundCustomClass"] %} proto_{{cpp_class_header}}.{{attribute_variable.mutable_proto_drilldown_calls}}set_allocated_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); {% else %} proto_{{cpp_class_header}}.{{attribute_variable.mutable_proto_drilldown_calls}}set_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); @@ -112,11 +112,11 @@ waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf() const { void {{cpp_class}}::parse_protobuf(waypoint::{{cpp_class}} proto_{{cpp_class_header}}) { {% for attribute_variable in attribute_variables %} {% if attribute_variable.is_component == false %} - {% if (attribute_variable.ptotobuf_type or attribute_variable.attribute_type) in ["MultiflagValue", "CompoundValue", "Custom", "CompoundCustomClass"] %} + {% if attribute_variable.ptotobuf_type in ["MultiflagValue", "CompoundValue", "Custom", "CompoundCustomClass"] %} if (proto_{{cpp_class_header}}{{attribute_variable.proto_drilldown_calls}}.has_{{attribute_variable.protobuf_field}}()) { - {% elif (attribute_variable.ptotobuf_type or attribute_variable.attribute_type) == "String" %} + {% elif attribute_variable.ptotobuf_type == "String" %} if (proto_{{cpp_class_header}}{{attribute_variable.proto_drilldown_calls}}.{{attribute_variable.protobuf_field}}() != "") { - {% elif (attribute_variable.ptotobuf_type or attribute_variable.attribute_type) == "Enum" %} + {% elif attribute_variable.ptotobuf_type == "Enum" %} if (proto_{{cpp_class_header}}{{attribute_variable.proto_drilldown_calls}}.{{attribute_variable.protobuf_field}}() != 0) { {% else %} if (proto_{{cpp_class_header}}{{attribute_variable.proto_drilldown_calls}}.{{attribute_variable.protobuf_field}}() != 0) { From 0ceba3d397e6aeb7a39011b27258dcaffcd1d7cb Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Mon, 9 Oct 2023 04:43:40 -0500 Subject: [PATCH 258/539] fixing a typo --- xml_converter/doc/trigger/guid.md | 2 +- xml_converter/generators/code_generator.py | 16 ++++++++-------- .../generators/cpp_templates/class_template.cpp | 8 ++++---- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/xml_converter/doc/trigger/guid.md b/xml_converter/doc/trigger/guid.md index 13f5e881..a25d39f7 100644 --- a/xml_converter/doc/trigger/guid.md +++ b/xml_converter/doc/trigger/guid.md @@ -5,7 +5,7 @@ class: UniqueId xml_fields: ["GUID"] applies_to: ["Icon", "Trail"] protobuf_field: guid -ptotobuf_type: "String" +protobuf_type: String --- A globally unique identifier value to make sure this maker's trigger reset data is always assocaited with this marker and never lost or confused with other markers. diff --git a/xml_converter/generators/code_generator.py b/xml_converter/generators/code_generator.py index 7d2235b3..1e3cc815 100644 --- a/xml_converter/generators/code_generator.py +++ b/xml_converter/generators/code_generator.py @@ -70,7 +70,7 @@ optional={ "side_effects": array_t(string_t()), "uses_file_path": boolean_t(), - "ptotobuf_type": enum_t(["Int32", "Fixed32", "Float32", "String"]), + "protobuf_type": enum_t(["Int32", "Fixed32", "Float32", "String"]), } ), }) @@ -169,11 +169,11 @@ class AttributeVariable: is_component: bool = False # A flag to override the type that should be used when writing or reading from a protobuf - ptotobuf_type: str = "" + protobuf_type: str = "" def __post_init__(self) -> None: - if self.ptotobuf_type == "": - self.ptotobuf_type = self.attribute_type + if self.protobuf_type == "": + self.protobuf_type = self.attribute_type XML_ATTRIBUTE_PARSER_DEFAULT_ARGUMENTS: Final[List[str]] = ["attribute", "errors"] @@ -421,9 +421,9 @@ def generate_cpp_variable_data( if fieldval['xml_bundled_components'] == []: write_to_xml = False - ptotobuf_type = "" - if "ptotobuf_type" in fieldval: - ptotobuf_type = fieldval["ptotobuf_type"] + protobuf_type = "" + if "protobuf_type" in fieldval: + protobuf_type = fieldval["protobuf_type"] attribute_variable = AttributeVariable( attribute_name=attribute_name, @@ -439,7 +439,7 @@ def generate_cpp_variable_data( write_to_xml=write_to_xml, attribute_flag_name=attribute_name + "_is_set", side_effects=side_effects, - ptotobuf_type=ptotobuf_type + protobuf_type=protobuf_type ) attribute_variables.append(attribute_variable) diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index 3009e8ab..c2081d8a 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -98,7 +98,7 @@ waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf() const { {% for attribute_variable in attribute_variables %} {% if attribute_variable.is_component == false %} if (this->{{attribute_variable.attribute_flag_name}}) { - {% if attribute_variable.ptotobuf_type in ["MultiflagValue", "CompoundValue", "Custom", "CompoundCustomClass"] %} + {% if attribute_variable.protobuf_type in ["MultiflagValue", "CompoundValue", "Custom", "CompoundCustomClass"] %} proto_{{cpp_class_header}}.{{attribute_variable.mutable_proto_drilldown_calls}}set_allocated_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); {% else %} proto_{{cpp_class_header}}.{{attribute_variable.mutable_proto_drilldown_calls}}set_{{attribute_variable.protobuf_field}}(to_proto_{{attribute_variable.class_name}}(this->{{attribute_variable.attribute_name}})); @@ -112,11 +112,11 @@ waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf() const { void {{cpp_class}}::parse_protobuf(waypoint::{{cpp_class}} proto_{{cpp_class_header}}) { {% for attribute_variable in attribute_variables %} {% if attribute_variable.is_component == false %} - {% if attribute_variable.ptotobuf_type in ["MultiflagValue", "CompoundValue", "Custom", "CompoundCustomClass"] %} + {% if attribute_variable.protobuf_type in ["MultiflagValue", "CompoundValue", "Custom", "CompoundCustomClass"] %} if (proto_{{cpp_class_header}}{{attribute_variable.proto_drilldown_calls}}.has_{{attribute_variable.protobuf_field}}()) { - {% elif attribute_variable.ptotobuf_type == "String" %} + {% elif attribute_variable.protobuf_type == "String" %} if (proto_{{cpp_class_header}}{{attribute_variable.proto_drilldown_calls}}.{{attribute_variable.protobuf_field}}() != "") { - {% elif attribute_variable.ptotobuf_type == "Enum" %} + {% elif attribute_variable.protobuf_type == "Enum" %} if (proto_{{cpp_class_header}}{{attribute_variable.proto_drilldown_calls}}.{{attribute_variable.protobuf_field}}() != 0) { {% else %} if (proto_{{cpp_class_header}}{{attribute_variable.proto_drilldown_calls}}.{{attribute_variable.protobuf_field}}() != 0) { From 8cd90dbd78ddb83ddae8a2b23e62826009d331ab Mon Sep 17 00:00:00 2001 From: klingbolt Date: Tue, 17 Oct 2023 20:34:28 -0400 Subject: [PATCH 259/539] Allows files and directories to inputs and handles them based on type --- xml_converter/src/xml_converter.cpp | 37 ++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 6 deletions(-) diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index cb39da84..d0838e2e 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include @@ -89,16 +90,40 @@ void move_supplementary_files(string input_directory, string output_directory) { } } -void read_taco_directory(string directory, map* marker_categories, vector* parsed_pois) { - vector xml_files = get_files_by_suffix(directory, ".xml"); - for (const string& path : xml_files) { - parse_xml_file(path, marker_categories, parsed_pois); +void read_taco_directory(string input_path, map* marker_categories, vector* parsed_pois) { + if (filesystem::is_regular_file(input_path)) { + if (has_suffix(input_path, ".xml")) { + parse_xml_file(input_path, marker_categories, parsed_pois); + } + else { + cout << "Error: " << input_path << " is a file that does not end in .xml" << endl; + } + } + else if (filesystem::is_directory(input_path)) { + vector xml_files = get_files_by_suffix(input_path, ".xml"); + for (const string& path : xml_files) { + parse_xml_file(path, marker_categories, parsed_pois); + } + } + else { + cout << "Error: Unknown file type" << endl; } } -void write_taco_directory(string directory, map* marker_categories, vector* parsed_pois) { +void write_taco_directory(string output_path, map* marker_categories, vector* parsed_pois) { // TODO: Exportion of XML Marker Packs File Structure #111 - string xml_filepath = directory + "xml_file.xml"; + string xml_filepath; + if (filesystem::is_regular_file(output_path)) { + if (has_suffix(output_path, ".xml")) { + xml_filepath = output_path; + } + else { + xml_filepath = output_path + "xml_file.xml"; + } + } + else { + xml_filepath = output_path + "xml_file.xml"; + } write_xml_file(xml_filepath, marker_categories, parsed_pois); } From 96f7b7c718c05f2483a28772c6f114411903f543 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 22 Oct 2023 15:17:43 -0400 Subject: [PATCH 260/539] Removing requirement that files end in .xml --- xml_converter/src/xml_converter.cpp | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index d0838e2e..44b9067e 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -91,13 +91,8 @@ void move_supplementary_files(string input_directory, string output_directory) { } void read_taco_directory(string input_path, map* marker_categories, vector* parsed_pois) { - if (filesystem::is_regular_file(input_path)) { - if (has_suffix(input_path, ".xml")) { - parse_xml_file(input_path, marker_categories, parsed_pois); - } - else { - cout << "Error: " << input_path << " is a file that does not end in .xml" << endl; - } + if (!filesystem::exists(input_path)){ + cout << "Error: " << input_path << " is not an existing directory or file"; } else if (filesystem::is_directory(input_path)) { vector xml_files = get_files_by_suffix(input_path, ".xml"); @@ -105,24 +100,21 @@ void read_taco_directory(string input_path, map* marker_catego parse_xml_file(path, marker_categories, parsed_pois); } } - else { - cout << "Error: Unknown file type" << endl; + else if (filesystem::is_regular_file(input_path)) { + parse_xml_file(input_path, marker_categories, parsed_pois); } } void write_taco_directory(string output_path, map* marker_categories, vector* parsed_pois) { // TODO: Exportion of XML Marker Packs File Structure #111 string xml_filepath; - if (filesystem::is_regular_file(output_path)) { - if (has_suffix(output_path, ".xml")) { - xml_filepath = output_path; - } - else { - xml_filepath = output_path + "xml_file.xml"; - } + if (filesystem::is_directory(output_path)) { + if (!has_suffix(output_path, "/")) + output_path += "/"; + xml_filepath = output_path + "/xml_file.xml"; } else { - xml_filepath = output_path + "xml_file.xml"; + xml_filepath = output_path; } write_xml_file(xml_filepath, marker_categories, parsed_pois); } From e2d19504259000108eb39ebaa2fd418341cfb17f Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 8 Oct 2023 23:22:23 -0400 Subject: [PATCH 261/539] First set of attribute tests. Contains one case of a value being copied over and one case of a value being changed from zero to false. --- .../can_fade_tests/can_fade_is_false.xml | 8 +++ .../can_fade_tests/can_fade_is_zero.xml | 8 +++ .../test_output/can_fade_corrected_zero.xml | 8 +++ .../test_output/can_fade_is_false.xml | 8 +++ xml_converter/tests/test_bool.cpp | 70 +++++++++++++++++++ 5 files changed, 102 insertions(+) create mode 100644 xml_converter/test_cases/can_fade_tests/can_fade_is_false.xml create mode 100644 xml_converter/test_cases/can_fade_tests/can_fade_is_zero.xml create mode 100644 xml_converter/test_cases/test_output/can_fade_corrected_zero.xml create mode 100644 xml_converter/test_cases/test_output/can_fade_is_false.xml create mode 100644 xml_converter/tests/test_bool.cpp diff --git a/xml_converter/test_cases/can_fade_tests/can_fade_is_false.xml b/xml_converter/test_cases/can_fade_tests/can_fade_is_false.xml new file mode 100644 index 00000000..f02cfbea --- /dev/null +++ b/xml_converter/test_cases/can_fade_tests/can_fade_is_false.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/xml_converter/test_cases/can_fade_tests/can_fade_is_zero.xml b/xml_converter/test_cases/can_fade_tests/can_fade_is_zero.xml new file mode 100644 index 00000000..44d3c264 --- /dev/null +++ b/xml_converter/test_cases/can_fade_tests/can_fade_is_zero.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/xml_converter/test_cases/test_output/can_fade_corrected_zero.xml b/xml_converter/test_cases/test_output/can_fade_corrected_zero.xml new file mode 100644 index 00000000..c4975868 --- /dev/null +++ b/xml_converter/test_cases/test_output/can_fade_corrected_zero.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/xml_converter/test_cases/test_output/can_fade_is_false.xml b/xml_converter/test_cases/test_output/can_fade_is_false.xml new file mode 100644 index 00000000..f02cfbea --- /dev/null +++ b/xml_converter/test_cases/test_output/can_fade_is_false.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/xml_converter/tests/test_bool.cpp b/xml_converter/tests/test_bool.cpp new file mode 100644 index 00000000..013ed236 --- /dev/null +++ b/xml_converter/tests/test_bool.cpp @@ -0,0 +1,70 @@ +#include "../src/attribute/bool.hpp" +#include "../src/packaging_xml.hpp" +#include +#include + +class BoolTest : public ::testing::Test { + protected: + void SetUp() override { + } + void TearDown() override { + } +}; + +bool compare_files(const std::string& file1_path, const std::string& file2_path) { + std::ifstream file1(file1_path); + std::ifstream file2(file2_path); + + if (!file1.is_open() || !file2.is_open()) { + std::cerr << "Error: Could not open one or both of the files." << std::endl; + return false; + } + + char char1, char2; + bool files_are_equal = true; + + while (true) { + char1 = file1.get(); + char2 = file2.get(); + + if (char1 != char2) { + files_are_equal = false; + break; + } + + if (file1.eof() && file2.eof()) { + break; // Reached the end of both files + } + + // If one file reaches the end before the other, they are not equal + if (file1.eof() || file2.eof()) { + files_are_equal = false; + break; + } + } + + file1.close(); + file2.close(); + + return files_are_equal; +} + +TEST_F(BoolTest, ValueIsFalse) { + std::map marker_categories; + std::vector parsed_pois; + std::string xml_input = "../test_cases/can_fade_tests/can_fade_is_false.xml"; + std::string xml_output = "../test_cases/test_output/can_fade_is_false.xml"; + parse_xml_file(xml_input, &marker_categories, &parsed_pois); + write_xml_file(xml_output, &marker_categories, &parsed_pois); + EXPECT_TRUE(compare_files(xml_input, xml_output)); +} + +TEST_F(BoolTest, ValueIsZero) { + std::map marker_categories; + std::vector parsed_pois; + std::string xml_input = "../test_cases/can_fade_tests/can_fade_is_zero.xml"; + std::string xml_output = "../test_cases/test_output/can_fade_corrected_zero.xml"; + parse_xml_file(xml_input, &marker_categories, &parsed_pois); + write_xml_file(xml_output, &marker_categories, &parsed_pois); + EXPECT_FALSE(compare_files(xml_input, xml_output)); +} From 8b23aeb21885367d17deeb0d930869777fe9b04f Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 8 Oct 2023 23:54:51 -0400 Subject: [PATCH 262/539] Renamed test to XMLtoXML --- .../test_cases/can_fade_tests/can_fade_is_false.xml | 4 ++-- .../test_cases/can_fade_tests/can_fade_is_zero.xml | 4 ++-- .../test_cases/test_output/can_fade_corrected_zero.xml | 4 ++-- .../test_cases/test_output/can_fade_is_false.xml | 2 +- .../tests/{test_bool.cpp => test_xml_to_xml.cpp} | 8 ++++---- 5 files changed, 11 insertions(+), 11 deletions(-) rename xml_converter/tests/{test_bool.cpp => test_xml_to_xml.cpp} (93%) diff --git a/xml_converter/test_cases/can_fade_tests/can_fade_is_false.xml b/xml_converter/test_cases/can_fade_tests/can_fade_is_false.xml index f02cfbea..180562d2 100644 --- a/xml_converter/test_cases/can_fade_tests/can_fade_is_false.xml +++ b/xml_converter/test_cases/can_fade_tests/can_fade_is_false.xml @@ -1,8 +1,8 @@ - + - + diff --git a/xml_converter/test_cases/can_fade_tests/can_fade_is_zero.xml b/xml_converter/test_cases/can_fade_tests/can_fade_is_zero.xml index 44d3c264..0fb5af9f 100644 --- a/xml_converter/test_cases/can_fade_tests/can_fade_is_zero.xml +++ b/xml_converter/test_cases/can_fade_tests/can_fade_is_zero.xml @@ -1,8 +1,8 @@ - + - + diff --git a/xml_converter/test_cases/test_output/can_fade_corrected_zero.xml b/xml_converter/test_cases/test_output/can_fade_corrected_zero.xml index c4975868..9b8ef76b 100644 --- a/xml_converter/test_cases/test_output/can_fade_corrected_zero.xml +++ b/xml_converter/test_cases/test_output/can_fade_corrected_zero.xml @@ -1,8 +1,8 @@ - + - + diff --git a/xml_converter/test_cases/test_output/can_fade_is_false.xml b/xml_converter/test_cases/test_output/can_fade_is_false.xml index f02cfbea..0fbac02c 100644 --- a/xml_converter/test_cases/test_output/can_fade_is_false.xml +++ b/xml_converter/test_cases/test_output/can_fade_is_false.xml @@ -3,6 +3,6 @@ - +
diff --git a/xml_converter/tests/test_bool.cpp b/xml_converter/tests/test_xml_to_xml.cpp similarity index 93% rename from xml_converter/tests/test_bool.cpp rename to xml_converter/tests/test_xml_to_xml.cpp index 013ed236..7addcdaf 100644 --- a/xml_converter/tests/test_bool.cpp +++ b/xml_converter/tests/test_xml_to_xml.cpp @@ -1,9 +1,9 @@ #include "../src/attribute/bool.hpp" -#include "../src/packaging_xml.hpp" #include +#include "../src/packaging_xml.hpp" #include -class BoolTest : public ::testing::Test { +class XMLtoXMLTest : public ::testing::Test { protected: void SetUp() override { } @@ -49,7 +49,7 @@ bool compare_files(const std::string& file1_path, const std::string& file2_path) return files_are_equal; } -TEST_F(BoolTest, ValueIsFalse) { +TEST_F(XMLtoXMLTest, ValueIsValid) { std::map marker_categories; std::vector parsed_pois; std::string xml_input = "../test_cases/can_fade_tests/can_fade_is_false.xml"; @@ -59,7 +59,7 @@ TEST_F(BoolTest, ValueIsFalse) { EXPECT_TRUE(compare_files(xml_input, xml_output)); } -TEST_F(BoolTest, ValueIsZero) { +TEST_F(XMLtoXMLTest, ValueIsValidButCorrected) { std::map marker_categories; std::vector parsed_pois; std::string xml_input = "../test_cases/can_fade_tests/can_fade_is_zero.xml"; From 931677f34c134c3474c61214c9abc6b9dc7b3ac9 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 8 Oct 2023 23:56:36 -0400 Subject: [PATCH 263/539] Alphabetized the includes --- xml_converter/tests/test_xml_to_xml.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml_converter/tests/test_xml_to_xml.cpp b/xml_converter/tests/test_xml_to_xml.cpp index 7addcdaf..9d76fc60 100644 --- a/xml_converter/tests/test_xml_to_xml.cpp +++ b/xml_converter/tests/test_xml_to_xml.cpp @@ -1,7 +1,7 @@ #include "../src/attribute/bool.hpp" -#include #include "../src/packaging_xml.hpp" #include +#include class XMLtoXMLTest : public ::testing::Test { protected: From ec72ba5d193d384d4bbef66fd8346e69269bb540 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 9 Oct 2023 20:19:49 -0400 Subject: [PATCH 264/539] New shell script for testing --- xml_converter/attribute_test_script.sh | 30 +++++++++++++++++++ .../test_output/can_fade_corrected_zero.xml | 8 ----- .../test_output/can_fade_is_false.xml | 8 ----- .../{test_xml_to_xml.cpp => test_bool.cpp} | 25 +++++----------- 4 files changed, 38 insertions(+), 33 deletions(-) create mode 100755 xml_converter/attribute_test_script.sh delete mode 100644 xml_converter/test_cases/test_output/can_fade_corrected_zero.xml delete mode 100644 xml_converter/test_cases/test_output/can_fade_is_false.xml rename xml_converter/tests/{test_xml_to_xml.cpp => test_bool.cpp} (55%) diff --git a/xml_converter/attribute_test_script.sh b/xml_converter/attribute_test_script.sh new file mode 100755 index 00000000..d463524d --- /dev/null +++ b/xml_converter/attribute_test_script.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +ATTRIBUTE_TEST_CASES_FOLDER_PATHS=("./test_cases/can_fade_tests") + +ATTRIBUTE_TEST_CASES=() + +for ATTRIBUTE_TEST_CASES_FOLDER_PATH in "${ATTRIBUTE_TEST_CASES_FOLDER_PATHS[@]}"; do + if [ ! -d "$ATTRIBUTE_TEST_CASES_FOLDER_PATH" ]; then + echo "Folder '$ATTRIBUTE_TEST_CASES_FOLDER_PATH' does not exist." + exit 1 + fi + + attribute_name=$(basename "$ATTRIBUTE_TEST_CASES_FOLDER_PATH") + TEST_OUTPUT_DIRECTORY="./test_cases/test_output/$attribute_name" + + if [ ! -d "$TEST_OUTPUT_DIRECTORY" ]; then + mkdir "$TEST_OUTPUT_DIRECTORY" + fi + + while IFS= read -r -d $'\0' file; do + ATTRIBUTE_TEST_CASES+=("$file") + done < <(find "$ATTRIBUTE_TEST_CASES_FOLDER_PATH" -type f -print0) + + for test_case in "${ATTRIBUTE_TEST_CASES[@]}"; do + file_name=$(basename "$test_case") + ./build/xml_converter --input-taco-path "$test_case" --output-taco-path "$TEST_OUTPUT_DIRECTORY/$file_name" 1> /dev/null + done +done + +./build/xml_converter_tests diff --git a/xml_converter/test_cases/test_output/can_fade_corrected_zero.xml b/xml_converter/test_cases/test_output/can_fade_corrected_zero.xml deleted file mode 100644 index 9b8ef76b..00000000 --- a/xml_converter/test_cases/test_output/can_fade_corrected_zero.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/xml_converter/test_cases/test_output/can_fade_is_false.xml b/xml_converter/test_cases/test_output/can_fade_is_false.xml deleted file mode 100644 index 0fbac02c..00000000 --- a/xml_converter/test_cases/test_output/can_fade_is_false.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/xml_converter/tests/test_xml_to_xml.cpp b/xml_converter/tests/test_bool.cpp similarity index 55% rename from xml_converter/tests/test_xml_to_xml.cpp rename to xml_converter/tests/test_bool.cpp index 9d76fc60..ca0c6907 100644 --- a/xml_converter/tests/test_xml_to_xml.cpp +++ b/xml_converter/tests/test_bool.cpp @@ -1,9 +1,8 @@ #include "../src/attribute/bool.hpp" -#include "../src/packaging_xml.hpp" -#include #include +#include -class XMLtoXMLTest : public ::testing::Test { +class BoolTest : public ::testing::Test { protected: void SetUp() override { } @@ -49,22 +48,14 @@ bool compare_files(const std::string& file1_path, const std::string& file2_path) return files_are_equal; } -TEST_F(XMLtoXMLTest, ValueIsValid) { - std::map marker_categories; - std::vector parsed_pois; - std::string xml_input = "../test_cases/can_fade_tests/can_fade_is_false.xml"; - std::string xml_output = "../test_cases/test_output/can_fade_is_false.xml"; - parse_xml_file(xml_input, &marker_categories, &parsed_pois); - write_xml_file(xml_output, &marker_categories, &parsed_pois); +TEST_F(BoolTest, ValueIsFalse) { + std::string xml_input = "./test_cases/can_fade_tests/can_fade_is_false.xml"; + std::string xml_output = "./test_cases/test_output/can_fade_tests/can_fade_is_false.xml"; EXPECT_TRUE(compare_files(xml_input, xml_output)); } -TEST_F(XMLtoXMLTest, ValueIsValidButCorrected) { - std::map marker_categories; - std::vector parsed_pois; - std::string xml_input = "../test_cases/can_fade_tests/can_fade_is_zero.xml"; - std::string xml_output = "../test_cases/test_output/can_fade_corrected_zero.xml"; - parse_xml_file(xml_input, &marker_categories, &parsed_pois); - write_xml_file(xml_output, &marker_categories, &parsed_pois); +TEST_F(BoolTest, ValueIsZero) { + std::string xml_input = "./test_cases/can_fade_tests/can_fade_is_zero.xml"; + std::string xml_output = "./test_cases/test_output/can_fade_tests/can_fade_is_zero.xml"; EXPECT_FALSE(compare_files(xml_input, xml_output)); } From 07f92efa16e1b4356c1506a11ff355178439832f Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 9 Oct 2023 20:35:53 -0400 Subject: [PATCH 265/539] Removed unnecessary include --- xml_converter/tests/test_bool.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/xml_converter/tests/test_bool.cpp b/xml_converter/tests/test_bool.cpp index ca0c6907..58d56003 100644 --- a/xml_converter/tests/test_bool.cpp +++ b/xml_converter/tests/test_bool.cpp @@ -1,4 +1,3 @@ -#include "../src/attribute/bool.hpp" #include #include From a7978a434ce3a0a717fe697fbd39ba70fa08963c Mon Sep 17 00:00:00 2001 From: klingbolt Date: Wed, 11 Oct 2023 00:01:59 -0400 Subject: [PATCH 266/539] Python script that runs tests on xml_converter --- xml_converter/attribute_test_script.sh | 30 ---- ...e_is_false.xml => can_fade_is_correct.xml} | 0 ...ero.xml => can_fade_is_different_file.xml} | 0 .../can_fade_is_wrong_output.xml | 8 + xml_converter/tests/attribute_testing.py | 140 ++++++++++++++++++ xml_converter/tests/test_bool.cpp | 60 -------- 6 files changed, 148 insertions(+), 90 deletions(-) delete mode 100755 xml_converter/attribute_test_script.sh rename xml_converter/test_cases/can_fade_tests/{can_fade_is_false.xml => can_fade_is_correct.xml} (100%) rename xml_converter/test_cases/can_fade_tests/{can_fade_is_zero.xml => can_fade_is_different_file.xml} (100%) create mode 100644 xml_converter/test_cases/can_fade_tests/can_fade_is_wrong_output.xml create mode 100755 xml_converter/tests/attribute_testing.py delete mode 100644 xml_converter/tests/test_bool.cpp diff --git a/xml_converter/attribute_test_script.sh b/xml_converter/attribute_test_script.sh deleted file mode 100755 index d463524d..00000000 --- a/xml_converter/attribute_test_script.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash - -ATTRIBUTE_TEST_CASES_FOLDER_PATHS=("./test_cases/can_fade_tests") - -ATTRIBUTE_TEST_CASES=() - -for ATTRIBUTE_TEST_CASES_FOLDER_PATH in "${ATTRIBUTE_TEST_CASES_FOLDER_PATHS[@]}"; do - if [ ! -d "$ATTRIBUTE_TEST_CASES_FOLDER_PATH" ]; then - echo "Folder '$ATTRIBUTE_TEST_CASES_FOLDER_PATH' does not exist." - exit 1 - fi - - attribute_name=$(basename "$ATTRIBUTE_TEST_CASES_FOLDER_PATH") - TEST_OUTPUT_DIRECTORY="./test_cases/test_output/$attribute_name" - - if [ ! -d "$TEST_OUTPUT_DIRECTORY" ]; then - mkdir "$TEST_OUTPUT_DIRECTORY" - fi - - while IFS= read -r -d $'\0' file; do - ATTRIBUTE_TEST_CASES+=("$file") - done < <(find "$ATTRIBUTE_TEST_CASES_FOLDER_PATH" -type f -print0) - - for test_case in "${ATTRIBUTE_TEST_CASES[@]}"; do - file_name=$(basename "$test_case") - ./build/xml_converter --input-taco-path "$test_case" --output-taco-path "$TEST_OUTPUT_DIRECTORY/$file_name" 1> /dev/null - done -done - -./build/xml_converter_tests diff --git a/xml_converter/test_cases/can_fade_tests/can_fade_is_false.xml b/xml_converter/test_cases/can_fade_tests/can_fade_is_correct.xml similarity index 100% rename from xml_converter/test_cases/can_fade_tests/can_fade_is_false.xml rename to xml_converter/test_cases/can_fade_tests/can_fade_is_correct.xml diff --git a/xml_converter/test_cases/can_fade_tests/can_fade_is_zero.xml b/xml_converter/test_cases/can_fade_tests/can_fade_is_different_file.xml similarity index 100% rename from xml_converter/test_cases/can_fade_tests/can_fade_is_zero.xml rename to xml_converter/test_cases/can_fade_tests/can_fade_is_different_file.xml diff --git a/xml_converter/test_cases/can_fade_tests/can_fade_is_wrong_output.xml b/xml_converter/test_cases/can_fade_tests/can_fade_is_wrong_output.xml new file mode 100644 index 00000000..180562d2 --- /dev/null +++ b/xml_converter/test_cases/can_fade_tests/can_fade_is_wrong_output.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/xml_converter/tests/attribute_testing.py b/xml_converter/tests/attribute_testing.py new file mode 100755 index 00000000..8b6a90ad --- /dev/null +++ b/xml_converter/tests/attribute_testing.py @@ -0,0 +1,140 @@ +from dataclasses import dataclass +import subprocess +import re +import os +from typing import Dict, List + +# Path to compiled C++ executable +xml_converter: str = "../build/xml_converter" + + +@dataclass +class Attribute_Tests: + attribute_name: str + attribute_path: str + tests: List[str] + output_result: Dict[str, List[str]] + expect_output_to_be_equal: Dict[str, bool] + expect_files_to_be_equal: Dict[str, bool] + + +def run_xml_converter(*args): + try: + # Build the command to execute the C++ program with the desired function and arguments + cmd = [xml_converter] + list(args) + + # Run the C++ program and capture its output + result = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) + + # Check if the C++ program executed successfully + if result.returncode == 0: + return result.stdout + else: + return result.stderr + except Exception as e: + print("Error:", e) + return None + + +def are_files_equal(file_path1, file_path2) -> bool: + try: + with open(file_path1, 'rb') as file1, open(file_path2, 'rb') as file2: + content1 = file1.read() + content2 = file2.read() + + return content1 == content2 + + except (FileNotFoundError, PermissionError): + print(f"Error opening file {file_path1} or {file_path2}") + return False + + +def are_arrays_equal(array1, array2) -> bool: + if len(array1) != len(array2): + return False + + for i in range(len(array1)): + if array1[i] != array2[i]: + return False + + return True + + +arg_input_xml: str = "--input-taco-path" +arg_output_xml: str = "--output-taco-path" + +chrono_patterns = [ + "The taco parse function took [0-9]+ milliseconds to run", + "The xml write function took [0-9]+ milliseconds to run", + "The protobuf write function took [0-9]+ milliseconds to run" +] + + +if __name__ == "__main__": + # TODO: This will need to be extracted as more attributes and tests are added + attribute: Attribute_Tests = Attribute_Tests( + attribute_name="can_fade", + attribute_path="../test_cases/can_fade_tests", + tests=["_is_correct", "_is_different_file", "_is_wrong_output"], + output_result={ + "_is_correct": ['Loading taco pack ../test_cases/can_fade_tests/can_fade_is_correct.xml'], + "_is_different_file": ['Loading taco pack ../test_cases/can_fade_tests/can_fade_is_different_file.xml'], + "_is_wrong_output": ['WRONG'] + }, + expect_output_to_be_equal={ + "_is_correct": True, + "_is_different_file": True, + "_is_wrong_output": False, + }, + expect_files_to_be_equal={ + "_is_correct": True, + "_is_different_file": False, + "_is_wrong_output": True, + } + ) + + # Ensure that the test output directory is created + if not os.path.exists(attribute.attribute_path + "-output/"): + try: + os.makedirs(attribute.attribute_path + "-output/") + except OSError as e: + print(f"Error: {e}") + + for test in attribute.tests: + arg1 = attribute.attribute_path + "/" + attribute.attribute_name + test + ".xml" + arg2 = attribute.attribute_path + "-output/" + attribute.attribute_name + test + ".xml" + + result = run_xml_converter(arg_input_xml, arg1, arg_output_xml, arg2) + if result is not None: + # Remove lines about how long it took to run + split_result = result.split("\n") + filtered_array = [] + for line in split_result: + match_found = False + for pattern in chrono_patterns: + if re.search(pattern, line) or line == "": + match_found = True + break + if not match_found: + filtered_array.append(line) + + output_test: bool = True + file_test: bool = True + + if are_arrays_equal(filtered_array, attribute.output_result[test]) != attribute.expect_output_to_be_equal[test]: + print(f"Output did not match for test {attribute.attribute_name}{test}") + print(f"Expected {attribute.output_result[test]} and got {filtered_array}") + output_test = False + + if are_files_equal(arg1, arg2) != attribute.expect_files_to_be_equal[test]: + print(f"Files were incorrect for test {attribute.attribute_name}{test}") + print(f"Expected {attribute.expect_files_to_be_equal[test]}") + print(f"arg1: {arg1}") + print(f"arg2: {arg2}") + file_test = False + + if output_test and file_test: + print(f"Successful test {attribute.attribute_name}{test}") + + else: + print(f"Failed to execute {attribute.attribute_name}{test}") diff --git a/xml_converter/tests/test_bool.cpp b/xml_converter/tests/test_bool.cpp deleted file mode 100644 index 58d56003..00000000 --- a/xml_converter/tests/test_bool.cpp +++ /dev/null @@ -1,60 +0,0 @@ -#include -#include - -class BoolTest : public ::testing::Test { - protected: - void SetUp() override { - } - void TearDown() override { - } -}; - -bool compare_files(const std::string& file1_path, const std::string& file2_path) { - std::ifstream file1(file1_path); - std::ifstream file2(file2_path); - - if (!file1.is_open() || !file2.is_open()) { - std::cerr << "Error: Could not open one or both of the files." << std::endl; - return false; - } - - char char1, char2; - bool files_are_equal = true; - - while (true) { - char1 = file1.get(); - char2 = file2.get(); - - if (char1 != char2) { - files_are_equal = false; - break; - } - - if (file1.eof() && file2.eof()) { - break; // Reached the end of both files - } - - // If one file reaches the end before the other, they are not equal - if (file1.eof() || file2.eof()) { - files_are_equal = false; - break; - } - } - - file1.close(); - file2.close(); - - return files_are_equal; -} - -TEST_F(BoolTest, ValueIsFalse) { - std::string xml_input = "./test_cases/can_fade_tests/can_fade_is_false.xml"; - std::string xml_output = "./test_cases/test_output/can_fade_tests/can_fade_is_false.xml"; - EXPECT_TRUE(compare_files(xml_input, xml_output)); -} - -TEST_F(BoolTest, ValueIsZero) { - std::string xml_input = "./test_cases/can_fade_tests/can_fade_is_zero.xml"; - std::string xml_output = "./test_cases/test_output/can_fade_tests/can_fade_is_zero.xml"; - EXPECT_FALSE(compare_files(xml_input, xml_output)); -} From f1cbf1ffc2a43ade8500f32a3c2592514bdcdeab Mon Sep 17 00:00:00 2001 From: klingbolt Date: Wed, 11 Oct 2023 00:04:49 -0400 Subject: [PATCH 267/539] Changed names of categories in xml to match new file names --- .../test_cases/can_fade_tests/can_fade_is_correct.xml | 4 ++-- .../test_cases/can_fade_tests/can_fade_is_different_file.xml | 4 ++-- .../test_cases/can_fade_tests/can_fade_is_wrong_output.xml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/xml_converter/test_cases/can_fade_tests/can_fade_is_correct.xml b/xml_converter/test_cases/can_fade_tests/can_fade_is_correct.xml index 180562d2..5b9b8ac2 100644 --- a/xml_converter/test_cases/can_fade_tests/can_fade_is_correct.xml +++ b/xml_converter/test_cases/can_fade_tests/can_fade_is_correct.xml @@ -1,8 +1,8 @@ - + - + diff --git a/xml_converter/test_cases/can_fade_tests/can_fade_is_different_file.xml b/xml_converter/test_cases/can_fade_tests/can_fade_is_different_file.xml index 0fb5af9f..74c8c540 100644 --- a/xml_converter/test_cases/can_fade_tests/can_fade_is_different_file.xml +++ b/xml_converter/test_cases/can_fade_tests/can_fade_is_different_file.xml @@ -1,8 +1,8 @@ - + - + diff --git a/xml_converter/test_cases/can_fade_tests/can_fade_is_wrong_output.xml b/xml_converter/test_cases/can_fade_tests/can_fade_is_wrong_output.xml index 180562d2..cc6d9221 100644 --- a/xml_converter/test_cases/can_fade_tests/can_fade_is_wrong_output.xml +++ b/xml_converter/test_cases/can_fade_tests/can_fade_is_wrong_output.xml @@ -1,8 +1,8 @@ - + - + From f3543e02d0682cad470f2e7791baf180bee4ca7d Mon Sep 17 00:00:00 2001 From: klingbolt Date: Wed, 11 Oct 2023 00:18:38 -0400 Subject: [PATCH 268/539] Added to the Regex --- xml_converter/tests/attribute_testing.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xml_converter/tests/attribute_testing.py b/xml_converter/tests/attribute_testing.py index 8b6a90ad..bdce57cb 100755 --- a/xml_converter/tests/attribute_testing.py +++ b/xml_converter/tests/attribute_testing.py @@ -64,9 +64,9 @@ def are_arrays_equal(array1, array2) -> bool: arg_output_xml: str = "--output-taco-path" chrono_patterns = [ - "The taco parse function took [0-9]+ milliseconds to run", - "The xml write function took [0-9]+ milliseconds to run", - "The protobuf write function took [0-9]+ milliseconds to run" + "^The taco parse function took [0-9]+ milliseconds to run$", + "^The xml write function took [0-9]+ milliseconds to run$", + "^The protobuf write function took [0-9]+ milliseconds to run$" ] From 42be09f1c3b29549cd201e1528eee9989d0b8348 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 22 Oct 2023 18:40:57 -0400 Subject: [PATCH 269/539] Addressing code review. Data format restructured --- .../can_fade_is_different_file.xml | 8 - .../can_fade_is_wrong_output.xml | 8 - .../test_cases/test_expected_outputs.json | 38 +++ xml_converter/tests/attribute_testing.py | 255 ++++++++++-------- 4 files changed, 177 insertions(+), 132 deletions(-) delete mode 100644 xml_converter/test_cases/can_fade_tests/can_fade_is_different_file.xml delete mode 100644 xml_converter/test_cases/can_fade_tests/can_fade_is_wrong_output.xml create mode 100644 xml_converter/test_cases/test_expected_outputs.json diff --git a/xml_converter/test_cases/can_fade_tests/can_fade_is_different_file.xml b/xml_converter/test_cases/can_fade_tests/can_fade_is_different_file.xml deleted file mode 100644 index 74c8c540..00000000 --- a/xml_converter/test_cases/can_fade_tests/can_fade_is_different_file.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/xml_converter/test_cases/can_fade_tests/can_fade_is_wrong_output.xml b/xml_converter/test_cases/can_fade_tests/can_fade_is_wrong_output.xml deleted file mode 100644 index cc6d9221..00000000 --- a/xml_converter/test_cases/can_fade_tests/can_fade_is_wrong_output.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/xml_converter/test_cases/test_expected_outputs.json b/xml_converter/test_cases/test_expected_outputs.json new file mode 100644 index 00000000..d679cab8 --- /dev/null +++ b/xml_converter/test_cases/test_expected_outputs.json @@ -0,0 +1,38 @@ +{ + "can_fade": { + "path": "../test_cases/can_fade_tests", + "tests": { + "_is_correct": { + "output_stdout": [ + "Loading taco pack ../test_cases/can_fade_tests/can_fade_is_correct.xml" + ], + "output_stderr": [], + "expected_xml_diff": [] + }, + "_is_supported_value_not_default": { + "output_stdout": [ + "Loading taco pack ../test_cases/can_fade_tests/can_fade_is_supported_value_not_default.xml" + ], + "output_stderr": [], + "expected_xml_diff": [ + "- \n", + "+ \n" + ] + }, + "_unsupported_value": { + "output_stdout": [ + "Loading taco pack ../test_cases/can_fade_tests/can_fade_unsupported_value.xml", + "\u001b[31;1mError: \u001b[0m\u001b[1mFound a boolean value that was not a '1', '0', 'true', or 'false'\u001b[0m", + "../test_cases/can_fade_tests/can_fade_unsupported_value.xml", + "6 |", + " | \u001b[31;1m^^^\u001b[0m" + ], + "output_stderr" : [], + "expected_xml_diff" : [ + "- \n", + "+ \n" + ] + } + } + } +} \ No newline at end of file diff --git a/xml_converter/tests/attribute_testing.py b/xml_converter/tests/attribute_testing.py index bdce57cb..f342c1cb 100755 --- a/xml_converter/tests/attribute_testing.py +++ b/xml_converter/tests/attribute_testing.py @@ -1,140 +1,163 @@ from dataclasses import dataclass +import argparse +import difflib +import json import subprocess import re import os -from typing import Dict, List +from typing import List, Optional # Path to compiled C++ executable xml_converter: str = "../build/xml_converter" +json_file_path: str = "../test_cases/test_expected_outputs.json" @dataclass -class Attribute_Tests: - attribute_name: str - attribute_path: str - tests: List[str] - output_result: Dict[str, List[str]] - expect_output_to_be_equal: Dict[str, bool] - expect_files_to_be_equal: Dict[str, bool] - - -def run_xml_converter(*args): +class XMLConverter_arguments: + arg_input_xml: str = "--input-taco-path" + arg_output_xml: str = "--output-taco-path" + arg_input_proto: str = "--input-waypoint-path" + arg_output_proto: str = "--output-waypoint-path" + arg_split_proto: str = "--output-split-waypoint-path" + +def run_xml_converter( + input_xml: Optional[List[str]]= None, + output_xml: Optional[List[str]]= None, + input_proto: Optional[List[str]]= None, + output_proto: Optional[List[str]]= None, + split_output_proto: Optional[str]= None, + ) -> subprocess.CompletedProcess[str]: + + # Build the command to execute the C++ program with the desired function and arguments + cmd: List[str] = [xml_converter] + + if input_xml: + cmd += [XMLConverter_arguments.arg_input_xml] + input_xml + if output_xml: + cmd += [XMLConverter_arguments.arg_output_xml] + output_xml + if input_proto: + cmd += [XMLConverter_arguments.arg_input_proto] + input_proto + if output_proto: + cmd += [XMLConverter_arguments.arg_output_proto] + output_proto + if split_output_proto: + cmd += [XMLConverter_arguments.arg_split_proto] + [split_output_proto] + + # Run the C++ program and capture its output + result = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) + + return result + +def compare_files(file_path1: str, file_path2: str) -> List[str]: try: - # Build the command to execute the C++ program with the desired function and arguments - cmd = [xml_converter] + list(args) + with open(file_path1, 'r') as file1, open(file_path2, 'r') as file2: + content1 = file1.readlines() + content2 = file2.readlines() - # Run the C++ program and capture its output - result = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) + differ = difflib.Differ() + diff = list(differ.compare(content1, content2)) + filtered_diff: List[str] = [] + for line in diff: + if line.startswith("+ ") or line.startswith("- "): + filtered_diff.append(line) - # Check if the C++ program executed successfully - if result.returncode == 0: - return result.stdout - else: - return result.stderr - except Exception as e: - print("Error:", e) - return None + return filtered_diff - -def are_files_equal(file_path1, file_path2) -> bool: - try: - with open(file_path1, 'rb') as file1, open(file_path2, 'rb') as file2: - content1 = file1.read() - content2 = file2.read() - - return content1 == content2 - - except (FileNotFoundError, PermissionError): + except (FileNotFoundError, PermissionError) as e: print(f"Error opening file {file_path1} or {file_path2}") - return False + print(e) + return [str(e)] -def are_arrays_equal(array1, array2) -> bool: - if len(array1) != len(array2): - return False - - for i in range(len(array1)): - if array1[i] != array2[i]: - return False +patterns_for_noisy_lines = [ + "^The taco parse function took [0-9]+ milliseconds to run$", + "^The xml write function took [0-9]+ milliseconds to run$", + "^The protobuf read function took [0-9]+ milliseconds to run$", + "^The protobuf write function took [0-9]+ milliseconds to run$", + "^$" +] - return True +def remove_noisy_lines(array: List[str]) -> List[str]: + filtered_array = [] + for line in array: + match_found: bool = False + for pattern in patterns_for_noisy_lines: + if re.fullmatch(pattern, line): + match_found = True + break + if not match_found: + filtered_array.append(line) + return filtered_array -arg_input_xml: str = "--input-taco-path" -arg_output_xml: str = "--output-taco-path" -chrono_patterns = [ - "^The taco parse function took [0-9]+ milliseconds to run$", - "^The xml write function took [0-9]+ milliseconds to run$", - "^The protobuf write function took [0-9]+ milliseconds to run$" -] +def main(args): + try: + with open(json_file_path, 'r') as json_file: + data = json.load(json_file) + + for attribute_name in data.keys(): + print(attribute_name) + attribute_data = data[attribute_name] + + # Ensure that the test output directory is created + output_dir_path = attribute_data["path"] + "-output/" + if not os.path.exists(output_dir_path): + try: + os.makedirs(output_dir_path) + except OSError as e: + print(f"Error: {e}") + + for test in attribute_data["tests"].keys(): + file_name: str = attribute_name + test + ".xml" + input_xml_path = os.path.join(attribute_data["path"], file_name) + output_xml_path = os.path.join(output_dir_path, file_name) + + result = run_xml_converter(input_xml = [input_xml_path], output_xml = [output_xml_path]) + # Remove noisy lines + stdout = remove_noisy_lines(result.stdout.split("\n")) + stderr = remove_noisy_lines(result.stderr.split("\n")) + xml_diff = compare_files(input_xml_path, output_xml_path) + + #Prints the results rather than comparing them to a file + if args.print: + print(f"Test {attribute_name}{test}") + print(f"'output_stdout' : {json.dumps(stdout)}") + print(f"'output_stderr' = {json.dumps(stderr)}") + print(f"'expected_xml_diff' = {json.dumps(xml_diff)}") + continue + + all_tests_passed: bool = True + expected_results = attribute_data["tests"][test] + + if stdout != expected_results["output_stdout"]: + print(f"Output did not match for test {attribute_name}{test}") + print(f"Expected stdout {expected_results['output_stdout']} and got {stdout}") + all_tests_passed = False + + if stderr != expected_results["output_stderr"]: + print(f"Output did not match for test {attribute_name}{test}") + print(f"Expected stderr {expected_results['output_stderr']} and got {stderr}") + all_tests_passed = False + + if xml_diff != expected_results["expected_xml_diff"]: + print(f"Diff was incorrect for test {attribute_name}{test}") + print(f"Expected {expected_results['expected_xml_diff']} and got {xml_diff}") + all_tests_passed = False + + if all_tests_passed: + print(f"Success: test {attribute_name}{test}") + + except FileNotFoundError: + print(f"The file '{json_file_path}' does not exist.") + except json.JSONDecodeError as e: + print(f"JSON decoding error: {e}") + except Exception as e: + print(f"An error occurred: {e}") if __name__ == "__main__": - # TODO: This will need to be extracted as more attributes and tests are added - attribute: Attribute_Tests = Attribute_Tests( - attribute_name="can_fade", - attribute_path="../test_cases/can_fade_tests", - tests=["_is_correct", "_is_different_file", "_is_wrong_output"], - output_result={ - "_is_correct": ['Loading taco pack ../test_cases/can_fade_tests/can_fade_is_correct.xml'], - "_is_different_file": ['Loading taco pack ../test_cases/can_fade_tests/can_fade_is_different_file.xml'], - "_is_wrong_output": ['WRONG'] - }, - expect_output_to_be_equal={ - "_is_correct": True, - "_is_different_file": True, - "_is_wrong_output": False, - }, - expect_files_to_be_equal={ - "_is_correct": True, - "_is_different_file": False, - "_is_wrong_output": True, - } - ) - - # Ensure that the test output directory is created - if not os.path.exists(attribute.attribute_path + "-output/"): - try: - os.makedirs(attribute.attribute_path + "-output/") - except OSError as e: - print(f"Error: {e}") - - for test in attribute.tests: - arg1 = attribute.attribute_path + "/" + attribute.attribute_name + test + ".xml" - arg2 = attribute.attribute_path + "-output/" + attribute.attribute_name + test + ".xml" - - result = run_xml_converter(arg_input_xml, arg1, arg_output_xml, arg2) - if result is not None: - # Remove lines about how long it took to run - split_result = result.split("\n") - filtered_array = [] - for line in split_result: - match_found = False - for pattern in chrono_patterns: - if re.search(pattern, line) or line == "": - match_found = True - break - if not match_found: - filtered_array.append(line) - - output_test: bool = True - file_test: bool = True - - if are_arrays_equal(filtered_array, attribute.output_result[test]) != attribute.expect_output_to_be_equal[test]: - print(f"Output did not match for test {attribute.attribute_name}{test}") - print(f"Expected {attribute.output_result[test]} and got {filtered_array}") - output_test = False - - if are_files_equal(arg1, arg2) != attribute.expect_files_to_be_equal[test]: - print(f"Files were incorrect for test {attribute.attribute_name}{test}") - print(f"Expected {attribute.expect_files_to_be_equal[test]}") - print(f"arg1: {arg1}") - print(f"arg2: {arg2}") - file_test = False - - if output_test and file_test: - print(f"Successful test {attribute.attribute_name}{test}") - - else: - print(f"Failed to execute {attribute.attribute_name}{test}") + parser = argparse.ArgumentParser(description="An example script with an optional argument.") + parser.add_argument("-p", "--print", help="Prints the results rather than comparing them to a file", action="store_true") + + args = parser.parse_args() + main(args) From b5c5f31390d030ebba8cfcec6da1e5f7a2973aea Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 22 Oct 2023 18:49:47 -0400 Subject: [PATCH 270/539] Fixed mypy errors --- xml_converter/tests/attribute_testing.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/xml_converter/tests/attribute_testing.py b/xml_converter/tests/attribute_testing.py index f342c1cb..be47c681 100755 --- a/xml_converter/tests/attribute_testing.py +++ b/xml_converter/tests/attribute_testing.py @@ -20,13 +20,14 @@ class XMLConverter_arguments: arg_output_proto: str = "--output-waypoint-path" arg_split_proto: str = "--output-split-waypoint-path" + def run_xml_converter( - input_xml: Optional[List[str]]= None, - output_xml: Optional[List[str]]= None, - input_proto: Optional[List[str]]= None, - output_proto: Optional[List[str]]= None, - split_output_proto: Optional[str]= None, - ) -> subprocess.CompletedProcess[str]: + input_xml: Optional[List[str]] = None, + output_xml: Optional[List[str]] = None, + input_proto: Optional[List[str]] = None, + output_proto: Optional[List[str]] = None, + split_output_proto: Optional[str] = None, +) -> subprocess.CompletedProcess[str]: # Build the command to execute the C++ program with the desired function and arguments cmd: List[str] = [xml_converter] @@ -47,6 +48,7 @@ def run_xml_converter( return result + def compare_files(file_path1: str, file_path2: str) -> List[str]: try: with open(file_path1, 'r') as file1, open(file_path2, 'r') as file2: @@ -90,7 +92,7 @@ def remove_noisy_lines(array: List[str]) -> List[str]: return filtered_array -def main(args): +def main(args: argparse.Namespace) -> None: try: with open(json_file_path, 'r') as json_file: data = json.load(json_file) @@ -112,13 +114,13 @@ def main(args): input_xml_path = os.path.join(attribute_data["path"], file_name) output_xml_path = os.path.join(output_dir_path, file_name) - result = run_xml_converter(input_xml = [input_xml_path], output_xml = [output_xml_path]) + result = run_xml_converter(input_xml=[input_xml_path], output_xml=[output_xml_path]) # Remove noisy lines stdout = remove_noisy_lines(result.stdout.split("\n")) stderr = remove_noisy_lines(result.stderr.split("\n")) xml_diff = compare_files(input_xml_path, output_xml_path) - #Prints the results rather than comparing them to a file + # Prints the results rather than comparing them to a file if args.print: print(f"Test {attribute_name}{test}") print(f"'output_stdout' : {json.dumps(stdout)}") @@ -145,7 +147,7 @@ def main(args): all_tests_passed = False if all_tests_passed: - print(f"Success: test {attribute_name}{test}") + print(f"Success: test {attribute_name}{test}") except FileNotFoundError: print(f"The file '{json_file_path}' does not exist.") From b2a238176e898529468e6ec3bdb7ad473293affb Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 23 Oct 2023 22:12:36 -0400 Subject: [PATCH 271/539] Addressing code review --- .../expected_outputs}/can_fade_is_correct.xml | 0 ...an_fade_is_supported_value_not_default.xml | 8 + .../can_fade_unsupported_value.xml | 8 + .../can_fade/inputs/can_fade_is_correct.xml | 8 + ...an_fade_is_supported_value_not_default.xml | 8 + .../inputs/can_fade_unsupported_value.xml | 8 + .../test_cases/test_expected_outputs.json | 38 ---- xml_converter/tests/attribute_testing.py | 211 +++++++++--------- .../tests/test_expected_outputs.json | 36 +++ 9 files changed, 181 insertions(+), 144 deletions(-) rename xml_converter/test_cases/{can_fade_tests => can_fade/expected_outputs}/can_fade_is_correct.xml (100%) create mode 100644 xml_converter/test_cases/can_fade/expected_outputs/can_fade_is_supported_value_not_default.xml create mode 100644 xml_converter/test_cases/can_fade/expected_outputs/can_fade_unsupported_value.xml create mode 100644 xml_converter/test_cases/can_fade/inputs/can_fade_is_correct.xml create mode 100644 xml_converter/test_cases/can_fade/inputs/can_fade_is_supported_value_not_default.xml create mode 100644 xml_converter/test_cases/can_fade/inputs/can_fade_unsupported_value.xml delete mode 100644 xml_converter/test_cases/test_expected_outputs.json create mode 100644 xml_converter/tests/test_expected_outputs.json diff --git a/xml_converter/test_cases/can_fade_tests/can_fade_is_correct.xml b/xml_converter/test_cases/can_fade/expected_outputs/can_fade_is_correct.xml similarity index 100% rename from xml_converter/test_cases/can_fade_tests/can_fade_is_correct.xml rename to xml_converter/test_cases/can_fade/expected_outputs/can_fade_is_correct.xml diff --git a/xml_converter/test_cases/can_fade/expected_outputs/can_fade_is_supported_value_not_default.xml b/xml_converter/test_cases/can_fade/expected_outputs/can_fade_is_supported_value_not_default.xml new file mode 100644 index 00000000..c9c4fcb3 --- /dev/null +++ b/xml_converter/test_cases/can_fade/expected_outputs/can_fade_is_supported_value_not_default.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/xml_converter/test_cases/can_fade/expected_outputs/can_fade_unsupported_value.xml b/xml_converter/test_cases/can_fade/expected_outputs/can_fade_unsupported_value.xml new file mode 100644 index 00000000..d19d7c1a --- /dev/null +++ b/xml_converter/test_cases/can_fade/expected_outputs/can_fade_unsupported_value.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/xml_converter/test_cases/can_fade/inputs/can_fade_is_correct.xml b/xml_converter/test_cases/can_fade/inputs/can_fade_is_correct.xml new file mode 100644 index 00000000..5b9b8ac2 --- /dev/null +++ b/xml_converter/test_cases/can_fade/inputs/can_fade_is_correct.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/xml_converter/test_cases/can_fade/inputs/can_fade_is_supported_value_not_default.xml b/xml_converter/test_cases/can_fade/inputs/can_fade_is_supported_value_not_default.xml new file mode 100644 index 00000000..cfda34eb --- /dev/null +++ b/xml_converter/test_cases/can_fade/inputs/can_fade_is_supported_value_not_default.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/xml_converter/test_cases/can_fade/inputs/can_fade_unsupported_value.xml b/xml_converter/test_cases/can_fade/inputs/can_fade_unsupported_value.xml new file mode 100644 index 00000000..07b5cf05 --- /dev/null +++ b/xml_converter/test_cases/can_fade/inputs/can_fade_unsupported_value.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/xml_converter/test_cases/test_expected_outputs.json b/xml_converter/test_cases/test_expected_outputs.json deleted file mode 100644 index d679cab8..00000000 --- a/xml_converter/test_cases/test_expected_outputs.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "can_fade": { - "path": "../test_cases/can_fade_tests", - "tests": { - "_is_correct": { - "output_stdout": [ - "Loading taco pack ../test_cases/can_fade_tests/can_fade_is_correct.xml" - ], - "output_stderr": [], - "expected_xml_diff": [] - }, - "_is_supported_value_not_default": { - "output_stdout": [ - "Loading taco pack ../test_cases/can_fade_tests/can_fade_is_supported_value_not_default.xml" - ], - "output_stderr": [], - "expected_xml_diff": [ - "- \n", - "+ \n" - ] - }, - "_unsupported_value": { - "output_stdout": [ - "Loading taco pack ../test_cases/can_fade_tests/can_fade_unsupported_value.xml", - "\u001b[31;1mError: \u001b[0m\u001b[1mFound a boolean value that was not a '1', '0', 'true', or 'false'\u001b[0m", - "../test_cases/can_fade_tests/can_fade_unsupported_value.xml", - "6 |", - " | \u001b[31;1m^^^\u001b[0m" - ], - "output_stderr" : [], - "expected_xml_diff" : [ - "- \n", - "+ \n" - ] - } - } - } -} \ No newline at end of file diff --git a/xml_converter/tests/attribute_testing.py b/xml_converter/tests/attribute_testing.py index be47c681..6fc5d2b3 100755 --- a/xml_converter/tests/attribute_testing.py +++ b/xml_converter/tests/attribute_testing.py @@ -1,24 +1,22 @@ -from dataclasses import dataclass import argparse import difflib import json import subprocess import re import os -from typing import List, Optional +from typing import List, Optional, Final, Tuple # Path to compiled C++ executable -xml_converter: str = "../build/xml_converter" -json_file_path: str = "../test_cases/test_expected_outputs.json" +xml_converter_binary_path: str = "../build/xml_converter" +# Paths to data for the tests +json_file_path: str = "./test_expected_outputs.json" +tests_cases_path: str = "../test_cases" - -@dataclass -class XMLConverter_arguments: - arg_input_xml: str = "--input-taco-path" - arg_output_xml: str = "--output-taco-path" - arg_input_proto: str = "--input-waypoint-path" - arg_output_proto: str = "--output-waypoint-path" - arg_split_proto: str = "--output-split-waypoint-path" +arg_input_xml: Final[str] = "--input-taco-path" +arg_output_xml: Final[str] = "--output-taco-path" +arg_input_proto: Final[str] = "--input-waypoint-path" +arg_output_proto: Final[str] = "--output-waypoint-path" +arg_split_proto: Final[str] = "--output-split-waypoint-path" def run_xml_converter( @@ -27,47 +25,40 @@ def run_xml_converter( input_proto: Optional[List[str]] = None, output_proto: Optional[List[str]] = None, split_output_proto: Optional[str] = None, -) -> subprocess.CompletedProcess[str]: +) -> Tuple[str, str, int]: # Build the command to execute the C++ program with the desired function and arguments - cmd: List[str] = [xml_converter] + cmd: List[str] = [xml_converter_binary_path] if input_xml: - cmd += [XMLConverter_arguments.arg_input_xml] + input_xml + cmd += [arg_input_xml] + input_xml if output_xml: - cmd += [XMLConverter_arguments.arg_output_xml] + output_xml + cmd += [arg_output_xml] + output_xml if input_proto: - cmd += [XMLConverter_arguments.arg_input_proto] + input_proto + cmd += [arg_input_proto] + input_proto if output_proto: - cmd += [XMLConverter_arguments.arg_output_proto] + output_proto + cmd += [arg_output_proto] + output_proto if split_output_proto: - cmd += [XMLConverter_arguments.arg_split_proto] + [split_output_proto] + cmd += [arg_split_proto] + [split_output_proto] # Run the C++ program and capture its output result = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) - return result + return (result.stdout, result.stderr, result.returncode) def compare_files(file_path1: str, file_path2: str) -> List[str]: - try: - with open(file_path1, 'r') as file1, open(file_path2, 'r') as file2: - content1 = file1.readlines() - content2 = file2.readlines() - - differ = difflib.Differ() - diff = list(differ.compare(content1, content2)) - filtered_diff: List[str] = [] - for line in diff: - if line.startswith("+ ") or line.startswith("- "): - filtered_diff.append(line) + with open(file_path1, 'r') as file1, open(file_path2, 'r') as file2: + content1 = file1.readlines() + content2 = file2.readlines() - return filtered_diff + diff = list(difflib.Differ().compare(content1, content2)) + filtered_diff: List[str] = [] + for line in diff: + if line.startswith("+ ") or line.startswith("- "): + filtered_diff.append(line) - except (FileNotFoundError, PermissionError) as e: - print(f"Error opening file {file_path1} or {file_path2}") - print(e) - return [str(e)] + return filtered_diff patterns_for_noisy_lines = [ @@ -79,9 +70,9 @@ def compare_files(file_path1: str, file_path2: str) -> List[str]: ] -def remove_noisy_lines(array: List[str]) -> List[str]: +def remove_noisy_lines(lines: List[str]) -> List[str]: filtered_array = [] - for line in array: + for line in lines: match_found: bool = False for pattern in patterns_for_noisy_lines: if re.fullmatch(pattern, line): @@ -92,74 +83,82 @@ def remove_noisy_lines(array: List[str]) -> List[str]: return filtered_array -def main(args: argparse.Namespace) -> None: - try: - with open(json_file_path, 'r') as json_file: - data = json.load(json_file) - - for attribute_name in data.keys(): - print(attribute_name) - attribute_data = data[attribute_name] - - # Ensure that the test output directory is created - output_dir_path = attribute_data["path"] + "-output/" - if not os.path.exists(output_dir_path): - try: - os.makedirs(output_dir_path) - except OSError as e: - print(f"Error: {e}") - - for test in attribute_data["tests"].keys(): - file_name: str = attribute_name + test + ".xml" - input_xml_path = os.path.join(attribute_data["path"], file_name) - output_xml_path = os.path.join(output_dir_path, file_name) - - result = run_xml_converter(input_xml=[input_xml_path], output_xml=[output_xml_path]) - # Remove noisy lines - stdout = remove_noisy_lines(result.stdout.split("\n")) - stderr = remove_noisy_lines(result.stderr.split("\n")) - xml_diff = compare_files(input_xml_path, output_xml_path) - - # Prints the results rather than comparing them to a file - if args.print: - print(f"Test {attribute_name}{test}") - print(f"'output_stdout' : {json.dumps(stdout)}") - print(f"'output_stderr' = {json.dumps(stderr)}") - print(f"'expected_xml_diff' = {json.dumps(xml_diff)}") - continue - - all_tests_passed: bool = True - expected_results = attribute_data["tests"][test] - - if stdout != expected_results["output_stdout"]: - print(f"Output did not match for test {attribute_name}{test}") - print(f"Expected stdout {expected_results['output_stdout']} and got {stdout}") - all_tests_passed = False - - if stderr != expected_results["output_stderr"]: - print(f"Output did not match for test {attribute_name}{test}") - print(f"Expected stderr {expected_results['output_stderr']} and got {stderr}") - all_tests_passed = False - - if xml_diff != expected_results["expected_xml_diff"]: - print(f"Diff was incorrect for test {attribute_name}{test}") - print(f"Expected {expected_results['expected_xml_diff']} and got {xml_diff}") - all_tests_passed = False - - if all_tests_passed: - print(f"Success: test {attribute_name}{test}") - - except FileNotFoundError: - print(f"The file '{json_file_path}' does not exist.") - except json.JSONDecodeError as e: - print(f"JSON decoding error: {e}") - except Exception as e: - print(f"An error occurred: {e}") +def main() -> None: + parser = argparse.ArgumentParser(description="A test harness for evaluating the output of the xmlconverter program") + parser.add_argument("-v", "--verbose", help="Prints the results from xmlconverter in JSON format", action="store_true") + parser.add_argument("-s", "--skiptests", help="Run the program but skip the comparison tests", action="store_true") + args = parser.parse_args() + + with open(json_file_path, 'r') as json_file: + data = json.load(json_file) + for attribute_data in data: + attribute_name: str = attribute_data["attribute_name"] + print(attribute_name) -if __name__ == "__main__": - parser = argparse.ArgumentParser(description="An example script with an optional argument.") - parser.add_argument("-p", "--print", help="Prints the results rather than comparing them to a file", action="store_true") + input_dir_path = os.path.join(tests_cases_path, attribute_name, "inputs") + expected_output_dir_path = os.path.join(tests_cases_path, attribute_name, "expected_outputs") + output_dir_path = os.path.join(tests_cases_path, attribute_name, "outputs") - args = parser.parse_args() - main(args) + # Ensure that the test output directory is created + os.makedirs(output_dir_path, exist_ok=True) + + for test in attribute_data["tests"]: + file_name: str = attribute_name + "_" + test["name"] + ".xml" + input_xml_path = os.path.join(input_dir_path, file_name) + output_xml_path = os.path.join(output_dir_path, file_name) + expected_output_xml_path = os.path.join(expected_output_dir_path, file_name) + + result = run_xml_converter(input_xml=[input_xml_path], output_xml=[output_xml_path]) + + # Remove noisy lines + stdout: List[str] = remove_noisy_lines(result[0].split("\n")) + stderr: List[str] = remove_noisy_lines(result[1].split("\n")) + returncode: int = result[2] + + # Prints the results rather than comparing them to a file + if args.verbose: + print(f"\033[94mTest {attribute_name}_{test['name']}\033[0m") + print(f"\"expected_stdout\" : {json.dumps(stdout)}") + print(f"\"expected_stderr\" : {json.dumps(stderr)}") + print(f"\"expected_return_code\" : {json.dumps(returncode)}") + + if args.skiptests: + continue + + xml_diff = compare_files(expected_output_xml_path, output_xml_path) + + all_tests_passed: bool = True + error_diff: List[str] + + if stdout != test["expected_stdout"]: + print(f"\033[91mDStandard output did not match for test {attribute_name}{test['name']}\033[0m") + error_diff = list(difflib.Differ().compare(test["expected_stdout"], stdout)) + for line in error_diff: + print(line) + all_tests_passed = False + + if stderr != test["expected_stderr"]: + print(f"\033[91mStandard error did not match for test {attribute_name}{test['name']}\033[0m") + error_diff = list(difflib.Differ().compare(test["expected_stderr"], stderr)) + for line in error_diff: + print(line) + all_tests_passed = False + + if returncode != test["expected_returncode"]: + print(f"\033[91mReturn code did not match for test {attribute_name}{test['name']}\033[0m") + print(f"expected_returncode = {test['expected_returncode']}") + print(f"returncode = {returncode}") + + if xml_diff != []: + print(f"\033[91mDiff was incorrect for test {attribute_name}{test['name']}\033[0m") + for line in xml_diff: + print(line) + all_tests_passed = False + + if all_tests_passed: + print(f"\033[92mSuccess: test {attribute_name}_{test['name']}\033[0m") + + +if __name__ == "__main__": + main() diff --git a/xml_converter/tests/test_expected_outputs.json b/xml_converter/tests/test_expected_outputs.json new file mode 100644 index 00000000..37c8ca28 --- /dev/null +++ b/xml_converter/tests/test_expected_outputs.json @@ -0,0 +1,36 @@ +[ + { + "attribute_name": "can_fade", + "tests": [ + { + "name": "is_correct", + "expected_stdout" : [ + "Loading taco pack ../test_cases/can_fade/inputs/can_fade_is_correct.xml" + ], + + "expected_stderr": [], + "expected_returncode" : 0 + }, + { + "name" : "is_supported_value_not_default", + "expected_stdout": [ + "Loading taco pack ../test_cases/can_fade/inputs/can_fade_is_supported_value_not_default.xml" + ], + "expected_stderr": [], + "expected_returncode" : 0 + }, + { + "name": "unsupported_value", + "expected_stdout": [ + "Loading taco pack ../test_cases/can_fade/inputs/can_fade_unsupported_value.xml", + "\u001b[31;1mError: \u001b[0m\u001b[1mFound a boolean value that was not a '1', '0', 'true', or 'false'\u001b[0m", + "../test_cases/can_fade/inputs/can_fade_unsupported_value.xml", + "6 |", + " | \u001b[31;1m^^^\u001b[0m" + ], + "expected_stderr" : [], + "expected_returncode" : 0 + } + ] + } +] \ No newline at end of file From 73620c6644e1d7ac4928789edada866a6ea622b3 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Tue, 24 Oct 2023 19:04:31 -0400 Subject: [PATCH 272/539] Remove Skiptest argument and just change output of xml_diff --- xml_converter/tests/attribute_testing.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/xml_converter/tests/attribute_testing.py b/xml_converter/tests/attribute_testing.py index 6fc5d2b3..91d3b9ed 100755 --- a/xml_converter/tests/attribute_testing.py +++ b/xml_converter/tests/attribute_testing.py @@ -86,7 +86,6 @@ def remove_noisy_lines(lines: List[str]) -> List[str]: def main() -> None: parser = argparse.ArgumentParser(description="A test harness for evaluating the output of the xmlconverter program") parser.add_argument("-v", "--verbose", help="Prints the results from xmlconverter in JSON format", action="store_true") - parser.add_argument("-s", "--skiptests", help="Run the program but skip the comparison tests", action="store_true") args = parser.parse_args() with open(json_file_path, 'r') as json_file: @@ -123,11 +122,6 @@ def main() -> None: print(f"\"expected_stderr\" : {json.dumps(stderr)}") print(f"\"expected_return_code\" : {json.dumps(returncode)}") - if args.skiptests: - continue - - xml_diff = compare_files(expected_output_xml_path, output_xml_path) - all_tests_passed: bool = True error_diff: List[str] @@ -150,10 +144,13 @@ def main() -> None: print(f"expected_returncode = {test['expected_returncode']}") print(f"returncode = {returncode}") + xml_diff = compare_files(expected_output_xml_path, output_xml_path) + if xml_diff != []: print(f"\033[91mDiff was incorrect for test {attribute_name}{test['name']}\033[0m") for line in xml_diff: - print(line) + if line.startswith("+ "): + print(line) all_tests_passed = False if all_tests_passed: From b1f8a7b40ea487d80bddeff5b5b58b984ee6580d Mon Sep 17 00:00:00 2001 From: klingbolt Date: Tue, 24 Oct 2023 22:18:43 -0400 Subject: [PATCH 273/539] Removed color tags and added expected output file field --- .../expected_outputs/can_fade_false.xml | 8 ++++ .../expected_outputs/can_fade_is_correct.xml | 8 ---- ...an_fade_is_supported_value_not_default.xml | 8 ---- .../can_fade_unsupported_value.xml | 8 ---- .../can_fade/inputs/can_fade_is_correct.xml | 4 +- ...an_fade_is_supported_value_not_default.xml | 4 +- .../inputs/can_fade_unsupported_value.xml | 4 +- xml_converter/tests/attribute_testing.py | 41 +++++++++++-------- .../tests/test_expected_outputs.json | 13 +++--- 9 files changed, 45 insertions(+), 53 deletions(-) create mode 100644 xml_converter/test_cases/can_fade/expected_outputs/can_fade_false.xml delete mode 100644 xml_converter/test_cases/can_fade/expected_outputs/can_fade_is_correct.xml delete mode 100644 xml_converter/test_cases/can_fade/expected_outputs/can_fade_is_supported_value_not_default.xml delete mode 100644 xml_converter/test_cases/can_fade/expected_outputs/can_fade_unsupported_value.xml diff --git a/xml_converter/test_cases/can_fade/expected_outputs/can_fade_false.xml b/xml_converter/test_cases/can_fade/expected_outputs/can_fade_false.xml new file mode 100644 index 00000000..8ddd0a95 --- /dev/null +++ b/xml_converter/test_cases/can_fade/expected_outputs/can_fade_false.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/xml_converter/test_cases/can_fade/expected_outputs/can_fade_is_correct.xml b/xml_converter/test_cases/can_fade/expected_outputs/can_fade_is_correct.xml deleted file mode 100644 index 5b9b8ac2..00000000 --- a/xml_converter/test_cases/can_fade/expected_outputs/can_fade_is_correct.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/xml_converter/test_cases/can_fade/expected_outputs/can_fade_is_supported_value_not_default.xml b/xml_converter/test_cases/can_fade/expected_outputs/can_fade_is_supported_value_not_default.xml deleted file mode 100644 index c9c4fcb3..00000000 --- a/xml_converter/test_cases/can_fade/expected_outputs/can_fade_is_supported_value_not_default.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/xml_converter/test_cases/can_fade/expected_outputs/can_fade_unsupported_value.xml b/xml_converter/test_cases/can_fade/expected_outputs/can_fade_unsupported_value.xml deleted file mode 100644 index d19d7c1a..00000000 --- a/xml_converter/test_cases/can_fade/expected_outputs/can_fade_unsupported_value.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/xml_converter/test_cases/can_fade/inputs/can_fade_is_correct.xml b/xml_converter/test_cases/can_fade/inputs/can_fade_is_correct.xml index 5b9b8ac2..8ddd0a95 100644 --- a/xml_converter/test_cases/can_fade/inputs/can_fade_is_correct.xml +++ b/xml_converter/test_cases/can_fade/inputs/can_fade_is_correct.xml @@ -1,8 +1,8 @@ - + - + diff --git a/xml_converter/test_cases/can_fade/inputs/can_fade_is_supported_value_not_default.xml b/xml_converter/test_cases/can_fade/inputs/can_fade_is_supported_value_not_default.xml index cfda34eb..690b6fd1 100644 --- a/xml_converter/test_cases/can_fade/inputs/can_fade_is_supported_value_not_default.xml +++ b/xml_converter/test_cases/can_fade/inputs/can_fade_is_supported_value_not_default.xml @@ -1,8 +1,8 @@ - + - + diff --git a/xml_converter/test_cases/can_fade/inputs/can_fade_unsupported_value.xml b/xml_converter/test_cases/can_fade/inputs/can_fade_unsupported_value.xml index 07b5cf05..9a07f20f 100644 --- a/xml_converter/test_cases/can_fade/inputs/can_fade_unsupported_value.xml +++ b/xml_converter/test_cases/can_fade/inputs/can_fade_unsupported_value.xml @@ -1,8 +1,8 @@ - + - + diff --git a/xml_converter/tests/attribute_testing.py b/xml_converter/tests/attribute_testing.py index 91d3b9ed..feec957e 100755 --- a/xml_converter/tests/attribute_testing.py +++ b/xml_converter/tests/attribute_testing.py @@ -62,13 +62,20 @@ def compare_files(file_path1: str, file_path2: str) -> List[str]: patterns_for_noisy_lines = [ - "^The taco parse function took [0-9]+ milliseconds to run$", - "^The xml write function took [0-9]+ milliseconds to run$", - "^The protobuf read function took [0-9]+ milliseconds to run$", - "^The protobuf write function took [0-9]+ milliseconds to run$", - "^$" + r"^The taco parse function took [0-9]+ milliseconds to run$", + r"^The xml write function took [0-9]+ milliseconds to run$", + r"^The protobuf read function took [0-9]+ milliseconds to run$", + r"^The protobuf write function took [0-9]+ milliseconds to run$", + r"^$" ] +pattern_for_color_escape_codes = r"\u001b\[[0-9;]+m" + + +def remove_color_tags(string: str) -> str: + string = re.sub(pattern_for_color_escape_codes, '', string) + return string + def remove_noisy_lines(lines: List[str]) -> List[str]: filtered_array = [] @@ -79,7 +86,7 @@ def remove_noisy_lines(lines: List[str]) -> List[str]: match_found = True break if not match_found: - filtered_array.append(line) + filtered_array.append(remove_color_tags(line)) return filtered_array @@ -106,7 +113,7 @@ def main() -> None: file_name: str = attribute_name + "_" + test["name"] + ".xml" input_xml_path = os.path.join(input_dir_path, file_name) output_xml_path = os.path.join(output_dir_path, file_name) - expected_output_xml_path = os.path.join(expected_output_dir_path, file_name) + expected_output_xml_path = os.path.join(expected_output_dir_path, test["xml_expected_output_file_name"]) result = run_xml_converter(input_xml=[input_xml_path], output_xml=[output_xml_path]) @@ -115,46 +122,46 @@ def main() -> None: stderr: List[str] = remove_noisy_lines(result[1].split("\n")) returncode: int = result[2] - # Prints the results rather than comparing them to a file + # Prints the results of xml_converter if args.verbose: - print(f"\033[94mTest {attribute_name}_{test['name']}\033[0m") - print(f"\"expected_stdout\" : {json.dumps(stdout)}") - print(f"\"expected_stderr\" : {json.dumps(stderr)}") - print(f"\"expected_return_code\" : {json.dumps(returncode)}") + print(f"Test {attribute_name}_{test['name']}") + print(f"\"stdout\" : {json.dumps(stdout)}") + print(f"\"stderr\" : {json.dumps(stderr)}") + print(f"\"return_code\" : {json.dumps(returncode)}") all_tests_passed: bool = True error_diff: List[str] if stdout != test["expected_stdout"]: - print(f"\033[91mDStandard output did not match for test {attribute_name}{test['name']}\033[0m") + print(f"Standard output did not match for test {attribute_name}{test['name']}") error_diff = list(difflib.Differ().compare(test["expected_stdout"], stdout)) for line in error_diff: print(line) all_tests_passed = False if stderr != test["expected_stderr"]: - print(f"\033[91mStandard error did not match for test {attribute_name}{test['name']}\033[0m") + print(f"Standard error did not match for test {attribute_name}{test['name']}") error_diff = list(difflib.Differ().compare(test["expected_stderr"], stderr)) for line in error_diff: print(line) all_tests_passed = False if returncode != test["expected_returncode"]: - print(f"\033[91mReturn code did not match for test {attribute_name}{test['name']}\033[0m") + print(f"Return code did not match for test {attribute_name}{test['name']}") print(f"expected_returncode = {test['expected_returncode']}") print(f"returncode = {returncode}") xml_diff = compare_files(expected_output_xml_path, output_xml_path) if xml_diff != []: - print(f"\033[91mDiff was incorrect for test {attribute_name}{test['name']}\033[0m") + print(f"Diff was incorrect for test {attribute_name}{test['name']}") for line in xml_diff: if line.startswith("+ "): print(line) all_tests_passed = False if all_tests_passed: - print(f"\033[92mSuccess: test {attribute_name}_{test['name']}\033[0m") + print(f"Success: test {attribute_name}_{test['name']}") if __name__ == "__main__": diff --git a/xml_converter/tests/test_expected_outputs.json b/xml_converter/tests/test_expected_outputs.json index 37c8ca28..e22a8455 100644 --- a/xml_converter/tests/test_expected_outputs.json +++ b/xml_converter/tests/test_expected_outputs.json @@ -3,16 +3,17 @@ "attribute_name": "can_fade", "tests": [ { - "name": "is_correct", + "name": "is_correct", + "xml_expected_output_file_name": "can_fade_false.xml", "expected_stdout" : [ "Loading taco pack ../test_cases/can_fade/inputs/can_fade_is_correct.xml" ], - "expected_stderr": [], "expected_returncode" : 0 }, { "name" : "is_supported_value_not_default", + "xml_expected_output_file_name": "can_fade_false.xml", "expected_stdout": [ "Loading taco pack ../test_cases/can_fade/inputs/can_fade_is_supported_value_not_default.xml" ], @@ -21,16 +22,16 @@ }, { "name": "unsupported_value", + "xml_expected_output_file_name": "can_fade_false.xml", "expected_stdout": [ "Loading taco pack ../test_cases/can_fade/inputs/can_fade_unsupported_value.xml", - "\u001b[31;1mError: \u001b[0m\u001b[1mFound a boolean value that was not a '1', '0', 'true', or 'false'\u001b[0m", + "Error: Found a boolean value that was not a '1', '0', 'true', or 'false'", "../test_cases/can_fade/inputs/can_fade_unsupported_value.xml", - "6 |", - " | \u001b[31;1m^^^\u001b[0m" + "6 |", " | ^^^" ], "expected_stderr" : [], "expected_returncode" : 0 } ] } -] \ No newline at end of file +] From dba442cfe174ac931da45528764f60ee938b0fe0 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Wed, 25 Oct 2023 00:11:08 -0400 Subject: [PATCH 274/539] Changed key name and added a generic name to tests --- .../can_fade/expected_outputs/can_fade_false.xml | 4 ++-- .../test_cases/can_fade/inputs/can_fade_is_correct.xml | 4 ++-- .../inputs/can_fade_is_supported_value_not_default.xml | 4 ++-- .../can_fade/inputs/can_fade_unsupported_value.xml | 4 ++-- xml_converter/tests/attribute_testing.py | 8 ++++---- xml_converter/tests/test_expected_outputs.json | 6 +++--- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/xml_converter/test_cases/can_fade/expected_outputs/can_fade_false.xml b/xml_converter/test_cases/can_fade/expected_outputs/can_fade_false.xml index 8ddd0a95..d5c9dc0b 100644 --- a/xml_converter/test_cases/can_fade/expected_outputs/can_fade_false.xml +++ b/xml_converter/test_cases/can_fade/expected_outputs/can_fade_false.xml @@ -1,8 +1,8 @@ - + - + diff --git a/xml_converter/test_cases/can_fade/inputs/can_fade_is_correct.xml b/xml_converter/test_cases/can_fade/inputs/can_fade_is_correct.xml index 8ddd0a95..d5c9dc0b 100644 --- a/xml_converter/test_cases/can_fade/inputs/can_fade_is_correct.xml +++ b/xml_converter/test_cases/can_fade/inputs/can_fade_is_correct.xml @@ -1,8 +1,8 @@ - + - + diff --git a/xml_converter/test_cases/can_fade/inputs/can_fade_is_supported_value_not_default.xml b/xml_converter/test_cases/can_fade/inputs/can_fade_is_supported_value_not_default.xml index 690b6fd1..fdf72475 100644 --- a/xml_converter/test_cases/can_fade/inputs/can_fade_is_supported_value_not_default.xml +++ b/xml_converter/test_cases/can_fade/inputs/can_fade_is_supported_value_not_default.xml @@ -1,8 +1,8 @@ - + - + diff --git a/xml_converter/test_cases/can_fade/inputs/can_fade_unsupported_value.xml b/xml_converter/test_cases/can_fade/inputs/can_fade_unsupported_value.xml index 9a07f20f..273af0b9 100644 --- a/xml_converter/test_cases/can_fade/inputs/can_fade_unsupported_value.xml +++ b/xml_converter/test_cases/can_fade/inputs/can_fade_unsupported_value.xml @@ -1,8 +1,8 @@ - + - + diff --git a/xml_converter/tests/attribute_testing.py b/xml_converter/tests/attribute_testing.py index feec957e..17ee513a 100755 --- a/xml_converter/tests/attribute_testing.py +++ b/xml_converter/tests/attribute_testing.py @@ -110,10 +110,10 @@ def main() -> None: os.makedirs(output_dir_path, exist_ok=True) for test in attribute_data["tests"]: - file_name: str = attribute_name + "_" + test["name"] + ".xml" - input_xml_path = os.path.join(input_dir_path, file_name) - output_xml_path = os.path.join(output_dir_path, file_name) - expected_output_xml_path = os.path.join(expected_output_dir_path, test["xml_expected_output_file_name"]) + xml_file_name: str = attribute_name + "_" + test["name"] + ".xml" + input_xml_path = os.path.join(input_dir_path, xml_file_name) + output_xml_path = os.path.join(output_dir_path, xml_file_name) + expected_output_xml_path = os.path.join(expected_output_dir_path, test["expected_output_xml_file_name"]) result = run_xml_converter(input_xml=[input_xml_path], output_xml=[output_xml_path]) diff --git a/xml_converter/tests/test_expected_outputs.json b/xml_converter/tests/test_expected_outputs.json index e22a8455..5607991b 100644 --- a/xml_converter/tests/test_expected_outputs.json +++ b/xml_converter/tests/test_expected_outputs.json @@ -4,7 +4,7 @@ "tests": [ { "name": "is_correct", - "xml_expected_output_file_name": "can_fade_false.xml", + "expected_output_xml_file_name": "can_fade_false.xml", "expected_stdout" : [ "Loading taco pack ../test_cases/can_fade/inputs/can_fade_is_correct.xml" ], @@ -13,7 +13,7 @@ }, { "name" : "is_supported_value_not_default", - "xml_expected_output_file_name": "can_fade_false.xml", + "expected_output_xml_file_name": "can_fade_false.xml", "expected_stdout": [ "Loading taco pack ../test_cases/can_fade/inputs/can_fade_is_supported_value_not_default.xml" ], @@ -22,7 +22,7 @@ }, { "name": "unsupported_value", - "xml_expected_output_file_name": "can_fade_false.xml", + "expected_output_xml_file_name": "can_fade_false.xml", "expected_stdout": [ "Loading taco pack ../test_cases/can_fade/inputs/can_fade_unsupported_value.xml", "Error: Found a boolean value that was not a '1', '0', 'true', or 'false'", From cd875c541b175b8566513c23c4d87da0c1808105 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Wed, 25 Oct 2023 16:04:55 -0500 Subject: [PATCH 275/539] fixing burrito link build dir from merge --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9ef3227c..41cafad9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -94,7 +94,7 @@ jobs: - name: Build Burrito Link run: | mkdir burrito_link/build - cd burrito_link + cd burrito_link/build cmake .. make From 0aac51fa2949df35d1b6a5d7347e288e59bb07b6 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Thu, 26 Oct 2023 02:19:22 -0500 Subject: [PATCH 276/539] inital moves --- xml_converter/{tests => intigration_tests}/attribute_testing.py | 0 .../can_fade/expected_outputs/can_fade_false.xml | 0 .../can_fade/inputs/can_fade_is_correct.xml | 0 .../can_fade/inputs/can_fade_is_supported_value_not_default.xml | 0 .../can_fade/inputs/can_fade_unsupported_value.xml | 0 .../{tests => intigration_tests}/test_expected_outputs.json | 0 6 files changed, 0 insertions(+), 0 deletions(-) rename xml_converter/{tests => intigration_tests}/attribute_testing.py (100%) rename xml_converter/{test_cases => intigration_tests}/can_fade/expected_outputs/can_fade_false.xml (100%) rename xml_converter/{test_cases => intigration_tests}/can_fade/inputs/can_fade_is_correct.xml (100%) rename xml_converter/{test_cases => intigration_tests}/can_fade/inputs/can_fade_is_supported_value_not_default.xml (100%) rename xml_converter/{test_cases => intigration_tests}/can_fade/inputs/can_fade_unsupported_value.xml (100%) rename xml_converter/{tests => intigration_tests}/test_expected_outputs.json (100%) diff --git a/xml_converter/tests/attribute_testing.py b/xml_converter/intigration_tests/attribute_testing.py similarity index 100% rename from xml_converter/tests/attribute_testing.py rename to xml_converter/intigration_tests/attribute_testing.py diff --git a/xml_converter/test_cases/can_fade/expected_outputs/can_fade_false.xml b/xml_converter/intigration_tests/can_fade/expected_outputs/can_fade_false.xml similarity index 100% rename from xml_converter/test_cases/can_fade/expected_outputs/can_fade_false.xml rename to xml_converter/intigration_tests/can_fade/expected_outputs/can_fade_false.xml diff --git a/xml_converter/test_cases/can_fade/inputs/can_fade_is_correct.xml b/xml_converter/intigration_tests/can_fade/inputs/can_fade_is_correct.xml similarity index 100% rename from xml_converter/test_cases/can_fade/inputs/can_fade_is_correct.xml rename to xml_converter/intigration_tests/can_fade/inputs/can_fade_is_correct.xml diff --git a/xml_converter/test_cases/can_fade/inputs/can_fade_is_supported_value_not_default.xml b/xml_converter/intigration_tests/can_fade/inputs/can_fade_is_supported_value_not_default.xml similarity index 100% rename from xml_converter/test_cases/can_fade/inputs/can_fade_is_supported_value_not_default.xml rename to xml_converter/intigration_tests/can_fade/inputs/can_fade_is_supported_value_not_default.xml diff --git a/xml_converter/test_cases/can_fade/inputs/can_fade_unsupported_value.xml b/xml_converter/intigration_tests/can_fade/inputs/can_fade_unsupported_value.xml similarity index 100% rename from xml_converter/test_cases/can_fade/inputs/can_fade_unsupported_value.xml rename to xml_converter/intigration_tests/can_fade/inputs/can_fade_unsupported_value.xml diff --git a/xml_converter/tests/test_expected_outputs.json b/xml_converter/intigration_tests/test_expected_outputs.json similarity index 100% rename from xml_converter/tests/test_expected_outputs.json rename to xml_converter/intigration_tests/test_expected_outputs.json From f206e1d183bab080eab49a51949c10e8f630334c Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Thu, 26 Oct 2023 05:32:08 -0500 Subject: [PATCH 277/539] Refactoring Integration Tests When experimenting it turns out the entire test harness was broken, so none of this can really be split out easily because the base system was incorrect and fixing it just to replace it felt like a waste. * All inputs and expected outputs are directories * Valid test cases are combined * A bug with directory concatination was fixed in xml_converter * Diff output is no longer randomly censored * Test cases were moved from JSON to Python to more easily dictate typing. This may change again in the future based on the needs of the test suites. * Test suite runs properly on the current revision of code. --- xml_converter/intigration_tests/.gitignore | 1 + .../intigration_tests/attribute_testing.py | 168 ---------------- ...an_fade_is_supported_value_not_default.xml | 8 - .../xml_can_fade_invalid/xml_file.xml} | 0 .../xml_can_fade_valid/xml_file.xml} | 1 + .../xml_can_fade_invalid/xml_file.xml} | 0 .../inputs/xml_can_fade_valid/xml_file.xml | 13 ++ xml_converter/intigration_tests/run_tests.py | 189 ++++++++++++++++++ .../test_expected_outputs.json | 37 ---- xml_converter/intigration_tests/testcases.py | 36 ++++ xml_converter/src/xml_converter.cpp | 2 +- 11 files changed, 241 insertions(+), 214 deletions(-) create mode 100644 xml_converter/intigration_tests/.gitignore delete mode 100755 xml_converter/intigration_tests/attribute_testing.py delete mode 100644 xml_converter/intigration_tests/can_fade/inputs/can_fade_is_supported_value_not_default.xml rename xml_converter/intigration_tests/{can_fade/expected_outputs/can_fade_false.xml => expected_outputs/xml_can_fade_invalid/xml_file.xml} (100%) rename xml_converter/intigration_tests/{can_fade/inputs/can_fade_is_correct.xml => expected_outputs/xml_can_fade_valid/xml_file.xml} (77%) rename xml_converter/intigration_tests/{can_fade/inputs/can_fade_unsupported_value.xml => inputs/xml_can_fade_invalid/xml_file.xml} (100%) create mode 100644 xml_converter/intigration_tests/inputs/xml_can_fade_valid/xml_file.xml create mode 100755 xml_converter/intigration_tests/run_tests.py delete mode 100644 xml_converter/intigration_tests/test_expected_outputs.json create mode 100644 xml_converter/intigration_tests/testcases.py diff --git a/xml_converter/intigration_tests/.gitignore b/xml_converter/intigration_tests/.gitignore new file mode 100644 index 00000000..17aa483a --- /dev/null +++ b/xml_converter/intigration_tests/.gitignore @@ -0,0 +1 @@ +outputs/ diff --git a/xml_converter/intigration_tests/attribute_testing.py b/xml_converter/intigration_tests/attribute_testing.py deleted file mode 100755 index 17ee513a..00000000 --- a/xml_converter/intigration_tests/attribute_testing.py +++ /dev/null @@ -1,168 +0,0 @@ -import argparse -import difflib -import json -import subprocess -import re -import os -from typing import List, Optional, Final, Tuple - -# Path to compiled C++ executable -xml_converter_binary_path: str = "../build/xml_converter" -# Paths to data for the tests -json_file_path: str = "./test_expected_outputs.json" -tests_cases_path: str = "../test_cases" - -arg_input_xml: Final[str] = "--input-taco-path" -arg_output_xml: Final[str] = "--output-taco-path" -arg_input_proto: Final[str] = "--input-waypoint-path" -arg_output_proto: Final[str] = "--output-waypoint-path" -arg_split_proto: Final[str] = "--output-split-waypoint-path" - - -def run_xml_converter( - input_xml: Optional[List[str]] = None, - output_xml: Optional[List[str]] = None, - input_proto: Optional[List[str]] = None, - output_proto: Optional[List[str]] = None, - split_output_proto: Optional[str] = None, -) -> Tuple[str, str, int]: - - # Build the command to execute the C++ program with the desired function and arguments - cmd: List[str] = [xml_converter_binary_path] - - if input_xml: - cmd += [arg_input_xml] + input_xml - if output_xml: - cmd += [arg_output_xml] + output_xml - if input_proto: - cmd += [arg_input_proto] + input_proto - if output_proto: - cmd += [arg_output_proto] + output_proto - if split_output_proto: - cmd += [arg_split_proto] + [split_output_proto] - - # Run the C++ program and capture its output - result = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) - - return (result.stdout, result.stderr, result.returncode) - - -def compare_files(file_path1: str, file_path2: str) -> List[str]: - with open(file_path1, 'r') as file1, open(file_path2, 'r') as file2: - content1 = file1.readlines() - content2 = file2.readlines() - - diff = list(difflib.Differ().compare(content1, content2)) - filtered_diff: List[str] = [] - for line in diff: - if line.startswith("+ ") or line.startswith("- "): - filtered_diff.append(line) - - return filtered_diff - - -patterns_for_noisy_lines = [ - r"^The taco parse function took [0-9]+ milliseconds to run$", - r"^The xml write function took [0-9]+ milliseconds to run$", - r"^The protobuf read function took [0-9]+ milliseconds to run$", - r"^The protobuf write function took [0-9]+ milliseconds to run$", - r"^$" -] - -pattern_for_color_escape_codes = r"\u001b\[[0-9;]+m" - - -def remove_color_tags(string: str) -> str: - string = re.sub(pattern_for_color_escape_codes, '', string) - return string - - -def remove_noisy_lines(lines: List[str]) -> List[str]: - filtered_array = [] - for line in lines: - match_found: bool = False - for pattern in patterns_for_noisy_lines: - if re.fullmatch(pattern, line): - match_found = True - break - if not match_found: - filtered_array.append(remove_color_tags(line)) - return filtered_array - - -def main() -> None: - parser = argparse.ArgumentParser(description="A test harness for evaluating the output of the xmlconverter program") - parser.add_argument("-v", "--verbose", help="Prints the results from xmlconverter in JSON format", action="store_true") - args = parser.parse_args() - - with open(json_file_path, 'r') as json_file: - data = json.load(json_file) - - for attribute_data in data: - attribute_name: str = attribute_data["attribute_name"] - print(attribute_name) - - input_dir_path = os.path.join(tests_cases_path, attribute_name, "inputs") - expected_output_dir_path = os.path.join(tests_cases_path, attribute_name, "expected_outputs") - output_dir_path = os.path.join(tests_cases_path, attribute_name, "outputs") - - # Ensure that the test output directory is created - os.makedirs(output_dir_path, exist_ok=True) - - for test in attribute_data["tests"]: - xml_file_name: str = attribute_name + "_" + test["name"] + ".xml" - input_xml_path = os.path.join(input_dir_path, xml_file_name) - output_xml_path = os.path.join(output_dir_path, xml_file_name) - expected_output_xml_path = os.path.join(expected_output_dir_path, test["expected_output_xml_file_name"]) - - result = run_xml_converter(input_xml=[input_xml_path], output_xml=[output_xml_path]) - - # Remove noisy lines - stdout: List[str] = remove_noisy_lines(result[0].split("\n")) - stderr: List[str] = remove_noisy_lines(result[1].split("\n")) - returncode: int = result[2] - - # Prints the results of xml_converter - if args.verbose: - print(f"Test {attribute_name}_{test['name']}") - print(f"\"stdout\" : {json.dumps(stdout)}") - print(f"\"stderr\" : {json.dumps(stderr)}") - print(f"\"return_code\" : {json.dumps(returncode)}") - - all_tests_passed: bool = True - error_diff: List[str] - - if stdout != test["expected_stdout"]: - print(f"Standard output did not match for test {attribute_name}{test['name']}") - error_diff = list(difflib.Differ().compare(test["expected_stdout"], stdout)) - for line in error_diff: - print(line) - all_tests_passed = False - - if stderr != test["expected_stderr"]: - print(f"Standard error did not match for test {attribute_name}{test['name']}") - error_diff = list(difflib.Differ().compare(test["expected_stderr"], stderr)) - for line in error_diff: - print(line) - all_tests_passed = False - - if returncode != test["expected_returncode"]: - print(f"Return code did not match for test {attribute_name}{test['name']}") - print(f"expected_returncode = {test['expected_returncode']}") - print(f"returncode = {returncode}") - - xml_diff = compare_files(expected_output_xml_path, output_xml_path) - - if xml_diff != []: - print(f"Diff was incorrect for test {attribute_name}{test['name']}") - for line in xml_diff: - if line.startswith("+ "): - print(line) - all_tests_passed = False - - if all_tests_passed: - print(f"Success: test {attribute_name}_{test['name']}") - - -if __name__ == "__main__": - main() diff --git a/xml_converter/intigration_tests/can_fade/inputs/can_fade_is_supported_value_not_default.xml b/xml_converter/intigration_tests/can_fade/inputs/can_fade_is_supported_value_not_default.xml deleted file mode 100644 index fdf72475..00000000 --- a/xml_converter/intigration_tests/can_fade/inputs/can_fade_is_supported_value_not_default.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/xml_converter/intigration_tests/can_fade/expected_outputs/can_fade_false.xml b/xml_converter/intigration_tests/expected_outputs/xml_can_fade_invalid/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/can_fade/expected_outputs/can_fade_false.xml rename to xml_converter/intigration_tests/expected_outputs/xml_can_fade_invalid/xml_file.xml diff --git a/xml_converter/intigration_tests/can_fade/inputs/can_fade_is_correct.xml b/xml_converter/intigration_tests/expected_outputs/xml_can_fade_valid/xml_file.xml similarity index 77% rename from xml_converter/intigration_tests/can_fade/inputs/can_fade_is_correct.xml rename to xml_converter/intigration_tests/expected_outputs/xml_can_fade_valid/xml_file.xml index d5c9dc0b..d0bede6d 100644 --- a/xml_converter/intigration_tests/can_fade/inputs/can_fade_is_correct.xml +++ b/xml_converter/intigration_tests/expected_outputs/xml_can_fade_valid/xml_file.xml @@ -4,5 +4,6 @@ + diff --git a/xml_converter/intigration_tests/can_fade/inputs/can_fade_unsupported_value.xml b/xml_converter/intigration_tests/inputs/xml_can_fade_invalid/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/can_fade/inputs/can_fade_unsupported_value.xml rename to xml_converter/intigration_tests/inputs/xml_can_fade_invalid/xml_file.xml diff --git a/xml_converter/intigration_tests/inputs/xml_can_fade_valid/xml_file.xml b/xml_converter/intigration_tests/inputs/xml_can_fade_valid/xml_file.xml new file mode 100644 index 00000000..21ecea79 --- /dev/null +++ b/xml_converter/intigration_tests/inputs/xml_can_fade_valid/xml_file.xml @@ -0,0 +1,13 @@ + + + + + + + + + + diff --git a/xml_converter/intigration_tests/run_tests.py b/xml_converter/intigration_tests/run_tests.py new file mode 100755 index 00000000..155653ad --- /dev/null +++ b/xml_converter/intigration_tests/run_tests.py @@ -0,0 +1,189 @@ +import argparse +import difflib +import json +import subprocess +import re +import os +from typing import List, Optional, Final, Tuple +from testcases import testcases +import shutil + +# Path to compiled C++ executable +xml_converter_binary_path: str = "../build/xml_converter" + +arg_input_xml: Final[str] = "--input-taco-path" +arg_output_xml: Final[str] = "--output-taco-path" +arg_input_proto: Final[str] = "--input-waypoint-path" +arg_output_proto: Final[str] = "--output-waypoint-path" +arg_split_proto: Final[str] = "--output-split-waypoint-path" + + +def run_xml_converter( + input_xml: Optional[List[str]] = None, + output_xml: Optional[List[str]] = None, + input_proto: Optional[List[str]] = None, + output_proto: Optional[List[str]] = None, + split_output_proto: Optional[str] = None, +) -> Tuple[str, str, int]: + + # Build the command to execute the C++ program with the desired function and arguments + cmd: List[str] = [xml_converter_binary_path] + + if input_xml: + cmd += [arg_input_xml] + input_xml + if output_xml: + cmd += [arg_output_xml] + output_xml + if input_proto: + cmd += [arg_input_proto] + input_proto + if output_proto: + cmd += [arg_output_proto] + output_proto + if split_output_proto: + cmd += [arg_split_proto] + [split_output_proto] + + # Run the C++ program and capture its output + result = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) + + return (result.stdout, result.stderr, result.returncode) + + +def compare_files(file_path1: str, file_path2: str) -> List[str]: + with open(file_path1, 'r') as file1: + content1 = file1.readlines() + with open(file_path2, 'r') as file2: + content2 = file2.readlines() + + diff = list(difflib.Differ().compare(content1, content2)) + + return diff + + +def len_diff(lines: List[str]) -> int: + diffcount = 0 + + for line in lines: + if line.startswith(" "): + continue + diffcount += 1 + return diffcount + + + + +################################################################################ +# remove_ansii_color_escapecodes +# +# Remove the ANSII color code escape characters from a string to make it easier +# to read what is actually contained in the string. +################################################################################ +pattern_for_color_escape_codes = r"\u001b\[[0-9;]+m" + + +def remove_ansii_color_escapecodes(lines: List[str]) -> List[str]: + return [ re.sub(pattern_for_color_escape_codes, '', line) for line in lines ] + + +################################################################################ +# remove_ignored_lines +# +# Goes through a list of lines and removes any line that matches a pattern in +# the `line_patterns_to_ignore` global variable. +################################################################################ +line_patterns_to_ignore = [ + r"^Loading taco pack .*$", + r"^The taco parse function took [0-9]+ milliseconds to run$", + r"^The xml write function took [0-9]+ milliseconds to run$", + r"^The protobuf read function took [0-9]+ milliseconds to run$", + r"^The protobuf write function took [0-9]+ milliseconds to run$", + r"^$" +] + + +def remove_ignored_lines(lines: List[str]) -> List[str]: + filtered_array = [] + for line in lines: + match_found: bool = False + for pattern in line_patterns_to_ignore: + if re.fullmatch(pattern, line): + match_found = True + break + if not match_found: + filtered_array.append(line) + return filtered_array + + +def main() -> None: + parser = argparse.ArgumentParser(description="A test harness for evaluating the output of the xmlconverter program") + parser.add_argument("-v", "--verbose", help="Prints the results from xmlconverter in JSON format", action="store_true") + args = parser.parse_args() + + output_parent_dirpath = "./outputs" + + # Ensure that the test output directory is empty + if os.path.exists(output_parent_dirpath): + shutil.rmtree(output_parent_dirpath) + + for testcase in testcases: + xml_output_dir_path = os.path.join(output_parent_dirpath, "xml", testcase.name) + proto_output_dir_path = os.path.join(output_parent_dirpath, "proto", testcase.name) + + + os.makedirs(xml_output_dir_path, exist_ok=True) + os.makedirs(proto_output_dir_path, exist_ok=True) + + rawstdout, rawstderr, returncode = run_xml_converter( + input_xml=testcase.xml_input_paths, + output_xml=[xml_output_dir_path], + output_proto=[proto_output_dir_path], + ) + + # Sanitize and denoise the lines + stdout: List[str] = remove_ansii_color_escapecodes(remove_ignored_lines(rawstdout.split("\n"))) + stderr: List[str] = remove_ansii_color_escapecodes(remove_ignored_lines(rawstderr.split("\n"))) + + # Prints the results of xml_converter + if args.verbose: + print(f"Test {testcase.name}") + print(" stdout : {}".format("\n".join(stdout))) + print(" stderr : {}".format("\n".join(stderr))) + print(" return_code : {}".format(returncode)) + + all_tests_passed: bool = True + + stdout_diff: List[str] = list(difflib.Differ().compare(testcase.expected_stdout, stdout)) + if len_diff(stdout_diff) != 0: + print(f"Standard output did not match for test {testcase.name}") + for line in stdout_diff: + print(line) + all_tests_passed = False + + stderr_diff: List[str] = list(difflib.Differ().compare(testcase.expected_stderr, stderr)) + if len_diff(stderr_diff) != 0: + print(f"Standard error did not match for test {testcase.name}") + for line in stderr_diff: + print(line) + all_tests_passed = False + + if testcase.expected_returncode is not None and testcase.expected_returncode != returncode : + print(f"Expected a return code of {testcase.expected_returncode} for {testcase.name} but got {returncode}") + + if testcase.expected_output_xml_path is not None: + # TODO: These paths are directories and `xml_file.xml` is just one + # possible file in the directories. Eventually we should check all + # the files in the directory not just the one. + output_xml_filepath = os.path.join(xml_output_dir_path, "xml_file.xml") + expected_output_xml_filepath = os.path.join(testcase.expected_output_xml_path, "xml_file.xml") + + xml_diff = compare_files(expected_output_xml_filepath , output_xml_filepath) + + if len_diff(xml_diff) != 0: + print(f"XML output was incorrect for test {testcase.name}") + for line in xml_diff: + print(line, end="") + all_tests_passed = False + + if all_tests_passed: + print(f"Success: test {testcase.name}") + + +if __name__ == "__main__": + main() diff --git a/xml_converter/intigration_tests/test_expected_outputs.json b/xml_converter/intigration_tests/test_expected_outputs.json deleted file mode 100644 index 5607991b..00000000 --- a/xml_converter/intigration_tests/test_expected_outputs.json +++ /dev/null @@ -1,37 +0,0 @@ -[ - { - "attribute_name": "can_fade", - "tests": [ - { - "name": "is_correct", - "expected_output_xml_file_name": "can_fade_false.xml", - "expected_stdout" : [ - "Loading taco pack ../test_cases/can_fade/inputs/can_fade_is_correct.xml" - ], - "expected_stderr": [], - "expected_returncode" : 0 - }, - { - "name" : "is_supported_value_not_default", - "expected_output_xml_file_name": "can_fade_false.xml", - "expected_stdout": [ - "Loading taco pack ../test_cases/can_fade/inputs/can_fade_is_supported_value_not_default.xml" - ], - "expected_stderr": [], - "expected_returncode" : 0 - }, - { - "name": "unsupported_value", - "expected_output_xml_file_name": "can_fade_false.xml", - "expected_stdout": [ - "Loading taco pack ../test_cases/can_fade/inputs/can_fade_unsupported_value.xml", - "Error: Found a boolean value that was not a '1', '0', 'true', or 'false'", - "../test_cases/can_fade/inputs/can_fade_unsupported_value.xml", - "6 |", " | ^^^" - ], - "expected_stderr" : [], - "expected_returncode" : 0 - } - ] - } -] diff --git a/xml_converter/intigration_tests/testcases.py b/xml_converter/intigration_tests/testcases.py new file mode 100644 index 00000000..ce3bb720 --- /dev/null +++ b/xml_converter/intigration_tests/testcases.py @@ -0,0 +1,36 @@ +from dataclasses import dataclass, field +from typing import List, Optional + +@dataclass +class Testcase: + name: str + xml_input_paths: List[str] = field(default_factory=list) + proto_input_paths: List[str] = field(default_factory=list) + + # TODO: Eventually the expected output paths wont be optional + expected_output_xml_path: Optional[str] = None + expected_output_proto_path: Optional[str] = None + + expected_stdout: List[str] = field(default_factory=list) + expected_stderr: List[str] = field(default_factory=list) + expected_returncode: int = 0 + + +testcases: List[Testcase] = [ + Testcase( + name="canfade_valid", + xml_input_paths=["./inputs/xml_can_fade_valid"], + expected_output_xml_path="./expected_outputs/xml_can_fade_valid", + ), + Testcase( + name="canfade_invalid", + xml_input_paths=["./inputs/xml_can_fade_invalid"], + expected_output_xml_path="./expected_outputs/xml_can_fade_invalid", + expected_stdout=[ + "Error: Found a boolean value that was not a '1', '0', 'true', or 'false'", + "./inputs/xml_can_fade_invalid/xml_file.xml", + '6 |', + " | ^^^" + ] + ) +] diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index cb39da84..5d0c9238 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -98,7 +98,7 @@ void read_taco_directory(string directory, map* marker_categor void write_taco_directory(string directory, map* marker_categories, vector* parsed_pois) { // TODO: Exportion of XML Marker Packs File Structure #111 - string xml_filepath = directory + "xml_file.xml"; + string xml_filepath = directory + "/xml_file.xml"; write_xml_file(xml_filepath, marker_categories, parsed_pois); } From 78274d4736c87635de3331fec13b32342cb72a1c Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Thu, 26 Oct 2023 22:35:48 -0500 Subject: [PATCH 278/539] Update Spatial.gd Co-authored-by: klingbolt <89052698+klingbolt@users.noreply.github.com> --- Spatial.gd | 1 - 1 file changed, 1 deletion(-) diff --git a/Spatial.gd b/Spatial.gd index 5a030f9c..05890f24 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -324,7 +324,6 @@ func decode_context_packet(spb: StreamPeerBuffer): print("New Map") print("Saving Old Map") - self.markerdata[str(old_map_id)] = data_from_renderview() print("Loading New Map") load_waypoint_markers(self.map_id) gen_map_markers() From 2f60b0993d45e05a171cee5d3c6f2a232455cc3e Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Thu, 26 Oct 2023 22:36:09 -0500 Subject: [PATCH 279/539] Update Spatial.tscn Co-authored-by: klingbolt <89052698+klingbolt@users.noreply.github.com> --- Spatial.tscn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Spatial.tscn b/Spatial.tscn index fc282777..2abe7f1c 100644 --- a/Spatial.tscn +++ b/Spatial.tscn @@ -601,7 +601,7 @@ disabled = true text = "Reverse Path Direction" [node name="SettingsDialog" type="WindowDialog" parent="Control/Dialogs"] -visible = true +visible = false margin_left = 592.0 margin_top = 146.0 margin_right = 981.0 From 5dfd65419c1a53b759459e7141bd6ee108802fe2 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sun, 29 Oct 2023 13:28:49 -0500 Subject: [PATCH 280/539] adding xyz, mapid, and texture to the tests --- .../expected_outputs/xml_can_fade_invalid/xml_file.xml | 2 +- .../expected_outputs/xml_can_fade_valid/xml_file.xml | 4 ++-- .../inputs/xml_can_fade_invalid/xml_file.xml | 2 +- .../intigration_tests/inputs/xml_can_fade_valid/xml_file.xml | 4 ++-- xml_converter/intigration_tests/testcases.py | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/xml_converter/intigration_tests/expected_outputs/xml_can_fade_invalid/xml_file.xml b/xml_converter/intigration_tests/expected_outputs/xml_can_fade_invalid/xml_file.xml index d5c9dc0b..98fc5d35 100644 --- a/xml_converter/intigration_tests/expected_outputs/xml_can_fade_invalid/xml_file.xml +++ b/xml_converter/intigration_tests/expected_outputs/xml_can_fade_invalid/xml_file.xml @@ -3,6 +3,6 @@ - + diff --git a/xml_converter/intigration_tests/expected_outputs/xml_can_fade_valid/xml_file.xml b/xml_converter/intigration_tests/expected_outputs/xml_can_fade_valid/xml_file.xml index d0bede6d..4731a19d 100644 --- a/xml_converter/intigration_tests/expected_outputs/xml_can_fade_valid/xml_file.xml +++ b/xml_converter/intigration_tests/expected_outputs/xml_can_fade_valid/xml_file.xml @@ -3,7 +3,7 @@ - - + + diff --git a/xml_converter/intigration_tests/inputs/xml_can_fade_invalid/xml_file.xml b/xml_converter/intigration_tests/inputs/xml_can_fade_invalid/xml_file.xml index 273af0b9..82333328 100644 --- a/xml_converter/intigration_tests/inputs/xml_can_fade_invalid/xml_file.xml +++ b/xml_converter/intigration_tests/inputs/xml_can_fade_invalid/xml_file.xml @@ -3,6 +3,6 @@ - + diff --git a/xml_converter/intigration_tests/inputs/xml_can_fade_valid/xml_file.xml b/xml_converter/intigration_tests/inputs/xml_can_fade_valid/xml_file.xml index 21ecea79..af7cae72 100644 --- a/xml_converter/intigration_tests/inputs/xml_can_fade_valid/xml_file.xml +++ b/xml_converter/intigration_tests/inputs/xml_can_fade_valid/xml_file.xml @@ -3,8 +3,8 @@ - - + + - + + + + + diff --git a/xml_converter/intigration_tests/inputs/xml_mount_filter_invalid/xml_file.xml b/xml_converter/intigration_tests/inputs/xml_mount_filter_invalid/xml_file.xml index 3ee980aa..7ce2f5a0 100644 --- a/xml_converter/intigration_tests/inputs/xml_mount_filter_invalid/xml_file.xml +++ b/xml_converter/intigration_tests/inputs/xml_mount_filter_invalid/xml_file.xml @@ -1,11 +1,11 @@ - - + + - - - - - - + + + + + + diff --git a/xml_converter/intigration_tests/inputs/xml_mount_filter_valid/xml_file.xml b/xml_converter/intigration_tests/inputs/xml_mount_filter_valid/xml_file.xml index b3e44ac7..d8472344 100644 --- a/xml_converter/intigration_tests/inputs/xml_mount_filter_valid/xml_file.xml +++ b/xml_converter/intigration_tests/inputs/xml_mount_filter_valid/xml_file.xml @@ -1,11 +1,11 @@ - - + + - - - - - - + + + + + + diff --git a/xml_converter/intigration_tests/proto_utils.py b/xml_converter/intigration_tests/proto_utils.py new file mode 100644 index 00000000..1e1957dc --- /dev/null +++ b/xml_converter/intigration_tests/proto_utils.py @@ -0,0 +1,80 @@ +import os +import subprocess +import difflib + +def compare_protos( + outputs_directory: str, + expected_outputs_directory: str, +) -> bool: + # TODO: These paths are directories and 'markers.bin` is just one + # possible file in the directories. Eventually we should check all + # the files in the directory not just the one. + files_are_equal = compare_binary_file( + os.path.join(expected_outputs_directory, "markers.bin"), + os.path.join(outputs_directory, "markers.bin"), + ) + + if files_are_equal: + return True + + expected_textproto_path = os.path.join(expected_outputs_directory, "markers.bin") + actual_textproto_path = os.path.join(outputs_directory, "markers.bin") + + expected_textproto = get_waypoint_textproto(expected_textproto_path) + actual_textproto = get_waypoint_textproto(actual_textproto_path) + + diff = difflib.unified_diff(expected_textproto.split("\n"), actual_textproto.split("\n"), fromfile=expected_textproto_path, tofile=actual_textproto_path, lineterm="") + + for line in diff: + print(line) + + # TODO: Also might be good to include a HEX diff breakdown because if the + # diff is just ordering then the textproto conversion might correct the + # error and make it look like there is no diff but the test still fails. + + return False + +def compare_binary_file(file_path_1: str, file_path_2: str) -> bool: + if not os.path.exists(file_path_1): + return False + if not os.path.exists(file_path_2): + return False + + with open(file_path_1, 'rb') as file1: + contents_1 = file1.read() + with open(file_path_2, 'rb') as file2: + contents_2 = file2.read() + + return contents_1 == contents_2 + + +################################################################################ +# get_waypoint_textproto +# +# Reads a waypoint protobin and returns a stringy textproto value of the +# contents of the protobin. This makes it easier to diff the contents but also +# can be used to easily inspect the values of the protobin. +################################################################################ +def get_waypoint_textproto(protobin_path: str) -> str: + proto_schema_path = "../proto/waypoint.proto" + proto_schema_basedir = "../proto" + + if not os.path.exists(protobin_path): + return "" + + with open(protobin_path, 'rb') as f: + result = subprocess.run( + [ + "protoc", + "--decode=waypoint.Waypoint", + "--proto_path=" + proto_schema_basedir, + proto_schema_path + ], + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + stdin=f, + ) + + # TODO: sanity check return code, stdout, and stderr + + return result.stdout.decode("utf-8") diff --git a/xml_converter/intigration_tests/run_tests.py b/xml_converter/intigration_tests/run_tests.py index 155653ad..6238c448 100755 --- a/xml_converter/intigration_tests/run_tests.py +++ b/xml_converter/intigration_tests/run_tests.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + import argparse import difflib import json @@ -7,6 +9,7 @@ from typing import List, Optional, Final, Tuple from testcases import testcases import shutil +from proto_utils import compare_protos # Path to compiled C++ executable xml_converter_binary_path: str = "../build/xml_converter" @@ -46,13 +49,13 @@ def run_xml_converter( return (result.stdout, result.stderr, result.returncode) -def compare_files(file_path1: str, file_path2: str) -> List[str]: +def compare_text_files(file_path1: str, file_path2: str) -> List[str]: with open(file_path1, 'r') as file1: content1 = file1.readlines() with open(file_path2, 'r') as file2: content2 = file2.readlines() - diff = list(difflib.Differ().compare(content1, content2)) + diff = list(difflib.unified_diff(content1, content2, fromfile=file_path1, tofile=file_path2, lineterm="")) return diff @@ -61,7 +64,7 @@ def len_diff(lines: List[str]) -> int: diffcount = 0 for line in lines: - if line.startswith(" "): + if line.startswith(" "): continue diffcount += 1 return diffcount @@ -149,14 +152,14 @@ def main() -> None: all_tests_passed: bool = True - stdout_diff: List[str] = list(difflib.Differ().compare(testcase.expected_stdout, stdout)) + stdout_diff: List[str] = list(difflib.unified_diff(testcase.expected_stdout, stdout, fromfile="Expected stdout", tofile="Actual stdout", lineterm="")) if len_diff(stdout_diff) != 0: print(f"Standard output did not match for test {testcase.name}") for line in stdout_diff: print(line) all_tests_passed = False - stderr_diff: List[str] = list(difflib.Differ().compare(testcase.expected_stderr, stderr)) + stderr_diff: List[str] = list(difflib.unified_diff(testcase.expected_stderr, stderr, fromfile="Expected stderr", tofile="Actual stderr", lineterm="")) if len_diff(stderr_diff) != 0: print(f"Standard error did not match for test {testcase.name}") for line in stderr_diff: @@ -173,7 +176,7 @@ def main() -> None: output_xml_filepath = os.path.join(xml_output_dir_path, "xml_file.xml") expected_output_xml_filepath = os.path.join(testcase.expected_output_xml_path, "xml_file.xml") - xml_diff = compare_files(expected_output_xml_filepath , output_xml_filepath) + xml_diff = compare_text_files(expected_output_xml_filepath , output_xml_filepath) if len_diff(xml_diff) != 0: print(f"XML output was incorrect for test {testcase.name}") @@ -181,6 +184,14 @@ def main() -> None: print(line, end="") all_tests_passed = False + if testcase.expected_output_proto_path is not None: + protos_are_equal = compare_protos( + outputs_directory=proto_output_dir_path, + expected_outputs_directory=testcase.expected_output_proto_path, + ) + + all_tests_passed &= protos_are_equal + if all_tests_passed: print(f"Success: test {testcase.name}") diff --git a/xml_converter/intigration_tests/testcases.py b/xml_converter/intigration_tests/testcases.py index 01c8e01f..297129c5 100644 --- a/xml_converter/intigration_tests/testcases.py +++ b/xml_converter/intigration_tests/testcases.py @@ -21,44 +21,48 @@ class Testcase: name="canfade_valid", xml_input_paths=["./inputs/xml_can_fade_valid"], expected_output_xml_path="./expected_outputs/xml_can_fade_valid", + expected_output_proto_path="./expected_outputs/proto_can_fade_valid", ), Testcase( name="canfade_invalid", xml_input_paths=["./inputs/xml_can_fade_invalid"], expected_output_xml_path="./expected_outputs/xml_can_fade_invalid", + expected_output_proto_path="./expected_outputs/proto_can_fade_invalid", expected_stdout=[ "Error: Found a boolean value that was not a '1', '0', 'true', or 'false'", "./inputs/xml_can_fade_invalid/xml_file.xml", - '6 |', - " | ^^^" + '6 | ', + " | ^^^" ] ), Testcase( name="mountfilter_valid", xml_input_paths=["./inputs/xml_mount_filter_valid"], expected_output_xml_path="./expected_outputs/xml_mount_filter_valid", + expected_output_proto_path="./expected_outputs/proto_mount_filter_valid", ), Testcase( name="mountfilter_invalid", xml_input_paths=["./inputs/xml_mount_filter_invalid"], expected_output_xml_path="./expected_outputs/xml_mount_filter_invalid", + expected_output_proto_path="./expected_outputs/proto_mount_filter_invalid", expected_stdout=[ 'Error: Invalid Filter for MountFilter. Found ', './inputs/xml_mount_filter_invalid/xml_file.xml', - '6 |', - ' | ', + '6 | ', + ' | ', 'Error: Invalid Filter for MountFilter. Found NotAMount', './inputs/xml_mount_filter_invalid/xml_file.xml', - '7 |', - ' | ^^^^^^^^^', + '7 | ', + ' | ^^^^^^^^^', 'Error: Invalid Filter for MountFilter. Found ', './inputs/xml_mount_filter_invalid/xml_file.xml', - '8 |', - ' | ^^^^^^^^^^^^^^^^', + '8 | ', + ' | ^^^^^^^^^^^^^^^^', 'Error: Invalid Filter for MountFilter. Found NotAMount', './inputs/xml_mount_filter_invalid/xml_file.xml', - '9 |', - ' | ^^^^^^^^^^^^^^^^^^^^^^^^^', + '9 | ', + ' | ^^^^^^^^^^^^^^^^^^^^^^^^^', ] ), ] diff --git a/xml_converter/src/packaging_protobin.cpp b/xml_converter/src/packaging_protobin.cpp index a5129bdb..d17a23b2 100644 --- a/xml_converter/src/packaging_protobin.cpp +++ b/xml_converter/src/packaging_protobin.cpp @@ -150,6 +150,10 @@ void _write_protobuf_file( ofstream outfile; outfile.open(filepath, ios::out | ios::binary); + if (!outfile.is_open()) { + cout << "Unable to open " << filepath << endl; + } + waypoint::Waypoint output_message; for (map::const_iterator it = marker_categories->begin(); it != marker_categories->end(); it++) { @@ -195,7 +199,7 @@ void write_protobuf_file( } _write_protobuf_file( - filepath, + filepath + "/markers.bin", category_filter, marker_categories, category_to_pois); From c20b1846ebdb6564f0cbc07ffa372618f04429d7 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sat, 4 Nov 2023 21:46:50 -0400 Subject: [PATCH 311/539] Removed duplicated logic --- xml_converter/src/xml_converter.cpp | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index d39cbd36..609e668e 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -108,26 +108,16 @@ void read_taco_directory(string input_path, map* marker_catego void write_taco_directory(string output_path, map* marker_categories, vector* parsed_pois) { // TODO: Exportion of XML Marker Packs File Structure #111 string xml_filepath; - // If the file path leads to a directory or file, use that path - // This will overwrite files - if (filesystem::exists(output_path)) { - if (filesystem::is_directory(output_path)) { - if (!has_suffix(output_path, "/")) - output_path += "/"; - xml_filepath = output_path + "xml_file.xml"; - } - else { - xml_filepath = output_path; - } + if (!has_suffix(output_path, "/")){ + output_path += "/"; + xml_filepath = output_path + "xml_file.xml"; } - // If the file path does not exist, assume it is a directory path else { - if (filesystem::create_directory(output_path)) { - if (!has_suffix(output_path, "/")) - output_path += "/"; - xml_filepath = output_path + "xml_file.xml"; + xml_filepath = output_path; } - else { + + if (!filesystem::is_directory(output_path)) { + if (!filesystem::create_directory(output_path)) { cout << "Error: " << output_path << "is not a valid directory path" << endl; } } From d15d3371b5ab0c985bdaf674f5cc5260c6a7f32c Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sat, 4 Nov 2023 21:47:45 -0400 Subject: [PATCH 312/539] Linter fixes --- xml_converter/src/xml_converter.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 609e668e..e2f86bca 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -108,13 +108,13 @@ void read_taco_directory(string input_path, map* marker_catego void write_taco_directory(string output_path, map* marker_categories, vector* parsed_pois) { // TODO: Exportion of XML Marker Packs File Structure #111 string xml_filepath; - if (!has_suffix(output_path, "/")){ + if (!has_suffix(output_path, "/")) { output_path += "/"; xml_filepath = output_path + "xml_file.xml"; } else { - xml_filepath = output_path; - } + xml_filepath = output_path; + } if (!filesystem::is_directory(output_path)) { if (!filesystem::create_directory(output_path)) { From 66762727ed322b6219952a27a7e8eb65e0d1da72 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 5 Nov 2023 00:32:32 -0400 Subject: [PATCH 313/539] removed unnessecary variable --- xml_converter/src/xml_converter.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index e2f86bca..3100d85f 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -107,21 +107,14 @@ void read_taco_directory(string input_path, map* marker_catego void write_taco_directory(string output_path, map* marker_categories, vector* parsed_pois) { // TODO: Exportion of XML Marker Packs File Structure #111 - string xml_filepath; if (!has_suffix(output_path, "/")) { output_path += "/"; - xml_filepath = output_path + "xml_file.xml"; - } - else { - xml_filepath = output_path; - } - if (!filesystem::is_directory(output_path)) { if (!filesystem::create_directory(output_path)) { cout << "Error: " << output_path << "is not a valid directory path" << endl; } } - write_xml_file(xml_filepath, marker_categories, parsed_pois); + write_xml_file(output_path + "xml_file.xml", marker_categories, parsed_pois); } //////////////////////////////////////////////////////////////////////////////// From 757906cee0736f613208421fc29fd3c0f934efe8 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 5 Nov 2023 00:36:26 -0400 Subject: [PATCH 314/539] Added bracket --- xml_converter/src/xml_converter.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 3100d85f..fb0ebe78 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -109,6 +109,7 @@ void write_taco_directory(string output_path, map* marker_cate // TODO: Exportion of XML Marker Packs File Structure #111 if (!has_suffix(output_path, "/")) { output_path += "/"; + } if (!filesystem::is_directory(output_path)) { if (!filesystem::create_directory(output_path)) { cout << "Error: " << output_path << "is not a valid directory path" << endl; From a9029719dba8e2a078181235f49b3d5a5b7c564c Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sun, 5 Nov 2023 17:38:16 -0600 Subject: [PATCH 315/539] including "functional" in the generated cpp marker classes --- xml_converter/generators/generate_cpp.py | 1 + xml_converter/src/category_gen.hpp | 1 + xml_converter/src/icon_gen.hpp | 1 + xml_converter/src/trail_gen.hpp | 1 + 4 files changed, 4 insertions(+) diff --git a/xml_converter/generators/generate_cpp.py b/xml_converter/generators/generate_cpp.py index b9b86c8d..55e33571 100644 --- a/xml_converter/generators/generate_cpp.py +++ b/xml_converter/generators/generate_cpp.py @@ -223,6 +223,7 @@ def generate_cpp_variable_data( cpp_includes.cpp_absolute_includes.add("iosfwd") cpp_includes.cpp_absolute_includes.add("string") + cpp_includes.hpp_absolute_includes.add("functional") cpp_includes.cpp_relative_includes.add("rapidxml-1.13/rapidxml.hpp") cpp_includes.cpp_relative_includes.add("string_helper.hpp") cpp_includes.cpp_relative_includes.add("rapid_helpers.hpp") diff --git a/xml_converter/src/category_gen.hpp b/xml_converter/src/category_gen.hpp index 3ef42874..8f51ea43 100644 --- a/xml_converter/src/category_gen.hpp +++ b/xml_converter/src/category_gen.hpp @@ -1,5 +1,6 @@ #pragma once +#include #include #include #include diff --git a/xml_converter/src/icon_gen.hpp b/xml_converter/src/icon_gen.hpp index 771b72fa..d0f66677 100644 --- a/xml_converter/src/icon_gen.hpp +++ b/xml_converter/src/icon_gen.hpp @@ -1,5 +1,6 @@ #pragma once +#include #include #include diff --git a/xml_converter/src/trail_gen.hpp b/xml_converter/src/trail_gen.hpp index d2a5d488..a681494e 100644 --- a/xml_converter/src/trail_gen.hpp +++ b/xml_converter/src/trail_gen.hpp @@ -1,5 +1,6 @@ #pragma once +#include #include #include From f43acca0c8759cc1e02b4bda8235881fab6ef9fe Mon Sep 17 00:00:00 2001 From: klingbolt Date: Tue, 7 Nov 2023 20:20:49 -0500 Subject: [PATCH 316/539] Changed scenes to const preload and changed root from a global variable --- Spatial.gd | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Spatial.gd b/Spatial.gd index cdde8e50..1f8113ed 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -49,14 +49,13 @@ var x11_window_id_burrito: int var is_transient:bool = false # Scenes used throughout this scene -var route_scene = load("res://Route.tscn") -var icon_scene = load("res://Icon.tscn") -var path2d_scene = load("res://Route2D.tscn") -var gizmo_scene = load("res://Gizmo/PointEdit.tscn") +const route_scene = preload("res://Route.tscn") +const icon_scene = preload("res://Icon.tscn") +const path2d_scene = preload("res://Route2D.tscn") +const gizmo_scene = preload("res://Gizmo/PointEdit.tscn") ##########Node Connections########### onready var marker_packs := $Control/Dialogs/MarkerPacks/MarkerPacks as Tree -onready var root := self.marker_packs.create_item() as TreeItem onready var icons := $Icons as Spatial onready var paths := $Paths as Spatial onready var minimap := $Control/MiniMap as Node2D @@ -480,7 +479,9 @@ func clear_map_markers(): func init_category_tree(): - self.root = self.marker_packs.create_item() + self.marker_packs.clear() + var root : TreeItem + root = self.marker_packs.create_item() root.set_text(0, "Markers available on current map") root.set_selectable(0, false) root.set_text(1, "Visible") @@ -488,7 +489,7 @@ func init_category_tree(): func waypoint_categories_to_godot_nodes(): for category in self.waypoint_data.get_category(): - _waypoint_categories_to_godot_nodes(root, category, category.get_name(), false) + _waypoint_categories_to_godot_nodes(null, category, category.get_name(), false) func _waypoint_categories_to_godot_nodes(item: TreeItem, category, full_category_name: String, collapsed: bool): From a5ca65291501caa3f916f374a0a5b0b15721978c Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Thu, 9 Nov 2023 00:04:38 -0600 Subject: [PATCH 317/539] fixing the printed xml diff to have correct newlines --- xml_converter/intigration_tests/run_tests.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xml_converter/intigration_tests/run_tests.py b/xml_converter/intigration_tests/run_tests.py index 6238c448..8cc4d131 100755 --- a/xml_converter/intigration_tests/run_tests.py +++ b/xml_converter/intigration_tests/run_tests.py @@ -51,9 +51,9 @@ def run_xml_converter( def compare_text_files(file_path1: str, file_path2: str) -> List[str]: with open(file_path1, 'r') as file1: - content1 = file1.readlines() + content1 = file1.read().split("\n") with open(file_path2, 'r') as file2: - content2 = file2.readlines() + content2 = file2.read().split("\n") diff = list(difflib.unified_diff(content1, content2, fromfile=file_path1, tofile=file_path2, lineterm="")) @@ -181,7 +181,7 @@ def main() -> None: if len_diff(xml_diff) != 0: print(f"XML output was incorrect for test {testcase.name}") for line in xml_diff: - print(line, end="") + print(line) all_tests_passed = False if testcase.expected_output_proto_path is not None: From 04d3cbf74933653734713693473c970e709940b1 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Thu, 9 Nov 2023 01:23:27 -0600 Subject: [PATCH 318/539] adding achievement bitmask tests --- .../markers.bin | Bin 0 -> 153 bytes .../xml_file.xml | 13 ++++++++++++ .../xml_file.xml | 19 ++++++++++++++++++ xml_converter/intigration_tests/testcases.py | 9 ++++++++- 4 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 xml_converter/intigration_tests/expected_outputs/proto_achievement_bitmask_valid/markers.bin create mode 100644 xml_converter/intigration_tests/expected_outputs/xml_achievement_bitmask_valid/xml_file.xml create mode 100644 xml_converter/intigration_tests/inputs/xml_achievement_bitmask_valid/xml_file.xml diff --git a/xml_converter/intigration_tests/expected_outputs/proto_achievement_bitmask_valid/markers.bin b/xml_converter/intigration_tests/expected_outputs/proto_achievement_bitmask_valid/markers.bin new file mode 100644 index 0000000000000000000000000000000000000000..6145a43afd1d9d981f575b7f3af3c14346c58450 GIT binary patch literal 153 zcmd;@#>mC(TdCljSdyBaUsNe2tYGBC&l_`I(^)iaS&*}A^_6gEDM>7Xt&FS;3=BA= X{{R19k3$NmsR4)7Z=g0MHi*Fhe!?!N literal 0 HcmV?d00001 diff --git a/xml_converter/intigration_tests/expected_outputs/xml_achievement_bitmask_valid/xml_file.xml b/xml_converter/intigration_tests/expected_outputs/xml_achievement_bitmask_valid/xml_file.xml new file mode 100644 index 00000000..7535e6e6 --- /dev/null +++ b/xml_converter/intigration_tests/expected_outputs/xml_achievement_bitmask_valid/xml_file.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/xml_converter/intigration_tests/inputs/xml_achievement_bitmask_valid/xml_file.xml b/xml_converter/intigration_tests/inputs/xml_achievement_bitmask_valid/xml_file.xml new file mode 100644 index 00000000..17232a3e --- /dev/null +++ b/xml_converter/intigration_tests/inputs/xml_achievement_bitmask_valid/xml_file.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/xml_converter/intigration_tests/testcases.py b/xml_converter/intigration_tests/testcases.py index 297129c5..d720e53e 100644 --- a/xml_converter/intigration_tests/testcases.py +++ b/xml_converter/intigration_tests/testcases.py @@ -63,6 +63,13 @@ class Testcase: './inputs/xml_mount_filter_invalid/xml_file.xml', '9 | ', ' | ^^^^^^^^^^^^^^^^^^^^^^^^^', - ] + ] + ), + + Testcase( + name="achievement_bitmask", + xml_input_paths=["./inputs/xml_achievement_bitmask_valid"], + expected_output_xml_path="./expected_outputs/xml_achievement_bitmask_valid", + expected_output_proto_path="./expected_outputs/proto_achievement_bitmask_valid", ), ] From 963479c0e386933a6be3d7151dad6e1fd72ac80a Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Thu, 9 Nov 2023 02:35:16 -0600 Subject: [PATCH 319/539] adding achievement_id tests --- .../proto_achievement_id/markers.bin | 3 +++ .../xml_achievement_id/xml_file.xml | 14 ++++++++++++++ .../inputs/xml_achievement_id/xml_file.xml | 14 ++++++++++++++ xml_converter/intigration_tests/testcases.py | 6 ++++++ 4 files changed, 37 insertions(+) create mode 100644 xml_converter/intigration_tests/expected_outputs/proto_achievement_id/markers.bin create mode 100644 xml_converter/intigration_tests/expected_outputs/xml_achievement_id/xml_file.xml create mode 100644 xml_converter/intigration_tests/inputs/xml_achievement_id/xml_file.xml diff --git a/xml_converter/intigration_tests/expected_outputs/proto_achievement_id/markers.bin b/xml_converter/intigration_tests/expected_outputs/proto_achievement_id/markers.bin new file mode 100644 index 00000000..a5b458eb --- /dev/null +++ b/xml_converter/intigration_tests/expected_outputs/proto_achievement_id/markers.bin @@ -0,0 +1,3 @@ + +µ + My Category 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWCˆ 2B \Ï)Cf¦RC{ÔWCˆ 2B \Ï)Cf¦RC{ÔWCˆÿÿÿÿ 2B \Ï)Cf¦RC{ÔWCˆ€€€€øÿÿÿÿ 2B \Ï)Cf¦RC{ÔWCˆûÿÿÿÿÿÿÿÿ"ˆ \ No newline at end of file diff --git a/xml_converter/intigration_tests/expected_outputs/xml_achievement_id/xml_file.xml b/xml_converter/intigration_tests/expected_outputs/xml_achievement_id/xml_file.xml new file mode 100644 index 00000000..00cfc8cc --- /dev/null +++ b/xml_converter/intigration_tests/expected_outputs/xml_achievement_id/xml_file.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/xml_converter/intigration_tests/inputs/xml_achievement_id/xml_file.xml b/xml_converter/intigration_tests/inputs/xml_achievement_id/xml_file.xml new file mode 100644 index 00000000..6e69adcf --- /dev/null +++ b/xml_converter/intigration_tests/inputs/xml_achievement_id/xml_file.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/xml_converter/intigration_tests/testcases.py b/xml_converter/intigration_tests/testcases.py index d720e53e..7cb80a06 100644 --- a/xml_converter/intigration_tests/testcases.py +++ b/xml_converter/intigration_tests/testcases.py @@ -72,4 +72,10 @@ class Testcase: expected_output_xml_path="./expected_outputs/xml_achievement_bitmask_valid", expected_output_proto_path="./expected_outputs/proto_achievement_bitmask_valid", ), + Testcase( + name="achievement_id", + xml_input_paths=["./inputs/xml_achievement_id"], + expected_output_xml_path="./expected_outputs/xml_achievement_id", + expected_output_proto_path="./expected_outputs/proto_achievement_id", + ), ] From 505d517bb17f21f1dee321d7549098983a052494 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Thu, 9 Nov 2023 03:37:34 -0600 Subject: [PATCH 320/539] Don't regenerate files that don't change The code generator deletes and regenerates all files. This is good in general but it causes the cpp compiler to rebuild the file because it thinks it is a newly changed file. This moves the delete logic until after the regeneration, prevents writing to files if their contents dont change, and prevents the delete logic from deleting any files that it should not. --- xml_converter/generators/generate_cpp.py | 43 ++++++++++++++++++++---- xml_converter/generators/main.py | 12 ++++--- 2 files changed, 43 insertions(+), 12 deletions(-) diff --git a/xml_converter/generators/generate_cpp.py b/xml_converter/generators/generate_cpp.py index a8870af2..4c7fa21d 100644 --- a/xml_converter/generators/generate_cpp.py +++ b/xml_converter/generators/generate_cpp.py @@ -405,8 +405,9 @@ def generate_cpp_variable_data( # # Creates the attribute files for attributes that contain multiple values ############################################################################ -def write_attribute(output_directory: str, data: Dict[str, Document]) -> None: +def write_attribute(output_directory: str, data: Dict[str, Document]) -> List[str]: print("Writing attributes") + files_written: List[str] = [] os.makedirs(output_directory, exist_ok=True) file_loader = FileSystemLoader('cpp_templates') @@ -551,18 +552,24 @@ def write_attribute(output_directory: str, data: Dict[str, Document]) -> None: else: continue - with open(os.path.join(output_directory, attribute_name + "_gen.hpp"), 'w') as f: - f.write(env.get_template("attribute_template.hpp").render( + hpp_filepath = os.path.join(output_directory, attribute_name + "_gen.hpp") + write_if_different( + hpp_filepath, + env.get_template("attribute_template.hpp").render( attribute_name=attribute_name, attribute_variables=sorted(attribute_variables, key=get_attribute_variable_key), class_name=capitalize(attribute_name, delimiter=""), type=metadata[filepath]['type'], proto_field_cpp_type=proto_field_type, proto_field_cpp_type_prototype=proto_field_prototype, - )) + ) + ) + files_written.append(hpp_filepath) - with open(os.path.join(output_directory, attribute_name + "_gen.cpp"), 'w') as f: - f.write(template[metadata[filepath]['type']].render( + cpp_filepath = os.path.join(output_directory, attribute_name + "_gen.cpp") + write_if_different( + cpp_filepath, + template[metadata[filepath]['type']].render( attribute_name=attribute_name, # TODO: Should this attribute_variables list be sorted? The hpp one is. attribute_variables=attribute_variables, @@ -571,7 +578,29 @@ def write_attribute(output_directory: str, data: Dict[str, Document]) -> None: xml_bundled_components=xml_bundled_components, proto_field_cpp_type=proto_field_type, proto_field_cpp_type_prototype=proto_field_prototype, - )) + ) + ) + files_written.append(cpp_filepath) + + return files_written + + +################################################################################ +# write_if_different +# +# Writes a file, but only writes it if the file contents is different so that +# no modified timestamps get updated on files that are not changed. +################################################################################ +def write_if_different(path: str, contents: str) -> None: + if os.path.exists(path): + with open(path, "r") as f: + data = f.read() + else: + data = "" + + if data != contents: + with open(path, "w") as f: + f.write(contents) def get_attribute_variable_key(attribute_variable: AttributeVariable) -> str: diff --git a/xml_converter/generators/main.py b/xml_converter/generators/main.py index 47352737..4c9fb7d7 100644 --- a/xml_converter/generators/main.py +++ b/xml_converter/generators/main.py @@ -1,7 +1,7 @@ from jsonschema import validate # type:ignore from jsonschema.exceptions import ValidationError # type:ignore import frontmatter # type:ignore -from typing import Any, Dict, List, Tuple, Final +from typing import Any, Dict, List, Tuple, Final, Set import os import markdown from dataclasses import dataclass @@ -114,10 +114,11 @@ class FieldRow: class Generator: data: Dict[str, Document] = {} - def delete_generated_docs(self, dir_path: str) -> None: + def delete_generated_docs(self, dir_path: str, skip: List[str] = []) -> None: + excluded_files: Set[str] = set(skip) for filepath in os.listdir(dir_path): filepath = os.path.join(dir_path, filepath) - if filepath.endswith("_gen.hpp") or filepath.endswith("_gen.cpp") or filepath.endswith(".html"): + if (filepath.endswith("_gen.hpp") or filepath.endswith("_gen.cpp") or filepath.endswith(".html")) and filepath not in excluded_files: os.remove(filepath) def load_input_doc(self, dir_path: str) -> None: @@ -373,10 +374,11 @@ def main() -> None: generator.delete_generated_docs("../web_docs") generator.delete_generated_docs("../src/") - generator.delete_generated_docs("../src/attribute") generator.write_webdocs("../web_docs/") write_cpp_classes("../src/", generator.data) - write_attribute("../src/attribute", generator.data) + + written_attributes = write_attribute("../src/attribute", generator.data) + generator.delete_generated_docs("../src/attribute", skip=written_attributes) main() From 8ef02d99f9a0d4a1ccdb264d18a99c08b4e5530d Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Thu, 9 Nov 2023 03:43:00 -0600 Subject: [PATCH 321/539] renaming can_fade --- .../disable_player_cutout.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename xml_converter/doc/{can_fade/can_fade.md => disable_player_cutout/disable_player_cutout.md} (100%) diff --git a/xml_converter/doc/can_fade/can_fade.md b/xml_converter/doc/disable_player_cutout/disable_player_cutout.md similarity index 100% rename from xml_converter/doc/can_fade/can_fade.md rename to xml_converter/doc/disable_player_cutout/disable_player_cutout.md From ea9f10b21844bf583ee6dea36bf38c2d6c1ed6f5 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Thu, 9 Nov 2023 03:53:44 -0600 Subject: [PATCH 322/539] Renaming CanFade to DisablePlayerCutout This change also adds the necessary logic for parsing inverted bool xml attributes, and changes the necessary files that need to be changed alongside the primary change. It does not rename the integration tests because we are not 100% sure how we want to organize the integration tests yet and the tests still technically test the can_fade xml attribute. --- .../disable_player_cutout.md | 17 +++++-- .../proto_can_fade_valid/markers.bin | 4 +- .../xml_can_fade_valid/xml_file.xml | 6 ++- .../inputs/xml_can_fade_valid/xml_file.xml | 6 +-- xml_converter/proto/waypoint.proto | 4 +- xml_converter/src/attribute/bool.cpp | 45 +++++++++++++++++-- xml_converter/src/attribute/bool.hpp | 14 +++++- xml_converter/src/icon_gen.cpp | 26 +++++------ xml_converter/src/icon_gen.hpp | 4 +- xml_converter/src/trail_gen.cpp | 26 +++++------ xml_converter/src/trail_gen.hpp | 4 +- 11 files changed, 109 insertions(+), 47 deletions(-) diff --git a/xml_converter/doc/disable_player_cutout/disable_player_cutout.md b/xml_converter/doc/disable_player_cutout/disable_player_cutout.md index 07fdaf0c..f2b54cf6 100644 --- a/xml_converter/doc/disable_player_cutout/disable_player_cutout.md +++ b/xml_converter/doc/disable_player_cutout/disable_player_cutout.md @@ -1,11 +1,22 @@ --- -name: Can Fade +name: Disable Player Cutout type: Boolean applies_to: [Icon, Trail] xml_fields: [CanFade] -protobuf_field: can_fade +protobuf_field: disable_player_cutout +custom_functions: + read.xml: + function: inverted_xml_attribute_to_bool + side_effects: [] + write.xml: + function: bool_to_inverted_xml_attribute + side_effects: [] --- - A flag to determine if an object can be made transparent when it is possibly occluding the player. +A flag to determine if an object can be made transparent when it is possibly occluding the player. + +This value is inverted between the waypoint format value of "Disable Player Cutout" and the TacO xml format of "Can Fade" + + Notes ===== https://blishhud.com/docs/markers/attributes/canfade diff --git a/xml_converter/intigration_tests/expected_outputs/proto_can_fade_valid/markers.bin b/xml_converter/intigration_tests/expected_outputs/proto_can_fade_valid/markers.bin index c32cb0ef..a1e1c437 100644 --- a/xml_converter/intigration_tests/expected_outputs/proto_can_fade_valid/markers.bin +++ b/xml_converter/intigration_tests/expected_outputs/proto_can_fade_valid/markers.bin @@ -1,3 +1,3 @@ -7 - My Category 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC \ No newline at end of file +g + My Category 2B \Ï)Cf¦RC{ÔWC˜ 2B \Ï)Cf¦RC{ÔWC˜ 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC \ No newline at end of file diff --git a/xml_converter/intigration_tests/expected_outputs/xml_can_fade_valid/xml_file.xml b/xml_converter/intigration_tests/expected_outputs/xml_can_fade_valid/xml_file.xml index fdc5f9f8..2850f7f7 100644 --- a/xml_converter/intigration_tests/expected_outputs/xml_can_fade_valid/xml_file.xml +++ b/xml_converter/intigration_tests/expected_outputs/xml_can_fade_valid/xml_file.xml @@ -3,7 +3,9 @@ - - + + + + diff --git a/xml_converter/intigration_tests/inputs/xml_can_fade_valid/xml_file.xml b/xml_converter/intigration_tests/inputs/xml_can_fade_valid/xml_file.xml index fc1cad1d..b78d6440 100644 --- a/xml_converter/intigration_tests/inputs/xml_can_fade_valid/xml_file.xml +++ b/xml_converter/intigration_tests/inputs/xml_can_fade_valid/xml_file.xml @@ -5,9 +5,7 @@ - + + diff --git a/xml_converter/proto/waypoint.proto b/xml_converter/proto/waypoint.proto index 908727d6..5886fd29 100644 --- a/xml_converter/proto/waypoint.proto +++ b/xml_converter/proto/waypoint.proto @@ -29,7 +29,7 @@ message Icon { fixed32 achievement_bit = 16; int32 achievement_id = 17; - bool can_fade = 19; + bool disable_player_cutout = 19; int32 minimum_size_on_screen = 20; int32 map_display_size = 21; int32 maximum_size_on_screen = 22; @@ -67,7 +67,7 @@ message Trail { fixed32 achievement_bit = 16; int32 achievement_id = 17; - bool can_fade = 19; + bool disable_player_cutout = 19; bool is_wall = 20; float scale = 21; RGBAColor rgba_color = 22; diff --git a/xml_converter/src/attribute/bool.cpp b/xml_converter/src/attribute/bool.cpp index dd76c6b9..bafdf6e7 100644 --- a/xml_converter/src/attribute/bool.cpp +++ b/xml_converter/src/attribute/bool.cpp @@ -10,11 +10,11 @@ using namespace std; //////////////////////////////////////////////////////////////////////////////// -// parse_bool +// xml_attribute_to_bool // // Parses a bool from the value of a rapidxml::xmlattribute. "true" or "1" are -// evaluated as `true`. 'false' or '0' are evaluated as `false`. Everything is -// is also evaluated as false but appends an error to the errors vector. +// evaluated as `true`. 'false' or '0' are evaluated as `false`. Everything +// else appends an error to the errors vector. //////////////////////////////////////////////////////////////////////////////// void xml_attribute_to_bool( rapidxml::xml_attribute<>* input, @@ -48,6 +48,45 @@ string bool_to_xml_attribute(const string& attribute_name, const bool* value) { } } +//////////////////////////////////////////////////////////////////////////////// +// inverted_xml_attribute_to_bool +// +// Parses an inverted bool from the value of a rapidxml::xmlattribute. "true" +// or "1" are evaluated as `false`. 'false' or '0' are evaluated as `true`. +// Everything else appends an error to the errors vector. +//////////////////////////////////////////////////////////////////////////////// +void inverted_xml_attribute_to_bool( + rapidxml::xml_attribute<>* input, + std::vector* errors, + bool* value, + bool* is_set) { + if (get_attribute_value(input) == "0" || get_attribute_value(input) == "false") { + *value = true; + *is_set = true; + } + else if (get_attribute_value(input) == "1" || get_attribute_value(input) == "true") { + *value = false; + *is_set = true; + } + else { + errors->push_back(new XMLAttributeValueError("Found a boolean value that was not a '1', '0', 'true', or 'false'", input)); + } +} + +//////////////////////////////////////////////////////////////////////////////// +// bool_to_inverted_xml_attribute +// +// Inverts and converts a bool into a fully qualified xml attribute string. +//////////////////////////////////////////////////////////////////////////////// +string bool_to_inverted_xml_attribute(const string& attribute_name, const bool* value) { + if (*value) { + return " " + attribute_name + "=\"false\""; + } + else { + return " " + attribute_name + "=\"true\""; + } +} + //////////////////////////////////////////////////////////////////////////////// // proto_to_bool // diff --git a/xml_converter/src/attribute/bool.hpp b/xml_converter/src/attribute/bool.hpp index 61d80300..d7ce25d0 100644 --- a/xml_converter/src/attribute/bool.hpp +++ b/xml_converter/src/attribute/bool.hpp @@ -14,7 +14,19 @@ void xml_attribute_to_bool( bool* value, bool* is_set); -std::string bool_to_xml_attribute(const std::string& attribute_name, const bool* value); +std::string bool_to_xml_attribute( + const std::string& attribute_name, + const bool* value); + +void inverted_xml_attribute_to_bool( + rapidxml::xml_attribute<>* input, + std::vector* errors, + bool* value, + bool* is_set); + +std::string bool_to_inverted_xml_attribute( + const std::string& attribute_name, + const bool* value); void proto_to_bool(bool input, bool* value, bool* is_set); diff --git a/xml_converter/src/icon_gen.cpp b/xml_converter/src/icon_gen.cpp index 04cfe09c..181c8636 100644 --- a/xml_converter/src/icon_gen.cpp +++ b/xml_converter/src/icon_gen.cpp @@ -40,9 +40,6 @@ bool Icon::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectorbounce_height), &(this->bounce_height_is_set)); } - else if (attributename == "canfade") { - xml_attribute_to_bool(attribute, errors, &(this->can_fade), &(this->can_fade_is_set)); - } else if (attributename == "type") { xml_attribute_to_marker_category(attribute, errors, &(this->category), &(this->category_is_set)); } @@ -79,6 +76,9 @@ bool Icon::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectorcull_chirality), &(this->cull_chirality_is_set)); } + else if (attributename == "canfade") { + inverted_xml_attribute_to_bool(attribute, errors, &(this->disable_player_cutout), &(this->disable_player_cutout_is_set)); + } else if (attributename == "fadefar") { xml_attribute_to_float(attribute, errors, &(this->distance_fade_end), &(this->distance_fade_end_is_set)); } @@ -273,9 +273,6 @@ vector Icon::as_xml() const { if (this->bounce_height_is_set) { xml_node_contents.push_back(float_to_xml_attribute("BounceHeight", &this->bounce_height)); } - if (this->can_fade_is_set) { - xml_node_contents.push_back(bool_to_xml_attribute("CanFade", &this->can_fade)); - } if (this->category_is_set) { xml_node_contents.push_back(marker_category_to_xml_attribute("Type", &this->category)); } @@ -294,6 +291,9 @@ vector Icon::as_xml() const { if (this->cull_chirality_is_set) { xml_node_contents.push_back(cull_chirality_to_xml_attribute("Cull", &this->cull_chirality)); } + if (this->disable_player_cutout_is_set) { + xml_node_contents.push_back(bool_to_inverted_xml_attribute("CanFade", &this->disable_player_cutout)); + } if (this->distance_fade_end_is_set) { xml_node_contents.push_back(float_to_xml_attribute("FadeFar", &this->distance_fade_end)); } @@ -432,10 +432,6 @@ waypoint::Icon Icon::as_protobuf() const { std::function setter = [&proto_icon](float val) { proto_icon.mutable_trigger()->set_bounce_height(val); }; float_to_proto(this->bounce_height, setter); } - if (this->can_fade_is_set) { - std::function setter = [&proto_icon](bool val) { proto_icon.set_can_fade(val); }; - bool_to_proto(this->can_fade, setter); - } if (this->category_is_set) { std::function setter = [&proto_icon](bool val) { proto_icon.set_category(val); }; do_nothing(this->category, setter); @@ -456,6 +452,10 @@ waypoint::Icon Icon::as_protobuf() const { std::function setter = [&proto_icon](waypoint::CullChirality val) { proto_icon.set_cull_chirality(val); }; cull_chirality_to_proto(this->cull_chirality, setter); } + if (this->disable_player_cutout_is_set) { + std::function setter = [&proto_icon](bool val) { proto_icon.set_disable_player_cutout(val); }; + bool_to_proto(this->disable_player_cutout, setter); + } if (this->distance_fade_end_is_set) { std::function setter = [&proto_icon](float val) { proto_icon.set_distance_fade_end(val); }; float_to_proto(this->distance_fade_end, setter); @@ -618,9 +618,6 @@ void Icon::parse_protobuf(waypoint::Icon proto_icon) { if (proto_icon.trigger().bounce_height() != 0) { proto_to_float(proto_icon.trigger().bounce_height(), &(this->bounce_height), &(this->bounce_height_is_set)); } - if (proto_icon.can_fade() != 0) { - proto_to_bool(proto_icon.can_fade(), &(this->can_fade), &(this->can_fade_is_set)); - } if (proto_icon.category() != 0) { do_nothing(proto_icon.category(), &(this->category), &(this->category_is_set)); } @@ -636,6 +633,9 @@ void Icon::parse_protobuf(waypoint::Icon proto_icon) { if (proto_icon.cull_chirality() != 0) { proto_to_cull_chirality(proto_icon.cull_chirality(), &(this->cull_chirality), &(this->cull_chirality_is_set)); } + if (proto_icon.disable_player_cutout() != 0) { + proto_to_bool(proto_icon.disable_player_cutout(), &(this->disable_player_cutout), &(this->disable_player_cutout_is_set)); + } if (proto_icon.distance_fade_end() != 0) { proto_to_float(proto_icon.distance_fade_end(), &(this->distance_fade_end), &(this->distance_fade_end_is_set)); } diff --git a/xml_converter/src/icon_gen.hpp b/xml_converter/src/icon_gen.hpp index d0f66677..cbf4d271 100644 --- a/xml_converter/src/icon_gen.hpp +++ b/xml_converter/src/icon_gen.hpp @@ -32,12 +32,12 @@ class Icon : public Parseable { float bounce_delay; float bounce_duration; float bounce_height; - bool can_fade; MarkerCategory category; Color color; std::string copy_clipboard; std::string copy_message; CullChirality cull_chirality; + bool disable_player_cutout; float distance_fade_end; float distance_fade_start; EulerRotation euler_rotation; @@ -79,12 +79,12 @@ class Icon : public Parseable { bool bounce_delay_is_set = false; bool bounce_duration_is_set = false; bool bounce_height_is_set = false; - bool can_fade_is_set = false; bool category_is_set = false; bool color_is_set = false; bool copy_clipboard_is_set = false; bool copy_message_is_set = false; bool cull_chirality_is_set = false; + bool disable_player_cutout_is_set = false; bool distance_fade_end_is_set = false; bool distance_fade_start_is_set = false; bool euler_rotation_is_set = false; diff --git a/xml_converter/src/trail_gen.cpp b/xml_converter/src/trail_gen.cpp index b31c059e..dacfb07e 100644 --- a/xml_converter/src/trail_gen.cpp +++ b/xml_converter/src/trail_gen.cpp @@ -34,9 +34,6 @@ bool Trail::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectoranimation_speed), &(this->animation_speed_is_set)); } - else if (attributename == "canfade") { - xml_attribute_to_bool(attribute, errors, &(this->can_fade), &(this->can_fade_is_set)); - } else if (attributename == "type") { xml_attribute_to_marker_category(attribute, errors, &(this->category), &(this->category_is_set)); } @@ -64,6 +61,9 @@ bool Trail::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectorcull_chirality), &(this->cull_chirality_is_set)); } + else if (attributename == "canfade") { + inverted_xml_attribute_to_bool(attribute, errors, &(this->disable_player_cutout), &(this->disable_player_cutout_is_set)); + } else if (attributename == "fadefar") { xml_attribute_to_float(attribute, errors, &(this->distance_fade_end), &(this->distance_fade_end_is_set)); } @@ -165,9 +165,6 @@ vector Trail::as_xml() const { if (this->animation_speed_is_set) { xml_node_contents.push_back(float_to_xml_attribute("AnimSpeed", &this->animation_speed)); } - if (this->can_fade_is_set) { - xml_node_contents.push_back(bool_to_xml_attribute("CanFade", &this->can_fade)); - } if (this->category_is_set) { xml_node_contents.push_back(marker_category_to_xml_attribute("Type", &this->category)); } @@ -180,6 +177,9 @@ vector Trail::as_xml() const { if (this->cull_chirality_is_set) { xml_node_contents.push_back(cull_chirality_to_xml_attribute("Cull", &this->cull_chirality)); } + if (this->disable_player_cutout_is_set) { + xml_node_contents.push_back(bool_to_inverted_xml_attribute("CanFade", &this->disable_player_cutout)); + } if (this->distance_fade_end_is_set) { xml_node_contents.push_back(float_to_xml_attribute("FadeFar", &this->distance_fade_end)); } @@ -258,10 +258,6 @@ waypoint::Trail Trail::as_protobuf() const { std::function setter = [&proto_trail](float val) { proto_trail.set_animation_speed(val); }; float_to_proto(this->animation_speed, setter); } - if (this->can_fade_is_set) { - std::function setter = [&proto_trail](bool val) { proto_trail.set_can_fade(val); }; - bool_to_proto(this->can_fade, setter); - } if (this->category_is_set) { std::function setter = [&proto_trail](bool val) { proto_trail.set_category(val); }; do_nothing(this->category, setter); @@ -274,6 +270,10 @@ waypoint::Trail Trail::as_protobuf() const { std::function setter = [&proto_trail](waypoint::CullChirality val) { proto_trail.set_cull_chirality(val); }; cull_chirality_to_proto(this->cull_chirality, setter); } + if (this->disable_player_cutout_is_set) { + std::function setter = [&proto_trail](bool val) { proto_trail.set_disable_player_cutout(val); }; + bool_to_proto(this->disable_player_cutout, setter); + } if (this->distance_fade_end_is_set) { std::function setter = [&proto_trail](float val) { proto_trail.set_distance_fade_end(val); }; float_to_proto(this->distance_fade_end, setter); @@ -367,9 +367,6 @@ void Trail::parse_protobuf(waypoint::Trail proto_trail) { if (proto_trail.animation_speed() != 0) { proto_to_float(proto_trail.animation_speed(), &(this->animation_speed), &(this->animation_speed_is_set)); } - if (proto_trail.can_fade() != 0) { - proto_to_bool(proto_trail.can_fade(), &(this->can_fade), &(this->can_fade_is_set)); - } if (proto_trail.category() != 0) { do_nothing(proto_trail.category(), &(this->category), &(this->category_is_set)); } @@ -379,6 +376,9 @@ void Trail::parse_protobuf(waypoint::Trail proto_trail) { if (proto_trail.cull_chirality() != 0) { proto_to_cull_chirality(proto_trail.cull_chirality(), &(this->cull_chirality), &(this->cull_chirality_is_set)); } + if (proto_trail.disable_player_cutout() != 0) { + proto_to_bool(proto_trail.disable_player_cutout(), &(this->disable_player_cutout), &(this->disable_player_cutout_is_set)); + } if (proto_trail.distance_fade_end() != 0) { proto_to_float(proto_trail.distance_fade_end(), &(this->distance_fade_end), &(this->distance_fade_end_is_set)); } diff --git a/xml_converter/src/trail_gen.hpp b/xml_converter/src/trail_gen.hpp index a681494e..a020a2a3 100644 --- a/xml_converter/src/trail_gen.hpp +++ b/xml_converter/src/trail_gen.hpp @@ -27,10 +27,10 @@ class Trail : public Parseable { int achievement_bitmask; int achievement_id; float animation_speed; - bool can_fade; MarkerCategory category; Color color; CullChirality cull_chirality; + bool disable_player_cutout; float distance_fade_end; float distance_fade_start; FestivalFilter festival_filter; @@ -54,10 +54,10 @@ class Trail : public Parseable { bool achievement_bitmask_is_set = false; bool achievement_id_is_set = false; bool animation_speed_is_set = false; - bool can_fade_is_set = false; bool category_is_set = false; bool color_is_set = false; bool cull_chirality_is_set = false; + bool disable_player_cutout_is_set = false; bool distance_fade_end_is_set = false; bool distance_fade_start_is_set = false; bool festival_filter_is_set = false; From e346ab50d941bc9c9ff99a427c5ebc57429c8b9c Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Thu, 9 Nov 2023 04:08:44 -0600 Subject: [PATCH 323/539] Adding is_wall integration tests --- .../expected_outputs/proto_is_wall/markers.bin | 3 +++ .../expected_outputs/xml_is_wall/xml_file.xml | 11 +++++++++++ .../intigration_tests/inputs/xml_is_wall/xml_file.xml | 11 +++++++++++ xml_converter/intigration_tests/testcases.py | 6 ++++++ 4 files changed, 31 insertions(+) create mode 100644 xml_converter/intigration_tests/expected_outputs/proto_is_wall/markers.bin create mode 100644 xml_converter/intigration_tests/expected_outputs/xml_is_wall/xml_file.xml create mode 100644 xml_converter/intigration_tests/inputs/xml_is_wall/xml_file.xml diff --git a/xml_converter/intigration_tests/expected_outputs/proto_is_wall/markers.bin b/xml_converter/intigration_tests/expected_outputs/proto_is_wall/markers.bin new file mode 100644 index 00000000..8984f382 --- /dev/null +++ b/xml_converter/intigration_tests/expected_outputs/proto_is_wall/markers.bin @@ -0,0 +1,3 @@ + +# + My Category" 2 " 2 " 2" 2 \ No newline at end of file diff --git a/xml_converter/intigration_tests/expected_outputs/xml_is_wall/xml_file.xml b/xml_converter/intigration_tests/expected_outputs/xml_is_wall/xml_file.xml new file mode 100644 index 00000000..caabb11a --- /dev/null +++ b/xml_converter/intigration_tests/expected_outputs/xml_is_wall/xml_file.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/xml_converter/intigration_tests/inputs/xml_is_wall/xml_file.xml b/xml_converter/intigration_tests/inputs/xml_is_wall/xml_file.xml new file mode 100644 index 00000000..945d5c1f --- /dev/null +++ b/xml_converter/intigration_tests/inputs/xml_is_wall/xml_file.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/xml_converter/intigration_tests/testcases.py b/xml_converter/intigration_tests/testcases.py index 7cb80a06..4b44e0f0 100644 --- a/xml_converter/intigration_tests/testcases.py +++ b/xml_converter/intigration_tests/testcases.py @@ -78,4 +78,10 @@ class Testcase: expected_output_xml_path="./expected_outputs/xml_achievement_id", expected_output_proto_path="./expected_outputs/proto_achievement_id", ), + Testcase( + name="is_wall", + xml_input_paths=["./inputs/xml_is_wall"], + expected_output_xml_path="./expected_outputs/xml_is_wall", + expected_output_proto_path="./expected_outputs/proto_is_wall", + ), ] From 4de76e5460e27ddef5bbc1fb250f8403fa0b36c9 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Thu, 9 Nov 2023 04:12:54 -0600 Subject: [PATCH 324/539] Adding tests for the festival filter --- .../expected_outputs/proto_festival_filter/markers.bin | 3 +++ .../expected_outputs/xml_festival_filter/xml_file.xml | 9 +++++++++ .../inputs/xml_festival_filter/xml_file.xml | 9 +++++++++ xml_converter/intigration_tests/testcases.py | 6 ++++++ 4 files changed, 27 insertions(+) create mode 100644 xml_converter/intigration_tests/expected_outputs/proto_festival_filter/markers.bin create mode 100644 xml_converter/intigration_tests/expected_outputs/xml_festival_filter/xml_file.xml create mode 100644 xml_converter/intigration_tests/inputs/xml_festival_filter/xml_file.xml diff --git a/xml_converter/intigration_tests/expected_outputs/proto_festival_filter/markers.bin b/xml_converter/intigration_tests/expected_outputs/proto_festival_filter/markers.bin new file mode 100644 index 00000000..0b474b0b --- /dev/null +++ b/xml_converter/intigration_tests/expected_outputs/proto_festival_filter/markers.bin @@ -0,0 +1,3 @@ + +E + My Category 2B \Ï)Cf¦RC{ÔWCÚ 2B \Ï)Cf¦RC{ÔWCÚ  \ No newline at end of file diff --git a/xml_converter/intigration_tests/expected_outputs/xml_festival_filter/xml_file.xml b/xml_converter/intigration_tests/expected_outputs/xml_festival_filter/xml_file.xml new file mode 100644 index 00000000..73943165 --- /dev/null +++ b/xml_converter/intigration_tests/expected_outputs/xml_festival_filter/xml_file.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/xml_converter/intigration_tests/inputs/xml_festival_filter/xml_file.xml b/xml_converter/intigration_tests/inputs/xml_festival_filter/xml_file.xml new file mode 100644 index 00000000..c193203c --- /dev/null +++ b/xml_converter/intigration_tests/inputs/xml_festival_filter/xml_file.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/xml_converter/intigration_tests/testcases.py b/xml_converter/intigration_tests/testcases.py index 4b44e0f0..0b3ffca4 100644 --- a/xml_converter/intigration_tests/testcases.py +++ b/xml_converter/intigration_tests/testcases.py @@ -84,4 +84,10 @@ class Testcase: expected_output_xml_path="./expected_outputs/xml_is_wall", expected_output_proto_path="./expected_outputs/proto_is_wall", ), + Testcase( + name="festival_filter", + xml_input_paths=["./inputs/xml_festival_filter"], + expected_output_xml_path="./expected_outputs/xml_festival_filter", + expected_output_proto_path="./expected_outputs/proto_festival_filter", + ), ] From 85958d4780a824fe0f2dacac0300d7aa0fd65e80 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Fri, 10 Nov 2023 02:28:28 -0600 Subject: [PATCH 325/539] Resizing checkbox column in tree to be narrow on the right --- Spatial.gd | 29 ++++++++++++++++------------- Spatial.tscn | 32 +++++++++++++++----------------- 2 files changed, 31 insertions(+), 30 deletions(-) diff --git a/Spatial.gd b/Spatial.gd index 1f8113ed..63cc880f 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -63,6 +63,8 @@ onready var minimap := $Control/MiniMap as Node2D # Called when the node enters the scene tree for the first time. func _ready(): + self.marker_packs.set_column_expand(1, false) + self.marker_packs.set_column_min_width(1, 24) get_tree().get_root().set_transparent_background(true) x11_fg = X11_FG.new() taco_parser = TacoParser.new() @@ -482,9 +484,9 @@ func init_category_tree(): self.marker_packs.clear() var root : TreeItem root = self.marker_packs.create_item() - root.set_text(0, "Markers available on current map") - root.set_selectable(0, false) - root.set_text(1, "Visible") + root.set_text(0, "Markers") + root.set_expand_right(0, true) + func waypoint_categories_to_godot_nodes(): @@ -493,8 +495,8 @@ func waypoint_categories_to_godot_nodes(): func _waypoint_categories_to_godot_nodes(item: TreeItem, category, full_category_name: String, collapsed: bool): - var category_item = self.marker_packs.create_item(item) - if category.get_name() == "": + var category_item: TreeItem = self.marker_packs.create_item(item) + if category.get_name() == "": # If this is called, there is an error in the Waypoint data category_item.set_text(0, "No name") category_item.set_metadata(0, "") @@ -507,6 +509,7 @@ func _waypoint_categories_to_godot_nodes(item: TreeItem, category, full_category category_item.set_tooltip(1, "Show/Hide") category_item.set_editable(1, true) category_item.set_collapsed(collapsed) + category_item.set_selectable(1, false) for path in category.get_trail(): var path_points := PoolVector3Array() @@ -534,7 +537,7 @@ func _waypoint_categories_to_godot_nodes(item: TreeItem, category, full_category continue var full_texture_path = self.marker_file_dir + texture_path.get_path() gen_new_icon(position_vector, full_texture_path, icon, category_item) - + for category_child in category.get_children(): _waypoint_categories_to_godot_nodes(category_item, category_child, full_category_name + "." + category_child.get_name(), true) @@ -542,7 +545,7 @@ func _waypoint_categories_to_godot_nodes(item: TreeItem, category, full_category func apply_category_visibility_to_nodes(category_item: TreeItem): Settings.local_category_data[category_item.get_metadata(0)] = { "checked" : category_item.is_checked(1), - } + } Settings.save() var temporary_cateogry_visibility_data = populate_update_dict(category_item, {}) update_node_visibility(temporary_cateogry_visibility_data, self.paths) @@ -570,9 +573,9 @@ func update_node_visibility(cateogry_data, nodes): if node.get_name() == "Path": var index = node.get_index() var route2d = self.minimap.get_child(index) - route2d.visible= node.visible + route2d.visible= node.visible -#Child visibility is contigent on all parents having permission +#Child visibility is contigent on all parents having permission func is_category_visible(category_item: TreeItem) -> bool: if category_item == marker_packs.get_root(): return true @@ -617,7 +620,7 @@ func gen_new_path(points: Array, texture_path: String, waypoint_trail, category_ new_route.visible = is_category_visible(category_item) else: new_route.visible = false - + paths.add_child(new_route) # Create a new 2D Path @@ -634,7 +637,7 @@ func gen_new_path(points: Array, texture_path: String, waypoint_trail, category_ self.currently_active_path_2d = new_2d_path -func gen_new_icon(position: Vector3, texture_path: String, waypoint_icon, category_item: TreeItem): +func gen_new_icon(position: Vector3, texture_path: String, waypoint_icon, category_item: TreeItem): position.z = -position.z var new_icon = icon_scene.instance() new_icon.translation = position @@ -697,7 +700,7 @@ func gen_adjustment_nodes(): if self.currently_active_category.get_metadata(0) == route.waypoint.get_category().get_name(): for i in range(route.get_point_count()): var gizmo_position = route.get_point_position(i) - + # Simplistic cull to prevent nodes that are too far away to be # visible from being created. Additional work can be done here # if this is not enough of an optimization in the future. @@ -839,7 +842,7 @@ func _on_NewPathPoint_pressed(): ################################################################################ -# +# ################################################################################ func _on_SavePath_pressed(): $Control/Dialogs/SaveDialog.show() diff --git a/Spatial.tscn b/Spatial.tscn index 2abe7f1c..62d5b1ad 100644 --- a/Spatial.tscn +++ b/Spatial.tscn @@ -601,7 +601,6 @@ disabled = true text = "Reverse Path Direction" [node name="SettingsDialog" type="WindowDialog" parent="Control/Dialogs"] -visible = false margin_left = 592.0 margin_top = 146.0 margin_right = 981.0 @@ -756,6 +755,20 @@ margin_bottom = 336.0 rect_min_size = Vector2( 0, 100 ) size_flags_horizontal = 3 +[node name="Spacer" type="Control" parent="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer"] +visible = false +margin_top = 284.0 +margin_right = 112.0 +margin_bottom = 284.0 + +[node name="LoadLutrisProfile" type="Button" parent="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer"] +visible = false +margin_left = 116.0 +margin_top = 284.0 +margin_right = 384.0 +margin_bottom = 304.0 +text = "Load Lutris Profile" + [node name="MarkerPacks" type="WindowDialog" parent="Control/Dialogs"] margin_left = 280.0 margin_top = 105.0 @@ -769,27 +782,12 @@ __meta__ = { [node name="MarkerPacks" type="Tree" parent="Control/Dialogs/MarkerPacks"] anchor_right = 1.0 anchor_bottom = 1.0 -margin_top = 47.0 size_flags_vertical = 3 columns = 2 __meta__ = { "_edit_use_anchors_": false } -[node name="Spacer" type="Control" parent="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer"] -visible = false -margin_top = 284.0 -margin_right = 112.0 -margin_bottom = 284.0 - -[node name="LoadLutrisProfile" type="Button" parent="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer"] -visible = false -margin_left = 116.0 -margin_top = 284.0 -margin_right = 384.0 -margin_bottom = 304.0 -text = "Load Lutris Profile" - [node name="Border" type="Control" parent="Control"] visible = false anchor_right = 1.0 @@ -913,9 +911,9 @@ material/0 = SubResource( 4 ) [connection signal="pressed" from="Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/SetActivePath" to="." method="_on_SetActivePath_pressed"] [connection signal="pressed" from="Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/ReversePathDirection" to="." method="_on_ReversePathDirection_pressed"] [connection signal="hide" from="Control/Dialogs/SettingsDialog" to="." method="_on_NodeEditorDialog_hide"] -[connection signal="pressed" from="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer/OverrideSize" to="Control/Dialogs/SettingsDialog" method="save_settings"] [connection signal="text_changed" from="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer/MinimumWidth" to="Control/Dialogs/SettingsDialog" method="save_settings"] [connection signal="text_changed" from="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer/MinimumHeight" to="Control/Dialogs/SettingsDialog" method="save_settings"] +[connection signal="pressed" from="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer/OverrideSize" to="Control/Dialogs/SettingsDialog" method="save_settings"] [connection signal="text_changed" from="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer/OverrideWidth" to="Control/Dialogs/SettingsDialog" method="save_settings"] [connection signal="text_changed" from="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer/OverrideHeight" to="Control/Dialogs/SettingsDialog" method="save_settings"] [connection signal="pressed" from="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer/AutoLaunchBurritoLink" to="Control/Dialogs/SettingsDialog" method="save_settings"] From fcb7b86c2519f2fc928355e7c124b28ca35742da Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Fri, 10 Nov 2023 21:31:18 -0600 Subject: [PATCH 326/539] adding a global state var for the xml parsers --- .../cpp_templates/attribute_template.hpp | 3 + .../attribute_template_compoundvalue.cpp | 1 + .../cpp_templates/attribute_template_enum.cpp | 1 + .../attribute_template_multiflagvalue.cpp | 1 + .../cpp_templates/class_template.cpp | 12 +- .../cpp_templates/class_template.hpp | 14 +- xml_converter/generators/generate_cpp.py | 3 +- xml_converter/src/attribute/bool.cpp | 2 + xml_converter/src/attribute/bool.hpp | 3 + xml_converter/src/attribute/color.cpp | 1 + xml_converter/src/attribute/color.hpp | 3 + .../src/attribute/cull_chirality_gen.cpp | 1 + .../src/attribute/cull_chirality_gen.hpp | 3 + .../src/attribute/euler_rotation_gen.cpp | 1 + .../src/attribute/euler_rotation_gen.hpp | 3 + .../src/attribute/festival_filter_gen.cpp | 1 + .../src/attribute/festival_filter_gen.hpp | 3 + xml_converter/src/attribute/float.cpp | 1 + xml_converter/src/attribute/float.hpp | 2 + xml_converter/src/attribute/image.cpp | 1 + xml_converter/src/attribute/image.hpp | 3 + xml_converter/src/attribute/int.cpp | 1 + xml_converter/src/attribute/int.hpp | 2 + .../src/attribute/map_type_filter_gen.cpp | 1 + .../src/attribute/map_type_filter_gen.hpp | 3 + .../src/attribute/marker_category.cpp | 1 + .../src/attribute/marker_category.hpp | 3 + .../src/attribute/mount_filter_gen.cpp | 1 + .../src/attribute/mount_filter_gen.hpp | 3 + xml_converter/src/attribute/position_gen.cpp | 1 + xml_converter/src/attribute/position_gen.hpp | 3 + .../src/attribute/profession_filter_gen.cpp | 1 + .../src/attribute/profession_filter_gen.hpp | 3 + .../src/attribute/reset_behavior_gen.cpp | 1 + .../src/attribute/reset_behavior_gen.hpp | 3 + .../attribute/specialization_filter_gen.cpp | 1 + .../attribute/specialization_filter_gen.hpp | 3 + .../src/attribute/species_filter_gen.cpp | 1 + .../src/attribute/species_filter_gen.hpp | 3 + xml_converter/src/attribute/string.cpp | 1 + xml_converter/src/attribute/string.hpp | 2 + xml_converter/src/attribute/trail_data.cpp | 7 +- xml_converter/src/attribute/trail_data.hpp | 4 +- xml_converter/src/attribute/unique_id.cpp | 1 + xml_converter/src/attribute/unique_id.hpp | 3 + xml_converter/src/category_gen.cpp | 20 +-- xml_converter/src/category_gen.hpp | 5 +- xml_converter/src/icon_gen.cpp | 146 +++++++++--------- xml_converter/src/icon_gen.hpp | 3 +- xml_converter/src/packaging_xml.cpp | 23 ++- xml_converter/src/packaging_xml.hpp | 1 + xml_converter/src/parseable.cpp | 6 +- xml_converter/src/parseable.hpp | 6 +- .../src/state_structs/xml_parse_state.hpp | 11 ++ xml_converter/src/trail_gen.cpp | 82 +++++----- xml_converter/src/trail_gen.hpp | 3 +- 56 files changed, 265 insertions(+), 157 deletions(-) create mode 100644 xml_converter/src/state_structs/xml_parse_state.hpp diff --git a/xml_converter/generators/cpp_templates/attribute_template.hpp b/xml_converter/generators/cpp_templates/attribute_template.hpp index 3788bc5f..a8245b31 100644 --- a/xml_converter/generators/cpp_templates/attribute_template.hpp +++ b/xml_converter/generators/cpp_templates/attribute_template.hpp @@ -5,6 +5,8 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "../state_structs/xml_parse_state.hpp" + {% if type == "Enum" %} #include "waypoint.pb.h" @@ -33,6 +35,7 @@ void xml_attribute_to_{{attribute_name}}( rapidxml::xml_attribute<>* input, std::vector* errors, + XMLParseState* state, {{class_name}}* value, bool* is_set); diff --git a/xml_converter/generators/cpp_templates/attribute_template_compoundvalue.cpp b/xml_converter/generators/cpp_templates/attribute_template_compoundvalue.cpp index bcad298d..71c606a5 100644 --- a/xml_converter/generators/cpp_templates/attribute_template_compoundvalue.cpp +++ b/xml_converter/generators/cpp_templates/attribute_template_compoundvalue.cpp @@ -14,6 +14,7 @@ using namespace std; void xml_attribute_to_{{attribute_name}}( rapidxml::xml_attribute<>* input, std::vector* errors, + XMLParseState* state, {{class_name}}* value, bool* is_set) { {{class_name}} {{attribute_name}}; diff --git a/xml_converter/generators/cpp_templates/attribute_template_enum.cpp b/xml_converter/generators/cpp_templates/attribute_template_enum.cpp index 339012f8..91fe3dcd 100644 --- a/xml_converter/generators/cpp_templates/attribute_template_enum.cpp +++ b/xml_converter/generators/cpp_templates/attribute_template_enum.cpp @@ -15,6 +15,7 @@ using namespace std; void xml_attribute_to_{{attribute_name}}( rapidxml::xml_attribute<>* input, std::vector* errors, + XMLParseState* state, {{class_name}}* value, bool* is_set) { {{class_name}} {{attribute_name}}; diff --git a/xml_converter/generators/cpp_templates/attribute_template_multiflagvalue.cpp b/xml_converter/generators/cpp_templates/attribute_template_multiflagvalue.cpp index 9c53b032..ff532c90 100644 --- a/xml_converter/generators/cpp_templates/attribute_template_multiflagvalue.cpp +++ b/xml_converter/generators/cpp_templates/attribute_template_multiflagvalue.cpp @@ -15,6 +15,7 @@ using namespace std; void xml_attribute_to_{{attribute_name}}( rapidxml::xml_attribute<>* input, std::vector* errors, + XMLParseState* state, {{class_name}}* value, bool* is_set) { {{class_name}} {{attribute_name}}; diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index 45239935..7dcd5716 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -18,12 +18,12 @@ string {{cpp_class}}::classname() { return "{{xml_class_name}}"; } {% if cpp_class == "Category": %} - void {{cpp_class}}::init_from_xml(rapidxml::xml_node<>* node, vector* errors, string base_dir) { + void {{cpp_class}}::init_from_xml(rapidxml::xml_node<>* node, vector* errors, XMLParseState* state) { for (rapidxml::xml_attribute<>* attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()) { - bool is_icon_value = this->default_icon.init_xml_attribute(attribute, errors); - bool is_trail_value = this->default_trail.init_xml_attribute(attribute, errors); + bool is_icon_value = this->default_icon.init_xml_attribute(attribute, errors, state); + bool is_trail_value = this->default_trail.init_xml_attribute(attribute, errors, state); - if (init_xml_attribute(attribute, errors, base_dir)) { + if (init_xml_attribute(attribute, errors, state)) { } else if (is_icon_value || is_trail_value) { } @@ -34,13 +34,13 @@ string {{cpp_class}}::classname() { } {% endif %} -bool {{cpp_class}}::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector* errors, string base_dir) { +bool {{cpp_class}}::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector* errors, XMLParseState* state) { string attributename; attributename = normalize(get_attribute_name(attribute)); {% for n, attribute_variable in enumerate(attribute_variables) %} {% for i, value in enumerate(attribute_variable.xml_fields) %} {{ "if" if i == n == 0 else "else if" }} (attributename == "{{value}}") { - {{attribute_variable.deserialize_xml_function}}(attribute, errors, {% if attribute_variable.uses_file_path %}base_dir, {% endif %}&(this->{{attribute_variable.attribute_name}}), &(this->{{attribute_variable.attribute_flag_name}}){% for side_effect in attribute_variable.deserialize_xml_side_effects %}, &(this->{{side_effect}}){% endfor %}); + {{attribute_variable.deserialize_xml_function}}(attribute, errors, state, &(this->{{attribute_variable.attribute_name}}), &(this->{{attribute_variable.attribute_flag_name}}){% for side_effect in attribute_variable.deserialize_xml_side_effects %}, &(this->{{side_effect}}){% endfor %}); } {% endfor %} {% endfor %} diff --git a/xml_converter/generators/cpp_templates/class_template.hpp b/xml_converter/generators/cpp_templates/class_template.hpp index 19d7aa26..b5db4eab 100644 --- a/xml_converter/generators/cpp_templates/class_template.hpp +++ b/xml_converter/generators/cpp_templates/class_template.hpp @@ -14,26 +14,26 @@ class {{cpp_class}} : public Parseable { public: - {% for attribute_variable in attribute_variables: %} - {% if attribute_variable.is_component == false: %} + {% for attribute_variable in attribute_variables %} + {% if attribute_variable.is_component == false %} {{attribute_variable.cpp_type}} {{attribute_variable.attribute_name}}; {% endif %} {% endfor %} - {% for attribute_variable in attribute_variables: %} - {% if attribute_variable.is_component == false: %} + {% for attribute_variable in attribute_variables %} + {% if attribute_variable.is_component == false %} bool {{attribute_variable.attribute_flag_name}} = false; {% endif %} {% endfor %} - {% if cpp_class == "Category": %} + {% if cpp_class == "Category" %} std::map children; Icon default_icon; Trail default_trail; - void init_from_xml(rapidxml::xml_node<>* node, std::vector* errors, std::string base_dir = ""); + void init_from_xml(rapidxml::xml_node<>* node, std::vector* errors, XMLParseState* state); {% endif %} virtual std::vector as_xml() const; virtual std::string classname(); - bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, std::string base_dir = ""); + bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, XMLParseState* state); waypoint::{{cpp_class}} as_protobuf() const; void parse_protobuf(waypoint::{{cpp_class}} proto_{{cpp_class_header}}); {% if attributes_of_type_marker_category %} diff --git a/xml_converter/generators/generate_cpp.py b/xml_converter/generators/generate_cpp.py index 4c7fa21d..abf01c0e 100644 --- a/xml_converter/generators/generate_cpp.py +++ b/xml_converter/generators/generate_cpp.py @@ -216,14 +216,15 @@ def generate_cpp_variable_data( cpp_includes.hpp_absolute_includes.add("string") cpp_includes.hpp_absolute_includes.add("vector") + cpp_includes.hpp_absolute_includes.add("functional") cpp_includes.hpp_relative_includes.add("rapidxml-1.13/rapidxml.hpp") cpp_includes.hpp_relative_includes.add("parseable.hpp") cpp_includes.hpp_relative_includes.add("waypoint.pb.h") + cpp_includes.hpp_relative_includes.add("state_structs/xml_parse_state.hpp") cpp_includes.hpp_forward_declarations.add("XMLError") cpp_includes.cpp_absolute_includes.add("iosfwd") cpp_includes.cpp_absolute_includes.add("string") - cpp_includes.hpp_absolute_includes.add("functional") cpp_includes.cpp_relative_includes.add("rapidxml-1.13/rapidxml.hpp") cpp_includes.cpp_relative_includes.add("string_helper.hpp") cpp_includes.cpp_relative_includes.add("rapid_helpers.hpp") diff --git a/xml_converter/src/attribute/bool.cpp b/xml_converter/src/attribute/bool.cpp index bafdf6e7..afdc2199 100644 --- a/xml_converter/src/attribute/bool.cpp +++ b/xml_converter/src/attribute/bool.cpp @@ -19,6 +19,7 @@ using namespace std; void xml_attribute_to_bool( rapidxml::xml_attribute<>* input, std::vector* errors, + XMLParseState* state, bool* value, bool* is_set) { if (get_attribute_value(input) == "0" || get_attribute_value(input) == "false") { @@ -58,6 +59,7 @@ string bool_to_xml_attribute(const string& attribute_name, const bool* value) { void inverted_xml_attribute_to_bool( rapidxml::xml_attribute<>* input, std::vector* errors, + XMLParseState* state, bool* value, bool* is_set) { if (get_attribute_value(input) == "0" || get_attribute_value(input) == "false") { diff --git a/xml_converter/src/attribute/bool.hpp b/xml_converter/src/attribute/bool.hpp index d7ce25d0..7650ff59 100644 --- a/xml_converter/src/attribute/bool.hpp +++ b/xml_converter/src/attribute/bool.hpp @@ -5,12 +5,14 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "../state_structs/xml_parse_state.hpp" class XMLError; void xml_attribute_to_bool( rapidxml::xml_attribute<>* input, std::vector* errors, + XMLParseState* state, bool* value, bool* is_set); @@ -21,6 +23,7 @@ std::string bool_to_xml_attribute( void inverted_xml_attribute_to_bool( rapidxml::xml_attribute<>* input, std::vector* errors, + XMLParseState* state, bool* value, bool* is_set); diff --git a/xml_converter/src/attribute/color.cpp b/xml_converter/src/attribute/color.cpp index be6f7c13..e566b984 100644 --- a/xml_converter/src/attribute/color.cpp +++ b/xml_converter/src/attribute/color.cpp @@ -51,6 +51,7 @@ int convert_color_channel_float_to_int(float input) { void xml_attribute_to_color( rapidxml::xml_attribute<>* input, std::vector* errors, + XMLParseState* state, Color* value, bool* is_set) { Color color; diff --git a/xml_converter/src/attribute/color.hpp b/xml_converter/src/attribute/color.hpp index 0747ce1d..d12db8a5 100644 --- a/xml_converter/src/attribute/color.hpp +++ b/xml_converter/src/attribute/color.hpp @@ -5,8 +5,10 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "../state_structs/xml_parse_state.hpp" class XMLError; + namespace waypoint { class RGBAColor; } @@ -22,6 +24,7 @@ class Color { void xml_attribute_to_color( rapidxml::xml_attribute<>* input, std::vector* errors, + XMLParseState* state, Color* value, bool* is_set); diff --git a/xml_converter/src/attribute/cull_chirality_gen.cpp b/xml_converter/src/attribute/cull_chirality_gen.cpp index 12bbd883..5c3dc038 100644 --- a/xml_converter/src/attribute/cull_chirality_gen.cpp +++ b/xml_converter/src/attribute/cull_chirality_gen.cpp @@ -15,6 +15,7 @@ using namespace std; void xml_attribute_to_cull_chirality( rapidxml::xml_attribute<>* input, std::vector* errors, + XMLParseState* state, CullChirality* value, bool* is_set) { CullChirality cull_chirality; diff --git a/xml_converter/src/attribute/cull_chirality_gen.hpp b/xml_converter/src/attribute/cull_chirality_gen.hpp index 3f680d27..78173a5a 100644 --- a/xml_converter/src/attribute/cull_chirality_gen.hpp +++ b/xml_converter/src/attribute/cull_chirality_gen.hpp @@ -5,6 +5,8 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "../state_structs/xml_parse_state.hpp" + #include "waypoint.pb.h" class XMLError; @@ -17,6 +19,7 @@ enum CullChirality { void xml_attribute_to_cull_chirality( rapidxml::xml_attribute<>* input, std::vector* errors, + XMLParseState* state, CullChirality* value, bool* is_set); diff --git a/xml_converter/src/attribute/euler_rotation_gen.cpp b/xml_converter/src/attribute/euler_rotation_gen.cpp index 5cc44878..4f4a1cb4 100644 --- a/xml_converter/src/attribute/euler_rotation_gen.cpp +++ b/xml_converter/src/attribute/euler_rotation_gen.cpp @@ -14,6 +14,7 @@ using namespace std; void xml_attribute_to_euler_rotation( rapidxml::xml_attribute<>* input, std::vector* errors, + XMLParseState* state, EulerRotation* value, bool* is_set) { EulerRotation euler_rotation; diff --git a/xml_converter/src/attribute/euler_rotation_gen.hpp b/xml_converter/src/attribute/euler_rotation_gen.hpp index a2c0c392..89542d03 100644 --- a/xml_converter/src/attribute/euler_rotation_gen.hpp +++ b/xml_converter/src/attribute/euler_rotation_gen.hpp @@ -5,6 +5,8 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "../state_structs/xml_parse_state.hpp" + class XMLError; namespace waypoint { class EulerRotation; @@ -23,6 +25,7 @@ class EulerRotation { void xml_attribute_to_euler_rotation( rapidxml::xml_attribute<>* input, std::vector* errors, + XMLParseState* state, EulerRotation* value, bool* is_set); diff --git a/xml_converter/src/attribute/festival_filter_gen.cpp b/xml_converter/src/attribute/festival_filter_gen.cpp index d1dcd2e3..d80117c1 100644 --- a/xml_converter/src/attribute/festival_filter_gen.cpp +++ b/xml_converter/src/attribute/festival_filter_gen.cpp @@ -15,6 +15,7 @@ using namespace std; void xml_attribute_to_festival_filter( rapidxml::xml_attribute<>* input, std::vector* errors, + XMLParseState* state, FestivalFilter* value, bool* is_set) { FestivalFilter festival_filter; diff --git a/xml_converter/src/attribute/festival_filter_gen.hpp b/xml_converter/src/attribute/festival_filter_gen.hpp index 217d9164..87b125b6 100644 --- a/xml_converter/src/attribute/festival_filter_gen.hpp +++ b/xml_converter/src/attribute/festival_filter_gen.hpp @@ -5,6 +5,8 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "../state_structs/xml_parse_state.hpp" + class XMLError; namespace waypoint { class FestivalFilter; @@ -27,6 +29,7 @@ class FestivalFilter { void xml_attribute_to_festival_filter( rapidxml::xml_attribute<>* input, std::vector* errors, + XMLParseState* state, FestivalFilter* value, bool* is_set); diff --git a/xml_converter/src/attribute/float.cpp b/xml_converter/src/attribute/float.cpp index 4508fc6c..65a4c5d2 100644 --- a/xml_converter/src/attribute/float.cpp +++ b/xml_converter/src/attribute/float.cpp @@ -15,6 +15,7 @@ using namespace std; void xml_attribute_to_float( rapidxml::xml_attribute<>* input, std::vector* errors, + XMLParseState* state, float* value, bool* is_set) { *value = std::stof(get_attribute_value(input)); diff --git a/xml_converter/src/attribute/float.hpp b/xml_converter/src/attribute/float.hpp index 27b7b7a2..b3da1bdf 100644 --- a/xml_converter/src/attribute/float.hpp +++ b/xml_converter/src/attribute/float.hpp @@ -5,12 +5,14 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "../state_structs/xml_parse_state.hpp" class XMLError; void xml_attribute_to_float( rapidxml::xml_attribute<>* input, std::vector* errors, + XMLParseState* state, float* value, bool* is_set); diff --git a/xml_converter/src/attribute/image.cpp b/xml_converter/src/attribute/image.cpp index fd2688b5..4093f654 100644 --- a/xml_converter/src/attribute/image.cpp +++ b/xml_converter/src/attribute/image.cpp @@ -18,6 +18,7 @@ using namespace std; void xml_attribute_to_image( rapidxml::xml_attribute<>* input, std::vector* errors, + XMLParseState* state, Image* value, bool* is_set) { value->path = get_attribute_value(input); diff --git a/xml_converter/src/attribute/image.hpp b/xml_converter/src/attribute/image.hpp index fb067108..6185e521 100644 --- a/xml_converter/src/attribute/image.hpp +++ b/xml_converter/src/attribute/image.hpp @@ -5,8 +5,10 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "../state_structs/xml_parse_state.hpp" class XMLError; + namespace waypoint { class TexturePath; } @@ -19,6 +21,7 @@ class Image { void xml_attribute_to_image( rapidxml::xml_attribute<>* input, std::vector* errors, + XMLParseState* state, Image* value, bool* is_set); diff --git a/xml_converter/src/attribute/int.cpp b/xml_converter/src/attribute/int.cpp index fc095a50..dac2416e 100644 --- a/xml_converter/src/attribute/int.cpp +++ b/xml_converter/src/attribute/int.cpp @@ -19,6 +19,7 @@ using namespace std; void xml_attribute_to_int( rapidxml::xml_attribute<>* input, std::vector* errors, + XMLParseState* state, int* value, bool* is_set) { try { diff --git a/xml_converter/src/attribute/int.hpp b/xml_converter/src/attribute/int.hpp index 13c1abda..cfc81162 100644 --- a/xml_converter/src/attribute/int.hpp +++ b/xml_converter/src/attribute/int.hpp @@ -5,12 +5,14 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "../state_structs/xml_parse_state.hpp" class XMLError; void xml_attribute_to_int( rapidxml::xml_attribute<>* input, std::vector* errors, + XMLParseState* state, int* value, bool* is_set); diff --git a/xml_converter/src/attribute/map_type_filter_gen.cpp b/xml_converter/src/attribute/map_type_filter_gen.cpp index a091935e..f8e4d40f 100644 --- a/xml_converter/src/attribute/map_type_filter_gen.cpp +++ b/xml_converter/src/attribute/map_type_filter_gen.cpp @@ -15,6 +15,7 @@ using namespace std; void xml_attribute_to_map_type_filter( rapidxml::xml_attribute<>* input, std::vector* errors, + XMLParseState* state, MapTypeFilter* value, bool* is_set) { MapTypeFilter map_type_filter; diff --git a/xml_converter/src/attribute/map_type_filter_gen.hpp b/xml_converter/src/attribute/map_type_filter_gen.hpp index 13bd7dd4..4085f101 100644 --- a/xml_converter/src/attribute/map_type_filter_gen.hpp +++ b/xml_converter/src/attribute/map_type_filter_gen.hpp @@ -5,6 +5,8 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "../state_structs/xml_parse_state.hpp" + class XMLError; namespace waypoint { class MapTypeFilter; @@ -44,6 +46,7 @@ class MapTypeFilter { void xml_attribute_to_map_type_filter( rapidxml::xml_attribute<>* input, std::vector* errors, + XMLParseState* state, MapTypeFilter* value, bool* is_set); diff --git a/xml_converter/src/attribute/marker_category.cpp b/xml_converter/src/attribute/marker_category.cpp index 3b70c60f..2756f42e 100644 --- a/xml_converter/src/attribute/marker_category.cpp +++ b/xml_converter/src/attribute/marker_category.cpp @@ -15,6 +15,7 @@ void xml_attribute_to_marker_category( rapidxml::xml_attribute<>* input, std::vector* errors, + XMLParseState* state, MarkerCategory* value, bool* is_set) { value->category = get_attribute_value(input); diff --git a/xml_converter/src/attribute/marker_category.hpp b/xml_converter/src/attribute/marker_category.hpp index cf9903cc..fedc29b6 100644 --- a/xml_converter/src/attribute/marker_category.hpp +++ b/xml_converter/src/attribute/marker_category.hpp @@ -5,8 +5,10 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "../state_structs/xml_parse_state.hpp" class XMLError; + namespace waypoint { class Category; } @@ -19,6 +21,7 @@ class MarkerCategory { void xml_attribute_to_marker_category( rapidxml::xml_attribute<>* input, std::vector* errors, + XMLParseState* state, MarkerCategory* value, bool* is_set); diff --git a/xml_converter/src/attribute/mount_filter_gen.cpp b/xml_converter/src/attribute/mount_filter_gen.cpp index 3e16ba05..56434514 100644 --- a/xml_converter/src/attribute/mount_filter_gen.cpp +++ b/xml_converter/src/attribute/mount_filter_gen.cpp @@ -15,6 +15,7 @@ using namespace std; void xml_attribute_to_mount_filter( rapidxml::xml_attribute<>* input, std::vector* errors, + XMLParseState* state, MountFilter* value, bool* is_set) { MountFilter mount_filter; diff --git a/xml_converter/src/attribute/mount_filter_gen.hpp b/xml_converter/src/attribute/mount_filter_gen.hpp index b9f5d9da..3960b9a8 100644 --- a/xml_converter/src/attribute/mount_filter_gen.hpp +++ b/xml_converter/src/attribute/mount_filter_gen.hpp @@ -5,6 +5,8 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "../state_structs/xml_parse_state.hpp" + class XMLError; namespace waypoint { class MountFilter; @@ -30,6 +32,7 @@ class MountFilter { void xml_attribute_to_mount_filter( rapidxml::xml_attribute<>* input, std::vector* errors, + XMLParseState* state, MountFilter* value, bool* is_set); diff --git a/xml_converter/src/attribute/position_gen.cpp b/xml_converter/src/attribute/position_gen.cpp index 275bf9e0..4101a286 100644 --- a/xml_converter/src/attribute/position_gen.cpp +++ b/xml_converter/src/attribute/position_gen.cpp @@ -14,6 +14,7 @@ using namespace std; void xml_attribute_to_position( rapidxml::xml_attribute<>* input, std::vector* errors, + XMLParseState* state, Position* value, bool* is_set) { Position position; diff --git a/xml_converter/src/attribute/position_gen.hpp b/xml_converter/src/attribute/position_gen.hpp index 9033cb32..e6bc2119 100644 --- a/xml_converter/src/attribute/position_gen.hpp +++ b/xml_converter/src/attribute/position_gen.hpp @@ -5,6 +5,8 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "../state_structs/xml_parse_state.hpp" + class XMLError; namespace waypoint { class Position; @@ -23,6 +25,7 @@ class Position { void xml_attribute_to_position( rapidxml::xml_attribute<>* input, std::vector* errors, + XMLParseState* state, Position* value, bool* is_set); diff --git a/xml_converter/src/attribute/profession_filter_gen.cpp b/xml_converter/src/attribute/profession_filter_gen.cpp index fd965add..68f4c2e8 100644 --- a/xml_converter/src/attribute/profession_filter_gen.cpp +++ b/xml_converter/src/attribute/profession_filter_gen.cpp @@ -15,6 +15,7 @@ using namespace std; void xml_attribute_to_profession_filter( rapidxml::xml_attribute<>* input, std::vector* errors, + XMLParseState* state, ProfessionFilter* value, bool* is_set) { ProfessionFilter profession_filter; diff --git a/xml_converter/src/attribute/profession_filter_gen.hpp b/xml_converter/src/attribute/profession_filter_gen.hpp index 3c11493c..b3a4f5f8 100644 --- a/xml_converter/src/attribute/profession_filter_gen.hpp +++ b/xml_converter/src/attribute/profession_filter_gen.hpp @@ -5,6 +5,8 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "../state_structs/xml_parse_state.hpp" + class XMLError; namespace waypoint { class ProfessionFilter; @@ -29,6 +31,7 @@ class ProfessionFilter { void xml_attribute_to_profession_filter( rapidxml::xml_attribute<>* input, std::vector* errors, + XMLParseState* state, ProfessionFilter* value, bool* is_set); diff --git a/xml_converter/src/attribute/reset_behavior_gen.cpp b/xml_converter/src/attribute/reset_behavior_gen.cpp index 3fdbb3ec..ad5d1490 100644 --- a/xml_converter/src/attribute/reset_behavior_gen.cpp +++ b/xml_converter/src/attribute/reset_behavior_gen.cpp @@ -15,6 +15,7 @@ using namespace std; void xml_attribute_to_reset_behavior( rapidxml::xml_attribute<>* input, std::vector* errors, + XMLParseState* state, ResetBehavior* value, bool* is_set) { ResetBehavior reset_behavior; diff --git a/xml_converter/src/attribute/reset_behavior_gen.hpp b/xml_converter/src/attribute/reset_behavior_gen.hpp index d9bfeede..ddf9d21d 100644 --- a/xml_converter/src/attribute/reset_behavior_gen.hpp +++ b/xml_converter/src/attribute/reset_behavior_gen.hpp @@ -5,6 +5,8 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "../state_structs/xml_parse_state.hpp" + #include "waypoint.pb.h" class XMLError; @@ -23,6 +25,7 @@ enum ResetBehavior { void xml_attribute_to_reset_behavior( rapidxml::xml_attribute<>* input, std::vector* errors, + XMLParseState* state, ResetBehavior* value, bool* is_set); diff --git a/xml_converter/src/attribute/specialization_filter_gen.cpp b/xml_converter/src/attribute/specialization_filter_gen.cpp index 50ce0dcf..3820686e 100644 --- a/xml_converter/src/attribute/specialization_filter_gen.cpp +++ b/xml_converter/src/attribute/specialization_filter_gen.cpp @@ -15,6 +15,7 @@ using namespace std; void xml_attribute_to_specialization_filter( rapidxml::xml_attribute<>* input, std::vector* errors, + XMLParseState* state, SpecializationFilter* value, bool* is_set) { SpecializationFilter specialization_filter; diff --git a/xml_converter/src/attribute/specialization_filter_gen.hpp b/xml_converter/src/attribute/specialization_filter_gen.hpp index 586bff71..d14dfc15 100644 --- a/xml_converter/src/attribute/specialization_filter_gen.hpp +++ b/xml_converter/src/attribute/specialization_filter_gen.hpp @@ -5,6 +5,8 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "../state_structs/xml_parse_state.hpp" + class XMLError; namespace waypoint { class SpecializationFilter; @@ -92,6 +94,7 @@ class SpecializationFilter { void xml_attribute_to_specialization_filter( rapidxml::xml_attribute<>* input, std::vector* errors, + XMLParseState* state, SpecializationFilter* value, bool* is_set); diff --git a/xml_converter/src/attribute/species_filter_gen.cpp b/xml_converter/src/attribute/species_filter_gen.cpp index e257418d..176afcbd 100644 --- a/xml_converter/src/attribute/species_filter_gen.cpp +++ b/xml_converter/src/attribute/species_filter_gen.cpp @@ -15,6 +15,7 @@ using namespace std; void xml_attribute_to_species_filter( rapidxml::xml_attribute<>* input, std::vector* errors, + XMLParseState* state, SpeciesFilter* value, bool* is_set) { SpeciesFilter species_filter; diff --git a/xml_converter/src/attribute/species_filter_gen.hpp b/xml_converter/src/attribute/species_filter_gen.hpp index 51de4d7d..c572d008 100644 --- a/xml_converter/src/attribute/species_filter_gen.hpp +++ b/xml_converter/src/attribute/species_filter_gen.hpp @@ -5,6 +5,8 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "../state_structs/xml_parse_state.hpp" + class XMLError; namespace waypoint { class SpeciesFilter; @@ -25,6 +27,7 @@ class SpeciesFilter { void xml_attribute_to_species_filter( rapidxml::xml_attribute<>* input, std::vector* errors, + XMLParseState* state, SpeciesFilter* value, bool* is_set); diff --git a/xml_converter/src/attribute/string.cpp b/xml_converter/src/attribute/string.cpp index b93272e5..5a76a1af 100644 --- a/xml_converter/src/attribute/string.cpp +++ b/xml_converter/src/attribute/string.cpp @@ -18,6 +18,7 @@ using namespace std; void xml_attribute_to_string( rapidxml::xml_attribute<>* input, std::vector* errors, + XMLParseState* state, string* value, bool* is_set) { *value = get_attribute_value(input); diff --git a/xml_converter/src/attribute/string.hpp b/xml_converter/src/attribute/string.hpp index 97d139c1..843df591 100644 --- a/xml_converter/src/attribute/string.hpp +++ b/xml_converter/src/attribute/string.hpp @@ -5,12 +5,14 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "../state_structs/xml_parse_state.hpp" class XMLError; void xml_attribute_to_string( rapidxml::xml_attribute<>* input, std::vector* errors, + XMLParseState* state, std::string* value, bool* is_set); diff --git a/xml_converter/src/attribute/trail_data.cpp b/xml_converter/src/attribute/trail_data.cpp index 9de6ac2d..6e552a93 100644 --- a/xml_converter/src/attribute/trail_data.cpp +++ b/xml_converter/src/attribute/trail_data.cpp @@ -10,6 +10,7 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" #include "waypoint.pb.h" +#include "../packaging_xml.hpp" using namespace std; @@ -21,14 +22,14 @@ using namespace std; void xml_attribute_to_trail_data( rapidxml::xml_attribute<>* input, vector* errors, - string base_dir, + XMLParseState* state, TrailData* value, bool* is_set, int* map_id_value, bool* is_map_id_set) { TrailData trail_data; string trail_data_relative_path = get_attribute_value(input); - if (base_dir == "") { + if (state->xml_filedir == "") { throw "Error: Marker pack base directory is an empty string"; } if (trail_data_relative_path == "") { @@ -37,7 +38,7 @@ void xml_attribute_to_trail_data( } ifstream trail_data_file; - string trail_path = base_dir + "/" + trail_data_relative_path; + string trail_path = state->xml_filedir + "/" + trail_data_relative_path; trail_data_file.open(trail_path, ios::in | ios::binary); if (!trail_data_file.good()) { errors->push_back(new XMLAttributeValueError("No trail file found at " + trail_path, input)); diff --git a/xml_converter/src/attribute/trail_data.hpp b/xml_converter/src/attribute/trail_data.hpp index ee7c7f18..b36fedfe 100644 --- a/xml_converter/src/attribute/trail_data.hpp +++ b/xml_converter/src/attribute/trail_data.hpp @@ -5,8 +5,10 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "../state_structs/xml_parse_state.hpp" class XMLError; + namespace waypoint { class TrailData; } @@ -21,7 +23,7 @@ class TrailData { void xml_attribute_to_trail_data( rapidxml::xml_attribute<>* input, std::vector* errors, - std::string base_dir, + XMLParseState* state, TrailData* value, bool* is_set, int* map_id_value, diff --git a/xml_converter/src/attribute/unique_id.cpp b/xml_converter/src/attribute/unique_id.cpp index e78fcf5c..d2be3422 100644 --- a/xml_converter/src/attribute/unique_id.cpp +++ b/xml_converter/src/attribute/unique_id.cpp @@ -15,6 +15,7 @@ using namespace std; void xml_attribute_to_unique_id( rapidxml::xml_attribute<>* input, std::vector* errors, + XMLParseState* state, UniqueId* value, bool* is_set) { string base64; diff --git a/xml_converter/src/attribute/unique_id.hpp b/xml_converter/src/attribute/unique_id.hpp index 310ce0e9..b49f00b3 100644 --- a/xml_converter/src/attribute/unique_id.hpp +++ b/xml_converter/src/attribute/unique_id.hpp @@ -6,8 +6,10 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "../state_structs/xml_parse_state.hpp" class XMLError; + namespace waypoint { class GUID; } @@ -20,6 +22,7 @@ class UniqueId { void xml_attribute_to_unique_id( rapidxml::xml_attribute<>* input, std::vector* errors, + XMLParseState* state, UniqueId* value, bool* is_set); diff --git a/xml_converter/src/category_gen.cpp b/xml_converter/src/category_gen.cpp index c530a06e..0e58d28e 100644 --- a/xml_converter/src/category_gen.cpp +++ b/xml_converter/src/category_gen.cpp @@ -18,12 +18,12 @@ using namespace std; string Category::classname() { return "MarkerCategory"; } -void Category::init_from_xml(rapidxml::xml_node<>* node, vector* errors, string base_dir) { +void Category::init_from_xml(rapidxml::xml_node<>* node, vector* errors, XMLParseState* state) { for (rapidxml::xml_attribute<>* attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()) { - bool is_icon_value = this->default_icon.init_xml_attribute(attribute, errors); - bool is_trail_value = this->default_trail.init_xml_attribute(attribute, errors); + bool is_icon_value = this->default_icon.init_xml_attribute(attribute, errors, state); + bool is_trail_value = this->default_trail.init_xml_attribute(attribute, errors, state); - if (init_xml_attribute(attribute, errors, base_dir)) { + if (init_xml_attribute(attribute, errors, state)) { } else if (is_icon_value || is_trail_value) { } @@ -33,23 +33,23 @@ void Category::init_from_xml(rapidxml::xml_node<>* node, vector* erro } } -bool Category::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector* errors, string base_dir) { +bool Category::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector* errors, XMLParseState* state) { string attributename; attributename = normalize(get_attribute_name(attribute)); if (attributename == "defaulttoggle") { - xml_attribute_to_bool(attribute, errors, &(this->default_visibility), &(this->default_visibility_is_set)); + xml_attribute_to_bool(attribute, errors, state, &(this->default_visibility), &(this->default_visibility_is_set)); } else if (attributename == "displayname") { - xml_attribute_to_string(attribute, errors, &(this->display_name), &(this->display_name_is_set)); + xml_attribute_to_string(attribute, errors, state, &(this->display_name), &(this->display_name_is_set)); } else if (attributename == "isseparator") { - xml_attribute_to_bool(attribute, errors, &(this->is_separator), &(this->is_separator_is_set)); + xml_attribute_to_bool(attribute, errors, state, &(this->is_separator), &(this->is_separator_is_set)); } else if (attributename == "name") { - xml_attribute_to_string(attribute, errors, &(this->name), &(this->name_is_set)); + xml_attribute_to_string(attribute, errors, state, &(this->name), &(this->name_is_set)); } else if (attributename == "tipdescription") { - xml_attribute_to_string(attribute, errors, &(this->tooltip_description), &(this->tooltip_description_is_set)); + xml_attribute_to_string(attribute, errors, state, &(this->tooltip_description), &(this->tooltip_description_is_set)); } else { return false; diff --git a/xml_converter/src/category_gen.hpp b/xml_converter/src/category_gen.hpp index 8f51ea43..0ca10d7a 100644 --- a/xml_converter/src/category_gen.hpp +++ b/xml_converter/src/category_gen.hpp @@ -8,6 +8,7 @@ #include "icon_gen.hpp" #include "parseable.hpp" #include "rapidxml-1.13/rapidxml.hpp" +#include "state_structs/xml_parse_state.hpp" #include "trail_gen.hpp" #include "waypoint.pb.h" @@ -29,10 +30,10 @@ class Category : public Parseable { Icon default_icon; Trail default_trail; - void init_from_xml(rapidxml::xml_node<>* node, std::vector* errors, std::string base_dir = ""); + void init_from_xml(rapidxml::xml_node<>* node, std::vector* errors, XMLParseState* state); virtual std::vector as_xml() const; virtual std::string classname(); - bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, std::string base_dir = ""); + bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, XMLParseState* state); waypoint::Category as_protobuf() const; void parse_protobuf(waypoint::Category proto_category); }; diff --git a/xml_converter/src/icon_gen.cpp b/xml_converter/src/icon_gen.cpp index 181c8636..459522d3 100644 --- a/xml_converter/src/icon_gen.cpp +++ b/xml_converter/src/icon_gen.cpp @@ -19,224 +19,224 @@ string Icon::classname() { return "POI"; } -bool Icon::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector* errors, string base_dir) { +bool Icon::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector* errors, XMLParseState* state) { string attributename; attributename = normalize(get_attribute_name(attribute)); if (attributename == "achievementbit") { - xml_attribute_to_int(attribute, errors, &(this->achievement_bitmask), &(this->achievement_bitmask_is_set)); + xml_attribute_to_int(attribute, errors, state, &(this->achievement_bitmask), &(this->achievement_bitmask_is_set)); } else if (attributename == "achievementid") { - xml_attribute_to_int(attribute, errors, &(this->achievement_id), &(this->achievement_id_is_set)); + xml_attribute_to_int(attribute, errors, state, &(this->achievement_id), &(this->achievement_id_is_set)); } else if (attributename == "autotrigger") { - xml_attribute_to_bool(attribute, errors, &(this->auto_trigger), &(this->auto_trigger_is_set)); + xml_attribute_to_bool(attribute, errors, state, &(this->auto_trigger), &(this->auto_trigger_is_set)); } else if (attributename == "bouncedelay") { - xml_attribute_to_float(attribute, errors, &(this->bounce_delay), &(this->bounce_delay_is_set)); + xml_attribute_to_float(attribute, errors, state, &(this->bounce_delay), &(this->bounce_delay_is_set)); } else if (attributename == "bounceduration") { - xml_attribute_to_float(attribute, errors, &(this->bounce_duration), &(this->bounce_duration_is_set)); + xml_attribute_to_float(attribute, errors, state, &(this->bounce_duration), &(this->bounce_duration_is_set)); } else if (attributename == "bounceheight") { - xml_attribute_to_float(attribute, errors, &(this->bounce_height), &(this->bounce_height_is_set)); + xml_attribute_to_float(attribute, errors, state, &(this->bounce_height), &(this->bounce_height_is_set)); } else if (attributename == "type") { - xml_attribute_to_marker_category(attribute, errors, &(this->category), &(this->category_is_set)); + xml_attribute_to_marker_category(attribute, errors, state, &(this->category), &(this->category_is_set)); } else if (attributename == "category") { - xml_attribute_to_marker_category(attribute, errors, &(this->category), &(this->category_is_set)); + xml_attribute_to_marker_category(attribute, errors, state, &(this->category), &(this->category_is_set)); } else if (attributename == "color") { - xml_attribute_to_color(attribute, errors, &(this->color), &(this->color_is_set)); + xml_attribute_to_color(attribute, errors, state, &(this->color), &(this->color_is_set)); } else if (attributename == "bhcolor") { - xml_attribute_to_color(attribute, errors, &(this->color), &(this->color_is_set)); + xml_attribute_to_color(attribute, errors, state, &(this->color), &(this->color_is_set)); } else if (attributename == "alpha") { - xml_attribute_to_float(attribute, errors, &(this->color.alpha), &(this->color_is_set)); + xml_attribute_to_float(attribute, errors, state, &(this->color.alpha), &(this->color_is_set)); } else if (attributename == "blue") { - xml_attribute_to_float(attribute, errors, &(this->color.blue), &(this->color_is_set)); + xml_attribute_to_float(attribute, errors, state, &(this->color.blue), &(this->color_is_set)); } else if (attributename == "green") { - xml_attribute_to_float(attribute, errors, &(this->color.green), &(this->color_is_set)); + xml_attribute_to_float(attribute, errors, state, &(this->color.green), &(this->color_is_set)); } else if (attributename == "red") { - xml_attribute_to_float(attribute, errors, &(this->color.red), &(this->color_is_set)); + xml_attribute_to_float(attribute, errors, state, &(this->color.red), &(this->color_is_set)); } else if (attributename == "copy") { - xml_attribute_to_string(attribute, errors, &(this->copy_clipboard), &(this->copy_clipboard_is_set)); + xml_attribute_to_string(attribute, errors, state, &(this->copy_clipboard), &(this->copy_clipboard_is_set)); } else if (attributename == "copyclipboard") { - xml_attribute_to_string(attribute, errors, &(this->copy_clipboard), &(this->copy_clipboard_is_set)); + xml_attribute_to_string(attribute, errors, state, &(this->copy_clipboard), &(this->copy_clipboard_is_set)); } else if (attributename == "copymessage") { - xml_attribute_to_string(attribute, errors, &(this->copy_message), &(this->copy_message_is_set)); + xml_attribute_to_string(attribute, errors, state, &(this->copy_message), &(this->copy_message_is_set)); } else if (attributename == "cull") { - xml_attribute_to_cull_chirality(attribute, errors, &(this->cull_chirality), &(this->cull_chirality_is_set)); + xml_attribute_to_cull_chirality(attribute, errors, state, &(this->cull_chirality), &(this->cull_chirality_is_set)); } else if (attributename == "canfade") { - inverted_xml_attribute_to_bool(attribute, errors, &(this->disable_player_cutout), &(this->disable_player_cutout_is_set)); + inverted_xml_attribute_to_bool(attribute, errors, state, &(this->disable_player_cutout), &(this->disable_player_cutout_is_set)); } else if (attributename == "fadefar") { - xml_attribute_to_float(attribute, errors, &(this->distance_fade_end), &(this->distance_fade_end_is_set)); + xml_attribute_to_float(attribute, errors, state, &(this->distance_fade_end), &(this->distance_fade_end_is_set)); } else if (attributename == "distancefadeend") { - xml_attribute_to_float(attribute, errors, &(this->distance_fade_end), &(this->distance_fade_end_is_set)); + xml_attribute_to_float(attribute, errors, state, &(this->distance_fade_end), &(this->distance_fade_end_is_set)); } else if (attributename == "fadenear") { - xml_attribute_to_float(attribute, errors, &(this->distance_fade_start), &(this->distance_fade_start_is_set)); + xml_attribute_to_float(attribute, errors, state, &(this->distance_fade_start), &(this->distance_fade_start_is_set)); } else if (attributename == "distancefadestart") { - xml_attribute_to_float(attribute, errors, &(this->distance_fade_start), &(this->distance_fade_start_is_set)); + xml_attribute_to_float(attribute, errors, state, &(this->distance_fade_start), &(this->distance_fade_start_is_set)); } else if (attributename == "rotate") { - xml_attribute_to_euler_rotation(attribute, errors, &(this->euler_rotation), &(this->euler_rotation_is_set)); + xml_attribute_to_euler_rotation(attribute, errors, state, &(this->euler_rotation), &(this->euler_rotation_is_set)); } else if (attributename == "rotatex") { - xml_attribute_to_float(attribute, errors, &(this->euler_rotation.x_rotation), &(this->euler_rotation_is_set)); + xml_attribute_to_float(attribute, errors, state, &(this->euler_rotation.x_rotation), &(this->euler_rotation_is_set)); } else if (attributename == "rotatey") { - xml_attribute_to_float(attribute, errors, &(this->euler_rotation.y_rotation), &(this->euler_rotation_is_set)); + xml_attribute_to_float(attribute, errors, state, &(this->euler_rotation.y_rotation), &(this->euler_rotation_is_set)); } else if (attributename == "rotatez") { - xml_attribute_to_float(attribute, errors, &(this->euler_rotation.z_rotation), &(this->euler_rotation_is_set)); + xml_attribute_to_float(attribute, errors, state, &(this->euler_rotation.z_rotation), &(this->euler_rotation_is_set)); } else if (attributename == "festival") { - xml_attribute_to_festival_filter(attribute, errors, &(this->festival_filter), &(this->festival_filter_is_set)); + xml_attribute_to_festival_filter(attribute, errors, state, &(this->festival_filter), &(this->festival_filter_is_set)); } else if (attributename == "guid") { - xml_attribute_to_unique_id(attribute, errors, &(this->guid), &(this->guid_is_set)); + xml_attribute_to_unique_id(attribute, errors, state, &(this->guid), &(this->guid_is_set)); } else if (attributename == "hascountdown") { - xml_attribute_to_bool(attribute, errors, &(this->has_countdown), &(this->has_countdown_is_set)); + xml_attribute_to_bool(attribute, errors, state, &(this->has_countdown), &(this->has_countdown_is_set)); } else if (attributename == "heightoffset") { - xml_attribute_to_float(attribute, errors, &(this->height_offset), &(this->height_offset_is_set)); + xml_attribute_to_float(attribute, errors, state, &(this->height_offset), &(this->height_offset_is_set)); } else if (attributename == "bhheightoffset") { - xml_attribute_to_float(attribute, errors, &(this->height_offset), &(this->height_offset_is_set)); + xml_attribute_to_float(attribute, errors, state, &(this->height_offset), &(this->height_offset_is_set)); } else if (attributename == "hide") { - xml_attribute_to_marker_category(attribute, errors, &(this->hide_category), &(this->hide_category_is_set)); + xml_attribute_to_marker_category(attribute, errors, state, &(this->hide_category), &(this->hide_category_is_set)); } else if (attributename == "iconfile") { - xml_attribute_to_image(attribute, errors, &(this->icon), &(this->icon_is_set)); + xml_attribute_to_image(attribute, errors, state, &(this->icon), &(this->icon_is_set)); } else if (attributename == "iconsize") { - xml_attribute_to_float(attribute, errors, &(this->icon_size), &(this->icon_size_is_set)); + xml_attribute_to_float(attribute, errors, state, &(this->icon_size), &(this->icon_size_is_set)); } else if (attributename == "info") { - xml_attribute_to_string(attribute, errors, &(this->info_message), &(this->info_message_is_set)); + xml_attribute_to_string(attribute, errors, state, &(this->info_message), &(this->info_message_is_set)); } else if (attributename == "invertbehavior") { - xml_attribute_to_bool(attribute, errors, &(this->invert_visibility), &(this->invert_visibility_is_set)); + xml_attribute_to_bool(attribute, errors, state, &(this->invert_visibility), &(this->invert_visibility_is_set)); } else if (attributename == "mapdisplaysize") { - xml_attribute_to_int(attribute, errors, &(this->map_display_size), &(this->map_display_size_is_set)); + xml_attribute_to_int(attribute, errors, state, &(this->map_display_size), &(this->map_display_size_is_set)); } else if (attributename == "mapid") { - xml_attribute_to_int(attribute, errors, &(this->map_id), &(this->map_id_is_set)); + xml_attribute_to_int(attribute, errors, state, &(this->map_id), &(this->map_id_is_set)); } else if (attributename == "maptype") { - xml_attribute_to_map_type_filter(attribute, errors, &(this->map_type_filter), &(this->map_type_filter_is_set)); + xml_attribute_to_map_type_filter(attribute, errors, state, &(this->map_type_filter), &(this->map_type_filter_is_set)); } else if (attributename == "maxsize") { - xml_attribute_to_int(attribute, errors, &(this->maximum_size_on_screen), &(this->maximum_size_on_screen_is_set)); + xml_attribute_to_int(attribute, errors, state, &(this->maximum_size_on_screen), &(this->maximum_size_on_screen_is_set)); } else if (attributename == "minsize") { - xml_attribute_to_int(attribute, errors, &(this->minimum_size_on_screen), &(this->minimum_size_on_screen_is_set)); + xml_attribute_to_int(attribute, errors, state, &(this->minimum_size_on_screen), &(this->minimum_size_on_screen_is_set)); } else if (attributename == "mount") { - xml_attribute_to_mount_filter(attribute, errors, &(this->mount_filter), &(this->mount_filter_is_set)); + xml_attribute_to_mount_filter(attribute, errors, state, &(this->mount_filter), &(this->mount_filter_is_set)); } else if (attributename == "position") { - xml_attribute_to_position(attribute, errors, &(this->position), &(this->position_is_set)); + xml_attribute_to_position(attribute, errors, state, &(this->position), &(this->position_is_set)); } else if (attributename == "xpos") { - xml_attribute_to_float(attribute, errors, &(this->position.x_position), &(this->position_is_set)); + xml_attribute_to_float(attribute, errors, state, &(this->position.x_position), &(this->position_is_set)); } else if (attributename == "positionx") { - xml_attribute_to_float(attribute, errors, &(this->position.x_position), &(this->position_is_set)); + xml_attribute_to_float(attribute, errors, state, &(this->position.x_position), &(this->position_is_set)); } else if (attributename == "ypos") { - xml_attribute_to_float(attribute, errors, &(this->position.y_position), &(this->position_is_set)); + xml_attribute_to_float(attribute, errors, state, &(this->position.y_position), &(this->position_is_set)); } else if (attributename == "positiony") { - xml_attribute_to_float(attribute, errors, &(this->position.y_position), &(this->position_is_set)); + xml_attribute_to_float(attribute, errors, state, &(this->position.y_position), &(this->position_is_set)); } else if (attributename == "zpos") { - xml_attribute_to_float(attribute, errors, &(this->position.z_position), &(this->position_is_set)); + xml_attribute_to_float(attribute, errors, state, &(this->position.z_position), &(this->position_is_set)); } else if (attributename == "positionz") { - xml_attribute_to_float(attribute, errors, &(this->position.z_position), &(this->position_is_set)); + xml_attribute_to_float(attribute, errors, state, &(this->position.z_position), &(this->position_is_set)); } else if (attributename == "profession") { - xml_attribute_to_profession_filter(attribute, errors, &(this->profession_filter), &(this->profession_filter_is_set)); + xml_attribute_to_profession_filter(attribute, errors, state, &(this->profession_filter), &(this->profession_filter_is_set)); } else if (attributename == "ingamevisibility") { - xml_attribute_to_bool(attribute, errors, &(this->render_ingame), &(this->render_ingame_is_set)); + xml_attribute_to_bool(attribute, errors, state, &(this->render_ingame), &(this->render_ingame_is_set)); } else if (attributename == "bhingamevisibility") { - xml_attribute_to_bool(attribute, errors, &(this->render_ingame), &(this->render_ingame_is_set)); + xml_attribute_to_bool(attribute, errors, state, &(this->render_ingame), &(this->render_ingame_is_set)); } else if (attributename == "mapvisibility") { - xml_attribute_to_bool(attribute, errors, &(this->render_on_map), &(this->render_on_map_is_set)); + xml_attribute_to_bool(attribute, errors, state, &(this->render_on_map), &(this->render_on_map_is_set)); } else if (attributename == "bhmapvisibility") { - xml_attribute_to_bool(attribute, errors, &(this->render_on_map), &(this->render_on_map_is_set)); + xml_attribute_to_bool(attribute, errors, state, &(this->render_on_map), &(this->render_on_map_is_set)); } else if (attributename == "minimapvisibility") { - xml_attribute_to_bool(attribute, errors, &(this->render_on_minimap), &(this->render_on_minimap_is_set)); + xml_attribute_to_bool(attribute, errors, state, &(this->render_on_minimap), &(this->render_on_minimap_is_set)); } else if (attributename == "bhminimapvisibility") { - xml_attribute_to_bool(attribute, errors, &(this->render_on_minimap), &(this->render_on_minimap_is_set)); + xml_attribute_to_bool(attribute, errors, state, &(this->render_on_minimap), &(this->render_on_minimap_is_set)); } else if (attributename == "behavior") { - xml_attribute_to_reset_behavior(attribute, errors, &(this->reset_behavior), &(this->reset_behavior_is_set)); + xml_attribute_to_reset_behavior(attribute, errors, state, &(this->reset_behavior), &(this->reset_behavior_is_set)); } else if (attributename == "resetlength") { - xml_attribute_to_float(attribute, errors, &(this->reset_length), &(this->reset_length_is_set)); + xml_attribute_to_float(attribute, errors, state, &(this->reset_length), &(this->reset_length_is_set)); } else if (attributename == "scaleonmapwithzoom") { - xml_attribute_to_bool(attribute, errors, &(this->scale_on_map_with_zoom), &(this->scale_on_map_with_zoom_is_set)); + xml_attribute_to_bool(attribute, errors, state, &(this->scale_on_map_with_zoom), &(this->scale_on_map_with_zoom_is_set)); } else if (attributename == "schedule") { - xml_attribute_to_string(attribute, errors, &(this->schedule), &(this->schedule_is_set)); + xml_attribute_to_string(attribute, errors, state, &(this->schedule), &(this->schedule_is_set)); } else if (attributename == "scheduleduration") { - xml_attribute_to_float(attribute, errors, &(this->schedule_duration), &(this->schedule_duration_is_set)); + xml_attribute_to_float(attribute, errors, state, &(this->schedule_duration), &(this->schedule_duration_is_set)); } else if (attributename == "show") { - xml_attribute_to_marker_category(attribute, errors, &(this->show_category), &(this->show_category_is_set)); + xml_attribute_to_marker_category(attribute, errors, state, &(this->show_category), &(this->show_category_is_set)); } else if (attributename == "specialization") { - xml_attribute_to_specialization_filter(attribute, errors, &(this->specialization_filter), &(this->specialization_filter_is_set)); + xml_attribute_to_specialization_filter(attribute, errors, state, &(this->specialization_filter), &(this->specialization_filter_is_set)); } else if (attributename == "race") { - xml_attribute_to_species_filter(attribute, errors, &(this->species_filter), &(this->species_filter_is_set)); + xml_attribute_to_species_filter(attribute, errors, state, &(this->species_filter), &(this->species_filter_is_set)); } else if (attributename == "species") { - xml_attribute_to_species_filter(attribute, errors, &(this->species_filter), &(this->species_filter_is_set)); + xml_attribute_to_species_filter(attribute, errors, state, &(this->species_filter), &(this->species_filter_is_set)); } else if (attributename == "toggle") { - xml_attribute_to_marker_category(attribute, errors, &(this->toggle_category), &(this->toggle_category_is_set)); + xml_attribute_to_marker_category(attribute, errors, state, &(this->toggle_category), &(this->toggle_category_is_set)); } else if (attributename == "togglecategory") { - xml_attribute_to_marker_category(attribute, errors, &(this->toggle_category), &(this->toggle_category_is_set)); + xml_attribute_to_marker_category(attribute, errors, state, &(this->toggle_category), &(this->toggle_category_is_set)); } else if (attributename == "tipdescription") { - xml_attribute_to_string(attribute, errors, &(this->tooltip_description), &(this->tooltip_description_is_set)); + xml_attribute_to_string(attribute, errors, state, &(this->tooltip_description), &(this->tooltip_description_is_set)); } else if (attributename == "tipname") { - xml_attribute_to_string(attribute, errors, &(this->tooltip_name), &(this->tooltip_name_is_set)); + xml_attribute_to_string(attribute, errors, state, &(this->tooltip_name), &(this->tooltip_name_is_set)); } else if (attributename == "triggerrange") { - xml_attribute_to_float(attribute, errors, &(this->trigger_range), &(this->trigger_range_is_set)); + xml_attribute_to_float(attribute, errors, state, &(this->trigger_range), &(this->trigger_range_is_set)); } else if (attributename == "inforange") { - xml_attribute_to_float(attribute, errors, &(this->trigger_range), &(this->trigger_range_is_set)); + xml_attribute_to_float(attribute, errors, state, &(this->trigger_range), &(this->trigger_range_is_set)); } else { return false; diff --git a/xml_converter/src/icon_gen.hpp b/xml_converter/src/icon_gen.hpp index cbf4d271..406b8029 100644 --- a/xml_converter/src/icon_gen.hpp +++ b/xml_converter/src/icon_gen.hpp @@ -20,6 +20,7 @@ #include "attribute/unique_id.hpp" #include "parseable.hpp" #include "rapidxml-1.13/rapidxml.hpp" +#include "state_structs/xml_parse_state.hpp" #include "waypoint.pb.h" class XMLError; @@ -122,7 +123,7 @@ class Icon : public Parseable { bool trigger_range_is_set = false; virtual std::vector as_xml() const; virtual std::string classname(); - bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, std::string base_dir = ""); + bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, XMLParseState* state); waypoint::Icon as_protobuf() const; void parse_protobuf(waypoint::Icon proto_icon); bool validate_attributes_of_type_marker_category(); diff --git a/xml_converter/src/packaging_xml.cpp b/xml_converter/src/packaging_xml.cpp index 3101a84d..12edad84 100644 --- a/xml_converter/src/packaging_xml.cpp +++ b/xml_converter/src/packaging_xml.cpp @@ -7,20 +7,26 @@ #include "rapidxml-1.13/rapidxml_utils.hpp" #include "string_helper.hpp" + using namespace std; //////////////////////////////////////////////////////////////////////////////// ////////////////////////////////// SERIALIZE /////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// -void parse_marker_categories(rapidxml::xml_node<>* node, map* marker_categories, vector* errors, int depth = 0) { +void parse_marker_categories(rapidxml::xml_node<>* node, map* marker_categories, vector* errors, string base_dir, int depth = 0) { if (get_node_name(node) == "MarkerCategory") { string name = lowercase(find_attribute_value(node, "name")); + XMLParseState state = { + base_dir, + marker_categories, + }; + Category* this_category = &(*marker_categories)[name]; - this_category->init_from_xml(node, errors); + this_category->init_from_xml(node, errors, &state); for (rapidxml::xml_node<>* child_node = node->first_node(); child_node; child_node = child_node->next_sibling()) { - parse_marker_categories(child_node, &(this_category->children), errors, depth + 1); + parse_marker_categories(child_node, &(this_category->children), errors, base_dir, depth + 1); } } else { @@ -74,6 +80,11 @@ Category* get_category(rapidxml::xml_node<>* node, map* marker vector parse_pois(rapidxml::xml_node<>* root_node, map* marker_categories, vector* errors, string base_dir) { vector markers; + XMLParseState state = { + base_dir, + marker_categories, + }; + for (rapidxml::xml_node<>* node = root_node->first_node(); node; node = node->next_sibling()) { if (get_node_name(node) == "POI") { Category* default_category = get_category(node, marker_categories, errors); @@ -84,7 +95,7 @@ vector parse_pois(rapidxml::xml_node<>* root_node, mapdefault_icon; } - icon->init_from_xml(node, errors); + icon->init_from_xml(node, errors, &state); markers.push_back(icon); } else if (get_node_name(node) == "Trail") { @@ -96,7 +107,7 @@ vector parse_pois(rapidxml::xml_node<>* root_node, mapdefault_trail; } - trail->init_from_xml(node, errors, base_dir); + trail->init_from_xml(node, errors, &state); markers.push_back(trail); } else { @@ -131,7 +142,7 @@ void parse_xml_file(string xml_filepath, map* marker_categorie for (rapidxml::xml_node<>* node = root_node->first_node(); node; node = node->next_sibling()) { if (get_node_name(node) == "MarkerCategory") { - parse_marker_categories(node, marker_categories, &errors); + parse_marker_categories(node, marker_categories, &errors, base_dir); } else if (get_node_name(node) == "POIs") { vector temp_vector = parse_pois(node, marker_categories, &errors, base_dir); diff --git a/xml_converter/src/packaging_xml.hpp b/xml_converter/src/packaging_xml.hpp index 9ffa1282..8e45fc8e 100644 --- a/xml_converter/src/packaging_xml.hpp +++ b/xml_converter/src/packaging_xml.hpp @@ -8,6 +8,7 @@ #include "parseable.hpp" #include "rapidxml-1.13/rapidxml.hpp" #include "rapidxml-1.13/rapidxml_utils.hpp" +#include "state_structs/xml_parse_state.hpp" void parse_xml_file( std::string xml_filepath, diff --git a/xml_converter/src/parseable.cpp b/xml_converter/src/parseable.cpp index bd5bee47..137fb6f2 100644 --- a/xml_converter/src/parseable.cpp +++ b/xml_converter/src/parseable.cpp @@ -11,9 +11,9 @@ std::string Parseable::classname() { return "Parseable"; } -void Parseable::init_from_xml(rapidxml::xml_node<>* node, std::vector* errors, std::string base_dir) { +void Parseable::init_from_xml(rapidxml::xml_node<>* node, std::vector* errors, XMLParseState* state) { for (rapidxml::xml_attribute<>* attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()) { - if (init_xml_attribute(attribute, errors, base_dir)) { + if (init_xml_attribute(attribute, errors, state)) { } else { errors->push_back(new XMLAttributeNameError("Unknown " + this->classname() + " attribute ", attribute)); @@ -28,7 +28,7 @@ void Parseable::init_from_xml(rapidxml::xml_node<>* node, std::vector // all of the other parsible classes. So just return false right away without // doing anything. //////////////////////////////////////////////////////////////////////////////// -bool Parseable::init_xml_attribute(rapidxml::xml_attribute<>*, std::vector*, std::string) { +bool Parseable::init_xml_attribute(rapidxml::xml_attribute<>*, std::vector*, XMLParseState*) { return false; } diff --git a/xml_converter/src/parseable.hpp b/xml_converter/src/parseable.hpp index 455886e6..f1bbc30c 100644 --- a/xml_converter/src/parseable.hpp +++ b/xml_converter/src/parseable.hpp @@ -4,6 +4,8 @@ #include #include "rapidxml-1.13/rapidxml.hpp" +#include "state_structs/xml_parse_state.hpp" + class XMLError; class Parseable { @@ -12,10 +14,10 @@ class Parseable { virtual std::string classname(); // A default parser function to parse an entire XML node into the class. - void init_from_xml(rapidxml::xml_node<>* node, std::vector* errors, std::string base_dir = ""); + void init_from_xml(rapidxml::xml_node<>* node, std::vector* errors, XMLParseState* state); // A default parser function to parse a single XML attribute into the class. - virtual bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, std::string base_dir = ""); + virtual bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, XMLParseState*); virtual std::vector as_xml() const; }; diff --git a/xml_converter/src/state_structs/xml_parse_state.hpp b/xml_converter/src/state_structs/xml_parse_state.hpp new file mode 100644 index 00000000..61d6b745 --- /dev/null +++ b/xml_converter/src/state_structs/xml_parse_state.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include +#include + +class Category; + +struct XMLParseState { + std::string xml_filedir; + std::map* marker_categories; +}; diff --git a/xml_converter/src/trail_gen.cpp b/xml_converter/src/trail_gen.cpp index dacfb07e..07d263cf 100644 --- a/xml_converter/src/trail_gen.cpp +++ b/xml_converter/src/trail_gen.cpp @@ -19,128 +19,128 @@ string Trail::classname() { return "Trail"; } -bool Trail::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector* errors, string base_dir) { +bool Trail::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector* errors, XMLParseState* state) { string attributename; attributename = normalize(get_attribute_name(attribute)); if (attributename == "achievementbit") { - xml_attribute_to_int(attribute, errors, &(this->achievement_bitmask), &(this->achievement_bitmask_is_set)); + xml_attribute_to_int(attribute, errors, state, &(this->achievement_bitmask), &(this->achievement_bitmask_is_set)); } else if (attributename == "achievementid") { - xml_attribute_to_int(attribute, errors, &(this->achievement_id), &(this->achievement_id_is_set)); + xml_attribute_to_int(attribute, errors, state, &(this->achievement_id), &(this->achievement_id_is_set)); } else if (attributename == "animspeed") { - xml_attribute_to_float(attribute, errors, &(this->animation_speed), &(this->animation_speed_is_set)); + xml_attribute_to_float(attribute, errors, state, &(this->animation_speed), &(this->animation_speed_is_set)); } else if (attributename == "animationspeed") { - xml_attribute_to_float(attribute, errors, &(this->animation_speed), &(this->animation_speed_is_set)); + xml_attribute_to_float(attribute, errors, state, &(this->animation_speed), &(this->animation_speed_is_set)); } else if (attributename == "type") { - xml_attribute_to_marker_category(attribute, errors, &(this->category), &(this->category_is_set)); + xml_attribute_to_marker_category(attribute, errors, state, &(this->category), &(this->category_is_set)); } else if (attributename == "category") { - xml_attribute_to_marker_category(attribute, errors, &(this->category), &(this->category_is_set)); + xml_attribute_to_marker_category(attribute, errors, state, &(this->category), &(this->category_is_set)); } else if (attributename == "color") { - xml_attribute_to_color(attribute, errors, &(this->color), &(this->color_is_set)); + xml_attribute_to_color(attribute, errors, state, &(this->color), &(this->color_is_set)); } else if (attributename == "bhcolor") { - xml_attribute_to_color(attribute, errors, &(this->color), &(this->color_is_set)); + xml_attribute_to_color(attribute, errors, state, &(this->color), &(this->color_is_set)); } else if (attributename == "alpha") { - xml_attribute_to_float(attribute, errors, &(this->color.alpha), &(this->color_is_set)); + xml_attribute_to_float(attribute, errors, state, &(this->color.alpha), &(this->color_is_set)); } else if (attributename == "blue") { - xml_attribute_to_float(attribute, errors, &(this->color.blue), &(this->color_is_set)); + xml_attribute_to_float(attribute, errors, state, &(this->color.blue), &(this->color_is_set)); } else if (attributename == "green") { - xml_attribute_to_float(attribute, errors, &(this->color.green), &(this->color_is_set)); + xml_attribute_to_float(attribute, errors, state, &(this->color.green), &(this->color_is_set)); } else if (attributename == "red") { - xml_attribute_to_float(attribute, errors, &(this->color.red), &(this->color_is_set)); + xml_attribute_to_float(attribute, errors, state, &(this->color.red), &(this->color_is_set)); } else if (attributename == "cull") { - xml_attribute_to_cull_chirality(attribute, errors, &(this->cull_chirality), &(this->cull_chirality_is_set)); + xml_attribute_to_cull_chirality(attribute, errors, state, &(this->cull_chirality), &(this->cull_chirality_is_set)); } else if (attributename == "canfade") { - inverted_xml_attribute_to_bool(attribute, errors, &(this->disable_player_cutout), &(this->disable_player_cutout_is_set)); + inverted_xml_attribute_to_bool(attribute, errors, state, &(this->disable_player_cutout), &(this->disable_player_cutout_is_set)); } else if (attributename == "fadefar") { - xml_attribute_to_float(attribute, errors, &(this->distance_fade_end), &(this->distance_fade_end_is_set)); + xml_attribute_to_float(attribute, errors, state, &(this->distance_fade_end), &(this->distance_fade_end_is_set)); } else if (attributename == "distancefadeend") { - xml_attribute_to_float(attribute, errors, &(this->distance_fade_end), &(this->distance_fade_end_is_set)); + xml_attribute_to_float(attribute, errors, state, &(this->distance_fade_end), &(this->distance_fade_end_is_set)); } else if (attributename == "fadenear") { - xml_attribute_to_float(attribute, errors, &(this->distance_fade_start), &(this->distance_fade_start_is_set)); + xml_attribute_to_float(attribute, errors, state, &(this->distance_fade_start), &(this->distance_fade_start_is_set)); } else if (attributename == "distancefadestart") { - xml_attribute_to_float(attribute, errors, &(this->distance_fade_start), &(this->distance_fade_start_is_set)); + xml_attribute_to_float(attribute, errors, state, &(this->distance_fade_start), &(this->distance_fade_start_is_set)); } else if (attributename == "festival") { - xml_attribute_to_festival_filter(attribute, errors, &(this->festival_filter), &(this->festival_filter_is_set)); + xml_attribute_to_festival_filter(attribute, errors, state, &(this->festival_filter), &(this->festival_filter_is_set)); } else if (attributename == "guid") { - xml_attribute_to_unique_id(attribute, errors, &(this->guid), &(this->guid_is_set)); + xml_attribute_to_unique_id(attribute, errors, state, &(this->guid), &(this->guid_is_set)); } else if (attributename == "iswall") { - xml_attribute_to_bool(attribute, errors, &(this->is_wall), &(this->is_wall_is_set)); + xml_attribute_to_bool(attribute, errors, state, &(this->is_wall), &(this->is_wall_is_set)); } else if (attributename == "mapdisplaysize") { - xml_attribute_to_int(attribute, errors, &(this->map_display_size), &(this->map_display_size_is_set)); + xml_attribute_to_int(attribute, errors, state, &(this->map_display_size), &(this->map_display_size_is_set)); } else if (attributename == "mapid") { - xml_attribute_to_int(attribute, errors, &(this->map_id), &(this->map_id_is_set)); + xml_attribute_to_int(attribute, errors, state, &(this->map_id), &(this->map_id_is_set)); } else if (attributename == "maptype") { - xml_attribute_to_map_type_filter(attribute, errors, &(this->map_type_filter), &(this->map_type_filter_is_set)); + xml_attribute_to_map_type_filter(attribute, errors, state, &(this->map_type_filter), &(this->map_type_filter_is_set)); } else if (attributename == "mount") { - xml_attribute_to_mount_filter(attribute, errors, &(this->mount_filter), &(this->mount_filter_is_set)); + xml_attribute_to_mount_filter(attribute, errors, state, &(this->mount_filter), &(this->mount_filter_is_set)); } else if (attributename == "profession") { - xml_attribute_to_profession_filter(attribute, errors, &(this->profession_filter), &(this->profession_filter_is_set)); + xml_attribute_to_profession_filter(attribute, errors, state, &(this->profession_filter), &(this->profession_filter_is_set)); } else if (attributename == "ingamevisibility") { - xml_attribute_to_bool(attribute, errors, &(this->render_ingame), &(this->render_ingame_is_set)); + xml_attribute_to_bool(attribute, errors, state, &(this->render_ingame), &(this->render_ingame_is_set)); } else if (attributename == "bhingamevisibility") { - xml_attribute_to_bool(attribute, errors, &(this->render_ingame), &(this->render_ingame_is_set)); + xml_attribute_to_bool(attribute, errors, state, &(this->render_ingame), &(this->render_ingame_is_set)); } else if (attributename == "mapvisibility") { - xml_attribute_to_bool(attribute, errors, &(this->render_on_map), &(this->render_on_map_is_set)); + xml_attribute_to_bool(attribute, errors, state, &(this->render_on_map), &(this->render_on_map_is_set)); } else if (attributename == "bhmapvisibility") { - xml_attribute_to_bool(attribute, errors, &(this->render_on_map), &(this->render_on_map_is_set)); + xml_attribute_to_bool(attribute, errors, state, &(this->render_on_map), &(this->render_on_map_is_set)); } else if (attributename == "minimapvisibility") { - xml_attribute_to_bool(attribute, errors, &(this->render_on_minimap), &(this->render_on_minimap_is_set)); + xml_attribute_to_bool(attribute, errors, state, &(this->render_on_minimap), &(this->render_on_minimap_is_set)); } else if (attributename == "bhminimapvisibility") { - xml_attribute_to_bool(attribute, errors, &(this->render_on_minimap), &(this->render_on_minimap_is_set)); + xml_attribute_to_bool(attribute, errors, state, &(this->render_on_minimap), &(this->render_on_minimap_is_set)); } else if (attributename == "schedule") { - xml_attribute_to_string(attribute, errors, &(this->schedule), &(this->schedule_is_set)); + xml_attribute_to_string(attribute, errors, state, &(this->schedule), &(this->schedule_is_set)); } else if (attributename == "scheduleduration") { - xml_attribute_to_float(attribute, errors, &(this->schedule_duration), &(this->schedule_duration_is_set)); + xml_attribute_to_float(attribute, errors, state, &(this->schedule_duration), &(this->schedule_duration_is_set)); } else if (attributename == "specialization") { - xml_attribute_to_specialization_filter(attribute, errors, &(this->specialization_filter), &(this->specialization_filter_is_set)); + xml_attribute_to_specialization_filter(attribute, errors, state, &(this->specialization_filter), &(this->specialization_filter_is_set)); } else if (attributename == "race") { - xml_attribute_to_species_filter(attribute, errors, &(this->species_filter), &(this->species_filter_is_set)); + xml_attribute_to_species_filter(attribute, errors, state, &(this->species_filter), &(this->species_filter_is_set)); } else if (attributename == "species") { - xml_attribute_to_species_filter(attribute, errors, &(this->species_filter), &(this->species_filter_is_set)); + xml_attribute_to_species_filter(attribute, errors, state, &(this->species_filter), &(this->species_filter_is_set)); } else if (attributename == "texture") { - xml_attribute_to_image(attribute, errors, &(this->texture), &(this->texture_is_set)); + xml_attribute_to_image(attribute, errors, state, &(this->texture), &(this->texture_is_set)); } else if (attributename == "traildata") { - xml_attribute_to_trail_data(attribute, errors, base_dir, &(this->trail_data), &(this->trail_data_is_set), &(this->map_id), &(this->map_id_is_set)); + xml_attribute_to_trail_data(attribute, errors, state, &(this->trail_data), &(this->trail_data_is_set), &(this->map_id), &(this->map_id_is_set)); } else if (attributename == "trailscale") { - xml_attribute_to_float(attribute, errors, &(this->trail_scale), &(this->trail_scale_is_set)); + xml_attribute_to_float(attribute, errors, state, &(this->trail_scale), &(this->trail_scale_is_set)); } else { return false; diff --git a/xml_converter/src/trail_gen.hpp b/xml_converter/src/trail_gen.hpp index a020a2a3..22c373e2 100644 --- a/xml_converter/src/trail_gen.hpp +++ b/xml_converter/src/trail_gen.hpp @@ -18,6 +18,7 @@ #include "attribute/unique_id.hpp" #include "parseable.hpp" #include "rapidxml-1.13/rapidxml.hpp" +#include "state_structs/xml_parse_state.hpp" #include "waypoint.pb.h" class XMLError; @@ -80,7 +81,7 @@ class Trail : public Parseable { bool trail_scale_is_set = false; virtual std::vector as_xml() const; virtual std::string classname(); - bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, std::string base_dir = ""); + bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, XMLParseState* state); waypoint::Trail as_protobuf() const; void parse_protobuf(waypoint::Trail proto_trail); bool validate_attributes_of_type_marker_category(); From 3d5c9652bdbf6547be744019bf1ee5689a9b8f67 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Fri, 10 Nov 2023 21:39:24 -0600 Subject: [PATCH 327/539] fixing linter checks --- xml_converter/generators/cpp_templates/attribute_template.hpp | 2 +- xml_converter/src/attribute/cull_chirality_gen.hpp | 1 - xml_converter/src/attribute/reset_behavior_gen.hpp | 1 - xml_converter/src/attribute/trail_data.cpp | 4 ++-- xml_converter/src/packaging_xml.cpp | 1 - 5 files changed, 3 insertions(+), 6 deletions(-) diff --git a/xml_converter/generators/cpp_templates/attribute_template.hpp b/xml_converter/generators/cpp_templates/attribute_template.hpp index a8245b31..71bdefa8 100644 --- a/xml_converter/generators/cpp_templates/attribute_template.hpp +++ b/xml_converter/generators/cpp_templates/attribute_template.hpp @@ -6,7 +6,6 @@ #include "../rapidxml-1.13/rapidxml.hpp" #include "../state_structs/xml_parse_state.hpp" - {% if type == "Enum" %} #include "waypoint.pb.h" @@ -18,6 +17,7 @@ {% endfor %} }; {% else %} + class XMLError; {{proto_field_cpp_type_prototype}} diff --git a/xml_converter/src/attribute/cull_chirality_gen.hpp b/xml_converter/src/attribute/cull_chirality_gen.hpp index 78173a5a..d73806ed 100644 --- a/xml_converter/src/attribute/cull_chirality_gen.hpp +++ b/xml_converter/src/attribute/cull_chirality_gen.hpp @@ -6,7 +6,6 @@ #include "../rapidxml-1.13/rapidxml.hpp" #include "../state_structs/xml_parse_state.hpp" - #include "waypoint.pb.h" class XMLError; diff --git a/xml_converter/src/attribute/reset_behavior_gen.hpp b/xml_converter/src/attribute/reset_behavior_gen.hpp index ddf9d21d..c13c10fb 100644 --- a/xml_converter/src/attribute/reset_behavior_gen.hpp +++ b/xml_converter/src/attribute/reset_behavior_gen.hpp @@ -6,7 +6,6 @@ #include "../rapidxml-1.13/rapidxml.hpp" #include "../state_structs/xml_parse_state.hpp" - #include "waypoint.pb.h" class XMLError; diff --git a/xml_converter/src/attribute/trail_data.cpp b/xml_converter/src/attribute/trail_data.cpp index 6e552a93..0b5f05fa 100644 --- a/xml_converter/src/attribute/trail_data.cpp +++ b/xml_converter/src/attribute/trail_data.cpp @@ -7,10 +7,10 @@ #include #include +#include "../packaging_xml.hpp" #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" #include "waypoint.pb.h" -#include "../packaging_xml.hpp" using namespace std; @@ -29,7 +29,7 @@ void xml_attribute_to_trail_data( bool* is_map_id_set) { TrailData trail_data; string trail_data_relative_path = get_attribute_value(input); - if (state->xml_filedir == "") { + if (state->xml_filedir == "") { throw "Error: Marker pack base directory is an empty string"; } if (trail_data_relative_path == "") { diff --git a/xml_converter/src/packaging_xml.cpp b/xml_converter/src/packaging_xml.cpp index 12edad84..0b9fe395 100644 --- a/xml_converter/src/packaging_xml.cpp +++ b/xml_converter/src/packaging_xml.cpp @@ -7,7 +7,6 @@ #include "rapidxml-1.13/rapidxml_utils.hpp" #include "string_helper.hpp" - using namespace std; //////////////////////////////////////////////////////////////////////////////// From a87353cffb2cb762e789559038e9e8f2c46cb148 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sat, 11 Nov 2023 15:29:11 -0600 Subject: [PATCH 328/539] adding version restrict plugin to help me open the right version --- addons/version_restrict/plugin.cfg | 7 +++ addons/version_restrict/plugin.gd | 81 ++++++++++++++++++++++++++++++ project.godot | 2 + 3 files changed, 90 insertions(+) create mode 100644 addons/version_restrict/plugin.cfg create mode 100644 addons/version_restrict/plugin.gd diff --git a/addons/version_restrict/plugin.cfg b/addons/version_restrict/plugin.cfg new file mode 100644 index 00000000..7a2ea243 --- /dev/null +++ b/addons/version_restrict/plugin.cfg @@ -0,0 +1,7 @@ +[plugin] + +name="VersionRestrict" +description="Restricts the Godot Engine version that can be used by the developer." +author="Orthogonal Projects" +version="1.0" +script="plugin.gd" diff --git a/addons/version_restrict/plugin.gd b/addons/version_restrict/plugin.gd new file mode 100644 index 00000000..86a93465 --- /dev/null +++ b/addons/version_restrict/plugin.gd @@ -0,0 +1,81 @@ +tool +extends EditorPlugin + +var confirm_modal: AcceptDialog +var exit_on_hide: bool = true + +var target_engine_property = "global/target_engine_version" + +################################################################################ +# _enter_tree +# +# When the plugin loads read the target_engine_version from the project config +# and compare it to the current engine version. +################################################################################ +func _enter_tree(): + var target_engine_version = ProjectSettings.get(target_engine_property) + + var engine_info = Engine.get_version_info() + var current_engine_version = "{major}.{minor}.{patch}".format({ + "major": engine_info.major, + "minor": engine_info.minor, + "patch": engine_info.patch, + }) + + # Set the target version to the current version on first run. + if target_engine_version == null: + ProjectSettings.set(target_engine_property, current_engine_version) + target_engine_version = current_engine_version + + if target_engine_version != current_engine_version: + + confirm_modal = AcceptDialog.new() + + # Remove the `X` button in the top right. We cant remove it compleetly + # without effecting the stability of the engine so it is just hidden. + confirm_modal.get_close_button().hide() + + # Rename "Ok" confirmation button to "Close Godot" + confirm_modal.get_ok().text = "Close Godot" + + get_editor_interface().get_editor_viewport().add_child(confirm_modal) + + confirm_modal.dialog_text = "You are using v"+current_engine_version+" of the Godot Engine to run this project.\n\nThis project wants you to use v"+target_engine_version+" instead.\n\nIf you beleive this is incorrect you can \n- Change the target engin version in:\n 'Project Settings' -> 'Global' -> 'Target Engine Version'\nor\n- Disable the 'Version Restrict' plugin" + + # Center the panel on the screen + confirm_modal.anchor_left = 0.5 + confirm_modal.anchor_top = 0.5 + confirm_modal.anchor_right = 0.5 + confirm_modal.anchor_bottom = 0.5 + confirm_modal.margin_left = -confirm_modal.rect_size.x/2 + confirm_modal.margin_top = -confirm_modal.rect_size.y/2 + + # Cause the program to exit when the modal is hidden + confirm_modal.connect("hide", self, "_accept_dialog_hidden") + + # TODO: Add a button to bring you to the download page for the correct version + + confirm_modal.show() + + +################################################################################ +# _accept_dialog_hidden +# +# Triggers when the accept dialog is hidden by any means. Will close the Godot +# editor unless self.exit_on_hide has been set to false somewhere. +################################################################################ +func _accept_dialog_hidden(): + if self.exit_on_hide: + get_tree().quit() + + +################################################################################ +# _exit_tree +# +# If an AcceptDialog was created when this plugin entered the tree then remove +# it. This will prevent the program from exiting when the dialog is closed. +################################################################################ +func _exit_tree(): + if confirm_modal: + self.exit_on_hide = false + confirm_modal.queue_free() diff --git a/project.godot b/project.godot index 200ad0a0..e7ec8f21 100644 --- a/project.godot +++ b/project.godot @@ -50,11 +50,13 @@ window/per_pixel_transparency/enabled=true [editor_plugins] enabled=PoolStringArray( "res://addons/protobuf/plugin.cfg" ) +enabled=PoolStringArray( "res://addons/version_restrict/plugin.cfg" ) [global] logg=true logging=true +target_engine_version="3.3.2" [rendering] From 4cf75a1bebf817b9ca830ce0bf1cc3f87080d268 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 13 Nov 2023 22:01:13 -0500 Subject: [PATCH 329/539] Tests for Fade Near and Far --- xml_converter/doc/fade/distance_fade_end.md | 2 +- .../expected_outputs/proto_fade/markers.bin | Bin 0 -> 255 bytes .../expected_outputs/xml_fade/xml_file.xml | 18 +++++++++++++++++ .../inputs/xml_fade/xml_file.xml | 19 ++++++++++++++++++ xml_converter/intigration_tests/testcases.py | 6 ++++++ 5 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 xml_converter/intigration_tests/expected_outputs/proto_fade/markers.bin create mode 100644 xml_converter/intigration_tests/expected_outputs/xml_fade/xml_file.xml create mode 100644 xml_converter/intigration_tests/inputs/xml_fade/xml_file.xml diff --git a/xml_converter/doc/fade/distance_fade_end.md b/xml_converter/doc/fade/distance_fade_end.md index fcd1fbaf..4a40019b 100644 --- a/xml_converter/doc/fade/distance_fade_end.md +++ b/xml_converter/doc/fade/distance_fade_end.md @@ -5,7 +5,7 @@ applies_to: [Icon, Trail] xml_fields: [FadeFar, DistanceFadeEnd] protobuf_field: distance_fade_end --- -Any part of the object that is farther then this value will be at. +Any part of the object that is farther then this value will be at 0 alpha. Notes ===== diff --git a/xml_converter/intigration_tests/expected_outputs/proto_fade/markers.bin b/xml_converter/intigration_tests/expected_outputs/proto_fade/markers.bin new file mode 100644 index 0000000000000000000000000000000000000000..68ae59c38b05ed84d8f3f6628ed87c2e1c12a750 GIT binary patch literal 255 zcmd=3!^p+$TdCljSdyBaUsNe2pSNFxquVFe>hBS8+tZW>4it22~X!8(+<5N?4A0RSW0 BROSEx literal 0 HcmV?d00001 diff --git a/xml_converter/intigration_tests/expected_outputs/xml_fade/xml_file.xml b/xml_converter/intigration_tests/expected_outputs/xml_fade/xml_file.xml new file mode 100644 index 00000000..863d890d --- /dev/null +++ b/xml_converter/intigration_tests/expected_outputs/xml_fade/xml_file.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/xml_converter/intigration_tests/inputs/xml_fade/xml_file.xml b/xml_converter/intigration_tests/inputs/xml_fade/xml_file.xml new file mode 100644 index 00000000..c6a9611a --- /dev/null +++ b/xml_converter/intigration_tests/inputs/xml_fade/xml_file.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/xml_converter/intigration_tests/testcases.py b/xml_converter/intigration_tests/testcases.py index 4b44e0f0..1a16132a 100644 --- a/xml_converter/intigration_tests/testcases.py +++ b/xml_converter/intigration_tests/testcases.py @@ -84,4 +84,10 @@ class Testcase: expected_output_xml_path="./expected_outputs/xml_is_wall", expected_output_proto_path="./expected_outputs/proto_is_wall", ), + Testcase( + name="fade", + xml_input_paths=["./inputs/xml_fade"], + expected_output_xml_path="./expected_outputs/xml_fade", + expected_output_proto_path="./expected_outputs/proto_fade", + ), ] From 6c2bb87bc14c953453e10d3f7b22c84c653e2594 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 13 Nov 2023 22:34:54 -0500 Subject: [PATCH 330/539] Added intergration tests for Map ID --- .../expected_outputs/proto_map_id/markers.bin | 3 +++ .../expected_outputs/xml_map_id/xml_file.xml | 13 +++++++++++++ .../intigration_tests/inputs/xml_map_id/trail.trl | 1 + .../inputs/xml_map_id/xml_file.xml | 13 +++++++++++++ xml_converter/intigration_tests/testcases.py | 6 ++++++ 5 files changed, 36 insertions(+) create mode 100644 xml_converter/intigration_tests/expected_outputs/proto_map_id/markers.bin create mode 100644 xml_converter/intigration_tests/expected_outputs/xml_map_id/xml_file.xml create mode 100644 xml_converter/intigration_tests/inputs/xml_map_id/trail.trl create mode 100644 xml_converter/intigration_tests/inputs/xml_map_id/xml_file.xml diff --git a/xml_converter/intigration_tests/expected_outputs/proto_map_id/markers.bin b/xml_converter/intigration_tests/expected_outputs/proto_map_id/markers.bin new file mode 100644 index 00000000..9f364b0b --- /dev/null +++ b/xml_converter/intigration_tests/expected_outputs/proto_map_id/markers.bin @@ -0,0 +1,3 @@ + +– + My CategoryB \Ï)Cf¦RC{ÔWC B \Ï)Cf¦RC{ÔWC B \Ï)Cf¦RC{ÔWC ÿÿÿÿB \Ï)Cf¦RC{ÔWC €€€€øÿÿÿÿB \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC \ No newline at end of file diff --git a/xml_converter/intigration_tests/expected_outputs/xml_map_id/xml_file.xml b/xml_converter/intigration_tests/expected_outputs/xml_map_id/xml_file.xml new file mode 100644 index 00000000..f2817b38 --- /dev/null +++ b/xml_converter/intigration_tests/expected_outputs/xml_map_id/xml_file.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/xml_converter/intigration_tests/inputs/xml_map_id/trail.trl b/xml_converter/intigration_tests/inputs/xml_map_id/trail.trl new file mode 100644 index 00000000..71381587 --- /dev/null +++ b/xml_converter/intigration_tests/inputs/xml_map_id/trail.trl @@ -0,0 +1 @@ +0000 0000 3200 0000 \ No newline at end of file diff --git a/xml_converter/intigration_tests/inputs/xml_map_id/xml_file.xml b/xml_converter/intigration_tests/inputs/xml_map_id/xml_file.xml new file mode 100644 index 00000000..17b43b07 --- /dev/null +++ b/xml_converter/intigration_tests/inputs/xml_map_id/xml_file.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/xml_converter/intigration_tests/testcases.py b/xml_converter/intigration_tests/testcases.py index 0b3ffca4..ff501b55 100644 --- a/xml_converter/intigration_tests/testcases.py +++ b/xml_converter/intigration_tests/testcases.py @@ -90,4 +90,10 @@ class Testcase: expected_output_xml_path="./expected_outputs/xml_festival_filter", expected_output_proto_path="./expected_outputs/proto_festival_filter", ), + Testcase( + name="map_id", + xml_input_paths=["./inputs/xml_map_id"], + expected_output_xml_path="./expected_outputs/xml_map_id", + expected_output_proto_path="./expected_outputs/proto_map_id", + ) ] From cd3f4f0b95254f60ee341e2f5db76026851fcf47 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 13 Nov 2023 22:36:09 -0500 Subject: [PATCH 331/539] Removing unnessecary file --- xml_converter/intigration_tests/inputs/xml_map_id/trail.trl | 1 - 1 file changed, 1 deletion(-) delete mode 100644 xml_converter/intigration_tests/inputs/xml_map_id/trail.trl diff --git a/xml_converter/intigration_tests/inputs/xml_map_id/trail.trl b/xml_converter/intigration_tests/inputs/xml_map_id/trail.trl deleted file mode 100644 index 71381587..00000000 --- a/xml_converter/intigration_tests/inputs/xml_map_id/trail.trl +++ /dev/null @@ -1 +0,0 @@ -0000 0000 3200 0000 \ No newline at end of file From 894e98b1f10b8e728a41f6fc86aa38fe218a841b Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 13 Nov 2023 22:44:13 -0500 Subject: [PATCH 332/539] Removing negative mapID test --- .../expected_outputs/proto_map_id/markers.bin | 4 ++-- .../expected_outputs/xml_map_id/xml_file.xml | 1 - .../intigration_tests/inputs/xml_map_id/xml_file.xml | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/xml_converter/intigration_tests/expected_outputs/proto_map_id/markers.bin b/xml_converter/intigration_tests/expected_outputs/proto_map_id/markers.bin index 9f364b0b..cdc94a2a 100644 --- a/xml_converter/intigration_tests/expected_outputs/proto_map_id/markers.bin +++ b/xml_converter/intigration_tests/expected_outputs/proto_map_id/markers.bin @@ -1,3 +1,3 @@ -– - My CategoryB \Ï)Cf¦RC{ÔWC B \Ï)Cf¦RC{ÔWC B \Ï)Cf¦RC{ÔWC ÿÿÿÿB \Ï)Cf¦RC{ÔWC €€€€øÿÿÿÿB \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC \ No newline at end of file +x + My CategoryB \Ï)Cf¦RC{ÔWC B \Ï)Cf¦RC{ÔWC B \Ï)Cf¦RC{ÔWC ÿÿÿÿB \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC \ No newline at end of file diff --git a/xml_converter/intigration_tests/expected_outputs/xml_map_id/xml_file.xml b/xml_converter/intigration_tests/expected_outputs/xml_map_id/xml_file.xml index f2817b38..7cd7d10b 100644 --- a/xml_converter/intigration_tests/expected_outputs/xml_map_id/xml_file.xml +++ b/xml_converter/intigration_tests/expected_outputs/xml_map_id/xml_file.xml @@ -7,7 +7,6 @@ -
diff --git a/xml_converter/intigration_tests/inputs/xml_map_id/xml_file.xml b/xml_converter/intigration_tests/inputs/xml_map_id/xml_file.xml index 17b43b07..f6849931 100644 --- a/xml_converter/intigration_tests/inputs/xml_map_id/xml_file.xml +++ b/xml_converter/intigration_tests/inputs/xml_map_id/xml_file.xml @@ -7,7 +7,6 @@ -
\ No newline at end of file From ce9c882d2a721409957c969dc5e5addfac9abe45 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 13 Nov 2023 23:15:29 -0500 Subject: [PATCH 333/539] Add tests for map type filters --- .../proto_map_type_filter/markers.bin | 3 +++ .../xml_map_type_filter/xml_file.xml | 12 ++++++++++++ .../inputs/xml_map_type_filter/xml_file.xml | 12 ++++++++++++ xml_converter/intigration_tests/testcases.py | 6 ++++++ 4 files changed, 33 insertions(+) create mode 100644 xml_converter/intigration_tests/expected_outputs/proto_map_type_filter/markers.bin create mode 100644 xml_converter/intigration_tests/expected_outputs/xml_map_type_filter/xml_file.xml create mode 100644 xml_converter/intigration_tests/inputs/xml_map_type_filter/xml_file.xml diff --git a/xml_converter/intigration_tests/expected_outputs/proto_map_type_filter/markers.bin b/xml_converter/intigration_tests/expected_outputs/proto_map_type_filter/markers.bin new file mode 100644 index 00000000..416391e4 --- /dev/null +++ b/xml_converter/intigration_tests/expected_outputs/proto_map_type_filter/markers.bin @@ -0,0 +1,3 @@ + +Ì + My Category 2B \Ï)Cf¦RC{ÔWCâ 2B \Ï)Cf¦RC{ÔWCâ 2B \Ï)Cf¦RC{ÔWCâ 2B \Ï)Cf¦RC{ÔWCâO 2B \Ï)Cf¦RC{ÔWCâ9 (08@HPX`hpx€ˆ˜ ¨°¸À \ No newline at end of file diff --git a/xml_converter/intigration_tests/expected_outputs/xml_map_type_filter/xml_file.xml b/xml_converter/intigration_tests/expected_outputs/xml_map_type_filter/xml_file.xml new file mode 100644 index 00000000..41115909 --- /dev/null +++ b/xml_converter/intigration_tests/expected_outputs/xml_map_type_filter/xml_file.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/xml_converter/intigration_tests/inputs/xml_map_type_filter/xml_file.xml b/xml_converter/intigration_tests/inputs/xml_map_type_filter/xml_file.xml new file mode 100644 index 00000000..413af6f6 --- /dev/null +++ b/xml_converter/intigration_tests/inputs/xml_map_type_filter/xml_file.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/xml_converter/intigration_tests/testcases.py b/xml_converter/intigration_tests/testcases.py index 0b3ffca4..9a276964 100644 --- a/xml_converter/intigration_tests/testcases.py +++ b/xml_converter/intigration_tests/testcases.py @@ -90,4 +90,10 @@ class Testcase: expected_output_xml_path="./expected_outputs/xml_festival_filter", expected_output_proto_path="./expected_outputs/proto_festival_filter", ), + Testcase( + name="map_type_filter", + xml_input_paths=["./inputs/xml_map_type_filter"], + expected_output_xml_path="./expected_outputs/xml_map_type_filter", + expected_output_proto_path="./expected_outputs/proto_map_type_filter", + ) ] From 297acf72797abec983daf79f510920e5858630a9 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 13 Nov 2023 23:34:49 -0500 Subject: [PATCH 334/539] Added tests for profession filter --- .../proto_profession_filter/markers.bin | 3 +++ .../xml_profession_filter/xml_file.xml | 12 ++++++++++++ .../inputs/xml_profession_filter/xml_file.xml | 12 ++++++++++++ xml_converter/intigration_tests/testcases.py | 6 ++++++ 4 files changed, 33 insertions(+) create mode 100644 xml_converter/intigration_tests/expected_outputs/proto_profession_filter/markers.bin create mode 100644 xml_converter/intigration_tests/expected_outputs/xml_profession_filter/xml_file.xml create mode 100644 xml_converter/intigration_tests/inputs/xml_profession_filter/xml_file.xml diff --git a/xml_converter/intigration_tests/expected_outputs/proto_profession_filter/markers.bin b/xml_converter/intigration_tests/expected_outputs/proto_profession_filter/markers.bin new file mode 100644 index 00000000..0847dc80 --- /dev/null +++ b/xml_converter/intigration_tests/expected_outputs/proto_profession_filter/markers.bin @@ -0,0 +1,3 @@ + +¥ + My Category 2B \Ï)Cf¦RC{ÔWCò 2B \Ï)Cf¦RC{ÔWCò 2B \Ï)Cf¦RC{ÔWCò 2B \Ï)Cf¦RC{ÔWCò( 2B \Ï)Cf¦RC{ÔWCò (08@H \ No newline at end of file diff --git a/xml_converter/intigration_tests/expected_outputs/xml_profession_filter/xml_file.xml b/xml_converter/intigration_tests/expected_outputs/xml_profession_filter/xml_file.xml new file mode 100644 index 00000000..ecf54043 --- /dev/null +++ b/xml_converter/intigration_tests/expected_outputs/xml_profession_filter/xml_file.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/xml_converter/intigration_tests/inputs/xml_profession_filter/xml_file.xml b/xml_converter/intigration_tests/inputs/xml_profession_filter/xml_file.xml new file mode 100644 index 00000000..b81626c2 --- /dev/null +++ b/xml_converter/intigration_tests/inputs/xml_profession_filter/xml_file.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/xml_converter/intigration_tests/testcases.py b/xml_converter/intigration_tests/testcases.py index 0b3ffca4..f46a1854 100644 --- a/xml_converter/intigration_tests/testcases.py +++ b/xml_converter/intigration_tests/testcases.py @@ -90,4 +90,10 @@ class Testcase: expected_output_xml_path="./expected_outputs/xml_festival_filter", expected_output_proto_path="./expected_outputs/proto_festival_filter", ), + Testcase( + name="profession_filter", + xml_input_paths=["./inputs/xml_profession_filter"], + expected_output_xml_path="./expected_outputs/xml_profession_filter", + expected_output_proto_path="./expected_outputs/proto_profession_filter", + ), ] From 7e79405d3e1381d01505f5d2eac33c6ca28348c3 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 13 Nov 2023 23:38:21 -0500 Subject: [PATCH 335/539] Added trailing new line --- .../intigration_tests/inputs/xml_profession_filter/xml_file.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml_converter/intigration_tests/inputs/xml_profession_filter/xml_file.xml b/xml_converter/intigration_tests/inputs/xml_profession_filter/xml_file.xml index b81626c2..4217ba20 100644 --- a/xml_converter/intigration_tests/inputs/xml_profession_filter/xml_file.xml +++ b/xml_converter/intigration_tests/inputs/xml_profession_filter/xml_file.xml @@ -9,4 +9,4 @@ - \ No newline at end of file + From df22e1d51642d10e2d288721c178c38cdc45e8c0 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Tue, 14 Nov 2023 19:14:47 -0500 Subject: [PATCH 336/539] Added tests for specialization filters --- .../proto_specialization_filter/markers.bin | 3 +++ .../xml_specialization_filter/xml_file.xml | 13 +++++++++++++ .../inputs/xml_specialization_filter/xml_file.xml | 13 +++++++++++++ xml_converter/intigration_tests/testcases.py | 6 ++++++ 4 files changed, 35 insertions(+) create mode 100644 xml_converter/intigration_tests/expected_outputs/proto_specialization_filter/markers.bin create mode 100644 xml_converter/intigration_tests/expected_outputs/xml_specialization_filter/xml_file.xml create mode 100644 xml_converter/intigration_tests/inputs/xml_specialization_filter/xml_file.xml diff --git a/xml_converter/intigration_tests/expected_outputs/proto_specialization_filter/markers.bin b/xml_converter/intigration_tests/expected_outputs/proto_specialization_filter/markers.bin new file mode 100644 index 00000000..8fdc192e --- /dev/null +++ b/xml_converter/intigration_tests/expected_outputs/proto_specialization_filter/markers.bin @@ -0,0 +1,3 @@ + +» + My Category 2B \Ï)Cf¦RC{ÔWCú` 2B \Ï)Cf¦RC{ÔWCúH 2B \Ï)Cf¦RC{ÔWCúX 2B \Ï)Cf¦RC{ÔWCú¨Øà 2B \Ï)Cf¦RC{ÔWCúÉ (08@HPX`hpx€ˆ˜ ¨°¸ÀÈÐØàèðø€ˆ˜ ¨°¸ÀÈÐØàèðø€ˆ˜ ¨°¸ÀÈÐØàèðø€ˆ˜ ¨°¸ÀX 2B \Ï)Cf¦RC{ÔWCúB (08@HPX`hpx€ˆ˜ ¨°¸ÀÈÐØ \ No newline at end of file diff --git a/xml_converter/intigration_tests/expected_outputs/xml_specialization_filter/xml_file.xml b/xml_converter/intigration_tests/expected_outputs/xml_specialization_filter/xml_file.xml new file mode 100644 index 00000000..05f8f905 --- /dev/null +++ b/xml_converter/intigration_tests/expected_outputs/xml_specialization_filter/xml_file.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/xml_converter/intigration_tests/inputs/xml_specialization_filter/xml_file.xml b/xml_converter/intigration_tests/inputs/xml_specialization_filter/xml_file.xml new file mode 100644 index 00000000..786e3873 --- /dev/null +++ b/xml_converter/intigration_tests/inputs/xml_specialization_filter/xml_file.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/xml_converter/intigration_tests/testcases.py b/xml_converter/intigration_tests/testcases.py index 361346c0..fc9d3a2b 100644 --- a/xml_converter/intigration_tests/testcases.py +++ b/xml_converter/intigration_tests/testcases.py @@ -114,4 +114,10 @@ class Testcase: expected_output_xml_path="./expected_outputs/xml_profession_filter", expected_output_proto_path="./expected_outputs/proto_profession_filter", ), + Testcase( + name="specialization_filter", + xml_input_paths=["./inputs/xml_specialization_filter"], + expected_output_xml_path="./expected_outputs/xml_specialization_filter", + expected_output_proto_path="./expected_outputs/proto_specialization_filter", + ), ] From 2fe5a1d87e7dbb6a1b28ed0f0a0dca8d977945b3 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Tue, 14 Nov 2023 19:25:16 -0500 Subject: [PATCH 337/539] Added tests for species filter --- .../proto_species_filter/markers.bin | 5 +++++ .../xml_species_filter/xml_file.xml | 17 +++++++++++++++++ .../inputs/xml_species_filter/xml_file.xml | 17 +++++++++++++++++ xml_converter/intigration_tests/testcases.py | 6 ++++++ 4 files changed, 45 insertions(+) create mode 100644 xml_converter/intigration_tests/expected_outputs/proto_species_filter/markers.bin create mode 100644 xml_converter/intigration_tests/expected_outputs/xml_species_filter/xml_file.xml create mode 100644 xml_converter/intigration_tests/inputs/xml_species_filter/xml_file.xml diff --git a/xml_converter/intigration_tests/expected_outputs/proto_species_filter/markers.bin b/xml_converter/intigration_tests/expected_outputs/proto_species_filter/markers.bin new file mode 100644 index 00000000..15f18c1b --- /dev/null +++ b/xml_converter/intigration_tests/expected_outputs/proto_species_filter/markers.bin @@ -0,0 +1,5 @@ + +­ + My Category 2B \Ï)Cf¦RC{ÔWC‚ 2B \Ï)Cf¦RC{ÔWC‚ 2B \Ï)Cf¦RC{ÔWC‚ 2B \Ï)Cf¦RC{ÔWC‚  2B \Ï)Cf¦RC{ÔWC‚ + ( 2B \Ï)Cf¦RC{ÔWC‚ 2B \Ï)Cf¦RC{ÔWC‚ 2B \Ï)Cf¦RC{ÔWC‚ 2B \Ï)Cf¦RC{ÔWC‚  2B \Ï)Cf¦RC{ÔWC‚ + ( \ No newline at end of file diff --git a/xml_converter/intigration_tests/expected_outputs/xml_species_filter/xml_file.xml b/xml_converter/intigration_tests/expected_outputs/xml_species_filter/xml_file.xml new file mode 100644 index 00000000..b2719c10 --- /dev/null +++ b/xml_converter/intigration_tests/expected_outputs/xml_species_filter/xml_file.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/xml_converter/intigration_tests/inputs/xml_species_filter/xml_file.xml b/xml_converter/intigration_tests/inputs/xml_species_filter/xml_file.xml new file mode 100644 index 00000000..39309422 --- /dev/null +++ b/xml_converter/intigration_tests/inputs/xml_species_filter/xml_file.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/xml_converter/intigration_tests/testcases.py b/xml_converter/intigration_tests/testcases.py index fc9d3a2b..fdcae723 100644 --- a/xml_converter/intigration_tests/testcases.py +++ b/xml_converter/intigration_tests/testcases.py @@ -120,4 +120,10 @@ class Testcase: expected_output_xml_path="./expected_outputs/xml_specialization_filter", expected_output_proto_path="./expected_outputs/proto_specialization_filter", ), + Testcase( + name="species_filter", + xml_input_paths=["./inputs/xml_species_filter"], + expected_output_xml_path="./expected_outputs/xml_species_filter", + expected_output_proto_path="./expected_outputs/proto_species_filter", + ), ] From 3a912d0e607e13d4f21d8c8d011101f1dd1f7dbe Mon Sep 17 00:00:00 2001 From: klingbolt Date: Tue, 14 Nov 2023 19:34:51 -0500 Subject: [PATCH 338/539] Added tests for Cull Chirality --- .../expected_outputs/proto_cull_chirality/markers.bin | 3 +++ .../expected_outputs/xml_cull_chirality/xml_file.xml | 10 ++++++++++ .../inputs/xml_cull_chirality/xml_file.xml | 10 ++++++++++ xml_converter/intigration_tests/testcases.py | 6 ++++++ 4 files changed, 29 insertions(+) create mode 100644 xml_converter/intigration_tests/expected_outputs/proto_cull_chirality/markers.bin create mode 100644 xml_converter/intigration_tests/expected_outputs/xml_cull_chirality/xml_file.xml create mode 100644 xml_converter/intigration_tests/inputs/xml_cull_chirality/xml_file.xml diff --git a/xml_converter/intigration_tests/expected_outputs/proto_cull_chirality/markers.bin b/xml_converter/intigration_tests/expected_outputs/proto_cull_chirality/markers.bin new file mode 100644 index 00000000..0c984e70 --- /dev/null +++ b/xml_converter/intigration_tests/expected_outputs/proto_cull_chirality/markers.bin @@ -0,0 +1,3 @@ + +R + My Category 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWCˆ 2B \Ï)Cf¦RC{ÔWCˆ \ No newline at end of file diff --git a/xml_converter/intigration_tests/expected_outputs/xml_cull_chirality/xml_file.xml b/xml_converter/intigration_tests/expected_outputs/xml_cull_chirality/xml_file.xml new file mode 100644 index 00000000..d9a87c98 --- /dev/null +++ b/xml_converter/intigration_tests/expected_outputs/xml_cull_chirality/xml_file.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/xml_converter/intigration_tests/inputs/xml_cull_chirality/xml_file.xml b/xml_converter/intigration_tests/inputs/xml_cull_chirality/xml_file.xml new file mode 100644 index 00000000..9c7ce370 --- /dev/null +++ b/xml_converter/intigration_tests/inputs/xml_cull_chirality/xml_file.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/xml_converter/intigration_tests/testcases.py b/xml_converter/intigration_tests/testcases.py index 361346c0..7fd38307 100644 --- a/xml_converter/intigration_tests/testcases.py +++ b/xml_converter/intigration_tests/testcases.py @@ -114,4 +114,10 @@ class Testcase: expected_output_xml_path="./expected_outputs/xml_profession_filter", expected_output_proto_path="./expected_outputs/proto_profession_filter", ), + Testcase( + name="cull_chirality", + xml_input_paths=["./inputs/xml_cull_chirality"], + expected_output_xml_path="./expected_outputs/xml_cull_chirality", + expected_output_proto_path="./expected_outputs/proto_cull_chirality", + ), ] From 40218c6381ef2bceac901f6f5243460da5ab6533 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Tue, 14 Nov 2023 20:26:38 -0500 Subject: [PATCH 339/539] Added XML tests for Animation Speed --- .../xml_animation_speed/xml_file.xml | 13 +++++++++++++ .../inputs/xml_animation_speed/xml_file.xml | 13 +++++++++++++ xml_converter/intigration_tests/testcases.py | 6 ++++++ 3 files changed, 32 insertions(+) create mode 100644 xml_converter/intigration_tests/expected_outputs/xml_animation_speed/xml_file.xml create mode 100644 xml_converter/intigration_tests/inputs/xml_animation_speed/xml_file.xml diff --git a/xml_converter/intigration_tests/expected_outputs/xml_animation_speed/xml_file.xml b/xml_converter/intigration_tests/expected_outputs/xml_animation_speed/xml_file.xml new file mode 100644 index 00000000..72c010f9 --- /dev/null +++ b/xml_converter/intigration_tests/expected_outputs/xml_animation_speed/xml_file.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/xml_converter/intigration_tests/inputs/xml_animation_speed/xml_file.xml b/xml_converter/intigration_tests/inputs/xml_animation_speed/xml_file.xml new file mode 100644 index 00000000..57ae603f --- /dev/null +++ b/xml_converter/intigration_tests/inputs/xml_animation_speed/xml_file.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/xml_converter/intigration_tests/testcases.py b/xml_converter/intigration_tests/testcases.py index 361346c0..a0df52f7 100644 --- a/xml_converter/intigration_tests/testcases.py +++ b/xml_converter/intigration_tests/testcases.py @@ -114,4 +114,10 @@ class Testcase: expected_output_xml_path="./expected_outputs/xml_profession_filter", expected_output_proto_path="./expected_outputs/proto_profession_filter", ), + Testcase( + name="animation_speed", + xml_input_paths=["./inputs/xml_animation_speed"], + expected_output_xml_path="./expected_outputs/xml_animation_speed", + ), + ] From 27dc27866c827852d495d9c7341f27fbd37e0dd1 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Tue, 14 Nov 2023 20:27:43 -0500 Subject: [PATCH 340/539] added trailing newline --- .../intigration_tests/inputs/xml_animation_speed/xml_file.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml_converter/intigration_tests/inputs/xml_animation_speed/xml_file.xml b/xml_converter/intigration_tests/inputs/xml_animation_speed/xml_file.xml index 57ae603f..cebb55cc 100644 --- a/xml_converter/intigration_tests/inputs/xml_animation_speed/xml_file.xml +++ b/xml_converter/intigration_tests/inputs/xml_animation_speed/xml_file.xml @@ -10,4 +10,4 @@ - \ No newline at end of file + From 240efda057cba2127cd84e03ecfd3bb44c94540c Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Wed, 15 Nov 2023 13:25:57 -0600 Subject: [PATCH 341/539] adding protobin difftool to github actions --- .github/workflows/diff_protobin.yml | 83 +++++++++++++++++++ .../proto_festival_filter/markers.bin | 4 +- .../xml_festival_filter/xml_file.xml | 2 + .../inputs/xml_festival_filter/xml_file.xml | 2 + 4 files changed, 89 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/diff_protobin.yml diff --git a/.github/workflows/diff_protobin.yml b/.github/workflows/diff_protobin.yml new file mode 100644 index 00000000..d9c14452 --- /dev/null +++ b/.github/workflows/diff_protobin.yml @@ -0,0 +1,83 @@ +name: Diff Protobin + +on: + pull_request: + paths: + - '**/*.bin' +jobs: + custom-diff: + runs-on: ubuntu-latest + permissions: write-all + steps: + - name: Checkout Code + uses: actions/checkout@v2 + + - name: Install ProtoC + run: sudo apt-get install -y protobuf-compiler + + - name: Fetch PR commits + run: | + git fetch origin +refs/pull/${{ github.event.pull_request.number }}/head:refs/pull/${{ github.event.pull_request.number }}/head + git fetch origin ${{ github.base_ref }} + git fetch origin ${{ github.head_ref }} + + - name: Get Filenames + run: | + for file in $(git diff --name-only origin/${{ github.base_ref }}...origin/${{ github.head_ref }} | grep '.bin$'); do + if [ -n "$(git ls-tree "origin/${{ github.base_ref }}" -- "$file")" ]; then + git show origin/${{ github.base_ref }}:$file > $file._old + protoc --decode=waypoint.Waypoint xml_converter/proto/waypoint.proto < $file._old > $file._old._textproto + else + touch $file._old._textproto + fi + protoc --decode=waypoint.Waypoint xml_converter/proto/waypoint.proto < $file > $file._textproto + diff -u $file._old._textproto $file._textproto > $file._diff || true + echo $file >> file_list.txt + done + + - name: Get PR commit hash + id: prcommithash + run: | + PR_COMMIT_HASH=$(git log --format="%H" -n 1 refs/pull/${{ github.event.pull_request.number }}/head) + echo "Latest PR Commit Hash: $PR_COMMIT_HASH" + echo "pr_commit_hash="$PR_COMMIT_HASH >> $GITHUB_OUTPUT + + - name: Post Comment + if: always() + uses: actions/github-script@v7 + with: + script: | + const fs = require('fs'); + const path = require('path'); + + const issue_number = context.issue.number; + const githubToken = process.env.GITHUB_TOKEN; + + const files = fs.readFileSync('file_list.txt', 'utf8').split("\n"); + + for (let file of files) { + if (file == "") { + continue; + } + const diff_contents = fs.readFileSync(file + "._diff", 'utf8') + let comment_body = [ + "
", + "Full Diff", + "", + "```diff", + diff_contents, + "```", + "
", + ].join("\n"); + + + await github.rest.pulls.createReviewComment({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: issue_number, + path: file, + body: comment_body, + commit_id: '${{ steps.prcommithash.outputs.pr_commit_hash }}', + subject_type: "file", + }); + } diff --git a/xml_converter/intigration_tests/expected_outputs/proto_festival_filter/markers.bin b/xml_converter/intigration_tests/expected_outputs/proto_festival_filter/markers.bin index 0b474b0b..57f60e15 100644 --- a/xml_converter/intigration_tests/expected_outputs/proto_festival_filter/markers.bin +++ b/xml_converter/intigration_tests/expected_outputs/proto_festival_filter/markers.bin @@ -1,3 +1,3 @@ -E - My Category 2B \Ï)Cf¦RC{ÔWCÚ 2B \Ï)Cf¦RC{ÔWCÚ  \ No newline at end of file +y + My Category 2B \Ï)Cf¦RC{ÔWCÚ 2B \Ï)Cf¦RC{ÔWCÚ( 2B \Ï)Cf¦RC{ÔWCÚ( 2B \Ï)Cf¦RC{ÔWCÚ  \ No newline at end of file diff --git a/xml_converter/intigration_tests/expected_outputs/xml_festival_filter/xml_file.xml b/xml_converter/intigration_tests/expected_outputs/xml_festival_filter/xml_file.xml index 73943165..23d92fd3 100644 --- a/xml_converter/intigration_tests/expected_outputs/xml_festival_filter/xml_file.xml +++ b/xml_converter/intigration_tests/expected_outputs/xml_festival_filter/xml_file.xml @@ -4,6 +4,8 @@ + + diff --git a/xml_converter/intigration_tests/inputs/xml_festival_filter/xml_file.xml b/xml_converter/intigration_tests/inputs/xml_festival_filter/xml_file.xml index c193203c..92df724c 100644 --- a/xml_converter/intigration_tests/inputs/xml_festival_filter/xml_file.xml +++ b/xml_converter/intigration_tests/inputs/xml_festival_filter/xml_file.xml @@ -4,6 +4,8 @@ + + From 9b55b55e648f28265a674f57bf47abb210f7d1c8 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Wed, 15 Nov 2023 13:31:52 -0600 Subject: [PATCH 342/539] debugging the file variable --- .github/workflows/diff_protobin.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/diff_protobin.yml b/.github/workflows/diff_protobin.yml index d9c14452..54e98696 100644 --- a/.github/workflows/diff_protobin.yml +++ b/.github/workflows/diff_protobin.yml @@ -70,6 +70,7 @@ jobs: "", ].join("\n"); + console.log(file) await github.rest.pulls.createReviewComment({ owner: context.repo.owner, From f79ba290b1c1ca15ecb615114e44568dc1edf339 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Wed, 15 Nov 2023 13:44:15 -0600 Subject: [PATCH 343/539] switching download target to github as tuxfamily has an expired ssl cert --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 41cafad9..869837f0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -165,7 +165,7 @@ jobs: - name: Download Godot # if: steps.cache-godot.outputs.cache-hit != 'true' run: | - wget -q https://downloads.tuxfamily.org/godotengine/${GODOT_VERSION}/Godot_v${GODOT_VERSION}-stable_linux_headless.64.zip + wget -q https://github.com/godotengine/godot/releases/download/${GODOT_VERSION}-stable/Godot_v${GODOT_VERSION}-stable_linux_headless.64.zip unzip Godot_v${GODOT_VERSION}-stable_linux_headless.64.zip rm Godot_v${GODOT_VERSION}-stable_linux_headless.64.zip @@ -183,7 +183,7 @@ jobs: run: | mkdir -v -p ~/.local/share/godot/templates/${GODOT_VERSION}.stable/ - wget -q https://downloads.tuxfamily.org/godotengine/${GODOT_VERSION}/Godot_v${GODOT_VERSION}-stable_export_templates.tpz + wget -q https://github.com/godotengine/godot/releases/download/${GODOT_VERSION}-stable/Godot_v${GODOT_VERSION}-stable_export_templates.tpz unzip Godot_v${GODOT_VERSION}-stable_export_templates.tpz mv templates/* ~/.local/share/godot/templates/${GODOT_VERSION}.stable/ From 78ebe53887bf8e5910e7f2b2b30cf857e3e020fa Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Mon, 13 Nov 2023 00:04:53 -0600 Subject: [PATCH 344/539] renaming xml parse state to xml read state --- .../generators/cpp_templates/attribute_template.hpp | 4 ++-- .../cpp_templates/attribute_template_compoundvalue.cpp | 2 +- .../generators/cpp_templates/attribute_template_enum.cpp | 2 +- .../cpp_templates/attribute_template_multiflagvalue.cpp | 2 +- xml_converter/generators/cpp_templates/class_template.cpp | 4 ++-- xml_converter/generators/cpp_templates/class_template.hpp | 4 ++-- xml_converter/generators/generate_cpp.py | 2 +- xml_converter/src/attribute/bool.cpp | 4 ++-- xml_converter/src/attribute/bool.hpp | 6 +++--- xml_converter/src/attribute/color.cpp | 2 +- xml_converter/src/attribute/color.hpp | 4 ++-- xml_converter/src/attribute/cull_chirality_gen.cpp | 2 +- xml_converter/src/attribute/cull_chirality_gen.hpp | 4 ++-- xml_converter/src/attribute/euler_rotation_gen.cpp | 2 +- xml_converter/src/attribute/euler_rotation_gen.hpp | 4 ++-- xml_converter/src/attribute/festival_filter_gen.cpp | 2 +- xml_converter/src/attribute/festival_filter_gen.hpp | 4 ++-- xml_converter/src/attribute/float.cpp | 2 +- xml_converter/src/attribute/float.hpp | 4 ++-- xml_converter/src/attribute/image.cpp | 2 +- xml_converter/src/attribute/image.hpp | 4 ++-- xml_converter/src/attribute/int.cpp | 2 +- xml_converter/src/attribute/int.hpp | 4 ++-- xml_converter/src/attribute/map_type_filter_gen.cpp | 2 +- xml_converter/src/attribute/map_type_filter_gen.hpp | 4 ++-- xml_converter/src/attribute/marker_category.cpp | 2 +- xml_converter/src/attribute/marker_category.hpp | 4 ++-- xml_converter/src/attribute/mount_filter_gen.cpp | 2 +- xml_converter/src/attribute/mount_filter_gen.hpp | 4 ++-- xml_converter/src/attribute/position_gen.cpp | 2 +- xml_converter/src/attribute/position_gen.hpp | 4 ++-- xml_converter/src/attribute/profession_filter_gen.cpp | 2 +- xml_converter/src/attribute/profession_filter_gen.hpp | 4 ++-- xml_converter/src/attribute/reset_behavior_gen.cpp | 2 +- xml_converter/src/attribute/reset_behavior_gen.hpp | 4 ++-- xml_converter/src/attribute/specialization_filter_gen.cpp | 2 +- xml_converter/src/attribute/specialization_filter_gen.hpp | 4 ++-- xml_converter/src/attribute/species_filter_gen.cpp | 2 +- xml_converter/src/attribute/species_filter_gen.hpp | 4 ++-- xml_converter/src/attribute/string.cpp | 2 +- xml_converter/src/attribute/string.hpp | 4 ++-- xml_converter/src/attribute/trail_data.cpp | 2 +- xml_converter/src/attribute/trail_data.hpp | 4 ++-- xml_converter/src/attribute/unique_id.cpp | 2 +- xml_converter/src/attribute/unique_id.hpp | 4 ++-- xml_converter/src/category_gen.cpp | 4 ++-- xml_converter/src/category_gen.hpp | 6 +++--- xml_converter/src/icon_gen.cpp | 2 +- xml_converter/src/icon_gen.hpp | 4 ++-- xml_converter/src/packaging_xml.cpp | 4 ++-- xml_converter/src/packaging_xml.hpp | 2 +- xml_converter/src/parseable.cpp | 4 ++-- xml_converter/src/parseable.hpp | 6 +++--- .../{xml_parse_state.hpp => xml_reader_state.hpp} | 2 +- xml_converter/src/trail_gen.cpp | 2 +- xml_converter/src/trail_gen.hpp | 4 ++-- 56 files changed, 89 insertions(+), 89 deletions(-) rename xml_converter/src/state_structs/{xml_parse_state.hpp => xml_reader_state.hpp} (86%) diff --git a/xml_converter/generators/cpp_templates/attribute_template.hpp b/xml_converter/generators/cpp_templates/attribute_template.hpp index 71bdefa8..dbad2da0 100644 --- a/xml_converter/generators/cpp_templates/attribute_template.hpp +++ b/xml_converter/generators/cpp_templates/attribute_template.hpp @@ -5,7 +5,7 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" -#include "../state_structs/xml_parse_state.hpp" +#include "../state_structs/xml_reader_state.hpp" {% if type == "Enum" %} #include "waypoint.pb.h" @@ -35,7 +35,7 @@ void xml_attribute_to_{{attribute_name}}( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLParseState* state, + XMLReaderState* state, {{class_name}}* value, bool* is_set); diff --git a/xml_converter/generators/cpp_templates/attribute_template_compoundvalue.cpp b/xml_converter/generators/cpp_templates/attribute_template_compoundvalue.cpp index 71c606a5..83829cfc 100644 --- a/xml_converter/generators/cpp_templates/attribute_template_compoundvalue.cpp +++ b/xml_converter/generators/cpp_templates/attribute_template_compoundvalue.cpp @@ -14,7 +14,7 @@ using namespace std; void xml_attribute_to_{{attribute_name}}( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLParseState* state, + XMLReaderState* state, {{class_name}}* value, bool* is_set) { {{class_name}} {{attribute_name}}; diff --git a/xml_converter/generators/cpp_templates/attribute_template_enum.cpp b/xml_converter/generators/cpp_templates/attribute_template_enum.cpp index 91fe3dcd..092dc910 100644 --- a/xml_converter/generators/cpp_templates/attribute_template_enum.cpp +++ b/xml_converter/generators/cpp_templates/attribute_template_enum.cpp @@ -15,7 +15,7 @@ using namespace std; void xml_attribute_to_{{attribute_name}}( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLParseState* state, + XMLReaderState* state, {{class_name}}* value, bool* is_set) { {{class_name}} {{attribute_name}}; diff --git a/xml_converter/generators/cpp_templates/attribute_template_multiflagvalue.cpp b/xml_converter/generators/cpp_templates/attribute_template_multiflagvalue.cpp index ff532c90..793f3c57 100644 --- a/xml_converter/generators/cpp_templates/attribute_template_multiflagvalue.cpp +++ b/xml_converter/generators/cpp_templates/attribute_template_multiflagvalue.cpp @@ -15,7 +15,7 @@ using namespace std; void xml_attribute_to_{{attribute_name}}( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLParseState* state, + XMLReaderState* state, {{class_name}}* value, bool* is_set) { {{class_name}} {{attribute_name}}; diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index 7dcd5716..3ca00cd8 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -18,7 +18,7 @@ string {{cpp_class}}::classname() { return "{{xml_class_name}}"; } {% if cpp_class == "Category": %} - void {{cpp_class}}::init_from_xml(rapidxml::xml_node<>* node, vector* errors, XMLParseState* state) { + void {{cpp_class}}::init_from_xml(rapidxml::xml_node<>* node, vector* errors, XMLReaderState* state) { for (rapidxml::xml_attribute<>* attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()) { bool is_icon_value = this->default_icon.init_xml_attribute(attribute, errors, state); bool is_trail_value = this->default_trail.init_xml_attribute(attribute, errors, state); @@ -34,7 +34,7 @@ string {{cpp_class}}::classname() { } {% endif %} -bool {{cpp_class}}::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector* errors, XMLParseState* state) { +bool {{cpp_class}}::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector* errors, XMLReaderState* state) { string attributename; attributename = normalize(get_attribute_name(attribute)); {% for n, attribute_variable in enumerate(attribute_variables) %} diff --git a/xml_converter/generators/cpp_templates/class_template.hpp b/xml_converter/generators/cpp_templates/class_template.hpp index b5db4eab..c132d3e6 100644 --- a/xml_converter/generators/cpp_templates/class_template.hpp +++ b/xml_converter/generators/cpp_templates/class_template.hpp @@ -29,11 +29,11 @@ class {{cpp_class}} : public Parseable { Icon default_icon; Trail default_trail; - void init_from_xml(rapidxml::xml_node<>* node, std::vector* errors, XMLParseState* state); + void init_from_xml(rapidxml::xml_node<>* node, std::vector* errors, XMLReaderState* state); {% endif %} virtual std::vector as_xml() const; virtual std::string classname(); - bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, XMLParseState* state); + bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, XMLReaderState* state); waypoint::{{cpp_class}} as_protobuf() const; void parse_protobuf(waypoint::{{cpp_class}} proto_{{cpp_class_header}}); {% if attributes_of_type_marker_category %} diff --git a/xml_converter/generators/generate_cpp.py b/xml_converter/generators/generate_cpp.py index abf01c0e..a0d6c44b 100644 --- a/xml_converter/generators/generate_cpp.py +++ b/xml_converter/generators/generate_cpp.py @@ -220,7 +220,7 @@ def generate_cpp_variable_data( cpp_includes.hpp_relative_includes.add("rapidxml-1.13/rapidxml.hpp") cpp_includes.hpp_relative_includes.add("parseable.hpp") cpp_includes.hpp_relative_includes.add("waypoint.pb.h") - cpp_includes.hpp_relative_includes.add("state_structs/xml_parse_state.hpp") + cpp_includes.hpp_relative_includes.add("state_structs/xml_reader_state.hpp") cpp_includes.hpp_forward_declarations.add("XMLError") cpp_includes.cpp_absolute_includes.add("iosfwd") diff --git a/xml_converter/src/attribute/bool.cpp b/xml_converter/src/attribute/bool.cpp index afdc2199..1ed2b8de 100644 --- a/xml_converter/src/attribute/bool.cpp +++ b/xml_converter/src/attribute/bool.cpp @@ -19,7 +19,7 @@ using namespace std; void xml_attribute_to_bool( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLParseState* state, + XMLReaderState* state, bool* value, bool* is_set) { if (get_attribute_value(input) == "0" || get_attribute_value(input) == "false") { @@ -59,7 +59,7 @@ string bool_to_xml_attribute(const string& attribute_name, const bool* value) { void inverted_xml_attribute_to_bool( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLParseState* state, + XMLReaderState* state, bool* value, bool* is_set) { if (get_attribute_value(input) == "0" || get_attribute_value(input) == "false") { diff --git a/xml_converter/src/attribute/bool.hpp b/xml_converter/src/attribute/bool.hpp index 7650ff59..7cb61169 100644 --- a/xml_converter/src/attribute/bool.hpp +++ b/xml_converter/src/attribute/bool.hpp @@ -5,14 +5,14 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" -#include "../state_structs/xml_parse_state.hpp" +#include "../state_structs/xml_reader_state.hpp" class XMLError; void xml_attribute_to_bool( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLParseState* state, + XMLReaderState* state, bool* value, bool* is_set); @@ -23,7 +23,7 @@ std::string bool_to_xml_attribute( void inverted_xml_attribute_to_bool( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLParseState* state, + XMLReaderState* state, bool* value, bool* is_set); diff --git a/xml_converter/src/attribute/color.cpp b/xml_converter/src/attribute/color.cpp index e566b984..3b42193d 100644 --- a/xml_converter/src/attribute/color.cpp +++ b/xml_converter/src/attribute/color.cpp @@ -51,7 +51,7 @@ int convert_color_channel_float_to_int(float input) { void xml_attribute_to_color( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLParseState* state, + XMLReaderState* state, Color* value, bool* is_set) { Color color; diff --git a/xml_converter/src/attribute/color.hpp b/xml_converter/src/attribute/color.hpp index d12db8a5..844935d6 100644 --- a/xml_converter/src/attribute/color.hpp +++ b/xml_converter/src/attribute/color.hpp @@ -5,7 +5,7 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" -#include "../state_structs/xml_parse_state.hpp" +#include "../state_structs/xml_reader_state.hpp" class XMLError; @@ -24,7 +24,7 @@ class Color { void xml_attribute_to_color( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLParseState* state, + XMLReaderState* state, Color* value, bool* is_set); diff --git a/xml_converter/src/attribute/cull_chirality_gen.cpp b/xml_converter/src/attribute/cull_chirality_gen.cpp index 5c3dc038..38910566 100644 --- a/xml_converter/src/attribute/cull_chirality_gen.cpp +++ b/xml_converter/src/attribute/cull_chirality_gen.cpp @@ -15,7 +15,7 @@ using namespace std; void xml_attribute_to_cull_chirality( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLParseState* state, + XMLReaderState* state, CullChirality* value, bool* is_set) { CullChirality cull_chirality; diff --git a/xml_converter/src/attribute/cull_chirality_gen.hpp b/xml_converter/src/attribute/cull_chirality_gen.hpp index d73806ed..fe8dde21 100644 --- a/xml_converter/src/attribute/cull_chirality_gen.hpp +++ b/xml_converter/src/attribute/cull_chirality_gen.hpp @@ -5,7 +5,7 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" -#include "../state_structs/xml_parse_state.hpp" +#include "../state_structs/xml_reader_state.hpp" #include "waypoint.pb.h" class XMLError; @@ -18,7 +18,7 @@ enum CullChirality { void xml_attribute_to_cull_chirality( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLParseState* state, + XMLReaderState* state, CullChirality* value, bool* is_set); diff --git a/xml_converter/src/attribute/euler_rotation_gen.cpp b/xml_converter/src/attribute/euler_rotation_gen.cpp index 4f4a1cb4..263f5c2e 100644 --- a/xml_converter/src/attribute/euler_rotation_gen.cpp +++ b/xml_converter/src/attribute/euler_rotation_gen.cpp @@ -14,7 +14,7 @@ using namespace std; void xml_attribute_to_euler_rotation( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLParseState* state, + XMLReaderState* state, EulerRotation* value, bool* is_set) { EulerRotation euler_rotation; diff --git a/xml_converter/src/attribute/euler_rotation_gen.hpp b/xml_converter/src/attribute/euler_rotation_gen.hpp index 89542d03..fab2216a 100644 --- a/xml_converter/src/attribute/euler_rotation_gen.hpp +++ b/xml_converter/src/attribute/euler_rotation_gen.hpp @@ -5,7 +5,7 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" -#include "../state_structs/xml_parse_state.hpp" +#include "../state_structs/xml_reader_state.hpp" class XMLError; namespace waypoint { @@ -25,7 +25,7 @@ class EulerRotation { void xml_attribute_to_euler_rotation( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLParseState* state, + XMLReaderState* state, EulerRotation* value, bool* is_set); diff --git a/xml_converter/src/attribute/festival_filter_gen.cpp b/xml_converter/src/attribute/festival_filter_gen.cpp index d80117c1..527985dc 100644 --- a/xml_converter/src/attribute/festival_filter_gen.cpp +++ b/xml_converter/src/attribute/festival_filter_gen.cpp @@ -15,7 +15,7 @@ using namespace std; void xml_attribute_to_festival_filter( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLParseState* state, + XMLReaderState* state, FestivalFilter* value, bool* is_set) { FestivalFilter festival_filter; diff --git a/xml_converter/src/attribute/festival_filter_gen.hpp b/xml_converter/src/attribute/festival_filter_gen.hpp index 87b125b6..bed11476 100644 --- a/xml_converter/src/attribute/festival_filter_gen.hpp +++ b/xml_converter/src/attribute/festival_filter_gen.hpp @@ -5,7 +5,7 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" -#include "../state_structs/xml_parse_state.hpp" +#include "../state_structs/xml_reader_state.hpp" class XMLError; namespace waypoint { @@ -29,7 +29,7 @@ class FestivalFilter { void xml_attribute_to_festival_filter( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLParseState* state, + XMLReaderState* state, FestivalFilter* value, bool* is_set); diff --git a/xml_converter/src/attribute/float.cpp b/xml_converter/src/attribute/float.cpp index 65a4c5d2..f6558fad 100644 --- a/xml_converter/src/attribute/float.cpp +++ b/xml_converter/src/attribute/float.cpp @@ -15,7 +15,7 @@ using namespace std; void xml_attribute_to_float( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLParseState* state, + XMLReaderState* state, float* value, bool* is_set) { *value = std::stof(get_attribute_value(input)); diff --git a/xml_converter/src/attribute/float.hpp b/xml_converter/src/attribute/float.hpp index b3da1bdf..5560ca64 100644 --- a/xml_converter/src/attribute/float.hpp +++ b/xml_converter/src/attribute/float.hpp @@ -5,14 +5,14 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" -#include "../state_structs/xml_parse_state.hpp" +#include "../state_structs/xml_reader_state.hpp" class XMLError; void xml_attribute_to_float( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLParseState* state, + XMLReaderState* state, float* value, bool* is_set); diff --git a/xml_converter/src/attribute/image.cpp b/xml_converter/src/attribute/image.cpp index 4093f654..469860ad 100644 --- a/xml_converter/src/attribute/image.cpp +++ b/xml_converter/src/attribute/image.cpp @@ -18,7 +18,7 @@ using namespace std; void xml_attribute_to_image( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLParseState* state, + XMLReaderState* state, Image* value, bool* is_set) { value->path = get_attribute_value(input); diff --git a/xml_converter/src/attribute/image.hpp b/xml_converter/src/attribute/image.hpp index 6185e521..66570760 100644 --- a/xml_converter/src/attribute/image.hpp +++ b/xml_converter/src/attribute/image.hpp @@ -5,7 +5,7 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" -#include "../state_structs/xml_parse_state.hpp" +#include "../state_structs/xml_reader_state.hpp" class XMLError; @@ -21,7 +21,7 @@ class Image { void xml_attribute_to_image( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLParseState* state, + XMLReaderState* state, Image* value, bool* is_set); diff --git a/xml_converter/src/attribute/int.cpp b/xml_converter/src/attribute/int.cpp index dac2416e..4bdf9424 100644 --- a/xml_converter/src/attribute/int.cpp +++ b/xml_converter/src/attribute/int.cpp @@ -19,7 +19,7 @@ using namespace std; void xml_attribute_to_int( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLParseState* state, + XMLReaderState* state, int* value, bool* is_set) { try { diff --git a/xml_converter/src/attribute/int.hpp b/xml_converter/src/attribute/int.hpp index cfc81162..b9b8e637 100644 --- a/xml_converter/src/attribute/int.hpp +++ b/xml_converter/src/attribute/int.hpp @@ -5,14 +5,14 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" -#include "../state_structs/xml_parse_state.hpp" +#include "../state_structs/xml_reader_state.hpp" class XMLError; void xml_attribute_to_int( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLParseState* state, + XMLReaderState* state, int* value, bool* is_set); diff --git a/xml_converter/src/attribute/map_type_filter_gen.cpp b/xml_converter/src/attribute/map_type_filter_gen.cpp index f8e4d40f..497bf6f6 100644 --- a/xml_converter/src/attribute/map_type_filter_gen.cpp +++ b/xml_converter/src/attribute/map_type_filter_gen.cpp @@ -15,7 +15,7 @@ using namespace std; void xml_attribute_to_map_type_filter( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLParseState* state, + XMLReaderState* state, MapTypeFilter* value, bool* is_set) { MapTypeFilter map_type_filter; diff --git a/xml_converter/src/attribute/map_type_filter_gen.hpp b/xml_converter/src/attribute/map_type_filter_gen.hpp index 4085f101..525c3470 100644 --- a/xml_converter/src/attribute/map_type_filter_gen.hpp +++ b/xml_converter/src/attribute/map_type_filter_gen.hpp @@ -5,7 +5,7 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" -#include "../state_structs/xml_parse_state.hpp" +#include "../state_structs/xml_reader_state.hpp" class XMLError; namespace waypoint { @@ -46,7 +46,7 @@ class MapTypeFilter { void xml_attribute_to_map_type_filter( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLParseState* state, + XMLReaderState* state, MapTypeFilter* value, bool* is_set); diff --git a/xml_converter/src/attribute/marker_category.cpp b/xml_converter/src/attribute/marker_category.cpp index 2756f42e..ace9a974 100644 --- a/xml_converter/src/attribute/marker_category.cpp +++ b/xml_converter/src/attribute/marker_category.cpp @@ -15,7 +15,7 @@ void xml_attribute_to_marker_category( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLParseState* state, + XMLReaderState* state, MarkerCategory* value, bool* is_set) { value->category = get_attribute_value(input); diff --git a/xml_converter/src/attribute/marker_category.hpp b/xml_converter/src/attribute/marker_category.hpp index fedc29b6..eed42161 100644 --- a/xml_converter/src/attribute/marker_category.hpp +++ b/xml_converter/src/attribute/marker_category.hpp @@ -5,7 +5,7 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" -#include "../state_structs/xml_parse_state.hpp" +#include "../state_structs/xml_reader_state.hpp" class XMLError; @@ -21,7 +21,7 @@ class MarkerCategory { void xml_attribute_to_marker_category( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLParseState* state, + XMLReaderState* state, MarkerCategory* value, bool* is_set); diff --git a/xml_converter/src/attribute/mount_filter_gen.cpp b/xml_converter/src/attribute/mount_filter_gen.cpp index 56434514..262854bc 100644 --- a/xml_converter/src/attribute/mount_filter_gen.cpp +++ b/xml_converter/src/attribute/mount_filter_gen.cpp @@ -15,7 +15,7 @@ using namespace std; void xml_attribute_to_mount_filter( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLParseState* state, + XMLReaderState* state, MountFilter* value, bool* is_set) { MountFilter mount_filter; diff --git a/xml_converter/src/attribute/mount_filter_gen.hpp b/xml_converter/src/attribute/mount_filter_gen.hpp index 3960b9a8..86726ffd 100644 --- a/xml_converter/src/attribute/mount_filter_gen.hpp +++ b/xml_converter/src/attribute/mount_filter_gen.hpp @@ -5,7 +5,7 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" -#include "../state_structs/xml_parse_state.hpp" +#include "../state_structs/xml_reader_state.hpp" class XMLError; namespace waypoint { @@ -32,7 +32,7 @@ class MountFilter { void xml_attribute_to_mount_filter( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLParseState* state, + XMLReaderState* state, MountFilter* value, bool* is_set); diff --git a/xml_converter/src/attribute/position_gen.cpp b/xml_converter/src/attribute/position_gen.cpp index 4101a286..e0455502 100644 --- a/xml_converter/src/attribute/position_gen.cpp +++ b/xml_converter/src/attribute/position_gen.cpp @@ -14,7 +14,7 @@ using namespace std; void xml_attribute_to_position( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLParseState* state, + XMLReaderState* state, Position* value, bool* is_set) { Position position; diff --git a/xml_converter/src/attribute/position_gen.hpp b/xml_converter/src/attribute/position_gen.hpp index e6bc2119..129ec7d4 100644 --- a/xml_converter/src/attribute/position_gen.hpp +++ b/xml_converter/src/attribute/position_gen.hpp @@ -5,7 +5,7 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" -#include "../state_structs/xml_parse_state.hpp" +#include "../state_structs/xml_reader_state.hpp" class XMLError; namespace waypoint { @@ -25,7 +25,7 @@ class Position { void xml_attribute_to_position( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLParseState* state, + XMLReaderState* state, Position* value, bool* is_set); diff --git a/xml_converter/src/attribute/profession_filter_gen.cpp b/xml_converter/src/attribute/profession_filter_gen.cpp index 68f4c2e8..3f3bf629 100644 --- a/xml_converter/src/attribute/profession_filter_gen.cpp +++ b/xml_converter/src/attribute/profession_filter_gen.cpp @@ -15,7 +15,7 @@ using namespace std; void xml_attribute_to_profession_filter( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLParseState* state, + XMLReaderState* state, ProfessionFilter* value, bool* is_set) { ProfessionFilter profession_filter; diff --git a/xml_converter/src/attribute/profession_filter_gen.hpp b/xml_converter/src/attribute/profession_filter_gen.hpp index b3a4f5f8..43bf8100 100644 --- a/xml_converter/src/attribute/profession_filter_gen.hpp +++ b/xml_converter/src/attribute/profession_filter_gen.hpp @@ -5,7 +5,7 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" -#include "../state_structs/xml_parse_state.hpp" +#include "../state_structs/xml_reader_state.hpp" class XMLError; namespace waypoint { @@ -31,7 +31,7 @@ class ProfessionFilter { void xml_attribute_to_profession_filter( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLParseState* state, + XMLReaderState* state, ProfessionFilter* value, bool* is_set); diff --git a/xml_converter/src/attribute/reset_behavior_gen.cpp b/xml_converter/src/attribute/reset_behavior_gen.cpp index ad5d1490..666560ac 100644 --- a/xml_converter/src/attribute/reset_behavior_gen.cpp +++ b/xml_converter/src/attribute/reset_behavior_gen.cpp @@ -15,7 +15,7 @@ using namespace std; void xml_attribute_to_reset_behavior( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLParseState* state, + XMLReaderState* state, ResetBehavior* value, bool* is_set) { ResetBehavior reset_behavior; diff --git a/xml_converter/src/attribute/reset_behavior_gen.hpp b/xml_converter/src/attribute/reset_behavior_gen.hpp index c13c10fb..d99f3a8b 100644 --- a/xml_converter/src/attribute/reset_behavior_gen.hpp +++ b/xml_converter/src/attribute/reset_behavior_gen.hpp @@ -5,7 +5,7 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" -#include "../state_structs/xml_parse_state.hpp" +#include "../state_structs/xml_reader_state.hpp" #include "waypoint.pb.h" class XMLError; @@ -24,7 +24,7 @@ enum ResetBehavior { void xml_attribute_to_reset_behavior( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLParseState* state, + XMLReaderState* state, ResetBehavior* value, bool* is_set); diff --git a/xml_converter/src/attribute/specialization_filter_gen.cpp b/xml_converter/src/attribute/specialization_filter_gen.cpp index 3820686e..60541983 100644 --- a/xml_converter/src/attribute/specialization_filter_gen.cpp +++ b/xml_converter/src/attribute/specialization_filter_gen.cpp @@ -15,7 +15,7 @@ using namespace std; void xml_attribute_to_specialization_filter( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLParseState* state, + XMLReaderState* state, SpecializationFilter* value, bool* is_set) { SpecializationFilter specialization_filter; diff --git a/xml_converter/src/attribute/specialization_filter_gen.hpp b/xml_converter/src/attribute/specialization_filter_gen.hpp index d14dfc15..c3042e7d 100644 --- a/xml_converter/src/attribute/specialization_filter_gen.hpp +++ b/xml_converter/src/attribute/specialization_filter_gen.hpp @@ -5,7 +5,7 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" -#include "../state_structs/xml_parse_state.hpp" +#include "../state_structs/xml_reader_state.hpp" class XMLError; namespace waypoint { @@ -94,7 +94,7 @@ class SpecializationFilter { void xml_attribute_to_specialization_filter( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLParseState* state, + XMLReaderState* state, SpecializationFilter* value, bool* is_set); diff --git a/xml_converter/src/attribute/species_filter_gen.cpp b/xml_converter/src/attribute/species_filter_gen.cpp index 176afcbd..b33d4a64 100644 --- a/xml_converter/src/attribute/species_filter_gen.cpp +++ b/xml_converter/src/attribute/species_filter_gen.cpp @@ -15,7 +15,7 @@ using namespace std; void xml_attribute_to_species_filter( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLParseState* state, + XMLReaderState* state, SpeciesFilter* value, bool* is_set) { SpeciesFilter species_filter; diff --git a/xml_converter/src/attribute/species_filter_gen.hpp b/xml_converter/src/attribute/species_filter_gen.hpp index c572d008..a372fe3d 100644 --- a/xml_converter/src/attribute/species_filter_gen.hpp +++ b/xml_converter/src/attribute/species_filter_gen.hpp @@ -5,7 +5,7 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" -#include "../state_structs/xml_parse_state.hpp" +#include "../state_structs/xml_reader_state.hpp" class XMLError; namespace waypoint { @@ -27,7 +27,7 @@ class SpeciesFilter { void xml_attribute_to_species_filter( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLParseState* state, + XMLReaderState* state, SpeciesFilter* value, bool* is_set); diff --git a/xml_converter/src/attribute/string.cpp b/xml_converter/src/attribute/string.cpp index 5a76a1af..a2b5c813 100644 --- a/xml_converter/src/attribute/string.cpp +++ b/xml_converter/src/attribute/string.cpp @@ -18,7 +18,7 @@ using namespace std; void xml_attribute_to_string( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLParseState* state, + XMLReaderState* state, string* value, bool* is_set) { *value = get_attribute_value(input); diff --git a/xml_converter/src/attribute/string.hpp b/xml_converter/src/attribute/string.hpp index 843df591..81f65c47 100644 --- a/xml_converter/src/attribute/string.hpp +++ b/xml_converter/src/attribute/string.hpp @@ -5,14 +5,14 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" -#include "../state_structs/xml_parse_state.hpp" +#include "../state_structs/xml_reader_state.hpp" class XMLError; void xml_attribute_to_string( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLParseState* state, + XMLReaderState* state, std::string* value, bool* is_set); diff --git a/xml_converter/src/attribute/trail_data.cpp b/xml_converter/src/attribute/trail_data.cpp index 0b5f05fa..f4d5177f 100644 --- a/xml_converter/src/attribute/trail_data.cpp +++ b/xml_converter/src/attribute/trail_data.cpp @@ -22,7 +22,7 @@ using namespace std; void xml_attribute_to_trail_data( rapidxml::xml_attribute<>* input, vector* errors, - XMLParseState* state, + XMLReaderState* state, TrailData* value, bool* is_set, int* map_id_value, diff --git a/xml_converter/src/attribute/trail_data.hpp b/xml_converter/src/attribute/trail_data.hpp index b36fedfe..6afe66eb 100644 --- a/xml_converter/src/attribute/trail_data.hpp +++ b/xml_converter/src/attribute/trail_data.hpp @@ -5,7 +5,7 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" -#include "../state_structs/xml_parse_state.hpp" +#include "../state_structs/xml_reader_state.hpp" class XMLError; @@ -23,7 +23,7 @@ class TrailData { void xml_attribute_to_trail_data( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLParseState* state, + XMLReaderState* state, TrailData* value, bool* is_set, int* map_id_value, diff --git a/xml_converter/src/attribute/unique_id.cpp b/xml_converter/src/attribute/unique_id.cpp index d2be3422..a0267bd7 100644 --- a/xml_converter/src/attribute/unique_id.cpp +++ b/xml_converter/src/attribute/unique_id.cpp @@ -15,7 +15,7 @@ using namespace std; void xml_attribute_to_unique_id( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLParseState* state, + XMLReaderState* state, UniqueId* value, bool* is_set) { string base64; diff --git a/xml_converter/src/attribute/unique_id.hpp b/xml_converter/src/attribute/unique_id.hpp index b49f00b3..9b6a50d2 100644 --- a/xml_converter/src/attribute/unique_id.hpp +++ b/xml_converter/src/attribute/unique_id.hpp @@ -6,7 +6,7 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" -#include "../state_structs/xml_parse_state.hpp" +#include "../state_structs/xml_reader_state.hpp" class XMLError; @@ -22,7 +22,7 @@ class UniqueId { void xml_attribute_to_unique_id( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLParseState* state, + XMLReaderState* state, UniqueId* value, bool* is_set); diff --git a/xml_converter/src/category_gen.cpp b/xml_converter/src/category_gen.cpp index 0e58d28e..0d4eb48d 100644 --- a/xml_converter/src/category_gen.cpp +++ b/xml_converter/src/category_gen.cpp @@ -18,7 +18,7 @@ using namespace std; string Category::classname() { return "MarkerCategory"; } -void Category::init_from_xml(rapidxml::xml_node<>* node, vector* errors, XMLParseState* state) { +void Category::init_from_xml(rapidxml::xml_node<>* node, vector* errors, XMLReaderState* state) { for (rapidxml::xml_attribute<>* attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()) { bool is_icon_value = this->default_icon.init_xml_attribute(attribute, errors, state); bool is_trail_value = this->default_trail.init_xml_attribute(attribute, errors, state); @@ -33,7 +33,7 @@ void Category::init_from_xml(rapidxml::xml_node<>* node, vector* erro } } -bool Category::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector* errors, XMLParseState* state) { +bool Category::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector* errors, XMLReaderState* state) { string attributename; attributename = normalize(get_attribute_name(attribute)); if (attributename == "defaulttoggle") { diff --git a/xml_converter/src/category_gen.hpp b/xml_converter/src/category_gen.hpp index 0ca10d7a..6c3f1c5e 100644 --- a/xml_converter/src/category_gen.hpp +++ b/xml_converter/src/category_gen.hpp @@ -8,7 +8,7 @@ #include "icon_gen.hpp" #include "parseable.hpp" #include "rapidxml-1.13/rapidxml.hpp" -#include "state_structs/xml_parse_state.hpp" +#include "state_structs/xml_reader_state.hpp" #include "trail_gen.hpp" #include "waypoint.pb.h" @@ -30,10 +30,10 @@ class Category : public Parseable { Icon default_icon; Trail default_trail; - void init_from_xml(rapidxml::xml_node<>* node, std::vector* errors, XMLParseState* state); + void init_from_xml(rapidxml::xml_node<>* node, std::vector* errors, XMLReaderState* state); virtual std::vector as_xml() const; virtual std::string classname(); - bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, XMLParseState* state); + bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, XMLReaderState* state); waypoint::Category as_protobuf() const; void parse_protobuf(waypoint::Category proto_category); }; diff --git a/xml_converter/src/icon_gen.cpp b/xml_converter/src/icon_gen.cpp index 459522d3..b4a16d3a 100644 --- a/xml_converter/src/icon_gen.cpp +++ b/xml_converter/src/icon_gen.cpp @@ -19,7 +19,7 @@ string Icon::classname() { return "POI"; } -bool Icon::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector* errors, XMLParseState* state) { +bool Icon::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector* errors, XMLReaderState* state) { string attributename; attributename = normalize(get_attribute_name(attribute)); if (attributename == "achievementbit") { diff --git a/xml_converter/src/icon_gen.hpp b/xml_converter/src/icon_gen.hpp index 406b8029..f93fa1c0 100644 --- a/xml_converter/src/icon_gen.hpp +++ b/xml_converter/src/icon_gen.hpp @@ -20,7 +20,7 @@ #include "attribute/unique_id.hpp" #include "parseable.hpp" #include "rapidxml-1.13/rapidxml.hpp" -#include "state_structs/xml_parse_state.hpp" +#include "state_structs/xml_reader_state.hpp" #include "waypoint.pb.h" class XMLError; @@ -123,7 +123,7 @@ class Icon : public Parseable { bool trigger_range_is_set = false; virtual std::vector as_xml() const; virtual std::string classname(); - bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, XMLParseState* state); + bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, XMLReaderState* state); waypoint::Icon as_protobuf() const; void parse_protobuf(waypoint::Icon proto_icon); bool validate_attributes_of_type_marker_category(); diff --git a/xml_converter/src/packaging_xml.cpp b/xml_converter/src/packaging_xml.cpp index 0b9fe395..444c26de 100644 --- a/xml_converter/src/packaging_xml.cpp +++ b/xml_converter/src/packaging_xml.cpp @@ -17,7 +17,7 @@ void parse_marker_categories(rapidxml::xml_node<>* node, map* if (get_node_name(node) == "MarkerCategory") { string name = lowercase(find_attribute_value(node, "name")); - XMLParseState state = { + XMLReaderState state = { base_dir, marker_categories, }; @@ -79,7 +79,7 @@ Category* get_category(rapidxml::xml_node<>* node, map* marker vector parse_pois(rapidxml::xml_node<>* root_node, map* marker_categories, vector* errors, string base_dir) { vector markers; - XMLParseState state = { + XMLReaderState state = { base_dir, marker_categories, }; diff --git a/xml_converter/src/packaging_xml.hpp b/xml_converter/src/packaging_xml.hpp index 8e45fc8e..791303c2 100644 --- a/xml_converter/src/packaging_xml.hpp +++ b/xml_converter/src/packaging_xml.hpp @@ -8,7 +8,7 @@ #include "parseable.hpp" #include "rapidxml-1.13/rapidxml.hpp" #include "rapidxml-1.13/rapidxml_utils.hpp" -#include "state_structs/xml_parse_state.hpp" +#include "state_structs/xml_reader_state.hpp" void parse_xml_file( std::string xml_filepath, diff --git a/xml_converter/src/parseable.cpp b/xml_converter/src/parseable.cpp index 137fb6f2..2786fe62 100644 --- a/xml_converter/src/parseable.cpp +++ b/xml_converter/src/parseable.cpp @@ -11,7 +11,7 @@ std::string Parseable::classname() { return "Parseable"; } -void Parseable::init_from_xml(rapidxml::xml_node<>* node, std::vector* errors, XMLParseState* state) { +void Parseable::init_from_xml(rapidxml::xml_node<>* node, std::vector* errors, XMLReaderState* state) { for (rapidxml::xml_attribute<>* attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()) { if (init_xml_attribute(attribute, errors, state)) { } @@ -28,7 +28,7 @@ void Parseable::init_from_xml(rapidxml::xml_node<>* node, std::vector // all of the other parsible classes. So just return false right away without // doing anything. //////////////////////////////////////////////////////////////////////////////// -bool Parseable::init_xml_attribute(rapidxml::xml_attribute<>*, std::vector*, XMLParseState*) { +bool Parseable::init_xml_attribute(rapidxml::xml_attribute<>*, std::vector*, XMLReaderState*) { return false; } diff --git a/xml_converter/src/parseable.hpp b/xml_converter/src/parseable.hpp index f1bbc30c..d851f3e2 100644 --- a/xml_converter/src/parseable.hpp +++ b/xml_converter/src/parseable.hpp @@ -4,7 +4,7 @@ #include #include "rapidxml-1.13/rapidxml.hpp" -#include "state_structs/xml_parse_state.hpp" +#include "state_structs/xml_reader_state.hpp" class XMLError; @@ -14,10 +14,10 @@ class Parseable { virtual std::string classname(); // A default parser function to parse an entire XML node into the class. - void init_from_xml(rapidxml::xml_node<>* node, std::vector* errors, XMLParseState* state); + void init_from_xml(rapidxml::xml_node<>* node, std::vector* errors, XMLReaderState* state); // A default parser function to parse a single XML attribute into the class. - virtual bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, XMLParseState*); + virtual bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, XMLReaderState*); virtual std::vector as_xml() const; }; diff --git a/xml_converter/src/state_structs/xml_parse_state.hpp b/xml_converter/src/state_structs/xml_reader_state.hpp similarity index 86% rename from xml_converter/src/state_structs/xml_parse_state.hpp rename to xml_converter/src/state_structs/xml_reader_state.hpp index 61d6b745..e60d12da 100644 --- a/xml_converter/src/state_structs/xml_parse_state.hpp +++ b/xml_converter/src/state_structs/xml_reader_state.hpp @@ -5,7 +5,7 @@ class Category; -struct XMLParseState { +struct XMLReaderState { std::string xml_filedir; std::map* marker_categories; }; diff --git a/xml_converter/src/trail_gen.cpp b/xml_converter/src/trail_gen.cpp index 07d263cf..79579a25 100644 --- a/xml_converter/src/trail_gen.cpp +++ b/xml_converter/src/trail_gen.cpp @@ -19,7 +19,7 @@ string Trail::classname() { return "Trail"; } -bool Trail::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector* errors, XMLParseState* state) { +bool Trail::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector* errors, XMLReaderState* state) { string attributename; attributename = normalize(get_attribute_name(attribute)); if (attributename == "achievementbit") { diff --git a/xml_converter/src/trail_gen.hpp b/xml_converter/src/trail_gen.hpp index 22c373e2..1340cd10 100644 --- a/xml_converter/src/trail_gen.hpp +++ b/xml_converter/src/trail_gen.hpp @@ -18,7 +18,7 @@ #include "attribute/unique_id.hpp" #include "parseable.hpp" #include "rapidxml-1.13/rapidxml.hpp" -#include "state_structs/xml_parse_state.hpp" +#include "state_structs/xml_reader_state.hpp" #include "waypoint.pb.h" class XMLError; @@ -81,7 +81,7 @@ class Trail : public Parseable { bool trail_scale_is_set = false; virtual std::vector as_xml() const; virtual std::string classname(); - bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, XMLParseState* state); + bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, XMLReaderState* state); waypoint::Trail as_protobuf() const; void parse_protobuf(waypoint::Trail proto_trail); bool validate_attributes_of_type_marker_category(); From 5971e21352d9f65fee0a4e7cc66170f146e6c92c Mon Sep 17 00:00:00 2001 From: klingbolt Date: Fri, 17 Nov 2023 20:38:59 -0500 Subject: [PATCH 345/539] Ensure that dir paths end in a forward slash when path is needed --- xml_converter/src/packaging_protobin.cpp | 2 +- xml_converter/src/string_helper.cpp | 7 +++++++ xml_converter/src/string_helper.hpp | 1 + xml_converter/src/xml_converter.cpp | 18 +++++++++++------- 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/xml_converter/src/packaging_protobin.cpp b/xml_converter/src/packaging_protobin.cpp index d17a23b2..61e536b6 100644 --- a/xml_converter/src/packaging_protobin.cpp +++ b/xml_converter/src/packaging_protobin.cpp @@ -229,7 +229,7 @@ void write_protobuf_file_per_map_id( } for (auto iterator = mapid_to_category_to_pois.begin(); iterator != mapid_to_category_to_pois.end(); iterator++) { - string output_filepath = proto_directory + "/" + to_string(iterator->first) + ".data"; + string output_filepath = proto_directory + to_string(iterator->first) + ".data"; _write_protobuf_file( output_filepath, diff --git a/xml_converter/src/string_helper.cpp b/xml_converter/src/string_helper.cpp index 62d44d8c..641adbaf 100644 --- a/xml_converter/src/string_helper.cpp +++ b/xml_converter/src/string_helper.cpp @@ -287,3 +287,10 @@ bool has_suffix(std::string const& fullString, std::string const& ending) { return false; } } + +void ensure_trailing_slash(std::string* directory_path) { + if (!has_suffix(*directory_path , "/")) { + *directory_path += "/"; + } + return; +} diff --git a/xml_converter/src/string_helper.hpp b/xml_converter/src/string_helper.hpp index 4baa66cd..448ae611 100644 --- a/xml_converter/src/string_helper.hpp +++ b/xml_converter/src/string_helper.hpp @@ -21,3 +21,4 @@ std::vector base64_decode(std::string const&); std::string get_base_dir(std::string filepath); bool has_suffix(std::string const& fullString, std::string const& ending); +void ensure_trailing_slash(std::string* directory_path); diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index fb0ebe78..9305f2e7 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -43,7 +43,8 @@ vector get_files_by_suffix(string directory, string suffix) { while ((entry = readdir(dir)) != NULL) { string filename = entry->d_name; if (filename != "." && filename != "..") { - string path = directory + "/" + filename; + ensure_trailing_slash(&directory); + string path = directory + filename; if (entry->d_type == DT_DIR) { vector subfiles = get_files_by_suffix(path, suffix); // Default: markerpacks have all xml files in the first directory @@ -68,9 +69,9 @@ void move_supplementary_files(string input_directory, string output_directory) { while ((entry = readdir(dir)) != NULL) { string filename = entry->d_name; if (filename != "." && filename != "..") { - string path = input_directory + "/" + filename; + string path = input_directory + filename; if (entry->d_type == DT_DIR) { - string new_directory = output_directory + "/" + filename; + string new_directory = output_directory + filename; if (mkdir(new_directory.c_str(), 0700) == -1 && errno != EEXIST) { cout << "Error making " << new_directory << endl; continue; @@ -83,7 +84,7 @@ void move_supplementary_files(string input_directory, string output_directory) { else { // TODO: Only include files that are referenced by the // individual markers in order to avoid any unnessecary files - string new_path = output_directory + "/" + filename; + string new_path = output_directory + filename; copy_file(path, new_path); } } @@ -95,6 +96,7 @@ void read_taco_directory(string input_path, map* marker_catego cout << "Error: " << input_path << " is not an existing directory or file" << endl; } else if (filesystem::is_directory(input_path)) { + ensure_trailing_slash(&input_path); vector xml_files = get_files_by_suffix(input_path, ".xml"); for (const string& path : xml_files) { parse_xml_file(path, marker_categories, parsed_pois); @@ -107,9 +109,6 @@ void read_taco_directory(string input_path, map* marker_catego void write_taco_directory(string output_path, map* marker_categories, vector* parsed_pois) { // TODO: Exportion of XML Marker Packs File Structure #111 - if (!has_suffix(output_path, "/")) { - output_path += "/"; - } if (!filesystem::is_directory(output_path)) { if (!filesystem::create_directory(output_path)) { cout << "Error: " << output_path << "is not a valid directory path" << endl; @@ -152,6 +151,8 @@ void process_data( // TODO: This is wildly incorrect now because we might have a // different output directory then output_split_waypoint_dir if (output_split_waypoint_dir != "") { + + ensure_trailing_slash(&output_split_waypoint_dir); move_supplementary_files(input_taco_paths[i], output_split_waypoint_dir); } } @@ -172,6 +173,7 @@ void process_data( // Write all of the xml taco paths begin = chrono::high_resolution_clock::now(); for (size_t i = 0; i < output_taco_paths.size(); i++) { + ensure_trailing_slash(&output_taco_paths[i]); write_taco_directory(output_taco_paths[i], &marker_categories, &parsed_pois); } end = chrono::high_resolution_clock::now(); @@ -181,6 +183,7 @@ void process_data( // Write all of the protobin waypoint paths for (size_t i = 0; i < output_waypoint_paths.size(); i++) { + ensure_trailing_slash(&output_waypoint_paths[i]); StringHierarchy category_filter; category_filter.add_path({}, true); write_protobuf_file(output_waypoint_paths[i], category_filter, &marker_categories, &parsed_pois); @@ -189,6 +192,7 @@ void process_data( // Write the special map-split protbin waypoint file begin = chrono::high_resolution_clock::now(); if (output_split_waypoint_dir != "") { + ensure_trailing_slash(&output_split_waypoint_dir); StringHierarchy category_filter; category_filter.add_path({}, true); write_protobuf_file_per_map_id(output_split_waypoint_dir, category_filter, &marker_categories, &parsed_pois); From 9098f484b394f11a5d6169fad0283ded8527be89 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Fri, 17 Nov 2023 20:43:59 -0500 Subject: [PATCH 346/539] Linter errors --- xml_converter/src/string_helper.cpp | 2 +- xml_converter/src/xml_converter.cpp | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/xml_converter/src/string_helper.cpp b/xml_converter/src/string_helper.cpp index 641adbaf..f440c70a 100644 --- a/xml_converter/src/string_helper.cpp +++ b/xml_converter/src/string_helper.cpp @@ -289,7 +289,7 @@ bool has_suffix(std::string const& fullString, std::string const& ending) { } void ensure_trailing_slash(std::string* directory_path) { - if (!has_suffix(*directory_path , "/")) { + if (!has_suffix(*directory_path, "/")) { *directory_path += "/"; } return; diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 9305f2e7..99ff748e 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -151,7 +151,6 @@ void process_data( // TODO: This is wildly incorrect now because we might have a // different output directory then output_split_waypoint_dir if (output_split_waypoint_dir != "") { - ensure_trailing_slash(&output_split_waypoint_dir); move_supplementary_files(input_taco_paths[i], output_split_waypoint_dir); } From 33c496e9bde738a18727df3317b55576d7889117 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Fri, 17 Nov 2023 21:07:32 -0500 Subject: [PATCH 347/539] Updated generated code to reflect proto changes. Slight change to visibility because of the changes made --- Icon.gd | 1 + Route.gd | 1 + Spatial.gd | 6 +- waypoint.gd | 243 +++++++++++++++++++--------------------------------- 4 files changed, 96 insertions(+), 155 deletions(-) diff --git a/Icon.gd b/Icon.gd index 1cd9164c..cc171b55 100644 --- a/Icon.gd +++ b/Icon.gd @@ -4,6 +4,7 @@ const Waypoint = preload("res://waypoint.gd") var texture_path var waypoint: Waypoint.Icon +var category: TreeItem func set_icon_image(texture_path: String): self.texture_path = texture_path diff --git a/Route.gd b/Route.gd index 392b2ffd..24717e1e 100644 --- a/Route.gd +++ b/Route.gd @@ -5,6 +5,7 @@ const Waypoint = preload("res://waypoint.gd") var texture_path var color = Color(0.9, 0.1, 0.1) var waypoint: Waypoint.Trail +var category: TreeItem var point_list := PoolVector3Array() diff --git a/Spatial.gd b/Spatial.gd index 63cc880f..b423f146 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -502,7 +502,7 @@ func _waypoint_categories_to_godot_nodes(item: TreeItem, category, full_category category_item.set_metadata(0, "") print("Category found with no name.") return - category_item.set_text(0, category.get_display_name()) + category_item.set_text(0, category.get_name()) category_item.set_metadata(0, full_category_name) category_item.set_cell_mode(1, TreeItem.CELL_MODE_CHECK) category_item.set_checked(1, Settings.local_category_data.get(full_category_name, {}).get("checked", false)) @@ -564,7 +564,7 @@ func populate_update_dict(category_item: TreeItem, category_visibility_data): #Updates the visibilty of a node and all children. func update_node_visibility(cateogry_data, nodes): for node in nodes.get_children(): - var node_name = node.waypoint.get_category().get_name() + var node_name = node.category.get_metadata(0) if node_name in cateogry_data: if cateogry_data[node_name]: node.visible = true @@ -616,6 +616,7 @@ func gen_new_path(points: Array, texture_path: String, waypoint_trail, category_ new_route.create_mesh(points_3d) new_route.set_texture(texture) new_route.waypoint = waypoint_trail + new_route.category = category_item if category_item != null: new_route.visible = is_category_visible(category_item) else: @@ -643,6 +644,7 @@ func gen_new_icon(position: Vector3, texture_path: String, waypoint_icon, catego new_icon.translation = position new_icon.set_icon_image(texture_path) new_icon.waypoint = waypoint_icon + new_icon.category = category_item if category_item != null: new_icon.visible = is_category_visible(category_item) else: diff --git a/waypoint.gd b/waypoint.gd index 9af1a9f5..d8cfe0f5 100644 --- a/waypoint.gd +++ b/waypoint.gd @@ -708,101 +708,60 @@ class Category: func _init(): var service - _default_visibility = PBField.new("default_visibility", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 1, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) - service = PBServiceField.new() - service.field = _default_visibility - data[_default_visibility.tag] = service - - _display_name = PBField.new("display_name", PB_DATA_TYPE.STRING, PB_RULE.OPTIONAL, 2, true, DEFAULT_VALUES_3[PB_DATA_TYPE.STRING]) - service = PBServiceField.new() - service.field = _display_name - data[_display_name.tag] = service - - _is_separator = PBField.new("is_separator", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 3, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) - service = PBServiceField.new() - service.field = _is_separator - data[_is_separator.tag] = service - - _name = PBField.new("name", PB_DATA_TYPE.STRING, PB_RULE.OPTIONAL, 4, true, DEFAULT_VALUES_3[PB_DATA_TYPE.STRING]) + _name = PBField.new("name", PB_DATA_TYPE.STRING, PB_RULE.OPTIONAL, 1, true, DEFAULT_VALUES_3[PB_DATA_TYPE.STRING]) service = PBServiceField.new() service.field = _name data[_name.tag] = service - _tip_description = PBField.new("tip_description", PB_DATA_TYPE.STRING, PB_RULE.OPTIONAL, 5, true, DEFAULT_VALUES_3[PB_DATA_TYPE.STRING]) - service = PBServiceField.new() - service.field = _tip_description - data[_tip_description.tag] = service - - _children = PBField.new("children", PB_DATA_TYPE.MESSAGE, PB_RULE.REPEATED, 6, true, []) + _children = PBField.new("children", PB_DATA_TYPE.MESSAGE, PB_RULE.REPEATED, 2, true, []) service = PBServiceField.new() service.field = _children service.func_ref = funcref(self, "add_children") data[_children.tag] = service - _icon = PBField.new("icon", PB_DATA_TYPE.MESSAGE, PB_RULE.REPEATED, 7, true, []) + _icon = PBField.new("icon", PB_DATA_TYPE.MESSAGE, PB_RULE.REPEATED, 3, true, []) service = PBServiceField.new() service.field = _icon service.func_ref = funcref(self, "add_icon") data[_icon.tag] = service - _trail = PBField.new("trail", PB_DATA_TYPE.MESSAGE, PB_RULE.REPEATED, 8, true, []) + _trail = PBField.new("trail", PB_DATA_TYPE.MESSAGE, PB_RULE.REPEATED, 4, true, []) service = PBServiceField.new() service.field = _trail service.func_ref = funcref(self, "add_trail") data[_trail.tag] = service + _is_separator = PBField.new("is_separator", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 5, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _is_separator + data[_is_separator.tag] = service + + _default_visibility = PBField.new("default_visibility", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 6, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + service = PBServiceField.new() + service.field = _default_visibility + data[_default_visibility.tag] = service + + _tip_description = PBField.new("tip_description", PB_DATA_TYPE.STRING, PB_RULE.OPTIONAL, 7, true, DEFAULT_VALUES_3[PB_DATA_TYPE.STRING]) + service = PBServiceField.new() + service.field = _tip_description + data[_tip_description.tag] = service + var data = {} - var _default_visibility: PBField - func get_default_visibility() -> bool: - return _default_visibility.value - func clear_default_visibility() -> void: - data[1].state = PB_SERVICE_STATE.UNFILLED - _default_visibility.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] - func set_default_visibility(value : bool) -> void: - _default_visibility.value = value - - var _display_name: PBField - func get_display_name() -> String: - return _display_name.value - func clear_display_name() -> void: - data[2].state = PB_SERVICE_STATE.UNFILLED - _display_name.value = DEFAULT_VALUES_3[PB_DATA_TYPE.STRING] - func set_display_name(value : String) -> void: - _display_name.value = value - - var _is_separator: PBField - func get_is_separator() -> bool: - return _is_separator.value - func clear_is_separator() -> void: - data[3].state = PB_SERVICE_STATE.UNFILLED - _is_separator.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] - func set_is_separator(value : bool) -> void: - _is_separator.value = value - var _name: PBField func get_name() -> String: return _name.value func clear_name() -> void: - data[4].state = PB_SERVICE_STATE.UNFILLED + data[1].state = PB_SERVICE_STATE.UNFILLED _name.value = DEFAULT_VALUES_3[PB_DATA_TYPE.STRING] func set_name(value : String) -> void: _name.value = value - var _tip_description: PBField - func get_tip_description() -> String: - return _tip_description.value - func clear_tip_description() -> void: - data[5].state = PB_SERVICE_STATE.UNFILLED - _tip_description.value = DEFAULT_VALUES_3[PB_DATA_TYPE.STRING] - func set_tip_description(value : String) -> void: - _tip_description.value = value - var _children: PBField func get_children() -> Array: return _children.value func clear_children() -> void: - data[6].state = PB_SERVICE_STATE.UNFILLED + data[2].state = PB_SERVICE_STATE.UNFILLED _children.value = [] func add_children() -> Category: var element = Category.new() @@ -813,7 +772,7 @@ class Category: func get_icon() -> Array: return _icon.value func clear_icon() -> void: - data[7].state = PB_SERVICE_STATE.UNFILLED + data[3].state = PB_SERVICE_STATE.UNFILLED _icon.value = [] func add_icon() -> Icon: var element = Icon.new() @@ -824,13 +783,40 @@ class Category: func get_trail() -> Array: return _trail.value func clear_trail() -> void: - data[8].state = PB_SERVICE_STATE.UNFILLED + data[4].state = PB_SERVICE_STATE.UNFILLED _trail.value = [] func add_trail() -> Trail: var element = Trail.new() _trail.value.append(element) return element + var _is_separator: PBField + func get_is_separator() -> bool: + return _is_separator.value + func clear_is_separator() -> void: + data[5].state = PB_SERVICE_STATE.UNFILLED + _is_separator.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_is_separator(value : bool) -> void: + _is_separator.value = value + + var _default_visibility: PBField + func get_default_visibility() -> bool: + return _default_visibility.value + func clear_default_visibility() -> void: + data[6].state = PB_SERVICE_STATE.UNFILLED + _default_visibility.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_default_visibility(value : bool) -> void: + _default_visibility.value = value + + var _tip_description: PBField + func get_tip_description() -> String: + return _tip_description.value + func clear_tip_description() -> void: + data[7].state = PB_SERVICE_STATE.UNFILLED + _tip_description.value = DEFAULT_VALUES_3[PB_DATA_TYPE.STRING] + func set_tip_description(value : String) -> void: + _tip_description.value = value + func to_string() -> String: return PBPacker.message_to_string(data) @@ -862,10 +848,9 @@ class Icon: service.func_ref = funcref(self, "new_texture_path") data[_texture_path.tag] = service - _guid = PBField.new("guid", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 3, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) + _guid = PBField.new("guid", PB_DATA_TYPE.BYTES, PB_RULE.OPTIONAL, 3, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BYTES]) service = PBServiceField.new() service.field = _guid - service.func_ref = funcref(self, "new_guid") data[_guid.tag] = service _map_id = PBField.new("map_id", PB_DATA_TYPE.INT32, PB_RULE.OPTIONAL, 4, true, DEFAULT_VALUES_3[PB_DATA_TYPE.INT32]) @@ -916,10 +901,10 @@ class Icon: service.field = _achievement_id data[_achievement_id.tag] = service - _can_fade = PBField.new("can_fade", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 19, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + _disable_player_cutout = PBField.new("disable_player_cutout", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 19, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) service = PBServiceField.new() - service.field = _can_fade - data[_can_fade.tag] = service + service.field = _disable_player_cutout + data[_disable_player_cutout.tag] = service _minimum_size_on_screen = PBField.new("minimum_size_on_screen", PB_DATA_TYPE.INT32, PB_RULE.OPTIONAL, 20, true, DEFAULT_VALUES_3[PB_DATA_TYPE.INT32]) service = PBServiceField.new() @@ -1028,10 +1013,9 @@ class Icon: service.field = _bhdraft__schedule_duration data[_bhdraft__schedule_duration.tag] = service - _category = PBField.new("category", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 2054, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) + _category = PBField.new("category", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 2054, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) service = PBServiceField.new() service.field = _category - service.func_ref = funcref(self, "new_category") data[_category.tag] = service var data = {} @@ -1047,14 +1031,13 @@ class Icon: return _texture_path.value var _guid: PBField - func get_guid() -> GUID: + func get_guid() -> PoolByteArray: return _guid.value func clear_guid() -> void: data[3].state = PB_SERVICE_STATE.UNFILLED - _guid.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] - func new_guid() -> GUID: - _guid.value = GUID.new() - return _guid.value + _guid.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BYTES] + func set_guid(value : PoolByteArray) -> void: + _guid.value = value var _map_id: PBField func get_map_id() -> int: @@ -1140,14 +1123,14 @@ class Icon: func set_achievement_id(value : int) -> void: _achievement_id.value = value - var _can_fade: PBField - func get_can_fade() -> bool: - return _can_fade.value - func clear_can_fade() -> void: + var _disable_player_cutout: PBField + func get_disable_player_cutout() -> bool: + return _disable_player_cutout.value + func clear_disable_player_cutout() -> void: data[19].state = PB_SERVICE_STATE.UNFILLED - _can_fade.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] - func set_can_fade(value : bool) -> void: - _can_fade.value = value + _disable_player_cutout.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_disable_player_cutout(value : bool) -> void: + _disable_player_cutout.value = value var _minimum_size_on_screen: PBField func get_minimum_size_on_screen() -> int: @@ -1337,14 +1320,13 @@ class Icon: _bhdraft__schedule_duration.value = value var _category: PBField - func get_category() -> Category: + func get_category() -> bool: return _category.value func clear_category() -> void: data[2054].state = PB_SERVICE_STATE.UNFILLED - _category.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] - func new_category() -> Category: - _category.value = Category.new() - return _category.value + _category.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_category(value : bool) -> void: + _category.value = value func to_string() -> String: return PBPacker.message_to_string(data) @@ -1377,10 +1359,9 @@ class Trail: service.func_ref = funcref(self, "new_texture_path") data[_texture_path.tag] = service - _guid = PBField.new("guid", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 3, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) + _guid = PBField.new("guid", PB_DATA_TYPE.BYTES, PB_RULE.OPTIONAL, 3, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BYTES]) service = PBServiceField.new() service.field = _guid - service.func_ref = funcref(self, "new_guid") data[_guid.tag] = service _map_id = PBField.new("map_id", PB_DATA_TYPE.INT32, PB_RULE.OPTIONAL, 4, true, DEFAULT_VALUES_3[PB_DATA_TYPE.INT32]) @@ -1419,10 +1400,10 @@ class Trail: service.field = _achievement_id data[_achievement_id.tag] = service - _can_fade = PBField.new("can_fade", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 19, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + _disable_player_cutout = PBField.new("disable_player_cutout", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 19, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) service = PBServiceField.new() - service.field = _can_fade - data[_can_fade.tag] = service + service.field = _disable_player_cutout + data[_disable_player_cutout.tag] = service _is_wall = PBField.new("is_wall", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 20, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) service = PBServiceField.new() @@ -1511,10 +1492,9 @@ class Trail: service.field = _bhdraft__schedule_duration data[_bhdraft__schedule_duration.tag] = service - _category = PBField.new("category", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 2054, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) + _category = PBField.new("category", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 2054, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) service = PBServiceField.new() service.field = _category - service.func_ref = funcref(self, "new_category") data[_category.tag] = service var data = {} @@ -1530,14 +1510,13 @@ class Trail: return _texture_path.value var _guid: PBField - func get_guid() -> GUID: + func get_guid() -> PoolByteArray: return _guid.value func clear_guid() -> void: data[3].state = PB_SERVICE_STATE.UNFILLED - _guid.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] - func new_guid() -> GUID: - _guid.value = GUID.new() - return _guid.value + _guid.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BYTES] + func set_guid(value : PoolByteArray) -> void: + _guid.value = value var _map_id: PBField func get_map_id() -> int: @@ -1603,14 +1582,14 @@ class Trail: func set_achievement_id(value : int) -> void: _achievement_id.value = value - var _can_fade: PBField - func get_can_fade() -> bool: - return _can_fade.value - func clear_can_fade() -> void: + var _disable_player_cutout: PBField + func get_disable_player_cutout() -> bool: + return _disable_player_cutout.value + func clear_disable_player_cutout() -> void: data[19].state = PB_SERVICE_STATE.UNFILLED - _can_fade.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] - func set_can_fade(value : bool) -> void: - _can_fade.value = value + _disable_player_cutout.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_disable_player_cutout(value : bool) -> void: + _disable_player_cutout.value = value var _is_wall: PBField func get_is_wall() -> bool: @@ -1764,14 +1743,13 @@ class Trail: _bhdraft__schedule_duration.value = value var _category: PBField - func get_category() -> Category: + func get_category() -> bool: return _category.value func clear_category() -> void: data[2054].state = PB_SERVICE_STATE.UNFILLED - _category.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] - func new_category() -> Category: - _category.value = Category.new() - return _category.value + _category.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_category(value : bool) -> void: + _category.value = value func to_string() -> String: return PBPacker.message_to_string(data) @@ -2257,47 +2235,6 @@ class Trigger: return PB_ERR.PARSE_INCOMPLETE return result -class GUID: - func _init(): - var service - - _guid = PBField.new("guid", PB_DATA_TYPE.BYTES, PB_RULE.OPTIONAL, 1, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BYTES]) - service = PBServiceField.new() - service.field = _guid - data[_guid.tag] = service - - var data = {} - - var _guid: PBField - func get_guid() -> PoolByteArray: - return _guid.value - func clear_guid() -> void: - data[1].state = PB_SERVICE_STATE.UNFILLED - _guid.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BYTES] - func set_guid(value : PoolByteArray) -> void: - _guid.value = value - - func to_string() -> String: - return PBPacker.message_to_string(data) - - func to_bytes() -> PoolByteArray: - return PBPacker.pack_message(data) - - func from_bytes(bytes : PoolByteArray, offset : int = 0, limit : int = -1) -> int: - var cur_limit = bytes.size() - if limit != -1: - cur_limit = limit - var result = PBPacker.unpack_message(data, bytes, offset, cur_limit) - if result == cur_limit: - if PBPacker.check_required(data): - if limit == -1: - return PB_ERR.NO_ERRORS - else: - return PB_ERR.REQUIRED_FIELDS - elif limit == -1 && result > 0: - return PB_ERR.PARSE_INCOMPLETE - return result - enum CullChirality { none = 0, clockwise = 1, From 6630953cd9e8006e7d798aa194b59e2ce1c5bce2 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sat, 18 Nov 2023 14:40:10 -0600 Subject: [PATCH 348/539] Fixing protobin diffs for draft prs and remote prs --- .github/workflows/diff_protobin.yml | 4 ++-- .../expected_outputs/proto_can_fade_invalid/markers.bin | 4 ++-- .../expected_outputs/xml_can_fade_invalid/xml_file.xml | 1 + .../inputs/xml_can_fade_invalid/xml_file.xml | 1 + xml_converter/intigration_tests/testcases.py | 7 ++++++- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/diff_protobin.yml b/.github/workflows/diff_protobin.yml index 54e98696..ec38a1d9 100644 --- a/.github/workflows/diff_protobin.yml +++ b/.github/workflows/diff_protobin.yml @@ -7,6 +7,7 @@ on: jobs: custom-diff: runs-on: ubuntu-latest + if: github.event_name == 'push' && github.ref == 'refs/heads/main' permissions: write-all steps: - name: Checkout Code @@ -19,11 +20,10 @@ jobs: run: | git fetch origin +refs/pull/${{ github.event.pull_request.number }}/head:refs/pull/${{ github.event.pull_request.number }}/head git fetch origin ${{ github.base_ref }} - git fetch origin ${{ github.head_ref }} - name: Get Filenames run: | - for file in $(git diff --name-only origin/${{ github.base_ref }}...origin/${{ github.head_ref }} | grep '.bin$'); do + for file in $(git diff --name-only origin/${{ github.base_ref }}...refs/pull/${{ github.event.pull_request.number }}/head | grep '.bin$'); do if [ -n "$(git ls-tree "origin/${{ github.base_ref }}" -- "$file")" ]; then git show origin/${{ github.base_ref }}:$file > $file._old protoc --decode=waypoint.Waypoint xml_converter/proto/waypoint.proto < $file._old > $file._old._textproto diff --git a/xml_converter/intigration_tests/expected_outputs/proto_can_fade_invalid/markers.bin b/xml_converter/intigration_tests/expected_outputs/proto_can_fade_invalid/markers.bin index 526c9fe3..c32cb0ef 100644 --- a/xml_converter/intigration_tests/expected_outputs/proto_can_fade_invalid/markers.bin +++ b/xml_converter/intigration_tests/expected_outputs/proto_can_fade_invalid/markers.bin @@ -1,3 +1,3 @@ -" - My Category 2B \Ï)Cf¦RC{ÔWC \ No newline at end of file +7 + My Category 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC \ No newline at end of file diff --git a/xml_converter/intigration_tests/expected_outputs/xml_can_fade_invalid/xml_file.xml b/xml_converter/intigration_tests/expected_outputs/xml_can_fade_invalid/xml_file.xml index 5282685a..56b79ea1 100644 --- a/xml_converter/intigration_tests/expected_outputs/xml_can_fade_invalid/xml_file.xml +++ b/xml_converter/intigration_tests/expected_outputs/xml_can_fade_invalid/xml_file.xml @@ -4,5 +4,6 @@ + diff --git a/xml_converter/intigration_tests/inputs/xml_can_fade_invalid/xml_file.xml b/xml_converter/intigration_tests/inputs/xml_can_fade_invalid/xml_file.xml index 921fb19a..9157630c 100644 --- a/xml_converter/intigration_tests/inputs/xml_can_fade_invalid/xml_file.xml +++ b/xml_converter/intigration_tests/inputs/xml_can_fade_invalid/xml_file.xml @@ -4,5 +4,6 @@ + diff --git a/xml_converter/intigration_tests/testcases.py b/xml_converter/intigration_tests/testcases.py index fc9d3a2b..d9494dfb 100644 --- a/xml_converter/intigration_tests/testcases.py +++ b/xml_converter/intigration_tests/testcases.py @@ -32,7 +32,12 @@ class Testcase: "Error: Found a boolean value that was not a '1', '0', 'true', or 'false'", "./inputs/xml_can_fade_invalid/xml_file.xml", '6 | ', - " | ^^^" + " | ^^^", + "Error: Found a boolean value that was not a '1', '0', 'true', or 'false'", + './inputs/xml_can_fade_invalid/xml_file.xml', + '7 | ', + ' | ^^^^^^', + ] ), Testcase( From fc32314d8a2cb49eb5bb26fc218611d0d99cc7e8 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sat, 18 Nov 2023 14:47:56 -0600 Subject: [PATCH 349/539] fixing skip logic --- .github/workflows/diff_protobin.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/diff_protobin.yml b/.github/workflows/diff_protobin.yml index ec38a1d9..cbb5d062 100644 --- a/.github/workflows/diff_protobin.yml +++ b/.github/workflows/diff_protobin.yml @@ -7,7 +7,7 @@ on: jobs: custom-diff: runs-on: ubuntu-latest - if: github.event_name == 'push' && github.ref == 'refs/heads/main' + if: github.event_name == 'pull_request' && !github.event.pull_request.draft permissions: write-all steps: - name: Checkout Code From 435529e6677f95868e10211e80877d320cec9e71 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sat, 18 Nov 2023 15:11:42 -0600 Subject: [PATCH 350/539] . --- .github/workflows/diff_protobin.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/diff_protobin.yml b/.github/workflows/diff_protobin.yml index cbb5d062..f8b1a687 100644 --- a/.github/workflows/diff_protobin.yml +++ b/.github/workflows/diff_protobin.yml @@ -7,7 +7,7 @@ on: jobs: custom-diff: runs-on: ubuntu-latest - if: github.event_name == 'pull_request' && !github.event.pull_request.draft + if: '!github.event.pull_request.draft' permissions: write-all steps: - name: Checkout Code From 475a88f0f49d3fa91f9d1bfa8ce7e98f1f5a0753 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sat, 18 Nov 2023 16:59:57 -0500 Subject: [PATCH 351/539] Adding negative test values --- .../expected_outputs/xml_animation_speed/xml_file.xml | 4 ++++ .../intigration_tests/inputs/xml_animation_speed/xml_file.xml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/xml_converter/intigration_tests/expected_outputs/xml_animation_speed/xml_file.xml b/xml_converter/intigration_tests/expected_outputs/xml_animation_speed/xml_file.xml index 72c010f9..029bdadd 100644 --- a/xml_converter/intigration_tests/expected_outputs/xml_animation_speed/xml_file.xml +++ b/xml_converter/intigration_tests/expected_outputs/xml_animation_speed/xml_file.xml @@ -9,5 +9,9 @@ + + + + diff --git a/xml_converter/intigration_tests/inputs/xml_animation_speed/xml_file.xml b/xml_converter/intigration_tests/inputs/xml_animation_speed/xml_file.xml index cebb55cc..285ce5bc 100644 --- a/xml_converter/intigration_tests/inputs/xml_animation_speed/xml_file.xml +++ b/xml_converter/intigration_tests/inputs/xml_animation_speed/xml_file.xml @@ -9,5 +9,9 @@ + + + + From d889f2c5a97e735218d5c8d647c71846ad6a2c82 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sat, 18 Nov 2023 18:03:31 -0600 Subject: [PATCH 352/539] Fixing the protobin diff tool again for remote PRs --- .github/workflows/diff_protobin.yml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/diff_protobin.yml b/.github/workflows/diff_protobin.yml index f8b1a687..e5937017 100644 --- a/.github/workflows/diff_protobin.yml +++ b/.github/workflows/diff_protobin.yml @@ -1,7 +1,7 @@ name: Diff Protobin on: - pull_request: + pull_request_target: paths: - '**/*.bin' jobs: @@ -23,15 +23,22 @@ jobs: - name: Get Filenames run: | - for file in $(git diff --name-only origin/${{ github.base_ref }}...refs/pull/${{ github.event.pull_request.number }}/head | grep '.bin$'); do + for file in $(git diff --name-only origin/${{ github.base_ref }} refs/pull/${{ github.event.pull_request.number }}/head | grep '.bin$'); do if [ -n "$(git ls-tree "origin/${{ github.base_ref }}" -- "$file")" ]; then git show origin/${{ github.base_ref }}:$file > $file._old - protoc --decode=waypoint.Waypoint xml_converter/proto/waypoint.proto < $file._old > $file._old._textproto + protoc --decode=waypoint.Waypoint xml_converter/proto/waypoint.proto < $file._old > $file.textproto._old else - touch $file._old._textproto + touch $file.textproto._old fi - protoc --decode=waypoint.Waypoint xml_converter/proto/waypoint.proto < $file > $file._textproto - diff -u $file._old._textproto $file._textproto > $file._diff || true + + if [ -n "$(git ls-tree "refs/pull/${{ github.event.pull_request.number }}/head" -- "$file")" ]; then + git show refs/pull/${{ github.event.pull_request.number }}/head:$file > $file._new + protoc --decode=waypoint.Waypoint xml_converter/proto/waypoint.proto < $file._new > $file.textproto._new + else + touch $file.textproto._new + fi + + diff -u $file.textproto._old $file.textproto._new > $file._diff || true echo $file >> file_list.txt done From 2bc1b79ab1749dbf44d3c138f0f29ba9fa0a4fe1 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sun, 19 Nov 2023 12:25:35 -0600 Subject: [PATCH 353/539] creating the folder for the diff file if the folder did not previously exist --- .github/workflows/diff_protobin.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/diff_protobin.yml b/.github/workflows/diff_protobin.yml index e5937017..86d8ff2a 100644 --- a/.github/workflows/diff_protobin.yml +++ b/.github/workflows/diff_protobin.yml @@ -24,6 +24,7 @@ jobs: - name: Get Filenames run: | for file in $(git diff --name-only origin/${{ github.base_ref }} refs/pull/${{ github.event.pull_request.number }}/head | grep '.bin$'); do + mkdir -p $(dirname "$file") if [ -n "$(git ls-tree "origin/${{ github.base_ref }}" -- "$file")" ]; then git show origin/${{ github.base_ref }}:$file > $file._old protoc --decode=waypoint.Waypoint xml_converter/proto/waypoint.proto < $file._old > $file.textproto._old From e6bff234fd816d070fdf5f4a82d5617f66b4e62a Mon Sep 17 00:00:00 2001 From: klingbolt Date: Tue, 21 Nov 2023 19:34:32 -0500 Subject: [PATCH 354/539] Moved function calls to the points right before the filename is used --- xml_converter/src/packaging_protobin.cpp | 8 ++++++-- xml_converter/src/xml_converter.cpp | 9 ++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/xml_converter/src/packaging_protobin.cpp b/xml_converter/src/packaging_protobin.cpp index 61e536b6..87f81c23 100644 --- a/xml_converter/src/packaging_protobin.cpp +++ b/xml_converter/src/packaging_protobin.cpp @@ -177,12 +177,13 @@ void _write_protobuf_file( } void write_protobuf_file( - const string& filepath, + string& filepath, const StringHierarchy& category_filter, const map* marker_categories, const vector* parsed_pois) { std::map> category_to_pois; + for (size_t i = 0; i < parsed_pois->size(); i++) { Parseable* parsed_poi = (*parsed_pois)[i]; if (parsed_poi->classname() == "POI") { @@ -197,6 +198,7 @@ void write_protobuf_file( std::cout << "Unknown type" << std::endl; } } + ensure_trailing_slash(&filepath); _write_protobuf_file( filepath + "/markers.bin", @@ -207,7 +209,7 @@ void write_protobuf_file( // Write protobuf per map id void write_protobuf_file_per_map_id( - const string& proto_directory, + string& proto_directory, const StringHierarchy& category_filter, const map* marker_categories, const vector* parsed_pois) { @@ -228,6 +230,8 @@ void write_protobuf_file_per_map_id( } } + ensure_trailing_slash(&proto_directory); + for (auto iterator = mapid_to_category_to_pois.begin(); iterator != mapid_to_category_to_pois.end(); iterator++) { string output_filepath = proto_directory + to_string(iterator->first) + ".data"; diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 99ff748e..e6de8464 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -69,8 +69,10 @@ void move_supplementary_files(string input_directory, string output_directory) { while ((entry = readdir(dir)) != NULL) { string filename = entry->d_name; if (filename != "." && filename != "..") { + ensure_trailing_slash(&input_directory); string path = input_directory + filename; if (entry->d_type == DT_DIR) { + ensure_trailing_slash(&output_directory); string new_directory = output_directory + filename; if (mkdir(new_directory.c_str(), 0700) == -1 && errno != EEXIST) { cout << "Error making " << new_directory << endl; @@ -84,6 +86,7 @@ void move_supplementary_files(string input_directory, string output_directory) { else { // TODO: Only include files that are referenced by the // individual markers in order to avoid any unnessecary files + ensure_trailing_slash(&output_directory); string new_path = output_directory + filename; copy_file(path, new_path); } @@ -96,7 +99,6 @@ void read_taco_directory(string input_path, map* marker_catego cout << "Error: " << input_path << " is not an existing directory or file" << endl; } else if (filesystem::is_directory(input_path)) { - ensure_trailing_slash(&input_path); vector xml_files = get_files_by_suffix(input_path, ".xml"); for (const string& path : xml_files) { parse_xml_file(path, marker_categories, parsed_pois); @@ -109,6 +111,7 @@ void read_taco_directory(string input_path, map* marker_catego void write_taco_directory(string output_path, map* marker_categories, vector* parsed_pois) { // TODO: Exportion of XML Marker Packs File Structure #111 + ensure_trailing_slash(&output_path); if (!filesystem::is_directory(output_path)) { if (!filesystem::create_directory(output_path)) { cout << "Error: " << output_path << "is not a valid directory path" << endl; @@ -151,7 +154,6 @@ void process_data( // TODO: This is wildly incorrect now because we might have a // different output directory then output_split_waypoint_dir if (output_split_waypoint_dir != "") { - ensure_trailing_slash(&output_split_waypoint_dir); move_supplementary_files(input_taco_paths[i], output_split_waypoint_dir); } } @@ -172,7 +174,6 @@ void process_data( // Write all of the xml taco paths begin = chrono::high_resolution_clock::now(); for (size_t i = 0; i < output_taco_paths.size(); i++) { - ensure_trailing_slash(&output_taco_paths[i]); write_taco_directory(output_taco_paths[i], &marker_categories, &parsed_pois); } end = chrono::high_resolution_clock::now(); @@ -182,7 +183,6 @@ void process_data( // Write all of the protobin waypoint paths for (size_t i = 0; i < output_waypoint_paths.size(); i++) { - ensure_trailing_slash(&output_waypoint_paths[i]); StringHierarchy category_filter; category_filter.add_path({}, true); write_protobuf_file(output_waypoint_paths[i], category_filter, &marker_categories, &parsed_pois); @@ -191,7 +191,6 @@ void process_data( // Write the special map-split protbin waypoint file begin = chrono::high_resolution_clock::now(); if (output_split_waypoint_dir != "") { - ensure_trailing_slash(&output_split_waypoint_dir); StringHierarchy category_filter; category_filter.add_path({}, true); write_protobuf_file_per_map_id(output_split_waypoint_dir, category_filter, &marker_categories, &parsed_pois); From 6a5f07a375427d7de6f61cf869fb56a676724410 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Tue, 21 Nov 2023 19:38:10 -0500 Subject: [PATCH 355/539] Removed references when the string may be changed --- xml_converter/src/packaging_protobin.cpp | 5 ++--- xml_converter/src/packaging_protobin.hpp | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/xml_converter/src/packaging_protobin.cpp b/xml_converter/src/packaging_protobin.cpp index 87f81c23..9886f8c2 100644 --- a/xml_converter/src/packaging_protobin.cpp +++ b/xml_converter/src/packaging_protobin.cpp @@ -177,13 +177,12 @@ void _write_protobuf_file( } void write_protobuf_file( - string& filepath, + string filepath, const StringHierarchy& category_filter, const map* marker_categories, const vector* parsed_pois) { std::map> category_to_pois; - for (size_t i = 0; i < parsed_pois->size(); i++) { Parseable* parsed_poi = (*parsed_pois)[i]; if (parsed_poi->classname() == "POI") { @@ -209,7 +208,7 @@ void write_protobuf_file( // Write protobuf per map id void write_protobuf_file_per_map_id( - string& proto_directory, + string proto_directory, const StringHierarchy& category_filter, const map* marker_categories, const vector* parsed_pois) { diff --git a/xml_converter/src/packaging_protobin.hpp b/xml_converter/src/packaging_protobin.hpp index a62c02b7..855726c6 100644 --- a/xml_converter/src/packaging_protobin.hpp +++ b/xml_converter/src/packaging_protobin.hpp @@ -16,13 +16,13 @@ void read_protobuf_file( std::vector* parsed_pois); void write_protobuf_file( - const std::string& proto_directory, + std::string proto_directory, const StringHierarchy& category_filter, const std::map* marker_categories, const std::vector* parsed_pois); void write_protobuf_file_per_map_id( - const std::string& proto_directory, + std::string proto_directory, const StringHierarchy& category_filter, const std::map* marker_categories, const std::vector* parsed_pois); From 002b37dfc030ee573ef1c3161486aba13d18b73b Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sun, 26 Nov 2023 00:49:58 -0600 Subject: [PATCH 356/539] Adding state classes to all the serial functions --- .../cpp_templates/attribute_template.hpp | 24 +- .../attribute_template_compoundvalue.cpp | 16 +- .../cpp_templates/attribute_template_enum.cpp | 16 +- .../attribute_template_multiflagvalue.cpp | 16 +- .../cpp_templates/class_template.cpp | 9 +- xml_converter/intigration_tests/testcases.py | 2 +- xml_converter/src/attribute/bool.cpp | 21 +- xml_converter/src/attribute/bool.hpp | 16 +- xml_converter/src/attribute/color.cpp | 16 +- xml_converter/src/attribute/color.hpp | 19 +- .../src/attribute/cull_chirality_gen.cpp | 16 +- .../src/attribute/cull_chirality_gen.hpp | 19 +- .../src/attribute/euler_rotation_gen.cpp | 16 +- .../src/attribute/euler_rotation_gen.hpp | 19 +- .../src/attribute/festival_filter_gen.cpp | 16 +- .../src/attribute/festival_filter_gen.hpp | 19 +- xml_converter/src/attribute/float.cpp | 16 +- xml_converter/src/attribute/float.hpp | 19 +- xml_converter/src/attribute/image.cpp | 16 +- xml_converter/src/attribute/image.hpp | 19 +- xml_converter/src/attribute/int.cpp | 16 +- xml_converter/src/attribute/int.hpp | 19 +- .../src/attribute/map_type_filter_gen.cpp | 16 +- .../src/attribute/map_type_filter_gen.hpp | 19 +- .../src/attribute/marker_category.cpp | 16 +- .../src/attribute/marker_category.hpp | 19 +- .../src/attribute/mount_filter_gen.cpp | 16 +- .../src/attribute/mount_filter_gen.hpp | 19 +- xml_converter/src/attribute/position_gen.cpp | 11 +- xml_converter/src/attribute/position_gen.hpp | 19 +- .../src/attribute/profession_filter_gen.cpp | 16 +- .../src/attribute/profession_filter_gen.hpp | 19 +- .../src/attribute/reset_behavior_gen.cpp | 16 +- .../src/attribute/reset_behavior_gen.hpp | 19 +- .../attribute/specialization_filter_gen.cpp | 16 +- .../attribute/specialization_filter_gen.hpp | 19 +- .../src/attribute/species_filter_gen.cpp | 16 +- .../src/attribute/species_filter_gen.hpp | 19 +- xml_converter/src/attribute/string.cpp | 17 +- xml_converter/src/attribute/string.hpp | 27 +- xml_converter/src/attribute/trail_data.cpp | 16 +- xml_converter/src/attribute/trail_data.hpp | 19 +- xml_converter/src/attribute/unique_id.cpp | 16 +- xml_converter/src/attribute/unique_id.hpp | 19 +- xml_converter/src/category_gen.cpp | 33 +- xml_converter/src/icon_gen.cpp | 289 +++++++++--------- .../src/state_structs/proto_reader_state.hpp | 4 + .../src/state_structs/proto_writer_state.hpp | 4 + .../src/state_structs/xml_writer_state.hpp | 4 + xml_converter/src/trail_gen.cpp | 167 +++++----- 50 files changed, 884 insertions(+), 371 deletions(-) create mode 100644 xml_converter/src/state_structs/proto_reader_state.hpp create mode 100644 xml_converter/src/state_structs/proto_writer_state.hpp create mode 100644 xml_converter/src/state_structs/xml_writer_state.hpp diff --git a/xml_converter/generators/cpp_templates/attribute_template.hpp b/xml_converter/generators/cpp_templates/attribute_template.hpp index dbad2da0..66274694 100644 --- a/xml_converter/generators/cpp_templates/attribute_template.hpp +++ b/xml_converter/generators/cpp_templates/attribute_template.hpp @@ -5,7 +5,10 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "../state_structs/proto_reader_state.hpp" +#include "../state_structs/proto_writer_state.hpp" #include "../state_structs/xml_reader_state.hpp" +#include "../state_structs/xml_writer_state.hpp" {% if type == "Enum" %} #include "waypoint.pb.h" @@ -39,12 +42,25 @@ void xml_attribute_to_{{attribute_name}}( {{class_name}}* value, bool* is_set); -std::string {{attribute_name}}_to_xml_attribute(const std::string& attribute_name, const {{class_name}}* value); +std::string {{attribute_name}}_to_xml_attribute( + const std::string& attribute_name, + XMLWriterState* state, + const {{class_name}}* value); -void proto_to_{{attribute_name}}({{proto_field_cpp_type}} input, {{class_name}}* value, bool* is_set); +void proto_to_{{attribute_name}}( + {{proto_field_cpp_type}} input, + ProtoReaderState* state, + {{class_name}}* value, + bool* is_set); {% if type == "Enum" %} - void {{attribute_name}}_to_proto({{class_name}} value, std::function setter); + void {{attribute_name}}_to_proto( + {{class_name}} value, + ProtoWriterState* state, + std::function setter); {% else %} - void {{attribute_name}}_to_proto({{class_name}} value, std::function setter); + void {{attribute_name}}_to_proto( + {{class_name}} value, + ProtoWriterState* state, + std::function setter); {% endif %} \ No newline at end of file diff --git a/xml_converter/generators/cpp_templates/attribute_template_compoundvalue.cpp b/xml_converter/generators/cpp_templates/attribute_template_compoundvalue.cpp index 83829cfc..bb6d8204 100644 --- a/xml_converter/generators/cpp_templates/attribute_template_compoundvalue.cpp +++ b/xml_converter/generators/cpp_templates/attribute_template_compoundvalue.cpp @@ -34,7 +34,10 @@ void xml_attribute_to_{{attribute_name}}( *is_set = true; } {% if xml_bundled_components != [] %} - string {{attribute_name}}_to_xml_attribute(const std::string& attribute_name, const {{class_name}}* value) { + string {{attribute_name}}_to_xml_attribute( + const std::string& attribute_name, + XMLWriterState* state, + const {{class_name}}* value) { string output; {% for n, attribute_variable in enumerate(attribute_variables) %} {% if attribute_variable.attribute_name in xml_bundled_components %} @@ -49,7 +52,11 @@ void xml_attribute_to_{{attribute_name}}( } {% endif %} -void proto_to_{{attribute_name}}({{proto_field_cpp_type}} input, {{class_name}}* value, bool* is_set) { +void proto_to_{{attribute_name}}( + {{proto_field_cpp_type}} input, + ProtoReaderState* state, + {{class_name}}* value, + bool* is_set) { {{class_name}} {{attribute_name}}; {% for attribute_variable in attribute_variables: %} {{attribute_name}}.{{attribute_variable.attribute_name}} = input.{{attribute_variable.protobuf_field}}(); @@ -58,7 +65,10 @@ void proto_to_{{attribute_name}}({{proto_field_cpp_type}} input, {{class_name}}* *is_set = true; } -void {{attribute_name}}_to_proto({{class_name}} value, std::function setter) { +void {{attribute_name}}_to_proto( + {{class_name}} value, + ProtoWriterState* state, + std::function setter) { {{proto_field_cpp_type}}* proto_{{attribute_name}} = new {{proto_field_cpp_type}}(); {% for attribute_variable in attribute_variables %} proto_{{attribute_name}}->set_{{attribute_variable.protobuf_field}}(value.{{attribute_variable.attribute_name}}); diff --git a/xml_converter/generators/cpp_templates/attribute_template_enum.cpp b/xml_converter/generators/cpp_templates/attribute_template_enum.cpp index 092dc910..ae78098b 100644 --- a/xml_converter/generators/cpp_templates/attribute_template_enum.cpp +++ b/xml_converter/generators/cpp_templates/attribute_template_enum.cpp @@ -41,7 +41,10 @@ void xml_attribute_to_{{attribute_name}}( *is_set = true; } -string {{attribute_name}}_to_xml_attribute(const std::string& attribute_name, const {{class_name}}* value) { +string {{attribute_name}}_to_xml_attribute( + const std::string& attribute_name, + XMLWriterState* state, + const {{class_name}}* value) { {% for n, attribute_variable in enumerate(attribute_variables) %} {% for i, value in enumerate(attribute_variable.xml_fields) %} {%-if i == 0 and n == 0:%} @@ -58,7 +61,11 @@ string {{attribute_name}}_to_xml_attribute(const std::string& attribute_name, co } } -void proto_to_{{attribute_name}}({{proto_field_cpp_type}} input, {{class_name}}* value, bool* is_set) { +void proto_to_{{attribute_name}}( + {{proto_field_cpp_type}} input, + ProtoReaderState* state, + {{class_name}}* value, + bool* is_set) { switch (input) { {% for attribute_variable in attribute_variables %} case {{proto_field_cpp_type}}::{{attribute_variable.attribute_name}}: @@ -73,7 +80,10 @@ void proto_to_{{attribute_name}}({{proto_field_cpp_type}} input, {{class_name}}* } } -void {{attribute_name}}_to_proto({{class_name}} value, std::function setter) { +void {{attribute_name}}_to_proto( + {{class_name}} value, + ProtoWriterState* state, + std::function setter) { switch (value) { {% for attribute_variable in attribute_variables %} case {{class_name}}::{{attribute_variable.attribute_name}}: diff --git a/xml_converter/generators/cpp_templates/attribute_template_multiflagvalue.cpp b/xml_converter/generators/cpp_templates/attribute_template_multiflagvalue.cpp index 793f3c57..64962f2c 100644 --- a/xml_converter/generators/cpp_templates/attribute_template_multiflagvalue.cpp +++ b/xml_converter/generators/cpp_templates/attribute_template_multiflagvalue.cpp @@ -49,7 +49,10 @@ void xml_attribute_to_{{attribute_name}}( *is_set = true; } -string {{attribute_name}}_to_xml_attribute(const std::string& attribute_name, const {{class_name}}* value) { +string {{attribute_name}}_to_xml_attribute( + const std::string& attribute_name, + XMLWriterState* state, + const {{class_name}}* value) { vector flag_values; {% for n, attribute_variable in enumerate(attribute_variables)%} if (value->{{attribute_variable.attribute_name}} == true) { @@ -60,7 +63,11 @@ string {{attribute_name}}_to_xml_attribute(const std::string& attribute_name, co return " " + attribute_name + "=\"" + output + "\""; } -void proto_to_{{attribute_name}}({{proto_field_cpp_type}} input, {{class_name}}* value, bool* is_set) { +void proto_to_{{attribute_name}}( + {{proto_field_cpp_type}} input, + ProtoReaderState* state, + {{class_name}}* value, + bool* is_set) { {{class_name}} {{attribute_name}}; {% for n, attribute_variable in enumerate(attribute_variables)%} {{attribute_name}}.{{attribute_variable.attribute_name}} = input.{{attribute_variable.attribute_name}}(); @@ -69,7 +76,10 @@ void proto_to_{{attribute_name}}({{proto_field_cpp_type}} input, {{class_name}}* *is_set = true; } -void {{attribute_name}}_to_proto({{class_name}} value, std::function setter) { +void {{attribute_name}}_to_proto( + {{class_name}} value, + ProtoWriterState* state, + std::function setter) { {{proto_field_cpp_type}}* proto_{{attribute_name}} = new {{proto_field_cpp_type}}(); bool should_write = false; {% for n, attribute_variable in enumerate(attribute_variables)%} diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index 3ca00cd8..c0447155 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -60,12 +60,13 @@ bool {{cpp_class}}::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vec {% endif %} vector {{cpp_class}}::as_xml() const { + XMLWriterState state; vector xml_node_contents; xml_node_contents.push_back("<{{xml_class_name}} "); {% for attribute_variable in attribute_variables %} {% if attribute_variable.write_to_xml == true %} if (this->{{attribute_variable.attribute_flag_name}}) { - xml_node_contents.push_back({{attribute_variable.serialize_xml_function}}("{{attribute_variable.default_xml_field}}", &this->{{attribute_variable.attribute_name}})); + xml_node_contents.push_back({{attribute_variable.serialize_xml_function}}("{{attribute_variable.default_xml_field}}", &state, &this->{{attribute_variable.attribute_name}})); } {% endif %} {% endfor %} @@ -89,6 +90,7 @@ vector {{cpp_class}}::as_xml() const { } waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf() const { + ProtoWriterState state; waypoint::{{cpp_class}} proto_{{cpp_class_header}}; {% for attribute_variable in attribute_variables %} {% if attribute_variable.is_component == false %} @@ -98,7 +100,7 @@ waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf() const { {% else %} std::function setter = [&proto_{{cpp_class_header}}]({{attribute_variable.protobuf_cpp_type}} val) { proto_{{cpp_class_header}}.{{attribute_variable.mutable_proto_drilldown_calls}}set_{{attribute_variable.protobuf_field}}(val); }; {% endif %} - {{attribute_variable.serialize_proto_function}}(this->{{attribute_variable.attribute_name}}, setter); + {{attribute_variable.serialize_proto_function}}(this->{{attribute_variable.attribute_name}}, &state, setter); } {% endif %} {% endfor %} @@ -106,6 +108,7 @@ waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf() const { } void {{cpp_class}}::parse_protobuf(waypoint::{{cpp_class}} proto_{{cpp_class_header}}) { + ProtoReaderState state; {% for attribute_variable in attribute_variables %} {% if attribute_variable.is_component == false %} {% if not attribute_variable.is_proto_field_scalar %} @@ -115,7 +118,7 @@ void {{cpp_class}}::parse_protobuf(waypoint::{{cpp_class}} proto_{{cpp_class_hea {% else %} if (proto_{{cpp_class_header}}{{attribute_variable.proto_drilldown_calls}}.{{attribute_variable.protobuf_field}}() != 0) { {% endif %} - {{attribute_variable.deserialize_proto_function}}(proto_{{cpp_class_header}}{{attribute_variable.proto_drilldown_calls}}.{{attribute_variable.protobuf_field}}(), &(this->{{attribute_variable.attribute_name}}), &(this->{{attribute_variable.attribute_flag_name}}){% for side_effect in attribute_variable.deserialize_proto_side_effects %}, &(this->{{side_effect}}){% endfor %}); + {{attribute_variable.deserialize_proto_function}}(proto_{{cpp_class_header}}{{attribute_variable.proto_drilldown_calls}}.{{attribute_variable.protobuf_field}}(), &state, &(this->{{attribute_variable.attribute_name}}), &(this->{{attribute_variable.attribute_flag_name}}){% for side_effect in attribute_variable.deserialize_proto_side_effects %}, &(this->{{side_effect}}){% endfor %}); } {% endif %} {% endfor %} diff --git a/xml_converter/intigration_tests/testcases.py b/xml_converter/intigration_tests/testcases.py index 2b34e4a4..c7476af3 100644 --- a/xml_converter/intigration_tests/testcases.py +++ b/xml_converter/intigration_tests/testcases.py @@ -124,7 +124,7 @@ class Testcase: xml_input_paths=["./inputs/xml_cull_chirality"], expected_output_xml_path="./expected_outputs/xml_cull_chirality", expected_output_proto_path="./expected_outputs/proto_cull_chirality", - ). + ), Testcase( name="specialization_filter", xml_input_paths=["./inputs/xml_specialization_filter"], diff --git a/xml_converter/src/attribute/bool.cpp b/xml_converter/src/attribute/bool.cpp index 1ed2b8de..3349cba9 100644 --- a/xml_converter/src/attribute/bool.cpp +++ b/xml_converter/src/attribute/bool.cpp @@ -40,7 +40,10 @@ void xml_attribute_to_bool( // // Converts a bool into a fully qualified xml attribute string. //////////////////////////////////////////////////////////////////////////////// -string bool_to_xml_attribute(const string& attribute_name, const bool* value) { +string bool_to_xml_attribute( + const string& attribute_name, + XMLWriterState* state, + const bool* value) { if (*value) { return " " + attribute_name + "=\"true\""; } @@ -80,7 +83,10 @@ void inverted_xml_attribute_to_bool( // // Inverts and converts a bool into a fully qualified xml attribute string. //////////////////////////////////////////////////////////////////////////////// -string bool_to_inverted_xml_attribute(const string& attribute_name, const bool* value) { +string bool_to_inverted_xml_attribute( + const string& attribute_name, + XMLWriterState* state, + const bool* value) { if (*value) { return " " + attribute_name + "=\"false\""; } @@ -94,7 +100,11 @@ string bool_to_inverted_xml_attribute(const string& attribute_name, const bool* // // Parses a bool from a proto field. //////////////////////////////////////////////////////////////////////////////// -void proto_to_bool(bool input, bool* value, bool* is_set) { +void proto_to_bool( + bool input, + ProtoReaderState* state, + bool* value, + bool* is_set) { *value = input; *is_set = true; } @@ -104,6 +114,9 @@ void proto_to_bool(bool input, bool* value, bool* is_set) { // // Writes a bool to a proto using the provided setter function. //////////////////////////////////////////////////////////////////////////////// -void bool_to_proto(bool value, std::function setter) { +void bool_to_proto( + bool value, + ProtoWriterState* state, + std::function setter) { setter(value); } diff --git a/xml_converter/src/attribute/bool.hpp b/xml_converter/src/attribute/bool.hpp index 7cb61169..d6ce2854 100644 --- a/xml_converter/src/attribute/bool.hpp +++ b/xml_converter/src/attribute/bool.hpp @@ -5,7 +5,10 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "../state_structs/proto_reader_state.hpp" +#include "../state_structs/proto_writer_state.hpp" #include "../state_structs/xml_reader_state.hpp" +#include "../state_structs/xml_writer_state.hpp" class XMLError; @@ -18,6 +21,7 @@ void xml_attribute_to_bool( std::string bool_to_xml_attribute( const std::string& attribute_name, + XMLWriterState* state, const bool* value); void inverted_xml_attribute_to_bool( @@ -29,8 +33,16 @@ void inverted_xml_attribute_to_bool( std::string bool_to_inverted_xml_attribute( const std::string& attribute_name, + XMLWriterState* state, const bool* value); -void proto_to_bool(bool input, bool* value, bool* is_set); +void proto_to_bool( + bool input, + ProtoReaderState* state, + bool* value, + bool* is_set); -void bool_to_proto(bool value, std::function setter); +void bool_to_proto( + bool value, + ProtoWriterState* state, + std::function setter); diff --git a/xml_converter/src/attribute/color.cpp b/xml_converter/src/attribute/color.cpp index 3b42193d..82713096 100644 --- a/xml_converter/src/attribute/color.cpp +++ b/xml_converter/src/attribute/color.cpp @@ -96,7 +96,10 @@ void xml_attribute_to_color( // // Converts a color into a fully qualified xml attribute string. //////////////////////////////////////////////////////////////////////////////// -string color_to_xml_attribute(const string& attribute_name, const Color* value) { +string color_to_xml_attribute( + const string& attribute_name, + XMLWriterState* state, + const Color* value) { std::stringstream stream; std::string hex_string = "#"; @@ -119,7 +122,11 @@ string color_to_xml_attribute(const string& attribute_name, const Color* value) // // Parses a Color from a proto field. //////////////////////////////////////////////////////////////////////////////// -void proto_to_color(waypoint::RGBAColor input, Color* value, bool* is_set) { +void proto_to_color( + waypoint::RGBAColor input, + ProtoReaderState* state, + Color* value, + bool* is_set) { Color color; std::stringstream stream; uint32_t rgba = input.rgba_color(); @@ -138,7 +145,10 @@ void proto_to_color(waypoint::RGBAColor input, Color* value, bool* is_set) { // // Writes a Color to a proto using the provided setter function. //////////////////////////////////////////////////////////////////////////////// -void color_to_proto(Color value, std::function setter) { +void color_to_proto( + Color value, + ProtoWriterState* state, + std::function setter) { waypoint::RGBAColor* color = new waypoint::RGBAColor(); // The default RGB in burrito will be 000000 (i.e. black) // Default value of alpha in Burrito is 1.0 (i.e. 255) diff --git a/xml_converter/src/attribute/color.hpp b/xml_converter/src/attribute/color.hpp index 844935d6..9d797cb6 100644 --- a/xml_converter/src/attribute/color.hpp +++ b/xml_converter/src/attribute/color.hpp @@ -5,7 +5,10 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "../state_structs/proto_reader_state.hpp" +#include "../state_structs/proto_writer_state.hpp" #include "../state_structs/xml_reader_state.hpp" +#include "../state_structs/xml_writer_state.hpp" class XMLError; @@ -28,8 +31,18 @@ void xml_attribute_to_color( Color* value, bool* is_set); -std::string color_to_xml_attribute(const std::string& attribute_name, const Color* value); +std::string color_to_xml_attribute( + const std::string& attribute_name, + XMLWriterState* state, + const Color* value); -void proto_to_color(waypoint::RGBAColor input, Color* value, bool* is_set); +void proto_to_color( + waypoint::RGBAColor input, + ProtoReaderState* state, + Color* value, + bool* is_set); -void color_to_proto(Color value, std::function setter); +void color_to_proto( + Color value, + ProtoWriterState* state, + std::function setter); diff --git a/xml_converter/src/attribute/cull_chirality_gen.cpp b/xml_converter/src/attribute/cull_chirality_gen.cpp index 38910566..1decb63c 100644 --- a/xml_converter/src/attribute/cull_chirality_gen.cpp +++ b/xml_converter/src/attribute/cull_chirality_gen.cpp @@ -37,7 +37,10 @@ void xml_attribute_to_cull_chirality( *is_set = true; } -string cull_chirality_to_xml_attribute(const std::string& attribute_name, const CullChirality* value) { +string cull_chirality_to_xml_attribute( + const std::string& attribute_name, + XMLWriterState* state, + const CullChirality* value) { if (*value == CullChirality::none) { return " " + attribute_name + "=\"" + "none" + "\""; } @@ -52,7 +55,11 @@ string cull_chirality_to_xml_attribute(const std::string& attribute_name, const } } -void proto_to_cull_chirality(waypoint::CullChirality input, CullChirality* value, bool* is_set) { +void proto_to_cull_chirality( + waypoint::CullChirality input, + ProtoReaderState* state, + CullChirality* value, + bool* is_set) { switch (input) { case waypoint::CullChirality::none: *value = CullChirality::none; @@ -73,7 +80,10 @@ void proto_to_cull_chirality(waypoint::CullChirality input, CullChirality* value } } -void cull_chirality_to_proto(CullChirality value, std::function setter) { +void cull_chirality_to_proto( + CullChirality value, + ProtoWriterState* state, + std::function setter) { switch (value) { case CullChirality::none: setter(waypoint::CullChirality::none); diff --git a/xml_converter/src/attribute/cull_chirality_gen.hpp b/xml_converter/src/attribute/cull_chirality_gen.hpp index fe8dde21..039bdefd 100644 --- a/xml_converter/src/attribute/cull_chirality_gen.hpp +++ b/xml_converter/src/attribute/cull_chirality_gen.hpp @@ -5,7 +5,10 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "../state_structs/proto_reader_state.hpp" +#include "../state_structs/proto_writer_state.hpp" #include "../state_structs/xml_reader_state.hpp" +#include "../state_structs/xml_writer_state.hpp" #include "waypoint.pb.h" class XMLError; @@ -22,8 +25,18 @@ void xml_attribute_to_cull_chirality( CullChirality* value, bool* is_set); -std::string cull_chirality_to_xml_attribute(const std::string& attribute_name, const CullChirality* value); +std::string cull_chirality_to_xml_attribute( + const std::string& attribute_name, + XMLWriterState* state, + const CullChirality* value); -void proto_to_cull_chirality(waypoint::CullChirality input, CullChirality* value, bool* is_set); +void proto_to_cull_chirality( + waypoint::CullChirality input, + ProtoReaderState* state, + CullChirality* value, + bool* is_set); -void cull_chirality_to_proto(CullChirality value, std::function setter); +void cull_chirality_to_proto( + CullChirality value, + ProtoWriterState* state, + std::function setter); diff --git a/xml_converter/src/attribute/euler_rotation_gen.cpp b/xml_converter/src/attribute/euler_rotation_gen.cpp index 263f5c2e..e2cece3c 100644 --- a/xml_converter/src/attribute/euler_rotation_gen.cpp +++ b/xml_converter/src/attribute/euler_rotation_gen.cpp @@ -33,7 +33,10 @@ void xml_attribute_to_euler_rotation( *value = euler_rotation; *is_set = true; } -string euler_rotation_to_xml_attribute(const std::string& attribute_name, const EulerRotation* value) { +string euler_rotation_to_xml_attribute( + const std::string& attribute_name, + XMLWriterState* state, + const EulerRotation* value) { string output; output = to_string(value->x_rotation); output = output + "," + to_string(value->y_rotation); @@ -41,7 +44,11 @@ string euler_rotation_to_xml_attribute(const std::string& attribute_name, const return " " + attribute_name + "=\"" + output + "\""; } -void proto_to_euler_rotation(waypoint::EulerRotation input, EulerRotation* value, bool* is_set) { +void proto_to_euler_rotation( + waypoint::EulerRotation input, + ProtoReaderState* state, + EulerRotation* value, + bool* is_set) { EulerRotation euler_rotation; euler_rotation.x_rotation = input.x(); euler_rotation.y_rotation = input.y(); @@ -50,7 +57,10 @@ void proto_to_euler_rotation(waypoint::EulerRotation input, EulerRotation* value *is_set = true; } -void euler_rotation_to_proto(EulerRotation value, std::function setter) { +void euler_rotation_to_proto( + EulerRotation value, + ProtoWriterState* state, + std::function setter) { waypoint::EulerRotation* proto_euler_rotation = new waypoint::EulerRotation(); proto_euler_rotation->set_x(value.x_rotation); proto_euler_rotation->set_y(value.y_rotation); diff --git a/xml_converter/src/attribute/euler_rotation_gen.hpp b/xml_converter/src/attribute/euler_rotation_gen.hpp index fab2216a..91f5498c 100644 --- a/xml_converter/src/attribute/euler_rotation_gen.hpp +++ b/xml_converter/src/attribute/euler_rotation_gen.hpp @@ -5,7 +5,10 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "../state_structs/proto_reader_state.hpp" +#include "../state_structs/proto_writer_state.hpp" #include "../state_structs/xml_reader_state.hpp" +#include "../state_structs/xml_writer_state.hpp" class XMLError; namespace waypoint { @@ -29,8 +32,18 @@ void xml_attribute_to_euler_rotation( EulerRotation* value, bool* is_set); -std::string euler_rotation_to_xml_attribute(const std::string& attribute_name, const EulerRotation* value); +std::string euler_rotation_to_xml_attribute( + const std::string& attribute_name, + XMLWriterState* state, + const EulerRotation* value); -void proto_to_euler_rotation(waypoint::EulerRotation input, EulerRotation* value, bool* is_set); +void proto_to_euler_rotation( + waypoint::EulerRotation input, + ProtoReaderState* state, + EulerRotation* value, + bool* is_set); -void euler_rotation_to_proto(EulerRotation value, std::function setter); +void euler_rotation_to_proto( + EulerRotation value, + ProtoWriterState* state, + std::function setter); diff --git a/xml_converter/src/attribute/festival_filter_gen.cpp b/xml_converter/src/attribute/festival_filter_gen.cpp index 527985dc..79fe6435 100644 --- a/xml_converter/src/attribute/festival_filter_gen.cpp +++ b/xml_converter/src/attribute/festival_filter_gen.cpp @@ -64,7 +64,10 @@ void xml_attribute_to_festival_filter( *is_set = true; } -string festival_filter_to_xml_attribute(const std::string& attribute_name, const FestivalFilter* value) { +string festival_filter_to_xml_attribute( + const std::string& attribute_name, + XMLWriterState* state, + const FestivalFilter* value) { vector flag_values; if (value->dragonbash == true) { flag_values.push_back("dragonbash"); @@ -91,7 +94,11 @@ string festival_filter_to_xml_attribute(const std::string& attribute_name, const return " " + attribute_name + "=\"" + output + "\""; } -void proto_to_festival_filter(waypoint::FestivalFilter input, FestivalFilter* value, bool* is_set) { +void proto_to_festival_filter( + waypoint::FestivalFilter input, + ProtoReaderState* state, + FestivalFilter* value, + bool* is_set) { FestivalFilter festival_filter; festival_filter.dragonbash = input.dragonbash(); festival_filter.festival_of_the_four_winds = input.festival_of_the_four_winds(); @@ -104,7 +111,10 @@ void proto_to_festival_filter(waypoint::FestivalFilter input, FestivalFilter* va *is_set = true; } -void festival_filter_to_proto(FestivalFilter value, std::function setter) { +void festival_filter_to_proto( + FestivalFilter value, + ProtoWriterState* state, + std::function setter) { waypoint::FestivalFilter* proto_festival_filter = new waypoint::FestivalFilter(); bool should_write = false; proto_festival_filter->set_dragonbash(value.dragonbash); diff --git a/xml_converter/src/attribute/festival_filter_gen.hpp b/xml_converter/src/attribute/festival_filter_gen.hpp index bed11476..42ddc123 100644 --- a/xml_converter/src/attribute/festival_filter_gen.hpp +++ b/xml_converter/src/attribute/festival_filter_gen.hpp @@ -5,7 +5,10 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "../state_structs/proto_reader_state.hpp" +#include "../state_structs/proto_writer_state.hpp" #include "../state_structs/xml_reader_state.hpp" +#include "../state_structs/xml_writer_state.hpp" class XMLError; namespace waypoint { @@ -33,8 +36,18 @@ void xml_attribute_to_festival_filter( FestivalFilter* value, bool* is_set); -std::string festival_filter_to_xml_attribute(const std::string& attribute_name, const FestivalFilter* value); +std::string festival_filter_to_xml_attribute( + const std::string& attribute_name, + XMLWriterState* state, + const FestivalFilter* value); -void proto_to_festival_filter(waypoint::FestivalFilter input, FestivalFilter* value, bool* is_set); +void proto_to_festival_filter( + waypoint::FestivalFilter input, + ProtoReaderState* state, + FestivalFilter* value, + bool* is_set); -void festival_filter_to_proto(FestivalFilter value, std::function setter); +void festival_filter_to_proto( + FestivalFilter value, + ProtoWriterState* state, + std::function setter); diff --git a/xml_converter/src/attribute/float.cpp b/xml_converter/src/attribute/float.cpp index f6558fad..aa76a7b7 100644 --- a/xml_converter/src/attribute/float.cpp +++ b/xml_converter/src/attribute/float.cpp @@ -27,7 +27,10 @@ void xml_attribute_to_float( // // Converts a float into a fully qualified xml attribute string. //////////////////////////////////////////////////////////////////////////////// -string float_to_xml_attribute(const string& attribute_name, const float* value) { +string float_to_xml_attribute( + const string& attribute_name, + XMLWriterState* state, + const float* value) { return " " + attribute_name + "=\"" + to_string(*value) + "\""; } @@ -36,7 +39,11 @@ string float_to_xml_attribute(const string& attribute_name, const float* value) // // Parses a float from a proto field. //////////////////////////////////////////////////////////////////////////////// -void proto_to_float(float input, float* value, bool* is_set) { +void proto_to_float( + float input, + ProtoReaderState* state, + float* value, + bool* is_set) { *value = input; *is_set = true; } @@ -46,6 +53,9 @@ void proto_to_float(float input, float* value, bool* is_set) { // // Writes a float to a proto using the provided setter function. //////////////////////////////////////////////////////////////////////////////// -void float_to_proto(float value, std::function setter) { +void float_to_proto( + float value, + ProtoWriterState* state, + std::function setter) { setter(value); } diff --git a/xml_converter/src/attribute/float.hpp b/xml_converter/src/attribute/float.hpp index 5560ca64..3b7f2cc5 100644 --- a/xml_converter/src/attribute/float.hpp +++ b/xml_converter/src/attribute/float.hpp @@ -5,7 +5,10 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "../state_structs/proto_reader_state.hpp" +#include "../state_structs/proto_writer_state.hpp" #include "../state_structs/xml_reader_state.hpp" +#include "../state_structs/xml_writer_state.hpp" class XMLError; @@ -16,8 +19,18 @@ void xml_attribute_to_float( float* value, bool* is_set); -std::string float_to_xml_attribute(const std::string& attribute_name, const float* value); +std::string float_to_xml_attribute( + const std::string& attribute_name, + XMLWriterState* state, + const float* value); -void proto_to_float(float input, float* value, bool* is_set); +void proto_to_float( + float input, + ProtoReaderState* state, + float* value, + bool* is_set); -void float_to_proto(float value, std::function setter); +void float_to_proto( + float value, + ProtoWriterState* state, + std::function setter); diff --git a/xml_converter/src/attribute/image.cpp b/xml_converter/src/attribute/image.cpp index 469860ad..f225ce5b 100644 --- a/xml_converter/src/attribute/image.cpp +++ b/xml_converter/src/attribute/image.cpp @@ -30,7 +30,10 @@ void xml_attribute_to_image( // // Converts an image into a fully qualified xml attribute string. //////////////////////////////////////////////////////////////////////////////// -string image_to_xml_attribute(const string& attribute_name, const Image* value) { +string image_to_xml_attribute( + const string& attribute_name, + XMLWriterState* state, + const Image* value) { return " " + attribute_name + "=\"" + value->path + "\""; } @@ -39,7 +42,11 @@ string image_to_xml_attribute(const string& attribute_name, const Image* value) // // Parses an Image from proto //////////////////////////////////////////////////////////////////////////////// -void proto_to_image(waypoint::TexturePath input, Image* value, bool* is_set) { +void proto_to_image( + waypoint::TexturePath input, + ProtoReaderState* state, + Image* value, + bool* is_set) { Image image; image.path = input.path(); *value = image; @@ -51,7 +58,10 @@ void proto_to_image(waypoint::TexturePath input, Image* value, bool* is_set) { // // Writes a string filepath to a proto using the provided setter function. //////////////////////////////////////////////////////////////////////////////// -void image_to_proto(Image value, std::function setter) { +void image_to_proto( + Image value, + ProtoWriterState* state, + std::function setter) { waypoint::TexturePath* texture = new waypoint::TexturePath(); texture->set_path(value.path); setter(texture); diff --git a/xml_converter/src/attribute/image.hpp b/xml_converter/src/attribute/image.hpp index 66570760..f1705a4a 100644 --- a/xml_converter/src/attribute/image.hpp +++ b/xml_converter/src/attribute/image.hpp @@ -5,7 +5,10 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "../state_structs/proto_reader_state.hpp" +#include "../state_structs/proto_writer_state.hpp" #include "../state_structs/xml_reader_state.hpp" +#include "../state_structs/xml_writer_state.hpp" class XMLError; @@ -25,8 +28,18 @@ void xml_attribute_to_image( Image* value, bool* is_set); -std::string image_to_xml_attribute(const std::string& attribute_name, const Image* value); +std::string image_to_xml_attribute( + const std::string& attribute_name, + XMLWriterState* state, + const Image* value); -void proto_to_image(waypoint::TexturePath input, Image* value, bool* is_set); +void proto_to_image( + waypoint::TexturePath input, + ProtoReaderState* state, + Image* value, + bool* is_set); -void image_to_proto(Image value, std::function setter); +void image_to_proto( + Image value, + ProtoWriterState* state, + std::function setter); diff --git a/xml_converter/src/attribute/int.cpp b/xml_converter/src/attribute/int.cpp index 4bdf9424..62d769c3 100644 --- a/xml_converter/src/attribute/int.cpp +++ b/xml_converter/src/attribute/int.cpp @@ -42,7 +42,10 @@ void xml_attribute_to_int( // // Converts an int a fully qualified xml attribute string. //////////////////////////////////////////////////////////////////////////////// -string int_to_xml_attribute(const string& attribute_name, const int* value) { +string int_to_xml_attribute( + const string& attribute_name, + XMLWriterState* state, + const int* value) { return " " + attribute_name + "=\"" + to_string(*value) + "\""; } @@ -51,7 +54,11 @@ string int_to_xml_attribute(const string& attribute_name, const int* value) { // // Parses an int from a proto field. //////////////////////////////////////////////////////////////////////////////// -void proto_to_int(int input, int* value, bool* is_set) { +void proto_to_int( + int input, + ProtoReaderState* state, + int* value, + bool* is_set) { *value = input; *is_set = true; } @@ -61,6 +68,9 @@ void proto_to_int(int input, int* value, bool* is_set) { // // Writes a int to a proto using the provided setter function. //////////////////////////////////////////////////////////////////////////////// -void int_to_proto(int value, std::function setter) { +void int_to_proto( + int value, + ProtoWriterState* state, + std::function setter) { setter(value); } diff --git a/xml_converter/src/attribute/int.hpp b/xml_converter/src/attribute/int.hpp index b9b8e637..4ed1e393 100644 --- a/xml_converter/src/attribute/int.hpp +++ b/xml_converter/src/attribute/int.hpp @@ -5,7 +5,10 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "../state_structs/proto_reader_state.hpp" +#include "../state_structs/proto_writer_state.hpp" #include "../state_structs/xml_reader_state.hpp" +#include "../state_structs/xml_writer_state.hpp" class XMLError; @@ -16,8 +19,18 @@ void xml_attribute_to_int( int* value, bool* is_set); -std::string int_to_xml_attribute(const std::string& attribute_name, const int* value); +std::string int_to_xml_attribute( + const std::string& attribute_name, + XMLWriterState* state, + const int* value); -void proto_to_int(int input, int* value, bool* is_set); +void proto_to_int( + int input, + ProtoReaderState* state, + int* value, + bool* is_set); -void int_to_proto(int value, std::function setter); +void int_to_proto( + int value, + ProtoWriterState* state, + std::function setter); diff --git a/xml_converter/src/attribute/map_type_filter_gen.cpp b/xml_converter/src/attribute/map_type_filter_gen.cpp index 497bf6f6..6d3331aa 100644 --- a/xml_converter/src/attribute/map_type_filter_gen.cpp +++ b/xml_converter/src/attribute/map_type_filter_gen.cpp @@ -129,7 +129,10 @@ void xml_attribute_to_map_type_filter( *is_set = true; } -string map_type_filter_to_xml_attribute(const std::string& attribute_name, const MapTypeFilter* value) { +string map_type_filter_to_xml_attribute( + const std::string& attribute_name, + XMLWriterState* state, + const MapTypeFilter* value) { vector flag_values; if (value->unknown_map == true) { flag_values.push_back("unknown"); @@ -207,7 +210,11 @@ string map_type_filter_to_xml_attribute(const std::string& attribute_name, const return " " + attribute_name + "=\"" + output + "\""; } -void proto_to_map_type_filter(waypoint::MapTypeFilter input, MapTypeFilter* value, bool* is_set) { +void proto_to_map_type_filter( + waypoint::MapTypeFilter input, + ProtoReaderState* state, + MapTypeFilter* value, + bool* is_set) { MapTypeFilter map_type_filter; map_type_filter.unknown_map = input.unknown_map(); map_type_filter.redirect_map = input.redirect_map(); @@ -237,7 +244,10 @@ void proto_to_map_type_filter(waypoint::MapTypeFilter input, MapTypeFilter* valu *is_set = true; } -void map_type_filter_to_proto(MapTypeFilter value, std::function setter) { +void map_type_filter_to_proto( + MapTypeFilter value, + ProtoWriterState* state, + std::function setter) { waypoint::MapTypeFilter* proto_map_type_filter = new waypoint::MapTypeFilter(); bool should_write = false; proto_map_type_filter->set_unknown_map(value.unknown_map); diff --git a/xml_converter/src/attribute/map_type_filter_gen.hpp b/xml_converter/src/attribute/map_type_filter_gen.hpp index 525c3470..05b5d749 100644 --- a/xml_converter/src/attribute/map_type_filter_gen.hpp +++ b/xml_converter/src/attribute/map_type_filter_gen.hpp @@ -5,7 +5,10 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "../state_structs/proto_reader_state.hpp" +#include "../state_structs/proto_writer_state.hpp" #include "../state_structs/xml_reader_state.hpp" +#include "../state_structs/xml_writer_state.hpp" class XMLError; namespace waypoint { @@ -50,8 +53,18 @@ void xml_attribute_to_map_type_filter( MapTypeFilter* value, bool* is_set); -std::string map_type_filter_to_xml_attribute(const std::string& attribute_name, const MapTypeFilter* value); +std::string map_type_filter_to_xml_attribute( + const std::string& attribute_name, + XMLWriterState* state, + const MapTypeFilter* value); -void proto_to_map_type_filter(waypoint::MapTypeFilter input, MapTypeFilter* value, bool* is_set); +void proto_to_map_type_filter( + waypoint::MapTypeFilter input, + ProtoReaderState* state, + MapTypeFilter* value, + bool* is_set); -void map_type_filter_to_proto(MapTypeFilter value, std::function setter); +void map_type_filter_to_proto( + MapTypeFilter value, + ProtoWriterState* state, + std::function setter); diff --git a/xml_converter/src/attribute/marker_category.cpp b/xml_converter/src/attribute/marker_category.cpp index ace9a974..e47f8098 100644 --- a/xml_converter/src/attribute/marker_category.cpp +++ b/xml_converter/src/attribute/marker_category.cpp @@ -27,7 +27,10 @@ void xml_attribute_to_marker_category( // // Converts a marker category a fully qualified xml attribute string. //////////////////////////////////////////////////////////////////////////////// -std::string marker_category_to_xml_attribute(const std::string& attribute_name, const MarkerCategory* value) { +std::string marker_category_to_xml_attribute( + const std::string& attribute_name, + XMLWriterState* state, + const MarkerCategory* value) { return " " + attribute_name + "=\"" + value->category + "\""; } @@ -36,7 +39,11 @@ std::string marker_category_to_xml_attribute(const std::string& attribute_name, // // Parses a marker category from a proto field. //////////////////////////////////////////////////////////////////////////////// -void proto_to_marker_category(waypoint::Category input, MarkerCategory* value, bool* is_set) { +void proto_to_marker_category( + waypoint::Category input, + ProtoReaderState* state, + MarkerCategory* value, + bool* is_set) { MarkerCategory marker_category; marker_category.category = input.name(); *value = marker_category; @@ -48,7 +55,10 @@ void proto_to_marker_category(waypoint::Category input, MarkerCategory* value, b // // Returns a waypoint::Category so that it can be saved to proto. //////////////////////////////////////////////////////////////////////////////// -void marker_category_to_proto(MarkerCategory value, std::function setter) { +void marker_category_to_proto( + MarkerCategory value, + ProtoWriterState* state, + std::function setter) { waypoint::Category* category = new waypoint::Category(); category->set_name(value.category); setter(category); diff --git a/xml_converter/src/attribute/marker_category.hpp b/xml_converter/src/attribute/marker_category.hpp index eed42161..4d1d1548 100644 --- a/xml_converter/src/attribute/marker_category.hpp +++ b/xml_converter/src/attribute/marker_category.hpp @@ -5,7 +5,10 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "../state_structs/proto_reader_state.hpp" +#include "../state_structs/proto_writer_state.hpp" #include "../state_structs/xml_reader_state.hpp" +#include "../state_structs/xml_writer_state.hpp" class XMLError; @@ -25,8 +28,18 @@ void xml_attribute_to_marker_category( MarkerCategory* value, bool* is_set); -std::string marker_category_to_xml_attribute(const std::string& attribute_name, const MarkerCategory* value); +std::string marker_category_to_xml_attribute( + const std::string& attribute_name, + XMLWriterState* state, + const MarkerCategory* value); -void proto_to_marker_category(waypoint::Category input, MarkerCategory* value, bool* is_set); +void proto_to_marker_category( + waypoint::Category input, + ProtoReaderState* state, + MarkerCategory* value, + bool* is_set); -void marker_category_to_proto(MarkerCategory value, std::function setter); +void marker_category_to_proto( + MarkerCategory value, + ProtoWriterState* state, + std::function setter); diff --git a/xml_converter/src/attribute/mount_filter_gen.cpp b/xml_converter/src/attribute/mount_filter_gen.cpp index 262854bc..8dc824b6 100644 --- a/xml_converter/src/attribute/mount_filter_gen.cpp +++ b/xml_converter/src/attribute/mount_filter_gen.cpp @@ -73,7 +73,10 @@ void xml_attribute_to_mount_filter( *is_set = true; } -string mount_filter_to_xml_attribute(const std::string& attribute_name, const MountFilter* value) { +string mount_filter_to_xml_attribute( + const std::string& attribute_name, + XMLWriterState* state, + const MountFilter* value) { vector flag_values; if (value->raptor == true) { flag_values.push_back("raptor"); @@ -109,7 +112,11 @@ string mount_filter_to_xml_attribute(const std::string& attribute_name, const Mo return " " + attribute_name + "=\"" + output + "\""; } -void proto_to_mount_filter(waypoint::MountFilter input, MountFilter* value, bool* is_set) { +void proto_to_mount_filter( + waypoint::MountFilter input, + ProtoReaderState* state, + MountFilter* value, + bool* is_set) { MountFilter mount_filter; mount_filter.raptor = input.raptor(); mount_filter.springer = input.springer(); @@ -125,7 +132,10 @@ void proto_to_mount_filter(waypoint::MountFilter input, MountFilter* value, bool *is_set = true; } -void mount_filter_to_proto(MountFilter value, std::function setter) { +void mount_filter_to_proto( + MountFilter value, + ProtoWriterState* state, + std::function setter) { waypoint::MountFilter* proto_mount_filter = new waypoint::MountFilter(); bool should_write = false; proto_mount_filter->set_raptor(value.raptor); diff --git a/xml_converter/src/attribute/mount_filter_gen.hpp b/xml_converter/src/attribute/mount_filter_gen.hpp index 86726ffd..6931c27c 100644 --- a/xml_converter/src/attribute/mount_filter_gen.hpp +++ b/xml_converter/src/attribute/mount_filter_gen.hpp @@ -5,7 +5,10 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "../state_structs/proto_reader_state.hpp" +#include "../state_structs/proto_writer_state.hpp" #include "../state_structs/xml_reader_state.hpp" +#include "../state_structs/xml_writer_state.hpp" class XMLError; namespace waypoint { @@ -36,8 +39,18 @@ void xml_attribute_to_mount_filter( MountFilter* value, bool* is_set); -std::string mount_filter_to_xml_attribute(const std::string& attribute_name, const MountFilter* value); +std::string mount_filter_to_xml_attribute( + const std::string& attribute_name, + XMLWriterState* state, + const MountFilter* value); -void proto_to_mount_filter(waypoint::MountFilter input, MountFilter* value, bool* is_set); +void proto_to_mount_filter( + waypoint::MountFilter input, + ProtoReaderState* state, + MountFilter* value, + bool* is_set); -void mount_filter_to_proto(MountFilter value, std::function setter); +void mount_filter_to_proto( + MountFilter value, + ProtoWriterState* state, + std::function setter); diff --git a/xml_converter/src/attribute/position_gen.cpp b/xml_converter/src/attribute/position_gen.cpp index e0455502..40d284e0 100644 --- a/xml_converter/src/attribute/position_gen.cpp +++ b/xml_converter/src/attribute/position_gen.cpp @@ -34,7 +34,11 @@ void xml_attribute_to_position( *is_set = true; } -void proto_to_position(waypoint::Position input, Position* value, bool* is_set) { +void proto_to_position( + waypoint::Position input, + ProtoReaderState* state, + Position* value, + bool* is_set) { Position position; position.x_position = input.x(); position.y_position = input.y(); @@ -43,7 +47,10 @@ void proto_to_position(waypoint::Position input, Position* value, bool* is_set) *is_set = true; } -void position_to_proto(Position value, std::function setter) { +void position_to_proto( + Position value, + ProtoWriterState* state, + std::function setter) { waypoint::Position* proto_position = new waypoint::Position(); proto_position->set_x(value.x_position); proto_position->set_y(value.y_position); diff --git a/xml_converter/src/attribute/position_gen.hpp b/xml_converter/src/attribute/position_gen.hpp index 129ec7d4..c4a2c5a5 100644 --- a/xml_converter/src/attribute/position_gen.hpp +++ b/xml_converter/src/attribute/position_gen.hpp @@ -5,7 +5,10 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "../state_structs/proto_reader_state.hpp" +#include "../state_structs/proto_writer_state.hpp" #include "../state_structs/xml_reader_state.hpp" +#include "../state_structs/xml_writer_state.hpp" class XMLError; namespace waypoint { @@ -29,8 +32,18 @@ void xml_attribute_to_position( Position* value, bool* is_set); -std::string position_to_xml_attribute(const std::string& attribute_name, const Position* value); +std::string position_to_xml_attribute( + const std::string& attribute_name, + XMLWriterState* state, + const Position* value); -void proto_to_position(waypoint::Position input, Position* value, bool* is_set); +void proto_to_position( + waypoint::Position input, + ProtoReaderState* state, + Position* value, + bool* is_set); -void position_to_proto(Position value, std::function setter); +void position_to_proto( + Position value, + ProtoWriterState* state, + std::function setter); diff --git a/xml_converter/src/attribute/profession_filter_gen.cpp b/xml_converter/src/attribute/profession_filter_gen.cpp index 3f3bf629..32ec9329 100644 --- a/xml_converter/src/attribute/profession_filter_gen.cpp +++ b/xml_converter/src/attribute/profession_filter_gen.cpp @@ -69,7 +69,10 @@ void xml_attribute_to_profession_filter( *is_set = true; } -string profession_filter_to_xml_attribute(const std::string& attribute_name, const ProfessionFilter* value) { +string profession_filter_to_xml_attribute( + const std::string& attribute_name, + XMLWriterState* state, + const ProfessionFilter* value) { vector flag_values; if (value->guardian == true) { flag_values.push_back("guardian"); @@ -102,7 +105,11 @@ string profession_filter_to_xml_attribute(const std::string& attribute_name, con return " " + attribute_name + "=\"" + output + "\""; } -void proto_to_profession_filter(waypoint::ProfessionFilter input, ProfessionFilter* value, bool* is_set) { +void proto_to_profession_filter( + waypoint::ProfessionFilter input, + ProtoReaderState* state, + ProfessionFilter* value, + bool* is_set) { ProfessionFilter profession_filter; profession_filter.guardian = input.guardian(); profession_filter.warrior = input.warrior(); @@ -117,7 +124,10 @@ void proto_to_profession_filter(waypoint::ProfessionFilter input, ProfessionFilt *is_set = true; } -void profession_filter_to_proto(ProfessionFilter value, std::function setter) { +void profession_filter_to_proto( + ProfessionFilter value, + ProtoWriterState* state, + std::function setter) { waypoint::ProfessionFilter* proto_profession_filter = new waypoint::ProfessionFilter(); bool should_write = false; proto_profession_filter->set_guardian(value.guardian); diff --git a/xml_converter/src/attribute/profession_filter_gen.hpp b/xml_converter/src/attribute/profession_filter_gen.hpp index 43bf8100..70ee4575 100644 --- a/xml_converter/src/attribute/profession_filter_gen.hpp +++ b/xml_converter/src/attribute/profession_filter_gen.hpp @@ -5,7 +5,10 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "../state_structs/proto_reader_state.hpp" +#include "../state_structs/proto_writer_state.hpp" #include "../state_structs/xml_reader_state.hpp" +#include "../state_structs/xml_writer_state.hpp" class XMLError; namespace waypoint { @@ -35,8 +38,18 @@ void xml_attribute_to_profession_filter( ProfessionFilter* value, bool* is_set); -std::string profession_filter_to_xml_attribute(const std::string& attribute_name, const ProfessionFilter* value); +std::string profession_filter_to_xml_attribute( + const std::string& attribute_name, + XMLWriterState* state, + const ProfessionFilter* value); -void proto_to_profession_filter(waypoint::ProfessionFilter input, ProfessionFilter* value, bool* is_set); +void proto_to_profession_filter( + waypoint::ProfessionFilter input, + ProtoReaderState* state, + ProfessionFilter* value, + bool* is_set); -void profession_filter_to_proto(ProfessionFilter value, std::function setter); +void profession_filter_to_proto( + ProfessionFilter value, + ProtoWriterState* state, + std::function setter); diff --git a/xml_converter/src/attribute/reset_behavior_gen.cpp b/xml_converter/src/attribute/reset_behavior_gen.cpp index 666560ac..47730fc3 100644 --- a/xml_converter/src/attribute/reset_behavior_gen.cpp +++ b/xml_converter/src/attribute/reset_behavior_gen.cpp @@ -82,7 +82,10 @@ void xml_attribute_to_reset_behavior( *is_set = true; } -string reset_behavior_to_xml_attribute(const std::string& attribute_name, const ResetBehavior* value) { +string reset_behavior_to_xml_attribute( + const std::string& attribute_name, + XMLWriterState* state, + const ResetBehavior* value) { if (*value == ResetBehavior::always_visible) { return " " + attribute_name + "=\"" + "0" + "\""; } @@ -142,7 +145,11 @@ string reset_behavior_to_xml_attribute(const std::string& attribute_name, const } } -void proto_to_reset_behavior(waypoint::ResetBehavior input, ResetBehavior* value, bool* is_set) { +void proto_to_reset_behavior( + waypoint::ResetBehavior input, + ProtoReaderState* state, + ResetBehavior* value, + bool* is_set) { switch (input) { case waypoint::ResetBehavior::always_visible: *value = ResetBehavior::always_visible; @@ -187,7 +194,10 @@ void proto_to_reset_behavior(waypoint::ResetBehavior input, ResetBehavior* value } } -void reset_behavior_to_proto(ResetBehavior value, std::function setter) { +void reset_behavior_to_proto( + ResetBehavior value, + ProtoWriterState* state, + std::function setter) { switch (value) { case ResetBehavior::always_visible: setter(waypoint::ResetBehavior::always_visible); diff --git a/xml_converter/src/attribute/reset_behavior_gen.hpp b/xml_converter/src/attribute/reset_behavior_gen.hpp index d99f3a8b..6e79adfd 100644 --- a/xml_converter/src/attribute/reset_behavior_gen.hpp +++ b/xml_converter/src/attribute/reset_behavior_gen.hpp @@ -5,7 +5,10 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "../state_structs/proto_reader_state.hpp" +#include "../state_structs/proto_writer_state.hpp" #include "../state_structs/xml_reader_state.hpp" +#include "../state_structs/xml_writer_state.hpp" #include "waypoint.pb.h" class XMLError; @@ -28,8 +31,18 @@ void xml_attribute_to_reset_behavior( ResetBehavior* value, bool* is_set); -std::string reset_behavior_to_xml_attribute(const std::string& attribute_name, const ResetBehavior* value); +std::string reset_behavior_to_xml_attribute( + const std::string& attribute_name, + XMLWriterState* state, + const ResetBehavior* value); -void proto_to_reset_behavior(waypoint::ResetBehavior input, ResetBehavior* value, bool* is_set); +void proto_to_reset_behavior( + waypoint::ResetBehavior input, + ProtoReaderState* state, + ResetBehavior* value, + bool* is_set); -void reset_behavior_to_proto(ResetBehavior value, std::function setter); +void reset_behavior_to_proto( + ResetBehavior value, + ProtoWriterState* state, + std::function setter); diff --git a/xml_converter/src/attribute/specialization_filter_gen.cpp b/xml_converter/src/attribute/specialization_filter_gen.cpp index 60541983..4849a8d0 100644 --- a/xml_converter/src/attribute/specialization_filter_gen.cpp +++ b/xml_converter/src/attribute/specialization_filter_gen.cpp @@ -402,7 +402,10 @@ void xml_attribute_to_specialization_filter( *is_set = true; } -string specialization_filter_to_xml_attribute(const std::string& attribute_name, const SpecializationFilter* value) { +string specialization_filter_to_xml_attribute( + const std::string& attribute_name, + XMLWriterState* state, + const SpecializationFilter* value) { vector flag_values; if (value->elementalist_tempest == true) { flag_values.push_back("48"); @@ -624,7 +627,11 @@ string specialization_filter_to_xml_attribute(const std::string& attribute_name, return " " + attribute_name + "=\"" + output + "\""; } -void proto_to_specialization_filter(waypoint::SpecializationFilter input, SpecializationFilter* value, bool* is_set) { +void proto_to_specialization_filter( + waypoint::SpecializationFilter input, + ProtoReaderState* state, + SpecializationFilter* value, + bool* is_set) { SpecializationFilter specialization_filter; specialization_filter.elementalist_tempest = input.elementalist_tempest(); specialization_filter.engineer_scrapper = input.engineer_scrapper(); @@ -702,7 +709,10 @@ void proto_to_specialization_filter(waypoint::SpecializationFilter input, Specia *is_set = true; } -void specialization_filter_to_proto(SpecializationFilter value, std::function setter) { +void specialization_filter_to_proto( + SpecializationFilter value, + ProtoWriterState* state, + std::function setter) { waypoint::SpecializationFilter* proto_specialization_filter = new waypoint::SpecializationFilter(); bool should_write = false; proto_specialization_filter->set_elementalist_tempest(value.elementalist_tempest); diff --git a/xml_converter/src/attribute/specialization_filter_gen.hpp b/xml_converter/src/attribute/specialization_filter_gen.hpp index c3042e7d..7661117d 100644 --- a/xml_converter/src/attribute/specialization_filter_gen.hpp +++ b/xml_converter/src/attribute/specialization_filter_gen.hpp @@ -5,7 +5,10 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "../state_structs/proto_reader_state.hpp" +#include "../state_structs/proto_writer_state.hpp" #include "../state_structs/xml_reader_state.hpp" +#include "../state_structs/xml_writer_state.hpp" class XMLError; namespace waypoint { @@ -98,8 +101,18 @@ void xml_attribute_to_specialization_filter( SpecializationFilter* value, bool* is_set); -std::string specialization_filter_to_xml_attribute(const std::string& attribute_name, const SpecializationFilter* value); +std::string specialization_filter_to_xml_attribute( + const std::string& attribute_name, + XMLWriterState* state, + const SpecializationFilter* value); -void proto_to_specialization_filter(waypoint::SpecializationFilter input, SpecializationFilter* value, bool* is_set); +void proto_to_specialization_filter( + waypoint::SpecializationFilter input, + ProtoReaderState* state, + SpecializationFilter* value, + bool* is_set); -void specialization_filter_to_proto(SpecializationFilter value, std::function setter); +void specialization_filter_to_proto( + SpecializationFilter value, + ProtoWriterState* state, + std::function setter); diff --git a/xml_converter/src/attribute/species_filter_gen.cpp b/xml_converter/src/attribute/species_filter_gen.cpp index b33d4a64..b032771c 100644 --- a/xml_converter/src/attribute/species_filter_gen.cpp +++ b/xml_converter/src/attribute/species_filter_gen.cpp @@ -53,7 +53,10 @@ void xml_attribute_to_species_filter( *is_set = true; } -string species_filter_to_xml_attribute(const std::string& attribute_name, const SpeciesFilter* value) { +string species_filter_to_xml_attribute( + const std::string& attribute_name, + XMLWriterState* state, + const SpeciesFilter* value) { vector flag_values; if (value->asura == true) { flag_values.push_back("asura"); @@ -74,7 +77,11 @@ string species_filter_to_xml_attribute(const std::string& attribute_name, const return " " + attribute_name + "=\"" + output + "\""; } -void proto_to_species_filter(waypoint::SpeciesFilter input, SpeciesFilter* value, bool* is_set) { +void proto_to_species_filter( + waypoint::SpeciesFilter input, + ProtoReaderState* state, + SpeciesFilter* value, + bool* is_set) { SpeciesFilter species_filter; species_filter.asura = input.asura(); species_filter.charr = input.charr(); @@ -85,7 +92,10 @@ void proto_to_species_filter(waypoint::SpeciesFilter input, SpeciesFilter* value *is_set = true; } -void species_filter_to_proto(SpeciesFilter value, std::function setter) { +void species_filter_to_proto( + SpeciesFilter value, + ProtoWriterState* state, + std::function setter) { waypoint::SpeciesFilter* proto_species_filter = new waypoint::SpeciesFilter(); bool should_write = false; proto_species_filter->set_asura(value.asura); diff --git a/xml_converter/src/attribute/species_filter_gen.hpp b/xml_converter/src/attribute/species_filter_gen.hpp index a372fe3d..388bf206 100644 --- a/xml_converter/src/attribute/species_filter_gen.hpp +++ b/xml_converter/src/attribute/species_filter_gen.hpp @@ -5,7 +5,10 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "../state_structs/proto_reader_state.hpp" +#include "../state_structs/proto_writer_state.hpp" #include "../state_structs/xml_reader_state.hpp" +#include "../state_structs/xml_writer_state.hpp" class XMLError; namespace waypoint { @@ -31,8 +34,18 @@ void xml_attribute_to_species_filter( SpeciesFilter* value, bool* is_set); -std::string species_filter_to_xml_attribute(const std::string& attribute_name, const SpeciesFilter* value); +std::string species_filter_to_xml_attribute( + const std::string& attribute_name, + XMLWriterState* state, + const SpeciesFilter* value); -void proto_to_species_filter(waypoint::SpeciesFilter input, SpeciesFilter* value, bool* is_set); +void proto_to_species_filter( + waypoint::SpeciesFilter input, + ProtoReaderState* state, + SpeciesFilter* value, + bool* is_set); -void species_filter_to_proto(SpeciesFilter value, std::function setter); +void species_filter_to_proto( + SpeciesFilter value, + ProtoWriterState* state, + std::function setter); diff --git a/xml_converter/src/attribute/string.cpp b/xml_converter/src/attribute/string.cpp index a2b5c813..c8b5fe7f 100644 --- a/xml_converter/src/attribute/string.cpp +++ b/xml_converter/src/attribute/string.cpp @@ -30,7 +30,10 @@ void xml_attribute_to_string( // // Converts a string into a fully qualified xml attribute string. //////////////////////////////////////////////////////////////////////////////// -string string_to_xml_attribute(const string& attribute_name, const string* value) { +string string_to_xml_attribute( + const string& attribute_name, + XMLWriterState* state, + const string* value) { return " " + attribute_name + "=\"" + *value + "\""; } @@ -39,7 +42,11 @@ string string_to_xml_attribute(const string& attribute_name, const string* value // // Parses a string from a proto field. //////////////////////////////////////////////////////////////////////////////// -void proto_to_string(string input, string* value, bool* is_set) { +void proto_to_string( + string input, + ProtoReaderState* state, + string* value, + bool* is_set) { *value = input; *is_set = true; } @@ -49,12 +56,16 @@ void proto_to_string(string input, string* value, bool* is_set) { // // Writes a string to a proto using the provided setter function. //////////////////////////////////////////////////////////////////////////////// -void string_to_proto(std::string value, std::function setter) { +void string_to_proto( + std::string value, + ProtoWriterState* state, + std::function setter) { setter(value); } void proto_display_name_to_display_name_and_name( std::string input, + ProtoReaderState* state, std::string* display_name, bool* is_display_name_set, std::string* name, diff --git a/xml_converter/src/attribute/string.hpp b/xml_converter/src/attribute/string.hpp index 81f65c47..be418930 100644 --- a/xml_converter/src/attribute/string.hpp +++ b/xml_converter/src/attribute/string.hpp @@ -5,7 +5,10 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "../state_structs/proto_reader_state.hpp" +#include "../state_structs/proto_writer_state.hpp" #include "../state_structs/xml_reader_state.hpp" +#include "../state_structs/xml_writer_state.hpp" class XMLError; @@ -16,14 +19,30 @@ void xml_attribute_to_string( std::string* value, bool* is_set); -std::string string_to_xml_attribute(const std::string& attribute_name, const std::string* value); +std::string string_to_xml_attribute( + const std::string& attribute_name, + XMLWriterState* state, + const std::string* value); -void proto_to_string(std::string input, std::string* value, bool* is_set); +void proto_to_string( + std::string input, + ProtoReaderState* state, + std::string* value, + bool* is_set); -void string_to_proto(std::string value, std::function setter); +void string_to_proto( + std::string value, + ProtoWriterState* state, + std::function setter); // These do not belong here, they should be split out into attribute specific // files. However we dont have a way to dynamically include attribute specific // source files yet so they are going to live here until we build that out. -void proto_display_name_to_display_name_and_name(std::string input, std::string* display_name, bool* is_display_name_set, std::string* name, bool* is_name_set); +void proto_display_name_to_display_name_and_name( + std::string input, + ProtoReaderState* state, + std::string* display_name, + bool* is_display_name_set, + std::string* name, + bool* is_name_set); #define do_nothing(...) diff --git a/xml_converter/src/attribute/trail_data.cpp b/xml_converter/src/attribute/trail_data.cpp index f4d5177f..bcd96217 100644 --- a/xml_converter/src/attribute/trail_data.cpp +++ b/xml_converter/src/attribute/trail_data.cpp @@ -86,7 +86,10 @@ void xml_attribute_to_trail_data( // TODO: Write ".trl" files from data // TOOD: Determine a better trail path name //////////////////////////////////////////////////////////////////////////////// -string trail_data_to_xml_attribute(const string& attribute_name, const TrailData* value) { +string trail_data_to_xml_attribute( + const string& attribute_name, + XMLWriterState* state, + const TrailData* value) { return " " + attribute_name + "=\"" + "temp_name_of_trail.trl" + "\""; } @@ -95,7 +98,11 @@ string trail_data_to_xml_attribute(const string& attribute_name, const TrailData // // Parses a TrailData from a proto field. //////////////////////////////////////////////////////////////////////////////// -void proto_to_trail_data(waypoint::TrailData input, TrailData* value, bool* is_set) { +void proto_to_trail_data( + waypoint::TrailData input, + ProtoReaderState* state, + TrailData* value, + bool* is_set) { TrailData trail_data; trail_data.points_x = {input.points_x().begin(), input.points_x().end()}; trail_data.points_y = {input.points_y().begin(), input.points_y().end()}; @@ -109,7 +116,10 @@ void proto_to_trail_data(waypoint::TrailData input, TrailData* value, bool* is_s // // Saves a TrailData object to a proto using the provided setter function. //////////////////////////////////////////////////////////////////////////////// -void trail_data_to_proto(TrailData value, std::function setter) { +void trail_data_to_proto( + TrailData value, + ProtoWriterState* state, + std::function setter) { waypoint::TrailData* trail_data = new waypoint::TrailData(); *trail_data->mutable_points_x() = {value.points_x.begin(), value.points_x.end()}; *trail_data->mutable_points_y() = {value.points_y.begin(), value.points_y.end()}; diff --git a/xml_converter/src/attribute/trail_data.hpp b/xml_converter/src/attribute/trail_data.hpp index 6afe66eb..733b03f1 100644 --- a/xml_converter/src/attribute/trail_data.hpp +++ b/xml_converter/src/attribute/trail_data.hpp @@ -5,7 +5,10 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "../state_structs/proto_reader_state.hpp" +#include "../state_structs/proto_writer_state.hpp" #include "../state_structs/xml_reader_state.hpp" +#include "../state_structs/xml_writer_state.hpp" class XMLError; @@ -29,8 +32,18 @@ void xml_attribute_to_trail_data( int* map_id_value, bool* is_map_id_set); -std::string trail_data_to_xml_attribute(const std::string& attribute_name, const TrailData* value); +std::string trail_data_to_xml_attribute( + const std::string& attribute_name, + XMLWriterState* state, + const TrailData* value); -void proto_to_trail_data(waypoint::TrailData input, TrailData* value, bool* is_set); +void proto_to_trail_data( + waypoint::TrailData input, + ProtoReaderState* state, + TrailData* value, + bool* is_set); -void trail_data_to_proto(TrailData value, std::function setter); +void trail_data_to_proto( + TrailData value, + ProtoWriterState* state, + std::function setter); diff --git a/xml_converter/src/attribute/unique_id.cpp b/xml_converter/src/attribute/unique_id.cpp index a0267bd7..70dc953d 100644 --- a/xml_converter/src/attribute/unique_id.cpp +++ b/xml_converter/src/attribute/unique_id.cpp @@ -30,7 +30,10 @@ void xml_attribute_to_unique_id( // // Converts a unique id into a fully qualified xml attribute string. //////////////////////////////////////////////////////////////////////////////// -string unique_id_to_xml_attribute(const string& attribute_name, const UniqueId* value) { +string unique_id_to_xml_attribute( + const string& attribute_name, + XMLWriterState* state, + const UniqueId* value) { return " " + attribute_name + "=\"" + base64_encode(&(value->guid[0]), value->guid.size()) + "\""; } @@ -39,7 +42,11 @@ string unique_id_to_xml_attribute(const string& attribute_name, const UniqueId* // // Parses a UniqueId from a proto field. //////////////////////////////////////////////////////////////////////////////// -void proto_to_unique_id(std::string input, UniqueId* value, bool* is_set) { +void proto_to_unique_id( + std::string input, + ProtoReaderState* state, + UniqueId* value, + bool* is_set) { UniqueId unique_id; std::vector guid(input.begin(), input.end()); unique_id.guid = guid; @@ -52,6 +59,9 @@ void proto_to_unique_id(std::string input, UniqueId* value, bool* is_set) { // // Writes a bool to a proto using the provided setter function. //////////////////////////////////////////////////////////////////////////////// -void unique_id_to_proto(UniqueId value, std::function setter) { +void unique_id_to_proto( + UniqueId value, + ProtoWriterState* state, + std::function setter) { setter(std::string(value.guid.begin(), value.guid.end())); } diff --git a/xml_converter/src/attribute/unique_id.hpp b/xml_converter/src/attribute/unique_id.hpp index 9b6a50d2..e34a7df0 100644 --- a/xml_converter/src/attribute/unique_id.hpp +++ b/xml_converter/src/attribute/unique_id.hpp @@ -6,7 +6,10 @@ #include #include "../rapidxml-1.13/rapidxml.hpp" +#include "../state_structs/proto_reader_state.hpp" +#include "../state_structs/proto_writer_state.hpp" #include "../state_structs/xml_reader_state.hpp" +#include "../state_structs/xml_writer_state.hpp" class XMLError; @@ -26,8 +29,18 @@ void xml_attribute_to_unique_id( UniqueId* value, bool* is_set); -std::string unique_id_to_xml_attribute(const std::string& attribute_name, const UniqueId* value); +std::string unique_id_to_xml_attribute( + const std::string& attribute_name, + XMLWriterState* state, + const UniqueId* value); -void proto_to_unique_id(std::string input, UniqueId* value, bool* is_set); +void proto_to_unique_id( + std::string input, + ProtoReaderState* state, + UniqueId* value, + bool* is_set); -void unique_id_to_proto(UniqueId value, std::function setter); +void unique_id_to_proto( + UniqueId value, + ProtoWriterState* state, + std::function setter); diff --git a/xml_converter/src/category_gen.cpp b/xml_converter/src/category_gen.cpp index 0d4eb48d..5139b2aa 100644 --- a/xml_converter/src/category_gen.cpp +++ b/xml_converter/src/category_gen.cpp @@ -58,22 +58,23 @@ bool Category::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector Category::as_xml() const { + XMLWriterState state; vector xml_node_contents; xml_node_contents.push_back("default_visibility_is_set) { - xml_node_contents.push_back(bool_to_xml_attribute("DefaultToggle", &this->default_visibility)); + xml_node_contents.push_back(bool_to_xml_attribute("DefaultToggle", &state, &this->default_visibility)); } if (this->display_name_is_set) { - xml_node_contents.push_back(string_to_xml_attribute("DisplayName", &this->display_name)); + xml_node_contents.push_back(string_to_xml_attribute("DisplayName", &state, &this->display_name)); } if (this->is_separator_is_set) { - xml_node_contents.push_back(bool_to_xml_attribute("IsSeparator", &this->is_separator)); + xml_node_contents.push_back(bool_to_xml_attribute("IsSeparator", &state, &this->is_separator)); } if (this->name_is_set) { - xml_node_contents.push_back(string_to_xml_attribute("Name", &this->name)); + xml_node_contents.push_back(string_to_xml_attribute("Name", &state, &this->name)); } if (this->tooltip_description_is_set) { - xml_node_contents.push_back(string_to_xml_attribute("TipDescription", &this->tooltip_description)); + xml_node_contents.push_back(string_to_xml_attribute("TipDescription", &state, &this->tooltip_description)); } xml_node_contents.push_back(">\n"); @@ -91,44 +92,46 @@ vector Category::as_xml() const { } waypoint::Category Category::as_protobuf() const { + ProtoWriterState state; waypoint::Category proto_category; if (this->default_visibility_is_set) { std::function setter = [&proto_category](bool val) { proto_category.set_default_visibility(val); }; - bool_to_proto(this->default_visibility, setter); + bool_to_proto(this->default_visibility, &state, setter); } if (this->display_name_is_set) { std::function setter = [&proto_category](std::string val) { proto_category.set_name(val); }; - string_to_proto(this->display_name, setter); + string_to_proto(this->display_name, &state, setter); } if (this->is_separator_is_set) { std::function setter = [&proto_category](bool val) { proto_category.set_is_separator(val); }; - bool_to_proto(this->is_separator, setter); + bool_to_proto(this->is_separator, &state, setter); } if (this->name_is_set) { std::function setter = [&proto_category](std::string val) { proto_category.set_name(val); }; - do_nothing(this->name, setter); + do_nothing(this->name, &state, setter); } if (this->tooltip_description_is_set) { std::function setter = [&proto_category](std::string val) { proto_category.set_tip_description(val); }; - string_to_proto(this->tooltip_description, setter); + string_to_proto(this->tooltip_description, &state, setter); } return proto_category; } void Category::parse_protobuf(waypoint::Category proto_category) { + ProtoReaderState state; if (proto_category.default_visibility() != 0) { - proto_to_bool(proto_category.default_visibility(), &(this->default_visibility), &(this->default_visibility_is_set)); + proto_to_bool(proto_category.default_visibility(), &state, &(this->default_visibility), &(this->default_visibility_is_set)); } if (proto_category.name() != "") { - proto_display_name_to_display_name_and_name(proto_category.name(), &(this->display_name), &(this->display_name_is_set), &(this->name), &(this->name_is_set)); + proto_display_name_to_display_name_and_name(proto_category.name(), &state, &(this->display_name), &(this->display_name_is_set), &(this->name), &(this->name_is_set)); } if (proto_category.is_separator() != 0) { - proto_to_bool(proto_category.is_separator(), &(this->is_separator), &(this->is_separator_is_set)); + proto_to_bool(proto_category.is_separator(), &state, &(this->is_separator), &(this->is_separator_is_set)); } if (proto_category.name() != "") { - do_nothing(proto_category.name(), &(this->name), &(this->name_is_set)); + do_nothing(proto_category.name(), &state, &(this->name), &(this->name_is_set)); } if (proto_category.tip_description() != "") { - proto_to_string(proto_category.tip_description(), &(this->tooltip_description), &(this->tooltip_description_is_set)); + proto_to_string(proto_category.tip_description(), &state, &(this->tooltip_description), &(this->tooltip_description_is_set)); } } diff --git a/xml_converter/src/icon_gen.cpp b/xml_converter/src/icon_gen.cpp index b4a16d3a..d3327134 100644 --- a/xml_converter/src/icon_gen.cpp +++ b/xml_converter/src/icon_gen.cpp @@ -253,492 +253,495 @@ bool Icon::validate_attributes_of_type_marker_category() { } vector Icon::as_xml() const { + XMLWriterState state; vector xml_node_contents; xml_node_contents.push_back("achievement_bitmask_is_set) { - xml_node_contents.push_back(int_to_xml_attribute("AchievementBit", &this->achievement_bitmask)); + xml_node_contents.push_back(int_to_xml_attribute("AchievementBit", &state, &this->achievement_bitmask)); } if (this->achievement_id_is_set) { - xml_node_contents.push_back(int_to_xml_attribute("AchievementId", &this->achievement_id)); + xml_node_contents.push_back(int_to_xml_attribute("AchievementId", &state, &this->achievement_id)); } if (this->auto_trigger_is_set) { - xml_node_contents.push_back(bool_to_xml_attribute("AutoTrigger", &this->auto_trigger)); + xml_node_contents.push_back(bool_to_xml_attribute("AutoTrigger", &state, &this->auto_trigger)); } if (this->bounce_delay_is_set) { - xml_node_contents.push_back(float_to_xml_attribute("BounceDelay", &this->bounce_delay)); + xml_node_contents.push_back(float_to_xml_attribute("BounceDelay", &state, &this->bounce_delay)); } if (this->bounce_duration_is_set) { - xml_node_contents.push_back(float_to_xml_attribute("BounceDuration", &this->bounce_duration)); + xml_node_contents.push_back(float_to_xml_attribute("BounceDuration", &state, &this->bounce_duration)); } if (this->bounce_height_is_set) { - xml_node_contents.push_back(float_to_xml_attribute("BounceHeight", &this->bounce_height)); + xml_node_contents.push_back(float_to_xml_attribute("BounceHeight", &state, &this->bounce_height)); } if (this->category_is_set) { - xml_node_contents.push_back(marker_category_to_xml_attribute("Type", &this->category)); + xml_node_contents.push_back(marker_category_to_xml_attribute("Type", &state, &this->category)); } if (this->color_is_set) { - xml_node_contents.push_back(color_to_xml_attribute("Color", &this->color)); + xml_node_contents.push_back(color_to_xml_attribute("Color", &state, &this->color)); } if (this->color_is_set) { - xml_node_contents.push_back(float_to_xml_attribute("Alpha", &this->color.alpha)); + xml_node_contents.push_back(float_to_xml_attribute("Alpha", &state, &this->color.alpha)); } if (this->copy_clipboard_is_set) { - xml_node_contents.push_back(string_to_xml_attribute("Copy", &this->copy_clipboard)); + xml_node_contents.push_back(string_to_xml_attribute("Copy", &state, &this->copy_clipboard)); } if (this->copy_message_is_set) { - xml_node_contents.push_back(string_to_xml_attribute("CopyMessage", &this->copy_message)); + xml_node_contents.push_back(string_to_xml_attribute("CopyMessage", &state, &this->copy_message)); } if (this->cull_chirality_is_set) { - xml_node_contents.push_back(cull_chirality_to_xml_attribute("Cull", &this->cull_chirality)); + xml_node_contents.push_back(cull_chirality_to_xml_attribute("Cull", &state, &this->cull_chirality)); } if (this->disable_player_cutout_is_set) { - xml_node_contents.push_back(bool_to_inverted_xml_attribute("CanFade", &this->disable_player_cutout)); + xml_node_contents.push_back(bool_to_inverted_xml_attribute("CanFade", &state, &this->disable_player_cutout)); } if (this->distance_fade_end_is_set) { - xml_node_contents.push_back(float_to_xml_attribute("FadeFar", &this->distance_fade_end)); + xml_node_contents.push_back(float_to_xml_attribute("FadeFar", &state, &this->distance_fade_end)); } if (this->distance_fade_start_is_set) { - xml_node_contents.push_back(float_to_xml_attribute("FadeNear", &this->distance_fade_start)); + xml_node_contents.push_back(float_to_xml_attribute("FadeNear", &state, &this->distance_fade_start)); } if (this->festival_filter_is_set) { - xml_node_contents.push_back(festival_filter_to_xml_attribute("Festival", &this->festival_filter)); + xml_node_contents.push_back(festival_filter_to_xml_attribute("Festival", &state, &this->festival_filter)); } if (this->guid_is_set) { - xml_node_contents.push_back(unique_id_to_xml_attribute("GUID", &this->guid)); + xml_node_contents.push_back(unique_id_to_xml_attribute("GUID", &state, &this->guid)); } if (this->has_countdown_is_set) { - xml_node_contents.push_back(bool_to_xml_attribute("HasCountdown", &this->has_countdown)); + xml_node_contents.push_back(bool_to_xml_attribute("HasCountdown", &state, &this->has_countdown)); } if (this->height_offset_is_set) { - xml_node_contents.push_back(float_to_xml_attribute("HeightOffset", &this->height_offset)); + xml_node_contents.push_back(float_to_xml_attribute("HeightOffset", &state, &this->height_offset)); } if (this->hide_category_is_set) { - xml_node_contents.push_back(marker_category_to_xml_attribute("Hide", &this->hide_category)); + xml_node_contents.push_back(marker_category_to_xml_attribute("Hide", &state, &this->hide_category)); } if (this->icon_is_set) { - xml_node_contents.push_back(image_to_xml_attribute("IconFile", &this->icon)); + xml_node_contents.push_back(image_to_xml_attribute("IconFile", &state, &this->icon)); } if (this->icon_size_is_set) { - xml_node_contents.push_back(float_to_xml_attribute("IconSize", &this->icon_size)); + xml_node_contents.push_back(float_to_xml_attribute("IconSize", &state, &this->icon_size)); } if (this->info_message_is_set) { - xml_node_contents.push_back(string_to_xml_attribute("Info", &this->info_message)); + xml_node_contents.push_back(string_to_xml_attribute("Info", &state, &this->info_message)); } if (this->invert_visibility_is_set) { - xml_node_contents.push_back(bool_to_xml_attribute("InvertBehavior", &this->invert_visibility)); + xml_node_contents.push_back(bool_to_xml_attribute("InvertBehavior", &state, &this->invert_visibility)); } if (this->map_display_size_is_set) { - xml_node_contents.push_back(int_to_xml_attribute("MapDisplaySize", &this->map_display_size)); + xml_node_contents.push_back(int_to_xml_attribute("MapDisplaySize", &state, &this->map_display_size)); } if (this->map_id_is_set) { - xml_node_contents.push_back(int_to_xml_attribute("MapID", &this->map_id)); + xml_node_contents.push_back(int_to_xml_attribute("MapID", &state, &this->map_id)); } if (this->map_type_filter_is_set) { - xml_node_contents.push_back(map_type_filter_to_xml_attribute("MapType", &this->map_type_filter)); + xml_node_contents.push_back(map_type_filter_to_xml_attribute("MapType", &state, &this->map_type_filter)); } if (this->maximum_size_on_screen_is_set) { - xml_node_contents.push_back(int_to_xml_attribute("MaxSize", &this->maximum_size_on_screen)); + xml_node_contents.push_back(int_to_xml_attribute("MaxSize", &state, &this->maximum_size_on_screen)); } if (this->minimum_size_on_screen_is_set) { - xml_node_contents.push_back(int_to_xml_attribute("MinSize", &this->minimum_size_on_screen)); + xml_node_contents.push_back(int_to_xml_attribute("MinSize", &state, &this->minimum_size_on_screen)); } if (this->mount_filter_is_set) { - xml_node_contents.push_back(mount_filter_to_xml_attribute("Mount", &this->mount_filter)); + xml_node_contents.push_back(mount_filter_to_xml_attribute("Mount", &state, &this->mount_filter)); } if (this->position_is_set) { - xml_node_contents.push_back(float_to_xml_attribute("XPos", &this->position.x_position)); + xml_node_contents.push_back(float_to_xml_attribute("XPos", &state, &this->position.x_position)); } if (this->position_is_set) { - xml_node_contents.push_back(float_to_xml_attribute("YPos", &this->position.y_position)); + xml_node_contents.push_back(float_to_xml_attribute("YPos", &state, &this->position.y_position)); } if (this->position_is_set) { - xml_node_contents.push_back(float_to_xml_attribute("ZPos", &this->position.z_position)); + xml_node_contents.push_back(float_to_xml_attribute("ZPos", &state, &this->position.z_position)); } if (this->profession_filter_is_set) { - xml_node_contents.push_back(profession_filter_to_xml_attribute("Profession", &this->profession_filter)); + xml_node_contents.push_back(profession_filter_to_xml_attribute("Profession", &state, &this->profession_filter)); } if (this->render_ingame_is_set) { - xml_node_contents.push_back(bool_to_xml_attribute("IngameVisibility", &this->render_ingame)); + xml_node_contents.push_back(bool_to_xml_attribute("IngameVisibility", &state, &this->render_ingame)); } if (this->render_on_map_is_set) { - xml_node_contents.push_back(bool_to_xml_attribute("MapVisibility", &this->render_on_map)); + xml_node_contents.push_back(bool_to_xml_attribute("MapVisibility", &state, &this->render_on_map)); } if (this->render_on_minimap_is_set) { - xml_node_contents.push_back(bool_to_xml_attribute("MinimapVisibility", &this->render_on_minimap)); + xml_node_contents.push_back(bool_to_xml_attribute("MinimapVisibility", &state, &this->render_on_minimap)); } if (this->reset_behavior_is_set) { - xml_node_contents.push_back(reset_behavior_to_xml_attribute("Behavior", &this->reset_behavior)); + xml_node_contents.push_back(reset_behavior_to_xml_attribute("Behavior", &state, &this->reset_behavior)); } if (this->reset_length_is_set) { - xml_node_contents.push_back(float_to_xml_attribute("ResetLength", &this->reset_length)); + xml_node_contents.push_back(float_to_xml_attribute("ResetLength", &state, &this->reset_length)); } if (this->scale_on_map_with_zoom_is_set) { - xml_node_contents.push_back(bool_to_xml_attribute("ScaleOnMapWithZoom", &this->scale_on_map_with_zoom)); + xml_node_contents.push_back(bool_to_xml_attribute("ScaleOnMapWithZoom", &state, &this->scale_on_map_with_zoom)); } if (this->schedule_is_set) { - xml_node_contents.push_back(string_to_xml_attribute("Schedule", &this->schedule)); + xml_node_contents.push_back(string_to_xml_attribute("Schedule", &state, &this->schedule)); } if (this->schedule_duration_is_set) { - xml_node_contents.push_back(float_to_xml_attribute("ScheduleDuration", &this->schedule_duration)); + xml_node_contents.push_back(float_to_xml_attribute("ScheduleDuration", &state, &this->schedule_duration)); } if (this->show_category_is_set) { - xml_node_contents.push_back(marker_category_to_xml_attribute("Show", &this->show_category)); + xml_node_contents.push_back(marker_category_to_xml_attribute("Show", &state, &this->show_category)); } if (this->specialization_filter_is_set) { - xml_node_contents.push_back(specialization_filter_to_xml_attribute("Specialization", &this->specialization_filter)); + xml_node_contents.push_back(specialization_filter_to_xml_attribute("Specialization", &state, &this->specialization_filter)); } if (this->species_filter_is_set) { - xml_node_contents.push_back(species_filter_to_xml_attribute("Race", &this->species_filter)); + xml_node_contents.push_back(species_filter_to_xml_attribute("Race", &state, &this->species_filter)); } if (this->toggle_category_is_set) { - xml_node_contents.push_back(marker_category_to_xml_attribute("Toggle", &this->toggle_category)); + xml_node_contents.push_back(marker_category_to_xml_attribute("Toggle", &state, &this->toggle_category)); } if (this->tooltip_description_is_set) { - xml_node_contents.push_back(string_to_xml_attribute("TipDescription", &this->tooltip_description)); + xml_node_contents.push_back(string_to_xml_attribute("TipDescription", &state, &this->tooltip_description)); } if (this->tooltip_name_is_set) { - xml_node_contents.push_back(string_to_xml_attribute("TipName", &this->tooltip_name)); + xml_node_contents.push_back(string_to_xml_attribute("TipName", &state, &this->tooltip_name)); } if (this->trigger_range_is_set) { - xml_node_contents.push_back(float_to_xml_attribute("TriggerRange", &this->trigger_range)); + xml_node_contents.push_back(float_to_xml_attribute("TriggerRange", &state, &this->trigger_range)); } xml_node_contents.push_back("/>"); return xml_node_contents; } waypoint::Icon Icon::as_protobuf() const { + ProtoWriterState state; waypoint::Icon proto_icon; if (this->achievement_bitmask_is_set) { std::function setter = [&proto_icon](int val) { proto_icon.set_achievement_bit(val); }; - int_to_proto(this->achievement_bitmask, setter); + int_to_proto(this->achievement_bitmask, &state, setter); } if (this->achievement_id_is_set) { std::function setter = [&proto_icon](int val) { proto_icon.set_achievement_id(val); }; - int_to_proto(this->achievement_id, setter); + int_to_proto(this->achievement_id, &state, setter); } if (this->auto_trigger_is_set) { std::function setter = [&proto_icon](bool val) { proto_icon.mutable_trigger()->set_auto_trigger(val); }; - bool_to_proto(this->auto_trigger, setter); + bool_to_proto(this->auto_trigger, &state, setter); } if (this->bounce_delay_is_set) { std::function setter = [&proto_icon](float val) { proto_icon.mutable_trigger()->set_bounce_delay(val); }; - float_to_proto(this->bounce_delay, setter); + float_to_proto(this->bounce_delay, &state, setter); } if (this->bounce_duration_is_set) { std::function setter = [&proto_icon](float val) { proto_icon.mutable_trigger()->set_bounce_duration(val); }; - float_to_proto(this->bounce_duration, setter); + float_to_proto(this->bounce_duration, &state, setter); } if (this->bounce_height_is_set) { std::function setter = [&proto_icon](float val) { proto_icon.mutable_trigger()->set_bounce_height(val); }; - float_to_proto(this->bounce_height, setter); + float_to_proto(this->bounce_height, &state, setter); } if (this->category_is_set) { std::function setter = [&proto_icon](bool val) { proto_icon.set_category(val); }; - do_nothing(this->category, setter); + do_nothing(this->category, &state, setter); } if (this->color_is_set) { std::function setter = [&proto_icon](waypoint::RGBAColor* val) { proto_icon.set_allocated_rgba_color(val); }; - color_to_proto(this->color, setter); + color_to_proto(this->color, &state, setter); } if (this->copy_clipboard_is_set) { std::function setter = [&proto_icon](std::string val) { proto_icon.mutable_trigger()->set_action_copy_clipboard(val); }; - string_to_proto(this->copy_clipboard, setter); + string_to_proto(this->copy_clipboard, &state, setter); } if (this->copy_message_is_set) { std::function setter = [&proto_icon](std::string val) { proto_icon.mutable_trigger()->set_action_copy_message(val); }; - string_to_proto(this->copy_message, setter); + string_to_proto(this->copy_message, &state, setter); } if (this->cull_chirality_is_set) { std::function setter = [&proto_icon](waypoint::CullChirality val) { proto_icon.set_cull_chirality(val); }; - cull_chirality_to_proto(this->cull_chirality, setter); + cull_chirality_to_proto(this->cull_chirality, &state, setter); } if (this->disable_player_cutout_is_set) { std::function setter = [&proto_icon](bool val) { proto_icon.set_disable_player_cutout(val); }; - bool_to_proto(this->disable_player_cutout, setter); + bool_to_proto(this->disable_player_cutout, &state, setter); } if (this->distance_fade_end_is_set) { std::function setter = [&proto_icon](float val) { proto_icon.set_distance_fade_end(val); }; - float_to_proto(this->distance_fade_end, setter); + float_to_proto(this->distance_fade_end, &state, setter); } if (this->distance_fade_start_is_set) { std::function setter = [&proto_icon](float val) { proto_icon.set_distance_fade_start(val); }; - float_to_proto(this->distance_fade_start, setter); + float_to_proto(this->distance_fade_start, &state, setter); } if (this->euler_rotation_is_set) { std::function setter = [&proto_icon](waypoint::EulerRotation* val) { proto_icon.set_allocated_euler_rotation(val); }; - euler_rotation_to_proto(this->euler_rotation, setter); + euler_rotation_to_proto(this->euler_rotation, &state, setter); } if (this->festival_filter_is_set) { std::function setter = [&proto_icon](waypoint::FestivalFilter* val) { proto_icon.set_allocated_festival_filter(val); }; - festival_filter_to_proto(this->festival_filter, setter); + festival_filter_to_proto(this->festival_filter, &state, setter); } if (this->guid_is_set) { std::function setter = [&proto_icon](std::string val) { proto_icon.set_guid(val); }; - unique_id_to_proto(this->guid, setter); + unique_id_to_proto(this->guid, &state, setter); } if (this->has_countdown_is_set) { std::function setter = [&proto_icon](bool val) { proto_icon.mutable_trigger()->set_has_countdown(val); }; - bool_to_proto(this->has_countdown, setter); + bool_to_proto(this->has_countdown, &state, setter); } if (this->height_offset_is_set) { std::function setter = [&proto_icon](float val) { proto_icon.set_height_offset(val); }; - float_to_proto(this->height_offset, setter); + float_to_proto(this->height_offset, &state, setter); } if (this->hide_category_is_set) { std::function setter = [&proto_icon](waypoint::Category* val) { proto_icon.mutable_trigger()->set_allocated_action_hide_category(val); }; - marker_category_to_proto(this->hide_category, setter); + marker_category_to_proto(this->hide_category, &state, setter); } if (this->icon_is_set) { std::function setter = [&proto_icon](waypoint::TexturePath* val) { proto_icon.set_allocated_texture_path(val); }; - image_to_proto(this->icon, setter); + image_to_proto(this->icon, &state, setter); } if (this->icon_size_is_set) { std::function setter = [&proto_icon](float val) { proto_icon.set_tentative__scale(val); }; - float_to_proto(this->icon_size, setter); + float_to_proto(this->icon_size, &state, setter); } if (this->info_message_is_set) { std::function setter = [&proto_icon](std::string val) { proto_icon.mutable_trigger()->set_action_info_message(val); }; - string_to_proto(this->info_message, setter); + string_to_proto(this->info_message, &state, setter); } if (this->invert_visibility_is_set) { std::function setter = [&proto_icon](bool val) { proto_icon.mutable_trigger()->set_invert_display(val); }; - bool_to_proto(this->invert_visibility, setter); + bool_to_proto(this->invert_visibility, &state, setter); } if (this->map_display_size_is_set) { std::function setter = [&proto_icon](int val) { proto_icon.set_map_display_size(val); }; - int_to_proto(this->map_display_size, setter); + int_to_proto(this->map_display_size, &state, setter); } if (this->map_id_is_set) { std::function setter = [&proto_icon](int val) { proto_icon.set_map_id(val); }; - int_to_proto(this->map_id, setter); + int_to_proto(this->map_id, &state, setter); } if (this->map_type_filter_is_set) { std::function setter = [&proto_icon](waypoint::MapTypeFilter* val) { proto_icon.set_allocated_map_type_filter(val); }; - map_type_filter_to_proto(this->map_type_filter, setter); + map_type_filter_to_proto(this->map_type_filter, &state, setter); } if (this->maximum_size_on_screen_is_set) { std::function setter = [&proto_icon](int val) { proto_icon.set_maximum_size_on_screen(val); }; - int_to_proto(this->maximum_size_on_screen, setter); + int_to_proto(this->maximum_size_on_screen, &state, setter); } if (this->minimum_size_on_screen_is_set) { std::function setter = [&proto_icon](int val) { proto_icon.set_minimum_size_on_screen(val); }; - int_to_proto(this->minimum_size_on_screen, setter); + int_to_proto(this->minimum_size_on_screen, &state, setter); } if (this->mount_filter_is_set) { std::function setter = [&proto_icon](waypoint::MountFilter* val) { proto_icon.set_allocated_mount_filter(val); }; - mount_filter_to_proto(this->mount_filter, setter); + mount_filter_to_proto(this->mount_filter, &state, setter); } if (this->position_is_set) { std::function setter = [&proto_icon](waypoint::Position* val) { proto_icon.set_allocated_position(val); }; - position_to_proto(this->position, setter); + position_to_proto(this->position, &state, setter); } if (this->profession_filter_is_set) { std::function setter = [&proto_icon](waypoint::ProfessionFilter* val) { proto_icon.set_allocated_profession_filter(val); }; - profession_filter_to_proto(this->profession_filter, setter); + profession_filter_to_proto(this->profession_filter, &state, setter); } if (this->render_ingame_is_set) { std::function setter = [&proto_icon](bool val) { proto_icon.set_tentative__render_ingame(val); }; - bool_to_proto(this->render_ingame, setter); + bool_to_proto(this->render_ingame, &state, setter); } if (this->render_on_map_is_set) { std::function setter = [&proto_icon](bool val) { proto_icon.set_tentative__render_on_map(val); }; - bool_to_proto(this->render_on_map, setter); + bool_to_proto(this->render_on_map, &state, setter); } if (this->render_on_minimap_is_set) { std::function setter = [&proto_icon](bool val) { proto_icon.set_tentative__render_on_minimap(val); }; - bool_to_proto(this->render_on_minimap, setter); + bool_to_proto(this->render_on_minimap, &state, setter); } if (this->reset_behavior_is_set) { std::function setter = [&proto_icon](waypoint::ResetBehavior val) { proto_icon.mutable_trigger()->set_reset_behavior(val); }; - reset_behavior_to_proto(this->reset_behavior, setter); + reset_behavior_to_proto(this->reset_behavior, &state, setter); } if (this->reset_length_is_set) { std::function setter = [&proto_icon](float val) { proto_icon.mutable_trigger()->set_reset_length(val); }; - float_to_proto(this->reset_length, setter); + float_to_proto(this->reset_length, &state, setter); } if (this->scale_on_map_with_zoom_is_set) { std::function setter = [&proto_icon](bool val) { proto_icon.set_scale_on_map_with_zoom(val); }; - bool_to_proto(this->scale_on_map_with_zoom, setter); + bool_to_proto(this->scale_on_map_with_zoom, &state, setter); } if (this->schedule_is_set) { std::function setter = [&proto_icon](std::string val) { proto_icon.set_bhdraft__schedule(val); }; - string_to_proto(this->schedule, setter); + string_to_proto(this->schedule, &state, setter); } if (this->schedule_duration_is_set) { std::function setter = [&proto_icon](float val) { proto_icon.set_bhdraft__schedule_duration(val); }; - float_to_proto(this->schedule_duration, setter); + float_to_proto(this->schedule_duration, &state, setter); } if (this->show_category_is_set) { std::function setter = [&proto_icon](waypoint::Category* val) { proto_icon.mutable_trigger()->set_allocated_action_show_category(val); }; - marker_category_to_proto(this->show_category, setter); + marker_category_to_proto(this->show_category, &state, setter); } if (this->specialization_filter_is_set) { std::function setter = [&proto_icon](waypoint::SpecializationFilter* val) { proto_icon.set_allocated_specialization_filter(val); }; - specialization_filter_to_proto(this->specialization_filter, setter); + specialization_filter_to_proto(this->specialization_filter, &state, setter); } if (this->species_filter_is_set) { std::function setter = [&proto_icon](waypoint::SpeciesFilter* val) { proto_icon.set_allocated_species_filter(val); }; - species_filter_to_proto(this->species_filter, setter); + species_filter_to_proto(this->species_filter, &state, setter); } if (this->toggle_category_is_set) { std::function setter = [&proto_icon](waypoint::Category* val) { proto_icon.mutable_trigger()->set_allocated_action_toggle_category(val); }; - marker_category_to_proto(this->toggle_category, setter); + marker_category_to_proto(this->toggle_category, &state, setter); } if (this->tooltip_description_is_set) { std::function setter = [&proto_icon](std::string val) { proto_icon.set_tip_description(val); }; - string_to_proto(this->tooltip_description, setter); + string_to_proto(this->tooltip_description, &state, setter); } if (this->tooltip_name_is_set) { std::function setter = [&proto_icon](std::string val) { proto_icon.set_tip_name(val); }; - string_to_proto(this->tooltip_name, setter); + string_to_proto(this->tooltip_name, &state, setter); } if (this->trigger_range_is_set) { std::function setter = [&proto_icon](float val) { proto_icon.mutable_trigger()->set_range(val); }; - float_to_proto(this->trigger_range, setter); + float_to_proto(this->trigger_range, &state, setter); } return proto_icon; } void Icon::parse_protobuf(waypoint::Icon proto_icon) { + ProtoReaderState state; if (proto_icon.achievement_bit() != 0) { - proto_to_int(proto_icon.achievement_bit(), &(this->achievement_bitmask), &(this->achievement_bitmask_is_set)); + proto_to_int(proto_icon.achievement_bit(), &state, &(this->achievement_bitmask), &(this->achievement_bitmask_is_set)); } if (proto_icon.achievement_id() != 0) { - proto_to_int(proto_icon.achievement_id(), &(this->achievement_id), &(this->achievement_id_is_set)); + proto_to_int(proto_icon.achievement_id(), &state, &(this->achievement_id), &(this->achievement_id_is_set)); } if (proto_icon.trigger().auto_trigger() != 0) { - proto_to_bool(proto_icon.trigger().auto_trigger(), &(this->auto_trigger), &(this->auto_trigger_is_set)); + proto_to_bool(proto_icon.trigger().auto_trigger(), &state, &(this->auto_trigger), &(this->auto_trigger_is_set)); } if (proto_icon.trigger().bounce_delay() != 0) { - proto_to_float(proto_icon.trigger().bounce_delay(), &(this->bounce_delay), &(this->bounce_delay_is_set)); + proto_to_float(proto_icon.trigger().bounce_delay(), &state, &(this->bounce_delay), &(this->bounce_delay_is_set)); } if (proto_icon.trigger().bounce_duration() != 0) { - proto_to_float(proto_icon.trigger().bounce_duration(), &(this->bounce_duration), &(this->bounce_duration_is_set)); + proto_to_float(proto_icon.trigger().bounce_duration(), &state, &(this->bounce_duration), &(this->bounce_duration_is_set)); } if (proto_icon.trigger().bounce_height() != 0) { - proto_to_float(proto_icon.trigger().bounce_height(), &(this->bounce_height), &(this->bounce_height_is_set)); + proto_to_float(proto_icon.trigger().bounce_height(), &state, &(this->bounce_height), &(this->bounce_height_is_set)); } if (proto_icon.category() != 0) { - do_nothing(proto_icon.category(), &(this->category), &(this->category_is_set)); + do_nothing(proto_icon.category(), &state, &(this->category), &(this->category_is_set)); } if (proto_icon.has_rgba_color()) { - proto_to_color(proto_icon.rgba_color(), &(this->color), &(this->color_is_set)); + proto_to_color(proto_icon.rgba_color(), &state, &(this->color), &(this->color_is_set)); } if (proto_icon.trigger().action_copy_clipboard() != "") { - proto_to_string(proto_icon.trigger().action_copy_clipboard(), &(this->copy_clipboard), &(this->copy_clipboard_is_set)); + proto_to_string(proto_icon.trigger().action_copy_clipboard(), &state, &(this->copy_clipboard), &(this->copy_clipboard_is_set)); } if (proto_icon.trigger().action_copy_message() != "") { - proto_to_string(proto_icon.trigger().action_copy_message(), &(this->copy_message), &(this->copy_message_is_set)); + proto_to_string(proto_icon.trigger().action_copy_message(), &state, &(this->copy_message), &(this->copy_message_is_set)); } if (proto_icon.cull_chirality() != 0) { - proto_to_cull_chirality(proto_icon.cull_chirality(), &(this->cull_chirality), &(this->cull_chirality_is_set)); + proto_to_cull_chirality(proto_icon.cull_chirality(), &state, &(this->cull_chirality), &(this->cull_chirality_is_set)); } if (proto_icon.disable_player_cutout() != 0) { - proto_to_bool(proto_icon.disable_player_cutout(), &(this->disable_player_cutout), &(this->disable_player_cutout_is_set)); + proto_to_bool(proto_icon.disable_player_cutout(), &state, &(this->disable_player_cutout), &(this->disable_player_cutout_is_set)); } if (proto_icon.distance_fade_end() != 0) { - proto_to_float(proto_icon.distance_fade_end(), &(this->distance_fade_end), &(this->distance_fade_end_is_set)); + proto_to_float(proto_icon.distance_fade_end(), &state, &(this->distance_fade_end), &(this->distance_fade_end_is_set)); } if (proto_icon.distance_fade_start() != 0) { - proto_to_float(proto_icon.distance_fade_start(), &(this->distance_fade_start), &(this->distance_fade_start_is_set)); + proto_to_float(proto_icon.distance_fade_start(), &state, &(this->distance_fade_start), &(this->distance_fade_start_is_set)); } if (proto_icon.has_euler_rotation()) { - proto_to_euler_rotation(proto_icon.euler_rotation(), &(this->euler_rotation), &(this->euler_rotation_is_set)); + proto_to_euler_rotation(proto_icon.euler_rotation(), &state, &(this->euler_rotation), &(this->euler_rotation_is_set)); } if (proto_icon.has_festival_filter()) { - proto_to_festival_filter(proto_icon.festival_filter(), &(this->festival_filter), &(this->festival_filter_is_set)); + proto_to_festival_filter(proto_icon.festival_filter(), &state, &(this->festival_filter), &(this->festival_filter_is_set)); } if (proto_icon.guid() != "") { - proto_to_unique_id(proto_icon.guid(), &(this->guid), &(this->guid_is_set)); + proto_to_unique_id(proto_icon.guid(), &state, &(this->guid), &(this->guid_is_set)); } if (proto_icon.trigger().has_countdown() != 0) { - proto_to_bool(proto_icon.trigger().has_countdown(), &(this->has_countdown), &(this->has_countdown_is_set)); + proto_to_bool(proto_icon.trigger().has_countdown(), &state, &(this->has_countdown), &(this->has_countdown_is_set)); } if (proto_icon.height_offset() != 0) { - proto_to_float(proto_icon.height_offset(), &(this->height_offset), &(this->height_offset_is_set)); + proto_to_float(proto_icon.height_offset(), &state, &(this->height_offset), &(this->height_offset_is_set)); } if (proto_icon.trigger().has_action_hide_category()) { - proto_to_marker_category(proto_icon.trigger().action_hide_category(), &(this->hide_category), &(this->hide_category_is_set)); + proto_to_marker_category(proto_icon.trigger().action_hide_category(), &state, &(this->hide_category), &(this->hide_category_is_set)); } if (proto_icon.has_texture_path()) { - proto_to_image(proto_icon.texture_path(), &(this->icon), &(this->icon_is_set)); + proto_to_image(proto_icon.texture_path(), &state, &(this->icon), &(this->icon_is_set)); } if (proto_icon.tentative__scale() != 0) { - proto_to_float(proto_icon.tentative__scale(), &(this->icon_size), &(this->icon_size_is_set)); + proto_to_float(proto_icon.tentative__scale(), &state, &(this->icon_size), &(this->icon_size_is_set)); } if (proto_icon.trigger().action_info_message() != "") { - proto_to_string(proto_icon.trigger().action_info_message(), &(this->info_message), &(this->info_message_is_set)); + proto_to_string(proto_icon.trigger().action_info_message(), &state, &(this->info_message), &(this->info_message_is_set)); } if (proto_icon.trigger().invert_display() != 0) { - proto_to_bool(proto_icon.trigger().invert_display(), &(this->invert_visibility), &(this->invert_visibility_is_set)); + proto_to_bool(proto_icon.trigger().invert_display(), &state, &(this->invert_visibility), &(this->invert_visibility_is_set)); } if (proto_icon.map_display_size() != 0) { - proto_to_int(proto_icon.map_display_size(), &(this->map_display_size), &(this->map_display_size_is_set)); + proto_to_int(proto_icon.map_display_size(), &state, &(this->map_display_size), &(this->map_display_size_is_set)); } if (proto_icon.map_id() != 0) { - proto_to_int(proto_icon.map_id(), &(this->map_id), &(this->map_id_is_set)); + proto_to_int(proto_icon.map_id(), &state, &(this->map_id), &(this->map_id_is_set)); } if (proto_icon.has_map_type_filter()) { - proto_to_map_type_filter(proto_icon.map_type_filter(), &(this->map_type_filter), &(this->map_type_filter_is_set)); + proto_to_map_type_filter(proto_icon.map_type_filter(), &state, &(this->map_type_filter), &(this->map_type_filter_is_set)); } if (proto_icon.maximum_size_on_screen() != 0) { - proto_to_int(proto_icon.maximum_size_on_screen(), &(this->maximum_size_on_screen), &(this->maximum_size_on_screen_is_set)); + proto_to_int(proto_icon.maximum_size_on_screen(), &state, &(this->maximum_size_on_screen), &(this->maximum_size_on_screen_is_set)); } if (proto_icon.minimum_size_on_screen() != 0) { - proto_to_int(proto_icon.minimum_size_on_screen(), &(this->minimum_size_on_screen), &(this->minimum_size_on_screen_is_set)); + proto_to_int(proto_icon.minimum_size_on_screen(), &state, &(this->minimum_size_on_screen), &(this->minimum_size_on_screen_is_set)); } if (proto_icon.has_mount_filter()) { - proto_to_mount_filter(proto_icon.mount_filter(), &(this->mount_filter), &(this->mount_filter_is_set)); + proto_to_mount_filter(proto_icon.mount_filter(), &state, &(this->mount_filter), &(this->mount_filter_is_set)); } if (proto_icon.has_position()) { - proto_to_position(proto_icon.position(), &(this->position), &(this->position_is_set)); + proto_to_position(proto_icon.position(), &state, &(this->position), &(this->position_is_set)); } if (proto_icon.has_profession_filter()) { - proto_to_profession_filter(proto_icon.profession_filter(), &(this->profession_filter), &(this->profession_filter_is_set)); + proto_to_profession_filter(proto_icon.profession_filter(), &state, &(this->profession_filter), &(this->profession_filter_is_set)); } if (proto_icon.tentative__render_ingame() != 0) { - proto_to_bool(proto_icon.tentative__render_ingame(), &(this->render_ingame), &(this->render_ingame_is_set)); + proto_to_bool(proto_icon.tentative__render_ingame(), &state, &(this->render_ingame), &(this->render_ingame_is_set)); } if (proto_icon.tentative__render_on_map() != 0) { - proto_to_bool(proto_icon.tentative__render_on_map(), &(this->render_on_map), &(this->render_on_map_is_set)); + proto_to_bool(proto_icon.tentative__render_on_map(), &state, &(this->render_on_map), &(this->render_on_map_is_set)); } if (proto_icon.tentative__render_on_minimap() != 0) { - proto_to_bool(proto_icon.tentative__render_on_minimap(), &(this->render_on_minimap), &(this->render_on_minimap_is_set)); + proto_to_bool(proto_icon.tentative__render_on_minimap(), &state, &(this->render_on_minimap), &(this->render_on_minimap_is_set)); } if (proto_icon.trigger().reset_behavior() != 0) { - proto_to_reset_behavior(proto_icon.trigger().reset_behavior(), &(this->reset_behavior), &(this->reset_behavior_is_set)); + proto_to_reset_behavior(proto_icon.trigger().reset_behavior(), &state, &(this->reset_behavior), &(this->reset_behavior_is_set)); } if (proto_icon.trigger().reset_length() != 0) { - proto_to_float(proto_icon.trigger().reset_length(), &(this->reset_length), &(this->reset_length_is_set)); + proto_to_float(proto_icon.trigger().reset_length(), &state, &(this->reset_length), &(this->reset_length_is_set)); } if (proto_icon.scale_on_map_with_zoom() != 0) { - proto_to_bool(proto_icon.scale_on_map_with_zoom(), &(this->scale_on_map_with_zoom), &(this->scale_on_map_with_zoom_is_set)); + proto_to_bool(proto_icon.scale_on_map_with_zoom(), &state, &(this->scale_on_map_with_zoom), &(this->scale_on_map_with_zoom_is_set)); } if (proto_icon.bhdraft__schedule() != "") { - proto_to_string(proto_icon.bhdraft__schedule(), &(this->schedule), &(this->schedule_is_set)); + proto_to_string(proto_icon.bhdraft__schedule(), &state, &(this->schedule), &(this->schedule_is_set)); } if (proto_icon.bhdraft__schedule_duration() != 0) { - proto_to_float(proto_icon.bhdraft__schedule_duration(), &(this->schedule_duration), &(this->schedule_duration_is_set)); + proto_to_float(proto_icon.bhdraft__schedule_duration(), &state, &(this->schedule_duration), &(this->schedule_duration_is_set)); } if (proto_icon.trigger().has_action_show_category()) { - proto_to_marker_category(proto_icon.trigger().action_show_category(), &(this->show_category), &(this->show_category_is_set)); + proto_to_marker_category(proto_icon.trigger().action_show_category(), &state, &(this->show_category), &(this->show_category_is_set)); } if (proto_icon.has_specialization_filter()) { - proto_to_specialization_filter(proto_icon.specialization_filter(), &(this->specialization_filter), &(this->specialization_filter_is_set)); + proto_to_specialization_filter(proto_icon.specialization_filter(), &state, &(this->specialization_filter), &(this->specialization_filter_is_set)); } if (proto_icon.has_species_filter()) { - proto_to_species_filter(proto_icon.species_filter(), &(this->species_filter), &(this->species_filter_is_set)); + proto_to_species_filter(proto_icon.species_filter(), &state, &(this->species_filter), &(this->species_filter_is_set)); } if (proto_icon.trigger().has_action_toggle_category()) { - proto_to_marker_category(proto_icon.trigger().action_toggle_category(), &(this->toggle_category), &(this->toggle_category_is_set)); + proto_to_marker_category(proto_icon.trigger().action_toggle_category(), &state, &(this->toggle_category), &(this->toggle_category_is_set)); } if (proto_icon.tip_description() != "") { - proto_to_string(proto_icon.tip_description(), &(this->tooltip_description), &(this->tooltip_description_is_set)); + proto_to_string(proto_icon.tip_description(), &state, &(this->tooltip_description), &(this->tooltip_description_is_set)); } if (proto_icon.tip_name() != "") { - proto_to_string(proto_icon.tip_name(), &(this->tooltip_name), &(this->tooltip_name_is_set)); + proto_to_string(proto_icon.tip_name(), &state, &(this->tooltip_name), &(this->tooltip_name_is_set)); } if (proto_icon.trigger().range() != 0) { - proto_to_float(proto_icon.trigger().range(), &(this->trigger_range), &(this->trigger_range_is_set)); + proto_to_float(proto_icon.trigger().range(), &state, &(this->trigger_range), &(this->trigger_range_is_set)); } } diff --git a/xml_converter/src/state_structs/proto_reader_state.hpp b/xml_converter/src/state_structs/proto_reader_state.hpp new file mode 100644 index 00000000..7573a489 --- /dev/null +++ b/xml_converter/src/state_structs/proto_reader_state.hpp @@ -0,0 +1,4 @@ +#pragma once + +struct ProtoReaderState { +}; diff --git a/xml_converter/src/state_structs/proto_writer_state.hpp b/xml_converter/src/state_structs/proto_writer_state.hpp new file mode 100644 index 00000000..0570731d --- /dev/null +++ b/xml_converter/src/state_structs/proto_writer_state.hpp @@ -0,0 +1,4 @@ +#pragma once + +struct ProtoWriterState { +}; diff --git a/xml_converter/src/state_structs/xml_writer_state.hpp b/xml_converter/src/state_structs/xml_writer_state.hpp new file mode 100644 index 00000000..9443f54e --- /dev/null +++ b/xml_converter/src/state_structs/xml_writer_state.hpp @@ -0,0 +1,4 @@ +#pragma once + +struct XMLWriterState { +}; diff --git a/xml_converter/src/trail_gen.cpp b/xml_converter/src/trail_gen.cpp index 79579a25..0ee4890d 100644 --- a/xml_converter/src/trail_gen.cpp +++ b/xml_converter/src/trail_gen.cpp @@ -154,289 +154,292 @@ bool Trail::validate_attributes_of_type_marker_category() { } vector Trail::as_xml() const { + XMLWriterState state; vector xml_node_contents; xml_node_contents.push_back("achievement_bitmask_is_set) { - xml_node_contents.push_back(int_to_xml_attribute("AchievementBit", &this->achievement_bitmask)); + xml_node_contents.push_back(int_to_xml_attribute("AchievementBit", &state, &this->achievement_bitmask)); } if (this->achievement_id_is_set) { - xml_node_contents.push_back(int_to_xml_attribute("AchievementId", &this->achievement_id)); + xml_node_contents.push_back(int_to_xml_attribute("AchievementId", &state, &this->achievement_id)); } if (this->animation_speed_is_set) { - xml_node_contents.push_back(float_to_xml_attribute("AnimSpeed", &this->animation_speed)); + xml_node_contents.push_back(float_to_xml_attribute("AnimSpeed", &state, &this->animation_speed)); } if (this->category_is_set) { - xml_node_contents.push_back(marker_category_to_xml_attribute("Type", &this->category)); + xml_node_contents.push_back(marker_category_to_xml_attribute("Type", &state, &this->category)); } if (this->color_is_set) { - xml_node_contents.push_back(color_to_xml_attribute("Color", &this->color)); + xml_node_contents.push_back(color_to_xml_attribute("Color", &state, &this->color)); } if (this->color_is_set) { - xml_node_contents.push_back(float_to_xml_attribute("Alpha", &this->color.alpha)); + xml_node_contents.push_back(float_to_xml_attribute("Alpha", &state, &this->color.alpha)); } if (this->cull_chirality_is_set) { - xml_node_contents.push_back(cull_chirality_to_xml_attribute("Cull", &this->cull_chirality)); + xml_node_contents.push_back(cull_chirality_to_xml_attribute("Cull", &state, &this->cull_chirality)); } if (this->disable_player_cutout_is_set) { - xml_node_contents.push_back(bool_to_inverted_xml_attribute("CanFade", &this->disable_player_cutout)); + xml_node_contents.push_back(bool_to_inverted_xml_attribute("CanFade", &state, &this->disable_player_cutout)); } if (this->distance_fade_end_is_set) { - xml_node_contents.push_back(float_to_xml_attribute("FadeFar", &this->distance_fade_end)); + xml_node_contents.push_back(float_to_xml_attribute("FadeFar", &state, &this->distance_fade_end)); } if (this->distance_fade_start_is_set) { - xml_node_contents.push_back(float_to_xml_attribute("FadeNear", &this->distance_fade_start)); + xml_node_contents.push_back(float_to_xml_attribute("FadeNear", &state, &this->distance_fade_start)); } if (this->festival_filter_is_set) { - xml_node_contents.push_back(festival_filter_to_xml_attribute("Festival", &this->festival_filter)); + xml_node_contents.push_back(festival_filter_to_xml_attribute("Festival", &state, &this->festival_filter)); } if (this->guid_is_set) { - xml_node_contents.push_back(unique_id_to_xml_attribute("GUID", &this->guid)); + xml_node_contents.push_back(unique_id_to_xml_attribute("GUID", &state, &this->guid)); } if (this->is_wall_is_set) { - xml_node_contents.push_back(bool_to_xml_attribute("IsWall", &this->is_wall)); + xml_node_contents.push_back(bool_to_xml_attribute("IsWall", &state, &this->is_wall)); } if (this->map_display_size_is_set) { - xml_node_contents.push_back(int_to_xml_attribute("MapDisplaySize", &this->map_display_size)); + xml_node_contents.push_back(int_to_xml_attribute("MapDisplaySize", &state, &this->map_display_size)); } if (this->map_id_is_set) { - xml_node_contents.push_back(int_to_xml_attribute("MapID", &this->map_id)); + xml_node_contents.push_back(int_to_xml_attribute("MapID", &state, &this->map_id)); } if (this->map_type_filter_is_set) { - xml_node_contents.push_back(map_type_filter_to_xml_attribute("MapType", &this->map_type_filter)); + xml_node_contents.push_back(map_type_filter_to_xml_attribute("MapType", &state, &this->map_type_filter)); } if (this->mount_filter_is_set) { - xml_node_contents.push_back(mount_filter_to_xml_attribute("Mount", &this->mount_filter)); + xml_node_contents.push_back(mount_filter_to_xml_attribute("Mount", &state, &this->mount_filter)); } if (this->profession_filter_is_set) { - xml_node_contents.push_back(profession_filter_to_xml_attribute("Profession", &this->profession_filter)); + xml_node_contents.push_back(profession_filter_to_xml_attribute("Profession", &state, &this->profession_filter)); } if (this->render_ingame_is_set) { - xml_node_contents.push_back(bool_to_xml_attribute("IngameVisibility", &this->render_ingame)); + xml_node_contents.push_back(bool_to_xml_attribute("IngameVisibility", &state, &this->render_ingame)); } if (this->render_on_map_is_set) { - xml_node_contents.push_back(bool_to_xml_attribute("MapVisibility", &this->render_on_map)); + xml_node_contents.push_back(bool_to_xml_attribute("MapVisibility", &state, &this->render_on_map)); } if (this->render_on_minimap_is_set) { - xml_node_contents.push_back(bool_to_xml_attribute("MinimapVisibility", &this->render_on_minimap)); + xml_node_contents.push_back(bool_to_xml_attribute("MinimapVisibility", &state, &this->render_on_minimap)); } if (this->schedule_is_set) { - xml_node_contents.push_back(string_to_xml_attribute("Schedule", &this->schedule)); + xml_node_contents.push_back(string_to_xml_attribute("Schedule", &state, &this->schedule)); } if (this->schedule_duration_is_set) { - xml_node_contents.push_back(float_to_xml_attribute("ScheduleDuration", &this->schedule_duration)); + xml_node_contents.push_back(float_to_xml_attribute("ScheduleDuration", &state, &this->schedule_duration)); } if (this->specialization_filter_is_set) { - xml_node_contents.push_back(specialization_filter_to_xml_attribute("Specialization", &this->specialization_filter)); + xml_node_contents.push_back(specialization_filter_to_xml_attribute("Specialization", &state, &this->specialization_filter)); } if (this->species_filter_is_set) { - xml_node_contents.push_back(species_filter_to_xml_attribute("Race", &this->species_filter)); + xml_node_contents.push_back(species_filter_to_xml_attribute("Race", &state, &this->species_filter)); } if (this->texture_is_set) { - xml_node_contents.push_back(image_to_xml_attribute("Texture", &this->texture)); + xml_node_contents.push_back(image_to_xml_attribute("Texture", &state, &this->texture)); } if (this->trail_data_is_set) { - xml_node_contents.push_back(trail_data_to_xml_attribute("TrailData", &this->trail_data)); + xml_node_contents.push_back(trail_data_to_xml_attribute("TrailData", &state, &this->trail_data)); } if (this->trail_scale_is_set) { - xml_node_contents.push_back(float_to_xml_attribute("TrailScale", &this->trail_scale)); + xml_node_contents.push_back(float_to_xml_attribute("TrailScale", &state, &this->trail_scale)); } xml_node_contents.push_back("/>"); return xml_node_contents; } waypoint::Trail Trail::as_protobuf() const { + ProtoWriterState state; waypoint::Trail proto_trail; if (this->achievement_bitmask_is_set) { std::function setter = [&proto_trail](int val) { proto_trail.set_achievement_bit(val); }; - int_to_proto(this->achievement_bitmask, setter); + int_to_proto(this->achievement_bitmask, &state, setter); } if (this->achievement_id_is_set) { std::function setter = [&proto_trail](int val) { proto_trail.set_achievement_id(val); }; - int_to_proto(this->achievement_id, setter); + int_to_proto(this->achievement_id, &state, setter); } if (this->animation_speed_is_set) { std::function setter = [&proto_trail](float val) { proto_trail.set_animation_speed(val); }; - float_to_proto(this->animation_speed, setter); + float_to_proto(this->animation_speed, &state, setter); } if (this->category_is_set) { std::function setter = [&proto_trail](bool val) { proto_trail.set_category(val); }; - do_nothing(this->category, setter); + do_nothing(this->category, &state, setter); } if (this->color_is_set) { std::function setter = [&proto_trail](waypoint::RGBAColor* val) { proto_trail.set_allocated_rgba_color(val); }; - color_to_proto(this->color, setter); + color_to_proto(this->color, &state, setter); } if (this->cull_chirality_is_set) { std::function setter = [&proto_trail](waypoint::CullChirality val) { proto_trail.set_cull_chirality(val); }; - cull_chirality_to_proto(this->cull_chirality, setter); + cull_chirality_to_proto(this->cull_chirality, &state, setter); } if (this->disable_player_cutout_is_set) { std::function setter = [&proto_trail](bool val) { proto_trail.set_disable_player_cutout(val); }; - bool_to_proto(this->disable_player_cutout, setter); + bool_to_proto(this->disable_player_cutout, &state, setter); } if (this->distance_fade_end_is_set) { std::function setter = [&proto_trail](float val) { proto_trail.set_distance_fade_end(val); }; - float_to_proto(this->distance_fade_end, setter); + float_to_proto(this->distance_fade_end, &state, setter); } if (this->distance_fade_start_is_set) { std::function setter = [&proto_trail](float val) { proto_trail.set_distance_fade_start(val); }; - float_to_proto(this->distance_fade_start, setter); + float_to_proto(this->distance_fade_start, &state, setter); } if (this->festival_filter_is_set) { std::function setter = [&proto_trail](waypoint::FestivalFilter* val) { proto_trail.set_allocated_festival_filter(val); }; - festival_filter_to_proto(this->festival_filter, setter); + festival_filter_to_proto(this->festival_filter, &state, setter); } if (this->guid_is_set) { std::function setter = [&proto_trail](std::string val) { proto_trail.set_guid(val); }; - unique_id_to_proto(this->guid, setter); + unique_id_to_proto(this->guid, &state, setter); } if (this->is_wall_is_set) { std::function setter = [&proto_trail](bool val) { proto_trail.set_is_wall(val); }; - bool_to_proto(this->is_wall, setter); + bool_to_proto(this->is_wall, &state, setter); } if (this->map_display_size_is_set) { std::function setter = [&proto_trail](int val) { proto_trail.set_map_display_size(val); }; - int_to_proto(this->map_display_size, setter); + int_to_proto(this->map_display_size, &state, setter); } if (this->map_id_is_set) { std::function setter = [&proto_trail](int val) { proto_trail.set_map_id(val); }; - int_to_proto(this->map_id, setter); + int_to_proto(this->map_id, &state, setter); } if (this->map_type_filter_is_set) { std::function setter = [&proto_trail](waypoint::MapTypeFilter* val) { proto_trail.set_allocated_map_type_filter(val); }; - map_type_filter_to_proto(this->map_type_filter, setter); + map_type_filter_to_proto(this->map_type_filter, &state, setter); } if (this->mount_filter_is_set) { std::function setter = [&proto_trail](waypoint::MountFilter* val) { proto_trail.set_allocated_mount_filter(val); }; - mount_filter_to_proto(this->mount_filter, setter); + mount_filter_to_proto(this->mount_filter, &state, setter); } if (this->profession_filter_is_set) { std::function setter = [&proto_trail](waypoint::ProfessionFilter* val) { proto_trail.set_allocated_profession_filter(val); }; - profession_filter_to_proto(this->profession_filter, setter); + profession_filter_to_proto(this->profession_filter, &state, setter); } if (this->render_ingame_is_set) { std::function setter = [&proto_trail](bool val) { proto_trail.set_tentative__render_ingame(val); }; - bool_to_proto(this->render_ingame, setter); + bool_to_proto(this->render_ingame, &state, setter); } if (this->render_on_map_is_set) { std::function setter = [&proto_trail](bool val) { proto_trail.set_tentative__render_on_map(val); }; - bool_to_proto(this->render_on_map, setter); + bool_to_proto(this->render_on_map, &state, setter); } if (this->render_on_minimap_is_set) { std::function setter = [&proto_trail](bool val) { proto_trail.set_tentative__render_on_minimap(val); }; - bool_to_proto(this->render_on_minimap, setter); + bool_to_proto(this->render_on_minimap, &state, setter); } if (this->schedule_is_set) { std::function setter = [&proto_trail](std::string val) { proto_trail.set_bhdraft__schedule(val); }; - string_to_proto(this->schedule, setter); + string_to_proto(this->schedule, &state, setter); } if (this->schedule_duration_is_set) { std::function setter = [&proto_trail](float val) { proto_trail.set_bhdraft__schedule_duration(val); }; - float_to_proto(this->schedule_duration, setter); + float_to_proto(this->schedule_duration, &state, setter); } if (this->specialization_filter_is_set) { std::function setter = [&proto_trail](waypoint::SpecializationFilter* val) { proto_trail.set_allocated_specialization_filter(val); }; - specialization_filter_to_proto(this->specialization_filter, setter); + specialization_filter_to_proto(this->specialization_filter, &state, setter); } if (this->species_filter_is_set) { std::function setter = [&proto_trail](waypoint::SpeciesFilter* val) { proto_trail.set_allocated_species_filter(val); }; - species_filter_to_proto(this->species_filter, setter); + species_filter_to_proto(this->species_filter, &state, setter); } if (this->texture_is_set) { std::function setter = [&proto_trail](waypoint::TexturePath* val) { proto_trail.set_allocated_texture_path(val); }; - image_to_proto(this->texture, setter); + image_to_proto(this->texture, &state, setter); } if (this->trail_data_is_set) { std::function setter = [&proto_trail](waypoint::TrailData* val) { proto_trail.set_allocated_trail_data(val); }; - trail_data_to_proto(this->trail_data, setter); + trail_data_to_proto(this->trail_data, &state, setter); } if (this->trail_scale_is_set) { std::function setter = [&proto_trail](float val) { proto_trail.set_scale(val); }; - float_to_proto(this->trail_scale, setter); + float_to_proto(this->trail_scale, &state, setter); } return proto_trail; } void Trail::parse_protobuf(waypoint::Trail proto_trail) { + ProtoReaderState state; if (proto_trail.achievement_bit() != 0) { - proto_to_int(proto_trail.achievement_bit(), &(this->achievement_bitmask), &(this->achievement_bitmask_is_set)); + proto_to_int(proto_trail.achievement_bit(), &state, &(this->achievement_bitmask), &(this->achievement_bitmask_is_set)); } if (proto_trail.achievement_id() != 0) { - proto_to_int(proto_trail.achievement_id(), &(this->achievement_id), &(this->achievement_id_is_set)); + proto_to_int(proto_trail.achievement_id(), &state, &(this->achievement_id), &(this->achievement_id_is_set)); } if (proto_trail.animation_speed() != 0) { - proto_to_float(proto_trail.animation_speed(), &(this->animation_speed), &(this->animation_speed_is_set)); + proto_to_float(proto_trail.animation_speed(), &state, &(this->animation_speed), &(this->animation_speed_is_set)); } if (proto_trail.category() != 0) { - do_nothing(proto_trail.category(), &(this->category), &(this->category_is_set)); + do_nothing(proto_trail.category(), &state, &(this->category), &(this->category_is_set)); } if (proto_trail.has_rgba_color()) { - proto_to_color(proto_trail.rgba_color(), &(this->color), &(this->color_is_set)); + proto_to_color(proto_trail.rgba_color(), &state, &(this->color), &(this->color_is_set)); } if (proto_trail.cull_chirality() != 0) { - proto_to_cull_chirality(proto_trail.cull_chirality(), &(this->cull_chirality), &(this->cull_chirality_is_set)); + proto_to_cull_chirality(proto_trail.cull_chirality(), &state, &(this->cull_chirality), &(this->cull_chirality_is_set)); } if (proto_trail.disable_player_cutout() != 0) { - proto_to_bool(proto_trail.disable_player_cutout(), &(this->disable_player_cutout), &(this->disable_player_cutout_is_set)); + proto_to_bool(proto_trail.disable_player_cutout(), &state, &(this->disable_player_cutout), &(this->disable_player_cutout_is_set)); } if (proto_trail.distance_fade_end() != 0) { - proto_to_float(proto_trail.distance_fade_end(), &(this->distance_fade_end), &(this->distance_fade_end_is_set)); + proto_to_float(proto_trail.distance_fade_end(), &state, &(this->distance_fade_end), &(this->distance_fade_end_is_set)); } if (proto_trail.distance_fade_start() != 0) { - proto_to_float(proto_trail.distance_fade_start(), &(this->distance_fade_start), &(this->distance_fade_start_is_set)); + proto_to_float(proto_trail.distance_fade_start(), &state, &(this->distance_fade_start), &(this->distance_fade_start_is_set)); } if (proto_trail.has_festival_filter()) { - proto_to_festival_filter(proto_trail.festival_filter(), &(this->festival_filter), &(this->festival_filter_is_set)); + proto_to_festival_filter(proto_trail.festival_filter(), &state, &(this->festival_filter), &(this->festival_filter_is_set)); } if (proto_trail.guid() != "") { - proto_to_unique_id(proto_trail.guid(), &(this->guid), &(this->guid_is_set)); + proto_to_unique_id(proto_trail.guid(), &state, &(this->guid), &(this->guid_is_set)); } if (proto_trail.is_wall() != 0) { - proto_to_bool(proto_trail.is_wall(), &(this->is_wall), &(this->is_wall_is_set)); + proto_to_bool(proto_trail.is_wall(), &state, &(this->is_wall), &(this->is_wall_is_set)); } if (proto_trail.map_display_size() != 0) { - proto_to_int(proto_trail.map_display_size(), &(this->map_display_size), &(this->map_display_size_is_set)); + proto_to_int(proto_trail.map_display_size(), &state, &(this->map_display_size), &(this->map_display_size_is_set)); } if (proto_trail.map_id() != 0) { - proto_to_int(proto_trail.map_id(), &(this->map_id), &(this->map_id_is_set)); + proto_to_int(proto_trail.map_id(), &state, &(this->map_id), &(this->map_id_is_set)); } if (proto_trail.has_map_type_filter()) { - proto_to_map_type_filter(proto_trail.map_type_filter(), &(this->map_type_filter), &(this->map_type_filter_is_set)); + proto_to_map_type_filter(proto_trail.map_type_filter(), &state, &(this->map_type_filter), &(this->map_type_filter_is_set)); } if (proto_trail.has_mount_filter()) { - proto_to_mount_filter(proto_trail.mount_filter(), &(this->mount_filter), &(this->mount_filter_is_set)); + proto_to_mount_filter(proto_trail.mount_filter(), &state, &(this->mount_filter), &(this->mount_filter_is_set)); } if (proto_trail.has_profession_filter()) { - proto_to_profession_filter(proto_trail.profession_filter(), &(this->profession_filter), &(this->profession_filter_is_set)); + proto_to_profession_filter(proto_trail.profession_filter(), &state, &(this->profession_filter), &(this->profession_filter_is_set)); } if (proto_trail.tentative__render_ingame() != 0) { - proto_to_bool(proto_trail.tentative__render_ingame(), &(this->render_ingame), &(this->render_ingame_is_set)); + proto_to_bool(proto_trail.tentative__render_ingame(), &state, &(this->render_ingame), &(this->render_ingame_is_set)); } if (proto_trail.tentative__render_on_map() != 0) { - proto_to_bool(proto_trail.tentative__render_on_map(), &(this->render_on_map), &(this->render_on_map_is_set)); + proto_to_bool(proto_trail.tentative__render_on_map(), &state, &(this->render_on_map), &(this->render_on_map_is_set)); } if (proto_trail.tentative__render_on_minimap() != 0) { - proto_to_bool(proto_trail.tentative__render_on_minimap(), &(this->render_on_minimap), &(this->render_on_minimap_is_set)); + proto_to_bool(proto_trail.tentative__render_on_minimap(), &state, &(this->render_on_minimap), &(this->render_on_minimap_is_set)); } if (proto_trail.bhdraft__schedule() != "") { - proto_to_string(proto_trail.bhdraft__schedule(), &(this->schedule), &(this->schedule_is_set)); + proto_to_string(proto_trail.bhdraft__schedule(), &state, &(this->schedule), &(this->schedule_is_set)); } if (proto_trail.bhdraft__schedule_duration() != 0) { - proto_to_float(proto_trail.bhdraft__schedule_duration(), &(this->schedule_duration), &(this->schedule_duration_is_set)); + proto_to_float(proto_trail.bhdraft__schedule_duration(), &state, &(this->schedule_duration), &(this->schedule_duration_is_set)); } if (proto_trail.has_specialization_filter()) { - proto_to_specialization_filter(proto_trail.specialization_filter(), &(this->specialization_filter), &(this->specialization_filter_is_set)); + proto_to_specialization_filter(proto_trail.specialization_filter(), &state, &(this->specialization_filter), &(this->specialization_filter_is_set)); } if (proto_trail.has_species_filter()) { - proto_to_species_filter(proto_trail.species_filter(), &(this->species_filter), &(this->species_filter_is_set)); + proto_to_species_filter(proto_trail.species_filter(), &state, &(this->species_filter), &(this->species_filter_is_set)); } if (proto_trail.has_texture_path()) { - proto_to_image(proto_trail.texture_path(), &(this->texture), &(this->texture_is_set)); + proto_to_image(proto_trail.texture_path(), &state, &(this->texture), &(this->texture_is_set)); } if (proto_trail.has_trail_data()) { - proto_to_trail_data(proto_trail.trail_data(), &(this->trail_data), &(this->trail_data_is_set)); + proto_to_trail_data(proto_trail.trail_data(), &state, &(this->trail_data), &(this->trail_data_is_set)); } if (proto_trail.scale() != 0) { - proto_to_float(proto_trail.scale(), &(this->trail_scale), &(this->trail_scale_is_set)); + proto_to_float(proto_trail.scale(), &state, &(this->trail_scale), &(this->trail_scale_is_set)); } } From 0d1ed2ab857b575dcefee42dacd010f9bf3dc596 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Tue, 28 Nov 2023 22:32:25 -0500 Subject: [PATCH 357/539] Reworked Icon and Path nodes to be children on Category nodes --- Category.gd | 7 +++ Category.tscn | 6 ++ Route.gd | 1 + Spatial.gd | 167 +++++++++++++++++++++++++++++--------------------- Spatial.tscn | 2 + project.godot | 5 +- 6 files changed, 114 insertions(+), 74 deletions(-) create mode 100644 Category.gd create mode 100644 Category.tscn diff --git a/Category.gd b/Category.gd new file mode 100644 index 00000000..a5a5eac1 --- /dev/null +++ b/Category.gd @@ -0,0 +1,7 @@ +extends Spatial + +const Waypoint = preload("res://waypoint.gd") +var waypoint_category: Waypoint.Category + +func _ready(): + pass diff --git a/Category.tscn b/Category.tscn new file mode 100644 index 00000000..397d2de9 --- /dev/null +++ b/Category.tscn @@ -0,0 +1,6 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://Category.gd" type="Script" id=1] + +[node name="Category" type="Spatial"] +script = ExtResource( 1 ) diff --git a/Route.gd b/Route.gd index 24717e1e..9da5beff 100644 --- a/Route.gd +++ b/Route.gd @@ -6,6 +6,7 @@ var texture_path var color = Color(0.9, 0.1, 0.1) var waypoint: Waypoint.Trail var category: TreeItem +var minimap_path: NodePath var point_list := PoolVector3Array() diff --git a/Spatial.gd b/Spatial.gd index b423f146..e3d1cad5 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -51,13 +51,13 @@ var is_transient:bool = false # Scenes used throughout this scene const route_scene = preload("res://Route.tscn") const icon_scene = preload("res://Icon.tscn") +const category_scene = preload("res://Category.tscn") const path2d_scene = preload("res://Route2D.tscn") const gizmo_scene = preload("res://Gizmo/PointEdit.tscn") ##########Node Connections########### onready var marker_packs := $Control/Dialogs/MarkerPacks/MarkerPacks as Tree -onready var icons := $Icons as Spatial -onready var paths := $Paths as Spatial +onready var categories := $Categories as Spatial onready var minimap := $Control/MiniMap as Node2D @@ -232,8 +232,7 @@ func decode_frame_packet(spb: StreamPeerBuffer): var unchecked_flag = (ui_flags & 0xFFFFFF80) != 0x00000000; if map_is_open != map_was_open: - $Paths.visible = !map_is_open - $Icons.visible = !map_is_open + self.categories.visible = !map_is_open reset_minimap_masks() map_was_open = map_is_open @@ -344,15 +343,19 @@ func decode_context_packet(spb: StreamPeerBuffer): load_waypoint_markers(self.map_id) # TODO move this to reset_minimap_masks - for child in $Paths.get_children(): - child.get_node("MeshInstance").material_override.set_shader_param("map_size", Vector2(compass_width, compass_height)) - - # TODO move this to reset_minimap_masks - for icon in $Icons.get_children(): - icon.material_override.set_shader_param("map_size", Vector2(compass_width, compass_height)) + set_shader_param(self.categories, compass_width, compass_height) reset_minimap_masks() +func set_shader_param(node: Spatial, compass_width, compass_height): + for child in node.get_children(): + if child.get_name().find("Path") != -1: + child.get_node("MeshInstance").material_override.set_shader_param("map_size", Vector2(compass_width, compass_height)) + if child.get_name().find("Icon") != -1: + child.material_override.set_shader_param("map_size", Vector2(compass_width, compass_height)) + if child.get_name().find("Category") != -1: + set_shader_param(child, compass_width, compass_height) + func decode_timeout_packet(spb: StreamPeerBuffer): if Settings.burrito_link_auto_launch_enabled: @@ -470,16 +473,12 @@ func _unhandled_input(event): ################################################################################ func clear_map_markers(): # Clear all the rendered assets to make way for the new ones - for path in paths.get_children(): - path.queue_free() + for cateogry in self.categories.get_children(): + cateogry.queue_free() for path2d in minimap.get_children(): path2d.queue_free() - for icon in icons.get_children(): - icon.queue_free() - - func init_category_tree(): self.marker_packs.clear() var root : TreeItem @@ -490,19 +489,22 @@ func init_category_tree(): func waypoint_categories_to_godot_nodes(): - for category in self.waypoint_data.get_category(): - _waypoint_categories_to_godot_nodes(null, category, category.get_name(), false) + for waypoint_category in self.waypoint_data.get_category(): + _waypoint_categories_to_godot_nodes(null, waypoint_category, waypoint_category.get_name(), self.categories, false) -func _waypoint_categories_to_godot_nodes(item: TreeItem, category, full_category_name: String, collapsed: bool): +func _waypoint_categories_to_godot_nodes(item: TreeItem, waypoint_category, full_category_name: String, parent_category: Spatial, collapsed: bool): + var new_category = category_scene.instance() + parent_category.add_child(new_category) + new_category.waypoint_category = waypoint_category var category_item: TreeItem = self.marker_packs.create_item(item) - if category.get_name() == "": + if waypoint_category.get_name() == "": # If this is called, there is an error in the Waypoint data category_item.set_text(0, "No name") category_item.set_metadata(0, "") print("Category found with no name.") return - category_item.set_text(0, category.get_name()) + category_item.set_text(0, waypoint_category.get_name()) category_item.set_metadata(0, full_category_name) category_item.set_cell_mode(1, TreeItem.CELL_MODE_CHECK) category_item.set_checked(1, Settings.local_category_data.get(full_category_name, {}).get("checked", false)) @@ -511,7 +513,7 @@ func _waypoint_categories_to_godot_nodes(item: TreeItem, category, full_category category_item.set_collapsed(collapsed) category_item.set_selectable(1, false) - for path in category.get_trail(): + for path in waypoint_category.get_trail(): var path_points := PoolVector3Array() var trail_data = path.get_trail_data() if trail_data.get_points_x().size() != trail_data.get_points_y().size() or trail_data.get_points_x().size() != trail_data.get_points_z().size(): @@ -523,9 +525,10 @@ func _waypoint_categories_to_godot_nodes(item: TreeItem, category, full_category print("Warning: No texture found in " , full_category_name) continue var full_texture_path = self.marker_file_dir + texture_path.get_path() - gen_new_path(path_points, full_texture_path, path, category_item) + gen_new_path(path_points, full_texture_path, path, category_item, new_category) + - for icon in category.get_icon(): + for icon in waypoint_category.get_icon(): var position = icon.get_position() if position == null: print("Warning: No position found for icon ", full_category_name) @@ -536,10 +539,10 @@ func _waypoint_categories_to_godot_nodes(item: TreeItem, category, full_category print("Warning: No texture found in " , full_category_name) continue var full_texture_path = self.marker_file_dir + texture_path.get_path() - gen_new_icon(position_vector, full_texture_path, icon, category_item) + gen_new_icon(position_vector, full_texture_path, icon, category_item, new_category) - for category_child in category.get_children(): - _waypoint_categories_to_godot_nodes(category_item, category_child, full_category_name + "." + category_child.get_name(), true) + for category_child in waypoint_category.get_children(): + _waypoint_categories_to_godot_nodes(category_item, category_child, full_category_name + "." + category_child.get_name(), new_category, true) func apply_category_visibility_to_nodes(category_item: TreeItem): @@ -547,9 +550,8 @@ func apply_category_visibility_to_nodes(category_item: TreeItem): "checked" : category_item.is_checked(1), } Settings.save() - var temporary_cateogry_visibility_data = populate_update_dict(category_item, {}) - update_node_visibility(temporary_cateogry_visibility_data, self.paths) - update_node_visibility(temporary_cateogry_visibility_data, self.icons) + var temporary_category_visibility_data = populate_update_dict(category_item, {}) + update_node_visibility(temporary_category_visibility_data) # Builds a dictionary of the visibility of a specific category and all children @@ -561,19 +563,22 @@ func populate_update_dict(category_item: TreeItem, category_visibility_data): child_item = child_item.get_next() return category_visibility_data + #Updates the visibilty of a node and all children. -func update_node_visibility(cateogry_data, nodes): - for node in nodes.get_children(): - var node_name = node.category.get_metadata(0) - if node_name in cateogry_data: - if cateogry_data[node_name]: - node.visible = true - else: - node.visible = false - if node.get_name() == "Path": - var index = node.get_index() - var route2d = self.minimap.get_child(index) - route2d.visible= node.visible +func update_node_visibility(category_data): + for key in category_data.keys(): + var category = search_node_by_name(self.categories, key) + category.print_tree_pretty() + for node in category.get_children(): + print(node.get_name()) + if node.get_name().find("Category") == -1: + if category_data[key]: + node.visible = true + else: + node.visible = false + if node.get_name().find("Path") != -1: + self.minimap.get_node(node.minimap_path).visible = node.visible + #Child visibility is contigent on all parents having permission func is_category_visible(category_item: TreeItem) -> bool: @@ -587,7 +592,7 @@ func is_category_visible(category_item: TreeItem) -> bool: return false -func gen_new_path(points: Array, texture_path: String, waypoint_trail, category_item: TreeItem): +func gen_new_path(points: Array, texture_path: String, waypoint_trail, category_item: TreeItem, category: Spatial): # Create the texture to use from an image file # TODO: We want to be able to cache this data so that if a texture is used # by multiple objects we only need to keep ony copy of it in memory. #22. @@ -616,13 +621,11 @@ func gen_new_path(points: Array, texture_path: String, waypoint_trail, category_ new_route.create_mesh(points_3d) new_route.set_texture(texture) new_route.waypoint = waypoint_trail - new_route.category = category_item if category_item != null: new_route.visible = is_category_visible(category_item) else: new_route.visible = false - - paths.add_child(new_route) + category.add_child(new_route) # Create a new 2D Path var new_2d_path = path2d_scene.instance() @@ -632,24 +635,43 @@ func gen_new_path(points: Array, texture_path: String, waypoint_trail, category_ new_2d_path.points = points_2d new_2d_path.texture = texture new_2d_path.visible = new_route.visible - minimap.add_child(new_2d_path) + self.minimap.add_child(new_2d_path) + new_route.minimap_path= new_2d_path.get_path() self.currently_active_path = new_route self.currently_active_path_2d = new_2d_path -func gen_new_icon(position: Vector3, texture_path: String, waypoint_icon, category_item: TreeItem): +func gen_new_icon(position: Vector3, texture_path: String, waypoint_icon, category_item: TreeItem, category: Spatial): position.z = -position.z var new_icon = icon_scene.instance() new_icon.translation = position new_icon.set_icon_image(texture_path) new_icon.waypoint = waypoint_icon - new_icon.category = category_item if category_item != null: new_icon.visible = is_category_visible(category_item) else: new_icon.visible = false - icons.add_child(new_icon) + category.add_child(new_icon) + +func search_node_by_name(node, target_name): + for child in node.get_children(): + var result = _search_node_by_name(child, target_name) + if result: + return result + +func _search_node_by_name(node: Spatial, target_name: String): + var split_name = target_name.split(".") + if "waypoint_category" in node and node.waypoint_category.get_name() == split_name[0]: + if split_name.size() > 1: + split_name.remove(0) + for child in node.get_children(): + if child.get_name().find("Category") != -1: + var result = _search_node_by_name(child, split_name.join(".")) + if result: + return result + else: + return node # This function take all of the currently rendered objects and converts it into # the data format that is saved/loaded from. @@ -696,13 +718,15 @@ func gen_adjustment_nodes(): print("No category selected") return - for index in range(self.paths.get_child_count()): - var route = self.paths.get_child(index) - var path2d = self.minimap.get_child(index) - if self.currently_active_category.get_metadata(0) == route.waypoint.get_category().get_name(): + var category = search_node_by_name(self.categories, self.currently_active_category.get_metadata(0)) + for child in category.get_children(): + if child.get_name().find("Path") != -1: + var route = child + print(route.minimap_path) + var path2d = self.minimap.get_node(route.minimap_path) + print(path2d.texture) for i in range(route.get_point_count()): var gizmo_position = route.get_point_position(i) - # Simplistic cull to prevent nodes that are too far away to be # visible from being created. Additional work can be done here # if this is not enough of an optimization in the future. @@ -714,16 +738,15 @@ func gen_adjustment_nodes(): new_gizmo.connect("selected", self, "on_gizmo_selected") new_gizmo.connect("deselected", self, "on_gizmo_deselected") $Gizmos.add_child(new_gizmo) - - for index in range(self.icons.get_child_count()): - var icon = self.icons.get_child(index) - if self.currently_active_category.get_metadata(0) == icon.waypoint.get_category().get_name(): - var new_gizmo = gizmo_scene.instance() - new_gizmo.translation = icon.translation - new_gizmo.link_point("icon", icon) - new_gizmo.connect("selected", self, "on_gizmo_selected") - new_gizmo.connect("deselected", self, "on_gizmo_deselected") - $Gizmos.add_child(new_gizmo) + if child.get_name().find("Icon") != -1: + var icon = child + if self.currently_active_category.get_metadata(0) == icon.waypoint.get_category().get_name(): + var new_gizmo = gizmo_scene.instance() + new_gizmo.translation = icon.translation + new_gizmo.link_point("icon", icon) + new_gizmo.connect("selected", self, "on_gizmo_selected") + new_gizmo.connect("deselected", self, "on_gizmo_deselected") + $Gizmos.add_child(new_gizmo) var currently_selected_node = null @@ -826,16 +849,18 @@ func _on_NewPath_pressed(): # Create a new icon and give it the texture ################################################################################ func _on_NewIcon_pressed(): - var waypoint_icon = Waypoint.Icon.new() - waypoint_icon.new_category().set_name(self.currently_active_category.get_metadata(0)) - gen_new_icon(self.player_position, self.next_texture_path, waypoint_icon, self.currently_active_category) + var category = search_node_by_name(self.categories, self.currently_active_category.get_metadata(0)) + var waypoint_category = category.waypoint_category + var waypoint_icon = waypoint_category.new_icon() + gen_new_icon(self.player_position, self.next_texture_path, waypoint_icon, self.currently_active_category, category) # A new path point is created func _on_NewPathPoint_pressed(): if self.currently_active_path == null: - var waypoint_trail = Waypoint.Trail.new() - waypoint_trail.new_category().set_name(self.currently_active_category.get_metadata(0)) - gen_new_path([self.player_position], self.next_texture_path, waypoint_trail, self.currently_active_category) + var category = search_node_by_name(self.categories, self.currently_active_category.get_metadata(0)) + var waypoint_category = category.waypoint_category + var waypoint_trail = waypoint_category.new_trail() + gen_new_path([self.player_position], self.next_texture_path, waypoint_trail, self.currently_active_category, category) else: var z_accurate_player_position = player_position z_accurate_player_position.z = -z_accurate_player_position.z diff --git a/Spatial.tscn b/Spatial.tscn index 62d5b1ad..88df13b7 100644 --- a/Spatial.tscn +++ b/Spatial.tscn @@ -867,6 +867,8 @@ color = Color( 0, 0, 0, 1 ) mesh = SubResource( 3 ) material/0 = SubResource( 4 ) +[node name="Categories" type="Spatial" parent="."] + [connection signal="pressed" from="Control/GlobalMenuButton/main_menu_toggle" to="." method="_on_main_menu_toggle_pressed"] [connection signal="pressed" from="Control/GlobalMenuButton/EditorQuckPanel/HBoxContainer/CloseEditorQuickPanel" to="." method="_on_CloseEditorQuickPanel_pressed"] [connection signal="pressed" from="Control/GlobalMenuButton/EditorQuckPanel/HBoxContainer/ChangeTexture" to="." method="_on_ChangeTexture_pressed"] diff --git a/project.godot b/project.godot index e7ec8f21..fb41ab1c 100644 --- a/project.godot +++ b/project.godot @@ -14,7 +14,7 @@ _global_script_classes=[ { "language": "NativeScript", "path": "res://tacoparser.gdns" }, { -"base": "Node", +"base": "", "class": "X11_FG", "language": "NativeScript", "path": "res://Spatial.gdns" @@ -49,8 +49,7 @@ window/per_pixel_transparency/enabled=true [editor_plugins] -enabled=PoolStringArray( "res://addons/protobuf/plugin.cfg" ) -enabled=PoolStringArray( "res://addons/version_restrict/plugin.cfg" ) +enabled=PoolStringArray( "res://addons/protobuf/plugin.cfg", "res://addons/version_restrict/plugin.cfg" ) [global] From 931af955374b97350d71b9162b21b0e7c8555438 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Tue, 28 Nov 2023 23:00:52 -0500 Subject: [PATCH 358/539] changed function to take in two strings and ensure a forward slash is added between them --- xml_converter/src/packaging_protobin.cpp | 7 ++----- xml_converter/src/string_helper.cpp | 9 +++++---- xml_converter/src/string_helper.hpp | 2 +- xml_converter/src/xml_converter.cpp | 15 +++++---------- 4 files changed, 13 insertions(+), 20 deletions(-) diff --git a/xml_converter/src/packaging_protobin.cpp b/xml_converter/src/packaging_protobin.cpp index 9886f8c2..33406bc7 100644 --- a/xml_converter/src/packaging_protobin.cpp +++ b/xml_converter/src/packaging_protobin.cpp @@ -197,10 +197,9 @@ void write_protobuf_file( std::cout << "Unknown type" << std::endl; } } - ensure_trailing_slash(&filepath); _write_protobuf_file( - filepath + "/markers.bin", + join_file_paths(filepath, "markers.bin"), category_filter, marker_categories, category_to_pois); @@ -229,10 +228,8 @@ void write_protobuf_file_per_map_id( } } - ensure_trailing_slash(&proto_directory); - for (auto iterator = mapid_to_category_to_pois.begin(); iterator != mapid_to_category_to_pois.end(); iterator++) { - string output_filepath = proto_directory + to_string(iterator->first) + ".data"; + string output_filepath = join_file_paths(proto_directory, to_string(iterator->first) + ".data"); _write_protobuf_file( output_filepath, diff --git a/xml_converter/src/string_helper.cpp b/xml_converter/src/string_helper.cpp index f440c70a..ed2a053e 100644 --- a/xml_converter/src/string_helper.cpp +++ b/xml_converter/src/string_helper.cpp @@ -288,9 +288,10 @@ bool has_suffix(std::string const& fullString, std::string const& ending) { } } -void ensure_trailing_slash(std::string* directory_path) { - if (!has_suffix(*directory_path, "/")) { - *directory_path += "/"; +string join_file_paths(string directory_path, string file_path) { + string output = directory_path; + if (!has_suffix(directory_path, "/")) { + output += "/"; } - return; + return output + file_path; } diff --git a/xml_converter/src/string_helper.hpp b/xml_converter/src/string_helper.hpp index 448ae611..31c83989 100644 --- a/xml_converter/src/string_helper.hpp +++ b/xml_converter/src/string_helper.hpp @@ -21,4 +21,4 @@ std::vector base64_decode(std::string const&); std::string get_base_dir(std::string filepath); bool has_suffix(std::string const& fullString, std::string const& ending); -void ensure_trailing_slash(std::string* directory_path); +std::string join_file_paths(std::string directory_path, std::string file_path); diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index e6de8464..96e02865 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -43,8 +43,7 @@ vector get_files_by_suffix(string directory, string suffix) { while ((entry = readdir(dir)) != NULL) { string filename = entry->d_name; if (filename != "." && filename != "..") { - ensure_trailing_slash(&directory); - string path = directory + filename; + string path = join_file_paths(directory, filename); if (entry->d_type == DT_DIR) { vector subfiles = get_files_by_suffix(path, suffix); // Default: markerpacks have all xml files in the first directory @@ -69,11 +68,9 @@ void move_supplementary_files(string input_directory, string output_directory) { while ((entry = readdir(dir)) != NULL) { string filename = entry->d_name; if (filename != "." && filename != "..") { - ensure_trailing_slash(&input_directory); - string path = input_directory + filename; + string path = join_file_paths(input_directory, filename); if (entry->d_type == DT_DIR) { - ensure_trailing_slash(&output_directory); - string new_directory = output_directory + filename; + string new_directory = join_file_paths(output_directory, filename); if (mkdir(new_directory.c_str(), 0700) == -1 && errno != EEXIST) { cout << "Error making " << new_directory << endl; continue; @@ -86,8 +83,7 @@ void move_supplementary_files(string input_directory, string output_directory) { else { // TODO: Only include files that are referenced by the // individual markers in order to avoid any unnessecary files - ensure_trailing_slash(&output_directory); - string new_path = output_directory + filename; + string new_path = join_file_paths(output_directory, filename); copy_file(path, new_path); } } @@ -111,13 +107,12 @@ void read_taco_directory(string input_path, map* marker_catego void write_taco_directory(string output_path, map* marker_categories, vector* parsed_pois) { // TODO: Exportion of XML Marker Packs File Structure #111 - ensure_trailing_slash(&output_path); if (!filesystem::is_directory(output_path)) { if (!filesystem::create_directory(output_path)) { cout << "Error: " << output_path << "is not a valid directory path" << endl; } } - write_xml_file(output_path + "xml_file.xml", marker_categories, parsed_pois); + write_xml_file(join_file_paths(output_path, "xml_file.xml"), marker_categories, parsed_pois); } //////////////////////////////////////////////////////////////////////////////// From f6bbf21ca9153cf7fad1ab37ed464309ef084e8e Mon Sep 17 00:00:00 2001 From: klingbolt Date: Thu, 30 Nov 2023 19:02:39 -0500 Subject: [PATCH 359/539] revert the changes to const variables --- xml_converter/src/packaging_protobin.cpp | 4 ++-- xml_converter/src/packaging_protobin.hpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/xml_converter/src/packaging_protobin.cpp b/xml_converter/src/packaging_protobin.cpp index 33406bc7..e10510ac 100644 --- a/xml_converter/src/packaging_protobin.cpp +++ b/xml_converter/src/packaging_protobin.cpp @@ -177,7 +177,7 @@ void _write_protobuf_file( } void write_protobuf_file( - string filepath, + const string& filepath, const StringHierarchy& category_filter, const map* marker_categories, const vector* parsed_pois) { @@ -207,7 +207,7 @@ void write_protobuf_file( // Write protobuf per map id void write_protobuf_file_per_map_id( - string proto_directory, + const string& proto_directory, const StringHierarchy& category_filter, const map* marker_categories, const vector* parsed_pois) { diff --git a/xml_converter/src/packaging_protobin.hpp b/xml_converter/src/packaging_protobin.hpp index 855726c6..a62c02b7 100644 --- a/xml_converter/src/packaging_protobin.hpp +++ b/xml_converter/src/packaging_protobin.hpp @@ -16,13 +16,13 @@ void read_protobuf_file( std::vector* parsed_pois); void write_protobuf_file( - std::string proto_directory, + const std::string& proto_directory, const StringHierarchy& category_filter, const std::map* marker_categories, const std::vector* parsed_pois); void write_protobuf_file_per_map_id( - std::string proto_directory, + const std::string& proto_directory, const StringHierarchy& category_filter, const std::map* marker_categories, const std::vector* parsed_pois); From f1dc817083cc81ae4be383a42c2b1c3a5df297d2 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Thu, 30 Nov 2023 22:53:01 -0500 Subject: [PATCH 360/539] Change how children into arrays of categorized nodes --- Category.gd | 16 +++++++ Spatial.gd | 120 +++++++++++++++++++++++++-------------------------- Spatial.tscn | 4 +- 3 files changed, 78 insertions(+), 62 deletions(-) diff --git a/Category.gd b/Category.gd index a5a5eac1..a425c060 100644 --- a/Category.gd +++ b/Category.gd @@ -3,5 +3,21 @@ extends Spatial const Waypoint = preload("res://waypoint.gd") var waypoint_category: Waypoint.Category +var paths: Array = [] +var icons: Array = [] +var subcategories: Array = [] + +func add_path(path): + self.add_child(path) + paths.push_back(path) + +func add_icon(icon): + self.add_child(icon) + icons.push_back(icon) + +func add_subcategory(subcategory): + self.add_child(subcategory) + subcategories.push_back(subcategory) + func _ready(): pass diff --git a/Spatial.gd b/Spatial.gd index e3d1cad5..4aa4f4b3 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -233,7 +233,7 @@ func decode_frame_packet(spb: StreamPeerBuffer): if map_is_open != map_was_open: self.categories.visible = !map_is_open - reset_minimap_masks() + reset_masks() map_was_open = map_is_open if unchecked_flag: @@ -337,24 +337,12 @@ func decode_context_packet(spb: StreamPeerBuffer): if self.map_id != old_map_id: print("New Map") - print("Saving Old Map") print("Loading New Map") load_waypoint_markers(self.map_id) - # TODO move this to reset_minimap_masks - set_shader_param(self.categories, compass_width, compass_height) - - reset_minimap_masks() + reset_masks() -func set_shader_param(node: Spatial, compass_width, compass_height): - for child in node.get_children(): - if child.get_name().find("Path") != -1: - child.get_node("MeshInstance").material_override.set_shader_param("map_size", Vector2(compass_width, compass_height)) - if child.get_name().find("Icon") != -1: - child.material_override.set_shader_param("map_size", Vector2(compass_width, compass_height)) - if child.get_name().find("Category") != -1: - set_shader_param(child, compass_width, compass_height) func decode_timeout_packet(spb: StreamPeerBuffer): @@ -364,7 +352,7 @@ func decode_timeout_packet(spb: StreamPeerBuffer): launch_burrito_link() -func reset_minimap_masks(): +func reset_masks(): var viewport_size = get_viewport().size compass_corner1 = Vector2(0, 0) compass_corner2 = viewport_size @@ -379,6 +367,23 @@ func reset_minimap_masks(): minimap_path.material.set_shader_param("minimap_corner", compass_corner1) minimap_path.material.set_shader_param("minimap_corner2", compass_corner2) + for category in self.categories.get_children(): + _reset_masks(category) + + +func _reset_masks(category: Spatial): + print(category.paths) + print(category.icons) + print(category.subcategories) + for path in category.paths: + path.print_tree_pretty() + path.get_node("MeshInstance").material_override.set_shader_param("map_size", Vector2(self.compass_width, self.compass_height)) + for icon in category.icons: + icon.material_override.set_shader_param("map_size", Vector2(self.compass_width, self.compass_height)) + for subcategory in category.subcategories: + _reset_masks(subcategory) + + var waypoint_data = Waypoint.Waypoint.new() var marker_file_dir = "user://protobins/" var marker_file_path = "" @@ -495,7 +500,7 @@ func waypoint_categories_to_godot_nodes(): func _waypoint_categories_to_godot_nodes(item: TreeItem, waypoint_category, full_category_name: String, parent_category: Spatial, collapsed: bool): var new_category = category_scene.instance() - parent_category.add_child(new_category) + parent_category.add_subcategory(new_category) new_category.waypoint_category = waypoint_category var category_item: TreeItem = self.marker_packs.create_item(item) if waypoint_category.get_name() == "": @@ -568,16 +573,14 @@ func populate_update_dict(category_item: TreeItem, category_visibility_data): func update_node_visibility(category_data): for key in category_data.keys(): var category = search_node_by_name(self.categories, key) - category.print_tree_pretty() - for node in category.get_children(): - print(node.get_name()) - if node.get_name().find("Category") == -1: - if category_data[key]: - node.visible = true - else: - node.visible = false - if node.get_name().find("Path") != -1: - self.minimap.get_node(node.minimap_path).visible = node.visible + var visibility = false + if category_data[key]: + visibility = true + for node in category.icons: + node.visible = visibility + for node in category.paths: + node.visible = visibility + self.minimap.get_node(node.minimap_path).visible = node.visible #Child visibility is contigent on all parents having permission @@ -625,7 +628,7 @@ func gen_new_path(points: Array, texture_path: String, waypoint_trail, category_ new_route.visible = is_category_visible(category_item) else: new_route.visible = false - category.add_child(new_route) + category.add_path(new_route) # Create a new 2D Path var new_2d_path = path2d_scene.instance() @@ -652,7 +655,7 @@ func gen_new_icon(position: Vector3, texture_path: String, waypoint_icon, catego new_icon.visible = is_category_visible(category_item) else: new_icon.visible = false - category.add_child(new_icon) + category.add_icon(new_icon) func search_node_by_name(node, target_name): for child in node.get_children(): @@ -665,11 +668,10 @@ func _search_node_by_name(node: Spatial, target_name: String): if "waypoint_category" in node and node.waypoint_category.get_name() == split_name[0]: if split_name.size() > 1: split_name.remove(0) - for child in node.get_children(): - if child.get_name().find("Category") != -1: - var result = _search_node_by_name(child, split_name.join(".")) - if result: - return result + for subcategory in node.subcategories: + var result = _search_node_by_name(subcategory, split_name.join(".")) + if result: + return result else: return node @@ -719,34 +721,30 @@ func gen_adjustment_nodes(): return var category = search_node_by_name(self.categories, self.currently_active_category.get_metadata(0)) - for child in category.get_children(): - if child.get_name().find("Path") != -1: - var route = child - print(route.minimap_path) - var path2d = self.minimap.get_node(route.minimap_path) - print(path2d.texture) - for i in range(route.get_point_count()): - var gizmo_position = route.get_point_position(i) - # Simplistic cull to prevent nodes that are too far away to be - # visible from being created. Additional work can be done here - # if this is not enough of an optimization in the future. - if (gizmo_position.distance_squared_to(self.correct_player_position) > 10000): - continue - var new_gizmo = gizmo_scene.instance() - new_gizmo.translation = gizmo_position - new_gizmo.link_point("path", route, path2d, i) - new_gizmo.connect("selected", self, "on_gizmo_selected") - new_gizmo.connect("deselected", self, "on_gizmo_deselected") - $Gizmos.add_child(new_gizmo) - if child.get_name().find("Icon") != -1: - var icon = child - if self.currently_active_category.get_metadata(0) == icon.waypoint.get_category().get_name(): - var new_gizmo = gizmo_scene.instance() - new_gizmo.translation = icon.translation - new_gizmo.link_point("icon", icon) - new_gizmo.connect("selected", self, "on_gizmo_selected") - new_gizmo.connect("deselected", self, "on_gizmo_deselected") - $Gizmos.add_child(new_gizmo) + for route in category.paths: + print(route.minimap_path) + var path2d = self.minimap.get_node(route.minimap_path) + print(path2d.texture) + for i in range(route.get_point_count()): + var gizmo_position = route.get_point_position(i) + # Simplistic cull to prevent nodes that are too far away to be + # visible from being created. Additional work can be done here + # if this is not enough of an optimization in the future. + if (gizmo_position.distance_squared_to(self.correct_player_position) > 10000): + continue + var new_gizmo = gizmo_scene.instance() + new_gizmo.translation = gizmo_position + new_gizmo.link_point("path", route, path2d, i) + new_gizmo.connect("selected", self, "on_gizmo_selected") + new_gizmo.connect("deselected", self, "on_gizmo_deselected") + $Gizmos.add_child(new_gizmo) + for icon in category.icons: + var new_gizmo = gizmo_scene.instance() + new_gizmo.translation = icon.translation + new_gizmo.link_point("icon", icon) + new_gizmo.connect("selected", self, "on_gizmo_selected") + new_gizmo.connect("deselected", self, "on_gizmo_deselected") + $Gizmos.add_child(new_gizmo) var currently_selected_node = null diff --git a/Spatial.tscn b/Spatial.tscn index 88df13b7..00e06f1c 100644 --- a/Spatial.tscn +++ b/Spatial.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=17 format=2] +[gd_scene load_steps=18 format=2] [ext_resource path="res://Spatial.gd" type="Script" id=1] [ext_resource path="res://shaders/range_indicators.shader" type="Shader" id=2] @@ -12,6 +12,7 @@ [ext_resource path="res://icon_new_path.png" type="Texture" id=10] [ext_resource path="res://icon_new_point.png" type="Texture" id=11] [ext_resource path="res://SettingsDialog.gd" type="Script" id=12] +[ext_resource path="res://Category.gd" type="Script" id=13] [sub_resource type="Shader" id=1] code = "shader_type canvas_item; @@ -868,6 +869,7 @@ mesh = SubResource( 3 ) material/0 = SubResource( 4 ) [node name="Categories" type="Spatial" parent="."] +script = ExtResource( 13 ) [connection signal="pressed" from="Control/GlobalMenuButton/main_menu_toggle" to="." method="_on_main_menu_toggle_pressed"] [connection signal="pressed" from="Control/GlobalMenuButton/EditorQuckPanel/HBoxContainer/CloseEditorQuickPanel" to="." method="_on_CloseEditorQuickPanel_pressed"] From 227bafd37cbb7f44b52784cb3c5ec77b4ef0dab1 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Thu, 30 Nov 2023 23:00:33 -0500 Subject: [PATCH 361/539] Changed arguments of new function to be const strings --- xml_converter/src/string_helper.cpp | 8 ++++---- xml_converter/src/string_helper.hpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/xml_converter/src/string_helper.cpp b/xml_converter/src/string_helper.cpp index ed2a053e..5cac83e0 100644 --- a/xml_converter/src/string_helper.cpp +++ b/xml_converter/src/string_helper.cpp @@ -288,10 +288,10 @@ bool has_suffix(std::string const& fullString, std::string const& ending) { } } -string join_file_paths(string directory_path, string file_path) { - string output = directory_path; - if (!has_suffix(directory_path, "/")) { +string join_file_paths(const string& path_a, const string& path_b) { + string output = path_a; + if (!has_suffix(path_a, "/")) { output += "/"; } - return output + file_path; + return output + path_b; } diff --git a/xml_converter/src/string_helper.hpp b/xml_converter/src/string_helper.hpp index 31c83989..7c1f4432 100644 --- a/xml_converter/src/string_helper.hpp +++ b/xml_converter/src/string_helper.hpp @@ -21,4 +21,4 @@ std::vector base64_decode(std::string const&); std::string get_base_dir(std::string filepath); bool has_suffix(std::string const& fullString, std::string const& ending); -std::string join_file_paths(std::string directory_path, std::string file_path); +std::string join_file_paths(const std::string& path_a, const std::string& path_b); From 17f424a553e955ce8887db9d4ddbd940bcf98e67 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 3 Dec 2023 16:00:19 -0500 Subject: [PATCH 362/539] Added proto test --- xml_converter/doc/texture/animation_speed.md | 4 ++++ .../proto_animation_speed/markers.bin | Bin 0 -> 75 bytes xml_converter/intigration_tests/testcases.py | 3 ++- xml_converter/src/attribute/float.cpp | 22 ++++++++++++++++++ 4 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 xml_converter/intigration_tests/expected_outputs/proto_animation_speed/markers.bin diff --git a/xml_converter/doc/texture/animation_speed.md b/xml_converter/doc/texture/animation_speed.md index 36e7a055..751d445d 100644 --- a/xml_converter/doc/texture/animation_speed.md +++ b/xml_converter/doc/texture/animation_speed.md @@ -4,6 +4,10 @@ type: Float32 applies_to: [Trail] xml_fields: ["AnimSpeed", "AnimationSpeed"] protobuf_field: animation_speed +custom_functions: + read.xml: + function: default_value_one_xml_attribute_to_float + side_effects: [] --- The speed which the texture should be moving across the object. diff --git a/xml_converter/intigration_tests/expected_outputs/proto_animation_speed/markers.bin b/xml_converter/intigration_tests/expected_outputs/proto_animation_speed/markers.bin new file mode 100644 index 0000000000000000000000000000000000000000..549286670c0dfb387995eed42f78cf97687b4d88 GIT binary patch literal 75 wcmd<` #include #include @@ -49,3 +50,24 @@ void proto_to_float(float input, float* value, bool* is_set) { void float_to_proto(float value, std::function setter) { setter(value); } + +//////////////////////////////////////////////////////////////////////////////// +// replace_one_point_zero_with_zero +// +// Parses a float from the value of a rapidxml::xml_attribute and +// replaces it +//////////////////////////////////////////////////////////////////////////////// +void default_value_one_xml_attribute_to_float( + rapidxml::xml_attribute<>* input, + std::vector* errors, + XMLReaderState* state, + float* value, + bool* is_set) { + if (std::stof(get_attribute_value(input)) == 1.0) { + *value = 0; + } + else { + *value = std::stof(get_attribute_value(input)); + *is_set = true; + } +} \ No newline at end of file From 502bc315857e0a827cf3cf61c07b91ed13dc9c85 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 3 Dec 2023 16:08:49 -0500 Subject: [PATCH 363/539] Added default case to tests --- .../proto_animation_speed/markers.bin | Bin 75 -> 79 bytes .../xml_animation_speed/xml_file.xml | 2 ++ .../inputs/xml_animation_speed/xml_file.xml | 2 ++ xml_converter/src/attribute/float.cpp | 7 +++---- xml_converter/src/attribute/float.hpp | 7 +++++++ xml_converter/src/trail_gen.cpp | 4 ++-- 6 files changed, 16 insertions(+), 6 deletions(-) diff --git a/xml_converter/intigration_tests/expected_outputs/proto_animation_speed/markers.bin b/xml_converter/intigration_tests/expected_outputs/proto_animation_speed/markers.bin index 549286670c0dfb387995eed42f78cf97687b4d88..61055f2236ecb735708bebece412478749d516ee 100644 GIT binary patch literal 79 xcmd<`<>L0ORB%o#Nlni$s#IbCLRQzqUp*XvROQQWPFO_1@&_RDhajq9JOKVB9pL}~ delta 24 fcmebG=I8R{;`Xgna84{qP0uf?oG2(fQB4y7O?L*% diff --git a/xml_converter/intigration_tests/expected_outputs/xml_animation_speed/xml_file.xml b/xml_converter/intigration_tests/expected_outputs/xml_animation_speed/xml_file.xml index 029bdadd..03e75139 100644 --- a/xml_converter/intigration_tests/expected_outputs/xml_animation_speed/xml_file.xml +++ b/xml_converter/intigration_tests/expected_outputs/xml_animation_speed/xml_file.xml @@ -4,9 +4,11 @@ + + diff --git a/xml_converter/intigration_tests/inputs/xml_animation_speed/xml_file.xml b/xml_converter/intigration_tests/inputs/xml_animation_speed/xml_file.xml index 285ce5bc..faa359f8 100644 --- a/xml_converter/intigration_tests/inputs/xml_animation_speed/xml_file.xml +++ b/xml_converter/intigration_tests/inputs/xml_animation_speed/xml_file.xml @@ -4,9 +4,11 @@ + + diff --git a/xml_converter/src/attribute/float.cpp b/xml_converter/src/attribute/float.cpp index 266b697a..5114f882 100644 --- a/xml_converter/src/attribute/float.cpp +++ b/xml_converter/src/attribute/float.cpp @@ -1,6 +1,5 @@ #include "float.hpp" -#include #include #include @@ -55,9 +54,9 @@ void float_to_proto(float value, std::function setter) { // replace_one_point_zero_with_zero // // Parses a float from the value of a rapidxml::xml_attribute and -// replaces it +// replaces default value of one with zero //////////////////////////////////////////////////////////////////////////////// -void default_value_one_xml_attribute_to_float( +void default_value_one_xml_attribute_to_float( rapidxml::xml_attribute<>* input, std::vector* errors, XMLReaderState* state, @@ -70,4 +69,4 @@ void default_value_one_xml_attribute_to_float( *value = std::stof(get_attribute_value(input)); *is_set = true; } -} \ No newline at end of file +} diff --git a/xml_converter/src/attribute/float.hpp b/xml_converter/src/attribute/float.hpp index 5560ca64..3dcd40b1 100644 --- a/xml_converter/src/attribute/float.hpp +++ b/xml_converter/src/attribute/float.hpp @@ -21,3 +21,10 @@ std::string float_to_xml_attribute(const std::string& attribute_name, const floa void proto_to_float(float input, float* value, bool* is_set); void float_to_proto(float value, std::function setter); + +void default_value_one_xml_attribute_to_float( + rapidxml::xml_attribute<>* input, + std::vector* errors, + XMLReaderState* state, + float* value, + bool* is_set); diff --git a/xml_converter/src/trail_gen.cpp b/xml_converter/src/trail_gen.cpp index 79579a25..6cc1bb82 100644 --- a/xml_converter/src/trail_gen.cpp +++ b/xml_converter/src/trail_gen.cpp @@ -29,10 +29,10 @@ bool Trail::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectorachievement_id), &(this->achievement_id_is_set)); } else if (attributename == "animspeed") { - xml_attribute_to_float(attribute, errors, state, &(this->animation_speed), &(this->animation_speed_is_set)); + default_value_one_xml_attribute_to_float(attribute, errors, state, &(this->animation_speed), &(this->animation_speed_is_set)); } else if (attributename == "animationspeed") { - xml_attribute_to_float(attribute, errors, state, &(this->animation_speed), &(this->animation_speed_is_set)); + default_value_one_xml_attribute_to_float(attribute, errors, state, &(this->animation_speed), &(this->animation_speed_is_set)); } else if (attributename == "type") { xml_attribute_to_marker_category(attribute, errors, state, &(this->category), &(this->category_is_set)); From e56ca0ba0c33da8189e0b62c460a6a43cfd9b478 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 3 Dec 2023 20:09:31 -0500 Subject: [PATCH 364/539] Added trail data to test, fixed bug in trail data reading --- .../proto_animation_speed/markers.bin | Bin 79 -> 632 bytes .../xml_animation_speed/xml_file.xml | 24 +++++++++--------- .../inputs/xml_animation_speed/trail.trl | Bin 0 -> 44 bytes .../inputs/xml_animation_speed/xml_file.xml | 24 +++++++++--------- xml_converter/src/attribute/trail_data.cpp | 8 +++++- 5 files changed, 31 insertions(+), 25 deletions(-) create mode 100644 xml_converter/intigration_tests/inputs/xml_animation_speed/trail.trl diff --git a/xml_converter/intigration_tests/expected_outputs/proto_animation_speed/markers.bin b/xml_converter/intigration_tests/expected_outputs/proto_animation_speed/markers.bin index 61055f2236ecb735708bebece412478749d516ee..a9eb9d114cf0323b1e103d1e1a1e4de4f057910e 100644 GIT binary patch literal 632 zcmd=3%EHC%TdCljSdyBaUsS22r(k5ICB(zP&|uHNz~BHx4pJZ%|Rc@Kar z21f=40Y{S68*22+4oakIs(ks)iDZ|N>T^;ZMZQnSu;~CfVRndQO+Y`9XA=Oc Cl5}AJ literal 79 xcmd<`<>L0ORB%o#Nlni$s#IbCLRQzqUp*XvROQQWPFO_1@&_RDhajq9JOKVB9pL}~ diff --git a/xml_converter/intigration_tests/expected_outputs/xml_animation_speed/xml_file.xml b/xml_converter/intigration_tests/expected_outputs/xml_animation_speed/xml_file.xml index 03e75139..ee21e9ac 100644 --- a/xml_converter/intigration_tests/expected_outputs/xml_animation_speed/xml_file.xml +++ b/xml_converter/intigration_tests/expected_outputs/xml_animation_speed/xml_file.xml @@ -3,17 +3,17 @@ - - - - - - - - - - - - + + + + + + + + + + + + diff --git a/xml_converter/intigration_tests/inputs/xml_animation_speed/trail.trl b/xml_converter/intigration_tests/inputs/xml_animation_speed/trail.trl new file mode 100644 index 0000000000000000000000000000000000000000..201ab83c8671d0e579b91b4f4f911c933b6a9de9 GIT binary patch literal 44 ncmZQzU|=u;Vg`l=dmwgTV0Zw;3_!d9L^}eRK>7d>3pfG*cS!~W literal 0 HcmV?d00001 diff --git a/xml_converter/intigration_tests/inputs/xml_animation_speed/xml_file.xml b/xml_converter/intigration_tests/inputs/xml_animation_speed/xml_file.xml index faa359f8..92ebf53c 100644 --- a/xml_converter/intigration_tests/inputs/xml_animation_speed/xml_file.xml +++ b/xml_converter/intigration_tests/inputs/xml_animation_speed/xml_file.xml @@ -3,17 +3,17 @@ - - - - - - - - - - - - + + + + + + + + + + + + diff --git a/xml_converter/src/attribute/trail_data.cpp b/xml_converter/src/attribute/trail_data.cpp index f4d5177f..b5bcaa5b 100644 --- a/xml_converter/src/attribute/trail_data.cpp +++ b/xml_converter/src/attribute/trail_data.cpp @@ -44,6 +44,12 @@ void xml_attribute_to_trail_data( errors->push_back(new XMLAttributeValueError("No trail file found at " + trail_path, input)); return; } + + streampos fsize = trail_data_file.tellg(); + trail_data_file.seekg(0, std::ios::end); + fsize = trail_data_file.tellg() - fsize; + trail_data_file.seekg(0, std::ios::beg); + char version[4]; trail_data_file.read(version, 4); // Validate the version number. Currently supports versions [0] @@ -57,7 +63,7 @@ void xml_attribute_to_trail_data( *map_id_value = *reinterpret_cast(map_id_char); *is_map_id_set = true; - while (trail_data_file.tellg() > 0) { + while (trail_data_file.tellg() > 0 && trail_data_file.tellg() < fsize) { char point_x[4]; trail_data_file.read(point_x, 4); trail_data.points_x.push_back(*reinterpret_cast(point_x)); From 823d00072b50218a34a8bc46f993d596fa7610ef Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 3 Dec 2023 20:56:46 -0500 Subject: [PATCH 365/539] Changed logic of trail data reading --- xml_converter/src/attribute/trail_data.cpp | 24 +++++++--------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/xml_converter/src/attribute/trail_data.cpp b/xml_converter/src/attribute/trail_data.cpp index b5bcaa5b..0b9bfe0b 100644 --- a/xml_converter/src/attribute/trail_data.cpp +++ b/xml_converter/src/attribute/trail_data.cpp @@ -45,11 +45,6 @@ void xml_attribute_to_trail_data( return; } - streampos fsize = trail_data_file.tellg(); - trail_data_file.seekg(0, std::ios::end); - fsize = trail_data_file.tellg() - fsize; - trail_data_file.seekg(0, std::ios::beg); - char version[4]; trail_data_file.read(version, 4); // Validate the version number. Currently supports versions [0] @@ -63,20 +58,15 @@ void xml_attribute_to_trail_data( *map_id_value = *reinterpret_cast(map_id_char); *is_map_id_set = true; - while (trail_data_file.tellg() > 0 && trail_data_file.tellg() < fsize) { - char point_x[4]; - trail_data_file.read(point_x, 4); - trail_data.points_x.push_back(*reinterpret_cast(point_x)); - char point_y[4]; - trail_data_file.read(point_y, 4); - trail_data.points_y.push_back(*reinterpret_cast(point_y)); - char point_z[4]; - trail_data_file.read(point_z, 4); - trail_data.points_z.push_back(*reinterpret_cast(point_z)); + char points[12]; + while (trail_data_file.read(points, 12)) { + trail_data.points_x.push_back(*reinterpret_cast(points)); + trail_data.points_y.push_back(*reinterpret_cast(points + 4)); + trail_data.points_z.push_back(*reinterpret_cast(points + 8)); } - if (trail_data.points_x.size() != trail_data.points_y.size() || trail_data.points_x.size() != trail_data.points_z.size()) { - errors->push_back(new XMLAttributeValueError("Unexpected number of bits in trail file. Does not have equal number of X, Y, and Z coordinates." + trail_path, input)); + if (trail_data_file.gcount() != 0) { + errors->push_back(new XMLAttributeValueError("Unexpected number of bytes in trail file." + trail_path, input)); } trail_data_file.close(); From 58ede8c63afc1b4b06e6502deca5691d8b106356 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 4 Dec 2023 21:08:22 -0500 Subject: [PATCH 366/539] Changing anim speed to be default 0 --- xml_converter/doc/texture/animation_speed.md | 4 ---- .../proto_animation_speed/markers.bin | Bin 632 -> 642 bytes .../xml_animation_speed/xml_file.xml | 4 ++-- xml_converter/src/attribute/float.cpp | 21 ------------------ xml_converter/src/attribute/float.hpp | 7 ------ xml_converter/src/trail_gen.cpp | 4 ++-- 6 files changed, 4 insertions(+), 36 deletions(-) diff --git a/xml_converter/doc/texture/animation_speed.md b/xml_converter/doc/texture/animation_speed.md index 751d445d..36e7a055 100644 --- a/xml_converter/doc/texture/animation_speed.md +++ b/xml_converter/doc/texture/animation_speed.md @@ -4,10 +4,6 @@ type: Float32 applies_to: [Trail] xml_fields: ["AnimSpeed", "AnimationSpeed"] protobuf_field: animation_speed -custom_functions: - read.xml: - function: default_value_one_xml_attribute_to_float - side_effects: [] --- The speed which the texture should be moving across the object. diff --git a/xml_converter/intigration_tests/expected_outputs/proto_animation_speed/markers.bin b/xml_converter/intigration_tests/expected_outputs/proto_animation_speed/markers.bin index a9eb9d114cf0323b1e103d1e1a1e4de4f057910e..269c512cc66e9454650f74aeff886b3e17a900fa 100644 GIT binary patch delta 48 zcmeyt(!?sj^`C`{+qY7|Ik6-)J-?`OqC+AJ14D!T#DdwAtr-oV?Ci-)87~6>a1Rfq delta 26 ecmZo-{lUV-^>reX{Y1fpiOaIUq}Am0jF$m}4+?_- diff --git a/xml_converter/intigration_tests/expected_outputs/xml_animation_speed/xml_file.xml b/xml_converter/intigration_tests/expected_outputs/xml_animation_speed/xml_file.xml index ee21e9ac..61c293ba 100644 --- a/xml_converter/intigration_tests/expected_outputs/xml_animation_speed/xml_file.xml +++ b/xml_converter/intigration_tests/expected_outputs/xml_animation_speed/xml_file.xml @@ -4,11 +4,11 @@ - + - + diff --git a/xml_converter/src/attribute/float.cpp b/xml_converter/src/attribute/float.cpp index a00bb4a0..aa76a7b7 100644 --- a/xml_converter/src/attribute/float.cpp +++ b/xml_converter/src/attribute/float.cpp @@ -59,24 +59,3 @@ void float_to_proto( std::function setter) { setter(value); } - -//////////////////////////////////////////////////////////////////////////////// -// replace_one_point_zero_with_zero -// -// Parses a float from the value of a rapidxml::xml_attribute and -// replaces default value of one with zero -//////////////////////////////////////////////////////////////////////////////// -void default_value_one_xml_attribute_to_float( - rapidxml::xml_attribute<>* input, - std::vector* errors, - XMLReaderState* state, - float* value, - bool* is_set) { - if (std::stof(get_attribute_value(input)) == 1.0) { - *value = 0; - } - else { - *value = std::stof(get_attribute_value(input)); - *is_set = true; - } -} diff --git a/xml_converter/src/attribute/float.hpp b/xml_converter/src/attribute/float.hpp index 5e7bb656..3b7f2cc5 100644 --- a/xml_converter/src/attribute/float.hpp +++ b/xml_converter/src/attribute/float.hpp @@ -34,10 +34,3 @@ void float_to_proto( float value, ProtoWriterState* state, std::function setter); - -void default_value_one_xml_attribute_to_float( - rapidxml::xml_attribute<>* input, - std::vector* errors, - XMLReaderState* state, - float* value, - bool* is_set); diff --git a/xml_converter/src/trail_gen.cpp b/xml_converter/src/trail_gen.cpp index 0332136f..0ee4890d 100644 --- a/xml_converter/src/trail_gen.cpp +++ b/xml_converter/src/trail_gen.cpp @@ -29,10 +29,10 @@ bool Trail::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectorachievement_id), &(this->achievement_id_is_set)); } else if (attributename == "animspeed") { - default_value_one_xml_attribute_to_float(attribute, errors, state, &(this->animation_speed), &(this->animation_speed_is_set)); + xml_attribute_to_float(attribute, errors, state, &(this->animation_speed), &(this->animation_speed_is_set)); } else if (attributename == "animationspeed") { - default_value_one_xml_attribute_to_float(attribute, errors, state, &(this->animation_speed), &(this->animation_speed_is_set)); + xml_attribute_to_float(attribute, errors, state, &(this->animation_speed), &(this->animation_speed_is_set)); } else if (attributename == "type") { xml_attribute_to_marker_category(attribute, errors, state, &(this->category), &(this->category_is_set)); From 7a287a25746618183a8da2df2f02888fa2e74cc4 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 10 Dec 2023 23:23:08 -0500 Subject: [PATCH 367/539] Added class CategoryData to hold refrences to 3d and 2d trees inside the UI tree --- Category.gd | 15 ++--- Category2D.gd | 12 ++++ Category2D.tscn | 6 ++ CategoryData.gd | 6 ++ Spatial.gd | 171 ++++++++++++++++++++---------------------------- Spatial.tscn | 14 ++-- 6 files changed, 109 insertions(+), 115 deletions(-) create mode 100644 Category2D.gd create mode 100644 Category2D.tscn create mode 100644 CategoryData.gd diff --git a/Category.gd b/Category.gd index a425c060..e0eee3d6 100644 --- a/Category.gd +++ b/Category.gd @@ -1,23 +1,18 @@ extends Spatial -const Waypoint = preload("res://waypoint.gd") -var waypoint_category: Waypoint.Category - var paths: Array = [] var icons: Array = [] var subcategories: Array = [] + func add_path(path): - self.add_child(path) + self.add_child(path, true) paths.push_back(path) func add_icon(icon): - self.add_child(icon) + self.add_child(icon, true) icons.push_back(icon) - + func add_subcategory(subcategory): - self.add_child(subcategory) + self.add_child(subcategory, true) subcategories.push_back(subcategory) - -func _ready(): - pass diff --git a/Category2D.gd b/Category2D.gd new file mode 100644 index 00000000..79260a49 --- /dev/null +++ b/Category2D.gd @@ -0,0 +1,12 @@ +extends Node2D + +var paths2d: Array = [] +var subcategories: Array = [] + +func add_path2d(path): + self.add_child(path, true) + paths2d.push_back(path) + +func add_subcategory(subcategory): + self.add_child(subcategory, true) + subcategories.push_back(subcategory) diff --git a/Category2D.tscn b/Category2D.tscn new file mode 100644 index 00000000..37bc52c6 --- /dev/null +++ b/Category2D.tscn @@ -0,0 +1,6 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://Category2D.gd" type="Script" id=1] + +[node name="Category2D" type="Node2D"] +script = ExtResource( 1 ) diff --git a/CategoryData.gd b/CategoryData.gd new file mode 100644 index 00000000..8e307708 --- /dev/null +++ b/CategoryData.gd @@ -0,0 +1,6 @@ +const Waypoint = preload("res://waypoint.gd") + +var category: Spatial +var category2d: Node2D +var waypoint_category: Waypoint.Category +var is_visible = false diff --git a/Spatial.gd b/Spatial.gd index 4aa4f4b3..98867c1b 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -52,8 +52,10 @@ var is_transient:bool = false const route_scene = preload("res://Route.tscn") const icon_scene = preload("res://Icon.tscn") const category_scene = preload("res://Category.tscn") +const category2d_scene = preload("res://Category2D.tscn") const path2d_scene = preload("res://Route2D.tscn") const gizmo_scene = preload("res://Gizmo/PointEdit.tscn") +const CategoryData = preload("res://CategoryData.gd") ##########Node Connections########### onready var marker_packs := $Control/Dialogs/MarkerPacks/MarkerPacks as Tree @@ -363,25 +365,27 @@ func reset_masks(): compass_corner1 = viewport_size - Vector2(compass_width, compass_height) compass_corner2 = compass_corner1 + Vector2(compass_width, compass_height) - for minimap_path in $Control/MiniMap.get_children(): - minimap_path.material.set_shader_param("minimap_corner", compass_corner1) - minimap_path.material.set_shader_param("minimap_corner2", compass_corner2) + for child in $Control/MiniMap.get_children(): + if child.get_name() == "Category2D": + _reset_2D_masks(child, compass_corner1, compass_corner2) for category in self.categories.get_children(): - _reset_masks(category) + _reset_3D_masks(category) +func _reset_2D_masks(category2d: Node2D, compass_corner1, compass_corner2): + for path2d in category2d.paths2d: + path2d.material.set_shader_param("minimap_corner", compass_corner1) + path2d.material.set_shader_param("minimap_corner2", compass_corner2) + for subcategory in category2d.subcategories: + _reset_2D_masks(subcategory, compass_corner1, compass_corner2) -func _reset_masks(category: Spatial): - print(category.paths) - print(category.icons) - print(category.subcategories) +func _reset_3D_masks(category: Spatial): for path in category.paths: - path.print_tree_pretty() path.get_node("MeshInstance").material_override.set_shader_param("map_size", Vector2(self.compass_width, self.compass_height)) for icon in category.icons: icon.material_override.set_shader_param("map_size", Vector2(self.compass_width, self.compass_height)) for subcategory in category.subcategories: - _reset_masks(subcategory) + _reset_3D_masks(subcategory) var waypoint_data = Waypoint.Waypoint.new() @@ -495,93 +499,87 @@ func init_category_tree(): func waypoint_categories_to_godot_nodes(): for waypoint_category in self.waypoint_data.get_category(): - _waypoint_categories_to_godot_nodes(null, waypoint_category, waypoint_category.get_name(), self.categories, false) + _waypoint_categories_to_godot_nodes(null, waypoint_category, self.categories, self.minimap, false) -func _waypoint_categories_to_godot_nodes(item: TreeItem, waypoint_category, full_category_name: String, parent_category: Spatial, collapsed: bool): - var new_category = category_scene.instance() - parent_category.add_subcategory(new_category) - new_category.waypoint_category = waypoint_category - var category_item: TreeItem = self.marker_packs.create_item(item) +func _waypoint_categories_to_godot_nodes(item: TreeItem, waypoint_category, parent_category: Spatial, parent_category2d: Node2D, collapsed: bool): if waypoint_category.get_name() == "": - # If this is called, there is an error in the Waypoint data - category_item.set_text(0, "No name") - category_item.set_metadata(0, "") + # If this is called, there is an empty Category in the Waypoint data print("Category found with no name.") return + + var godot_category = category_scene.instance() + var godot_category2d = category2d_scene.instance() + parent_category.add_subcategory(godot_category) + parent_category2d.add_subcategory(godot_category2d) + + var category_item: TreeItem = self.marker_packs.create_item(item) + var category_data = CategoryData.new() + category_data.waypoint_category = waypoint_category + category_data.category = godot_category + category_data.category2d = godot_category2d + category_item.set_metadata(0, category_data) + category_item.set_text(0, waypoint_category.get_name()) - category_item.set_metadata(0, full_category_name) category_item.set_cell_mode(1, TreeItem.CELL_MODE_CHECK) - category_item.set_checked(1, Settings.local_category_data.get(full_category_name, {}).get("checked", false)) + # TODO: Without unique category names, this could give false info when + # switching maps or changes to marker pack files. + godot_category.name = waypoint_category.get_name() + var relative_path: String = self.categories.get_path_to(godot_category) + category_item.set_checked(1, Settings.local_category_data.get(relative_path, {}).get("checked", false)) + category_item.set_tooltip(1, "Show/Hide") category_item.set_editable(1, true) category_item.set_collapsed(collapsed) category_item.set_selectable(1, false) + + category_data.is_visible = is_category_visible(category_item) + godot_category.visible = category_data.is_visible + godot_category2d.visible = category_data.is_visible for path in waypoint_category.get_trail(): var path_points := PoolVector3Array() var trail_data = path.get_trail_data() if trail_data.get_points_x().size() != trail_data.get_points_y().size() or trail_data.get_points_x().size() != trail_data.get_points_z().size(): - print("Warning: Trail ", full_category_name, " does not have equal number of X, Y, and Z coordinates.") + print("Warning: Trail ", waypoint_category.get_name(), " does not have equal number of X, Y, and Z coordinates.") for index in range(0, trail_data.get_points_z().size()): path_points.append(Vector3(trail_data.get_points_x()[index], trail_data.get_points_y()[index], trail_data.get_points_z()[index])) var texture_path = path.get_texture_path() if texture_path == null: - print("Warning: No texture found in " , full_category_name) + print("Warning: No texture found in " , waypoint_category.get_name()) continue var full_texture_path = self.marker_file_dir + texture_path.get_path() - gen_new_path(path_points, full_texture_path, path, category_item, new_category) + gen_new_path(path_points, full_texture_path, path, category_item) for icon in waypoint_category.get_icon(): var position = icon.get_position() if position == null: - print("Warning: No position found for icon ", full_category_name) + print("Warning: No position found for icon ", waypoint_category.get_name()) continue var position_vector = Vector3(position.get_x(), position.get_y(), position.get_z()) var texture_path = icon.get_texture_path() if texture_path == null: - print("Warning: No texture found in " , full_category_name) + print("Warning: No texture found in " , waypoint_category.get_name()) continue var full_texture_path = self.marker_file_dir + texture_path.get_path() - gen_new_icon(position_vector, full_texture_path, icon, category_item, new_category) + gen_new_icon(position_vector, full_texture_path, icon, category_item) for category_child in waypoint_category.get_children(): - _waypoint_categories_to_godot_nodes(category_item, category_child, full_category_name + "." + category_child.get_name(), new_category, true) + _waypoint_categories_to_godot_nodes(category_item, category_child, godot_category, godot_category2d, true) func apply_category_visibility_to_nodes(category_item: TreeItem): - Settings.local_category_data[category_item.get_metadata(0)] = { + var category_data = category_item.get_metadata(0) + var relative_path: String = self.categories.get_path_to(category_data.category) + Settings.local_category_data[relative_path] = { "checked" : category_item.is_checked(1), } Settings.save() - var temporary_category_visibility_data = populate_update_dict(category_item, {}) - update_node_visibility(temporary_category_visibility_data) - - -# Builds a dictionary of the visibility of a specific category and all children -func populate_update_dict(category_item: TreeItem, category_visibility_data): - category_visibility_data[category_item.get_metadata(0)] = is_category_visible(category_item) - var child_item = category_item.get_children() - while child_item != null: - category_visibility_data = populate_update_dict(child_item, category_visibility_data) - child_item = child_item.get_next() - return category_visibility_data - - -#Updates the visibilty of a node and all children. -func update_node_visibility(category_data): - for key in category_data.keys(): - var category = search_node_by_name(self.categories, key) - var visibility = false - if category_data[key]: - visibility = true - for node in category.icons: - node.visible = visibility - for node in category.paths: - node.visible = visibility - self.minimap.get_node(node.minimap_path).visible = node.visible - + + category_data.is_visible = category_item.is_checked(1) + category_data.category.visible = category_data.is_visible + category_data.category2d.visible = category_data.is_visible #Child visibility is contigent on all parents having permission func is_category_visible(category_item: TreeItem) -> bool: @@ -595,7 +593,7 @@ func is_category_visible(category_item: TreeItem) -> bool: return false -func gen_new_path(points: Array, texture_path: String, waypoint_trail, category_item: TreeItem, category: Spatial): +func gen_new_path(points: Array, texture_path: String, waypoint_trail, category_item: TreeItem): # Create the texture to use from an image file # TODO: We want to be able to cache this data so that if a texture is used # by multiple objects we only need to keep ony copy of it in memory. #22. @@ -624,11 +622,9 @@ func gen_new_path(points: Array, texture_path: String, waypoint_trail, category_ new_route.create_mesh(points_3d) new_route.set_texture(texture) new_route.waypoint = waypoint_trail - if category_item != null: - new_route.visible = is_category_visible(category_item) - else: - new_route.visible = false - category.add_path(new_route) + var category_data = category_item.get_metadata(0) + category_data.category.add_path(new_route) + # Create a new 2D Path var new_2d_path = path2d_scene.instance() @@ -637,43 +633,22 @@ func gen_new_path(points: Array, texture_path: String, waypoint_trail, category_ points_2d.append(Vector2(point[0], -point[2])) new_2d_path.points = points_2d new_2d_path.texture = texture - new_2d_path.visible = new_route.visible - self.minimap.add_child(new_2d_path) - new_route.minimap_path= new_2d_path.get_path() + category_data.category2d.add_path2d(new_2d_path) self.currently_active_path = new_route self.currently_active_path_2d = new_2d_path -func gen_new_icon(position: Vector3, texture_path: String, waypoint_icon, category_item: TreeItem, category: Spatial): +func gen_new_icon(position: Vector3, texture_path: String, waypoint_icon, category_item: TreeItem): position.z = -position.z var new_icon = icon_scene.instance() new_icon.translation = position new_icon.set_icon_image(texture_path) new_icon.waypoint = waypoint_icon - if category_item != null: - new_icon.visible = is_category_visible(category_item) - else: - new_icon.visible = false - category.add_icon(new_icon) + var category_data = category_item.get_metadata(0) + new_icon.visible = category_data.is_visible + category_data.category.add_icon(new_icon) -func search_node_by_name(node, target_name): - for child in node.get_children(): - var result = _search_node_by_name(child, target_name) - if result: - return result - -func _search_node_by_name(node: Spatial, target_name: String): - var split_name = target_name.split(".") - if "waypoint_category" in node and node.waypoint_category.get_name() == split_name[0]: - if split_name.size() > 1: - split_name.remove(0) - for subcategory in node.subcategories: - var result = _search_node_by_name(subcategory, split_name.join(".")) - if result: - return result - else: - return node # This function take all of the currently rendered objects and converts it into # the data format that is saved/loaded from. @@ -720,11 +695,11 @@ func gen_adjustment_nodes(): print("No category selected") return - var category = search_node_by_name(self.categories, self.currently_active_category.get_metadata(0)) - for route in category.paths: - print(route.minimap_path) - var path2d = self.minimap.get_node(route.minimap_path) - print(path2d.texture) + var category = self.currently_active_category.get_metadata(0).category + var category2d = self.currently_active_category.get_metadata(0).category2d + for index in category.paths.size(): + var route = category.paths[index] + var path2d = category2d.paths2d[index] for i in range(route.get_point_count()): var gizmo_position = route.get_point_position(i) # Simplistic cull to prevent nodes that are too far away to be @@ -847,18 +822,16 @@ func _on_NewPath_pressed(): # Create a new icon and give it the texture ################################################################################ func _on_NewIcon_pressed(): - var category = search_node_by_name(self.categories, self.currently_active_category.get_metadata(0)) - var waypoint_category = category.waypoint_category + var waypoint_category = self.currently_active_category.get_metadata(0).waypoint_category var waypoint_icon = waypoint_category.new_icon() - gen_new_icon(self.player_position, self.next_texture_path, waypoint_icon, self.currently_active_category, category) + gen_new_icon(self.player_position, self.next_texture_path, waypoint_icon, self.currently_active_category) # A new path point is created func _on_NewPathPoint_pressed(): if self.currently_active_path == null: - var category = search_node_by_name(self.categories, self.currently_active_category.get_metadata(0)) - var waypoint_category = category.waypoint_category + var waypoint_category = self.currently_active_category.get_metadata(0).waypoint_category var waypoint_trail = waypoint_category.new_trail() - gen_new_path([self.player_position], self.next_texture_path, waypoint_trail, self.currently_active_category, category) + gen_new_path([self.player_position], self.next_texture_path, waypoint_trail, self.currently_active_category) else: var z_accurate_player_position = player_position z_accurate_player_position.z = -z_accurate_player_position.z diff --git a/Spatial.tscn b/Spatial.tscn index 00e06f1c..2cc9dc2e 100644 --- a/Spatial.tscn +++ b/Spatial.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=18 format=2] +[gd_scene load_steps=19 format=2] [ext_resource path="res://Spatial.gd" type="Script" id=1] [ext_resource path="res://shaders/range_indicators.shader" type="Shader" id=2] @@ -13,6 +13,7 @@ [ext_resource path="res://icon_new_point.png" type="Texture" id=11] [ext_resource path="res://SettingsDialog.gd" type="Script" id=12] [ext_resource path="res://Category.gd" type="Script" id=13] +[ext_resource path="res://Category2D.gd" type="Script" id=15] [sub_resource type="Shader" id=1] code = "shader_type canvas_item; @@ -51,6 +52,11 @@ shader_param/custom_7_value = 500.0 [node name="Spatial" type="Spatial"] script = ExtResource( 1 ) +[node name="Categories" type="Spatial" parent="."] +script = ExtResource( 13 ) + +[node name="Gizmos" type="Spatial" parent="."] + [node name="CameraMount" type="Spatial" parent="."] [node name="Camera" type="Camera" parent="CameraMount"] @@ -68,6 +74,7 @@ __meta__ = { [node name="MiniMap" type="Node2D" parent="Control"] material = SubResource( 2 ) scale = Vector2( 2, 2 ) +script = ExtResource( 15 ) [node name="Line2D" parent="Control/MiniMap" instance=ExtResource( 4 )] @@ -860,17 +867,12 @@ color = Color( 0, 0, 0, 1 ) [node name="Icons" type="Spatial" parent="."] -[node name="Gizmos" type="Spatial" parent="."] - [node name="FeetLocation" type="Spatial" parent="."] [node name="DistanceIndicator" type="MeshInstance" parent="FeetLocation"] mesh = SubResource( 3 ) material/0 = SubResource( 4 ) -[node name="Categories" type="Spatial" parent="."] -script = ExtResource( 13 ) - [connection signal="pressed" from="Control/GlobalMenuButton/main_menu_toggle" to="." method="_on_main_menu_toggle_pressed"] [connection signal="pressed" from="Control/GlobalMenuButton/EditorQuckPanel/HBoxContainer/CloseEditorQuickPanel" to="." method="_on_CloseEditorQuickPanel_pressed"] [connection signal="pressed" from="Control/GlobalMenuButton/EditorQuckPanel/HBoxContainer/ChangeTexture" to="." method="_on_ChangeTexture_pressed"] From 6548c343be1c1ae759d4c4a625c3fd166e143f5f Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 11 Dec 2023 18:05:55 -0500 Subject: [PATCH 368/539] Removed unused code --- Icon.gd | 1 - Route.gd | 2 -- Spatial.gd | 34 ++++++++++++---------------------- 3 files changed, 12 insertions(+), 25 deletions(-) diff --git a/Icon.gd b/Icon.gd index cc171b55..1cd9164c 100644 --- a/Icon.gd +++ b/Icon.gd @@ -4,7 +4,6 @@ const Waypoint = preload("res://waypoint.gd") var texture_path var waypoint: Waypoint.Icon -var category: TreeItem func set_icon_image(texture_path: String): self.texture_path = texture_path diff --git a/Route.gd b/Route.gd index 9da5beff..392b2ffd 100644 --- a/Route.gd +++ b/Route.gd @@ -5,8 +5,6 @@ const Waypoint = preload("res://waypoint.gd") var texture_path var color = Color(0.9, 0.1, 0.1) var waypoint: Waypoint.Trail -var category: TreeItem -var minimap_path: NodePath var point_list := PoolVector3Array() diff --git a/Spatial.gd b/Spatial.gd index 98867c1b..daf49bf3 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -518,24 +518,23 @@ func _waypoint_categories_to_godot_nodes(item: TreeItem, waypoint_category, pare category_data.waypoint_category = waypoint_category category_data.category = godot_category category_data.category2d = godot_category2d - category_item.set_metadata(0, category_data) + category_item.set_metadata(0, category_data) category_item.set_text(0, waypoint_category.get_name()) category_item.set_cell_mode(1, TreeItem.CELL_MODE_CHECK) - # TODO: Without unique category names, this could give false info when - # switching maps or changes to marker pack files. + # TODO 214: The format for the category name stored here is a/b/c. + # This could be changed to some UUID. godot_category.name = waypoint_category.get_name() var relative_path: String = self.categories.get_path_to(godot_category) category_item.set_checked(1, Settings.local_category_data.get(relative_path, {}).get("checked", false)) - category_item.set_tooltip(1, "Show/Hide") category_item.set_editable(1, true) category_item.set_collapsed(collapsed) category_item.set_selectable(1, false) - - category_data.is_visible = is_category_visible(category_item) - godot_category.visible = category_data.is_visible - godot_category2d.visible = category_data.is_visible + + category_data.is_visible = category_item.is_checked(1) + godot_category.visible = category_data.is_visible + godot_category2d.visible = category_data.is_visible for path in waypoint_category.get_trail(): var path_points := PoolVector3Array() @@ -550,7 +549,7 @@ func _waypoint_categories_to_godot_nodes(item: TreeItem, waypoint_category, pare continue var full_texture_path = self.marker_file_dir + texture_path.get_path() gen_new_path(path_points, full_texture_path, path, category_item) - + for icon in waypoint_category.get_icon(): var position = icon.get_position() @@ -572,26 +571,17 @@ func _waypoint_categories_to_godot_nodes(item: TreeItem, waypoint_category, pare func apply_category_visibility_to_nodes(category_item: TreeItem): var category_data = category_item.get_metadata(0) var relative_path: String = self.categories.get_path_to(category_data.category) + # TODO 214: The format for the category name stored here is a/b/c. + # This could be changed to some UUID. Settings.local_category_data[relative_path] = { "checked" : category_item.is_checked(1), } Settings.save() - + category_data.is_visible = category_item.is_checked(1) category_data.category.visible = category_data.is_visible category_data.category2d.visible = category_data.is_visible -#Child visibility is contigent on all parents having permission -func is_category_visible(category_item: TreeItem) -> bool: - if category_item == marker_packs.get_root(): - return true - if category_item == null: - return false - if category_item.is_checked(1): - return is_category_visible(category_item.get_parent()) - else: - return false - func gen_new_path(points: Array, texture_path: String, waypoint_trail, category_item: TreeItem): # Create the texture to use from an image file @@ -624,7 +614,7 @@ func gen_new_path(points: Array, texture_path: String, waypoint_trail, category_ new_route.waypoint = waypoint_trail var category_data = category_item.get_metadata(0) category_data.category.add_path(new_route) - + # Create a new 2D Path var new_2d_path = path2d_scene.instance() From 6082ac9ddb4fc6600d2c90aaad8f5d8f93d82b60 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Fri, 15 Dec 2023 16:05:34 -0500 Subject: [PATCH 369/539] addressing comments --- Spatial.gd | 1 - 1 file changed, 1 deletion(-) diff --git a/Spatial.gd b/Spatial.gd index daf49bf3..fd0ffaba 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -506,7 +506,6 @@ func _waypoint_categories_to_godot_nodes(item: TreeItem, waypoint_category, pare if waypoint_category.get_name() == "": # If this is called, there is an empty Category in the Waypoint data print("Category found with no name.") - return var godot_category = category_scene.instance() var godot_category2d = category2d_scene.instance() From 6af7877c37bdfd97258b846acd6ede67b21f07ef Mon Sep 17 00:00:00 2001 From: klingbolt Date: Fri, 15 Dec 2023 18:24:00 -0500 Subject: [PATCH 370/539] Forgot to save in Godot --- Spatial.gd | 52 ++++++++++++++++++++++++---------------------------- 1 file changed, 24 insertions(+), 28 deletions(-) diff --git a/Spatial.gd b/Spatial.gd index fd0ffaba..64e11ace 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -5,7 +5,6 @@ var peers = [] var map_id:int = 0 -var Waypoint = preload("res://waypoint.gd") var map_is_open: bool var compass_is_top_right: bool @@ -39,9 +38,6 @@ var compass_width: int = 0; # taken for the MeshCSG leading to an overall lower number of polygons. var path_resolution = 1 -# Variables that store opposit corners of the compass -var compass_corner1 -var compass_corner2 #x11 fg and window id var x11_fg: X11_FG var taco_parser: TacoParser @@ -56,6 +52,7 @@ const category2d_scene = preload("res://Category2D.tscn") const path2d_scene = preload("res://Route2D.tscn") const gizmo_scene = preload("res://Gizmo/PointEdit.tscn") const CategoryData = preload("res://CategoryData.gd") +const Waypoint = preload("res://waypoint.gd") ##########Node Connections########### onready var marker_packs := $Control/Dialogs/MarkerPacks/MarkerPacks as Tree @@ -356,21 +353,21 @@ func decode_timeout_packet(spb: StreamPeerBuffer): func reset_masks(): var viewport_size = get_viewport().size - compass_corner1 = Vector2(0, 0) - compass_corner2 = viewport_size + var compass_corner1 = Vector2(0, 0) + var compass_corner2 = viewport_size if !map_is_open && !compass_is_top_right: - compass_corner1 = Vector2(viewport_size.x-compass_width, 36) - compass_corner2 = compass_corner1 + Vector2(compass_width, compass_height) + compass_corner1 = Vector2(viewport_size.x-self.compass_width, 36) + compass_corner2 = compass_corner1 + Vector2(self.compass_width, self.compass_height) elif !map_is_open && compass_is_top_right: - compass_corner1 = viewport_size - Vector2(compass_width, compass_height) - compass_corner2 = compass_corner1 + Vector2(compass_width, compass_height) + compass_corner1 = viewport_size - Vector2(self.compass_width, self.compass_height) + compass_corner2 = compass_corner1 + Vector2(self.compass_width, self.compass_height) - for child in $Control/MiniMap.get_children(): - if child.get_name() == "Category2D": - _reset_2D_masks(child, compass_corner1, compass_corner2) + for category in self.minimap.subcategories(): + _reset_2D_masks(category, compass_corner1, compass_corner2) - for category in self.categories.get_children(): - _reset_3D_masks(category) + if self.categories.visible: + for category in self.categories.subcategories(): + _reset_3D_masks(category) func _reset_2D_masks(category2d: Node2D, compass_corner1, compass_corner2): for path2d in category2d.paths2d: @@ -482,11 +479,11 @@ func _unhandled_input(event): ################################################################################ func clear_map_markers(): # Clear all the rendered assets to make way for the new ones - for cateogry in self.categories.get_children(): - cateogry.queue_free() + for child in self.categories.get_children(): + child.queue_free() - for path2d in minimap.get_children(): - path2d.queue_free() + for child in self.minimap.get_children(): + child.queue_free() func init_category_tree(): self.marker_packs.clear() @@ -502,11 +499,7 @@ func waypoint_categories_to_godot_nodes(): _waypoint_categories_to_godot_nodes(null, waypoint_category, self.categories, self.minimap, false) -func _waypoint_categories_to_godot_nodes(item: TreeItem, waypoint_category, parent_category: Spatial, parent_category2d: Node2D, collapsed: bool): - if waypoint_category.get_name() == "": - # If this is called, there is an empty Category in the Waypoint data - print("Category found with no name.") - +func _waypoint_categories_to_godot_nodes(item: TreeItem, waypoint_category: Waypoint.Category, parent_category: Spatial, parent_category2d: Node2D, collapsed: bool): var godot_category = category_scene.instance() var godot_category2d = category2d_scene.instance() parent_category.add_subcategory(godot_category) @@ -519,7 +512,11 @@ func _waypoint_categories_to_godot_nodes(item: TreeItem, waypoint_category, pare category_data.category2d = godot_category2d category_item.set_metadata(0, category_data) - category_item.set_text(0, waypoint_category.get_name()) + if waypoint_category.get_name() == "": + print("Category found with no name.") + category_item.set_text(0, "No Name") + else: + category_item.set_text(0, waypoint_category.get_name()) category_item.set_cell_mode(1, TreeItem.CELL_MODE_CHECK) # TODO 214: The format for the category name stored here is a/b/c. # This could be changed to some UUID. @@ -635,7 +632,6 @@ func gen_new_icon(position: Vector3, texture_path: String, waypoint_icon, catego new_icon.set_icon_image(texture_path) new_icon.waypoint = waypoint_icon var category_data = category_item.get_metadata(0) - new_icon.visible = category_data.is_visible category_data.category.add_icon(new_icon) @@ -811,14 +807,14 @@ func _on_NewPath_pressed(): # Create a new icon and give it the texture ################################################################################ func _on_NewIcon_pressed(): - var waypoint_category = self.currently_active_category.get_metadata(0).waypoint_category + var waypoint_category: Waypoint.Category = self.currently_active_category.get_metadata(0).waypoint_category var waypoint_icon = waypoint_category.new_icon() gen_new_icon(self.player_position, self.next_texture_path, waypoint_icon, self.currently_active_category) # A new path point is created func _on_NewPathPoint_pressed(): if self.currently_active_path == null: - var waypoint_category = self.currently_active_category.get_metadata(0).waypoint_category + var waypoint_category: Waypoint.Category = self.currently_active_category.get_metadata(0).waypoint_category var waypoint_trail = waypoint_category.new_trail() gen_new_path([self.player_position], self.next_texture_path, waypoint_trail, self.currently_active_category) else: From cc1e2253b52a30b581d2dd8fa97a2fa0bb729265 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Fri, 15 Dec 2023 18:25:17 -0500 Subject: [PATCH 371/539] Removing node from scene --- Spatial.tscn | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Spatial.tscn b/Spatial.tscn index 2cc9dc2e..180a85ad 100644 --- a/Spatial.tscn +++ b/Spatial.tscn @@ -1,9 +1,8 @@ -[gd_scene load_steps=19 format=2] +[gd_scene load_steps=18 format=2] [ext_resource path="res://Spatial.gd" type="Script" id=1] [ext_resource path="res://shaders/range_indicators.shader" type="Shader" id=2] [ext_resource path="res://burrito.png" type="Texture" id=3] -[ext_resource path="res://Route2D.tscn" type="PackedScene" id=4] [ext_resource path="res://icon_close.png" type="Texture" id=5] [ext_resource path="res://RangeDialog.gd" type="Script" id=6] [ext_resource path="res://icon_new_icon.png" type="Texture" id=7] @@ -76,8 +75,6 @@ material = SubResource( 2 ) scale = Vector2( 2, 2 ) script = ExtResource( 15 ) -[node name="Line2D" parent="Control/MiniMap" instance=ExtResource( 4 )] - [node name="GlobalMenuButton" type="Control" parent="Control"] margin_left = 323.0 margin_right = 349.0 From ce3d01ebf1f8455af1f0f8e38655c15b99f3a2cc Mon Sep 17 00:00:00 2001 From: klingbolt Date: Thu, 21 Dec 2023 00:10:27 -0500 Subject: [PATCH 372/539] Changed variable names of marker collections. Addressed other comments --- Category.gd => Category3D.gd | 0 Category.tscn => Category3D.tscn | 2 +- CategoryData.gd | 2 +- Spatial.gd | 115 ++++++++++++++++--------------- Spatial.tscn | 22 +++--- 5 files changed, 72 insertions(+), 69 deletions(-) rename Category.gd => Category3D.gd (100%) rename Category.tscn => Category3D.tscn (61%) diff --git a/Category.gd b/Category3D.gd similarity index 100% rename from Category.gd rename to Category3D.gd diff --git a/Category.tscn b/Category3D.tscn similarity index 61% rename from Category.tscn rename to Category3D.tscn index 397d2de9..83bf5edb 100644 --- a/Category.tscn +++ b/Category3D.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=2] -[ext_resource path="res://Category.gd" type="Script" id=1] +[ext_resource path="res://Category3D.gd" type="Script" id=1] [node name="Category" type="Spatial"] script = ExtResource( 1 ) diff --git a/CategoryData.gd b/CategoryData.gd index 8e307708..dfad8d30 100644 --- a/CategoryData.gd +++ b/CategoryData.gd @@ -1,6 +1,6 @@ const Waypoint = preload("res://waypoint.gd") -var category: Spatial +var category3d: Spatial var category2d: Node2D var waypoint_category: Waypoint.Category var is_visible = false diff --git a/Spatial.gd b/Spatial.gd index 64e11ace..d738bd3d 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -47,7 +47,7 @@ var is_transient:bool = false # Scenes used throughout this scene const route_scene = preload("res://Route.tscn") const icon_scene = preload("res://Icon.tscn") -const category_scene = preload("res://Category.tscn") +const category3d_scene = preload("res://Category3D.tscn") const category2d_scene = preload("res://Category2D.tscn") const path2d_scene = preload("res://Route2D.tscn") const gizmo_scene = preload("res://Gizmo/PointEdit.tscn") @@ -55,15 +55,15 @@ const CategoryData = preload("res://CategoryData.gd") const Waypoint = preload("res://waypoint.gd") ##########Node Connections########### -onready var marker_packs := $Control/Dialogs/MarkerPacks/MarkerPacks as Tree -onready var categories := $Categories as Spatial -onready var minimap := $Control/MiniMap as Node2D +onready var markers_ui := $Control/Dialogs/CategoriesDialog/MarkersUI as Tree +onready var markers_3d := $Markers3D as Spatial +onready var markers_2d := $Control/Markers2D as Node2D # Called when the node enters the scene tree for the first time. func _ready(): - self.marker_packs.set_column_expand(1, false) - self.marker_packs.set_column_min_width(1, 24) + self.markers_ui.set_column_expand(1, false) + self.markers_ui.set_column_min_width(1, 24) get_tree().get_root().set_transparent_background(true) x11_fg = X11_FG.new() taco_parser = TacoParser.new() @@ -231,8 +231,8 @@ func decode_frame_packet(spb: StreamPeerBuffer): var unchecked_flag = (ui_flags & 0xFFFFFF80) != 0x00000000; if map_is_open != map_was_open: - self.categories.visible = !map_is_open - reset_masks() + self.markers_3d.visible = !map_is_open + reset_minimap_masks(false) map_was_open = map_is_open if unchecked_flag: @@ -282,15 +282,15 @@ func decode_frame_packet(spb: StreamPeerBuffer): delta_position = player_map_position - Vector2(x, y); #print(map_rotation) - $Control/MiniMap.rotation = map_rotation + $Control/Markers2D.rotation = map_rotation else: - $Control/MiniMap.rotation = 0 + $Control/Markers2D.rotation = 0 var map_midpoint = map_size/2 + map_corner; - $Control/MiniMap.scale=Vector2(map_object_scaling, map_object_scaling) + $Control/Markers2D.scale=Vector2(map_object_scaling, map_object_scaling) var map_translation = map_offset - $Control/MiniMap.position = (map_translation / map_scale) + map_midpoint - player_map_position + delta_position + $Control/Markers2D.position = (map_translation / map_scale) + map_midpoint - player_map_position + delta_position var new_feet_location = Vector3(player_position.x, player_position.y, -player_position.z) $FeetLocation.translation = new_feet_location @@ -340,7 +340,7 @@ func decode_context_packet(spb: StreamPeerBuffer): print("Loading New Map") load_waypoint_markers(self.map_id) - reset_masks() + reset_minimap_masks() @@ -351,7 +351,7 @@ func decode_timeout_packet(spb: StreamPeerBuffer): launch_burrito_link() -func reset_masks(): +func reset_minimap_masks(reset_3d: bool = true): var viewport_size = get_viewport().size var compass_corner1 = Vector2(0, 0) var compass_corner2 = viewport_size @@ -362,27 +362,27 @@ func reset_masks(): compass_corner1 = viewport_size - Vector2(self.compass_width, self.compass_height) compass_corner2 = compass_corner1 + Vector2(self.compass_width, self.compass_height) - for category in self.minimap.subcategories(): - _reset_2D_masks(category, compass_corner1, compass_corner2) + for category in self.markers_2d.subcategories: + reset_2D_minimap_masks(category, compass_corner1, compass_corner2) - if self.categories.visible: - for category in self.categories.subcategories(): - _reset_3D_masks(category) + if reset_3d: + for category in self.markers_3d.subcategories: + reset_3D_minimap_masks(category) -func _reset_2D_masks(category2d: Node2D, compass_corner1, compass_corner2): +func reset_2D_minimap_masks(category2d: Node2D, compass_corner1: Vector2, compass_corner2: Vector2): for path2d in category2d.paths2d: path2d.material.set_shader_param("minimap_corner", compass_corner1) path2d.material.set_shader_param("minimap_corner2", compass_corner2) for subcategory in category2d.subcategories: - _reset_2D_masks(subcategory, compass_corner1, compass_corner2) + reset_2D_minimap_masks(subcategory, compass_corner1, compass_corner2) -func _reset_3D_masks(category: Spatial): +func reset_3D_minimap_masks(category: Spatial): for path in category.paths: path.get_node("MeshInstance").material_override.set_shader_param("map_size", Vector2(self.compass_width, self.compass_height)) for icon in category.icons: icon.material_override.set_shader_param("map_size", Vector2(self.compass_width, self.compass_height)) for subcategory in category.subcategories: - _reset_3D_masks(subcategory) + reset_3D_minimap_masks(subcategory) var waypoint_data = Waypoint.Waypoint.new() @@ -479,16 +479,16 @@ func _unhandled_input(event): ################################################################################ func clear_map_markers(): # Clear all the rendered assets to make way for the new ones - for child in self.categories.get_children(): + for child in self.markers_3d.get_children(): child.queue_free() - for child in self.minimap.get_children(): + for child in self.markers_2d.get_children(): child.queue_free() func init_category_tree(): - self.marker_packs.clear() + self.markers_ui.clear() var root : TreeItem - root = self.marker_packs.create_item() + root = self.markers_ui.create_item() root.set_text(0, "Markers") root.set_expand_right(0, true) @@ -496,32 +496,32 @@ func init_category_tree(): func waypoint_categories_to_godot_nodes(): for waypoint_category in self.waypoint_data.get_category(): - _waypoint_categories_to_godot_nodes(null, waypoint_category, self.categories, self.minimap, false) + _waypoint_categories_to_godot_nodes(null, waypoint_category, self.markers_3d, self.markers_2d, false) -func _waypoint_categories_to_godot_nodes(item: TreeItem, waypoint_category: Waypoint.Category, parent_category: Spatial, parent_category2d: Node2D, collapsed: bool): - var godot_category = category_scene.instance() +func _waypoint_categories_to_godot_nodes(item: TreeItem, waypoint_category: Waypoint.Category, parent_category3d: Spatial, parent_category2d: Node2D, collapsed: bool): + var godot_category3d = category3d_scene.instance() var godot_category2d = category2d_scene.instance() - parent_category.add_subcategory(godot_category) + parent_category3d.add_subcategory(godot_category3d) parent_category2d.add_subcategory(godot_category2d) - var category_item: TreeItem = self.marker_packs.create_item(item) + var category_item: TreeItem = self.markers_ui.create_item(item) var category_data = CategoryData.new() category_data.waypoint_category = waypoint_category - category_data.category = godot_category + category_data.category3d = godot_category3d category_data.category2d = godot_category2d category_item.set_metadata(0, category_data) - if waypoint_category.get_name() == "": + var category_name: String = waypoint_category.get_name() + if category_name == "": print("Category found with no name.") - category_item.set_text(0, "No Name") - else: - category_item.set_text(0, waypoint_category.get_name()) + category_name = "No Name" + category_item.set_text(0, category_name) category_item.set_cell_mode(1, TreeItem.CELL_MODE_CHECK) # TODO 214: The format for the category name stored here is a/b/c. # This could be changed to some UUID. - godot_category.name = waypoint_category.get_name() - var relative_path: String = self.categories.get_path_to(godot_category) + godot_category3d.name = category_name + var relative_path: String = self.markers_3d.get_path_to(godot_category3d) category_item.set_checked(1, Settings.local_category_data.get(relative_path, {}).get("checked", false)) category_item.set_tooltip(1, "Show/Hide") category_item.set_editable(1, true) @@ -529,19 +529,19 @@ func _waypoint_categories_to_godot_nodes(item: TreeItem, waypoint_category: Wayp category_item.set_selectable(1, false) category_data.is_visible = category_item.is_checked(1) - godot_category.visible = category_data.is_visible + godot_category3d.visible = category_data.is_visible godot_category2d.visible = category_data.is_visible for path in waypoint_category.get_trail(): var path_points := PoolVector3Array() var trail_data = path.get_trail_data() if trail_data.get_points_x().size() != trail_data.get_points_y().size() or trail_data.get_points_x().size() != trail_data.get_points_z().size(): - print("Warning: Trail ", waypoint_category.get_name(), " does not have equal number of X, Y, and Z coordinates.") + print("Warning: Trail ", category_name, " does not have equal number of X, Y, and Z coordinates.") for index in range(0, trail_data.get_points_z().size()): path_points.append(Vector3(trail_data.get_points_x()[index], trail_data.get_points_y()[index], trail_data.get_points_z()[index])) var texture_path = path.get_texture_path() if texture_path == null: - print("Warning: No texture found in " , waypoint_category.get_name()) + print("Warning: No texture found in " , category_name) continue var full_texture_path = self.marker_file_dir + texture_path.get_path() gen_new_path(path_points, full_texture_path, path, category_item) @@ -550,23 +550,23 @@ func _waypoint_categories_to_godot_nodes(item: TreeItem, waypoint_category: Wayp for icon in waypoint_category.get_icon(): var position = icon.get_position() if position == null: - print("Warning: No position found for icon ", waypoint_category.get_name()) + print("Warning: No position found for icon ", category_name) continue var position_vector = Vector3(position.get_x(), position.get_y(), position.get_z()) var texture_path = icon.get_texture_path() if texture_path == null: - print("Warning: No texture found in " , waypoint_category.get_name()) + print("Warning: No texture found in " , category_name) continue var full_texture_path = self.marker_file_dir + texture_path.get_path() gen_new_icon(position_vector, full_texture_path, icon, category_item) for category_child in waypoint_category.get_children(): - _waypoint_categories_to_godot_nodes(category_item, category_child, godot_category, godot_category2d, true) + _waypoint_categories_to_godot_nodes(category_item, category_child, godot_category3d, godot_category2d, true) func apply_category_visibility_to_nodes(category_item: TreeItem): var category_data = category_item.get_metadata(0) - var relative_path: String = self.categories.get_path_to(category_data.category) + var relative_path: String = self.markers_3d.get_path_to(category_data.category3d) # TODO 214: The format for the category name stored here is a/b/c. # This could be changed to some UUID. Settings.local_category_data[relative_path] = { @@ -575,7 +575,7 @@ func apply_category_visibility_to_nodes(category_item: TreeItem): Settings.save() category_data.is_visible = category_item.is_checked(1) - category_data.category.visible = category_data.is_visible + category_data.category3d.visible = category_data.is_visible category_data.category2d.visible = category_data.is_visible @@ -609,7 +609,7 @@ func gen_new_path(points: Array, texture_path: String, waypoint_trail, category_ new_route.set_texture(texture) new_route.waypoint = waypoint_trail var category_data = category_item.get_metadata(0) - category_data.category.add_path(new_route) + category_data.category3d.add_path(new_route) # Create a new 2D Path @@ -632,7 +632,7 @@ func gen_new_icon(position: Vector3, texture_path: String, waypoint_icon, catego new_icon.set_icon_image(texture_path) new_icon.waypoint = waypoint_icon var category_data = category_item.get_metadata(0) - category_data.category.add_icon(new_icon) + category_data.category3d.add_icon(new_icon) # This function take all of the currently rendered objects and converts it into @@ -680,7 +680,7 @@ func gen_adjustment_nodes(): print("No category selected") return - var category = self.currently_active_category.get_metadata(0).category + var category = self.currently_active_category.get_metadata(0).category3d var category2d = self.currently_active_category.get_metadata(0).category2d for index in category.paths.size(): var route = category.paths[index] @@ -755,10 +755,10 @@ func _on_Dialog_hide(): func _on_LoadPath_pressed(): - if $Control/Dialogs/MarkerPacks.is_visible(): - $Control/Dialogs/MarkerPacks.hide() + if $Control/Dialogs/CategoriesDialog.is_visible(): + $Control/Dialogs/CategoriesDialog.hide() else: - $Control/Dialogs/MarkerPacks.show() + $Control/Dialogs/CategoriesDialog.show() func _on_RangesButton_pressed(): @@ -920,11 +920,12 @@ func _on_Settings_pressed(): settings_dialog.show() -func _on_MarkerPacks_cell_selected(): - var category_item = self.marker_packs.get_selected() +func _on_MarkersUI_cell_selected(): + var category_item = self.markers_ui.get_selected() self.currently_active_category = category_item -func _on_MarkerPacks_item_edited(): - var category_item = self.marker_packs.get_edited() +func _on_MarkersUI_item_edited(): + var category_item = self.markers_ui.get_edited() apply_category_visibility_to_nodes(category_item) + diff --git a/Spatial.tscn b/Spatial.tscn index 180a85ad..a661e21b 100644 --- a/Spatial.tscn +++ b/Spatial.tscn @@ -11,7 +11,7 @@ [ext_resource path="res://icon_new_path.png" type="Texture" id=10] [ext_resource path="res://icon_new_point.png" type="Texture" id=11] [ext_resource path="res://SettingsDialog.gd" type="Script" id=12] -[ext_resource path="res://Category.gd" type="Script" id=13] +[ext_resource path="res://Category3D.gd" type="Script" id=13] [ext_resource path="res://Category2D.gd" type="Script" id=15] [sub_resource type="Shader" id=1] @@ -51,7 +51,7 @@ shader_param/custom_7_value = 500.0 [node name="Spatial" type="Spatial"] script = ExtResource( 1 ) -[node name="Categories" type="Spatial" parent="."] +[node name="Markers3D" type="Spatial" parent="."] script = ExtResource( 13 ) [node name="Gizmos" type="Spatial" parent="."] @@ -70,7 +70,7 @@ __meta__ = { "_edit_use_anchors_": false } -[node name="MiniMap" type="Node2D" parent="Control"] +[node name="Markers2D" type="Node2D" parent="Control"] material = SubResource( 2 ) scale = Vector2( 2, 2 ) script = ExtResource( 15 ) @@ -774,7 +774,7 @@ margin_right = 384.0 margin_bottom = 304.0 text = "Load Lutris Profile" -[node name="MarkerPacks" type="WindowDialog" parent="Control/Dialogs"] +[node name="CategoriesDialog" type="WindowDialog" parent="Control/Dialogs"] margin_left = 280.0 margin_top = 105.0 margin_right = 751.0 @@ -784,7 +784,7 @@ __meta__ = { "_edit_use_anchors_": false } -[node name="MarkerPacks" type="Tree" parent="Control/Dialogs/MarkerPacks"] +[node name="MarkersUI" type="Tree" parent="Control/Dialogs/CategoriesDialog"] anchor_right = 1.0 anchor_bottom = 1.0 size_flags_vertical = 3 @@ -922,8 +922,10 @@ material/0 = SubResource( 4 ) [connection signal="pressed" from="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer/AutoLaunchBurritoLink" to="Control/Dialogs/SettingsDialog" method="save_settings"] [connection signal="text_changed" from="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer/WinePath" to="Control/Dialogs/SettingsDialog" method="save_settings"] [connection signal="text_changed" from="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer/EnvironmentVars" to="Control/Dialogs/SettingsDialog" method="save_settings"] -[connection signal="hide" from="Control/Dialogs/MarkerPacks" to="." method="_on_Dialog_hide"] -[connection signal="cell_selected" from="Control/Dialogs/MarkerPacks/MarkerPacks" to="." method="_on_MarkerPacks_cell_selected"] -[connection signal="item_edited" from="Control/Dialogs/MarkerPacks/MarkerPacks" to="." method="_on_MarkerPacks_item_edited"] -[connection signal="multi_selected" from="Control/Dialogs/MarkerPacks/MarkerPacks" to="." method="_on_Tree_multi_selected"] -[connection signal="tree_entered" from="Control/Dialogs/MarkerPacks/MarkerPacks" to="." method="_on_Tree_tree_entered"] +[connection signal="hide" from="Control/Dialogs/CategoriesDialog" to="." method="_on_Dialog_hide"] +[connection signal="cell_selected" from="Control/Dialogs/CategoriesDialog/MarkersUI" to="." method="_on_MarkerPacks_cell_selected"] +[connection signal="cell_selected" from="Control/Dialogs/CategoriesDialog/MarkersUI" to="." method="_on_MarkersUI_cell_selected"] +[connection signal="item_edited" from="Control/Dialogs/CategoriesDialog/MarkersUI" to="." method="_on_MarkerPacks_item_edited"] +[connection signal="item_edited" from="Control/Dialogs/CategoriesDialog/MarkersUI" to="." method="_on_MarkersUI_item_edited"] +[connection signal="multi_selected" from="Control/Dialogs/CategoriesDialog/MarkersUI" to="." method="_on_Tree_multi_selected"] +[connection signal="tree_entered" from="Control/Dialogs/CategoriesDialog/MarkersUI" to="." method="_on_Tree_tree_entered"] From 2dcb0f4febbe0e6cd0ee9a0ee8d8da74cb2bc406 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Thu, 21 Dec 2023 21:54:14 -0500 Subject: [PATCH 373/539] Missed some changes --- Spatial.gd | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Spatial.gd b/Spatial.gd index d738bd3d..25350832 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -680,10 +680,10 @@ func gen_adjustment_nodes(): print("No category selected") return - var category = self.currently_active_category.get_metadata(0).category3d + var category3d = self.currently_active_category.get_metadata(0).category3d var category2d = self.currently_active_category.get_metadata(0).category2d - for index in category.paths.size(): - var route = category.paths[index] + for index in category3d.paths.size(): + var route = category3d.paths[index] var path2d = category2d.paths2d[index] for i in range(route.get_point_count()): var gizmo_position = route.get_point_position(i) @@ -698,7 +698,7 @@ func gen_adjustment_nodes(): new_gizmo.connect("selected", self, "on_gizmo_selected") new_gizmo.connect("deselected", self, "on_gizmo_deselected") $Gizmos.add_child(new_gizmo) - for icon in category.icons: + for icon in category3d.icons: var new_gizmo = gizmo_scene.instance() new_gizmo.translation = icon.translation new_gizmo.link_point("icon", icon) From aee0a94e7ebe91b967e8b9c3b6b637dabaab10ca Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Fri, 29 Dec 2023 16:49:52 -0600 Subject: [PATCH 374/539] Rebuild the xml_converter when running integration tests --- xml_converter/intigration_tests/run_tests.py | 32 ++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/xml_converter/intigration_tests/run_tests.py b/xml_converter/intigration_tests/run_tests.py index 8cc4d131..ece0cbc7 100755 --- a/xml_converter/intigration_tests/run_tests.py +++ b/xml_converter/intigration_tests/run_tests.py @@ -85,6 +85,36 @@ def remove_ansii_color_escapecodes(lines: List[str]) -> List[str]: return [ re.sub(pattern_for_color_escape_codes, '', line) for line in lines ] +################################################################################ +# rebuild_xml_converter_binary +# +# Recompiles the XML Converter binary. If the compilation returns an error code +# then this function throws an error +################################################################################ +def rebuild_xml_converter_binary(): + cmake_build_directory = "../build" + + # Store the current working directory + original_cwd = os.getcwd() + + # Check if the relative path exists + target_path = os.path.join(original_cwd, cmake_build_directory) + if os.path.exists(target_path): + # Change the working directory to the target directory + os.chdir(target_path) + + # Run cmake and make + cmake_process = subprocess.run(["cmake", ".."]) + make_process = subprocess.run(["make"]) + + if cmake_process.returncode != 0 or make_process.returncode != 0: + raise ValueError("Nonzero return code from xml_converter build process.") + + # Change back to the original working directory + os.chdir(original_cwd) + else: + print(f"Directory '{cmake_build_directory}' does not exist.") + ################################################################################ # remove_ignored_lines # @@ -125,6 +155,8 @@ def main() -> None: if os.path.exists(output_parent_dirpath): shutil.rmtree(output_parent_dirpath) + rebuild_xml_converter_binary() + for testcase in testcases: xml_output_dir_path = os.path.join(output_parent_dirpath, "xml", testcase.name) proto_output_dir_path = os.path.join(output_parent_dirpath, "proto", testcase.name) From 954652e2dc364636a263a56e51f31472eda04ad9 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Fri, 29 Dec 2023 17:24:13 -0600 Subject: [PATCH 375/539] adding trail parsing example from github wiki --- scripts/.gitignore | 1 + scripts/simple_trail_parser.py | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 scripts/.gitignore create mode 100644 scripts/simple_trail_parser.py diff --git a/scripts/.gitignore b/scripts/.gitignore new file mode 100644 index 00000000..52a314f5 --- /dev/null +++ b/scripts/.gitignore @@ -0,0 +1 @@ +demo.trl diff --git a/scripts/simple_trail_parser.py b/scripts/simple_trail_parser.py new file mode 100644 index 00000000..a26d72f0 --- /dev/null +++ b/scripts/simple_trail_parser.py @@ -0,0 +1,15 @@ +from typing import Tuple, List +import struct + +with open("./demo.trl", 'rb') as f: + version: int = struct.unpack(" Date: Fri, 29 Dec 2023 17:34:34 -0600 Subject: [PATCH 376/539] making all the state variables live as long as the generator instead of the xml node --- .../cpp_templates/class_template.cpp | 17 +- .../cpp_templates/class_template.hpp | 6 +- xml_converter/src/category_gen.cpp | 41 ++- xml_converter/src/category_gen.hpp | 6 +- xml_converter/src/icon_gen.cpp | 295 +++++++++--------- xml_converter/src/icon_gen.hpp | 6 +- xml_converter/src/packaging_protobin.cpp | 17 +- xml_converter/src/packaging_xml.cpp | 6 +- xml_converter/src/parseable.cpp | 3 +- xml_converter/src/parseable.hpp | 3 +- xml_converter/src/trail_gen.cpp | 173 +++++----- xml_converter/src/trail_gen.hpp | 6 +- 12 files changed, 288 insertions(+), 291 deletions(-) diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index c0447155..76d510f8 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -59,14 +59,13 @@ bool {{cpp_class}}::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vec } {% endif %} -vector {{cpp_class}}::as_xml() const { - XMLWriterState state; +vector {{cpp_class}}::as_xml(XMLWriterState* state) const { vector xml_node_contents; xml_node_contents.push_back("<{{xml_class_name}} "); {% for attribute_variable in attribute_variables %} {% if attribute_variable.write_to_xml == true %} if (this->{{attribute_variable.attribute_flag_name}}) { - xml_node_contents.push_back({{attribute_variable.serialize_xml_function}}("{{attribute_variable.default_xml_field}}", &state, &this->{{attribute_variable.attribute_name}})); + xml_node_contents.push_back({{attribute_variable.serialize_xml_function}}("{{attribute_variable.default_xml_field}}", state, &this->{{attribute_variable.attribute_name}})); } {% endif %} {% endfor %} @@ -75,7 +74,7 @@ vector {{cpp_class}}::as_xml() const { for (const auto& [key, val] : this->children) { string text; - for (const auto& s : val.as_xml()) { + for (const auto& s : val.as_xml(state)) { text += s; } @@ -89,8 +88,7 @@ vector {{cpp_class}}::as_xml() const { return xml_node_contents; } -waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf() const { - ProtoWriterState state; +waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf(ProtoWriterState* state) const { waypoint::{{cpp_class}} proto_{{cpp_class_header}}; {% for attribute_variable in attribute_variables %} {% if attribute_variable.is_component == false %} @@ -100,15 +98,14 @@ waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf() const { {% else %} std::function setter = [&proto_{{cpp_class_header}}]({{attribute_variable.protobuf_cpp_type}} val) { proto_{{cpp_class_header}}.{{attribute_variable.mutable_proto_drilldown_calls}}set_{{attribute_variable.protobuf_field}}(val); }; {% endif %} - {{attribute_variable.serialize_proto_function}}(this->{{attribute_variable.attribute_name}}, &state, setter); + {{attribute_variable.serialize_proto_function}}(this->{{attribute_variable.attribute_name}}, state, setter); } {% endif %} {% endfor %} return proto_{{cpp_class_header}}; } -void {{cpp_class}}::parse_protobuf(waypoint::{{cpp_class}} proto_{{cpp_class_header}}) { - ProtoReaderState state; +void {{cpp_class}}::parse_protobuf(waypoint::{{cpp_class}} proto_{{cpp_class_header}}, ProtoReaderState* state) { {% for attribute_variable in attribute_variables %} {% if attribute_variable.is_component == false %} {% if not attribute_variable.is_proto_field_scalar %} @@ -118,7 +115,7 @@ void {{cpp_class}}::parse_protobuf(waypoint::{{cpp_class}} proto_{{cpp_class_hea {% else %} if (proto_{{cpp_class_header}}{{attribute_variable.proto_drilldown_calls}}.{{attribute_variable.protobuf_field}}() != 0) { {% endif %} - {{attribute_variable.deserialize_proto_function}}(proto_{{cpp_class_header}}{{attribute_variable.proto_drilldown_calls}}.{{attribute_variable.protobuf_field}}(), &state, &(this->{{attribute_variable.attribute_name}}), &(this->{{attribute_variable.attribute_flag_name}}){% for side_effect in attribute_variable.deserialize_proto_side_effects %}, &(this->{{side_effect}}){% endfor %}); + {{attribute_variable.deserialize_proto_function}}(proto_{{cpp_class_header}}{{attribute_variable.proto_drilldown_calls}}.{{attribute_variable.protobuf_field}}(), state, &(this->{{attribute_variable.attribute_name}}), &(this->{{attribute_variable.attribute_flag_name}}){% for side_effect in attribute_variable.deserialize_proto_side_effects %}, &(this->{{side_effect}}){% endfor %}); } {% endif %} {% endfor %} diff --git a/xml_converter/generators/cpp_templates/class_template.hpp b/xml_converter/generators/cpp_templates/class_template.hpp index c132d3e6..3856a687 100644 --- a/xml_converter/generators/cpp_templates/class_template.hpp +++ b/xml_converter/generators/cpp_templates/class_template.hpp @@ -31,11 +31,11 @@ class {{cpp_class}} : public Parseable { void init_from_xml(rapidxml::xml_node<>* node, std::vector* errors, XMLReaderState* state); {% endif %} - virtual std::vector as_xml() const; + virtual std::vector as_xml(XMLWriterState* state) const; virtual std::string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, XMLReaderState* state); - waypoint::{{cpp_class}} as_protobuf() const; - void parse_protobuf(waypoint::{{cpp_class}} proto_{{cpp_class_header}}); + waypoint::{{cpp_class}} as_protobuf(ProtoWriterState* state) const; + void parse_protobuf(waypoint::{{cpp_class}} proto_{{cpp_class_header}}, ProtoReaderState* state); {% if attributes_of_type_marker_category %} bool validate_attributes_of_type_marker_category(); {% endif %} diff --git a/xml_converter/src/category_gen.cpp b/xml_converter/src/category_gen.cpp index 5139b2aa..cc5c3339 100644 --- a/xml_converter/src/category_gen.cpp +++ b/xml_converter/src/category_gen.cpp @@ -57,30 +57,29 @@ bool Category::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector Category::as_xml() const { - XMLWriterState state; +vector Category::as_xml(XMLWriterState* state) const { vector xml_node_contents; xml_node_contents.push_back("default_visibility_is_set) { - xml_node_contents.push_back(bool_to_xml_attribute("DefaultToggle", &state, &this->default_visibility)); + xml_node_contents.push_back(bool_to_xml_attribute("DefaultToggle", state, &this->default_visibility)); } if (this->display_name_is_set) { - xml_node_contents.push_back(string_to_xml_attribute("DisplayName", &state, &this->display_name)); + xml_node_contents.push_back(string_to_xml_attribute("DisplayName", state, &this->display_name)); } if (this->is_separator_is_set) { - xml_node_contents.push_back(bool_to_xml_attribute("IsSeparator", &state, &this->is_separator)); + xml_node_contents.push_back(bool_to_xml_attribute("IsSeparator", state, &this->is_separator)); } if (this->name_is_set) { - xml_node_contents.push_back(string_to_xml_attribute("Name", &state, &this->name)); + xml_node_contents.push_back(string_to_xml_attribute("Name", state, &this->name)); } if (this->tooltip_description_is_set) { - xml_node_contents.push_back(string_to_xml_attribute("TipDescription", &state, &this->tooltip_description)); + xml_node_contents.push_back(string_to_xml_attribute("TipDescription", state, &this->tooltip_description)); } xml_node_contents.push_back(">\n"); for (const auto& [key, val] : this->children) { string text; - for (const auto& s : val.as_xml()) { + for (const auto& s : val.as_xml(state)) { text += s; } @@ -91,47 +90,45 @@ vector Category::as_xml() const { return xml_node_contents; } -waypoint::Category Category::as_protobuf() const { - ProtoWriterState state; +waypoint::Category Category::as_protobuf(ProtoWriterState* state) const { waypoint::Category proto_category; if (this->default_visibility_is_set) { std::function setter = [&proto_category](bool val) { proto_category.set_default_visibility(val); }; - bool_to_proto(this->default_visibility, &state, setter); + bool_to_proto(this->default_visibility, state, setter); } if (this->display_name_is_set) { std::function setter = [&proto_category](std::string val) { proto_category.set_name(val); }; - string_to_proto(this->display_name, &state, setter); + string_to_proto(this->display_name, state, setter); } if (this->is_separator_is_set) { std::function setter = [&proto_category](bool val) { proto_category.set_is_separator(val); }; - bool_to_proto(this->is_separator, &state, setter); + bool_to_proto(this->is_separator, state, setter); } if (this->name_is_set) { std::function setter = [&proto_category](std::string val) { proto_category.set_name(val); }; - do_nothing(this->name, &state, setter); + do_nothing(this->name, state, setter); } if (this->tooltip_description_is_set) { std::function setter = [&proto_category](std::string val) { proto_category.set_tip_description(val); }; - string_to_proto(this->tooltip_description, &state, setter); + string_to_proto(this->tooltip_description, state, setter); } return proto_category; } -void Category::parse_protobuf(waypoint::Category proto_category) { - ProtoReaderState state; +void Category::parse_protobuf(waypoint::Category proto_category, ProtoReaderState* state) { if (proto_category.default_visibility() != 0) { - proto_to_bool(proto_category.default_visibility(), &state, &(this->default_visibility), &(this->default_visibility_is_set)); + proto_to_bool(proto_category.default_visibility(), state, &(this->default_visibility), &(this->default_visibility_is_set)); } if (proto_category.name() != "") { - proto_display_name_to_display_name_and_name(proto_category.name(), &state, &(this->display_name), &(this->display_name_is_set), &(this->name), &(this->name_is_set)); + proto_display_name_to_display_name_and_name(proto_category.name(), state, &(this->display_name), &(this->display_name_is_set), &(this->name), &(this->name_is_set)); } if (proto_category.is_separator() != 0) { - proto_to_bool(proto_category.is_separator(), &state, &(this->is_separator), &(this->is_separator_is_set)); + proto_to_bool(proto_category.is_separator(), state, &(this->is_separator), &(this->is_separator_is_set)); } if (proto_category.name() != "") { - do_nothing(proto_category.name(), &state, &(this->name), &(this->name_is_set)); + do_nothing(proto_category.name(), state, &(this->name), &(this->name_is_set)); } if (proto_category.tip_description() != "") { - proto_to_string(proto_category.tip_description(), &state, &(this->tooltip_description), &(this->tooltip_description_is_set)); + proto_to_string(proto_category.tip_description(), state, &(this->tooltip_description), &(this->tooltip_description_is_set)); } } diff --git a/xml_converter/src/category_gen.hpp b/xml_converter/src/category_gen.hpp index 6c3f1c5e..4a608fa3 100644 --- a/xml_converter/src/category_gen.hpp +++ b/xml_converter/src/category_gen.hpp @@ -31,9 +31,9 @@ class Category : public Parseable { Trail default_trail; void init_from_xml(rapidxml::xml_node<>* node, std::vector* errors, XMLReaderState* state); - virtual std::vector as_xml() const; + virtual std::vector as_xml(XMLWriterState* state) const; virtual std::string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, XMLReaderState* state); - waypoint::Category as_protobuf() const; - void parse_protobuf(waypoint::Category proto_category); + waypoint::Category as_protobuf(ProtoWriterState* state) const; + void parse_protobuf(waypoint::Category proto_category, ProtoReaderState* state); }; diff --git a/xml_converter/src/icon_gen.cpp b/xml_converter/src/icon_gen.cpp index d3327134..31a81079 100644 --- a/xml_converter/src/icon_gen.cpp +++ b/xml_converter/src/icon_gen.cpp @@ -252,496 +252,493 @@ bool Icon::validate_attributes_of_type_marker_category() { return true; } -vector Icon::as_xml() const { - XMLWriterState state; +vector Icon::as_xml(XMLWriterState* state) const { vector xml_node_contents; xml_node_contents.push_back("achievement_bitmask_is_set) { - xml_node_contents.push_back(int_to_xml_attribute("AchievementBit", &state, &this->achievement_bitmask)); + xml_node_contents.push_back(int_to_xml_attribute("AchievementBit", state, &this->achievement_bitmask)); } if (this->achievement_id_is_set) { - xml_node_contents.push_back(int_to_xml_attribute("AchievementId", &state, &this->achievement_id)); + xml_node_contents.push_back(int_to_xml_attribute("AchievementId", state, &this->achievement_id)); } if (this->auto_trigger_is_set) { - xml_node_contents.push_back(bool_to_xml_attribute("AutoTrigger", &state, &this->auto_trigger)); + xml_node_contents.push_back(bool_to_xml_attribute("AutoTrigger", state, &this->auto_trigger)); } if (this->bounce_delay_is_set) { - xml_node_contents.push_back(float_to_xml_attribute("BounceDelay", &state, &this->bounce_delay)); + xml_node_contents.push_back(float_to_xml_attribute("BounceDelay", state, &this->bounce_delay)); } if (this->bounce_duration_is_set) { - xml_node_contents.push_back(float_to_xml_attribute("BounceDuration", &state, &this->bounce_duration)); + xml_node_contents.push_back(float_to_xml_attribute("BounceDuration", state, &this->bounce_duration)); } if (this->bounce_height_is_set) { - xml_node_contents.push_back(float_to_xml_attribute("BounceHeight", &state, &this->bounce_height)); + xml_node_contents.push_back(float_to_xml_attribute("BounceHeight", state, &this->bounce_height)); } if (this->category_is_set) { - xml_node_contents.push_back(marker_category_to_xml_attribute("Type", &state, &this->category)); + xml_node_contents.push_back(marker_category_to_xml_attribute("Type", state, &this->category)); } if (this->color_is_set) { - xml_node_contents.push_back(color_to_xml_attribute("Color", &state, &this->color)); + xml_node_contents.push_back(color_to_xml_attribute("Color", state, &this->color)); } if (this->color_is_set) { - xml_node_contents.push_back(float_to_xml_attribute("Alpha", &state, &this->color.alpha)); + xml_node_contents.push_back(float_to_xml_attribute("Alpha", state, &this->color.alpha)); } if (this->copy_clipboard_is_set) { - xml_node_contents.push_back(string_to_xml_attribute("Copy", &state, &this->copy_clipboard)); + xml_node_contents.push_back(string_to_xml_attribute("Copy", state, &this->copy_clipboard)); } if (this->copy_message_is_set) { - xml_node_contents.push_back(string_to_xml_attribute("CopyMessage", &state, &this->copy_message)); + xml_node_contents.push_back(string_to_xml_attribute("CopyMessage", state, &this->copy_message)); } if (this->cull_chirality_is_set) { - xml_node_contents.push_back(cull_chirality_to_xml_attribute("Cull", &state, &this->cull_chirality)); + xml_node_contents.push_back(cull_chirality_to_xml_attribute("Cull", state, &this->cull_chirality)); } if (this->disable_player_cutout_is_set) { - xml_node_contents.push_back(bool_to_inverted_xml_attribute("CanFade", &state, &this->disable_player_cutout)); + xml_node_contents.push_back(bool_to_inverted_xml_attribute("CanFade", state, &this->disable_player_cutout)); } if (this->distance_fade_end_is_set) { - xml_node_contents.push_back(float_to_xml_attribute("FadeFar", &state, &this->distance_fade_end)); + xml_node_contents.push_back(float_to_xml_attribute("FadeFar", state, &this->distance_fade_end)); } if (this->distance_fade_start_is_set) { - xml_node_contents.push_back(float_to_xml_attribute("FadeNear", &state, &this->distance_fade_start)); + xml_node_contents.push_back(float_to_xml_attribute("FadeNear", state, &this->distance_fade_start)); } if (this->festival_filter_is_set) { - xml_node_contents.push_back(festival_filter_to_xml_attribute("Festival", &state, &this->festival_filter)); + xml_node_contents.push_back(festival_filter_to_xml_attribute("Festival", state, &this->festival_filter)); } if (this->guid_is_set) { - xml_node_contents.push_back(unique_id_to_xml_attribute("GUID", &state, &this->guid)); + xml_node_contents.push_back(unique_id_to_xml_attribute("GUID", state, &this->guid)); } if (this->has_countdown_is_set) { - xml_node_contents.push_back(bool_to_xml_attribute("HasCountdown", &state, &this->has_countdown)); + xml_node_contents.push_back(bool_to_xml_attribute("HasCountdown", state, &this->has_countdown)); } if (this->height_offset_is_set) { - xml_node_contents.push_back(float_to_xml_attribute("HeightOffset", &state, &this->height_offset)); + xml_node_contents.push_back(float_to_xml_attribute("HeightOffset", state, &this->height_offset)); } if (this->hide_category_is_set) { - xml_node_contents.push_back(marker_category_to_xml_attribute("Hide", &state, &this->hide_category)); + xml_node_contents.push_back(marker_category_to_xml_attribute("Hide", state, &this->hide_category)); } if (this->icon_is_set) { - xml_node_contents.push_back(image_to_xml_attribute("IconFile", &state, &this->icon)); + xml_node_contents.push_back(image_to_xml_attribute("IconFile", state, &this->icon)); } if (this->icon_size_is_set) { - xml_node_contents.push_back(float_to_xml_attribute("IconSize", &state, &this->icon_size)); + xml_node_contents.push_back(float_to_xml_attribute("IconSize", state, &this->icon_size)); } if (this->info_message_is_set) { - xml_node_contents.push_back(string_to_xml_attribute("Info", &state, &this->info_message)); + xml_node_contents.push_back(string_to_xml_attribute("Info", state, &this->info_message)); } if (this->invert_visibility_is_set) { - xml_node_contents.push_back(bool_to_xml_attribute("InvertBehavior", &state, &this->invert_visibility)); + xml_node_contents.push_back(bool_to_xml_attribute("InvertBehavior", state, &this->invert_visibility)); } if (this->map_display_size_is_set) { - xml_node_contents.push_back(int_to_xml_attribute("MapDisplaySize", &state, &this->map_display_size)); + xml_node_contents.push_back(int_to_xml_attribute("MapDisplaySize", state, &this->map_display_size)); } if (this->map_id_is_set) { - xml_node_contents.push_back(int_to_xml_attribute("MapID", &state, &this->map_id)); + xml_node_contents.push_back(int_to_xml_attribute("MapID", state, &this->map_id)); } if (this->map_type_filter_is_set) { - xml_node_contents.push_back(map_type_filter_to_xml_attribute("MapType", &state, &this->map_type_filter)); + xml_node_contents.push_back(map_type_filter_to_xml_attribute("MapType", state, &this->map_type_filter)); } if (this->maximum_size_on_screen_is_set) { - xml_node_contents.push_back(int_to_xml_attribute("MaxSize", &state, &this->maximum_size_on_screen)); + xml_node_contents.push_back(int_to_xml_attribute("MaxSize", state, &this->maximum_size_on_screen)); } if (this->minimum_size_on_screen_is_set) { - xml_node_contents.push_back(int_to_xml_attribute("MinSize", &state, &this->minimum_size_on_screen)); + xml_node_contents.push_back(int_to_xml_attribute("MinSize", state, &this->minimum_size_on_screen)); } if (this->mount_filter_is_set) { - xml_node_contents.push_back(mount_filter_to_xml_attribute("Mount", &state, &this->mount_filter)); + xml_node_contents.push_back(mount_filter_to_xml_attribute("Mount", state, &this->mount_filter)); } if (this->position_is_set) { - xml_node_contents.push_back(float_to_xml_attribute("XPos", &state, &this->position.x_position)); + xml_node_contents.push_back(float_to_xml_attribute("XPos", state, &this->position.x_position)); } if (this->position_is_set) { - xml_node_contents.push_back(float_to_xml_attribute("YPos", &state, &this->position.y_position)); + xml_node_contents.push_back(float_to_xml_attribute("YPos", state, &this->position.y_position)); } if (this->position_is_set) { - xml_node_contents.push_back(float_to_xml_attribute("ZPos", &state, &this->position.z_position)); + xml_node_contents.push_back(float_to_xml_attribute("ZPos", state, &this->position.z_position)); } if (this->profession_filter_is_set) { - xml_node_contents.push_back(profession_filter_to_xml_attribute("Profession", &state, &this->profession_filter)); + xml_node_contents.push_back(profession_filter_to_xml_attribute("Profession", state, &this->profession_filter)); } if (this->render_ingame_is_set) { - xml_node_contents.push_back(bool_to_xml_attribute("IngameVisibility", &state, &this->render_ingame)); + xml_node_contents.push_back(bool_to_xml_attribute("IngameVisibility", state, &this->render_ingame)); } if (this->render_on_map_is_set) { - xml_node_contents.push_back(bool_to_xml_attribute("MapVisibility", &state, &this->render_on_map)); + xml_node_contents.push_back(bool_to_xml_attribute("MapVisibility", state, &this->render_on_map)); } if (this->render_on_minimap_is_set) { - xml_node_contents.push_back(bool_to_xml_attribute("MinimapVisibility", &state, &this->render_on_minimap)); + xml_node_contents.push_back(bool_to_xml_attribute("MinimapVisibility", state, &this->render_on_minimap)); } if (this->reset_behavior_is_set) { - xml_node_contents.push_back(reset_behavior_to_xml_attribute("Behavior", &state, &this->reset_behavior)); + xml_node_contents.push_back(reset_behavior_to_xml_attribute("Behavior", state, &this->reset_behavior)); } if (this->reset_length_is_set) { - xml_node_contents.push_back(float_to_xml_attribute("ResetLength", &state, &this->reset_length)); + xml_node_contents.push_back(float_to_xml_attribute("ResetLength", state, &this->reset_length)); } if (this->scale_on_map_with_zoom_is_set) { - xml_node_contents.push_back(bool_to_xml_attribute("ScaleOnMapWithZoom", &state, &this->scale_on_map_with_zoom)); + xml_node_contents.push_back(bool_to_xml_attribute("ScaleOnMapWithZoom", state, &this->scale_on_map_with_zoom)); } if (this->schedule_is_set) { - xml_node_contents.push_back(string_to_xml_attribute("Schedule", &state, &this->schedule)); + xml_node_contents.push_back(string_to_xml_attribute("Schedule", state, &this->schedule)); } if (this->schedule_duration_is_set) { - xml_node_contents.push_back(float_to_xml_attribute("ScheduleDuration", &state, &this->schedule_duration)); + xml_node_contents.push_back(float_to_xml_attribute("ScheduleDuration", state, &this->schedule_duration)); } if (this->show_category_is_set) { - xml_node_contents.push_back(marker_category_to_xml_attribute("Show", &state, &this->show_category)); + xml_node_contents.push_back(marker_category_to_xml_attribute("Show", state, &this->show_category)); } if (this->specialization_filter_is_set) { - xml_node_contents.push_back(specialization_filter_to_xml_attribute("Specialization", &state, &this->specialization_filter)); + xml_node_contents.push_back(specialization_filter_to_xml_attribute("Specialization", state, &this->specialization_filter)); } if (this->species_filter_is_set) { - xml_node_contents.push_back(species_filter_to_xml_attribute("Race", &state, &this->species_filter)); + xml_node_contents.push_back(species_filter_to_xml_attribute("Race", state, &this->species_filter)); } if (this->toggle_category_is_set) { - xml_node_contents.push_back(marker_category_to_xml_attribute("Toggle", &state, &this->toggle_category)); + xml_node_contents.push_back(marker_category_to_xml_attribute("Toggle", state, &this->toggle_category)); } if (this->tooltip_description_is_set) { - xml_node_contents.push_back(string_to_xml_attribute("TipDescription", &state, &this->tooltip_description)); + xml_node_contents.push_back(string_to_xml_attribute("TipDescription", state, &this->tooltip_description)); } if (this->tooltip_name_is_set) { - xml_node_contents.push_back(string_to_xml_attribute("TipName", &state, &this->tooltip_name)); + xml_node_contents.push_back(string_to_xml_attribute("TipName", state, &this->tooltip_name)); } if (this->trigger_range_is_set) { - xml_node_contents.push_back(float_to_xml_attribute("TriggerRange", &state, &this->trigger_range)); + xml_node_contents.push_back(float_to_xml_attribute("TriggerRange", state, &this->trigger_range)); } xml_node_contents.push_back("/>"); return xml_node_contents; } -waypoint::Icon Icon::as_protobuf() const { - ProtoWriterState state; +waypoint::Icon Icon::as_protobuf(ProtoWriterState* state) const { waypoint::Icon proto_icon; if (this->achievement_bitmask_is_set) { std::function setter = [&proto_icon](int val) { proto_icon.set_achievement_bit(val); }; - int_to_proto(this->achievement_bitmask, &state, setter); + int_to_proto(this->achievement_bitmask, state, setter); } if (this->achievement_id_is_set) { std::function setter = [&proto_icon](int val) { proto_icon.set_achievement_id(val); }; - int_to_proto(this->achievement_id, &state, setter); + int_to_proto(this->achievement_id, state, setter); } if (this->auto_trigger_is_set) { std::function setter = [&proto_icon](bool val) { proto_icon.mutable_trigger()->set_auto_trigger(val); }; - bool_to_proto(this->auto_trigger, &state, setter); + bool_to_proto(this->auto_trigger, state, setter); } if (this->bounce_delay_is_set) { std::function setter = [&proto_icon](float val) { proto_icon.mutable_trigger()->set_bounce_delay(val); }; - float_to_proto(this->bounce_delay, &state, setter); + float_to_proto(this->bounce_delay, state, setter); } if (this->bounce_duration_is_set) { std::function setter = [&proto_icon](float val) { proto_icon.mutable_trigger()->set_bounce_duration(val); }; - float_to_proto(this->bounce_duration, &state, setter); + float_to_proto(this->bounce_duration, state, setter); } if (this->bounce_height_is_set) { std::function setter = [&proto_icon](float val) { proto_icon.mutable_trigger()->set_bounce_height(val); }; - float_to_proto(this->bounce_height, &state, setter); + float_to_proto(this->bounce_height, state, setter); } if (this->category_is_set) { std::function setter = [&proto_icon](bool val) { proto_icon.set_category(val); }; - do_nothing(this->category, &state, setter); + do_nothing(this->category, state, setter); } if (this->color_is_set) { std::function setter = [&proto_icon](waypoint::RGBAColor* val) { proto_icon.set_allocated_rgba_color(val); }; - color_to_proto(this->color, &state, setter); + color_to_proto(this->color, state, setter); } if (this->copy_clipboard_is_set) { std::function setter = [&proto_icon](std::string val) { proto_icon.mutable_trigger()->set_action_copy_clipboard(val); }; - string_to_proto(this->copy_clipboard, &state, setter); + string_to_proto(this->copy_clipboard, state, setter); } if (this->copy_message_is_set) { std::function setter = [&proto_icon](std::string val) { proto_icon.mutable_trigger()->set_action_copy_message(val); }; - string_to_proto(this->copy_message, &state, setter); + string_to_proto(this->copy_message, state, setter); } if (this->cull_chirality_is_set) { std::function setter = [&proto_icon](waypoint::CullChirality val) { proto_icon.set_cull_chirality(val); }; - cull_chirality_to_proto(this->cull_chirality, &state, setter); + cull_chirality_to_proto(this->cull_chirality, state, setter); } if (this->disable_player_cutout_is_set) { std::function setter = [&proto_icon](bool val) { proto_icon.set_disable_player_cutout(val); }; - bool_to_proto(this->disable_player_cutout, &state, setter); + bool_to_proto(this->disable_player_cutout, state, setter); } if (this->distance_fade_end_is_set) { std::function setter = [&proto_icon](float val) { proto_icon.set_distance_fade_end(val); }; - float_to_proto(this->distance_fade_end, &state, setter); + float_to_proto(this->distance_fade_end, state, setter); } if (this->distance_fade_start_is_set) { std::function setter = [&proto_icon](float val) { proto_icon.set_distance_fade_start(val); }; - float_to_proto(this->distance_fade_start, &state, setter); + float_to_proto(this->distance_fade_start, state, setter); } if (this->euler_rotation_is_set) { std::function setter = [&proto_icon](waypoint::EulerRotation* val) { proto_icon.set_allocated_euler_rotation(val); }; - euler_rotation_to_proto(this->euler_rotation, &state, setter); + euler_rotation_to_proto(this->euler_rotation, state, setter); } if (this->festival_filter_is_set) { std::function setter = [&proto_icon](waypoint::FestivalFilter* val) { proto_icon.set_allocated_festival_filter(val); }; - festival_filter_to_proto(this->festival_filter, &state, setter); + festival_filter_to_proto(this->festival_filter, state, setter); } if (this->guid_is_set) { std::function setter = [&proto_icon](std::string val) { proto_icon.set_guid(val); }; - unique_id_to_proto(this->guid, &state, setter); + unique_id_to_proto(this->guid, state, setter); } if (this->has_countdown_is_set) { std::function setter = [&proto_icon](bool val) { proto_icon.mutable_trigger()->set_has_countdown(val); }; - bool_to_proto(this->has_countdown, &state, setter); + bool_to_proto(this->has_countdown, state, setter); } if (this->height_offset_is_set) { std::function setter = [&proto_icon](float val) { proto_icon.set_height_offset(val); }; - float_to_proto(this->height_offset, &state, setter); + float_to_proto(this->height_offset, state, setter); } if (this->hide_category_is_set) { std::function setter = [&proto_icon](waypoint::Category* val) { proto_icon.mutable_trigger()->set_allocated_action_hide_category(val); }; - marker_category_to_proto(this->hide_category, &state, setter); + marker_category_to_proto(this->hide_category, state, setter); } if (this->icon_is_set) { std::function setter = [&proto_icon](waypoint::TexturePath* val) { proto_icon.set_allocated_texture_path(val); }; - image_to_proto(this->icon, &state, setter); + image_to_proto(this->icon, state, setter); } if (this->icon_size_is_set) { std::function setter = [&proto_icon](float val) { proto_icon.set_tentative__scale(val); }; - float_to_proto(this->icon_size, &state, setter); + float_to_proto(this->icon_size, state, setter); } if (this->info_message_is_set) { std::function setter = [&proto_icon](std::string val) { proto_icon.mutable_trigger()->set_action_info_message(val); }; - string_to_proto(this->info_message, &state, setter); + string_to_proto(this->info_message, state, setter); } if (this->invert_visibility_is_set) { std::function setter = [&proto_icon](bool val) { proto_icon.mutable_trigger()->set_invert_display(val); }; - bool_to_proto(this->invert_visibility, &state, setter); + bool_to_proto(this->invert_visibility, state, setter); } if (this->map_display_size_is_set) { std::function setter = [&proto_icon](int val) { proto_icon.set_map_display_size(val); }; - int_to_proto(this->map_display_size, &state, setter); + int_to_proto(this->map_display_size, state, setter); } if (this->map_id_is_set) { std::function setter = [&proto_icon](int val) { proto_icon.set_map_id(val); }; - int_to_proto(this->map_id, &state, setter); + int_to_proto(this->map_id, state, setter); } if (this->map_type_filter_is_set) { std::function setter = [&proto_icon](waypoint::MapTypeFilter* val) { proto_icon.set_allocated_map_type_filter(val); }; - map_type_filter_to_proto(this->map_type_filter, &state, setter); + map_type_filter_to_proto(this->map_type_filter, state, setter); } if (this->maximum_size_on_screen_is_set) { std::function setter = [&proto_icon](int val) { proto_icon.set_maximum_size_on_screen(val); }; - int_to_proto(this->maximum_size_on_screen, &state, setter); + int_to_proto(this->maximum_size_on_screen, state, setter); } if (this->minimum_size_on_screen_is_set) { std::function setter = [&proto_icon](int val) { proto_icon.set_minimum_size_on_screen(val); }; - int_to_proto(this->minimum_size_on_screen, &state, setter); + int_to_proto(this->minimum_size_on_screen, state, setter); } if (this->mount_filter_is_set) { std::function setter = [&proto_icon](waypoint::MountFilter* val) { proto_icon.set_allocated_mount_filter(val); }; - mount_filter_to_proto(this->mount_filter, &state, setter); + mount_filter_to_proto(this->mount_filter, state, setter); } if (this->position_is_set) { std::function setter = [&proto_icon](waypoint::Position* val) { proto_icon.set_allocated_position(val); }; - position_to_proto(this->position, &state, setter); + position_to_proto(this->position, state, setter); } if (this->profession_filter_is_set) { std::function setter = [&proto_icon](waypoint::ProfessionFilter* val) { proto_icon.set_allocated_profession_filter(val); }; - profession_filter_to_proto(this->profession_filter, &state, setter); + profession_filter_to_proto(this->profession_filter, state, setter); } if (this->render_ingame_is_set) { std::function setter = [&proto_icon](bool val) { proto_icon.set_tentative__render_ingame(val); }; - bool_to_proto(this->render_ingame, &state, setter); + bool_to_proto(this->render_ingame, state, setter); } if (this->render_on_map_is_set) { std::function setter = [&proto_icon](bool val) { proto_icon.set_tentative__render_on_map(val); }; - bool_to_proto(this->render_on_map, &state, setter); + bool_to_proto(this->render_on_map, state, setter); } if (this->render_on_minimap_is_set) { std::function setter = [&proto_icon](bool val) { proto_icon.set_tentative__render_on_minimap(val); }; - bool_to_proto(this->render_on_minimap, &state, setter); + bool_to_proto(this->render_on_minimap, state, setter); } if (this->reset_behavior_is_set) { std::function setter = [&proto_icon](waypoint::ResetBehavior val) { proto_icon.mutable_trigger()->set_reset_behavior(val); }; - reset_behavior_to_proto(this->reset_behavior, &state, setter); + reset_behavior_to_proto(this->reset_behavior, state, setter); } if (this->reset_length_is_set) { std::function setter = [&proto_icon](float val) { proto_icon.mutable_trigger()->set_reset_length(val); }; - float_to_proto(this->reset_length, &state, setter); + float_to_proto(this->reset_length, state, setter); } if (this->scale_on_map_with_zoom_is_set) { std::function setter = [&proto_icon](bool val) { proto_icon.set_scale_on_map_with_zoom(val); }; - bool_to_proto(this->scale_on_map_with_zoom, &state, setter); + bool_to_proto(this->scale_on_map_with_zoom, state, setter); } if (this->schedule_is_set) { std::function setter = [&proto_icon](std::string val) { proto_icon.set_bhdraft__schedule(val); }; - string_to_proto(this->schedule, &state, setter); + string_to_proto(this->schedule, state, setter); } if (this->schedule_duration_is_set) { std::function setter = [&proto_icon](float val) { proto_icon.set_bhdraft__schedule_duration(val); }; - float_to_proto(this->schedule_duration, &state, setter); + float_to_proto(this->schedule_duration, state, setter); } if (this->show_category_is_set) { std::function setter = [&proto_icon](waypoint::Category* val) { proto_icon.mutable_trigger()->set_allocated_action_show_category(val); }; - marker_category_to_proto(this->show_category, &state, setter); + marker_category_to_proto(this->show_category, state, setter); } if (this->specialization_filter_is_set) { std::function setter = [&proto_icon](waypoint::SpecializationFilter* val) { proto_icon.set_allocated_specialization_filter(val); }; - specialization_filter_to_proto(this->specialization_filter, &state, setter); + specialization_filter_to_proto(this->specialization_filter, state, setter); } if (this->species_filter_is_set) { std::function setter = [&proto_icon](waypoint::SpeciesFilter* val) { proto_icon.set_allocated_species_filter(val); }; - species_filter_to_proto(this->species_filter, &state, setter); + species_filter_to_proto(this->species_filter, state, setter); } if (this->toggle_category_is_set) { std::function setter = [&proto_icon](waypoint::Category* val) { proto_icon.mutable_trigger()->set_allocated_action_toggle_category(val); }; - marker_category_to_proto(this->toggle_category, &state, setter); + marker_category_to_proto(this->toggle_category, state, setter); } if (this->tooltip_description_is_set) { std::function setter = [&proto_icon](std::string val) { proto_icon.set_tip_description(val); }; - string_to_proto(this->tooltip_description, &state, setter); + string_to_proto(this->tooltip_description, state, setter); } if (this->tooltip_name_is_set) { std::function setter = [&proto_icon](std::string val) { proto_icon.set_tip_name(val); }; - string_to_proto(this->tooltip_name, &state, setter); + string_to_proto(this->tooltip_name, state, setter); } if (this->trigger_range_is_set) { std::function setter = [&proto_icon](float val) { proto_icon.mutable_trigger()->set_range(val); }; - float_to_proto(this->trigger_range, &state, setter); + float_to_proto(this->trigger_range, state, setter); } return proto_icon; } -void Icon::parse_protobuf(waypoint::Icon proto_icon) { - ProtoReaderState state; +void Icon::parse_protobuf(waypoint::Icon proto_icon, ProtoReaderState* state) { if (proto_icon.achievement_bit() != 0) { - proto_to_int(proto_icon.achievement_bit(), &state, &(this->achievement_bitmask), &(this->achievement_bitmask_is_set)); + proto_to_int(proto_icon.achievement_bit(), state, &(this->achievement_bitmask), &(this->achievement_bitmask_is_set)); } if (proto_icon.achievement_id() != 0) { - proto_to_int(proto_icon.achievement_id(), &state, &(this->achievement_id), &(this->achievement_id_is_set)); + proto_to_int(proto_icon.achievement_id(), state, &(this->achievement_id), &(this->achievement_id_is_set)); } if (proto_icon.trigger().auto_trigger() != 0) { - proto_to_bool(proto_icon.trigger().auto_trigger(), &state, &(this->auto_trigger), &(this->auto_trigger_is_set)); + proto_to_bool(proto_icon.trigger().auto_trigger(), state, &(this->auto_trigger), &(this->auto_trigger_is_set)); } if (proto_icon.trigger().bounce_delay() != 0) { - proto_to_float(proto_icon.trigger().bounce_delay(), &state, &(this->bounce_delay), &(this->bounce_delay_is_set)); + proto_to_float(proto_icon.trigger().bounce_delay(), state, &(this->bounce_delay), &(this->bounce_delay_is_set)); } if (proto_icon.trigger().bounce_duration() != 0) { - proto_to_float(proto_icon.trigger().bounce_duration(), &state, &(this->bounce_duration), &(this->bounce_duration_is_set)); + proto_to_float(proto_icon.trigger().bounce_duration(), state, &(this->bounce_duration), &(this->bounce_duration_is_set)); } if (proto_icon.trigger().bounce_height() != 0) { - proto_to_float(proto_icon.trigger().bounce_height(), &state, &(this->bounce_height), &(this->bounce_height_is_set)); + proto_to_float(proto_icon.trigger().bounce_height(), state, &(this->bounce_height), &(this->bounce_height_is_set)); } if (proto_icon.category() != 0) { - do_nothing(proto_icon.category(), &state, &(this->category), &(this->category_is_set)); + do_nothing(proto_icon.category(), state, &(this->category), &(this->category_is_set)); } if (proto_icon.has_rgba_color()) { - proto_to_color(proto_icon.rgba_color(), &state, &(this->color), &(this->color_is_set)); + proto_to_color(proto_icon.rgba_color(), state, &(this->color), &(this->color_is_set)); } if (proto_icon.trigger().action_copy_clipboard() != "") { - proto_to_string(proto_icon.trigger().action_copy_clipboard(), &state, &(this->copy_clipboard), &(this->copy_clipboard_is_set)); + proto_to_string(proto_icon.trigger().action_copy_clipboard(), state, &(this->copy_clipboard), &(this->copy_clipboard_is_set)); } if (proto_icon.trigger().action_copy_message() != "") { - proto_to_string(proto_icon.trigger().action_copy_message(), &state, &(this->copy_message), &(this->copy_message_is_set)); + proto_to_string(proto_icon.trigger().action_copy_message(), state, &(this->copy_message), &(this->copy_message_is_set)); } if (proto_icon.cull_chirality() != 0) { - proto_to_cull_chirality(proto_icon.cull_chirality(), &state, &(this->cull_chirality), &(this->cull_chirality_is_set)); + proto_to_cull_chirality(proto_icon.cull_chirality(), state, &(this->cull_chirality), &(this->cull_chirality_is_set)); } if (proto_icon.disable_player_cutout() != 0) { - proto_to_bool(proto_icon.disable_player_cutout(), &state, &(this->disable_player_cutout), &(this->disable_player_cutout_is_set)); + proto_to_bool(proto_icon.disable_player_cutout(), state, &(this->disable_player_cutout), &(this->disable_player_cutout_is_set)); } if (proto_icon.distance_fade_end() != 0) { - proto_to_float(proto_icon.distance_fade_end(), &state, &(this->distance_fade_end), &(this->distance_fade_end_is_set)); + proto_to_float(proto_icon.distance_fade_end(), state, &(this->distance_fade_end), &(this->distance_fade_end_is_set)); } if (proto_icon.distance_fade_start() != 0) { - proto_to_float(proto_icon.distance_fade_start(), &state, &(this->distance_fade_start), &(this->distance_fade_start_is_set)); + proto_to_float(proto_icon.distance_fade_start(), state, &(this->distance_fade_start), &(this->distance_fade_start_is_set)); } if (proto_icon.has_euler_rotation()) { - proto_to_euler_rotation(proto_icon.euler_rotation(), &state, &(this->euler_rotation), &(this->euler_rotation_is_set)); + proto_to_euler_rotation(proto_icon.euler_rotation(), state, &(this->euler_rotation), &(this->euler_rotation_is_set)); } if (proto_icon.has_festival_filter()) { - proto_to_festival_filter(proto_icon.festival_filter(), &state, &(this->festival_filter), &(this->festival_filter_is_set)); + proto_to_festival_filter(proto_icon.festival_filter(), state, &(this->festival_filter), &(this->festival_filter_is_set)); } if (proto_icon.guid() != "") { - proto_to_unique_id(proto_icon.guid(), &state, &(this->guid), &(this->guid_is_set)); + proto_to_unique_id(proto_icon.guid(), state, &(this->guid), &(this->guid_is_set)); } if (proto_icon.trigger().has_countdown() != 0) { - proto_to_bool(proto_icon.trigger().has_countdown(), &state, &(this->has_countdown), &(this->has_countdown_is_set)); + proto_to_bool(proto_icon.trigger().has_countdown(), state, &(this->has_countdown), &(this->has_countdown_is_set)); } if (proto_icon.height_offset() != 0) { - proto_to_float(proto_icon.height_offset(), &state, &(this->height_offset), &(this->height_offset_is_set)); + proto_to_float(proto_icon.height_offset(), state, &(this->height_offset), &(this->height_offset_is_set)); } if (proto_icon.trigger().has_action_hide_category()) { - proto_to_marker_category(proto_icon.trigger().action_hide_category(), &state, &(this->hide_category), &(this->hide_category_is_set)); + proto_to_marker_category(proto_icon.trigger().action_hide_category(), state, &(this->hide_category), &(this->hide_category_is_set)); } if (proto_icon.has_texture_path()) { - proto_to_image(proto_icon.texture_path(), &state, &(this->icon), &(this->icon_is_set)); + proto_to_image(proto_icon.texture_path(), state, &(this->icon), &(this->icon_is_set)); } if (proto_icon.tentative__scale() != 0) { - proto_to_float(proto_icon.tentative__scale(), &state, &(this->icon_size), &(this->icon_size_is_set)); + proto_to_float(proto_icon.tentative__scale(), state, &(this->icon_size), &(this->icon_size_is_set)); } if (proto_icon.trigger().action_info_message() != "") { - proto_to_string(proto_icon.trigger().action_info_message(), &state, &(this->info_message), &(this->info_message_is_set)); + proto_to_string(proto_icon.trigger().action_info_message(), state, &(this->info_message), &(this->info_message_is_set)); } if (proto_icon.trigger().invert_display() != 0) { - proto_to_bool(proto_icon.trigger().invert_display(), &state, &(this->invert_visibility), &(this->invert_visibility_is_set)); + proto_to_bool(proto_icon.trigger().invert_display(), state, &(this->invert_visibility), &(this->invert_visibility_is_set)); } if (proto_icon.map_display_size() != 0) { - proto_to_int(proto_icon.map_display_size(), &state, &(this->map_display_size), &(this->map_display_size_is_set)); + proto_to_int(proto_icon.map_display_size(), state, &(this->map_display_size), &(this->map_display_size_is_set)); } if (proto_icon.map_id() != 0) { - proto_to_int(proto_icon.map_id(), &state, &(this->map_id), &(this->map_id_is_set)); + proto_to_int(proto_icon.map_id(), state, &(this->map_id), &(this->map_id_is_set)); } if (proto_icon.has_map_type_filter()) { - proto_to_map_type_filter(proto_icon.map_type_filter(), &state, &(this->map_type_filter), &(this->map_type_filter_is_set)); + proto_to_map_type_filter(proto_icon.map_type_filter(), state, &(this->map_type_filter), &(this->map_type_filter_is_set)); } if (proto_icon.maximum_size_on_screen() != 0) { - proto_to_int(proto_icon.maximum_size_on_screen(), &state, &(this->maximum_size_on_screen), &(this->maximum_size_on_screen_is_set)); + proto_to_int(proto_icon.maximum_size_on_screen(), state, &(this->maximum_size_on_screen), &(this->maximum_size_on_screen_is_set)); } if (proto_icon.minimum_size_on_screen() != 0) { - proto_to_int(proto_icon.minimum_size_on_screen(), &state, &(this->minimum_size_on_screen), &(this->minimum_size_on_screen_is_set)); + proto_to_int(proto_icon.minimum_size_on_screen(), state, &(this->minimum_size_on_screen), &(this->minimum_size_on_screen_is_set)); } if (proto_icon.has_mount_filter()) { - proto_to_mount_filter(proto_icon.mount_filter(), &state, &(this->mount_filter), &(this->mount_filter_is_set)); + proto_to_mount_filter(proto_icon.mount_filter(), state, &(this->mount_filter), &(this->mount_filter_is_set)); } if (proto_icon.has_position()) { - proto_to_position(proto_icon.position(), &state, &(this->position), &(this->position_is_set)); + proto_to_position(proto_icon.position(), state, &(this->position), &(this->position_is_set)); } if (proto_icon.has_profession_filter()) { - proto_to_profession_filter(proto_icon.profession_filter(), &state, &(this->profession_filter), &(this->profession_filter_is_set)); + proto_to_profession_filter(proto_icon.profession_filter(), state, &(this->profession_filter), &(this->profession_filter_is_set)); } if (proto_icon.tentative__render_ingame() != 0) { - proto_to_bool(proto_icon.tentative__render_ingame(), &state, &(this->render_ingame), &(this->render_ingame_is_set)); + proto_to_bool(proto_icon.tentative__render_ingame(), state, &(this->render_ingame), &(this->render_ingame_is_set)); } if (proto_icon.tentative__render_on_map() != 0) { - proto_to_bool(proto_icon.tentative__render_on_map(), &state, &(this->render_on_map), &(this->render_on_map_is_set)); + proto_to_bool(proto_icon.tentative__render_on_map(), state, &(this->render_on_map), &(this->render_on_map_is_set)); } if (proto_icon.tentative__render_on_minimap() != 0) { - proto_to_bool(proto_icon.tentative__render_on_minimap(), &state, &(this->render_on_minimap), &(this->render_on_minimap_is_set)); + proto_to_bool(proto_icon.tentative__render_on_minimap(), state, &(this->render_on_minimap), &(this->render_on_minimap_is_set)); } if (proto_icon.trigger().reset_behavior() != 0) { - proto_to_reset_behavior(proto_icon.trigger().reset_behavior(), &state, &(this->reset_behavior), &(this->reset_behavior_is_set)); + proto_to_reset_behavior(proto_icon.trigger().reset_behavior(), state, &(this->reset_behavior), &(this->reset_behavior_is_set)); } if (proto_icon.trigger().reset_length() != 0) { - proto_to_float(proto_icon.trigger().reset_length(), &state, &(this->reset_length), &(this->reset_length_is_set)); + proto_to_float(proto_icon.trigger().reset_length(), state, &(this->reset_length), &(this->reset_length_is_set)); } if (proto_icon.scale_on_map_with_zoom() != 0) { - proto_to_bool(proto_icon.scale_on_map_with_zoom(), &state, &(this->scale_on_map_with_zoom), &(this->scale_on_map_with_zoom_is_set)); + proto_to_bool(proto_icon.scale_on_map_with_zoom(), state, &(this->scale_on_map_with_zoom), &(this->scale_on_map_with_zoom_is_set)); } if (proto_icon.bhdraft__schedule() != "") { - proto_to_string(proto_icon.bhdraft__schedule(), &state, &(this->schedule), &(this->schedule_is_set)); + proto_to_string(proto_icon.bhdraft__schedule(), state, &(this->schedule), &(this->schedule_is_set)); } if (proto_icon.bhdraft__schedule_duration() != 0) { - proto_to_float(proto_icon.bhdraft__schedule_duration(), &state, &(this->schedule_duration), &(this->schedule_duration_is_set)); + proto_to_float(proto_icon.bhdraft__schedule_duration(), state, &(this->schedule_duration), &(this->schedule_duration_is_set)); } if (proto_icon.trigger().has_action_show_category()) { - proto_to_marker_category(proto_icon.trigger().action_show_category(), &state, &(this->show_category), &(this->show_category_is_set)); + proto_to_marker_category(proto_icon.trigger().action_show_category(), state, &(this->show_category), &(this->show_category_is_set)); } if (proto_icon.has_specialization_filter()) { - proto_to_specialization_filter(proto_icon.specialization_filter(), &state, &(this->specialization_filter), &(this->specialization_filter_is_set)); + proto_to_specialization_filter(proto_icon.specialization_filter(), state, &(this->specialization_filter), &(this->specialization_filter_is_set)); } if (proto_icon.has_species_filter()) { - proto_to_species_filter(proto_icon.species_filter(), &state, &(this->species_filter), &(this->species_filter_is_set)); + proto_to_species_filter(proto_icon.species_filter(), state, &(this->species_filter), &(this->species_filter_is_set)); } if (proto_icon.trigger().has_action_toggle_category()) { - proto_to_marker_category(proto_icon.trigger().action_toggle_category(), &state, &(this->toggle_category), &(this->toggle_category_is_set)); + proto_to_marker_category(proto_icon.trigger().action_toggle_category(), state, &(this->toggle_category), &(this->toggle_category_is_set)); } if (proto_icon.tip_description() != "") { - proto_to_string(proto_icon.tip_description(), &state, &(this->tooltip_description), &(this->tooltip_description_is_set)); + proto_to_string(proto_icon.tip_description(), state, &(this->tooltip_description), &(this->tooltip_description_is_set)); } if (proto_icon.tip_name() != "") { - proto_to_string(proto_icon.tip_name(), &state, &(this->tooltip_name), &(this->tooltip_name_is_set)); + proto_to_string(proto_icon.tip_name(), state, &(this->tooltip_name), &(this->tooltip_name_is_set)); } if (proto_icon.trigger().range() != 0) { - proto_to_float(proto_icon.trigger().range(), &state, &(this->trigger_range), &(this->trigger_range_is_set)); + proto_to_float(proto_icon.trigger().range(), state, &(this->trigger_range), &(this->trigger_range_is_set)); } } diff --git a/xml_converter/src/icon_gen.hpp b/xml_converter/src/icon_gen.hpp index f93fa1c0..70410b78 100644 --- a/xml_converter/src/icon_gen.hpp +++ b/xml_converter/src/icon_gen.hpp @@ -121,10 +121,10 @@ class Icon : public Parseable { bool tooltip_description_is_set = false; bool tooltip_name_is_set = false; bool trigger_range_is_set = false; - virtual std::vector as_xml() const; + virtual std::vector as_xml(XMLWriterState* state) const; virtual std::string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, XMLReaderState* state); - waypoint::Icon as_protobuf() const; - void parse_protobuf(waypoint::Icon proto_icon); + waypoint::Icon as_protobuf(ProtoWriterState* state) const; + void parse_protobuf(waypoint::Icon proto_icon, ProtoReaderState* state); bool validate_attributes_of_type_marker_category(); }; diff --git a/xml_converter/src/packaging_protobin.cpp b/xml_converter/src/packaging_protobin.cpp index d17a23b2..8ab96bf7 100644 --- a/xml_converter/src/packaging_protobin.cpp +++ b/xml_converter/src/packaging_protobin.cpp @@ -28,11 +28,14 @@ void parse_waypoint_categories( vector* parsed_pois) { full_category_name += proto_category.name(); Category* this_category = &(*marker_categories)[full_category_name]; - this_category->parse_protobuf(proto_category); + + ProtoReaderState state; + + this_category->parse_protobuf(proto_category, &state); for (int i = 0; i < proto_category.icon_size(); i++) { Icon* icon = new Icon(); - icon->parse_protobuf(proto_category.icon(i)); + icon->parse_protobuf(proto_category.icon(i), &state); // TODO: The field category in Icon is being deprciated // This overwrites any icon.category with its position in the heirarchy icon->category.category = full_category_name; @@ -40,7 +43,7 @@ void parse_waypoint_categories( } for (int i = 0; i < proto_category.trail_size(); i++) { Trail* trail = new Trail(); - trail->parse_protobuf(proto_category.trail(i)); + trail->parse_protobuf(proto_category.trail(i), &state); // TODO: The field category in Trail is being deprciated // This overwrites any trail.category with its position in the heirarchy trail->category.category = full_category_name; @@ -85,7 +88,9 @@ MaybeCategory build_category_objects( const StringHierarchy& category_filter, const std::map>& category_to_pois, vector* category_vector) { - waypoint::Category category_proto = category->as_protobuf(); + ProtoWriterState state; + + waypoint::Category category_proto = category->as_protobuf(&state); bool has_valid_contents = false; vector categories_to_write; @@ -119,14 +124,14 @@ MaybeCategory build_category_objects( if (parsed_poi->classname() == "POI") { Icon* icon = dynamic_cast(parsed_poi); if (category_filter.in_hierarchy(split(icon->category.category, "."))) { - category_proto.add_icon()->MergeFrom(icon->as_protobuf()); + category_proto.add_icon()->MergeFrom(icon->as_protobuf(&state)); has_valid_contents = true; } } else if (parsed_poi->classname() == "Trail") { Trail* trail = dynamic_cast(parsed_poi); if (category_filter.in_hierarchy(split(trail->category.category, "."))) { - category_proto.add_trail()->MergeFrom(trail->as_protobuf()); + category_proto.add_trail()->MergeFrom(trail->as_protobuf(&state)); has_valid_contents = true; } } diff --git a/xml_converter/src/packaging_xml.cpp b/xml_converter/src/packaging_xml.cpp index 444c26de..b77d7f5e 100644 --- a/xml_converter/src/packaging_xml.cpp +++ b/xml_converter/src/packaging_xml.cpp @@ -165,12 +165,14 @@ void write_xml_file(string xml_filepath, map* marker_categorie ofstream outfile; string tab_string; + XMLWriterState state; + outfile.open(xml_filepath, ios::out); outfile << "\n"; for (const auto& category : *marker_categories) { string text; - for (const auto& s : category.second.as_xml()) { + for (const auto& s : category.second.as_xml(&state)) { text += s; } outfile << text + "\n"; @@ -179,7 +181,7 @@ void write_xml_file(string xml_filepath, map* marker_categorie outfile << "\n"; for (const auto& parsed_poi : *parsed_pois) { string text; - for (const auto& s : parsed_poi->as_xml()) { + for (const auto& s : parsed_poi->as_xml(&state)) { text += s; } outfile << text + "\n"; diff --git a/xml_converter/src/parseable.cpp b/xml_converter/src/parseable.cpp index 2786fe62..3dce9db8 100644 --- a/xml_converter/src/parseable.cpp +++ b/xml_converter/src/parseable.cpp @@ -6,6 +6,7 @@ #include "rapid_helpers.hpp" #include "rapidxml-1.13/rapidxml.hpp" +#include "state_structs/xml_writer_state.hpp" std::string Parseable::classname() { return "Parseable"; @@ -32,7 +33,7 @@ bool Parseable::init_xml_attribute(rapidxml::xml_attribute<>*, std::vector Parseable::as_xml() const { +std::vector Parseable::as_xml(XMLWriterState*) const { throw std::runtime_error("error: Parseable::as_xml() should not be called"); std::vector result; return result; diff --git a/xml_converter/src/parseable.hpp b/xml_converter/src/parseable.hpp index d851f3e2..15fae0f1 100644 --- a/xml_converter/src/parseable.hpp +++ b/xml_converter/src/parseable.hpp @@ -5,6 +5,7 @@ #include "rapidxml-1.13/rapidxml.hpp" #include "state_structs/xml_reader_state.hpp" +#include "state_structs/xml_writer_state.hpp" class XMLError; @@ -19,5 +20,5 @@ class Parseable { // A default parser function to parse a single XML attribute into the class. virtual bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, XMLReaderState*); - virtual std::vector as_xml() const; + virtual std::vector as_xml(XMLWriterState* state) const; }; diff --git a/xml_converter/src/trail_gen.cpp b/xml_converter/src/trail_gen.cpp index 0ee4890d..1aadd397 100644 --- a/xml_converter/src/trail_gen.cpp +++ b/xml_converter/src/trail_gen.cpp @@ -153,293 +153,290 @@ bool Trail::validate_attributes_of_type_marker_category() { return true; } -vector Trail::as_xml() const { - XMLWriterState state; +vector Trail::as_xml(XMLWriterState* state) const { vector xml_node_contents; xml_node_contents.push_back("achievement_bitmask_is_set) { - xml_node_contents.push_back(int_to_xml_attribute("AchievementBit", &state, &this->achievement_bitmask)); + xml_node_contents.push_back(int_to_xml_attribute("AchievementBit", state, &this->achievement_bitmask)); } if (this->achievement_id_is_set) { - xml_node_contents.push_back(int_to_xml_attribute("AchievementId", &state, &this->achievement_id)); + xml_node_contents.push_back(int_to_xml_attribute("AchievementId", state, &this->achievement_id)); } if (this->animation_speed_is_set) { - xml_node_contents.push_back(float_to_xml_attribute("AnimSpeed", &state, &this->animation_speed)); + xml_node_contents.push_back(float_to_xml_attribute("AnimSpeed", state, &this->animation_speed)); } if (this->category_is_set) { - xml_node_contents.push_back(marker_category_to_xml_attribute("Type", &state, &this->category)); + xml_node_contents.push_back(marker_category_to_xml_attribute("Type", state, &this->category)); } if (this->color_is_set) { - xml_node_contents.push_back(color_to_xml_attribute("Color", &state, &this->color)); + xml_node_contents.push_back(color_to_xml_attribute("Color", state, &this->color)); } if (this->color_is_set) { - xml_node_contents.push_back(float_to_xml_attribute("Alpha", &state, &this->color.alpha)); + xml_node_contents.push_back(float_to_xml_attribute("Alpha", state, &this->color.alpha)); } if (this->cull_chirality_is_set) { - xml_node_contents.push_back(cull_chirality_to_xml_attribute("Cull", &state, &this->cull_chirality)); + xml_node_contents.push_back(cull_chirality_to_xml_attribute("Cull", state, &this->cull_chirality)); } if (this->disable_player_cutout_is_set) { - xml_node_contents.push_back(bool_to_inverted_xml_attribute("CanFade", &state, &this->disable_player_cutout)); + xml_node_contents.push_back(bool_to_inverted_xml_attribute("CanFade", state, &this->disable_player_cutout)); } if (this->distance_fade_end_is_set) { - xml_node_contents.push_back(float_to_xml_attribute("FadeFar", &state, &this->distance_fade_end)); + xml_node_contents.push_back(float_to_xml_attribute("FadeFar", state, &this->distance_fade_end)); } if (this->distance_fade_start_is_set) { - xml_node_contents.push_back(float_to_xml_attribute("FadeNear", &state, &this->distance_fade_start)); + xml_node_contents.push_back(float_to_xml_attribute("FadeNear", state, &this->distance_fade_start)); } if (this->festival_filter_is_set) { - xml_node_contents.push_back(festival_filter_to_xml_attribute("Festival", &state, &this->festival_filter)); + xml_node_contents.push_back(festival_filter_to_xml_attribute("Festival", state, &this->festival_filter)); } if (this->guid_is_set) { - xml_node_contents.push_back(unique_id_to_xml_attribute("GUID", &state, &this->guid)); + xml_node_contents.push_back(unique_id_to_xml_attribute("GUID", state, &this->guid)); } if (this->is_wall_is_set) { - xml_node_contents.push_back(bool_to_xml_attribute("IsWall", &state, &this->is_wall)); + xml_node_contents.push_back(bool_to_xml_attribute("IsWall", state, &this->is_wall)); } if (this->map_display_size_is_set) { - xml_node_contents.push_back(int_to_xml_attribute("MapDisplaySize", &state, &this->map_display_size)); + xml_node_contents.push_back(int_to_xml_attribute("MapDisplaySize", state, &this->map_display_size)); } if (this->map_id_is_set) { - xml_node_contents.push_back(int_to_xml_attribute("MapID", &state, &this->map_id)); + xml_node_contents.push_back(int_to_xml_attribute("MapID", state, &this->map_id)); } if (this->map_type_filter_is_set) { - xml_node_contents.push_back(map_type_filter_to_xml_attribute("MapType", &state, &this->map_type_filter)); + xml_node_contents.push_back(map_type_filter_to_xml_attribute("MapType", state, &this->map_type_filter)); } if (this->mount_filter_is_set) { - xml_node_contents.push_back(mount_filter_to_xml_attribute("Mount", &state, &this->mount_filter)); + xml_node_contents.push_back(mount_filter_to_xml_attribute("Mount", state, &this->mount_filter)); } if (this->profession_filter_is_set) { - xml_node_contents.push_back(profession_filter_to_xml_attribute("Profession", &state, &this->profession_filter)); + xml_node_contents.push_back(profession_filter_to_xml_attribute("Profession", state, &this->profession_filter)); } if (this->render_ingame_is_set) { - xml_node_contents.push_back(bool_to_xml_attribute("IngameVisibility", &state, &this->render_ingame)); + xml_node_contents.push_back(bool_to_xml_attribute("IngameVisibility", state, &this->render_ingame)); } if (this->render_on_map_is_set) { - xml_node_contents.push_back(bool_to_xml_attribute("MapVisibility", &state, &this->render_on_map)); + xml_node_contents.push_back(bool_to_xml_attribute("MapVisibility", state, &this->render_on_map)); } if (this->render_on_minimap_is_set) { - xml_node_contents.push_back(bool_to_xml_attribute("MinimapVisibility", &state, &this->render_on_minimap)); + xml_node_contents.push_back(bool_to_xml_attribute("MinimapVisibility", state, &this->render_on_minimap)); } if (this->schedule_is_set) { - xml_node_contents.push_back(string_to_xml_attribute("Schedule", &state, &this->schedule)); + xml_node_contents.push_back(string_to_xml_attribute("Schedule", state, &this->schedule)); } if (this->schedule_duration_is_set) { - xml_node_contents.push_back(float_to_xml_attribute("ScheduleDuration", &state, &this->schedule_duration)); + xml_node_contents.push_back(float_to_xml_attribute("ScheduleDuration", state, &this->schedule_duration)); } if (this->specialization_filter_is_set) { - xml_node_contents.push_back(specialization_filter_to_xml_attribute("Specialization", &state, &this->specialization_filter)); + xml_node_contents.push_back(specialization_filter_to_xml_attribute("Specialization", state, &this->specialization_filter)); } if (this->species_filter_is_set) { - xml_node_contents.push_back(species_filter_to_xml_attribute("Race", &state, &this->species_filter)); + xml_node_contents.push_back(species_filter_to_xml_attribute("Race", state, &this->species_filter)); } if (this->texture_is_set) { - xml_node_contents.push_back(image_to_xml_attribute("Texture", &state, &this->texture)); + xml_node_contents.push_back(image_to_xml_attribute("Texture", state, &this->texture)); } if (this->trail_data_is_set) { - xml_node_contents.push_back(trail_data_to_xml_attribute("TrailData", &state, &this->trail_data)); + xml_node_contents.push_back(trail_data_to_xml_attribute("TrailData", state, &this->trail_data)); } if (this->trail_scale_is_set) { - xml_node_contents.push_back(float_to_xml_attribute("TrailScale", &state, &this->trail_scale)); + xml_node_contents.push_back(float_to_xml_attribute("TrailScale", state, &this->trail_scale)); } xml_node_contents.push_back("/>"); return xml_node_contents; } -waypoint::Trail Trail::as_protobuf() const { - ProtoWriterState state; +waypoint::Trail Trail::as_protobuf(ProtoWriterState* state) const { waypoint::Trail proto_trail; if (this->achievement_bitmask_is_set) { std::function setter = [&proto_trail](int val) { proto_trail.set_achievement_bit(val); }; - int_to_proto(this->achievement_bitmask, &state, setter); + int_to_proto(this->achievement_bitmask, state, setter); } if (this->achievement_id_is_set) { std::function setter = [&proto_trail](int val) { proto_trail.set_achievement_id(val); }; - int_to_proto(this->achievement_id, &state, setter); + int_to_proto(this->achievement_id, state, setter); } if (this->animation_speed_is_set) { std::function setter = [&proto_trail](float val) { proto_trail.set_animation_speed(val); }; - float_to_proto(this->animation_speed, &state, setter); + float_to_proto(this->animation_speed, state, setter); } if (this->category_is_set) { std::function setter = [&proto_trail](bool val) { proto_trail.set_category(val); }; - do_nothing(this->category, &state, setter); + do_nothing(this->category, state, setter); } if (this->color_is_set) { std::function setter = [&proto_trail](waypoint::RGBAColor* val) { proto_trail.set_allocated_rgba_color(val); }; - color_to_proto(this->color, &state, setter); + color_to_proto(this->color, state, setter); } if (this->cull_chirality_is_set) { std::function setter = [&proto_trail](waypoint::CullChirality val) { proto_trail.set_cull_chirality(val); }; - cull_chirality_to_proto(this->cull_chirality, &state, setter); + cull_chirality_to_proto(this->cull_chirality, state, setter); } if (this->disable_player_cutout_is_set) { std::function setter = [&proto_trail](bool val) { proto_trail.set_disable_player_cutout(val); }; - bool_to_proto(this->disable_player_cutout, &state, setter); + bool_to_proto(this->disable_player_cutout, state, setter); } if (this->distance_fade_end_is_set) { std::function setter = [&proto_trail](float val) { proto_trail.set_distance_fade_end(val); }; - float_to_proto(this->distance_fade_end, &state, setter); + float_to_proto(this->distance_fade_end, state, setter); } if (this->distance_fade_start_is_set) { std::function setter = [&proto_trail](float val) { proto_trail.set_distance_fade_start(val); }; - float_to_proto(this->distance_fade_start, &state, setter); + float_to_proto(this->distance_fade_start, state, setter); } if (this->festival_filter_is_set) { std::function setter = [&proto_trail](waypoint::FestivalFilter* val) { proto_trail.set_allocated_festival_filter(val); }; - festival_filter_to_proto(this->festival_filter, &state, setter); + festival_filter_to_proto(this->festival_filter, state, setter); } if (this->guid_is_set) { std::function setter = [&proto_trail](std::string val) { proto_trail.set_guid(val); }; - unique_id_to_proto(this->guid, &state, setter); + unique_id_to_proto(this->guid, state, setter); } if (this->is_wall_is_set) { std::function setter = [&proto_trail](bool val) { proto_trail.set_is_wall(val); }; - bool_to_proto(this->is_wall, &state, setter); + bool_to_proto(this->is_wall, state, setter); } if (this->map_display_size_is_set) { std::function setter = [&proto_trail](int val) { proto_trail.set_map_display_size(val); }; - int_to_proto(this->map_display_size, &state, setter); + int_to_proto(this->map_display_size, state, setter); } if (this->map_id_is_set) { std::function setter = [&proto_trail](int val) { proto_trail.set_map_id(val); }; - int_to_proto(this->map_id, &state, setter); + int_to_proto(this->map_id, state, setter); } if (this->map_type_filter_is_set) { std::function setter = [&proto_trail](waypoint::MapTypeFilter* val) { proto_trail.set_allocated_map_type_filter(val); }; - map_type_filter_to_proto(this->map_type_filter, &state, setter); + map_type_filter_to_proto(this->map_type_filter, state, setter); } if (this->mount_filter_is_set) { std::function setter = [&proto_trail](waypoint::MountFilter* val) { proto_trail.set_allocated_mount_filter(val); }; - mount_filter_to_proto(this->mount_filter, &state, setter); + mount_filter_to_proto(this->mount_filter, state, setter); } if (this->profession_filter_is_set) { std::function setter = [&proto_trail](waypoint::ProfessionFilter* val) { proto_trail.set_allocated_profession_filter(val); }; - profession_filter_to_proto(this->profession_filter, &state, setter); + profession_filter_to_proto(this->profession_filter, state, setter); } if (this->render_ingame_is_set) { std::function setter = [&proto_trail](bool val) { proto_trail.set_tentative__render_ingame(val); }; - bool_to_proto(this->render_ingame, &state, setter); + bool_to_proto(this->render_ingame, state, setter); } if (this->render_on_map_is_set) { std::function setter = [&proto_trail](bool val) { proto_trail.set_tentative__render_on_map(val); }; - bool_to_proto(this->render_on_map, &state, setter); + bool_to_proto(this->render_on_map, state, setter); } if (this->render_on_minimap_is_set) { std::function setter = [&proto_trail](bool val) { proto_trail.set_tentative__render_on_minimap(val); }; - bool_to_proto(this->render_on_minimap, &state, setter); + bool_to_proto(this->render_on_minimap, state, setter); } if (this->schedule_is_set) { std::function setter = [&proto_trail](std::string val) { proto_trail.set_bhdraft__schedule(val); }; - string_to_proto(this->schedule, &state, setter); + string_to_proto(this->schedule, state, setter); } if (this->schedule_duration_is_set) { std::function setter = [&proto_trail](float val) { proto_trail.set_bhdraft__schedule_duration(val); }; - float_to_proto(this->schedule_duration, &state, setter); + float_to_proto(this->schedule_duration, state, setter); } if (this->specialization_filter_is_set) { std::function setter = [&proto_trail](waypoint::SpecializationFilter* val) { proto_trail.set_allocated_specialization_filter(val); }; - specialization_filter_to_proto(this->specialization_filter, &state, setter); + specialization_filter_to_proto(this->specialization_filter, state, setter); } if (this->species_filter_is_set) { std::function setter = [&proto_trail](waypoint::SpeciesFilter* val) { proto_trail.set_allocated_species_filter(val); }; - species_filter_to_proto(this->species_filter, &state, setter); + species_filter_to_proto(this->species_filter, state, setter); } if (this->texture_is_set) { std::function setter = [&proto_trail](waypoint::TexturePath* val) { proto_trail.set_allocated_texture_path(val); }; - image_to_proto(this->texture, &state, setter); + image_to_proto(this->texture, state, setter); } if (this->trail_data_is_set) { std::function setter = [&proto_trail](waypoint::TrailData* val) { proto_trail.set_allocated_trail_data(val); }; - trail_data_to_proto(this->trail_data, &state, setter); + trail_data_to_proto(this->trail_data, state, setter); } if (this->trail_scale_is_set) { std::function setter = [&proto_trail](float val) { proto_trail.set_scale(val); }; - float_to_proto(this->trail_scale, &state, setter); + float_to_proto(this->trail_scale, state, setter); } return proto_trail; } -void Trail::parse_protobuf(waypoint::Trail proto_trail) { - ProtoReaderState state; +void Trail::parse_protobuf(waypoint::Trail proto_trail, ProtoReaderState* state) { if (proto_trail.achievement_bit() != 0) { - proto_to_int(proto_trail.achievement_bit(), &state, &(this->achievement_bitmask), &(this->achievement_bitmask_is_set)); + proto_to_int(proto_trail.achievement_bit(), state, &(this->achievement_bitmask), &(this->achievement_bitmask_is_set)); } if (proto_trail.achievement_id() != 0) { - proto_to_int(proto_trail.achievement_id(), &state, &(this->achievement_id), &(this->achievement_id_is_set)); + proto_to_int(proto_trail.achievement_id(), state, &(this->achievement_id), &(this->achievement_id_is_set)); } if (proto_trail.animation_speed() != 0) { - proto_to_float(proto_trail.animation_speed(), &state, &(this->animation_speed), &(this->animation_speed_is_set)); + proto_to_float(proto_trail.animation_speed(), state, &(this->animation_speed), &(this->animation_speed_is_set)); } if (proto_trail.category() != 0) { - do_nothing(proto_trail.category(), &state, &(this->category), &(this->category_is_set)); + do_nothing(proto_trail.category(), state, &(this->category), &(this->category_is_set)); } if (proto_trail.has_rgba_color()) { - proto_to_color(proto_trail.rgba_color(), &state, &(this->color), &(this->color_is_set)); + proto_to_color(proto_trail.rgba_color(), state, &(this->color), &(this->color_is_set)); } if (proto_trail.cull_chirality() != 0) { - proto_to_cull_chirality(proto_trail.cull_chirality(), &state, &(this->cull_chirality), &(this->cull_chirality_is_set)); + proto_to_cull_chirality(proto_trail.cull_chirality(), state, &(this->cull_chirality), &(this->cull_chirality_is_set)); } if (proto_trail.disable_player_cutout() != 0) { - proto_to_bool(proto_trail.disable_player_cutout(), &state, &(this->disable_player_cutout), &(this->disable_player_cutout_is_set)); + proto_to_bool(proto_trail.disable_player_cutout(), state, &(this->disable_player_cutout), &(this->disable_player_cutout_is_set)); } if (proto_trail.distance_fade_end() != 0) { - proto_to_float(proto_trail.distance_fade_end(), &state, &(this->distance_fade_end), &(this->distance_fade_end_is_set)); + proto_to_float(proto_trail.distance_fade_end(), state, &(this->distance_fade_end), &(this->distance_fade_end_is_set)); } if (proto_trail.distance_fade_start() != 0) { - proto_to_float(proto_trail.distance_fade_start(), &state, &(this->distance_fade_start), &(this->distance_fade_start_is_set)); + proto_to_float(proto_trail.distance_fade_start(), state, &(this->distance_fade_start), &(this->distance_fade_start_is_set)); } if (proto_trail.has_festival_filter()) { - proto_to_festival_filter(proto_trail.festival_filter(), &state, &(this->festival_filter), &(this->festival_filter_is_set)); + proto_to_festival_filter(proto_trail.festival_filter(), state, &(this->festival_filter), &(this->festival_filter_is_set)); } if (proto_trail.guid() != "") { - proto_to_unique_id(proto_trail.guid(), &state, &(this->guid), &(this->guid_is_set)); + proto_to_unique_id(proto_trail.guid(), state, &(this->guid), &(this->guid_is_set)); } if (proto_trail.is_wall() != 0) { - proto_to_bool(proto_trail.is_wall(), &state, &(this->is_wall), &(this->is_wall_is_set)); + proto_to_bool(proto_trail.is_wall(), state, &(this->is_wall), &(this->is_wall_is_set)); } if (proto_trail.map_display_size() != 0) { - proto_to_int(proto_trail.map_display_size(), &state, &(this->map_display_size), &(this->map_display_size_is_set)); + proto_to_int(proto_trail.map_display_size(), state, &(this->map_display_size), &(this->map_display_size_is_set)); } if (proto_trail.map_id() != 0) { - proto_to_int(proto_trail.map_id(), &state, &(this->map_id), &(this->map_id_is_set)); + proto_to_int(proto_trail.map_id(), state, &(this->map_id), &(this->map_id_is_set)); } if (proto_trail.has_map_type_filter()) { - proto_to_map_type_filter(proto_trail.map_type_filter(), &state, &(this->map_type_filter), &(this->map_type_filter_is_set)); + proto_to_map_type_filter(proto_trail.map_type_filter(), state, &(this->map_type_filter), &(this->map_type_filter_is_set)); } if (proto_trail.has_mount_filter()) { - proto_to_mount_filter(proto_trail.mount_filter(), &state, &(this->mount_filter), &(this->mount_filter_is_set)); + proto_to_mount_filter(proto_trail.mount_filter(), state, &(this->mount_filter), &(this->mount_filter_is_set)); } if (proto_trail.has_profession_filter()) { - proto_to_profession_filter(proto_trail.profession_filter(), &state, &(this->profession_filter), &(this->profession_filter_is_set)); + proto_to_profession_filter(proto_trail.profession_filter(), state, &(this->profession_filter), &(this->profession_filter_is_set)); } if (proto_trail.tentative__render_ingame() != 0) { - proto_to_bool(proto_trail.tentative__render_ingame(), &state, &(this->render_ingame), &(this->render_ingame_is_set)); + proto_to_bool(proto_trail.tentative__render_ingame(), state, &(this->render_ingame), &(this->render_ingame_is_set)); } if (proto_trail.tentative__render_on_map() != 0) { - proto_to_bool(proto_trail.tentative__render_on_map(), &state, &(this->render_on_map), &(this->render_on_map_is_set)); + proto_to_bool(proto_trail.tentative__render_on_map(), state, &(this->render_on_map), &(this->render_on_map_is_set)); } if (proto_trail.tentative__render_on_minimap() != 0) { - proto_to_bool(proto_trail.tentative__render_on_minimap(), &state, &(this->render_on_minimap), &(this->render_on_minimap_is_set)); + proto_to_bool(proto_trail.tentative__render_on_minimap(), state, &(this->render_on_minimap), &(this->render_on_minimap_is_set)); } if (proto_trail.bhdraft__schedule() != "") { - proto_to_string(proto_trail.bhdraft__schedule(), &state, &(this->schedule), &(this->schedule_is_set)); + proto_to_string(proto_trail.bhdraft__schedule(), state, &(this->schedule), &(this->schedule_is_set)); } if (proto_trail.bhdraft__schedule_duration() != 0) { - proto_to_float(proto_trail.bhdraft__schedule_duration(), &state, &(this->schedule_duration), &(this->schedule_duration_is_set)); + proto_to_float(proto_trail.bhdraft__schedule_duration(), state, &(this->schedule_duration), &(this->schedule_duration_is_set)); } if (proto_trail.has_specialization_filter()) { - proto_to_specialization_filter(proto_trail.specialization_filter(), &state, &(this->specialization_filter), &(this->specialization_filter_is_set)); + proto_to_specialization_filter(proto_trail.specialization_filter(), state, &(this->specialization_filter), &(this->specialization_filter_is_set)); } if (proto_trail.has_species_filter()) { - proto_to_species_filter(proto_trail.species_filter(), &state, &(this->species_filter), &(this->species_filter_is_set)); + proto_to_species_filter(proto_trail.species_filter(), state, &(this->species_filter), &(this->species_filter_is_set)); } if (proto_trail.has_texture_path()) { - proto_to_image(proto_trail.texture_path(), &state, &(this->texture), &(this->texture_is_set)); + proto_to_image(proto_trail.texture_path(), state, &(this->texture), &(this->texture_is_set)); } if (proto_trail.has_trail_data()) { - proto_to_trail_data(proto_trail.trail_data(), &state, &(this->trail_data), &(this->trail_data_is_set)); + proto_to_trail_data(proto_trail.trail_data(), state, &(this->trail_data), &(this->trail_data_is_set)); } if (proto_trail.scale() != 0) { - proto_to_float(proto_trail.scale(), &state, &(this->trail_scale), &(this->trail_scale_is_set)); + proto_to_float(proto_trail.scale(), state, &(this->trail_scale), &(this->trail_scale_is_set)); } } diff --git a/xml_converter/src/trail_gen.hpp b/xml_converter/src/trail_gen.hpp index 1340cd10..d10ea163 100644 --- a/xml_converter/src/trail_gen.hpp +++ b/xml_converter/src/trail_gen.hpp @@ -79,10 +79,10 @@ class Trail : public Parseable { bool texture_is_set = false; bool trail_data_is_set = false; bool trail_scale_is_set = false; - virtual std::vector as_xml() const; + virtual std::vector as_xml(XMLWriterState* state) const; virtual std::string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, XMLReaderState* state); - waypoint::Trail as_protobuf() const; - void parse_protobuf(waypoint::Trail proto_trail); + waypoint::Trail as_protobuf(ProtoWriterState* state) const; + void parse_protobuf(waypoint::Trail proto_trail, ProtoReaderState* state); bool validate_attributes_of_type_marker_category(); }; From 845b499347f86843b4fa492b25898760106fb941 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Fri, 29 Dec 2023 18:36:15 -0600 Subject: [PATCH 377/539] adding method of indexing filepaths from the proto --- xml_converter/doc/texture/icon.md | 2 +- xml_converter/doc/texture/texture.md | 2 +- xml_converter/generators/protobuf_types.py | 4 +-- .../proto_texture/markers.bin | Bin 0 -> 105 bytes .../expected_outputs/xml_texture/xml_file.xml | 11 ++++++ .../inputs/xml_texture/xml_file.xml | 11 ++++++ xml_converter/intigration_tests/testcases.py | 6 ++++ xml_converter/proto/waypoint.proto | 21 ++++++----- xml_converter/src/attribute/image.cpp | 33 ++++++++++++------ xml_converter/src/attribute/image.hpp | 13 +++---- xml_converter/src/icon_gen.cpp | 6 ++-- xml_converter/src/packaging_protobin.cpp | 33 +++++++++++++----- .../src/state_structs/proto_writer_state.cpp | 6 ++++ .../src/state_structs/proto_writer_state.hpp | 16 ++++++++- xml_converter/src/trail_gen.cpp | 6 ++-- 15 files changed, 125 insertions(+), 45 deletions(-) create mode 100644 xml_converter/intigration_tests/expected_outputs/proto_texture/markers.bin create mode 100644 xml_converter/intigration_tests/expected_outputs/xml_texture/xml_file.xml create mode 100644 xml_converter/intigration_tests/inputs/xml_texture/xml_file.xml create mode 100644 xml_converter/src/state_structs/proto_writer_state.cpp diff --git a/xml_converter/doc/texture/icon.md b/xml_converter/doc/texture/icon.md index 10666a3a..673549d7 100644 --- a/xml_converter/doc/texture/icon.md +++ b/xml_converter/doc/texture/icon.md @@ -5,7 +5,7 @@ class: Image applies_to: [Icon] xml_fields: [IconFile] uses_file_path: false -protobuf_field: texture_path +protobuf_field: texture_id --- The path to an image which contains the texture that will be present on an icon. diff --git a/xml_converter/doc/texture/texture.md b/xml_converter/doc/texture/texture.md index f96faf73..29fc0dd0 100644 --- a/xml_converter/doc/texture/texture.md +++ b/xml_converter/doc/texture/texture.md @@ -5,7 +5,7 @@ class: Image applies_to: [Trail] xml_fields: [Texture] uses_file_path: false -protobuf_field: texture_path +protobuf_field: texture_id --- The path to an image which contains the texture that will be present on a trail. diff --git a/xml_converter/generators/protobuf_types.py b/xml_converter/generators/protobuf_types.py index 691470fb..3f4abd0b 100644 --- a/xml_converter/generators/protobuf_types.py +++ b/xml_converter/generators/protobuf_types.py @@ -154,8 +154,8 @@ def get_proto_field_type(message: str, field: str) -> str: "float": "float", "int32": "int", "int64": "long", - "uint32": "int", - "uint64": "long", + "uint32": "unsigned int", + "uint64": "unsigned long", "sint32": "int", "sint64": "long", "fixed32": "int", diff --git a/xml_converter/intigration_tests/expected_outputs/proto_texture/markers.bin b/xml_converter/intigration_tests/expected_outputs/proto_texture/markers.bin new file mode 100644 index 0000000000000000000000000000000000000000..ef56f99965e4e270aadd3d20ff1d553c01503e9f GIT binary patch literal 105 zcmd;5<>L0ORB%o#Nlni$s+3|8U{o*yl1yNdS;0sNEF#1pB*4X&TNz)HT2WG3l&V*d emo6m8#g7m%0t-oUi5KVRrlw>T=_90!K~ezbBOERO literal 0 HcmV?d00001 diff --git a/xml_converter/intigration_tests/expected_outputs/xml_texture/xml_file.xml b/xml_converter/intigration_tests/expected_outputs/xml_texture/xml_file.xml new file mode 100644 index 00000000..516a1d0e --- /dev/null +++ b/xml_converter/intigration_tests/expected_outputs/xml_texture/xml_file.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/xml_converter/intigration_tests/inputs/xml_texture/xml_file.xml b/xml_converter/intigration_tests/inputs/xml_texture/xml_file.xml new file mode 100644 index 00000000..490a4897 --- /dev/null +++ b/xml_converter/intigration_tests/inputs/xml_texture/xml_file.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/xml_converter/intigration_tests/testcases.py b/xml_converter/intigration_tests/testcases.py index c7476af3..1a906c72 100644 --- a/xml_converter/intigration_tests/testcases.py +++ b/xml_converter/intigration_tests/testcases.py @@ -137,4 +137,10 @@ class Testcase: expected_output_xml_path="./expected_outputs/xml_species_filter", expected_output_proto_path="./expected_outputs/proto_species_filter", ), + Testcase( + name="texture", + xml_input_paths=["./inputs/xml_texture"], + expected_output_xml_path="./expected_outputs/xml_texture", + expected_output_proto_path="./expected_outputs/proto_texture", + ), ] diff --git a/xml_converter/proto/waypoint.proto b/xml_converter/proto/waypoint.proto index 5886fd29..d845d80b 100644 --- a/xml_converter/proto/waypoint.proto +++ b/xml_converter/proto/waypoint.proto @@ -4,6 +4,15 @@ package waypoint; message Waypoint { repeated Category category = 1; + repeated TextureData textures = 2; +} + +message TextureData { + string filepath = 1; + // repeated string tags = 2; + // bytes filehash = 3; + // // Maybe useful for approximation or for loading in a base color on meshes before the texture data is ready + // RGBAColor approximate_color = 4; } message Category { @@ -17,7 +26,7 @@ message Category { } message Icon { - TexturePath texture_path = 2; + uint32 texture_id = 2; bytes guid = 3; int32 map_id = 4; float distance_fade_end = 5; @@ -57,7 +66,7 @@ message Icon { } message Trail { - TexturePath texture_path = 2; + uint32 texture_id = 2; bytes guid = 3; int32 map_id = 4; float distance_fade_end = 5; @@ -89,15 +98,11 @@ message Trail { // TODO: Delete this when we can parse data per marker instead of per field bool category = 2054; } - -message TexturePath { - string path = 1; -} -message RGBAColor{ +message RGBAColor { int32 rgba_color = 1; } - + message Position { float x = 1; float y = 2; diff --git a/xml_converter/src/attribute/image.cpp b/xml_converter/src/attribute/image.cpp index f225ce5b..6c0f179e 100644 --- a/xml_converter/src/attribute/image.cpp +++ b/xml_converter/src/attribute/image.cpp @@ -21,7 +21,8 @@ void xml_attribute_to_image( XMLReaderState* state, Image* value, bool* is_set) { - value->path = get_attribute_value(input); + value->filename = get_attribute_value(input); + value->original_filepath = state->xml_filedir + "/" + value->filename; *is_set = true; } @@ -34,7 +35,7 @@ string image_to_xml_attribute( const string& attribute_name, XMLWriterState* state, const Image* value) { - return " " + attribute_name + "=\"" + value->path + "\""; + return " " + attribute_name + "=\"" + value->filename + "\""; } //////////////////////////////////////////////////////////////////////////////// @@ -43,12 +44,13 @@ string image_to_xml_attribute( // Parses an Image from proto //////////////////////////////////////////////////////////////////////////////// void proto_to_image( - waypoint::TexturePath input, + unsigned int input, ProtoReaderState* state, Image* value, bool* is_set) { + // TODO: this is broken until we load the string index into the proto read state Image image; - image.path = input.path(); + // image.path = input.path(); *value = image; *is_set = true; } @@ -56,13 +58,24 @@ void proto_to_image( //////////////////////////////////////////////////////////////////////////////// // image_to_proto // -// Writes a string filepath to a proto using the provided setter function. +// Creates a new element of the proto writer state if the image has not been +// used before. Then writes the new or existing index of the image to the proto. //////////////////////////////////////////////////////////////////////////////// void image_to_proto( - Image value, + const Image& value, ProtoWriterState* state, - std::function setter) { - waypoint::TexturePath* texture = new waypoint::TexturePath(); - texture->set_path(value.path); - setter(texture); + std::function setter) { + // Get the texture index or create a new one + uint32_t texture_index = 0; + auto file_map_lookup = state->texture_path_to_textures_index.find(value.original_filepath); + if (file_map_lookup != state->texture_path_to_textures_index.end()) { + texture_index = file_map_lookup->second; + } + else { + texture_index = state->textures.size(); + state->texture_path_to_textures_index[value.original_filepath] = texture_index; + state->textures.push_back(&value); + } + + setter(texture_index); } diff --git a/xml_converter/src/attribute/image.hpp b/xml_converter/src/attribute/image.hpp index f1705a4a..273e9306 100644 --- a/xml_converter/src/attribute/image.hpp +++ b/xml_converter/src/attribute/image.hpp @@ -12,13 +12,10 @@ class XMLError; -namespace waypoint { -class TexturePath; -} - class Image { public: - std::string path; + std::string filename; + std::string original_filepath; }; void xml_attribute_to_image( @@ -34,12 +31,12 @@ std::string image_to_xml_attribute( const Image* value); void proto_to_image( - waypoint::TexturePath input, + unsigned int input, ProtoReaderState* state, Image* value, bool* is_set); void image_to_proto( - Image value, + const Image& value, ProtoWriterState* state, - std::function setter); + std::function setter); diff --git a/xml_converter/src/icon_gen.cpp b/xml_converter/src/icon_gen.cpp index 31a81079..36c0fbe3 100644 --- a/xml_converter/src/icon_gen.cpp +++ b/xml_converter/src/icon_gen.cpp @@ -489,7 +489,7 @@ waypoint::Icon Icon::as_protobuf(ProtoWriterState* state) const { marker_category_to_proto(this->hide_category, state, setter); } if (this->icon_is_set) { - std::function setter = [&proto_icon](waypoint::TexturePath* val) { proto_icon.set_allocated_texture_path(val); }; + std::function setter = [&proto_icon](unsigned int val) { proto_icon.set_texture_id(val); }; image_to_proto(this->icon, state, setter); } if (this->icon_size_is_set) { @@ -660,8 +660,8 @@ void Icon::parse_protobuf(waypoint::Icon proto_icon, ProtoReaderState* state) { if (proto_icon.trigger().has_action_hide_category()) { proto_to_marker_category(proto_icon.trigger().action_hide_category(), state, &(this->hide_category), &(this->hide_category_is_set)); } - if (proto_icon.has_texture_path()) { - proto_to_image(proto_icon.texture_path(), state, &(this->icon), &(this->icon_is_set)); + if (proto_icon.texture_id() != 0) { + proto_to_image(proto_icon.texture_id(), state, &(this->icon), &(this->icon_is_set)); } if (proto_icon.tentative__scale() != 0) { proto_to_float(proto_icon.tentative__scale(), state, &(this->icon_size), &(this->icon_size_is_set)); diff --git a/xml_converter/src/packaging_protobin.cpp b/xml_converter/src/packaging_protobin.cpp index 8ab96bf7..42f5dd81 100644 --- a/xml_converter/src/packaging_protobin.cpp +++ b/xml_converter/src/packaging_protobin.cpp @@ -87,10 +87,9 @@ MaybeCategory build_category_objects( const Category* category, const StringHierarchy& category_filter, const std::map>& category_to_pois, - vector* category_vector) { - ProtoWriterState state; - - waypoint::Category category_proto = category->as_protobuf(&state); + vector* category_vector, + ProtoWriterState* state) { + waypoint::Category category_proto = category->as_protobuf(state); bool has_valid_contents = false; vector categories_to_write; @@ -104,7 +103,8 @@ MaybeCategory build_category_objects( &it->second, category_filter, category_to_pois, - category_vector); + category_vector, + state); if (child_category.is_category) { has_valid_contents = true; @@ -124,14 +124,14 @@ MaybeCategory build_category_objects( if (parsed_poi->classname() == "POI") { Icon* icon = dynamic_cast(parsed_poi); if (category_filter.in_hierarchy(split(icon->category.category, "."))) { - category_proto.add_icon()->MergeFrom(icon->as_protobuf(&state)); + category_proto.add_icon()->MergeFrom(icon->as_protobuf(state)); has_valid_contents = true; } } else if (parsed_poi->classname() == "Trail") { Trail* trail = dynamic_cast(parsed_poi); if (category_filter.in_hierarchy(split(trail->category.category, "."))) { - category_proto.add_trail()->MergeFrom(trail->as_protobuf(&state)); + category_proto.add_trail()->MergeFrom(trail->as_protobuf(state)); has_valid_contents = true; } } @@ -147,6 +147,18 @@ MaybeCategory build_category_objects( return return_value; } +void proto_post_processing(ProtoWriterState* state, waypoint::Waypoint* proto) { + if (state->textures.size() > 1) { + // Handle the 0th index null value independently. + proto->add_textures(); + + for (size_t i = 1; i < state->textures.size(); i++) { + waypoint::TextureData* texture_data = proto->add_textures(); + texture_data->set_filepath(state->textures[i]->filename); + } + } +} + void _write_protobuf_file( const string& filepath, const StringHierarchy& category_filter, @@ -155,6 +167,8 @@ void _write_protobuf_file( ofstream outfile; outfile.open(filepath, ios::out | ios::binary); + ProtoWriterState state; + if (!outfile.is_open()) { cout << "Unable to open " << filepath << endl; } @@ -170,13 +184,16 @@ void _write_protobuf_file( category_object, category_filter, category_to_pois, - &category_vector); + &category_vector, + &state); if (maybe_category.is_category) { output_message.add_category()->MergeFrom(maybe_category.category); } } + proto_post_processing(&state, &output_message); + output_message.SerializeToOstream(&outfile); outfile.close(); } diff --git a/xml_converter/src/state_structs/proto_writer_state.cpp b/xml_converter/src/state_structs/proto_writer_state.cpp new file mode 100644 index 00000000..c4960ac2 --- /dev/null +++ b/xml_converter/src/state_structs/proto_writer_state.cpp @@ -0,0 +1,6 @@ +#include "proto_writer_state.hpp" + +ProtoWriterState::ProtoWriterState() { + // Push back a "null" first element indicating "no texture" that can be accessed with index 0. + this->textures.push_back(nullptr); +} diff --git a/xml_converter/src/state_structs/proto_writer_state.hpp b/xml_converter/src/state_structs/proto_writer_state.hpp index 0570731d..d7817037 100644 --- a/xml_converter/src/state_structs/proto_writer_state.hpp +++ b/xml_converter/src/state_structs/proto_writer_state.hpp @@ -1,4 +1,18 @@ #pragma once -struct ProtoWriterState { +#include +#include +#include + +class Image; + +class ProtoWriterState { + public: + // A map from texture path to the index within "textures" that the path is saved in. + std::map texture_path_to_textures_index; + + // A list of all of the textures with their paths. + std::vector textures; + + ProtoWriterState(); }; diff --git a/xml_converter/src/trail_gen.cpp b/xml_converter/src/trail_gen.cpp index 1aadd397..d5c1e681 100644 --- a/xml_converter/src/trail_gen.cpp +++ b/xml_converter/src/trail_gen.cpp @@ -343,7 +343,7 @@ waypoint::Trail Trail::as_protobuf(ProtoWriterState* state) const { species_filter_to_proto(this->species_filter, state, setter); } if (this->texture_is_set) { - std::function setter = [&proto_trail](waypoint::TexturePath* val) { proto_trail.set_allocated_texture_path(val); }; + std::function setter = [&proto_trail](unsigned int val) { proto_trail.set_texture_id(val); }; image_to_proto(this->texture, state, setter); } if (this->trail_data_is_set) { @@ -430,8 +430,8 @@ void Trail::parse_protobuf(waypoint::Trail proto_trail, ProtoReaderState* state) if (proto_trail.has_species_filter()) { proto_to_species_filter(proto_trail.species_filter(), state, &(this->species_filter), &(this->species_filter_is_set)); } - if (proto_trail.has_texture_path()) { - proto_to_image(proto_trail.texture_path(), state, &(this->texture), &(this->texture_is_set)); + if (proto_trail.texture_id() != 0) { + proto_to_image(proto_trail.texture_id(), state, &(this->texture), &(this->texture_is_set)); } if (proto_trail.has_trail_data()) { proto_to_trail_data(proto_trail.trail_data(), state, &(this->trail_data), &(this->trail_data_is_set)); From 32a53f856eeaacef1ebe8a60b41c22c2b5e6cd7e Mon Sep 17 00:00:00 2001 From: klingbolt Date: Fri, 17 Nov 2023 15:15:02 -0500 Subject: [PATCH 378/539] Call xml converter from Godot --- Icon.gd | 1 + Route.gd | 1 + Spatial.gd | 11 +++-- Spatial.tscn | 124 ++++++++++++++++++++++++++++++++++++++------------- 4 files changed, 101 insertions(+), 36 deletions(-) diff --git a/Icon.gd b/Icon.gd index 1cd9164c..cc171b55 100644 --- a/Icon.gd +++ b/Icon.gd @@ -4,6 +4,7 @@ const Waypoint = preload("res://waypoint.gd") var texture_path var waypoint: Waypoint.Icon +var category: TreeItem func set_icon_image(texture_path: String): self.texture_path = texture_path diff --git a/Route.gd b/Route.gd index 392b2ffd..24717e1e 100644 --- a/Route.gd +++ b/Route.gd @@ -5,6 +5,7 @@ const Waypoint = preload("res://waypoint.gd") var texture_path var color = Color(0.9, 0.1, 0.1) var waypoint: Waypoint.Trail +var category: TreeItem var point_list := PoolVector3Array() diff --git a/Spatial.gd b/Spatial.gd index 25350832..35f37c80 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -53,6 +53,7 @@ const path2d_scene = preload("res://Route2D.tscn") const gizmo_scene = preload("res://Gizmo/PointEdit.tscn") const CategoryData = preload("res://CategoryData.gd") const Waypoint = preload("res://waypoint.gd") +const PackDialog = preload("res://PackDialog.gd") ##########Node Connections########### onready var markers_ui := $Control/Dialogs/CategoriesDialog/MarkersUI as Tree @@ -83,6 +84,8 @@ func _ready(): if (Settings.burrito_link_auto_launch_enabled): launch_burrito_link() + + ################################################################################ @@ -634,7 +637,6 @@ func gen_new_icon(position: Vector3, texture_path: String, waypoint_icon, catego var category_data = category_item.get_metadata(0) category_data.category3d.add_icon(new_icon) - # This function take all of the currently rendered objects and converts it into # the data format that is saved/loaded from. func data_from_renderview(): @@ -744,9 +746,6 @@ func _on_main_menu_toggle_pressed(): $Control/Dialogs/MainMenu.show() set_maximal_mouse_block() -func _on_FileDialog_file_selected(path): - pass - func _on_Dialog_hide(): for dialog in $Control/Dialogs.get_children(): if dialog.visible: @@ -929,3 +928,7 @@ func _on_MarkersUI_item_edited(): var category_item = self.markers_ui.get_edited() apply_category_visibility_to_nodes(category_item) + +func _on_ImportPath_pressed(): + $Control/Dialogs/FileDialog.show() + diff --git a/Spatial.tscn b/Spatial.tscn index a661e21b..7913cb03 100644 --- a/Spatial.tscn +++ b/Spatial.tscn @@ -13,6 +13,7 @@ [ext_resource path="res://SettingsDialog.gd" type="Script" id=12] [ext_resource path="res://Category3D.gd" type="Script" id=13] [ext_resource path="res://Category2D.gd" type="Script" id=15] +[ext_resource path="res://PackDialog.gd" type="Script" id=14] [sub_resource type="Shader" id=1] code = "shader_type canvas_item; @@ -183,20 +184,48 @@ __meta__ = { } [node name="FileDialog" type="FileDialog" parent="Control/Dialogs"] -margin_left = 636.0 -margin_top = 174.0 -margin_right = 1307.0 -margin_bottom = 672.0 -window_title = "Open a File" -mode = 0 -access = 1 -current_dir = "user://" -current_path = "user://" +visible = true +margin_left = 312.0 +margin_top = 82.0 +margin_right = 983.0 +margin_bottom = 580.0 +window_title = "Open a Directory" +mode = 2 +access = 2 +current_dir = "/home/steph/Desktop/Packs" +current_path = "/home/steph/Desktop/Packs/" +script = ExtResource( 13 ) +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="WindowDialog" type="WindowDialog" parent="Control/Dialogs/FileDialog"] +visible = true +margin_left = 108.0 +margin_top = 169.0 +margin_right = 708.0 +margin_bottom = 419.0 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="ScrollContainer" type="ScrollContainer" parent="Control/Dialogs/FileDialog/WindowDialog"] +margin_right = 600.0 +margin_bottom = 250.0 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="Label" type="Label" parent="Control/Dialogs/FileDialog/WindowDialog/ScrollContainer"] +margin_right = 100.0 +margin_bottom = 100.0 +rect_min_size = Vector2( 100, 100 ) __meta__ = { "_edit_use_anchors_": false } [node name="MainMenu" type="WindowDialog" parent="Control/Dialogs"] +visible = true margin_left = 48.0 margin_top = 82.0 margin_right = 268.0 @@ -217,51 +246,72 @@ __meta__ = { [node name="VBoxContainer" type="VBoxContainer" parent="Control/Dialogs/MainMenu/ScrollContainer"] margin_right = 220.0 -margin_bottom = 284.0 +margin_bottom = 368.0 size_flags_horizontal = 3 [node name="LoadPath" type="Button" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] margin_right = 220.0 margin_bottom = 40.0 rect_min_size = Vector2( 0, 40 ) -text = "Open Markers File" +text = "Toggle Marker Visibility" -[node name="SavePath" type="Button" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] +[node name="HSeparator5" type="HSeparator" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] margin_top = 44.0 margin_right = 220.0 -margin_bottom = 84.0 +margin_bottom = 48.0 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="ImportPath" type="Button" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] +margin_top = 52.0 +margin_right = 220.0 +margin_bottom = 72.0 +text = "Import Marker Pack" + +[node name="HSeparator6" type="HSeparator" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] +margin_top = 76.0 +margin_right = 220.0 +margin_bottom = 80.0 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="SavePath" type="Button" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] +margin_top = 84.0 +margin_right = 220.0 +margin_bottom = 124.0 rect_min_size = Vector2( 0, 40 ) text = "Save Markers File" [node name="HSeparator" type="HSeparator" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] -margin_top = 88.0 +margin_top = 128.0 margin_right = 220.0 -margin_bottom = 92.0 +margin_bottom = 132.0 [node name="PointEditor" type="Button" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] -visible = false -margin_top = 96.0 -margin_right = 213.0 -margin_bottom = 136.0 +margin_top = 136.0 +margin_right = 220.0 +margin_bottom = 176.0 rect_min_size = Vector2( 0, 40 ) text = "Editor Panel" [node name="OpenEditorQuickPanel" type="Button" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] -margin_top = 96.0 +margin_top = 180.0 margin_right = 220.0 -margin_bottom = 136.0 +margin_bottom = 220.0 rect_min_size = Vector2( 0, 40 ) text = "Editor Panel" [node name="HSeparator3" type="HSeparator" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] -margin_top = 140.0 +margin_top = 224.0 margin_right = 220.0 -margin_bottom = 144.0 +margin_bottom = 228.0 [node name="Ranges" type="Button" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] -margin_top = 148.0 +margin_top = 232.0 margin_right = 220.0 -margin_bottom = 188.0 +margin_bottom = 272.0 rect_min_size = Vector2( 0, 40 ) text = "Range Indicators" @@ -282,14 +332,14 @@ rect_min_size = Vector2( 0, 40 ) text = "Guacamole Script Editor" [node name="HSeparator4" type="HSeparator" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] -margin_top = 192.0 +margin_top = 276.0 margin_right = 220.0 -margin_bottom = 196.0 +margin_bottom = 280.0 [node name="Settings" type="Button" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] -margin_top = 200.0 +margin_top = 284.0 margin_right = 220.0 -margin_bottom = 240.0 +margin_bottom = 324.0 rect_min_size = Vector2( 0, 40 ) text = "Settings" @@ -315,9 +365,9 @@ margin_bottom = 284.0 text = "Active Path" [node name="ExitButton" type="Button" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] -margin_top = 244.0 +margin_top = 328.0 margin_right = 220.0 -margin_bottom = 284.0 +margin_bottom = 368.0 rect_min_size = Vector2( 0, 40 ) text = "Exit Burrito" @@ -863,6 +913,7 @@ color = Color( 0, 0, 0, 1 ) [node name="Paths" type="Spatial" parent="."] [node name="Icons" type="Spatial" parent="."] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.106085, 0, 0 ) [node name="FeetLocation" type="Spatial" parent="."] @@ -870,6 +921,13 @@ color = Color( 0, 0, 0, 1 ) mesh = SubResource( 3 ) material/0 = SubResource( 4 ) +[node name="Control2" type="Control" parent="."] +margin_right = 40.0 +margin_bottom = 40.0 +__meta__ = { +"_edit_use_anchors_": false +} + [connection signal="pressed" from="Control/GlobalMenuButton/main_menu_toggle" to="." method="_on_main_menu_toggle_pressed"] [connection signal="pressed" from="Control/GlobalMenuButton/EditorQuckPanel/HBoxContainer/CloseEditorQuickPanel" to="." method="_on_CloseEditorQuickPanel_pressed"] [connection signal="pressed" from="Control/GlobalMenuButton/EditorQuckPanel/HBoxContainer/ChangeTexture" to="." method="_on_ChangeTexture_pressed"] @@ -877,10 +935,12 @@ material/0 = SubResource( 4 ) [connection signal="pressed" from="Control/GlobalMenuButton/EditorQuckPanel/HBoxContainer/NewPathPoint" to="." method="_on_NewPathPoint_pressed"] [connection signal="pressed" from="Control/GlobalMenuButton/EditorQuckPanel/HBoxContainer/NewIcon" to="." method="_on_NewIcon_pressed"] [connection signal="pressed" from="Control/GlobalMenuButton/EditorQuckPanel/HBoxContainer/AdjustPoints" to="." method="_on_AdjustNodesButton_pressed"] -[connection signal="file_selected" from="Control/Dialogs/FileDialog" to="." method="_on_FileDialog_file_selected"] +[connection signal="dir_selected" from="Control/Dialogs/FileDialog" to="Control/Dialogs/FileDialog" method="_on_FileDialog_dir_selected"] +[connection signal="file_selected" from="Control/Dialogs/FileDialog" to="Control/Dialogs/FileDialog" method="_on_FileDialog_file_selected"] [connection signal="hide" from="Control/Dialogs/FileDialog" to="." method="_on_Dialog_hide"] [connection signal="hide" from="Control/Dialogs/MainMenu" to="." method="_on_Dialog_hide"] [connection signal="pressed" from="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer/LoadPath" to="." method="_on_LoadPath_pressed"] +[connection signal="pressed" from="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer/ImportPath" to="." method="_on_ImportPath_pressed"] [connection signal="pressed" from="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer/SavePath" to="." method="_on_SavePath_pressed"] [connection signal="pressed" from="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer/OpenEditorQuickPanel" to="." method="_on_OpenEditorQuickPanel_pressed"] [connection signal="pressed" from="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer/Ranges" to="." method="_on_RangesButton_pressed"] From 428b7d049aa4bfb54fc20e9ea20949894106dbf2 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sat, 30 Dec 2023 04:38:26 -0600 Subject: [PATCH 379/539] reorganizing tests --- xml_converter/intigration_tests/make_test.sh | 21 +++ xml_converter/intigration_tests/run_tests.py | 6 +- .../{ => src}/proto_utils.py | 0 .../intigration_tests/src/testcase_loader.py | 129 +++++++++++++++ .../input/pack}/xml_file.xml | 0 .../output_proto}/markers.bin | Bin .../output_xml}/xml_file.xml | 0 .../achievement_bitmask_valid/testcase.yaml | 5 + .../achievement_id/input/pack}/xml_file.xml | 0 .../achievement_id/output_proto}/markers.bin | 0 .../achievement_id/output_xml}/xml_file.xml | 0 .../test_cases/achievement_id/testcase.yaml | 5 + .../animation_speed/input/pack}/trail.trl | Bin .../animation_speed/input/pack}/xml_file.xml | 0 .../animation_speed/output_proto}/markers.bin | Bin .../output_xml/temp_name_of_trail.trl | Bin 0 -> 44 bytes .../animation_speed/output_xml}/xml_file.xml | 0 .../test_cases/animation_speed/testcase.yaml | 5 + .../canfade_invalid/input/pack}/xml_file.xml | 0 .../canfade_invalid/output_proto}/markers.bin | 0 .../canfade_invalid/output_xml}/xml_file.xml | 0 .../test_cases/canfade_invalid/testcase.yaml | 13 ++ .../canfade_valid/input/pack}/xml_file.xml | 0 .../canfade_valid/output_proto}/markers.bin | 0 .../canfade_valid/output_xml}/xml_file.xml | 0 .../test_cases/canfade_valid/testcase.yaml | 5 + .../cull_chirality/input/pack}/xml_file.xml | 0 .../cull_chirality/output_proto}/markers.bin | 0 .../cull_chirality/output_xml}/xml_file.xml | 0 .../test_cases/cull_chirality/testcase.yaml | 5 + .../fade_distance/input/pack}/xml_file.xml | 0 .../fade_distance/output_proto}/markers.bin | Bin .../fade_distance/output_xml}/xml_file.xml | 0 .../test_cases/fade_distance/testcase.yaml | 5 + .../festival_filter/input/pack}/xml_file.xml | 0 .../festival_filter/output_proto}/markers.bin | 0 .../festival_filter/output_xml}/xml_file.xml | 0 .../test_cases/festival_filter/testcase.yaml | 5 + .../is_wall/input/pack}/xml_file.xml | 0 .../is_wall/output_proto}/markers.bin | 0 .../is_wall/output_xml}/xml_file.xml | 0 .../test_cases/is_wall/testcase.yaml | 5 + .../map_id/input/pack}/xml_file.xml | 0 .../map_id/output_proto}/markers.bin | 0 .../map_id/output_xml}/xml_file.xml | 0 .../test_cases/map_id/testcase.yaml | 5 + .../map_type_filter/input/pack}/xml_file.xml | 0 .../map_type_filter/output_proto}/markers.bin | 0 .../map_type_filter/output_xml}/xml_file.xml | 0 .../test_cases/map_type_filter/testcase.yaml | 5 + .../input/pack}/xml_file.xml | 0 .../output_proto}/markers.bin | 0 .../output_xml}/xml_file.xml | 0 .../mount_filter_invalid/testcase.yaml | 21 +++ .../input/pack}/xml_file.xml | 0 .../output_proto}/markers.bin | 0 .../output_xml}/xml_file.xml | 0 .../mountfilter_valid/testcase.yaml | 5 + .../input/pack}/xml_file.xml | 0 .../output_proto}/markers.bin | 0 .../output_xml}/xml_file.xml | 0 .../profession_filter/testcase.yaml | 5 + .../input/pack}/xml_file.xml | 0 .../output_proto}/markers.bin | 0 .../output_xml}/xml_file.xml | 0 .../specialization_filter/testcase.yaml | 5 + .../species_filter/input/pack}/xml_file.xml | 0 .../species_filter/output_proto}/markers.bin | 0 .../species_filter/output_xml}/xml_file.xml | 0 .../test_cases/species_filter/testcase.yaml | 5 + .../texture/input/pack}/xml_file.xml | 0 .../texture/output_proto}/markers.bin | Bin .../texture/output_xml}/xml_file.xml | 0 .../test_cases/texture/testcase.yaml | 5 + xml_converter/intigration_tests/testcases.py | 152 ------------------ .../{generators => }/requirements.txt | 0 76 files changed, 262 insertions(+), 155 deletions(-) create mode 100755 xml_converter/intigration_tests/make_test.sh rename xml_converter/intigration_tests/{ => src}/proto_utils.py (100%) create mode 100644 xml_converter/intigration_tests/src/testcase_loader.py rename xml_converter/intigration_tests/{inputs/xml_achievement_bitmask_valid => test_cases/achievement_bitmask_valid/input/pack}/xml_file.xml (100%) rename xml_converter/intigration_tests/{expected_outputs/proto_achievement_bitmask_valid => test_cases/achievement_bitmask_valid/output_proto}/markers.bin (100%) rename xml_converter/intigration_tests/{expected_outputs/xml_achievement_bitmask_valid => test_cases/achievement_bitmask_valid/output_xml}/xml_file.xml (100%) create mode 100644 xml_converter/intigration_tests/test_cases/achievement_bitmask_valid/testcase.yaml rename xml_converter/intigration_tests/{inputs/xml_achievement_id => test_cases/achievement_id/input/pack}/xml_file.xml (100%) rename xml_converter/intigration_tests/{expected_outputs/proto_achievement_id => test_cases/achievement_id/output_proto}/markers.bin (100%) rename xml_converter/intigration_tests/{expected_outputs/xml_achievement_id => test_cases/achievement_id/output_xml}/xml_file.xml (100%) create mode 100644 xml_converter/intigration_tests/test_cases/achievement_id/testcase.yaml rename xml_converter/intigration_tests/{inputs/xml_animation_speed => test_cases/animation_speed/input/pack}/trail.trl (100%) rename xml_converter/intigration_tests/{inputs/xml_animation_speed => test_cases/animation_speed/input/pack}/xml_file.xml (100%) rename xml_converter/intigration_tests/{expected_outputs/proto_animation_speed => test_cases/animation_speed/output_proto}/markers.bin (100%) create mode 100644 xml_converter/intigration_tests/test_cases/animation_speed/output_xml/temp_name_of_trail.trl rename xml_converter/intigration_tests/{expected_outputs/xml_animation_speed => test_cases/animation_speed/output_xml}/xml_file.xml (100%) create mode 100644 xml_converter/intigration_tests/test_cases/animation_speed/testcase.yaml rename xml_converter/intigration_tests/{inputs/xml_can_fade_invalid => test_cases/canfade_invalid/input/pack}/xml_file.xml (100%) rename xml_converter/intigration_tests/{expected_outputs/proto_can_fade_invalid => test_cases/canfade_invalid/output_proto}/markers.bin (100%) rename xml_converter/intigration_tests/{expected_outputs/xml_can_fade_invalid => test_cases/canfade_invalid/output_xml}/xml_file.xml (100%) create mode 100644 xml_converter/intigration_tests/test_cases/canfade_invalid/testcase.yaml rename xml_converter/intigration_tests/{inputs/xml_can_fade_valid => test_cases/canfade_valid/input/pack}/xml_file.xml (100%) rename xml_converter/intigration_tests/{expected_outputs/proto_can_fade_valid => test_cases/canfade_valid/output_proto}/markers.bin (100%) rename xml_converter/intigration_tests/{expected_outputs/xml_can_fade_valid => test_cases/canfade_valid/output_xml}/xml_file.xml (100%) create mode 100644 xml_converter/intigration_tests/test_cases/canfade_valid/testcase.yaml rename xml_converter/intigration_tests/{inputs/xml_cull_chirality => test_cases/cull_chirality/input/pack}/xml_file.xml (100%) rename xml_converter/intigration_tests/{expected_outputs/proto_cull_chirality => test_cases/cull_chirality/output_proto}/markers.bin (100%) rename xml_converter/intigration_tests/{expected_outputs/xml_cull_chirality => test_cases/cull_chirality/output_xml}/xml_file.xml (100%) create mode 100644 xml_converter/intigration_tests/test_cases/cull_chirality/testcase.yaml rename xml_converter/intigration_tests/{inputs/xml_fade => test_cases/fade_distance/input/pack}/xml_file.xml (100%) rename xml_converter/intigration_tests/{expected_outputs/proto_fade => test_cases/fade_distance/output_proto}/markers.bin (100%) rename xml_converter/intigration_tests/{expected_outputs/xml_fade => test_cases/fade_distance/output_xml}/xml_file.xml (100%) create mode 100644 xml_converter/intigration_tests/test_cases/fade_distance/testcase.yaml rename xml_converter/intigration_tests/{inputs/xml_festival_filter => test_cases/festival_filter/input/pack}/xml_file.xml (100%) rename xml_converter/intigration_tests/{expected_outputs/proto_festival_filter => test_cases/festival_filter/output_proto}/markers.bin (100%) rename xml_converter/intigration_tests/{expected_outputs/xml_festival_filter => test_cases/festival_filter/output_xml}/xml_file.xml (100%) create mode 100644 xml_converter/intigration_tests/test_cases/festival_filter/testcase.yaml rename xml_converter/intigration_tests/{inputs/xml_is_wall => test_cases/is_wall/input/pack}/xml_file.xml (100%) rename xml_converter/intigration_tests/{expected_outputs/proto_is_wall => test_cases/is_wall/output_proto}/markers.bin (100%) rename xml_converter/intigration_tests/{expected_outputs/xml_is_wall => test_cases/is_wall/output_xml}/xml_file.xml (100%) create mode 100644 xml_converter/intigration_tests/test_cases/is_wall/testcase.yaml rename xml_converter/intigration_tests/{inputs/xml_map_id => test_cases/map_id/input/pack}/xml_file.xml (100%) rename xml_converter/intigration_tests/{expected_outputs/proto_map_id => test_cases/map_id/output_proto}/markers.bin (100%) rename xml_converter/intigration_tests/{expected_outputs/xml_map_id => test_cases/map_id/output_xml}/xml_file.xml (100%) create mode 100644 xml_converter/intigration_tests/test_cases/map_id/testcase.yaml rename xml_converter/intigration_tests/{inputs/xml_map_type_filter => test_cases/map_type_filter/input/pack}/xml_file.xml (100%) rename xml_converter/intigration_tests/{expected_outputs/proto_map_type_filter => test_cases/map_type_filter/output_proto}/markers.bin (100%) rename xml_converter/intigration_tests/{expected_outputs/xml_map_type_filter => test_cases/map_type_filter/output_xml}/xml_file.xml (100%) create mode 100644 xml_converter/intigration_tests/test_cases/map_type_filter/testcase.yaml rename xml_converter/intigration_tests/{inputs/xml_mount_filter_invalid => test_cases/mount_filter_invalid/input/pack}/xml_file.xml (100%) rename xml_converter/intigration_tests/{expected_outputs/proto_mount_filter_invalid => test_cases/mount_filter_invalid/output_proto}/markers.bin (100%) rename xml_converter/intigration_tests/{expected_outputs/xml_mount_filter_invalid => test_cases/mount_filter_invalid/output_xml}/xml_file.xml (100%) create mode 100644 xml_converter/intigration_tests/test_cases/mount_filter_invalid/testcase.yaml rename xml_converter/intigration_tests/{inputs/xml_mount_filter_valid => test_cases/mountfilter_valid/input/pack}/xml_file.xml (100%) rename xml_converter/intigration_tests/{expected_outputs/proto_mount_filter_valid => test_cases/mountfilter_valid/output_proto}/markers.bin (100%) rename xml_converter/intigration_tests/{expected_outputs/xml_mount_filter_valid => test_cases/mountfilter_valid/output_xml}/xml_file.xml (100%) create mode 100644 xml_converter/intigration_tests/test_cases/mountfilter_valid/testcase.yaml rename xml_converter/intigration_tests/{inputs/xml_profession_filter => test_cases/profession_filter/input/pack}/xml_file.xml (100%) rename xml_converter/intigration_tests/{expected_outputs/proto_profession_filter => test_cases/profession_filter/output_proto}/markers.bin (100%) rename xml_converter/intigration_tests/{expected_outputs/xml_profession_filter => test_cases/profession_filter/output_xml}/xml_file.xml (100%) create mode 100644 xml_converter/intigration_tests/test_cases/profession_filter/testcase.yaml rename xml_converter/intigration_tests/{inputs/xml_specialization_filter => test_cases/specialization_filter/input/pack}/xml_file.xml (100%) rename xml_converter/intigration_tests/{expected_outputs/proto_specialization_filter => test_cases/specialization_filter/output_proto}/markers.bin (100%) rename xml_converter/intigration_tests/{expected_outputs/xml_specialization_filter => test_cases/specialization_filter/output_xml}/xml_file.xml (100%) create mode 100644 xml_converter/intigration_tests/test_cases/specialization_filter/testcase.yaml rename xml_converter/intigration_tests/{inputs/xml_species_filter => test_cases/species_filter/input/pack}/xml_file.xml (100%) rename xml_converter/intigration_tests/{expected_outputs/proto_species_filter => test_cases/species_filter/output_proto}/markers.bin (100%) rename xml_converter/intigration_tests/{expected_outputs/xml_species_filter => test_cases/species_filter/output_xml}/xml_file.xml (100%) create mode 100644 xml_converter/intigration_tests/test_cases/species_filter/testcase.yaml rename xml_converter/intigration_tests/{inputs/xml_texture => test_cases/texture/input/pack}/xml_file.xml (100%) rename xml_converter/intigration_tests/{expected_outputs/proto_texture => test_cases/texture/output_proto}/markers.bin (100%) rename xml_converter/intigration_tests/{expected_outputs/xml_texture => test_cases/texture/output_xml}/xml_file.xml (100%) create mode 100644 xml_converter/intigration_tests/test_cases/texture/testcase.yaml delete mode 100644 xml_converter/intigration_tests/testcases.py rename xml_converter/{generators => }/requirements.txt (100%) diff --git a/xml_converter/intigration_tests/make_test.sh b/xml_converter/intigration_tests/make_test.sh new file mode 100755 index 00000000..b8bb155a --- /dev/null +++ b/xml_converter/intigration_tests/make_test.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +# Base testcase directory +mkdir -p test_cases/$1 + +# Testcase configuration +touch test_cases/$1/testcase.yaml +echo 'input_paths: ' >> test_cases/$1/testcase.yaml +echo ' "pack": "xml"' >> test_cases/$1/testcase.yaml +echo 'expected_stdout: |' >> test_cases/$1/testcase.yaml +echo 'expected_stderr: |' >> test_cases/$1/testcase.yaml +echo 'expected_returncode: 0' >> test_cases/$1/testcase.yaml + +# Input folder and test marker pack +mkdir -p test_cases/$1/input/pack + +# Output folders and blank output files +mkdir -p test_cases/$1/output_proto +touch test_cases/$1/output_proto/markers.bin +mkdir -p test_cases/$1/output_xml +touch test_cases/$1/output_xml/xml_file.xml diff --git a/xml_converter/intigration_tests/run_tests.py b/xml_converter/intigration_tests/run_tests.py index ece0cbc7..f9378204 100755 --- a/xml_converter/intigration_tests/run_tests.py +++ b/xml_converter/intigration_tests/run_tests.py @@ -7,9 +7,9 @@ import re import os from typing import List, Optional, Final, Tuple -from testcases import testcases +from src.testcase_loader import load_testcases import shutil -from proto_utils import compare_protos +from src.proto_utils import compare_protos # Path to compiled C++ executable xml_converter_binary_path: str = "../build/xml_converter" @@ -157,7 +157,7 @@ def main() -> None: rebuild_xml_converter_binary() - for testcase in testcases: + for testcase in load_testcases(): xml_output_dir_path = os.path.join(output_parent_dirpath, "xml", testcase.name) proto_output_dir_path = os.path.join(output_parent_dirpath, "proto", testcase.name) diff --git a/xml_converter/intigration_tests/proto_utils.py b/xml_converter/intigration_tests/src/proto_utils.py similarity index 100% rename from xml_converter/intigration_tests/proto_utils.py rename to xml_converter/intigration_tests/src/proto_utils.py diff --git a/xml_converter/intigration_tests/src/testcase_loader.py b/xml_converter/intigration_tests/src/testcase_loader.py new file mode 100644 index 00000000..ba95ee95 --- /dev/null +++ b/xml_converter/intigration_tests/src/testcase_loader.py @@ -0,0 +1,129 @@ +from typing import List, Optional +from dataclasses import dataclass +import yaml +import os + + +################################################################################ +# Testcase +# +# A dataclass for storing all the structured data for a single testcase. +################################################################################ +@dataclass +class Testcase: + name: str + xml_input_paths: List[str] + proto_input_paths: List[str] + + expected_output_xml_path: str + expected_output_proto_path: str + + expected_stdout: List[str] + expected_stderr: List[str] + expected_returncode: int + + +################################################################################ +# load_testcases +# +# Load all of the testcases found in the `test_cases` directory. +################################################################################ +def load_testcases() -> List[Testcase]: + testcase_dirs: List[Testcase] = [] + + for testcase_dir in os.listdir("test_cases"): + testcase = load_testcase(os.path.join("test_cases", testcase_dir)) + + if testcase is None: + continue + + testcase_dirs.append(testcase) + + return testcase_dirs + + +################################################################################ +# load_testcase +# +# A simple loader that loads the testcase from a specific directory, doing +# typechecking on the testcase data to be sure it is properly structured. +################################################################################ +def load_testcase(path) -> Optional[Testcase]: + test_info_path = os.path.join(path, "testcase.yaml") + with open(test_info_path) as f: + data = yaml.safe_load(f) + + inputs_path = os.path.join(path, "input") + + # Load all of the input paths into either xml input or proto inputs + xml_input_paths: List[str] = [] + proto_input_paths: List[str] = [] + for pack_name, pack_type in data["input_paths"].items(): + if not isinstance(pack_name, str): + print(f"Invalid pack name, expecting a string but got {pack_name}") + return + + pack_path = os.path.join(inputs_path, pack_name) + + if not os.path.exists(pack_path): + print(f"Input pack path {pack_path} not found") + return + + if pack_type == "xml": + xml_input_paths.append(pack_path) + elif pack_type == "proto": + proto_input_paths.append(pack_path) + else: + print(f"Invalid pack type {pack_type} found in {test_info_path}") + return + + # Sanity check that all the input directories were accounted for + for possible_input_path in os.listdir(inputs_path): + if possible_input_path not in data["input_paths"]: + print(f"Found the input directory {possible_input_path} in {path} but no config for it") + + # Typecheck the expected stdout, stderr, and returncode values + if "expected_stdout" not in data: + print(f"Expected 'expected_stdout' field in {test_info_path}") + return + elif not isinstance(data["expected_stdout"], str): + print(f"Invalid Test, expecting string value for 'expected_stdout' in {path}") + return + + if "expected_stderr" not in data: + print(f"Expected 'expected_stderr' field in {test_info_path}") + return + elif not isinstance(data["expected_stderr"], str): + print(f"Invalid Test, expecting string value for 'expected_stderr' in {path}") + return + + if "expected_returncode" not in data: + print(f"Expected 'expected_returncode' field in {test_info_path}") + return + elif not isinstance(data["expected_returncode"], int): + print(f"Invalid Test, expecting string value for 'expected_returncode' in {path}") + return + + return Testcase( + name=os.path.basename(path), + xml_input_paths=xml_input_paths, + proto_input_paths=proto_input_paths, + expected_output_xml_path=os.path.join(path, "output_xml"), + expected_output_proto_path=os.path.join(path, "output_proto"), + expected_stdout=to_lines(data["expected_stdout"]), + expected_stderr=to_lines(data["expected_stderr"]), + expected_returncode=data["expected_returncode"] + ) + + +################################################################################ +# to_lines +# +# A helper function to remove final empty lines from split arrays. +################################################################################ +def to_lines(value: str) -> List[str]: + output = value.split("\n") + if output[-1] == "": + return output[:-1] + else: + return output diff --git a/xml_converter/intigration_tests/inputs/xml_achievement_bitmask_valid/xml_file.xml b/xml_converter/intigration_tests/test_cases/achievement_bitmask_valid/input/pack/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/inputs/xml_achievement_bitmask_valid/xml_file.xml rename to xml_converter/intigration_tests/test_cases/achievement_bitmask_valid/input/pack/xml_file.xml diff --git a/xml_converter/intigration_tests/expected_outputs/proto_achievement_bitmask_valid/markers.bin b/xml_converter/intigration_tests/test_cases/achievement_bitmask_valid/output_proto/markers.bin similarity index 100% rename from xml_converter/intigration_tests/expected_outputs/proto_achievement_bitmask_valid/markers.bin rename to xml_converter/intigration_tests/test_cases/achievement_bitmask_valid/output_proto/markers.bin diff --git a/xml_converter/intigration_tests/expected_outputs/xml_achievement_bitmask_valid/xml_file.xml b/xml_converter/intigration_tests/test_cases/achievement_bitmask_valid/output_xml/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/expected_outputs/xml_achievement_bitmask_valid/xml_file.xml rename to xml_converter/intigration_tests/test_cases/achievement_bitmask_valid/output_xml/xml_file.xml diff --git a/xml_converter/intigration_tests/test_cases/achievement_bitmask_valid/testcase.yaml b/xml_converter/intigration_tests/test_cases/achievement_bitmask_valid/testcase.yaml new file mode 100644 index 00000000..9510c793 --- /dev/null +++ b/xml_converter/intigration_tests/test_cases/achievement_bitmask_valid/testcase.yaml @@ -0,0 +1,5 @@ +input_paths: + "pack": "xml" +expected_stdout: | +expected_stderr: | +expected_returncode: 0 diff --git a/xml_converter/intigration_tests/inputs/xml_achievement_id/xml_file.xml b/xml_converter/intigration_tests/test_cases/achievement_id/input/pack/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/inputs/xml_achievement_id/xml_file.xml rename to xml_converter/intigration_tests/test_cases/achievement_id/input/pack/xml_file.xml diff --git a/xml_converter/intigration_tests/expected_outputs/proto_achievement_id/markers.bin b/xml_converter/intigration_tests/test_cases/achievement_id/output_proto/markers.bin similarity index 100% rename from xml_converter/intigration_tests/expected_outputs/proto_achievement_id/markers.bin rename to xml_converter/intigration_tests/test_cases/achievement_id/output_proto/markers.bin diff --git a/xml_converter/intigration_tests/expected_outputs/xml_achievement_id/xml_file.xml b/xml_converter/intigration_tests/test_cases/achievement_id/output_xml/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/expected_outputs/xml_achievement_id/xml_file.xml rename to xml_converter/intigration_tests/test_cases/achievement_id/output_xml/xml_file.xml diff --git a/xml_converter/intigration_tests/test_cases/achievement_id/testcase.yaml b/xml_converter/intigration_tests/test_cases/achievement_id/testcase.yaml new file mode 100644 index 00000000..9510c793 --- /dev/null +++ b/xml_converter/intigration_tests/test_cases/achievement_id/testcase.yaml @@ -0,0 +1,5 @@ +input_paths: + "pack": "xml" +expected_stdout: | +expected_stderr: | +expected_returncode: 0 diff --git a/xml_converter/intigration_tests/inputs/xml_animation_speed/trail.trl b/xml_converter/intigration_tests/test_cases/animation_speed/input/pack/trail.trl similarity index 100% rename from xml_converter/intigration_tests/inputs/xml_animation_speed/trail.trl rename to xml_converter/intigration_tests/test_cases/animation_speed/input/pack/trail.trl diff --git a/xml_converter/intigration_tests/inputs/xml_animation_speed/xml_file.xml b/xml_converter/intigration_tests/test_cases/animation_speed/input/pack/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/inputs/xml_animation_speed/xml_file.xml rename to xml_converter/intigration_tests/test_cases/animation_speed/input/pack/xml_file.xml diff --git a/xml_converter/intigration_tests/expected_outputs/proto_animation_speed/markers.bin b/xml_converter/intigration_tests/test_cases/animation_speed/output_proto/markers.bin similarity index 100% rename from xml_converter/intigration_tests/expected_outputs/proto_animation_speed/markers.bin rename to xml_converter/intigration_tests/test_cases/animation_speed/output_proto/markers.bin diff --git a/xml_converter/intigration_tests/test_cases/animation_speed/output_xml/temp_name_of_trail.trl b/xml_converter/intigration_tests/test_cases/animation_speed/output_xml/temp_name_of_trail.trl new file mode 100644 index 0000000000000000000000000000000000000000..201ab83c8671d0e579b91b4f4f911c933b6a9de9 GIT binary patch literal 44 ncmZQzU|=u;Vg`l=dmwgTV0Zw;3_!d9L^}eRK>7d>3pfG*cS!~W literal 0 HcmV?d00001 diff --git a/xml_converter/intigration_tests/expected_outputs/xml_animation_speed/xml_file.xml b/xml_converter/intigration_tests/test_cases/animation_speed/output_xml/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/expected_outputs/xml_animation_speed/xml_file.xml rename to xml_converter/intigration_tests/test_cases/animation_speed/output_xml/xml_file.xml diff --git a/xml_converter/intigration_tests/test_cases/animation_speed/testcase.yaml b/xml_converter/intigration_tests/test_cases/animation_speed/testcase.yaml new file mode 100644 index 00000000..9510c793 --- /dev/null +++ b/xml_converter/intigration_tests/test_cases/animation_speed/testcase.yaml @@ -0,0 +1,5 @@ +input_paths: + "pack": "xml" +expected_stdout: | +expected_stderr: | +expected_returncode: 0 diff --git a/xml_converter/intigration_tests/inputs/xml_can_fade_invalid/xml_file.xml b/xml_converter/intigration_tests/test_cases/canfade_invalid/input/pack/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/inputs/xml_can_fade_invalid/xml_file.xml rename to xml_converter/intigration_tests/test_cases/canfade_invalid/input/pack/xml_file.xml diff --git a/xml_converter/intigration_tests/expected_outputs/proto_can_fade_invalid/markers.bin b/xml_converter/intigration_tests/test_cases/canfade_invalid/output_proto/markers.bin similarity index 100% rename from xml_converter/intigration_tests/expected_outputs/proto_can_fade_invalid/markers.bin rename to xml_converter/intigration_tests/test_cases/canfade_invalid/output_proto/markers.bin diff --git a/xml_converter/intigration_tests/expected_outputs/xml_can_fade_invalid/xml_file.xml b/xml_converter/intigration_tests/test_cases/canfade_invalid/output_xml/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/expected_outputs/xml_can_fade_invalid/xml_file.xml rename to xml_converter/intigration_tests/test_cases/canfade_invalid/output_xml/xml_file.xml diff --git a/xml_converter/intigration_tests/test_cases/canfade_invalid/testcase.yaml b/xml_converter/intigration_tests/test_cases/canfade_invalid/testcase.yaml new file mode 100644 index 00000000..c802cb86 --- /dev/null +++ b/xml_converter/intigration_tests/test_cases/canfade_invalid/testcase.yaml @@ -0,0 +1,13 @@ +input_paths: + "pack": "xml" +expected_stdout: | + Error: Found a boolean value that was not a '1', '0', 'true', or 'false' + test_cases/canfade_invalid/input/pack/xml_file.xml + 6 | + | ^^^ + Error: Found a boolean value that was not a '1', '0', 'true', or 'false' + test_cases/canfade_invalid/input/pack/xml_file.xml + 7 | + | ^^^^^^ +expected_stderr: | +expected_returncode: 0 diff --git a/xml_converter/intigration_tests/inputs/xml_can_fade_valid/xml_file.xml b/xml_converter/intigration_tests/test_cases/canfade_valid/input/pack/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/inputs/xml_can_fade_valid/xml_file.xml rename to xml_converter/intigration_tests/test_cases/canfade_valid/input/pack/xml_file.xml diff --git a/xml_converter/intigration_tests/expected_outputs/proto_can_fade_valid/markers.bin b/xml_converter/intigration_tests/test_cases/canfade_valid/output_proto/markers.bin similarity index 100% rename from xml_converter/intigration_tests/expected_outputs/proto_can_fade_valid/markers.bin rename to xml_converter/intigration_tests/test_cases/canfade_valid/output_proto/markers.bin diff --git a/xml_converter/intigration_tests/expected_outputs/xml_can_fade_valid/xml_file.xml b/xml_converter/intigration_tests/test_cases/canfade_valid/output_xml/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/expected_outputs/xml_can_fade_valid/xml_file.xml rename to xml_converter/intigration_tests/test_cases/canfade_valid/output_xml/xml_file.xml diff --git a/xml_converter/intigration_tests/test_cases/canfade_valid/testcase.yaml b/xml_converter/intigration_tests/test_cases/canfade_valid/testcase.yaml new file mode 100644 index 00000000..9510c793 --- /dev/null +++ b/xml_converter/intigration_tests/test_cases/canfade_valid/testcase.yaml @@ -0,0 +1,5 @@ +input_paths: + "pack": "xml" +expected_stdout: | +expected_stderr: | +expected_returncode: 0 diff --git a/xml_converter/intigration_tests/inputs/xml_cull_chirality/xml_file.xml b/xml_converter/intigration_tests/test_cases/cull_chirality/input/pack/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/inputs/xml_cull_chirality/xml_file.xml rename to xml_converter/intigration_tests/test_cases/cull_chirality/input/pack/xml_file.xml diff --git a/xml_converter/intigration_tests/expected_outputs/proto_cull_chirality/markers.bin b/xml_converter/intigration_tests/test_cases/cull_chirality/output_proto/markers.bin similarity index 100% rename from xml_converter/intigration_tests/expected_outputs/proto_cull_chirality/markers.bin rename to xml_converter/intigration_tests/test_cases/cull_chirality/output_proto/markers.bin diff --git a/xml_converter/intigration_tests/expected_outputs/xml_cull_chirality/xml_file.xml b/xml_converter/intigration_tests/test_cases/cull_chirality/output_xml/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/expected_outputs/xml_cull_chirality/xml_file.xml rename to xml_converter/intigration_tests/test_cases/cull_chirality/output_xml/xml_file.xml diff --git a/xml_converter/intigration_tests/test_cases/cull_chirality/testcase.yaml b/xml_converter/intigration_tests/test_cases/cull_chirality/testcase.yaml new file mode 100644 index 00000000..9510c793 --- /dev/null +++ b/xml_converter/intigration_tests/test_cases/cull_chirality/testcase.yaml @@ -0,0 +1,5 @@ +input_paths: + "pack": "xml" +expected_stdout: | +expected_stderr: | +expected_returncode: 0 diff --git a/xml_converter/intigration_tests/inputs/xml_fade/xml_file.xml b/xml_converter/intigration_tests/test_cases/fade_distance/input/pack/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/inputs/xml_fade/xml_file.xml rename to xml_converter/intigration_tests/test_cases/fade_distance/input/pack/xml_file.xml diff --git a/xml_converter/intigration_tests/expected_outputs/proto_fade/markers.bin b/xml_converter/intigration_tests/test_cases/fade_distance/output_proto/markers.bin similarity index 100% rename from xml_converter/intigration_tests/expected_outputs/proto_fade/markers.bin rename to xml_converter/intigration_tests/test_cases/fade_distance/output_proto/markers.bin diff --git a/xml_converter/intigration_tests/expected_outputs/xml_fade/xml_file.xml b/xml_converter/intigration_tests/test_cases/fade_distance/output_xml/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/expected_outputs/xml_fade/xml_file.xml rename to xml_converter/intigration_tests/test_cases/fade_distance/output_xml/xml_file.xml diff --git a/xml_converter/intigration_tests/test_cases/fade_distance/testcase.yaml b/xml_converter/intigration_tests/test_cases/fade_distance/testcase.yaml new file mode 100644 index 00000000..9510c793 --- /dev/null +++ b/xml_converter/intigration_tests/test_cases/fade_distance/testcase.yaml @@ -0,0 +1,5 @@ +input_paths: + "pack": "xml" +expected_stdout: | +expected_stderr: | +expected_returncode: 0 diff --git a/xml_converter/intigration_tests/inputs/xml_festival_filter/xml_file.xml b/xml_converter/intigration_tests/test_cases/festival_filter/input/pack/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/inputs/xml_festival_filter/xml_file.xml rename to xml_converter/intigration_tests/test_cases/festival_filter/input/pack/xml_file.xml diff --git a/xml_converter/intigration_tests/expected_outputs/proto_festival_filter/markers.bin b/xml_converter/intigration_tests/test_cases/festival_filter/output_proto/markers.bin similarity index 100% rename from xml_converter/intigration_tests/expected_outputs/proto_festival_filter/markers.bin rename to xml_converter/intigration_tests/test_cases/festival_filter/output_proto/markers.bin diff --git a/xml_converter/intigration_tests/expected_outputs/xml_festival_filter/xml_file.xml b/xml_converter/intigration_tests/test_cases/festival_filter/output_xml/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/expected_outputs/xml_festival_filter/xml_file.xml rename to xml_converter/intigration_tests/test_cases/festival_filter/output_xml/xml_file.xml diff --git a/xml_converter/intigration_tests/test_cases/festival_filter/testcase.yaml b/xml_converter/intigration_tests/test_cases/festival_filter/testcase.yaml new file mode 100644 index 00000000..9510c793 --- /dev/null +++ b/xml_converter/intigration_tests/test_cases/festival_filter/testcase.yaml @@ -0,0 +1,5 @@ +input_paths: + "pack": "xml" +expected_stdout: | +expected_stderr: | +expected_returncode: 0 diff --git a/xml_converter/intigration_tests/inputs/xml_is_wall/xml_file.xml b/xml_converter/intigration_tests/test_cases/is_wall/input/pack/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/inputs/xml_is_wall/xml_file.xml rename to xml_converter/intigration_tests/test_cases/is_wall/input/pack/xml_file.xml diff --git a/xml_converter/intigration_tests/expected_outputs/proto_is_wall/markers.bin b/xml_converter/intigration_tests/test_cases/is_wall/output_proto/markers.bin similarity index 100% rename from xml_converter/intigration_tests/expected_outputs/proto_is_wall/markers.bin rename to xml_converter/intigration_tests/test_cases/is_wall/output_proto/markers.bin diff --git a/xml_converter/intigration_tests/expected_outputs/xml_is_wall/xml_file.xml b/xml_converter/intigration_tests/test_cases/is_wall/output_xml/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/expected_outputs/xml_is_wall/xml_file.xml rename to xml_converter/intigration_tests/test_cases/is_wall/output_xml/xml_file.xml diff --git a/xml_converter/intigration_tests/test_cases/is_wall/testcase.yaml b/xml_converter/intigration_tests/test_cases/is_wall/testcase.yaml new file mode 100644 index 00000000..9510c793 --- /dev/null +++ b/xml_converter/intigration_tests/test_cases/is_wall/testcase.yaml @@ -0,0 +1,5 @@ +input_paths: + "pack": "xml" +expected_stdout: | +expected_stderr: | +expected_returncode: 0 diff --git a/xml_converter/intigration_tests/inputs/xml_map_id/xml_file.xml b/xml_converter/intigration_tests/test_cases/map_id/input/pack/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/inputs/xml_map_id/xml_file.xml rename to xml_converter/intigration_tests/test_cases/map_id/input/pack/xml_file.xml diff --git a/xml_converter/intigration_tests/expected_outputs/proto_map_id/markers.bin b/xml_converter/intigration_tests/test_cases/map_id/output_proto/markers.bin similarity index 100% rename from xml_converter/intigration_tests/expected_outputs/proto_map_id/markers.bin rename to xml_converter/intigration_tests/test_cases/map_id/output_proto/markers.bin diff --git a/xml_converter/intigration_tests/expected_outputs/xml_map_id/xml_file.xml b/xml_converter/intigration_tests/test_cases/map_id/output_xml/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/expected_outputs/xml_map_id/xml_file.xml rename to xml_converter/intigration_tests/test_cases/map_id/output_xml/xml_file.xml diff --git a/xml_converter/intigration_tests/test_cases/map_id/testcase.yaml b/xml_converter/intigration_tests/test_cases/map_id/testcase.yaml new file mode 100644 index 00000000..9510c793 --- /dev/null +++ b/xml_converter/intigration_tests/test_cases/map_id/testcase.yaml @@ -0,0 +1,5 @@ +input_paths: + "pack": "xml" +expected_stdout: | +expected_stderr: | +expected_returncode: 0 diff --git a/xml_converter/intigration_tests/inputs/xml_map_type_filter/xml_file.xml b/xml_converter/intigration_tests/test_cases/map_type_filter/input/pack/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/inputs/xml_map_type_filter/xml_file.xml rename to xml_converter/intigration_tests/test_cases/map_type_filter/input/pack/xml_file.xml diff --git a/xml_converter/intigration_tests/expected_outputs/proto_map_type_filter/markers.bin b/xml_converter/intigration_tests/test_cases/map_type_filter/output_proto/markers.bin similarity index 100% rename from xml_converter/intigration_tests/expected_outputs/proto_map_type_filter/markers.bin rename to xml_converter/intigration_tests/test_cases/map_type_filter/output_proto/markers.bin diff --git a/xml_converter/intigration_tests/expected_outputs/xml_map_type_filter/xml_file.xml b/xml_converter/intigration_tests/test_cases/map_type_filter/output_xml/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/expected_outputs/xml_map_type_filter/xml_file.xml rename to xml_converter/intigration_tests/test_cases/map_type_filter/output_xml/xml_file.xml diff --git a/xml_converter/intigration_tests/test_cases/map_type_filter/testcase.yaml b/xml_converter/intigration_tests/test_cases/map_type_filter/testcase.yaml new file mode 100644 index 00000000..9510c793 --- /dev/null +++ b/xml_converter/intigration_tests/test_cases/map_type_filter/testcase.yaml @@ -0,0 +1,5 @@ +input_paths: + "pack": "xml" +expected_stdout: | +expected_stderr: | +expected_returncode: 0 diff --git a/xml_converter/intigration_tests/inputs/xml_mount_filter_invalid/xml_file.xml b/xml_converter/intigration_tests/test_cases/mount_filter_invalid/input/pack/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/inputs/xml_mount_filter_invalid/xml_file.xml rename to xml_converter/intigration_tests/test_cases/mount_filter_invalid/input/pack/xml_file.xml diff --git a/xml_converter/intigration_tests/expected_outputs/proto_mount_filter_invalid/markers.bin b/xml_converter/intigration_tests/test_cases/mount_filter_invalid/output_proto/markers.bin similarity index 100% rename from xml_converter/intigration_tests/expected_outputs/proto_mount_filter_invalid/markers.bin rename to xml_converter/intigration_tests/test_cases/mount_filter_invalid/output_proto/markers.bin diff --git a/xml_converter/intigration_tests/expected_outputs/xml_mount_filter_invalid/xml_file.xml b/xml_converter/intigration_tests/test_cases/mount_filter_invalid/output_xml/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/expected_outputs/xml_mount_filter_invalid/xml_file.xml rename to xml_converter/intigration_tests/test_cases/mount_filter_invalid/output_xml/xml_file.xml diff --git a/xml_converter/intigration_tests/test_cases/mount_filter_invalid/testcase.yaml b/xml_converter/intigration_tests/test_cases/mount_filter_invalid/testcase.yaml new file mode 100644 index 00000000..1d31270c --- /dev/null +++ b/xml_converter/intigration_tests/test_cases/mount_filter_invalid/testcase.yaml @@ -0,0 +1,21 @@ +input_paths: + "pack": "xml" +expected_stdout: | + Error: Invalid Filter for MountFilter. Found + test_cases/mount_filter_invalid/input/pack/xml_file.xml + 6 | + | + Error: Invalid Filter for MountFilter. Found NotAMount + test_cases/mount_filter_invalid/input/pack/xml_file.xml + 7 | + | ^^^^^^^^^ + Error: Invalid Filter for MountFilter. Found + test_cases/mount_filter_invalid/input/pack/xml_file.xml + 8 | + | ^^^^^^^^^^^^^^^^ + Error: Invalid Filter for MountFilter. Found NotAMount + test_cases/mount_filter_invalid/input/pack/xml_file.xml + 9 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^ +expected_stderr: | +expected_returncode: 0 diff --git a/xml_converter/intigration_tests/inputs/xml_mount_filter_valid/xml_file.xml b/xml_converter/intigration_tests/test_cases/mountfilter_valid/input/pack/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/inputs/xml_mount_filter_valid/xml_file.xml rename to xml_converter/intigration_tests/test_cases/mountfilter_valid/input/pack/xml_file.xml diff --git a/xml_converter/intigration_tests/expected_outputs/proto_mount_filter_valid/markers.bin b/xml_converter/intigration_tests/test_cases/mountfilter_valid/output_proto/markers.bin similarity index 100% rename from xml_converter/intigration_tests/expected_outputs/proto_mount_filter_valid/markers.bin rename to xml_converter/intigration_tests/test_cases/mountfilter_valid/output_proto/markers.bin diff --git a/xml_converter/intigration_tests/expected_outputs/xml_mount_filter_valid/xml_file.xml b/xml_converter/intigration_tests/test_cases/mountfilter_valid/output_xml/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/expected_outputs/xml_mount_filter_valid/xml_file.xml rename to xml_converter/intigration_tests/test_cases/mountfilter_valid/output_xml/xml_file.xml diff --git a/xml_converter/intigration_tests/test_cases/mountfilter_valid/testcase.yaml b/xml_converter/intigration_tests/test_cases/mountfilter_valid/testcase.yaml new file mode 100644 index 00000000..9510c793 --- /dev/null +++ b/xml_converter/intigration_tests/test_cases/mountfilter_valid/testcase.yaml @@ -0,0 +1,5 @@ +input_paths: + "pack": "xml" +expected_stdout: | +expected_stderr: | +expected_returncode: 0 diff --git a/xml_converter/intigration_tests/inputs/xml_profession_filter/xml_file.xml b/xml_converter/intigration_tests/test_cases/profession_filter/input/pack/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/inputs/xml_profession_filter/xml_file.xml rename to xml_converter/intigration_tests/test_cases/profession_filter/input/pack/xml_file.xml diff --git a/xml_converter/intigration_tests/expected_outputs/proto_profession_filter/markers.bin b/xml_converter/intigration_tests/test_cases/profession_filter/output_proto/markers.bin similarity index 100% rename from xml_converter/intigration_tests/expected_outputs/proto_profession_filter/markers.bin rename to xml_converter/intigration_tests/test_cases/profession_filter/output_proto/markers.bin diff --git a/xml_converter/intigration_tests/expected_outputs/xml_profession_filter/xml_file.xml b/xml_converter/intigration_tests/test_cases/profession_filter/output_xml/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/expected_outputs/xml_profession_filter/xml_file.xml rename to xml_converter/intigration_tests/test_cases/profession_filter/output_xml/xml_file.xml diff --git a/xml_converter/intigration_tests/test_cases/profession_filter/testcase.yaml b/xml_converter/intigration_tests/test_cases/profession_filter/testcase.yaml new file mode 100644 index 00000000..9510c793 --- /dev/null +++ b/xml_converter/intigration_tests/test_cases/profession_filter/testcase.yaml @@ -0,0 +1,5 @@ +input_paths: + "pack": "xml" +expected_stdout: | +expected_stderr: | +expected_returncode: 0 diff --git a/xml_converter/intigration_tests/inputs/xml_specialization_filter/xml_file.xml b/xml_converter/intigration_tests/test_cases/specialization_filter/input/pack/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/inputs/xml_specialization_filter/xml_file.xml rename to xml_converter/intigration_tests/test_cases/specialization_filter/input/pack/xml_file.xml diff --git a/xml_converter/intigration_tests/expected_outputs/proto_specialization_filter/markers.bin b/xml_converter/intigration_tests/test_cases/specialization_filter/output_proto/markers.bin similarity index 100% rename from xml_converter/intigration_tests/expected_outputs/proto_specialization_filter/markers.bin rename to xml_converter/intigration_tests/test_cases/specialization_filter/output_proto/markers.bin diff --git a/xml_converter/intigration_tests/expected_outputs/xml_specialization_filter/xml_file.xml b/xml_converter/intigration_tests/test_cases/specialization_filter/output_xml/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/expected_outputs/xml_specialization_filter/xml_file.xml rename to xml_converter/intigration_tests/test_cases/specialization_filter/output_xml/xml_file.xml diff --git a/xml_converter/intigration_tests/test_cases/specialization_filter/testcase.yaml b/xml_converter/intigration_tests/test_cases/specialization_filter/testcase.yaml new file mode 100644 index 00000000..9510c793 --- /dev/null +++ b/xml_converter/intigration_tests/test_cases/specialization_filter/testcase.yaml @@ -0,0 +1,5 @@ +input_paths: + "pack": "xml" +expected_stdout: | +expected_stderr: | +expected_returncode: 0 diff --git a/xml_converter/intigration_tests/inputs/xml_species_filter/xml_file.xml b/xml_converter/intigration_tests/test_cases/species_filter/input/pack/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/inputs/xml_species_filter/xml_file.xml rename to xml_converter/intigration_tests/test_cases/species_filter/input/pack/xml_file.xml diff --git a/xml_converter/intigration_tests/expected_outputs/proto_species_filter/markers.bin b/xml_converter/intigration_tests/test_cases/species_filter/output_proto/markers.bin similarity index 100% rename from xml_converter/intigration_tests/expected_outputs/proto_species_filter/markers.bin rename to xml_converter/intigration_tests/test_cases/species_filter/output_proto/markers.bin diff --git a/xml_converter/intigration_tests/expected_outputs/xml_species_filter/xml_file.xml b/xml_converter/intigration_tests/test_cases/species_filter/output_xml/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/expected_outputs/xml_species_filter/xml_file.xml rename to xml_converter/intigration_tests/test_cases/species_filter/output_xml/xml_file.xml diff --git a/xml_converter/intigration_tests/test_cases/species_filter/testcase.yaml b/xml_converter/intigration_tests/test_cases/species_filter/testcase.yaml new file mode 100644 index 00000000..9510c793 --- /dev/null +++ b/xml_converter/intigration_tests/test_cases/species_filter/testcase.yaml @@ -0,0 +1,5 @@ +input_paths: + "pack": "xml" +expected_stdout: | +expected_stderr: | +expected_returncode: 0 diff --git a/xml_converter/intigration_tests/inputs/xml_texture/xml_file.xml b/xml_converter/intigration_tests/test_cases/texture/input/pack/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/inputs/xml_texture/xml_file.xml rename to xml_converter/intigration_tests/test_cases/texture/input/pack/xml_file.xml diff --git a/xml_converter/intigration_tests/expected_outputs/proto_texture/markers.bin b/xml_converter/intigration_tests/test_cases/texture/output_proto/markers.bin similarity index 100% rename from xml_converter/intigration_tests/expected_outputs/proto_texture/markers.bin rename to xml_converter/intigration_tests/test_cases/texture/output_proto/markers.bin diff --git a/xml_converter/intigration_tests/expected_outputs/xml_texture/xml_file.xml b/xml_converter/intigration_tests/test_cases/texture/output_xml/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/expected_outputs/xml_texture/xml_file.xml rename to xml_converter/intigration_tests/test_cases/texture/output_xml/xml_file.xml diff --git a/xml_converter/intigration_tests/test_cases/texture/testcase.yaml b/xml_converter/intigration_tests/test_cases/texture/testcase.yaml new file mode 100644 index 00000000..9510c793 --- /dev/null +++ b/xml_converter/intigration_tests/test_cases/texture/testcase.yaml @@ -0,0 +1,5 @@ +input_paths: + "pack": "xml" +expected_stdout: | +expected_stderr: | +expected_returncode: 0 diff --git a/xml_converter/intigration_tests/testcases.py b/xml_converter/intigration_tests/testcases.py deleted file mode 100644 index 3b51026a..00000000 --- a/xml_converter/intigration_tests/testcases.py +++ /dev/null @@ -1,152 +0,0 @@ -from dataclasses import dataclass, field -from typing import List, Optional - -@dataclass -class Testcase: - name: str - xml_input_paths: List[str] = field(default_factory=list) - proto_input_paths: List[str] = field(default_factory=list) - - # TODO: Eventually the expected output paths wont be optional - expected_output_xml_path: Optional[str] = None - expected_output_proto_path: Optional[str] = None - - expected_stdout: List[str] = field(default_factory=list) - expected_stderr: List[str] = field(default_factory=list) - expected_returncode: int = 0 - - -testcases: List[Testcase] = [ - Testcase( - name="canfade_valid", - xml_input_paths=["./inputs/xml_can_fade_valid"], - expected_output_xml_path="./expected_outputs/xml_can_fade_valid", - expected_output_proto_path="./expected_outputs/proto_can_fade_valid", - ), - Testcase( - name="canfade_invalid", - xml_input_paths=["./inputs/xml_can_fade_invalid"], - expected_output_xml_path="./expected_outputs/xml_can_fade_invalid", - expected_output_proto_path="./expected_outputs/proto_can_fade_invalid", - expected_stdout=[ - "Error: Found a boolean value that was not a '1', '0', 'true', or 'false'", - "./inputs/xml_can_fade_invalid/xml_file.xml", - '6 | ', - " | ^^^", - "Error: Found a boolean value that was not a '1', '0', 'true', or 'false'", - './inputs/xml_can_fade_invalid/xml_file.xml', - '7 | ', - ' | ^^^^^^', - - ] - ), - Testcase( - name="mountfilter_valid", - xml_input_paths=["./inputs/xml_mount_filter_valid"], - expected_output_xml_path="./expected_outputs/xml_mount_filter_valid", - expected_output_proto_path="./expected_outputs/proto_mount_filter_valid", - ), - Testcase( - name="mountfilter_invalid", - xml_input_paths=["./inputs/xml_mount_filter_invalid"], - expected_output_xml_path="./expected_outputs/xml_mount_filter_invalid", - expected_output_proto_path="./expected_outputs/proto_mount_filter_invalid", - expected_stdout=[ - 'Error: Invalid Filter for MountFilter. Found ', - './inputs/xml_mount_filter_invalid/xml_file.xml', - '6 | ', - ' | ', - 'Error: Invalid Filter for MountFilter. Found NotAMount', - './inputs/xml_mount_filter_invalid/xml_file.xml', - '7 | ', - ' | ^^^^^^^^^', - 'Error: Invalid Filter for MountFilter. Found ', - './inputs/xml_mount_filter_invalid/xml_file.xml', - '8 | ', - ' | ^^^^^^^^^^^^^^^^', - 'Error: Invalid Filter for MountFilter. Found NotAMount', - './inputs/xml_mount_filter_invalid/xml_file.xml', - '9 | ', - ' | ^^^^^^^^^^^^^^^^^^^^^^^^^', - ] - ), - - Testcase( - name="achievement_bitmask", - xml_input_paths=["./inputs/xml_achievement_bitmask_valid"], - expected_output_xml_path="./expected_outputs/xml_achievement_bitmask_valid", - expected_output_proto_path="./expected_outputs/proto_achievement_bitmask_valid", - ), - Testcase( - name="achievement_id", - xml_input_paths=["./inputs/xml_achievement_id"], - expected_output_xml_path="./expected_outputs/xml_achievement_id", - expected_output_proto_path="./expected_outputs/proto_achievement_id", - ), - Testcase( - name="is_wall", - xml_input_paths=["./inputs/xml_is_wall"], - expected_output_xml_path="./expected_outputs/xml_is_wall", - expected_output_proto_path="./expected_outputs/proto_is_wall", - ), - Testcase( - name="fade", - xml_input_paths=["./inputs/xml_fade"], - expected_output_xml_path="./expected_outputs/xml_fade", - expected_output_proto_path="./expected_outputs/proto_fade", - ), - Testcase( - name="festival_filter", - xml_input_paths=["./inputs/xml_festival_filter"], - expected_output_xml_path="./expected_outputs/xml_festival_filter", - expected_output_proto_path="./expected_outputs/proto_festival_filter", - ), - Testcase( - name="map_id", - xml_input_paths=["./inputs/xml_map_id"], - expected_output_xml_path="./expected_outputs/xml_map_id", - expected_output_proto_path="./expected_outputs/proto_map_id", - ), - Testcase( - name="map_type_filter", - xml_input_paths=["./inputs/xml_map_type_filter"], - expected_output_xml_path="./expected_outputs/xml_map_type_filter", - expected_output_proto_path="./expected_outputs/proto_map_type_filter", - ), - Testcase( - name="profession_filter", - xml_input_paths=["./inputs/xml_profession_filter"], - expected_output_xml_path="./expected_outputs/xml_profession_filter", - expected_output_proto_path="./expected_outputs/proto_profession_filter", - ), - Testcase( - name="animation_speed", - xml_input_paths=["./inputs/xml_animation_speed"], - expected_output_xml_path="./expected_outputs/xml_animation_speed", - expected_output_proto_path="./expected_outputs/proto_animation_speed" - ), - Testcase( - name="cull_chirality", - xml_input_paths=["./inputs/xml_cull_chirality"], - expected_output_xml_path="./expected_outputs/xml_cull_chirality", - expected_output_proto_path="./expected_outputs/proto_cull_chirality", - ), - Testcase( - name="specialization_filter", - xml_input_paths=["./inputs/xml_specialization_filter"], - expected_output_xml_path="./expected_outputs/xml_specialization_filter", - expected_output_proto_path="./expected_outputs/proto_specialization_filter", - ), - Testcase( - name="species_filter", - xml_input_paths=["./inputs/xml_species_filter"], - expected_output_xml_path="./expected_outputs/xml_species_filter", - expected_output_proto_path="./expected_outputs/proto_species_filter", - ), - Testcase( - name="texture", - xml_input_paths=["./inputs/xml_texture"], - expected_output_xml_path="./expected_outputs/xml_texture", - expected_output_proto_path="./expected_outputs/proto_texture", - ), -] diff --git a/xml_converter/generators/requirements.txt b/xml_converter/requirements.txt similarity index 100% rename from xml_converter/generators/requirements.txt rename to xml_converter/requirements.txt From 41e6da185d2726fdda518a1e63d7eb25f9525ed8 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sat, 30 Dec 2023 04:43:39 -0600 Subject: [PATCH 380/539] fixing workflow to install python deps from the new location --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 869837f0..db88f69d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -54,9 +54,9 @@ jobs: run: | pip3 install cpplint - - name: Install xml_converter/generators Dependencies + - name: Install xml_converter python Dependencies run: | - cd xml_converter/generators + cd xml_converter python3 -m venv venv source venv/bin/activate pip install -r requirements.txt From 4486a362a5f9b8f7de3021ee4d1bee351545efff Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sat, 30 Dec 2023 05:01:40 -0600 Subject: [PATCH 381/539] Adding a presubmit for integration tests and fixing the generators one --- xml_converter/.gitignore | 1 + xml_converter/generators/presubmit.sh | 2 +- xml_converter/intigration_tests/presubmit.sh | 24 +++++++++++++++++++ xml_converter/intigration_tests/run_tests.py | 15 +++++------- .../intigration_tests/src/__init__.py | 0 .../intigration_tests/src/proto_utils.py | 2 ++ .../intigration_tests/src/testcase_loader.py | 20 ++++++++-------- xml_converter/presubmit.sh | 7 ++++++ 8 files changed, 51 insertions(+), 20 deletions(-) create mode 100755 xml_converter/intigration_tests/presubmit.sh create mode 100644 xml_converter/intigration_tests/src/__init__.py diff --git a/xml_converter/.gitignore b/xml_converter/.gitignore index ee6c06c7..7978cf59 100644 --- a/xml_converter/.gitignore +++ b/xml_converter/.gitignore @@ -11,3 +11,4 @@ web_docs __pycache__/ build/ export_packs/ +.cache/clangd diff --git a/xml_converter/generators/presubmit.sh b/xml_converter/generators/presubmit.sh index a7b5e1cc..e1bf02a7 100755 --- a/xml_converter/generators/presubmit.sh +++ b/xml_converter/generators/presubmit.sh @@ -2,7 +2,7 @@ error_count=0 -source ./venv/bin/activate +source ../venv/bin/activate readarray -d '' FILES < <(find . -type f -name "*.py" -not -path "*/venv/*" -print0) diff --git a/xml_converter/intigration_tests/presubmit.sh b/xml_converter/intigration_tests/presubmit.sh new file mode 100755 index 00000000..e1bf02a7 --- /dev/null +++ b/xml_converter/intigration_tests/presubmit.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +error_count=0 + +source ../venv/bin/activate + +readarray -d '' FILES < <(find . -type f -name "*.py" -not -path "*/venv/*" -print0) + +# Lint Python Files +flake8 --ignore=E501,E266,W503 "${FILES[@]}" +if (( $? > 0 )); then + echo "Flake8 Error" + error_count=`expr $error_count + 1` +fi + +# Type Check Python Files +mypy --strict "${FILES[@]}" +if (( $? > 0 )); then + echo "mypy error" + error_count=`expr $error_count + 1` +fi + + +exit $error_count diff --git a/xml_converter/intigration_tests/run_tests.py b/xml_converter/intigration_tests/run_tests.py index f9378204..965e63e0 100755 --- a/xml_converter/intigration_tests/run_tests.py +++ b/xml_converter/intigration_tests/run_tests.py @@ -2,7 +2,6 @@ import argparse import difflib -import json import subprocess import re import os @@ -70,8 +69,6 @@ def len_diff(lines: List[str]) -> int: return diffcount - - ################################################################################ # remove_ansii_color_escapecodes # @@ -82,7 +79,7 @@ def len_diff(lines: List[str]) -> int: def remove_ansii_color_escapecodes(lines: List[str]) -> List[str]: - return [ re.sub(pattern_for_color_escape_codes, '', line) for line in lines ] + return [re.sub(pattern_for_color_escape_codes, '', line) for line in lines] ################################################################################ @@ -91,7 +88,7 @@ def remove_ansii_color_escapecodes(lines: List[str]) -> List[str]: # Recompiles the XML Converter binary. If the compilation returns an error code # then this function throws an error ################################################################################ -def rebuild_xml_converter_binary(): +def rebuild_xml_converter_binary() -> None: cmake_build_directory = "../build" # Store the current working directory @@ -115,6 +112,7 @@ def rebuild_xml_converter_binary(): else: print(f"Directory '{cmake_build_directory}' does not exist.") + ################################################################################ # remove_ignored_lines # @@ -161,7 +159,6 @@ def main() -> None: xml_output_dir_path = os.path.join(output_parent_dirpath, "xml", testcase.name) proto_output_dir_path = os.path.join(output_parent_dirpath, "proto", testcase.name) - os.makedirs(xml_output_dir_path, exist_ok=True) os.makedirs(proto_output_dir_path, exist_ok=True) @@ -183,7 +180,7 @@ def main() -> None: print(" return_code : {}".format(returncode)) all_tests_passed: bool = True - + stdout_diff: List[str] = list(difflib.unified_diff(testcase.expected_stdout, stdout, fromfile="Expected stdout", tofile="Actual stdout", lineterm="")) if len_diff(stdout_diff) != 0: print(f"Standard output did not match for test {testcase.name}") @@ -198,7 +195,7 @@ def main() -> None: print(line) all_tests_passed = False - if testcase.expected_returncode is not None and testcase.expected_returncode != returncode : + if testcase.expected_returncode is not None and testcase.expected_returncode != returncode: print(f"Expected a return code of {testcase.expected_returncode} for {testcase.name} but got {returncode}") if testcase.expected_output_xml_path is not None: @@ -208,7 +205,7 @@ def main() -> None: output_xml_filepath = os.path.join(xml_output_dir_path, "xml_file.xml") expected_output_xml_filepath = os.path.join(testcase.expected_output_xml_path, "xml_file.xml") - xml_diff = compare_text_files(expected_output_xml_filepath , output_xml_filepath) + xml_diff = compare_text_files(expected_output_xml_filepath, output_xml_filepath) if len_diff(xml_diff) != 0: print(f"XML output was incorrect for test {testcase.name}") diff --git a/xml_converter/intigration_tests/src/__init__.py b/xml_converter/intigration_tests/src/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/xml_converter/intigration_tests/src/proto_utils.py b/xml_converter/intigration_tests/src/proto_utils.py index 1e1957dc..a170a89c 100644 --- a/xml_converter/intigration_tests/src/proto_utils.py +++ b/xml_converter/intigration_tests/src/proto_utils.py @@ -2,6 +2,7 @@ import subprocess import difflib + def compare_protos( outputs_directory: str, expected_outputs_directory: str, @@ -34,6 +35,7 @@ def compare_protos( return False + def compare_binary_file(file_path_1: str, file_path_2: str) -> bool: if not os.path.exists(file_path_1): return False diff --git a/xml_converter/intigration_tests/src/testcase_loader.py b/xml_converter/intigration_tests/src/testcase_loader.py index ba95ee95..aa85b442 100644 --- a/xml_converter/intigration_tests/src/testcase_loader.py +++ b/xml_converter/intigration_tests/src/testcase_loader.py @@ -48,7 +48,7 @@ def load_testcases() -> List[Testcase]: # A simple loader that loads the testcase from a specific directory, doing # typechecking on the testcase data to be sure it is properly structured. ################################################################################ -def load_testcase(path) -> Optional[Testcase]: +def load_testcase(path: str) -> Optional[Testcase]: test_info_path = os.path.join(path, "testcase.yaml") with open(test_info_path) as f: data = yaml.safe_load(f) @@ -61,13 +61,13 @@ def load_testcase(path) -> Optional[Testcase]: for pack_name, pack_type in data["input_paths"].items(): if not isinstance(pack_name, str): print(f"Invalid pack name, expecting a string but got {pack_name}") - return + return None pack_path = os.path.join(inputs_path, pack_name) if not os.path.exists(pack_path): print(f"Input pack path {pack_path} not found") - return + return None if pack_type == "xml": xml_input_paths.append(pack_path) @@ -75,7 +75,7 @@ def load_testcase(path) -> Optional[Testcase]: proto_input_paths.append(pack_path) else: print(f"Invalid pack type {pack_type} found in {test_info_path}") - return + return None # Sanity check that all the input directories were accounted for for possible_input_path in os.listdir(inputs_path): @@ -85,24 +85,24 @@ def load_testcase(path) -> Optional[Testcase]: # Typecheck the expected stdout, stderr, and returncode values if "expected_stdout" not in data: print(f"Expected 'expected_stdout' field in {test_info_path}") - return + return None elif not isinstance(data["expected_stdout"], str): print(f"Invalid Test, expecting string value for 'expected_stdout' in {path}") - return + return None if "expected_stderr" not in data: print(f"Expected 'expected_stderr' field in {test_info_path}") - return + return None elif not isinstance(data["expected_stderr"], str): print(f"Invalid Test, expecting string value for 'expected_stderr' in {path}") - return + return None if "expected_returncode" not in data: print(f"Expected 'expected_returncode' field in {test_info_path}") - return + return None elif not isinstance(data["expected_returncode"], int): print(f"Invalid Test, expecting string value for 'expected_returncode' in {path}") - return + return None return Testcase( name=os.path.basename(path), diff --git a/xml_converter/presubmit.sh b/xml_converter/presubmit.sh index 37589602..53c3235d 100755 --- a/xml_converter/presubmit.sh +++ b/xml_converter/presubmit.sh @@ -69,6 +69,13 @@ if (( $? > 0 )); then fi popd +# Run the python presubmit for the "integration_tests" subdirectory. +pushd intigration_tests +./presubmit.sh +if (( $? > 0 )); then + error_count=`expr $error_count + 1` +fi +popd exit $error_count From 71fa72538a2987d0daa79f6c6d798fed8e6f22bc Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sat, 30 Dec 2023 05:05:33 -0600 Subject: [PATCH 382/539] renaming intigration_tests to integration_tests --- .../.gitignore | 0 .../make_test.sh | 0 .../presubmit.sh | 0 .../run_tests.py | 0 .../src/__init__.py | 0 .../src/proto_utils.py | 0 .../src/testcase_loader.py | 0 .../input/pack/xml_file.xml | 0 .../output_proto/markers.bin | Bin .../output_xml/xml_file.xml | 0 .../achievement_bitmask_valid/testcase.yaml | 0 .../achievement_id/input/pack/xml_file.xml | 0 .../achievement_id/output_proto/markers.bin | 0 .../achievement_id/output_xml/xml_file.xml | 0 .../test_cases/achievement_id/testcase.yaml | 0 .../test_cases/animation_speed/input/pack/trail.trl | Bin .../animation_speed/input/pack/xml_file.xml | 0 .../animation_speed/output_proto/markers.bin | Bin .../output_xml/temp_name_of_trail.trl | Bin .../animation_speed/output_xml/xml_file.xml | 0 .../test_cases/animation_speed/testcase.yaml | 0 .../canfade_invalid/input/pack/xml_file.xml | 0 .../canfade_invalid/output_proto/markers.bin | 0 .../canfade_invalid/output_xml/xml_file.xml | 0 .../test_cases/canfade_invalid/testcase.yaml | 0 .../canfade_valid/input/pack/xml_file.xml | 0 .../canfade_valid/output_proto/markers.bin | 0 .../canfade_valid/output_xml/xml_file.xml | 0 .../test_cases/canfade_valid/testcase.yaml | 0 .../cull_chirality/input/pack/xml_file.xml | 0 .../cull_chirality/output_proto/markers.bin | 0 .../cull_chirality/output_xml/xml_file.xml | 0 .../test_cases/cull_chirality/testcase.yaml | 0 .../fade_distance/input/pack/xml_file.xml | 0 .../fade_distance/output_proto/markers.bin | Bin .../fade_distance/output_xml/xml_file.xml | 0 .../test_cases/fade_distance/testcase.yaml | 0 .../festival_filter/input/pack/xml_file.xml | 0 .../festival_filter/output_proto/markers.bin | 0 .../festival_filter/output_xml/xml_file.xml | 0 .../test_cases/festival_filter/testcase.yaml | 0 .../test_cases/is_wall/input/pack/xml_file.xml | 0 .../test_cases/is_wall/output_proto/markers.bin | 0 .../test_cases/is_wall/output_xml/xml_file.xml | 0 .../test_cases/is_wall/testcase.yaml | 0 .../test_cases/map_id/input/pack/xml_file.xml | 0 .../test_cases/map_id/output_proto/markers.bin | 0 .../test_cases/map_id/output_xml/xml_file.xml | 0 .../test_cases/map_id/testcase.yaml | 0 .../map_type_filter/input/pack/xml_file.xml | 0 .../map_type_filter/output_proto/markers.bin | 0 .../map_type_filter/output_xml/xml_file.xml | 0 .../test_cases/map_type_filter/testcase.yaml | 0 .../mount_filter_invalid/input/pack/xml_file.xml | 0 .../mount_filter_invalid/output_proto/markers.bin | 0 .../mount_filter_invalid/output_xml/xml_file.xml | 0 .../test_cases/mount_filter_invalid/testcase.yaml | 0 .../mountfilter_valid/input/pack/xml_file.xml | 0 .../mountfilter_valid/output_proto/markers.bin | 0 .../mountfilter_valid/output_xml/xml_file.xml | 0 .../test_cases/mountfilter_valid/testcase.yaml | 0 .../profession_filter/input/pack/xml_file.xml | 0 .../profession_filter/output_proto/markers.bin | 0 .../profession_filter/output_xml/xml_file.xml | 0 .../test_cases/profession_filter/testcase.yaml | 0 .../specialization_filter/input/pack/xml_file.xml | 0 .../specialization_filter/output_proto/markers.bin | 0 .../specialization_filter/output_xml/xml_file.xml | 0 .../test_cases/specialization_filter/testcase.yaml | 0 .../species_filter/input/pack/xml_file.xml | 0 .../species_filter/output_proto/markers.bin | 0 .../species_filter/output_xml/xml_file.xml | 0 .../test_cases/species_filter/testcase.yaml | 0 .../test_cases/texture/input/pack/xml_file.xml | 0 .../test_cases/texture/output_proto/markers.bin | Bin .../test_cases/texture/output_xml/xml_file.xml | 0 .../test_cases/texture/testcase.yaml | 0 xml_converter/presubmit.sh | 2 +- 78 files changed, 1 insertion(+), 1 deletion(-) rename xml_converter/{intigration_tests => integration_tests}/.gitignore (100%) rename xml_converter/{intigration_tests => integration_tests}/make_test.sh (100%) rename xml_converter/{intigration_tests => integration_tests}/presubmit.sh (100%) rename xml_converter/{intigration_tests => integration_tests}/run_tests.py (100%) rename xml_converter/{intigration_tests => integration_tests}/src/__init__.py (100%) rename xml_converter/{intigration_tests => integration_tests}/src/proto_utils.py (100%) rename xml_converter/{intigration_tests => integration_tests}/src/testcase_loader.py (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/achievement_bitmask_valid/input/pack/xml_file.xml (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/achievement_bitmask_valid/output_proto/markers.bin (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/achievement_bitmask_valid/output_xml/xml_file.xml (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/achievement_bitmask_valid/testcase.yaml (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/achievement_id/input/pack/xml_file.xml (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/achievement_id/output_proto/markers.bin (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/achievement_id/output_xml/xml_file.xml (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/achievement_id/testcase.yaml (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/animation_speed/input/pack/trail.trl (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/animation_speed/input/pack/xml_file.xml (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/animation_speed/output_proto/markers.bin (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/animation_speed/output_xml/temp_name_of_trail.trl (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/animation_speed/output_xml/xml_file.xml (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/animation_speed/testcase.yaml (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/canfade_invalid/input/pack/xml_file.xml (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/canfade_invalid/output_proto/markers.bin (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/canfade_invalid/output_xml/xml_file.xml (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/canfade_invalid/testcase.yaml (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/canfade_valid/input/pack/xml_file.xml (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/canfade_valid/output_proto/markers.bin (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/canfade_valid/output_xml/xml_file.xml (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/canfade_valid/testcase.yaml (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/cull_chirality/input/pack/xml_file.xml (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/cull_chirality/output_proto/markers.bin (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/cull_chirality/output_xml/xml_file.xml (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/cull_chirality/testcase.yaml (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/fade_distance/input/pack/xml_file.xml (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/fade_distance/output_proto/markers.bin (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/fade_distance/output_xml/xml_file.xml (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/fade_distance/testcase.yaml (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/festival_filter/input/pack/xml_file.xml (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/festival_filter/output_proto/markers.bin (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/festival_filter/output_xml/xml_file.xml (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/festival_filter/testcase.yaml (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/is_wall/input/pack/xml_file.xml (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/is_wall/output_proto/markers.bin (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/is_wall/output_xml/xml_file.xml (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/is_wall/testcase.yaml (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/map_id/input/pack/xml_file.xml (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/map_id/output_proto/markers.bin (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/map_id/output_xml/xml_file.xml (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/map_id/testcase.yaml (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/map_type_filter/input/pack/xml_file.xml (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/map_type_filter/output_proto/markers.bin (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/map_type_filter/output_xml/xml_file.xml (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/map_type_filter/testcase.yaml (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/mount_filter_invalid/input/pack/xml_file.xml (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/mount_filter_invalid/output_proto/markers.bin (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/mount_filter_invalid/output_xml/xml_file.xml (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/mount_filter_invalid/testcase.yaml (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/mountfilter_valid/input/pack/xml_file.xml (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/mountfilter_valid/output_proto/markers.bin (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/mountfilter_valid/output_xml/xml_file.xml (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/mountfilter_valid/testcase.yaml (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/profession_filter/input/pack/xml_file.xml (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/profession_filter/output_proto/markers.bin (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/profession_filter/output_xml/xml_file.xml (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/profession_filter/testcase.yaml (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/specialization_filter/input/pack/xml_file.xml (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/specialization_filter/output_proto/markers.bin (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/specialization_filter/output_xml/xml_file.xml (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/specialization_filter/testcase.yaml (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/species_filter/input/pack/xml_file.xml (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/species_filter/output_proto/markers.bin (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/species_filter/output_xml/xml_file.xml (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/species_filter/testcase.yaml (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/texture/input/pack/xml_file.xml (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/texture/output_proto/markers.bin (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/texture/output_xml/xml_file.xml (100%) rename xml_converter/{intigration_tests => integration_tests}/test_cases/texture/testcase.yaml (100%) diff --git a/xml_converter/intigration_tests/.gitignore b/xml_converter/integration_tests/.gitignore similarity index 100% rename from xml_converter/intigration_tests/.gitignore rename to xml_converter/integration_tests/.gitignore diff --git a/xml_converter/intigration_tests/make_test.sh b/xml_converter/integration_tests/make_test.sh similarity index 100% rename from xml_converter/intigration_tests/make_test.sh rename to xml_converter/integration_tests/make_test.sh diff --git a/xml_converter/intigration_tests/presubmit.sh b/xml_converter/integration_tests/presubmit.sh similarity index 100% rename from xml_converter/intigration_tests/presubmit.sh rename to xml_converter/integration_tests/presubmit.sh diff --git a/xml_converter/intigration_tests/run_tests.py b/xml_converter/integration_tests/run_tests.py similarity index 100% rename from xml_converter/intigration_tests/run_tests.py rename to xml_converter/integration_tests/run_tests.py diff --git a/xml_converter/intigration_tests/src/__init__.py b/xml_converter/integration_tests/src/__init__.py similarity index 100% rename from xml_converter/intigration_tests/src/__init__.py rename to xml_converter/integration_tests/src/__init__.py diff --git a/xml_converter/intigration_tests/src/proto_utils.py b/xml_converter/integration_tests/src/proto_utils.py similarity index 100% rename from xml_converter/intigration_tests/src/proto_utils.py rename to xml_converter/integration_tests/src/proto_utils.py diff --git a/xml_converter/intigration_tests/src/testcase_loader.py b/xml_converter/integration_tests/src/testcase_loader.py similarity index 100% rename from xml_converter/intigration_tests/src/testcase_loader.py rename to xml_converter/integration_tests/src/testcase_loader.py diff --git a/xml_converter/intigration_tests/test_cases/achievement_bitmask_valid/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/achievement_bitmask_valid/input/pack/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/test_cases/achievement_bitmask_valid/input/pack/xml_file.xml rename to xml_converter/integration_tests/test_cases/achievement_bitmask_valid/input/pack/xml_file.xml diff --git a/xml_converter/intigration_tests/test_cases/achievement_bitmask_valid/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/achievement_bitmask_valid/output_proto/markers.bin similarity index 100% rename from xml_converter/intigration_tests/test_cases/achievement_bitmask_valid/output_proto/markers.bin rename to xml_converter/integration_tests/test_cases/achievement_bitmask_valid/output_proto/markers.bin diff --git a/xml_converter/intigration_tests/test_cases/achievement_bitmask_valid/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/achievement_bitmask_valid/output_xml/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/test_cases/achievement_bitmask_valid/output_xml/xml_file.xml rename to xml_converter/integration_tests/test_cases/achievement_bitmask_valid/output_xml/xml_file.xml diff --git a/xml_converter/intigration_tests/test_cases/achievement_bitmask_valid/testcase.yaml b/xml_converter/integration_tests/test_cases/achievement_bitmask_valid/testcase.yaml similarity index 100% rename from xml_converter/intigration_tests/test_cases/achievement_bitmask_valid/testcase.yaml rename to xml_converter/integration_tests/test_cases/achievement_bitmask_valid/testcase.yaml diff --git a/xml_converter/intigration_tests/test_cases/achievement_id/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/achievement_id/input/pack/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/test_cases/achievement_id/input/pack/xml_file.xml rename to xml_converter/integration_tests/test_cases/achievement_id/input/pack/xml_file.xml diff --git a/xml_converter/intigration_tests/test_cases/achievement_id/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/achievement_id/output_proto/markers.bin similarity index 100% rename from xml_converter/intigration_tests/test_cases/achievement_id/output_proto/markers.bin rename to xml_converter/integration_tests/test_cases/achievement_id/output_proto/markers.bin diff --git a/xml_converter/intigration_tests/test_cases/achievement_id/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/achievement_id/output_xml/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/test_cases/achievement_id/output_xml/xml_file.xml rename to xml_converter/integration_tests/test_cases/achievement_id/output_xml/xml_file.xml diff --git a/xml_converter/intigration_tests/test_cases/achievement_id/testcase.yaml b/xml_converter/integration_tests/test_cases/achievement_id/testcase.yaml similarity index 100% rename from xml_converter/intigration_tests/test_cases/achievement_id/testcase.yaml rename to xml_converter/integration_tests/test_cases/achievement_id/testcase.yaml diff --git a/xml_converter/intigration_tests/test_cases/animation_speed/input/pack/trail.trl b/xml_converter/integration_tests/test_cases/animation_speed/input/pack/trail.trl similarity index 100% rename from xml_converter/intigration_tests/test_cases/animation_speed/input/pack/trail.trl rename to xml_converter/integration_tests/test_cases/animation_speed/input/pack/trail.trl diff --git a/xml_converter/intigration_tests/test_cases/animation_speed/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/animation_speed/input/pack/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/test_cases/animation_speed/input/pack/xml_file.xml rename to xml_converter/integration_tests/test_cases/animation_speed/input/pack/xml_file.xml diff --git a/xml_converter/intigration_tests/test_cases/animation_speed/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/animation_speed/output_proto/markers.bin similarity index 100% rename from xml_converter/intigration_tests/test_cases/animation_speed/output_proto/markers.bin rename to xml_converter/integration_tests/test_cases/animation_speed/output_proto/markers.bin diff --git a/xml_converter/intigration_tests/test_cases/animation_speed/output_xml/temp_name_of_trail.trl b/xml_converter/integration_tests/test_cases/animation_speed/output_xml/temp_name_of_trail.trl similarity index 100% rename from xml_converter/intigration_tests/test_cases/animation_speed/output_xml/temp_name_of_trail.trl rename to xml_converter/integration_tests/test_cases/animation_speed/output_xml/temp_name_of_trail.trl diff --git a/xml_converter/intigration_tests/test_cases/animation_speed/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/animation_speed/output_xml/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/test_cases/animation_speed/output_xml/xml_file.xml rename to xml_converter/integration_tests/test_cases/animation_speed/output_xml/xml_file.xml diff --git a/xml_converter/intigration_tests/test_cases/animation_speed/testcase.yaml b/xml_converter/integration_tests/test_cases/animation_speed/testcase.yaml similarity index 100% rename from xml_converter/intigration_tests/test_cases/animation_speed/testcase.yaml rename to xml_converter/integration_tests/test_cases/animation_speed/testcase.yaml diff --git a/xml_converter/intigration_tests/test_cases/canfade_invalid/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/canfade_invalid/input/pack/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/test_cases/canfade_invalid/input/pack/xml_file.xml rename to xml_converter/integration_tests/test_cases/canfade_invalid/input/pack/xml_file.xml diff --git a/xml_converter/intigration_tests/test_cases/canfade_invalid/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/canfade_invalid/output_proto/markers.bin similarity index 100% rename from xml_converter/intigration_tests/test_cases/canfade_invalid/output_proto/markers.bin rename to xml_converter/integration_tests/test_cases/canfade_invalid/output_proto/markers.bin diff --git a/xml_converter/intigration_tests/test_cases/canfade_invalid/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/canfade_invalid/output_xml/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/test_cases/canfade_invalid/output_xml/xml_file.xml rename to xml_converter/integration_tests/test_cases/canfade_invalid/output_xml/xml_file.xml diff --git a/xml_converter/intigration_tests/test_cases/canfade_invalid/testcase.yaml b/xml_converter/integration_tests/test_cases/canfade_invalid/testcase.yaml similarity index 100% rename from xml_converter/intigration_tests/test_cases/canfade_invalid/testcase.yaml rename to xml_converter/integration_tests/test_cases/canfade_invalid/testcase.yaml diff --git a/xml_converter/intigration_tests/test_cases/canfade_valid/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/canfade_valid/input/pack/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/test_cases/canfade_valid/input/pack/xml_file.xml rename to xml_converter/integration_tests/test_cases/canfade_valid/input/pack/xml_file.xml diff --git a/xml_converter/intigration_tests/test_cases/canfade_valid/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/canfade_valid/output_proto/markers.bin similarity index 100% rename from xml_converter/intigration_tests/test_cases/canfade_valid/output_proto/markers.bin rename to xml_converter/integration_tests/test_cases/canfade_valid/output_proto/markers.bin diff --git a/xml_converter/intigration_tests/test_cases/canfade_valid/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/canfade_valid/output_xml/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/test_cases/canfade_valid/output_xml/xml_file.xml rename to xml_converter/integration_tests/test_cases/canfade_valid/output_xml/xml_file.xml diff --git a/xml_converter/intigration_tests/test_cases/canfade_valid/testcase.yaml b/xml_converter/integration_tests/test_cases/canfade_valid/testcase.yaml similarity index 100% rename from xml_converter/intigration_tests/test_cases/canfade_valid/testcase.yaml rename to xml_converter/integration_tests/test_cases/canfade_valid/testcase.yaml diff --git a/xml_converter/intigration_tests/test_cases/cull_chirality/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/cull_chirality/input/pack/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/test_cases/cull_chirality/input/pack/xml_file.xml rename to xml_converter/integration_tests/test_cases/cull_chirality/input/pack/xml_file.xml diff --git a/xml_converter/intigration_tests/test_cases/cull_chirality/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/cull_chirality/output_proto/markers.bin similarity index 100% rename from xml_converter/intigration_tests/test_cases/cull_chirality/output_proto/markers.bin rename to xml_converter/integration_tests/test_cases/cull_chirality/output_proto/markers.bin diff --git a/xml_converter/intigration_tests/test_cases/cull_chirality/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/cull_chirality/output_xml/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/test_cases/cull_chirality/output_xml/xml_file.xml rename to xml_converter/integration_tests/test_cases/cull_chirality/output_xml/xml_file.xml diff --git a/xml_converter/intigration_tests/test_cases/cull_chirality/testcase.yaml b/xml_converter/integration_tests/test_cases/cull_chirality/testcase.yaml similarity index 100% rename from xml_converter/intigration_tests/test_cases/cull_chirality/testcase.yaml rename to xml_converter/integration_tests/test_cases/cull_chirality/testcase.yaml diff --git a/xml_converter/intigration_tests/test_cases/fade_distance/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/fade_distance/input/pack/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/test_cases/fade_distance/input/pack/xml_file.xml rename to xml_converter/integration_tests/test_cases/fade_distance/input/pack/xml_file.xml diff --git a/xml_converter/intigration_tests/test_cases/fade_distance/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/fade_distance/output_proto/markers.bin similarity index 100% rename from xml_converter/intigration_tests/test_cases/fade_distance/output_proto/markers.bin rename to xml_converter/integration_tests/test_cases/fade_distance/output_proto/markers.bin diff --git a/xml_converter/intigration_tests/test_cases/fade_distance/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/fade_distance/output_xml/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/test_cases/fade_distance/output_xml/xml_file.xml rename to xml_converter/integration_tests/test_cases/fade_distance/output_xml/xml_file.xml diff --git a/xml_converter/intigration_tests/test_cases/fade_distance/testcase.yaml b/xml_converter/integration_tests/test_cases/fade_distance/testcase.yaml similarity index 100% rename from xml_converter/intigration_tests/test_cases/fade_distance/testcase.yaml rename to xml_converter/integration_tests/test_cases/fade_distance/testcase.yaml diff --git a/xml_converter/intigration_tests/test_cases/festival_filter/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/festival_filter/input/pack/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/test_cases/festival_filter/input/pack/xml_file.xml rename to xml_converter/integration_tests/test_cases/festival_filter/input/pack/xml_file.xml diff --git a/xml_converter/intigration_tests/test_cases/festival_filter/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/festival_filter/output_proto/markers.bin similarity index 100% rename from xml_converter/intigration_tests/test_cases/festival_filter/output_proto/markers.bin rename to xml_converter/integration_tests/test_cases/festival_filter/output_proto/markers.bin diff --git a/xml_converter/intigration_tests/test_cases/festival_filter/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/festival_filter/output_xml/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/test_cases/festival_filter/output_xml/xml_file.xml rename to xml_converter/integration_tests/test_cases/festival_filter/output_xml/xml_file.xml diff --git a/xml_converter/intigration_tests/test_cases/festival_filter/testcase.yaml b/xml_converter/integration_tests/test_cases/festival_filter/testcase.yaml similarity index 100% rename from xml_converter/intigration_tests/test_cases/festival_filter/testcase.yaml rename to xml_converter/integration_tests/test_cases/festival_filter/testcase.yaml diff --git a/xml_converter/intigration_tests/test_cases/is_wall/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/is_wall/input/pack/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/test_cases/is_wall/input/pack/xml_file.xml rename to xml_converter/integration_tests/test_cases/is_wall/input/pack/xml_file.xml diff --git a/xml_converter/intigration_tests/test_cases/is_wall/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/is_wall/output_proto/markers.bin similarity index 100% rename from xml_converter/intigration_tests/test_cases/is_wall/output_proto/markers.bin rename to xml_converter/integration_tests/test_cases/is_wall/output_proto/markers.bin diff --git a/xml_converter/intigration_tests/test_cases/is_wall/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/is_wall/output_xml/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/test_cases/is_wall/output_xml/xml_file.xml rename to xml_converter/integration_tests/test_cases/is_wall/output_xml/xml_file.xml diff --git a/xml_converter/intigration_tests/test_cases/is_wall/testcase.yaml b/xml_converter/integration_tests/test_cases/is_wall/testcase.yaml similarity index 100% rename from xml_converter/intigration_tests/test_cases/is_wall/testcase.yaml rename to xml_converter/integration_tests/test_cases/is_wall/testcase.yaml diff --git a/xml_converter/intigration_tests/test_cases/map_id/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/map_id/input/pack/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/test_cases/map_id/input/pack/xml_file.xml rename to xml_converter/integration_tests/test_cases/map_id/input/pack/xml_file.xml diff --git a/xml_converter/intigration_tests/test_cases/map_id/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/map_id/output_proto/markers.bin similarity index 100% rename from xml_converter/intigration_tests/test_cases/map_id/output_proto/markers.bin rename to xml_converter/integration_tests/test_cases/map_id/output_proto/markers.bin diff --git a/xml_converter/intigration_tests/test_cases/map_id/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/map_id/output_xml/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/test_cases/map_id/output_xml/xml_file.xml rename to xml_converter/integration_tests/test_cases/map_id/output_xml/xml_file.xml diff --git a/xml_converter/intigration_tests/test_cases/map_id/testcase.yaml b/xml_converter/integration_tests/test_cases/map_id/testcase.yaml similarity index 100% rename from xml_converter/intigration_tests/test_cases/map_id/testcase.yaml rename to xml_converter/integration_tests/test_cases/map_id/testcase.yaml diff --git a/xml_converter/intigration_tests/test_cases/map_type_filter/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/map_type_filter/input/pack/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/test_cases/map_type_filter/input/pack/xml_file.xml rename to xml_converter/integration_tests/test_cases/map_type_filter/input/pack/xml_file.xml diff --git a/xml_converter/intigration_tests/test_cases/map_type_filter/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/map_type_filter/output_proto/markers.bin similarity index 100% rename from xml_converter/intigration_tests/test_cases/map_type_filter/output_proto/markers.bin rename to xml_converter/integration_tests/test_cases/map_type_filter/output_proto/markers.bin diff --git a/xml_converter/intigration_tests/test_cases/map_type_filter/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/map_type_filter/output_xml/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/test_cases/map_type_filter/output_xml/xml_file.xml rename to xml_converter/integration_tests/test_cases/map_type_filter/output_xml/xml_file.xml diff --git a/xml_converter/intigration_tests/test_cases/map_type_filter/testcase.yaml b/xml_converter/integration_tests/test_cases/map_type_filter/testcase.yaml similarity index 100% rename from xml_converter/intigration_tests/test_cases/map_type_filter/testcase.yaml rename to xml_converter/integration_tests/test_cases/map_type_filter/testcase.yaml diff --git a/xml_converter/intigration_tests/test_cases/mount_filter_invalid/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/mount_filter_invalid/input/pack/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/test_cases/mount_filter_invalid/input/pack/xml_file.xml rename to xml_converter/integration_tests/test_cases/mount_filter_invalid/input/pack/xml_file.xml diff --git a/xml_converter/intigration_tests/test_cases/mount_filter_invalid/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/mount_filter_invalid/output_proto/markers.bin similarity index 100% rename from xml_converter/intigration_tests/test_cases/mount_filter_invalid/output_proto/markers.bin rename to xml_converter/integration_tests/test_cases/mount_filter_invalid/output_proto/markers.bin diff --git a/xml_converter/intigration_tests/test_cases/mount_filter_invalid/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/mount_filter_invalid/output_xml/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/test_cases/mount_filter_invalid/output_xml/xml_file.xml rename to xml_converter/integration_tests/test_cases/mount_filter_invalid/output_xml/xml_file.xml diff --git a/xml_converter/intigration_tests/test_cases/mount_filter_invalid/testcase.yaml b/xml_converter/integration_tests/test_cases/mount_filter_invalid/testcase.yaml similarity index 100% rename from xml_converter/intigration_tests/test_cases/mount_filter_invalid/testcase.yaml rename to xml_converter/integration_tests/test_cases/mount_filter_invalid/testcase.yaml diff --git a/xml_converter/intigration_tests/test_cases/mountfilter_valid/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/mountfilter_valid/input/pack/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/test_cases/mountfilter_valid/input/pack/xml_file.xml rename to xml_converter/integration_tests/test_cases/mountfilter_valid/input/pack/xml_file.xml diff --git a/xml_converter/intigration_tests/test_cases/mountfilter_valid/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/mountfilter_valid/output_proto/markers.bin similarity index 100% rename from xml_converter/intigration_tests/test_cases/mountfilter_valid/output_proto/markers.bin rename to xml_converter/integration_tests/test_cases/mountfilter_valid/output_proto/markers.bin diff --git a/xml_converter/intigration_tests/test_cases/mountfilter_valid/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/mountfilter_valid/output_xml/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/test_cases/mountfilter_valid/output_xml/xml_file.xml rename to xml_converter/integration_tests/test_cases/mountfilter_valid/output_xml/xml_file.xml diff --git a/xml_converter/intigration_tests/test_cases/mountfilter_valid/testcase.yaml b/xml_converter/integration_tests/test_cases/mountfilter_valid/testcase.yaml similarity index 100% rename from xml_converter/intigration_tests/test_cases/mountfilter_valid/testcase.yaml rename to xml_converter/integration_tests/test_cases/mountfilter_valid/testcase.yaml diff --git a/xml_converter/intigration_tests/test_cases/profession_filter/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/profession_filter/input/pack/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/test_cases/profession_filter/input/pack/xml_file.xml rename to xml_converter/integration_tests/test_cases/profession_filter/input/pack/xml_file.xml diff --git a/xml_converter/intigration_tests/test_cases/profession_filter/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/profession_filter/output_proto/markers.bin similarity index 100% rename from xml_converter/intigration_tests/test_cases/profession_filter/output_proto/markers.bin rename to xml_converter/integration_tests/test_cases/profession_filter/output_proto/markers.bin diff --git a/xml_converter/intigration_tests/test_cases/profession_filter/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/profession_filter/output_xml/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/test_cases/profession_filter/output_xml/xml_file.xml rename to xml_converter/integration_tests/test_cases/profession_filter/output_xml/xml_file.xml diff --git a/xml_converter/intigration_tests/test_cases/profession_filter/testcase.yaml b/xml_converter/integration_tests/test_cases/profession_filter/testcase.yaml similarity index 100% rename from xml_converter/intigration_tests/test_cases/profession_filter/testcase.yaml rename to xml_converter/integration_tests/test_cases/profession_filter/testcase.yaml diff --git a/xml_converter/intigration_tests/test_cases/specialization_filter/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/specialization_filter/input/pack/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/test_cases/specialization_filter/input/pack/xml_file.xml rename to xml_converter/integration_tests/test_cases/specialization_filter/input/pack/xml_file.xml diff --git a/xml_converter/intigration_tests/test_cases/specialization_filter/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/specialization_filter/output_proto/markers.bin similarity index 100% rename from xml_converter/intigration_tests/test_cases/specialization_filter/output_proto/markers.bin rename to xml_converter/integration_tests/test_cases/specialization_filter/output_proto/markers.bin diff --git a/xml_converter/intigration_tests/test_cases/specialization_filter/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/specialization_filter/output_xml/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/test_cases/specialization_filter/output_xml/xml_file.xml rename to xml_converter/integration_tests/test_cases/specialization_filter/output_xml/xml_file.xml diff --git a/xml_converter/intigration_tests/test_cases/specialization_filter/testcase.yaml b/xml_converter/integration_tests/test_cases/specialization_filter/testcase.yaml similarity index 100% rename from xml_converter/intigration_tests/test_cases/specialization_filter/testcase.yaml rename to xml_converter/integration_tests/test_cases/specialization_filter/testcase.yaml diff --git a/xml_converter/intigration_tests/test_cases/species_filter/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/species_filter/input/pack/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/test_cases/species_filter/input/pack/xml_file.xml rename to xml_converter/integration_tests/test_cases/species_filter/input/pack/xml_file.xml diff --git a/xml_converter/intigration_tests/test_cases/species_filter/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/species_filter/output_proto/markers.bin similarity index 100% rename from xml_converter/intigration_tests/test_cases/species_filter/output_proto/markers.bin rename to xml_converter/integration_tests/test_cases/species_filter/output_proto/markers.bin diff --git a/xml_converter/intigration_tests/test_cases/species_filter/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/species_filter/output_xml/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/test_cases/species_filter/output_xml/xml_file.xml rename to xml_converter/integration_tests/test_cases/species_filter/output_xml/xml_file.xml diff --git a/xml_converter/intigration_tests/test_cases/species_filter/testcase.yaml b/xml_converter/integration_tests/test_cases/species_filter/testcase.yaml similarity index 100% rename from xml_converter/intigration_tests/test_cases/species_filter/testcase.yaml rename to xml_converter/integration_tests/test_cases/species_filter/testcase.yaml diff --git a/xml_converter/intigration_tests/test_cases/texture/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/texture/input/pack/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/test_cases/texture/input/pack/xml_file.xml rename to xml_converter/integration_tests/test_cases/texture/input/pack/xml_file.xml diff --git a/xml_converter/intigration_tests/test_cases/texture/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/texture/output_proto/markers.bin similarity index 100% rename from xml_converter/intigration_tests/test_cases/texture/output_proto/markers.bin rename to xml_converter/integration_tests/test_cases/texture/output_proto/markers.bin diff --git a/xml_converter/intigration_tests/test_cases/texture/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/texture/output_xml/xml_file.xml similarity index 100% rename from xml_converter/intigration_tests/test_cases/texture/output_xml/xml_file.xml rename to xml_converter/integration_tests/test_cases/texture/output_xml/xml_file.xml diff --git a/xml_converter/intigration_tests/test_cases/texture/testcase.yaml b/xml_converter/integration_tests/test_cases/texture/testcase.yaml similarity index 100% rename from xml_converter/intigration_tests/test_cases/texture/testcase.yaml rename to xml_converter/integration_tests/test_cases/texture/testcase.yaml diff --git a/xml_converter/presubmit.sh b/xml_converter/presubmit.sh index 53c3235d..02e015f0 100755 --- a/xml_converter/presubmit.sh +++ b/xml_converter/presubmit.sh @@ -70,7 +70,7 @@ fi popd # Run the python presubmit for the "integration_tests" subdirectory. -pushd intigration_tests +pushd integration_tests ./presubmit.sh if (( $? > 0 )); then error_count=`expr $error_count + 1` From 5c1b9c6461e529f0e35e1d79a06b79356d6f7a5a Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sat, 30 Dec 2023 05:20:33 -0600 Subject: [PATCH 383/539] adding a helpful comment to explain proto index rules --- xml_converter/proto/waypoint.proto | 47 ++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/xml_converter/proto/waypoint.proto b/xml_converter/proto/waypoint.proto index d845d80b..71c50d16 100644 --- a/xml_converter/proto/waypoint.proto +++ b/xml_converter/proto/waypoint.proto @@ -306,3 +306,50 @@ message TrailData { repeated float points_z = 4; } +//////////////////////////////////////////////////////////////////////////////// +// proto creation guidelines +// +// Fields +// ====== +// Field indexes are backwards and forwards compatible per this design, meaning +// that any proto should be parseable by both older and newer clients without +// issue. This means that if an attribute is assigned an index then no other +// field should ever be assigned that index as well. Larger indexes require +// more bytes to encode. As a result the smaller indexes are highly protected +// while larger indexes numbers a mostly unregulated. +// +// Core Fields: Indexes 1-15 +// ------------------------- +// The first 15 indexes are the only indexes that will take just a single byte +// to store. These should only be used for attributes that are the most common. +// In order to create a new field with a number in this range it must be an +// effectively required field or very common field to warrant using only a +// single byte. +// +// Additional Fields: Indexes 16-2047 +// ---------------------------------- +// The next 2032 numbers are for additional fields. These are fields that are +// permanent but not as common as the Core Fields. Possibly optional arguments +// for their message, or metadata. A field must be finalized before it can be +// set with an ID in this range, no experimental values should be present. +// +// Experimental Fields: Indexes 2048-262143+ +// --------------------------------------------- +// All other IDs are considered experimental. Any index up to 232143 will use +// 3 bytes of identification. The only requirement for creating a field with +// an id in this range is that no other field has ever used that ID before. +// Fields that are experimental may be prefixed with some value to indicate +// which project is experimenting with them. This will help ensure the name +// of the experimental field does not conflict with name of the possible future +// field the experiment is for. +// +// Messages +// ======== +// Messages have little effective permanent costs outside of JSON exports and +// imports. As such there is no issue with creating new messages for any +// reason so long as they do not conflict with any other message names. +// Messages that are still under development may be prefixed with some value to +// indicate which project is experimenting with them. This will prevent the +// name of the message from conflicting with the name of the possible future +// message the experimental message is for. +//////////////////////////////////////////////////////////////////////////////// From 4df5c1bef1b9b06793089a02e6ec67d4b0454432 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sat, 30 Dec 2023 16:55:14 -0500 Subject: [PATCH 384/539] Edit to scene from merge --- Spatial.tscn | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Spatial.tscn b/Spatial.tscn index 7913cb03..286a1a1c 100644 --- a/Spatial.tscn +++ b/Spatial.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=18 format=2] +[gd_scene load_steps=19 format=2] [ext_resource path="res://Spatial.gd" type="Script" id=1] [ext_resource path="res://shaders/range_indicators.shader" type="Shader" id=2] @@ -12,8 +12,8 @@ [ext_resource path="res://icon_new_point.png" type="Texture" id=11] [ext_resource path="res://SettingsDialog.gd" type="Script" id=12] [ext_resource path="res://Category3D.gd" type="Script" id=13] -[ext_resource path="res://Category2D.gd" type="Script" id=15] [ext_resource path="res://PackDialog.gd" type="Script" id=14] +[ext_resource path="res://Category2D.gd" type="Script" id=15] [sub_resource type="Shader" id=1] code = "shader_type canvas_item; @@ -194,17 +194,17 @@ mode = 2 access = 2 current_dir = "/home/steph/Desktop/Packs" current_path = "/home/steph/Desktop/Packs/" -script = ExtResource( 13 ) +script = ExtResource( 14 ) __meta__ = { "_edit_use_anchors_": false } [node name="WindowDialog" type="WindowDialog" parent="Control/Dialogs/FileDialog"] visible = true -margin_left = 108.0 -margin_top = 169.0 -margin_right = 708.0 -margin_bottom = 419.0 +margin_left = 8.0 +margin_top = 8.0 +margin_right = 663.0 +margin_bottom = 462.0 __meta__ = { "_edit_use_anchors_": false } From 309d1b55476a675834239a9023c259ebee6732f8 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sun, 31 Dec 2023 04:55:52 -0600 Subject: [PATCH 385/539] adding functionality to make use of xml write side effects --- xml_converter/doc/trail_data/trail_data.md | 3 +++ .../generators/cpp_templates/class_template.cpp | 2 +- xml_converter/generators/generate_cpp.py | 12 ++++++------ xml_converter/src/attribute/trail_data.cpp | 4 +++- xml_converter/src/attribute/trail_data.hpp | 4 +++- xml_converter/src/trail_gen.cpp | 2 +- 6 files changed, 17 insertions(+), 10 deletions(-) diff --git a/xml_converter/doc/trail_data/trail_data.md b/xml_converter/doc/trail_data/trail_data.md index 44a41608..35ad1556 100644 --- a/xml_converter/doc/trail_data/trail_data.md +++ b/xml_converter/doc/trail_data/trail_data.md @@ -10,6 +10,9 @@ custom_functions: read.xml: function: xml_attribute_to_trail_data side_effects: [Map ID] + write.xml: + function: trail_data_to_xml_attribute + side_effects: [Map ID] --- The coordinates of each point along a trail path. diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index 76d510f8..4b1874be 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -65,7 +65,7 @@ vector {{cpp_class}}::as_xml(XMLWriterState* state) const { {% for attribute_variable in attribute_variables %} {% if attribute_variable.write_to_xml == true %} if (this->{{attribute_variable.attribute_flag_name}}) { - xml_node_contents.push_back({{attribute_variable.serialize_xml_function}}("{{attribute_variable.default_xml_field}}", state, &this->{{attribute_variable.attribute_name}})); + xml_node_contents.push_back({{attribute_variable.serialize_xml_function}}("{{attribute_variable.default_xml_field}}", state, &this->{{attribute_variable.attribute_name}}{% for side_effect in attribute_variable.serialize_xml_side_effects %}, &(this->{{side_effect}}){% endfor %})); } {% endif %} {% endfor %} diff --git a/xml_converter/generators/generate_cpp.py b/xml_converter/generators/generate_cpp.py index a0d6c44b..7547acf4 100644 --- a/xml_converter/generators/generate_cpp.py +++ b/xml_converter/generators/generate_cpp.py @@ -54,7 +54,7 @@ class AttributeVariable: # The function name and additional side effect pointers for xml serialization. serialize_xml_function: str - # serialize_xml_side_effects: List[str] + serialize_xml_side_effects: List[str] # The function name and additional side effect pointers for xml deserialization. deserialize_xml_function: str @@ -309,7 +309,7 @@ def generate_cpp_variable_data( is_component=True, serialize_xml_function=component_class_name + "_to_xml_attribute", - # serialize_xml_side_effects=[], + serialize_xml_side_effects=[], deserialize_xml_function="xml_attribute_to_" + component_class_name, deserialize_xml_side_effects=[], serialize_proto_function="to_proto_" + component_class_name, @@ -386,7 +386,7 @@ def generate_cpp_variable_data( side_effects=side_effects, serialize_xml_function=serialize_xml_function, - # serialize_xml_side_effects=serialize_xml_side_effects, + serialize_xml_side_effects=serialize_xml_side_effects, deserialize_xml_function=deserialize_xml_function, deserialize_xml_side_effects=deserialize_xml_side_effects, serialize_proto_function=serialize_proto_function, @@ -480,7 +480,7 @@ def write_attribute(output_directory: str, data: Dict[str, Document]) -> List[st deserialize_xml_function="", serialize_proto_function="", deserialize_proto_function="", - # serialize_xml_side_effects=[], + serialize_xml_side_effects=[], deserialize_xml_side_effects=[], # serialize_proto_side_effects=[], deserialize_proto_side_effects=[], @@ -515,7 +515,7 @@ def write_attribute(output_directory: str, data: Dict[str, Document]) -> List[st deserialize_xml_function="", serialize_proto_function="", deserialize_proto_function="", - # serialize_xml_side_effects=[], + serialize_xml_side_effects=[], deserialize_xml_side_effects=[], # serialize_proto_side_effects=[], deserialize_proto_side_effects=[], @@ -543,7 +543,7 @@ def write_attribute(output_directory: str, data: Dict[str, Document]) -> List[st deserialize_xml_function="", serialize_proto_function="", deserialize_proto_function="", - # serialize_xml_side_effects=[], + serialize_xml_side_effects=[], deserialize_xml_side_effects=[], # serialize_proto_side_effects=[], deserialize_proto_side_effects=[], diff --git a/xml_converter/src/attribute/trail_data.cpp b/xml_converter/src/attribute/trail_data.cpp index f17463ac..1d4494ff 100644 --- a/xml_converter/src/attribute/trail_data.cpp +++ b/xml_converter/src/attribute/trail_data.cpp @@ -85,7 +85,9 @@ void xml_attribute_to_trail_data( string trail_data_to_xml_attribute( const string& attribute_name, XMLWriterState* state, - const TrailData* value) { + const TrailData* value, + const int* map_id_value, + const bool* is_map_id_set) { return " " + attribute_name + "=\"" + "temp_name_of_trail.trl" + "\""; } diff --git a/xml_converter/src/attribute/trail_data.hpp b/xml_converter/src/attribute/trail_data.hpp index 733b03f1..29e96d05 100644 --- a/xml_converter/src/attribute/trail_data.hpp +++ b/xml_converter/src/attribute/trail_data.hpp @@ -35,7 +35,9 @@ void xml_attribute_to_trail_data( std::string trail_data_to_xml_attribute( const std::string& attribute_name, XMLWriterState* state, - const TrailData* value); + const TrailData* value, + const int* map_id_value, + const bool* is_map_id_set); void proto_to_trail_data( waypoint::TrailData input, diff --git a/xml_converter/src/trail_gen.cpp b/xml_converter/src/trail_gen.cpp index d5c1e681..23367e69 100644 --- a/xml_converter/src/trail_gen.cpp +++ b/xml_converter/src/trail_gen.cpp @@ -235,7 +235,7 @@ vector Trail::as_xml(XMLWriterState* state) const { xml_node_contents.push_back(image_to_xml_attribute("Texture", state, &this->texture)); } if (this->trail_data_is_set) { - xml_node_contents.push_back(trail_data_to_xml_attribute("TrailData", state, &this->trail_data)); + xml_node_contents.push_back(trail_data_to_xml_attribute("TrailData", state, &this->trail_data, &(this->map_id), &(this->map_id_is_set))); } if (this->trail_scale_is_set) { xml_node_contents.push_back(float_to_xml_attribute("TrailScale", state, &this->trail_scale)); From a0bb0a17ccc7d2c0e2d5450852c037c3205680f0 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sun, 31 Dec 2023 05:24:17 -0600 Subject: [PATCH 386/539] Writing out .trl files on xml export --- ...name_of_trail.trl => 037aa160e392f1c8.trl} | Bin .../animation_speed/output_xml/xml_file.xml | 24 +++---- xml_converter/src/attribute/trail_data.cpp | 60 +++++++++++++++++- xml_converter/src/packaging_xml.cpp | 1 + .../src/state_structs/xml_writer_state.hpp | 3 + xml_converter/src/string_helper.cpp | 17 +++++ xml_converter/src/string_helper.hpp | 2 + 7 files changed, 94 insertions(+), 13 deletions(-) rename xml_converter/integration_tests/test_cases/animation_speed/output_xml/{temp_name_of_trail.trl => 037aa160e392f1c8.trl} (100%) diff --git a/xml_converter/integration_tests/test_cases/animation_speed/output_xml/temp_name_of_trail.trl b/xml_converter/integration_tests/test_cases/animation_speed/output_xml/037aa160e392f1c8.trl similarity index 100% rename from xml_converter/integration_tests/test_cases/animation_speed/output_xml/temp_name_of_trail.trl rename to xml_converter/integration_tests/test_cases/animation_speed/output_xml/037aa160e392f1c8.trl diff --git a/xml_converter/integration_tests/test_cases/animation_speed/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/animation_speed/output_xml/xml_file.xml index 61c293ba..d3c71cf6 100644 --- a/xml_converter/integration_tests/test_cases/animation_speed/output_xml/xml_file.xml +++ b/xml_converter/integration_tests/test_cases/animation_speed/output_xml/xml_file.xml @@ -3,17 +3,17 @@ - - - - - - - - - - - - + + + + + + + + + + + + diff --git a/xml_converter/src/attribute/trail_data.cpp b/xml_converter/src/attribute/trail_data.cpp index 1d4494ff..0c09a593 100644 --- a/xml_converter/src/attribute/trail_data.cpp +++ b/xml_converter/src/attribute/trail_data.cpp @@ -3,14 +3,17 @@ #include #include +#include #include #include #include +#include #include "../packaging_xml.hpp" #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" #include "waypoint.pb.h" +#include "../string_helper.hpp" using namespace std; @@ -75,6 +78,22 @@ void xml_attribute_to_trail_data( *is_set = true; } + +//////////////////////////////////////////////////////////////////////////////// +// djb2_hash +// +// A simple non cryptographic hash that we use to deterministically generate the +// filename of the trl files. +//////////////////////////////////////////////////////////////////////////////// +unsigned long djb2_hash(const unsigned char* str, size_t length) { + unsigned long hash = 5381; + for (size_t i = 0; i < length; i++) { + hash = ((hash << 5) + hash) + str[i]; /* hash * 33 + c */ + } + return hash; +} + + //////////////////////////////////////////////////////////////////////////////// // trail_data_to_xml_attribute // @@ -82,13 +101,52 @@ void xml_attribute_to_trail_data( // TODO: Write ".trl" files from data // TOOD: Determine a better trail path name //////////////////////////////////////////////////////////////////////////////// +uint32_t trail_version_number = 0; string trail_data_to_xml_attribute( const string& attribute_name, XMLWriterState* state, const TrailData* value, const int* map_id_value, const bool* is_map_id_set) { - return " " + attribute_name + "=\"" + "temp_name_of_trail.trl" + "\""; + + size_t byte_array_size = sizeof(int) + sizeof(uint32_t) + value->points_x.size() * 3 * sizeof(float); + unsigned char* byte_array = new unsigned char[byte_array_size]; + + size_t offset = 0; + std::memcpy(byte_array + offset, &trail_version_number, sizeof(trail_version_number)); + offset += sizeof(trail_version_number); + + std::memcpy(byte_array + offset, map_id_value, sizeof(*map_id_value)); + offset += sizeof(*map_id_value); + + for (size_t i = 0; i < value->points_x.size(); i++) { + std::memcpy(byte_array + offset, &value->points_x[i], sizeof(float)); + offset += sizeof(float); + std::memcpy(byte_array + offset, &value->points_y[i], sizeof(float)); + offset += sizeof(float); + std::memcpy(byte_array + offset, &value->points_z[i], sizeof(float)); + offset += sizeof(float); + } + + // Sanity check offset is where we think it should be. + if (offset != byte_array_size) { + cerr << "Found more data to write then we thought. This might mean there is a programming issue for serializing trl files." << endl; + cerr << "Found " << offset << " instead of " << byte_array_size << endl; + } + + string trail_file_name = long_to_hex_string(djb2_hash(byte_array, byte_array_size)) + ".trl"; + string trail_file_path = join_file_paths(state->filedir, trail_file_name); + + ofstream trail_data_file(trail_file_path, ios::binary); + + if (!trail_data_file.good()) { + cerr << "Error opening file. " << trail_file_path << endl; + } + trail_data_file.write(reinterpret_cast(byte_array), byte_array_size); + trail_data_file.close(); + + delete[] byte_array; + return " " + attribute_name + "=\"" + trail_file_name + "\""; } //////////////////////////////////////////////////////////////////////////////// diff --git a/xml_converter/src/packaging_xml.cpp b/xml_converter/src/packaging_xml.cpp index b77d7f5e..5efc42ab 100644 --- a/xml_converter/src/packaging_xml.cpp +++ b/xml_converter/src/packaging_xml.cpp @@ -166,6 +166,7 @@ void write_xml_file(string xml_filepath, map* marker_categorie string tab_string; XMLWriterState state; + state.filedir = get_base_dir(xml_filepath); outfile.open(xml_filepath, ios::out); diff --git a/xml_converter/src/state_structs/xml_writer_state.hpp b/xml_converter/src/state_structs/xml_writer_state.hpp index 9443f54e..b1d4c67b 100644 --- a/xml_converter/src/state_structs/xml_writer_state.hpp +++ b/xml_converter/src/state_structs/xml_writer_state.hpp @@ -1,4 +1,7 @@ #pragma once +#include + struct XMLWriterState { + std::string filedir; }; diff --git a/xml_converter/src/string_helper.cpp b/xml_converter/src/string_helper.cpp index 5cac83e0..e6b082e5 100644 --- a/xml_converter/src/string_helper.cpp +++ b/xml_converter/src/string_helper.cpp @@ -295,3 +295,20 @@ string join_file_paths(const string& path_a, const string& path_b) { } return output + path_b; } + +//////////////////////////////////////////////////////////////////////////////// +// long_to_hex_string +// +// A helper function that converts an 8 byte long into a 16 byte hex string. +//////////////////////////////////////////////////////////////////////////////// +const char* hex_chars = "0123456789abcdef"; +std::string long_to_hex_string(uint64_t number) { + std::string hex_string(16, '0'); + + for (int i = 15; i >= 0; --i) { + hex_string[i] = hex_chars[number & 0xF]; + number >>= 4; + } + + return hex_string; +} diff --git a/xml_converter/src/string_helper.hpp b/xml_converter/src/string_helper.hpp index 7c1f4432..89fc3f93 100644 --- a/xml_converter/src/string_helper.hpp +++ b/xml_converter/src/string_helper.hpp @@ -22,3 +22,5 @@ std::vector base64_decode(std::string const&); std::string get_base_dir(std::string filepath); bool has_suffix(std::string const& fullString, std::string const& ending); std::string join_file_paths(const std::string& path_a, const std::string& path_b); + +std::string long_to_hex_string(uint64_t number); From 7e37addbb2559e29d45e889440a4a22fc3f2345b Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sun, 31 Dec 2023 05:26:56 -0600 Subject: [PATCH 387/539] Linter check fixes --- xml_converter/src/attribute/trail_data.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/xml_converter/src/attribute/trail_data.cpp b/xml_converter/src/attribute/trail_data.cpp index 0c09a593..b3f19690 100644 --- a/xml_converter/src/attribute/trail_data.cpp +++ b/xml_converter/src/attribute/trail_data.cpp @@ -4,16 +4,16 @@ #include #include +#include #include #include #include -#include #include "../packaging_xml.hpp" #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" -#include "waypoint.pb.h" #include "../string_helper.hpp" +#include "waypoint.pb.h" using namespace std; @@ -78,22 +78,20 @@ void xml_attribute_to_trail_data( *is_set = true; } - //////////////////////////////////////////////////////////////////////////////// // djb2_hash // // A simple non cryptographic hash that we use to deterministically generate the // filename of the trl files. //////////////////////////////////////////////////////////////////////////////// -unsigned long djb2_hash(const unsigned char* str, size_t length) { - unsigned long hash = 5381; +uint64_t djb2_hash(const unsigned char* str, size_t length) { + uint64_t hash = 5381; for (size_t i = 0; i < length; i++) { hash = ((hash << 5) + hash) + str[i]; /* hash * 33 + c */ } return hash; } - //////////////////////////////////////////////////////////////////////////////// // trail_data_to_xml_attribute // @@ -108,7 +106,6 @@ string trail_data_to_xml_attribute( const TrailData* value, const int* map_id_value, const bool* is_map_id_set) { - size_t byte_array_size = sizeof(int) + sizeof(uint32_t) + value->points_x.size() * 3 * sizeof(float); unsigned char* byte_array = new unsigned char[byte_array_size]; From ff4da0c6078bf29252efcc6c31021978e6835a08 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sun, 31 Dec 2023 06:17:11 -0600 Subject: [PATCH 388/539] Pruning usage of AttributeVariable and cleaning up associated code --- .../cpp_templates/attribute_template.hpp | 10 +-- .../attribute_template_compoundvalue.cpp | 14 +-- .../cpp_templates/attribute_template_enum.cpp | 18 ++-- .../attribute_template_multiflagvalue.cpp | 14 +-- xml_converter/generators/generate_cpp.py | 87 +++++-------------- 5 files changed, 51 insertions(+), 92 deletions(-) diff --git a/xml_converter/generators/cpp_templates/attribute_template.hpp b/xml_converter/generators/cpp_templates/attribute_template.hpp index 66274694..fa68b8f8 100644 --- a/xml_converter/generators/cpp_templates/attribute_template.hpp +++ b/xml_converter/generators/cpp_templates/attribute_template.hpp @@ -15,19 +15,19 @@ class XMLError; enum {{class_name}} { - {% for attribute_variable in attribute_variables: %} - {{attribute_variable.attribute_name}}, + {% for attribute_variable in attribute_components %} + {{attribute_variable.attribute_name}}, {% endfor %} }; -{% else %} +{% elif type in ["CompoundValue", "MultiflagValue"] %} class XMLError; {{proto_field_cpp_type_prototype}} class {{class_name}} { public: - {% for attribute_variable in attribute_variables: %} - {{attribute_variable.cpp_type}} {{attribute_variable.attribute_name}}; + {% for attribute_variable in attribute_components %} + {{attribute_variable.cpp_type}} {{attribute_variable.attribute_name}}; {% endfor %} virtual std::string classname() { diff --git a/xml_converter/generators/cpp_templates/attribute_template_compoundvalue.cpp b/xml_converter/generators/cpp_templates/attribute_template_compoundvalue.cpp index bb6d8204..3b8effa6 100644 --- a/xml_converter/generators/cpp_templates/attribute_template_compoundvalue.cpp +++ b/xml_converter/generators/cpp_templates/attribute_template_compoundvalue.cpp @@ -20,13 +20,13 @@ void xml_attribute_to_{{attribute_name}}( {{class_name}} {{attribute_name}}; vector compound_values; string attributename; - {% for attribute_variable in attribute_variables: %} + {% for attribute_variable in attribute_components %} {{attribute_name}}.{{attribute_variable.attribute_name}} = 0; {% endfor %} attributename = get_attribute_name(input); compound_values = split(get_attribute_value(input), ","); - if (compound_values.size() == {{ attribute_variables|length }}) { - {% for n, attribute_variable in enumerate(attribute_variables) %} + if (compound_values.size() == {{ attribute_components|length }}) { + {% for n, attribute_variable in enumerate(attribute_components) %} {{attribute_name}}.{{attribute_variable.attribute_name}} = std::stof(compound_values[{{n}}]); {% endfor %} } @@ -39,9 +39,9 @@ void xml_attribute_to_{{attribute_name}}( XMLWriterState* state, const {{class_name}}* value) { string output; - {% for n, attribute_variable in enumerate(attribute_variables) %} + {% for n, attribute_variable in enumerate(attribute_components) %} {% if attribute_variable.attribute_name in xml_bundled_components %} - {% if n == 0: %} + {% if n == 0 %} output = to_string(value->{{attribute_variable.attribute_name}}); {% else %} output = output + "," + to_string(value->{{attribute_variable.attribute_name}}); @@ -58,7 +58,7 @@ void proto_to_{{attribute_name}}( {{class_name}}* value, bool* is_set) { {{class_name}} {{attribute_name}}; - {% for attribute_variable in attribute_variables: %} + {% for attribute_variable in attribute_components %} {{attribute_name}}.{{attribute_variable.attribute_name}} = input.{{attribute_variable.protobuf_field}}(); {% endfor %} *value = {{attribute_name}}; @@ -70,7 +70,7 @@ void {{attribute_name}}_to_proto( ProtoWriterState* state, std::function setter) { {{proto_field_cpp_type}}* proto_{{attribute_name}} = new {{proto_field_cpp_type}}(); - {% for attribute_variable in attribute_variables %} + {% for attribute_variable in attribute_components %} proto_{{attribute_name}}->set_{{attribute_variable.protobuf_field}}(value.{{attribute_variable.attribute_name}}); {% endfor %} setter(proto_{{attribute_name}}); diff --git a/xml_converter/generators/cpp_templates/attribute_template_enum.cpp b/xml_converter/generators/cpp_templates/attribute_template_enum.cpp index ae78098b..2d477d4c 100644 --- a/xml_converter/generators/cpp_templates/attribute_template_enum.cpp +++ b/xml_converter/generators/cpp_templates/attribute_template_enum.cpp @@ -20,9 +20,9 @@ void xml_attribute_to_{{attribute_name}}( bool* is_set) { {{class_name}} {{attribute_name}}; string normalized_value = normalize(get_attribute_value(input)); - {% for n, attribute_variable in enumerate(attribute_variables) %} + {% for n, attribute_variable in enumerate(attribute_components) %} {% for i, value in enumerate(attribute_variable.xml_fields) %} - {% if i == 0 and n == 0: %} + {% if i == 0 and n == 0 %} if (normalized_value == "{{value}}") { {{attribute_name}} = {{class_name}}::{{attribute_variable.attribute_name}}; } @@ -35,7 +35,7 @@ void xml_attribute_to_{{attribute_name}}( {% endfor %} else { errors->push_back(new XMLAttributeValueError("Found an invalid value that was not in the Enum {{class_name}}", input)); - {{attribute_name}} = {{class_name}}::{{attribute_variables[0].attribute_name}}; + {{attribute_name}} = {{class_name}}::{{attribute_components[0].attribute_name}}; } *value = {{attribute_name}}; *is_set = true; @@ -45,7 +45,7 @@ string {{attribute_name}}_to_xml_attribute( const std::string& attribute_name, XMLWriterState* state, const {{class_name}}* value) { - {% for n, attribute_variable in enumerate(attribute_variables) %} + {% for n, attribute_variable in enumerate(attribute_components) %} {% for i, value in enumerate(attribute_variable.xml_fields) %} {%-if i == 0 and n == 0:%} if (*value == {{class_name}}::{{attribute_variable.attribute_name}}) { @@ -57,7 +57,7 @@ string {{attribute_name}}_to_xml_attribute( {% endfor %} {% endfor %} else { - return " " + attribute_name + "=\"" + "{{class_name}}::{{attribute_variables[0].xml_fields[0]}}" + "\""; + return " " + attribute_name + "=\"" + "{{class_name}}::{{attribute_components[0].xml_fields[0]}}" + "\""; } } @@ -67,14 +67,14 @@ void proto_to_{{attribute_name}}( {{class_name}}* value, bool* is_set) { switch (input) { - {% for attribute_variable in attribute_variables %} + {% for attribute_variable in attribute_components %} case {{proto_field_cpp_type}}::{{attribute_variable.attribute_name}}: *value = {{class_name}}::{{attribute_variable.attribute_name}}; *is_set = true; break; {% endfor %} default: - *value = {{class_name}}::{{attribute_variables[0].attribute_name}}; + *value = {{class_name}}::{{attribute_components[0].attribute_name}}; *is_set = true; break; } @@ -85,13 +85,13 @@ void {{attribute_name}}_to_proto( ProtoWriterState* state, std::function setter) { switch (value) { - {% for attribute_variable in attribute_variables %} + {% for attribute_variable in attribute_components %} case {{class_name}}::{{attribute_variable.attribute_name}}: setter({{proto_field_cpp_type}}::{{attribute_variable.attribute_name}}); break; {% endfor %} default: - setter({{proto_field_cpp_type}}::{{attribute_variables[0].attribute_name}}); + setter({{proto_field_cpp_type}}::{{attribute_components[0].attribute_name}}); break; } } diff --git a/xml_converter/generators/cpp_templates/attribute_template_multiflagvalue.cpp b/xml_converter/generators/cpp_templates/attribute_template_multiflagvalue.cpp index 64962f2c..d88f4605 100644 --- a/xml_converter/generators/cpp_templates/attribute_template_multiflagvalue.cpp +++ b/xml_converter/generators/cpp_templates/attribute_template_multiflagvalue.cpp @@ -21,19 +21,19 @@ void xml_attribute_to_{{attribute_name}}( {{class_name}} {{attribute_name}}; vector flag_values; flag_values = split(get_attribute_value(input), ","); - {% for attribute_variable in attribute_variables %} + {% for attribute_variable in attribute_components %} {{attribute_name}}.{{attribute_variable.attribute_name}} = false; {% endfor %} for (string flag_value : flag_values) { string normalized_flag_value = normalize(flag_value); - {% for n, attribute_variable in enumerate(attribute_variables) %} + {% for n, attribute_variable in enumerate(attribute_components) %} {% for i, value in enumerate(attribute_variable.xml_fields) %} - {% if i == 0 and n == 0: %} + {% if i == 0 and n == 0 %} if (normalized_flag_value == "{{value}}") { {{attribute_name}}.{{attribute_variable.attribute_name}} = true; } - {% else: %} + {% else %} else if (normalized_flag_value == "{{value}}") { {{attribute_name}}.{{attribute_variable.attribute_name}} = true; } @@ -54,7 +54,7 @@ string {{attribute_name}}_to_xml_attribute( XMLWriterState* state, const {{class_name}}* value) { vector flag_values; - {% for n, attribute_variable in enumerate(attribute_variables)%} + {% for n, attribute_variable in enumerate(attribute_components) %} if (value->{{attribute_variable.attribute_name}} == true) { flag_values.push_back("{{attribute_variable.xml_fields[0]}}"); } @@ -69,7 +69,7 @@ void proto_to_{{attribute_name}}( {{class_name}}* value, bool* is_set) { {{class_name}} {{attribute_name}}; - {% for n, attribute_variable in enumerate(attribute_variables)%} + {% for n, attribute_variable in enumerate(attribute_components) %} {{attribute_name}}.{{attribute_variable.attribute_name}} = input.{{attribute_variable.attribute_name}}(); {% endfor %} *value = {{attribute_name}}; @@ -82,7 +82,7 @@ void {{attribute_name}}_to_proto( std::function setter) { {{proto_field_cpp_type}}* proto_{{attribute_name}} = new {{proto_field_cpp_type}}(); bool should_write = false; - {% for n, attribute_variable in enumerate(attribute_variables)%} + {% for n, attribute_variable in enumerate(attribute_components) %} proto_{{attribute_name}}->set_{{attribute_variable.attribute_name}}(value.{{attribute_variable.attribute_name}}); should_write |= value.{{attribute_variable.attribute_name}}; {% endfor %} diff --git a/xml_converter/generators/generate_cpp.py b/xml_converter/generators/generate_cpp.py index 7547acf4..a5781e1b 100644 --- a/xml_converter/generators/generate_cpp.py +++ b/xml_converter/generators/generate_cpp.py @@ -95,6 +95,14 @@ class AttributeVariable: is_component: bool = False +@dataclass +class AttributeComponent: + attribute_name: str + cpp_type: str + protobuf_field: str + xml_fields: List[str] + + ################################################################################ # CPPInclude # @@ -420,10 +428,7 @@ def write_attribute(output_directory: str, data: Dict[str, Document]) -> List[st lstrip_blocks=True ) attribute_names: Dict[str, str] = {} - attribute_variables: List[AttributeVariable] = [] - attribute_variable: AttributeVariable metadata: Dict[str, SchemaType] = {} - xml_fields: List[str] = [] template: Dict[str, Template] = { "MultiflagValue": env.get_template("attribute_template_multiflagvalue.cpp"), "CompoundValue": env.get_template("attribute_template_compoundvalue.cpp"), @@ -435,7 +440,7 @@ def write_attribute(output_directory: str, data: Dict[str, Document]) -> List[st attribute_names[filepath] = filename.split(".md")[0] for filepath in attribute_names: - attribute_variables = [] + attribute_components: List[AttributeComponent] = [] xml_bundled_components: List[str] = [] metadata[filepath] = data[filepath].metadata attribute_name = attribute_name_from_markdown_data(metadata[filepath]['name']) @@ -453,43 +458,24 @@ def write_attribute(output_directory: str, data: Dict[str, Document]) -> List[st print("Proto Field prototype differes between different marker types for ", metadata[filepath]["protobuf_field"]) proto_field_prototype = new_prototype - proto_drilldown_calls: str - mutable_proto_drilldown_calls: str protobuf_field: str - proto_drilldown_calls, mutable_proto_drilldown_calls, protobuf_field = split_field_into_drilldown(metadata[filepath]["protobuf_field"]) + _, _, protobuf_field = split_field_into_drilldown(metadata[filepath]["protobuf_field"]) + xml_fields: List[str] = [] if metadata[filepath]['type'] == "MultiflagValue": for flag in metadata[filepath]['flags']: - xml_fields = [] for item in metadata[filepath]['flags'][flag]: xml_fields.append(normalize(item)) - - # TODO: Replace AttributeVariable with a more fitting dataclass - attribute_variable = AttributeVariable( + attribute_component = AttributeComponent( attribute_name=flag, - attribute_type=metadata[filepath]['type'], cpp_type="bool", - class_name=attribute_name, xml_fields=xml_fields, protobuf_field=protobuf_field, - proto_drilldown_calls=proto_drilldown_calls, - mutable_proto_drilldown_calls=mutable_proto_drilldown_calls, - protobuf_cpp_type="", - is_proto_field_scalar=False, - serialize_xml_function="", - deserialize_xml_function="", - serialize_proto_function="", - deserialize_proto_function="", - serialize_xml_side_effects=[], - deserialize_xml_side_effects=[], - # serialize_proto_side_effects=[], - deserialize_proto_side_effects=[], ) - attribute_variables.append(attribute_variable) + attribute_components.append(attribute_component) elif metadata[filepath]['type'] == "CompoundValue": for component in metadata[filepath]['components']: - xml_fields = [] if component['type'] not in documentation_type_data: raise ValueError("Unexpected type for component. Look at markdown file {attribute_name}".format( attribute_name=attribute_name @@ -499,56 +485,25 @@ def write_attribute(output_directory: str, data: Dict[str, Document]) -> List[st xml_fields.append(normalize(item)) if component['name'] in metadata[filepath]['xml_bundled_components']: xml_bundled_components.append(component_attribute_name) - # TODO: Replace AttributeVariable with a more fitting dataclass - attribute_variable = AttributeVariable( + attribute_component = AttributeComponent( attribute_name=component_attribute_name, - attribute_type=metadata[filepath]['type'], cpp_type=documentation_type_data[component['type']]["cpp_type"], - class_name=attribute_name, xml_fields=xml_fields, protobuf_field=component["protobuf_field"], - proto_drilldown_calls=proto_drilldown_calls, - mutable_proto_drilldown_calls=mutable_proto_drilldown_calls, - protobuf_cpp_type="", - is_proto_field_scalar=False, - serialize_xml_function="", - deserialize_xml_function="", - serialize_proto_function="", - deserialize_proto_function="", - serialize_xml_side_effects=[], - deserialize_xml_side_effects=[], - # serialize_proto_side_effects=[], - deserialize_proto_side_effects=[], ) - attribute_variables.append(attribute_variable) + attribute_components.append(attribute_component) elif metadata[filepath]['type'] == "Enum": for value in metadata[filepath]['values']: - xml_fields = [] for item in metadata[filepath]['values'][value]: xml_fields.append(normalize(item)) - # TODO: Replace AttributeVariable with a more fitting dataclass - attribute_variable = AttributeVariable( + attribute_component = AttributeComponent( attribute_name=value, - attribute_type=metadata[filepath]['type'], cpp_type="str", - class_name=attribute_name, xml_fields=xml_fields, protobuf_field=protobuf_field, - proto_drilldown_calls=proto_drilldown_calls, - mutable_proto_drilldown_calls=mutable_proto_drilldown_calls, - protobuf_cpp_type="", - is_proto_field_scalar=False, - serialize_xml_function="", - deserialize_xml_function="", - serialize_proto_function="", - deserialize_proto_function="", - serialize_xml_side_effects=[], - deserialize_xml_side_effects=[], - # serialize_proto_side_effects=[], - deserialize_proto_side_effects=[], ) - attribute_variables.append(attribute_variable) + attribute_components.append(attribute_component) else: continue @@ -558,7 +513,7 @@ def write_attribute(output_directory: str, data: Dict[str, Document]) -> List[st hpp_filepath, env.get_template("attribute_template.hpp").render( attribute_name=attribute_name, - attribute_variables=sorted(attribute_variables, key=get_attribute_variable_key), + attribute_components=sorted(attribute_components, key=get_attribute_component_key), class_name=capitalize(attribute_name, delimiter=""), type=metadata[filepath]['type'], proto_field_cpp_type=proto_field_type, @@ -573,7 +528,7 @@ def write_attribute(output_directory: str, data: Dict[str, Document]) -> List[st template[metadata[filepath]['type']].render( attribute_name=attribute_name, # TODO: Should this attribute_variables list be sorted? The hpp one is. - attribute_variables=attribute_variables, + attribute_components=attribute_components, class_name=capitalize(attribute_name, delimiter=""), enumerate=enumerate, xml_bundled_components=xml_bundled_components, @@ -608,6 +563,10 @@ def get_attribute_variable_key(attribute_variable: AttributeVariable) -> str: return attribute_variable.attribute_name +def get_attribute_component_key(attribute_component: AttributeComponent) -> str: + return attribute_component.attribute_name + + ################################################################################ # split_field_into_drilldown # From 681672f3fbe5d6f2b2a29b4308a2eba59f647084 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sun, 31 Dec 2023 11:57:05 -0600 Subject: [PATCH 389/539] fixing bug caused from bad linter fix --- xml_converter/generators/generate_cpp.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xml_converter/generators/generate_cpp.py b/xml_converter/generators/generate_cpp.py index a5781e1b..12b29d80 100644 --- a/xml_converter/generators/generate_cpp.py +++ b/xml_converter/generators/generate_cpp.py @@ -461,9 +461,9 @@ def write_attribute(output_directory: str, data: Dict[str, Document]) -> List[st protobuf_field: str _, _, protobuf_field = split_field_into_drilldown(metadata[filepath]["protobuf_field"]) - xml_fields: List[str] = [] if metadata[filepath]['type'] == "MultiflagValue": for flag in metadata[filepath]['flags']: + xml_fields = [] for item in metadata[filepath]['flags'][flag]: xml_fields.append(normalize(item)) attribute_component = AttributeComponent( @@ -476,6 +476,7 @@ def write_attribute(output_directory: str, data: Dict[str, Document]) -> List[st elif metadata[filepath]['type'] == "CompoundValue": for component in metadata[filepath]['components']: + xml_fields = [] if component['type'] not in documentation_type_data: raise ValueError("Unexpected type for component. Look at markdown file {attribute_name}".format( attribute_name=attribute_name @@ -495,6 +496,7 @@ def write_attribute(output_directory: str, data: Dict[str, Document]) -> List[st elif metadata[filepath]['type'] == "Enum": for value in metadata[filepath]['values']: + xml_fields = [] for item in metadata[filepath]['values'][value]: xml_fields.append(normalize(item)) attribute_component = AttributeComponent( From cad15fba5bbb65d1b376af5fd8183ed6ccc8c23d Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sun, 31 Dec 2023 15:02:16 -0600 Subject: [PATCH 390/539] adding ability to specify proto writing side effects --- xml_converter/doc/menu/display_name.md | 3 +++ .../generators/cpp_templates/class_template.cpp | 2 +- xml_converter/generators/generate_cpp.py | 6 +++--- xml_converter/src/attribute/string.cpp | 10 ++++++++++ xml_converter/src/attribute/string.hpp | 8 ++++++++ xml_converter/src/category_gen.cpp | 2 +- 6 files changed, 26 insertions(+), 5 deletions(-) diff --git a/xml_converter/doc/menu/display_name.md b/xml_converter/doc/menu/display_name.md index 09675b3d..d998a215 100644 --- a/xml_converter/doc/menu/display_name.md +++ b/xml_converter/doc/menu/display_name.md @@ -8,6 +8,9 @@ custom_functions: read.proto: function: proto_display_name_to_display_name_and_name side_effects: [Name] + write.proto: + function: display_name_and_name_to_proto_display_name + side_effects: [Name] --- A human readable name of this category. diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index 4b1874be..e8ee4109 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -98,7 +98,7 @@ waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf(ProtoWriterState* state) cons {% else %} std::function setter = [&proto_{{cpp_class_header}}]({{attribute_variable.protobuf_cpp_type}} val) { proto_{{cpp_class_header}}.{{attribute_variable.mutable_proto_drilldown_calls}}set_{{attribute_variable.protobuf_field}}(val); }; {% endif %} - {{attribute_variable.serialize_proto_function}}(this->{{attribute_variable.attribute_name}}, state, setter); + {{attribute_variable.serialize_proto_function}}(this->{{attribute_variable.attribute_name}}, state, setter{% for side_effect in attribute_variable.serialize_proto_side_effects %}, &(this->{{side_effect}}){% endfor %}); } {% endif %} {% endfor %} diff --git a/xml_converter/generators/generate_cpp.py b/xml_converter/generators/generate_cpp.py index 12b29d80..75a3db85 100644 --- a/xml_converter/generators/generate_cpp.py +++ b/xml_converter/generators/generate_cpp.py @@ -62,7 +62,7 @@ class AttributeVariable: # The function name and additional side effect pointers for proto serialization. serialize_proto_function: str - # serialize_proto_side_effects: List[str] + serialize_proto_side_effects: List[str] # The function name and additional side effect pointers for proto deserialization. deserialize_proto_function: str @@ -321,7 +321,7 @@ def generate_cpp_variable_data( deserialize_xml_function="xml_attribute_to_" + component_class_name, deserialize_xml_side_effects=[], serialize_proto_function="to_proto_" + component_class_name, - # serialize_proto_side_effects=[], + serialize_proto_side_effects=[], deserialize_proto_function="from_proto_" + component_class_name, deserialize_proto_side_effects=[], ) @@ -398,7 +398,7 @@ def generate_cpp_variable_data( deserialize_xml_function=deserialize_xml_function, deserialize_xml_side_effects=deserialize_xml_side_effects, serialize_proto_function=serialize_proto_function, - # serialize_proto_side_effects=serialize_proto_side_effects, + serialize_proto_side_effects=serialize_proto_side_effects, deserialize_proto_function=deserialize_proto_function, deserialize_proto_side_effects=deserialize_proto_side_effects, diff --git a/xml_converter/src/attribute/string.cpp b/xml_converter/src/attribute/string.cpp index c8b5fe7f..173ce10b 100644 --- a/xml_converter/src/attribute/string.cpp +++ b/xml_converter/src/attribute/string.cpp @@ -75,3 +75,13 @@ void proto_display_name_to_display_name_and_name( *name = normalize(input); *is_name_set = true; } + + +void display_name_and_name_to_proto_display_name( + std::string value, + ProtoWriterState* state, + std::function setter, + const std::string* name, + const bool* is_name_set) { + setter(value); +} \ No newline at end of file diff --git a/xml_converter/src/attribute/string.hpp b/xml_converter/src/attribute/string.hpp index be418930..db71a35d 100644 --- a/xml_converter/src/attribute/string.hpp +++ b/xml_converter/src/attribute/string.hpp @@ -45,4 +45,12 @@ void proto_display_name_to_display_name_and_name( bool* is_display_name_set, std::string* name, bool* is_name_set); + +void display_name_and_name_to_proto_display_name( + std::string input, + ProtoWriterState* state, + std::function setter, + const std::string* name, + const bool* is_name_set); + #define do_nothing(...) diff --git a/xml_converter/src/category_gen.cpp b/xml_converter/src/category_gen.cpp index cc5c3339..5d6bc9cc 100644 --- a/xml_converter/src/category_gen.cpp +++ b/xml_converter/src/category_gen.cpp @@ -98,7 +98,7 @@ waypoint::Category Category::as_protobuf(ProtoWriterState* state) const { } if (this->display_name_is_set) { std::function setter = [&proto_category](std::string val) { proto_category.set_name(val); }; - string_to_proto(this->display_name, state, setter); + display_name_and_name_to_proto_display_name(this->display_name, state, setter, &(this->name), &(this->name_is_set)); } if (this->is_separator_is_set) { std::function setter = [&proto_category](bool val) { proto_category.set_is_separator(val); }; From 62803ecd42f62c0a49b4e663482452b40fee2a84 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sun, 31 Dec 2023 15:04:40 -0600 Subject: [PATCH 391/539] fixing trailing newline --- xml_converter/src/attribute/string.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/xml_converter/src/attribute/string.cpp b/xml_converter/src/attribute/string.cpp index 173ce10b..910c69b7 100644 --- a/xml_converter/src/attribute/string.cpp +++ b/xml_converter/src/attribute/string.cpp @@ -76,7 +76,6 @@ void proto_display_name_to_display_name_and_name( *is_name_set = true; } - void display_name_and_name_to_proto_display_name( std::string value, ProtoWriterState* state, @@ -84,4 +83,4 @@ void display_name_and_name_to_proto_display_name( const std::string* name, const bool* is_name_set) { setter(value); -} \ No newline at end of file +} From ece36df58dd96ab4834a91b158e25a255ff3d328 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 31 Dec 2023 19:20:59 -0500 Subject: [PATCH 392/539] Added method to call xml_converter --- Category2D.gd | 6 +++++ Category3D.gd | 7 ++++++ PackDialog.gd | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++ Spatial.gd | 7 ++---- Spatial.tscn | 5 ++-- 5 files changed, 82 insertions(+), 8 deletions(-) create mode 100644 PackDialog.gd diff --git a/Category2D.gd b/Category2D.gd index 79260a49..27d5fadd 100644 --- a/Category2D.gd +++ b/Category2D.gd @@ -10,3 +10,9 @@ func add_path2d(path): func add_subcategory(subcategory): self.add_child(subcategory, true) subcategories.push_back(subcategory) + +func clear_all(): + self.paths2d = [] + self.subcategories = [] + for child in self.get_children(): + child.queue_free() diff --git a/Category3D.gd b/Category3D.gd index e0eee3d6..21846e5e 100644 --- a/Category3D.gd +++ b/Category3D.gd @@ -16,3 +16,10 @@ func add_icon(icon): func add_subcategory(subcategory): self.add_child(subcategory, true) subcategories.push_back(subcategory) + +func clear_all(): + self.paths = [] + self.icons = [] + self.subcategories = [] + for child in self.get_children(): + child.queue_free() diff --git a/PackDialog.gd b/PackDialog.gd new file mode 100644 index 00000000..e611a893 --- /dev/null +++ b/PackDialog.gd @@ -0,0 +1,65 @@ +extends Control + +const executable_path: String = "./xml_converter/build/xml_converter" +var protobin_data_folder: String +var split_protobin_data_folder: String +var user_data_dir: String +onready var output_dialog = $WindowDialog +onready var output_label = $WindowDialog/ScrollContainer/Label + +func _ready(): + var dir = Directory.new() + self.user_data_dir = str(OS.get_user_data_dir()) + self.protobin_data_folder = self.user_data_dir.plus_file("packs") + self.split_protobin_data_folder = self.user_data_dir.plus_file("protobins") + if not dir.dir_exists(self.protobin_data_folder): + var success = dir.make_dir(self.protobin_data_folder) + if success != OK: + print("Error: Could not create data folder:", self.protobin_data_folder) + + +func clear_directory_contents(dir_path: String) -> void: + var dir = Directory.new() + if dir.open(dir_path) == OK: + while dir.get_next(): + var entry_path: String = dir_path + "/" + dir.get_file() + # Remove subdirectories and files, but not "." and ".." + if dir.current_is_dir() and dir.get_file() != "." and dir.get_file() != "..": + clear_directory_contents(entry_path) + # Remove the subdirectory after its contents are cleared + dir.remove(entry_path) + elif dir.current_is_file(): + dir.remove(entry_path) + else: + print("Failed to open directory:", dir_path) + +func _on_FileDialog_dir_selected(dir_path): + var output: Array = [] + print("Selected folder:", dir_path) + var dir = Directory.new() + var new_path: String = self.protobin_data_folder.plus_file(dir_path.get_file()) + if not dir.dir_exists(new_path): + var success = dir.make_dir(new_path) + if success != OK: + print("Error: Could not create data folder:", self.protobin_data_folder) + #else: + # #Pop up here to confirm overwrite? + # clear_directory_contents(dir_path) + var args: PoolStringArray = [ + "--input-taco-path", dir_path, + "--output-waypoint-path", new_path, + "--output-split-waypoint-path", self.split_protobin_data_folder] + custom_print(args) + var result: int = OS.execute(self.executable_path, args, true, output) + custom_print(output) + if result != OK: + print("Failed to execute the command. Error code:", result) + else: + print("Command executed successfully.") + +func custom_print(message: Array): + output_dialog.show() + for line in message: + output_label.text += line + "\n" + + diff --git a/Spatial.gd b/Spatial.gd index 35f37c80..b4e816e6 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -482,11 +482,8 @@ func _unhandled_input(event): ################################################################################ func clear_map_markers(): # Clear all the rendered assets to make way for the new ones - for child in self.markers_3d.get_children(): - child.queue_free() - - for child in self.markers_2d.get_children(): - child.queue_free() + self.markers_3d.clear_all() + self.markers_2d.clear_all() func init_category_tree(): self.markers_ui.clear() diff --git a/Spatial.tscn b/Spatial.tscn index 286a1a1c..df0ecaf1 100644 --- a/Spatial.tscn +++ b/Spatial.tscn @@ -936,7 +936,6 @@ __meta__ = { [connection signal="pressed" from="Control/GlobalMenuButton/EditorQuckPanel/HBoxContainer/NewIcon" to="." method="_on_NewIcon_pressed"] [connection signal="pressed" from="Control/GlobalMenuButton/EditorQuckPanel/HBoxContainer/AdjustPoints" to="." method="_on_AdjustNodesButton_pressed"] [connection signal="dir_selected" from="Control/Dialogs/FileDialog" to="Control/Dialogs/FileDialog" method="_on_FileDialog_dir_selected"] -[connection signal="file_selected" from="Control/Dialogs/FileDialog" to="Control/Dialogs/FileDialog" method="_on_FileDialog_file_selected"] [connection signal="hide" from="Control/Dialogs/FileDialog" to="." method="_on_Dialog_hide"] [connection signal="hide" from="Control/Dialogs/MainMenu" to="." method="_on_Dialog_hide"] [connection signal="pressed" from="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer/LoadPath" to="." method="_on_LoadPath_pressed"] @@ -983,9 +982,9 @@ __meta__ = { [connection signal="text_changed" from="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer/WinePath" to="Control/Dialogs/SettingsDialog" method="save_settings"] [connection signal="text_changed" from="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer/EnvironmentVars" to="Control/Dialogs/SettingsDialog" method="save_settings"] [connection signal="hide" from="Control/Dialogs/CategoriesDialog" to="." method="_on_Dialog_hide"] -[connection signal="cell_selected" from="Control/Dialogs/CategoriesDialog/MarkersUI" to="." method="_on_MarkerPacks_cell_selected"] [connection signal="cell_selected" from="Control/Dialogs/CategoriesDialog/MarkersUI" to="." method="_on_MarkersUI_cell_selected"] -[connection signal="item_edited" from="Control/Dialogs/CategoriesDialog/MarkersUI" to="." method="_on_MarkerPacks_item_edited"] +[connection signal="cell_selected" from="Control/Dialogs/CategoriesDialog/MarkersUI" to="." method="_on_MarkerPacks_cell_selected"] [connection signal="item_edited" from="Control/Dialogs/CategoriesDialog/MarkersUI" to="." method="_on_MarkersUI_item_edited"] +[connection signal="item_edited" from="Control/Dialogs/CategoriesDialog/MarkersUI" to="." method="_on_MarkerPacks_item_edited"] [connection signal="multi_selected" from="Control/Dialogs/CategoriesDialog/MarkersUI" to="." method="_on_Tree_multi_selected"] [connection signal="tree_entered" from="Control/Dialogs/CategoriesDialog/MarkersUI" to="." method="_on_Tree_tree_entered"] From c941e84bcf0d863b878102184deb27623b7f6eeb Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 1 Jan 2024 16:15:06 -0500 Subject: [PATCH 393/539] Cleaning up code --- PackDialog.gd | 26 ++---------- Spatial.gd | 3 +- Spatial.tscn | 115 ++++++++++++++++++++------------------------------ 3 files changed, 50 insertions(+), 94 deletions(-) diff --git a/PackDialog.gd b/PackDialog.gd index e611a893..0723af57 100644 --- a/PackDialog.gd +++ b/PackDialog.gd @@ -4,8 +4,8 @@ const executable_path: String = "./xml_converter/build/xml_converter" var protobin_data_folder: String var split_protobin_data_folder: String var user_data_dir: String -onready var output_dialog = $WindowDialog -onready var output_label = $WindowDialog/ScrollContainer/Label +onready var output_dialog = $OutputDialog +onready var output_label = $OutputDialog/ScrollContainer/OutputLabel func _ready(): var dir = Directory.new() @@ -17,22 +17,6 @@ func _ready(): if success != OK: print("Error: Could not create data folder:", self.protobin_data_folder) - -func clear_directory_contents(dir_path: String) -> void: - var dir = Directory.new() - if dir.open(dir_path) == OK: - while dir.get_next(): - var entry_path: String = dir_path + "/" + dir.get_file() - # Remove subdirectories and files, but not "." and ".." - if dir.current_is_dir() and dir.get_file() != "." and dir.get_file() != "..": - clear_directory_contents(entry_path) - # Remove the subdirectory after its contents are cleared - dir.remove(entry_path) - elif dir.current_is_file(): - dir.remove(entry_path) - else: - print("Failed to open directory:", dir_path) - func _on_FileDialog_dir_selected(dir_path): var output: Array = [] print("Selected folder:", dir_path) @@ -44,11 +28,11 @@ func _on_FileDialog_dir_selected(dir_path): print("Error: Could not create data folder:", self.protobin_data_folder) #else: # #Pop up here to confirm overwrite? - # clear_directory_contents(dir_path) var args: PoolStringArray = [ "--input-taco-path", dir_path, "--output-waypoint-path", new_path, - "--output-split-waypoint-path", self.split_protobin_data_folder] + "--output-split-waypoint-path", self.split_protobin_data_folder + ] custom_print(args) var result: int = OS.execute(self.executable_path, args, true, output) custom_print(output) @@ -61,5 +45,3 @@ func custom_print(message: Array): output_dialog.show() for line in message: output_label.text += line + "\n" - - diff --git a/Spatial.gd b/Spatial.gd index b4e816e6..7b17b00b 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -84,8 +84,7 @@ func _ready(): if (Settings.burrito_link_auto_launch_enabled): launch_burrito_link() - - + ################################################################################ diff --git a/Spatial.tscn b/Spatial.tscn index df0ecaf1..3f161804 100644 --- a/Spatial.tscn +++ b/Spatial.tscn @@ -183,12 +183,11 @@ __meta__ = { "_edit_use_anchors_": false } -[node name="FileDialog" type="FileDialog" parent="Control/Dialogs"] -visible = true -margin_left = 312.0 -margin_top = 82.0 -margin_right = 983.0 -margin_bottom = 580.0 +[node name="ImportPackDialog" type="FileDialog" parent="Control/Dialogs"] +margin_left = 289.0 +margin_top = 36.0 +margin_right = 960.0 +margin_bottom = 534.0 window_title = "Open a Directory" mode = 2 access = 2 @@ -199,24 +198,23 @@ __meta__ = { "_edit_use_anchors_": false } -[node name="WindowDialog" type="WindowDialog" parent="Control/Dialogs/FileDialog"] -visible = true -margin_left = 8.0 -margin_top = 8.0 -margin_right = 663.0 -margin_bottom = 462.0 +[node name="OutputDialog" type="WindowDialog" parent="Control/Dialogs/ImportPackDialog"] +margin_left = 689.0 +margin_top = 1.0 +margin_right = 1344.0 +margin_bottom = 455.0 __meta__ = { "_edit_use_anchors_": false } -[node name="ScrollContainer" type="ScrollContainer" parent="Control/Dialogs/FileDialog/WindowDialog"] -margin_right = 600.0 -margin_bottom = 250.0 +[node name="ScrollContainer" type="ScrollContainer" parent="Control/Dialogs/ImportPackDialog/OutputDialog"] +margin_right = 653.0 +margin_bottom = 453.0 __meta__ = { "_edit_use_anchors_": false } -[node name="Label" type="Label" parent="Control/Dialogs/FileDialog/WindowDialog/ScrollContainer"] +[node name="OutputLabel" type="Label" parent="Control/Dialogs/ImportPackDialog/OutputDialog/ScrollContainer"] margin_right = 100.0 margin_bottom = 100.0 rect_min_size = Vector2( 100, 100 ) @@ -225,11 +223,10 @@ __meta__ = { } [node name="MainMenu" type="WindowDialog" parent="Control/Dialogs"] -visible = true -margin_left = 48.0 -margin_top = 82.0 -margin_right = 268.0 -margin_bottom = 715.0 +margin_left = 55.0 +margin_top = 60.0 +margin_right = 275.0 +margin_bottom = 693.0 window_title = "Main Menu" resizable = true __meta__ = { @@ -246,7 +243,7 @@ __meta__ = { [node name="VBoxContainer" type="VBoxContainer" parent="Control/Dialogs/MainMenu/ScrollContainer"] margin_right = 220.0 -margin_bottom = 368.0 +margin_bottom = 336.0 size_flags_horizontal = 3 [node name="LoadPath" type="Button" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] @@ -266,52 +263,38 @@ __meta__ = { [node name="ImportPath" type="Button" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] margin_top = 52.0 margin_right = 220.0 -margin_bottom = 72.0 +margin_bottom = 92.0 +rect_min_size = Vector2( 0, 40 ) text = "Import Marker Pack" -[node name="HSeparator6" type="HSeparator" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] -margin_top = 76.0 -margin_right = 220.0 -margin_bottom = 80.0 -__meta__ = { -"_edit_use_anchors_": false -} - [node name="SavePath" type="Button" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] -margin_top = 84.0 +margin_top = 96.0 margin_right = 220.0 -margin_bottom = 124.0 +margin_bottom = 136.0 rect_min_size = Vector2( 0, 40 ) text = "Save Markers File" [node name="HSeparator" type="HSeparator" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] -margin_top = 128.0 +margin_top = 140.0 margin_right = 220.0 -margin_bottom = 132.0 - -[node name="PointEditor" type="Button" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] -margin_top = 136.0 -margin_right = 220.0 -margin_bottom = 176.0 -rect_min_size = Vector2( 0, 40 ) -text = "Editor Panel" +margin_bottom = 144.0 [node name="OpenEditorQuickPanel" type="Button" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] -margin_top = 180.0 +margin_top = 148.0 margin_right = 220.0 -margin_bottom = 220.0 +margin_bottom = 188.0 rect_min_size = Vector2( 0, 40 ) text = "Editor Panel" [node name="HSeparator3" type="HSeparator" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] -margin_top = 224.0 +margin_top = 192.0 margin_right = 220.0 -margin_bottom = 228.0 +margin_bottom = 196.0 [node name="Ranges" type="Button" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] -margin_top = 232.0 +margin_top = 200.0 margin_right = 220.0 -margin_bottom = 272.0 +margin_bottom = 240.0 rect_min_size = Vector2( 0, 40 ) text = "Range Indicators" @@ -325,21 +308,21 @@ text = "Compass" [node name="GuacamoleScript" type="Button" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] visible = false -margin_top = 192.0 -margin_right = 213.0 -margin_bottom = 232.0 +margin_top = 224.0 +margin_right = 220.0 +margin_bottom = 264.0 rect_min_size = Vector2( 0, 40 ) text = "Guacamole Script Editor" [node name="HSeparator4" type="HSeparator" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] -margin_top = 276.0 +margin_top = 244.0 margin_right = 220.0 -margin_bottom = 280.0 +margin_bottom = 248.0 [node name="Settings" type="Button" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] -margin_top = 284.0 +margin_top = 252.0 margin_right = 220.0 -margin_bottom = 324.0 +margin_bottom = 292.0 rect_min_size = Vector2( 0, 40 ) text = "Settings" @@ -359,15 +342,15 @@ __meta__ = { [node name="ActivePath" type="CheckButton" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] visible = false -margin_top = 244.0 -margin_right = 213.0 -margin_bottom = 284.0 +margin_top = 276.0 +margin_right = 220.0 +margin_bottom = 316.0 text = "Active Path" [node name="ExitButton" type="Button" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] -margin_top = 328.0 +margin_top = 296.0 margin_right = 220.0 -margin_bottom = 368.0 +margin_bottom = 336.0 rect_min_size = Vector2( 0, 40 ) text = "Exit Burrito" @@ -913,7 +896,6 @@ color = Color( 0, 0, 0, 1 ) [node name="Paths" type="Spatial" parent="."] [node name="Icons" type="Spatial" parent="."] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.106085, 0, 0 ) [node name="FeetLocation" type="Spatial" parent="."] @@ -921,13 +903,6 @@ transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.106085, 0, 0 ) mesh = SubResource( 3 ) material/0 = SubResource( 4 ) -[node name="Control2" type="Control" parent="."] -margin_right = 40.0 -margin_bottom = 40.0 -__meta__ = { -"_edit_use_anchors_": false -} - [connection signal="pressed" from="Control/GlobalMenuButton/main_menu_toggle" to="." method="_on_main_menu_toggle_pressed"] [connection signal="pressed" from="Control/GlobalMenuButton/EditorQuckPanel/HBoxContainer/CloseEditorQuickPanel" to="." method="_on_CloseEditorQuickPanel_pressed"] [connection signal="pressed" from="Control/GlobalMenuButton/EditorQuckPanel/HBoxContainer/ChangeTexture" to="." method="_on_ChangeTexture_pressed"] @@ -935,8 +910,8 @@ __meta__ = { [connection signal="pressed" from="Control/GlobalMenuButton/EditorQuckPanel/HBoxContainer/NewPathPoint" to="." method="_on_NewPathPoint_pressed"] [connection signal="pressed" from="Control/GlobalMenuButton/EditorQuckPanel/HBoxContainer/NewIcon" to="." method="_on_NewIcon_pressed"] [connection signal="pressed" from="Control/GlobalMenuButton/EditorQuckPanel/HBoxContainer/AdjustPoints" to="." method="_on_AdjustNodesButton_pressed"] -[connection signal="dir_selected" from="Control/Dialogs/FileDialog" to="Control/Dialogs/FileDialog" method="_on_FileDialog_dir_selected"] -[connection signal="hide" from="Control/Dialogs/FileDialog" to="." method="_on_Dialog_hide"] +[connection signal="dir_selected" from="Control/Dialogs/ImportPackDialog" to="Control/Dialogs/ImportPackDialog" method="_on_FileDialog_dir_selected"] +[connection signal="hide" from="Control/Dialogs/ImportPackDialog" to="." method="_on_Dialog_hide"] [connection signal="hide" from="Control/Dialogs/MainMenu" to="." method="_on_Dialog_hide"] [connection signal="pressed" from="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer/LoadPath" to="." method="_on_LoadPath_pressed"] [connection signal="pressed" from="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer/ImportPath" to="." method="_on_ImportPath_pressed"] From ec1df3211497bc6cf950671d3eee466287bb0ed7 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 1 Jan 2024 16:21:17 -0500 Subject: [PATCH 394/539] Added lines to ensure that the split folder is made correctly --- PackDialog.gd | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/PackDialog.gd b/PackDialog.gd index 0723af57..5a42854d 100644 --- a/PackDialog.gd +++ b/PackDialog.gd @@ -16,6 +16,10 @@ func _ready(): var success = dir.make_dir(self.protobin_data_folder) if success != OK: print("Error: Could not create data folder:", self.protobin_data_folder) + if not dir.dir_exists(self.split_protobin_data_folder): + var success = dir.make_dir(self.split_protobin_data_folder) + if success != OK: + print("Error: Could not create data folder:", self.split_protobin_data_folder) func _on_FileDialog_dir_selected(dir_path): var output: Array = [] From 89fe1edcfbf9ade8c5089f8e62ac099e5014be20 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 1 Jan 2024 16:55:01 -0500 Subject: [PATCH 395/539] Renamed reference to node --- Spatial.gd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Spatial.gd b/Spatial.gd index 7b17b00b..f5889c02 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -926,5 +926,5 @@ func _on_MarkersUI_item_edited(): func _on_ImportPath_pressed(): - $Control/Dialogs/FileDialog.show() + $Control/Dialogs/ImportPackDialog.show() From 3adf80a60bf20f4e1313b07ca4fbef23cdc7d04c Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 1 Jan 2024 16:59:00 -0500 Subject: [PATCH 396/539] Removed dev data --- Spatial.tscn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Spatial.tscn b/Spatial.tscn index 3f161804..9cc664c7 100644 --- a/Spatial.tscn +++ b/Spatial.tscn @@ -191,8 +191,8 @@ margin_bottom = 534.0 window_title = "Open a Directory" mode = 2 access = 2 -current_dir = "/home/steph/Desktop/Packs" -current_path = "/home/steph/Desktop/Packs/" +current_dir = "" +current_path = "" script = ExtResource( 14 ) __meta__ = { "_edit_use_anchors_": false From 96c3fef44510cc64ad0b02f0fe91d315b046643d Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 1 Jan 2024 17:13:36 -0500 Subject: [PATCH 397/539] removed indent --- PackDialog.gd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PackDialog.gd b/PackDialog.gd index 5a42854d..b0e21258 100644 --- a/PackDialog.gd +++ b/PackDialog.gd @@ -36,7 +36,7 @@ func _on_FileDialog_dir_selected(dir_path): "--input-taco-path", dir_path, "--output-waypoint-path", new_path, "--output-split-waypoint-path", self.split_protobin_data_folder - ] + ] custom_print(args) var result: int = OS.execute(self.executable_path, args, true, output) custom_print(output) From f103c4b24329686a42f3f2e26a265dcf16dee0b5 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 1 Jan 2024 21:25:52 -0500 Subject: [PATCH 398/539] Removing custom print for now --- PackDialog.gd | 13 +++---------- Spatial.tscn | 24 ------------------------ 2 files changed, 3 insertions(+), 34 deletions(-) diff --git a/PackDialog.gd b/PackDialog.gd index b0e21258..10b86f2e 100644 --- a/PackDialog.gd +++ b/PackDialog.gd @@ -4,8 +4,6 @@ const executable_path: String = "./xml_converter/build/xml_converter" var protobin_data_folder: String var split_protobin_data_folder: String var user_data_dir: String -onready var output_dialog = $OutputDialog -onready var output_label = $OutputDialog/ScrollContainer/OutputLabel func _ready(): var dir = Directory.new() @@ -37,15 +35,10 @@ func _on_FileDialog_dir_selected(dir_path): "--output-waypoint-path", new_path, "--output-split-waypoint-path", self.split_protobin_data_folder ] - custom_print(args) - var result: int = OS.execute(self.executable_path, args, true, output) - custom_print(output) + print(args) + var result: int = OS.execute(self.executable_path, args, true, output, true) + print(output) if result != OK: print("Failed to execute the command. Error code:", result) else: print("Command executed successfully.") - -func custom_print(message: Array): - output_dialog.show() - for line in message: - output_label.text += line + "\n" diff --git a/Spatial.tscn b/Spatial.tscn index 9cc664c7..a220578a 100644 --- a/Spatial.tscn +++ b/Spatial.tscn @@ -198,30 +198,6 @@ __meta__ = { "_edit_use_anchors_": false } -[node name="OutputDialog" type="WindowDialog" parent="Control/Dialogs/ImportPackDialog"] -margin_left = 689.0 -margin_top = 1.0 -margin_right = 1344.0 -margin_bottom = 455.0 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="ScrollContainer" type="ScrollContainer" parent="Control/Dialogs/ImportPackDialog/OutputDialog"] -margin_right = 653.0 -margin_bottom = 453.0 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="OutputLabel" type="Label" parent="Control/Dialogs/ImportPackDialog/OutputDialog/ScrollContainer"] -margin_right = 100.0 -margin_bottom = 100.0 -rect_min_size = Vector2( 100, 100 ) -__meta__ = { -"_edit_use_anchors_": false -} - [node name="MainMenu" type="WindowDialog" parent="Control/Dialogs"] margin_left = 55.0 margin_top = 60.0 From df4557abe5de6ac1b7d740bb4086d0e08432025c Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Mon, 1 Jan 2024 20:36:15 -0600 Subject: [PATCH 399/539] renaming attribute_variable to attribute_component to match attribute_componenets --- .../cpp_templates/attribute_template.hpp | 8 +++--- .../attribute_template_compoundvalue.cpp | 24 ++++++++-------- .../cpp_templates/attribute_template_enum.cpp | 28 +++++++++---------- .../attribute_template_multiflagvalue.cpp | 28 +++++++++---------- 4 files changed, 44 insertions(+), 44 deletions(-) diff --git a/xml_converter/generators/cpp_templates/attribute_template.hpp b/xml_converter/generators/cpp_templates/attribute_template.hpp index fa68b8f8..9dfb866c 100644 --- a/xml_converter/generators/cpp_templates/attribute_template.hpp +++ b/xml_converter/generators/cpp_templates/attribute_template.hpp @@ -15,8 +15,8 @@ class XMLError; enum {{class_name}} { - {% for attribute_variable in attribute_components %} - {{attribute_variable.attribute_name}}, + {% for attribute_component in attribute_components %} + {{attribute_component.attribute_name}}, {% endfor %} }; {% elif type in ["CompoundValue", "MultiflagValue"] %} @@ -26,8 +26,8 @@ class {{class_name}} { public: - {% for attribute_variable in attribute_components %} - {{attribute_variable.cpp_type}} {{attribute_variable.attribute_name}}; + {% for attribute_component in attribute_components %} + {{attribute_component.cpp_type}} {{attribute_component.attribute_name}}; {% endfor %} virtual std::string classname() { diff --git a/xml_converter/generators/cpp_templates/attribute_template_compoundvalue.cpp b/xml_converter/generators/cpp_templates/attribute_template_compoundvalue.cpp index 3b8effa6..d70e79bc 100644 --- a/xml_converter/generators/cpp_templates/attribute_template_compoundvalue.cpp +++ b/xml_converter/generators/cpp_templates/attribute_template_compoundvalue.cpp @@ -20,14 +20,14 @@ void xml_attribute_to_{{attribute_name}}( {{class_name}} {{attribute_name}}; vector compound_values; string attributename; - {% for attribute_variable in attribute_components %} - {{attribute_name}}.{{attribute_variable.attribute_name}} = 0; + {% for attribute_component in attribute_components %} + {{attribute_name}}.{{attribute_component.attribute_name}} = 0; {% endfor %} attributename = get_attribute_name(input); compound_values = split(get_attribute_value(input), ","); if (compound_values.size() == {{ attribute_components|length }}) { - {% for n, attribute_variable in enumerate(attribute_components) %} - {{attribute_name}}.{{attribute_variable.attribute_name}} = std::stof(compound_values[{{n}}]); + {% for n, attribute_component in enumerate(attribute_components) %} + {{attribute_name}}.{{attribute_component.attribute_name}} = std::stof(compound_values[{{n}}]); {% endfor %} } *value = {{attribute_name}}; @@ -39,12 +39,12 @@ void xml_attribute_to_{{attribute_name}}( XMLWriterState* state, const {{class_name}}* value) { string output; - {% for n, attribute_variable in enumerate(attribute_components) %} - {% if attribute_variable.attribute_name in xml_bundled_components %} + {% for n, attribute_component in enumerate(attribute_components) %} + {% if attribute_component.attribute_name in xml_bundled_components %} {% if n == 0 %} - output = to_string(value->{{attribute_variable.attribute_name}}); + output = to_string(value->{{attribute_component.attribute_name}}); {% else %} - output = output + "," + to_string(value->{{attribute_variable.attribute_name}}); + output = output + "," + to_string(value->{{attribute_component.attribute_name}}); {% endif %} {% endif %} {% endfor %} @@ -58,8 +58,8 @@ void proto_to_{{attribute_name}}( {{class_name}}* value, bool* is_set) { {{class_name}} {{attribute_name}}; - {% for attribute_variable in attribute_components %} - {{attribute_name}}.{{attribute_variable.attribute_name}} = input.{{attribute_variable.protobuf_field}}(); + {% for attribute_component in attribute_components %} + {{attribute_name}}.{{attribute_component.attribute_name}} = input.{{attribute_component.protobuf_field}}(); {% endfor %} *value = {{attribute_name}}; *is_set = true; @@ -70,8 +70,8 @@ void {{attribute_name}}_to_proto( ProtoWriterState* state, std::function setter) { {{proto_field_cpp_type}}* proto_{{attribute_name}} = new {{proto_field_cpp_type}}(); - {% for attribute_variable in attribute_components %} - proto_{{attribute_name}}->set_{{attribute_variable.protobuf_field}}(value.{{attribute_variable.attribute_name}}); + {% for attribute_component in attribute_components %} + proto_{{attribute_name}}->set_{{attribute_component.protobuf_field}}(value.{{attribute_component.attribute_name}}); {% endfor %} setter(proto_{{attribute_name}}); } diff --git a/xml_converter/generators/cpp_templates/attribute_template_enum.cpp b/xml_converter/generators/cpp_templates/attribute_template_enum.cpp index 2d477d4c..a842c843 100644 --- a/xml_converter/generators/cpp_templates/attribute_template_enum.cpp +++ b/xml_converter/generators/cpp_templates/attribute_template_enum.cpp @@ -20,15 +20,15 @@ void xml_attribute_to_{{attribute_name}}( bool* is_set) { {{class_name}} {{attribute_name}}; string normalized_value = normalize(get_attribute_value(input)); - {% for n, attribute_variable in enumerate(attribute_components) %} - {% for i, value in enumerate(attribute_variable.xml_fields) %} + {% for n, attribute_component in enumerate(attribute_components) %} + {% for i, value in enumerate(attribute_component.xml_fields) %} {% if i == 0 and n == 0 %} if (normalized_value == "{{value}}") { - {{attribute_name}} = {{class_name}}::{{attribute_variable.attribute_name}}; + {{attribute_name}} = {{class_name}}::{{attribute_component.attribute_name}}; } {% else %} else if (normalized_value == "{{value}}") { - {{attribute_name}} = {{class_name}}::{{attribute_variable.attribute_name}}; + {{attribute_name}} = {{class_name}}::{{attribute_component.attribute_name}}; } {% endif %} {% endfor %} @@ -45,12 +45,12 @@ string {{attribute_name}}_to_xml_attribute( const std::string& attribute_name, XMLWriterState* state, const {{class_name}}* value) { - {% for n, attribute_variable in enumerate(attribute_components) %} - {% for i, value in enumerate(attribute_variable.xml_fields) %} + {% for n, attribute_component in enumerate(attribute_components) %} + {% for i, value in enumerate(attribute_component.xml_fields) %} {%-if i == 0 and n == 0:%} - if (*value == {{class_name}}::{{attribute_variable.attribute_name}}) { + if (*value == {{class_name}}::{{attribute_component.attribute_name}}) { {% else %} - else if (*value == {{class_name}}::{{attribute_variable.attribute_name}}) { + else if (*value == {{class_name}}::{{attribute_component.attribute_name}}) { {% endif %} return " " + attribute_name + "=\"" + "{{value}}" + "\""; } @@ -67,9 +67,9 @@ void proto_to_{{attribute_name}}( {{class_name}}* value, bool* is_set) { switch (input) { - {% for attribute_variable in attribute_components %} - case {{proto_field_cpp_type}}::{{attribute_variable.attribute_name}}: - *value = {{class_name}}::{{attribute_variable.attribute_name}}; + {% for attribute_component in attribute_components %} + case {{proto_field_cpp_type}}::{{attribute_component.attribute_name}}: + *value = {{class_name}}::{{attribute_component.attribute_name}}; *is_set = true; break; {% endfor %} @@ -85,9 +85,9 @@ void {{attribute_name}}_to_proto( ProtoWriterState* state, std::function setter) { switch (value) { - {% for attribute_variable in attribute_components %} - case {{class_name}}::{{attribute_variable.attribute_name}}: - setter({{proto_field_cpp_type}}::{{attribute_variable.attribute_name}}); + {% for attribute_component in attribute_components %} + case {{class_name}}::{{attribute_component.attribute_name}}: + setter({{proto_field_cpp_type}}::{{attribute_component.attribute_name}}); break; {% endfor %} default: diff --git a/xml_converter/generators/cpp_templates/attribute_template_multiflagvalue.cpp b/xml_converter/generators/cpp_templates/attribute_template_multiflagvalue.cpp index d88f4605..ced609f7 100644 --- a/xml_converter/generators/cpp_templates/attribute_template_multiflagvalue.cpp +++ b/xml_converter/generators/cpp_templates/attribute_template_multiflagvalue.cpp @@ -21,21 +21,21 @@ void xml_attribute_to_{{attribute_name}}( {{class_name}} {{attribute_name}}; vector flag_values; flag_values = split(get_attribute_value(input), ","); - {% for attribute_variable in attribute_components %} - {{attribute_name}}.{{attribute_variable.attribute_name}} = false; + {% for attribute_component in attribute_components %} + {{attribute_name}}.{{attribute_component.attribute_name}} = false; {% endfor %} for (string flag_value : flag_values) { string normalized_flag_value = normalize(flag_value); - {% for n, attribute_variable in enumerate(attribute_components) %} - {% for i, value in enumerate(attribute_variable.xml_fields) %} + {% for n, attribute_component in enumerate(attribute_components) %} + {% for i, value in enumerate(attribute_component.xml_fields) %} {% if i == 0 and n == 0 %} if (normalized_flag_value == "{{value}}") { - {{attribute_name}}.{{attribute_variable.attribute_name}} = true; + {{attribute_name}}.{{attribute_component.attribute_name}} = true; } {% else %} else if (normalized_flag_value == "{{value}}") { - {{attribute_name}}.{{attribute_variable.attribute_name}} = true; + {{attribute_name}}.{{attribute_component.attribute_name}} = true; } {% endif %} {%- endfor %} @@ -54,9 +54,9 @@ string {{attribute_name}}_to_xml_attribute( XMLWriterState* state, const {{class_name}}* value) { vector flag_values; - {% for n, attribute_variable in enumerate(attribute_components) %} - if (value->{{attribute_variable.attribute_name}} == true) { - flag_values.push_back("{{attribute_variable.xml_fields[0]}}"); + {% for n, attribute_component in enumerate(attribute_components) %} + if (value->{{attribute_component.attribute_name}} == true) { + flag_values.push_back("{{attribute_component.xml_fields[0]}}"); } {% endfor %} string output = join(flag_values, ","); @@ -69,8 +69,8 @@ void proto_to_{{attribute_name}}( {{class_name}}* value, bool* is_set) { {{class_name}} {{attribute_name}}; - {% for n, attribute_variable in enumerate(attribute_components) %} - {{attribute_name}}.{{attribute_variable.attribute_name}} = input.{{attribute_variable.attribute_name}}(); + {% for n, attribute_component in enumerate(attribute_components) %} + {{attribute_name}}.{{attribute_component.attribute_name}} = input.{{attribute_component.attribute_name}}(); {% endfor %} *value = {{attribute_name}}; *is_set = true; @@ -82,9 +82,9 @@ void {{attribute_name}}_to_proto( std::function setter) { {{proto_field_cpp_type}}* proto_{{attribute_name}} = new {{proto_field_cpp_type}}(); bool should_write = false; - {% for n, attribute_variable in enumerate(attribute_components) %} - proto_{{attribute_name}}->set_{{attribute_variable.attribute_name}}(value.{{attribute_variable.attribute_name}}); - should_write |= value.{{attribute_variable.attribute_name}}; + {% for n, attribute_component in enumerate(attribute_components) %} + proto_{{attribute_name}}->set_{{attribute_component.attribute_name}}(value.{{attribute_component.attribute_name}}); + should_write |= value.{{attribute_component.attribute_name}}; {% endfor %} if (should_write) { setter(proto_{{attribute_name}}); From c165177051045ab2561ea22a623a0e2b9a24fe0a Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Mon, 1 Jan 2024 20:44:45 -0600 Subject: [PATCH 400/539] fixing comment of attribute_varaible -> attribute_component --- xml_converter/generators/generate_cpp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml_converter/generators/generate_cpp.py b/xml_converter/generators/generate_cpp.py index 12b29d80..f21feb39 100644 --- a/xml_converter/generators/generate_cpp.py +++ b/xml_converter/generators/generate_cpp.py @@ -529,7 +529,7 @@ def write_attribute(output_directory: str, data: Dict[str, Document]) -> List[st cpp_filepath, template[metadata[filepath]['type']].render( attribute_name=attribute_name, - # TODO: Should this attribute_variables list be sorted? The hpp one is. + # TODO: Should this attribute_components list be sorted? The hpp one is. attribute_components=attribute_components, class_name=capitalize(attribute_name, delimiter=""), enumerate=enumerate, From 6480614b3c5dfddfb6728a9ddc33e1959749ec5e Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 1 Jan 2024 21:45:14 -0500 Subject: [PATCH 401/539] Removed extra line --- Spatial.gd | 1 - 1 file changed, 1 deletion(-) diff --git a/Spatial.gd b/Spatial.gd index f5889c02..9cdafcf0 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -86,7 +86,6 @@ func _ready(): launch_burrito_link() - ################################################################################ # show_error # From 82e3047e8ad486df7c75ac0775051a77908e8ab5 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Tue, 2 Jan 2024 01:33:17 -0600 Subject: [PATCH 402/539] Multi file integration testing --- xml_converter/integration_tests/run_tests.py | 127 ++++++++++++++---- .../integration_tests/src/proto_utils.py | 36 ++--- 2 files changed, 113 insertions(+), 50 deletions(-) diff --git a/xml_converter/integration_tests/run_tests.py b/xml_converter/integration_tests/run_tests.py index 965e63e0..30aaf249 100755 --- a/xml_converter/integration_tests/run_tests.py +++ b/xml_converter/integration_tests/run_tests.py @@ -8,7 +8,7 @@ from typing import List, Optional, Final, Tuple from src.testcase_loader import load_testcases import shutil -from src.proto_utils import compare_protos +from src.proto_utils import compare_protos, compare_binary_file # Path to compiled C++ executable xml_converter_binary_path: str = "../build/xml_converter" @@ -142,7 +142,7 @@ def remove_ignored_lines(lines: List[str]) -> List[str]: return filtered_array -def main() -> None: +def main() -> bool: parser = argparse.ArgumentParser(description="A test harness for evaluating the output of the xmlconverter program") parser.add_argument("-v", "--verbose", help="Prints the results from xmlconverter in JSON format", action="store_true") args = parser.parse_args() @@ -153,8 +153,11 @@ def main() -> None: if os.path.exists(output_parent_dirpath): shutil.rmtree(output_parent_dirpath) + all_tests_passed = True + rebuild_xml_converter_binary() + for testcase in load_testcases(): xml_output_dir_path = os.path.join(output_parent_dirpath, "xml", testcase.name) proto_output_dir_path = os.path.join(output_parent_dirpath, "proto", testcase.name) @@ -179,51 +182,123 @@ def main() -> None: print(" stderr : {}".format("\n".join(stderr))) print(" return_code : {}".format(returncode)) - all_tests_passed: bool = True + testcase_passed: bool = True stdout_diff: List[str] = list(difflib.unified_diff(testcase.expected_stdout, stdout, fromfile="Expected stdout", tofile="Actual stdout", lineterm="")) if len_diff(stdout_diff) != 0: print(f"Standard output did not match for test {testcase.name}") for line in stdout_diff: print(line) - all_tests_passed = False + testcase_passed = False stderr_diff: List[str] = list(difflib.unified_diff(testcase.expected_stderr, stderr, fromfile="Expected stderr", tofile="Actual stderr", lineterm="")) if len_diff(stderr_diff) != 0: print(f"Standard error did not match for test {testcase.name}") for line in stderr_diff: print(line) - all_tests_passed = False + testcase_passed = False if testcase.expected_returncode is not None and testcase.expected_returncode != returncode: print(f"Expected a return code of {testcase.expected_returncode} for {testcase.name} but got {returncode}") - if testcase.expected_output_xml_path is not None: - # TODO: These paths are directories and `xml_file.xml` is just one - # possible file in the directories. Eventually we should check all - # the files in the directory not just the one. - output_xml_filepath = os.path.join(xml_output_dir_path, "xml_file.xml") - expected_output_xml_filepath = os.path.join(testcase.expected_output_xml_path, "xml_file.xml") + testcase_passed &= diff_dirs(xml_output_dir_path, testcase.expected_output_xml_path) + testcase_passed &= diff_dirs(proto_output_dir_path, testcase.expected_output_proto_path) - xml_diff = compare_text_files(expected_output_xml_filepath, output_xml_filepath) + if testcase_passed: + print(f"Success: test {testcase.name}") - if len_diff(xml_diff) != 0: - print(f"XML output was incorrect for test {testcase.name}") - for line in xml_diff: - print(line) - all_tests_passed = False + all_tests_passed &= testcase_passed - if testcase.expected_output_proto_path is not None: - protos_are_equal = compare_protos( - outputs_directory=proto_output_dir_path, - expected_outputs_directory=testcase.expected_output_proto_path, - ) + return all_tests_passed - all_tests_passed &= protos_are_equal +################################################################################ +# diff_dirs +# +# Diffs the file hirearchy and the files themselves between two directories. +################################################################################ +def diff_dirs(actual_output_dir: str, expected_output_dir: str) -> bool: + diff_found = False + + actual_files, actual_directories = get_paths(actual_output_dir) + expected_files, expected_directories = get_paths(expected_output_dir) + + expected_only_files = set(expected_files) - set(actual_files) + actual_only_files = set(actual_files) - set(expected_files) + + expected_only_dirs = set(expected_directories) - set(actual_directories) + actual_only_dirs = set(actual_directories) - set(expected_directories) + + for file in expected_only_files: + diff_found = True + print("-Expected `{}` but did not find the file in the actual output.".format(os.path.join(expected_output_dir, file))) + for file in actual_only_files: + diff_found = True + print("+Unexpected file `{}` found in the actual output.".format(os.path.join(actual_output_dir, file))) + for directory in expected_only_dirs: + diff_found = True + print("-Expected `{}` but did not find the dir in the actual output.".format(os.path.join(expected_output_dir, directory))) + for directory in actual_only_dirs: + diff_found = True + print("+Unexpected dir `{}` found in the actual output.".format(os.path.join(actual_output_dir, directory))) + + + files_to_diff = set.intersection(set(expected_files), set(actual_files)) + + for file_to_diff in files_to_diff: + expected_file = os.path.join(expected_output_dir, file_to_diff) + actual_file = os.path.join(actual_output_dir, file_to_diff) + + diff: List[str] + if file_to_diff.endswith(".xml"): + diff = compare_text_files(expected_file, actual_file) + elif file_to_diff.endswith(".data") or file_to_diff.endswith(".bin") or file_to_diff.endswith(".guildp"): + diff = compare_protos(actual_file, expected_file) + elif file_to_diff.endswith(".trl"): + diff = [] + if not compare_binary_file(actual_file, expected_file): + diff = ['{} and {} Files Differ'.format(actual_file, expected_file)] + else: + diff = [] + if not compare_binary_file(actual_file, expected_file): + diff = ['{} and {} Files Differ'.format(actual_file, expected_file)] + + if len_diff(diff) != 0: + diff_found = True + print(f"XML output was incorrect for test") + for line in diff: + print(line) - if all_tests_passed: - print(f"Success: test {testcase.name}") + return not diff_found + + +################################################################################ +# get_paths +# +# Gets a list of all of the file and directory paths within a given directory. +# Returns a tuple of `(files, directories)`. +################################################################################ +def get_paths(directory: str) -> Tuple[List[str], List[str]]: + files: List[str] = [] + directories: List[str] = [] + + for path in os.listdir(directory): + if os.path.isdir(os.path.join(directory, path)): + subfiles, subdirectories = get_paths(os.path.join(directory, path)) + + directories.append(path) + for subfile in subfiles: + files.append(os.path.join(path, subfile)) + for subdirectory in subdirectories: + files.append(os.path.join(path, subdirectory)) + else: + files.append(path) + return (files, directories) if __name__ == "__main__": - main() + returncode = main() + + if returncode: + exit(0) + else: + exit(1) diff --git a/xml_converter/integration_tests/src/proto_utils.py b/xml_converter/integration_tests/src/proto_utils.py index a170a89c..38e937e7 100644 --- a/xml_converter/integration_tests/src/proto_utils.py +++ b/xml_converter/integration_tests/src/proto_utils.py @@ -1,39 +1,27 @@ import os import subprocess import difflib +from typing import List def compare_protos( - outputs_directory: str, - expected_outputs_directory: str, -) -> bool: - # TODO: These paths are directories and 'markers.bin` is just one - # possible file in the directories. Eventually we should check all - # the files in the directory not just the one. - files_are_equal = compare_binary_file( - os.path.join(expected_outputs_directory, "markers.bin"), - os.path.join(outputs_directory, "markers.bin"), - ) + expected_proto_path: str, + actual_proto_path: str +) -> List[str]: + files_are_equal = compare_binary_file(expected_proto_path, actual_proto_path) if files_are_equal: - return True + return [] - expected_textproto_path = os.path.join(expected_outputs_directory, "markers.bin") - actual_textproto_path = os.path.join(outputs_directory, "markers.bin") + expected_textproto = get_waypoint_textproto(expected_proto_path) + actual_textproto = get_waypoint_textproto(actual_proto_path) - expected_textproto = get_waypoint_textproto(expected_textproto_path) - actual_textproto = get_waypoint_textproto(actual_textproto_path) + diff = list(difflib.unified_diff(expected_textproto.split("\n"), actual_textproto.split("\n"), fromfile=expected_proto_path, tofile=actual_proto_path, lineterm="")) - diff = difflib.unified_diff(expected_textproto.split("\n"), actual_textproto.split("\n"), fromfile=expected_textproto_path, tofile=actual_textproto_path, lineterm="") + if len(diff) == 0: + diff = ["Something went wrong diffing {} and {}.".format(expected_proto_path, actual_proto_path)] - for line in diff: - print(line) - - # TODO: Also might be good to include a HEX diff breakdown because if the - # diff is just ordering then the textproto conversion might correct the - # error and make it look like there is no diff but the test still fails. - - return False + return list(diff) def compare_binary_file(file_path_1: str, file_path_2: str) -> bool: From 4722a4d903f75b4d902b405133496b23b7f5fdf9 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Tue, 2 Jan 2024 16:51:43 -0600 Subject: [PATCH 403/539] linter fixes --- xml_converter/integration_tests/run_tests.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/xml_converter/integration_tests/run_tests.py b/xml_converter/integration_tests/run_tests.py index 30aaf249..c3a5d8a5 100755 --- a/xml_converter/integration_tests/run_tests.py +++ b/xml_converter/integration_tests/run_tests.py @@ -157,7 +157,6 @@ def main() -> bool: rebuild_xml_converter_binary() - for testcase in load_testcases(): xml_output_dir_path = os.path.join(output_parent_dirpath, "xml", testcase.name) proto_output_dir_path = os.path.join(output_parent_dirpath, "proto", testcase.name) @@ -211,6 +210,7 @@ def main() -> bool: return all_tests_passed + ################################################################################ # diff_dirs # @@ -241,7 +241,6 @@ def diff_dirs(actual_output_dir: str, expected_output_dir: str) -> bool: diff_found = True print("+Unexpected dir `{}` found in the actual output.".format(os.path.join(actual_output_dir, directory))) - files_to_diff = set.intersection(set(expected_files), set(actual_files)) for file_to_diff in files_to_diff: @@ -264,7 +263,7 @@ def diff_dirs(actual_output_dir: str, expected_output_dir: str) -> bool: if len_diff(diff) != 0: diff_found = True - print(f"XML output was incorrect for test") + print("XML output was incorrect for test") for line in diff: print(line) From 145393543e5c96c6acc0f03abc16d8b1077c9a05 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Tue, 2 Jan 2024 20:59:01 -0500 Subject: [PATCH 404/539] Made the field name and type case insensitive. Added tests to ensure this. --- .../case_of_category_names/input/pack/xml_file.xml | 11 +++++++++++ .../case_of_category_names/output_proto/markers.bin | 3 +++ .../case_of_category_names/output_xml/xml_file.xml | 10 ++++++++++ .../test_cases/case_of_category_names/testcase.yaml | 5 +++++ xml_converter/src/packaging_protobin.cpp | 4 ++-- 5 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 xml_converter/integration_tests/test_cases/case_of_category_names/input/pack/xml_file.xml create mode 100644 xml_converter/integration_tests/test_cases/case_of_category_names/output_proto/markers.bin create mode 100644 xml_converter/integration_tests/test_cases/case_of_category_names/output_xml/xml_file.xml create mode 100644 xml_converter/integration_tests/test_cases/case_of_category_names/testcase.yaml diff --git a/xml_converter/integration_tests/test_cases/case_of_category_names/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/case_of_category_names/input/pack/xml_file.xml new file mode 100644 index 00000000..f5b9a113 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/case_of_category_names/input/pack/xml_file.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/xml_converter/integration_tests/test_cases/case_of_category_names/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/case_of_category_names/output_proto/markers.bin new file mode 100644 index 00000000..a89a9d4a --- /dev/null +++ b/xml_converter/integration_tests/test_cases/case_of_category_names/output_proto/markers.bin @@ -0,0 +1,3 @@ + +L + My Category 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC \ No newline at end of file diff --git a/xml_converter/integration_tests/test_cases/case_of_category_names/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/case_of_category_names/output_xml/xml_file.xml new file mode 100644 index 00000000..0a23d2a0 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/case_of_category_names/output_xml/xml_file.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/xml_converter/integration_tests/test_cases/case_of_category_names/testcase.yaml b/xml_converter/integration_tests/test_cases/case_of_category_names/testcase.yaml new file mode 100644 index 00000000..9510c793 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/case_of_category_names/testcase.yaml @@ -0,0 +1,5 @@ +input_paths: + "pack": "xml" +expected_stdout: | +expected_stderr: | +expected_returncode: 0 diff --git a/xml_converter/src/packaging_protobin.cpp b/xml_converter/src/packaging_protobin.cpp index 5f5be44f..337c74ef 100644 --- a/xml_converter/src/packaging_protobin.cpp +++ b/xml_converter/src/packaging_protobin.cpp @@ -209,11 +209,11 @@ void write_protobuf_file( Parseable* parsed_poi = (*parsed_pois)[i]; if (parsed_poi->classname() == "POI") { Icon* icon = dynamic_cast(parsed_poi); - category_to_pois[icon->category.category].push_back(parsed_poi); + category_to_pois[lowercase(icon->category.category)].push_back(parsed_poi); } else if (parsed_poi->classname() == "Trail") { Trail* trail = dynamic_cast(parsed_poi); - category_to_pois[trail->category.category].push_back(parsed_poi); + category_to_pois[lowercase(trail->category.category)].push_back(parsed_poi); } else { std::cout << "Unknown type" << std::endl; From 09ee085975930d778b532746a69f7eda7e02d803 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Tue, 2 Jan 2024 21:19:47 -0500 Subject: [PATCH 405/539] Moved duplicate category to a 2nd file --- .../input/pack/xml_file.xml | 0 .../test_cases/category_name/input/pack/xml_file2.xml | 4 ++++ .../output_proto/markers.bin | 0 .../output_xml/xml_file.xml | 0 .../{case_of_category_names => category_name}/testcase.yaml | 0 5 files changed, 4 insertions(+) rename xml_converter/integration_tests/test_cases/{case_of_category_names => category_name}/input/pack/xml_file.xml (100%) create mode 100644 xml_converter/integration_tests/test_cases/category_name/input/pack/xml_file2.xml rename xml_converter/integration_tests/test_cases/{case_of_category_names => category_name}/output_proto/markers.bin (100%) rename xml_converter/integration_tests/test_cases/{case_of_category_names => category_name}/output_xml/xml_file.xml (100%) rename xml_converter/integration_tests/test_cases/{case_of_category_names => category_name}/testcase.yaml (100%) diff --git a/xml_converter/integration_tests/test_cases/case_of_category_names/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/category_name/input/pack/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/case_of_category_names/input/pack/xml_file.xml rename to xml_converter/integration_tests/test_cases/category_name/input/pack/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/category_name/input/pack/xml_file2.xml b/xml_converter/integration_tests/test_cases/category_name/input/pack/xml_file2.xml new file mode 100644 index 00000000..6534c5a1 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/category_name/input/pack/xml_file2.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/xml_converter/integration_tests/test_cases/case_of_category_names/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/category_name/output_proto/markers.bin similarity index 100% rename from xml_converter/integration_tests/test_cases/case_of_category_names/output_proto/markers.bin rename to xml_converter/integration_tests/test_cases/category_name/output_proto/markers.bin diff --git a/xml_converter/integration_tests/test_cases/case_of_category_names/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/category_name/output_xml/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/case_of_category_names/output_xml/xml_file.xml rename to xml_converter/integration_tests/test_cases/category_name/output_xml/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/case_of_category_names/testcase.yaml b/xml_converter/integration_tests/test_cases/category_name/testcase.yaml similarity index 100% rename from xml_converter/integration_tests/test_cases/case_of_category_names/testcase.yaml rename to xml_converter/integration_tests/test_cases/category_name/testcase.yaml From bbf82c99182e1849193a6626425ec34b1f8740ca Mon Sep 17 00:00:00 2001 From: klingbolt Date: Tue, 2 Jan 2024 21:24:12 -0500 Subject: [PATCH 406/539] Removing category line --- .../test_cases/category_name/input/pack/xml_file.xml | 2 -- 1 file changed, 2 deletions(-) diff --git a/xml_converter/integration_tests/test_cases/category_name/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/category_name/input/pack/xml_file.xml index f5b9a113..f3129faa 100644 --- a/xml_converter/integration_tests/test_cases/category_name/input/pack/xml_file.xml +++ b/xml_converter/integration_tests/test_cases/category_name/input/pack/xml_file.xml @@ -1,8 +1,6 @@ - - From 00e35ee17f65d80ae6fd10677fb4ffb02e3ba364 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Wed, 3 Jan 2024 00:24:47 -0500 Subject: [PATCH 407/539] Updated gdscript to reflect changes to texture field in proto --- Spatial.gd | 12 ++--- waypoint.gd | 143 ++++++++++++++++++++++++++++------------------------ 2 files changed, 84 insertions(+), 71 deletions(-) diff --git a/Spatial.gd b/Spatial.gd index 9cdafcf0..63d186b3 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -537,11 +537,11 @@ func _waypoint_categories_to_godot_nodes(item: TreeItem, waypoint_category: Wayp print("Warning: Trail ", category_name, " does not have equal number of X, Y, and Z coordinates.") for index in range(0, trail_data.get_points_z().size()): path_points.append(Vector3(trail_data.get_points_x()[index], trail_data.get_points_y()[index], trail_data.get_points_z()[index])) - var texture_path = path.get_texture_path() - if texture_path == null: + var texture_id = path.get_texture_id() + if texture_id == null: print("Warning: No texture found in " , category_name) continue - var full_texture_path = self.marker_file_dir + texture_path.get_path() + var full_texture_path = self.marker_file_dir + self.waypoint_data.get_textures()[texture_id].get_filepath() gen_new_path(path_points, full_texture_path, path, category_item) @@ -551,11 +551,11 @@ func _waypoint_categories_to_godot_nodes(item: TreeItem, waypoint_category: Wayp print("Warning: No position found for icon ", category_name) continue var position_vector = Vector3(position.get_x(), position.get_y(), position.get_z()) - var texture_path = icon.get_texture_path() - if texture_path == null: + var texture_id = icon.get_texture_id() + if texture_id == null: print("Warning: No texture found in " , category_name) continue - var full_texture_path = self.marker_file_dir + texture_path.get_path() + var full_texture_path = self.marker_file_dir + self.waypoint_data.get_textures()[texture_id].get_filepath() gen_new_icon(position_vector, full_texture_path, icon, category_item) for category_child in waypoint_category.get_children(): diff --git a/waypoint.gd b/waypoint.gd index d8cfe0f5..2cea1d5a 100644 --- a/waypoint.gd +++ b/waypoint.gd @@ -670,6 +670,12 @@ class Waypoint: service.func_ref = funcref(self, "add_category") data[_category.tag] = service + _textures = PBField.new("textures", PB_DATA_TYPE.MESSAGE, PB_RULE.REPEATED, 2, true, []) + service = PBServiceField.new() + service.field = _textures + service.func_ref = funcref(self, "add_textures") + data[_textures.tag] = service + var data = {} var _category: PBField @@ -683,6 +689,58 @@ class Waypoint: _category.value.append(element) return element + var _textures: PBField + func get_textures() -> Array: + return _textures.value + func clear_textures() -> void: + data[2].state = PB_SERVICE_STATE.UNFILLED + _textures.value = [] + func add_textures() -> TextureData: + var element = TextureData.new() + _textures.value.append(element) + return element + + func to_string() -> String: + return PBPacker.message_to_string(data) + + func to_bytes() -> PoolByteArray: + return PBPacker.pack_message(data) + + func from_bytes(bytes : PoolByteArray, offset : int = 0, limit : int = -1) -> int: + var cur_limit = bytes.size() + if limit != -1: + cur_limit = limit + var result = PBPacker.unpack_message(data, bytes, offset, cur_limit) + if result == cur_limit: + if PBPacker.check_required(data): + if limit == -1: + return PB_ERR.NO_ERRORS + else: + return PB_ERR.REQUIRED_FIELDS + elif limit == -1 && result > 0: + return PB_ERR.PARSE_INCOMPLETE + return result + +class TextureData: + func _init(): + var service + + _filepath = PBField.new("filepath", PB_DATA_TYPE.STRING, PB_RULE.OPTIONAL, 1, true, DEFAULT_VALUES_3[PB_DATA_TYPE.STRING]) + service = PBServiceField.new() + service.field = _filepath + data[_filepath.tag] = service + + var data = {} + + var _filepath: PBField + func get_filepath() -> String: + return _filepath.value + func clear_filepath() -> void: + data[1].state = PB_SERVICE_STATE.UNFILLED + _filepath.value = DEFAULT_VALUES_3[PB_DATA_TYPE.STRING] + func set_filepath(value : String) -> void: + _filepath.value = value + func to_string() -> String: return PBPacker.message_to_string(data) @@ -842,11 +900,10 @@ class Icon: func _init(): var service - _texture_path = PBField.new("texture_path", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 2, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) + _texture_id = PBField.new("texture_id", PB_DATA_TYPE.UINT32, PB_RULE.OPTIONAL, 2, true, DEFAULT_VALUES_3[PB_DATA_TYPE.UINT32]) service = PBServiceField.new() - service.field = _texture_path - service.func_ref = funcref(self, "new_texture_path") - data[_texture_path.tag] = service + service.field = _texture_id + data[_texture_id.tag] = service _guid = PBField.new("guid", PB_DATA_TYPE.BYTES, PB_RULE.OPTIONAL, 3, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BYTES]) service = PBServiceField.new() @@ -1020,15 +1077,14 @@ class Icon: var data = {} - var _texture_path: PBField - func get_texture_path() -> TexturePath: - return _texture_path.value - func clear_texture_path() -> void: + var _texture_id: PBField + func get_texture_id() -> int: + return _texture_id.value + func clear_texture_id() -> void: data[2].state = PB_SERVICE_STATE.UNFILLED - _texture_path.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] - func new_texture_path() -> TexturePath: - _texture_path.value = TexturePath.new() - return _texture_path.value + _texture_id.value = DEFAULT_VALUES_3[PB_DATA_TYPE.UINT32] + func set_texture_id(value : int) -> void: + _texture_id.value = value var _guid: PBField func get_guid() -> PoolByteArray: @@ -1353,11 +1409,10 @@ class Trail: func _init(): var service - _texture_path = PBField.new("texture_path", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 2, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) + _texture_id = PBField.new("texture_id", PB_DATA_TYPE.UINT32, PB_RULE.OPTIONAL, 2, true, DEFAULT_VALUES_3[PB_DATA_TYPE.UINT32]) service = PBServiceField.new() - service.field = _texture_path - service.func_ref = funcref(self, "new_texture_path") - data[_texture_path.tag] = service + service.field = _texture_id + data[_texture_id.tag] = service _guid = PBField.new("guid", PB_DATA_TYPE.BYTES, PB_RULE.OPTIONAL, 3, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BYTES]) service = PBServiceField.new() @@ -1499,15 +1554,14 @@ class Trail: var data = {} - var _texture_path: PBField - func get_texture_path() -> TexturePath: - return _texture_path.value - func clear_texture_path() -> void: + var _texture_id: PBField + func get_texture_id() -> int: + return _texture_id.value + func clear_texture_id() -> void: data[2].state = PB_SERVICE_STATE.UNFILLED - _texture_path.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] - func new_texture_path() -> TexturePath: - _texture_path.value = TexturePath.new() - return _texture_path.value + _texture_id.value = DEFAULT_VALUES_3[PB_DATA_TYPE.UINT32] + func set_texture_id(value : int) -> void: + _texture_id.value = value var _guid: PBField func get_guid() -> PoolByteArray: @@ -1772,47 +1826,6 @@ class Trail: return PB_ERR.PARSE_INCOMPLETE return result -class TexturePath: - func _init(): - var service - - _path = PBField.new("path", PB_DATA_TYPE.STRING, PB_RULE.OPTIONAL, 1, true, DEFAULT_VALUES_3[PB_DATA_TYPE.STRING]) - service = PBServiceField.new() - service.field = _path - data[_path.tag] = service - - var data = {} - - var _path: PBField - func get_path() -> String: - return _path.value - func clear_path() -> void: - data[1].state = PB_SERVICE_STATE.UNFILLED - _path.value = DEFAULT_VALUES_3[PB_DATA_TYPE.STRING] - func set_path(value : String) -> void: - _path.value = value - - func to_string() -> String: - return PBPacker.message_to_string(data) - - func to_bytes() -> PoolByteArray: - return PBPacker.pack_message(data) - - func from_bytes(bytes : PoolByteArray, offset : int = 0, limit : int = -1) -> int: - var cur_limit = bytes.size() - if limit != -1: - cur_limit = limit - var result = PBPacker.unpack_message(data, bytes, offset, cur_limit) - if result == cur_limit: - if PBPacker.check_required(data): - if limit == -1: - return PB_ERR.NO_ERRORS - else: - return PB_ERR.REQUIRED_FIELDS - elif limit == -1 && result > 0: - return PB_ERR.PARSE_INCOMPLETE - return result - class RGBAColor: func _init(): var service From 14a027911f1371d05dd82b2cf4b6a4ef47766c29 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Fri, 5 Jan 2024 00:22:19 -0500 Subject: [PATCH 408/539] Added argument for copying files and standardized proto reading --- xml_converter/src/packaging_protobin.cpp | 2 +- xml_converter/src/xml_converter.cpp | 63 +++++++++++++++++++++--- 2 files changed, 56 insertions(+), 9 deletions(-) diff --git a/xml_converter/src/packaging_protobin.cpp b/xml_converter/src/packaging_protobin.cpp index 337c74ef..3d31b090 100644 --- a/xml_converter/src/packaging_protobin.cpp +++ b/xml_converter/src/packaging_protobin.cpp @@ -251,7 +251,7 @@ void write_protobuf_file_per_map_id( } for (auto iterator = mapid_to_category_to_pois.begin(); iterator != mapid_to_category_to_pois.end(); iterator++) { - string output_filepath = join_file_paths(proto_directory, to_string(iterator->first) + ".data"); + string output_filepath = join_file_paths(proto_directory, to_string(iterator->first) + ".bin"); _write_protobuf_file( output_filepath, diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 96e02865..dc3b43ae 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -77,7 +77,7 @@ void move_supplementary_files(string input_directory, string output_directory) { } move_supplementary_files(path, new_directory); } - else if (has_suffix(filename, ".trl") || has_suffix(filename, ".xml")) { + else if (has_suffix(filename, ".trl") || has_suffix(filename, ".xml") || has_suffix(filename, ".bin")) { continue; } else { @@ -105,6 +105,21 @@ void read_taco_directory(string input_path, map* marker_catego } } +void read_burrito_directory(string input_path, map* marker_categories, vector* parsed_pois) { + if (!filesystem::exists(input_path)) { + cout << "Error: " << input_path << " is not an existing directory or file" << endl; + } + else if (filesystem::is_directory(input_path)) { + vector burrito_files = get_files_by_suffix(input_path, ".bin"); + for (const string& path : burrito_files) { + read_protobuf_file(path, marker_categories, parsed_pois); + } + } + else if (filesystem::is_regular_file(input_path)) { + read_protobuf_file(input_path, marker_categories, parsed_pois); + } +} + void write_taco_directory(string output_path, map* marker_categories, vector* parsed_pois) { // TODO: Exportion of XML Marker Packs File Structure #111 if (!filesystem::is_directory(output_path)) { @@ -132,7 +147,8 @@ void process_data( // This is a special output path used for burrito internal use that splits // the waypoint protobins by map id. - string output_split_waypoint_dir) { + string output_split_waypoint_dir, + bool move_files_to_output) { // All of the loaded pois and categories vector parsed_pois; map marker_categories; @@ -146,10 +162,20 @@ void process_data( &marker_categories, &parsed_pois); - // TODO: This is wildly incorrect now because we might have a - // different output directory then output_split_waypoint_dir - if (output_split_waypoint_dir != "") { - move_supplementary_files(input_taco_paths[i], output_split_waypoint_dir); + if (move_files_to_output) { + if (output_split_waypoint_dir != "") { + move_supplementary_files(input_taco_paths[i], output_split_waypoint_dir); + } + if (output_taco_paths.size() != 0) { + for (size_t j = 0; j < output_taco_paths.size(); j++) { + move_supplementary_files(input_taco_paths[i], output_taco_paths[j]); + } + } + if (output_waypoint_paths.size() != 0) { + for (size_t j = 0; j < output_waypoint_paths.size(); j++) { + move_supplementary_files(input_taco_paths[i], output_waypoint_paths[j]); + } + } } } auto end = chrono::high_resolution_clock::now(); @@ -160,10 +186,26 @@ void process_data( // Read in all the protobin waypoint markerpacks for (size_t i = 0; i < input_waypoint_paths.size(); i++) { cout << "Loading waypoint pack " << input_waypoint_paths[i] << endl; - read_protobuf_file( + read_burrito_directory( input_waypoint_paths[i], &marker_categories, &parsed_pois); + + if (move_files_to_output) { + if (output_split_waypoint_dir != "") { + move_supplementary_files(input_waypoint_paths[i], output_split_waypoint_dir); + } + if (output_taco_paths.size() != 0) { + for (size_t j = 0; j < output_taco_paths.size(); j++) { + move_supplementary_files(input_waypoint_paths[i], output_taco_paths[j]); + } + } + if (output_waypoint_paths.size() != 0) { + for (size_t j = 0; j < output_waypoint_paths.size(); j++) { + move_supplementary_files(input_waypoint_paths[i], output_waypoint_paths[j]); + } + } + } } // Write all of the xml taco paths @@ -212,6 +254,7 @@ int main(int argc, char* argv[]) { vector output_taco_paths; vector input_waypoint_paths; vector output_waypoint_paths; + bool move_files_to_output = false; // Typically "~/.local/share/godot/app_userdata/Burrito/protobins" for // converting from xml markerpacks to internal protobuf files. @@ -238,6 +281,9 @@ int main(int argc, char* argv[]) { // CLI arg parsing later to properly capture this. arg_target = &output_split_waypoint_paths; } + else if (!strcmp(argv[i], "--copy-images")) { + move_files_to_output = true; + } else { arg_target->push_back(argv[i]); } @@ -258,7 +304,8 @@ int main(int argc, char* argv[]) { input_waypoint_paths, output_taco_paths, output_waypoint_paths, - output_split_waypoint_dir); + output_split_waypoint_dir, + move_files_to_output); return 0; } From 251d775a6fb3d3c28b542d52b8aa55a1ed7e4c3c Mon Sep 17 00:00:00 2001 From: klingbolt Date: Fri, 5 Jan 2024 00:36:00 -0500 Subject: [PATCH 409/539] removing the copying argument --- xml_converter/src/xml_converter.cpp | 54 ++++++++++++----------------- 1 file changed, 22 insertions(+), 32 deletions(-) diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index dc3b43ae..b1a54625 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -147,8 +147,7 @@ void process_data( // This is a special output path used for burrito internal use that splits // the waypoint protobins by map id. - string output_split_waypoint_dir, - bool move_files_to_output) { + string output_split_waypoint_dir) { // All of the loaded pois and categories vector parsed_pois; map marker_categories; @@ -162,19 +161,17 @@ void process_data( &marker_categories, &parsed_pois); - if (move_files_to_output) { - if (output_split_waypoint_dir != "") { - move_supplementary_files(input_taco_paths[i], output_split_waypoint_dir); - } - if (output_taco_paths.size() != 0) { - for (size_t j = 0; j < output_taco_paths.size(); j++) { - move_supplementary_files(input_taco_paths[i], output_taco_paths[j]); - } + if (output_split_waypoint_dir != "") { + move_supplementary_files(input_taco_paths[i], output_split_waypoint_dir); + } + if (output_taco_paths.size() != 0) { + for (size_t j = 0; j < output_taco_paths.size(); j++) { + move_supplementary_files(input_taco_paths[i], output_taco_paths[j]); } - if (output_waypoint_paths.size() != 0) { - for (size_t j = 0; j < output_waypoint_paths.size(); j++) { - move_supplementary_files(input_taco_paths[i], output_waypoint_paths[j]); - } + } + if (output_waypoint_paths.size() != 0) { + for (size_t j = 0; j < output_waypoint_paths.size(); j++) { + move_supplementary_files(input_taco_paths[i], output_waypoint_paths[j]); } } } @@ -191,19 +188,17 @@ void process_data( &marker_categories, &parsed_pois); - if (move_files_to_output) { - if (output_split_waypoint_dir != "") { - move_supplementary_files(input_waypoint_paths[i], output_split_waypoint_dir); - } - if (output_taco_paths.size() != 0) { - for (size_t j = 0; j < output_taco_paths.size(); j++) { - move_supplementary_files(input_waypoint_paths[i], output_taco_paths[j]); - } + if (output_split_waypoint_dir != "") { + move_supplementary_files(input_waypoint_paths[i], output_split_waypoint_dir); + } + if (output_taco_paths.size() != 0) { + for (size_t j = 0; j < output_taco_paths.size(); j++) { + move_supplementary_files(input_waypoint_paths[i], output_taco_paths[j]); } - if (output_waypoint_paths.size() != 0) { - for (size_t j = 0; j < output_waypoint_paths.size(); j++) { - move_supplementary_files(input_waypoint_paths[i], output_waypoint_paths[j]); - } + } + if (output_waypoint_paths.size() != 0) { + for (size_t j = 0; j < output_waypoint_paths.size(); j++) { + move_supplementary_files(input_waypoint_paths[i], output_waypoint_paths[j]); } } } @@ -254,7 +249,6 @@ int main(int argc, char* argv[]) { vector output_taco_paths; vector input_waypoint_paths; vector output_waypoint_paths; - bool move_files_to_output = false; // Typically "~/.local/share/godot/app_userdata/Burrito/protobins" for // converting from xml markerpacks to internal protobuf files. @@ -281,9 +275,6 @@ int main(int argc, char* argv[]) { // CLI arg parsing later to properly capture this. arg_target = &output_split_waypoint_paths; } - else if (!strcmp(argv[i], "--copy-images")) { - move_files_to_output = true; - } else { arg_target->push_back(argv[i]); } @@ -304,8 +295,7 @@ int main(int argc, char* argv[]) { input_waypoint_paths, output_taco_paths, output_waypoint_paths, - output_split_waypoint_dir, - move_files_to_output); + output_split_waypoint_dir); return 0; } From 9ad280d75eea13d0c34d6a895625044afb41c5e7 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Thu, 11 Jan 2024 23:04:15 -0500 Subject: [PATCH 410/539] Added textures to proto reader state --- .../texture/input/pack/my_texture.png | Bin 0 -> 5881 bytes .../texture/input/pack/my_texture2.png | Bin 0 -> 13277 bytes .../input/pack/somedir/my_texture3.png | Bin 0 -> 13277 bytes .../texture/output_proto/my_texture.png | Bin 0 -> 5881 bytes .../texture/output_proto/my_texture2.png | Bin 0 -> 13277 bytes .../output_proto/somedir/my_texture3.png | Bin 0 -> 13277 bytes .../texture/output_xml/my_texture.png | Bin 0 -> 5881 bytes .../texture/output_xml/my_texture2.png | Bin 0 -> 13277 bytes .../output_xml/somedir/my_texture3.png | Bin 0 -> 13277 bytes xml_converter/src/Imbiber.py | 17 ++++ xml_converter/src/attribute/image.cpp | 34 ++++++-- xml_converter/src/packaging_protobin.cpp | 22 ++--- xml_converter/src/packaging_protobin.hpp | 3 +- xml_converter/src/packaging_xml.cpp | 29 +++---- xml_converter/src/packaging_xml.hpp | 3 +- .../src/state_structs/proto_reader_state.hpp | 8 ++ .../src/state_structs/xml_reader_state.hpp | 4 +- xml_converter/src/xml_converter.cpp | 76 +++++++++--------- 18 files changed, 121 insertions(+), 75 deletions(-) create mode 100644 xml_converter/integration_tests/test_cases/texture/input/pack/my_texture.png create mode 100644 xml_converter/integration_tests/test_cases/texture/input/pack/my_texture2.png create mode 100644 xml_converter/integration_tests/test_cases/texture/input/pack/somedir/my_texture3.png create mode 100644 xml_converter/integration_tests/test_cases/texture/output_proto/my_texture.png create mode 100644 xml_converter/integration_tests/test_cases/texture/output_proto/my_texture2.png create mode 100644 xml_converter/integration_tests/test_cases/texture/output_proto/somedir/my_texture3.png create mode 100644 xml_converter/integration_tests/test_cases/texture/output_xml/my_texture.png create mode 100644 xml_converter/integration_tests/test_cases/texture/output_xml/my_texture2.png create mode 100644 xml_converter/integration_tests/test_cases/texture/output_xml/somedir/my_texture3.png create mode 100644 xml_converter/src/Imbiber.py diff --git a/xml_converter/integration_tests/test_cases/texture/input/pack/my_texture.png b/xml_converter/integration_tests/test_cases/texture/input/pack/my_texture.png new file mode 100644 index 0000000000000000000000000000000000000000..56c45ea1f83feb7fa9ecdffe6a7c6396594a4dce GIT binary patch literal 5881 zcmV zaB^>EX>4U6ba`-PAZ2)IW&i+q+U=TIavVF7MgOsiUIJ!!EC-`m?Vy+6#}SznB~tbD zs`{g?tw@QPjEunG!yO{%_J9B5xc}m-BvqG-Xl=E6zH-YgcHXFezS{j6e7-;LR~@g< z!q3Ou#|M!^iP!Y}D*bhS=Xm*X!F!G{em?H>^-0v%K(7zp116g}@@9QrB*)`(Jml9v zZNHY>R6Z|t#OHOsPP|Kb{ZDd-{uso5cb^YrAxf)oR*G?_ko^6r&kB6cj6SB!Y`?FXTJAN(8Q zPZOt)6~&)FSS6${+j;#zXX!cn*p@LukB<6C|A zljJNv{os3s79vw07jjskhZFXFonf-X9Cs96W1KPFW11wkIMb6SzQc)27cfJ{vnOES{7#J*Y$#1{iKl||Se7kd|g(!Iah!yLKR=F(0GG{+Ii-d&p z%3HYset*Bx??2TKrAh|N4YRVr?#DC4DB(wKrJLu(d4<=fD}s~t8h{WncVRIUe-6He zR6-42Vw4bwqmrP`%45oLkbzK2Tr4u?lxlPmHQL-wA4vf z&V~Astkh7aw{j_^7AfjVE4`+gYpJzLHIVC)BukMhA}UR~Ce2#3s;Fwy-eOB&U}?2U z)7Dz=(RC*3jMX{6b7aJkMjmCO|f{1cQ@eIU{2+ z2Qn^}0SY==&b)@4qh-!==9{5hi7c{MZrlo%F;bX!h~rX5^WH~jvpAMDXR%XUxr+9HO+w ze4#@KmApene0pv*v2e))831nR9Pk!+*30n=0idIZp~EWflsaMqskH5YOd!kyDr*(e zYH{dfZWwGHRtt=!6qFfK?8t|$7&B$iPy84}j-`|t>fA`4Y<1P8^tp5w z-Lkw?_15bM7KA@4zrt)bD&2F(g&?O%M;msx_n5yKu~J24 z^fL193ZZBm1bggW$4bMMyBcezTfL^K2u%??W8Kah6g@erb@a|~^bhllqQ^_hbj9w0 zK64TB;FPgf^p*x8^eb;?@0fpioEbFzrUWP0D5xl3cafdZSkWV{_8! zAy6Lj<7D^C*`Lm(w>W!~b)g@mx0Bnv?Yqy@#z>55n%WlOhz1GZ%KNJibP5eZw~nXe z&!Tz#p|}yynLsVBPOT@Q$kXW_K5o>D(=)QPKo*H_s&y~cH+s#7#SpYsxsK3+V<*(S z5g_n+8Ja2oy3hb%-pavIOOrlL^F(HAd(27Wj-)5m0buRXW^98e8*iH9f95WoR{kLcTZlf5U0C)nh zH8Z*%rsGmgJ5KCP8_1ne={sP2ps*-LlvAOHa3QH#gdM+Ep_s^rERshRG6AY%S@mYL z47&lEsvca)GFAceQUXNY95c_V$I%stJKNl(Ax@5TXgz(96sqKQ6ZL=sJ{jt`$$u`m zr=#*;7r2ir-scx1j+tZ=UECK?Fm|?FkCSTg&yohJXgu#Rg#95%|I>kg@*2-2K9k8` zsn0zPYwQBh*bsfUOYU;S(v zf{v<{_>?_oEy(i}2->2~k;~h5j1Yzs8~;XcNun&>q3-h9D<=ooi=YZ(^DTA$(P z*k#gTclbkdBHbAtJg0i24exr%-Gm6*J8K%ya5Pze14Ma0h~@@>6Jj6Dyu0H=x_r~I?xKK-%gu)C%_3@qhD`LMDP#_UUxAAV`ym;LwQ(v5wwWiKsZJfjSTp`L0{<>2$#T{PQL5Uh{E< zo%fC5mSC3#(Gs=0Y~T zP!HW7>Jq&&$tP;Od0KM`)grbCxou8CLLw9v*pnbCbmF4h}O!lNuqY@B&37fAb;pj7p*d}#2?uZ$pm3y;)7@lEs zK^Vw2oY6|1*e>F^Zfpxchrg35!%S*@LK|GHH@3lBY`fi{LJWd1Yi69pq$2$UgNQ5U z(7cI}DMQC5(H_UNOj(i<Jjvx5+r_1sw1eGOgadBm;-+ z3@YQwjHc0S(4flK0yE5O$3{##c7*~!m!Jti)(x~XUj$X!#Bjrz4yDf<&q^CLyvT77 zFyB-By%wOiH3cXuA;8N657pxfEal}M*m)X!p-9qv+7 zlO!IR856fI0VBA;B?U_+(K3_M=#i~81P^itL&yg_o81?H6-$`g?AD3JV$*!9fuQ3B zAtlhTnPalL=4wnKc8?!OREHCbeLs})hm4Xc&^1_2!_BG0j@(p-3h~8m7|gFX47i+< zzT&M&Fp&}P%j2{!U8P@q|DV2o=_`TFn=w9_ zhKRfZLO2INew9SZ&A1EIgn%2=c-?mU3!woJqtY+{M_kb4MUji~#Q1g9mhI znyjXfu!zeRvAebg31W~#Y{9W>4WS)68$1E&5VU6a85zog(+;%PO+|41iKDnFX0Xt2 zKr10^7K?a>t#*Q2=eoi&sD2z2MY)zeGnxgH)rzgE-Df2H zw3!yloOck8uO-^kd{eZ|tl%(hOu3JO@N|A+3D~#lq9k?{qQx4?S*<#u=s^38#I#5X zzyyA!k`eLdM~Nml0NC#476=*;b*q$A>M)N98B1Jv&uS27&ujrD4?HGTAQdeOiAqKq z043OX-&WjCF_zRv4HI=b{Ur4Ruh`bw3%809K*jHN(45dVR#HK8k4H382UQitHZnG= zMks4!=$*8%=#XsTpmng@IE!G&$R@X}%{o44o872O3UUIvY9ZP!!|8CcltQqF0LAJO z@4!MwL5LXQZTzc&RYtwHG0;Z_a)$=H^loykl)zRU76Y4@(t378 zxlqCZ$%9cM-_f$;Ah#*|z%#%-kO^!@2q4(Kv;}9NN*F2xTNlmjhq*0wj~CQn_mIU( z9V;5FXX%gF?Iw0p>AlN+^q*Ox1ZYP&g$*@UGvi%s19yxYW{j{ECPsoAFjv9F(GPaB zfV%vO_EFxX$bllLlPkfmvX(bymBZL);6@y(mt|WhzMo)H5Awcxrcp=#Vvy7MR&3Fi0m*4f%kk z&2I9TGVm)R%mFJT*EZ8{xAx1nD(vVR;xl1$ynl?5l1Pr~rdvJineLx+WU7OXF$zFD zP^Lt5b$fbDJp)&nVKOurjBE-iy?;}Z=(R}6ZvmY;d}eo3+P%dQaEV`!VSv5@~ zD{k8w4RAapEeSjauTau$Hb9XA@f~`O@b`hCXlr;3^Bd5s@{*vrLMp)hcltfI1 zyEX>4Tx z0C=2zkv&MmP!xqvQ$?v25j%)DWT;LSL`5963Pq?8YK2xEOkVm2O&XFE7e~Rh;NZ_< z)xpJCR|i)?5c~mgb#YR3krMAq3N2!MaCsl+y>qzlK0v6KnPzp21DbA|sYG1NWLL$m zSA@_*6-B?yEMrcRlJH$$_XzO)F2=L`@BO)Y)ttqEfJi*c4AUmwAfDc|4bJ<-5muB{ z;&b9LlNuy`C`-Ngjg)JvC_t@Xlle$#8Fk#DPPEVta9Gstd*;* z*(ZNtIH#{HbDe4!2`pj>5=1DdqJ%PR#Aw$^v5=zkxQ~Cx^-JVZ$W;O(#{w$QAiI9> zKlnXcD?d5mC57Wa=ZoWfi~wD`K%?e3-^Y&AI01ssz?I(eSL(pbC+W487Ci#`wt(i|qi@Or1GhkE&6`{E9H$RJnr4-}0S*p<(E??!`@Flm zeQy8WY0mElL%MR5WcjsD(7jgO@hr$DSdY?PPU%oHvMSj0 zP53<*yEJF3aE$p1@_rfAKENZp_X7(E_SJPtHwN^V2!X^ z@k#*_-bb*erJDGC1ZxVbaScYbK%626gtg&u_t=}Xk8LZehsj1#1Yob;~tI$&Z%C%yZ z9lI2(?AWDPWv4%iRd(!BX0e@qDOTCBYo62WU2pW^fDh2WZSiIe@!g8`MsEXkshh@$ z$mNH>y=_+t%TOtpRSjg)<#ro|@N+lFRXF#9NfCXKH|h>Es(O|;)&PGCQjfvayXmoO z^U}8MLZr+cW~x^QECkAXzptCdJ-aDM-8753X`J_d|3P}JN;b>)&G7pH_1^D~*Xzd@ z`_*i=yDw~>=}X(Tt~j&06!>hQE}cbgh(L*m9Iw}H_{`g4WQcxeXVxRD?gy+J%&96< z-)CB|D~4H7szK-6Ziu2`@SEUnV)RvzUH`X5n6+B1{11nt1nAW&@;i+lkFE%_y!ZQX zalhTfG3NGg59vzvu<2yzvj6}9000000000000000000000000009fK52X{qEXnJy< P00000NkvXXu0mjfm(VbP literal 0 HcmV?d00001 diff --git a/xml_converter/integration_tests/test_cases/texture/input/pack/my_texture2.png b/xml_converter/integration_tests/test_cases/texture/input/pack/my_texture2.png new file mode 100644 index 0000000000000000000000000000000000000000..21a80261d86c0235b084608c7558c247f3968707 GIT binary patch literal 13277 zcmW+-1yoy26NLgri@UaHad&HR=PT}7+}*9XOVDD4;%>#=-5r9aSa5g#*PnAjPQu%_ zyR-9V?%cUV{--4U0fiU^1_tJXtc-*T@c#Jkh4dcy9dWE947|a+h{>uU0YAP--y?v} z$c{4FE-)~0FaKV!GY`~_z?Vd>l3K2+4(6^N#?EFi9v&VnR`xb7rpAtDEDp{VnWsX; zFfbosWF@|;d1jqtd-x`+-@a{v$dM8fLWpIkQl`aNXR*FYe*MCPYNA<_23}xJ)$b~A zds4-8(_dRf)&Ge!>rENWmT z48>C>Q=&}rFDb|eLxk?|ZniHLhF3J$kuAcq}UAfgl9zFiKVjwrFR-3Cl_%z7DS;E%wjapgdt=*bp`>(#d;vSrY%Jm#M(% zgM&jQd~TfV`3CW`J~ejJCs;hnvjxtc`{(-l(4oz{Ox;+{v(5oR9I!TH4+X-Ye#5GTZDeNKFnT*?8CyoQqv7M?k@K<*e@iFqwtEoZmvW9ZhJ?^ z0sdO3({IGtR&~t7jI@&4$-X9dbEC^sC``G(aMlNUSLAdFe>BTHNdDj+L{a3Uz>lfd z`uQEcj*TxejyA0W?pSp_YipVIwfcmD-XCq2&M>2hnWj;jN%#Uw4+fdfof}}W!{zK$$# zNZw%}O-mdY9Z7cKdLj^1(x!;r32`a6a}RagDNwRaUmj&|7#R&!QAM4SZB-vms*#;r zD9|)4v0e-Es~qHnic6wT7b#+@+7m!w{&LABH~PV20Adh_*6`LwWPV1KuAI3d-nbs z{&q)97+Nqb9IRFGIqaJtokLV-DOgr13Xix=(nvfe<1$Jv&#ALhBqa3x)ok<~r{5@F zdxv@oDCC_DoBBMzu*$)yGOvP9EncJ^s=b6xa`hup`qY(U_N)|2QShHfEQm6)dXr&bm~Z#Jjya)^XZq#a&S(d{5ka;{R^s^JswGhO4(tH=r$% zIPW&+#fHs(C@m}7n@-&G=p+-d_Oc-Tvcy8h92XgVG71gw*Yh-0gflmio8@2NcLK&r zGBGTU_}oS`$v1Cc28bHk=dkHn9-nqdXFe-9usLpRA?H20o-m}kq9WT5jCJ`1CiXoc z$2xQq8u6pt-Pi!udNNXKr)LSPZOGM=FH#_<<2pT0oSR=<3Iec#-CMbl=S)x*TL04SDDFIP(e3SpshW~($S zw)pOJa4s8d`ttH3Q@LbbR#EZ81K+oApkhpHs;sQccy7<{z*PWyhYHW@kOk``@@z51 z?`f_CM{ntkRXE7e=uc9#E%21tnBGF7c(nPVhbQju?`s@qbfR}JucBp@;yzJvhBL3B zpPwnGC1it&545FzCpLigM%h=4 zj4u;^`m;H9xM%+EWch+KOUP>T_Go~nFpDo`G9gG9&+B%vQa5Q;Ffuq?`P;W|g^)zk zKs1F8nByqiRw!1el~UDbJ>^64p*osLI%iI|Ki(P@>y~%>_;~s>&{@3q*UCNeJz2t^ zOAuaEK`TBVV@KtTYoURW-R8&Zo+>EdKM_3*N>!dpr{k1}5eMrz2xkFQ?ZxY<5WUGE z`C=;iZ!7p$_{{GP<~Vb}KJoO2%x51IVEkd22=>>I!i!&MdL{BHf%#9D-JHMaG@<7k zZsLXu2RuY6W(j+IyKo~D2)S6>KUEc&ItwiQB{lPww)j!F)dn-T)LlP?4#SS5B37M; zcHcQ?Iw*z`{{184(S0S5f zu<^FN`{L1RJSJWPL03XU$1tQpVP8 zm4_J)DhHGDXbg-Sdh~kL@k+(J(}}84sVly|?Lee6JA$yU1Mnj9X!Y>t6yV4QOLQ3> zPw}YCp$qei+b1WI&MGk`Pp|?W*5UE-yh8&Rzt}8xy5OSJh1Fnyz4x2;-h@H^;?>!| zC`IpLqJ}Q4@O!Ou`IqGXZG7w> zl60nNN{H6hlwd{fRujJC|20w?BI9L1m#)0c8dn3;LQQjyUReig)o}lk@k0lp&8edQ^ z<=C21j~X2X*-GTRNF*BZ^zWH$$Nf3hT6ZuyIyqMLcN@IA}qzD3}+UTw_);red!nYlb*HUC}!Kr~IuEHOm1_TbWwyTFQasgfCsZ_n&gj)n7 zNk0nGrNw3@Q`8~-r=``~31?-yUKgLcc=A!+H)lOY*vodsJy6wxBQoxodj54(LB^4B zHLSt7%LtM5Bm4mxld7>bNG4A(M@B6Sdb&3xb9ITKCkum~DVpXw4+Tm$%ZHWNtM7AV)Q5E|)@ZhRmNn?Rq zdFr~)l0+EV5e-*oS!^?YSu0?$%h7Jr&Ovh9tL3O!H*wXOy@}j3NIz+Y|O8!-kLht&76FXj|OAQ2*#W#~H zby~&G%;iRFapDaQOQ{i)Cz)g<6a*usoEeb6sM3tVLGf(N9i>tz;7%E378yxNyiLEe zY5%CGY3R){I5!MHl^5Vv9)6|bxx^&Wu|+aO$+UGb_DJ7)?pxWsHH^a%JWSmAA07n0 zl`Ai90%XclEzvFU6GrRlUkh%P3jEp{)si(;n3`dW*yG4V<+BZxolO)#>OKID0`LOk z$}vF%#zc11NK^~t1+6CNGAuP(@HB<@xeL#9*J0e zkJ$4Z2{qG3*t@?8g`Hta{gO(m%059=suac5&A98~ zGJMlZ`6`pQ21oCl@_ad_#KFoH;F;fJv~>|)>;&!K2Ee?t$V<}s3nOEBX;o>SX8gU) z28R7y)T>|HT(Ram?KEe4Tt0-NPed6jxOn=7%4hww0~^eZs3g2+IQmjCy$y{U*DGoh zA498{ot5kn5YdZ}vr8A7Jg~C`!sg1Qg@BkyD&#BI4B-OK4}cCuX3({UJ z0r@3u(xnzvL6s!afR{6kugo$^QN~YIePY7vb*%fG?(<)spMQ!h3b9S+8jC;ur>Q$c z6skxapUbD*cAg*=Z+km?7!hGPwRnOk>9B-xkEx2vU|cY57hiVViu-Uw7%L_6I`4ee z4|p=#aey7-%GQ=fgDuf;9#yI!*Wt~3F)kR-=H(x#jmV}!`r!?v`9LI`lbB^WCBf5jRYC{$Bd zSN*0fDJx5~u)w{PrR1$$A(4F2hOP>PKF3UrkdOudLQhxsMjy{&QBY7EF(nV9RGIOP z2Ks|DgsgDoQynmg1CH;t8&CN9Yd&>UdjTLcx)e0T@%G{%X}=366iUy(#8lT8BLK;2 z$3lsglaUu3DxEvb;s?p@h1zm(x(v4`R6;C`Gq+CuNS@fPF13 z*{)t++m9@WW2Ig%Cewhgbu4`|7r(Z@EV?XJZj!`G8TjpP=7)=5JVYga#XevRHNZkAi|}6S{Y`W@94mrve4u zBG6;kli47^HB5d}MZ_H`q($6{**x6vJ27PQZak`$`~s}UxZw|Nks?v-d>riJce(vB zOjXa0XU(mB#Td$>gv-EF0+j1@wj=M-GC@m=i?x13uo~4Xy+zDE{EW94lP5@MT-jAW zF)1WXd~w-lvP0w4Uk~aFZ8sR);jfP~K!lvm-EL=Rf(e6ysGV5cZan9?MIy;!1XL&( zm|g(oAX>fFQ^uXC-Q*vBj$Duv0^~Vlr^IW8$lua(O|-hwDJhzlYiaw)H21CUhutLA zlO3mizh{OW-q>;hG6HKZ&Um$c!;-p@=>-c#e(uJ$j)Onkmu2kGNwiYcO9;&2fk9hoklIJ$>`d|Vl6h-+I#pQA=?dsuq z%*^-YL@qPSoRU2oE-i^v+&Y)~@m48cG8!i5xAf6h30f6=gmS`}2g%17Kh(9<4HmT}Mfp3GTbXC}i>sm2nyRZfH>V`BR2%tgW@1 zEt${SpJ?_c`DtxV_xI(2r09A$n>akIUfDqKb>g+N4NX41CYh}Ujea!`AZm08U5|~%C2g3vz#IR&1c0y(`Fo#A!E_czTWt(ucs7Z6SxbQ zgoNGaB##^>o&i#E2g)Wt&NVF4c7O{I(Fuv6^+>iOX2Niwzy+)6&&_kyWU9XR@rur|$WtBKyN;K3o*zYoU zCD)Wh;eDT>FAeN-W)WfoSwbuB5$<&bM?0FQ-Lr6_Bni6g2jqP z^TR=&K4Yl}HzSjiX1hhg&vi}&nN7!kORBbRhjIL>T4;y|%p1!9xS%TFSO`fLrPY=#dcBWqE zL4pUFtKj#GUOYo_xyB1e%uM>7IdjFFTt0DWO5tCR5nrv0$UTdu+um7y#`RJ$K^sf! z+^^wpnX!cQ#rtnfRkPHzIu@9XeL3xT(#Xm3VI><_!2WpXp@x?TBmhw0u!vCrFu z(xGL;)VI661EeBvCPapQ9b!-p@Iv=Q&PP{u7ia0{=Uj)kaNgHjhXw7MkPyq)i#=2{ zve}`*R9RbDMMY*t4f`F?)IS$8W+wlJ7}C}@txmU*%B=0EZAryP ze~%{0s+1KK_kum%B=m4BoaFU_+n*^#UToPZ{MsXWDb4n4c|+S!z<+yhE-&RyGae{) z8&6ezD}gM+D&!%mEPO%Y>-*h<%_A>AKdHJ)f8fVmXCng<>M6Zz8jcr$D(23-!#bYg z=sS5R^M!N$o;9`4cLo8z>!L3|*VAHyplk^OKG_$=PI0-UNb67*MC5X=C@J~AisnX1 zA!yDP?e7`BOjyg=O;Z)w)I=cc(|^@{END3=5b+^1`RqT}Vp~N`wegYN9ZKz1%TCih z$O8BJRVKko{ar~u)K!3tRU|-^Rpc%3yvHAViB7aDVX8}~YHt?J1FLl`6#5TU`k$Ne zFlK?Co*p>PveVKc6@KkvdQrgj=XGrG%cIGoKsW zGxKeF`^4^#qMHsjStY5;sV9e17#|dVa%jd5%Lje`xVaEoH437m?XU4IHBFs{*~qy= zFbrr@nc>F5I?--*6sfJ%=dP36iP72~kq@HY!ftk7>_DYWM5J#SJ|0_}`iQ9^8^dZ!V zAl0)W183=L9*?B4{M@f`B-`r1=rkTEQ|#RpUwdEgd(kH0eo~PA4ZE0%w<%DUZmL$h z*?>Y58LZEthd9^nyRL|V)D&=eb!9elcgALGSqAui7ILLf3y~%gcp)4*w&77STyA6S z1w@!$%B4fsai6C<6$p9QA|>KJ26)1(GD@=3ccd*u@Rxgsh{N+{ctJKFozUw_v4zuq z12VA=wG$7(_d<8a^V-J3pfEnS{F)+U%U4X38E|nX$NMbOt=U4x_M3R+ zkRj2ld8YU12c>zE*cOzmT@h<%o+^sX2IvL9#2{OGVwyCU_Tbh!+Zo?tO#W{9fGlY* zufpkNa(XAByK%o&VrnPiigU={boV^{|DJ3uuv)DXtF<0;R70RJPZ*>Yg+|6PUAe4h ztoJwoi@r)s=KUe>dFnnm(7A@TpY2(u38%UMh>>?bqh=>=RxL0Y&P3L8jK+?sFlQ) zHZ2@(GZjw^HVrw|phWbvcuf=g*LS+_laIHyjqRV&O7!HM8o^uY)9Kw1^T_0H$#8>u zI0B?~UM=TYN9_ImXS)wce7F`FAm08Q7uTi?(313gW|Jk>aP-t>buBlxbW)n;a3yG8 z3#V#r9h6y{ChgG%c%MjI2=uK_-G*|@!L*ZBV zpJf(cLKpH5c~cwexL)nPn@3A#S9Qwx_;}}4U@=Ka96%;v<+?p>v(Gafa*Sn8;(Mow z$!{qrt$8w%#_H}nha~TN1!iDiU|MSM@$tFnU-vmSO6=dzn(@%T;`b77xIC~Ysmgqi zIxk4M*bN&ACRoRu!(PR)matFz_h-!3BS*0IEl76n{)ynXM zhJqqVlTkZ39p7PGL12LThm75Td5a89HG-f0@hm?l21f5em*g)s|(D2Qf(*t#B0$`T(EcLql>4|kI zYw^sLPbas%{fMs)$O2Wr*wFBDSS*2SJD;Yvam023+R4T?vLC-$?ukx!cKUZyU$Unv z_2sgbYV&Cv(1?}C$qc&zUAYtw$tiE(5a9CbL1)%rE&ls-i6;+c)#FvwEZ#rX9uq_p zbhF;S_B$0KQ@)0nkCO|dG)F`^`u*j&!{hI6aUlr7b{dhbb+3`i$5+0AnEM7crVF*? zXWO0%(N)JE)XA%u#0;j&%qJQCcYOIYQaOOS9EIxz%ECfggH0-s_K+(WR=kIim1BLJ z5N^W8-y^!3K_zer83ZUbE1L)jb`9JsDykFrOroh1nzfNnwopP z2<&;%k|P@@lM?=4*+FNXy+0?}?5UjDBG)Y^K2TDwa^79|H1AjGTCQ+ROPTXybUZ25 z9xMd^&~e;;W_7QVF+p}|&T$uWax2pXg2D_e&FAq(UMWXM#?wsxjBxVwBcA;jfCLk8 zCsNYS?p$%A2k$P|U7!kT(^#PsRq@6VoEI?LtLf>D3SM>nQhpQkw4Jme<@a92Z*u#L zfFOwv^o9S(OABgI)rR1D&3VG+!kO%&BLAnVI(CP;#O6HCG^p$wL4p55-GF`)1KGnv ziFHXs8ca!ax!hwX7+;S`ak&{>ZaX847kOn6_Ey|kSlXncx=N~~$fJLFkQCeP?fouI zBu%*wNo7ZU;i}Oo4+qE}&NDFUp`a0QlVZldY5vpJE?n5P4J(nxKt-Kd#+FqD#1C@o zzjhRpA2W5#VSWxS1Bt(K?e+=))-nn$p~X2bqV8w>KV~eijCyHt@l%mvQBhOGJm4P? z2G)7J;&hZZ$Ox>6jZu$KJJ39*3@})jnfJ%4{lE7z$4>*w4g;?f;bQr%loWMfAbPF$ zj95Nq{jhKcFk#r5S}ttW>RJQwX+AP$C0xol8 zDydyA4IGM9MPH0!>e{^X?J>f}<4|!7DQC1nDd^#4%%R>4Dw1c$qN{4avNxmKkX&51 zj7mbiAw;WJt*rXDdI&bpogPq202J8TWInAWP%UipUR#Wp1jUeZM?^&2{uFhY#HqeI zxl46P4#!~n*9)3Bxp1veXus(OTKbA-I&BDZtANB|8mJA%I~_PQSqN&}!93UA!HOTa zR8>?4qf$t;Yn`c#R=@IkL%xKeolgAv+JU_E@k*cm9&Rx|^!h-@G;~pL|}QmlV46t9$TLyT_gaEr4p1&In%n0r<`d}qK6u0eqx}I};B7Qi}o`uKAi~K@0*3wKA5Fje3b;vK1 zxQ36F7Y@4;IE_UO_jqS?6BV%icfpmsy16-7y_~n+a%9SOt<$g`KBog{`7{o%x~)-h z7+1o`1!YRud(sQ0@l@*0bY-Z@zkBz5xI&dfG)Kqgv-rK$^-xAz8v*F}De0oGkt&b3 zqy@qp&e#Q|P~P1id#iqym8Td~Q~!@}bP&Ke7s`=DU1A0yqI}5bqL6S*L%$1J90%g6 z9d^Zk0sTA?biC{pK_-Y%2h^K#a-+77XfzdXhd3&#e_^AoYl4Q&-1T9&#T*d7et6xVZs#?SN!<|0` z^QP>29yK*B$B_&Miegg0?2p$<`O0TD82R)Jt#aPp_y9>FGc`;p zEF66uBmdoEKPgl9S6M=FbHTiZxevSwKb|?h|Uqvqltf}t@i!SfQ%)&MYkNc#jln&wdx)1r)6P{ zYTol<)9M5e$YOx%4;>R%I;22rFqW*>t|<<`b#R9Jx$1{DWM~eTZe$|cxL{b_OA9M3&5M^;J2i)tR>pjYVb-xJAjrYH&E%F%WEXvk704Sx;C5M2&>!8o5+(j0D+8# zrLIjJz=@i`C5|1prYtjj@Q3@@o_bRq5HJM<^5uh>)qmY?&*s0od4-nUrd9{ReR^~o`X4<=@*YI*4=*Xf`G=-w1T78!J`Q2dHe9y1T;|QYn z{kuh;6A@9BTUAynE-`&Em+2qGa*%n3>{xKZ8M>ZX(P+gC({*J6AZ3 ziV~f{1!S4TJBcVg&ISe%L&Rsr5rlyIIU#?8CVeWGc^o{Ny&2_PC+O}UW)t+Kcrwij zb-@2%nLRSv;g501Dwaq*?`t*r`~<`Wqt!5HTHs#&Q+ba{KOef10Oi!)t@13$CT4MM z#2yAk0@1KTXE4Smhfeui&)H`Su&YuYpx0=!yIwHtEL4(aF$_8j z5+syHB2ysmp!ko$%$UISd_WXjbP}T7$RS6 zuUXUTs(`uZJqL90Y?Z}Annh~FscAZs(3Oq zfi}LZYA+yd8-MB_bgkuM>H4*NIO@4z1gFd*c`CuDa{yxq%lf(HS6SIlz_q6)^~1S1 zN}a;c4ym~8pC*Heb@Q2>%S)fO(Zmq%>CW?#P#GA@o1q&70IW)vqSc>D=;;U@wACY0MKszr*-TMJp?*&>+CP|=;SKx zLZ2m1-|=Nm!_t}x5Q?P(@$od^+)U%GL6QpeIt1|7$gyiRPECWU%jho6z#cpKegokQ zPB2C9KYhR?D_u+NKkVmaYU_7-?43X4jX8oj9X0ZTOGgUw8(Iw<%6>iVwW$+lz*9+G z69~L|O>O)Jq_8&T;mip+>n=6E8wsWlNUEq-wc^t-zh~|@A6gTQ#Z~R>|BLR1S$u8J z9!tw)UE(D~yOxQ>+1Rmm0MbOdz>5{Pt_@?*hD>4`?j(yV)wu(16q$m&o@RCGKh>qH zK(=D+=x8fbL)aM<+6QO}SFTqYe-#wO(9h+lK}UQ{%dC@|F(*k|GfVqig{EK&3H;Bu z@5cSN%*x6`<&Q!M1*VNbr z5Kz3E%yn~!qxs_Vt1BrQ$k1AizHmT41psxbH+_EX9sIr!u3{x!k==i7rAVB9N*G-g zEwx^VV9tMSA+$>)U?fd^fo_IhXoQGJ)pRy@1yQ4uT@qg9NPV?-n z^PAbEzHk4O=H>)zj9}*A)%pRqK|aV)i5=Q z(9oDEbX-|+x9t}Ug9$yb1k#m)W#8lGx_WM#pzqpyC$M%se!CE-+vL%(Tn9kc$ON8< zg9;uHPOMNgbAR&|Al(zHQnY@gAvn76_Sb2PWo$u+A?3%UaHthkT&f~_fYcADsdER! z74#Sth(EDC-ks(3GZ{xkRXIPAxm0F=U?ohPcs5P67pA<<5swm|XooamIZn;u{> zfVE-ufW_{@m=IBdEY1T+cizDU&1I9= zfF1rl!9-Q^OgmNN9U^BYqr<$Sk@oOFb1gIAEd;qqNK9(4(0phzUF7RQPIOwu?-CiO z&U1l(4-f|s`l(Gke@yo@K$)?dEB1E$p5oa}u9@&zbk-p0hjVmWP@9(XA|QyJbsAO< z#uz@RLq>~X0U9)_E&TL`eh2~{g2j?!ttu@w`&*{?-AvyYP=^8v5`(LMLKRX$e~p9W zR6q}0cpYr=bpF|Yb>m}GdV_K};4zW;C1s$%p zym06K0c3t>0X6N>jU^=^U*UYP@fNga>Z5^sn5}}Gl~}&T6eEMjX%!H7=3qDX!VQ!G z&2*<>^LtiS*7w(E7dG|7!&PM3b+%-op)~ksfU2sup>%g3S6gL}%tM4mxJ3dlhru-v zZA)0e57L)xV9Q3h+-fIUzGRyRa4~?WM7((Jo2G?PpVZixGtg&j{=0|Ofa+l5RDtJm z$xtv%O5jeY~4h1^M|=pMrfr$%K8$1t zda(k7Wb!h#k+b0JB?mV9jo4~{{vQzDV)MjR{|SO4x`iIEOI^)31S3<;wDDzu#+L#9k~9W0>O?9_JW^_#=-5r9aSa5g#*PnAjPQu%_ zyR-9V?%cUV{--4U0fiU^1_tJXtc-*T@c#Jkh4dcy9dWE947|a+h{>uU0YAP--y?v} z$c{4FE-)~0FaKV!GY`~_z?Vd>l3K2+4(6^N#?EFi9v&VnR`xb7rpAtDEDp{VnWsX; zFfbosWF@|;d1jqtd-x`+-@a{v$dM8fLWpIkQl`aNXR*FYe*MCPYNA<_23}xJ)$b~A zds4-8(_dRf)&Ge!>rENWmT z48>C>Q=&}rFDb|eLxk?|ZniHLhF3J$kuAcq}UAfgl9zFiKVjwrFR-3Cl_%z7DS;E%wjapgdt=*bp`>(#d;vSrY%Jm#M(% zgM&jQd~TfV`3CW`J~ejJCs;hnvjxtc`{(-l(4oz{Ox;+{v(5oR9I!TH4+X-Ye#5GTZDeNKFnT*?8CyoQqv7M?k@K<*e@iFqwtEoZmvW9ZhJ?^ z0sdO3({IGtR&~t7jI@&4$-X9dbEC^sC``G(aMlNUSLAdFe>BTHNdDj+L{a3Uz>lfd z`uQEcj*TxejyA0W?pSp_YipVIwfcmD-XCq2&M>2hnWj;jN%#Uw4+fdfof}}W!{zK$$# zNZw%}O-mdY9Z7cKdLj^1(x!;r32`a6a}RagDNwRaUmj&|7#R&!QAM4SZB-vms*#;r zD9|)4v0e-Es~qHnic6wT7b#+@+7m!w{&LABH~PV20Adh_*6`LwWPV1KuAI3d-nbs z{&q)97+Nqb9IRFGIqaJtokLV-DOgr13Xix=(nvfe<1$Jv&#ALhBqa3x)ok<~r{5@F zdxv@oDCC_DoBBMzu*$)yGOvP9EncJ^s=b6xa`hup`qY(U_N)|2QShHfEQm6)dXr&bm~Z#Jjya)^XZq#a&S(d{5ka;{R^s^JswGhO4(tH=r$% zIPW&+#fHs(C@m}7n@-&G=p+-d_Oc-Tvcy8h92XgVG71gw*Yh-0gflmio8@2NcLK&r zGBGTU_}oS`$v1Cc28bHk=dkHn9-nqdXFe-9usLpRA?H20o-m}kq9WT5jCJ`1CiXoc z$2xQq8u6pt-Pi!udNNXKr)LSPZOGM=FH#_<<2pT0oSR=<3Iec#-CMbl=S)x*TL04SDDFIP(e3SpshW~($S zw)pOJa4s8d`ttH3Q@LbbR#EZ81K+oApkhpHs;sQccy7<{z*PWyhYHW@kOk``@@z51 z?`f_CM{ntkRXE7e=uc9#E%21tnBGF7c(nPVhbQju?`s@qbfR}JucBp@;yzJvhBL3B zpPwnGC1it&545FzCpLigM%h=4 zj4u;^`m;H9xM%+EWch+KOUP>T_Go~nFpDo`G9gG9&+B%vQa5Q;Ffuq?`P;W|g^)zk zKs1F8nByqiRw!1el~UDbJ>^64p*osLI%iI|Ki(P@>y~%>_;~s>&{@3q*UCNeJz2t^ zOAuaEK`TBVV@KtTYoURW-R8&Zo+>EdKM_3*N>!dpr{k1}5eMrz2xkFQ?ZxY<5WUGE z`C=;iZ!7p$_{{GP<~Vb}KJoO2%x51IVEkd22=>>I!i!&MdL{BHf%#9D-JHMaG@<7k zZsLXu2RuY6W(j+IyKo~D2)S6>KUEc&ItwiQB{lPww)j!F)dn-T)LlP?4#SS5B37M; zcHcQ?Iw*z`{{184(S0S5f zu<^FN`{L1RJSJWPL03XU$1tQpVP8 zm4_J)DhHGDXbg-Sdh~kL@k+(J(}}84sVly|?Lee6JA$yU1Mnj9X!Y>t6yV4QOLQ3> zPw}YCp$qei+b1WI&MGk`Pp|?W*5UE-yh8&Rzt}8xy5OSJh1Fnyz4x2;-h@H^;?>!| zC`IpLqJ}Q4@O!Ou`IqGXZG7w> zl60nNN{H6hlwd{fRujJC|20w?BI9L1m#)0c8dn3;LQQjyUReig)o}lk@k0lp&8edQ^ z<=C21j~X2X*-GTRNF*BZ^zWH$$Nf3hT6ZuyIyqMLcN@IA}qzD3}+UTw_);red!nYlb*HUC}!Kr~IuEHOm1_TbWwyTFQasgfCsZ_n&gj)n7 zNk0nGrNw3@Q`8~-r=``~31?-yUKgLcc=A!+H)lOY*vodsJy6wxBQoxodj54(LB^4B zHLSt7%LtM5Bm4mxld7>bNG4A(M@B6Sdb&3xb9ITKCkum~DVpXw4+Tm$%ZHWNtM7AV)Q5E|)@ZhRmNn?Rq zdFr~)l0+EV5e-*oS!^?YSu0?$%h7Jr&Ovh9tL3O!H*wXOy@}j3NIz+Y|O8!-kLht&76FXj|OAQ2*#W#~H zby~&G%;iRFapDaQOQ{i)Cz)g<6a*usoEeb6sM3tVLGf(N9i>tz;7%E378yxNyiLEe zY5%CGY3R){I5!MHl^5Vv9)6|bxx^&Wu|+aO$+UGb_DJ7)?pxWsHH^a%JWSmAA07n0 zl`Ai90%XclEzvFU6GrRlUkh%P3jEp{)si(;n3`dW*yG4V<+BZxolO)#>OKID0`LOk z$}vF%#zc11NK^~t1+6CNGAuP(@HB<@xeL#9*J0e zkJ$4Z2{qG3*t@?8g`Hta{gO(m%059=suac5&A98~ zGJMlZ`6`pQ21oCl@_ad_#KFoH;F;fJv~>|)>;&!K2Ee?t$V<}s3nOEBX;o>SX8gU) z28R7y)T>|HT(Ram?KEe4Tt0-NPed6jxOn=7%4hww0~^eZs3g2+IQmjCy$y{U*DGoh zA498{ot5kn5YdZ}vr8A7Jg~C`!sg1Qg@BkyD&#BI4B-OK4}cCuX3({UJ z0r@3u(xnzvL6s!afR{6kugo$^QN~YIePY7vb*%fG?(<)spMQ!h3b9S+8jC;ur>Q$c z6skxapUbD*cAg*=Z+km?7!hGPwRnOk>9B-xkEx2vU|cY57hiVViu-Uw7%L_6I`4ee z4|p=#aey7-%GQ=fgDuf;9#yI!*Wt~3F)kR-=H(x#jmV}!`r!?v`9LI`lbB^WCBf5jRYC{$Bd zSN*0fDJx5~u)w{PrR1$$A(4F2hOP>PKF3UrkdOudLQhxsMjy{&QBY7EF(nV9RGIOP z2Ks|DgsgDoQynmg1CH;t8&CN9Yd&>UdjTLcx)e0T@%G{%X}=366iUy(#8lT8BLK;2 z$3lsglaUu3DxEvb;s?p@h1zm(x(v4`R6;C`Gq+CuNS@fPF13 z*{)t++m9@WW2Ig%Cewhgbu4`|7r(Z@EV?XJZj!`G8TjpP=7)=5JVYga#XevRHNZkAi|}6S{Y`W@94mrve4u zBG6;kli47^HB5d}MZ_H`q($6{**x6vJ27PQZak`$`~s}UxZw|Nks?v-d>riJce(vB zOjXa0XU(mB#Td$>gv-EF0+j1@wj=M-GC@m=i?x13uo~4Xy+zDE{EW94lP5@MT-jAW zF)1WXd~w-lvP0w4Uk~aFZ8sR);jfP~K!lvm-EL=Rf(e6ysGV5cZan9?MIy;!1XL&( zm|g(oAX>fFQ^uXC-Q*vBj$Duv0^~Vlr^IW8$lua(O|-hwDJhzlYiaw)H21CUhutLA zlO3mizh{OW-q>;hG6HKZ&Um$c!;-p@=>-c#e(uJ$j)Onkmu2kGNwiYcO9;&2fk9hoklIJ$>`d|Vl6h-+I#pQA=?dsuq z%*^-YL@qPSoRU2oE-i^v+&Y)~@m48cG8!i5xAf6h30f6=gmS`}2g%17Kh(9<4HmT}Mfp3GTbXC}i>sm2nyRZfH>V`BR2%tgW@1 zEt${SpJ?_c`DtxV_xI(2r09A$n>akIUfDqKb>g+N4NX41CYh}Ujea!`AZm08U5|~%C2g3vz#IR&1c0y(`Fo#A!E_czTWt(ucs7Z6SxbQ zgoNGaB##^>o&i#E2g)Wt&NVF4c7O{I(Fuv6^+>iOX2Niwzy+)6&&_kyWU9XR@rur|$WtBKyN;K3o*zYoU zCD)Wh;eDT>FAeN-W)WfoSwbuB5$<&bM?0FQ-Lr6_Bni6g2jqP z^TR=&K4Yl}HzSjiX1hhg&vi}&nN7!kORBbRhjIL>T4;y|%p1!9xS%TFSO`fLrPY=#dcBWqE zL4pUFtKj#GUOYo_xyB1e%uM>7IdjFFTt0DWO5tCR5nrv0$UTdu+um7y#`RJ$K^sf! z+^^wpnX!cQ#rtnfRkPHzIu@9XeL3xT(#Xm3VI><_!2WpXp@x?TBmhw0u!vCrFu z(xGL;)VI661EeBvCPapQ9b!-p@Iv=Q&PP{u7ia0{=Uj)kaNgHjhXw7MkPyq)i#=2{ zve}`*R9RbDMMY*t4f`F?)IS$8W+wlJ7}C}@txmU*%B=0EZAryP ze~%{0s+1KK_kum%B=m4BoaFU_+n*^#UToPZ{MsXWDb4n4c|+S!z<+yhE-&RyGae{) z8&6ezD}gM+D&!%mEPO%Y>-*h<%_A>AKdHJ)f8fVmXCng<>M6Zz8jcr$D(23-!#bYg z=sS5R^M!N$o;9`4cLo8z>!L3|*VAHyplk^OKG_$=PI0-UNb67*MC5X=C@J~AisnX1 zA!yDP?e7`BOjyg=O;Z)w)I=cc(|^@{END3=5b+^1`RqT}Vp~N`wegYN9ZKz1%TCih z$O8BJRVKko{ar~u)K!3tRU|-^Rpc%3yvHAViB7aDVX8}~YHt?J1FLl`6#5TU`k$Ne zFlK?Co*p>PveVKc6@KkvdQrgj=XGrG%cIGoKsW zGxKeF`^4^#qMHsjStY5;sV9e17#|dVa%jd5%Lje`xVaEoH437m?XU4IHBFs{*~qy= zFbrr@nc>F5I?--*6sfJ%=dP36iP72~kq@HY!ftk7>_DYWM5J#SJ|0_}`iQ9^8^dZ!V zAl0)W183=L9*?B4{M@f`B-`r1=rkTEQ|#RpUwdEgd(kH0eo~PA4ZE0%w<%DUZmL$h z*?>Y58LZEthd9^nyRL|V)D&=eb!9elcgALGSqAui7ILLf3y~%gcp)4*w&77STyA6S z1w@!$%B4fsai6C<6$p9QA|>KJ26)1(GD@=3ccd*u@Rxgsh{N+{ctJKFozUw_v4zuq z12VA=wG$7(_d<8a^V-J3pfEnS{F)+U%U4X38E|nX$NMbOt=U4x_M3R+ zkRj2ld8YU12c>zE*cOzmT@h<%o+^sX2IvL9#2{OGVwyCU_Tbh!+Zo?tO#W{9fGlY* zufpkNa(XAByK%o&VrnPiigU={boV^{|DJ3uuv)DXtF<0;R70RJPZ*>Yg+|6PUAe4h ztoJwoi@r)s=KUe>dFnnm(7A@TpY2(u38%UMh>>?bqh=>=RxL0Y&P3L8jK+?sFlQ) zHZ2@(GZjw^HVrw|phWbvcuf=g*LS+_laIHyjqRV&O7!HM8o^uY)9Kw1^T_0H$#8>u zI0B?~UM=TYN9_ImXS)wce7F`FAm08Q7uTi?(313gW|Jk>aP-t>buBlxbW)n;a3yG8 z3#V#r9h6y{ChgG%c%MjI2=uK_-G*|@!L*ZBV zpJf(cLKpH5c~cwexL)nPn@3A#S9Qwx_;}}4U@=Ka96%;v<+?p>v(Gafa*Sn8;(Mow z$!{qrt$8w%#_H}nha~TN1!iDiU|MSM@$tFnU-vmSO6=dzn(@%T;`b77xIC~Ysmgqi zIxk4M*bN&ACRoRu!(PR)matFz_h-!3BS*0IEl76n{)ynXM zhJqqVlTkZ39p7PGL12LThm75Td5a89HG-f0@hm?l21f5em*g)s|(D2Qf(*t#B0$`T(EcLql>4|kI zYw^sLPbas%{fMs)$O2Wr*wFBDSS*2SJD;Yvam023+R4T?vLC-$?ukx!cKUZyU$Unv z_2sgbYV&Cv(1?}C$qc&zUAYtw$tiE(5a9CbL1)%rE&ls-i6;+c)#FvwEZ#rX9uq_p zbhF;S_B$0KQ@)0nkCO|dG)F`^`u*j&!{hI6aUlr7b{dhbb+3`i$5+0AnEM7crVF*? zXWO0%(N)JE)XA%u#0;j&%qJQCcYOIYQaOOS9EIxz%ECfggH0-s_K+(WR=kIim1BLJ z5N^W8-y^!3K_zer83ZUbE1L)jb`9JsDykFrOroh1nzfNnwopP z2<&;%k|P@@lM?=4*+FNXy+0?}?5UjDBG)Y^K2TDwa^79|H1AjGTCQ+ROPTXybUZ25 z9xMd^&~e;;W_7QVF+p}|&T$uWax2pXg2D_e&FAq(UMWXM#?wsxjBxVwBcA;jfCLk8 zCsNYS?p$%A2k$P|U7!kT(^#PsRq@6VoEI?LtLf>D3SM>nQhpQkw4Jme<@a92Z*u#L zfFOwv^o9S(OABgI)rR1D&3VG+!kO%&BLAnVI(CP;#O6HCG^p$wL4p55-GF`)1KGnv ziFHXs8ca!ax!hwX7+;S`ak&{>ZaX847kOn6_Ey|kSlXncx=N~~$fJLFkQCeP?fouI zBu%*wNo7ZU;i}Oo4+qE}&NDFUp`a0QlVZldY5vpJE?n5P4J(nxKt-Kd#+FqD#1C@o zzjhRpA2W5#VSWxS1Bt(K?e+=))-nn$p~X2bqV8w>KV~eijCyHt@l%mvQBhOGJm4P? z2G)7J;&hZZ$Ox>6jZu$KJJ39*3@})jnfJ%4{lE7z$4>*w4g;?f;bQr%loWMfAbPF$ zj95Nq{jhKcFk#r5S}ttW>RJQwX+AP$C0xol8 zDydyA4IGM9MPH0!>e{^X?J>f}<4|!7DQC1nDd^#4%%R>4Dw1c$qN{4avNxmKkX&51 zj7mbiAw;WJt*rXDdI&bpogPq202J8TWInAWP%UipUR#Wp1jUeZM?^&2{uFhY#HqeI zxl46P4#!~n*9)3Bxp1veXus(OTKbA-I&BDZtANB|8mJA%I~_PQSqN&}!93UA!HOTa zR8>?4qf$t;Yn`c#R=@IkL%xKeolgAv+JU_E@k*cm9&Rx|^!h-@G;~pL|}QmlV46t9$TLyT_gaEr4p1&In%n0r<`d}qK6u0eqx}I};B7Qi}o`uKAi~K@0*3wKA5Fje3b;vK1 zxQ36F7Y@4;IE_UO_jqS?6BV%icfpmsy16-7y_~n+a%9SOt<$g`KBog{`7{o%x~)-h z7+1o`1!YRud(sQ0@l@*0bY-Z@zkBz5xI&dfG)Kqgv-rK$^-xAz8v*F}De0oGkt&b3 zqy@qp&e#Q|P~P1id#iqym8Td~Q~!@}bP&Ke7s`=DU1A0yqI}5bqL6S*L%$1J90%g6 z9d^Zk0sTA?biC{pK_-Y%2h^K#a-+77XfzdXhd3&#e_^AoYl4Q&-1T9&#T*d7et6xVZs#?SN!<|0` z^QP>29yK*B$B_&Miegg0?2p$<`O0TD82R)Jt#aPp_y9>FGc`;p zEF66uBmdoEKPgl9S6M=FbHTiZxevSwKb|?h|Uqvqltf}t@i!SfQ%)&MYkNc#jln&wdx)1r)6P{ zYTol<)9M5e$YOx%4;>R%I;22rFqW*>t|<<`b#R9Jx$1{DWM~eTZe$|cxL{b_OA9M3&5M^;J2i)tR>pjYVb-xJAjrYH&E%F%WEXvk704Sx;C5M2&>!8o5+(j0D+8# zrLIjJz=@i`C5|1prYtjj@Q3@@o_bRq5HJM<^5uh>)qmY?&*s0od4-nUrd9{ReR^~o`X4<=@*YI*4=*Xf`G=-w1T78!J`Q2dHe9y1T;|QYn z{kuh;6A@9BTUAynE-`&Em+2qGa*%n3>{xKZ8M>ZX(P+gC({*J6AZ3 ziV~f{1!S4TJBcVg&ISe%L&Rsr5rlyIIU#?8CVeWGc^o{Ny&2_PC+O}UW)t+Kcrwij zb-@2%nLRSv;g501Dwaq*?`t*r`~<`Wqt!5HTHs#&Q+ba{KOef10Oi!)t@13$CT4MM z#2yAk0@1KTXE4Smhfeui&)H`Su&YuYpx0=!yIwHtEL4(aF$_8j z5+syHB2ysmp!ko$%$UISd_WXjbP}T7$RS6 zuUXUTs(`uZJqL90Y?Z}Annh~FscAZs(3Oq zfi}LZYA+yd8-MB_bgkuM>H4*NIO@4z1gFd*c`CuDa{yxq%lf(HS6SIlz_q6)^~1S1 zN}a;c4ym~8pC*Heb@Q2>%S)fO(Zmq%>CW?#P#GA@o1q&70IW)vqSc>D=;;U@wACY0MKszr*-TMJp?*&>+CP|=;SKx zLZ2m1-|=Nm!_t}x5Q?P(@$od^+)U%GL6QpeIt1|7$gyiRPECWU%jho6z#cpKegokQ zPB2C9KYhR?D_u+NKkVmaYU_7-?43X4jX8oj9X0ZTOGgUw8(Iw<%6>iVwW$+lz*9+G z69~L|O>O)Jq_8&T;mip+>n=6E8wsWlNUEq-wc^t-zh~|@A6gTQ#Z~R>|BLR1S$u8J z9!tw)UE(D~yOxQ>+1Rmm0MbOdz>5{Pt_@?*hD>4`?j(yV)wu(16q$m&o@RCGKh>qH zK(=D+=x8fbL)aM<+6QO}SFTqYe-#wO(9h+lK}UQ{%dC@|F(*k|GfVqig{EK&3H;Bu z@5cSN%*x6`<&Q!M1*VNbr z5Kz3E%yn~!qxs_Vt1BrQ$k1AizHmT41psxbH+_EX9sIr!u3{x!k==i7rAVB9N*G-g zEwx^VV9tMSA+$>)U?fd^fo_IhXoQGJ)pRy@1yQ4uT@qg9NPV?-n z^PAbEzHk4O=H>)zj9}*A)%pRqK|aV)i5=Q z(9oDEbX-|+x9t}Ug9$yb1k#m)W#8lGx_WM#pzqpyC$M%se!CE-+vL%(Tn9kc$ON8< zg9;uHPOMNgbAR&|Al(zHQnY@gAvn76_Sb2PWo$u+A?3%UaHthkT&f~_fYcADsdER! z74#Sth(EDC-ks(3GZ{xkRXIPAxm0F=U?ohPcs5P67pA<<5swm|XooamIZn;u{> zfVE-ufW_{@m=IBdEY1T+cizDU&1I9= zfF1rl!9-Q^OgmNN9U^BYqr<$Sk@oOFb1gIAEd;qqNK9(4(0phzUF7RQPIOwu?-CiO z&U1l(4-f|s`l(Gke@yo@K$)?dEB1E$p5oa}u9@&zbk-p0hjVmWP@9(XA|QyJbsAO< z#uz@RLq>~X0U9)_E&TL`eh2~{g2j?!ttu@w`&*{?-AvyYP=^8v5`(LMLKRX$e~p9W zR6q}0cpYr=bpF|Yb>m}GdV_K};4zW;C1s$%p zym06K0c3t>0X6N>jU^=^U*UYP@fNga>Z5^sn5}}Gl~}&T6eEMjX%!H7=3qDX!VQ!G z&2*<>^LtiS*7w(E7dG|7!&PM3b+%-op)~ksfU2sup>%g3S6gL}%tM4mxJ3dlhru-v zZA)0e57L)xV9Q3h+-fIUzGRyRa4~?WM7((Jo2G?PpVZixGtg&j{=0|Ofa+l5RDtJm z$xtv%O5jeY~4h1^M|=pMrfr$%K8$1t zda(k7Wb!h#k+b0JB?mV9jo4~{{vQzDV)MjR{|SO4x`iIEOI^)31S3<;wDDzu#+L#9k~9W0>O?9_JW^_ zaB^>EX>4U6ba`-PAZ2)IW&i+q+U=TIavVF7MgOsiUIJ!!EC-`m?Vy+6#}SznB~tbD zs`{g?tw@QPjEunG!yO{%_J9B5xc}m-BvqG-Xl=E6zH-YgcHXFezS{j6e7-;LR~@g< z!q3Ou#|M!^iP!Y}D*bhS=Xm*X!F!G{em?H>^-0v%K(7zp116g}@@9QrB*)`(Jml9v zZNHY>R6Z|t#OHOsPP|Kb{ZDd-{uso5cb^YrAxf)oR*G?_ko^6r&kB6cj6SB!Y`?FXTJAN(8Q zPZOt)6~&)FSS6${+j;#zXX!cn*p@LukB<6C|A zljJNv{os3s79vw07jjskhZFXFonf-X9Cs96W1KPFW11wkIMb6SzQc)27cfJ{vnOES{7#J*Y$#1{iKl||Se7kd|g(!Iah!yLKR=F(0GG{+Ii-d&p z%3HYset*Bx??2TKrAh|N4YRVr?#DC4DB(wKrJLu(d4<=fD}s~t8h{WncVRIUe-6He zR6-42Vw4bwqmrP`%45oLkbzK2Tr4u?lxlPmHQL-wA4vf z&V~Astkh7aw{j_^7AfjVE4`+gYpJzLHIVC)BukMhA}UR~Ce2#3s;Fwy-eOB&U}?2U z)7Dz=(RC*3jMX{6b7aJkMjmCO|f{1cQ@eIU{2+ z2Qn^}0SY==&b)@4qh-!==9{5hi7c{MZrlo%F;bX!h~rX5^WH~jvpAMDXR%XUxr+9HO+w ze4#@KmApene0pv*v2e))831nR9Pk!+*30n=0idIZp~EWflsaMqskH5YOd!kyDr*(e zYH{dfZWwGHRtt=!6qFfK?8t|$7&B$iPy84}j-`|t>fA`4Y<1P8^tp5w z-Lkw?_15bM7KA@4zrt)bD&2F(g&?O%M;msx_n5yKu~J24 z^fL193ZZBm1bggW$4bMMyBcezTfL^K2u%??W8Kah6g@erb@a|~^bhllqQ^_hbj9w0 zK64TB;FPgf^p*x8^eb;?@0fpioEbFzrUWP0D5xl3cafdZSkWV{_8! zAy6Lj<7D^C*`Lm(w>W!~b)g@mx0Bnv?Yqy@#z>55n%WlOhz1GZ%KNJibP5eZw~nXe z&!Tz#p|}yynLsVBPOT@Q$kXW_K5o>D(=)QPKo*H_s&y~cH+s#7#SpYsxsK3+V<*(S z5g_n+8Ja2oy3hb%-pavIOOrlL^F(HAd(27Wj-)5m0buRXW^98e8*iH9f95WoR{kLcTZlf5U0C)nh zH8Z*%rsGmgJ5KCP8_1ne={sP2ps*-LlvAOHa3QH#gdM+Ep_s^rERshRG6AY%S@mYL z47&lEsvca)GFAceQUXNY95c_V$I%stJKNl(Ax@5TXgz(96sqKQ6ZL=sJ{jt`$$u`m zr=#*;7r2ir-scx1j+tZ=UECK?Fm|?FkCSTg&yohJXgu#Rg#95%|I>kg@*2-2K9k8` zsn0zPYwQBh*bsfUOYU;S(v zf{v<{_>?_oEy(i}2->2~k;~h5j1Yzs8~;XcNun&>q3-h9D<=ooi=YZ(^DTA$(P z*k#gTclbkdBHbAtJg0i24exr%-Gm6*J8K%ya5Pze14Ma0h~@@>6Jj6Dyu0H=x_r~I?xKK-%gu)C%_3@qhD`LMDP#_UUxAAV`ym;LwQ(v5wwWiKsZJfjSTp`L0{<>2$#T{PQL5Uh{E< zo%fC5mSC3#(Gs=0Y~T zP!HW7>Jq&&$tP;Od0KM`)grbCxou8CLLw9v*pnbCbmF4h}O!lNuqY@B&37fAb;pj7p*d}#2?uZ$pm3y;)7@lEs zK^Vw2oY6|1*e>F^Zfpxchrg35!%S*@LK|GHH@3lBY`fi{LJWd1Yi69pq$2$UgNQ5U z(7cI}DMQC5(H_UNOj(i<Jjvx5+r_1sw1eGOgadBm;-+ z3@YQwjHc0S(4flK0yE5O$3{##c7*~!m!Jti)(x~XUj$X!#Bjrz4yDf<&q^CLyvT77 zFyB-By%wOiH3cXuA;8N657pxfEal}M*m)X!p-9qv+7 zlO!IR856fI0VBA;B?U_+(K3_M=#i~81P^itL&yg_o81?H6-$`g?AD3JV$*!9fuQ3B zAtlhTnPalL=4wnKc8?!OREHCbeLs})hm4Xc&^1_2!_BG0j@(p-3h~8m7|gFX47i+< zzT&M&Fp&}P%j2{!U8P@q|DV2o=_`TFn=w9_ zhKRfZLO2INew9SZ&A1EIgn%2=c-?mU3!woJqtY+{M_kb4MUji~#Q1g9mhI znyjXfu!zeRvAebg31W~#Y{9W>4WS)68$1E&5VU6a85zog(+;%PO+|41iKDnFX0Xt2 zKr10^7K?a>t#*Q2=eoi&sD2z2MY)zeGnxgH)rzgE-Df2H zw3!yloOck8uO-^kd{eZ|tl%(hOu3JO@N|A+3D~#lq9k?{qQx4?S*<#u=s^38#I#5X zzyyA!k`eLdM~Nml0NC#476=*;b*q$A>M)N98B1Jv&uS27&ujrD4?HGTAQdeOiAqKq z043OX-&WjCF_zRv4HI=b{Ur4Ruh`bw3%809K*jHN(45dVR#HK8k4H382UQitHZnG= zMks4!=$*8%=#XsTpmng@IE!G&$R@X}%{o44o872O3UUIvY9ZP!!|8CcltQqF0LAJO z@4!MwL5LXQZTzc&RYtwHG0;Z_a)$=H^loykl)zRU76Y4@(t378 zxlqCZ$%9cM-_f$;Ah#*|z%#%-kO^!@2q4(Kv;}9NN*F2xTNlmjhq*0wj~CQn_mIU( z9V;5FXX%gF?Iw0p>AlN+^q*Ox1ZYP&g$*@UGvi%s19yxYW{j{ECPsoAFjv9F(GPaB zfV%vO_EFxX$bllLlPkfmvX(bymBZL);6@y(mt|WhzMo)H5Awcxrcp=#Vvy7MR&3Fi0m*4f%kk z&2I9TGVm)R%mFJT*EZ8{xAx1nD(vVR;xl1$ynl?5l1Pr~rdvJineLx+WU7OXF$zFD zP^Lt5b$fbDJp)&nVKOurjBE-iy?;}Z=(R}6ZvmY;d}eo3+P%dQaEV`!VSv5@~ zD{k8w4RAapEeSjauTau$Hb9XA@f~`O@b`hCXlr;3^Bd5s@{*vrLMp)hcltfI1 zyEX>4Tx z0C=2zkv&MmP!xqvQ$?v25j%)DWT;LSL`5963Pq?8YK2xEOkVm2O&XFE7e~Rh;NZ_< z)xpJCR|i)?5c~mgb#YR3krMAq3N2!MaCsl+y>qzlK0v6KnPzp21DbA|sYG1NWLL$m zSA@_*6-B?yEMrcRlJH$$_XzO)F2=L`@BO)Y)ttqEfJi*c4AUmwAfDc|4bJ<-5muB{ z;&b9LlNuy`C`-Ngjg)JvC_t@Xlle$#8Fk#DPPEVta9Gstd*;* z*(ZNtIH#{HbDe4!2`pj>5=1DdqJ%PR#Aw$^v5=zkxQ~Cx^-JVZ$W;O(#{w$QAiI9> zKlnXcD?d5mC57Wa=ZoWfi~wD`K%?e3-^Y&AI01ssz?I(eSL(pbC+W487Ci#`wt(i|qi@Or1GhkE&6`{E9H$RJnr4-}0S*p<(E??!`@Flm zeQy8WY0mElL%MR5WcjsD(7jgO@hr$DSdY?PPU%oHvMSj0 zP53<*yEJF3aE$p1@_rfAKENZp_X7(E_SJPtHwN^V2!X^ z@k#*_-bb*erJDGC1ZxVbaScYbK%626gtg&u_t=}Xk8LZehsj1#1Yob;~tI$&Z%C%yZ z9lI2(?AWDPWv4%iRd(!BX0e@qDOTCBYo62WU2pW^fDh2WZSiIe@!g8`MsEXkshh@$ z$mNH>y=_+t%TOtpRSjg)<#ro|@N+lFRXF#9NfCXKH|h>Es(O|;)&PGCQjfvayXmoO z^U}8MLZr+cW~x^QECkAXzptCdJ-aDM-8753X`J_d|3P}JN;b>)&G7pH_1^D~*Xzd@ z`_*i=yDw~>=}X(Tt~j&06!>hQE}cbgh(L*m9Iw}H_{`g4WQcxeXVxRD?gy+J%&96< z-)CB|D~4H7szK-6Ziu2`@SEUnV)RvzUH`X5n6+B1{11nt1nAW&@;i+lkFE%_y!ZQX zalhTfG3NGg59vzvu<2yzvj6}9000000000000000000000000009fK52X{qEXnJy< P00000NkvXXu0mjfm(VbP literal 0 HcmV?d00001 diff --git a/xml_converter/integration_tests/test_cases/texture/output_proto/my_texture2.png b/xml_converter/integration_tests/test_cases/texture/output_proto/my_texture2.png new file mode 100644 index 0000000000000000000000000000000000000000..21a80261d86c0235b084608c7558c247f3968707 GIT binary patch literal 13277 zcmW+-1yoy26NLgri@UaHad&HR=PT}7+}*9XOVDD4;%>#=-5r9aSa5g#*PnAjPQu%_ zyR-9V?%cUV{--4U0fiU^1_tJXtc-*T@c#Jkh4dcy9dWE947|a+h{>uU0YAP--y?v} z$c{4FE-)~0FaKV!GY`~_z?Vd>l3K2+4(6^N#?EFi9v&VnR`xb7rpAtDEDp{VnWsX; zFfbosWF@|;d1jqtd-x`+-@a{v$dM8fLWpIkQl`aNXR*FYe*MCPYNA<_23}xJ)$b~A zds4-8(_dRf)&Ge!>rENWmT z48>C>Q=&}rFDb|eLxk?|ZniHLhF3J$kuAcq}UAfgl9zFiKVjwrFR-3Cl_%z7DS;E%wjapgdt=*bp`>(#d;vSrY%Jm#M(% zgM&jQd~TfV`3CW`J~ejJCs;hnvjxtc`{(-l(4oz{Ox;+{v(5oR9I!TH4+X-Ye#5GTZDeNKFnT*?8CyoQqv7M?k@K<*e@iFqwtEoZmvW9ZhJ?^ z0sdO3({IGtR&~t7jI@&4$-X9dbEC^sC``G(aMlNUSLAdFe>BTHNdDj+L{a3Uz>lfd z`uQEcj*TxejyA0W?pSp_YipVIwfcmD-XCq2&M>2hnWj;jN%#Uw4+fdfof}}W!{zK$$# zNZw%}O-mdY9Z7cKdLj^1(x!;r32`a6a}RagDNwRaUmj&|7#R&!QAM4SZB-vms*#;r zD9|)4v0e-Es~qHnic6wT7b#+@+7m!w{&LABH~PV20Adh_*6`LwWPV1KuAI3d-nbs z{&q)97+Nqb9IRFGIqaJtokLV-DOgr13Xix=(nvfe<1$Jv&#ALhBqa3x)ok<~r{5@F zdxv@oDCC_DoBBMzu*$)yGOvP9EncJ^s=b6xa`hup`qY(U_N)|2QShHfEQm6)dXr&bm~Z#Jjya)^XZq#a&S(d{5ka;{R^s^JswGhO4(tH=r$% zIPW&+#fHs(C@m}7n@-&G=p+-d_Oc-Tvcy8h92XgVG71gw*Yh-0gflmio8@2NcLK&r zGBGTU_}oS`$v1Cc28bHk=dkHn9-nqdXFe-9usLpRA?H20o-m}kq9WT5jCJ`1CiXoc z$2xQq8u6pt-Pi!udNNXKr)LSPZOGM=FH#_<<2pT0oSR=<3Iec#-CMbl=S)x*TL04SDDFIP(e3SpshW~($S zw)pOJa4s8d`ttH3Q@LbbR#EZ81K+oApkhpHs;sQccy7<{z*PWyhYHW@kOk``@@z51 z?`f_CM{ntkRXE7e=uc9#E%21tnBGF7c(nPVhbQju?`s@qbfR}JucBp@;yzJvhBL3B zpPwnGC1it&545FzCpLigM%h=4 zj4u;^`m;H9xM%+EWch+KOUP>T_Go~nFpDo`G9gG9&+B%vQa5Q;Ffuq?`P;W|g^)zk zKs1F8nByqiRw!1el~UDbJ>^64p*osLI%iI|Ki(P@>y~%>_;~s>&{@3q*UCNeJz2t^ zOAuaEK`TBVV@KtTYoURW-R8&Zo+>EdKM_3*N>!dpr{k1}5eMrz2xkFQ?ZxY<5WUGE z`C=;iZ!7p$_{{GP<~Vb}KJoO2%x51IVEkd22=>>I!i!&MdL{BHf%#9D-JHMaG@<7k zZsLXu2RuY6W(j+IyKo~D2)S6>KUEc&ItwiQB{lPww)j!F)dn-T)LlP?4#SS5B37M; zcHcQ?Iw*z`{{184(S0S5f zu<^FN`{L1RJSJWPL03XU$1tQpVP8 zm4_J)DhHGDXbg-Sdh~kL@k+(J(}}84sVly|?Lee6JA$yU1Mnj9X!Y>t6yV4QOLQ3> zPw}YCp$qei+b1WI&MGk`Pp|?W*5UE-yh8&Rzt}8xy5OSJh1Fnyz4x2;-h@H^;?>!| zC`IpLqJ}Q4@O!Ou`IqGXZG7w> zl60nNN{H6hlwd{fRujJC|20w?BI9L1m#)0c8dn3;LQQjyUReig)o}lk@k0lp&8edQ^ z<=C21j~X2X*-GTRNF*BZ^zWH$$Nf3hT6ZuyIyqMLcN@IA}qzD3}+UTw_);red!nYlb*HUC}!Kr~IuEHOm1_TbWwyTFQasgfCsZ_n&gj)n7 zNk0nGrNw3@Q`8~-r=``~31?-yUKgLcc=A!+H)lOY*vodsJy6wxBQoxodj54(LB^4B zHLSt7%LtM5Bm4mxld7>bNG4A(M@B6Sdb&3xb9ITKCkum~DVpXw4+Tm$%ZHWNtM7AV)Q5E|)@ZhRmNn?Rq zdFr~)l0+EV5e-*oS!^?YSu0?$%h7Jr&Ovh9tL3O!H*wXOy@}j3NIz+Y|O8!-kLht&76FXj|OAQ2*#W#~H zby~&G%;iRFapDaQOQ{i)Cz)g<6a*usoEeb6sM3tVLGf(N9i>tz;7%E378yxNyiLEe zY5%CGY3R){I5!MHl^5Vv9)6|bxx^&Wu|+aO$+UGb_DJ7)?pxWsHH^a%JWSmAA07n0 zl`Ai90%XclEzvFU6GrRlUkh%P3jEp{)si(;n3`dW*yG4V<+BZxolO)#>OKID0`LOk z$}vF%#zc11NK^~t1+6CNGAuP(@HB<@xeL#9*J0e zkJ$4Z2{qG3*t@?8g`Hta{gO(m%059=suac5&A98~ zGJMlZ`6`pQ21oCl@_ad_#KFoH;F;fJv~>|)>;&!K2Ee?t$V<}s3nOEBX;o>SX8gU) z28R7y)T>|HT(Ram?KEe4Tt0-NPed6jxOn=7%4hww0~^eZs3g2+IQmjCy$y{U*DGoh zA498{ot5kn5YdZ}vr8A7Jg~C`!sg1Qg@BkyD&#BI4B-OK4}cCuX3({UJ z0r@3u(xnzvL6s!afR{6kugo$^QN~YIePY7vb*%fG?(<)spMQ!h3b9S+8jC;ur>Q$c z6skxapUbD*cAg*=Z+km?7!hGPwRnOk>9B-xkEx2vU|cY57hiVViu-Uw7%L_6I`4ee z4|p=#aey7-%GQ=fgDuf;9#yI!*Wt~3F)kR-=H(x#jmV}!`r!?v`9LI`lbB^WCBf5jRYC{$Bd zSN*0fDJx5~u)w{PrR1$$A(4F2hOP>PKF3UrkdOudLQhxsMjy{&QBY7EF(nV9RGIOP z2Ks|DgsgDoQynmg1CH;t8&CN9Yd&>UdjTLcx)e0T@%G{%X}=366iUy(#8lT8BLK;2 z$3lsglaUu3DxEvb;s?p@h1zm(x(v4`R6;C`Gq+CuNS@fPF13 z*{)t++m9@WW2Ig%Cewhgbu4`|7r(Z@EV?XJZj!`G8TjpP=7)=5JVYga#XevRHNZkAi|}6S{Y`W@94mrve4u zBG6;kli47^HB5d}MZ_H`q($6{**x6vJ27PQZak`$`~s}UxZw|Nks?v-d>riJce(vB zOjXa0XU(mB#Td$>gv-EF0+j1@wj=M-GC@m=i?x13uo~4Xy+zDE{EW94lP5@MT-jAW zF)1WXd~w-lvP0w4Uk~aFZ8sR);jfP~K!lvm-EL=Rf(e6ysGV5cZan9?MIy;!1XL&( zm|g(oAX>fFQ^uXC-Q*vBj$Duv0^~Vlr^IW8$lua(O|-hwDJhzlYiaw)H21CUhutLA zlO3mizh{OW-q>;hG6HKZ&Um$c!;-p@=>-c#e(uJ$j)Onkmu2kGNwiYcO9;&2fk9hoklIJ$>`d|Vl6h-+I#pQA=?dsuq z%*^-YL@qPSoRU2oE-i^v+&Y)~@m48cG8!i5xAf6h30f6=gmS`}2g%17Kh(9<4HmT}Mfp3GTbXC}i>sm2nyRZfH>V`BR2%tgW@1 zEt${SpJ?_c`DtxV_xI(2r09A$n>akIUfDqKb>g+N4NX41CYh}Ujea!`AZm08U5|~%C2g3vz#IR&1c0y(`Fo#A!E_czTWt(ucs7Z6SxbQ zgoNGaB##^>o&i#E2g)Wt&NVF4c7O{I(Fuv6^+>iOX2Niwzy+)6&&_kyWU9XR@rur|$WtBKyN;K3o*zYoU zCD)Wh;eDT>FAeN-W)WfoSwbuB5$<&bM?0FQ-Lr6_Bni6g2jqP z^TR=&K4Yl}HzSjiX1hhg&vi}&nN7!kORBbRhjIL>T4;y|%p1!9xS%TFSO`fLrPY=#dcBWqE zL4pUFtKj#GUOYo_xyB1e%uM>7IdjFFTt0DWO5tCR5nrv0$UTdu+um7y#`RJ$K^sf! z+^^wpnX!cQ#rtnfRkPHzIu@9XeL3xT(#Xm3VI><_!2WpXp@x?TBmhw0u!vCrFu z(xGL;)VI661EeBvCPapQ9b!-p@Iv=Q&PP{u7ia0{=Uj)kaNgHjhXw7MkPyq)i#=2{ zve}`*R9RbDMMY*t4f`F?)IS$8W+wlJ7}C}@txmU*%B=0EZAryP ze~%{0s+1KK_kum%B=m4BoaFU_+n*^#UToPZ{MsXWDb4n4c|+S!z<+yhE-&RyGae{) z8&6ezD}gM+D&!%mEPO%Y>-*h<%_A>AKdHJ)f8fVmXCng<>M6Zz8jcr$D(23-!#bYg z=sS5R^M!N$o;9`4cLo8z>!L3|*VAHyplk^OKG_$=PI0-UNb67*MC5X=C@J~AisnX1 zA!yDP?e7`BOjyg=O;Z)w)I=cc(|^@{END3=5b+^1`RqT}Vp~N`wegYN9ZKz1%TCih z$O8BJRVKko{ar~u)K!3tRU|-^Rpc%3yvHAViB7aDVX8}~YHt?J1FLl`6#5TU`k$Ne zFlK?Co*p>PveVKc6@KkvdQrgj=XGrG%cIGoKsW zGxKeF`^4^#qMHsjStY5;sV9e17#|dVa%jd5%Lje`xVaEoH437m?XU4IHBFs{*~qy= zFbrr@nc>F5I?--*6sfJ%=dP36iP72~kq@HY!ftk7>_DYWM5J#SJ|0_}`iQ9^8^dZ!V zAl0)W183=L9*?B4{M@f`B-`r1=rkTEQ|#RpUwdEgd(kH0eo~PA4ZE0%w<%DUZmL$h z*?>Y58LZEthd9^nyRL|V)D&=eb!9elcgALGSqAui7ILLf3y~%gcp)4*w&77STyA6S z1w@!$%B4fsai6C<6$p9QA|>KJ26)1(GD@=3ccd*u@Rxgsh{N+{ctJKFozUw_v4zuq z12VA=wG$7(_d<8a^V-J3pfEnS{F)+U%U4X38E|nX$NMbOt=U4x_M3R+ zkRj2ld8YU12c>zE*cOzmT@h<%o+^sX2IvL9#2{OGVwyCU_Tbh!+Zo?tO#W{9fGlY* zufpkNa(XAByK%o&VrnPiigU={boV^{|DJ3uuv)DXtF<0;R70RJPZ*>Yg+|6PUAe4h ztoJwoi@r)s=KUe>dFnnm(7A@TpY2(u38%UMh>>?bqh=>=RxL0Y&P3L8jK+?sFlQ) zHZ2@(GZjw^HVrw|phWbvcuf=g*LS+_laIHyjqRV&O7!HM8o^uY)9Kw1^T_0H$#8>u zI0B?~UM=TYN9_ImXS)wce7F`FAm08Q7uTi?(313gW|Jk>aP-t>buBlxbW)n;a3yG8 z3#V#r9h6y{ChgG%c%MjI2=uK_-G*|@!L*ZBV zpJf(cLKpH5c~cwexL)nPn@3A#S9Qwx_;}}4U@=Ka96%;v<+?p>v(Gafa*Sn8;(Mow z$!{qrt$8w%#_H}nha~TN1!iDiU|MSM@$tFnU-vmSO6=dzn(@%T;`b77xIC~Ysmgqi zIxk4M*bN&ACRoRu!(PR)matFz_h-!3BS*0IEl76n{)ynXM zhJqqVlTkZ39p7PGL12LThm75Td5a89HG-f0@hm?l21f5em*g)s|(D2Qf(*t#B0$`T(EcLql>4|kI zYw^sLPbas%{fMs)$O2Wr*wFBDSS*2SJD;Yvam023+R4T?vLC-$?ukx!cKUZyU$Unv z_2sgbYV&Cv(1?}C$qc&zUAYtw$tiE(5a9CbL1)%rE&ls-i6;+c)#FvwEZ#rX9uq_p zbhF;S_B$0KQ@)0nkCO|dG)F`^`u*j&!{hI6aUlr7b{dhbb+3`i$5+0AnEM7crVF*? zXWO0%(N)JE)XA%u#0;j&%qJQCcYOIYQaOOS9EIxz%ECfggH0-s_K+(WR=kIim1BLJ z5N^W8-y^!3K_zer83ZUbE1L)jb`9JsDykFrOroh1nzfNnwopP z2<&;%k|P@@lM?=4*+FNXy+0?}?5UjDBG)Y^K2TDwa^79|H1AjGTCQ+ROPTXybUZ25 z9xMd^&~e;;W_7QVF+p}|&T$uWax2pXg2D_e&FAq(UMWXM#?wsxjBxVwBcA;jfCLk8 zCsNYS?p$%A2k$P|U7!kT(^#PsRq@6VoEI?LtLf>D3SM>nQhpQkw4Jme<@a92Z*u#L zfFOwv^o9S(OABgI)rR1D&3VG+!kO%&BLAnVI(CP;#O6HCG^p$wL4p55-GF`)1KGnv ziFHXs8ca!ax!hwX7+;S`ak&{>ZaX847kOn6_Ey|kSlXncx=N~~$fJLFkQCeP?fouI zBu%*wNo7ZU;i}Oo4+qE}&NDFUp`a0QlVZldY5vpJE?n5P4J(nxKt-Kd#+FqD#1C@o zzjhRpA2W5#VSWxS1Bt(K?e+=))-nn$p~X2bqV8w>KV~eijCyHt@l%mvQBhOGJm4P? z2G)7J;&hZZ$Ox>6jZu$KJJ39*3@})jnfJ%4{lE7z$4>*w4g;?f;bQr%loWMfAbPF$ zj95Nq{jhKcFk#r5S}ttW>RJQwX+AP$C0xol8 zDydyA4IGM9MPH0!>e{^X?J>f}<4|!7DQC1nDd^#4%%R>4Dw1c$qN{4avNxmKkX&51 zj7mbiAw;WJt*rXDdI&bpogPq202J8TWInAWP%UipUR#Wp1jUeZM?^&2{uFhY#HqeI zxl46P4#!~n*9)3Bxp1veXus(OTKbA-I&BDZtANB|8mJA%I~_PQSqN&}!93UA!HOTa zR8>?4qf$t;Yn`c#R=@IkL%xKeolgAv+JU_E@k*cm9&Rx|^!h-@G;~pL|}QmlV46t9$TLyT_gaEr4p1&In%n0r<`d}qK6u0eqx}I};B7Qi}o`uKAi~K@0*3wKA5Fje3b;vK1 zxQ36F7Y@4;IE_UO_jqS?6BV%icfpmsy16-7y_~n+a%9SOt<$g`KBog{`7{o%x~)-h z7+1o`1!YRud(sQ0@l@*0bY-Z@zkBz5xI&dfG)Kqgv-rK$^-xAz8v*F}De0oGkt&b3 zqy@qp&e#Q|P~P1id#iqym8Td~Q~!@}bP&Ke7s`=DU1A0yqI}5bqL6S*L%$1J90%g6 z9d^Zk0sTA?biC{pK_-Y%2h^K#a-+77XfzdXhd3&#e_^AoYl4Q&-1T9&#T*d7et6xVZs#?SN!<|0` z^QP>29yK*B$B_&Miegg0?2p$<`O0TD82R)Jt#aPp_y9>FGc`;p zEF66uBmdoEKPgl9S6M=FbHTiZxevSwKb|?h|Uqvqltf}t@i!SfQ%)&MYkNc#jln&wdx)1r)6P{ zYTol<)9M5e$YOx%4;>R%I;22rFqW*>t|<<`b#R9Jx$1{DWM~eTZe$|cxL{b_OA9M3&5M^;J2i)tR>pjYVb-xJAjrYH&E%F%WEXvk704Sx;C5M2&>!8o5+(j0D+8# zrLIjJz=@i`C5|1prYtjj@Q3@@o_bRq5HJM<^5uh>)qmY?&*s0od4-nUrd9{ReR^~o`X4<=@*YI*4=*Xf`G=-w1T78!J`Q2dHe9y1T;|QYn z{kuh;6A@9BTUAynE-`&Em+2qGa*%n3>{xKZ8M>ZX(P+gC({*J6AZ3 ziV~f{1!S4TJBcVg&ISe%L&Rsr5rlyIIU#?8CVeWGc^o{Ny&2_PC+O}UW)t+Kcrwij zb-@2%nLRSv;g501Dwaq*?`t*r`~<`Wqt!5HTHs#&Q+ba{KOef10Oi!)t@13$CT4MM z#2yAk0@1KTXE4Smhfeui&)H`Su&YuYpx0=!yIwHtEL4(aF$_8j z5+syHB2ysmp!ko$%$UISd_WXjbP}T7$RS6 zuUXUTs(`uZJqL90Y?Z}Annh~FscAZs(3Oq zfi}LZYA+yd8-MB_bgkuM>H4*NIO@4z1gFd*c`CuDa{yxq%lf(HS6SIlz_q6)^~1S1 zN}a;c4ym~8pC*Heb@Q2>%S)fO(Zmq%>CW?#P#GA@o1q&70IW)vqSc>D=;;U@wACY0MKszr*-TMJp?*&>+CP|=;SKx zLZ2m1-|=Nm!_t}x5Q?P(@$od^+)U%GL6QpeIt1|7$gyiRPECWU%jho6z#cpKegokQ zPB2C9KYhR?D_u+NKkVmaYU_7-?43X4jX8oj9X0ZTOGgUw8(Iw<%6>iVwW$+lz*9+G z69~L|O>O)Jq_8&T;mip+>n=6E8wsWlNUEq-wc^t-zh~|@A6gTQ#Z~R>|BLR1S$u8J z9!tw)UE(D~yOxQ>+1Rmm0MbOdz>5{Pt_@?*hD>4`?j(yV)wu(16q$m&o@RCGKh>qH zK(=D+=x8fbL)aM<+6QO}SFTqYe-#wO(9h+lK}UQ{%dC@|F(*k|GfVqig{EK&3H;Bu z@5cSN%*x6`<&Q!M1*VNbr z5Kz3E%yn~!qxs_Vt1BrQ$k1AizHmT41psxbH+_EX9sIr!u3{x!k==i7rAVB9N*G-g zEwx^VV9tMSA+$>)U?fd^fo_IhXoQGJ)pRy@1yQ4uT@qg9NPV?-n z^PAbEzHk4O=H>)zj9}*A)%pRqK|aV)i5=Q z(9oDEbX-|+x9t}Ug9$yb1k#m)W#8lGx_WM#pzqpyC$M%se!CE-+vL%(Tn9kc$ON8< zg9;uHPOMNgbAR&|Al(zHQnY@gAvn76_Sb2PWo$u+A?3%UaHthkT&f~_fYcADsdER! z74#Sth(EDC-ks(3GZ{xkRXIPAxm0F=U?ohPcs5P67pA<<5swm|XooamIZn;u{> zfVE-ufW_{@m=IBdEY1T+cizDU&1I9= zfF1rl!9-Q^OgmNN9U^BYqr<$Sk@oOFb1gIAEd;qqNK9(4(0phzUF7RQPIOwu?-CiO z&U1l(4-f|s`l(Gke@yo@K$)?dEB1E$p5oa}u9@&zbk-p0hjVmWP@9(XA|QyJbsAO< z#uz@RLq>~X0U9)_E&TL`eh2~{g2j?!ttu@w`&*{?-AvyYP=^8v5`(LMLKRX$e~p9W zR6q}0cpYr=bpF|Yb>m}GdV_K};4zW;C1s$%p zym06K0c3t>0X6N>jU^=^U*UYP@fNga>Z5^sn5}}Gl~}&T6eEMjX%!H7=3qDX!VQ!G z&2*<>^LtiS*7w(E7dG|7!&PM3b+%-op)~ksfU2sup>%g3S6gL}%tM4mxJ3dlhru-v zZA)0e57L)xV9Q3h+-fIUzGRyRa4~?WM7((Jo2G?PpVZixGtg&j{=0|Ofa+l5RDtJm z$xtv%O5jeY~4h1^M|=pMrfr$%K8$1t zda(k7Wb!h#k+b0JB?mV9jo4~{{vQzDV)MjR{|SO4x`iIEOI^)31S3<;wDDzu#+L#9k~9W0>O?9_JW^_#=-5r9aSa5g#*PnAjPQu%_ zyR-9V?%cUV{--4U0fiU^1_tJXtc-*T@c#Jkh4dcy9dWE947|a+h{>uU0YAP--y?v} z$c{4FE-)~0FaKV!GY`~_z?Vd>l3K2+4(6^N#?EFi9v&VnR`xb7rpAtDEDp{VnWsX; zFfbosWF@|;d1jqtd-x`+-@a{v$dM8fLWpIkQl`aNXR*FYe*MCPYNA<_23}xJ)$b~A zds4-8(_dRf)&Ge!>rENWmT z48>C>Q=&}rFDb|eLxk?|ZniHLhF3J$kuAcq}UAfgl9zFiKVjwrFR-3Cl_%z7DS;E%wjapgdt=*bp`>(#d;vSrY%Jm#M(% zgM&jQd~TfV`3CW`J~ejJCs;hnvjxtc`{(-l(4oz{Ox;+{v(5oR9I!TH4+X-Ye#5GTZDeNKFnT*?8CyoQqv7M?k@K<*e@iFqwtEoZmvW9ZhJ?^ z0sdO3({IGtR&~t7jI@&4$-X9dbEC^sC``G(aMlNUSLAdFe>BTHNdDj+L{a3Uz>lfd z`uQEcj*TxejyA0W?pSp_YipVIwfcmD-XCq2&M>2hnWj;jN%#Uw4+fdfof}}W!{zK$$# zNZw%}O-mdY9Z7cKdLj^1(x!;r32`a6a}RagDNwRaUmj&|7#R&!QAM4SZB-vms*#;r zD9|)4v0e-Es~qHnic6wT7b#+@+7m!w{&LABH~PV20Adh_*6`LwWPV1KuAI3d-nbs z{&q)97+Nqb9IRFGIqaJtokLV-DOgr13Xix=(nvfe<1$Jv&#ALhBqa3x)ok<~r{5@F zdxv@oDCC_DoBBMzu*$)yGOvP9EncJ^s=b6xa`hup`qY(U_N)|2QShHfEQm6)dXr&bm~Z#Jjya)^XZq#a&S(d{5ka;{R^s^JswGhO4(tH=r$% zIPW&+#fHs(C@m}7n@-&G=p+-d_Oc-Tvcy8h92XgVG71gw*Yh-0gflmio8@2NcLK&r zGBGTU_}oS`$v1Cc28bHk=dkHn9-nqdXFe-9usLpRA?H20o-m}kq9WT5jCJ`1CiXoc z$2xQq8u6pt-Pi!udNNXKr)LSPZOGM=FH#_<<2pT0oSR=<3Iec#-CMbl=S)x*TL04SDDFIP(e3SpshW~($S zw)pOJa4s8d`ttH3Q@LbbR#EZ81K+oApkhpHs;sQccy7<{z*PWyhYHW@kOk``@@z51 z?`f_CM{ntkRXE7e=uc9#E%21tnBGF7c(nPVhbQju?`s@qbfR}JucBp@;yzJvhBL3B zpPwnGC1it&545FzCpLigM%h=4 zj4u;^`m;H9xM%+EWch+KOUP>T_Go~nFpDo`G9gG9&+B%vQa5Q;Ffuq?`P;W|g^)zk zKs1F8nByqiRw!1el~UDbJ>^64p*osLI%iI|Ki(P@>y~%>_;~s>&{@3q*UCNeJz2t^ zOAuaEK`TBVV@KtTYoURW-R8&Zo+>EdKM_3*N>!dpr{k1}5eMrz2xkFQ?ZxY<5WUGE z`C=;iZ!7p$_{{GP<~Vb}KJoO2%x51IVEkd22=>>I!i!&MdL{BHf%#9D-JHMaG@<7k zZsLXu2RuY6W(j+IyKo~D2)S6>KUEc&ItwiQB{lPww)j!F)dn-T)LlP?4#SS5B37M; zcHcQ?Iw*z`{{184(S0S5f zu<^FN`{L1RJSJWPL03XU$1tQpVP8 zm4_J)DhHGDXbg-Sdh~kL@k+(J(}}84sVly|?Lee6JA$yU1Mnj9X!Y>t6yV4QOLQ3> zPw}YCp$qei+b1WI&MGk`Pp|?W*5UE-yh8&Rzt}8xy5OSJh1Fnyz4x2;-h@H^;?>!| zC`IpLqJ}Q4@O!Ou`IqGXZG7w> zl60nNN{H6hlwd{fRujJC|20w?BI9L1m#)0c8dn3;LQQjyUReig)o}lk@k0lp&8edQ^ z<=C21j~X2X*-GTRNF*BZ^zWH$$Nf3hT6ZuyIyqMLcN@IA}qzD3}+UTw_);red!nYlb*HUC}!Kr~IuEHOm1_TbWwyTFQasgfCsZ_n&gj)n7 zNk0nGrNw3@Q`8~-r=``~31?-yUKgLcc=A!+H)lOY*vodsJy6wxBQoxodj54(LB^4B zHLSt7%LtM5Bm4mxld7>bNG4A(M@B6Sdb&3xb9ITKCkum~DVpXw4+Tm$%ZHWNtM7AV)Q5E|)@ZhRmNn?Rq zdFr~)l0+EV5e-*oS!^?YSu0?$%h7Jr&Ovh9tL3O!H*wXOy@}j3NIz+Y|O8!-kLht&76FXj|OAQ2*#W#~H zby~&G%;iRFapDaQOQ{i)Cz)g<6a*usoEeb6sM3tVLGf(N9i>tz;7%E378yxNyiLEe zY5%CGY3R){I5!MHl^5Vv9)6|bxx^&Wu|+aO$+UGb_DJ7)?pxWsHH^a%JWSmAA07n0 zl`Ai90%XclEzvFU6GrRlUkh%P3jEp{)si(;n3`dW*yG4V<+BZxolO)#>OKID0`LOk z$}vF%#zc11NK^~t1+6CNGAuP(@HB<@xeL#9*J0e zkJ$4Z2{qG3*t@?8g`Hta{gO(m%059=suac5&A98~ zGJMlZ`6`pQ21oCl@_ad_#KFoH;F;fJv~>|)>;&!K2Ee?t$V<}s3nOEBX;o>SX8gU) z28R7y)T>|HT(Ram?KEe4Tt0-NPed6jxOn=7%4hww0~^eZs3g2+IQmjCy$y{U*DGoh zA498{ot5kn5YdZ}vr8A7Jg~C`!sg1Qg@BkyD&#BI4B-OK4}cCuX3({UJ z0r@3u(xnzvL6s!afR{6kugo$^QN~YIePY7vb*%fG?(<)spMQ!h3b9S+8jC;ur>Q$c z6skxapUbD*cAg*=Z+km?7!hGPwRnOk>9B-xkEx2vU|cY57hiVViu-Uw7%L_6I`4ee z4|p=#aey7-%GQ=fgDuf;9#yI!*Wt~3F)kR-=H(x#jmV}!`r!?v`9LI`lbB^WCBf5jRYC{$Bd zSN*0fDJx5~u)w{PrR1$$A(4F2hOP>PKF3UrkdOudLQhxsMjy{&QBY7EF(nV9RGIOP z2Ks|DgsgDoQynmg1CH;t8&CN9Yd&>UdjTLcx)e0T@%G{%X}=366iUy(#8lT8BLK;2 z$3lsglaUu3DxEvb;s?p@h1zm(x(v4`R6;C`Gq+CuNS@fPF13 z*{)t++m9@WW2Ig%Cewhgbu4`|7r(Z@EV?XJZj!`G8TjpP=7)=5JVYga#XevRHNZkAi|}6S{Y`W@94mrve4u zBG6;kli47^HB5d}MZ_H`q($6{**x6vJ27PQZak`$`~s}UxZw|Nks?v-d>riJce(vB zOjXa0XU(mB#Td$>gv-EF0+j1@wj=M-GC@m=i?x13uo~4Xy+zDE{EW94lP5@MT-jAW zF)1WXd~w-lvP0w4Uk~aFZ8sR);jfP~K!lvm-EL=Rf(e6ysGV5cZan9?MIy;!1XL&( zm|g(oAX>fFQ^uXC-Q*vBj$Duv0^~Vlr^IW8$lua(O|-hwDJhzlYiaw)H21CUhutLA zlO3mizh{OW-q>;hG6HKZ&Um$c!;-p@=>-c#e(uJ$j)Onkmu2kGNwiYcO9;&2fk9hoklIJ$>`d|Vl6h-+I#pQA=?dsuq z%*^-YL@qPSoRU2oE-i^v+&Y)~@m48cG8!i5xAf6h30f6=gmS`}2g%17Kh(9<4HmT}Mfp3GTbXC}i>sm2nyRZfH>V`BR2%tgW@1 zEt${SpJ?_c`DtxV_xI(2r09A$n>akIUfDqKb>g+N4NX41CYh}Ujea!`AZm08U5|~%C2g3vz#IR&1c0y(`Fo#A!E_czTWt(ucs7Z6SxbQ zgoNGaB##^>o&i#E2g)Wt&NVF4c7O{I(Fuv6^+>iOX2Niwzy+)6&&_kyWU9XR@rur|$WtBKyN;K3o*zYoU zCD)Wh;eDT>FAeN-W)WfoSwbuB5$<&bM?0FQ-Lr6_Bni6g2jqP z^TR=&K4Yl}HzSjiX1hhg&vi}&nN7!kORBbRhjIL>T4;y|%p1!9xS%TFSO`fLrPY=#dcBWqE zL4pUFtKj#GUOYo_xyB1e%uM>7IdjFFTt0DWO5tCR5nrv0$UTdu+um7y#`RJ$K^sf! z+^^wpnX!cQ#rtnfRkPHzIu@9XeL3xT(#Xm3VI><_!2WpXp@x?TBmhw0u!vCrFu z(xGL;)VI661EeBvCPapQ9b!-p@Iv=Q&PP{u7ia0{=Uj)kaNgHjhXw7MkPyq)i#=2{ zve}`*R9RbDMMY*t4f`F?)IS$8W+wlJ7}C}@txmU*%B=0EZAryP ze~%{0s+1KK_kum%B=m4BoaFU_+n*^#UToPZ{MsXWDb4n4c|+S!z<+yhE-&RyGae{) z8&6ezD}gM+D&!%mEPO%Y>-*h<%_A>AKdHJ)f8fVmXCng<>M6Zz8jcr$D(23-!#bYg z=sS5R^M!N$o;9`4cLo8z>!L3|*VAHyplk^OKG_$=PI0-UNb67*MC5X=C@J~AisnX1 zA!yDP?e7`BOjyg=O;Z)w)I=cc(|^@{END3=5b+^1`RqT}Vp~N`wegYN9ZKz1%TCih z$O8BJRVKko{ar~u)K!3tRU|-^Rpc%3yvHAViB7aDVX8}~YHt?J1FLl`6#5TU`k$Ne zFlK?Co*p>PveVKc6@KkvdQrgj=XGrG%cIGoKsW zGxKeF`^4^#qMHsjStY5;sV9e17#|dVa%jd5%Lje`xVaEoH437m?XU4IHBFs{*~qy= zFbrr@nc>F5I?--*6sfJ%=dP36iP72~kq@HY!ftk7>_DYWM5J#SJ|0_}`iQ9^8^dZ!V zAl0)W183=L9*?B4{M@f`B-`r1=rkTEQ|#RpUwdEgd(kH0eo~PA4ZE0%w<%DUZmL$h z*?>Y58LZEthd9^nyRL|V)D&=eb!9elcgALGSqAui7ILLf3y~%gcp)4*w&77STyA6S z1w@!$%B4fsai6C<6$p9QA|>KJ26)1(GD@=3ccd*u@Rxgsh{N+{ctJKFozUw_v4zuq z12VA=wG$7(_d<8a^V-J3pfEnS{F)+U%U4X38E|nX$NMbOt=U4x_M3R+ zkRj2ld8YU12c>zE*cOzmT@h<%o+^sX2IvL9#2{OGVwyCU_Tbh!+Zo?tO#W{9fGlY* zufpkNa(XAByK%o&VrnPiigU={boV^{|DJ3uuv)DXtF<0;R70RJPZ*>Yg+|6PUAe4h ztoJwoi@r)s=KUe>dFnnm(7A@TpY2(u38%UMh>>?bqh=>=RxL0Y&P3L8jK+?sFlQ) zHZ2@(GZjw^HVrw|phWbvcuf=g*LS+_laIHyjqRV&O7!HM8o^uY)9Kw1^T_0H$#8>u zI0B?~UM=TYN9_ImXS)wce7F`FAm08Q7uTi?(313gW|Jk>aP-t>buBlxbW)n;a3yG8 z3#V#r9h6y{ChgG%c%MjI2=uK_-G*|@!L*ZBV zpJf(cLKpH5c~cwexL)nPn@3A#S9Qwx_;}}4U@=Ka96%;v<+?p>v(Gafa*Sn8;(Mow z$!{qrt$8w%#_H}nha~TN1!iDiU|MSM@$tFnU-vmSO6=dzn(@%T;`b77xIC~Ysmgqi zIxk4M*bN&ACRoRu!(PR)matFz_h-!3BS*0IEl76n{)ynXM zhJqqVlTkZ39p7PGL12LThm75Td5a89HG-f0@hm?l21f5em*g)s|(D2Qf(*t#B0$`T(EcLql>4|kI zYw^sLPbas%{fMs)$O2Wr*wFBDSS*2SJD;Yvam023+R4T?vLC-$?ukx!cKUZyU$Unv z_2sgbYV&Cv(1?}C$qc&zUAYtw$tiE(5a9CbL1)%rE&ls-i6;+c)#FvwEZ#rX9uq_p zbhF;S_B$0KQ@)0nkCO|dG)F`^`u*j&!{hI6aUlr7b{dhbb+3`i$5+0AnEM7crVF*? zXWO0%(N)JE)XA%u#0;j&%qJQCcYOIYQaOOS9EIxz%ECfggH0-s_K+(WR=kIim1BLJ z5N^W8-y^!3K_zer83ZUbE1L)jb`9JsDykFrOroh1nzfNnwopP z2<&;%k|P@@lM?=4*+FNXy+0?}?5UjDBG)Y^K2TDwa^79|H1AjGTCQ+ROPTXybUZ25 z9xMd^&~e;;W_7QVF+p}|&T$uWax2pXg2D_e&FAq(UMWXM#?wsxjBxVwBcA;jfCLk8 zCsNYS?p$%A2k$P|U7!kT(^#PsRq@6VoEI?LtLf>D3SM>nQhpQkw4Jme<@a92Z*u#L zfFOwv^o9S(OABgI)rR1D&3VG+!kO%&BLAnVI(CP;#O6HCG^p$wL4p55-GF`)1KGnv ziFHXs8ca!ax!hwX7+;S`ak&{>ZaX847kOn6_Ey|kSlXncx=N~~$fJLFkQCeP?fouI zBu%*wNo7ZU;i}Oo4+qE}&NDFUp`a0QlVZldY5vpJE?n5P4J(nxKt-Kd#+FqD#1C@o zzjhRpA2W5#VSWxS1Bt(K?e+=))-nn$p~X2bqV8w>KV~eijCyHt@l%mvQBhOGJm4P? z2G)7J;&hZZ$Ox>6jZu$KJJ39*3@})jnfJ%4{lE7z$4>*w4g;?f;bQr%loWMfAbPF$ zj95Nq{jhKcFk#r5S}ttW>RJQwX+AP$C0xol8 zDydyA4IGM9MPH0!>e{^X?J>f}<4|!7DQC1nDd^#4%%R>4Dw1c$qN{4avNxmKkX&51 zj7mbiAw;WJt*rXDdI&bpogPq202J8TWInAWP%UipUR#Wp1jUeZM?^&2{uFhY#HqeI zxl46P4#!~n*9)3Bxp1veXus(OTKbA-I&BDZtANB|8mJA%I~_PQSqN&}!93UA!HOTa zR8>?4qf$t;Yn`c#R=@IkL%xKeolgAv+JU_E@k*cm9&Rx|^!h-@G;~pL|}QmlV46t9$TLyT_gaEr4p1&In%n0r<`d}qK6u0eqx}I};B7Qi}o`uKAi~K@0*3wKA5Fje3b;vK1 zxQ36F7Y@4;IE_UO_jqS?6BV%icfpmsy16-7y_~n+a%9SOt<$g`KBog{`7{o%x~)-h z7+1o`1!YRud(sQ0@l@*0bY-Z@zkBz5xI&dfG)Kqgv-rK$^-xAz8v*F}De0oGkt&b3 zqy@qp&e#Q|P~P1id#iqym8Td~Q~!@}bP&Ke7s`=DU1A0yqI}5bqL6S*L%$1J90%g6 z9d^Zk0sTA?biC{pK_-Y%2h^K#a-+77XfzdXhd3&#e_^AoYl4Q&-1T9&#T*d7et6xVZs#?SN!<|0` z^QP>29yK*B$B_&Miegg0?2p$<`O0TD82R)Jt#aPp_y9>FGc`;p zEF66uBmdoEKPgl9S6M=FbHTiZxevSwKb|?h|Uqvqltf}t@i!SfQ%)&MYkNc#jln&wdx)1r)6P{ zYTol<)9M5e$YOx%4;>R%I;22rFqW*>t|<<`b#R9Jx$1{DWM~eTZe$|cxL{b_OA9M3&5M^;J2i)tR>pjYVb-xJAjrYH&E%F%WEXvk704Sx;C5M2&>!8o5+(j0D+8# zrLIjJz=@i`C5|1prYtjj@Q3@@o_bRq5HJM<^5uh>)qmY?&*s0od4-nUrd9{ReR^~o`X4<=@*YI*4=*Xf`G=-w1T78!J`Q2dHe9y1T;|QYn z{kuh;6A@9BTUAynE-`&Em+2qGa*%n3>{xKZ8M>ZX(P+gC({*J6AZ3 ziV~f{1!S4TJBcVg&ISe%L&Rsr5rlyIIU#?8CVeWGc^o{Ny&2_PC+O}UW)t+Kcrwij zb-@2%nLRSv;g501Dwaq*?`t*r`~<`Wqt!5HTHs#&Q+ba{KOef10Oi!)t@13$CT4MM z#2yAk0@1KTXE4Smhfeui&)H`Su&YuYpx0=!yIwHtEL4(aF$_8j z5+syHB2ysmp!ko$%$UISd_WXjbP}T7$RS6 zuUXUTs(`uZJqL90Y?Z}Annh~FscAZs(3Oq zfi}LZYA+yd8-MB_bgkuM>H4*NIO@4z1gFd*c`CuDa{yxq%lf(HS6SIlz_q6)^~1S1 zN}a;c4ym~8pC*Heb@Q2>%S)fO(Zmq%>CW?#P#GA@o1q&70IW)vqSc>D=;;U@wACY0MKszr*-TMJp?*&>+CP|=;SKx zLZ2m1-|=Nm!_t}x5Q?P(@$od^+)U%GL6QpeIt1|7$gyiRPECWU%jho6z#cpKegokQ zPB2C9KYhR?D_u+NKkVmaYU_7-?43X4jX8oj9X0ZTOGgUw8(Iw<%6>iVwW$+lz*9+G z69~L|O>O)Jq_8&T;mip+>n=6E8wsWlNUEq-wc^t-zh~|@A6gTQ#Z~R>|BLR1S$u8J z9!tw)UE(D~yOxQ>+1Rmm0MbOdz>5{Pt_@?*hD>4`?j(yV)wu(16q$m&o@RCGKh>qH zK(=D+=x8fbL)aM<+6QO}SFTqYe-#wO(9h+lK}UQ{%dC@|F(*k|GfVqig{EK&3H;Bu z@5cSN%*x6`<&Q!M1*VNbr z5Kz3E%yn~!qxs_Vt1BrQ$k1AizHmT41psxbH+_EX9sIr!u3{x!k==i7rAVB9N*G-g zEwx^VV9tMSA+$>)U?fd^fo_IhXoQGJ)pRy@1yQ4uT@qg9NPV?-n z^PAbEzHk4O=H>)zj9}*A)%pRqK|aV)i5=Q z(9oDEbX-|+x9t}Ug9$yb1k#m)W#8lGx_WM#pzqpyC$M%se!CE-+vL%(Tn9kc$ON8< zg9;uHPOMNgbAR&|Al(zHQnY@gAvn76_Sb2PWo$u+A?3%UaHthkT&f~_fYcADsdER! z74#Sth(EDC-ks(3GZ{xkRXIPAxm0F=U?ohPcs5P67pA<<5swm|XooamIZn;u{> zfVE-ufW_{@m=IBdEY1T+cizDU&1I9= zfF1rl!9-Q^OgmNN9U^BYqr<$Sk@oOFb1gIAEd;qqNK9(4(0phzUF7RQPIOwu?-CiO z&U1l(4-f|s`l(Gke@yo@K$)?dEB1E$p5oa}u9@&zbk-p0hjVmWP@9(XA|QyJbsAO< z#uz@RLq>~X0U9)_E&TL`eh2~{g2j?!ttu@w`&*{?-AvyYP=^8v5`(LMLKRX$e~p9W zR6q}0cpYr=bpF|Yb>m}GdV_K};4zW;C1s$%p zym06K0c3t>0X6N>jU^=^U*UYP@fNga>Z5^sn5}}Gl~}&T6eEMjX%!H7=3qDX!VQ!G z&2*<>^LtiS*7w(E7dG|7!&PM3b+%-op)~ksfU2sup>%g3S6gL}%tM4mxJ3dlhru-v zZA)0e57L)xV9Q3h+-fIUzGRyRa4~?WM7((Jo2G?PpVZixGtg&j{=0|Ofa+l5RDtJm z$xtv%O5jeY~4h1^M|=pMrfr$%K8$1t zda(k7Wb!h#k+b0JB?mV9jo4~{{vQzDV)MjR{|SO4x`iIEOI^)31S3<;wDDzu#+L#9k~9W0>O?9_JW^_ zaB^>EX>4U6ba`-PAZ2)IW&i+q+U=TIavVF7MgOsiUIJ!!EC-`m?Vy+6#}SznB~tbD zs`{g?tw@QPjEunG!yO{%_J9B5xc}m-BvqG-Xl=E6zH-YgcHXFezS{j6e7-;LR~@g< z!q3Ou#|M!^iP!Y}D*bhS=Xm*X!F!G{em?H>^-0v%K(7zp116g}@@9QrB*)`(Jml9v zZNHY>R6Z|t#OHOsPP|Kb{ZDd-{uso5cb^YrAxf)oR*G?_ko^6r&kB6cj6SB!Y`?FXTJAN(8Q zPZOt)6~&)FSS6${+j;#zXX!cn*p@LukB<6C|A zljJNv{os3s79vw07jjskhZFXFonf-X9Cs96W1KPFW11wkIMb6SzQc)27cfJ{vnOES{7#J*Y$#1{iKl||Se7kd|g(!Iah!yLKR=F(0GG{+Ii-d&p z%3HYset*Bx??2TKrAh|N4YRVr?#DC4DB(wKrJLu(d4<=fD}s~t8h{WncVRIUe-6He zR6-42Vw4bwqmrP`%45oLkbzK2Tr4u?lxlPmHQL-wA4vf z&V~Astkh7aw{j_^7AfjVE4`+gYpJzLHIVC)BukMhA}UR~Ce2#3s;Fwy-eOB&U}?2U z)7Dz=(RC*3jMX{6b7aJkMjmCO|f{1cQ@eIU{2+ z2Qn^}0SY==&b)@4qh-!==9{5hi7c{MZrlo%F;bX!h~rX5^WH~jvpAMDXR%XUxr+9HO+w ze4#@KmApene0pv*v2e))831nR9Pk!+*30n=0idIZp~EWflsaMqskH5YOd!kyDr*(e zYH{dfZWwGHRtt=!6qFfK?8t|$7&B$iPy84}j-`|t>fA`4Y<1P8^tp5w z-Lkw?_15bM7KA@4zrt)bD&2F(g&?O%M;msx_n5yKu~J24 z^fL193ZZBm1bggW$4bMMyBcezTfL^K2u%??W8Kah6g@erb@a|~^bhllqQ^_hbj9w0 zK64TB;FPgf^p*x8^eb;?@0fpioEbFzrUWP0D5xl3cafdZSkWV{_8! zAy6Lj<7D^C*`Lm(w>W!~b)g@mx0Bnv?Yqy@#z>55n%WlOhz1GZ%KNJibP5eZw~nXe z&!Tz#p|}yynLsVBPOT@Q$kXW_K5o>D(=)QPKo*H_s&y~cH+s#7#SpYsxsK3+V<*(S z5g_n+8Ja2oy3hb%-pavIOOrlL^F(HAd(27Wj-)5m0buRXW^98e8*iH9f95WoR{kLcTZlf5U0C)nh zH8Z*%rsGmgJ5KCP8_1ne={sP2ps*-LlvAOHa3QH#gdM+Ep_s^rERshRG6AY%S@mYL z47&lEsvca)GFAceQUXNY95c_V$I%stJKNl(Ax@5TXgz(96sqKQ6ZL=sJ{jt`$$u`m zr=#*;7r2ir-scx1j+tZ=UECK?Fm|?FkCSTg&yohJXgu#Rg#95%|I>kg@*2-2K9k8` zsn0zPYwQBh*bsfUOYU;S(v zf{v<{_>?_oEy(i}2->2~k;~h5j1Yzs8~;XcNun&>q3-h9D<=ooi=YZ(^DTA$(P z*k#gTclbkdBHbAtJg0i24exr%-Gm6*J8K%ya5Pze14Ma0h~@@>6Jj6Dyu0H=x_r~I?xKK-%gu)C%_3@qhD`LMDP#_UUxAAV`ym;LwQ(v5wwWiKsZJfjSTp`L0{<>2$#T{PQL5Uh{E< zo%fC5mSC3#(Gs=0Y~T zP!HW7>Jq&&$tP;Od0KM`)grbCxou8CLLw9v*pnbCbmF4h}O!lNuqY@B&37fAb;pj7p*d}#2?uZ$pm3y;)7@lEs zK^Vw2oY6|1*e>F^Zfpxchrg35!%S*@LK|GHH@3lBY`fi{LJWd1Yi69pq$2$UgNQ5U z(7cI}DMQC5(H_UNOj(i<Jjvx5+r_1sw1eGOgadBm;-+ z3@YQwjHc0S(4flK0yE5O$3{##c7*~!m!Jti)(x~XUj$X!#Bjrz4yDf<&q^CLyvT77 zFyB-By%wOiH3cXuA;8N657pxfEal}M*m)X!p-9qv+7 zlO!IR856fI0VBA;B?U_+(K3_M=#i~81P^itL&yg_o81?H6-$`g?AD3JV$*!9fuQ3B zAtlhTnPalL=4wnKc8?!OREHCbeLs})hm4Xc&^1_2!_BG0j@(p-3h~8m7|gFX47i+< zzT&M&Fp&}P%j2{!U8P@q|DV2o=_`TFn=w9_ zhKRfZLO2INew9SZ&A1EIgn%2=c-?mU3!woJqtY+{M_kb4MUji~#Q1g9mhI znyjXfu!zeRvAebg31W~#Y{9W>4WS)68$1E&5VU6a85zog(+;%PO+|41iKDnFX0Xt2 zKr10^7K?a>t#*Q2=eoi&sD2z2MY)zeGnxgH)rzgE-Df2H zw3!yloOck8uO-^kd{eZ|tl%(hOu3JO@N|A+3D~#lq9k?{qQx4?S*<#u=s^38#I#5X zzyyA!k`eLdM~Nml0NC#476=*;b*q$A>M)N98B1Jv&uS27&ujrD4?HGTAQdeOiAqKq z043OX-&WjCF_zRv4HI=b{Ur4Ruh`bw3%809K*jHN(45dVR#HK8k4H382UQitHZnG= zMks4!=$*8%=#XsTpmng@IE!G&$R@X}%{o44o872O3UUIvY9ZP!!|8CcltQqF0LAJO z@4!MwL5LXQZTzc&RYtwHG0;Z_a)$=H^loykl)zRU76Y4@(t378 zxlqCZ$%9cM-_f$;Ah#*|z%#%-kO^!@2q4(Kv;}9NN*F2xTNlmjhq*0wj~CQn_mIU( z9V;5FXX%gF?Iw0p>AlN+^q*Ox1ZYP&g$*@UGvi%s19yxYW{j{ECPsoAFjv9F(GPaB zfV%vO_EFxX$bllLlPkfmvX(bymBZL);6@y(mt|WhzMo)H5Awcxrcp=#Vvy7MR&3Fi0m*4f%kk z&2I9TGVm)R%mFJT*EZ8{xAx1nD(vVR;xl1$ynl?5l1Pr~rdvJineLx+WU7OXF$zFD zP^Lt5b$fbDJp)&nVKOurjBE-iy?;}Z=(R}6ZvmY;d}eo3+P%dQaEV`!VSv5@~ zD{k8w4RAapEeSjauTau$Hb9XA@f~`O@b`hCXlr;3^Bd5s@{*vrLMp)hcltfI1 zyEX>4Tx z0C=2zkv&MmP!xqvQ$?v25j%)DWT;LSL`5963Pq?8YK2xEOkVm2O&XFE7e~Rh;NZ_< z)xpJCR|i)?5c~mgb#YR3krMAq3N2!MaCsl+y>qzlK0v6KnPzp21DbA|sYG1NWLL$m zSA@_*6-B?yEMrcRlJH$$_XzO)F2=L`@BO)Y)ttqEfJi*c4AUmwAfDc|4bJ<-5muB{ z;&b9LlNuy`C`-Ngjg)JvC_t@Xlle$#8Fk#DPPEVta9Gstd*;* z*(ZNtIH#{HbDe4!2`pj>5=1DdqJ%PR#Aw$^v5=zkxQ~Cx^-JVZ$W;O(#{w$QAiI9> zKlnXcD?d5mC57Wa=ZoWfi~wD`K%?e3-^Y&AI01ssz?I(eSL(pbC+W487Ci#`wt(i|qi@Or1GhkE&6`{E9H$RJnr4-}0S*p<(E??!`@Flm zeQy8WY0mElL%MR5WcjsD(7jgO@hr$DSdY?PPU%oHvMSj0 zP53<*yEJF3aE$p1@_rfAKENZp_X7(E_SJPtHwN^V2!X^ z@k#*_-bb*erJDGC1ZxVbaScYbK%626gtg&u_t=}Xk8LZehsj1#1Yob;~tI$&Z%C%yZ z9lI2(?AWDPWv4%iRd(!BX0e@qDOTCBYo62WU2pW^fDh2WZSiIe@!g8`MsEXkshh@$ z$mNH>y=_+t%TOtpRSjg)<#ro|@N+lFRXF#9NfCXKH|h>Es(O|;)&PGCQjfvayXmoO z^U}8MLZr+cW~x^QECkAXzptCdJ-aDM-8753X`J_d|3P}JN;b>)&G7pH_1^D~*Xzd@ z`_*i=yDw~>=}X(Tt~j&06!>hQE}cbgh(L*m9Iw}H_{`g4WQcxeXVxRD?gy+J%&96< z-)CB|D~4H7szK-6Ziu2`@SEUnV)RvzUH`X5n6+B1{11nt1nAW&@;i+lkFE%_y!ZQX zalhTfG3NGg59vzvu<2yzvj6}9000000000000000000000000009fK52X{qEXnJy< P00000NkvXXu0mjfm(VbP literal 0 HcmV?d00001 diff --git a/xml_converter/integration_tests/test_cases/texture/output_xml/my_texture2.png b/xml_converter/integration_tests/test_cases/texture/output_xml/my_texture2.png new file mode 100644 index 0000000000000000000000000000000000000000..21a80261d86c0235b084608c7558c247f3968707 GIT binary patch literal 13277 zcmW+-1yoy26NLgri@UaHad&HR=PT}7+}*9XOVDD4;%>#=-5r9aSa5g#*PnAjPQu%_ zyR-9V?%cUV{--4U0fiU^1_tJXtc-*T@c#Jkh4dcy9dWE947|a+h{>uU0YAP--y?v} z$c{4FE-)~0FaKV!GY`~_z?Vd>l3K2+4(6^N#?EFi9v&VnR`xb7rpAtDEDp{VnWsX; zFfbosWF@|;d1jqtd-x`+-@a{v$dM8fLWpIkQl`aNXR*FYe*MCPYNA<_23}xJ)$b~A zds4-8(_dRf)&Ge!>rENWmT z48>C>Q=&}rFDb|eLxk?|ZniHLhF3J$kuAcq}UAfgl9zFiKVjwrFR-3Cl_%z7DS;E%wjapgdt=*bp`>(#d;vSrY%Jm#M(% zgM&jQd~TfV`3CW`J~ejJCs;hnvjxtc`{(-l(4oz{Ox;+{v(5oR9I!TH4+X-Ye#5GTZDeNKFnT*?8CyoQqv7M?k@K<*e@iFqwtEoZmvW9ZhJ?^ z0sdO3({IGtR&~t7jI@&4$-X9dbEC^sC``G(aMlNUSLAdFe>BTHNdDj+L{a3Uz>lfd z`uQEcj*TxejyA0W?pSp_YipVIwfcmD-XCq2&M>2hnWj;jN%#Uw4+fdfof}}W!{zK$$# zNZw%}O-mdY9Z7cKdLj^1(x!;r32`a6a}RagDNwRaUmj&|7#R&!QAM4SZB-vms*#;r zD9|)4v0e-Es~qHnic6wT7b#+@+7m!w{&LABH~PV20Adh_*6`LwWPV1KuAI3d-nbs z{&q)97+Nqb9IRFGIqaJtokLV-DOgr13Xix=(nvfe<1$Jv&#ALhBqa3x)ok<~r{5@F zdxv@oDCC_DoBBMzu*$)yGOvP9EncJ^s=b6xa`hup`qY(U_N)|2QShHfEQm6)dXr&bm~Z#Jjya)^XZq#a&S(d{5ka;{R^s^JswGhO4(tH=r$% zIPW&+#fHs(C@m}7n@-&G=p+-d_Oc-Tvcy8h92XgVG71gw*Yh-0gflmio8@2NcLK&r zGBGTU_}oS`$v1Cc28bHk=dkHn9-nqdXFe-9usLpRA?H20o-m}kq9WT5jCJ`1CiXoc z$2xQq8u6pt-Pi!udNNXKr)LSPZOGM=FH#_<<2pT0oSR=<3Iec#-CMbl=S)x*TL04SDDFIP(e3SpshW~($S zw)pOJa4s8d`ttH3Q@LbbR#EZ81K+oApkhpHs;sQccy7<{z*PWyhYHW@kOk``@@z51 z?`f_CM{ntkRXE7e=uc9#E%21tnBGF7c(nPVhbQju?`s@qbfR}JucBp@;yzJvhBL3B zpPwnGC1it&545FzCpLigM%h=4 zj4u;^`m;H9xM%+EWch+KOUP>T_Go~nFpDo`G9gG9&+B%vQa5Q;Ffuq?`P;W|g^)zk zKs1F8nByqiRw!1el~UDbJ>^64p*osLI%iI|Ki(P@>y~%>_;~s>&{@3q*UCNeJz2t^ zOAuaEK`TBVV@KtTYoURW-R8&Zo+>EdKM_3*N>!dpr{k1}5eMrz2xkFQ?ZxY<5WUGE z`C=;iZ!7p$_{{GP<~Vb}KJoO2%x51IVEkd22=>>I!i!&MdL{BHf%#9D-JHMaG@<7k zZsLXu2RuY6W(j+IyKo~D2)S6>KUEc&ItwiQB{lPww)j!F)dn-T)LlP?4#SS5B37M; zcHcQ?Iw*z`{{184(S0S5f zu<^FN`{L1RJSJWPL03XU$1tQpVP8 zm4_J)DhHGDXbg-Sdh~kL@k+(J(}}84sVly|?Lee6JA$yU1Mnj9X!Y>t6yV4QOLQ3> zPw}YCp$qei+b1WI&MGk`Pp|?W*5UE-yh8&Rzt}8xy5OSJh1Fnyz4x2;-h@H^;?>!| zC`IpLqJ}Q4@O!Ou`IqGXZG7w> zl60nNN{H6hlwd{fRujJC|20w?BI9L1m#)0c8dn3;LQQjyUReig)o}lk@k0lp&8edQ^ z<=C21j~X2X*-GTRNF*BZ^zWH$$Nf3hT6ZuyIyqMLcN@IA}qzD3}+UTw_);red!nYlb*HUC}!Kr~IuEHOm1_TbWwyTFQasgfCsZ_n&gj)n7 zNk0nGrNw3@Q`8~-r=``~31?-yUKgLcc=A!+H)lOY*vodsJy6wxBQoxodj54(LB^4B zHLSt7%LtM5Bm4mxld7>bNG4A(M@B6Sdb&3xb9ITKCkum~DVpXw4+Tm$%ZHWNtM7AV)Q5E|)@ZhRmNn?Rq zdFr~)l0+EV5e-*oS!^?YSu0?$%h7Jr&Ovh9tL3O!H*wXOy@}j3NIz+Y|O8!-kLht&76FXj|OAQ2*#W#~H zby~&G%;iRFapDaQOQ{i)Cz)g<6a*usoEeb6sM3tVLGf(N9i>tz;7%E378yxNyiLEe zY5%CGY3R){I5!MHl^5Vv9)6|bxx^&Wu|+aO$+UGb_DJ7)?pxWsHH^a%JWSmAA07n0 zl`Ai90%XclEzvFU6GrRlUkh%P3jEp{)si(;n3`dW*yG4V<+BZxolO)#>OKID0`LOk z$}vF%#zc11NK^~t1+6CNGAuP(@HB<@xeL#9*J0e zkJ$4Z2{qG3*t@?8g`Hta{gO(m%059=suac5&A98~ zGJMlZ`6`pQ21oCl@_ad_#KFoH;F;fJv~>|)>;&!K2Ee?t$V<}s3nOEBX;o>SX8gU) z28R7y)T>|HT(Ram?KEe4Tt0-NPed6jxOn=7%4hww0~^eZs3g2+IQmjCy$y{U*DGoh zA498{ot5kn5YdZ}vr8A7Jg~C`!sg1Qg@BkyD&#BI4B-OK4}cCuX3({UJ z0r@3u(xnzvL6s!afR{6kugo$^QN~YIePY7vb*%fG?(<)spMQ!h3b9S+8jC;ur>Q$c z6skxapUbD*cAg*=Z+km?7!hGPwRnOk>9B-xkEx2vU|cY57hiVViu-Uw7%L_6I`4ee z4|p=#aey7-%GQ=fgDuf;9#yI!*Wt~3F)kR-=H(x#jmV}!`r!?v`9LI`lbB^WCBf5jRYC{$Bd zSN*0fDJx5~u)w{PrR1$$A(4F2hOP>PKF3UrkdOudLQhxsMjy{&QBY7EF(nV9RGIOP z2Ks|DgsgDoQynmg1CH;t8&CN9Yd&>UdjTLcx)e0T@%G{%X}=366iUy(#8lT8BLK;2 z$3lsglaUu3DxEvb;s?p@h1zm(x(v4`R6;C`Gq+CuNS@fPF13 z*{)t++m9@WW2Ig%Cewhgbu4`|7r(Z@EV?XJZj!`G8TjpP=7)=5JVYga#XevRHNZkAi|}6S{Y`W@94mrve4u zBG6;kli47^HB5d}MZ_H`q($6{**x6vJ27PQZak`$`~s}UxZw|Nks?v-d>riJce(vB zOjXa0XU(mB#Td$>gv-EF0+j1@wj=M-GC@m=i?x13uo~4Xy+zDE{EW94lP5@MT-jAW zF)1WXd~w-lvP0w4Uk~aFZ8sR);jfP~K!lvm-EL=Rf(e6ysGV5cZan9?MIy;!1XL&( zm|g(oAX>fFQ^uXC-Q*vBj$Duv0^~Vlr^IW8$lua(O|-hwDJhzlYiaw)H21CUhutLA zlO3mizh{OW-q>;hG6HKZ&Um$c!;-p@=>-c#e(uJ$j)Onkmu2kGNwiYcO9;&2fk9hoklIJ$>`d|Vl6h-+I#pQA=?dsuq z%*^-YL@qPSoRU2oE-i^v+&Y)~@m48cG8!i5xAf6h30f6=gmS`}2g%17Kh(9<4HmT}Mfp3GTbXC}i>sm2nyRZfH>V`BR2%tgW@1 zEt${SpJ?_c`DtxV_xI(2r09A$n>akIUfDqKb>g+N4NX41CYh}Ujea!`AZm08U5|~%C2g3vz#IR&1c0y(`Fo#A!E_czTWt(ucs7Z6SxbQ zgoNGaB##^>o&i#E2g)Wt&NVF4c7O{I(Fuv6^+>iOX2Niwzy+)6&&_kyWU9XR@rur|$WtBKyN;K3o*zYoU zCD)Wh;eDT>FAeN-W)WfoSwbuB5$<&bM?0FQ-Lr6_Bni6g2jqP z^TR=&K4Yl}HzSjiX1hhg&vi}&nN7!kORBbRhjIL>T4;y|%p1!9xS%TFSO`fLrPY=#dcBWqE zL4pUFtKj#GUOYo_xyB1e%uM>7IdjFFTt0DWO5tCR5nrv0$UTdu+um7y#`RJ$K^sf! z+^^wpnX!cQ#rtnfRkPHzIu@9XeL3xT(#Xm3VI><_!2WpXp@x?TBmhw0u!vCrFu z(xGL;)VI661EeBvCPapQ9b!-p@Iv=Q&PP{u7ia0{=Uj)kaNgHjhXw7MkPyq)i#=2{ zve}`*R9RbDMMY*t4f`F?)IS$8W+wlJ7}C}@txmU*%B=0EZAryP ze~%{0s+1KK_kum%B=m4BoaFU_+n*^#UToPZ{MsXWDb4n4c|+S!z<+yhE-&RyGae{) z8&6ezD}gM+D&!%mEPO%Y>-*h<%_A>AKdHJ)f8fVmXCng<>M6Zz8jcr$D(23-!#bYg z=sS5R^M!N$o;9`4cLo8z>!L3|*VAHyplk^OKG_$=PI0-UNb67*MC5X=C@J~AisnX1 zA!yDP?e7`BOjyg=O;Z)w)I=cc(|^@{END3=5b+^1`RqT}Vp~N`wegYN9ZKz1%TCih z$O8BJRVKko{ar~u)K!3tRU|-^Rpc%3yvHAViB7aDVX8}~YHt?J1FLl`6#5TU`k$Ne zFlK?Co*p>PveVKc6@KkvdQrgj=XGrG%cIGoKsW zGxKeF`^4^#qMHsjStY5;sV9e17#|dVa%jd5%Lje`xVaEoH437m?XU4IHBFs{*~qy= zFbrr@nc>F5I?--*6sfJ%=dP36iP72~kq@HY!ftk7>_DYWM5J#SJ|0_}`iQ9^8^dZ!V zAl0)W183=L9*?B4{M@f`B-`r1=rkTEQ|#RpUwdEgd(kH0eo~PA4ZE0%w<%DUZmL$h z*?>Y58LZEthd9^nyRL|V)D&=eb!9elcgALGSqAui7ILLf3y~%gcp)4*w&77STyA6S z1w@!$%B4fsai6C<6$p9QA|>KJ26)1(GD@=3ccd*u@Rxgsh{N+{ctJKFozUw_v4zuq z12VA=wG$7(_d<8a^V-J3pfEnS{F)+U%U4X38E|nX$NMbOt=U4x_M3R+ zkRj2ld8YU12c>zE*cOzmT@h<%o+^sX2IvL9#2{OGVwyCU_Tbh!+Zo?tO#W{9fGlY* zufpkNa(XAByK%o&VrnPiigU={boV^{|DJ3uuv)DXtF<0;R70RJPZ*>Yg+|6PUAe4h ztoJwoi@r)s=KUe>dFnnm(7A@TpY2(u38%UMh>>?bqh=>=RxL0Y&P3L8jK+?sFlQ) zHZ2@(GZjw^HVrw|phWbvcuf=g*LS+_laIHyjqRV&O7!HM8o^uY)9Kw1^T_0H$#8>u zI0B?~UM=TYN9_ImXS)wce7F`FAm08Q7uTi?(313gW|Jk>aP-t>buBlxbW)n;a3yG8 z3#V#r9h6y{ChgG%c%MjI2=uK_-G*|@!L*ZBV zpJf(cLKpH5c~cwexL)nPn@3A#S9Qwx_;}}4U@=Ka96%;v<+?p>v(Gafa*Sn8;(Mow z$!{qrt$8w%#_H}nha~TN1!iDiU|MSM@$tFnU-vmSO6=dzn(@%T;`b77xIC~Ysmgqi zIxk4M*bN&ACRoRu!(PR)matFz_h-!3BS*0IEl76n{)ynXM zhJqqVlTkZ39p7PGL12LThm75Td5a89HG-f0@hm?l21f5em*g)s|(D2Qf(*t#B0$`T(EcLql>4|kI zYw^sLPbas%{fMs)$O2Wr*wFBDSS*2SJD;Yvam023+R4T?vLC-$?ukx!cKUZyU$Unv z_2sgbYV&Cv(1?}C$qc&zUAYtw$tiE(5a9CbL1)%rE&ls-i6;+c)#FvwEZ#rX9uq_p zbhF;S_B$0KQ@)0nkCO|dG)F`^`u*j&!{hI6aUlr7b{dhbb+3`i$5+0AnEM7crVF*? zXWO0%(N)JE)XA%u#0;j&%qJQCcYOIYQaOOS9EIxz%ECfggH0-s_K+(WR=kIim1BLJ z5N^W8-y^!3K_zer83ZUbE1L)jb`9JsDykFrOroh1nzfNnwopP z2<&;%k|P@@lM?=4*+FNXy+0?}?5UjDBG)Y^K2TDwa^79|H1AjGTCQ+ROPTXybUZ25 z9xMd^&~e;;W_7QVF+p}|&T$uWax2pXg2D_e&FAq(UMWXM#?wsxjBxVwBcA;jfCLk8 zCsNYS?p$%A2k$P|U7!kT(^#PsRq@6VoEI?LtLf>D3SM>nQhpQkw4Jme<@a92Z*u#L zfFOwv^o9S(OABgI)rR1D&3VG+!kO%&BLAnVI(CP;#O6HCG^p$wL4p55-GF`)1KGnv ziFHXs8ca!ax!hwX7+;S`ak&{>ZaX847kOn6_Ey|kSlXncx=N~~$fJLFkQCeP?fouI zBu%*wNo7ZU;i}Oo4+qE}&NDFUp`a0QlVZldY5vpJE?n5P4J(nxKt-Kd#+FqD#1C@o zzjhRpA2W5#VSWxS1Bt(K?e+=))-nn$p~X2bqV8w>KV~eijCyHt@l%mvQBhOGJm4P? z2G)7J;&hZZ$Ox>6jZu$KJJ39*3@})jnfJ%4{lE7z$4>*w4g;?f;bQr%loWMfAbPF$ zj95Nq{jhKcFk#r5S}ttW>RJQwX+AP$C0xol8 zDydyA4IGM9MPH0!>e{^X?J>f}<4|!7DQC1nDd^#4%%R>4Dw1c$qN{4avNxmKkX&51 zj7mbiAw;WJt*rXDdI&bpogPq202J8TWInAWP%UipUR#Wp1jUeZM?^&2{uFhY#HqeI zxl46P4#!~n*9)3Bxp1veXus(OTKbA-I&BDZtANB|8mJA%I~_PQSqN&}!93UA!HOTa zR8>?4qf$t;Yn`c#R=@IkL%xKeolgAv+JU_E@k*cm9&Rx|^!h-@G;~pL|}QmlV46t9$TLyT_gaEr4p1&In%n0r<`d}qK6u0eqx}I};B7Qi}o`uKAi~K@0*3wKA5Fje3b;vK1 zxQ36F7Y@4;IE_UO_jqS?6BV%icfpmsy16-7y_~n+a%9SOt<$g`KBog{`7{o%x~)-h z7+1o`1!YRud(sQ0@l@*0bY-Z@zkBz5xI&dfG)Kqgv-rK$^-xAz8v*F}De0oGkt&b3 zqy@qp&e#Q|P~P1id#iqym8Td~Q~!@}bP&Ke7s`=DU1A0yqI}5bqL6S*L%$1J90%g6 z9d^Zk0sTA?biC{pK_-Y%2h^K#a-+77XfzdXhd3&#e_^AoYl4Q&-1T9&#T*d7et6xVZs#?SN!<|0` z^QP>29yK*B$B_&Miegg0?2p$<`O0TD82R)Jt#aPp_y9>FGc`;p zEF66uBmdoEKPgl9S6M=FbHTiZxevSwKb|?h|Uqvqltf}t@i!SfQ%)&MYkNc#jln&wdx)1r)6P{ zYTol<)9M5e$YOx%4;>R%I;22rFqW*>t|<<`b#R9Jx$1{DWM~eTZe$|cxL{b_OA9M3&5M^;J2i)tR>pjYVb-xJAjrYH&E%F%WEXvk704Sx;C5M2&>!8o5+(j0D+8# zrLIjJz=@i`C5|1prYtjj@Q3@@o_bRq5HJM<^5uh>)qmY?&*s0od4-nUrd9{ReR^~o`X4<=@*YI*4=*Xf`G=-w1T78!J`Q2dHe9y1T;|QYn z{kuh;6A@9BTUAynE-`&Em+2qGa*%n3>{xKZ8M>ZX(P+gC({*J6AZ3 ziV~f{1!S4TJBcVg&ISe%L&Rsr5rlyIIU#?8CVeWGc^o{Ny&2_PC+O}UW)t+Kcrwij zb-@2%nLRSv;g501Dwaq*?`t*r`~<`Wqt!5HTHs#&Q+ba{KOef10Oi!)t@13$CT4MM z#2yAk0@1KTXE4Smhfeui&)H`Su&YuYpx0=!yIwHtEL4(aF$_8j z5+syHB2ysmp!ko$%$UISd_WXjbP}T7$RS6 zuUXUTs(`uZJqL90Y?Z}Annh~FscAZs(3Oq zfi}LZYA+yd8-MB_bgkuM>H4*NIO@4z1gFd*c`CuDa{yxq%lf(HS6SIlz_q6)^~1S1 zN}a;c4ym~8pC*Heb@Q2>%S)fO(Zmq%>CW?#P#GA@o1q&70IW)vqSc>D=;;U@wACY0MKszr*-TMJp?*&>+CP|=;SKx zLZ2m1-|=Nm!_t}x5Q?P(@$od^+)U%GL6QpeIt1|7$gyiRPECWU%jho6z#cpKegokQ zPB2C9KYhR?D_u+NKkVmaYU_7-?43X4jX8oj9X0ZTOGgUw8(Iw<%6>iVwW$+lz*9+G z69~L|O>O)Jq_8&T;mip+>n=6E8wsWlNUEq-wc^t-zh~|@A6gTQ#Z~R>|BLR1S$u8J z9!tw)UE(D~yOxQ>+1Rmm0MbOdz>5{Pt_@?*hD>4`?j(yV)wu(16q$m&o@RCGKh>qH zK(=D+=x8fbL)aM<+6QO}SFTqYe-#wO(9h+lK}UQ{%dC@|F(*k|GfVqig{EK&3H;Bu z@5cSN%*x6`<&Q!M1*VNbr z5Kz3E%yn~!qxs_Vt1BrQ$k1AizHmT41psxbH+_EX9sIr!u3{x!k==i7rAVB9N*G-g zEwx^VV9tMSA+$>)U?fd^fo_IhXoQGJ)pRy@1yQ4uT@qg9NPV?-n z^PAbEzHk4O=H>)zj9}*A)%pRqK|aV)i5=Q z(9oDEbX-|+x9t}Ug9$yb1k#m)W#8lGx_WM#pzqpyC$M%se!CE-+vL%(Tn9kc$ON8< zg9;uHPOMNgbAR&|Al(zHQnY@gAvn76_Sb2PWo$u+A?3%UaHthkT&f~_fYcADsdER! z74#Sth(EDC-ks(3GZ{xkRXIPAxm0F=U?ohPcs5P67pA<<5swm|XooamIZn;u{> zfVE-ufW_{@m=IBdEY1T+cizDU&1I9= zfF1rl!9-Q^OgmNN9U^BYqr<$Sk@oOFb1gIAEd;qqNK9(4(0phzUF7RQPIOwu?-CiO z&U1l(4-f|s`l(Gke@yo@K$)?dEB1E$p5oa}u9@&zbk-p0hjVmWP@9(XA|QyJbsAO< z#uz@RLq>~X0U9)_E&TL`eh2~{g2j?!ttu@w`&*{?-AvyYP=^8v5`(LMLKRX$e~p9W zR6q}0cpYr=bpF|Yb>m}GdV_K};4zW;C1s$%p zym06K0c3t>0X6N>jU^=^U*UYP@fNga>Z5^sn5}}Gl~}&T6eEMjX%!H7=3qDX!VQ!G z&2*<>^LtiS*7w(E7dG|7!&PM3b+%-op)~ksfU2sup>%g3S6gL}%tM4mxJ3dlhru-v zZA)0e57L)xV9Q3h+-fIUzGRyRa4~?WM7((Jo2G?PpVZixGtg&j{=0|Ofa+l5RDtJm z$xtv%O5jeY~4h1^M|=pMrfr$%K8$1t zda(k7Wb!h#k+b0JB?mV9jo4~{{vQzDV)MjR{|SO4x`iIEOI^)31S3<;wDDzu#+L#9k~9W0>O?9_JW^_#=-5r9aSa5g#*PnAjPQu%_ zyR-9V?%cUV{--4U0fiU^1_tJXtc-*T@c#Jkh4dcy9dWE947|a+h{>uU0YAP--y?v} z$c{4FE-)~0FaKV!GY`~_z?Vd>l3K2+4(6^N#?EFi9v&VnR`xb7rpAtDEDp{VnWsX; zFfbosWF@|;d1jqtd-x`+-@a{v$dM8fLWpIkQl`aNXR*FYe*MCPYNA<_23}xJ)$b~A zds4-8(_dRf)&Ge!>rENWmT z48>C>Q=&}rFDb|eLxk?|ZniHLhF3J$kuAcq}UAfgl9zFiKVjwrFR-3Cl_%z7DS;E%wjapgdt=*bp`>(#d;vSrY%Jm#M(% zgM&jQd~TfV`3CW`J~ejJCs;hnvjxtc`{(-l(4oz{Ox;+{v(5oR9I!TH4+X-Ye#5GTZDeNKFnT*?8CyoQqv7M?k@K<*e@iFqwtEoZmvW9ZhJ?^ z0sdO3({IGtR&~t7jI@&4$-X9dbEC^sC``G(aMlNUSLAdFe>BTHNdDj+L{a3Uz>lfd z`uQEcj*TxejyA0W?pSp_YipVIwfcmD-XCq2&M>2hnWj;jN%#Uw4+fdfof}}W!{zK$$# zNZw%}O-mdY9Z7cKdLj^1(x!;r32`a6a}RagDNwRaUmj&|7#R&!QAM4SZB-vms*#;r zD9|)4v0e-Es~qHnic6wT7b#+@+7m!w{&LABH~PV20Adh_*6`LwWPV1KuAI3d-nbs z{&q)97+Nqb9IRFGIqaJtokLV-DOgr13Xix=(nvfe<1$Jv&#ALhBqa3x)ok<~r{5@F zdxv@oDCC_DoBBMzu*$)yGOvP9EncJ^s=b6xa`hup`qY(U_N)|2QShHfEQm6)dXr&bm~Z#Jjya)^XZq#a&S(d{5ka;{R^s^JswGhO4(tH=r$% zIPW&+#fHs(C@m}7n@-&G=p+-d_Oc-Tvcy8h92XgVG71gw*Yh-0gflmio8@2NcLK&r zGBGTU_}oS`$v1Cc28bHk=dkHn9-nqdXFe-9usLpRA?H20o-m}kq9WT5jCJ`1CiXoc z$2xQq8u6pt-Pi!udNNXKr)LSPZOGM=FH#_<<2pT0oSR=<3Iec#-CMbl=S)x*TL04SDDFIP(e3SpshW~($S zw)pOJa4s8d`ttH3Q@LbbR#EZ81K+oApkhpHs;sQccy7<{z*PWyhYHW@kOk``@@z51 z?`f_CM{ntkRXE7e=uc9#E%21tnBGF7c(nPVhbQju?`s@qbfR}JucBp@;yzJvhBL3B zpPwnGC1it&545FzCpLigM%h=4 zj4u;^`m;H9xM%+EWch+KOUP>T_Go~nFpDo`G9gG9&+B%vQa5Q;Ffuq?`P;W|g^)zk zKs1F8nByqiRw!1el~UDbJ>^64p*osLI%iI|Ki(P@>y~%>_;~s>&{@3q*UCNeJz2t^ zOAuaEK`TBVV@KtTYoURW-R8&Zo+>EdKM_3*N>!dpr{k1}5eMrz2xkFQ?ZxY<5WUGE z`C=;iZ!7p$_{{GP<~Vb}KJoO2%x51IVEkd22=>>I!i!&MdL{BHf%#9D-JHMaG@<7k zZsLXu2RuY6W(j+IyKo~D2)S6>KUEc&ItwiQB{lPww)j!F)dn-T)LlP?4#SS5B37M; zcHcQ?Iw*z`{{184(S0S5f zu<^FN`{L1RJSJWPL03XU$1tQpVP8 zm4_J)DhHGDXbg-Sdh~kL@k+(J(}}84sVly|?Lee6JA$yU1Mnj9X!Y>t6yV4QOLQ3> zPw}YCp$qei+b1WI&MGk`Pp|?W*5UE-yh8&Rzt}8xy5OSJh1Fnyz4x2;-h@H^;?>!| zC`IpLqJ}Q4@O!Ou`IqGXZG7w> zl60nNN{H6hlwd{fRujJC|20w?BI9L1m#)0c8dn3;LQQjyUReig)o}lk@k0lp&8edQ^ z<=C21j~X2X*-GTRNF*BZ^zWH$$Nf3hT6ZuyIyqMLcN@IA}qzD3}+UTw_);red!nYlb*HUC}!Kr~IuEHOm1_TbWwyTFQasgfCsZ_n&gj)n7 zNk0nGrNw3@Q`8~-r=``~31?-yUKgLcc=A!+H)lOY*vodsJy6wxBQoxodj54(LB^4B zHLSt7%LtM5Bm4mxld7>bNG4A(M@B6Sdb&3xb9ITKCkum~DVpXw4+Tm$%ZHWNtM7AV)Q5E|)@ZhRmNn?Rq zdFr~)l0+EV5e-*oS!^?YSu0?$%h7Jr&Ovh9tL3O!H*wXOy@}j3NIz+Y|O8!-kLht&76FXj|OAQ2*#W#~H zby~&G%;iRFapDaQOQ{i)Cz)g<6a*usoEeb6sM3tVLGf(N9i>tz;7%E378yxNyiLEe zY5%CGY3R){I5!MHl^5Vv9)6|bxx^&Wu|+aO$+UGb_DJ7)?pxWsHH^a%JWSmAA07n0 zl`Ai90%XclEzvFU6GrRlUkh%P3jEp{)si(;n3`dW*yG4V<+BZxolO)#>OKID0`LOk z$}vF%#zc11NK^~t1+6CNGAuP(@HB<@xeL#9*J0e zkJ$4Z2{qG3*t@?8g`Hta{gO(m%059=suac5&A98~ zGJMlZ`6`pQ21oCl@_ad_#KFoH;F;fJv~>|)>;&!K2Ee?t$V<}s3nOEBX;o>SX8gU) z28R7y)T>|HT(Ram?KEe4Tt0-NPed6jxOn=7%4hww0~^eZs3g2+IQmjCy$y{U*DGoh zA498{ot5kn5YdZ}vr8A7Jg~C`!sg1Qg@BkyD&#BI4B-OK4}cCuX3({UJ z0r@3u(xnzvL6s!afR{6kugo$^QN~YIePY7vb*%fG?(<)spMQ!h3b9S+8jC;ur>Q$c z6skxapUbD*cAg*=Z+km?7!hGPwRnOk>9B-xkEx2vU|cY57hiVViu-Uw7%L_6I`4ee z4|p=#aey7-%GQ=fgDuf;9#yI!*Wt~3F)kR-=H(x#jmV}!`r!?v`9LI`lbB^WCBf5jRYC{$Bd zSN*0fDJx5~u)w{PrR1$$A(4F2hOP>PKF3UrkdOudLQhxsMjy{&QBY7EF(nV9RGIOP z2Ks|DgsgDoQynmg1CH;t8&CN9Yd&>UdjTLcx)e0T@%G{%X}=366iUy(#8lT8BLK;2 z$3lsglaUu3DxEvb;s?p@h1zm(x(v4`R6;C`Gq+CuNS@fPF13 z*{)t++m9@WW2Ig%Cewhgbu4`|7r(Z@EV?XJZj!`G8TjpP=7)=5JVYga#XevRHNZkAi|}6S{Y`W@94mrve4u zBG6;kli47^HB5d}MZ_H`q($6{**x6vJ27PQZak`$`~s}UxZw|Nks?v-d>riJce(vB zOjXa0XU(mB#Td$>gv-EF0+j1@wj=M-GC@m=i?x13uo~4Xy+zDE{EW94lP5@MT-jAW zF)1WXd~w-lvP0w4Uk~aFZ8sR);jfP~K!lvm-EL=Rf(e6ysGV5cZan9?MIy;!1XL&( zm|g(oAX>fFQ^uXC-Q*vBj$Duv0^~Vlr^IW8$lua(O|-hwDJhzlYiaw)H21CUhutLA zlO3mizh{OW-q>;hG6HKZ&Um$c!;-p@=>-c#e(uJ$j)Onkmu2kGNwiYcO9;&2fk9hoklIJ$>`d|Vl6h-+I#pQA=?dsuq z%*^-YL@qPSoRU2oE-i^v+&Y)~@m48cG8!i5xAf6h30f6=gmS`}2g%17Kh(9<4HmT}Mfp3GTbXC}i>sm2nyRZfH>V`BR2%tgW@1 zEt${SpJ?_c`DtxV_xI(2r09A$n>akIUfDqKb>g+N4NX41CYh}Ujea!`AZm08U5|~%C2g3vz#IR&1c0y(`Fo#A!E_czTWt(ucs7Z6SxbQ zgoNGaB##^>o&i#E2g)Wt&NVF4c7O{I(Fuv6^+>iOX2Niwzy+)6&&_kyWU9XR@rur|$WtBKyN;K3o*zYoU zCD)Wh;eDT>FAeN-W)WfoSwbuB5$<&bM?0FQ-Lr6_Bni6g2jqP z^TR=&K4Yl}HzSjiX1hhg&vi}&nN7!kORBbRhjIL>T4;y|%p1!9xS%TFSO`fLrPY=#dcBWqE zL4pUFtKj#GUOYo_xyB1e%uM>7IdjFFTt0DWO5tCR5nrv0$UTdu+um7y#`RJ$K^sf! z+^^wpnX!cQ#rtnfRkPHzIu@9XeL3xT(#Xm3VI><_!2WpXp@x?TBmhw0u!vCrFu z(xGL;)VI661EeBvCPapQ9b!-p@Iv=Q&PP{u7ia0{=Uj)kaNgHjhXw7MkPyq)i#=2{ zve}`*R9RbDMMY*t4f`F?)IS$8W+wlJ7}C}@txmU*%B=0EZAryP ze~%{0s+1KK_kum%B=m4BoaFU_+n*^#UToPZ{MsXWDb4n4c|+S!z<+yhE-&RyGae{) z8&6ezD}gM+D&!%mEPO%Y>-*h<%_A>AKdHJ)f8fVmXCng<>M6Zz8jcr$D(23-!#bYg z=sS5R^M!N$o;9`4cLo8z>!L3|*VAHyplk^OKG_$=PI0-UNb67*MC5X=C@J~AisnX1 zA!yDP?e7`BOjyg=O;Z)w)I=cc(|^@{END3=5b+^1`RqT}Vp~N`wegYN9ZKz1%TCih z$O8BJRVKko{ar~u)K!3tRU|-^Rpc%3yvHAViB7aDVX8}~YHt?J1FLl`6#5TU`k$Ne zFlK?Co*p>PveVKc6@KkvdQrgj=XGrG%cIGoKsW zGxKeF`^4^#qMHsjStY5;sV9e17#|dVa%jd5%Lje`xVaEoH437m?XU4IHBFs{*~qy= zFbrr@nc>F5I?--*6sfJ%=dP36iP72~kq@HY!ftk7>_DYWM5J#SJ|0_}`iQ9^8^dZ!V zAl0)W183=L9*?B4{M@f`B-`r1=rkTEQ|#RpUwdEgd(kH0eo~PA4ZE0%w<%DUZmL$h z*?>Y58LZEthd9^nyRL|V)D&=eb!9elcgALGSqAui7ILLf3y~%gcp)4*w&77STyA6S z1w@!$%B4fsai6C<6$p9QA|>KJ26)1(GD@=3ccd*u@Rxgsh{N+{ctJKFozUw_v4zuq z12VA=wG$7(_d<8a^V-J3pfEnS{F)+U%U4X38E|nX$NMbOt=U4x_M3R+ zkRj2ld8YU12c>zE*cOzmT@h<%o+^sX2IvL9#2{OGVwyCU_Tbh!+Zo?tO#W{9fGlY* zufpkNa(XAByK%o&VrnPiigU={boV^{|DJ3uuv)DXtF<0;R70RJPZ*>Yg+|6PUAe4h ztoJwoi@r)s=KUe>dFnnm(7A@TpY2(u38%UMh>>?bqh=>=RxL0Y&P3L8jK+?sFlQ) zHZ2@(GZjw^HVrw|phWbvcuf=g*LS+_laIHyjqRV&O7!HM8o^uY)9Kw1^T_0H$#8>u zI0B?~UM=TYN9_ImXS)wce7F`FAm08Q7uTi?(313gW|Jk>aP-t>buBlxbW)n;a3yG8 z3#V#r9h6y{ChgG%c%MjI2=uK_-G*|@!L*ZBV zpJf(cLKpH5c~cwexL)nPn@3A#S9Qwx_;}}4U@=Ka96%;v<+?p>v(Gafa*Sn8;(Mow z$!{qrt$8w%#_H}nha~TN1!iDiU|MSM@$tFnU-vmSO6=dzn(@%T;`b77xIC~Ysmgqi zIxk4M*bN&ACRoRu!(PR)matFz_h-!3BS*0IEl76n{)ynXM zhJqqVlTkZ39p7PGL12LThm75Td5a89HG-f0@hm?l21f5em*g)s|(D2Qf(*t#B0$`T(EcLql>4|kI zYw^sLPbas%{fMs)$O2Wr*wFBDSS*2SJD;Yvam023+R4T?vLC-$?ukx!cKUZyU$Unv z_2sgbYV&Cv(1?}C$qc&zUAYtw$tiE(5a9CbL1)%rE&ls-i6;+c)#FvwEZ#rX9uq_p zbhF;S_B$0KQ@)0nkCO|dG)F`^`u*j&!{hI6aUlr7b{dhbb+3`i$5+0AnEM7crVF*? zXWO0%(N)JE)XA%u#0;j&%qJQCcYOIYQaOOS9EIxz%ECfggH0-s_K+(WR=kIim1BLJ z5N^W8-y^!3K_zer83ZUbE1L)jb`9JsDykFrOroh1nzfNnwopP z2<&;%k|P@@lM?=4*+FNXy+0?}?5UjDBG)Y^K2TDwa^79|H1AjGTCQ+ROPTXybUZ25 z9xMd^&~e;;W_7QVF+p}|&T$uWax2pXg2D_e&FAq(UMWXM#?wsxjBxVwBcA;jfCLk8 zCsNYS?p$%A2k$P|U7!kT(^#PsRq@6VoEI?LtLf>D3SM>nQhpQkw4Jme<@a92Z*u#L zfFOwv^o9S(OABgI)rR1D&3VG+!kO%&BLAnVI(CP;#O6HCG^p$wL4p55-GF`)1KGnv ziFHXs8ca!ax!hwX7+;S`ak&{>ZaX847kOn6_Ey|kSlXncx=N~~$fJLFkQCeP?fouI zBu%*wNo7ZU;i}Oo4+qE}&NDFUp`a0QlVZldY5vpJE?n5P4J(nxKt-Kd#+FqD#1C@o zzjhRpA2W5#VSWxS1Bt(K?e+=))-nn$p~X2bqV8w>KV~eijCyHt@l%mvQBhOGJm4P? z2G)7J;&hZZ$Ox>6jZu$KJJ39*3@})jnfJ%4{lE7z$4>*w4g;?f;bQr%loWMfAbPF$ zj95Nq{jhKcFk#r5S}ttW>RJQwX+AP$C0xol8 zDydyA4IGM9MPH0!>e{^X?J>f}<4|!7DQC1nDd^#4%%R>4Dw1c$qN{4avNxmKkX&51 zj7mbiAw;WJt*rXDdI&bpogPq202J8TWInAWP%UipUR#Wp1jUeZM?^&2{uFhY#HqeI zxl46P4#!~n*9)3Bxp1veXus(OTKbA-I&BDZtANB|8mJA%I~_PQSqN&}!93UA!HOTa zR8>?4qf$t;Yn`c#R=@IkL%xKeolgAv+JU_E@k*cm9&Rx|^!h-@G;~pL|}QmlV46t9$TLyT_gaEr4p1&In%n0r<`d}qK6u0eqx}I};B7Qi}o`uKAi~K@0*3wKA5Fje3b;vK1 zxQ36F7Y@4;IE_UO_jqS?6BV%icfpmsy16-7y_~n+a%9SOt<$g`KBog{`7{o%x~)-h z7+1o`1!YRud(sQ0@l@*0bY-Z@zkBz5xI&dfG)Kqgv-rK$^-xAz8v*F}De0oGkt&b3 zqy@qp&e#Q|P~P1id#iqym8Td~Q~!@}bP&Ke7s`=DU1A0yqI}5bqL6S*L%$1J90%g6 z9d^Zk0sTA?biC{pK_-Y%2h^K#a-+77XfzdXhd3&#e_^AoYl4Q&-1T9&#T*d7et6xVZs#?SN!<|0` z^QP>29yK*B$B_&Miegg0?2p$<`O0TD82R)Jt#aPp_y9>FGc`;p zEF66uBmdoEKPgl9S6M=FbHTiZxevSwKb|?h|Uqvqltf}t@i!SfQ%)&MYkNc#jln&wdx)1r)6P{ zYTol<)9M5e$YOx%4;>R%I;22rFqW*>t|<<`b#R9Jx$1{DWM~eTZe$|cxL{b_OA9M3&5M^;J2i)tR>pjYVb-xJAjrYH&E%F%WEXvk704Sx;C5M2&>!8o5+(j0D+8# zrLIjJz=@i`C5|1prYtjj@Q3@@o_bRq5HJM<^5uh>)qmY?&*s0od4-nUrd9{ReR^~o`X4<=@*YI*4=*Xf`G=-w1T78!J`Q2dHe9y1T;|QYn z{kuh;6A@9BTUAynE-`&Em+2qGa*%n3>{xKZ8M>ZX(P+gC({*J6AZ3 ziV~f{1!S4TJBcVg&ISe%L&Rsr5rlyIIU#?8CVeWGc^o{Ny&2_PC+O}UW)t+Kcrwij zb-@2%nLRSv;g501Dwaq*?`t*r`~<`Wqt!5HTHs#&Q+ba{KOef10Oi!)t@13$CT4MM z#2yAk0@1KTXE4Smhfeui&)H`Su&YuYpx0=!yIwHtEL4(aF$_8j z5+syHB2ysmp!ko$%$UISd_WXjbP}T7$RS6 zuUXUTs(`uZJqL90Y?Z}Annh~FscAZs(3Oq zfi}LZYA+yd8-MB_bgkuM>H4*NIO@4z1gFd*c`CuDa{yxq%lf(HS6SIlz_q6)^~1S1 zN}a;c4ym~8pC*Heb@Q2>%S)fO(Zmq%>CW?#P#GA@o1q&70IW)vqSc>D=;;U@wACY0MKszr*-TMJp?*&>+CP|=;SKx zLZ2m1-|=Nm!_t}x5Q?P(@$od^+)U%GL6QpeIt1|7$gyiRPECWU%jho6z#cpKegokQ zPB2C9KYhR?D_u+NKkVmaYU_7-?43X4jX8oj9X0ZTOGgUw8(Iw<%6>iVwW$+lz*9+G z69~L|O>O)Jq_8&T;mip+>n=6E8wsWlNUEq-wc^t-zh~|@A6gTQ#Z~R>|BLR1S$u8J z9!tw)UE(D~yOxQ>+1Rmm0MbOdz>5{Pt_@?*hD>4`?j(yV)wu(16q$m&o@RCGKh>qH zK(=D+=x8fbL)aM<+6QO}SFTqYe-#wO(9h+lK}UQ{%dC@|F(*k|GfVqig{EK&3H;Bu z@5cSN%*x6`<&Q!M1*VNbr z5Kz3E%yn~!qxs_Vt1BrQ$k1AizHmT41psxbH+_EX9sIr!u3{x!k==i7rAVB9N*G-g zEwx^VV9tMSA+$>)U?fd^fo_IhXoQGJ)pRy@1yQ4uT@qg9NPV?-n z^PAbEzHk4O=H>)zj9}*A)%pRqK|aV)i5=Q z(9oDEbX-|+x9t}Ug9$yb1k#m)W#8lGx_WM#pzqpyC$M%se!CE-+vL%(Tn9kc$ON8< zg9;uHPOMNgbAR&|Al(zHQnY@gAvn76_Sb2PWo$u+A?3%UaHthkT&f~_fYcADsdER! z74#Sth(EDC-ks(3GZ{xkRXIPAxm0F=U?ohPcs5P67pA<<5swm|XooamIZn;u{> zfVE-ufW_{@m=IBdEY1T+cizDU&1I9= zfF1rl!9-Q^OgmNN9U^BYqr<$Sk@oOFb1gIAEd;qqNK9(4(0phzUF7RQPIOwu?-CiO z&U1l(4-f|s`l(Gke@yo@K$)?dEB1E$p5oa}u9@&zbk-p0hjVmWP@9(XA|QyJbsAO< z#uz@RLq>~X0U9)_E&TL`eh2~{g2j?!ttu@w`&*{?-AvyYP=^8v5`(LMLKRX$e~p9W zR6q}0cpYr=bpF|Yb>m}GdV_K};4zW;C1s$%p zym06K0c3t>0X6N>jU^=^U*UYP@fNga>Z5^sn5}}Gl~}&T6eEMjX%!H7=3qDX!VQ!G z&2*<>^LtiS*7w(E7dG|7!&PM3b+%-op)~ksfU2sup>%g3S6gL}%tM4mxJ3dlhru-v zZA)0e57L)xV9Q3h+-fIUzGRyRa4~?WM7((Jo2G?PpVZixGtg&j{=0|Ofa+l5RDtJm z$xtv%O5jeY~4h1^M|=pMrfr$%K8$1t zda(k7Wb!h#k+b0JB?mV9jo4~{{vQzDV)MjR{|SO4x`iIEOI^)31S3<;wDDzu#+L#9k~9W0>O?9_JW^_ +#include #include #include #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" -#include "waypoint.pb.h" +#include "../string_helper.hpp" using namespace std; +namespace fs = std::filesystem; //////////////////////////////////////////////////////////////////////////////// // parse_image @@ -21,8 +22,19 @@ void xml_attribute_to_image( XMLReaderState* state, Image* value, bool* is_set) { - value->filename = get_attribute_value(input); - value->original_filepath = state->xml_filedir + "/" + value->filename; + Image image; + image.filename = get_attribute_value(input); + image.original_filepath = join_file_paths(state->xml_filedir, image.filename); + if (fs::exists(fs::path(image.original_filepath))) { + for (const string& path : state->all_output_dirs) { + fs::path output_path = fs::path(path) / image.filename; + if (!fs::exists(output_path)) { + fs::create_directories(output_path.parent_path()); + fs::copy_file(fs::path(image.original_filepath), output_path); + } + } + } + *value = image; *is_set = true; } @@ -48,9 +60,19 @@ void proto_to_image( ProtoReaderState* state, Image* value, bool* is_set) { - // TODO: this is broken until we load the string index into the proto read state Image image; - // image.path = input.path(); + image.filename = state->textures_index_to_texture_path[input]; + image.original_filepath = state->proto_filedir + "/" + image.filename; + if (fs::exists(fs::path(image.original_filepath))) { + for (const string& path : state->all_output_dirs) { + fs::path output_path = fs::path(path) / image.filename; + if (!fs::exists(output_path)) { + fs::create_directories(output_path.parent_path()); + fs::copy_file(fs::path(image.original_filepath), output_path); + } + } + } + *value = image; *is_set = true; } diff --git a/xml_converter/src/packaging_protobin.cpp b/xml_converter/src/packaging_protobin.cpp index 3d31b090..d2eea5ca 100644 --- a/xml_converter/src/packaging_protobin.cpp +++ b/xml_converter/src/packaging_protobin.cpp @@ -25,17 +25,16 @@ void parse_waypoint_categories( string full_category_name, ::waypoint::Category proto_category, map* marker_categories, - vector* parsed_pois) { + vector* parsed_pois, + ProtoReaderState* state) { full_category_name += proto_category.name(); Category* this_category = &(*marker_categories)[full_category_name]; - ProtoReaderState state; - - this_category->parse_protobuf(proto_category, &state); + this_category->parse_protobuf(proto_category, state); for (int i = 0; i < proto_category.icon_size(); i++) { Icon* icon = new Icon(); - icon->parse_protobuf(proto_category.icon(i), &state); + icon->parse_protobuf(proto_category.icon(i), state); // TODO: The field category in Icon is being deprciated // This overwrites any icon.category with its position in the heirarchy icon->category.category = full_category_name; @@ -43,7 +42,7 @@ void parse_waypoint_categories( } for (int i = 0; i < proto_category.trail_size(); i++) { Trail* trail = new Trail(); - trail->parse_protobuf(proto_category.trail(i), &state); + trail->parse_protobuf(proto_category.trail(i), state); // TODO: The field category in Trail is being deprciated // This overwrites any trail.category with its position in the heirarchy trail->category.category = full_category_name; @@ -51,21 +50,26 @@ void parse_waypoint_categories( } for (int i = 0; i < proto_category.children_size(); i++) { - parse_waypoint_categories(full_category_name + ".", proto_category.children(i), &(this_category->children), parsed_pois); + parse_waypoint_categories(full_category_name + ".", proto_category.children(i), &(this_category->children), parsed_pois, state); } } //////////////////////////////////////////////////////////////////////////////// // //////////////////////////////////////////////////////////////////////////////// -void read_protobuf_file(string proto_filepath, map* marker_categories, vector* parsed_pois) { +void read_protobuf_file(string proto_filepath, map* marker_categories, vector* parsed_pois, ProtoReaderState* state) { fstream infile; waypoint::Waypoint proto_message; infile.open(proto_filepath, ios::in | ios::binary); proto_message.ParseFromIstream(&infile); + + for (int i = 0; i < proto_message.textures_size(); i++) { + state->textures_index_to_texture_path[i] = proto_message.textures(i).filepath(); + } + for (int i = 0; i < proto_message.category_size(); i++) { - parse_waypoint_categories("", proto_message.category(i), marker_categories, parsed_pois); + parse_waypoint_categories("", proto_message.category(i), marker_categories, parsed_pois, state); } } diff --git a/xml_converter/src/packaging_protobin.hpp b/xml_converter/src/packaging_protobin.hpp index a62c02b7..e8cdb4f6 100644 --- a/xml_converter/src/packaging_protobin.hpp +++ b/xml_converter/src/packaging_protobin.hpp @@ -13,7 +13,8 @@ void read_protobuf_file( std::string proto_filepath, std::map* marker_categories, - std::vector* parsed_pois); + std::vector* parsed_pois, + ProtoReaderState* state); void write_protobuf_file( const std::string& proto_directory, diff --git a/xml_converter/src/packaging_xml.cpp b/xml_converter/src/packaging_xml.cpp index 5efc42ab..ed7a3b96 100644 --- a/xml_converter/src/packaging_xml.cpp +++ b/xml_converter/src/packaging_xml.cpp @@ -13,19 +13,14 @@ using namespace std; ////////////////////////////////// SERIALIZE /////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// -void parse_marker_categories(rapidxml::xml_node<>* node, map* marker_categories, vector* errors, string base_dir, int depth = 0) { +void parse_marker_categories(rapidxml::xml_node<>* node, map* marker_categories, vector* errors, XMLReaderState* state, int depth = 0) { if (get_node_name(node) == "MarkerCategory") { string name = lowercase(find_attribute_value(node, "name")); - XMLReaderState state = { - base_dir, - marker_categories, - }; - Category* this_category = &(*marker_categories)[name]; - this_category->init_from_xml(node, errors, &state); + this_category->init_from_xml(node, errors, state); for (rapidxml::xml_node<>* child_node = node->first_node(); child_node; child_node = child_node->next_sibling()) { - parse_marker_categories(child_node, &(this_category->children), errors, base_dir, depth + 1); + parse_marker_categories(child_node, &(this_category->children), errors, state, depth + 1); } } else { @@ -76,14 +71,9 @@ Category* get_category(rapidxml::xml_node<>* node, map* marker // // Parse the xml block into an in-memory array of Markers. //////////////////////////////////////////////////////////////////////////////// -vector parse_pois(rapidxml::xml_node<>* root_node, map* marker_categories, vector* errors, string base_dir) { +vector parse_pois(rapidxml::xml_node<>* root_node, map* marker_categories, vector* errors, XMLReaderState* state) { vector markers; - XMLReaderState state = { - base_dir, - marker_categories, - }; - for (rapidxml::xml_node<>* node = root_node->first_node(); node; node = node->next_sibling()) { if (get_node_name(node) == "POI") { Category* default_category = get_category(node, marker_categories, errors); @@ -94,7 +84,7 @@ vector parse_pois(rapidxml::xml_node<>* root_node, mapdefault_icon; } - icon->init_from_xml(node, errors, &state); + icon->init_from_xml(node, errors, state); markers.push_back(icon); } else if (get_node_name(node) == "Trail") { @@ -106,7 +96,7 @@ vector parse_pois(rapidxml::xml_node<>* root_node, mapdefault_trail; } - trail->init_from_xml(node, errors, &state); + trail->init_from_xml(node, errors, state); markers.push_back(trail); } else { @@ -121,7 +111,7 @@ vector parse_pois(rapidxml::xml_node<>* root_node, map* marker_categories, vector* parsed_pois) { +void parse_xml_file(string xml_filepath, map* marker_categories, vector* parsed_pois, XMLReaderState* state) { vector errors; rapidxml::xml_document<> doc; rapidxml::xml_node<>* root_node; @@ -130,7 +120,6 @@ void parse_xml_file(string xml_filepath, map* marker_categorie doc.parse(xml_file.data(), xml_filepath.c_str()); root_node = doc.first_node(); - string base_dir = get_base_dir(xml_filepath); // Validate the Root Node if (get_node_name(root_node) != "OverlayData") { errors.push_back(new XMLNodeNameError("Root node should be of type OverlayData", root_node)); @@ -141,10 +130,10 @@ void parse_xml_file(string xml_filepath, map* marker_categorie for (rapidxml::xml_node<>* node = root_node->first_node(); node; node = node->next_sibling()) { if (get_node_name(node) == "MarkerCategory") { - parse_marker_categories(node, marker_categories, &errors, base_dir); + parse_marker_categories(node, marker_categories, &errors, state); } else if (get_node_name(node) == "POIs") { - vector temp_vector = parse_pois(node, marker_categories, &errors, base_dir); + vector temp_vector = parse_pois(node, marker_categories, &errors, state); move(temp_vector.begin(), temp_vector.end(), back_inserter(*parsed_pois)); } else { diff --git a/xml_converter/src/packaging_xml.hpp b/xml_converter/src/packaging_xml.hpp index 791303c2..c8333e96 100644 --- a/xml_converter/src/packaging_xml.hpp +++ b/xml_converter/src/packaging_xml.hpp @@ -13,7 +13,8 @@ void parse_xml_file( std::string xml_filepath, std::map* marker_categories, - std::vector* parsed_pois); + std::vector* parsed_pois, + XMLReaderState* state); void write_xml_file( std::string xml_filepath, diff --git a/xml_converter/src/state_structs/proto_reader_state.hpp b/xml_converter/src/state_structs/proto_reader_state.hpp index 7573a489..c04db91b 100644 --- a/xml_converter/src/state_structs/proto_reader_state.hpp +++ b/xml_converter/src/state_structs/proto_reader_state.hpp @@ -1,4 +1,12 @@ #pragma once +#include +#include +#include + struct ProtoReaderState { + // A map from the index within "textures" to the texture path. + std::map textures_index_to_texture_path; + std::string proto_filedir; + std::vector all_output_dirs; }; diff --git a/xml_converter/src/state_structs/xml_reader_state.hpp b/xml_converter/src/state_structs/xml_reader_state.hpp index e60d12da..36a0677f 100644 --- a/xml_converter/src/state_structs/xml_reader_state.hpp +++ b/xml_converter/src/state_structs/xml_reader_state.hpp @@ -1,11 +1,11 @@ #pragma once -#include #include +#include class Category; struct XMLReaderState { std::string xml_filedir; - std::map* marker_categories; + std::vector all_output_dirs; }; diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index b1a54625..3a430c8f 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -90,33 +90,35 @@ void move_supplementary_files(string input_directory, string output_directory) { } } -void read_taco_directory(string input_path, map* marker_categories, vector* parsed_pois) { +void read_taco_directory(string input_path, map* marker_categories, vector* parsed_pois, XMLReaderState* state) { if (!filesystem::exists(input_path)) { cout << "Error: " << input_path << " is not an existing directory or file" << endl; } else if (filesystem::is_directory(input_path)) { vector xml_files = get_files_by_suffix(input_path, ".xml"); for (const string& path : xml_files) { - parse_xml_file(path, marker_categories, parsed_pois); + parse_xml_file(path, marker_categories, parsed_pois, state); } } else if (filesystem::is_regular_file(input_path)) { - parse_xml_file(input_path, marker_categories, parsed_pois); + state->xml_filedir = get_base_dir(input_path); + parse_xml_file(input_path, marker_categories, parsed_pois, state); } } -void read_burrito_directory(string input_path, map* marker_categories, vector* parsed_pois) { +void read_burrito_directory(string input_path, map* marker_categories, vector* parsed_pois, ProtoReaderState* state) { if (!filesystem::exists(input_path)) { cout << "Error: " << input_path << " is not an existing directory or file" << endl; } else if (filesystem::is_directory(input_path)) { vector burrito_files = get_files_by_suffix(input_path, ".bin"); for (const string& path : burrito_files) { - read_protobuf_file(path, marker_categories, parsed_pois); + read_protobuf_file(path, marker_categories, parsed_pois, state); } } else if (filesystem::is_regular_file(input_path)) { - read_protobuf_file(input_path, marker_categories, parsed_pois); + state->proto_filedir = get_base_dir(input_path); + read_protobuf_file(input_path, marker_categories, parsed_pois, state); } } @@ -152,28 +154,36 @@ void process_data( vector parsed_pois; map marker_categories; + vector all_output_paths; + if (output_split_waypoint_dir != "") { + all_output_paths.push_back(output_split_waypoint_dir); + } + if (output_taco_paths.size() != 0) { + for (size_t i = 0; i < output_taco_paths.size(); i++) { + all_output_paths.push_back(output_taco_paths[i]); + } + } + if (output_waypoint_paths.size() != 0) { + for (size_t i = 0; i < output_waypoint_paths.size(); i++) { + all_output_paths.push_back(output_waypoint_paths[i]); + } + } + // Read in all the xml taco markerpacks auto begin = chrono::high_resolution_clock::now(); for (size_t i = 0; i < input_taco_paths.size(); i++) { cout << "Loading taco pack " << input_taco_paths[i] << endl; + + XMLReaderState state = { + input_taco_paths[i], + all_output_paths, + }; + read_taco_directory( input_taco_paths[i], &marker_categories, - &parsed_pois); - - if (output_split_waypoint_dir != "") { - move_supplementary_files(input_taco_paths[i], output_split_waypoint_dir); - } - if (output_taco_paths.size() != 0) { - for (size_t j = 0; j < output_taco_paths.size(); j++) { - move_supplementary_files(input_taco_paths[i], output_taco_paths[j]); - } - } - if (output_waypoint_paths.size() != 0) { - for (size_t j = 0; j < output_waypoint_paths.size(); j++) { - move_supplementary_files(input_taco_paths[i], output_waypoint_paths[j]); - } - } + &parsed_pois, + &state); } auto end = chrono::high_resolution_clock::now(); auto dur = end - begin; @@ -183,24 +193,18 @@ void process_data( // Read in all the protobin waypoint markerpacks for (size_t i = 0; i < input_waypoint_paths.size(); i++) { cout << "Loading waypoint pack " << input_waypoint_paths[i] << endl; + + ProtoReaderState state = { + {}, + input_waypoint_paths[i], + all_output_paths, + }; + read_burrito_directory( input_waypoint_paths[i], &marker_categories, - &parsed_pois); - - if (output_split_waypoint_dir != "") { - move_supplementary_files(input_waypoint_paths[i], output_split_waypoint_dir); - } - if (output_taco_paths.size() != 0) { - for (size_t j = 0; j < output_taco_paths.size(); j++) { - move_supplementary_files(input_waypoint_paths[i], output_taco_paths[j]); - } - } - if (output_waypoint_paths.size() != 0) { - for (size_t j = 0; j < output_waypoint_paths.size(); j++) { - move_supplementary_files(input_waypoint_paths[i], output_waypoint_paths[j]); - } - } + &parsed_pois, + &state); } // Write all of the xml taco paths From 9c78165b7e66b040c051beb4686b1f408f697ef8 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Thu, 11 Jan 2024 23:07:57 -0500 Subject: [PATCH 411/539] removing erroneous file --- xml_converter/src/Imbiber.py | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 xml_converter/src/Imbiber.py diff --git a/xml_converter/src/Imbiber.py b/xml_converter/src/Imbiber.py deleted file mode 100644 index a229096a..00000000 --- a/xml_converter/src/Imbiber.py +++ /dev/null @@ -1,17 +0,0 @@ -import time -import pyautogui - -def simulate_5_press(): - pyautogui.press('5') - print("Pressed 5") - -if __name__ == "__main__": - # try: - # while True: - - # simulate_5_press() - # time.sleep(300) # 300 seconds = 5 minutes - # except KeyboardInterrupt: - # print("Script stopped.") - pyautogui.moveTo("Snowman_Tonic.png") - pyautogui.doubleClick() \ No newline at end of file From 56d937037153e510f847cc200a0e28771743369e Mon Sep 17 00:00:00 2001 From: klingbolt Date: Thu, 18 Jan 2024 23:30:46 -0500 Subject: [PATCH 412/539] Moved structs into the packaging files and changed the data format of the structs --- xml_converter/src/attribute/image.cpp | 26 +---- xml_converter/src/attribute/trail_data.cpp | 6 +- xml_converter/src/packaging_protobin.cpp | 51 ++++++--- xml_converter/src/packaging_protobin.hpp | 8 +- xml_converter/src/packaging_xml.cpp | 30 ++++- xml_converter/src/packaging_xml.hpp | 6 +- .../src/state_structs/proto_reader_state.hpp | 11 +- .../src/state_structs/proto_writer_state.hpp | 1 + .../src/state_structs/xml_reader_state.hpp | 4 +- .../src/state_structs/xml_writer_state.hpp | 8 +- xml_converter/src/xml_converter.cpp | 107 ++++++------------ 11 files changed, 121 insertions(+), 137 deletions(-) diff --git a/xml_converter/src/attribute/image.cpp b/xml_converter/src/attribute/image.cpp index d49402bf..63473b30 100644 --- a/xml_converter/src/attribute/image.cpp +++ b/xml_converter/src/attribute/image.cpp @@ -1,6 +1,5 @@ #include "image.hpp" -#include #include #include @@ -9,7 +8,6 @@ #include "../string_helper.hpp" using namespace std; -namespace fs = std::filesystem; //////////////////////////////////////////////////////////////////////////////// // parse_image @@ -25,15 +23,6 @@ void xml_attribute_to_image( Image image; image.filename = get_attribute_value(input); image.original_filepath = join_file_paths(state->xml_filedir, image.filename); - if (fs::exists(fs::path(image.original_filepath))) { - for (const string& path : state->all_output_dirs) { - fs::path output_path = fs::path(path) / image.filename; - if (!fs::exists(output_path)) { - fs::create_directories(output_path.parent_path()); - fs::copy_file(fs::path(image.original_filepath), output_path); - } - } - } *value = image; *is_set = true; } @@ -47,6 +36,7 @@ string image_to_xml_attribute( const string& attribute_name, XMLWriterState* state, const Image* value) { + state->textures.push_back(value); return " " + attribute_name + "=\"" + value->filename + "\""; } @@ -61,18 +51,8 @@ void proto_to_image( Image* value, bool* is_set) { Image image; - image.filename = state->textures_index_to_texture_path[input]; - image.original_filepath = state->proto_filedir + "/" + image.filename; - if (fs::exists(fs::path(image.original_filepath))) { - for (const string& path : state->all_output_dirs) { - fs::path output_path = fs::path(path) / image.filename; - if (!fs::exists(output_path)) { - fs::create_directories(output_path.parent_path()); - fs::copy_file(fs::path(image.original_filepath), output_path); - } - } - } - + image.filename = state->textures[input].filepath(); + image.original_filepath = join_file_paths(state->proto_filedir, image.filename); *value = image; *is_set = true; } diff --git a/xml_converter/src/attribute/trail_data.cpp b/xml_converter/src/attribute/trail_data.cpp index b3f19690..ed0ac530 100644 --- a/xml_converter/src/attribute/trail_data.cpp +++ b/xml_converter/src/attribute/trail_data.cpp @@ -32,7 +32,7 @@ void xml_attribute_to_trail_data( bool* is_map_id_set) { TrailData trail_data; string trail_data_relative_path = get_attribute_value(input); - if (state->xml_filedir == "") { + if (string(state->xml_filedir) == "") { throw "Error: Marker pack base directory is an empty string"; } if (trail_data_relative_path == "") { @@ -41,7 +41,7 @@ void xml_attribute_to_trail_data( } ifstream trail_data_file; - string trail_path = state->xml_filedir + "/" + trail_data_relative_path; + string trail_path = string(state->xml_filedir) + "/" + trail_data_relative_path; trail_data_file.open(trail_path, ios::in | ios::binary); if (!trail_data_file.good()) { errors->push_back(new XMLAttributeValueError("No trail file found at " + trail_path, input)); @@ -132,7 +132,7 @@ string trail_data_to_xml_attribute( } string trail_file_name = long_to_hex_string(djb2_hash(byte_array, byte_array_size)) + ".trl"; - string trail_file_path = join_file_paths(state->filedir, trail_file_name); + string trail_file_path = join_file_paths(state->xml_filedir, trail_file_name); ofstream trail_data_file(trail_file_path, ios::binary); diff --git a/xml_converter/src/packaging_protobin.cpp b/xml_converter/src/packaging_protobin.cpp index d2eea5ca..5ce733c7 100644 --- a/xml_converter/src/packaging_protobin.cpp +++ b/xml_converter/src/packaging_protobin.cpp @@ -1,5 +1,6 @@ #include "packaging_protobin.hpp" +#include #include #include #include @@ -8,11 +9,13 @@ #include "category_gen.hpp" #include "parseable.hpp" +#include "state_structs/proto_writer_state.hpp" #include "string_helper.hpp" #include "string_hierarchy.hpp" #include "waypoint.pb.h" using namespace std; +namespace fs = std::filesystem; //////////////////////////////////////////////////////////////////////////////// ////////////////////////////////// SERIALIZE /////////////////////////////////// @@ -57,19 +60,19 @@ void parse_waypoint_categories( //////////////////////////////////////////////////////////////////////////////// // //////////////////////////////////////////////////////////////////////////////// -void read_protobuf_file(string proto_filepath, map* marker_categories, vector* parsed_pois, ProtoReaderState* state) { +void read_protobuf_file(string proto_filepath, const string proto_filedir, map* marker_categories, vector* parsed_pois) { fstream infile; waypoint::Waypoint proto_message; + ProtoReaderState state; + state.proto_filedir = proto_filedir.c_str(); infile.open(proto_filepath, ios::in | ios::binary); proto_message.ParseFromIstream(&infile); - for (int i = 0; i < proto_message.textures_size(); i++) { - state->textures_index_to_texture_path[i] = proto_message.textures(i).filepath(); - } + state.textures = proto_message.textures(); for (int i = 0; i < proto_message.category_size(); i++) { - parse_waypoint_categories("", proto_message.category(i), marker_categories, parsed_pois, state); + parse_waypoint_categories("", proto_message.category(i), marker_categories, parsed_pois, &state); } } @@ -158,7 +161,16 @@ void proto_post_processing(ProtoWriterState* state, waypoint::Waypoint* proto) { for (size_t i = 1; i < state->textures.size(); i++) { waypoint::TextureData* texture_data = proto->add_textures(); - texture_data->set_filepath(state->textures[i]->filename); + const Image* image = state->textures[i]; + texture_data->set_filepath(image->filename); + if (fs::exists(fs::path(state->textures[i]->original_filepath))) { + fs::path output_path = fs::path(state->proto_filedir) / image->filename; + fs::create_directories(output_path.parent_path()); + fs::copy_file(fs::path(image->original_filepath), output_path, fs::copy_options::update_existing); + } + else { + cout << "Warning: File path " << state->textures[i]->original_filepath << " not found." << endl; + } } } } @@ -167,12 +179,11 @@ void _write_protobuf_file( const string& filepath, const StringHierarchy& category_filter, const map* marker_categories, - const std::map>& category_to_pois) { + const std::map>& category_to_pois, + ProtoWriterState* state) { ofstream outfile; outfile.open(filepath, ios::out | ios::binary); - ProtoWriterState state; - if (!outfile.is_open()) { cout << "Unable to open " << filepath << endl; } @@ -189,25 +200,27 @@ void _write_protobuf_file( category_filter, category_to_pois, &category_vector, - &state); + state); if (maybe_category.is_category) { output_message.add_category()->MergeFrom(maybe_category.category); } } - proto_post_processing(&state, &output_message); + proto_post_processing(state, &output_message); output_message.SerializeToOstream(&outfile); outfile.close(); } void write_protobuf_file( - const string& filepath, + const string proto_filedir, const StringHierarchy& category_filter, const map* marker_categories, const vector* parsed_pois) { std::map> category_to_pois; + ProtoWriterState state; + state.proto_filedir = proto_filedir.c_str(); for (size_t i = 0; i < parsed_pois->size(); i++) { Parseable* parsed_poi = (*parsed_pois)[i]; @@ -225,19 +238,22 @@ void write_protobuf_file( } _write_protobuf_file( - join_file_paths(filepath, "markers.bin"), + join_file_paths(state.proto_filedir, "markers.bin"), category_filter, marker_categories, - category_to_pois); + category_to_pois, + &state); } // Write protobuf per map id void write_protobuf_file_per_map_id( - const string& proto_directory, + const string proto_filedir, const StringHierarchy& category_filter, const map* marker_categories, const vector* parsed_pois) { std::map>> mapid_to_category_to_pois; + ProtoWriterState state; + state.proto_filedir = proto_filedir.c_str(); for (size_t i = 0; i < parsed_pois->size(); i++) { Parseable* parsed_poi = (*parsed_pois)[i]; @@ -255,12 +271,13 @@ void write_protobuf_file_per_map_id( } for (auto iterator = mapid_to_category_to_pois.begin(); iterator != mapid_to_category_to_pois.end(); iterator++) { - string output_filepath = join_file_paths(proto_directory, to_string(iterator->first) + ".bin"); + string output_filepath = join_file_paths(state.proto_filedir, to_string(iterator->first) + ".bin"); _write_protobuf_file( output_filepath, category_filter, marker_categories, - iterator->second); + iterator->second, + &state); } } diff --git a/xml_converter/src/packaging_protobin.hpp b/xml_converter/src/packaging_protobin.hpp index e8cdb4f6..f4a7cca7 100644 --- a/xml_converter/src/packaging_protobin.hpp +++ b/xml_converter/src/packaging_protobin.hpp @@ -12,18 +12,18 @@ void read_protobuf_file( std::string proto_filepath, + const std::string proto_filedir, std::map* marker_categories, - std::vector* parsed_pois, - ProtoReaderState* state); + std::vector* parsed_pois); void write_protobuf_file( - const std::string& proto_directory, + const std::string proto_filedir, const StringHierarchy& category_filter, const std::map* marker_categories, const std::vector* parsed_pois); void write_protobuf_file_per_map_id( - const std::string& proto_directory, + const std::string proto_filedir, const StringHierarchy& category_filter, const std::map* marker_categories, const std::vector* parsed_pois); diff --git a/xml_converter/src/packaging_xml.cpp b/xml_converter/src/packaging_xml.cpp index ed7a3b96..d41471dd 100644 --- a/xml_converter/src/packaging_xml.cpp +++ b/xml_converter/src/packaging_xml.cpp @@ -1,13 +1,16 @@ #include "packaging_xml.hpp" +#include #include #include "rapid_helpers.hpp" #include "rapidxml-1.13/rapidxml.hpp" #include "rapidxml-1.13/rapidxml_utils.hpp" +#include "state_structs/xml_reader_state.hpp" #include "string_helper.hpp" using namespace std; +namespace fs = std::filesystem; //////////////////////////////////////////////////////////////////////////////// ////////////////////////////////// SERIALIZE /////////////////////////////////// @@ -111,10 +114,12 @@ vector parse_pois(rapidxml::xml_node<>* root_node, map* marker_categories, vector* parsed_pois, XMLReaderState* state) { +void parse_xml_file(std::string xml_filepath, const std::string xml_filedir, map* marker_categories, vector* parsed_pois) { vector errors; rapidxml::xml_document<> doc; rapidxml::xml_node<>* root_node; + XMLReaderState state; + state.xml_filedir = xml_filedir.c_str(); rapidxml::file<> xml_file(xml_filepath.c_str()); doc.parse(xml_file.data(), xml_filepath.c_str()); @@ -130,10 +135,10 @@ void parse_xml_file(string xml_filepath, map* marker_categorie for (rapidxml::xml_node<>* node = root_node->first_node(); node; node = node->next_sibling()) { if (get_node_name(node) == "MarkerCategory") { - parse_marker_categories(node, marker_categories, &errors, state); + parse_marker_categories(node, marker_categories, &errors, &state); } else if (get_node_name(node) == "POIs") { - vector temp_vector = parse_pois(node, marker_categories, &errors, state); + vector temp_vector = parse_pois(node, marker_categories, &errors, &state); move(temp_vector.begin(), temp_vector.end(), back_inserter(*parsed_pois)); } else { @@ -149,14 +154,26 @@ void parse_xml_file(string xml_filepath, map* marker_categorie //////////////////////////////////////////////////////////////////////////////// ///////////////////////////////// DESERIALIZE ////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// +void xml_post_processing(XMLWriterState* state) { + if (state->textures.size() > 1) { + for (size_t i = 1; i < state->textures.size(); i++) { + const Image* image = state->textures[i]; + if (fs::exists(fs::path(state->textures[i]->original_filepath))) { + fs::path output_path = fs::path(state->xml_filedir) / image->filename; + fs::create_directories(output_path.parent_path()); + fs::copy_file(fs::path(image->original_filepath), output_path, fs::copy_options::update_existing); + } + } + } +} -void write_xml_file(string xml_filepath, map* marker_categories, vector* parsed_pois) { +void write_xml_file(const string xml_filedir, map* marker_categories, vector* parsed_pois) { ofstream outfile; string tab_string; - XMLWriterState state; - state.filedir = get_base_dir(xml_filepath); + state.xml_filedir = xml_filedir.c_str(); + string xml_filepath = join_file_paths(xml_filedir, "xml_file.xml"); outfile.open(xml_filepath, ios::out); outfile << "\n"; @@ -178,5 +195,6 @@ void write_xml_file(string xml_filepath, map* marker_categorie } outfile << "\n\n"; + xml_post_processing(&state); outfile.close(); } diff --git a/xml_converter/src/packaging_xml.hpp b/xml_converter/src/packaging_xml.hpp index c8333e96..d22fd46d 100644 --- a/xml_converter/src/packaging_xml.hpp +++ b/xml_converter/src/packaging_xml.hpp @@ -12,11 +12,11 @@ void parse_xml_file( std::string xml_filepath, + const std::string xml_filedir, std::map* marker_categories, - std::vector* parsed_pois, - XMLReaderState* state); + std::vector* parsed_pois); void write_xml_file( - std::string xml_filepath, + const std::string xml_filedir, std::map* marker_categories, std::vector* parsed_pois); diff --git a/xml_converter/src/state_structs/proto_reader_state.hpp b/xml_converter/src/state_structs/proto_reader_state.hpp index c04db91b..04f8cbf5 100644 --- a/xml_converter/src/state_structs/proto_reader_state.hpp +++ b/xml_converter/src/state_structs/proto_reader_state.hpp @@ -1,12 +1,11 @@ #pragma once -#include #include -#include + +#include "waypoint.pb.h" struct ProtoReaderState { - // A map from the index within "textures" to the texture path. - std::map textures_index_to_texture_path; - std::string proto_filedir; - std::vector all_output_dirs; + // A list of all of the textures with their paths. + google::protobuf::RepeatedPtrField<::waypoint::TextureData> textures; + const char* proto_filedir; }; diff --git a/xml_converter/src/state_structs/proto_writer_state.hpp b/xml_converter/src/state_structs/proto_writer_state.hpp index d7817037..a12c74e5 100644 --- a/xml_converter/src/state_structs/proto_writer_state.hpp +++ b/xml_converter/src/state_structs/proto_writer_state.hpp @@ -8,6 +8,7 @@ class Image; class ProtoWriterState { public: + const char* proto_filedir; // A map from texture path to the index within "textures" that the path is saved in. std::map texture_path_to_textures_index; diff --git a/xml_converter/src/state_structs/xml_reader_state.hpp b/xml_converter/src/state_structs/xml_reader_state.hpp index 36a0677f..3060cd09 100644 --- a/xml_converter/src/state_structs/xml_reader_state.hpp +++ b/xml_converter/src/state_structs/xml_reader_state.hpp @@ -1,11 +1,9 @@ #pragma once #include -#include class Category; struct XMLReaderState { - std::string xml_filedir; - std::vector all_output_dirs; + const char* xml_filedir; }; diff --git a/xml_converter/src/state_structs/xml_writer_state.hpp b/xml_converter/src/state_structs/xml_writer_state.hpp index b1d4c67b..c2ff620e 100644 --- a/xml_converter/src/state_structs/xml_writer_state.hpp +++ b/xml_converter/src/state_structs/xml_writer_state.hpp @@ -1,7 +1,13 @@ #pragma once #include +#include + +class Image; struct XMLWriterState { - std::string filedir; + const char* xml_filedir; + + // A list of all of the textures with their paths. + std::vector textures; }; diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 3a430c8f..348a4577 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -62,74 +62,69 @@ vector get_files_by_suffix(string directory, string suffix) { return files; } -void move_supplementary_files(string input_directory, string output_directory) { - DIR* dir = opendir(input_directory.c_str()); - struct dirent* entry; - while ((entry = readdir(dir)) != NULL) { - string filename = entry->d_name; - if (filename != "." && filename != "..") { - string path = join_file_paths(input_directory, filename); - if (entry->d_type == DT_DIR) { - string new_directory = join_file_paths(output_directory, filename); - if (mkdir(new_directory.c_str(), 0700) == -1 && errno != EEXIST) { - cout << "Error making " << new_directory << endl; - continue; - } - move_supplementary_files(path, new_directory); - } - else if (has_suffix(filename, ".trl") || has_suffix(filename, ".xml") || has_suffix(filename, ".bin")) { - continue; - } - else { - // TODO: Only include files that are referenced by the - // individual markers in order to avoid any unnessecary files - string new_path = join_file_paths(output_directory, filename); - copy_file(path, new_path); - } - } - } -} - -void read_taco_directory(string input_path, map* marker_categories, vector* parsed_pois, XMLReaderState* state) { +void read_taco_directory( + string input_path, + map* marker_categories, + vector* parsed_pois) { if (!filesystem::exists(input_path)) { cout << "Error: " << input_path << " is not an existing directory or file" << endl; } else if (filesystem::is_directory(input_path)) { vector xml_files = get_files_by_suffix(input_path, ".xml"); for (const string& path : xml_files) { - parse_xml_file(path, marker_categories, parsed_pois, state); + parse_xml_file(path, input_path, marker_categories, parsed_pois); } } else if (filesystem::is_regular_file(input_path)) { - state->xml_filedir = get_base_dir(input_path); - parse_xml_file(input_path, marker_categories, parsed_pois, state); + parse_xml_file(input_path, get_base_dir(input_path), marker_categories, parsed_pois); } } -void read_burrito_directory(string input_path, map* marker_categories, vector* parsed_pois, ProtoReaderState* state) { +void read_burrito_directory( + string input_path, + map* marker_categories, + vector* parsed_pois) { if (!filesystem::exists(input_path)) { cout << "Error: " << input_path << " is not an existing directory or file" << endl; } else if (filesystem::is_directory(input_path)) { vector burrito_files = get_files_by_suffix(input_path, ".bin"); for (const string& path : burrito_files) { - read_protobuf_file(path, marker_categories, parsed_pois, state); + read_protobuf_file(path, input_path, marker_categories, parsed_pois); } } else if (filesystem::is_regular_file(input_path)) { - state->proto_filedir = get_base_dir(input_path); - read_protobuf_file(input_path, marker_categories, parsed_pois, state); + read_protobuf_file(input_path, get_base_dir(input_path), marker_categories, parsed_pois); } } -void write_taco_directory(string output_path, map* marker_categories, vector* parsed_pois) { +void write_taco_directory( + string output_path, + map* marker_categories, + vector* parsed_pois) { // TODO: Exportion of XML Marker Packs File Structure #111 if (!filesystem::is_directory(output_path)) { if (!filesystem::create_directory(output_path)) { cout << "Error: " << output_path << "is not a valid directory path" << endl; } + return; } - write_xml_file(join_file_paths(output_path, "xml_file.xml"), marker_categories, parsed_pois); + write_xml_file(output_path, marker_categories, parsed_pois); +} + +void write_burrito_directory( + string output_path, + map* marker_categories, + vector* parsed_pois) { + if (!filesystem::is_directory(output_path)) { + if (!filesystem::create_directory(output_path)) { + cout << "Error: " << output_path << "is not a valid directory path" << endl; + return; + } + } + StringHierarchy category_filter; + category_filter.add_path({}, true); + write_protobuf_file(output_path, category_filter, marker_categories, parsed_pois); } //////////////////////////////////////////////////////////////////////////////// @@ -154,36 +149,15 @@ void process_data( vector parsed_pois; map marker_categories; - vector all_output_paths; - if (output_split_waypoint_dir != "") { - all_output_paths.push_back(output_split_waypoint_dir); - } - if (output_taco_paths.size() != 0) { - for (size_t i = 0; i < output_taco_paths.size(); i++) { - all_output_paths.push_back(output_taco_paths[i]); - } - } - if (output_waypoint_paths.size() != 0) { - for (size_t i = 0; i < output_waypoint_paths.size(); i++) { - all_output_paths.push_back(output_waypoint_paths[i]); - } - } - // Read in all the xml taco markerpacks auto begin = chrono::high_resolution_clock::now(); for (size_t i = 0; i < input_taco_paths.size(); i++) { cout << "Loading taco pack " << input_taco_paths[i] << endl; - XMLReaderState state = { - input_taco_paths[i], - all_output_paths, - }; - read_taco_directory( input_taco_paths[i], &marker_categories, - &parsed_pois, - &state); + &parsed_pois); } auto end = chrono::high_resolution_clock::now(); auto dur = end - begin; @@ -194,17 +168,10 @@ void process_data( for (size_t i = 0; i < input_waypoint_paths.size(); i++) { cout << "Loading waypoint pack " << input_waypoint_paths[i] << endl; - ProtoReaderState state = { - {}, - input_waypoint_paths[i], - all_output_paths, - }; - read_burrito_directory( input_waypoint_paths[i], &marker_categories, - &parsed_pois, - &state); + &parsed_pois); } // Write all of the xml taco paths @@ -219,9 +186,7 @@ void process_data( // Write all of the protobin waypoint paths for (size_t i = 0; i < output_waypoint_paths.size(); i++) { - StringHierarchy category_filter; - category_filter.add_path({}, true); - write_protobuf_file(output_waypoint_paths[i], category_filter, &marker_categories, &parsed_pois); + write_burrito_directory(output_waypoint_paths[i], &marker_categories, &parsed_pois); } // Write the special map-split protbin waypoint file From f895ed4c391aa796cefad670cfc9fd44bc3974f0 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sat, 20 Jan 2024 06:42:57 -0600 Subject: [PATCH 413/539] fixing a segault that occurs if a category does not have a "name" attribute --- .../category_name_invalid/input/pack/xml_file.xml | 4 ++++ .../category_name_invalid/output_proto/markers.bin | 0 .../category_name_invalid/output_xml/xml_file.xml | 10 ++++++++++ .../test_cases/category_name_invalid/testcase.yaml | 13 +++++++++++++ xml_converter/src/packaging_xml.cpp | 12 ++++++++++++ xml_converter/src/rapid_helpers.cpp | 14 +++++++++++++- 6 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 xml_converter/integration_tests/test_cases/category_name_invalid/input/pack/xml_file.xml create mode 100644 xml_converter/integration_tests/test_cases/category_name_invalid/output_proto/markers.bin create mode 100644 xml_converter/integration_tests/test_cases/category_name_invalid/output_xml/xml_file.xml create mode 100644 xml_converter/integration_tests/test_cases/category_name_invalid/testcase.yaml diff --git a/xml_converter/integration_tests/test_cases/category_name_invalid/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/category_name_invalid/input/pack/xml_file.xml new file mode 100644 index 00000000..7ae0a3fb --- /dev/null +++ b/xml_converter/integration_tests/test_cases/category_name_invalid/input/pack/xml_file.xml @@ -0,0 +1,4 @@ + + + + diff --git a/xml_converter/integration_tests/test_cases/category_name_invalid/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/category_name_invalid/output_proto/markers.bin new file mode 100644 index 00000000..e69de29b diff --git a/xml_converter/integration_tests/test_cases/category_name_invalid/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/category_name_invalid/output_xml/xml_file.xml new file mode 100644 index 00000000..d6de0503 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/category_name_invalid/output_xml/xml_file.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/xml_converter/integration_tests/test_cases/category_name_invalid/testcase.yaml b/xml_converter/integration_tests/test_cases/category_name_invalid/testcase.yaml new file mode 100644 index 00000000..3ca733b5 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/category_name_invalid/testcase.yaml @@ -0,0 +1,13 @@ +input_paths: + "pack": "xml" +expected_stdout: | + Error: Category attribute 'name' is missing or is an empty string when it should be a non-empty string + test_cases/category_name_invalid/input/pack/xml_file.xml + 2 | + | ^^^^^^^^^^^^^^ + Error: Category attribute 'name' is missing or is an empty string when it should be a non-empty string + test_cases/category_name_invalid/input/pack/xml_file.xml + 3 | + | ^^^^^^^^^^^^^^ +expected_stderr: | +expected_returncode: 0 diff --git a/xml_converter/src/packaging_xml.cpp b/xml_converter/src/packaging_xml.cpp index 5efc42ab..44779ebd 100644 --- a/xml_converter/src/packaging_xml.cpp +++ b/xml_converter/src/packaging_xml.cpp @@ -13,8 +13,14 @@ using namespace std; ////////////////////////////////// SERIALIZE /////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// +unsigned int UNKNOWN_CATEGORY_COUNTER = 0; void parse_marker_categories(rapidxml::xml_node<>* node, map* marker_categories, vector* errors, string base_dir, int depth = 0) { if (get_node_name(node) == "MarkerCategory") { + // TODO: Eventually this process should be removed. Instead we should be + // grabbing the name during the parsing of all the atrributes to + // avoid doing a secondary search through the attributes, and then + // we should have a method of applying the parsed node on top of + // its hirearchy probably using the is_set flags. string name = lowercase(find_attribute_value(node, "name")); XMLReaderState state = { @@ -22,6 +28,12 @@ void parse_marker_categories(rapidxml::xml_node<>* node, map* marker_categories, }; + if (name == "") { + errors->push_back(new XMLNodeNameError("Category attribute 'name' is missing or is an empty string when it should be a non-empty string", node)); + name = "UNKNOWN_CATEGORY_" + to_string(UNKNOWN_CATEGORY_COUNTER); + UNKNOWN_CATEGORY_COUNTER++; + } + Category* this_category = &(*marker_categories)[name]; this_category->init_from_xml(node, errors, &state); for (rapidxml::xml_node<>* child_node = node->first_node(); child_node; child_node = child_node->next_sibling()) { diff --git a/xml_converter/src/rapid_helpers.cpp b/xml_converter/src/rapid_helpers.cpp index 21d42b98..3b7c313c 100644 --- a/xml_converter/src/rapid_helpers.cpp +++ b/xml_converter/src/rapid_helpers.cpp @@ -9,8 +9,20 @@ using namespace std; +//////////////////////////////////////////////////////////////////////////////// +// find_attribute_value (depricated) +// +// This function does a linear search over an xml node to try and find an +// attribute with the specified name. It the attribute is not found then an +// empty string is returned. +// +// This function is depricated and should not be used by any new code. +//////////////////////////////////////////////////////////////////////////////// string find_attribute_value(rapidxml::xml_node<>* node, string attribute_name) { - auto attribute = node->first_attribute(attribute_name.data(), attribute_name.size(), false); + rapidxml::xml_attribute* attribute = node->first_attribute(attribute_name.data(), attribute_name.size(), false); + if (attribute == nullptr) { + return ""; + } return string(attribute->value(), attribute->value_size()); } From cdb4e5a99c85c2519206c47254f2ef11d04b708a Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sat, 20 Jan 2024 12:14:15 -0500 Subject: [PATCH 414/539] Changed name of file that will hold all functions for loading and saving files. Deleted obsolete JSON code --- PackDialog.gd => FileHandler.gd | 2 ++ Spatial.gd | 43 +++++++++------------------------ Spatial.tscn | 4 +-- 3 files changed, 15 insertions(+), 34 deletions(-) rename PackDialog.gd => FileHandler.gd (97%) diff --git a/PackDialog.gd b/FileHandler.gd similarity index 97% rename from PackDialog.gd rename to FileHandler.gd index 10b86f2e..947445bc 100644 --- a/PackDialog.gd +++ b/FileHandler.gd @@ -1,5 +1,7 @@ extends Control +const Waypoint = preload("res://waypoint.gd") + const executable_path: String = "./xml_converter/build/xml_converter" var protobin_data_folder: String var split_protobin_data_folder: String diff --git a/Spatial.gd b/Spatial.gd index 63d186b3..88c00485 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -51,9 +51,14 @@ const category3d_scene = preload("res://Category3D.tscn") const category2d_scene = preload("res://Category2D.tscn") const path2d_scene = preload("res://Route2D.tscn") const gizmo_scene = preload("res://Gizmo/PointEdit.tscn") + +# Scripts containing code used by this scene const CategoryData = preload("res://CategoryData.gd") const Waypoint = preload("res://waypoint.gd") -const PackDialog = preload("res://PackDialog.gd") +const FileHandler = preload("res://FileHandler.gd") + +# Instancing scripts +var file_handler: FileHandler = FileHandler.new() ##########Node Connections########### onready var markers_ui := $Control/Dialogs/CategoriesDialog/MarkersUI as Tree @@ -80,6 +85,9 @@ func _ready(): OS.set_window_position(Vector2(0,0)) set_minimal_mouse_block() + # Call ready for additional scripts + self.file_handler._ready() + server.listen(4242) if (Settings.burrito_link_auto_launch_enabled): @@ -632,32 +640,6 @@ func gen_new_icon(position: Vector3, texture_path: String, waypoint_icon, catego var category_data = category_item.get_metadata(0) category_data.category3d.add_icon(new_icon) -# This function take all of the currently rendered objects and converts it into -# the data format that is saved/loaded from. -func data_from_renderview(): - var icons_data = [] - var paths_data = [] - - for icon in $Icons.get_children(): - icons_data.append({ - "position": [icon.translation.x, icon.translation.y, -icon.translation.z], - "texture": icon.texture_path - }) - - for path in $Paths.get_children(): - #print(path) - var points = [] - for point in range(path.get_point_count()): - var point_position:Vector3 = path.get_point_position(point) - points.append([point_position.x, point_position.y, -point_position.z]) - paths_data.append({ - "points": points, - "texture": path.texture_path - }) - - var data_out = {"icons": icons_data, "paths": paths_data} - return data_out - ################################################################################ # Adjustment and gizmo functions ################################################################################ @@ -822,16 +804,13 @@ func _on_NewPathPoint_pressed(): # ################################################################################ func _on_SavePath_pressed(): - $Control/Dialogs/SaveDialog.show() + pass ################################################################################ # TODO: This function will be used when exporting packs ################################################################################ func _on_SaveDialog_file_selected(path): - self.markerdata[str(self.map_id)] = data_from_renderview() - var save_game = File.new() - save_game.open(path, File.WRITE) - save_game.store_string(JSON.print(self.markerdata)) + pass func _on_NodeEditorDialog_hide(): self.currently_selected_node = null diff --git a/Spatial.tscn b/Spatial.tscn index a220578a..96ff7495 100644 --- a/Spatial.tscn +++ b/Spatial.tscn @@ -3,6 +3,7 @@ [ext_resource path="res://Spatial.gd" type="Script" id=1] [ext_resource path="res://shaders/range_indicators.shader" type="Shader" id=2] [ext_resource path="res://burrito.png" type="Texture" id=3] +[ext_resource path="res://FileHandler.gd" type="Script" id=4] [ext_resource path="res://icon_close.png" type="Texture" id=5] [ext_resource path="res://RangeDialog.gd" type="Script" id=6] [ext_resource path="res://icon_new_icon.png" type="Texture" id=7] @@ -12,7 +13,6 @@ [ext_resource path="res://icon_new_point.png" type="Texture" id=11] [ext_resource path="res://SettingsDialog.gd" type="Script" id=12] [ext_resource path="res://Category3D.gd" type="Script" id=13] -[ext_resource path="res://PackDialog.gd" type="Script" id=14] [ext_resource path="res://Category2D.gd" type="Script" id=15] [sub_resource type="Shader" id=1] @@ -193,7 +193,7 @@ mode = 2 access = 2 current_dir = "" current_path = "" -script = ExtResource( 14 ) +script = ExtResource( 4 ) __meta__ = { "_edit_use_anchors_": false } From 629d3eedffc4d90b75ae3d19572ab712267ecdde Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sat, 20 Jan 2024 12:16:00 -0500 Subject: [PATCH 415/539] Removed extra lines --- FileHandler.gd | 2 -- 1 file changed, 2 deletions(-) diff --git a/FileHandler.gd b/FileHandler.gd index 947445bc..10b86f2e 100644 --- a/FileHandler.gd +++ b/FileHandler.gd @@ -1,7 +1,5 @@ extends Control -const Waypoint = preload("res://waypoint.gd") - const executable_path: String = "./xml_converter/build/xml_converter" var protobin_data_folder: String var split_protobin_data_folder: String From e1187d5c6ea4602566cd2c61bbc1e0e5ed8526a8 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sun, 21 Jan 2024 08:37:17 -0600 Subject: [PATCH 416/539] adding a method to overlay the parseable classes on top of themselves This allows us to parse a node it its entirety before trying to read any of its attributes to determine what default values it should have. --- .../cpp_templates/class_template.cpp | 46 ++ .../cpp_templates/class_template.hpp | 2 + .../category_name_invalid/testcase.yaml | 4 +- xml_converter/src/category_gen.cpp | 66 +++ xml_converter/src/category_gen.hpp | 2 + xml_converter/src/icon_gen.cpp | 398 ++++++++++++++++++ xml_converter/src/icon_gen.hpp | 2 + xml_converter/src/packaging_xml.cpp | 32 +- xml_converter/src/trail_gen.cpp | 238 +++++++++++ xml_converter/src/trail_gen.hpp | 2 + 10 files changed, 778 insertions(+), 14 deletions(-) diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index e8ee4109..a9451c85 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -120,3 +120,49 @@ void {{cpp_class}}::parse_protobuf(waypoint::{{cpp_class}} proto_{{cpp_class_hea {% endif %} {% endfor %} } + + +//////////////////////////////////////////////////////////////////////////////// +// apply_underlay +// +// Transforms this {{cpp_class}} as if this class was overlayed on top of the +// underlay argument. +//////////////////////////////////////////////////////////////////////////////// +void {{cpp_class}}::apply_underlay(const {{cpp_class}}& underlay) { + {% for attribute_variable in attribute_variables %} + {% if attribute_variable.is_component == false %} + if (!this->{{attribute_variable.attribute_flag_name}} && underlay.{{attribute_variable.attribute_flag_name}}) { + this->{{attribute_variable.attribute_name}} = underlay.{{attribute_variable.attribute_name}}; + this->{{attribute_variable.attribute_flag_name}} = true; + } + {% endif %} + {% endfor %} + + {% if cpp_class == "Category": %} + this->default_icon.apply_underlay(underlay.default_icon); + this->default_trail.apply_underlay(underlay.default_trail); + {% endif %} +} + +//////////////////////////////////////////////////////////////////////////////// +// apply_overlay +// +// Transforms this {{cpp_class}} as if the overlay argument were overlayed on +// top of this class. +//////////////////////////////////////////////////////////////////////////////// +void {{cpp_class}}::apply_overlay(const {{cpp_class}}& overlay) { + {% for attribute_variable in attribute_variables %} + {% if attribute_variable.is_component == false %} + if (overlay.{{attribute_variable.attribute_flag_name}}) { + this->{{attribute_variable.attribute_name}} = overlay.{{attribute_variable.attribute_name}}; + this->{{attribute_variable.attribute_flag_name}} = true; + } + {% endif %} + {% endfor %} + + {% if cpp_class == "Category": %} + this->default_icon.apply_overlay(overlay.default_icon); + this->default_trail.apply_overlay(overlay.default_trail); + {% endif %} +} + diff --git a/xml_converter/generators/cpp_templates/class_template.hpp b/xml_converter/generators/cpp_templates/class_template.hpp index 3856a687..d509d9d7 100644 --- a/xml_converter/generators/cpp_templates/class_template.hpp +++ b/xml_converter/generators/cpp_templates/class_template.hpp @@ -39,4 +39,6 @@ class {{cpp_class}} : public Parseable { {% if attributes_of_type_marker_category %} bool validate_attributes_of_type_marker_category(); {% endif %} + void apply_underlay(const {{cpp_class}}& underlay); + void apply_overlay(const {{cpp_class}}& overlay); }; diff --git a/xml_converter/integration_tests/test_cases/category_name_invalid/testcase.yaml b/xml_converter/integration_tests/test_cases/category_name_invalid/testcase.yaml index 3ca733b5..23f69adc 100644 --- a/xml_converter/integration_tests/test_cases/category_name_invalid/testcase.yaml +++ b/xml_converter/integration_tests/test_cases/category_name_invalid/testcase.yaml @@ -1,11 +1,11 @@ input_paths: "pack": "xml" expected_stdout: | - Error: Category attribute 'name' is missing or is an empty string when it should be a non-empty string + Error: Category attribute 'name' is missing so it cannot be properly referenced test_cases/category_name_invalid/input/pack/xml_file.xml 2 | | ^^^^^^^^^^^^^^ - Error: Category attribute 'name' is missing or is an empty string when it should be a non-empty string + Error: Category attribute 'name' is an empty string so it cannot be properly referenced test_cases/category_name_invalid/input/pack/xml_file.xml 3 | | ^^^^^^^^^^^^^^ diff --git a/xml_converter/src/category_gen.cpp b/xml_converter/src/category_gen.cpp index 5d6bc9cc..c7b3f2ae 100644 --- a/xml_converter/src/category_gen.cpp +++ b/xml_converter/src/category_gen.cpp @@ -132,3 +132,69 @@ void Category::parse_protobuf(waypoint::Category proto_category, ProtoReaderStat proto_to_string(proto_category.tip_description(), state, &(this->tooltip_description), &(this->tooltip_description_is_set)); } } + + +//////////////////////////////////////////////////////////////////////////////// +// apply_underlay +// +// Transforms this Category as if this class was overlayed on top of the +// underlay argument. +//////////////////////////////////////////////////////////////////////////////// +void Category::apply_underlay(const Category& underlay) { + if (!this->default_visibility_is_set && underlay.default_visibility_is_set) { + this->default_visibility = underlay.default_visibility; + this->default_visibility_is_set = true; + } + if (!this->display_name_is_set && underlay.display_name_is_set) { + this->display_name = underlay.display_name; + this->display_name_is_set = true; + } + if (!this->is_separator_is_set && underlay.is_separator_is_set) { + this->is_separator = underlay.is_separator; + this->is_separator_is_set = true; + } + if (!this->name_is_set && underlay.name_is_set) { + this->name = underlay.name; + this->name_is_set = true; + } + if (!this->tooltip_description_is_set && underlay.tooltip_description_is_set) { + this->tooltip_description = underlay.tooltip_description; + this->tooltip_description_is_set = true; + } + + this->default_icon.apply_underlay(underlay.default_icon); + this->default_trail.apply_underlay(underlay.default_trail); +} + +//////////////////////////////////////////////////////////////////////////////// +// apply_overlay +// +// Transforms this Category as if the overlay argument were overlayed on +// top of this class. +//////////////////////////////////////////////////////////////////////////////// +void Category::apply_overlay(const Category& overlay) { + if (overlay.default_visibility_is_set) { + this->default_visibility = overlay.default_visibility; + this->default_visibility_is_set = true; + } + if (overlay.display_name_is_set) { + this->display_name = overlay.display_name; + this->display_name_is_set = true; + } + if (overlay.is_separator_is_set) { + this->is_separator = overlay.is_separator; + this->is_separator_is_set = true; + } + if (overlay.name_is_set) { + this->name = overlay.name; + this->name_is_set = true; + } + if (overlay.tooltip_description_is_set) { + this->tooltip_description = overlay.tooltip_description; + this->tooltip_description_is_set = true; + } + + this->default_icon.apply_overlay(overlay.default_icon); + this->default_trail.apply_overlay(overlay.default_trail); +} + diff --git a/xml_converter/src/category_gen.hpp b/xml_converter/src/category_gen.hpp index 4a608fa3..4a6ecf91 100644 --- a/xml_converter/src/category_gen.hpp +++ b/xml_converter/src/category_gen.hpp @@ -36,4 +36,6 @@ class Category : public Parseable { bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, XMLReaderState* state); waypoint::Category as_protobuf(ProtoWriterState* state) const; void parse_protobuf(waypoint::Category proto_category, ProtoReaderState* state); + void apply_underlay(const Category& underlay); + void apply_overlay(const Category& overlay); }; diff --git a/xml_converter/src/icon_gen.cpp b/xml_converter/src/icon_gen.cpp index 36c0fbe3..23ddcb20 100644 --- a/xml_converter/src/icon_gen.cpp +++ b/xml_converter/src/icon_gen.cpp @@ -742,3 +742,401 @@ void Icon::parse_protobuf(waypoint::Icon proto_icon, ProtoReaderState* state) { proto_to_float(proto_icon.trigger().range(), state, &(this->trigger_range), &(this->trigger_range_is_set)); } } + + +//////////////////////////////////////////////////////////////////////////////// +// apply_underlay +// +// Transforms this Icon as if this class was overlayed on top of the +// underlay argument. +//////////////////////////////////////////////////////////////////////////////// +void Icon::apply_underlay(const Icon& underlay) { + if (!this->achievement_bitmask_is_set && underlay.achievement_bitmask_is_set) { + this->achievement_bitmask = underlay.achievement_bitmask; + this->achievement_bitmask_is_set = true; + } + if (!this->achievement_id_is_set && underlay.achievement_id_is_set) { + this->achievement_id = underlay.achievement_id; + this->achievement_id_is_set = true; + } + if (!this->auto_trigger_is_set && underlay.auto_trigger_is_set) { + this->auto_trigger = underlay.auto_trigger; + this->auto_trigger_is_set = true; + } + if (!this->bounce_delay_is_set && underlay.bounce_delay_is_set) { + this->bounce_delay = underlay.bounce_delay; + this->bounce_delay_is_set = true; + } + if (!this->bounce_duration_is_set && underlay.bounce_duration_is_set) { + this->bounce_duration = underlay.bounce_duration; + this->bounce_duration_is_set = true; + } + if (!this->bounce_height_is_set && underlay.bounce_height_is_set) { + this->bounce_height = underlay.bounce_height; + this->bounce_height_is_set = true; + } + if (!this->category_is_set && underlay.category_is_set) { + this->category = underlay.category; + this->category_is_set = true; + } + if (!this->color_is_set && underlay.color_is_set) { + this->color = underlay.color; + this->color_is_set = true; + } + if (!this->copy_clipboard_is_set && underlay.copy_clipboard_is_set) { + this->copy_clipboard = underlay.copy_clipboard; + this->copy_clipboard_is_set = true; + } + if (!this->copy_message_is_set && underlay.copy_message_is_set) { + this->copy_message = underlay.copy_message; + this->copy_message_is_set = true; + } + if (!this->cull_chirality_is_set && underlay.cull_chirality_is_set) { + this->cull_chirality = underlay.cull_chirality; + this->cull_chirality_is_set = true; + } + if (!this->disable_player_cutout_is_set && underlay.disable_player_cutout_is_set) { + this->disable_player_cutout = underlay.disable_player_cutout; + this->disable_player_cutout_is_set = true; + } + if (!this->distance_fade_end_is_set && underlay.distance_fade_end_is_set) { + this->distance_fade_end = underlay.distance_fade_end; + this->distance_fade_end_is_set = true; + } + if (!this->distance_fade_start_is_set && underlay.distance_fade_start_is_set) { + this->distance_fade_start = underlay.distance_fade_start; + this->distance_fade_start_is_set = true; + } + if (!this->euler_rotation_is_set && underlay.euler_rotation_is_set) { + this->euler_rotation = underlay.euler_rotation; + this->euler_rotation_is_set = true; + } + if (!this->festival_filter_is_set && underlay.festival_filter_is_set) { + this->festival_filter = underlay.festival_filter; + this->festival_filter_is_set = true; + } + if (!this->guid_is_set && underlay.guid_is_set) { + this->guid = underlay.guid; + this->guid_is_set = true; + } + if (!this->has_countdown_is_set && underlay.has_countdown_is_set) { + this->has_countdown = underlay.has_countdown; + this->has_countdown_is_set = true; + } + if (!this->height_offset_is_set && underlay.height_offset_is_set) { + this->height_offset = underlay.height_offset; + this->height_offset_is_set = true; + } + if (!this->hide_category_is_set && underlay.hide_category_is_set) { + this->hide_category = underlay.hide_category; + this->hide_category_is_set = true; + } + if (!this->icon_is_set && underlay.icon_is_set) { + this->icon = underlay.icon; + this->icon_is_set = true; + } + if (!this->icon_size_is_set && underlay.icon_size_is_set) { + this->icon_size = underlay.icon_size; + this->icon_size_is_set = true; + } + if (!this->info_message_is_set && underlay.info_message_is_set) { + this->info_message = underlay.info_message; + this->info_message_is_set = true; + } + if (!this->invert_visibility_is_set && underlay.invert_visibility_is_set) { + this->invert_visibility = underlay.invert_visibility; + this->invert_visibility_is_set = true; + } + if (!this->map_display_size_is_set && underlay.map_display_size_is_set) { + this->map_display_size = underlay.map_display_size; + this->map_display_size_is_set = true; + } + if (!this->map_id_is_set && underlay.map_id_is_set) { + this->map_id = underlay.map_id; + this->map_id_is_set = true; + } + if (!this->map_type_filter_is_set && underlay.map_type_filter_is_set) { + this->map_type_filter = underlay.map_type_filter; + this->map_type_filter_is_set = true; + } + if (!this->maximum_size_on_screen_is_set && underlay.maximum_size_on_screen_is_set) { + this->maximum_size_on_screen = underlay.maximum_size_on_screen; + this->maximum_size_on_screen_is_set = true; + } + if (!this->minimum_size_on_screen_is_set && underlay.minimum_size_on_screen_is_set) { + this->minimum_size_on_screen = underlay.minimum_size_on_screen; + this->minimum_size_on_screen_is_set = true; + } + if (!this->mount_filter_is_set && underlay.mount_filter_is_set) { + this->mount_filter = underlay.mount_filter; + this->mount_filter_is_set = true; + } + if (!this->position_is_set && underlay.position_is_set) { + this->position = underlay.position; + this->position_is_set = true; + } + if (!this->profession_filter_is_set && underlay.profession_filter_is_set) { + this->profession_filter = underlay.profession_filter; + this->profession_filter_is_set = true; + } + if (!this->render_ingame_is_set && underlay.render_ingame_is_set) { + this->render_ingame = underlay.render_ingame; + this->render_ingame_is_set = true; + } + if (!this->render_on_map_is_set && underlay.render_on_map_is_set) { + this->render_on_map = underlay.render_on_map; + this->render_on_map_is_set = true; + } + if (!this->render_on_minimap_is_set && underlay.render_on_minimap_is_set) { + this->render_on_minimap = underlay.render_on_minimap; + this->render_on_minimap_is_set = true; + } + if (!this->reset_behavior_is_set && underlay.reset_behavior_is_set) { + this->reset_behavior = underlay.reset_behavior; + this->reset_behavior_is_set = true; + } + if (!this->reset_length_is_set && underlay.reset_length_is_set) { + this->reset_length = underlay.reset_length; + this->reset_length_is_set = true; + } + if (!this->scale_on_map_with_zoom_is_set && underlay.scale_on_map_with_zoom_is_set) { + this->scale_on_map_with_zoom = underlay.scale_on_map_with_zoom; + this->scale_on_map_with_zoom_is_set = true; + } + if (!this->schedule_is_set && underlay.schedule_is_set) { + this->schedule = underlay.schedule; + this->schedule_is_set = true; + } + if (!this->schedule_duration_is_set && underlay.schedule_duration_is_set) { + this->schedule_duration = underlay.schedule_duration; + this->schedule_duration_is_set = true; + } + if (!this->show_category_is_set && underlay.show_category_is_set) { + this->show_category = underlay.show_category; + this->show_category_is_set = true; + } + if (!this->specialization_filter_is_set && underlay.specialization_filter_is_set) { + this->specialization_filter = underlay.specialization_filter; + this->specialization_filter_is_set = true; + } + if (!this->species_filter_is_set && underlay.species_filter_is_set) { + this->species_filter = underlay.species_filter; + this->species_filter_is_set = true; + } + if (!this->toggle_category_is_set && underlay.toggle_category_is_set) { + this->toggle_category = underlay.toggle_category; + this->toggle_category_is_set = true; + } + if (!this->tooltip_description_is_set && underlay.tooltip_description_is_set) { + this->tooltip_description = underlay.tooltip_description; + this->tooltip_description_is_set = true; + } + if (!this->tooltip_name_is_set && underlay.tooltip_name_is_set) { + this->tooltip_name = underlay.tooltip_name; + this->tooltip_name_is_set = true; + } + if (!this->trigger_range_is_set && underlay.trigger_range_is_set) { + this->trigger_range = underlay.trigger_range; + this->trigger_range_is_set = true; + } + +} + +//////////////////////////////////////////////////////////////////////////////// +// apply_overlay +// +// Transforms this Icon as if the overlay argument were overlayed on +// top of this class. +//////////////////////////////////////////////////////////////////////////////// +void Icon::apply_overlay(const Icon& overlay) { + if (overlay.achievement_bitmask_is_set) { + this->achievement_bitmask = overlay.achievement_bitmask; + this->achievement_bitmask_is_set = true; + } + if (overlay.achievement_id_is_set) { + this->achievement_id = overlay.achievement_id; + this->achievement_id_is_set = true; + } + if (overlay.auto_trigger_is_set) { + this->auto_trigger = overlay.auto_trigger; + this->auto_trigger_is_set = true; + } + if (overlay.bounce_delay_is_set) { + this->bounce_delay = overlay.bounce_delay; + this->bounce_delay_is_set = true; + } + if (overlay.bounce_duration_is_set) { + this->bounce_duration = overlay.bounce_duration; + this->bounce_duration_is_set = true; + } + if (overlay.bounce_height_is_set) { + this->bounce_height = overlay.bounce_height; + this->bounce_height_is_set = true; + } + if (overlay.category_is_set) { + this->category = overlay.category; + this->category_is_set = true; + } + if (overlay.color_is_set) { + this->color = overlay.color; + this->color_is_set = true; + } + if (overlay.copy_clipboard_is_set) { + this->copy_clipboard = overlay.copy_clipboard; + this->copy_clipboard_is_set = true; + } + if (overlay.copy_message_is_set) { + this->copy_message = overlay.copy_message; + this->copy_message_is_set = true; + } + if (overlay.cull_chirality_is_set) { + this->cull_chirality = overlay.cull_chirality; + this->cull_chirality_is_set = true; + } + if (overlay.disable_player_cutout_is_set) { + this->disable_player_cutout = overlay.disable_player_cutout; + this->disable_player_cutout_is_set = true; + } + if (overlay.distance_fade_end_is_set) { + this->distance_fade_end = overlay.distance_fade_end; + this->distance_fade_end_is_set = true; + } + if (overlay.distance_fade_start_is_set) { + this->distance_fade_start = overlay.distance_fade_start; + this->distance_fade_start_is_set = true; + } + if (overlay.euler_rotation_is_set) { + this->euler_rotation = overlay.euler_rotation; + this->euler_rotation_is_set = true; + } + if (overlay.festival_filter_is_set) { + this->festival_filter = overlay.festival_filter; + this->festival_filter_is_set = true; + } + if (overlay.guid_is_set) { + this->guid = overlay.guid; + this->guid_is_set = true; + } + if (overlay.has_countdown_is_set) { + this->has_countdown = overlay.has_countdown; + this->has_countdown_is_set = true; + } + if (overlay.height_offset_is_set) { + this->height_offset = overlay.height_offset; + this->height_offset_is_set = true; + } + if (overlay.hide_category_is_set) { + this->hide_category = overlay.hide_category; + this->hide_category_is_set = true; + } + if (overlay.icon_is_set) { + this->icon = overlay.icon; + this->icon_is_set = true; + } + if (overlay.icon_size_is_set) { + this->icon_size = overlay.icon_size; + this->icon_size_is_set = true; + } + if (overlay.info_message_is_set) { + this->info_message = overlay.info_message; + this->info_message_is_set = true; + } + if (overlay.invert_visibility_is_set) { + this->invert_visibility = overlay.invert_visibility; + this->invert_visibility_is_set = true; + } + if (overlay.map_display_size_is_set) { + this->map_display_size = overlay.map_display_size; + this->map_display_size_is_set = true; + } + if (overlay.map_id_is_set) { + this->map_id = overlay.map_id; + this->map_id_is_set = true; + } + if (overlay.map_type_filter_is_set) { + this->map_type_filter = overlay.map_type_filter; + this->map_type_filter_is_set = true; + } + if (overlay.maximum_size_on_screen_is_set) { + this->maximum_size_on_screen = overlay.maximum_size_on_screen; + this->maximum_size_on_screen_is_set = true; + } + if (overlay.minimum_size_on_screen_is_set) { + this->minimum_size_on_screen = overlay.minimum_size_on_screen; + this->minimum_size_on_screen_is_set = true; + } + if (overlay.mount_filter_is_set) { + this->mount_filter = overlay.mount_filter; + this->mount_filter_is_set = true; + } + if (overlay.position_is_set) { + this->position = overlay.position; + this->position_is_set = true; + } + if (overlay.profession_filter_is_set) { + this->profession_filter = overlay.profession_filter; + this->profession_filter_is_set = true; + } + if (overlay.render_ingame_is_set) { + this->render_ingame = overlay.render_ingame; + this->render_ingame_is_set = true; + } + if (overlay.render_on_map_is_set) { + this->render_on_map = overlay.render_on_map; + this->render_on_map_is_set = true; + } + if (overlay.render_on_minimap_is_set) { + this->render_on_minimap = overlay.render_on_minimap; + this->render_on_minimap_is_set = true; + } + if (overlay.reset_behavior_is_set) { + this->reset_behavior = overlay.reset_behavior; + this->reset_behavior_is_set = true; + } + if (overlay.reset_length_is_set) { + this->reset_length = overlay.reset_length; + this->reset_length_is_set = true; + } + if (overlay.scale_on_map_with_zoom_is_set) { + this->scale_on_map_with_zoom = overlay.scale_on_map_with_zoom; + this->scale_on_map_with_zoom_is_set = true; + } + if (overlay.schedule_is_set) { + this->schedule = overlay.schedule; + this->schedule_is_set = true; + } + if (overlay.schedule_duration_is_set) { + this->schedule_duration = overlay.schedule_duration; + this->schedule_duration_is_set = true; + } + if (overlay.show_category_is_set) { + this->show_category = overlay.show_category; + this->show_category_is_set = true; + } + if (overlay.specialization_filter_is_set) { + this->specialization_filter = overlay.specialization_filter; + this->specialization_filter_is_set = true; + } + if (overlay.species_filter_is_set) { + this->species_filter = overlay.species_filter; + this->species_filter_is_set = true; + } + if (overlay.toggle_category_is_set) { + this->toggle_category = overlay.toggle_category; + this->toggle_category_is_set = true; + } + if (overlay.tooltip_description_is_set) { + this->tooltip_description = overlay.tooltip_description; + this->tooltip_description_is_set = true; + } + if (overlay.tooltip_name_is_set) { + this->tooltip_name = overlay.tooltip_name; + this->tooltip_name_is_set = true; + } + if (overlay.trigger_range_is_set) { + this->trigger_range = overlay.trigger_range; + this->trigger_range_is_set = true; + } + +} + diff --git a/xml_converter/src/icon_gen.hpp b/xml_converter/src/icon_gen.hpp index 70410b78..efbdf12d 100644 --- a/xml_converter/src/icon_gen.hpp +++ b/xml_converter/src/icon_gen.hpp @@ -127,4 +127,6 @@ class Icon : public Parseable { waypoint::Icon as_protobuf(ProtoWriterState* state) const; void parse_protobuf(waypoint::Icon proto_icon, ProtoReaderState* state); bool validate_attributes_of_type_marker_category(); + void apply_underlay(const Icon& underlay); + void apply_overlay(const Icon& overlay); }; diff --git a/xml_converter/src/packaging_xml.cpp b/xml_converter/src/packaging_xml.cpp index 44779ebd..b5dddf16 100644 --- a/xml_converter/src/packaging_xml.cpp +++ b/xml_converter/src/packaging_xml.cpp @@ -16,28 +16,36 @@ using namespace std; unsigned int UNKNOWN_CATEGORY_COUNTER = 0; void parse_marker_categories(rapidxml::xml_node<>* node, map* marker_categories, vector* errors, string base_dir, int depth = 0) { if (get_node_name(node) == "MarkerCategory") { - // TODO: Eventually this process should be removed. Instead we should be - // grabbing the name during the parsing of all the atrributes to - // avoid doing a secondary search through the attributes, and then - // we should have a method of applying the parsed node on top of - // its hirearchy probably using the is_set flags. - string name = lowercase(find_attribute_value(node, "name")); - XMLReaderState state = { base_dir, marker_categories, }; - if (name == "") { - errors->push_back(new XMLNodeNameError("Category attribute 'name' is missing or is an empty string when it should be a non-empty string", node)); + Category new_category; + new_category.init_from_xml(node, errors, &state); + + string name; + if (!new_category.name_is_set) { + errors->push_back(new XMLNodeNameError("Category attribute 'name' is missing so it cannot be properly referenced", node)); + // TODO: Maybe fall back on display name slugification. + name = "UNKNOWN_CATEGORY_" + to_string(UNKNOWN_CATEGORY_COUNTER); + UNKNOWN_CATEGORY_COUNTER++; + } + else if (new_category.name == "") { + errors->push_back(new XMLNodeNameError("Category attribute 'name' is an empty string so it cannot be properly referenced", node)); + // TODO: Maybe fall back on display name slugification. name = "UNKNOWN_CATEGORY_" + to_string(UNKNOWN_CATEGORY_COUNTER); UNKNOWN_CATEGORY_COUNTER++; } + else { + name = lowercase(new_category.name); + } + + Category* existing_category = &(*marker_categories)[name]; + existing_category->apply_overlay(new_category); - Category* this_category = &(*marker_categories)[name]; - this_category->init_from_xml(node, errors, &state); for (rapidxml::xml_node<>* child_node = node->first_node(); child_node; child_node = child_node->next_sibling()) { - parse_marker_categories(child_node, &(this_category->children), errors, base_dir, depth + 1); + parse_marker_categories(child_node, &(existing_category->children), errors, base_dir, depth + 1); } } else { diff --git a/xml_converter/src/trail_gen.cpp b/xml_converter/src/trail_gen.cpp index 23367e69..8ef6401d 100644 --- a/xml_converter/src/trail_gen.cpp +++ b/xml_converter/src/trail_gen.cpp @@ -440,3 +440,241 @@ void Trail::parse_protobuf(waypoint::Trail proto_trail, ProtoReaderState* state) proto_to_float(proto_trail.scale(), state, &(this->trail_scale), &(this->trail_scale_is_set)); } } + + +//////////////////////////////////////////////////////////////////////////////// +// apply_underlay +// +// Transforms this Trail as if this class was overlayed on top of the +// underlay argument. +//////////////////////////////////////////////////////////////////////////////// +void Trail::apply_underlay(const Trail& underlay) { + if (!this->achievement_bitmask_is_set && underlay.achievement_bitmask_is_set) { + this->achievement_bitmask = underlay.achievement_bitmask; + this->achievement_bitmask_is_set = true; + } + if (!this->achievement_id_is_set && underlay.achievement_id_is_set) { + this->achievement_id = underlay.achievement_id; + this->achievement_id_is_set = true; + } + if (!this->animation_speed_is_set && underlay.animation_speed_is_set) { + this->animation_speed = underlay.animation_speed; + this->animation_speed_is_set = true; + } + if (!this->category_is_set && underlay.category_is_set) { + this->category = underlay.category; + this->category_is_set = true; + } + if (!this->color_is_set && underlay.color_is_set) { + this->color = underlay.color; + this->color_is_set = true; + } + if (!this->cull_chirality_is_set && underlay.cull_chirality_is_set) { + this->cull_chirality = underlay.cull_chirality; + this->cull_chirality_is_set = true; + } + if (!this->disable_player_cutout_is_set && underlay.disable_player_cutout_is_set) { + this->disable_player_cutout = underlay.disable_player_cutout; + this->disable_player_cutout_is_set = true; + } + if (!this->distance_fade_end_is_set && underlay.distance_fade_end_is_set) { + this->distance_fade_end = underlay.distance_fade_end; + this->distance_fade_end_is_set = true; + } + if (!this->distance_fade_start_is_set && underlay.distance_fade_start_is_set) { + this->distance_fade_start = underlay.distance_fade_start; + this->distance_fade_start_is_set = true; + } + if (!this->festival_filter_is_set && underlay.festival_filter_is_set) { + this->festival_filter = underlay.festival_filter; + this->festival_filter_is_set = true; + } + if (!this->guid_is_set && underlay.guid_is_set) { + this->guid = underlay.guid; + this->guid_is_set = true; + } + if (!this->is_wall_is_set && underlay.is_wall_is_set) { + this->is_wall = underlay.is_wall; + this->is_wall_is_set = true; + } + if (!this->map_display_size_is_set && underlay.map_display_size_is_set) { + this->map_display_size = underlay.map_display_size; + this->map_display_size_is_set = true; + } + if (!this->map_id_is_set && underlay.map_id_is_set) { + this->map_id = underlay.map_id; + this->map_id_is_set = true; + } + if (!this->map_type_filter_is_set && underlay.map_type_filter_is_set) { + this->map_type_filter = underlay.map_type_filter; + this->map_type_filter_is_set = true; + } + if (!this->mount_filter_is_set && underlay.mount_filter_is_set) { + this->mount_filter = underlay.mount_filter; + this->mount_filter_is_set = true; + } + if (!this->profession_filter_is_set && underlay.profession_filter_is_set) { + this->profession_filter = underlay.profession_filter; + this->profession_filter_is_set = true; + } + if (!this->render_ingame_is_set && underlay.render_ingame_is_set) { + this->render_ingame = underlay.render_ingame; + this->render_ingame_is_set = true; + } + if (!this->render_on_map_is_set && underlay.render_on_map_is_set) { + this->render_on_map = underlay.render_on_map; + this->render_on_map_is_set = true; + } + if (!this->render_on_minimap_is_set && underlay.render_on_minimap_is_set) { + this->render_on_minimap = underlay.render_on_minimap; + this->render_on_minimap_is_set = true; + } + if (!this->schedule_is_set && underlay.schedule_is_set) { + this->schedule = underlay.schedule; + this->schedule_is_set = true; + } + if (!this->schedule_duration_is_set && underlay.schedule_duration_is_set) { + this->schedule_duration = underlay.schedule_duration; + this->schedule_duration_is_set = true; + } + if (!this->specialization_filter_is_set && underlay.specialization_filter_is_set) { + this->specialization_filter = underlay.specialization_filter; + this->specialization_filter_is_set = true; + } + if (!this->species_filter_is_set && underlay.species_filter_is_set) { + this->species_filter = underlay.species_filter; + this->species_filter_is_set = true; + } + if (!this->texture_is_set && underlay.texture_is_set) { + this->texture = underlay.texture; + this->texture_is_set = true; + } + if (!this->trail_data_is_set && underlay.trail_data_is_set) { + this->trail_data = underlay.trail_data; + this->trail_data_is_set = true; + } + if (!this->trail_scale_is_set && underlay.trail_scale_is_set) { + this->trail_scale = underlay.trail_scale; + this->trail_scale_is_set = true; + } + +} + +//////////////////////////////////////////////////////////////////////////////// +// apply_overlay +// +// Transforms this Trail as if the overlay argument were overlayed on +// top of this class. +//////////////////////////////////////////////////////////////////////////////// +void Trail::apply_overlay(const Trail& overlay) { + if (overlay.achievement_bitmask_is_set) { + this->achievement_bitmask = overlay.achievement_bitmask; + this->achievement_bitmask_is_set = true; + } + if (overlay.achievement_id_is_set) { + this->achievement_id = overlay.achievement_id; + this->achievement_id_is_set = true; + } + if (overlay.animation_speed_is_set) { + this->animation_speed = overlay.animation_speed; + this->animation_speed_is_set = true; + } + if (overlay.category_is_set) { + this->category = overlay.category; + this->category_is_set = true; + } + if (overlay.color_is_set) { + this->color = overlay.color; + this->color_is_set = true; + } + if (overlay.cull_chirality_is_set) { + this->cull_chirality = overlay.cull_chirality; + this->cull_chirality_is_set = true; + } + if (overlay.disable_player_cutout_is_set) { + this->disable_player_cutout = overlay.disable_player_cutout; + this->disable_player_cutout_is_set = true; + } + if (overlay.distance_fade_end_is_set) { + this->distance_fade_end = overlay.distance_fade_end; + this->distance_fade_end_is_set = true; + } + if (overlay.distance_fade_start_is_set) { + this->distance_fade_start = overlay.distance_fade_start; + this->distance_fade_start_is_set = true; + } + if (overlay.festival_filter_is_set) { + this->festival_filter = overlay.festival_filter; + this->festival_filter_is_set = true; + } + if (overlay.guid_is_set) { + this->guid = overlay.guid; + this->guid_is_set = true; + } + if (overlay.is_wall_is_set) { + this->is_wall = overlay.is_wall; + this->is_wall_is_set = true; + } + if (overlay.map_display_size_is_set) { + this->map_display_size = overlay.map_display_size; + this->map_display_size_is_set = true; + } + if (overlay.map_id_is_set) { + this->map_id = overlay.map_id; + this->map_id_is_set = true; + } + if (overlay.map_type_filter_is_set) { + this->map_type_filter = overlay.map_type_filter; + this->map_type_filter_is_set = true; + } + if (overlay.mount_filter_is_set) { + this->mount_filter = overlay.mount_filter; + this->mount_filter_is_set = true; + } + if (overlay.profession_filter_is_set) { + this->profession_filter = overlay.profession_filter; + this->profession_filter_is_set = true; + } + if (overlay.render_ingame_is_set) { + this->render_ingame = overlay.render_ingame; + this->render_ingame_is_set = true; + } + if (overlay.render_on_map_is_set) { + this->render_on_map = overlay.render_on_map; + this->render_on_map_is_set = true; + } + if (overlay.render_on_minimap_is_set) { + this->render_on_minimap = overlay.render_on_minimap; + this->render_on_minimap_is_set = true; + } + if (overlay.schedule_is_set) { + this->schedule = overlay.schedule; + this->schedule_is_set = true; + } + if (overlay.schedule_duration_is_set) { + this->schedule_duration = overlay.schedule_duration; + this->schedule_duration_is_set = true; + } + if (overlay.specialization_filter_is_set) { + this->specialization_filter = overlay.specialization_filter; + this->specialization_filter_is_set = true; + } + if (overlay.species_filter_is_set) { + this->species_filter = overlay.species_filter; + this->species_filter_is_set = true; + } + if (overlay.texture_is_set) { + this->texture = overlay.texture; + this->texture_is_set = true; + } + if (overlay.trail_data_is_set) { + this->trail_data = overlay.trail_data; + this->trail_data_is_set = true; + } + if (overlay.trail_scale_is_set) { + this->trail_scale = overlay.trail_scale; + this->trail_scale_is_set = true; + } + +} + diff --git a/xml_converter/src/trail_gen.hpp b/xml_converter/src/trail_gen.hpp index d10ea163..28f0ec19 100644 --- a/xml_converter/src/trail_gen.hpp +++ b/xml_converter/src/trail_gen.hpp @@ -85,4 +85,6 @@ class Trail : public Parseable { waypoint::Trail as_protobuf(ProtoWriterState* state) const; void parse_protobuf(waypoint::Trail proto_trail, ProtoReaderState* state); bool validate_attributes_of_type_marker_category(); + void apply_underlay(const Trail& underlay); + void apply_overlay(const Trail& overlay); }; From 122366940ab697f66c77bf11663961ebdbd6d47a Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sun, 21 Jan 2024 08:39:19 -0600 Subject: [PATCH 417/539] remoing the now unused find_attribute_value function --- xml_converter/src/rapid_helpers.cpp | 17 ----------------- xml_converter/src/rapid_helpers.hpp | 1 - 2 files changed, 18 deletions(-) diff --git a/xml_converter/src/rapid_helpers.cpp b/xml_converter/src/rapid_helpers.cpp index 3b7c313c..c109ba8d 100644 --- a/xml_converter/src/rapid_helpers.cpp +++ b/xml_converter/src/rapid_helpers.cpp @@ -9,23 +9,6 @@ using namespace std; -//////////////////////////////////////////////////////////////////////////////// -// find_attribute_value (depricated) -// -// This function does a linear search over an xml node to try and find an -// attribute with the specified name. It the attribute is not found then an -// empty string is returned. -// -// This function is depricated and should not be used by any new code. -//////////////////////////////////////////////////////////////////////////////// -string find_attribute_value(rapidxml::xml_node<>* node, string attribute_name) { - rapidxml::xml_attribute* attribute = node->first_attribute(attribute_name.data(), attribute_name.size(), false); - if (attribute == nullptr) { - return ""; - } - - return string(attribute->value(), attribute->value_size()); -} rapidxml::xml_attribute<>* find_attribute(rapidxml::xml_node<>* node, string attribute_name) { return node->first_attribute(attribute_name.data(), attribute_name.size(), false); diff --git a/xml_converter/src/rapid_helpers.hpp b/xml_converter/src/rapid_helpers.hpp index 7c7e1845..4d36799c 100644 --- a/xml_converter/src/rapid_helpers.hpp +++ b/xml_converter/src/rapid_helpers.hpp @@ -4,7 +4,6 @@ #include "rapidxml-1.13/rapidxml.hpp" -std::string find_attribute_value(rapidxml::xml_node<>* node, std::string attribute_name); rapidxml::xml_attribute<>* find_attribute(rapidxml::xml_node<>* node, std::string attribute_name); std::string get_attribute_name(rapidxml::xml_attribute<>* attribute); From 994d6d94c917c031085fc83c0490b2cd7c08c63c Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sun, 21 Jan 2024 18:33:45 -0600 Subject: [PATCH 418/539] linter checks --- .../generators/cpp_templates/class_template.cpp | 10 ++++------ xml_converter/src/category_gen.cpp | 2 -- xml_converter/src/icon_gen.cpp | 4 ---- xml_converter/src/rapid_helpers.cpp | 1 - xml_converter/src/trail_gen.cpp | 4 ---- 5 files changed, 4 insertions(+), 17 deletions(-) diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index a9451c85..c9311c0f 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -17,7 +17,7 @@ using namespace std; string {{cpp_class}}::classname() { return "{{xml_class_name}}"; } -{% if cpp_class == "Category": %} +{% if cpp_class == "Category" %} void {{cpp_class}}::init_from_xml(rapidxml::xml_node<>* node, vector* errors, XMLReaderState* state) { for (rapidxml::xml_attribute<>* attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()) { bool is_icon_value = this->default_icon.init_xml_attribute(attribute, errors, state); @@ -69,7 +69,7 @@ vector {{cpp_class}}::as_xml(XMLWriterState* state) const { } {% endif %} {% endfor %} - {% if cpp_class == "Category": %} + {% if cpp_class == "Category" %} xml_node_contents.push_back(">\n"); for (const auto& [key, val] : this->children) { @@ -121,7 +121,6 @@ void {{cpp_class}}::parse_protobuf(waypoint::{{cpp_class}} proto_{{cpp_class_hea {% endfor %} } - //////////////////////////////////////////////////////////////////////////////// // apply_underlay // @@ -137,8 +136,8 @@ void {{cpp_class}}::apply_underlay(const {{cpp_class}}& underlay) { } {% endif %} {% endfor %} + {% if cpp_class == "Category" %} - {% if cpp_class == "Category": %} this->default_icon.apply_underlay(underlay.default_icon); this->default_trail.apply_underlay(underlay.default_trail); {% endif %} @@ -159,10 +158,9 @@ void {{cpp_class}}::apply_overlay(const {{cpp_class}}& overlay) { } {% endif %} {% endfor %} + {% if cpp_class == "Category" %} - {% if cpp_class == "Category": %} this->default_icon.apply_overlay(overlay.default_icon); this->default_trail.apply_overlay(overlay.default_trail); {% endif %} } - diff --git a/xml_converter/src/category_gen.cpp b/xml_converter/src/category_gen.cpp index c7b3f2ae..39495ffc 100644 --- a/xml_converter/src/category_gen.cpp +++ b/xml_converter/src/category_gen.cpp @@ -133,7 +133,6 @@ void Category::parse_protobuf(waypoint::Category proto_category, ProtoReaderStat } } - //////////////////////////////////////////////////////////////////////////////// // apply_underlay // @@ -197,4 +196,3 @@ void Category::apply_overlay(const Category& overlay) { this->default_icon.apply_overlay(overlay.default_icon); this->default_trail.apply_overlay(overlay.default_trail); } - diff --git a/xml_converter/src/icon_gen.cpp b/xml_converter/src/icon_gen.cpp index 23ddcb20..b8e40350 100644 --- a/xml_converter/src/icon_gen.cpp +++ b/xml_converter/src/icon_gen.cpp @@ -743,7 +743,6 @@ void Icon::parse_protobuf(waypoint::Icon proto_icon, ProtoReaderState* state) { } } - //////////////////////////////////////////////////////////////////////////////// // apply_underlay // @@ -939,7 +938,6 @@ void Icon::apply_underlay(const Icon& underlay) { this->trigger_range = underlay.trigger_range; this->trigger_range_is_set = true; } - } //////////////////////////////////////////////////////////////////////////////// @@ -1137,6 +1135,4 @@ void Icon::apply_overlay(const Icon& overlay) { this->trigger_range = overlay.trigger_range; this->trigger_range_is_set = true; } - } - diff --git a/xml_converter/src/rapid_helpers.cpp b/xml_converter/src/rapid_helpers.cpp index c109ba8d..63e98426 100644 --- a/xml_converter/src/rapid_helpers.cpp +++ b/xml_converter/src/rapid_helpers.cpp @@ -9,7 +9,6 @@ using namespace std; - rapidxml::xml_attribute<>* find_attribute(rapidxml::xml_node<>* node, string attribute_name) { return node->first_attribute(attribute_name.data(), attribute_name.size(), false); } diff --git a/xml_converter/src/trail_gen.cpp b/xml_converter/src/trail_gen.cpp index 8ef6401d..becc14ae 100644 --- a/xml_converter/src/trail_gen.cpp +++ b/xml_converter/src/trail_gen.cpp @@ -441,7 +441,6 @@ void Trail::parse_protobuf(waypoint::Trail proto_trail, ProtoReaderState* state) } } - //////////////////////////////////////////////////////////////////////////////// // apply_underlay // @@ -557,7 +556,6 @@ void Trail::apply_underlay(const Trail& underlay) { this->trail_scale = underlay.trail_scale; this->trail_scale_is_set = true; } - } //////////////////////////////////////////////////////////////////////////////// @@ -675,6 +673,4 @@ void Trail::apply_overlay(const Trail& overlay) { this->trail_scale = overlay.trail_scale; this->trail_scale_is_set = true; } - } - From fe1bf76be98ef904d63b83a471f3b9eb565318fe Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sun, 21 Jan 2024 22:11:18 -0600 Subject: [PATCH 419/539] adding helper functions to generate simple hashed values --- xml_converter/src/hash_helpers.cpp | 83 +++++++++++ xml_converter/src/hash_helpers.hpp | 29 ++++ xml_converter/tests/test_hash_helpers.cpp | 170 ++++++++++++++++++++++ 3 files changed, 282 insertions(+) create mode 100644 xml_converter/src/hash_helpers.cpp create mode 100644 xml_converter/src/hash_helpers.hpp create mode 100644 xml_converter/tests/test_hash_helpers.cpp diff --git a/xml_converter/src/hash_helpers.cpp b/xml_converter/src/hash_helpers.cpp new file mode 100644 index 00000000..1c7ad3b9 --- /dev/null +++ b/xml_converter/src/hash_helpers.cpp @@ -0,0 +1,83 @@ +// Hashing +#include "hash_helpers.hpp" + +const char* hex_chars = "0123456789abcdef"; + +Hash64::Hash64() { + this->hash = 0b0000010010000001001101100111001011100111010110000100001101011110; +} + +Hash64::Hash64(uint64_t init) { + this->hash = init; +} + +void Hash64::update(const unsigned char* str, size_t length) { + for (size_t i = 0; i < length; i++) { + hash = ((hash << 5) + hash) + str[i]; /* hash * 33 + c */ + } +} + +void Hash64::update(const std::string& str) { + this->update((unsigned char*)str.c_str(), str.length()); +} + +std::string Hash64::hex() const { + std::string hex_string(16, '0'); + + uint64_t number = this->hash; + + for (int i = 15; i >= 0; --i) { + hex_string[i] = hex_chars[number & 0xF]; + number >>= 4; + } + + return hex_string; +} + +Hash128::Hash128() { + this->lower = 0b0000010010000001001101100111001011100111010110000100001101011110; + this->upper = 0b0101011000001100111101000001001100111111010110011101101111100100; +} +Hash128::Hash128(uint64_t upper, uint64_t lower) { + this->upper = upper; + this->lower = lower; +} + +void Hash128::update(const unsigned char* str, size_t length) { + for (size_t i = 0; i < length; i++) { + upper = ((upper << 5) + upper) + ((lower >> 59) & 0x1F); + uint64_t original_lower = lower; + lower = lower << 5; + + uint64_t multiplication_overflow = (lower > UINT64_MAX - original_lower) ? 1 : 0; + lower += original_lower; + + uint64_t addition_overflow = (lower > UINT64_MAX - str[i]) ? 1 : 0; + + lower += str[i]; + upper += multiplication_overflow + addition_overflow; + } +} + +void Hash128::update(const std::string& str) { + this->update((unsigned char*)str.c_str(), str.length()); +} + +std::string Hash128::hex() const { + std::string hex_string(32, '0'); + + uint64_t number = this->lower; + + for (int i = 15; i >= 0; --i) { + hex_string[i + 16] = hex_chars[number & 0xF]; + number >>= 4; + } + + number = this->upper; + for (int i = 15; i >= 0; --i) { + hex_string[i] = hex_chars[number & 0xF]; + number >>= 4; + } + + return hex_string; +} diff --git a/xml_converter/src/hash_helpers.hpp b/xml_converter/src/hash_helpers.hpp new file mode 100644 index 00000000..6ce2c40c --- /dev/null +++ b/xml_converter/src/hash_helpers.hpp @@ -0,0 +1,29 @@ +#pragma once + +#include + +class Hash64 { + private: + uint64_t hash; + + public: + Hash64(); + explicit Hash64(uint64_t init); + void update(const unsigned char* str, size_t length); + void update(const std::string& str); + std::string hex() const; +}; + +class Hash128 { + private: + uint64_t upper; + uint64_t lower; + + public: + Hash128(); + Hash128(uint64_t upper, uint64_t lower); + void update(const unsigned char* str, size_t length); + void update(const std::string& str); + std::string hex() const; + std::string base64() const; +}; diff --git a/xml_converter/tests/test_hash_helpers.cpp b/xml_converter/tests/test_hash_helpers.cpp new file mode 100644 index 00000000..16667c76 --- /dev/null +++ b/xml_converter/tests/test_hash_helpers.cpp @@ -0,0 +1,170 @@ +#include "../src/hash_helpers.hpp" +#include + +class Hash128Test : public ::testing::Test {}; + +//////////////////////////////////////////////////////////////////////////////// +// These test cases were computed in python using the code. Python was chosen +// because it is able to handle large integers natively. +// +// ```python +// start = 0 +// for i in range(26): +// start = start*33 + 97 +// print('TEST_HASH128_PROPAGATE("' + '{:032x}'.format(start) + '", ' + str(i+1) + ")") +// ``` +//////////////////////////////////////////////////////////////////////////////// +#define TEST_HASH128_PROPAGATE(EXPECTED_HASH, SIZE) \ + TEST_F(Hash128Test, Propagate##SIZE##Bytes) { \ + Hash128 hash(0,0); \ + hash.update(std::string(SIZE, 'a')); \ + EXPECT_EQ(hash.hex(), EXPECTED_HASH); \ + } +TEST_HASH128_PROPAGATE("00000000000000000000000000000000", 0) +TEST_HASH128_PROPAGATE("00000000000000000000000000000061", 1) +TEST_HASH128_PROPAGATE("00000000000000000000000000000ce2", 2) +TEST_HASH128_PROPAGATE("0000000000000000000000000001a983", 3) +TEST_HASH128_PROPAGATE("0000000000000000000000000036da44", 4) +TEST_HASH128_PROPAGATE("00000000000000000000000007122325", 5) +TEST_HASH128_PROPAGATE("000000000000000000000000e9568826", 6) +TEST_HASH128_PROPAGATE("00000000000000000000001e14278d47", 7) +TEST_HASH128_PROPAGATE("0000000000000000000003e099193688", 8) +TEST_HASH128_PROPAGATE("000000000000000000007ff3bc4007e9", 9) +TEST_HASH128_PROPAGATE("000000000000000000107e6b4441056a", 10) +TEST_HASH128_PROPAGATE("000000000000000002204bd3cc61b30b", 11) +TEST_HASH128_PROPAGATE("00000000000000004629c64d589814cc", 12) +// First test over a signle uint64 +TEST_HASH128_PROPAGATE("00000000000000090b628ff86b9aaead", 13) +TEST_HASH128_PROPAGATE("000000000000012a77b48f05def084ae", 14) +TEST_HASH128_PROPAGATE("00000000000026796e466fc1bd011acf", 15) +TEST_HASH128_PROPAGATE("000000000004f5a7371467f95d247510", 16) +TEST_HASH128_PROPAGATE("0000000000a3aa8e19a1672501b31771", 17) +TEST_HASH128_PROPAGATE("000000001518fc514dce4bc5381605f2", 18) +TEST_HASH128_PROPAGATE("00000002b838867b0797c46c3ad6c493", 19) +TEST_HASH128_PROPAGATE("00000059bf4955dbfa9051f395af5754", 20) +TEST_HASH128_PROPAGATE("00000b91a874115b4c9a90664b9a4235", 21) +TEST_HASH128_PROPAGATE("00017dc6b6f63cc4dfec9d2fbee28936", 22) +TEST_HASH128_PROPAGATE("0031369d95bdd560dd8043279b33b057", 23) +TEST_HASH128_PROPAGATE("06580a504d78817c8d88a81b01a9bb98", 24) +TEST_HASH128_PROPAGATE("d1595459fc88b10e3e9dab7b36e12ef9", 25) +// First overflow of 128bit +TEST_HASH128_PROPAGATE("fc83df998d9ed2d612531ae213070e7a", 26) + + +//////////////////////////////////////////////////////////////////////////////// +// These test cases were computed in python using the code. Python was chosen +// because it is able to handle large integers natively. +// +// ```python +// start = 0b01010110000011001111010000010011001111110101100111011011111001000000010010000001001101100111001011100111010110000100001101011110 +// for i in range(26): +// start = start*33 + 97 +// print('TEST_HASH128_PROPAGATE("' + '{:032x}'.format(start) + '", ' + str(i+1) + ")") +// ``` +//////////////////////////////////////////////////////////////////////////////// +#define TEST_HASH128_DEFAULT(EXPECTED_HASH, SIZE) \ + TEST_F(Hash128Test, Default##SIZE##Bytes) { \ + Hash128 hash; \ + hash.update(std::string(SIZE, 'a')); \ + EXPECT_EQ(hash.hex(), EXPECTED_HASH); \ + } +TEST_HASH128_DEFAULT("560cf4133f59dbe404813672e758435e", 0) +TEST_HASH128_DEFAULT("17ab767b2a95586494a804cfd260af7f", 1) +TEST_HASH128_DEFAULT("0d1a45e07d4064f729a89eca1e769fc0", 2) +TEST_HASH128_DEFAULT("b06301f0254d03dc5ebc780ded4a9821", 3) +TEST_HASH128_DEFAULT("bcc33ff4ceed7f68364b79cb969d9ca2", 4) +TEST_HASH128_DEFAULT("552b3e8eac9d6c6effbab33e6a513143", 5) +TEST_HASH128_DEFAULT("fa931064404afa4ef7111b0bb4775a04", 6) +TEST_HASH128_DEFAULT("4cf51cec49aa442dd9347c8243629ae5", 7) +TEST_HASH128_DEFAULT("eb98ba757ef2c9e8ffc40ccaafb5f7e6", 8) +TEST_HASH128_DEFAULT("5eb009255d4c0708f845a620a674f507", 9) +TEST_HASH128_DEFAULT("34b12dd106cce82800fa6a3575139648", 10) +TEST_HASH128_DEFAULT("cad6e7f1e069ed282047b0e417865fa9", 11) +TEST_HASH128_DEFAULT("25b3e62deda7922c293dcd670852552a", 12) +TEST_HASH128_DEFAULT("dc30abeba299d7b150f77a48129cfacb", 13) +TEST_HASH128_DEFAULT("6246295ff5d4cddb6fe6c34a663c548c", 14) +TEST_HASH128_DEFAULT("ab0b555eb06e89496cbf2c972dc6e66d", 15) +TEST_HASH128_DEFAULT("0c760134be3fb27704a4bf7ce6a3b46e", 16) +TEST_HASH128_DEFAULT("9b3627cc86360157993caf19bb1a428f", 17) +TEST_HASH128_DEFAULT("01fb215d4cf62c4ac0d292511e6294d0", 18) +TEST_HASH128_DEFAULT("415f4d06ebbbb5a2db24dc74eab52f31", 19) +TEST_HASH128_DEFAULT("6d48ede4633269fe3fc06b12415b15b2", 20) +TEST_HASH128_DEFAULT("1666aa70c97fa9c637cdcd5a6cbdcc53", 21) +TEST_HASH128_DEFAULT("e33bf889f974e28d318778a804775714", 22) +TEST_HASH128_DEFAULT("4abb09c92811343362768da8936239f5", 23) +TEST_HASH128_DEFAULT("a21c42ee2a37ba9fb14842baffa978f6", 24) +TEST_HASH128_DEFAULT("e5a4a0b3712f0e95da509a1af4d89817", 25) +TEST_HASH128_DEFAULT("9a38b7219710e1512463dd798feb9b58", 26) + + +class Hash64Test : public ::testing::Test {}; + +// These are copies of the 128 bit hash tests above trunkated to 64 bits +#define TEST_HASH64_PROPAGATE(EXPECTED_HASH, SIZE) \ + TEST_F(Hash64Test, Propagate##SIZE##Bytes) { \ + Hash64 hash(0); \ + hash.update(std::string(SIZE, 'a')); \ + EXPECT_EQ(hash.hex(), EXPECTED_HASH); \ + } +TEST_HASH64_PROPAGATE("0000000000000000", 0) +TEST_HASH64_PROPAGATE("0000000000000061", 1) +TEST_HASH64_PROPAGATE("0000000000000ce2", 2) +TEST_HASH64_PROPAGATE("000000000001a983", 3) +TEST_HASH64_PROPAGATE("000000000036da44", 4) +TEST_HASH64_PROPAGATE("0000000007122325", 5) +TEST_HASH64_PROPAGATE("00000000e9568826", 6) +TEST_HASH64_PROPAGATE("0000001e14278d47", 7) +TEST_HASH64_PROPAGATE("000003e099193688", 8) +TEST_HASH64_PROPAGATE("00007ff3bc4007e9", 9) +TEST_HASH64_PROPAGATE("00107e6b4441056a", 10) +TEST_HASH64_PROPAGATE("02204bd3cc61b30b", 11) +TEST_HASH64_PROPAGATE("4629c64d589814cc", 12) +TEST_HASH64_PROPAGATE("0b628ff86b9aaead", 13) +TEST_HASH64_PROPAGATE("77b48f05def084ae", 14) +TEST_HASH64_PROPAGATE("6e466fc1bd011acf", 15) +TEST_HASH64_PROPAGATE("371467f95d247510", 16) +TEST_HASH64_PROPAGATE("19a1672501b31771", 17) +TEST_HASH64_PROPAGATE("4dce4bc5381605f2", 18) +TEST_HASH64_PROPAGATE("0797c46c3ad6c493", 19) +TEST_HASH64_PROPAGATE("fa9051f395af5754", 20) +TEST_HASH64_PROPAGATE("4c9a90664b9a4235", 21) +TEST_HASH64_PROPAGATE("dfec9d2fbee28936", 22) +TEST_HASH64_PROPAGATE("dd8043279b33b057", 23) +TEST_HASH64_PROPAGATE("8d88a81b01a9bb98", 24) +TEST_HASH64_PROPAGATE("3e9dab7b36e12ef9", 25) +TEST_HASH64_PROPAGATE("12531ae213070e7a", 26) + + +#define TEST_HASH64_DEFAULT(EXPECTED_HASH, SIZE) \ + TEST_F(Hash64Test, Default##SIZE##Bytes) { \ + Hash64 hash; \ + hash.update(std::string(SIZE, 'a')); \ + EXPECT_EQ(hash.hex(), EXPECTED_HASH); \ + } +TEST_HASH64_DEFAULT("04813672e758435e", 0) +TEST_HASH64_DEFAULT("94a804cfd260af7f", 1) +TEST_HASH64_DEFAULT("29a89eca1e769fc0", 2) +TEST_HASH64_DEFAULT("5ebc780ded4a9821", 3) +TEST_HASH64_DEFAULT("364b79cb969d9ca2", 4) +TEST_HASH64_DEFAULT("ffbab33e6a513143", 5) +TEST_HASH64_DEFAULT("f7111b0bb4775a04", 6) +TEST_HASH64_DEFAULT("d9347c8243629ae5", 7) +TEST_HASH64_DEFAULT("ffc40ccaafb5f7e6", 8) +TEST_HASH64_DEFAULT("f845a620a674f507", 9) +TEST_HASH64_DEFAULT("00fa6a3575139648", 10) +TEST_HASH64_DEFAULT("2047b0e417865fa9", 11) +TEST_HASH64_DEFAULT("293dcd670852552a", 12) +TEST_HASH64_DEFAULT("50f77a48129cfacb", 13) +TEST_HASH64_DEFAULT("6fe6c34a663c548c", 14) +TEST_HASH64_DEFAULT("6cbf2c972dc6e66d", 15) +TEST_HASH64_DEFAULT("04a4bf7ce6a3b46e", 16) +TEST_HASH64_DEFAULT("993caf19bb1a428f", 17) +TEST_HASH64_DEFAULT("c0d292511e6294d0", 18) +TEST_HASH64_DEFAULT("db24dc74eab52f31", 19) +TEST_HASH64_DEFAULT("3fc06b12415b15b2", 20) +TEST_HASH64_DEFAULT("37cdcd5a6cbdcc53", 21) +TEST_HASH64_DEFAULT("318778a804775714", 22) +TEST_HASH64_DEFAULT("62768da8936239f5", 23) +TEST_HASH64_DEFAULT("b14842baffa978f6", 24) +TEST_HASH64_DEFAULT("da509a1af4d89817", 25) +TEST_HASH64_DEFAULT("2463dd798feb9b58", 26) \ No newline at end of file From 26907d1f17cf1e489f255ec275207afc9ccded37 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Mon, 22 Jan 2024 01:14:41 -0600 Subject: [PATCH 420/539] Adding category id and auto-populating it if it is missing --- .../cpp_templates/class_template.hpp | 1 + .../output_proto/markers.bin | Bin 153 -> 163 bytes .../output_xml/xml_file.xml | 2 +- .../achievement_id/output_proto/markers.bin | 4 +- .../achievement_id/output_xml/xml_file.xml | 2 +- .../animation_speed/output_proto/markers.bin | Bin 642 -> 652 bytes .../animation_speed/output_xml/xml_file.xml | 2 +- .../canfade_invalid/output_proto/markers.bin | 4 +- .../canfade_invalid/output_xml/xml_file.xml | 2 +- .../canfade_valid/output_proto/markers.bin | 4 +- .../canfade_valid/output_xml/xml_file.xml | 2 +- .../category_name/output_proto/markers.bin | 4 +- .../category_name/output_xml/xml_file.xml | 2 +- .../output_xml/xml_file.xml | 4 +- .../cull_chirality/output_proto/markers.bin | 4 +- .../cull_chirality/output_xml/xml_file.xml | 2 +- .../fade_distance/output_proto/markers.bin | Bin 255 -> 265 bytes .../fade_distance/output_xml/xml_file.xml | 2 +- .../festival_filter/output_proto/markers.bin | 4 +- .../festival_filter/output_xml/xml_file.xml | 2 +- .../is_wall/output_proto/markers.bin | 4 +- .../is_wall/output_xml/xml_file.xml | 2 +- .../map_id/output_proto/markers.bin | 4 +- .../test_cases/map_id/output_xml/xml_file.xml | 2 +- .../map_type_filter/output_proto/markers.bin | 4 +- .../map_type_filter/output_xml/xml_file.xml | 2 +- .../output_proto/markers.bin | 4 +- .../output_xml/xml_file.xml | 2 +- .../output_proto/markers.bin | 4 +- .../mountfilter_valid/output_xml/xml_file.xml | 2 +- .../output_proto/markers.bin | 4 +- .../profession_filter/output_xml/xml_file.xml | 2 +- .../output_proto/markers.bin | 4 +- .../output_xml/xml_file.xml | 2 +- .../species_filter/output_proto/markers.bin | 4 +- .../species_filter/output_xml/xml_file.xml | 2 +- .../texture/output_proto/markers.bin | Bin 105 -> 115 bytes .../texture/output_xml/xml_file.xml | 2 +- xml_converter/proto/waypoint.proto | 1 + xml_converter/src/category_gen.cpp | 24 ++++++++++ xml_converter/src/category_gen.hpp | 4 ++ xml_converter/src/hash_helpers.cpp | 17 ++++++- xml_converter/src/hash_helpers.hpp | 3 +- xml_converter/src/packaging_xml.cpp | 43 ++++++++++++++++-- xml_converter/src/string_helper.cpp | 2 +- 45 files changed, 136 insertions(+), 55 deletions(-) diff --git a/xml_converter/generators/cpp_templates/class_template.hpp b/xml_converter/generators/cpp_templates/class_template.hpp index d509d9d7..f5294cc1 100644 --- a/xml_converter/generators/cpp_templates/class_template.hpp +++ b/xml_converter/generators/cpp_templates/class_template.hpp @@ -28,6 +28,7 @@ class {{cpp_class}} : public Parseable { std::map children; Icon default_icon; Trail default_trail; + Category* parent; void init_from_xml(rapidxml::xml_node<>* node, std::vector* errors, XMLReaderState* state); {% endif %} diff --git a/xml_converter/integration_tests/test_cases/achievement_bitmask_valid/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/achievement_bitmask_valid/output_proto/markers.bin index 6145a43afd1d9d981f575b7f3af3c14346c58450..a78bad0809d339dc9aa675ae823c39978ece2fd4 100644 GIT binary patch delta 21 dcmbQqxR{ZNYr#aO>0C}68ZXYU9hw|B4FE^_2b2H+ delta 10 RcmZ3?IFpfyYuZGn=>QNU0}B8E diff --git a/xml_converter/integration_tests/test_cases/achievement_bitmask_valid/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/achievement_bitmask_valid/output_xml/xml_file.xml index 7535e6e6..b07e3ef9 100644 --- a/xml_converter/integration_tests/test_cases/achievement_bitmask_valid/output_xml/xml_file.xml +++ b/xml_converter/integration_tests/test_cases/achievement_bitmask_valid/output_xml/xml_file.xml @@ -1,5 +1,5 @@ - + diff --git a/xml_converter/integration_tests/test_cases/achievement_id/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/achievement_id/output_proto/markers.bin index a5b458eb..df6a9bb5 100644 --- a/xml_converter/integration_tests/test_cases/achievement_id/output_proto/markers.bin +++ b/xml_converter/integration_tests/test_cases/achievement_id/output_proto/markers.bin @@ -1,3 +1,3 @@ -µ - My Category 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWCˆ 2B \Ï)Cf¦RC{ÔWCˆ 2B \Ï)Cf¦RC{ÔWCˆÿÿÿÿ 2B \Ï)Cf¦RC{ÔWCˆ€€€€øÿÿÿÿ 2B \Ï)Cf¦RC{ÔWCˆûÿÿÿÿÿÿÿÿ"ˆ \ No newline at end of file +¿ + My Category 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWCˆ 2B \Ï)Cf¦RC{ÔWCˆ 2B \Ï)Cf¦RC{ÔWCˆÿÿÿÿ 2B \Ï)Cf¦RC{ÔWCˆ€€€€øÿÿÿÿ 2B \Ï)Cf¦RC{ÔWCˆûÿÿÿÿÿÿÿÿ"ˆB(èÌ“^– \ No newline at end of file diff --git a/xml_converter/integration_tests/test_cases/achievement_id/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/achievement_id/output_xml/xml_file.xml index 00cfc8cc..7da09fb4 100644 --- a/xml_converter/integration_tests/test_cases/achievement_id/output_xml/xml_file.xml +++ b/xml_converter/integration_tests/test_cases/achievement_id/output_xml/xml_file.xml @@ -1,5 +1,5 @@ - + diff --git a/xml_converter/integration_tests/test_cases/animation_speed/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/animation_speed/output_proto/markers.bin index 269c512cc66e9454650f74aeff886b3e17a900fa..6306612065dc28e9cf1ad665e9b4de791ebe57d3 100644 GIT binary patch delta 23 ecmZo-?O|o+>SW!>T+hVi#G&!x4BMf}ank@vSO;hT delta 12 TcmeBSZDM8S`p>eFxt<9C7EJ?Q diff --git a/xml_converter/integration_tests/test_cases/animation_speed/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/animation_speed/output_xml/xml_file.xml index d3c71cf6..ff5aa933 100644 --- a/xml_converter/integration_tests/test_cases/animation_speed/output_xml/xml_file.xml +++ b/xml_converter/integration_tests/test_cases/animation_speed/output_xml/xml_file.xml @@ -1,5 +1,5 @@ - + diff --git a/xml_converter/integration_tests/test_cases/canfade_invalid/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/canfade_invalid/output_proto/markers.bin index c32cb0ef..9adc8734 100644 --- a/xml_converter/integration_tests/test_cases/canfade_invalid/output_proto/markers.bin +++ b/xml_converter/integration_tests/test_cases/canfade_invalid/output_proto/markers.bin @@ -1,3 +1,3 @@ -7 - My Category 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC \ No newline at end of file +A + My Category 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWCB(èÌ“^– \ No newline at end of file diff --git a/xml_converter/integration_tests/test_cases/canfade_invalid/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/canfade_invalid/output_xml/xml_file.xml index 56b79ea1..b164fa46 100644 --- a/xml_converter/integration_tests/test_cases/canfade_invalid/output_xml/xml_file.xml +++ b/xml_converter/integration_tests/test_cases/canfade_invalid/output_xml/xml_file.xml @@ -1,5 +1,5 @@ - + diff --git a/xml_converter/integration_tests/test_cases/canfade_valid/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/canfade_valid/output_proto/markers.bin index a1e1c437..a900d117 100644 --- a/xml_converter/integration_tests/test_cases/canfade_valid/output_proto/markers.bin +++ b/xml_converter/integration_tests/test_cases/canfade_valid/output_proto/markers.bin @@ -1,3 +1,3 @@ -g - My Category 2B \Ï)Cf¦RC{ÔWC˜ 2B \Ï)Cf¦RC{ÔWC˜ 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC \ No newline at end of file +q + My Category 2B \Ï)Cf¦RC{ÔWC˜ 2B \Ï)Cf¦RC{ÔWC˜ 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWCB(èÌ“^– \ No newline at end of file diff --git a/xml_converter/integration_tests/test_cases/canfade_valid/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/canfade_valid/output_xml/xml_file.xml index 2850f7f7..6e16afe3 100644 --- a/xml_converter/integration_tests/test_cases/canfade_valid/output_xml/xml_file.xml +++ b/xml_converter/integration_tests/test_cases/canfade_valid/output_xml/xml_file.xml @@ -1,5 +1,5 @@ - + diff --git a/xml_converter/integration_tests/test_cases/category_name/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/category_name/output_proto/markers.bin index a89a9d4a..27e2fe03 100644 --- a/xml_converter/integration_tests/test_cases/category_name/output_proto/markers.bin +++ b/xml_converter/integration_tests/test_cases/category_name/output_proto/markers.bin @@ -1,3 +1,3 @@ -L - My Category 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC \ No newline at end of file +V + My Category 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWCB(èÌ“^– \ No newline at end of file diff --git a/xml_converter/integration_tests/test_cases/category_name/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/category_name/output_xml/xml_file.xml index 0a23d2a0..daab7542 100644 --- a/xml_converter/integration_tests/test_cases/category_name/output_xml/xml_file.xml +++ b/xml_converter/integration_tests/test_cases/category_name/output_xml/xml_file.xml @@ -1,5 +1,5 @@ - + diff --git a/xml_converter/integration_tests/test_cases/category_name_invalid/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/category_name_invalid/output_xml/xml_file.xml index d6de0503..e9f72087 100644 --- a/xml_converter/integration_tests/test_cases/category_name_invalid/output_xml/xml_file.xml +++ b/xml_converter/integration_tests/test_cases/category_name_invalid/output_xml/xml_file.xml @@ -1,8 +1,8 @@ - + - + diff --git a/xml_converter/integration_tests/test_cases/cull_chirality/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/cull_chirality/output_proto/markers.bin index 0c984e70..480cc9ab 100644 --- a/xml_converter/integration_tests/test_cases/cull_chirality/output_proto/markers.bin +++ b/xml_converter/integration_tests/test_cases/cull_chirality/output_proto/markers.bin @@ -1,3 +1,3 @@ -R - My Category 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWCˆ 2B \Ï)Cf¦RC{ÔWCˆ \ No newline at end of file +\ + My Category 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWCˆ 2B \Ï)Cf¦RC{ÔWCˆB(èÌ“^– \ No newline at end of file diff --git a/xml_converter/integration_tests/test_cases/cull_chirality/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/cull_chirality/output_xml/xml_file.xml index d9a87c98..f9793d06 100644 --- a/xml_converter/integration_tests/test_cases/cull_chirality/output_xml/xml_file.xml +++ b/xml_converter/integration_tests/test_cases/cull_chirality/output_xml/xml_file.xml @@ -1,5 +1,5 @@ - + diff --git a/xml_converter/integration_tests/test_cases/fade_distance/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/fade_distance/output_proto/markers.bin index 68ae59c38b05ed84d8f3f6628ed87c2e1c12a750..d69ff8710e4d62cd89e64b067e49d9225901ef70 100644 GIT binary patch delta 22 ecmey**vZ7q)y6cD`45*9hsKLDY= - + diff --git a/xml_converter/integration_tests/test_cases/festival_filter/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/festival_filter/output_proto/markers.bin index 57f60e15..ca65d1f0 100644 --- a/xml_converter/integration_tests/test_cases/festival_filter/output_proto/markers.bin +++ b/xml_converter/integration_tests/test_cases/festival_filter/output_proto/markers.bin @@ -1,3 +1,3 @@ -y - My Category 2B \Ï)Cf¦RC{ÔWCÚ 2B \Ï)Cf¦RC{ÔWCÚ( 2B \Ï)Cf¦RC{ÔWCÚ( 2B \Ï)Cf¦RC{ÔWCÚ  \ No newline at end of file +ƒ + My Category 2B \Ï)Cf¦RC{ÔWCÚ 2B \Ï)Cf¦RC{ÔWCÚ( 2B \Ï)Cf¦RC{ÔWCÚ( 2B \Ï)Cf¦RC{ÔWCÚ B(èÌ“^– \ No newline at end of file diff --git a/xml_converter/integration_tests/test_cases/festival_filter/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/festival_filter/output_xml/xml_file.xml index 23d92fd3..70310c54 100644 --- a/xml_converter/integration_tests/test_cases/festival_filter/output_xml/xml_file.xml +++ b/xml_converter/integration_tests/test_cases/festival_filter/output_xml/xml_file.xml @@ -1,5 +1,5 @@ - + diff --git a/xml_converter/integration_tests/test_cases/is_wall/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/is_wall/output_proto/markers.bin index 8984f382..da32a101 100644 --- a/xml_converter/integration_tests/test_cases/is_wall/output_proto/markers.bin +++ b/xml_converter/integration_tests/test_cases/is_wall/output_proto/markers.bin @@ -1,3 +1,3 @@ -# - My Category" 2 " 2 " 2" 2 \ No newline at end of file +- + My Category" 2 " 2 " 2" 2B(èÌ“^– \ No newline at end of file diff --git a/xml_converter/integration_tests/test_cases/is_wall/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/is_wall/output_xml/xml_file.xml index caabb11a..5cbc4149 100644 --- a/xml_converter/integration_tests/test_cases/is_wall/output_xml/xml_file.xml +++ b/xml_converter/integration_tests/test_cases/is_wall/output_xml/xml_file.xml @@ -1,5 +1,5 @@ - + diff --git a/xml_converter/integration_tests/test_cases/map_id/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/map_id/output_proto/markers.bin index cdc94a2a..24fdb7f4 100644 --- a/xml_converter/integration_tests/test_cases/map_id/output_proto/markers.bin +++ b/xml_converter/integration_tests/test_cases/map_id/output_proto/markers.bin @@ -1,3 +1,3 @@ -x - My CategoryB \Ï)Cf¦RC{ÔWC B \Ï)Cf¦RC{ÔWC B \Ï)Cf¦RC{ÔWC ÿÿÿÿB \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC \ No newline at end of file +‚ + My CategoryB \Ï)Cf¦RC{ÔWC B \Ï)Cf¦RC{ÔWC B \Ï)Cf¦RC{ÔWC ÿÿÿÿB \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWCB(èÌ“^– \ No newline at end of file diff --git a/xml_converter/integration_tests/test_cases/map_id/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/map_id/output_xml/xml_file.xml index 7cd7d10b..40133f47 100644 --- a/xml_converter/integration_tests/test_cases/map_id/output_xml/xml_file.xml +++ b/xml_converter/integration_tests/test_cases/map_id/output_xml/xml_file.xml @@ -1,5 +1,5 @@ - + diff --git a/xml_converter/integration_tests/test_cases/map_type_filter/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/map_type_filter/output_proto/markers.bin index 416391e4..9cdd92bd 100644 --- a/xml_converter/integration_tests/test_cases/map_type_filter/output_proto/markers.bin +++ b/xml_converter/integration_tests/test_cases/map_type_filter/output_proto/markers.bin @@ -1,3 +1,3 @@ -Ì - My Category 2B \Ï)Cf¦RC{ÔWCâ 2B \Ï)Cf¦RC{ÔWCâ 2B \Ï)Cf¦RC{ÔWCâ 2B \Ï)Cf¦RC{ÔWCâO 2B \Ï)Cf¦RC{ÔWCâ9 (08@HPX`hpx€ˆ˜ ¨°¸À \ No newline at end of file +Ö + My Category 2B \Ï)Cf¦RC{ÔWCâ 2B \Ï)Cf¦RC{ÔWCâ 2B \Ï)Cf¦RC{ÔWCâ 2B \Ï)Cf¦RC{ÔWCâO 2B \Ï)Cf¦RC{ÔWCâ9 (08@HPX`hpx€ˆ˜ ¨°¸ÀB(èÌ“^– \ No newline at end of file diff --git a/xml_converter/integration_tests/test_cases/map_type_filter/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/map_type_filter/output_xml/xml_file.xml index 41115909..71c21475 100644 --- a/xml_converter/integration_tests/test_cases/map_type_filter/output_xml/xml_file.xml +++ b/xml_converter/integration_tests/test_cases/map_type_filter/output_xml/xml_file.xml @@ -1,5 +1,5 @@ - + diff --git a/xml_converter/integration_tests/test_cases/mount_filter_invalid/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/mount_filter_invalid/output_proto/markers.bin index 3e5a1112..0e68e64b 100644 --- a/xml_converter/integration_tests/test_cases/mount_filter_invalid/output_proto/markers.bin +++ b/xml_converter/integration_tests/test_cases/mount_filter_invalid/output_proto/markers.bin @@ -1,3 +1,3 @@ -o - My Category 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWCê 2B \Ï)Cf¦RC{ÔWCê \ No newline at end of file +y + My Category 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWCê 2B \Ï)Cf¦RC{ÔWCêB(èÌ“^– \ No newline at end of file diff --git a/xml_converter/integration_tests/test_cases/mount_filter_invalid/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/mount_filter_invalid/output_xml/xml_file.xml index 53b34efe..14caab92 100644 --- a/xml_converter/integration_tests/test_cases/mount_filter_invalid/output_xml/xml_file.xml +++ b/xml_converter/integration_tests/test_cases/mount_filter_invalid/output_xml/xml_file.xml @@ -1,5 +1,5 @@ - + diff --git a/xml_converter/integration_tests/test_cases/mountfilter_valid/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/mountfilter_valid/output_proto/markers.bin index 4236a31f..7df59e89 100644 --- a/xml_converter/integration_tests/test_cases/mountfilter_valid/output_proto/markers.bin +++ b/xml_converter/integration_tests/test_cases/mountfilter_valid/output_proto/markers.bin @@ -1,3 +1,3 @@ -‹ - My Category 2B \Ï)Cf¦RC{ÔWCê 2B \Ï)Cf¦RC{ÔWCê 2B \Ï)Cf¦RC{ÔWCê* 2B \Ï)Cf¦RC{ÔWCê (08@HP \ No newline at end of file +• + My Category 2B \Ï)Cf¦RC{ÔWCê 2B \Ï)Cf¦RC{ÔWCê 2B \Ï)Cf¦RC{ÔWCê* 2B \Ï)Cf¦RC{ÔWCê (08@HPB(èÌ“^– \ No newline at end of file diff --git a/xml_converter/integration_tests/test_cases/mountfilter_valid/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/mountfilter_valid/output_xml/xml_file.xml index 38abbed2..35527920 100644 --- a/xml_converter/integration_tests/test_cases/mountfilter_valid/output_xml/xml_file.xml +++ b/xml_converter/integration_tests/test_cases/mountfilter_valid/output_xml/xml_file.xml @@ -1,5 +1,5 @@ - + diff --git a/xml_converter/integration_tests/test_cases/profession_filter/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/profession_filter/output_proto/markers.bin index 0847dc80..46fbad2c 100644 --- a/xml_converter/integration_tests/test_cases/profession_filter/output_proto/markers.bin +++ b/xml_converter/integration_tests/test_cases/profession_filter/output_proto/markers.bin @@ -1,3 +1,3 @@ -¥ - My Category 2B \Ï)Cf¦RC{ÔWCò 2B \Ï)Cf¦RC{ÔWCò 2B \Ï)Cf¦RC{ÔWCò 2B \Ï)Cf¦RC{ÔWCò( 2B \Ï)Cf¦RC{ÔWCò (08@H \ No newline at end of file +¯ + My Category 2B \Ï)Cf¦RC{ÔWCò 2B \Ï)Cf¦RC{ÔWCò 2B \Ï)Cf¦RC{ÔWCò 2B \Ï)Cf¦RC{ÔWCò( 2B \Ï)Cf¦RC{ÔWCò (08@HB(èÌ“^– \ No newline at end of file diff --git a/xml_converter/integration_tests/test_cases/profession_filter/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/profession_filter/output_xml/xml_file.xml index ecf54043..a81f4c58 100644 --- a/xml_converter/integration_tests/test_cases/profession_filter/output_xml/xml_file.xml +++ b/xml_converter/integration_tests/test_cases/profession_filter/output_xml/xml_file.xml @@ -1,5 +1,5 @@ - + diff --git a/xml_converter/integration_tests/test_cases/specialization_filter/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/specialization_filter/output_proto/markers.bin index 8fdc192e..cffd4543 100644 --- a/xml_converter/integration_tests/test_cases/specialization_filter/output_proto/markers.bin +++ b/xml_converter/integration_tests/test_cases/specialization_filter/output_proto/markers.bin @@ -1,3 +1,3 @@ -» - My Category 2B \Ï)Cf¦RC{ÔWCú` 2B \Ï)Cf¦RC{ÔWCúH 2B \Ï)Cf¦RC{ÔWCúX 2B \Ï)Cf¦RC{ÔWCú¨Øà 2B \Ï)Cf¦RC{ÔWCúÉ (08@HPX`hpx€ˆ˜ ¨°¸ÀÈÐØàèðø€ˆ˜ ¨°¸ÀÈÐØàèðø€ˆ˜ ¨°¸ÀÈÐØàèðø€ˆ˜ ¨°¸ÀX 2B \Ï)Cf¦RC{ÔWCúB (08@HPX`hpx€ˆ˜ ¨°¸ÀÈÐØ \ No newline at end of file +Å + My Category 2B \Ï)Cf¦RC{ÔWCú` 2B \Ï)Cf¦RC{ÔWCúH 2B \Ï)Cf¦RC{ÔWCúX 2B \Ï)Cf¦RC{ÔWCú¨Øà 2B \Ï)Cf¦RC{ÔWCúÉ (08@HPX`hpx€ˆ˜ ¨°¸ÀÈÐØàèðø€ˆ˜ ¨°¸ÀÈÐØàèðø€ˆ˜ ¨°¸ÀÈÐØàèðø€ˆ˜ ¨°¸ÀX 2B \Ï)Cf¦RC{ÔWCúB (08@HPX`hpx€ˆ˜ ¨°¸ÀÈÐØB(èÌ“^– \ No newline at end of file diff --git a/xml_converter/integration_tests/test_cases/specialization_filter/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/specialization_filter/output_xml/xml_file.xml index 05f8f905..46415be0 100644 --- a/xml_converter/integration_tests/test_cases/specialization_filter/output_xml/xml_file.xml +++ b/xml_converter/integration_tests/test_cases/specialization_filter/output_xml/xml_file.xml @@ -1,5 +1,5 @@ - + diff --git a/xml_converter/integration_tests/test_cases/species_filter/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/species_filter/output_proto/markers.bin index 15f18c1b..efe60a25 100644 --- a/xml_converter/integration_tests/test_cases/species_filter/output_proto/markers.bin +++ b/xml_converter/integration_tests/test_cases/species_filter/output_proto/markers.bin @@ -1,5 +1,5 @@ -­ +· My Category 2B \Ï)Cf¦RC{ÔWC‚ 2B \Ï)Cf¦RC{ÔWC‚ 2B \Ï)Cf¦RC{ÔWC‚ 2B \Ï)Cf¦RC{ÔWC‚  2B \Ï)Cf¦RC{ÔWC‚  ( 2B \Ï)Cf¦RC{ÔWC‚ 2B \Ï)Cf¦RC{ÔWC‚ 2B \Ï)Cf¦RC{ÔWC‚ 2B \Ï)Cf¦RC{ÔWC‚  2B \Ï)Cf¦RC{ÔWC‚ - ( \ No newline at end of file + (B(èÌ“^– \ No newline at end of file diff --git a/xml_converter/integration_tests/test_cases/species_filter/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/species_filter/output_xml/xml_file.xml index b2719c10..5d6e93c2 100644 --- a/xml_converter/integration_tests/test_cases/species_filter/output_xml/xml_file.xml +++ b/xml_converter/integration_tests/test_cases/species_filter/output_xml/xml_file.xml @@ -1,5 +1,5 @@ - + diff --git a/xml_converter/integration_tests/test_cases/texture/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/texture/output_proto/markers.bin index ef56f99965e4e270aadd3d20ff1d553c01503e9f..075d211766ee2275192b9b90f632d64e74d7c8e3 100644 GIT binary patch delta 22 ecmc~SX5!MH$fU~U#G&!x4BMf}anmNMI{^SlMh8g% delta 11 ScmXTUWa3ht$fP>a& - + diff --git a/xml_converter/proto/waypoint.proto b/xml_converter/proto/waypoint.proto index 71c50d16..53b50e79 100644 --- a/xml_converter/proto/waypoint.proto +++ b/xml_converter/proto/waypoint.proto @@ -23,6 +23,7 @@ message Category { bool is_separator = 5; bool default_visibility = 6; string tip_description = 7; + bytes id = 8; } message Icon { diff --git a/xml_converter/src/category_gen.cpp b/xml_converter/src/category_gen.cpp index 39495ffc..c2674d65 100644 --- a/xml_converter/src/category_gen.cpp +++ b/xml_converter/src/category_gen.cpp @@ -45,6 +45,12 @@ bool Category::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectoris_separator), &(this->is_separator_is_set)); } + else if (attributename == "id") { + xml_attribute_to_unique_id(attribute, errors, state, &(this->menu_id), &(this->menu_id_is_set)); + } + else if (attributename == "menuid") { + xml_attribute_to_unique_id(attribute, errors, state, &(this->menu_id), &(this->menu_id_is_set)); + } else if (attributename == "name") { xml_attribute_to_string(attribute, errors, state, &(this->name), &(this->name_is_set)); } @@ -69,6 +75,9 @@ vector Category::as_xml(XMLWriterState* state) const { if (this->is_separator_is_set) { xml_node_contents.push_back(bool_to_xml_attribute("IsSeparator", state, &this->is_separator)); } + if (this->menu_id_is_set) { + xml_node_contents.push_back(unique_id_to_xml_attribute("ID", state, &this->menu_id)); + } if (this->name_is_set) { xml_node_contents.push_back(string_to_xml_attribute("Name", state, &this->name)); } @@ -104,6 +113,10 @@ waypoint::Category Category::as_protobuf(ProtoWriterState* state) const { std::function setter = [&proto_category](bool val) { proto_category.set_is_separator(val); }; bool_to_proto(this->is_separator, state, setter); } + if (this->menu_id_is_set) { + std::function setter = [&proto_category](std::string val) { proto_category.set_id(val); }; + unique_id_to_proto(this->menu_id, state, setter); + } if (this->name_is_set) { std::function setter = [&proto_category](std::string val) { proto_category.set_name(val); }; do_nothing(this->name, state, setter); @@ -125,6 +138,9 @@ void Category::parse_protobuf(waypoint::Category proto_category, ProtoReaderStat if (proto_category.is_separator() != 0) { proto_to_bool(proto_category.is_separator(), state, &(this->is_separator), &(this->is_separator_is_set)); } + if (proto_category.id() != "") { + proto_to_unique_id(proto_category.id(), state, &(this->menu_id), &(this->menu_id_is_set)); + } if (proto_category.name() != "") { do_nothing(proto_category.name(), state, &(this->name), &(this->name_is_set)); } @@ -152,6 +168,10 @@ void Category::apply_underlay(const Category& underlay) { this->is_separator = underlay.is_separator; this->is_separator_is_set = true; } + if (!this->menu_id_is_set && underlay.menu_id_is_set) { + this->menu_id = underlay.menu_id; + this->menu_id_is_set = true; + } if (!this->name_is_set && underlay.name_is_set) { this->name = underlay.name; this->name_is_set = true; @@ -184,6 +204,10 @@ void Category::apply_overlay(const Category& overlay) { this->is_separator = overlay.is_separator; this->is_separator_is_set = true; } + if (overlay.menu_id_is_set) { + this->menu_id = overlay.menu_id; + this->menu_id_is_set = true; + } if (overlay.name_is_set) { this->name = overlay.name; this->name_is_set = true; diff --git a/xml_converter/src/category_gen.hpp b/xml_converter/src/category_gen.hpp index 4a6ecf91..840ee16a 100644 --- a/xml_converter/src/category_gen.hpp +++ b/xml_converter/src/category_gen.hpp @@ -5,6 +5,7 @@ #include #include +#include "attribute/unique_id.hpp" #include "icon_gen.hpp" #include "parseable.hpp" #include "rapidxml-1.13/rapidxml.hpp" @@ -19,16 +20,19 @@ class Category : public Parseable { bool default_visibility; std::string display_name; bool is_separator; + UniqueId menu_id; std::string name; std::string tooltip_description; bool default_visibility_is_set = false; bool display_name_is_set = false; bool is_separator_is_set = false; + bool menu_id_is_set = false; bool name_is_set = false; bool tooltip_description_is_set = false; std::map children; Icon default_icon; Trail default_trail; + Category* parent; void init_from_xml(rapidxml::xml_node<>* node, std::vector* errors, XMLReaderState* state); virtual std::vector as_xml(XMLWriterState* state) const; diff --git a/xml_converter/src/hash_helpers.cpp b/xml_converter/src/hash_helpers.cpp index 1c7ad3b9..7e54317e 100644 --- a/xml_converter/src/hash_helpers.cpp +++ b/xml_converter/src/hash_helpers.cpp @@ -1,7 +1,7 @@ // Hashing #include "hash_helpers.hpp" -const char* hex_chars = "0123456789abcdef"; +static const char* hex_chars = "0123456789abcdef"; Hash64::Hash64() { this->hash = 0b0000010010000001001101100111001011100111010110000100001101011110; @@ -81,3 +81,18 @@ std::string Hash128::hex() const { return hex_string; } + +UniqueId Hash128::unique_id() const { + UniqueId unique_id; + unique_id.guid = { + (unsigned char)((this->upper >> 0) & 0xFF), + (unsigned char)((this->upper >> 8) & 0xFF), + (unsigned char)((this->upper >> 16) & 0xFF), + (unsigned char)((this->upper >> 24) & 0xFF), + (unsigned char)((this->lower >> 0) & 0xFF), + (unsigned char)((this->lower >> 8) & 0xFF), + (unsigned char)((this->lower >> 16) & 0xFF), + (unsigned char)((this->lower >> 24) & 0xFF), + }; + return unique_id; +} \ No newline at end of file diff --git a/xml_converter/src/hash_helpers.hpp b/xml_converter/src/hash_helpers.hpp index 6ce2c40c..82e4af6c 100644 --- a/xml_converter/src/hash_helpers.hpp +++ b/xml_converter/src/hash_helpers.hpp @@ -1,6 +1,7 @@ #pragma once #include +#include "attribute/unique_id.hpp" class Hash64 { private: @@ -25,5 +26,5 @@ class Hash128 { void update(const unsigned char* str, size_t length); void update(const std::string& str); std::string hex() const; - std::string base64() const; + UniqueId unique_id() const; }; diff --git a/xml_converter/src/packaging_xml.cpp b/xml_converter/src/packaging_xml.cpp index b5dddf16..945cbe3d 100644 --- a/xml_converter/src/packaging_xml.cpp +++ b/xml_converter/src/packaging_xml.cpp @@ -6,6 +6,7 @@ #include "rapidxml-1.13/rapidxml.hpp" #include "rapidxml-1.13/rapidxml_utils.hpp" #include "string_helper.hpp" +#include "hash_helpers.hpp" using namespace std; @@ -14,7 +15,13 @@ using namespace std; //////////////////////////////////////////////////////////////////////////////// unsigned int UNKNOWN_CATEGORY_COUNTER = 0; -void parse_marker_categories(rapidxml::xml_node<>* node, map* marker_categories, vector* errors, string base_dir, int depth = 0) { +void parse_marker_categories( + rapidxml::xml_node<>* node, + map* marker_categories, + Category* parent, + vector* errors, + string base_dir, + int depth = 0) { if (get_node_name(node) == "MarkerCategory") { XMLReaderState state = { base_dir, @@ -41,11 +48,39 @@ void parse_marker_categories(rapidxml::xml_node<>* node, map* name = lowercase(new_category.name); } - Category* existing_category = &(*marker_categories)[name]; + // If this category itself, without any cascading values, does not have + // an id then create a new one for it based on the hashes of its name + // and its parents names. + if (!new_category.menu_id_is_set) { + Hash128 new_id; + new_id.update(name); + + Category* next_node = parent; + while (next_node != nullptr) { + new_id.update(next_node->name); + next_node = next_node->parent; + } + new_category.menu_id = new_id.unique_id(); + new_category.menu_id_is_set = true; + } + + // Create and initialize a new category if this one does not exist + Category* existing_category; + auto existing_category_search = marker_categories->find(name); + if (existing_category_search == marker_categories->end()) { + existing_category = &(*marker_categories)[name]; + existing_category->parent = parent; + } + else { + existing_category = &existing_category_search->second; + if (existing_category->parent != parent) { + errors->push_back(new XMLNodeNameError("Category somehow has a different parent then it used to. This might be a bug in xml_converter", node)); + } + } existing_category->apply_overlay(new_category); for (rapidxml::xml_node<>* child_node = node->first_node(); child_node; child_node = child_node->next_sibling()) { - parse_marker_categories(child_node, &(existing_category->children), errors, base_dir, depth + 1); + parse_marker_categories(child_node, &(existing_category->children), existing_category, errors, base_dir, depth + 1); } } else { @@ -161,7 +196,7 @@ void parse_xml_file(string xml_filepath, map* marker_categorie for (rapidxml::xml_node<>* node = root_node->first_node(); node; node = node->next_sibling()) { if (get_node_name(node) == "MarkerCategory") { - parse_marker_categories(node, marker_categories, &errors, base_dir); + parse_marker_categories(node, marker_categories, nullptr, &errors, base_dir); } else if (get_node_name(node) == "POIs") { vector temp_vector = parse_pois(node, marker_categories, &errors, base_dir); diff --git a/xml_converter/src/string_helper.cpp b/xml_converter/src/string_helper.cpp index e6b082e5..a8c7ca32 100644 --- a/xml_converter/src/string_helper.cpp +++ b/xml_converter/src/string_helper.cpp @@ -301,7 +301,7 @@ string join_file_paths(const string& path_a, const string& path_b) { // // A helper function that converts an 8 byte long into a 16 byte hex string. //////////////////////////////////////////////////////////////////////////////// -const char* hex_chars = "0123456789abcdef"; +static const char* hex_chars = "0123456789abcdef"; std::string long_to_hex_string(uint64_t number) { std::string hex_string(16, '0'); From b8862df0349a8c701a3864a5fef421f7db00b4d9 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Mon, 22 Jan 2024 01:17:34 -0600 Subject: [PATCH 421/539] linter fixes --- xml_converter/src/hash_helpers.cpp | 2 +- xml_converter/src/hash_helpers.hpp | 1 + xml_converter/src/packaging_xml.cpp | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/xml_converter/src/hash_helpers.cpp b/xml_converter/src/hash_helpers.cpp index 7e54317e..2401d204 100644 --- a/xml_converter/src/hash_helpers.cpp +++ b/xml_converter/src/hash_helpers.cpp @@ -95,4 +95,4 @@ UniqueId Hash128::unique_id() const { (unsigned char)((this->lower >> 24) & 0xFF), }; return unique_id; -} \ No newline at end of file +} diff --git a/xml_converter/src/hash_helpers.hpp b/xml_converter/src/hash_helpers.hpp index 82e4af6c..9f982918 100644 --- a/xml_converter/src/hash_helpers.hpp +++ b/xml_converter/src/hash_helpers.hpp @@ -1,6 +1,7 @@ #pragma once #include + #include "attribute/unique_id.hpp" class Hash64 { diff --git a/xml_converter/src/packaging_xml.cpp b/xml_converter/src/packaging_xml.cpp index 945cbe3d..56b0e68e 100644 --- a/xml_converter/src/packaging_xml.cpp +++ b/xml_converter/src/packaging_xml.cpp @@ -2,11 +2,11 @@ #include +#include "hash_helpers.hpp" #include "rapid_helpers.hpp" #include "rapidxml-1.13/rapidxml.hpp" #include "rapidxml-1.13/rapidxml_utils.hpp" #include "string_helper.hpp" -#include "hash_helpers.hpp" using namespace std; From 886a0dc83cc20c4680ba93f317cb6b851b3d5b8e Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Mon, 22 Jan 2024 01:37:02 -0600 Subject: [PATCH 422/539] Adding a couple of sanity tests and making base64 logic more readable --- xml_converter/src/string_helper.cpp | 50 ++++++++++----------- xml_converter/tests/test_base64.cpp | 67 +++++++++++++++++++++++++++++ 2 files changed, 93 insertions(+), 24 deletions(-) create mode 100644 xml_converter/tests/test_base64.cpp diff --git a/xml_converter/src/string_helper.cpp b/xml_converter/src/string_helper.cpp index a8c7ca32..3f0056f2 100644 --- a/xml_converter/src/string_helper.cpp +++ b/xml_converter/src/string_helper.cpp @@ -144,41 +144,41 @@ static const char base64_chars[] = std::string base64_encode(uint8_t const* buf, unsigned int bufLen) { std::string ret; - int i = 0; - int j = 0; - uint8_t char_array_3[3]; - uint8_t char_array_4[4]; + int input_chunk_index = 0; + int output_chunk_index = 0; + uint8_t input_chunk[3]; + uint8_t output_chunk[4]; while (bufLen--) { - char_array_3[i++] = *(buf++); - if (i == 3) { - char_array_4[0] = (char_array_3[0] & 0xfc) >> 2; - char_array_4[1] = ((char_array_3[0] & 0x03) << 4) + ((char_array_3[1] & 0xf0) >> 4); - char_array_4[2] = ((char_array_3[1] & 0x0f) << 2) + ((char_array_3[2] & 0xc0) >> 6); - char_array_4[3] = char_array_3[2] & 0x3f; - - for (i = 0; (i < 4); i++) { - ret += base64_chars[char_array_4[i]]; + input_chunk[input_chunk_index++] = *(buf++); + if (input_chunk_index == 3) { + output_chunk[0] = (input_chunk[0] & 0xfc) >> 2; + output_chunk[1] = ((input_chunk[0] & 0x03) << 4) + ((input_chunk[1] & 0xf0) >> 4); + output_chunk[2] = ((input_chunk[1] & 0x0f) << 2) + ((input_chunk[2] & 0xc0) >> 6); + output_chunk[3] = input_chunk[2] & 0x3f; + + for (output_chunk_index = 0; output_chunk_index < 4; output_chunk_index++) { + ret += base64_chars[output_chunk[output_chunk_index]]; } - i = 0; + input_chunk_index = 0; } } - if (i) { - for (j = i; j < 3; j++) { - char_array_3[j] = '\0'; + if (input_chunk_index > 0) { + for (output_chunk_index = input_chunk_index; output_chunk_index < 3; output_chunk_index++) { + input_chunk[output_chunk_index] = 0; } - char_array_4[0] = (char_array_3[0] & 0xfc) >> 2; - char_array_4[1] = ((char_array_3[0] & 0x03) << 4) + ((char_array_3[1] & 0xf0) >> 4); - char_array_4[2] = ((char_array_3[1] & 0x0f) << 2) + ((char_array_3[2] & 0xc0) >> 6); - char_array_4[3] = char_array_3[2] & 0x3f; + output_chunk[0] = (input_chunk[0] & 0xfc) >> 2; + output_chunk[1] = ((input_chunk[0] & 0x03) << 4) + ((input_chunk[1] & 0xf0) >> 4); + output_chunk[2] = ((input_chunk[1] & 0x0f) << 2) + ((input_chunk[2] & 0xc0) >> 6); + output_chunk[3] = input_chunk[2] & 0x3f; - for (j = 0; (j < i + 1); j++) { - ret += base64_chars[char_array_4[j]]; + for (output_chunk_index = 0; (output_chunk_index < input_chunk_index + 1); output_chunk_index++) { + ret += base64_chars[output_chunk[output_chunk_index]]; } - while (i++ < 3) { + while (input_chunk_index++ < 3) { ret += '='; } } @@ -239,6 +239,7 @@ std::vector base64_decode(std::string const& encoded_string) { if (char_array_4[i] == 255) { // TODO: Throw an error or something + std::cerr << "Found an invalid letter when decoding base64" << std::endl; return std::vector(); } } @@ -259,6 +260,7 @@ std::vector base64_decode(std::string const& encoded_string) { if (char_array_4[i] == 255) { // TODO: Throw an error or something + std::cerr << "Found an invalid letter when decoding base64" << std::endl; return std::vector(); } } diff --git a/xml_converter/tests/test_base64.cpp b/xml_converter/tests/test_base64.cpp new file mode 100644 index 00000000..a7a996b5 --- /dev/null +++ b/xml_converter/tests/test_base64.cpp @@ -0,0 +1,67 @@ +#include "../src/string_helper.hpp" +#include + +class Base64Test : public ::testing::Test {}; + +// Test Strip Bits + +//////////////////////////////////////////////////////////////////////////////// +// Test Double Strip Bits +// +// When there are `len%4 = 2` there are 4 extra bits stored in the base64 string +// This means that decoding and encoding that data will result in slightly +// different data bsecause those 4 extra bits get stripped off. This tests all +// of those different values so that we can be sure everything is happening +// deterministically. +//////////////////////////////////////////////////////////////////////////////// +TEST_F(Base64Test, DoubleStripBits00) { + // These are all of the base 64 characters which start with the binary + // digits 00 and end with nonzero digits. + std::string b64_00_characters = "BCDEFGHIJKLMNOP"; + + for (size_t i = 0; i < b64_00_characters.size(); i++) { + std::string input = "A_"; + input[1] = b64_00_characters[i]; + std::vector decoded_value = base64_decode(input); + std::string output = base64_encode(&decoded_value[0], decoded_value.size()); + EXPECT_EQ(output, "AA=="); + } +} +TEST_F(Base64Test, DoubleStripBits01) { + // These are all of the base 64 characters which start with the binary + // digits 01 and end with nonzero digits. + std::string b64_00_characters = "RSTUVWXYZabcdef"; + + for (size_t i = 0; i < b64_00_characters.size(); i++) { + std::string input = "A_"; + input[1] = b64_00_characters[i]; + std::vector decoded_value = base64_decode(input); + std::string output = base64_encode(&decoded_value[0], decoded_value.size()); + EXPECT_EQ(output, "AQ=="); + } +} +TEST_F(Base64Test, DoubleStripBits10) { + // These are all of the base 64 characters which start with the binary + // digits 10 and end with nonzero digits. + std::string b64_00_characters = "hijklmnopqrstuv"; + + for (size_t i = 0; i < b64_00_characters.size(); i++) { + std::string input = "A_"; + input[1] = b64_00_characters[i]; + std::vector decoded_value = base64_decode(input); + std::string output = base64_encode(&decoded_value[0], decoded_value.size()); + EXPECT_EQ(output, "Ag=="); + } +} +TEST_F(Base64Test, DoubleStripBits11) { + // These are all of the base 64 characters which start with the binary + // digits 11 and end with nonzero digits. + std::string b64_00_characters = "xyz0123456789+/"; + for (size_t i = 0; i < b64_00_characters.size(); i++) { + std::string input = "A_"; + input[1] = b64_00_characters[i]; + std::vector decoded_value = base64_decode(input); + std::string output = base64_encode(&decoded_value[0], decoded_value.size()); + EXPECT_EQ(output, "Aw=="); + } +} From 22b824ccfb58b6ca8f7aa794c8e1524f241fed3d Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Mon, 22 Jan 2024 03:47:20 -0600 Subject: [PATCH 423/539] removing unused "state" warnings to highlight more important warnings --- .../attribute_template_compoundvalue.cpp | 10 +++++----- .../cpp_templates/attribute_template_enum.cpp | 8 ++++---- .../attribute_template_multiflagvalue.cpp | 8 ++++---- xml_converter/src/attribute/bool.cpp | 12 ++++++------ xml_converter/src/attribute/color.cpp | 8 ++++---- xml_converter/src/attribute/cull_chirality_gen.cpp | 8 ++++---- xml_converter/src/attribute/euler_rotation_gen.cpp | 10 +++++----- .../src/attribute/festival_filter_gen.cpp | 8 ++++---- xml_converter/src/attribute/float.cpp | 10 +++++----- xml_converter/src/attribute/image.cpp | 4 ++-- xml_converter/src/attribute/int.cpp | 8 ++++---- .../src/attribute/map_type_filter_gen.cpp | 8 ++++---- xml_converter/src/attribute/marker_category.cpp | 10 +++++----- xml_converter/src/attribute/mount_filter_gen.cpp | 8 ++++---- xml_converter/src/attribute/position_gen.cpp | 8 ++++---- .../src/attribute/profession_filter_gen.cpp | 8 ++++---- xml_converter/src/attribute/reset_behavior_gen.cpp | 8 ++++---- .../src/attribute/specialization_filter_gen.cpp | 8 ++++---- xml_converter/src/attribute/species_filter_gen.cpp | 8 ++++---- xml_converter/src/attribute/string.cpp | 14 +++++++------- xml_converter/src/attribute/trail_data.cpp | 4 ++-- xml_converter/src/attribute/unique_id.cpp | 10 +++++----- 22 files changed, 94 insertions(+), 94 deletions(-) diff --git a/xml_converter/generators/cpp_templates/attribute_template_compoundvalue.cpp b/xml_converter/generators/cpp_templates/attribute_template_compoundvalue.cpp index d70e79bc..214a7a8c 100644 --- a/xml_converter/generators/cpp_templates/attribute_template_compoundvalue.cpp +++ b/xml_converter/generators/cpp_templates/attribute_template_compoundvalue.cpp @@ -13,8 +13,8 @@ using namespace std; void xml_attribute_to_{{attribute_name}}( rapidxml::xml_attribute<>* input, - std::vector* errors, - XMLReaderState* state, + std::vector*, + XMLReaderState*, {{class_name}}* value, bool* is_set) { {{class_name}} {{attribute_name}}; @@ -36,7 +36,7 @@ void xml_attribute_to_{{attribute_name}}( {% if xml_bundled_components != [] %} string {{attribute_name}}_to_xml_attribute( const std::string& attribute_name, - XMLWriterState* state, + XMLWriterState*, const {{class_name}}* value) { string output; {% for n, attribute_component in enumerate(attribute_components) %} @@ -54,7 +54,7 @@ void xml_attribute_to_{{attribute_name}}( void proto_to_{{attribute_name}}( {{proto_field_cpp_type}} input, - ProtoReaderState* state, + ProtoReaderState*, {{class_name}}* value, bool* is_set) { {{class_name}} {{attribute_name}}; @@ -67,7 +67,7 @@ void proto_to_{{attribute_name}}( void {{attribute_name}}_to_proto( {{class_name}} value, - ProtoWriterState* state, + ProtoWriterState*, std::function setter) { {{proto_field_cpp_type}}* proto_{{attribute_name}} = new {{proto_field_cpp_type}}(); {% for attribute_component in attribute_components %} diff --git a/xml_converter/generators/cpp_templates/attribute_template_enum.cpp b/xml_converter/generators/cpp_templates/attribute_template_enum.cpp index a842c843..bbf8195e 100644 --- a/xml_converter/generators/cpp_templates/attribute_template_enum.cpp +++ b/xml_converter/generators/cpp_templates/attribute_template_enum.cpp @@ -15,7 +15,7 @@ using namespace std; void xml_attribute_to_{{attribute_name}}( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLReaderState* state, + XMLReaderState*, {{class_name}}* value, bool* is_set) { {{class_name}} {{attribute_name}}; @@ -43,7 +43,7 @@ void xml_attribute_to_{{attribute_name}}( string {{attribute_name}}_to_xml_attribute( const std::string& attribute_name, - XMLWriterState* state, + XMLWriterState*, const {{class_name}}* value) { {% for n, attribute_component in enumerate(attribute_components) %} {% for i, value in enumerate(attribute_component.xml_fields) %} @@ -63,7 +63,7 @@ string {{attribute_name}}_to_xml_attribute( void proto_to_{{attribute_name}}( {{proto_field_cpp_type}} input, - ProtoReaderState* state, + ProtoReaderState*, {{class_name}}* value, bool* is_set) { switch (input) { @@ -82,7 +82,7 @@ void proto_to_{{attribute_name}}( void {{attribute_name}}_to_proto( {{class_name}} value, - ProtoWriterState* state, + ProtoWriterState*, std::function setter) { switch (value) { {% for attribute_component in attribute_components %} diff --git a/xml_converter/generators/cpp_templates/attribute_template_multiflagvalue.cpp b/xml_converter/generators/cpp_templates/attribute_template_multiflagvalue.cpp index ced609f7..b45c65c2 100644 --- a/xml_converter/generators/cpp_templates/attribute_template_multiflagvalue.cpp +++ b/xml_converter/generators/cpp_templates/attribute_template_multiflagvalue.cpp @@ -15,7 +15,7 @@ using namespace std; void xml_attribute_to_{{attribute_name}}( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLReaderState* state, + XMLReaderState*, {{class_name}}* value, bool* is_set) { {{class_name}} {{attribute_name}}; @@ -51,7 +51,7 @@ void xml_attribute_to_{{attribute_name}}( string {{attribute_name}}_to_xml_attribute( const std::string& attribute_name, - XMLWriterState* state, + XMLWriterState*, const {{class_name}}* value) { vector flag_values; {% for n, attribute_component in enumerate(attribute_components) %} @@ -65,7 +65,7 @@ string {{attribute_name}}_to_xml_attribute( void proto_to_{{attribute_name}}( {{proto_field_cpp_type}} input, - ProtoReaderState* state, + ProtoReaderState*, {{class_name}}* value, bool* is_set) { {{class_name}} {{attribute_name}}; @@ -78,7 +78,7 @@ void proto_to_{{attribute_name}}( void {{attribute_name}}_to_proto( {{class_name}} value, - ProtoWriterState* state, + ProtoWriterState*, std::function setter) { {{proto_field_cpp_type}}* proto_{{attribute_name}} = new {{proto_field_cpp_type}}(); bool should_write = false; diff --git a/xml_converter/src/attribute/bool.cpp b/xml_converter/src/attribute/bool.cpp index 3349cba9..d680bfb0 100644 --- a/xml_converter/src/attribute/bool.cpp +++ b/xml_converter/src/attribute/bool.cpp @@ -19,7 +19,7 @@ using namespace std; void xml_attribute_to_bool( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLReaderState* state, + XMLReaderState*, bool* value, bool* is_set) { if (get_attribute_value(input) == "0" || get_attribute_value(input) == "false") { @@ -42,7 +42,7 @@ void xml_attribute_to_bool( //////////////////////////////////////////////////////////////////////////////// string bool_to_xml_attribute( const string& attribute_name, - XMLWriterState* state, + XMLWriterState*, const bool* value) { if (*value) { return " " + attribute_name + "=\"true\""; @@ -62,7 +62,7 @@ string bool_to_xml_attribute( void inverted_xml_attribute_to_bool( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLReaderState* state, + XMLReaderState*, bool* value, bool* is_set) { if (get_attribute_value(input) == "0" || get_attribute_value(input) == "false") { @@ -85,7 +85,7 @@ void inverted_xml_attribute_to_bool( //////////////////////////////////////////////////////////////////////////////// string bool_to_inverted_xml_attribute( const string& attribute_name, - XMLWriterState* state, + XMLWriterState*, const bool* value) { if (*value) { return " " + attribute_name + "=\"false\""; @@ -102,7 +102,7 @@ string bool_to_inverted_xml_attribute( //////////////////////////////////////////////////////////////////////////////// void proto_to_bool( bool input, - ProtoReaderState* state, + ProtoReaderState*, bool* value, bool* is_set) { *value = input; @@ -116,7 +116,7 @@ void proto_to_bool( //////////////////////////////////////////////////////////////////////////////// void bool_to_proto( bool value, - ProtoWriterState* state, + ProtoWriterState*, std::function setter) { setter(value); } diff --git a/xml_converter/src/attribute/color.cpp b/xml_converter/src/attribute/color.cpp index 82713096..feb9c4ee 100644 --- a/xml_converter/src/attribute/color.cpp +++ b/xml_converter/src/attribute/color.cpp @@ -51,7 +51,7 @@ int convert_color_channel_float_to_int(float input) { void xml_attribute_to_color( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLReaderState* state, + XMLReaderState*, Color* value, bool* is_set) { Color color; @@ -98,7 +98,7 @@ void xml_attribute_to_color( //////////////////////////////////////////////////////////////////////////////// string color_to_xml_attribute( const string& attribute_name, - XMLWriterState* state, + XMLWriterState*, const Color* value) { std::stringstream stream; std::string hex_string = "#"; @@ -124,7 +124,7 @@ string color_to_xml_attribute( //////////////////////////////////////////////////////////////////////////////// void proto_to_color( waypoint::RGBAColor input, - ProtoReaderState* state, + ProtoReaderState*, Color* value, bool* is_set) { Color color; @@ -147,7 +147,7 @@ void proto_to_color( //////////////////////////////////////////////////////////////////////////////// void color_to_proto( Color value, - ProtoWriterState* state, + ProtoWriterState*, std::function setter) { waypoint::RGBAColor* color = new waypoint::RGBAColor(); // The default RGB in burrito will be 000000 (i.e. black) diff --git a/xml_converter/src/attribute/cull_chirality_gen.cpp b/xml_converter/src/attribute/cull_chirality_gen.cpp index 1decb63c..9d2c9243 100644 --- a/xml_converter/src/attribute/cull_chirality_gen.cpp +++ b/xml_converter/src/attribute/cull_chirality_gen.cpp @@ -15,7 +15,7 @@ using namespace std; void xml_attribute_to_cull_chirality( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLReaderState* state, + XMLReaderState*, CullChirality* value, bool* is_set) { CullChirality cull_chirality; @@ -39,7 +39,7 @@ void xml_attribute_to_cull_chirality( string cull_chirality_to_xml_attribute( const std::string& attribute_name, - XMLWriterState* state, + XMLWriterState*, const CullChirality* value) { if (*value == CullChirality::none) { return " " + attribute_name + "=\"" + "none" + "\""; @@ -57,7 +57,7 @@ string cull_chirality_to_xml_attribute( void proto_to_cull_chirality( waypoint::CullChirality input, - ProtoReaderState* state, + ProtoReaderState*, CullChirality* value, bool* is_set) { switch (input) { @@ -82,7 +82,7 @@ void proto_to_cull_chirality( void cull_chirality_to_proto( CullChirality value, - ProtoWriterState* state, + ProtoWriterState*, std::function setter) { switch (value) { case CullChirality::none: diff --git a/xml_converter/src/attribute/euler_rotation_gen.cpp b/xml_converter/src/attribute/euler_rotation_gen.cpp index e2cece3c..8e4a311e 100644 --- a/xml_converter/src/attribute/euler_rotation_gen.cpp +++ b/xml_converter/src/attribute/euler_rotation_gen.cpp @@ -13,8 +13,8 @@ using namespace std; void xml_attribute_to_euler_rotation( rapidxml::xml_attribute<>* input, - std::vector* errors, - XMLReaderState* state, + std::vector*, + XMLReaderState*, EulerRotation* value, bool* is_set) { EulerRotation euler_rotation; @@ -35,7 +35,7 @@ void xml_attribute_to_euler_rotation( } string euler_rotation_to_xml_attribute( const std::string& attribute_name, - XMLWriterState* state, + XMLWriterState*, const EulerRotation* value) { string output; output = to_string(value->x_rotation); @@ -46,7 +46,7 @@ string euler_rotation_to_xml_attribute( void proto_to_euler_rotation( waypoint::EulerRotation input, - ProtoReaderState* state, + ProtoReaderState*, EulerRotation* value, bool* is_set) { EulerRotation euler_rotation; @@ -59,7 +59,7 @@ void proto_to_euler_rotation( void euler_rotation_to_proto( EulerRotation value, - ProtoWriterState* state, + ProtoWriterState*, std::function setter) { waypoint::EulerRotation* proto_euler_rotation = new waypoint::EulerRotation(); proto_euler_rotation->set_x(value.x_rotation); diff --git a/xml_converter/src/attribute/festival_filter_gen.cpp b/xml_converter/src/attribute/festival_filter_gen.cpp index 79fe6435..86e44ec3 100644 --- a/xml_converter/src/attribute/festival_filter_gen.cpp +++ b/xml_converter/src/attribute/festival_filter_gen.cpp @@ -15,7 +15,7 @@ using namespace std; void xml_attribute_to_festival_filter( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLReaderState* state, + XMLReaderState*, FestivalFilter* value, bool* is_set) { FestivalFilter festival_filter; @@ -66,7 +66,7 @@ void xml_attribute_to_festival_filter( string festival_filter_to_xml_attribute( const std::string& attribute_name, - XMLWriterState* state, + XMLWriterState*, const FestivalFilter* value) { vector flag_values; if (value->dragonbash == true) { @@ -96,7 +96,7 @@ string festival_filter_to_xml_attribute( void proto_to_festival_filter( waypoint::FestivalFilter input, - ProtoReaderState* state, + ProtoReaderState*, FestivalFilter* value, bool* is_set) { FestivalFilter festival_filter; @@ -113,7 +113,7 @@ void proto_to_festival_filter( void festival_filter_to_proto( FestivalFilter value, - ProtoWriterState* state, + ProtoWriterState*, std::function setter) { waypoint::FestivalFilter* proto_festival_filter = new waypoint::FestivalFilter(); bool should_write = false; diff --git a/xml_converter/src/attribute/float.cpp b/xml_converter/src/attribute/float.cpp index aa76a7b7..42d152cb 100644 --- a/xml_converter/src/attribute/float.cpp +++ b/xml_converter/src/attribute/float.cpp @@ -14,8 +14,8 @@ using namespace std; //////////////////////////////////////////////////////////////////////////////// void xml_attribute_to_float( rapidxml::xml_attribute<>* input, - std::vector* errors, - XMLReaderState* state, + std::vector*, + XMLReaderState*, float* value, bool* is_set) { *value = std::stof(get_attribute_value(input)); @@ -29,7 +29,7 @@ void xml_attribute_to_float( //////////////////////////////////////////////////////////////////////////////// string float_to_xml_attribute( const string& attribute_name, - XMLWriterState* state, + XMLWriterState*, const float* value) { return " " + attribute_name + "=\"" + to_string(*value) + "\""; } @@ -41,7 +41,7 @@ string float_to_xml_attribute( //////////////////////////////////////////////////////////////////////////////// void proto_to_float( float input, - ProtoReaderState* state, + ProtoReaderState*, float* value, bool* is_set) { *value = input; @@ -55,7 +55,7 @@ void proto_to_float( //////////////////////////////////////////////////////////////////////////////// void float_to_proto( float value, - ProtoWriterState* state, + ProtoWriterState*, std::function setter) { setter(value); } diff --git a/xml_converter/src/attribute/image.cpp b/xml_converter/src/attribute/image.cpp index 6c0f179e..dcbe677d 100644 --- a/xml_converter/src/attribute/image.cpp +++ b/xml_converter/src/attribute/image.cpp @@ -17,7 +17,7 @@ using namespace std; //////////////////////////////////////////////////////////////////////////////// void xml_attribute_to_image( rapidxml::xml_attribute<>* input, - std::vector* errors, + std::vector*, XMLReaderState* state, Image* value, bool* is_set) { @@ -33,7 +33,7 @@ void xml_attribute_to_image( //////////////////////////////////////////////////////////////////////////////// string image_to_xml_attribute( const string& attribute_name, - XMLWriterState* state, + XMLWriterState*, const Image* value) { return " " + attribute_name + "=\"" + value->filename + "\""; } diff --git a/xml_converter/src/attribute/int.cpp b/xml_converter/src/attribute/int.cpp index 62d769c3..46466f7e 100644 --- a/xml_converter/src/attribute/int.cpp +++ b/xml_converter/src/attribute/int.cpp @@ -19,7 +19,7 @@ using namespace std; void xml_attribute_to_int( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLReaderState* state, + XMLReaderState*, int* value, bool* is_set) { try { @@ -44,7 +44,7 @@ void xml_attribute_to_int( //////////////////////////////////////////////////////////////////////////////// string int_to_xml_attribute( const string& attribute_name, - XMLWriterState* state, + XMLWriterState*, const int* value) { return " " + attribute_name + "=\"" + to_string(*value) + "\""; } @@ -56,7 +56,7 @@ string int_to_xml_attribute( //////////////////////////////////////////////////////////////////////////////// void proto_to_int( int input, - ProtoReaderState* state, + ProtoReaderState*, int* value, bool* is_set) { *value = input; @@ -70,7 +70,7 @@ void proto_to_int( //////////////////////////////////////////////////////////////////////////////// void int_to_proto( int value, - ProtoWriterState* state, + ProtoWriterState*, std::function setter) { setter(value); } diff --git a/xml_converter/src/attribute/map_type_filter_gen.cpp b/xml_converter/src/attribute/map_type_filter_gen.cpp index 6d3331aa..15621c57 100644 --- a/xml_converter/src/attribute/map_type_filter_gen.cpp +++ b/xml_converter/src/attribute/map_type_filter_gen.cpp @@ -15,7 +15,7 @@ using namespace std; void xml_attribute_to_map_type_filter( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLReaderState* state, + XMLReaderState*, MapTypeFilter* value, bool* is_set) { MapTypeFilter map_type_filter; @@ -131,7 +131,7 @@ void xml_attribute_to_map_type_filter( string map_type_filter_to_xml_attribute( const std::string& attribute_name, - XMLWriterState* state, + XMLWriterState*, const MapTypeFilter* value) { vector flag_values; if (value->unknown_map == true) { @@ -212,7 +212,7 @@ string map_type_filter_to_xml_attribute( void proto_to_map_type_filter( waypoint::MapTypeFilter input, - ProtoReaderState* state, + ProtoReaderState*, MapTypeFilter* value, bool* is_set) { MapTypeFilter map_type_filter; @@ -246,7 +246,7 @@ void proto_to_map_type_filter( void map_type_filter_to_proto( MapTypeFilter value, - ProtoWriterState* state, + ProtoWriterState*, std::function setter) { waypoint::MapTypeFilter* proto_map_type_filter = new waypoint::MapTypeFilter(); bool should_write = false; diff --git a/xml_converter/src/attribute/marker_category.cpp b/xml_converter/src/attribute/marker_category.cpp index e47f8098..36da71e0 100644 --- a/xml_converter/src/attribute/marker_category.cpp +++ b/xml_converter/src/attribute/marker_category.cpp @@ -14,8 +14,8 @@ //////////////////////////////////////////////////////////////////////////////// void xml_attribute_to_marker_category( rapidxml::xml_attribute<>* input, - std::vector* errors, - XMLReaderState* state, + std::vector*, + XMLReaderState*, MarkerCategory* value, bool* is_set) { value->category = get_attribute_value(input); @@ -29,7 +29,7 @@ void xml_attribute_to_marker_category( //////////////////////////////////////////////////////////////////////////////// std::string marker_category_to_xml_attribute( const std::string& attribute_name, - XMLWriterState* state, + XMLWriterState*, const MarkerCategory* value) { return " " + attribute_name + "=\"" + value->category + "\""; } @@ -41,7 +41,7 @@ std::string marker_category_to_xml_attribute( //////////////////////////////////////////////////////////////////////////////// void proto_to_marker_category( waypoint::Category input, - ProtoReaderState* state, + ProtoReaderState*, MarkerCategory* value, bool* is_set) { MarkerCategory marker_category; @@ -57,7 +57,7 @@ void proto_to_marker_category( //////////////////////////////////////////////////////////////////////////////// void marker_category_to_proto( MarkerCategory value, - ProtoWriterState* state, + ProtoWriterState*, std::function setter) { waypoint::Category* category = new waypoint::Category(); category->set_name(value.category); diff --git a/xml_converter/src/attribute/mount_filter_gen.cpp b/xml_converter/src/attribute/mount_filter_gen.cpp index 8dc824b6..5366b4db 100644 --- a/xml_converter/src/attribute/mount_filter_gen.cpp +++ b/xml_converter/src/attribute/mount_filter_gen.cpp @@ -15,7 +15,7 @@ using namespace std; void xml_attribute_to_mount_filter( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLReaderState* state, + XMLReaderState*, MountFilter* value, bool* is_set) { MountFilter mount_filter; @@ -75,7 +75,7 @@ void xml_attribute_to_mount_filter( string mount_filter_to_xml_attribute( const std::string& attribute_name, - XMLWriterState* state, + XMLWriterState*, const MountFilter* value) { vector flag_values; if (value->raptor == true) { @@ -114,7 +114,7 @@ string mount_filter_to_xml_attribute( void proto_to_mount_filter( waypoint::MountFilter input, - ProtoReaderState* state, + ProtoReaderState*, MountFilter* value, bool* is_set) { MountFilter mount_filter; @@ -134,7 +134,7 @@ void proto_to_mount_filter( void mount_filter_to_proto( MountFilter value, - ProtoWriterState* state, + ProtoWriterState*, std::function setter) { waypoint::MountFilter* proto_mount_filter = new waypoint::MountFilter(); bool should_write = false; diff --git a/xml_converter/src/attribute/position_gen.cpp b/xml_converter/src/attribute/position_gen.cpp index 40d284e0..cf949a23 100644 --- a/xml_converter/src/attribute/position_gen.cpp +++ b/xml_converter/src/attribute/position_gen.cpp @@ -13,8 +13,8 @@ using namespace std; void xml_attribute_to_position( rapidxml::xml_attribute<>* input, - std::vector* errors, - XMLReaderState* state, + std::vector*, + XMLReaderState*, Position* value, bool* is_set) { Position position; @@ -36,7 +36,7 @@ void xml_attribute_to_position( void proto_to_position( waypoint::Position input, - ProtoReaderState* state, + ProtoReaderState*, Position* value, bool* is_set) { Position position; @@ -49,7 +49,7 @@ void proto_to_position( void position_to_proto( Position value, - ProtoWriterState* state, + ProtoWriterState*, std::function setter) { waypoint::Position* proto_position = new waypoint::Position(); proto_position->set_x(value.x_position); diff --git a/xml_converter/src/attribute/profession_filter_gen.cpp b/xml_converter/src/attribute/profession_filter_gen.cpp index 32ec9329..2f8e9eaf 100644 --- a/xml_converter/src/attribute/profession_filter_gen.cpp +++ b/xml_converter/src/attribute/profession_filter_gen.cpp @@ -15,7 +15,7 @@ using namespace std; void xml_attribute_to_profession_filter( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLReaderState* state, + XMLReaderState*, ProfessionFilter* value, bool* is_set) { ProfessionFilter profession_filter; @@ -71,7 +71,7 @@ void xml_attribute_to_profession_filter( string profession_filter_to_xml_attribute( const std::string& attribute_name, - XMLWriterState* state, + XMLWriterState*, const ProfessionFilter* value) { vector flag_values; if (value->guardian == true) { @@ -107,7 +107,7 @@ string profession_filter_to_xml_attribute( void proto_to_profession_filter( waypoint::ProfessionFilter input, - ProtoReaderState* state, + ProtoReaderState*, ProfessionFilter* value, bool* is_set) { ProfessionFilter profession_filter; @@ -126,7 +126,7 @@ void proto_to_profession_filter( void profession_filter_to_proto( ProfessionFilter value, - ProtoWriterState* state, + ProtoWriterState*, std::function setter) { waypoint::ProfessionFilter* proto_profession_filter = new waypoint::ProfessionFilter(); bool should_write = false; diff --git a/xml_converter/src/attribute/reset_behavior_gen.cpp b/xml_converter/src/attribute/reset_behavior_gen.cpp index 47730fc3..ec186d1f 100644 --- a/xml_converter/src/attribute/reset_behavior_gen.cpp +++ b/xml_converter/src/attribute/reset_behavior_gen.cpp @@ -15,7 +15,7 @@ using namespace std; void xml_attribute_to_reset_behavior( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLReaderState* state, + XMLReaderState*, ResetBehavior* value, bool* is_set) { ResetBehavior reset_behavior; @@ -84,7 +84,7 @@ void xml_attribute_to_reset_behavior( string reset_behavior_to_xml_attribute( const std::string& attribute_name, - XMLWriterState* state, + XMLWriterState*, const ResetBehavior* value) { if (*value == ResetBehavior::always_visible) { return " " + attribute_name + "=\"" + "0" + "\""; @@ -147,7 +147,7 @@ string reset_behavior_to_xml_attribute( void proto_to_reset_behavior( waypoint::ResetBehavior input, - ProtoReaderState* state, + ProtoReaderState*, ResetBehavior* value, bool* is_set) { switch (input) { @@ -196,7 +196,7 @@ void proto_to_reset_behavior( void reset_behavior_to_proto( ResetBehavior value, - ProtoWriterState* state, + ProtoWriterState*, std::function setter) { switch (value) { case ResetBehavior::always_visible: diff --git a/xml_converter/src/attribute/specialization_filter_gen.cpp b/xml_converter/src/attribute/specialization_filter_gen.cpp index 4849a8d0..ffb25509 100644 --- a/xml_converter/src/attribute/specialization_filter_gen.cpp +++ b/xml_converter/src/attribute/specialization_filter_gen.cpp @@ -15,7 +15,7 @@ using namespace std; void xml_attribute_to_specialization_filter( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLReaderState* state, + XMLReaderState*, SpecializationFilter* value, bool* is_set) { SpecializationFilter specialization_filter; @@ -404,7 +404,7 @@ void xml_attribute_to_specialization_filter( string specialization_filter_to_xml_attribute( const std::string& attribute_name, - XMLWriterState* state, + XMLWriterState*, const SpecializationFilter* value) { vector flag_values; if (value->elementalist_tempest == true) { @@ -629,7 +629,7 @@ string specialization_filter_to_xml_attribute( void proto_to_specialization_filter( waypoint::SpecializationFilter input, - ProtoReaderState* state, + ProtoReaderState*, SpecializationFilter* value, bool* is_set) { SpecializationFilter specialization_filter; @@ -711,7 +711,7 @@ void proto_to_specialization_filter( void specialization_filter_to_proto( SpecializationFilter value, - ProtoWriterState* state, + ProtoWriterState*, std::function setter) { waypoint::SpecializationFilter* proto_specialization_filter = new waypoint::SpecializationFilter(); bool should_write = false; diff --git a/xml_converter/src/attribute/species_filter_gen.cpp b/xml_converter/src/attribute/species_filter_gen.cpp index b032771c..1a9f79b3 100644 --- a/xml_converter/src/attribute/species_filter_gen.cpp +++ b/xml_converter/src/attribute/species_filter_gen.cpp @@ -15,7 +15,7 @@ using namespace std; void xml_attribute_to_species_filter( rapidxml::xml_attribute<>* input, std::vector* errors, - XMLReaderState* state, + XMLReaderState*, SpeciesFilter* value, bool* is_set) { SpeciesFilter species_filter; @@ -55,7 +55,7 @@ void xml_attribute_to_species_filter( string species_filter_to_xml_attribute( const std::string& attribute_name, - XMLWriterState* state, + XMLWriterState*, const SpeciesFilter* value) { vector flag_values; if (value->asura == true) { @@ -79,7 +79,7 @@ string species_filter_to_xml_attribute( void proto_to_species_filter( waypoint::SpeciesFilter input, - ProtoReaderState* state, + ProtoReaderState*, SpeciesFilter* value, bool* is_set) { SpeciesFilter species_filter; @@ -94,7 +94,7 @@ void proto_to_species_filter( void species_filter_to_proto( SpeciesFilter value, - ProtoWriterState* state, + ProtoWriterState*, std::function setter) { waypoint::SpeciesFilter* proto_species_filter = new waypoint::SpeciesFilter(); bool should_write = false; diff --git a/xml_converter/src/attribute/string.cpp b/xml_converter/src/attribute/string.cpp index 910c69b7..f3845609 100644 --- a/xml_converter/src/attribute/string.cpp +++ b/xml_converter/src/attribute/string.cpp @@ -17,8 +17,8 @@ using namespace std; //////////////////////////////////////////////////////////////////////////////// void xml_attribute_to_string( rapidxml::xml_attribute<>* input, - std::vector* errors, - XMLReaderState* state, + std::vector*, + XMLReaderState*, string* value, bool* is_set) { *value = get_attribute_value(input); @@ -32,7 +32,7 @@ void xml_attribute_to_string( //////////////////////////////////////////////////////////////////////////////// string string_to_xml_attribute( const string& attribute_name, - XMLWriterState* state, + XMLWriterState*, const string* value) { return " " + attribute_name + "=\"" + *value + "\""; } @@ -44,7 +44,7 @@ string string_to_xml_attribute( //////////////////////////////////////////////////////////////////////////////// void proto_to_string( string input, - ProtoReaderState* state, + ProtoReaderState*, string* value, bool* is_set) { *value = input; @@ -58,14 +58,14 @@ void proto_to_string( //////////////////////////////////////////////////////////////////////////////// void string_to_proto( std::string value, - ProtoWriterState* state, + ProtoWriterState*, std::function setter) { setter(value); } void proto_display_name_to_display_name_and_name( std::string input, - ProtoReaderState* state, + ProtoReaderState*, std::string* display_name, bool* is_display_name_set, std::string* name, @@ -78,7 +78,7 @@ void proto_display_name_to_display_name_and_name( void display_name_and_name_to_proto_display_name( std::string value, - ProtoWriterState* state, + ProtoWriterState*, std::function setter, const std::string* name, const bool* is_name_set) { diff --git a/xml_converter/src/attribute/trail_data.cpp b/xml_converter/src/attribute/trail_data.cpp index b3f19690..c6fd8c26 100644 --- a/xml_converter/src/attribute/trail_data.cpp +++ b/xml_converter/src/attribute/trail_data.cpp @@ -153,7 +153,7 @@ string trail_data_to_xml_attribute( //////////////////////////////////////////////////////////////////////////////// void proto_to_trail_data( waypoint::TrailData input, - ProtoReaderState* state, + ProtoReaderState*, TrailData* value, bool* is_set) { TrailData trail_data; @@ -171,7 +171,7 @@ void proto_to_trail_data( //////////////////////////////////////////////////////////////////////////////// void trail_data_to_proto( TrailData value, - ProtoWriterState* state, + ProtoWriterState*, std::function setter) { waypoint::TrailData* trail_data = new waypoint::TrailData(); *trail_data->mutable_points_x() = {value.points_x.begin(), value.points_x.end()}; diff --git a/xml_converter/src/attribute/unique_id.cpp b/xml_converter/src/attribute/unique_id.cpp index 70dc953d..107ec2f8 100644 --- a/xml_converter/src/attribute/unique_id.cpp +++ b/xml_converter/src/attribute/unique_id.cpp @@ -14,8 +14,8 @@ using namespace std; void xml_attribute_to_unique_id( rapidxml::xml_attribute<>* input, - std::vector* errors, - XMLReaderState* state, + std::vector*, + XMLReaderState*, UniqueId* value, bool* is_set) { string base64; @@ -32,7 +32,7 @@ void xml_attribute_to_unique_id( //////////////////////////////////////////////////////////////////////////////// string unique_id_to_xml_attribute( const string& attribute_name, - XMLWriterState* state, + XMLWriterState*, const UniqueId* value) { return " " + attribute_name + "=\"" + base64_encode(&(value->guid[0]), value->guid.size()) + "\""; } @@ -44,7 +44,7 @@ string unique_id_to_xml_attribute( //////////////////////////////////////////////////////////////////////////////// void proto_to_unique_id( std::string input, - ProtoReaderState* state, + ProtoReaderState*, UniqueId* value, bool* is_set) { UniqueId unique_id; @@ -61,7 +61,7 @@ void proto_to_unique_id( //////////////////////////////////////////////////////////////////////////////// void unique_id_to_proto( UniqueId value, - ProtoWriterState* state, + ProtoWriterState*, std::function setter) { setter(std::string(value.guid.begin(), value.guid.end())); } From 540152d546f6b2d541f3bbb0e0139ced90c5cb4a Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Tue, 23 Jan 2024 01:51:17 -0600 Subject: [PATCH 424/539] adding doc file --- xml_converter/doc/menu/menu_id.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 xml_converter/doc/menu/menu_id.md diff --git a/xml_converter/doc/menu/menu_id.md b/xml_converter/doc/menu/menu_id.md new file mode 100644 index 00000000..ae312b8a --- /dev/null +++ b/xml_converter/doc/menu/menu_id.md @@ -0,0 +1,15 @@ +--- +name: Menu ID +type: Custom +class: UniqueId +xml_fields: [ID, MenuID] +applies_to: [Category] +protobuf_field: id +--- + +Notes +===== + +A 128bit long Unique ID. + +If the ID is not present when converting from XML, the ID is created as a hash of the category's "name" and the names of the categories parents. From 8ff0e4d9a106b60936d112a86778ded9792f51d5 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sat, 3 Feb 2024 16:02:33 -0600 Subject: [PATCH 425/539] Preventing xml node classes from forcing rebuilds when nothing changes --- xml_converter/generators/generate_cpp.py | 26 +++++++++++++++++------- xml_converter/generators/main.py | 5 +++-- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/xml_converter/generators/generate_cpp.py b/xml_converter/generators/generate_cpp.py index 9f0a6934..2f483555 100644 --- a/xml_converter/generators/generate_cpp.py +++ b/xml_converter/generators/generate_cpp.py @@ -146,8 +146,11 @@ def sorted_cpp_forward_declarations(self) -> List[str]: def write_cpp_classes( output_directory: str, data: Dict[str, Document], -) -> None: +) -> List[str]: print("Writing XML Node Cpp Classes") + + written_files: List[str] = [] + file_loader = FileSystemLoader('cpp_templates') env = Environment( loader=file_loader, @@ -175,17 +178,23 @@ def write_cpp_classes( if attribute_variable.class_name == "marker_category": attributes_of_type_marker_category.append(attribute_variable.attribute_name) - with open(os.path.join(output_directory, lowercase(cpp_class) + "_gen.hpp"), 'w') as f: - f.write(header_template.render( + hpp_filepath = os.path.join(output_directory, lowercase(cpp_class) + "_gen.hpp") + write_if_different( + path=hpp_filepath, + contents=header_template.render( cpp_class=cpp_class, attribute_variables=sorted(attribute_variables, key=get_attribute_variable_key), cpp_includes=cpp_includes, cpp_class_header=lowercase(cpp_class), attributes_of_type_marker_category=attributes_of_type_marker_category, - )) + ), + ) + written_files.append(hpp_filepath) - with open(os.path.join(output_directory, lowercase(cpp_class) + "_gen.cpp"), 'w') as f: - f.write(code_template.render( + cpp_filepath = os.path.join(output_directory, lowercase(cpp_class) + "_gen.cpp") + write_if_different( + path=cpp_filepath, + contents=code_template.render( cpp_class=cpp_class, cpp_includes=cpp_includes, cpp_class_header=lowercase(cpp_class), @@ -193,8 +202,11 @@ def write_cpp_classes( attribute_variables=sorted(attribute_variables, key=get_attribute_variable_key), enumerate=enumerate, attributes_of_type_marker_category=attributes_of_type_marker_category, - )) + ), + ) + written_files.append(cpp_filepath) + return written_files def build_custom_function_data(config: Dict[str, Any]) -> Tuple[str, List[str]]: function = config["function"] diff --git a/xml_converter/generators/main.py b/xml_converter/generators/main.py index 4c9fb7d7..271a45a9 100644 --- a/xml_converter/generators/main.py +++ b/xml_converter/generators/main.py @@ -373,9 +373,10 @@ def main() -> None: generator.load_input_doc(full_markdown_doc_directory) generator.delete_generated_docs("../web_docs") - generator.delete_generated_docs("../src/") generator.write_webdocs("../web_docs/") - write_cpp_classes("../src/", generator.data) + + written_classes = write_cpp_classes("../src/", generator.data) + generator.delete_generated_docs("../src/", skip=written_classes) written_attributes = write_attribute("../src/attribute", generator.data) generator.delete_generated_docs("../src/attribute", skip=written_attributes) From e9c96509c5e2d1564854a9505fdbb031d863afcf Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sat, 3 Feb 2024 16:05:16 -0600 Subject: [PATCH 426/539] fixing linter --- xml_converter/generators/generate_cpp.py | 1 + 1 file changed, 1 insertion(+) diff --git a/xml_converter/generators/generate_cpp.py b/xml_converter/generators/generate_cpp.py index 2f483555..5534ca13 100644 --- a/xml_converter/generators/generate_cpp.py +++ b/xml_converter/generators/generate_cpp.py @@ -208,6 +208,7 @@ def write_cpp_classes( return written_files + def build_custom_function_data(config: Dict[str, Any]) -> Tuple[str, List[str]]: function = config["function"] side_effects = [] From b0cb07b39f46f175e786a2582963e1be4265acff Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sat, 3 Feb 2024 18:15:01 -0600 Subject: [PATCH 427/539] adding arguments to the generator command --- xml_converter/generators/main.py | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/xml_converter/generators/main.py b/xml_converter/generators/main.py index 271a45a9..468f7eaf 100644 --- a/xml_converter/generators/main.py +++ b/xml_converter/generators/main.py @@ -10,6 +10,8 @@ from protobuf_types import get_proto_field_type from util import capitalize, SchemaType, Document from generate_cpp import write_cpp_classes, write_attribute +import argparse +import sys XML_ATTRIBUTE_REGEX: Final[str] = "^[A-Za-z]+$" PROTO_FIELD_REGEX: Final[str] = "^[a-z_.]+$" @@ -364,6 +366,14 @@ def generate_auto_docs(self, metadata: Dict[str, SchemaType], content: Dict[str, # markdown files, and then creating the desired output files. ################################################################################ def main() -> None: + parser = argparse.ArgumentParser(description='Process some flags.') + parser.add_argument('--cpp-nodes', help='Generate the XML Node Classes.', action='store_true') + parser.add_argument('--cpp-attributes', help='Generate the XML Attribute functions.', action='store_true') + parser.add_argument('--documentation', help='Generate the HTML documentation.', action='store_true') + args = parser.parse_args() + + generate_all: bool = not args.cpp_nodes and not args.cpp_attributes and not args.documentation + generator = Generator() markdown_doc_directory = "../doc" @@ -372,14 +382,17 @@ def main() -> None: if os.path.isdir(full_markdown_doc_directory): generator.load_input_doc(full_markdown_doc_directory) - generator.delete_generated_docs("../web_docs") - generator.write_webdocs("../web_docs/") + if generate_all or args.documentation: + generator.delete_generated_docs("../web_docs") + generator.write_webdocs("../web_docs/") - written_classes = write_cpp_classes("../src/", generator.data) - generator.delete_generated_docs("../src/", skip=written_classes) + if generate_all or args.cpp_nodes: + written_classes = write_cpp_classes("../src/", generator.data) + generator.delete_generated_docs("../src/", skip=written_classes) - written_attributes = write_attribute("../src/attribute", generator.data) - generator.delete_generated_docs("../src/attribute", skip=written_attributes) + if generate_all or args.cpp_attributes: + written_attributes = write_attribute("../src/attribute", generator.data) + generator.delete_generated_docs("../src/attribute", skip=written_attributes) main() From 43d8f7d851cf61489402e353e1de7c6ca7ae1eb9 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sat, 3 Feb 2024 18:17:55 -0600 Subject: [PATCH 428/539] removing sys import --- xml_converter/generators/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml_converter/generators/main.py b/xml_converter/generators/main.py index 468f7eaf..4e8464c3 100644 --- a/xml_converter/generators/main.py +++ b/xml_converter/generators/main.py @@ -11,7 +11,7 @@ from util import capitalize, SchemaType, Document from generate_cpp import write_cpp_classes, write_attribute import argparse -import sys + XML_ATTRIBUTE_REGEX: Final[str] = "^[A-Za-z]+$" PROTO_FIELD_REGEX: Final[str] = "^[a-z_.]+$" From 1869833570fffe09854014482fa06c639100e28a Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sat, 3 Feb 2024 18:59:38 -0600 Subject: [PATCH 429/539] Fixing some minor issues in the integration tests harness --- xml_converter/integration_tests/run_tests.py | 2 +- xml_converter/integration_tests/src/proto_utils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xml_converter/integration_tests/run_tests.py b/xml_converter/integration_tests/run_tests.py index c3a5d8a5..99b2bc0d 100755 --- a/xml_converter/integration_tests/run_tests.py +++ b/xml_converter/integration_tests/run_tests.py @@ -263,7 +263,7 @@ def diff_dirs(actual_output_dir: str, expected_output_dir: str) -> bool: if len_diff(diff) != 0: diff_found = True - print("XML output was incorrect for test") + print("Output was incorrect for test") for line in diff: print(line) diff --git a/xml_converter/integration_tests/src/proto_utils.py b/xml_converter/integration_tests/src/proto_utils.py index 38e937e7..115689b1 100644 --- a/xml_converter/integration_tests/src/proto_utils.py +++ b/xml_converter/integration_tests/src/proto_utils.py @@ -16,7 +16,7 @@ def compare_protos( expected_textproto = get_waypoint_textproto(expected_proto_path) actual_textproto = get_waypoint_textproto(actual_proto_path) - diff = list(difflib.unified_diff(expected_textproto.split("\n"), actual_textproto.split("\n"), fromfile=expected_proto_path, tofile=actual_proto_path, lineterm="")) + diff = list(difflib.unified_diff(actual_textproto.split("\n"), expected_textproto.split("\n"), fromfile=actual_proto_path, tofile=expected_proto_path, lineterm="")) if len(diff) == 0: diff = ["Something went wrong diffing {} and {}.".format(expected_proto_path, actual_proto_path)] From 82aa086b7fe85d347916c79017fe92981dcfd199 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sat, 3 Feb 2024 19:01:45 -0600 Subject: [PATCH 430/539] Adding a specific test for trail data --- .../test_cases/trail_data/input/pack/trail.trl | Bin 0 -> 44 bytes .../test_cases/trail_data/input/pack/xml_file.xml | 8 ++++++++ .../test_cases/trail_data/output_proto/markers.bin | Bin 0 -> 73 bytes .../trail_data/output_xml/037aa160e392f1c8.trl | Bin 0 -> 44 bytes .../test_cases/trail_data/output_xml/xml_file.xml | 8 ++++++++ .../test_cases/trail_data/testcase.yaml | 5 +++++ 6 files changed, 21 insertions(+) create mode 100644 xml_converter/integration_tests/test_cases/trail_data/input/pack/trail.trl create mode 100644 xml_converter/integration_tests/test_cases/trail_data/input/pack/xml_file.xml create mode 100644 xml_converter/integration_tests/test_cases/trail_data/output_proto/markers.bin create mode 100644 xml_converter/integration_tests/test_cases/trail_data/output_xml/037aa160e392f1c8.trl create mode 100644 xml_converter/integration_tests/test_cases/trail_data/output_xml/xml_file.xml create mode 100644 xml_converter/integration_tests/test_cases/trail_data/testcase.yaml diff --git a/xml_converter/integration_tests/test_cases/trail_data/input/pack/trail.trl b/xml_converter/integration_tests/test_cases/trail_data/input/pack/trail.trl new file mode 100644 index 0000000000000000000000000000000000000000..201ab83c8671d0e579b91b4f4f911c933b6a9de9 GIT binary patch literal 44 ncmZQzU|=u;Vg`l=dmwgTV0Zw;3_!d9L^}eRK>7d>3pfG*cS!~W literal 0 HcmV?d00001 diff --git a/xml_converter/integration_tests/test_cases/trail_data/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/trail_data/input/pack/xml_file.xml new file mode 100644 index 00000000..a32e0e53 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/trail_data/input/pack/xml_file.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/xml_converter/integration_tests/test_cases/trail_data/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/trail_data/output_proto/markers.bin new file mode 100644 index 0000000000000000000000000000000000000000..b31d3169e3883e29097b4d446ac637e7ba550115 GIT binary patch literal 73 zcmd;b=i>IQRB%o#Nlni$s#MZbFtXAT;$dKDuxDUkZ~!6)DG(3HS^&fc9F%~(2S65s UBLjngqZ5b5i!*G8CdW+!04}BwNdN!< literal 0 HcmV?d00001 diff --git a/xml_converter/integration_tests/test_cases/trail_data/output_xml/037aa160e392f1c8.trl b/xml_converter/integration_tests/test_cases/trail_data/output_xml/037aa160e392f1c8.trl new file mode 100644 index 0000000000000000000000000000000000000000..201ab83c8671d0e579b91b4f4f911c933b6a9de9 GIT binary patch literal 44 ncmZQzU|=u;Vg`l=dmwgTV0Zw;3_!d9L^}eRK>7d>3pfG*cS!~W literal 0 HcmV?d00001 diff --git a/xml_converter/integration_tests/test_cases/trail_data/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/trail_data/output_xml/xml_file.xml new file mode 100644 index 00000000..87532cf9 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/trail_data/output_xml/xml_file.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/xml_converter/integration_tests/test_cases/trail_data/testcase.yaml b/xml_converter/integration_tests/test_cases/trail_data/testcase.yaml new file mode 100644 index 00000000..9510c793 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/trail_data/testcase.yaml @@ -0,0 +1,5 @@ +input_paths: + "pack": "xml" +expected_stdout: | +expected_stderr: | +expected_returncode: 0 From 8d77e2a23d6fa98d801de7586cb7d408daf68f1d Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sat, 3 Feb 2024 19:21:58 -0600 Subject: [PATCH 431/539] adding a filter for the integration test harness --- xml_converter/integration_tests/run_tests.py | 44 ++++++++++++-------- 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/xml_converter/integration_tests/run_tests.py b/xml_converter/integration_tests/run_tests.py index 99b2bc0d..dd4ad715 100755 --- a/xml_converter/integration_tests/run_tests.py +++ b/xml_converter/integration_tests/run_tests.py @@ -5,7 +5,7 @@ import subprocess import re import os -from typing import List, Optional, Final, Tuple +from typing import List, Optional, Tuple from src.testcase_loader import load_testcases import shutil from src.proto_utils import compare_protos, compare_binary_file @@ -13,12 +13,6 @@ # Path to compiled C++ executable xml_converter_binary_path: str = "../build/xml_converter" -arg_input_xml: Final[str] = "--input-taco-path" -arg_output_xml: Final[str] = "--output-taco-path" -arg_input_proto: Final[str] = "--input-waypoint-path" -arg_output_proto: Final[str] = "--output-waypoint-path" -arg_split_proto: Final[str] = "--output-split-waypoint-path" - def run_xml_converter( input_xml: Optional[List[str]] = None, @@ -32,15 +26,15 @@ def run_xml_converter( cmd: List[str] = [xml_converter_binary_path] if input_xml: - cmd += [arg_input_xml] + input_xml + cmd += ["--input-taco-path"] + input_xml if output_xml: - cmd += [arg_output_xml] + output_xml + cmd += ["--output-taco-path"] + output_xml if input_proto: - cmd += [arg_input_proto] + input_proto + cmd += ["--input-waypoint-path"] + input_proto if output_proto: - cmd += [arg_output_proto] + output_proto + cmd += ["--output-waypoint-path"] + output_proto if split_output_proto: - cmd += [arg_split_proto] + [split_output_proto] + cmd += ["--output-split-waypoint-path"] + [split_output_proto] # Run the C++ program and capture its output result = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) @@ -89,6 +83,7 @@ def remove_ansii_color_escapecodes(lines: List[str]) -> List[str]: # then this function throws an error ################################################################################ def rebuild_xml_converter_binary() -> None: + print("Building XML Converter Binary") cmake_build_directory = "../build" # Store the current working directory @@ -112,6 +107,8 @@ def rebuild_xml_converter_binary() -> None: else: print(f"Directory '{cmake_build_directory}' does not exist.") + print() + ################################################################################ # remove_ignored_lines @@ -143,8 +140,9 @@ def remove_ignored_lines(lines: List[str]) -> List[str]: def main() -> bool: - parser = argparse.ArgumentParser(description="A test harness for evaluating the output of the xmlconverter program") - parser.add_argument("-v", "--verbose", help="Prints the results from xmlconverter in JSON format", action="store_true") + parser = argparse.ArgumentParser(description="A test harness for evaluating the output of the xmlconverter program.") + parser.add_argument("-v", "--verbose", help="Prints the results from xmlconverter in JSON format.", action="store_true") + parser.add_argument("--filter", help="Filter which tests to run by a regex pattern.", type=str) args = parser.parse_args() output_parent_dirpath = "./outputs" @@ -157,7 +155,13 @@ def main() -> bool: rebuild_xml_converter_binary() + test_run_count = 0 + for testcase in load_testcases(): + if args.filter is not None: + if not re.match(args.filter, testcase.name): + continue + xml_output_dir_path = os.path.join(output_parent_dirpath, "xml", testcase.name) proto_output_dir_path = os.path.join(output_parent_dirpath, "proto", testcase.name) @@ -207,6 +211,11 @@ def main() -> bool: print(f"Success: test {testcase.name}") all_tests_passed &= testcase_passed + test_run_count += 1 + + if test_run_count == 0: + print("No Tests Were Run") + return False return all_tests_passed @@ -295,9 +304,8 @@ def get_paths(directory: str) -> Tuple[List[str], List[str]]: if __name__ == "__main__": - returncode = main() + all_tests_passed = main() - if returncode: - exit(0) - else: + # Exit with an error if not all the tests passed so we can catch it in CI + if not all_tests_passed: exit(1) From b8bfebabfaa6d81fe50c6beee812dd292ae26834 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Mon, 5 Feb 2024 11:25:41 -0600 Subject: [PATCH 432/539] Beginning to flesh out the html docs --- xml_converter/doc/map_id/map_id.md | 33 ++++++++++++++++--- xml_converter/generators/main.py | 3 ++ .../web_templates/documentation.html | 17 ++++++++++ .../generators/web_templates/infotable.html | 2 +- xml_converter/requirements.txt | 1 + 5 files changed, 51 insertions(+), 5 deletions(-) diff --git a/xml_converter/doc/map_id/map_id.md b/xml_converter/doc/map_id/map_id.md index b7d6c259..fe64cc21 100644 --- a/xml_converter/doc/map_id/map_id.md +++ b/xml_converter/doc/map_id/map_id.md @@ -5,8 +5,33 @@ applies_to: [Icon, Trail] xml_fields: [MapID] protobuf_field: map_id --- -The ID of the map that this object should be displayed on. +The Map which this marker should be displayed on. -Notes -===== -https://blishhud.com/docs/markers/attributes/mapid +Finding the Map ID +================== +Method 1: GameInfo Plugin +--- +The GameInfo plugin displays some useful game information on your screen about the character. One of those is the map the character is currently on + +Method 2: [Guild Wars 2 Wiki][2] infobox +--- +the InfoBox on the right hand side of map wiki pages has a field titled API followed by a number. + +For example, the [Gendarran Fields][1] wiki page has the API value of `24`. Gendarran Fields' Map ID is `24`. + +![Gendarran Fields InfoBox](./gendarran_fields_infobox.png) + + +Quirks +====== +* Map ID is also stored within the `.trl` files and may overwrite any other Map IDs set earlier in the node. + + +References +========= +* [BlishHUD MapID Marker Docs](https://blishhud.com/docs/markers/attributes/mapid) +* [TacO Marker Pack Guide](https://www.gw2taco.com/2016/01/how-to-create-your-own-marker-pack.html) + + +[1]: https://wiki.guildwars2.com/wiki/Gendarran_Fields +[2]: https://wiki.guildwars2.com \ No newline at end of file diff --git a/xml_converter/generators/main.py b/xml_converter/generators/main.py index 271a45a9..1fdaf1e9 100644 --- a/xml_converter/generators/main.py +++ b/xml_converter/generators/main.py @@ -123,6 +123,9 @@ def delete_generated_docs(self, dir_path: str, skip: List[str] = []) -> None: def load_input_doc(self, dir_path: str) -> None: for filepath in os.listdir(dir_path): + if not filepath.endswith(".md"): + continue + filepath = os.path.join(dir_path, filepath) try: document = frontmatter.load(filepath) diff --git a/xml_converter/generators/web_templates/documentation.html b/xml_converter/generators/web_templates/documentation.html index 8230ca97..db2d6add 100644 --- a/xml_converter/generators/web_templates/documentation.html +++ b/xml_converter/generators/web_templates/documentation.html @@ -30,6 +30,18 @@ border-radius: 3px; margin: 10px 30px; } + code { + display: inline-block; + background: #DDD; + padding: 1px 3px 0px 3px; + border: 1px solid #888; + border-radius: 3px; + } + + .codehilite code { + width: 100%; + box-sizing: border-box; + } table.flagbox { margin-top: -1em; @@ -87,7 +99,12 @@ text-align: center; margin: 10px; } + + .field_wrapper h1 { + border-bottom: 1px solid #777; + } +
Hello world
diff --git a/xml_converter/generators/web_templates/infotable.html b/xml_converter/generators/web_templates/infotable.html index 635e2f28..4063fd4f 100644 --- a/xml_converter/generators/web_templates/infotable.html +++ b/xml_converter/generators/web_templates/infotable.html @@ -43,7 +43,7 @@

Examples

{{field_row.example}}

Valid XML Values

{{field_row.valid_values_html}}
-

Description

{{field_row.description}}
+

Description

{{field_row.description}}
{% endfor %} diff --git a/xml_converter/requirements.txt b/xml_converter/requirements.txt index da2e2c05..30748836 100644 --- a/xml_converter/requirements.txt +++ b/xml_converter/requirements.txt @@ -9,6 +9,7 @@ mypy==1.5.1 pyaml==21.10.1 pycodestyle==2.8.0 pyflakes==2.4.0 +Pygments==2.17.2 pyrsistent==0.18.1 python-frontmatter==1.0.0 PyYAML==5.1 From 87754e6883b12677456bcc2adbf5351d6d7a543f Mon Sep 17 00:00:00 2001 From: klingbolt Date: Wed, 21 Feb 2024 00:01:26 -0500 Subject: [PATCH 433/539] reworked typing and moved the copying function for xml images --- xml_converter/src/attribute/image.cpp | 11 +++++--- xml_converter/src/attribute/trail_data.cpp | 6 ++--- xml_converter/src/packaging_protobin.cpp | 18 ++++++------- xml_converter/src/packaging_protobin.hpp | 4 +-- xml_converter/src/packaging_xml.cpp | 26 ++++--------------- xml_converter/src/packaging_xml.hpp | 4 +-- .../src/state_structs/proto_reader_state.hpp | 2 +- .../src/state_structs/proto_writer_state.hpp | 2 +- .../src/state_structs/xml_reader_state.hpp | 2 +- .../src/state_structs/xml_writer_state.hpp | 6 +---- 10 files changed, 33 insertions(+), 48 deletions(-) diff --git a/xml_converter/src/attribute/image.cpp b/xml_converter/src/attribute/image.cpp index 63473b30..0e15877f 100644 --- a/xml_converter/src/attribute/image.cpp +++ b/xml_converter/src/attribute/image.cpp @@ -1,5 +1,6 @@ #include "image.hpp" +#include #include #include @@ -22,7 +23,7 @@ void xml_attribute_to_image( bool* is_set) { Image image; image.filename = get_attribute_value(input); - image.original_filepath = join_file_paths(state->xml_filedir, image.filename); + image.original_filepath = join_file_paths(state->xml_directory, image.filename); *value = image; *is_set = true; } @@ -36,7 +37,11 @@ string image_to_xml_attribute( const string& attribute_name, XMLWriterState* state, const Image* value) { - state->textures.push_back(value); + if (filesystem::exists(filesystem::path(value->original_filepath))) { + filesystem::path output_path = filesystem::path(state->xml_directory) / value->filename; + filesystem::create_directories(output_path.parent_path()); + filesystem::copy_file(filesystem::path(value->original_filepath), output_path, filesystem::copy_options::overwrite_existing); + } return " " + attribute_name + "=\"" + value->filename + "\""; } @@ -52,7 +57,7 @@ void proto_to_image( bool* is_set) { Image image; image.filename = state->textures[input].filepath(); - image.original_filepath = join_file_paths(state->proto_filedir, image.filename); + image.original_filepath = join_file_paths(state->proto_directory, image.filename); *value = image; *is_set = true; } diff --git a/xml_converter/src/attribute/trail_data.cpp b/xml_converter/src/attribute/trail_data.cpp index ed0ac530..61872dab 100644 --- a/xml_converter/src/attribute/trail_data.cpp +++ b/xml_converter/src/attribute/trail_data.cpp @@ -32,7 +32,7 @@ void xml_attribute_to_trail_data( bool* is_map_id_set) { TrailData trail_data; string trail_data_relative_path = get_attribute_value(input); - if (string(state->xml_filedir) == "") { + if (state->xml_directory == "") { throw "Error: Marker pack base directory is an empty string"; } if (trail_data_relative_path == "") { @@ -41,7 +41,7 @@ void xml_attribute_to_trail_data( } ifstream trail_data_file; - string trail_path = string(state->xml_filedir) + "/" + trail_data_relative_path; + string trail_path = state->xml_directory + "/" + trail_data_relative_path; trail_data_file.open(trail_path, ios::in | ios::binary); if (!trail_data_file.good()) { errors->push_back(new XMLAttributeValueError("No trail file found at " + trail_path, input)); @@ -132,7 +132,7 @@ string trail_data_to_xml_attribute( } string trail_file_name = long_to_hex_string(djb2_hash(byte_array, byte_array_size)) + ".trl"; - string trail_file_path = join_file_paths(state->xml_filedir, trail_file_name); + string trail_file_path = join_file_paths(state->xml_directory, trail_file_name); ofstream trail_data_file(trail_file_path, ios::binary); diff --git a/xml_converter/src/packaging_protobin.cpp b/xml_converter/src/packaging_protobin.cpp index 5ce733c7..4fc3c902 100644 --- a/xml_converter/src/packaging_protobin.cpp +++ b/xml_converter/src/packaging_protobin.cpp @@ -60,11 +60,11 @@ void parse_waypoint_categories( //////////////////////////////////////////////////////////////////////////////// // //////////////////////////////////////////////////////////////////////////////// -void read_protobuf_file(string proto_filepath, const string proto_filedir, map* marker_categories, vector* parsed_pois) { +void read_protobuf_file(string proto_filepath, const string proto_directory, map* marker_categories, vector* parsed_pois) { fstream infile; waypoint::Waypoint proto_message; ProtoReaderState state; - state.proto_filedir = proto_filedir.c_str(); + state.proto_directory = proto_directory; infile.open(proto_filepath, ios::in | ios::binary); proto_message.ParseFromIstream(&infile); @@ -164,7 +164,7 @@ void proto_post_processing(ProtoWriterState* state, waypoint::Waypoint* proto) { const Image* image = state->textures[i]; texture_data->set_filepath(image->filename); if (fs::exists(fs::path(state->textures[i]->original_filepath))) { - fs::path output_path = fs::path(state->proto_filedir) / image->filename; + fs::path output_path = fs::path(state->proto_directory) / image->filename; fs::create_directories(output_path.parent_path()); fs::copy_file(fs::path(image->original_filepath), output_path, fs::copy_options::update_existing); } @@ -214,13 +214,13 @@ void _write_protobuf_file( } void write_protobuf_file( - const string proto_filedir, + const string& proto_directory, const StringHierarchy& category_filter, const map* marker_categories, const vector* parsed_pois) { std::map> category_to_pois; ProtoWriterState state; - state.proto_filedir = proto_filedir.c_str(); + state.proto_directory = proto_directory; for (size_t i = 0; i < parsed_pois->size(); i++) { Parseable* parsed_poi = (*parsed_pois)[i]; @@ -238,7 +238,7 @@ void write_protobuf_file( } _write_protobuf_file( - join_file_paths(state.proto_filedir, "markers.bin"), + join_file_paths(state.proto_directory, "markers.bin"), category_filter, marker_categories, category_to_pois, @@ -247,13 +247,13 @@ void write_protobuf_file( // Write protobuf per map id void write_protobuf_file_per_map_id( - const string proto_filedir, + const string& proto_directory, const StringHierarchy& category_filter, const map* marker_categories, const vector* parsed_pois) { std::map>> mapid_to_category_to_pois; ProtoWriterState state; - state.proto_filedir = proto_filedir.c_str(); + state.proto_directory = proto_directory; for (size_t i = 0; i < parsed_pois->size(); i++) { Parseable* parsed_poi = (*parsed_pois)[i]; @@ -271,7 +271,7 @@ void write_protobuf_file_per_map_id( } for (auto iterator = mapid_to_category_to_pois.begin(); iterator != mapid_to_category_to_pois.end(); iterator++) { - string output_filepath = join_file_paths(state.proto_filedir, to_string(iterator->first) + ".bin"); + string output_filepath = join_file_paths(state.proto_directory, to_string(iterator->first) + ".bin"); _write_protobuf_file( output_filepath, diff --git a/xml_converter/src/packaging_protobin.hpp b/xml_converter/src/packaging_protobin.hpp index f4a7cca7..471e310f 100644 --- a/xml_converter/src/packaging_protobin.hpp +++ b/xml_converter/src/packaging_protobin.hpp @@ -17,13 +17,13 @@ void read_protobuf_file( std::vector* parsed_pois); void write_protobuf_file( - const std::string proto_filedir, + const std::string& proto_directory, const StringHierarchy& category_filter, const std::map* marker_categories, const std::vector* parsed_pois); void write_protobuf_file_per_map_id( - const std::string proto_filedir, + const std::string& proto_directory, const StringHierarchy& category_filter, const std::map* marker_categories, const std::vector* parsed_pois); diff --git a/xml_converter/src/packaging_xml.cpp b/xml_converter/src/packaging_xml.cpp index d41471dd..aaa9043e 100644 --- a/xml_converter/src/packaging_xml.cpp +++ b/xml_converter/src/packaging_xml.cpp @@ -1,6 +1,5 @@ #include "packaging_xml.hpp" -#include #include #include "rapid_helpers.hpp" @@ -10,7 +9,6 @@ #include "string_helper.hpp" using namespace std; -namespace fs = std::filesystem; //////////////////////////////////////////////////////////////////////////////// ////////////////////////////////// SERIALIZE /////////////////////////////////// @@ -114,12 +112,12 @@ vector parse_pois(rapidxml::xml_node<>* root_node, map* marker_categories, vector* parsed_pois) { +void parse_xml_file(string xml_filepath, const string xml_directory, map* marker_categories, vector* parsed_pois) { vector errors; rapidxml::xml_document<> doc; rapidxml::xml_node<>* root_node; XMLReaderState state; - state.xml_filedir = xml_filedir.c_str(); + state.xml_directory = xml_directory; rapidxml::file<> xml_file(xml_filepath.c_str()); doc.parse(xml_file.data(), xml_filepath.c_str()); @@ -154,26 +152,13 @@ void parse_xml_file(std::string xml_filepath, const std::string xml_filedir, map //////////////////////////////////////////////////////////////////////////////// ///////////////////////////////// DESERIALIZE ////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// -void xml_post_processing(XMLWriterState* state) { - if (state->textures.size() > 1) { - for (size_t i = 1; i < state->textures.size(); i++) { - const Image* image = state->textures[i]; - if (fs::exists(fs::path(state->textures[i]->original_filepath))) { - fs::path output_path = fs::path(state->xml_filedir) / image->filename; - fs::create_directories(output_path.parent_path()); - fs::copy_file(fs::path(image->original_filepath), output_path, fs::copy_options::update_existing); - } - } - } -} - -void write_xml_file(const string xml_filedir, map* marker_categories, vector* parsed_pois) { +void write_xml_file(const string xml_directory, map* marker_categories, vector* parsed_pois) { ofstream outfile; string tab_string; XMLWriterState state; - state.xml_filedir = xml_filedir.c_str(); + state.xml_directory = xml_directory; - string xml_filepath = join_file_paths(xml_filedir, "xml_file.xml"); + string xml_filepath = join_file_paths(xml_directory, "xml_file.xml"); outfile.open(xml_filepath, ios::out); outfile << "\n"; @@ -195,6 +180,5 @@ void write_xml_file(const string xml_filedir, map* marker_cate } outfile << "
\n
\n"; - xml_post_processing(&state); outfile.close(); } diff --git a/xml_converter/src/packaging_xml.hpp b/xml_converter/src/packaging_xml.hpp index d22fd46d..d4019519 100644 --- a/xml_converter/src/packaging_xml.hpp +++ b/xml_converter/src/packaging_xml.hpp @@ -12,11 +12,11 @@ void parse_xml_file( std::string xml_filepath, - const std::string xml_filedir, + const std::string xml_directory, std::map* marker_categories, std::vector* parsed_pois); void write_xml_file( - const std::string xml_filedir, + const std::string xml_directory, std::map* marker_categories, std::vector* parsed_pois); diff --git a/xml_converter/src/state_structs/proto_reader_state.hpp b/xml_converter/src/state_structs/proto_reader_state.hpp index 04f8cbf5..57a0dd48 100644 --- a/xml_converter/src/state_structs/proto_reader_state.hpp +++ b/xml_converter/src/state_structs/proto_reader_state.hpp @@ -7,5 +7,5 @@ struct ProtoReaderState { // A list of all of the textures with their paths. google::protobuf::RepeatedPtrField<::waypoint::TextureData> textures; - const char* proto_filedir; + std::string proto_directory; }; diff --git a/xml_converter/src/state_structs/proto_writer_state.hpp b/xml_converter/src/state_structs/proto_writer_state.hpp index a12c74e5..39492f2a 100644 --- a/xml_converter/src/state_structs/proto_writer_state.hpp +++ b/xml_converter/src/state_structs/proto_writer_state.hpp @@ -8,7 +8,7 @@ class Image; class ProtoWriterState { public: - const char* proto_filedir; + std::string proto_directory; // A map from texture path to the index within "textures" that the path is saved in. std::map texture_path_to_textures_index; diff --git a/xml_converter/src/state_structs/xml_reader_state.hpp b/xml_converter/src/state_structs/xml_reader_state.hpp index 3060cd09..ba50b76e 100644 --- a/xml_converter/src/state_structs/xml_reader_state.hpp +++ b/xml_converter/src/state_structs/xml_reader_state.hpp @@ -5,5 +5,5 @@ class Category; struct XMLReaderState { - const char* xml_filedir; + std::string xml_directory; }; diff --git a/xml_converter/src/state_structs/xml_writer_state.hpp b/xml_converter/src/state_structs/xml_writer_state.hpp index c2ff620e..a456ef9e 100644 --- a/xml_converter/src/state_structs/xml_writer_state.hpp +++ b/xml_converter/src/state_structs/xml_writer_state.hpp @@ -1,13 +1,9 @@ #pragma once #include -#include class Image; struct XMLWriterState { - const char* xml_filedir; - - // A list of all of the textures with their paths. - std::vector textures; + std::string xml_directory; }; From da49bb2ee1d1e85033b8e5690c233e96a2c2ebb9 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Wed, 21 Feb 2024 00:10:29 -0500 Subject: [PATCH 434/539] changed copying option --- xml_converter/src/packaging_protobin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml_converter/src/packaging_protobin.cpp b/xml_converter/src/packaging_protobin.cpp index 4fc3c902..d4415d54 100644 --- a/xml_converter/src/packaging_protobin.cpp +++ b/xml_converter/src/packaging_protobin.cpp @@ -166,7 +166,7 @@ void proto_post_processing(ProtoWriterState* state, waypoint::Waypoint* proto) { if (fs::exists(fs::path(state->textures[i]->original_filepath))) { fs::path output_path = fs::path(state->proto_directory) / image->filename; fs::create_directories(output_path.parent_path()); - fs::copy_file(fs::path(image->original_filepath), output_path, fs::copy_options::update_existing); + fs::copy_file(fs::path(image->original_filepath), output_path, fs::copy_options::overwrite_existing); } else { cout << "Warning: File path " << state->textures[i]->original_filepath << " not found." << endl; From fecd28d02a8abbc26da5e36ab59470b7d6d9291f Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sat, 2 Mar 2024 20:44:24 -0500 Subject: [PATCH 435/539] Spliting xml converter functions into seperate file from dialogs --- FileHandler.gd | 34 ++++++++++----------------------- ImportPackDialog.gd | 20 ++++++++++++++++++++ Spatial.gd | 46 +++++++++++++++++++++++++-------------------- Spatial.tscn | 13 +++++++++++-- 4 files changed, 67 insertions(+), 46 deletions(-) create mode 100644 ImportPackDialog.gd diff --git a/FileHandler.gd b/FileHandler.gd index 10b86f2e..d6174a9d 100644 --- a/FileHandler.gd +++ b/FileHandler.gd @@ -6,35 +6,14 @@ var split_protobin_data_folder: String var user_data_dir: String func _ready(): - var dir = Directory.new() self.user_data_dir = str(OS.get_user_data_dir()) self.protobin_data_folder = self.user_data_dir.plus_file("packs") self.split_protobin_data_folder = self.user_data_dir.plus_file("protobins") - if not dir.dir_exists(self.protobin_data_folder): - var success = dir.make_dir(self.protobin_data_folder) - if success != OK: - print("Error: Could not create data folder:", self.protobin_data_folder) - if not dir.dir_exists(self.split_protobin_data_folder): - var success = dir.make_dir(self.split_protobin_data_folder) - if success != OK: - print("Error: Could not create data folder:", self.split_protobin_data_folder) + ensure_folder_existance(self.protobin_data_folder) + ensure_folder_existance(self.split_protobin_data_folder) -func _on_FileDialog_dir_selected(dir_path): +func call_xml_converter(args): var output: Array = [] - print("Selected folder:", dir_path) - var dir = Directory.new() - var new_path: String = self.protobin_data_folder.plus_file(dir_path.get_file()) - if not dir.dir_exists(new_path): - var success = dir.make_dir(new_path) - if success != OK: - print("Error: Could not create data folder:", self.protobin_data_folder) - #else: - # #Pop up here to confirm overwrite? - var args: PoolStringArray = [ - "--input-taco-path", dir_path, - "--output-waypoint-path", new_path, - "--output-split-waypoint-path", self.split_protobin_data_folder - ] print(args) var result: int = OS.execute(self.executable_path, args, true, output, true) print(output) @@ -42,3 +21,10 @@ func _on_FileDialog_dir_selected(dir_path): print("Failed to execute the command. Error code:", result) else: print("Command executed successfully.") + +func ensure_folder_existance(path): + var dir = Directory.new() + if not dir.dir_exists(path): + var success = dir.make_dir(path) + if success != OK: + print("Error: Could not create data folder:", path) diff --git a/ImportPackDialog.gd b/ImportPackDialog.gd new file mode 100644 index 00000000..27eaed01 --- /dev/null +++ b/ImportPackDialog.gd @@ -0,0 +1,20 @@ +extends FileDialog +const FileHandler = preload("res://FileHandler.gd") +var file_handler: FileHandler + +func _ready(): + self.file_handler = FileHandler.new() + pass + +func _on_FileDialog_dir_selected(dir_path): + print("Selected folder:", dir_path) + var new_path: String = file_handler.protobin_data_folder.plus_file(dir_path.get_file()) + file_handler.ensure_folder_existance(new_path) + #else: + # #Pop up here to confirm overwrite? + var args: PoolStringArray = [ + "--input-taco-path", dir_path, + "--output-waypoint-path", new_path, + "--output-split-waypoint-path", file_handler.split_protobin_data_folder + ] + file_handler.call_xml_converter(args) diff --git a/Spatial.gd b/Spatial.gd index 88c00485..861efbe4 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -55,10 +55,6 @@ const gizmo_scene = preload("res://Gizmo/PointEdit.tscn") # Scripts containing code used by this scene const CategoryData = preload("res://CategoryData.gd") const Waypoint = preload("res://waypoint.gd") -const FileHandler = preload("res://FileHandler.gd") - -# Instancing scripts -var file_handler: FileHandler = FileHandler.new() ##########Node Connections########### onready var markers_ui := $Control/Dialogs/CategoriesDialog/MarkersUI as Tree @@ -85,9 +81,6 @@ func _ready(): OS.set_window_position(Vector2(0,0)) set_minimal_mouse_block() - # Call ready for additional scripts - self.file_handler._ready() - server.listen(4242) if (Settings.burrito_link_auto_launch_enabled): @@ -640,6 +633,32 @@ func gen_new_icon(position: Vector3, texture_path: String, waypoint_icon, catego var category_data = category_item.get_metadata(0) category_data.category3d.add_icon(new_icon) +# This function take all of the currently rendered objects and converts it into +# the data format that is saved/loaded from. +func data_from_renderview(): + var icons_data = [] + var paths_data = [] + + for icon in $Icons.get_children(): + icons_data.append({ + "position": [icon.translation.x, icon.translation.y, -icon.translation.z], + "texture": icon.texture_path + }) + + for path in $Paths.get_children(): + #print(path) + var points = [] + for point in range(path.get_point_count()): + var point_position:Vector3 = path.get_point_position(point) + points.append([point_position.x, point_position.y, -point_position.z]) + paths_data.append({ + "points": points, + "texture": path.texture_path + }) + + var data_out = {"icons": icons_data, "paths": paths_data} + return data_out + ################################################################################ # Adjustment and gizmo functions ################################################################################ @@ -799,19 +818,6 @@ func _on_NewPathPoint_pressed(): self.currently_active_path.add_point(z_accurate_player_position) self.currently_active_path_2d.add_point(Vector2(self.player_position.x, -self.player_position.z)) - -################################################################################ -# -################################################################################ -func _on_SavePath_pressed(): - pass - -################################################################################ -# TODO: This function will be used when exporting packs -################################################################################ -func _on_SaveDialog_file_selected(path): - pass - func _on_NodeEditorDialog_hide(): self.currently_selected_node = null clear_adjustment_nodes() diff --git a/Spatial.tscn b/Spatial.tscn index 96ff7495..164877af 100644 --- a/Spatial.tscn +++ b/Spatial.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=19 format=2] +[gd_scene load_steps=20 format=2] [ext_resource path="res://Spatial.gd" type="Script" id=1] [ext_resource path="res://shaders/range_indicators.shader" type="Shader" id=2] @@ -13,6 +13,7 @@ [ext_resource path="res://icon_new_point.png" type="Texture" id=11] [ext_resource path="res://SettingsDialog.gd" type="Script" id=12] [ext_resource path="res://Category3D.gd" type="Script" id=13] +[ext_resource path="res://ImportPackDialog.gd" type="Script" id=14] [ext_resource path="res://Category2D.gd" type="Script" id=15] [sub_resource type="Shader" id=1] @@ -71,6 +72,14 @@ __meta__ = { "_edit_use_anchors_": false } +[node name="FileHandler" type="Control" parent="Control"] +margin_right = 40.0 +margin_bottom = 40.0 +script = ExtResource( 4 ) +__meta__ = { +"_edit_use_anchors_": false +} + [node name="Markers2D" type="Node2D" parent="Control"] material = SubResource( 2 ) scale = Vector2( 2, 2 ) @@ -193,7 +202,7 @@ mode = 2 access = 2 current_dir = "" current_path = "" -script = ExtResource( 4 ) +script = ExtResource( 14 ) __meta__ = { "_edit_use_anchors_": false } From 10f7c71d66bc6e0f359746d240d2dac64ac20578 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sat, 2 Mar 2024 20:46:38 -0500 Subject: [PATCH 436/539] removed extra space --- Spatial.gd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Spatial.gd b/Spatial.gd index 861efbe4..ab0352f3 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -658,7 +658,7 @@ func data_from_renderview(): var data_out = {"icons": icons_data, "paths": paths_data} return data_out - + ################################################################################ # Adjustment and gizmo functions ################################################################################ From 2f68f5cdb4859cdc5a0807357f8b973b5a7f4715 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 17 Mar 2024 20:36:02 -0400 Subject: [PATCH 437/539] addressing code review --- xml_converter/src/attribute/image.cpp | 17 ++++- xml_converter/src/attribute/trail_data.cpp | 6 +- xml_converter/src/packaging_protobin.cpp | 28 +++---- xml_converter/src/packaging_protobin.hpp | 6 +- xml_converter/src/packaging_xml.cpp | 76 ++++++++++++++++--- xml_converter/src/packaging_xml.hpp | 4 +- .../src/state_structs/proto_reader_state.hpp | 2 +- .../src/state_structs/proto_writer_state.hpp | 2 +- .../src/state_structs/xml_reader_state.hpp | 4 +- .../src/state_structs/xml_writer_state.hpp | 4 +- xml_converter/src/xml_converter.cpp | 2 +- 11 files changed, 102 insertions(+), 49 deletions(-) diff --git a/xml_converter/src/attribute/image.cpp b/xml_converter/src/attribute/image.cpp index 0e15877f..008f3cbd 100644 --- a/xml_converter/src/attribute/image.cpp +++ b/xml_converter/src/attribute/image.cpp @@ -23,7 +23,7 @@ void xml_attribute_to_image( bool* is_set) { Image image; image.filename = get_attribute_value(input); - image.original_filepath = join_file_paths(state->xml_directory, image.filename); + image.original_filepath = join_file_paths(state->marker_pack_root_directory, image.filename); *value = image; *is_set = true; } @@ -38,10 +38,13 @@ string image_to_xml_attribute( XMLWriterState* state, const Image* value) { if (filesystem::exists(filesystem::path(value->original_filepath))) { - filesystem::path output_path = filesystem::path(state->xml_directory) / value->filename; + filesystem::path output_path = filesystem::path(state->marker_pack_root_directory) / value->filename; filesystem::create_directories(output_path.parent_path()); filesystem::copy_file(filesystem::path(value->original_filepath), output_path, filesystem::copy_options::overwrite_existing); } + else { + cout << "Warning: File path " << value->original_filepath << " not found." << endl; + } return " " + attribute_name + "=\"" + value->filename + "\""; } @@ -57,7 +60,7 @@ void proto_to_image( bool* is_set) { Image image; image.filename = state->textures[input].filepath(); - image.original_filepath = join_file_paths(state->proto_directory, image.filename); + image.original_filepath = join_file_paths(state->marker_pack_root_directory, image.filename); *value = image; *is_set = true; } @@ -82,6 +85,14 @@ void image_to_proto( texture_index = state->textures.size(); state->texture_path_to_textures_index[value.original_filepath] = texture_index; state->textures.push_back(&value); + if (filesystem::exists(filesystem::path(value.original_filepath))) { + filesystem::path output_path = filesystem::path(state->marker_pack_root_directory) / value.filename; + filesystem::create_directories(output_path.parent_path()); + filesystem::copy_file(filesystem::path(value.original_filepath), output_path, filesystem::copy_options::overwrite_existing); + } + else { + cout << "Warning: File path " << value.original_filepath << " not found." << endl; + } } setter(texture_index); diff --git a/xml_converter/src/attribute/trail_data.cpp b/xml_converter/src/attribute/trail_data.cpp index 61872dab..749cccbb 100644 --- a/xml_converter/src/attribute/trail_data.cpp +++ b/xml_converter/src/attribute/trail_data.cpp @@ -32,7 +32,7 @@ void xml_attribute_to_trail_data( bool* is_map_id_set) { TrailData trail_data; string trail_data_relative_path = get_attribute_value(input); - if (state->xml_directory == "") { + if (state->marker_pack_root_directory == "") { throw "Error: Marker pack base directory is an empty string"; } if (trail_data_relative_path == "") { @@ -41,7 +41,7 @@ void xml_attribute_to_trail_data( } ifstream trail_data_file; - string trail_path = state->xml_directory + "/" + trail_data_relative_path; + string trail_path = join_file_paths(state->marker_pack_root_directory, trail_data_relative_path); trail_data_file.open(trail_path, ios::in | ios::binary); if (!trail_data_file.good()) { errors->push_back(new XMLAttributeValueError("No trail file found at " + trail_path, input)); @@ -132,7 +132,7 @@ string trail_data_to_xml_attribute( } string trail_file_name = long_to_hex_string(djb2_hash(byte_array, byte_array_size)) + ".trl"; - string trail_file_path = join_file_paths(state->xml_directory, trail_file_name); + string trail_file_path = join_file_paths(state->marker_pack_root_directory, trail_file_name); ofstream trail_data_file(trail_file_path, ios::binary); diff --git a/xml_converter/src/packaging_protobin.cpp b/xml_converter/src/packaging_protobin.cpp index d4415d54..94cd27f8 100644 --- a/xml_converter/src/packaging_protobin.cpp +++ b/xml_converter/src/packaging_protobin.cpp @@ -15,7 +15,6 @@ #include "waypoint.pb.h" using namespace std; -namespace fs = std::filesystem; //////////////////////////////////////////////////////////////////////////////// ////////////////////////////////// SERIALIZE /////////////////////////////////// @@ -60,11 +59,11 @@ void parse_waypoint_categories( //////////////////////////////////////////////////////////////////////////////// // //////////////////////////////////////////////////////////////////////////////// -void read_protobuf_file(string proto_filepath, const string proto_directory, map* marker_categories, vector* parsed_pois) { +void read_protobuf_file(string proto_filepath, const string marker_pack_root_directory, map* marker_categories, vector* parsed_pois) { fstream infile; waypoint::Waypoint proto_message; ProtoReaderState state; - state.proto_directory = proto_directory; + state.marker_pack_root_directory = marker_pack_root_directory; infile.open(proto_filepath, ios::in | ios::binary); proto_message.ParseFromIstream(&infile); @@ -161,16 +160,7 @@ void proto_post_processing(ProtoWriterState* state, waypoint::Waypoint* proto) { for (size_t i = 1; i < state->textures.size(); i++) { waypoint::TextureData* texture_data = proto->add_textures(); - const Image* image = state->textures[i]; - texture_data->set_filepath(image->filename); - if (fs::exists(fs::path(state->textures[i]->original_filepath))) { - fs::path output_path = fs::path(state->proto_directory) / image->filename; - fs::create_directories(output_path.parent_path()); - fs::copy_file(fs::path(image->original_filepath), output_path, fs::copy_options::overwrite_existing); - } - else { - cout << "Warning: File path " << state->textures[i]->original_filepath << " not found." << endl; - } + texture_data->set_filepath(state->textures[i]->filename); } } } @@ -214,13 +204,13 @@ void _write_protobuf_file( } void write_protobuf_file( - const string& proto_directory, + const string& marker_pack_root_directory, const StringHierarchy& category_filter, const map* marker_categories, const vector* parsed_pois) { std::map> category_to_pois; ProtoWriterState state; - state.proto_directory = proto_directory; + state.marker_pack_root_directory = marker_pack_root_directory; for (size_t i = 0; i < parsed_pois->size(); i++) { Parseable* parsed_poi = (*parsed_pois)[i]; @@ -238,7 +228,7 @@ void write_protobuf_file( } _write_protobuf_file( - join_file_paths(state.proto_directory, "markers.bin"), + join_file_paths(state.marker_pack_root_directory, "markers.bin"), category_filter, marker_categories, category_to_pois, @@ -247,13 +237,13 @@ void write_protobuf_file( // Write protobuf per map id void write_protobuf_file_per_map_id( - const string& proto_directory, + const string& marker_pack_root_directory, const StringHierarchy& category_filter, const map* marker_categories, const vector* parsed_pois) { std::map>> mapid_to_category_to_pois; ProtoWriterState state; - state.proto_directory = proto_directory; + state.marker_pack_root_directory = marker_pack_root_directory; for (size_t i = 0; i < parsed_pois->size(); i++) { Parseable* parsed_poi = (*parsed_pois)[i]; @@ -271,7 +261,7 @@ void write_protobuf_file_per_map_id( } for (auto iterator = mapid_to_category_to_pois.begin(); iterator != mapid_to_category_to_pois.end(); iterator++) { - string output_filepath = join_file_paths(state.proto_directory, to_string(iterator->first) + ".bin"); + string output_filepath = join_file_paths(state.marker_pack_root_directory, to_string(iterator->first) + ".bin"); _write_protobuf_file( output_filepath, diff --git a/xml_converter/src/packaging_protobin.hpp b/xml_converter/src/packaging_protobin.hpp index 471e310f..495ef54e 100644 --- a/xml_converter/src/packaging_protobin.hpp +++ b/xml_converter/src/packaging_protobin.hpp @@ -12,18 +12,18 @@ void read_protobuf_file( std::string proto_filepath, - const std::string proto_filedir, + const std::string marker_pack_root_directory, std::map* marker_categories, std::vector* parsed_pois); void write_protobuf_file( - const std::string& proto_directory, + const std::string& marker_pack_root_directory, const StringHierarchy& category_filter, const std::map* marker_categories, const std::vector* parsed_pois); void write_protobuf_file_per_map_id( - const std::string& proto_directory, + const std::string& marker_pack_root_directory, const StringHierarchy& category_filter, const std::map* marker_categories, const std::vector* parsed_pois); diff --git a/xml_converter/src/packaging_xml.cpp b/xml_converter/src/packaging_xml.cpp index aaa9043e..9a77d117 100644 --- a/xml_converter/src/packaging_xml.cpp +++ b/xml_converter/src/packaging_xml.cpp @@ -14,16 +14,68 @@ using namespace std; ////////////////////////////////// SERIALIZE /////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// -void parse_marker_categories(rapidxml::xml_node<>* node, map* marker_categories, vector* errors, XMLReaderState* state, int depth = 0) { +unsigned int UNKNOWN_CATEGORY_COUNTER = 0; +void parse_marker_categories( + rapidxml::xml_node<>* node, + map* marker_categories, + Category* parent, + vector* errors, + XMLReaderState* state, + int depth = 0) { if (get_node_name(node) == "MarkerCategory") { - string name = lowercase(find_attribute_value(node, "name")); + Category new_category; + new_category.init_from_xml(node, errors, state); + + string name; + if (!new_category.name_is_set) { + errors->push_back(new XMLNodeNameError("Category attribute 'name' is missing so it cannot be properly referenced", node)); + // TODO: Maybe fall back on display name slugification. + name = "UNKNOWN_CATEGORY_" + to_string(UNKNOWN_CATEGORY_COUNTER); + UNKNOWN_CATEGORY_COUNTER++; + } + else if (new_category.name == "") { + errors->push_back(new XMLNodeNameError("Category attribute 'name' is an empty string so it cannot be properly referenced", node)); + // TODO: Maybe fall back on display name slugification. + name = "UNKNOWN_CATEGORY_" + to_string(UNKNOWN_CATEGORY_COUNTER); + UNKNOWN_CATEGORY_COUNTER++; + } + else { + name = lowercase(new_category.name); + } - Category* this_category = &(*marker_categories)[name]; - this_category->init_from_xml(node, errors, state); - for (rapidxml::xml_node<>* child_node = node->first_node(); child_node; child_node = child_node->next_sibling()) { - parse_marker_categories(child_node, &(this_category->children), errors, state, depth + 1); + // If this category itself, without any cascading values, does not have + // an id then create a new one for it based on the hashes of its name + // and its parents names. + if (!new_category.menu_id_is_set) { + Hash128 new_id; + new_id.update(name); + + Category* next_node = parent; + while (next_node != nullptr) { + new_id.update(next_node->name); + next_node = next_node->parent; + } + new_category.menu_id = new_id.unique_id(); + new_category.menu_id_is_set = true; } - } + + // Create and initialize a new category if this one does not exist + Category* existing_category; + auto existing_category_search = marker_categories->find(name); + if (existing_category_search == marker_categories->end()) { + existing_category = &(*marker_categories)[name]; + existing_category->parent = parent; + } + else { + existing_category = &existing_category_search->second; + if (existing_category->parent != parent) { + errors->push_back(new XMLNodeNameError("Category somehow has a different parent then it used to. This might be a bug in xml_converter", node)); + } + } + existing_category->apply_overlay(new_category); + + for (rapidxml::xml_node<>* child_node = node->first_node(); child_node; child_node = child_node->next_sibling()) { + parse_marker_categories(child_node, &(existing_category->children), existing_category, errors, base_dir, depth + 1); else { errors->push_back(new XMLNodeNameError("Unknown MarkerCategory Tag", node)); } @@ -112,12 +164,12 @@ vector parse_pois(rapidxml::xml_node<>* root_node, map* marker_categories, vector* parsed_pois) { +void parse_xml_file(string xml_filepath, const string marker_pack_root_directory, map* marker_categories, vector* parsed_pois) { vector errors; rapidxml::xml_document<> doc; rapidxml::xml_node<>* root_node; XMLReaderState state; - state.xml_directory = xml_directory; + state.marker_pack_root_directory = marker_pack_root_directory; rapidxml::file<> xml_file(xml_filepath.c_str()); doc.parse(xml_file.data(), xml_filepath.c_str()); @@ -152,13 +204,13 @@ void parse_xml_file(string xml_filepath, const string xml_directory, map* marker_categories, vector* parsed_pois) { +void write_xml_file(const string marker_pack_root_directory, map* marker_categories, vector* parsed_pois) { ofstream outfile; string tab_string; XMLWriterState state; - state.xml_directory = xml_directory; + state.marker_pack_root_directory = marker_pack_root_directory; - string xml_filepath = join_file_paths(xml_directory, "xml_file.xml"); + string xml_filepath = join_file_paths(marker_pack_root_directory, "xml_file.xml"); outfile.open(xml_filepath, ios::out); outfile << "\n"; diff --git a/xml_converter/src/packaging_xml.hpp b/xml_converter/src/packaging_xml.hpp index d4019519..a099d625 100644 --- a/xml_converter/src/packaging_xml.hpp +++ b/xml_converter/src/packaging_xml.hpp @@ -12,11 +12,11 @@ void parse_xml_file( std::string xml_filepath, - const std::string xml_directory, + const std::string marker_pack_root_directory, std::map* marker_categories, std::vector* parsed_pois); void write_xml_file( - const std::string xml_directory, + const std::string marker_pack_root_directory, std::map* marker_categories, std::vector* parsed_pois); diff --git a/xml_converter/src/state_structs/proto_reader_state.hpp b/xml_converter/src/state_structs/proto_reader_state.hpp index 57a0dd48..161fa1b2 100644 --- a/xml_converter/src/state_structs/proto_reader_state.hpp +++ b/xml_converter/src/state_structs/proto_reader_state.hpp @@ -7,5 +7,5 @@ struct ProtoReaderState { // A list of all of the textures with their paths. google::protobuf::RepeatedPtrField<::waypoint::TextureData> textures; - std::string proto_directory; + std::string marker_pack_root_directory; }; diff --git a/xml_converter/src/state_structs/proto_writer_state.hpp b/xml_converter/src/state_structs/proto_writer_state.hpp index 39492f2a..f3a36ca0 100644 --- a/xml_converter/src/state_structs/proto_writer_state.hpp +++ b/xml_converter/src/state_structs/proto_writer_state.hpp @@ -8,7 +8,7 @@ class Image; class ProtoWriterState { public: - std::string proto_directory; + std::string marker_pack_root_directory; // A map from texture path to the index within "textures" that the path is saved in. std::map texture_path_to_textures_index; diff --git a/xml_converter/src/state_structs/xml_reader_state.hpp b/xml_converter/src/state_structs/xml_reader_state.hpp index ba50b76e..7c5c7be8 100644 --- a/xml_converter/src/state_structs/xml_reader_state.hpp +++ b/xml_converter/src/state_structs/xml_reader_state.hpp @@ -1,9 +1,11 @@ #pragma once +#include #include class Category; struct XMLReaderState { - std::string xml_directory; + std::string marker_pack_root_directory; + std::map* marker_categories; }; diff --git a/xml_converter/src/state_structs/xml_writer_state.hpp b/xml_converter/src/state_structs/xml_writer_state.hpp index a456ef9e..ac7384cf 100644 --- a/xml_converter/src/state_structs/xml_writer_state.hpp +++ b/xml_converter/src/state_structs/xml_writer_state.hpp @@ -2,8 +2,6 @@ #include -class Image; - struct XMLWriterState { - std::string xml_directory; + std::string marker_pack_root_directory; }; diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 348a4577..7f081d1f 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -106,8 +106,8 @@ void write_taco_directory( if (!filesystem::is_directory(output_path)) { if (!filesystem::create_directory(output_path)) { cout << "Error: " << output_path << "is not a valid directory path" << endl; + return; } - return; } write_xml_file(output_path, marker_categories, parsed_pois); } From 06479ed7d53571af48728ce07a46c937b2cd7e7c Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 17 Mar 2024 20:48:56 -0400 Subject: [PATCH 438/539] Fastforward to resolve conflict --- xml_converter/src/attribute/image.cpp | 2 +- xml_converter/src/packaging_xml.cpp | 13 ++----------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/xml_converter/src/attribute/image.cpp b/xml_converter/src/attribute/image.cpp index 02c362ff..ad8cdf04 100644 --- a/xml_converter/src/attribute/image.cpp +++ b/xml_converter/src/attribute/image.cpp @@ -35,7 +35,7 @@ void xml_attribute_to_image( //////////////////////////////////////////////////////////////////////////////// string image_to_xml_attribute( const string& attribute_name, - XMLWriterState*, + XMLWriterState* state, const Image* value) { if (filesystem::exists(filesystem::path(value->original_filepath))) { filesystem::path output_path = filesystem::path(state->marker_pack_root_directory) / value->filename; diff --git a/xml_converter/src/packaging_xml.cpp b/xml_converter/src/packaging_xml.cpp index ca0c84f3..f5700314 100644 --- a/xml_converter/src/packaging_xml.cpp +++ b/xml_converter/src/packaging_xml.cpp @@ -75,18 +75,9 @@ void parse_marker_categories( existing_category->apply_overlay(new_category); for (rapidxml::xml_node<>* child_node = node->first_node(); child_node; child_node = child_node->next_sibling()) { - parse_marker_categories(child_node, &(existing_category->children), existing_category, errors, base_dir, depth + 1); + parse_marker_categories(child_node, &(existing_category->children), existing_category, errors, state, depth + 1); } - else { - existing_category = &existing_category_search->second; - if (existing_category->parent != parent) { - errors->push_back(new XMLNodeNameError("Category somehow has a different parent then it used to. This might be a bug in xml_converter", node)); - } - } - existing_category->apply_overlay(new_category); - - for (rapidxml::xml_node<>* child_node = node->first_node(); child_node; child_node = child_node->next_sibling()) { - parse_marker_categories(child_node, &(existing_category->children), existing_category, errors, base_dir, depth + 1); + } else { errors->push_back(new XMLNodeNameError("Unknown MarkerCategory Tag", node)); } From 7f07be6446ff21b39b5aec058eeebba17a160d77 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 17 Mar 2024 21:20:21 -0400 Subject: [PATCH 439/539] Changed the images in tests to smaller icons --- .../texture/input/pack/my_texture.png | Bin 5881 -> 0 bytes .../texture/input/pack/my_texture2.png | Bin 13277 -> 0 bytes .../texture/input/pack/somedir/my_texture3.png | Bin 13277 -> 0 bytes .../input/pack/somedir/texture_three.png | Bin 0 -> 8184 bytes .../texture/input/pack/texture_one.png | Bin 0 -> 6530 bytes .../texture/input/pack/texture_two.png | Bin 0 -> 7066 bytes .../test_cases/texture/input/pack/xml_file.xml | 8 ++++---- .../test_cases/texture/output_proto/markers.bin | Bin 115 -> 118 bytes .../texture/output_proto/my_texture.png | Bin 5881 -> 0 bytes .../texture/output_proto/my_texture2.png | Bin 13277 -> 0 bytes .../output_proto/somedir/my_texture3.png | Bin 13277 -> 0 bytes .../output_proto/somedir/texture_three.png | Bin 0 -> 8184 bytes .../texture/output_proto/texture_one.png | Bin 0 -> 6530 bytes .../texture/output_proto/texture_two.png | Bin 0 -> 7066 bytes .../texture/output_xml/my_texture.png | Bin 5881 -> 0 bytes .../texture/output_xml/my_texture2.png | Bin 13277 -> 0 bytes .../texture/output_xml/somedir/my_texture3.png | Bin 13277 -> 0 bytes .../output_xml/somedir/texture_three.png | Bin 0 -> 8184 bytes .../texture/output_xml/texture_one.png | Bin 0 -> 6530 bytes .../texture/output_xml/texture_two.png | Bin 0 -> 7066 bytes .../test_cases/texture/output_xml/xml_file.xml | 8 ++++---- 21 files changed, 8 insertions(+), 8 deletions(-) delete mode 100644 xml_converter/integration_tests/test_cases/texture/input/pack/my_texture.png delete mode 100644 xml_converter/integration_tests/test_cases/texture/input/pack/my_texture2.png delete mode 100644 xml_converter/integration_tests/test_cases/texture/input/pack/somedir/my_texture3.png create mode 100644 xml_converter/integration_tests/test_cases/texture/input/pack/somedir/texture_three.png create mode 100644 xml_converter/integration_tests/test_cases/texture/input/pack/texture_one.png create mode 100644 xml_converter/integration_tests/test_cases/texture/input/pack/texture_two.png delete mode 100644 xml_converter/integration_tests/test_cases/texture/output_proto/my_texture.png delete mode 100644 xml_converter/integration_tests/test_cases/texture/output_proto/my_texture2.png delete mode 100644 xml_converter/integration_tests/test_cases/texture/output_proto/somedir/my_texture3.png create mode 100644 xml_converter/integration_tests/test_cases/texture/output_proto/somedir/texture_three.png create mode 100644 xml_converter/integration_tests/test_cases/texture/output_proto/texture_one.png create mode 100644 xml_converter/integration_tests/test_cases/texture/output_proto/texture_two.png delete mode 100644 xml_converter/integration_tests/test_cases/texture/output_xml/my_texture.png delete mode 100644 xml_converter/integration_tests/test_cases/texture/output_xml/my_texture2.png delete mode 100644 xml_converter/integration_tests/test_cases/texture/output_xml/somedir/my_texture3.png create mode 100644 xml_converter/integration_tests/test_cases/texture/output_xml/somedir/texture_three.png create mode 100644 xml_converter/integration_tests/test_cases/texture/output_xml/texture_one.png create mode 100644 xml_converter/integration_tests/test_cases/texture/output_xml/texture_two.png diff --git a/xml_converter/integration_tests/test_cases/texture/input/pack/my_texture.png b/xml_converter/integration_tests/test_cases/texture/input/pack/my_texture.png deleted file mode 100644 index 56c45ea1f83feb7fa9ecdffe6a7c6396594a4dce..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5881 zcmV zaB^>EX>4U6ba`-PAZ2)IW&i+q+U=TIavVF7MgOsiUIJ!!EC-`m?Vy+6#}SznB~tbD zs`{g?tw@QPjEunG!yO{%_J9B5xc}m-BvqG-Xl=E6zH-YgcHXFezS{j6e7-;LR~@g< z!q3Ou#|M!^iP!Y}D*bhS=Xm*X!F!G{em?H>^-0v%K(7zp116g}@@9QrB*)`(Jml9v zZNHY>R6Z|t#OHOsPP|Kb{ZDd-{uso5cb^YrAxf)oR*G?_ko^6r&kB6cj6SB!Y`?FXTJAN(8Q zPZOt)6~&)FSS6${+j;#zXX!cn*p@LukB<6C|A zljJNv{os3s79vw07jjskhZFXFonf-X9Cs96W1KPFW11wkIMb6SzQc)27cfJ{vnOES{7#J*Y$#1{iKl||Se7kd|g(!Iah!yLKR=F(0GG{+Ii-d&p z%3HYset*Bx??2TKrAh|N4YRVr?#DC4DB(wKrJLu(d4<=fD}s~t8h{WncVRIUe-6He zR6-42Vw4bwqmrP`%45oLkbzK2Tr4u?lxlPmHQL-wA4vf z&V~Astkh7aw{j_^7AfjVE4`+gYpJzLHIVC)BukMhA}UR~Ce2#3s;Fwy-eOB&U}?2U z)7Dz=(RC*3jMX{6b7aJkMjmCO|f{1cQ@eIU{2+ z2Qn^}0SY==&b)@4qh-!==9{5hi7c{MZrlo%F;bX!h~rX5^WH~jvpAMDXR%XUxr+9HO+w ze4#@KmApene0pv*v2e))831nR9Pk!+*30n=0idIZp~EWflsaMqskH5YOd!kyDr*(e zYH{dfZWwGHRtt=!6qFfK?8t|$7&B$iPy84}j-`|t>fA`4Y<1P8^tp5w z-Lkw?_15bM7KA@4zrt)bD&2F(g&?O%M;msx_n5yKu~J24 z^fL193ZZBm1bggW$4bMMyBcezTfL^K2u%??W8Kah6g@erb@a|~^bhllqQ^_hbj9w0 zK64TB;FPgf^p*x8^eb;?@0fpioEbFzrUWP0D5xl3cafdZSkWV{_8! zAy6Lj<7D^C*`Lm(w>W!~b)g@mx0Bnv?Yqy@#z>55n%WlOhz1GZ%KNJibP5eZw~nXe z&!Tz#p|}yynLsVBPOT@Q$kXW_K5o>D(=)QPKo*H_s&y~cH+s#7#SpYsxsK3+V<*(S z5g_n+8Ja2oy3hb%-pavIOOrlL^F(HAd(27Wj-)5m0buRXW^98e8*iH9f95WoR{kLcTZlf5U0C)nh zH8Z*%rsGmgJ5KCP8_1ne={sP2ps*-LlvAOHa3QH#gdM+Ep_s^rERshRG6AY%S@mYL z47&lEsvca)GFAceQUXNY95c_V$I%stJKNl(Ax@5TXgz(96sqKQ6ZL=sJ{jt`$$u`m zr=#*;7r2ir-scx1j+tZ=UECK?Fm|?FkCSTg&yohJXgu#Rg#95%|I>kg@*2-2K9k8` zsn0zPYwQBh*bsfUOYU;S(v zf{v<{_>?_oEy(i}2->2~k;~h5j1Yzs8~;XcNun&>q3-h9D<=ooi=YZ(^DTA$(P z*k#gTclbkdBHbAtJg0i24exr%-Gm6*J8K%ya5Pze14Ma0h~@@>6Jj6Dyu0H=x_r~I?xKK-%gu)C%_3@qhD`LMDP#_UUxAAV`ym;LwQ(v5wwWiKsZJfjSTp`L0{<>2$#T{PQL5Uh{E< zo%fC5mSC3#(Gs=0Y~T zP!HW7>Jq&&$tP;Od0KM`)grbCxou8CLLw9v*pnbCbmF4h}O!lNuqY@B&37fAb;pj7p*d}#2?uZ$pm3y;)7@lEs zK^Vw2oY6|1*e>F^Zfpxchrg35!%S*@LK|GHH@3lBY`fi{LJWd1Yi69pq$2$UgNQ5U z(7cI}DMQC5(H_UNOj(i<Jjvx5+r_1sw1eGOgadBm;-+ z3@YQwjHc0S(4flK0yE5O$3{##c7*~!m!Jti)(x~XUj$X!#Bjrz4yDf<&q^CLyvT77 zFyB-By%wOiH3cXuA;8N657pxfEal}M*m)X!p-9qv+7 zlO!IR856fI0VBA;B?U_+(K3_M=#i~81P^itL&yg_o81?H6-$`g?AD3JV$*!9fuQ3B zAtlhTnPalL=4wnKc8?!OREHCbeLs})hm4Xc&^1_2!_BG0j@(p-3h~8m7|gFX47i+< zzT&M&Fp&}P%j2{!U8P@q|DV2o=_`TFn=w9_ zhKRfZLO2INew9SZ&A1EIgn%2=c-?mU3!woJqtY+{M_kb4MUji~#Q1g9mhI znyjXfu!zeRvAebg31W~#Y{9W>4WS)68$1E&5VU6a85zog(+;%PO+|41iKDnFX0Xt2 zKr10^7K?a>t#*Q2=eoi&sD2z2MY)zeGnxgH)rzgE-Df2H zw3!yloOck8uO-^kd{eZ|tl%(hOu3JO@N|A+3D~#lq9k?{qQx4?S*<#u=s^38#I#5X zzyyA!k`eLdM~Nml0NC#476=*;b*q$A>M)N98B1Jv&uS27&ujrD4?HGTAQdeOiAqKq z043OX-&WjCF_zRv4HI=b{Ur4Ruh`bw3%809K*jHN(45dVR#HK8k4H382UQitHZnG= zMks4!=$*8%=#XsTpmng@IE!G&$R@X}%{o44o872O3UUIvY9ZP!!|8CcltQqF0LAJO z@4!MwL5LXQZTzc&RYtwHG0;Z_a)$=H^loykl)zRU76Y4@(t378 zxlqCZ$%9cM-_f$;Ah#*|z%#%-kO^!@2q4(Kv;}9NN*F2xTNlmjhq*0wj~CQn_mIU( z9V;5FXX%gF?Iw0p>AlN+^q*Ox1ZYP&g$*@UGvi%s19yxYW{j{ECPsoAFjv9F(GPaB zfV%vO_EFxX$bllLlPkfmvX(bymBZL);6@y(mt|WhzMo)H5Awcxrcp=#Vvy7MR&3Fi0m*4f%kk z&2I9TGVm)R%mFJT*EZ8{xAx1nD(vVR;xl1$ynl?5l1Pr~rdvJineLx+WU7OXF$zFD zP^Lt5b$fbDJp)&nVKOurjBE-iy?;}Z=(R}6ZvmY;d}eo3+P%dQaEV`!VSv5@~ zD{k8w4RAapEeSjauTau$Hb9XA@f~`O@b`hCXlr;3^Bd5s@{*vrLMp)hcltfI1 zyEX>4Tx z0C=2zkv&MmP!xqvQ$?v25j%)DWT;LSL`5963Pq?8YK2xEOkVm2O&XFE7e~Rh;NZ_< z)xpJCR|i)?5c~mgb#YR3krMAq3N2!MaCsl+y>qzlK0v6KnPzp21DbA|sYG1NWLL$m zSA@_*6-B?yEMrcRlJH$$_XzO)F2=L`@BO)Y)ttqEfJi*c4AUmwAfDc|4bJ<-5muB{ z;&b9LlNuy`C`-Ngjg)JvC_t@Xlle$#8Fk#DPPEVta9Gstd*;* z*(ZNtIH#{HbDe4!2`pj>5=1DdqJ%PR#Aw$^v5=zkxQ~Cx^-JVZ$W;O(#{w$QAiI9> zKlnXcD?d5mC57Wa=ZoWfi~wD`K%?e3-^Y&AI01ssz?I(eSL(pbC+W487Ci#`wt(i|qi@Or1GhkE&6`{E9H$RJnr4-}0S*p<(E??!`@Flm zeQy8WY0mElL%MR5WcjsD(7jgO@hr$DSdY?PPU%oHvMSj0 zP53<*yEJF3aE$p1@_rfAKENZp_X7(E_SJPtHwN^V2!X^ z@k#*_-bb*erJDGC1ZxVbaScYbK%626gtg&u_t=}Xk8LZehsj1#1Yob;~tI$&Z%C%yZ z9lI2(?AWDPWv4%iRd(!BX0e@qDOTCBYo62WU2pW^fDh2WZSiIe@!g8`MsEXkshh@$ z$mNH>y=_+t%TOtpRSjg)<#ro|@N+lFRXF#9NfCXKH|h>Es(O|;)&PGCQjfvayXmoO z^U}8MLZr+cW~x^QECkAXzptCdJ-aDM-8753X`J_d|3P}JN;b>)&G7pH_1^D~*Xzd@ z`_*i=yDw~>=}X(Tt~j&06!>hQE}cbgh(L*m9Iw}H_{`g4WQcxeXVxRD?gy+J%&96< z-)CB|D~4H7szK-6Ziu2`@SEUnV)RvzUH`X5n6+B1{11nt1nAW&@;i+lkFE%_y!ZQX zalhTfG3NGg59vzvu<2yzvj6}9000000000000000000000000009fK52X{qEXnJy< P00000NkvXXu0mjfm(VbP diff --git a/xml_converter/integration_tests/test_cases/texture/input/pack/my_texture2.png b/xml_converter/integration_tests/test_cases/texture/input/pack/my_texture2.png deleted file mode 100644 index 21a80261d86c0235b084608c7558c247f3968707..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 13277 zcmW+-1yoy26NLgri@UaHad&HR=PT}7+}*9XOVDD4;%>#=-5r9aSa5g#*PnAjPQu%_ zyR-9V?%cUV{--4U0fiU^1_tJXtc-*T@c#Jkh4dcy9dWE947|a+h{>uU0YAP--y?v} z$c{4FE-)~0FaKV!GY`~_z?Vd>l3K2+4(6^N#?EFi9v&VnR`xb7rpAtDEDp{VnWsX; zFfbosWF@|;d1jqtd-x`+-@a{v$dM8fLWpIkQl`aNXR*FYe*MCPYNA<_23}xJ)$b~A zds4-8(_dRf)&Ge!>rENWmT z48>C>Q=&}rFDb|eLxk?|ZniHLhF3J$kuAcq}UAfgl9zFiKVjwrFR-3Cl_%z7DS;E%wjapgdt=*bp`>(#d;vSrY%Jm#M(% zgM&jQd~TfV`3CW`J~ejJCs;hnvjxtc`{(-l(4oz{Ox;+{v(5oR9I!TH4+X-Ye#5GTZDeNKFnT*?8CyoQqv7M?k@K<*e@iFqwtEoZmvW9ZhJ?^ z0sdO3({IGtR&~t7jI@&4$-X9dbEC^sC``G(aMlNUSLAdFe>BTHNdDj+L{a3Uz>lfd z`uQEcj*TxejyA0W?pSp_YipVIwfcmD-XCq2&M>2hnWj;jN%#Uw4+fdfof}}W!{zK$$# zNZw%}O-mdY9Z7cKdLj^1(x!;r32`a6a}RagDNwRaUmj&|7#R&!QAM4SZB-vms*#;r zD9|)4v0e-Es~qHnic6wT7b#+@+7m!w{&LABH~PV20Adh_*6`LwWPV1KuAI3d-nbs z{&q)97+Nqb9IRFGIqaJtokLV-DOgr13Xix=(nvfe<1$Jv&#ALhBqa3x)ok<~r{5@F zdxv@oDCC_DoBBMzu*$)yGOvP9EncJ^s=b6xa`hup`qY(U_N)|2QShHfEQm6)dXr&bm~Z#Jjya)^XZq#a&S(d{5ka;{R^s^JswGhO4(tH=r$% zIPW&+#fHs(C@m}7n@-&G=p+-d_Oc-Tvcy8h92XgVG71gw*Yh-0gflmio8@2NcLK&r zGBGTU_}oS`$v1Cc28bHk=dkHn9-nqdXFe-9usLpRA?H20o-m}kq9WT5jCJ`1CiXoc z$2xQq8u6pt-Pi!udNNXKr)LSPZOGM=FH#_<<2pT0oSR=<3Iec#-CMbl=S)x*TL04SDDFIP(e3SpshW~($S zw)pOJa4s8d`ttH3Q@LbbR#EZ81K+oApkhpHs;sQccy7<{z*PWyhYHW@kOk``@@z51 z?`f_CM{ntkRXE7e=uc9#E%21tnBGF7c(nPVhbQju?`s@qbfR}JucBp@;yzJvhBL3B zpPwnGC1it&545FzCpLigM%h=4 zj4u;^`m;H9xM%+EWch+KOUP>T_Go~nFpDo`G9gG9&+B%vQa5Q;Ffuq?`P;W|g^)zk zKs1F8nByqiRw!1el~UDbJ>^64p*osLI%iI|Ki(P@>y~%>_;~s>&{@3q*UCNeJz2t^ zOAuaEK`TBVV@KtTYoURW-R8&Zo+>EdKM_3*N>!dpr{k1}5eMrz2xkFQ?ZxY<5WUGE z`C=;iZ!7p$_{{GP<~Vb}KJoO2%x51IVEkd22=>>I!i!&MdL{BHf%#9D-JHMaG@<7k zZsLXu2RuY6W(j+IyKo~D2)S6>KUEc&ItwiQB{lPww)j!F)dn-T)LlP?4#SS5B37M; zcHcQ?Iw*z`{{184(S0S5f zu<^FN`{L1RJSJWPL03XU$1tQpVP8 zm4_J)DhHGDXbg-Sdh~kL@k+(J(}}84sVly|?Lee6JA$yU1Mnj9X!Y>t6yV4QOLQ3> zPw}YCp$qei+b1WI&MGk`Pp|?W*5UE-yh8&Rzt}8xy5OSJh1Fnyz4x2;-h@H^;?>!| zC`IpLqJ}Q4@O!Ou`IqGXZG7w> zl60nNN{H6hlwd{fRujJC|20w?BI9L1m#)0c8dn3;LQQjyUReig)o}lk@k0lp&8edQ^ z<=C21j~X2X*-GTRNF*BZ^zWH$$Nf3hT6ZuyIyqMLcN@IA}qzD3}+UTw_);red!nYlb*HUC}!Kr~IuEHOm1_TbWwyTFQasgfCsZ_n&gj)n7 zNk0nGrNw3@Q`8~-r=``~31?-yUKgLcc=A!+H)lOY*vodsJy6wxBQoxodj54(LB^4B zHLSt7%LtM5Bm4mxld7>bNG4A(M@B6Sdb&3xb9ITKCkum~DVpXw4+Tm$%ZHWNtM7AV)Q5E|)@ZhRmNn?Rq zdFr~)l0+EV5e-*oS!^?YSu0?$%h7Jr&Ovh9tL3O!H*wXOy@}j3NIz+Y|O8!-kLht&76FXj|OAQ2*#W#~H zby~&G%;iRFapDaQOQ{i)Cz)g<6a*usoEeb6sM3tVLGf(N9i>tz;7%E378yxNyiLEe zY5%CGY3R){I5!MHl^5Vv9)6|bxx^&Wu|+aO$+UGb_DJ7)?pxWsHH^a%JWSmAA07n0 zl`Ai90%XclEzvFU6GrRlUkh%P3jEp{)si(;n3`dW*yG4V<+BZxolO)#>OKID0`LOk z$}vF%#zc11NK^~t1+6CNGAuP(@HB<@xeL#9*J0e zkJ$4Z2{qG3*t@?8g`Hta{gO(m%059=suac5&A98~ zGJMlZ`6`pQ21oCl@_ad_#KFoH;F;fJv~>|)>;&!K2Ee?t$V<}s3nOEBX;o>SX8gU) z28R7y)T>|HT(Ram?KEe4Tt0-NPed6jxOn=7%4hww0~^eZs3g2+IQmjCy$y{U*DGoh zA498{ot5kn5YdZ}vr8A7Jg~C`!sg1Qg@BkyD&#BI4B-OK4}cCuX3({UJ z0r@3u(xnzvL6s!afR{6kugo$^QN~YIePY7vb*%fG?(<)spMQ!h3b9S+8jC;ur>Q$c z6skxapUbD*cAg*=Z+km?7!hGPwRnOk>9B-xkEx2vU|cY57hiVViu-Uw7%L_6I`4ee z4|p=#aey7-%GQ=fgDuf;9#yI!*Wt~3F)kR-=H(x#jmV}!`r!?v`9LI`lbB^WCBf5jRYC{$Bd zSN*0fDJx5~u)w{PrR1$$A(4F2hOP>PKF3UrkdOudLQhxsMjy{&QBY7EF(nV9RGIOP z2Ks|DgsgDoQynmg1CH;t8&CN9Yd&>UdjTLcx)e0T@%G{%X}=366iUy(#8lT8BLK;2 z$3lsglaUu3DxEvb;s?p@h1zm(x(v4`R6;C`Gq+CuNS@fPF13 z*{)t++m9@WW2Ig%Cewhgbu4`|7r(Z@EV?XJZj!`G8TjpP=7)=5JVYga#XevRHNZkAi|}6S{Y`W@94mrve4u zBG6;kli47^HB5d}MZ_H`q($6{**x6vJ27PQZak`$`~s}UxZw|Nks?v-d>riJce(vB zOjXa0XU(mB#Td$>gv-EF0+j1@wj=M-GC@m=i?x13uo~4Xy+zDE{EW94lP5@MT-jAW zF)1WXd~w-lvP0w4Uk~aFZ8sR);jfP~K!lvm-EL=Rf(e6ysGV5cZan9?MIy;!1XL&( zm|g(oAX>fFQ^uXC-Q*vBj$Duv0^~Vlr^IW8$lua(O|-hwDJhzlYiaw)H21CUhutLA zlO3mizh{OW-q>;hG6HKZ&Um$c!;-p@=>-c#e(uJ$j)Onkmu2kGNwiYcO9;&2fk9hoklIJ$>`d|Vl6h-+I#pQA=?dsuq z%*^-YL@qPSoRU2oE-i^v+&Y)~@m48cG8!i5xAf6h30f6=gmS`}2g%17Kh(9<4HmT}Mfp3GTbXC}i>sm2nyRZfH>V`BR2%tgW@1 zEt${SpJ?_c`DtxV_xI(2r09A$n>akIUfDqKb>g+N4NX41CYh}Ujea!`AZm08U5|~%C2g3vz#IR&1c0y(`Fo#A!E_czTWt(ucs7Z6SxbQ zgoNGaB##^>o&i#E2g)Wt&NVF4c7O{I(Fuv6^+>iOX2Niwzy+)6&&_kyWU9XR@rur|$WtBKyN;K3o*zYoU zCD)Wh;eDT>FAeN-W)WfoSwbuB5$<&bM?0FQ-Lr6_Bni6g2jqP z^TR=&K4Yl}HzSjiX1hhg&vi}&nN7!kORBbRhjIL>T4;y|%p1!9xS%TFSO`fLrPY=#dcBWqE zL4pUFtKj#GUOYo_xyB1e%uM>7IdjFFTt0DWO5tCR5nrv0$UTdu+um7y#`RJ$K^sf! z+^^wpnX!cQ#rtnfRkPHzIu@9XeL3xT(#Xm3VI><_!2WpXp@x?TBmhw0u!vCrFu z(xGL;)VI661EeBvCPapQ9b!-p@Iv=Q&PP{u7ia0{=Uj)kaNgHjhXw7MkPyq)i#=2{ zve}`*R9RbDMMY*t4f`F?)IS$8W+wlJ7}C}@txmU*%B=0EZAryP ze~%{0s+1KK_kum%B=m4BoaFU_+n*^#UToPZ{MsXWDb4n4c|+S!z<+yhE-&RyGae{) z8&6ezD}gM+D&!%mEPO%Y>-*h<%_A>AKdHJ)f8fVmXCng<>M6Zz8jcr$D(23-!#bYg z=sS5R^M!N$o;9`4cLo8z>!L3|*VAHyplk^OKG_$=PI0-UNb67*MC5X=C@J~AisnX1 zA!yDP?e7`BOjyg=O;Z)w)I=cc(|^@{END3=5b+^1`RqT}Vp~N`wegYN9ZKz1%TCih z$O8BJRVKko{ar~u)K!3tRU|-^Rpc%3yvHAViB7aDVX8}~YHt?J1FLl`6#5TU`k$Ne zFlK?Co*p>PveVKc6@KkvdQrgj=XGrG%cIGoKsW zGxKeF`^4^#qMHsjStY5;sV9e17#|dVa%jd5%Lje`xVaEoH437m?XU4IHBFs{*~qy= zFbrr@nc>F5I?--*6sfJ%=dP36iP72~kq@HY!ftk7>_DYWM5J#SJ|0_}`iQ9^8^dZ!V zAl0)W183=L9*?B4{M@f`B-`r1=rkTEQ|#RpUwdEgd(kH0eo~PA4ZE0%w<%DUZmL$h z*?>Y58LZEthd9^nyRL|V)D&=eb!9elcgALGSqAui7ILLf3y~%gcp)4*w&77STyA6S z1w@!$%B4fsai6C<6$p9QA|>KJ26)1(GD@=3ccd*u@Rxgsh{N+{ctJKFozUw_v4zuq z12VA=wG$7(_d<8a^V-J3pfEnS{F)+U%U4X38E|nX$NMbOt=U4x_M3R+ zkRj2ld8YU12c>zE*cOzmT@h<%o+^sX2IvL9#2{OGVwyCU_Tbh!+Zo?tO#W{9fGlY* zufpkNa(XAByK%o&VrnPiigU={boV^{|DJ3uuv)DXtF<0;R70RJPZ*>Yg+|6PUAe4h ztoJwoi@r)s=KUe>dFnnm(7A@TpY2(u38%UMh>>?bqh=>=RxL0Y&P3L8jK+?sFlQ) zHZ2@(GZjw^HVrw|phWbvcuf=g*LS+_laIHyjqRV&O7!HM8o^uY)9Kw1^T_0H$#8>u zI0B?~UM=TYN9_ImXS)wce7F`FAm08Q7uTi?(313gW|Jk>aP-t>buBlxbW)n;a3yG8 z3#V#r9h6y{ChgG%c%MjI2=uK_-G*|@!L*ZBV zpJf(cLKpH5c~cwexL)nPn@3A#S9Qwx_;}}4U@=Ka96%;v<+?p>v(Gafa*Sn8;(Mow z$!{qrt$8w%#_H}nha~TN1!iDiU|MSM@$tFnU-vmSO6=dzn(@%T;`b77xIC~Ysmgqi zIxk4M*bN&ACRoRu!(PR)matFz_h-!3BS*0IEl76n{)ynXM zhJqqVlTkZ39p7PGL12LThm75Td5a89HG-f0@hm?l21f5em*g)s|(D2Qf(*t#B0$`T(EcLql>4|kI zYw^sLPbas%{fMs)$O2Wr*wFBDSS*2SJD;Yvam023+R4T?vLC-$?ukx!cKUZyU$Unv z_2sgbYV&Cv(1?}C$qc&zUAYtw$tiE(5a9CbL1)%rE&ls-i6;+c)#FvwEZ#rX9uq_p zbhF;S_B$0KQ@)0nkCO|dG)F`^`u*j&!{hI6aUlr7b{dhbb+3`i$5+0AnEM7crVF*? zXWO0%(N)JE)XA%u#0;j&%qJQCcYOIYQaOOS9EIxz%ECfggH0-s_K+(WR=kIim1BLJ z5N^W8-y^!3K_zer83ZUbE1L)jb`9JsDykFrOroh1nzfNnwopP z2<&;%k|P@@lM?=4*+FNXy+0?}?5UjDBG)Y^K2TDwa^79|H1AjGTCQ+ROPTXybUZ25 z9xMd^&~e;;W_7QVF+p}|&T$uWax2pXg2D_e&FAq(UMWXM#?wsxjBxVwBcA;jfCLk8 zCsNYS?p$%A2k$P|U7!kT(^#PsRq@6VoEI?LtLf>D3SM>nQhpQkw4Jme<@a92Z*u#L zfFOwv^o9S(OABgI)rR1D&3VG+!kO%&BLAnVI(CP;#O6HCG^p$wL4p55-GF`)1KGnv ziFHXs8ca!ax!hwX7+;S`ak&{>ZaX847kOn6_Ey|kSlXncx=N~~$fJLFkQCeP?fouI zBu%*wNo7ZU;i}Oo4+qE}&NDFUp`a0QlVZldY5vpJE?n5P4J(nxKt-Kd#+FqD#1C@o zzjhRpA2W5#VSWxS1Bt(K?e+=))-nn$p~X2bqV8w>KV~eijCyHt@l%mvQBhOGJm4P? z2G)7J;&hZZ$Ox>6jZu$KJJ39*3@})jnfJ%4{lE7z$4>*w4g;?f;bQr%loWMfAbPF$ zj95Nq{jhKcFk#r5S}ttW>RJQwX+AP$C0xol8 zDydyA4IGM9MPH0!>e{^X?J>f}<4|!7DQC1nDd^#4%%R>4Dw1c$qN{4avNxmKkX&51 zj7mbiAw;WJt*rXDdI&bpogPq202J8TWInAWP%UipUR#Wp1jUeZM?^&2{uFhY#HqeI zxl46P4#!~n*9)3Bxp1veXus(OTKbA-I&BDZtANB|8mJA%I~_PQSqN&}!93UA!HOTa zR8>?4qf$t;Yn`c#R=@IkL%xKeolgAv+JU_E@k*cm9&Rx|^!h-@G;~pL|}QmlV46t9$TLyT_gaEr4p1&In%n0r<`d}qK6u0eqx}I};B7Qi}o`uKAi~K@0*3wKA5Fje3b;vK1 zxQ36F7Y@4;IE_UO_jqS?6BV%icfpmsy16-7y_~n+a%9SOt<$g`KBog{`7{o%x~)-h z7+1o`1!YRud(sQ0@l@*0bY-Z@zkBz5xI&dfG)Kqgv-rK$^-xAz8v*F}De0oGkt&b3 zqy@qp&e#Q|P~P1id#iqym8Td~Q~!@}bP&Ke7s`=DU1A0yqI}5bqL6S*L%$1J90%g6 z9d^Zk0sTA?biC{pK_-Y%2h^K#a-+77XfzdXhd3&#e_^AoYl4Q&-1T9&#T*d7et6xVZs#?SN!<|0` z^QP>29yK*B$B_&Miegg0?2p$<`O0TD82R)Jt#aPp_y9>FGc`;p zEF66uBmdoEKPgl9S6M=FbHTiZxevSwKb|?h|Uqvqltf}t@i!SfQ%)&MYkNc#jln&wdx)1r)6P{ zYTol<)9M5e$YOx%4;>R%I;22rFqW*>t|<<`b#R9Jx$1{DWM~eTZe$|cxL{b_OA9M3&5M^;J2i)tR>pjYVb-xJAjrYH&E%F%WEXvk704Sx;C5M2&>!8o5+(j0D+8# zrLIjJz=@i`C5|1prYtjj@Q3@@o_bRq5HJM<^5uh>)qmY?&*s0od4-nUrd9{ReR^~o`X4<=@*YI*4=*Xf`G=-w1T78!J`Q2dHe9y1T;|QYn z{kuh;6A@9BTUAynE-`&Em+2qGa*%n3>{xKZ8M>ZX(P+gC({*J6AZ3 ziV~f{1!S4TJBcVg&ISe%L&Rsr5rlyIIU#?8CVeWGc^o{Ny&2_PC+O}UW)t+Kcrwij zb-@2%nLRSv;g501Dwaq*?`t*r`~<`Wqt!5HTHs#&Q+ba{KOef10Oi!)t@13$CT4MM z#2yAk0@1KTXE4Smhfeui&)H`Su&YuYpx0=!yIwHtEL4(aF$_8j z5+syHB2ysmp!ko$%$UISd_WXjbP}T7$RS6 zuUXUTs(`uZJqL90Y?Z}Annh~FscAZs(3Oq zfi}LZYA+yd8-MB_bgkuM>H4*NIO@4z1gFd*c`CuDa{yxq%lf(HS6SIlz_q6)^~1S1 zN}a;c4ym~8pC*Heb@Q2>%S)fO(Zmq%>CW?#P#GA@o1q&70IW)vqSc>D=;;U@wACY0MKszr*-TMJp?*&>+CP|=;SKx zLZ2m1-|=Nm!_t}x5Q?P(@$od^+)U%GL6QpeIt1|7$gyiRPECWU%jho6z#cpKegokQ zPB2C9KYhR?D_u+NKkVmaYU_7-?43X4jX8oj9X0ZTOGgUw8(Iw<%6>iVwW$+lz*9+G z69~L|O>O)Jq_8&T;mip+>n=6E8wsWlNUEq-wc^t-zh~|@A6gTQ#Z~R>|BLR1S$u8J z9!tw)UE(D~yOxQ>+1Rmm0MbOdz>5{Pt_@?*hD>4`?j(yV)wu(16q$m&o@RCGKh>qH zK(=D+=x8fbL)aM<+6QO}SFTqYe-#wO(9h+lK}UQ{%dC@|F(*k|GfVqig{EK&3H;Bu z@5cSN%*x6`<&Q!M1*VNbr z5Kz3E%yn~!qxs_Vt1BrQ$k1AizHmT41psxbH+_EX9sIr!u3{x!k==i7rAVB9N*G-g zEwx^VV9tMSA+$>)U?fd^fo_IhXoQGJ)pRy@1yQ4uT@qg9NPV?-n z^PAbEzHk4O=H>)zj9}*A)%pRqK|aV)i5=Q z(9oDEbX-|+x9t}Ug9$yb1k#m)W#8lGx_WM#pzqpyC$M%se!CE-+vL%(Tn9kc$ON8< zg9;uHPOMNgbAR&|Al(zHQnY@gAvn76_Sb2PWo$u+A?3%UaHthkT&f~_fYcADsdER! z74#Sth(EDC-ks(3GZ{xkRXIPAxm0F=U?ohPcs5P67pA<<5swm|XooamIZn;u{> zfVE-ufW_{@m=IBdEY1T+cizDU&1I9= zfF1rl!9-Q^OgmNN9U^BYqr<$Sk@oOFb1gIAEd;qqNK9(4(0phzUF7RQPIOwu?-CiO z&U1l(4-f|s`l(Gke@yo@K$)?dEB1E$p5oa}u9@&zbk-p0hjVmWP@9(XA|QyJbsAO< z#uz@RLq>~X0U9)_E&TL`eh2~{g2j?!ttu@w`&*{?-AvyYP=^8v5`(LMLKRX$e~p9W zR6q}0cpYr=bpF|Yb>m}GdV_K};4zW;C1s$%p zym06K0c3t>0X6N>jU^=^U*UYP@fNga>Z5^sn5}}Gl~}&T6eEMjX%!H7=3qDX!VQ!G z&2*<>^LtiS*7w(E7dG|7!&PM3b+%-op)~ksfU2sup>%g3S6gL}%tM4mxJ3dlhru-v zZA)0e57L)xV9Q3h+-fIUzGRyRa4~?WM7((Jo2G?PpVZixGtg&j{=0|Ofa+l5RDtJm z$xtv%O5jeY~4h1^M|=pMrfr$%K8$1t zda(k7Wb!h#k+b0JB?mV9jo4~{{vQzDV)MjR{|SO4x`iIEOI^)31S3<;wDDzu#+L#9k~9W0>O?9_JW^_#=-5r9aSa5g#*PnAjPQu%_ zyR-9V?%cUV{--4U0fiU^1_tJXtc-*T@c#Jkh4dcy9dWE947|a+h{>uU0YAP--y?v} z$c{4FE-)~0FaKV!GY`~_z?Vd>l3K2+4(6^N#?EFi9v&VnR`xb7rpAtDEDp{VnWsX; zFfbosWF@|;d1jqtd-x`+-@a{v$dM8fLWpIkQl`aNXR*FYe*MCPYNA<_23}xJ)$b~A zds4-8(_dRf)&Ge!>rENWmT z48>C>Q=&}rFDb|eLxk?|ZniHLhF3J$kuAcq}UAfgl9zFiKVjwrFR-3Cl_%z7DS;E%wjapgdt=*bp`>(#d;vSrY%Jm#M(% zgM&jQd~TfV`3CW`J~ejJCs;hnvjxtc`{(-l(4oz{Ox;+{v(5oR9I!TH4+X-Ye#5GTZDeNKFnT*?8CyoQqv7M?k@K<*e@iFqwtEoZmvW9ZhJ?^ z0sdO3({IGtR&~t7jI@&4$-X9dbEC^sC``G(aMlNUSLAdFe>BTHNdDj+L{a3Uz>lfd z`uQEcj*TxejyA0W?pSp_YipVIwfcmD-XCq2&M>2hnWj;jN%#Uw4+fdfof}}W!{zK$$# zNZw%}O-mdY9Z7cKdLj^1(x!;r32`a6a}RagDNwRaUmj&|7#R&!QAM4SZB-vms*#;r zD9|)4v0e-Es~qHnic6wT7b#+@+7m!w{&LABH~PV20Adh_*6`LwWPV1KuAI3d-nbs z{&q)97+Nqb9IRFGIqaJtokLV-DOgr13Xix=(nvfe<1$Jv&#ALhBqa3x)ok<~r{5@F zdxv@oDCC_DoBBMzu*$)yGOvP9EncJ^s=b6xa`hup`qY(U_N)|2QShHfEQm6)dXr&bm~Z#Jjya)^XZq#a&S(d{5ka;{R^s^JswGhO4(tH=r$% zIPW&+#fHs(C@m}7n@-&G=p+-d_Oc-Tvcy8h92XgVG71gw*Yh-0gflmio8@2NcLK&r zGBGTU_}oS`$v1Cc28bHk=dkHn9-nqdXFe-9usLpRA?H20o-m}kq9WT5jCJ`1CiXoc z$2xQq8u6pt-Pi!udNNXKr)LSPZOGM=FH#_<<2pT0oSR=<3Iec#-CMbl=S)x*TL04SDDFIP(e3SpshW~($S zw)pOJa4s8d`ttH3Q@LbbR#EZ81K+oApkhpHs;sQccy7<{z*PWyhYHW@kOk``@@z51 z?`f_CM{ntkRXE7e=uc9#E%21tnBGF7c(nPVhbQju?`s@qbfR}JucBp@;yzJvhBL3B zpPwnGC1it&545FzCpLigM%h=4 zj4u;^`m;H9xM%+EWch+KOUP>T_Go~nFpDo`G9gG9&+B%vQa5Q;Ffuq?`P;W|g^)zk zKs1F8nByqiRw!1el~UDbJ>^64p*osLI%iI|Ki(P@>y~%>_;~s>&{@3q*UCNeJz2t^ zOAuaEK`TBVV@KtTYoURW-R8&Zo+>EdKM_3*N>!dpr{k1}5eMrz2xkFQ?ZxY<5WUGE z`C=;iZ!7p$_{{GP<~Vb}KJoO2%x51IVEkd22=>>I!i!&MdL{BHf%#9D-JHMaG@<7k zZsLXu2RuY6W(j+IyKo~D2)S6>KUEc&ItwiQB{lPww)j!F)dn-T)LlP?4#SS5B37M; zcHcQ?Iw*z`{{184(S0S5f zu<^FN`{L1RJSJWPL03XU$1tQpVP8 zm4_J)DhHGDXbg-Sdh~kL@k+(J(}}84sVly|?Lee6JA$yU1Mnj9X!Y>t6yV4QOLQ3> zPw}YCp$qei+b1WI&MGk`Pp|?W*5UE-yh8&Rzt}8xy5OSJh1Fnyz4x2;-h@H^;?>!| zC`IpLqJ}Q4@O!Ou`IqGXZG7w> zl60nNN{H6hlwd{fRujJC|20w?BI9L1m#)0c8dn3;LQQjyUReig)o}lk@k0lp&8edQ^ z<=C21j~X2X*-GTRNF*BZ^zWH$$Nf3hT6ZuyIyqMLcN@IA}qzD3}+UTw_);red!nYlb*HUC}!Kr~IuEHOm1_TbWwyTFQasgfCsZ_n&gj)n7 zNk0nGrNw3@Q`8~-r=``~31?-yUKgLcc=A!+H)lOY*vodsJy6wxBQoxodj54(LB^4B zHLSt7%LtM5Bm4mxld7>bNG4A(M@B6Sdb&3xb9ITKCkum~DVpXw4+Tm$%ZHWNtM7AV)Q5E|)@ZhRmNn?Rq zdFr~)l0+EV5e-*oS!^?YSu0?$%h7Jr&Ovh9tL3O!H*wXOy@}j3NIz+Y|O8!-kLht&76FXj|OAQ2*#W#~H zby~&G%;iRFapDaQOQ{i)Cz)g<6a*usoEeb6sM3tVLGf(N9i>tz;7%E378yxNyiLEe zY5%CGY3R){I5!MHl^5Vv9)6|bxx^&Wu|+aO$+UGb_DJ7)?pxWsHH^a%JWSmAA07n0 zl`Ai90%XclEzvFU6GrRlUkh%P3jEp{)si(;n3`dW*yG4V<+BZxolO)#>OKID0`LOk z$}vF%#zc11NK^~t1+6CNGAuP(@HB<@xeL#9*J0e zkJ$4Z2{qG3*t@?8g`Hta{gO(m%059=suac5&A98~ zGJMlZ`6`pQ21oCl@_ad_#KFoH;F;fJv~>|)>;&!K2Ee?t$V<}s3nOEBX;o>SX8gU) z28R7y)T>|HT(Ram?KEe4Tt0-NPed6jxOn=7%4hww0~^eZs3g2+IQmjCy$y{U*DGoh zA498{ot5kn5YdZ}vr8A7Jg~C`!sg1Qg@BkyD&#BI4B-OK4}cCuX3({UJ z0r@3u(xnzvL6s!afR{6kugo$^QN~YIePY7vb*%fG?(<)spMQ!h3b9S+8jC;ur>Q$c z6skxapUbD*cAg*=Z+km?7!hGPwRnOk>9B-xkEx2vU|cY57hiVViu-Uw7%L_6I`4ee z4|p=#aey7-%GQ=fgDuf;9#yI!*Wt~3F)kR-=H(x#jmV}!`r!?v`9LI`lbB^WCBf5jRYC{$Bd zSN*0fDJx5~u)w{PrR1$$A(4F2hOP>PKF3UrkdOudLQhxsMjy{&QBY7EF(nV9RGIOP z2Ks|DgsgDoQynmg1CH;t8&CN9Yd&>UdjTLcx)e0T@%G{%X}=366iUy(#8lT8BLK;2 z$3lsglaUu3DxEvb;s?p@h1zm(x(v4`R6;C`Gq+CuNS@fPF13 z*{)t++m9@WW2Ig%Cewhgbu4`|7r(Z@EV?XJZj!`G8TjpP=7)=5JVYga#XevRHNZkAi|}6S{Y`W@94mrve4u zBG6;kli47^HB5d}MZ_H`q($6{**x6vJ27PQZak`$`~s}UxZw|Nks?v-d>riJce(vB zOjXa0XU(mB#Td$>gv-EF0+j1@wj=M-GC@m=i?x13uo~4Xy+zDE{EW94lP5@MT-jAW zF)1WXd~w-lvP0w4Uk~aFZ8sR);jfP~K!lvm-EL=Rf(e6ysGV5cZan9?MIy;!1XL&( zm|g(oAX>fFQ^uXC-Q*vBj$Duv0^~Vlr^IW8$lua(O|-hwDJhzlYiaw)H21CUhutLA zlO3mizh{OW-q>;hG6HKZ&Um$c!;-p@=>-c#e(uJ$j)Onkmu2kGNwiYcO9;&2fk9hoklIJ$>`d|Vl6h-+I#pQA=?dsuq z%*^-YL@qPSoRU2oE-i^v+&Y)~@m48cG8!i5xAf6h30f6=gmS`}2g%17Kh(9<4HmT}Mfp3GTbXC}i>sm2nyRZfH>V`BR2%tgW@1 zEt${SpJ?_c`DtxV_xI(2r09A$n>akIUfDqKb>g+N4NX41CYh}Ujea!`AZm08U5|~%C2g3vz#IR&1c0y(`Fo#A!E_czTWt(ucs7Z6SxbQ zgoNGaB##^>o&i#E2g)Wt&NVF4c7O{I(Fuv6^+>iOX2Niwzy+)6&&_kyWU9XR@rur|$WtBKyN;K3o*zYoU zCD)Wh;eDT>FAeN-W)WfoSwbuB5$<&bM?0FQ-Lr6_Bni6g2jqP z^TR=&K4Yl}HzSjiX1hhg&vi}&nN7!kORBbRhjIL>T4;y|%p1!9xS%TFSO`fLrPY=#dcBWqE zL4pUFtKj#GUOYo_xyB1e%uM>7IdjFFTt0DWO5tCR5nrv0$UTdu+um7y#`RJ$K^sf! z+^^wpnX!cQ#rtnfRkPHzIu@9XeL3xT(#Xm3VI><_!2WpXp@x?TBmhw0u!vCrFu z(xGL;)VI661EeBvCPapQ9b!-p@Iv=Q&PP{u7ia0{=Uj)kaNgHjhXw7MkPyq)i#=2{ zve}`*R9RbDMMY*t4f`F?)IS$8W+wlJ7}C}@txmU*%B=0EZAryP ze~%{0s+1KK_kum%B=m4BoaFU_+n*^#UToPZ{MsXWDb4n4c|+S!z<+yhE-&RyGae{) z8&6ezD}gM+D&!%mEPO%Y>-*h<%_A>AKdHJ)f8fVmXCng<>M6Zz8jcr$D(23-!#bYg z=sS5R^M!N$o;9`4cLo8z>!L3|*VAHyplk^OKG_$=PI0-UNb67*MC5X=C@J~AisnX1 zA!yDP?e7`BOjyg=O;Z)w)I=cc(|^@{END3=5b+^1`RqT}Vp~N`wegYN9ZKz1%TCih z$O8BJRVKko{ar~u)K!3tRU|-^Rpc%3yvHAViB7aDVX8}~YHt?J1FLl`6#5TU`k$Ne zFlK?Co*p>PveVKc6@KkvdQrgj=XGrG%cIGoKsW zGxKeF`^4^#qMHsjStY5;sV9e17#|dVa%jd5%Lje`xVaEoH437m?XU4IHBFs{*~qy= zFbrr@nc>F5I?--*6sfJ%=dP36iP72~kq@HY!ftk7>_DYWM5J#SJ|0_}`iQ9^8^dZ!V zAl0)W183=L9*?B4{M@f`B-`r1=rkTEQ|#RpUwdEgd(kH0eo~PA4ZE0%w<%DUZmL$h z*?>Y58LZEthd9^nyRL|V)D&=eb!9elcgALGSqAui7ILLf3y~%gcp)4*w&77STyA6S z1w@!$%B4fsai6C<6$p9QA|>KJ26)1(GD@=3ccd*u@Rxgsh{N+{ctJKFozUw_v4zuq z12VA=wG$7(_d<8a^V-J3pfEnS{F)+U%U4X38E|nX$NMbOt=U4x_M3R+ zkRj2ld8YU12c>zE*cOzmT@h<%o+^sX2IvL9#2{OGVwyCU_Tbh!+Zo?tO#W{9fGlY* zufpkNa(XAByK%o&VrnPiigU={boV^{|DJ3uuv)DXtF<0;R70RJPZ*>Yg+|6PUAe4h ztoJwoi@r)s=KUe>dFnnm(7A@TpY2(u38%UMh>>?bqh=>=RxL0Y&P3L8jK+?sFlQ) zHZ2@(GZjw^HVrw|phWbvcuf=g*LS+_laIHyjqRV&O7!HM8o^uY)9Kw1^T_0H$#8>u zI0B?~UM=TYN9_ImXS)wce7F`FAm08Q7uTi?(313gW|Jk>aP-t>buBlxbW)n;a3yG8 z3#V#r9h6y{ChgG%c%MjI2=uK_-G*|@!L*ZBV zpJf(cLKpH5c~cwexL)nPn@3A#S9Qwx_;}}4U@=Ka96%;v<+?p>v(Gafa*Sn8;(Mow z$!{qrt$8w%#_H}nha~TN1!iDiU|MSM@$tFnU-vmSO6=dzn(@%T;`b77xIC~Ysmgqi zIxk4M*bN&ACRoRu!(PR)matFz_h-!3BS*0IEl76n{)ynXM zhJqqVlTkZ39p7PGL12LThm75Td5a89HG-f0@hm?l21f5em*g)s|(D2Qf(*t#B0$`T(EcLql>4|kI zYw^sLPbas%{fMs)$O2Wr*wFBDSS*2SJD;Yvam023+R4T?vLC-$?ukx!cKUZyU$Unv z_2sgbYV&Cv(1?}C$qc&zUAYtw$tiE(5a9CbL1)%rE&ls-i6;+c)#FvwEZ#rX9uq_p zbhF;S_B$0KQ@)0nkCO|dG)F`^`u*j&!{hI6aUlr7b{dhbb+3`i$5+0AnEM7crVF*? zXWO0%(N)JE)XA%u#0;j&%qJQCcYOIYQaOOS9EIxz%ECfggH0-s_K+(WR=kIim1BLJ z5N^W8-y^!3K_zer83ZUbE1L)jb`9JsDykFrOroh1nzfNnwopP z2<&;%k|P@@lM?=4*+FNXy+0?}?5UjDBG)Y^K2TDwa^79|H1AjGTCQ+ROPTXybUZ25 z9xMd^&~e;;W_7QVF+p}|&T$uWax2pXg2D_e&FAq(UMWXM#?wsxjBxVwBcA;jfCLk8 zCsNYS?p$%A2k$P|U7!kT(^#PsRq@6VoEI?LtLf>D3SM>nQhpQkw4Jme<@a92Z*u#L zfFOwv^o9S(OABgI)rR1D&3VG+!kO%&BLAnVI(CP;#O6HCG^p$wL4p55-GF`)1KGnv ziFHXs8ca!ax!hwX7+;S`ak&{>ZaX847kOn6_Ey|kSlXncx=N~~$fJLFkQCeP?fouI zBu%*wNo7ZU;i}Oo4+qE}&NDFUp`a0QlVZldY5vpJE?n5P4J(nxKt-Kd#+FqD#1C@o zzjhRpA2W5#VSWxS1Bt(K?e+=))-nn$p~X2bqV8w>KV~eijCyHt@l%mvQBhOGJm4P? z2G)7J;&hZZ$Ox>6jZu$KJJ39*3@})jnfJ%4{lE7z$4>*w4g;?f;bQr%loWMfAbPF$ zj95Nq{jhKcFk#r5S}ttW>RJQwX+AP$C0xol8 zDydyA4IGM9MPH0!>e{^X?J>f}<4|!7DQC1nDd^#4%%R>4Dw1c$qN{4avNxmKkX&51 zj7mbiAw;WJt*rXDdI&bpogPq202J8TWInAWP%UipUR#Wp1jUeZM?^&2{uFhY#HqeI zxl46P4#!~n*9)3Bxp1veXus(OTKbA-I&BDZtANB|8mJA%I~_PQSqN&}!93UA!HOTa zR8>?4qf$t;Yn`c#R=@IkL%xKeolgAv+JU_E@k*cm9&Rx|^!h-@G;~pL|}QmlV46t9$TLyT_gaEr4p1&In%n0r<`d}qK6u0eqx}I};B7Qi}o`uKAi~K@0*3wKA5Fje3b;vK1 zxQ36F7Y@4;IE_UO_jqS?6BV%icfpmsy16-7y_~n+a%9SOt<$g`KBog{`7{o%x~)-h z7+1o`1!YRud(sQ0@l@*0bY-Z@zkBz5xI&dfG)Kqgv-rK$^-xAz8v*F}De0oGkt&b3 zqy@qp&e#Q|P~P1id#iqym8Td~Q~!@}bP&Ke7s`=DU1A0yqI}5bqL6S*L%$1J90%g6 z9d^Zk0sTA?biC{pK_-Y%2h^K#a-+77XfzdXhd3&#e_^AoYl4Q&-1T9&#T*d7et6xVZs#?SN!<|0` z^QP>29yK*B$B_&Miegg0?2p$<`O0TD82R)Jt#aPp_y9>FGc`;p zEF66uBmdoEKPgl9S6M=FbHTiZxevSwKb|?h|Uqvqltf}t@i!SfQ%)&MYkNc#jln&wdx)1r)6P{ zYTol<)9M5e$YOx%4;>R%I;22rFqW*>t|<<`b#R9Jx$1{DWM~eTZe$|cxL{b_OA9M3&5M^;J2i)tR>pjYVb-xJAjrYH&E%F%WEXvk704Sx;C5M2&>!8o5+(j0D+8# zrLIjJz=@i`C5|1prYtjj@Q3@@o_bRq5HJM<^5uh>)qmY?&*s0od4-nUrd9{ReR^~o`X4<=@*YI*4=*Xf`G=-w1T78!J`Q2dHe9y1T;|QYn z{kuh;6A@9BTUAynE-`&Em+2qGa*%n3>{xKZ8M>ZX(P+gC({*J6AZ3 ziV~f{1!S4TJBcVg&ISe%L&Rsr5rlyIIU#?8CVeWGc^o{Ny&2_PC+O}UW)t+Kcrwij zb-@2%nLRSv;g501Dwaq*?`t*r`~<`Wqt!5HTHs#&Q+ba{KOef10Oi!)t@13$CT4MM z#2yAk0@1KTXE4Smhfeui&)H`Su&YuYpx0=!yIwHtEL4(aF$_8j z5+syHB2ysmp!ko$%$UISd_WXjbP}T7$RS6 zuUXUTs(`uZJqL90Y?Z}Annh~FscAZs(3Oq zfi}LZYA+yd8-MB_bgkuM>H4*NIO@4z1gFd*c`CuDa{yxq%lf(HS6SIlz_q6)^~1S1 zN}a;c4ym~8pC*Heb@Q2>%S)fO(Zmq%>CW?#P#GA@o1q&70IW)vqSc>D=;;U@wACY0MKszr*-TMJp?*&>+CP|=;SKx zLZ2m1-|=Nm!_t}x5Q?P(@$od^+)U%GL6QpeIt1|7$gyiRPECWU%jho6z#cpKegokQ zPB2C9KYhR?D_u+NKkVmaYU_7-?43X4jX8oj9X0ZTOGgUw8(Iw<%6>iVwW$+lz*9+G z69~L|O>O)Jq_8&T;mip+>n=6E8wsWlNUEq-wc^t-zh~|@A6gTQ#Z~R>|BLR1S$u8J z9!tw)UE(D~yOxQ>+1Rmm0MbOdz>5{Pt_@?*hD>4`?j(yV)wu(16q$m&o@RCGKh>qH zK(=D+=x8fbL)aM<+6QO}SFTqYe-#wO(9h+lK}UQ{%dC@|F(*k|GfVqig{EK&3H;Bu z@5cSN%*x6`<&Q!M1*VNbr z5Kz3E%yn~!qxs_Vt1BrQ$k1AizHmT41psxbH+_EX9sIr!u3{x!k==i7rAVB9N*G-g zEwx^VV9tMSA+$>)U?fd^fo_IhXoQGJ)pRy@1yQ4uT@qg9NPV?-n z^PAbEzHk4O=H>)zj9}*A)%pRqK|aV)i5=Q z(9oDEbX-|+x9t}Ug9$yb1k#m)W#8lGx_WM#pzqpyC$M%se!CE-+vL%(Tn9kc$ON8< zg9;uHPOMNgbAR&|Al(zHQnY@gAvn76_Sb2PWo$u+A?3%UaHthkT&f~_fYcADsdER! z74#Sth(EDC-ks(3GZ{xkRXIPAxm0F=U?ohPcs5P67pA<<5swm|XooamIZn;u{> zfVE-ufW_{@m=IBdEY1T+cizDU&1I9= zfF1rl!9-Q^OgmNN9U^BYqr<$Sk@oOFb1gIAEd;qqNK9(4(0phzUF7RQPIOwu?-CiO z&U1l(4-f|s`l(Gke@yo@K$)?dEB1E$p5oa}u9@&zbk-p0hjVmWP@9(XA|QyJbsAO< z#uz@RLq>~X0U9)_E&TL`eh2~{g2j?!ttu@w`&*{?-AvyYP=^8v5`(LMLKRX$e~p9W zR6q}0cpYr=bpF|Yb>m}GdV_K};4zW;C1s$%p zym06K0c3t>0X6N>jU^=^U*UYP@fNga>Z5^sn5}}Gl~}&T6eEMjX%!H7=3qDX!VQ!G z&2*<>^LtiS*7w(E7dG|7!&PM3b+%-op)~ksfU2sup>%g3S6gL}%tM4mxJ3dlhru-v zZA)0e57L)xV9Q3h+-fIUzGRyRa4~?WM7((Jo2G?PpVZixGtg&j{=0|Ofa+l5RDtJm z$xtv%O5jeY~4h1^M|=pMrfr$%K8$1t zda(k7Wb!h#k+b0JB?mV9jo4~{{vQzDV)MjR{|SO4x`iIEOI^)31S3<;wDDzu#+L#9k~9W0>O?9_JW^_bQv6MhbH##y;}guQyZkZuOiF-V_J)2O?t1?dx0Tc@31y34H_IyS9%j~TS#E3Xs%7#LSG|o><6s7QNxd?f zo8!L8)_no{_b%@ZD0KVs9aPr9x~4 zb{2r^kJ*az3$K)nn8zKmxk+-vrsZV4&3+$lu=q6gZzix+N7N5qM~8%i=2ZcQ;a zVTzLe#&;o3WhT?Ow3f^1{0-66%SMIym#o$A^12t*rrEi>cMqSaT_aD0zk9mS5Fr3F zRo{B!jt^Pog|{T?3!wY^?%xgw7L@Bz>ng6i!F3)QtP4%bH%zTzsGjLzk}R$IBJr?v zbGCZ4B)ehnh5P1a#%R`?Q|q?}pJc2f86FZi23(Y5BoJ#9E1qMoP5iyNP6b=MDtuKs z-x2lM24$HIdnnKxqFo%_rQzrDey!l@vfxh7^lB4+`Ei!q{L{v-?_C=GXQ~U)uGsiH zQkJ=nS&O#|Yu{XU(p|aNxj4}|*4cA&#kV=yS24pG&Xq|;_x!WQ zXBuP_%7#QsXB3PcV`Ny~GQ4n>(IgovroOW}NhOi@i;k;^i33_ix+!uQ;vK#G*f)W2p%k zdEui9GPNHvj;)2WOz_SY?>*YACrf;&r{t4dc5a?^Q4sXG`|Q)AcCNWkj^*@Qjq#eC zoU4k6f)0x_4)r{@iKf*%MpxNx<@rC=R~=BA)_~q`+NA`{?LGghF3fm;d8@|j4L;E| zI)#Y3VqEWABYDG*^QNLK14{B$5pR1EHuAgaQMZa$DY5Ux8kO7R3wZ-Ska6k9cNZ%W zi&824 z!g^BPJscHMHe=W}H>QCBubSv4cmDa7!kEq_*t7W1t}UDSFNZ`#EBIjMfzqBQ^&{Pw zW7a$^0=yy-R#-zOC2zK=dhYzViFc!hOx32y#G_x6#EW*)rg`li#=;i@-KMRxD^O&hM{@Vv&tL#*EuB%H$}u$dwf1PHaEYb9T>t z!Ef+$$L)FXK8;JOk+(peD7q2_{^d3g}jo} zt-^ZA*o4G zx~z!h$dg2^jyQACZ>WskdBYL7+ZlC53Cb*_KRU_w+7MZi@@^;W z%=NKCU#!=*2}N8f!Rw2w_azIg?ov@YtuB19?xgk+<91fD4B-mz+?gWpFYV5oN?-_d0r^VX^^4ciK(8;6$lYBR2lfWnP~KYX;0#I^d+IA+p3yvP zv%NN#>onFYx9VLST_k&umj`q1H@UDejbLc(9^VDA6qz@XN!LD)n-E3aj%6lK6KKzL zmb!=5Sb-}5Sc$rdsD$L`d*Grs5%rh~b$73y#KGC!UcT#u_g`NW8sr2V(PS~~JB)O= z8zZ_%52<0=FjJ&Cboma0T6Np~G;%!P&7BdoibEWI{e=@mVc`!%vo_ikYazjEWi#v6 zLLc!%6lg)%(wUWogjxR!;m^82h+YA!iD|;1)Oy0yQRngy&nWS7=%d>M+~5a};cJS+ zqn0VNa>KXgy4TZZ!0oq!*5G>t^}3tNzI=s64F*Rqf=meF{hQa&s?P;Jh{i-AVi`}J z)d}pnIZ& z<+9Sn1!2O{G1@n(@1FV(h_+c6?0$iY4cw%U)BQ>Bw!qh;B#3H^E$qJbgwg@-JH(&P zRcU^8yK1Xg`tWu!&uQZn(a%35;DtbX!sxhj=RB>|om^4$>qB#HoqV|!O$7=7SQ?Ey zGIb)qS&ES-UEE08Ot_IB;35%a(6fhJmA1!}KXsVt9&RpNw7w|L=^J{9EHUXA zq$`{tyvQKj#*tXt4r?f>(z|VUImcVh=aR+)d56xb>nQxlcL8;awS4m-u|x@d@Pp>s z*K~KkY3E072EVb1a$B$#WPJ_2YLMaCnK1nD{#$O24D%&(S-bd4XHC&Y-?)3QlH0w{ z`6WK9#k;-!th5SX>n2=fyEc&4=@8ljtxY~nF{_-mgwvX)M6>f-hkV-2BL<~^rOov; zQir75YN<0210Uswjy#Ym1$bR6dv&bZQ|wE2io^QC)gR|c-8Y}@@W{76`;s~FhHt%- z6ktr+V=vi}3;3$;@cl}gfwoe%#4f$@GIx_$=XPHL{i`0AjWtx)O7JCEVaE@Y(K^=H zU-Daf-r9_71L$b?>kvjWm7?K+`>U5ixZ~J~TSa-$9vYu7&GV8Lk!_%*zV4BVrm^yx z8tm!=XO9q0*b1HCnhl^>OS3@Vu&sA|KEEPAsJTbnU;Gx9r8GIh$f>FkVkV$n+lDd4 zocictDxMznb#~cQ*gPSAn=hOuGUWKkm~M`g)?stHBTRPOcR2lXtiyFtJa@yC9-AmW zkR%z;jJ2v7`u10B@hJOoy-V{Qd77!~nY`;Y_b`eKW$w9$dybtPQ@`PgooU~an%2|7 zvsgi#_sn!PF`r$Il!)%Qx~^;MO8Nvi2e2{zkUNR}QH(_~yDDry=GbLBUbQnN(|Jec zmEX5M{af5G9M3iS01NJ?*Y#ApOLjCfpdJTDIz(vQD%P{NsZ)1ZpL;YhRvQ4ZD_0=2!o({k_n)`aB+*hhD^f%)P(v+n~ASV9Qvk_ah|P&!<~h%6Tcg)+*#&9cSHb@kcf)WlB}0 zm5Bk8@=4K8Osr|eBm}x0qPfL!+>>sSFLU`#aG^K0Z@zqILE7`U{yuRlJ$|?w{3Xkb zu_L3^L!!83gmZ3}<4mpxdnzW3j9ro6siSji_QPNt|)N-JV-E4>+yEi-4tEltc z8Lv6o=Lecz=xrFe`J+%tmNe)Hno^!gVEvxDJSx=evcNv`#J>Z zMJ+zCncuwQ#MtEHy$ugKr6s^{5%AOy>Dk>fUP5TnWV9VtumyMr`=?&8yMnAYm+J#+)@@HNH^Z$1BEa8b>R4KLke;)NHxRpLCyyPbbh zQ!) zt+%Jb7L|cn)w%b9SsPwznfHsL7L90aa?iD%1n1buMdoeT3CgdN*B!G4sw65@Q8e67 zoow7su)e#&sHQQ#lAdN|7s?|WeeLywh&9cufx*zZwWr_Ioc1EB1KGb;iyAR-ma!Vh zj@={FGMCt--1t~wmU7KK7tqPo7o_L+%x+z#u2@+8&=C%S;v-iZyN6P@m+{Kqlq6n! z7esYTu;tk*Y_J{v$&3m-(|o+|Aw2*<6N=H%F@x&p{BasVJ%h;fPgFN-*5Ye*vd9FV)UGwBr^a|^TLzaaDDScd!=ahbSa_ok-!)}oN;%F?5y!9v?K9~UR{ zK8uL%0mZ8#*Cw9`t}LrBkJFqlX_0@3JN}wHdO`Ff;%uErxFfqRTcCJMN4KoAs5s-q znpZr)X$7Iy_49ppu5pho3qxd!TsH{!(d*+&*y!XlQ$Dz!t*C~WfZ|+mOZ;VPwScM1 z1l!45>~eQ9PRAXK4&%16OXq^cQi7F>+#oZ|yz!TM?K7**!xWZZI-Tg9>oUIlKqc@n zcR2&2$Z^Z^AP#Jc>j3mo!o43);u|M6jHk^zs%iA&d{c6?y?;zzU#+v3)YO<24V%*X z7Cq(1LYw1o*U>9;1=(Jh4QO(iG{Wz8DO}l2{_18CEkH9i`n=W4!eTS9i~sJ*%LLeP zYOs8mp8!QO7vD)+|5)o&(V#t2@By1v##5tl0DZ)Bv!IGWzwxoYkZ#F54E1!#26h30#N%Y(C_Dl!L%|WKr$+#QnkIz+N4lfQLI|`A#zS3XrLIv# z2!m1=u~vYAU<4hsE5`6D5p8kR#1eVc9jSs6(bQm4qd=$xI5Zh9M8RP_NDzv;$N?{e zTHdb)iU=J*$nNSQHZU_G9Xt^&BrhW`1CrLGV7z5TG?;|ch$v@>xvu_i3hJA>h%1>) zfB=C$K0Y!&ax!?L3lOZLq5=fT0%c{TsR(J3uLl`Uk@g^+-lzD*p^GLVi5LPIgZB{H z=Y%8hUSxF<5o){8AO7J8Fxa2;9;DwYQ1t*(-~=F81_Z?6fPc3jk@dW(B)=W{UoA+M z)I&C)Ihus`A|lax-e?c<>AzE;kbl|}yolI?a8O7f8jHqJp(JXr;D2;!0EL_S70t$pgfK*hZQ3?ozv^*FkD~&)YI7=(3z*XcFK}Z!PxXRzCpdKVL+yjZ; zr=pU}V5mIKAcQ;!3`R=JqLjhX^3GsoX%!F(ER8}Sl&D{M6%bthZxp6P3^gm^*uQ(V zPlcjVq2!x0tH8-4yaH_h(4Z(gHwkSgM+)E zfdmhigNA*_23-|`^6h17lxiXnzXMfmP#{O_E%Kzsgr`!xlyn1d!Ep@X!Az>&W?A;Gt8AGufYFh*MD;TD+T@)_`mG>|0WmHUmG5@2lZEw4|O}U{iR5Y zx)q{B7#rwPpFaTrgVFdTYKf6xXiK90+s?Uv(Eu_sPf#oA$xxUc{pUj*G_*n?b9T0P_aeCIA2c literal 0 HcmV?d00001 diff --git a/xml_converter/integration_tests/test_cases/texture/input/pack/texture_one.png b/xml_converter/integration_tests/test_cases/texture/input/pack/texture_one.png new file mode 100644 index 0000000000000000000000000000000000000000..5b7d11285e8f0343fabbd63aef707b59b4f7b5de GIT binary patch literal 6530 zcmeHMc{tSD{~wVxdu1t1qwKRU7$mzPyJXjF7-6QFk)>q0wp)@)$`*<&Awsz%d)7jw zLb8<*KegA8o=QDFY=e*vp_j$k0`<&-}p84I@+DuqbRuBXN z2@}kX?SWq*;1T5K1-?o1dA|W|xiCj(wmmTz%wW>JY5r6&JCs2MQ$uLpAW+CqsY}4o z8L-G&ubQ_2@2;5CmWvP4Etlzb?$iLsIX)E zK%YL&_wKzL!Q38_XWdd5s2fr5WfL9_irwHEqSE@+<}UU<4ZZVDf5bMN_7O5jZV+a! z>j>S^l#x=+H#sYET+)L#If9uJC)pgloACOT>Hd>*#tS!jL_%K{+`iZhVLANOVy)0$ zn>CVK{Z_bIr;1ry+n05|dw5}dN$e9+ZFp(U`@s_4QsKsV`I)Ne2P`L z+&#)nMpA2f`$XUO>e zyEHlSfCUW%X>g9py2dpNp+=ZlZrY-JAV&)~oAxjRdc@{>JO8m;C)0e4pKe7uw?b_i zS}HX!g{rhp-*s08m8uI?C#G_UF|x+8b|*l5GfgPWpfJ(tDov~Fb^v6CWF zB5{2&Nr{s(FuN%%$UUY==AQAUP5Yn{?GmB{0x3pO9ps0Q<4VDcCG^mmJ5qiZEHCOT zxCfO8e%dNZkthpwxF@x<*zzFS_P&ZU?iPtO@OWs4pHxZq3!9wn@W&5L zyL7sC_|>Q}cR*@0%gMZr_8sC0r;I>`%I&j-$k#7Bw7uh%j5jMwcP0%cCP|C+s4LwH zX@TWQ+L^t}W(b|rA4~N#foZXAARlCIn-yA(#@#cWO*9OCYml&ai>+JneaB9oGK(*N z)g+DA)Xl$LILKFgDu^q1A69aA?WxW+$eHE=DfcZPeT){@>G-Ah-_T0hEvLQFPUj>C7TR?E|%>5RD25QbhVCH zl?NgyYl8dL-4gRtx5dj=D%Mx{r*@S^)J2bN!Y(1BzD50Cc%`Kz#kLd%w ze>?g(ZJdio{#BszOq4^cdWCJxmSOKr9gZ4emn3Y{e{JxhrRgFK8Zj!|M6w#Nl^h?Qxm;&=^JNaeoK zu{R6MlW*qZ4`olqZYFv#jNgbkl_dClY^*p>d;ljbBt^^(3kF>$;GYP#B#SQ?Hj8|y z71K)Lo%eD)KYxJxR#KG4;T9W@5%q+&x6-M%QfKd7@BFK+ygs7ZEmzJ+{oEg4lI=WJ zP8wuY^zln6X#_?h8q1kOg;Be2@^uNkzvfo=SMZ1VqiA~O_Cej#?ul}K$MXCAo{99% z8!gM^;0<|*X3`x=uWF^LKz-5tMzb};uD?Kr&2eE z4{UG33H)KGTJNeJ9WK7#Qy#7`;cX_oiZ;o)GVi)`cJ`im2i8d~c4=Qpkm3BX-LvL_ zl6l#ZI}&A4CvV1s>@(N)XKlawr1X9%yoXN(Y_?q~FV{&`)$ow|lB~hD^!T7)1R=pE$DgrH+;30n<%M|nD$()C<;-{|Ab1p@vK&-$6r zt$gk$w?XAS*RymY(&y!D&b33Mo~nr@2u>9mm`I@#N(vIa{hOS|hVsqPD*wEaUsx7dy(g72^I?%WI*!gi)Xr_c`IE4O_L(oRy>o=v8s?%d_`t_!>~mee zEhITf6(zq3R9@fp+#xSF{*;`~_RR>ki}Uxt~q+!mJCL4;n6&SjWz>r)9DP zy#y|-*2<4}=qMDsj`6%S%4fp4OBUi&+pl0mdRKdotH}B6tQq;_(4{7sy}w1& z(M%;iwjc3!)A>J!4R9$vdNZ&GK9}Rp4K1Iad5CKWRw`>Rdu|*0lwtLy!0?U|93{R- zC9~gcOB&9+LQIhrqW3$ZqDfk(RByy!M|IIY*Wl{MYFAUe>YO*3t#X|`eRONe{f8pz zmmx6d5gMIAOgicAxpE~kg`N{vEsa)lGx5gT{aMslF#38>#j6_YSt)Yx9hhRzGW?v~8^NjUf*v~_hTfFm_`)e zwlu==Q_jy|AN})egeE+kf(EY!T%YzHNW~o+ z&1?xg;CMILd6*e~R?oa;-_ABKhkVF31DymdN};urv58!@ph=;aU#yede%P8=I%c;j zEGhbMQ`4EY;@?hHmWh-_gFkXj%#P(vL-u@ut5zi}jMXU2z0-U5g3GY96>~jcYae@f z|DFkwQXM4DQ`}fIQZ=!o2j#s-RbX@>=nTkfj-=bY{yh7t<$aee{0Xh-9z?)I&_t)z z@Yo%jokSCtJ$seqac`nq&$u7dJu&Ida2ZPzM`xugCW)Pj-R|UiX`9vQkZ7%9Km02p znKK6-xMfz`$70`gdPzTc({1TqpdHDxy_{bFvemIXO2WU@cYsild}XcXOvC7s8F%cfk99M7Q4IdXeZHmJ#G%!2;88++*U z`S*Sfr{uXth8x?092}N`k}+qlGudkJLNq4!xO|BIReIN^`rG?n7e93)D-?+CORu$f z0pg2qw2iv?^!SUB{-NOpAKA4vP+kMGPMaV;1{CzNG@x*Iw%U&;(*s~c3Y|oSg#<8w z!X5RVNAl3?D#W14!(#*q{REIEYM{?Lx zzgJK<1P>4dP}xLqNPvGJ3m>8f+2F+kZB92F0^WeI59>jkt!%+YbS4#yfni_>s7VOz zCmszK!9=Z_xS}dtgQZ~4`h8)0nh^;LS(>^ zFa$gx0RE!|i*0fgAo(_-|7yW<1nxg@dn$__#3WNqj#2~Jia%0N$bZ{2f|&jr;ZVqM zsy{UVfU*Fu$e&!A5v*+gw%|zMLknPRSOH@Hgk;ma{}Jn_xp77|!ufF`fcf9NKcTBqCG`OT|JlI20O6LSr?dI0Qvo zQ&W=!45NOaA_TJ7#6U8YLj{n-XaEltMZ#&3(PSu+Od>%sS{N);OPfl8Y7)^D5(Psf zVzm)JP}neOKvoj{f1DMEiULrP00u2BfJMt2gMnha(G(~Ng~ma(02UNNn@pyBqoR=U zrgUZi5m-)I0MUmEX9W6e_}~bRH?Sq>K~S)-UN?Gd{fTUEz(5bOpB5Mt@(|V~{8$2Kf)jiOOUFnaJTpB4FsRyqsmh1Hk~o5;=Ja5PXjkZ^Wb$ z*>t8Oo$jv(;Y+u|F&2}KuZLL3dNu?z+w@#D1g?QSSSjM)xv1w zw1EV`{>;vzd$WUyOsato5GfE1kU$&JfK@i6RQ(wp>`Ue7gg{}S2s9L_>4-w$vD$bb ztq>SI0s(=43mDGX)!!r5h5sK-bTIq$7oqxWfjz5Cmfb zN9jl8)!xSW>?rfb7+52J8_za0YV0k=~n#p!5z>r3n^9 zDT)YU!9tUErHOzjf&%ge^m@JXy?^e^_x`(?IXUO-{j6uL_3X9xWKE*XO%3_D#kfHr z5Fg$MXTiMlFfVRScILO!LO}=!#4G1duwhsbeZgKdstefz05i^b0bsz7>;eM$^;cYV z_Zh_O2;HFXs%5>%x?-~N3}y-uRK` zt0l3M5#K*XDE6$q1M*yR-9*?-Cs0Sv%SDfVzkg7;?%{KS@pm7d^Ft3OzYp-W-*{l% zFx8F#KT`r;_!msBghz=vP*>S6pF>#kV8WQ^0X?03p_Br_}-=;L$BS3M4J4Dwa@m{ z^kntvUkWXIQG2ZcnuU5GnB`Qm(_i+Xb5?i)T(R46H5zjRpdQPc?-`?bYj9 zd1V_BTw^R4q`BtX>9J4ez^1SI85#E}4|C`tnfQThBYo%5U|{_4+XEZp_tvQn@|%CBA?A zd*69j&V*!di%uu|gl}(S+NXh?Z>Mm4C=idSR-|i4VBn7MzGHWc;D7Mema*69ZZ{|; zsx?Wm2iKf?`eFDwebk^gaaDToL<)an*s%VSJq!oj+}S~GJ<9PtVjR^6c)G7y%dFmz zgeHr8d!ikGI`g2>(CSoWDo^v-wK8FRr{ddCT!82hsn_%L+V1-F*GT+S>IXI3Fu4MVd>5zS(Egy|~79VA=b+(p_L!yD-u)%3mrk;{8_x z&iU0F7U@82iM4D`{jr1ri0zG}a9xS}@8f0_S0Kydx3$$(kCu{<>F=*zlTkc_H1 zvpAmQ_e&g>gQ&)X*<)GvgF5y)&utJB zX*VxI?xwJYsZhY(ti~>b`MtBbKvZ|$CE)3)NnY3H%(a>7dp#+3B0LijV)Z5&GXf#) zyfQYVz4afeoiydlAUpLB-;1r`Y>P{I(Wb5J*r~$xN<-(BVrr&%+N~-*r^(cP{vZ*d z&@feVxd&`~+PziMDf4_jJ&#KEEgTYW9IrHoeLtRJaj9eJ?9)Hs4hGR#Y}V->Pm=^3 zT4~N3FI{Gy$q5o=E@p=+`Mddm1fm`UtcpK&Se98MD4WYK>MaJk<1&lG3c8NoA4Sy% zOvM=P+=q~^EDGy8LUD3T#V>sq7(Ure)8BY-2f2SjTQdFl$fIjlQ#X<_@GdFQuj@=m`y5Q%jYw8WIL;(y&dhrx!t-7uM0AKHhRoNY@YEk74|spnt8M>MB=+EqoAje_nfxN* z!?)ATn_4^9F@@`ED<5!JmnI3H=juLriR_t4Shr7|ng3E!^y~}wqv2X0EtT$b{@qjnImb`N zid8iUQK0I2a&M(}*V~2Q*nm^b2bbvHFGSz;g-`-9p;HI$i>})AKG8jJXaR?pS9J?^ z!MW=5h@E{JqkJ5qnAgL4YvgXHbMM}r9=bL@F(dW#*^BH{eFti8nwT;!gmx<00e2&= z|CPs40>oRjTi22_WK{J&4N)vnSKlXPAQlJdaL4W4wQpT_E&I9bi#^)qJG@s`OS|$% z*G`VE_EK1Vt+M(#;&rmqxYG>d40%mZDi7;qT9R}o2+`6t8EI5vx&V;dWiIn_w4VJ$ zO-F6thb8lpm59TG!y}M8@fjqZ5brHJt%J8{Jti12<1vY^`>Z3ZT@n5q$6uq}e+E*emss3k zVmoaJ4O;!gzBtD^_|WRmYQ&DwyI07sx?RI0E3o%Ia_+zKtw^GiFH`%&H?$T8`poLe zVcEO(eS--BBsqe#?fuUM=rBo5yd0MICfDqu=$lvPD>bJ5U1O4UPTAs1T&Q93YdUr5 z$92YzYuasaS}x05mcBAqI)SXZC@{&IdF9+QTx&#h0Z+$HbBydR_cITM7R@oR@ug{x zwWr?N>tAo|mvmp++6K3>!jux)R7n%YF4VUMa^5LTRitg`@U92%= zi2+YoD@HCQJxcnNN1}ce5tbf{_l(?;o07)RWmrnkBqesy=e6Gm4)baO9X5p0uaCM4|G-nC9^eOxJm z{T_BD&?eq&kwVvj&UyKsyO809hUtDbWJOuwKB`z+!s7du!n4_b*@=NIBP zbTN(%XlQFFBjsM^pTfW2FiTaM!m9_Q+J`~R&g`vAEGw9q5vq>x6nPW#;CRTWd|8*x zfx}P`=@VV8^c<&EBQ(IbNT}`TlW}ZJ@$|||jh7`A(m`cCUPsF>o1dMl%Sl{~`s4jj zPj^_oxI%)}#0_`ZbW$^~a+Oc7V^85-yO-;OBh-|&)LlaZNs{UdA;5(i+vRtK+v5&> z`h3Hwz^iX#ti--sKWIGiq02XT`BzpKrFYBeY0a~8a5)<54MUZ%dmYQhJ!#X zp=3QhbG)A3pB)3UPslib5o^?XNW9&_vJkRM=Rl-}bBU=HPJdrLw|?_2CuM;&5jgIL1e$f6zU>BjxCC#!5;W+HFm|;0Uv`6C*P_I2)5A7!sADLUg7& z0V;kJFJ^}a0%;xe^CFVm0S4F!a3y#O36QlZjZVF*o4O&A;rLn5I} z1eAWplR@-@deWsgDSmL^06K|A_F|B!p5RSRq7&7dfrUVr^WZ<@qj;H^{G#`y|5Smg z2h5M?1w*L7VH67NcMCd0--k)^Gob%!K_@U9VVDI#r+U*!fW8ml$&mh?!kP5T-piZj zv6YT92?lro6eg6;^osbKOGCVg`7eu230%n(uPrO4*ndMZ$S!}0^|#nIXSUM$JrJh( zFW$eQ|IB?0%tV=(U~p8D_hxu_92TRx+YYU z2q!{S)zL^zK!b=NBAtGt!h6ygL{Ad1NyQ{rAv1a40MSWR0|20EB(w$;tqGu^nkXk# zs0I;0s;QyjE^t-V-zdyzWM)+oJ${dBlggP%rG_SII%_xsP$FEz35s?`I6;XnY6vI^ z4oAZ^HB{9QF3ww2&LoThl|~^lmy=8(x&kmSPuH!9O~Elb=6EawsRI9N#N30(aA6u? zAxFrb-hO{g5Xcn3l0n>56QPcPt0Pfr8fs`H3XW3$3uFb*=*&vo_Q)$Xioj@K)Jkh@>A*=tLjjhXzc$A5$bZqNgjs+}}S7>d$fVe_1RPN(1Et*HDAP z;Ybt|t)Z$8C8AXkP$U|GaCQOI5hzXMRvN$9=~NenFOdf5xH2jU6roN)A~0|S2FY}Y#=zka*w2Jvo4fkYjJ06@M-#0rz;DL@)9%L@ z^LSyNR} z>;FwI?!Ouyz?1na$d}p9z?XLa?cf)BT+JQDi6NNPCJKpxX1sWJ#}uPRH=X14O>vdFj=}!{ Dw)l`f literal 0 HcmV?d00001 diff --git a/xml_converter/integration_tests/test_cases/texture/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/texture/input/pack/xml_file.xml index 490a4897..d7135b25 100644 --- a/xml_converter/integration_tests/test_cases/texture/input/pack/xml_file.xml +++ b/xml_converter/integration_tests/test_cases/texture/input/pack/xml_file.xml @@ -3,9 +3,9 @@
- - - - + + + +
diff --git a/xml_converter/integration_tests/test_cases/texture/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/texture/output_proto/markers.bin index 075d211766ee2275192b9b90f632d64e74d7c8e3..93077c5eb122f69af81166d1da1c8db24deb58fe 100644 GIT binary patch delta 71 zcmXRen_%K3$i-ihT2WG3lp3F(m#SBgmo9`PR8pP~7Lw+YEY8nOP01|Mhp8^fC`tvZ F2LNlM86^M! delta 68 zcmXRbo?v1xz{Qta8DElGQBqozs#lPgE+ojsj}S2e3rTW`7w6}ureqfBBczN$QUDcL B7k>Z% diff --git a/xml_converter/integration_tests/test_cases/texture/output_proto/my_texture.png b/xml_converter/integration_tests/test_cases/texture/output_proto/my_texture.png deleted file mode 100644 index 56c45ea1f83feb7fa9ecdffe6a7c6396594a4dce..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5881 zcmV zaB^>EX>4U6ba`-PAZ2)IW&i+q+U=TIavVF7MgOsiUIJ!!EC-`m?Vy+6#}SznB~tbD zs`{g?tw@QPjEunG!yO{%_J9B5xc}m-BvqG-Xl=E6zH-YgcHXFezS{j6e7-;LR~@g< z!q3Ou#|M!^iP!Y}D*bhS=Xm*X!F!G{em?H>^-0v%K(7zp116g}@@9QrB*)`(Jml9v zZNHY>R6Z|t#OHOsPP|Kb{ZDd-{uso5cb^YrAxf)oR*G?_ko^6r&kB6cj6SB!Y`?FXTJAN(8Q zPZOt)6~&)FSS6${+j;#zXX!cn*p@LukB<6C|A zljJNv{os3s79vw07jjskhZFXFonf-X9Cs96W1KPFW11wkIMb6SzQc)27cfJ{vnOES{7#J*Y$#1{iKl||Se7kd|g(!Iah!yLKR=F(0GG{+Ii-d&p z%3HYset*Bx??2TKrAh|N4YRVr?#DC4DB(wKrJLu(d4<=fD}s~t8h{WncVRIUe-6He zR6-42Vw4bwqmrP`%45oLkbzK2Tr4u?lxlPmHQL-wA4vf z&V~Astkh7aw{j_^7AfjVE4`+gYpJzLHIVC)BukMhA}UR~Ce2#3s;Fwy-eOB&U}?2U z)7Dz=(RC*3jMX{6b7aJkMjmCO|f{1cQ@eIU{2+ z2Qn^}0SY==&b)@4qh-!==9{5hi7c{MZrlo%F;bX!h~rX5^WH~jvpAMDXR%XUxr+9HO+w ze4#@KmApene0pv*v2e))831nR9Pk!+*30n=0idIZp~EWflsaMqskH5YOd!kyDr*(e zYH{dfZWwGHRtt=!6qFfK?8t|$7&B$iPy84}j-`|t>fA`4Y<1P8^tp5w z-Lkw?_15bM7KA@4zrt)bD&2F(g&?O%M;msx_n5yKu~J24 z^fL193ZZBm1bggW$4bMMyBcezTfL^K2u%??W8Kah6g@erb@a|~^bhllqQ^_hbj9w0 zK64TB;FPgf^p*x8^eb;?@0fpioEbFzrUWP0D5xl3cafdZSkWV{_8! zAy6Lj<7D^C*`Lm(w>W!~b)g@mx0Bnv?Yqy@#z>55n%WlOhz1GZ%KNJibP5eZw~nXe z&!Tz#p|}yynLsVBPOT@Q$kXW_K5o>D(=)QPKo*H_s&y~cH+s#7#SpYsxsK3+V<*(S z5g_n+8Ja2oy3hb%-pavIOOrlL^F(HAd(27Wj-)5m0buRXW^98e8*iH9f95WoR{kLcTZlf5U0C)nh zH8Z*%rsGmgJ5KCP8_1ne={sP2ps*-LlvAOHa3QH#gdM+Ep_s^rERshRG6AY%S@mYL z47&lEsvca)GFAceQUXNY95c_V$I%stJKNl(Ax@5TXgz(96sqKQ6ZL=sJ{jt`$$u`m zr=#*;7r2ir-scx1j+tZ=UECK?Fm|?FkCSTg&yohJXgu#Rg#95%|I>kg@*2-2K9k8` zsn0zPYwQBh*bsfUOYU;S(v zf{v<{_>?_oEy(i}2->2~k;~h5j1Yzs8~;XcNun&>q3-h9D<=ooi=YZ(^DTA$(P z*k#gTclbkdBHbAtJg0i24exr%-Gm6*J8K%ya5Pze14Ma0h~@@>6Jj6Dyu0H=x_r~I?xKK-%gu)C%_3@qhD`LMDP#_UUxAAV`ym;LwQ(v5wwWiKsZJfjSTp`L0{<>2$#T{PQL5Uh{E< zo%fC5mSC3#(Gs=0Y~T zP!HW7>Jq&&$tP;Od0KM`)grbCxou8CLLw9v*pnbCbmF4h}O!lNuqY@B&37fAb;pj7p*d}#2?uZ$pm3y;)7@lEs zK^Vw2oY6|1*e>F^Zfpxchrg35!%S*@LK|GHH@3lBY`fi{LJWd1Yi69pq$2$UgNQ5U z(7cI}DMQC5(H_UNOj(i<Jjvx5+r_1sw1eGOgadBm;-+ z3@YQwjHc0S(4flK0yE5O$3{##c7*~!m!Jti)(x~XUj$X!#Bjrz4yDf<&q^CLyvT77 zFyB-By%wOiH3cXuA;8N657pxfEal}M*m)X!p-9qv+7 zlO!IR856fI0VBA;B?U_+(K3_M=#i~81P^itL&yg_o81?H6-$`g?AD3JV$*!9fuQ3B zAtlhTnPalL=4wnKc8?!OREHCbeLs})hm4Xc&^1_2!_BG0j@(p-3h~8m7|gFX47i+< zzT&M&Fp&}P%j2{!U8P@q|DV2o=_`TFn=w9_ zhKRfZLO2INew9SZ&A1EIgn%2=c-?mU3!woJqtY+{M_kb4MUji~#Q1g9mhI znyjXfu!zeRvAebg31W~#Y{9W>4WS)68$1E&5VU6a85zog(+;%PO+|41iKDnFX0Xt2 zKr10^7K?a>t#*Q2=eoi&sD2z2MY)zeGnxgH)rzgE-Df2H zw3!yloOck8uO-^kd{eZ|tl%(hOu3JO@N|A+3D~#lq9k?{qQx4?S*<#u=s^38#I#5X zzyyA!k`eLdM~Nml0NC#476=*;b*q$A>M)N98B1Jv&uS27&ujrD4?HGTAQdeOiAqKq z043OX-&WjCF_zRv4HI=b{Ur4Ruh`bw3%809K*jHN(45dVR#HK8k4H382UQitHZnG= zMks4!=$*8%=#XsTpmng@IE!G&$R@X}%{o44o872O3UUIvY9ZP!!|8CcltQqF0LAJO z@4!MwL5LXQZTzc&RYtwHG0;Z_a)$=H^loykl)zRU76Y4@(t378 zxlqCZ$%9cM-_f$;Ah#*|z%#%-kO^!@2q4(Kv;}9NN*F2xTNlmjhq*0wj~CQn_mIU( z9V;5FXX%gF?Iw0p>AlN+^q*Ox1ZYP&g$*@UGvi%s19yxYW{j{ECPsoAFjv9F(GPaB zfV%vO_EFxX$bllLlPkfmvX(bymBZL);6@y(mt|WhzMo)H5Awcxrcp=#Vvy7MR&3Fi0m*4f%kk z&2I9TGVm)R%mFJT*EZ8{xAx1nD(vVR;xl1$ynl?5l1Pr~rdvJineLx+WU7OXF$zFD zP^Lt5b$fbDJp)&nVKOurjBE-iy?;}Z=(R}6ZvmY;d}eo3+P%dQaEV`!VSv5@~ zD{k8w4RAapEeSjauTau$Hb9XA@f~`O@b`hCXlr;3^Bd5s@{*vrLMp)hcltfI1 zyEX>4Tx z0C=2zkv&MmP!xqvQ$?v25j%)DWT;LSL`5963Pq?8YK2xEOkVm2O&XFE7e~Rh;NZ_< z)xpJCR|i)?5c~mgb#YR3krMAq3N2!MaCsl+y>qzlK0v6KnPzp21DbA|sYG1NWLL$m zSA@_*6-B?yEMrcRlJH$$_XzO)F2=L`@BO)Y)ttqEfJi*c4AUmwAfDc|4bJ<-5muB{ z;&b9LlNuy`C`-Ngjg)JvC_t@Xlle$#8Fk#DPPEVta9Gstd*;* z*(ZNtIH#{HbDe4!2`pj>5=1DdqJ%PR#Aw$^v5=zkxQ~Cx^-JVZ$W;O(#{w$QAiI9> zKlnXcD?d5mC57Wa=ZoWfi~wD`K%?e3-^Y&AI01ssz?I(eSL(pbC+W487Ci#`wt(i|qi@Or1GhkE&6`{E9H$RJnr4-}0S*p<(E??!`@Flm zeQy8WY0mElL%MR5WcjsD(7jgO@hr$DSdY?PPU%oHvMSj0 zP53<*yEJF3aE$p1@_rfAKENZp_X7(E_SJPtHwN^V2!X^ z@k#*_-bb*erJDGC1ZxVbaScYbK%626gtg&u_t=}Xk8LZehsj1#1Yob;~tI$&Z%C%yZ z9lI2(?AWDPWv4%iRd(!BX0e@qDOTCBYo62WU2pW^fDh2WZSiIe@!g8`MsEXkshh@$ z$mNH>y=_+t%TOtpRSjg)<#ro|@N+lFRXF#9NfCXKH|h>Es(O|;)&PGCQjfvayXmoO z^U}8MLZr+cW~x^QECkAXzptCdJ-aDM-8753X`J_d|3P}JN;b>)&G7pH_1^D~*Xzd@ z`_*i=yDw~>=}X(Tt~j&06!>hQE}cbgh(L*m9Iw}H_{`g4WQcxeXVxRD?gy+J%&96< z-)CB|D~4H7szK-6Ziu2`@SEUnV)RvzUH`X5n6+B1{11nt1nAW&@;i+lkFE%_y!ZQX zalhTfG3NGg59vzvu<2yzvj6}9000000000000000000000000009fK52X{qEXnJy< P00000NkvXXu0mjfm(VbP diff --git a/xml_converter/integration_tests/test_cases/texture/output_proto/my_texture2.png b/xml_converter/integration_tests/test_cases/texture/output_proto/my_texture2.png deleted file mode 100644 index 21a80261d86c0235b084608c7558c247f3968707..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 13277 zcmW+-1yoy26NLgri@UaHad&HR=PT}7+}*9XOVDD4;%>#=-5r9aSa5g#*PnAjPQu%_ zyR-9V?%cUV{--4U0fiU^1_tJXtc-*T@c#Jkh4dcy9dWE947|a+h{>uU0YAP--y?v} z$c{4FE-)~0FaKV!GY`~_z?Vd>l3K2+4(6^N#?EFi9v&VnR`xb7rpAtDEDp{VnWsX; zFfbosWF@|;d1jqtd-x`+-@a{v$dM8fLWpIkQl`aNXR*FYe*MCPYNA<_23}xJ)$b~A zds4-8(_dRf)&Ge!>rENWmT z48>C>Q=&}rFDb|eLxk?|ZniHLhF3J$kuAcq}UAfgl9zFiKVjwrFR-3Cl_%z7DS;E%wjapgdt=*bp`>(#d;vSrY%Jm#M(% zgM&jQd~TfV`3CW`J~ejJCs;hnvjxtc`{(-l(4oz{Ox;+{v(5oR9I!TH4+X-Ye#5GTZDeNKFnT*?8CyoQqv7M?k@K<*e@iFqwtEoZmvW9ZhJ?^ z0sdO3({IGtR&~t7jI@&4$-X9dbEC^sC``G(aMlNUSLAdFe>BTHNdDj+L{a3Uz>lfd z`uQEcj*TxejyA0W?pSp_YipVIwfcmD-XCq2&M>2hnWj;jN%#Uw4+fdfof}}W!{zK$$# zNZw%}O-mdY9Z7cKdLj^1(x!;r32`a6a}RagDNwRaUmj&|7#R&!QAM4SZB-vms*#;r zD9|)4v0e-Es~qHnic6wT7b#+@+7m!w{&LABH~PV20Adh_*6`LwWPV1KuAI3d-nbs z{&q)97+Nqb9IRFGIqaJtokLV-DOgr13Xix=(nvfe<1$Jv&#ALhBqa3x)ok<~r{5@F zdxv@oDCC_DoBBMzu*$)yGOvP9EncJ^s=b6xa`hup`qY(U_N)|2QShHfEQm6)dXr&bm~Z#Jjya)^XZq#a&S(d{5ka;{R^s^JswGhO4(tH=r$% zIPW&+#fHs(C@m}7n@-&G=p+-d_Oc-Tvcy8h92XgVG71gw*Yh-0gflmio8@2NcLK&r zGBGTU_}oS`$v1Cc28bHk=dkHn9-nqdXFe-9usLpRA?H20o-m}kq9WT5jCJ`1CiXoc z$2xQq8u6pt-Pi!udNNXKr)LSPZOGM=FH#_<<2pT0oSR=<3Iec#-CMbl=S)x*TL04SDDFIP(e3SpshW~($S zw)pOJa4s8d`ttH3Q@LbbR#EZ81K+oApkhpHs;sQccy7<{z*PWyhYHW@kOk``@@z51 z?`f_CM{ntkRXE7e=uc9#E%21tnBGF7c(nPVhbQju?`s@qbfR}JucBp@;yzJvhBL3B zpPwnGC1it&545FzCpLigM%h=4 zj4u;^`m;H9xM%+EWch+KOUP>T_Go~nFpDo`G9gG9&+B%vQa5Q;Ffuq?`P;W|g^)zk zKs1F8nByqiRw!1el~UDbJ>^64p*osLI%iI|Ki(P@>y~%>_;~s>&{@3q*UCNeJz2t^ zOAuaEK`TBVV@KtTYoURW-R8&Zo+>EdKM_3*N>!dpr{k1}5eMrz2xkFQ?ZxY<5WUGE z`C=;iZ!7p$_{{GP<~Vb}KJoO2%x51IVEkd22=>>I!i!&MdL{BHf%#9D-JHMaG@<7k zZsLXu2RuY6W(j+IyKo~D2)S6>KUEc&ItwiQB{lPww)j!F)dn-T)LlP?4#SS5B37M; zcHcQ?Iw*z`{{184(S0S5f zu<^FN`{L1RJSJWPL03XU$1tQpVP8 zm4_J)DhHGDXbg-Sdh~kL@k+(J(}}84sVly|?Lee6JA$yU1Mnj9X!Y>t6yV4QOLQ3> zPw}YCp$qei+b1WI&MGk`Pp|?W*5UE-yh8&Rzt}8xy5OSJh1Fnyz4x2;-h@H^;?>!| zC`IpLqJ}Q4@O!Ou`IqGXZG7w> zl60nNN{H6hlwd{fRujJC|20w?BI9L1m#)0c8dn3;LQQjyUReig)o}lk@k0lp&8edQ^ z<=C21j~X2X*-GTRNF*BZ^zWH$$Nf3hT6ZuyIyqMLcN@IA}qzD3}+UTw_);red!nYlb*HUC}!Kr~IuEHOm1_TbWwyTFQasgfCsZ_n&gj)n7 zNk0nGrNw3@Q`8~-r=``~31?-yUKgLcc=A!+H)lOY*vodsJy6wxBQoxodj54(LB^4B zHLSt7%LtM5Bm4mxld7>bNG4A(M@B6Sdb&3xb9ITKCkum~DVpXw4+Tm$%ZHWNtM7AV)Q5E|)@ZhRmNn?Rq zdFr~)l0+EV5e-*oS!^?YSu0?$%h7Jr&Ovh9tL3O!H*wXOy@}j3NIz+Y|O8!-kLht&76FXj|OAQ2*#W#~H zby~&G%;iRFapDaQOQ{i)Cz)g<6a*usoEeb6sM3tVLGf(N9i>tz;7%E378yxNyiLEe zY5%CGY3R){I5!MHl^5Vv9)6|bxx^&Wu|+aO$+UGb_DJ7)?pxWsHH^a%JWSmAA07n0 zl`Ai90%XclEzvFU6GrRlUkh%P3jEp{)si(;n3`dW*yG4V<+BZxolO)#>OKID0`LOk z$}vF%#zc11NK^~t1+6CNGAuP(@HB<@xeL#9*J0e zkJ$4Z2{qG3*t@?8g`Hta{gO(m%059=suac5&A98~ zGJMlZ`6`pQ21oCl@_ad_#KFoH;F;fJv~>|)>;&!K2Ee?t$V<}s3nOEBX;o>SX8gU) z28R7y)T>|HT(Ram?KEe4Tt0-NPed6jxOn=7%4hww0~^eZs3g2+IQmjCy$y{U*DGoh zA498{ot5kn5YdZ}vr8A7Jg~C`!sg1Qg@BkyD&#BI4B-OK4}cCuX3({UJ z0r@3u(xnzvL6s!afR{6kugo$^QN~YIePY7vb*%fG?(<)spMQ!h3b9S+8jC;ur>Q$c z6skxapUbD*cAg*=Z+km?7!hGPwRnOk>9B-xkEx2vU|cY57hiVViu-Uw7%L_6I`4ee z4|p=#aey7-%GQ=fgDuf;9#yI!*Wt~3F)kR-=H(x#jmV}!`r!?v`9LI`lbB^WCBf5jRYC{$Bd zSN*0fDJx5~u)w{PrR1$$A(4F2hOP>PKF3UrkdOudLQhxsMjy{&QBY7EF(nV9RGIOP z2Ks|DgsgDoQynmg1CH;t8&CN9Yd&>UdjTLcx)e0T@%G{%X}=366iUy(#8lT8BLK;2 z$3lsglaUu3DxEvb;s?p@h1zm(x(v4`R6;C`Gq+CuNS@fPF13 z*{)t++m9@WW2Ig%Cewhgbu4`|7r(Z@EV?XJZj!`G8TjpP=7)=5JVYga#XevRHNZkAi|}6S{Y`W@94mrve4u zBG6;kli47^HB5d}MZ_H`q($6{**x6vJ27PQZak`$`~s}UxZw|Nks?v-d>riJce(vB zOjXa0XU(mB#Td$>gv-EF0+j1@wj=M-GC@m=i?x13uo~4Xy+zDE{EW94lP5@MT-jAW zF)1WXd~w-lvP0w4Uk~aFZ8sR);jfP~K!lvm-EL=Rf(e6ysGV5cZan9?MIy;!1XL&( zm|g(oAX>fFQ^uXC-Q*vBj$Duv0^~Vlr^IW8$lua(O|-hwDJhzlYiaw)H21CUhutLA zlO3mizh{OW-q>;hG6HKZ&Um$c!;-p@=>-c#e(uJ$j)Onkmu2kGNwiYcO9;&2fk9hoklIJ$>`d|Vl6h-+I#pQA=?dsuq z%*^-YL@qPSoRU2oE-i^v+&Y)~@m48cG8!i5xAf6h30f6=gmS`}2g%17Kh(9<4HmT}Mfp3GTbXC}i>sm2nyRZfH>V`BR2%tgW@1 zEt${SpJ?_c`DtxV_xI(2r09A$n>akIUfDqKb>g+N4NX41CYh}Ujea!`AZm08U5|~%C2g3vz#IR&1c0y(`Fo#A!E_czTWt(ucs7Z6SxbQ zgoNGaB##^>o&i#E2g)Wt&NVF4c7O{I(Fuv6^+>iOX2Niwzy+)6&&_kyWU9XR@rur|$WtBKyN;K3o*zYoU zCD)Wh;eDT>FAeN-W)WfoSwbuB5$<&bM?0FQ-Lr6_Bni6g2jqP z^TR=&K4Yl}HzSjiX1hhg&vi}&nN7!kORBbRhjIL>T4;y|%p1!9xS%TFSO`fLrPY=#dcBWqE zL4pUFtKj#GUOYo_xyB1e%uM>7IdjFFTt0DWO5tCR5nrv0$UTdu+um7y#`RJ$K^sf! z+^^wpnX!cQ#rtnfRkPHzIu@9XeL3xT(#Xm3VI><_!2WpXp@x?TBmhw0u!vCrFu z(xGL;)VI661EeBvCPapQ9b!-p@Iv=Q&PP{u7ia0{=Uj)kaNgHjhXw7MkPyq)i#=2{ zve}`*R9RbDMMY*t4f`F?)IS$8W+wlJ7}C}@txmU*%B=0EZAryP ze~%{0s+1KK_kum%B=m4BoaFU_+n*^#UToPZ{MsXWDb4n4c|+S!z<+yhE-&RyGae{) z8&6ezD}gM+D&!%mEPO%Y>-*h<%_A>AKdHJ)f8fVmXCng<>M6Zz8jcr$D(23-!#bYg z=sS5R^M!N$o;9`4cLo8z>!L3|*VAHyplk^OKG_$=PI0-UNb67*MC5X=C@J~AisnX1 zA!yDP?e7`BOjyg=O;Z)w)I=cc(|^@{END3=5b+^1`RqT}Vp~N`wegYN9ZKz1%TCih z$O8BJRVKko{ar~u)K!3tRU|-^Rpc%3yvHAViB7aDVX8}~YHt?J1FLl`6#5TU`k$Ne zFlK?Co*p>PveVKc6@KkvdQrgj=XGrG%cIGoKsW zGxKeF`^4^#qMHsjStY5;sV9e17#|dVa%jd5%Lje`xVaEoH437m?XU4IHBFs{*~qy= zFbrr@nc>F5I?--*6sfJ%=dP36iP72~kq@HY!ftk7>_DYWM5J#SJ|0_}`iQ9^8^dZ!V zAl0)W183=L9*?B4{M@f`B-`r1=rkTEQ|#RpUwdEgd(kH0eo~PA4ZE0%w<%DUZmL$h z*?>Y58LZEthd9^nyRL|V)D&=eb!9elcgALGSqAui7ILLf3y~%gcp)4*w&77STyA6S z1w@!$%B4fsai6C<6$p9QA|>KJ26)1(GD@=3ccd*u@Rxgsh{N+{ctJKFozUw_v4zuq z12VA=wG$7(_d<8a^V-J3pfEnS{F)+U%U4X38E|nX$NMbOt=U4x_M3R+ zkRj2ld8YU12c>zE*cOzmT@h<%o+^sX2IvL9#2{OGVwyCU_Tbh!+Zo?tO#W{9fGlY* zufpkNa(XAByK%o&VrnPiigU={boV^{|DJ3uuv)DXtF<0;R70RJPZ*>Yg+|6PUAe4h ztoJwoi@r)s=KUe>dFnnm(7A@TpY2(u38%UMh>>?bqh=>=RxL0Y&P3L8jK+?sFlQ) zHZ2@(GZjw^HVrw|phWbvcuf=g*LS+_laIHyjqRV&O7!HM8o^uY)9Kw1^T_0H$#8>u zI0B?~UM=TYN9_ImXS)wce7F`FAm08Q7uTi?(313gW|Jk>aP-t>buBlxbW)n;a3yG8 z3#V#r9h6y{ChgG%c%MjI2=uK_-G*|@!L*ZBV zpJf(cLKpH5c~cwexL)nPn@3A#S9Qwx_;}}4U@=Ka96%;v<+?p>v(Gafa*Sn8;(Mow z$!{qrt$8w%#_H}nha~TN1!iDiU|MSM@$tFnU-vmSO6=dzn(@%T;`b77xIC~Ysmgqi zIxk4M*bN&ACRoRu!(PR)matFz_h-!3BS*0IEl76n{)ynXM zhJqqVlTkZ39p7PGL12LThm75Td5a89HG-f0@hm?l21f5em*g)s|(D2Qf(*t#B0$`T(EcLql>4|kI zYw^sLPbas%{fMs)$O2Wr*wFBDSS*2SJD;Yvam023+R4T?vLC-$?ukx!cKUZyU$Unv z_2sgbYV&Cv(1?}C$qc&zUAYtw$tiE(5a9CbL1)%rE&ls-i6;+c)#FvwEZ#rX9uq_p zbhF;S_B$0KQ@)0nkCO|dG)F`^`u*j&!{hI6aUlr7b{dhbb+3`i$5+0AnEM7crVF*? zXWO0%(N)JE)XA%u#0;j&%qJQCcYOIYQaOOS9EIxz%ECfggH0-s_K+(WR=kIim1BLJ z5N^W8-y^!3K_zer83ZUbE1L)jb`9JsDykFrOroh1nzfNnwopP z2<&;%k|P@@lM?=4*+FNXy+0?}?5UjDBG)Y^K2TDwa^79|H1AjGTCQ+ROPTXybUZ25 z9xMd^&~e;;W_7QVF+p}|&T$uWax2pXg2D_e&FAq(UMWXM#?wsxjBxVwBcA;jfCLk8 zCsNYS?p$%A2k$P|U7!kT(^#PsRq@6VoEI?LtLf>D3SM>nQhpQkw4Jme<@a92Z*u#L zfFOwv^o9S(OABgI)rR1D&3VG+!kO%&BLAnVI(CP;#O6HCG^p$wL4p55-GF`)1KGnv ziFHXs8ca!ax!hwX7+;S`ak&{>ZaX847kOn6_Ey|kSlXncx=N~~$fJLFkQCeP?fouI zBu%*wNo7ZU;i}Oo4+qE}&NDFUp`a0QlVZldY5vpJE?n5P4J(nxKt-Kd#+FqD#1C@o zzjhRpA2W5#VSWxS1Bt(K?e+=))-nn$p~X2bqV8w>KV~eijCyHt@l%mvQBhOGJm4P? z2G)7J;&hZZ$Ox>6jZu$KJJ39*3@})jnfJ%4{lE7z$4>*w4g;?f;bQr%loWMfAbPF$ zj95Nq{jhKcFk#r5S}ttW>RJQwX+AP$C0xol8 zDydyA4IGM9MPH0!>e{^X?J>f}<4|!7DQC1nDd^#4%%R>4Dw1c$qN{4avNxmKkX&51 zj7mbiAw;WJt*rXDdI&bpogPq202J8TWInAWP%UipUR#Wp1jUeZM?^&2{uFhY#HqeI zxl46P4#!~n*9)3Bxp1veXus(OTKbA-I&BDZtANB|8mJA%I~_PQSqN&}!93UA!HOTa zR8>?4qf$t;Yn`c#R=@IkL%xKeolgAv+JU_E@k*cm9&Rx|^!h-@G;~pL|}QmlV46t9$TLyT_gaEr4p1&In%n0r<`d}qK6u0eqx}I};B7Qi}o`uKAi~K@0*3wKA5Fje3b;vK1 zxQ36F7Y@4;IE_UO_jqS?6BV%icfpmsy16-7y_~n+a%9SOt<$g`KBog{`7{o%x~)-h z7+1o`1!YRud(sQ0@l@*0bY-Z@zkBz5xI&dfG)Kqgv-rK$^-xAz8v*F}De0oGkt&b3 zqy@qp&e#Q|P~P1id#iqym8Td~Q~!@}bP&Ke7s`=DU1A0yqI}5bqL6S*L%$1J90%g6 z9d^Zk0sTA?biC{pK_-Y%2h^K#a-+77XfzdXhd3&#e_^AoYl4Q&-1T9&#T*d7et6xVZs#?SN!<|0` z^QP>29yK*B$B_&Miegg0?2p$<`O0TD82R)Jt#aPp_y9>FGc`;p zEF66uBmdoEKPgl9S6M=FbHTiZxevSwKb|?h|Uqvqltf}t@i!SfQ%)&MYkNc#jln&wdx)1r)6P{ zYTol<)9M5e$YOx%4;>R%I;22rFqW*>t|<<`b#R9Jx$1{DWM~eTZe$|cxL{b_OA9M3&5M^;J2i)tR>pjYVb-xJAjrYH&E%F%WEXvk704Sx;C5M2&>!8o5+(j0D+8# zrLIjJz=@i`C5|1prYtjj@Q3@@o_bRq5HJM<^5uh>)qmY?&*s0od4-nUrd9{ReR^~o`X4<=@*YI*4=*Xf`G=-w1T78!J`Q2dHe9y1T;|QYn z{kuh;6A@9BTUAynE-`&Em+2qGa*%n3>{xKZ8M>ZX(P+gC({*J6AZ3 ziV~f{1!S4TJBcVg&ISe%L&Rsr5rlyIIU#?8CVeWGc^o{Ny&2_PC+O}UW)t+Kcrwij zb-@2%nLRSv;g501Dwaq*?`t*r`~<`Wqt!5HTHs#&Q+ba{KOef10Oi!)t@13$CT4MM z#2yAk0@1KTXE4Smhfeui&)H`Su&YuYpx0=!yIwHtEL4(aF$_8j z5+syHB2ysmp!ko$%$UISd_WXjbP}T7$RS6 zuUXUTs(`uZJqL90Y?Z}Annh~FscAZs(3Oq zfi}LZYA+yd8-MB_bgkuM>H4*NIO@4z1gFd*c`CuDa{yxq%lf(HS6SIlz_q6)^~1S1 zN}a;c4ym~8pC*Heb@Q2>%S)fO(Zmq%>CW?#P#GA@o1q&70IW)vqSc>D=;;U@wACY0MKszr*-TMJp?*&>+CP|=;SKx zLZ2m1-|=Nm!_t}x5Q?P(@$od^+)U%GL6QpeIt1|7$gyiRPECWU%jho6z#cpKegokQ zPB2C9KYhR?D_u+NKkVmaYU_7-?43X4jX8oj9X0ZTOGgUw8(Iw<%6>iVwW$+lz*9+G z69~L|O>O)Jq_8&T;mip+>n=6E8wsWlNUEq-wc^t-zh~|@A6gTQ#Z~R>|BLR1S$u8J z9!tw)UE(D~yOxQ>+1Rmm0MbOdz>5{Pt_@?*hD>4`?j(yV)wu(16q$m&o@RCGKh>qH zK(=D+=x8fbL)aM<+6QO}SFTqYe-#wO(9h+lK}UQ{%dC@|F(*k|GfVqig{EK&3H;Bu z@5cSN%*x6`<&Q!M1*VNbr z5Kz3E%yn~!qxs_Vt1BrQ$k1AizHmT41psxbH+_EX9sIr!u3{x!k==i7rAVB9N*G-g zEwx^VV9tMSA+$>)U?fd^fo_IhXoQGJ)pRy@1yQ4uT@qg9NPV?-n z^PAbEzHk4O=H>)zj9}*A)%pRqK|aV)i5=Q z(9oDEbX-|+x9t}Ug9$yb1k#m)W#8lGx_WM#pzqpyC$M%se!CE-+vL%(Tn9kc$ON8< zg9;uHPOMNgbAR&|Al(zHQnY@gAvn76_Sb2PWo$u+A?3%UaHthkT&f~_fYcADsdER! z74#Sth(EDC-ks(3GZ{xkRXIPAxm0F=U?ohPcs5P67pA<<5swm|XooamIZn;u{> zfVE-ufW_{@m=IBdEY1T+cizDU&1I9= zfF1rl!9-Q^OgmNN9U^BYqr<$Sk@oOFb1gIAEd;qqNK9(4(0phzUF7RQPIOwu?-CiO z&U1l(4-f|s`l(Gke@yo@K$)?dEB1E$p5oa}u9@&zbk-p0hjVmWP@9(XA|QyJbsAO< z#uz@RLq>~X0U9)_E&TL`eh2~{g2j?!ttu@w`&*{?-AvyYP=^8v5`(LMLKRX$e~p9W zR6q}0cpYr=bpF|Yb>m}GdV_K};4zW;C1s$%p zym06K0c3t>0X6N>jU^=^U*UYP@fNga>Z5^sn5}}Gl~}&T6eEMjX%!H7=3qDX!VQ!G z&2*<>^LtiS*7w(E7dG|7!&PM3b+%-op)~ksfU2sup>%g3S6gL}%tM4mxJ3dlhru-v zZA)0e57L)xV9Q3h+-fIUzGRyRa4~?WM7((Jo2G?PpVZixGtg&j{=0|Ofa+l5RDtJm z$xtv%O5jeY~4h1^M|=pMrfr$%K8$1t zda(k7Wb!h#k+b0JB?mV9jo4~{{vQzDV)MjR{|SO4x`iIEOI^)31S3<;wDDzu#+L#9k~9W0>O?9_JW^_#=-5r9aSa5g#*PnAjPQu%_ zyR-9V?%cUV{--4U0fiU^1_tJXtc-*T@c#Jkh4dcy9dWE947|a+h{>uU0YAP--y?v} z$c{4FE-)~0FaKV!GY`~_z?Vd>l3K2+4(6^N#?EFi9v&VnR`xb7rpAtDEDp{VnWsX; zFfbosWF@|;d1jqtd-x`+-@a{v$dM8fLWpIkQl`aNXR*FYe*MCPYNA<_23}xJ)$b~A zds4-8(_dRf)&Ge!>rENWmT z48>C>Q=&}rFDb|eLxk?|ZniHLhF3J$kuAcq}UAfgl9zFiKVjwrFR-3Cl_%z7DS;E%wjapgdt=*bp`>(#d;vSrY%Jm#M(% zgM&jQd~TfV`3CW`J~ejJCs;hnvjxtc`{(-l(4oz{Ox;+{v(5oR9I!TH4+X-Ye#5GTZDeNKFnT*?8CyoQqv7M?k@K<*e@iFqwtEoZmvW9ZhJ?^ z0sdO3({IGtR&~t7jI@&4$-X9dbEC^sC``G(aMlNUSLAdFe>BTHNdDj+L{a3Uz>lfd z`uQEcj*TxejyA0W?pSp_YipVIwfcmD-XCq2&M>2hnWj;jN%#Uw4+fdfof}}W!{zK$$# zNZw%}O-mdY9Z7cKdLj^1(x!;r32`a6a}RagDNwRaUmj&|7#R&!QAM4SZB-vms*#;r zD9|)4v0e-Es~qHnic6wT7b#+@+7m!w{&LABH~PV20Adh_*6`LwWPV1KuAI3d-nbs z{&q)97+Nqb9IRFGIqaJtokLV-DOgr13Xix=(nvfe<1$Jv&#ALhBqa3x)ok<~r{5@F zdxv@oDCC_DoBBMzu*$)yGOvP9EncJ^s=b6xa`hup`qY(U_N)|2QShHfEQm6)dXr&bm~Z#Jjya)^XZq#a&S(d{5ka;{R^s^JswGhO4(tH=r$% zIPW&+#fHs(C@m}7n@-&G=p+-d_Oc-Tvcy8h92XgVG71gw*Yh-0gflmio8@2NcLK&r zGBGTU_}oS`$v1Cc28bHk=dkHn9-nqdXFe-9usLpRA?H20o-m}kq9WT5jCJ`1CiXoc z$2xQq8u6pt-Pi!udNNXKr)LSPZOGM=FH#_<<2pT0oSR=<3Iec#-CMbl=S)x*TL04SDDFIP(e3SpshW~($S zw)pOJa4s8d`ttH3Q@LbbR#EZ81K+oApkhpHs;sQccy7<{z*PWyhYHW@kOk``@@z51 z?`f_CM{ntkRXE7e=uc9#E%21tnBGF7c(nPVhbQju?`s@qbfR}JucBp@;yzJvhBL3B zpPwnGC1it&545FzCpLigM%h=4 zj4u;^`m;H9xM%+EWch+KOUP>T_Go~nFpDo`G9gG9&+B%vQa5Q;Ffuq?`P;W|g^)zk zKs1F8nByqiRw!1el~UDbJ>^64p*osLI%iI|Ki(P@>y~%>_;~s>&{@3q*UCNeJz2t^ zOAuaEK`TBVV@KtTYoURW-R8&Zo+>EdKM_3*N>!dpr{k1}5eMrz2xkFQ?ZxY<5WUGE z`C=;iZ!7p$_{{GP<~Vb}KJoO2%x51IVEkd22=>>I!i!&MdL{BHf%#9D-JHMaG@<7k zZsLXu2RuY6W(j+IyKo~D2)S6>KUEc&ItwiQB{lPww)j!F)dn-T)LlP?4#SS5B37M; zcHcQ?Iw*z`{{184(S0S5f zu<^FN`{L1RJSJWPL03XU$1tQpVP8 zm4_J)DhHGDXbg-Sdh~kL@k+(J(}}84sVly|?Lee6JA$yU1Mnj9X!Y>t6yV4QOLQ3> zPw}YCp$qei+b1WI&MGk`Pp|?W*5UE-yh8&Rzt}8xy5OSJh1Fnyz4x2;-h@H^;?>!| zC`IpLqJ}Q4@O!Ou`IqGXZG7w> zl60nNN{H6hlwd{fRujJC|20w?BI9L1m#)0c8dn3;LQQjyUReig)o}lk@k0lp&8edQ^ z<=C21j~X2X*-GTRNF*BZ^zWH$$Nf3hT6ZuyIyqMLcN@IA}qzD3}+UTw_);red!nYlb*HUC}!Kr~IuEHOm1_TbWwyTFQasgfCsZ_n&gj)n7 zNk0nGrNw3@Q`8~-r=``~31?-yUKgLcc=A!+H)lOY*vodsJy6wxBQoxodj54(LB^4B zHLSt7%LtM5Bm4mxld7>bNG4A(M@B6Sdb&3xb9ITKCkum~DVpXw4+Tm$%ZHWNtM7AV)Q5E|)@ZhRmNn?Rq zdFr~)l0+EV5e-*oS!^?YSu0?$%h7Jr&Ovh9tL3O!H*wXOy@}j3NIz+Y|O8!-kLht&76FXj|OAQ2*#W#~H zby~&G%;iRFapDaQOQ{i)Cz)g<6a*usoEeb6sM3tVLGf(N9i>tz;7%E378yxNyiLEe zY5%CGY3R){I5!MHl^5Vv9)6|bxx^&Wu|+aO$+UGb_DJ7)?pxWsHH^a%JWSmAA07n0 zl`Ai90%XclEzvFU6GrRlUkh%P3jEp{)si(;n3`dW*yG4V<+BZxolO)#>OKID0`LOk z$}vF%#zc11NK^~t1+6CNGAuP(@HB<@xeL#9*J0e zkJ$4Z2{qG3*t@?8g`Hta{gO(m%059=suac5&A98~ zGJMlZ`6`pQ21oCl@_ad_#KFoH;F;fJv~>|)>;&!K2Ee?t$V<}s3nOEBX;o>SX8gU) z28R7y)T>|HT(Ram?KEe4Tt0-NPed6jxOn=7%4hww0~^eZs3g2+IQmjCy$y{U*DGoh zA498{ot5kn5YdZ}vr8A7Jg~C`!sg1Qg@BkyD&#BI4B-OK4}cCuX3({UJ z0r@3u(xnzvL6s!afR{6kugo$^QN~YIePY7vb*%fG?(<)spMQ!h3b9S+8jC;ur>Q$c z6skxapUbD*cAg*=Z+km?7!hGPwRnOk>9B-xkEx2vU|cY57hiVViu-Uw7%L_6I`4ee z4|p=#aey7-%GQ=fgDuf;9#yI!*Wt~3F)kR-=H(x#jmV}!`r!?v`9LI`lbB^WCBf5jRYC{$Bd zSN*0fDJx5~u)w{PrR1$$A(4F2hOP>PKF3UrkdOudLQhxsMjy{&QBY7EF(nV9RGIOP z2Ks|DgsgDoQynmg1CH;t8&CN9Yd&>UdjTLcx)e0T@%G{%X}=366iUy(#8lT8BLK;2 z$3lsglaUu3DxEvb;s?p@h1zm(x(v4`R6;C`Gq+CuNS@fPF13 z*{)t++m9@WW2Ig%Cewhgbu4`|7r(Z@EV?XJZj!`G8TjpP=7)=5JVYga#XevRHNZkAi|}6S{Y`W@94mrve4u zBG6;kli47^HB5d}MZ_H`q($6{**x6vJ27PQZak`$`~s}UxZw|Nks?v-d>riJce(vB zOjXa0XU(mB#Td$>gv-EF0+j1@wj=M-GC@m=i?x13uo~4Xy+zDE{EW94lP5@MT-jAW zF)1WXd~w-lvP0w4Uk~aFZ8sR);jfP~K!lvm-EL=Rf(e6ysGV5cZan9?MIy;!1XL&( zm|g(oAX>fFQ^uXC-Q*vBj$Duv0^~Vlr^IW8$lua(O|-hwDJhzlYiaw)H21CUhutLA zlO3mizh{OW-q>;hG6HKZ&Um$c!;-p@=>-c#e(uJ$j)Onkmu2kGNwiYcO9;&2fk9hoklIJ$>`d|Vl6h-+I#pQA=?dsuq z%*^-YL@qPSoRU2oE-i^v+&Y)~@m48cG8!i5xAf6h30f6=gmS`}2g%17Kh(9<4HmT}Mfp3GTbXC}i>sm2nyRZfH>V`BR2%tgW@1 zEt${SpJ?_c`DtxV_xI(2r09A$n>akIUfDqKb>g+N4NX41CYh}Ujea!`AZm08U5|~%C2g3vz#IR&1c0y(`Fo#A!E_czTWt(ucs7Z6SxbQ zgoNGaB##^>o&i#E2g)Wt&NVF4c7O{I(Fuv6^+>iOX2Niwzy+)6&&_kyWU9XR@rur|$WtBKyN;K3o*zYoU zCD)Wh;eDT>FAeN-W)WfoSwbuB5$<&bM?0FQ-Lr6_Bni6g2jqP z^TR=&K4Yl}HzSjiX1hhg&vi}&nN7!kORBbRhjIL>T4;y|%p1!9xS%TFSO`fLrPY=#dcBWqE zL4pUFtKj#GUOYo_xyB1e%uM>7IdjFFTt0DWO5tCR5nrv0$UTdu+um7y#`RJ$K^sf! z+^^wpnX!cQ#rtnfRkPHzIu@9XeL3xT(#Xm3VI><_!2WpXp@x?TBmhw0u!vCrFu z(xGL;)VI661EeBvCPapQ9b!-p@Iv=Q&PP{u7ia0{=Uj)kaNgHjhXw7MkPyq)i#=2{ zve}`*R9RbDMMY*t4f`F?)IS$8W+wlJ7}C}@txmU*%B=0EZAryP ze~%{0s+1KK_kum%B=m4BoaFU_+n*^#UToPZ{MsXWDb4n4c|+S!z<+yhE-&RyGae{) z8&6ezD}gM+D&!%mEPO%Y>-*h<%_A>AKdHJ)f8fVmXCng<>M6Zz8jcr$D(23-!#bYg z=sS5R^M!N$o;9`4cLo8z>!L3|*VAHyplk^OKG_$=PI0-UNb67*MC5X=C@J~AisnX1 zA!yDP?e7`BOjyg=O;Z)w)I=cc(|^@{END3=5b+^1`RqT}Vp~N`wegYN9ZKz1%TCih z$O8BJRVKko{ar~u)K!3tRU|-^Rpc%3yvHAViB7aDVX8}~YHt?J1FLl`6#5TU`k$Ne zFlK?Co*p>PveVKc6@KkvdQrgj=XGrG%cIGoKsW zGxKeF`^4^#qMHsjStY5;sV9e17#|dVa%jd5%Lje`xVaEoH437m?XU4IHBFs{*~qy= zFbrr@nc>F5I?--*6sfJ%=dP36iP72~kq@HY!ftk7>_DYWM5J#SJ|0_}`iQ9^8^dZ!V zAl0)W183=L9*?B4{M@f`B-`r1=rkTEQ|#RpUwdEgd(kH0eo~PA4ZE0%w<%DUZmL$h z*?>Y58LZEthd9^nyRL|V)D&=eb!9elcgALGSqAui7ILLf3y~%gcp)4*w&77STyA6S z1w@!$%B4fsai6C<6$p9QA|>KJ26)1(GD@=3ccd*u@Rxgsh{N+{ctJKFozUw_v4zuq z12VA=wG$7(_d<8a^V-J3pfEnS{F)+U%U4X38E|nX$NMbOt=U4x_M3R+ zkRj2ld8YU12c>zE*cOzmT@h<%o+^sX2IvL9#2{OGVwyCU_Tbh!+Zo?tO#W{9fGlY* zufpkNa(XAByK%o&VrnPiigU={boV^{|DJ3uuv)DXtF<0;R70RJPZ*>Yg+|6PUAe4h ztoJwoi@r)s=KUe>dFnnm(7A@TpY2(u38%UMh>>?bqh=>=RxL0Y&P3L8jK+?sFlQ) zHZ2@(GZjw^HVrw|phWbvcuf=g*LS+_laIHyjqRV&O7!HM8o^uY)9Kw1^T_0H$#8>u zI0B?~UM=TYN9_ImXS)wce7F`FAm08Q7uTi?(313gW|Jk>aP-t>buBlxbW)n;a3yG8 z3#V#r9h6y{ChgG%c%MjI2=uK_-G*|@!L*ZBV zpJf(cLKpH5c~cwexL)nPn@3A#S9Qwx_;}}4U@=Ka96%;v<+?p>v(Gafa*Sn8;(Mow z$!{qrt$8w%#_H}nha~TN1!iDiU|MSM@$tFnU-vmSO6=dzn(@%T;`b77xIC~Ysmgqi zIxk4M*bN&ACRoRu!(PR)matFz_h-!3BS*0IEl76n{)ynXM zhJqqVlTkZ39p7PGL12LThm75Td5a89HG-f0@hm?l21f5em*g)s|(D2Qf(*t#B0$`T(EcLql>4|kI zYw^sLPbas%{fMs)$O2Wr*wFBDSS*2SJD;Yvam023+R4T?vLC-$?ukx!cKUZyU$Unv z_2sgbYV&Cv(1?}C$qc&zUAYtw$tiE(5a9CbL1)%rE&ls-i6;+c)#FvwEZ#rX9uq_p zbhF;S_B$0KQ@)0nkCO|dG)F`^`u*j&!{hI6aUlr7b{dhbb+3`i$5+0AnEM7crVF*? zXWO0%(N)JE)XA%u#0;j&%qJQCcYOIYQaOOS9EIxz%ECfggH0-s_K+(WR=kIim1BLJ z5N^W8-y^!3K_zer83ZUbE1L)jb`9JsDykFrOroh1nzfNnwopP z2<&;%k|P@@lM?=4*+FNXy+0?}?5UjDBG)Y^K2TDwa^79|H1AjGTCQ+ROPTXybUZ25 z9xMd^&~e;;W_7QVF+p}|&T$uWax2pXg2D_e&FAq(UMWXM#?wsxjBxVwBcA;jfCLk8 zCsNYS?p$%A2k$P|U7!kT(^#PsRq@6VoEI?LtLf>D3SM>nQhpQkw4Jme<@a92Z*u#L zfFOwv^o9S(OABgI)rR1D&3VG+!kO%&BLAnVI(CP;#O6HCG^p$wL4p55-GF`)1KGnv ziFHXs8ca!ax!hwX7+;S`ak&{>ZaX847kOn6_Ey|kSlXncx=N~~$fJLFkQCeP?fouI zBu%*wNo7ZU;i}Oo4+qE}&NDFUp`a0QlVZldY5vpJE?n5P4J(nxKt-Kd#+FqD#1C@o zzjhRpA2W5#VSWxS1Bt(K?e+=))-nn$p~X2bqV8w>KV~eijCyHt@l%mvQBhOGJm4P? z2G)7J;&hZZ$Ox>6jZu$KJJ39*3@})jnfJ%4{lE7z$4>*w4g;?f;bQr%loWMfAbPF$ zj95Nq{jhKcFk#r5S}ttW>RJQwX+AP$C0xol8 zDydyA4IGM9MPH0!>e{^X?J>f}<4|!7DQC1nDd^#4%%R>4Dw1c$qN{4avNxmKkX&51 zj7mbiAw;WJt*rXDdI&bpogPq202J8TWInAWP%UipUR#Wp1jUeZM?^&2{uFhY#HqeI zxl46P4#!~n*9)3Bxp1veXus(OTKbA-I&BDZtANB|8mJA%I~_PQSqN&}!93UA!HOTa zR8>?4qf$t;Yn`c#R=@IkL%xKeolgAv+JU_E@k*cm9&Rx|^!h-@G;~pL|}QmlV46t9$TLyT_gaEr4p1&In%n0r<`d}qK6u0eqx}I};B7Qi}o`uKAi~K@0*3wKA5Fje3b;vK1 zxQ36F7Y@4;IE_UO_jqS?6BV%icfpmsy16-7y_~n+a%9SOt<$g`KBog{`7{o%x~)-h z7+1o`1!YRud(sQ0@l@*0bY-Z@zkBz5xI&dfG)Kqgv-rK$^-xAz8v*F}De0oGkt&b3 zqy@qp&e#Q|P~P1id#iqym8Td~Q~!@}bP&Ke7s`=DU1A0yqI}5bqL6S*L%$1J90%g6 z9d^Zk0sTA?biC{pK_-Y%2h^K#a-+77XfzdXhd3&#e_^AoYl4Q&-1T9&#T*d7et6xVZs#?SN!<|0` z^QP>29yK*B$B_&Miegg0?2p$<`O0TD82R)Jt#aPp_y9>FGc`;p zEF66uBmdoEKPgl9S6M=FbHTiZxevSwKb|?h|Uqvqltf}t@i!SfQ%)&MYkNc#jln&wdx)1r)6P{ zYTol<)9M5e$YOx%4;>R%I;22rFqW*>t|<<`b#R9Jx$1{DWM~eTZe$|cxL{b_OA9M3&5M^;J2i)tR>pjYVb-xJAjrYH&E%F%WEXvk704Sx;C5M2&>!8o5+(j0D+8# zrLIjJz=@i`C5|1prYtjj@Q3@@o_bRq5HJM<^5uh>)qmY?&*s0od4-nUrd9{ReR^~o`X4<=@*YI*4=*Xf`G=-w1T78!J`Q2dHe9y1T;|QYn z{kuh;6A@9BTUAynE-`&Em+2qGa*%n3>{xKZ8M>ZX(P+gC({*J6AZ3 ziV~f{1!S4TJBcVg&ISe%L&Rsr5rlyIIU#?8CVeWGc^o{Ny&2_PC+O}UW)t+Kcrwij zb-@2%nLRSv;g501Dwaq*?`t*r`~<`Wqt!5HTHs#&Q+ba{KOef10Oi!)t@13$CT4MM z#2yAk0@1KTXE4Smhfeui&)H`Su&YuYpx0=!yIwHtEL4(aF$_8j z5+syHB2ysmp!ko$%$UISd_WXjbP}T7$RS6 zuUXUTs(`uZJqL90Y?Z}Annh~FscAZs(3Oq zfi}LZYA+yd8-MB_bgkuM>H4*NIO@4z1gFd*c`CuDa{yxq%lf(HS6SIlz_q6)^~1S1 zN}a;c4ym~8pC*Heb@Q2>%S)fO(Zmq%>CW?#P#GA@o1q&70IW)vqSc>D=;;U@wACY0MKszr*-TMJp?*&>+CP|=;SKx zLZ2m1-|=Nm!_t}x5Q?P(@$od^+)U%GL6QpeIt1|7$gyiRPECWU%jho6z#cpKegokQ zPB2C9KYhR?D_u+NKkVmaYU_7-?43X4jX8oj9X0ZTOGgUw8(Iw<%6>iVwW$+lz*9+G z69~L|O>O)Jq_8&T;mip+>n=6E8wsWlNUEq-wc^t-zh~|@A6gTQ#Z~R>|BLR1S$u8J z9!tw)UE(D~yOxQ>+1Rmm0MbOdz>5{Pt_@?*hD>4`?j(yV)wu(16q$m&o@RCGKh>qH zK(=D+=x8fbL)aM<+6QO}SFTqYe-#wO(9h+lK}UQ{%dC@|F(*k|GfVqig{EK&3H;Bu z@5cSN%*x6`<&Q!M1*VNbr z5Kz3E%yn~!qxs_Vt1BrQ$k1AizHmT41psxbH+_EX9sIr!u3{x!k==i7rAVB9N*G-g zEwx^VV9tMSA+$>)U?fd^fo_IhXoQGJ)pRy@1yQ4uT@qg9NPV?-n z^PAbEzHk4O=H>)zj9}*A)%pRqK|aV)i5=Q z(9oDEbX-|+x9t}Ug9$yb1k#m)W#8lGx_WM#pzqpyC$M%se!CE-+vL%(Tn9kc$ON8< zg9;uHPOMNgbAR&|Al(zHQnY@gAvn76_Sb2PWo$u+A?3%UaHthkT&f~_fYcADsdER! z74#Sth(EDC-ks(3GZ{xkRXIPAxm0F=U?ohPcs5P67pA<<5swm|XooamIZn;u{> zfVE-ufW_{@m=IBdEY1T+cizDU&1I9= zfF1rl!9-Q^OgmNN9U^BYqr<$Sk@oOFb1gIAEd;qqNK9(4(0phzUF7RQPIOwu?-CiO z&U1l(4-f|s`l(Gke@yo@K$)?dEB1E$p5oa}u9@&zbk-p0hjVmWP@9(XA|QyJbsAO< z#uz@RLq>~X0U9)_E&TL`eh2~{g2j?!ttu@w`&*{?-AvyYP=^8v5`(LMLKRX$e~p9W zR6q}0cpYr=bpF|Yb>m}GdV_K};4zW;C1s$%p zym06K0c3t>0X6N>jU^=^U*UYP@fNga>Z5^sn5}}Gl~}&T6eEMjX%!H7=3qDX!VQ!G z&2*<>^LtiS*7w(E7dG|7!&PM3b+%-op)~ksfU2sup>%g3S6gL}%tM4mxJ3dlhru-v zZA)0e57L)xV9Q3h+-fIUzGRyRa4~?WM7((Jo2G?PpVZixGtg&j{=0|Ofa+l5RDtJm z$xtv%O5jeY~4h1^M|=pMrfr$%K8$1t zda(k7Wb!h#k+b0JB?mV9jo4~{{vQzDV)MjR{|SO4x`iIEOI^)31S3<;wDDzu#+L#9k~9W0>O?9_JW^_bQv6MhbH##y;}guQyZkZuOiF-V_J)2O?t1?dx0Tc@31y34H_IyS9%j~TS#E3Xs%7#LSG|o><6s7QNxd?f zo8!L8)_no{_b%@ZD0KVs9aPr9x~4 zb{2r^kJ*az3$K)nn8zKmxk+-vrsZV4&3+$lu=q6gZzix+N7N5qM~8%i=2ZcQ;a zVTzLe#&;o3WhT?Ow3f^1{0-66%SMIym#o$A^12t*rrEi>cMqSaT_aD0zk9mS5Fr3F zRo{B!jt^Pog|{T?3!wY^?%xgw7L@Bz>ng6i!F3)QtP4%bH%zTzsGjLzk}R$IBJr?v zbGCZ4B)ehnh5P1a#%R`?Q|q?}pJc2f86FZi23(Y5BoJ#9E1qMoP5iyNP6b=MDtuKs z-x2lM24$HIdnnKxqFo%_rQzrDey!l@vfxh7^lB4+`Ei!q{L{v-?_C=GXQ~U)uGsiH zQkJ=nS&O#|Yu{XU(p|aNxj4}|*4cA&#kV=yS24pG&Xq|;_x!WQ zXBuP_%7#QsXB3PcV`Ny~GQ4n>(IgovroOW}NhOi@i;k;^i33_ix+!uQ;vK#G*f)W2p%k zdEui9GPNHvj;)2WOz_SY?>*YACrf;&r{t4dc5a?^Q4sXG`|Q)AcCNWkj^*@Qjq#eC zoU4k6f)0x_4)r{@iKf*%MpxNx<@rC=R~=BA)_~q`+NA`{?LGghF3fm;d8@|j4L;E| zI)#Y3VqEWABYDG*^QNLK14{B$5pR1EHuAgaQMZa$DY5Ux8kO7R3wZ-Ska6k9cNZ%W zi&824 z!g^BPJscHMHe=W}H>QCBubSv4cmDa7!kEq_*t7W1t}UDSFNZ`#EBIjMfzqBQ^&{Pw zW7a$^0=yy-R#-zOC2zK=dhYzViFc!hOx32y#G_x6#EW*)rg`li#=;i@-KMRxD^O&hM{@Vv&tL#*EuB%H$}u$dwf1PHaEYb9T>t z!Ef+$$L)FXK8;JOk+(peD7q2_{^d3g}jo} zt-^ZA*o4G zx~z!h$dg2^jyQACZ>WskdBYL7+ZlC53Cb*_KRU_w+7MZi@@^;W z%=NKCU#!=*2}N8f!Rw2w_azIg?ov@YtuB19?xgk+<91fD4B-mz+?gWpFYV5oN?-_d0r^VX^^4ciK(8;6$lYBR2lfWnP~KYX;0#I^d+IA+p3yvP zv%NN#>onFYx9VLST_k&umj`q1H@UDejbLc(9^VDA6qz@XN!LD)n-E3aj%6lK6KKzL zmb!=5Sb-}5Sc$rdsD$L`d*Grs5%rh~b$73y#KGC!UcT#u_g`NW8sr2V(PS~~JB)O= z8zZ_%52<0=FjJ&Cboma0T6Np~G;%!P&7BdoibEWI{e=@mVc`!%vo_ikYazjEWi#v6 zLLc!%6lg)%(wUWogjxR!;m^82h+YA!iD|;1)Oy0yQRngy&nWS7=%d>M+~5a};cJS+ zqn0VNa>KXgy4TZZ!0oq!*5G>t^}3tNzI=s64F*Rqf=meF{hQa&s?P;Jh{i-AVi`}J z)d}pnIZ& z<+9Sn1!2O{G1@n(@1FV(h_+c6?0$iY4cw%U)BQ>Bw!qh;B#3H^E$qJbgwg@-JH(&P zRcU^8yK1Xg`tWu!&uQZn(a%35;DtbX!sxhj=RB>|om^4$>qB#HoqV|!O$7=7SQ?Ey zGIb)qS&ES-UEE08Ot_IB;35%a(6fhJmA1!}KXsVt9&RpNw7w|L=^J{9EHUXA zq$`{tyvQKj#*tXt4r?f>(z|VUImcVh=aR+)d56xb>nQxlcL8;awS4m-u|x@d@Pp>s z*K~KkY3E072EVb1a$B$#WPJ_2YLMaCnK1nD{#$O24D%&(S-bd4XHC&Y-?)3QlH0w{ z`6WK9#k;-!th5SX>n2=fyEc&4=@8ljtxY~nF{_-mgwvX)M6>f-hkV-2BL<~^rOov; zQir75YN<0210Uswjy#Ym1$bR6dv&bZQ|wE2io^QC)gR|c-8Y}@@W{76`;s~FhHt%- z6ktr+V=vi}3;3$;@cl}gfwoe%#4f$@GIx_$=XPHL{i`0AjWtx)O7JCEVaE@Y(K^=H zU-Daf-r9_71L$b?>kvjWm7?K+`>U5ixZ~J~TSa-$9vYu7&GV8Lk!_%*zV4BVrm^yx z8tm!=XO9q0*b1HCnhl^>OS3@Vu&sA|KEEPAsJTbnU;Gx9r8GIh$f>FkVkV$n+lDd4 zocictDxMznb#~cQ*gPSAn=hOuGUWKkm~M`g)?stHBTRPOcR2lXtiyFtJa@yC9-AmW zkR%z;jJ2v7`u10B@hJOoy-V{Qd77!~nY`;Y_b`eKW$w9$dybtPQ@`PgooU~an%2|7 zvsgi#_sn!PF`r$Il!)%Qx~^;MO8Nvi2e2{zkUNR}QH(_~yDDry=GbLBUbQnN(|Jec zmEX5M{af5G9M3iS01NJ?*Y#ApOLjCfpdJTDIz(vQD%P{NsZ)1ZpL;YhRvQ4ZD_0=2!o({k_n)`aB+*hhD^f%)P(v+n~ASV9Qvk_ah|P&!<~h%6Tcg)+*#&9cSHb@kcf)WlB}0 zm5Bk8@=4K8Osr|eBm}x0qPfL!+>>sSFLU`#aG^K0Z@zqILE7`U{yuRlJ$|?w{3Xkb zu_L3^L!!83gmZ3}<4mpxdnzW3j9ro6siSji_QPNt|)N-JV-E4>+yEi-4tEltc z8Lv6o=Lecz=xrFe`J+%tmNe)Hno^!gVEvxDJSx=evcNv`#J>Z zMJ+zCncuwQ#MtEHy$ugKr6s^{5%AOy>Dk>fUP5TnWV9VtumyMr`=?&8yMnAYm+J#+)@@HNH^Z$1BEa8b>R4KLke;)NHxRpLCyyPbbh zQ!) zt+%Jb7L|cn)w%b9SsPwznfHsL7L90aa?iD%1n1buMdoeT3CgdN*B!G4sw65@Q8e67 zoow7su)e#&sHQQ#lAdN|7s?|WeeLywh&9cufx*zZwWr_Ioc1EB1KGb;iyAR-ma!Vh zj@={FGMCt--1t~wmU7KK7tqPo7o_L+%x+z#u2@+8&=C%S;v-iZyN6P@m+{Kqlq6n! z7esYTu;tk*Y_J{v$&3m-(|o+|Aw2*<6N=H%F@x&p{BasVJ%h;fPgFN-*5Ye*vd9FV)UGwBr^a|^TLzaaDDScd!=ahbSa_ok-!)}oN;%F?5y!9v?K9~UR{ zK8uL%0mZ8#*Cw9`t}LrBkJFqlX_0@3JN}wHdO`Ff;%uErxFfqRTcCJMN4KoAs5s-q znpZr)X$7Iy_49ppu5pho3qxd!TsH{!(d*+&*y!XlQ$Dz!t*C~WfZ|+mOZ;VPwScM1 z1l!45>~eQ9PRAXK4&%16OXq^cQi7F>+#oZ|yz!TM?K7**!xWZZI-Tg9>oUIlKqc@n zcR2&2$Z^Z^AP#Jc>j3mo!o43);u|M6jHk^zs%iA&d{c6?y?;zzU#+v3)YO<24V%*X z7Cq(1LYw1o*U>9;1=(Jh4QO(iG{Wz8DO}l2{_18CEkH9i`n=W4!eTS9i~sJ*%LLeP zYOs8mp8!QO7vD)+|5)o&(V#t2@By1v##5tl0DZ)Bv!IGWzwxoYkZ#F54E1!#26h30#N%Y(C_Dl!L%|WKr$+#QnkIz+N4lfQLI|`A#zS3XrLIv# z2!m1=u~vYAU<4hsE5`6D5p8kR#1eVc9jSs6(bQm4qd=$xI5Zh9M8RP_NDzv;$N?{e zTHdb)iU=J*$nNSQHZU_G9Xt^&BrhW`1CrLGV7z5TG?;|ch$v@>xvu_i3hJA>h%1>) zfB=C$K0Y!&ax!?L3lOZLq5=fT0%c{TsR(J3uLl`Uk@g^+-lzD*p^GLVi5LPIgZB{H z=Y%8hUSxF<5o){8AO7J8Fxa2;9;DwYQ1t*(-~=F81_Z?6fPc3jk@dW(B)=W{UoA+M z)I&C)Ihus`A|lax-e?c<>AzE;kbl|}yolI?a8O7f8jHqJp(JXr;D2;!0EL_S70t$pgfK*hZQ3?ozv^*FkD~&)YI7=(3z*XcFK}Z!PxXRzCpdKVL+yjZ; zr=pU}V5mIKAcQ;!3`R=JqLjhX^3GsoX%!F(ER8}Sl&D{M6%bthZxp6P3^gm^*uQ(V zPlcjVq2!x0tH8-4yaH_h(4Z(gHwkSgM+)E zfdmhigNA*_23-|`^6h17lxiXnzXMfmP#{O_E%Kzsgr`!xlyn1d!Ep@X!Az>&W?A;Gt8AGufYFh*MD;TD+T@)_`mG>|0WmHUmG5@2lZEw4|O}U{iR5Y zx)q{B7#rwPpFaTrgVFdTYKf6xXiK90+s?Uv(Eu_sPf#oA$xxUc{pUj*G_*n?b9T0P_aeCIA2c literal 0 HcmV?d00001 diff --git a/xml_converter/integration_tests/test_cases/texture/output_proto/texture_one.png b/xml_converter/integration_tests/test_cases/texture/output_proto/texture_one.png new file mode 100644 index 0000000000000000000000000000000000000000..5b7d11285e8f0343fabbd63aef707b59b4f7b5de GIT binary patch literal 6530 zcmeHMc{tSD{~wVxdu1t1qwKRU7$mzPyJXjF7-6QFk)>q0wp)@)$`*<&Awsz%d)7jw zLb8<*KegA8o=QDFY=e*vp_j$k0`<&-}p84I@+DuqbRuBXN z2@}kX?SWq*;1T5K1-?o1dA|W|xiCj(wmmTz%wW>JY5r6&JCs2MQ$uLpAW+CqsY}4o z8L-G&ubQ_2@2;5CmWvP4Etlzb?$iLsIX)E zK%YL&_wKzL!Q38_XWdd5s2fr5WfL9_irwHEqSE@+<}UU<4ZZVDf5bMN_7O5jZV+a! z>j>S^l#x=+H#sYET+)L#If9uJC)pgloACOT>Hd>*#tS!jL_%K{+`iZhVLANOVy)0$ zn>CVK{Z_bIr;1ry+n05|dw5}dN$e9+ZFp(U`@s_4QsKsV`I)Ne2P`L z+&#)nMpA2f`$XUO>e zyEHlSfCUW%X>g9py2dpNp+=ZlZrY-JAV&)~oAxjRdc@{>JO8m;C)0e4pKe7uw?b_i zS}HX!g{rhp-*s08m8uI?C#G_UF|x+8b|*l5GfgPWpfJ(tDov~Fb^v6CWF zB5{2&Nr{s(FuN%%$UUY==AQAUP5Yn{?GmB{0x3pO9ps0Q<4VDcCG^mmJ5qiZEHCOT zxCfO8e%dNZkthpwxF@x<*zzFS_P&ZU?iPtO@OWs4pHxZq3!9wn@W&5L zyL7sC_|>Q}cR*@0%gMZr_8sC0r;I>`%I&j-$k#7Bw7uh%j5jMwcP0%cCP|C+s4LwH zX@TWQ+L^t}W(b|rA4~N#foZXAARlCIn-yA(#@#cWO*9OCYml&ai>+JneaB9oGK(*N z)g+DA)Xl$LILKFgDu^q1A69aA?WxW+$eHE=DfcZPeT){@>G-Ah-_T0hEvLQFPUj>C7TR?E|%>5RD25QbhVCH zl?NgyYl8dL-4gRtx5dj=D%Mx{r*@S^)J2bN!Y(1BzD50Cc%`Kz#kLd%w ze>?g(ZJdio{#BszOq4^cdWCJxmSOKr9gZ4emn3Y{e{JxhrRgFK8Zj!|M6w#Nl^h?Qxm;&=^JNaeoK zu{R6MlW*qZ4`olqZYFv#jNgbkl_dClY^*p>d;ljbBt^^(3kF>$;GYP#B#SQ?Hj8|y z71K)Lo%eD)KYxJxR#KG4;T9W@5%q+&x6-M%QfKd7@BFK+ygs7ZEmzJ+{oEg4lI=WJ zP8wuY^zln6X#_?h8q1kOg;Be2@^uNkzvfo=SMZ1VqiA~O_Cej#?ul}K$MXCAo{99% z8!gM^;0<|*X3`x=uWF^LKz-5tMzb};uD?Kr&2eE z4{UG33H)KGTJNeJ9WK7#Qy#7`;cX_oiZ;o)GVi)`cJ`im2i8d~c4=Qpkm3BX-LvL_ zl6l#ZI}&A4CvV1s>@(N)XKlawr1X9%yoXN(Y_?q~FV{&`)$ow|lB~hD^!T7)1R=pE$DgrH+;30n<%M|nD$()C<;-{|Ab1p@vK&-$6r zt$gk$w?XAS*RymY(&y!D&b33Mo~nr@2u>9mm`I@#N(vIa{hOS|hVsqPD*wEaUsx7dy(g72^I?%WI*!gi)Xr_c`IE4O_L(oRy>o=v8s?%d_`t_!>~mee zEhITf6(zq3R9@fp+#xSF{*;`~_RR>ki}Uxt~q+!mJCL4;n6&SjWz>r)9DP zy#y|-*2<4}=qMDsj`6%S%4fp4OBUi&+pl0mdRKdotH}B6tQq;_(4{7sy}w1& z(M%;iwjc3!)A>J!4R9$vdNZ&GK9}Rp4K1Iad5CKWRw`>Rdu|*0lwtLy!0?U|93{R- zC9~gcOB&9+LQIhrqW3$ZqDfk(RByy!M|IIY*Wl{MYFAUe>YO*3t#X|`eRONe{f8pz zmmx6d5gMIAOgicAxpE~kg`N{vEsa)lGx5gT{aMslF#38>#j6_YSt)Yx9hhRzGW?v~8^NjUf*v~_hTfFm_`)e zwlu==Q_jy|AN})egeE+kf(EY!T%YzHNW~o+ z&1?xg;CMILd6*e~R?oa;-_ABKhkVF31DymdN};urv58!@ph=;aU#yede%P8=I%c;j zEGhbMQ`4EY;@?hHmWh-_gFkXj%#P(vL-u@ut5zi}jMXU2z0-U5g3GY96>~jcYae@f z|DFkwQXM4DQ`}fIQZ=!o2j#s-RbX@>=nTkfj-=bY{yh7t<$aee{0Xh-9z?)I&_t)z z@Yo%jokSCtJ$seqac`nq&$u7dJu&Ida2ZPzM`xugCW)Pj-R|UiX`9vQkZ7%9Km02p znKK6-xMfz`$70`gdPzTc({1TqpdHDxy_{bFvemIXO2WU@cYsild}XcXOvC7s8F%cfk99M7Q4IdXeZHmJ#G%!2;88++*U z`S*Sfr{uXth8x?092}N`k}+qlGudkJLNq4!xO|BIReIN^`rG?n7e93)D-?+CORu$f z0pg2qw2iv?^!SUB{-NOpAKA4vP+kMGPMaV;1{CzNG@x*Iw%U&;(*s~c3Y|oSg#<8w z!X5RVNAl3?D#W14!(#*q{REIEYM{?Lx zzgJK<1P>4dP}xLqNPvGJ3m>8f+2F+kZB92F0^WeI59>jkt!%+YbS4#yfni_>s7VOz zCmszK!9=Z_xS}dtgQZ~4`h8)0nh^;LS(>^ zFa$gx0RE!|i*0fgAo(_-|7yW<1nxg@dn$__#3WNqj#2~Jia%0N$bZ{2f|&jr;ZVqM zsy{UVfU*Fu$e&!A5v*+gw%|zMLknPRSOH@Hgk;ma{}Jn_xp77|!ufF`fcf9NKcTBqCG`OT|JlI20O6LSr?dI0Qvo zQ&W=!45NOaA_TJ7#6U8YLj{n-XaEltMZ#&3(PSu+Od>%sS{N);OPfl8Y7)^D5(Psf zVzm)JP}neOKvoj{f1DMEiULrP00u2BfJMt2gMnha(G(~Ng~ma(02UNNn@pyBqoR=U zrgUZi5m-)I0MUmEX9W6e_}~bRH?Sq>K~S)-UN?Gd{fTUEz(5bOpB5Mt@(|V~{8$2Kf)jiOOUFnaJTpB4FsRyqsmh1Hk~o5;=Ja5PXjkZ^Wb$ z*>t8Oo$jv(;Y+u|F&2}KuZLL3dNu?z+w@#D1g?QSSSjM)xv1w zw1EV`{>;vzd$WUyOsato5GfE1kU$&JfK@i6RQ(wp>`Ue7gg{}S2s9L_>4-w$vD$bb ztq>SI0s(=43mDGX)!!r5h5sK-bTIq$7oqxWfjz5Cmfb zN9jl8)!xSW>?rfb7+52J8_za0YV0k=~n#p!5z>r3n^9 zDT)YU!9tUErHOzjf&%ge^m@JXy?^e^_x`(?IXUO-{j6uL_3X9xWKE*XO%3_D#kfHr z5Fg$MXTiMlFfVRScILO!LO}=!#4G1duwhsbeZgKdstefz05i^b0bsz7>;eM$^;cYV z_Zh_O2;HFXs%5>%x?-~N3}y-uRK` zt0l3M5#K*XDE6$q1M*yR-9*?-Cs0Sv%SDfVzkg7;?%{KS@pm7d^Ft3OzYp-W-*{l% zFx8F#KT`r;_!msBghz=vP*>S6pF>#kV8WQ^0X?03p_Br_}-=;L$BS3M4J4Dwa@m{ z^kntvUkWXIQG2ZcnuU5GnB`Qm(_i+Xb5?i)T(R46H5zjRpdQPc?-`?bYj9 zd1V_BTw^R4q`BtX>9J4ez^1SI85#E}4|C`tnfQThBYo%5U|{_4+XEZp_tvQn@|%CBA?A zd*69j&V*!di%uu|gl}(S+NXh?Z>Mm4C=idSR-|i4VBn7MzGHWc;D7Mema*69ZZ{|; zsx?Wm2iKf?`eFDwebk^gaaDToL<)an*s%VSJq!oj+}S~GJ<9PtVjR^6c)G7y%dFmz zgeHr8d!ikGI`g2>(CSoWDo^v-wK8FRr{ddCT!82hsn_%L+V1-F*GT+S>IXI3Fu4MVd>5zS(Egy|~79VA=b+(p_L!yD-u)%3mrk;{8_x z&iU0F7U@82iM4D`{jr1ri0zG}a9xS}@8f0_S0Kydx3$$(kCu{<>F=*zlTkc_H1 zvpAmQ_e&g>gQ&)X*<)GvgF5y)&utJB zX*VxI?xwJYsZhY(ti~>b`MtBbKvZ|$CE)3)NnY3H%(a>7dp#+3B0LijV)Z5&GXf#) zyfQYVz4afeoiydlAUpLB-;1r`Y>P{I(Wb5J*r~$xN<-(BVrr&%+N~-*r^(cP{vZ*d z&@feVxd&`~+PziMDf4_jJ&#KEEgTYW9IrHoeLtRJaj9eJ?9)Hs4hGR#Y}V->Pm=^3 zT4~N3FI{Gy$q5o=E@p=+`Mddm1fm`UtcpK&Se98MD4WYK>MaJk<1&lG3c8NoA4Sy% zOvM=P+=q~^EDGy8LUD3T#V>sq7(Ure)8BY-2f2SjTQdFl$fIjlQ#X<_@GdFQuj@=m`y5Q%jYw8WIL;(y&dhrx!t-7uM0AKHhRoNY@YEk74|spnt8M>MB=+EqoAje_nfxN* z!?)ATn_4^9F@@`ED<5!JmnI3H=juLriR_t4Shr7|ng3E!^y~}wqv2X0EtT$b{@qjnImb`N zid8iUQK0I2a&M(}*V~2Q*nm^b2bbvHFGSz;g-`-9p;HI$i>})AKG8jJXaR?pS9J?^ z!MW=5h@E{JqkJ5qnAgL4YvgXHbMM}r9=bL@F(dW#*^BH{eFti8nwT;!gmx<00e2&= z|CPs40>oRjTi22_WK{J&4N)vnSKlXPAQlJdaL4W4wQpT_E&I9bi#^)qJG@s`OS|$% z*G`VE_EK1Vt+M(#;&rmqxYG>d40%mZDi7;qT9R}o2+`6t8EI5vx&V;dWiIn_w4VJ$ zO-F6thb8lpm59TG!y}M8@fjqZ5brHJt%J8{Jti12<1vY^`>Z3ZT@n5q$6uq}e+E*emss3k zVmoaJ4O;!gzBtD^_|WRmYQ&DwyI07sx?RI0E3o%Ia_+zKtw^GiFH`%&H?$T8`poLe zVcEO(eS--BBsqe#?fuUM=rBo5yd0MICfDqu=$lvPD>bJ5U1O4UPTAs1T&Q93YdUr5 z$92YzYuasaS}x05mcBAqI)SXZC@{&IdF9+QTx&#h0Z+$HbBydR_cITM7R@oR@ug{x zwWr?N>tAo|mvmp++6K3>!jux)R7n%YF4VUMa^5LTRitg`@U92%= zi2+YoD@HCQJxcnNN1}ce5tbf{_l(?;o07)RWmrnkBqesy=e6Gm4)baO9X5p0uaCM4|G-nC9^eOxJm z{T_BD&?eq&kwVvj&UyKsyO809hUtDbWJOuwKB`z+!s7du!n4_b*@=NIBP zbTN(%XlQFFBjsM^pTfW2FiTaM!m9_Q+J`~R&g`vAEGw9q5vq>x6nPW#;CRTWd|8*x zfx}P`=@VV8^c<&EBQ(IbNT}`TlW}ZJ@$|||jh7`A(m`cCUPsF>o1dMl%Sl{~`s4jj zPj^_oxI%)}#0_`ZbW$^~a+Oc7V^85-yO-;OBh-|&)LlaZNs{UdA;5(i+vRtK+v5&> z`h3Hwz^iX#ti--sKWIGiq02XT`BzpKrFYBeY0a~8a5)<54MUZ%dmYQhJ!#X zp=3QhbG)A3pB)3UPslib5o^?XNW9&_vJkRM=Rl-}bBU=HPJdrLw|?_2CuM;&5jgIL1e$f6zU>BjxCC#!5;W+HFm|;0Uv`6C*P_I2)5A7!sADLUg7& z0V;kJFJ^}a0%;xe^CFVm0S4F!a3y#O36QlZjZVF*o4O&A;rLn5I} z1eAWplR@-@deWsgDSmL^06K|A_F|B!p5RSRq7&7dfrUVr^WZ<@qj;H^{G#`y|5Smg z2h5M?1w*L7VH67NcMCd0--k)^Gob%!K_@U9VVDI#r+U*!fW8ml$&mh?!kP5T-piZj zv6YT92?lro6eg6;^osbKOGCVg`7eu230%n(uPrO4*ndMZ$S!}0^|#nIXSUM$JrJh( zFW$eQ|IB?0%tV=(U~p8D_hxu_92TRx+YYU z2q!{S)zL^zK!b=NBAtGt!h6ygL{Ad1NyQ{rAv1a40MSWR0|20EB(w$;tqGu^nkXk# zs0I;0s;QyjE^t-V-zdyzWM)+oJ${dBlggP%rG_SII%_xsP$FEz35s?`I6;XnY6vI^ z4oAZ^HB{9QF3ww2&LoThl|~^lmy=8(x&kmSPuH!9O~Elb=6EawsRI9N#N30(aA6u? zAxFrb-hO{g5Xcn3l0n>56QPcPt0Pfr8fs`H3XW3$3uFb*=*&vo_Q)$Xioj@K)Jkh@>A*=tLjjhXzc$A5$bZqNgjs+}}S7>d$fVe_1RPN(1Et*HDAP z;Ybt|t)Z$8C8AXkP$U|GaCQOI5hzXMRvN$9=~NenFOdf5xH2jU6roN)A~0|S2FY}Y#=zka*w2Jvo4fkYjJ06@M-#0rz;DL@)9%L@ z^LSyNR} z>;FwI?!Ouyz?1na$d}p9z?XLa?cf)BT+JQDi6NNPCJKpxX1sWJ#}uPRH=X14O>vdFj=}!{ Dw)l`f literal 0 HcmV?d00001 diff --git a/xml_converter/integration_tests/test_cases/texture/output_xml/my_texture.png b/xml_converter/integration_tests/test_cases/texture/output_xml/my_texture.png deleted file mode 100644 index 56c45ea1f83feb7fa9ecdffe6a7c6396594a4dce..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5881 zcmV zaB^>EX>4U6ba`-PAZ2)IW&i+q+U=TIavVF7MgOsiUIJ!!EC-`m?Vy+6#}SznB~tbD zs`{g?tw@QPjEunG!yO{%_J9B5xc}m-BvqG-Xl=E6zH-YgcHXFezS{j6e7-;LR~@g< z!q3Ou#|M!^iP!Y}D*bhS=Xm*X!F!G{em?H>^-0v%K(7zp116g}@@9QrB*)`(Jml9v zZNHY>R6Z|t#OHOsPP|Kb{ZDd-{uso5cb^YrAxf)oR*G?_ko^6r&kB6cj6SB!Y`?FXTJAN(8Q zPZOt)6~&)FSS6${+j;#zXX!cn*p@LukB<6C|A zljJNv{os3s79vw07jjskhZFXFonf-X9Cs96W1KPFW11wkIMb6SzQc)27cfJ{vnOES{7#J*Y$#1{iKl||Se7kd|g(!Iah!yLKR=F(0GG{+Ii-d&p z%3HYset*Bx??2TKrAh|N4YRVr?#DC4DB(wKrJLu(d4<=fD}s~t8h{WncVRIUe-6He zR6-42Vw4bwqmrP`%45oLkbzK2Tr4u?lxlPmHQL-wA4vf z&V~Astkh7aw{j_^7AfjVE4`+gYpJzLHIVC)BukMhA}UR~Ce2#3s;Fwy-eOB&U}?2U z)7Dz=(RC*3jMX{6b7aJkMjmCO|f{1cQ@eIU{2+ z2Qn^}0SY==&b)@4qh-!==9{5hi7c{MZrlo%F;bX!h~rX5^WH~jvpAMDXR%XUxr+9HO+w ze4#@KmApene0pv*v2e))831nR9Pk!+*30n=0idIZp~EWflsaMqskH5YOd!kyDr*(e zYH{dfZWwGHRtt=!6qFfK?8t|$7&B$iPy84}j-`|t>fA`4Y<1P8^tp5w z-Lkw?_15bM7KA@4zrt)bD&2F(g&?O%M;msx_n5yKu~J24 z^fL193ZZBm1bggW$4bMMyBcezTfL^K2u%??W8Kah6g@erb@a|~^bhllqQ^_hbj9w0 zK64TB;FPgf^p*x8^eb;?@0fpioEbFzrUWP0D5xl3cafdZSkWV{_8! zAy6Lj<7D^C*`Lm(w>W!~b)g@mx0Bnv?Yqy@#z>55n%WlOhz1GZ%KNJibP5eZw~nXe z&!Tz#p|}yynLsVBPOT@Q$kXW_K5o>D(=)QPKo*H_s&y~cH+s#7#SpYsxsK3+V<*(S z5g_n+8Ja2oy3hb%-pavIOOrlL^F(HAd(27Wj-)5m0buRXW^98e8*iH9f95WoR{kLcTZlf5U0C)nh zH8Z*%rsGmgJ5KCP8_1ne={sP2ps*-LlvAOHa3QH#gdM+Ep_s^rERshRG6AY%S@mYL z47&lEsvca)GFAceQUXNY95c_V$I%stJKNl(Ax@5TXgz(96sqKQ6ZL=sJ{jt`$$u`m zr=#*;7r2ir-scx1j+tZ=UECK?Fm|?FkCSTg&yohJXgu#Rg#95%|I>kg@*2-2K9k8` zsn0zPYwQBh*bsfUOYU;S(v zf{v<{_>?_oEy(i}2->2~k;~h5j1Yzs8~;XcNun&>q3-h9D<=ooi=YZ(^DTA$(P z*k#gTclbkdBHbAtJg0i24exr%-Gm6*J8K%ya5Pze14Ma0h~@@>6Jj6Dyu0H=x_r~I?xKK-%gu)C%_3@qhD`LMDP#_UUxAAV`ym;LwQ(v5wwWiKsZJfjSTp`L0{<>2$#T{PQL5Uh{E< zo%fC5mSC3#(Gs=0Y~T zP!HW7>Jq&&$tP;Od0KM`)grbCxou8CLLw9v*pnbCbmF4h}O!lNuqY@B&37fAb;pj7p*d}#2?uZ$pm3y;)7@lEs zK^Vw2oY6|1*e>F^Zfpxchrg35!%S*@LK|GHH@3lBY`fi{LJWd1Yi69pq$2$UgNQ5U z(7cI}DMQC5(H_UNOj(i<Jjvx5+r_1sw1eGOgadBm;-+ z3@YQwjHc0S(4flK0yE5O$3{##c7*~!m!Jti)(x~XUj$X!#Bjrz4yDf<&q^CLyvT77 zFyB-By%wOiH3cXuA;8N657pxfEal}M*m)X!p-9qv+7 zlO!IR856fI0VBA;B?U_+(K3_M=#i~81P^itL&yg_o81?H6-$`g?AD3JV$*!9fuQ3B zAtlhTnPalL=4wnKc8?!OREHCbeLs})hm4Xc&^1_2!_BG0j@(p-3h~8m7|gFX47i+< zzT&M&Fp&}P%j2{!U8P@q|DV2o=_`TFn=w9_ zhKRfZLO2INew9SZ&A1EIgn%2=c-?mU3!woJqtY+{M_kb4MUji~#Q1g9mhI znyjXfu!zeRvAebg31W~#Y{9W>4WS)68$1E&5VU6a85zog(+;%PO+|41iKDnFX0Xt2 zKr10^7K?a>t#*Q2=eoi&sD2z2MY)zeGnxgH)rzgE-Df2H zw3!yloOck8uO-^kd{eZ|tl%(hOu3JO@N|A+3D~#lq9k?{qQx4?S*<#u=s^38#I#5X zzyyA!k`eLdM~Nml0NC#476=*;b*q$A>M)N98B1Jv&uS27&ujrD4?HGTAQdeOiAqKq z043OX-&WjCF_zRv4HI=b{Ur4Ruh`bw3%809K*jHN(45dVR#HK8k4H382UQitHZnG= zMks4!=$*8%=#XsTpmng@IE!G&$R@X}%{o44o872O3UUIvY9ZP!!|8CcltQqF0LAJO z@4!MwL5LXQZTzc&RYtwHG0;Z_a)$=H^loykl)zRU76Y4@(t378 zxlqCZ$%9cM-_f$;Ah#*|z%#%-kO^!@2q4(Kv;}9NN*F2xTNlmjhq*0wj~CQn_mIU( z9V;5FXX%gF?Iw0p>AlN+^q*Ox1ZYP&g$*@UGvi%s19yxYW{j{ECPsoAFjv9F(GPaB zfV%vO_EFxX$bllLlPkfmvX(bymBZL);6@y(mt|WhzMo)H5Awcxrcp=#Vvy7MR&3Fi0m*4f%kk z&2I9TGVm)R%mFJT*EZ8{xAx1nD(vVR;xl1$ynl?5l1Pr~rdvJineLx+WU7OXF$zFD zP^Lt5b$fbDJp)&nVKOurjBE-iy?;}Z=(R}6ZvmY;d}eo3+P%dQaEV`!VSv5@~ zD{k8w4RAapEeSjauTau$Hb9XA@f~`O@b`hCXlr;3^Bd5s@{*vrLMp)hcltfI1 zyEX>4Tx z0C=2zkv&MmP!xqvQ$?v25j%)DWT;LSL`5963Pq?8YK2xEOkVm2O&XFE7e~Rh;NZ_< z)xpJCR|i)?5c~mgb#YR3krMAq3N2!MaCsl+y>qzlK0v6KnPzp21DbA|sYG1NWLL$m zSA@_*6-B?yEMrcRlJH$$_XzO)F2=L`@BO)Y)ttqEfJi*c4AUmwAfDc|4bJ<-5muB{ z;&b9LlNuy`C`-Ngjg)JvC_t@Xlle$#8Fk#DPPEVta9Gstd*;* z*(ZNtIH#{HbDe4!2`pj>5=1DdqJ%PR#Aw$^v5=zkxQ~Cx^-JVZ$W;O(#{w$QAiI9> zKlnXcD?d5mC57Wa=ZoWfi~wD`K%?e3-^Y&AI01ssz?I(eSL(pbC+W487Ci#`wt(i|qi@Or1GhkE&6`{E9H$RJnr4-}0S*p<(E??!`@Flm zeQy8WY0mElL%MR5WcjsD(7jgO@hr$DSdY?PPU%oHvMSj0 zP53<*yEJF3aE$p1@_rfAKENZp_X7(E_SJPtHwN^V2!X^ z@k#*_-bb*erJDGC1ZxVbaScYbK%626gtg&u_t=}Xk8LZehsj1#1Yob;~tI$&Z%C%yZ z9lI2(?AWDPWv4%iRd(!BX0e@qDOTCBYo62WU2pW^fDh2WZSiIe@!g8`MsEXkshh@$ z$mNH>y=_+t%TOtpRSjg)<#ro|@N+lFRXF#9NfCXKH|h>Es(O|;)&PGCQjfvayXmoO z^U}8MLZr+cW~x^QECkAXzptCdJ-aDM-8753X`J_d|3P}JN;b>)&G7pH_1^D~*Xzd@ z`_*i=yDw~>=}X(Tt~j&06!>hQE}cbgh(L*m9Iw}H_{`g4WQcxeXVxRD?gy+J%&96< z-)CB|D~4H7szK-6Ziu2`@SEUnV)RvzUH`X5n6+B1{11nt1nAW&@;i+lkFE%_y!ZQX zalhTfG3NGg59vzvu<2yzvj6}9000000000000000000000000009fK52X{qEXnJy< P00000NkvXXu0mjfm(VbP diff --git a/xml_converter/integration_tests/test_cases/texture/output_xml/my_texture2.png b/xml_converter/integration_tests/test_cases/texture/output_xml/my_texture2.png deleted file mode 100644 index 21a80261d86c0235b084608c7558c247f3968707..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 13277 zcmW+-1yoy26NLgri@UaHad&HR=PT}7+}*9XOVDD4;%>#=-5r9aSa5g#*PnAjPQu%_ zyR-9V?%cUV{--4U0fiU^1_tJXtc-*T@c#Jkh4dcy9dWE947|a+h{>uU0YAP--y?v} z$c{4FE-)~0FaKV!GY`~_z?Vd>l3K2+4(6^N#?EFi9v&VnR`xb7rpAtDEDp{VnWsX; zFfbosWF@|;d1jqtd-x`+-@a{v$dM8fLWpIkQl`aNXR*FYe*MCPYNA<_23}xJ)$b~A zds4-8(_dRf)&Ge!>rENWmT z48>C>Q=&}rFDb|eLxk?|ZniHLhF3J$kuAcq}UAfgl9zFiKVjwrFR-3Cl_%z7DS;E%wjapgdt=*bp`>(#d;vSrY%Jm#M(% zgM&jQd~TfV`3CW`J~ejJCs;hnvjxtc`{(-l(4oz{Ox;+{v(5oR9I!TH4+X-Ye#5GTZDeNKFnT*?8CyoQqv7M?k@K<*e@iFqwtEoZmvW9ZhJ?^ z0sdO3({IGtR&~t7jI@&4$-X9dbEC^sC``G(aMlNUSLAdFe>BTHNdDj+L{a3Uz>lfd z`uQEcj*TxejyA0W?pSp_YipVIwfcmD-XCq2&M>2hnWj;jN%#Uw4+fdfof}}W!{zK$$# zNZw%}O-mdY9Z7cKdLj^1(x!;r32`a6a}RagDNwRaUmj&|7#R&!QAM4SZB-vms*#;r zD9|)4v0e-Es~qHnic6wT7b#+@+7m!w{&LABH~PV20Adh_*6`LwWPV1KuAI3d-nbs z{&q)97+Nqb9IRFGIqaJtokLV-DOgr13Xix=(nvfe<1$Jv&#ALhBqa3x)ok<~r{5@F zdxv@oDCC_DoBBMzu*$)yGOvP9EncJ^s=b6xa`hup`qY(U_N)|2QShHfEQm6)dXr&bm~Z#Jjya)^XZq#a&S(d{5ka;{R^s^JswGhO4(tH=r$% zIPW&+#fHs(C@m}7n@-&G=p+-d_Oc-Tvcy8h92XgVG71gw*Yh-0gflmio8@2NcLK&r zGBGTU_}oS`$v1Cc28bHk=dkHn9-nqdXFe-9usLpRA?H20o-m}kq9WT5jCJ`1CiXoc z$2xQq8u6pt-Pi!udNNXKr)LSPZOGM=FH#_<<2pT0oSR=<3Iec#-CMbl=S)x*TL04SDDFIP(e3SpshW~($S zw)pOJa4s8d`ttH3Q@LbbR#EZ81K+oApkhpHs;sQccy7<{z*PWyhYHW@kOk``@@z51 z?`f_CM{ntkRXE7e=uc9#E%21tnBGF7c(nPVhbQju?`s@qbfR}JucBp@;yzJvhBL3B zpPwnGC1it&545FzCpLigM%h=4 zj4u;^`m;H9xM%+EWch+KOUP>T_Go~nFpDo`G9gG9&+B%vQa5Q;Ffuq?`P;W|g^)zk zKs1F8nByqiRw!1el~UDbJ>^64p*osLI%iI|Ki(P@>y~%>_;~s>&{@3q*UCNeJz2t^ zOAuaEK`TBVV@KtTYoURW-R8&Zo+>EdKM_3*N>!dpr{k1}5eMrz2xkFQ?ZxY<5WUGE z`C=;iZ!7p$_{{GP<~Vb}KJoO2%x51IVEkd22=>>I!i!&MdL{BHf%#9D-JHMaG@<7k zZsLXu2RuY6W(j+IyKo~D2)S6>KUEc&ItwiQB{lPww)j!F)dn-T)LlP?4#SS5B37M; zcHcQ?Iw*z`{{184(S0S5f zu<^FN`{L1RJSJWPL03XU$1tQpVP8 zm4_J)DhHGDXbg-Sdh~kL@k+(J(}}84sVly|?Lee6JA$yU1Mnj9X!Y>t6yV4QOLQ3> zPw}YCp$qei+b1WI&MGk`Pp|?W*5UE-yh8&Rzt}8xy5OSJh1Fnyz4x2;-h@H^;?>!| zC`IpLqJ}Q4@O!Ou`IqGXZG7w> zl60nNN{H6hlwd{fRujJC|20w?BI9L1m#)0c8dn3;LQQjyUReig)o}lk@k0lp&8edQ^ z<=C21j~X2X*-GTRNF*BZ^zWH$$Nf3hT6ZuyIyqMLcN@IA}qzD3}+UTw_);red!nYlb*HUC}!Kr~IuEHOm1_TbWwyTFQasgfCsZ_n&gj)n7 zNk0nGrNw3@Q`8~-r=``~31?-yUKgLcc=A!+H)lOY*vodsJy6wxBQoxodj54(LB^4B zHLSt7%LtM5Bm4mxld7>bNG4A(M@B6Sdb&3xb9ITKCkum~DVpXw4+Tm$%ZHWNtM7AV)Q5E|)@ZhRmNn?Rq zdFr~)l0+EV5e-*oS!^?YSu0?$%h7Jr&Ovh9tL3O!H*wXOy@}j3NIz+Y|O8!-kLht&76FXj|OAQ2*#W#~H zby~&G%;iRFapDaQOQ{i)Cz)g<6a*usoEeb6sM3tVLGf(N9i>tz;7%E378yxNyiLEe zY5%CGY3R){I5!MHl^5Vv9)6|bxx^&Wu|+aO$+UGb_DJ7)?pxWsHH^a%JWSmAA07n0 zl`Ai90%XclEzvFU6GrRlUkh%P3jEp{)si(;n3`dW*yG4V<+BZxolO)#>OKID0`LOk z$}vF%#zc11NK^~t1+6CNGAuP(@HB<@xeL#9*J0e zkJ$4Z2{qG3*t@?8g`Hta{gO(m%059=suac5&A98~ zGJMlZ`6`pQ21oCl@_ad_#KFoH;F;fJv~>|)>;&!K2Ee?t$V<}s3nOEBX;o>SX8gU) z28R7y)T>|HT(Ram?KEe4Tt0-NPed6jxOn=7%4hww0~^eZs3g2+IQmjCy$y{U*DGoh zA498{ot5kn5YdZ}vr8A7Jg~C`!sg1Qg@BkyD&#BI4B-OK4}cCuX3({UJ z0r@3u(xnzvL6s!afR{6kugo$^QN~YIePY7vb*%fG?(<)spMQ!h3b9S+8jC;ur>Q$c z6skxapUbD*cAg*=Z+km?7!hGPwRnOk>9B-xkEx2vU|cY57hiVViu-Uw7%L_6I`4ee z4|p=#aey7-%GQ=fgDuf;9#yI!*Wt~3F)kR-=H(x#jmV}!`r!?v`9LI`lbB^WCBf5jRYC{$Bd zSN*0fDJx5~u)w{PrR1$$A(4F2hOP>PKF3UrkdOudLQhxsMjy{&QBY7EF(nV9RGIOP z2Ks|DgsgDoQynmg1CH;t8&CN9Yd&>UdjTLcx)e0T@%G{%X}=366iUy(#8lT8BLK;2 z$3lsglaUu3DxEvb;s?p@h1zm(x(v4`R6;C`Gq+CuNS@fPF13 z*{)t++m9@WW2Ig%Cewhgbu4`|7r(Z@EV?XJZj!`G8TjpP=7)=5JVYga#XevRHNZkAi|}6S{Y`W@94mrve4u zBG6;kli47^HB5d}MZ_H`q($6{**x6vJ27PQZak`$`~s}UxZw|Nks?v-d>riJce(vB zOjXa0XU(mB#Td$>gv-EF0+j1@wj=M-GC@m=i?x13uo~4Xy+zDE{EW94lP5@MT-jAW zF)1WXd~w-lvP0w4Uk~aFZ8sR);jfP~K!lvm-EL=Rf(e6ysGV5cZan9?MIy;!1XL&( zm|g(oAX>fFQ^uXC-Q*vBj$Duv0^~Vlr^IW8$lua(O|-hwDJhzlYiaw)H21CUhutLA zlO3mizh{OW-q>;hG6HKZ&Um$c!;-p@=>-c#e(uJ$j)Onkmu2kGNwiYcO9;&2fk9hoklIJ$>`d|Vl6h-+I#pQA=?dsuq z%*^-YL@qPSoRU2oE-i^v+&Y)~@m48cG8!i5xAf6h30f6=gmS`}2g%17Kh(9<4HmT}Mfp3GTbXC}i>sm2nyRZfH>V`BR2%tgW@1 zEt${SpJ?_c`DtxV_xI(2r09A$n>akIUfDqKb>g+N4NX41CYh}Ujea!`AZm08U5|~%C2g3vz#IR&1c0y(`Fo#A!E_czTWt(ucs7Z6SxbQ zgoNGaB##^>o&i#E2g)Wt&NVF4c7O{I(Fuv6^+>iOX2Niwzy+)6&&_kyWU9XR@rur|$WtBKyN;K3o*zYoU zCD)Wh;eDT>FAeN-W)WfoSwbuB5$<&bM?0FQ-Lr6_Bni6g2jqP z^TR=&K4Yl}HzSjiX1hhg&vi}&nN7!kORBbRhjIL>T4;y|%p1!9xS%TFSO`fLrPY=#dcBWqE zL4pUFtKj#GUOYo_xyB1e%uM>7IdjFFTt0DWO5tCR5nrv0$UTdu+um7y#`RJ$K^sf! z+^^wpnX!cQ#rtnfRkPHzIu@9XeL3xT(#Xm3VI><_!2WpXp@x?TBmhw0u!vCrFu z(xGL;)VI661EeBvCPapQ9b!-p@Iv=Q&PP{u7ia0{=Uj)kaNgHjhXw7MkPyq)i#=2{ zve}`*R9RbDMMY*t4f`F?)IS$8W+wlJ7}C}@txmU*%B=0EZAryP ze~%{0s+1KK_kum%B=m4BoaFU_+n*^#UToPZ{MsXWDb4n4c|+S!z<+yhE-&RyGae{) z8&6ezD}gM+D&!%mEPO%Y>-*h<%_A>AKdHJ)f8fVmXCng<>M6Zz8jcr$D(23-!#bYg z=sS5R^M!N$o;9`4cLo8z>!L3|*VAHyplk^OKG_$=PI0-UNb67*MC5X=C@J~AisnX1 zA!yDP?e7`BOjyg=O;Z)w)I=cc(|^@{END3=5b+^1`RqT}Vp~N`wegYN9ZKz1%TCih z$O8BJRVKko{ar~u)K!3tRU|-^Rpc%3yvHAViB7aDVX8}~YHt?J1FLl`6#5TU`k$Ne zFlK?Co*p>PveVKc6@KkvdQrgj=XGrG%cIGoKsW zGxKeF`^4^#qMHsjStY5;sV9e17#|dVa%jd5%Lje`xVaEoH437m?XU4IHBFs{*~qy= zFbrr@nc>F5I?--*6sfJ%=dP36iP72~kq@HY!ftk7>_DYWM5J#SJ|0_}`iQ9^8^dZ!V zAl0)W183=L9*?B4{M@f`B-`r1=rkTEQ|#RpUwdEgd(kH0eo~PA4ZE0%w<%DUZmL$h z*?>Y58LZEthd9^nyRL|V)D&=eb!9elcgALGSqAui7ILLf3y~%gcp)4*w&77STyA6S z1w@!$%B4fsai6C<6$p9QA|>KJ26)1(GD@=3ccd*u@Rxgsh{N+{ctJKFozUw_v4zuq z12VA=wG$7(_d<8a^V-J3pfEnS{F)+U%U4X38E|nX$NMbOt=U4x_M3R+ zkRj2ld8YU12c>zE*cOzmT@h<%o+^sX2IvL9#2{OGVwyCU_Tbh!+Zo?tO#W{9fGlY* zufpkNa(XAByK%o&VrnPiigU={boV^{|DJ3uuv)DXtF<0;R70RJPZ*>Yg+|6PUAe4h ztoJwoi@r)s=KUe>dFnnm(7A@TpY2(u38%UMh>>?bqh=>=RxL0Y&P3L8jK+?sFlQ) zHZ2@(GZjw^HVrw|phWbvcuf=g*LS+_laIHyjqRV&O7!HM8o^uY)9Kw1^T_0H$#8>u zI0B?~UM=TYN9_ImXS)wce7F`FAm08Q7uTi?(313gW|Jk>aP-t>buBlxbW)n;a3yG8 z3#V#r9h6y{ChgG%c%MjI2=uK_-G*|@!L*ZBV zpJf(cLKpH5c~cwexL)nPn@3A#S9Qwx_;}}4U@=Ka96%;v<+?p>v(Gafa*Sn8;(Mow z$!{qrt$8w%#_H}nha~TN1!iDiU|MSM@$tFnU-vmSO6=dzn(@%T;`b77xIC~Ysmgqi zIxk4M*bN&ACRoRu!(PR)matFz_h-!3BS*0IEl76n{)ynXM zhJqqVlTkZ39p7PGL12LThm75Td5a89HG-f0@hm?l21f5em*g)s|(D2Qf(*t#B0$`T(EcLql>4|kI zYw^sLPbas%{fMs)$O2Wr*wFBDSS*2SJD;Yvam023+R4T?vLC-$?ukx!cKUZyU$Unv z_2sgbYV&Cv(1?}C$qc&zUAYtw$tiE(5a9CbL1)%rE&ls-i6;+c)#FvwEZ#rX9uq_p zbhF;S_B$0KQ@)0nkCO|dG)F`^`u*j&!{hI6aUlr7b{dhbb+3`i$5+0AnEM7crVF*? zXWO0%(N)JE)XA%u#0;j&%qJQCcYOIYQaOOS9EIxz%ECfggH0-s_K+(WR=kIim1BLJ z5N^W8-y^!3K_zer83ZUbE1L)jb`9JsDykFrOroh1nzfNnwopP z2<&;%k|P@@lM?=4*+FNXy+0?}?5UjDBG)Y^K2TDwa^79|H1AjGTCQ+ROPTXybUZ25 z9xMd^&~e;;W_7QVF+p}|&T$uWax2pXg2D_e&FAq(UMWXM#?wsxjBxVwBcA;jfCLk8 zCsNYS?p$%A2k$P|U7!kT(^#PsRq@6VoEI?LtLf>D3SM>nQhpQkw4Jme<@a92Z*u#L zfFOwv^o9S(OABgI)rR1D&3VG+!kO%&BLAnVI(CP;#O6HCG^p$wL4p55-GF`)1KGnv ziFHXs8ca!ax!hwX7+;S`ak&{>ZaX847kOn6_Ey|kSlXncx=N~~$fJLFkQCeP?fouI zBu%*wNo7ZU;i}Oo4+qE}&NDFUp`a0QlVZldY5vpJE?n5P4J(nxKt-Kd#+FqD#1C@o zzjhRpA2W5#VSWxS1Bt(K?e+=))-nn$p~X2bqV8w>KV~eijCyHt@l%mvQBhOGJm4P? z2G)7J;&hZZ$Ox>6jZu$KJJ39*3@})jnfJ%4{lE7z$4>*w4g;?f;bQr%loWMfAbPF$ zj95Nq{jhKcFk#r5S}ttW>RJQwX+AP$C0xol8 zDydyA4IGM9MPH0!>e{^X?J>f}<4|!7DQC1nDd^#4%%R>4Dw1c$qN{4avNxmKkX&51 zj7mbiAw;WJt*rXDdI&bpogPq202J8TWInAWP%UipUR#Wp1jUeZM?^&2{uFhY#HqeI zxl46P4#!~n*9)3Bxp1veXus(OTKbA-I&BDZtANB|8mJA%I~_PQSqN&}!93UA!HOTa zR8>?4qf$t;Yn`c#R=@IkL%xKeolgAv+JU_E@k*cm9&Rx|^!h-@G;~pL|}QmlV46t9$TLyT_gaEr4p1&In%n0r<`d}qK6u0eqx}I};B7Qi}o`uKAi~K@0*3wKA5Fje3b;vK1 zxQ36F7Y@4;IE_UO_jqS?6BV%icfpmsy16-7y_~n+a%9SOt<$g`KBog{`7{o%x~)-h z7+1o`1!YRud(sQ0@l@*0bY-Z@zkBz5xI&dfG)Kqgv-rK$^-xAz8v*F}De0oGkt&b3 zqy@qp&e#Q|P~P1id#iqym8Td~Q~!@}bP&Ke7s`=DU1A0yqI}5bqL6S*L%$1J90%g6 z9d^Zk0sTA?biC{pK_-Y%2h^K#a-+77XfzdXhd3&#e_^AoYl4Q&-1T9&#T*d7et6xVZs#?SN!<|0` z^QP>29yK*B$B_&Miegg0?2p$<`O0TD82R)Jt#aPp_y9>FGc`;p zEF66uBmdoEKPgl9S6M=FbHTiZxevSwKb|?h|Uqvqltf}t@i!SfQ%)&MYkNc#jln&wdx)1r)6P{ zYTol<)9M5e$YOx%4;>R%I;22rFqW*>t|<<`b#R9Jx$1{DWM~eTZe$|cxL{b_OA9M3&5M^;J2i)tR>pjYVb-xJAjrYH&E%F%WEXvk704Sx;C5M2&>!8o5+(j0D+8# zrLIjJz=@i`C5|1prYtjj@Q3@@o_bRq5HJM<^5uh>)qmY?&*s0od4-nUrd9{ReR^~o`X4<=@*YI*4=*Xf`G=-w1T78!J`Q2dHe9y1T;|QYn z{kuh;6A@9BTUAynE-`&Em+2qGa*%n3>{xKZ8M>ZX(P+gC({*J6AZ3 ziV~f{1!S4TJBcVg&ISe%L&Rsr5rlyIIU#?8CVeWGc^o{Ny&2_PC+O}UW)t+Kcrwij zb-@2%nLRSv;g501Dwaq*?`t*r`~<`Wqt!5HTHs#&Q+ba{KOef10Oi!)t@13$CT4MM z#2yAk0@1KTXE4Smhfeui&)H`Su&YuYpx0=!yIwHtEL4(aF$_8j z5+syHB2ysmp!ko$%$UISd_WXjbP}T7$RS6 zuUXUTs(`uZJqL90Y?Z}Annh~FscAZs(3Oq zfi}LZYA+yd8-MB_bgkuM>H4*NIO@4z1gFd*c`CuDa{yxq%lf(HS6SIlz_q6)^~1S1 zN}a;c4ym~8pC*Heb@Q2>%S)fO(Zmq%>CW?#P#GA@o1q&70IW)vqSc>D=;;U@wACY0MKszr*-TMJp?*&>+CP|=;SKx zLZ2m1-|=Nm!_t}x5Q?P(@$od^+)U%GL6QpeIt1|7$gyiRPECWU%jho6z#cpKegokQ zPB2C9KYhR?D_u+NKkVmaYU_7-?43X4jX8oj9X0ZTOGgUw8(Iw<%6>iVwW$+lz*9+G z69~L|O>O)Jq_8&T;mip+>n=6E8wsWlNUEq-wc^t-zh~|@A6gTQ#Z~R>|BLR1S$u8J z9!tw)UE(D~yOxQ>+1Rmm0MbOdz>5{Pt_@?*hD>4`?j(yV)wu(16q$m&o@RCGKh>qH zK(=D+=x8fbL)aM<+6QO}SFTqYe-#wO(9h+lK}UQ{%dC@|F(*k|GfVqig{EK&3H;Bu z@5cSN%*x6`<&Q!M1*VNbr z5Kz3E%yn~!qxs_Vt1BrQ$k1AizHmT41psxbH+_EX9sIr!u3{x!k==i7rAVB9N*G-g zEwx^VV9tMSA+$>)U?fd^fo_IhXoQGJ)pRy@1yQ4uT@qg9NPV?-n z^PAbEzHk4O=H>)zj9}*A)%pRqK|aV)i5=Q z(9oDEbX-|+x9t}Ug9$yb1k#m)W#8lGx_WM#pzqpyC$M%se!CE-+vL%(Tn9kc$ON8< zg9;uHPOMNgbAR&|Al(zHQnY@gAvn76_Sb2PWo$u+A?3%UaHthkT&f~_fYcADsdER! z74#Sth(EDC-ks(3GZ{xkRXIPAxm0F=U?ohPcs5P67pA<<5swm|XooamIZn;u{> zfVE-ufW_{@m=IBdEY1T+cizDU&1I9= zfF1rl!9-Q^OgmNN9U^BYqr<$Sk@oOFb1gIAEd;qqNK9(4(0phzUF7RQPIOwu?-CiO z&U1l(4-f|s`l(Gke@yo@K$)?dEB1E$p5oa}u9@&zbk-p0hjVmWP@9(XA|QyJbsAO< z#uz@RLq>~X0U9)_E&TL`eh2~{g2j?!ttu@w`&*{?-AvyYP=^8v5`(LMLKRX$e~p9W zR6q}0cpYr=bpF|Yb>m}GdV_K};4zW;C1s$%p zym06K0c3t>0X6N>jU^=^U*UYP@fNga>Z5^sn5}}Gl~}&T6eEMjX%!H7=3qDX!VQ!G z&2*<>^LtiS*7w(E7dG|7!&PM3b+%-op)~ksfU2sup>%g3S6gL}%tM4mxJ3dlhru-v zZA)0e57L)xV9Q3h+-fIUzGRyRa4~?WM7((Jo2G?PpVZixGtg&j{=0|Ofa+l5RDtJm z$xtv%O5jeY~4h1^M|=pMrfr$%K8$1t zda(k7Wb!h#k+b0JB?mV9jo4~{{vQzDV)MjR{|SO4x`iIEOI^)31S3<;wDDzu#+L#9k~9W0>O?9_JW^_#=-5r9aSa5g#*PnAjPQu%_ zyR-9V?%cUV{--4U0fiU^1_tJXtc-*T@c#Jkh4dcy9dWE947|a+h{>uU0YAP--y?v} z$c{4FE-)~0FaKV!GY`~_z?Vd>l3K2+4(6^N#?EFi9v&VnR`xb7rpAtDEDp{VnWsX; zFfbosWF@|;d1jqtd-x`+-@a{v$dM8fLWpIkQl`aNXR*FYe*MCPYNA<_23}xJ)$b~A zds4-8(_dRf)&Ge!>rENWmT z48>C>Q=&}rFDb|eLxk?|ZniHLhF3J$kuAcq}UAfgl9zFiKVjwrFR-3Cl_%z7DS;E%wjapgdt=*bp`>(#d;vSrY%Jm#M(% zgM&jQd~TfV`3CW`J~ejJCs;hnvjxtc`{(-l(4oz{Ox;+{v(5oR9I!TH4+X-Ye#5GTZDeNKFnT*?8CyoQqv7M?k@K<*e@iFqwtEoZmvW9ZhJ?^ z0sdO3({IGtR&~t7jI@&4$-X9dbEC^sC``G(aMlNUSLAdFe>BTHNdDj+L{a3Uz>lfd z`uQEcj*TxejyA0W?pSp_YipVIwfcmD-XCq2&M>2hnWj;jN%#Uw4+fdfof}}W!{zK$$# zNZw%}O-mdY9Z7cKdLj^1(x!;r32`a6a}RagDNwRaUmj&|7#R&!QAM4SZB-vms*#;r zD9|)4v0e-Es~qHnic6wT7b#+@+7m!w{&LABH~PV20Adh_*6`LwWPV1KuAI3d-nbs z{&q)97+Nqb9IRFGIqaJtokLV-DOgr13Xix=(nvfe<1$Jv&#ALhBqa3x)ok<~r{5@F zdxv@oDCC_DoBBMzu*$)yGOvP9EncJ^s=b6xa`hup`qY(U_N)|2QShHfEQm6)dXr&bm~Z#Jjya)^XZq#a&S(d{5ka;{R^s^JswGhO4(tH=r$% zIPW&+#fHs(C@m}7n@-&G=p+-d_Oc-Tvcy8h92XgVG71gw*Yh-0gflmio8@2NcLK&r zGBGTU_}oS`$v1Cc28bHk=dkHn9-nqdXFe-9usLpRA?H20o-m}kq9WT5jCJ`1CiXoc z$2xQq8u6pt-Pi!udNNXKr)LSPZOGM=FH#_<<2pT0oSR=<3Iec#-CMbl=S)x*TL04SDDFIP(e3SpshW~($S zw)pOJa4s8d`ttH3Q@LbbR#EZ81K+oApkhpHs;sQccy7<{z*PWyhYHW@kOk``@@z51 z?`f_CM{ntkRXE7e=uc9#E%21tnBGF7c(nPVhbQju?`s@qbfR}JucBp@;yzJvhBL3B zpPwnGC1it&545FzCpLigM%h=4 zj4u;^`m;H9xM%+EWch+KOUP>T_Go~nFpDo`G9gG9&+B%vQa5Q;Ffuq?`P;W|g^)zk zKs1F8nByqiRw!1el~UDbJ>^64p*osLI%iI|Ki(P@>y~%>_;~s>&{@3q*UCNeJz2t^ zOAuaEK`TBVV@KtTYoURW-R8&Zo+>EdKM_3*N>!dpr{k1}5eMrz2xkFQ?ZxY<5WUGE z`C=;iZ!7p$_{{GP<~Vb}KJoO2%x51IVEkd22=>>I!i!&MdL{BHf%#9D-JHMaG@<7k zZsLXu2RuY6W(j+IyKo~D2)S6>KUEc&ItwiQB{lPww)j!F)dn-T)LlP?4#SS5B37M; zcHcQ?Iw*z`{{184(S0S5f zu<^FN`{L1RJSJWPL03XU$1tQpVP8 zm4_J)DhHGDXbg-Sdh~kL@k+(J(}}84sVly|?Lee6JA$yU1Mnj9X!Y>t6yV4QOLQ3> zPw}YCp$qei+b1WI&MGk`Pp|?W*5UE-yh8&Rzt}8xy5OSJh1Fnyz4x2;-h@H^;?>!| zC`IpLqJ}Q4@O!Ou`IqGXZG7w> zl60nNN{H6hlwd{fRujJC|20w?BI9L1m#)0c8dn3;LQQjyUReig)o}lk@k0lp&8edQ^ z<=C21j~X2X*-GTRNF*BZ^zWH$$Nf3hT6ZuyIyqMLcN@IA}qzD3}+UTw_);red!nYlb*HUC}!Kr~IuEHOm1_TbWwyTFQasgfCsZ_n&gj)n7 zNk0nGrNw3@Q`8~-r=``~31?-yUKgLcc=A!+H)lOY*vodsJy6wxBQoxodj54(LB^4B zHLSt7%LtM5Bm4mxld7>bNG4A(M@B6Sdb&3xb9ITKCkum~DVpXw4+Tm$%ZHWNtM7AV)Q5E|)@ZhRmNn?Rq zdFr~)l0+EV5e-*oS!^?YSu0?$%h7Jr&Ovh9tL3O!H*wXOy@}j3NIz+Y|O8!-kLht&76FXj|OAQ2*#W#~H zby~&G%;iRFapDaQOQ{i)Cz)g<6a*usoEeb6sM3tVLGf(N9i>tz;7%E378yxNyiLEe zY5%CGY3R){I5!MHl^5Vv9)6|bxx^&Wu|+aO$+UGb_DJ7)?pxWsHH^a%JWSmAA07n0 zl`Ai90%XclEzvFU6GrRlUkh%P3jEp{)si(;n3`dW*yG4V<+BZxolO)#>OKID0`LOk z$}vF%#zc11NK^~t1+6CNGAuP(@HB<@xeL#9*J0e zkJ$4Z2{qG3*t@?8g`Hta{gO(m%059=suac5&A98~ zGJMlZ`6`pQ21oCl@_ad_#KFoH;F;fJv~>|)>;&!K2Ee?t$V<}s3nOEBX;o>SX8gU) z28R7y)T>|HT(Ram?KEe4Tt0-NPed6jxOn=7%4hww0~^eZs3g2+IQmjCy$y{U*DGoh zA498{ot5kn5YdZ}vr8A7Jg~C`!sg1Qg@BkyD&#BI4B-OK4}cCuX3({UJ z0r@3u(xnzvL6s!afR{6kugo$^QN~YIePY7vb*%fG?(<)spMQ!h3b9S+8jC;ur>Q$c z6skxapUbD*cAg*=Z+km?7!hGPwRnOk>9B-xkEx2vU|cY57hiVViu-Uw7%L_6I`4ee z4|p=#aey7-%GQ=fgDuf;9#yI!*Wt~3F)kR-=H(x#jmV}!`r!?v`9LI`lbB^WCBf5jRYC{$Bd zSN*0fDJx5~u)w{PrR1$$A(4F2hOP>PKF3UrkdOudLQhxsMjy{&QBY7EF(nV9RGIOP z2Ks|DgsgDoQynmg1CH;t8&CN9Yd&>UdjTLcx)e0T@%G{%X}=366iUy(#8lT8BLK;2 z$3lsglaUu3DxEvb;s?p@h1zm(x(v4`R6;C`Gq+CuNS@fPF13 z*{)t++m9@WW2Ig%Cewhgbu4`|7r(Z@EV?XJZj!`G8TjpP=7)=5JVYga#XevRHNZkAi|}6S{Y`W@94mrve4u zBG6;kli47^HB5d}MZ_H`q($6{**x6vJ27PQZak`$`~s}UxZw|Nks?v-d>riJce(vB zOjXa0XU(mB#Td$>gv-EF0+j1@wj=M-GC@m=i?x13uo~4Xy+zDE{EW94lP5@MT-jAW zF)1WXd~w-lvP0w4Uk~aFZ8sR);jfP~K!lvm-EL=Rf(e6ysGV5cZan9?MIy;!1XL&( zm|g(oAX>fFQ^uXC-Q*vBj$Duv0^~Vlr^IW8$lua(O|-hwDJhzlYiaw)H21CUhutLA zlO3mizh{OW-q>;hG6HKZ&Um$c!;-p@=>-c#e(uJ$j)Onkmu2kGNwiYcO9;&2fk9hoklIJ$>`d|Vl6h-+I#pQA=?dsuq z%*^-YL@qPSoRU2oE-i^v+&Y)~@m48cG8!i5xAf6h30f6=gmS`}2g%17Kh(9<4HmT}Mfp3GTbXC}i>sm2nyRZfH>V`BR2%tgW@1 zEt${SpJ?_c`DtxV_xI(2r09A$n>akIUfDqKb>g+N4NX41CYh}Ujea!`AZm08U5|~%C2g3vz#IR&1c0y(`Fo#A!E_czTWt(ucs7Z6SxbQ zgoNGaB##^>o&i#E2g)Wt&NVF4c7O{I(Fuv6^+>iOX2Niwzy+)6&&_kyWU9XR@rur|$WtBKyN;K3o*zYoU zCD)Wh;eDT>FAeN-W)WfoSwbuB5$<&bM?0FQ-Lr6_Bni6g2jqP z^TR=&K4Yl}HzSjiX1hhg&vi}&nN7!kORBbRhjIL>T4;y|%p1!9xS%TFSO`fLrPY=#dcBWqE zL4pUFtKj#GUOYo_xyB1e%uM>7IdjFFTt0DWO5tCR5nrv0$UTdu+um7y#`RJ$K^sf! z+^^wpnX!cQ#rtnfRkPHzIu@9XeL3xT(#Xm3VI><_!2WpXp@x?TBmhw0u!vCrFu z(xGL;)VI661EeBvCPapQ9b!-p@Iv=Q&PP{u7ia0{=Uj)kaNgHjhXw7MkPyq)i#=2{ zve}`*R9RbDMMY*t4f`F?)IS$8W+wlJ7}C}@txmU*%B=0EZAryP ze~%{0s+1KK_kum%B=m4BoaFU_+n*^#UToPZ{MsXWDb4n4c|+S!z<+yhE-&RyGae{) z8&6ezD}gM+D&!%mEPO%Y>-*h<%_A>AKdHJ)f8fVmXCng<>M6Zz8jcr$D(23-!#bYg z=sS5R^M!N$o;9`4cLo8z>!L3|*VAHyplk^OKG_$=PI0-UNb67*MC5X=C@J~AisnX1 zA!yDP?e7`BOjyg=O;Z)w)I=cc(|^@{END3=5b+^1`RqT}Vp~N`wegYN9ZKz1%TCih z$O8BJRVKko{ar~u)K!3tRU|-^Rpc%3yvHAViB7aDVX8}~YHt?J1FLl`6#5TU`k$Ne zFlK?Co*p>PveVKc6@KkvdQrgj=XGrG%cIGoKsW zGxKeF`^4^#qMHsjStY5;sV9e17#|dVa%jd5%Lje`xVaEoH437m?XU4IHBFs{*~qy= zFbrr@nc>F5I?--*6sfJ%=dP36iP72~kq@HY!ftk7>_DYWM5J#SJ|0_}`iQ9^8^dZ!V zAl0)W183=L9*?B4{M@f`B-`r1=rkTEQ|#RpUwdEgd(kH0eo~PA4ZE0%w<%DUZmL$h z*?>Y58LZEthd9^nyRL|V)D&=eb!9elcgALGSqAui7ILLf3y~%gcp)4*w&77STyA6S z1w@!$%B4fsai6C<6$p9QA|>KJ26)1(GD@=3ccd*u@Rxgsh{N+{ctJKFozUw_v4zuq z12VA=wG$7(_d<8a^V-J3pfEnS{F)+U%U4X38E|nX$NMbOt=U4x_M3R+ zkRj2ld8YU12c>zE*cOzmT@h<%o+^sX2IvL9#2{OGVwyCU_Tbh!+Zo?tO#W{9fGlY* zufpkNa(XAByK%o&VrnPiigU={boV^{|DJ3uuv)DXtF<0;R70RJPZ*>Yg+|6PUAe4h ztoJwoi@r)s=KUe>dFnnm(7A@TpY2(u38%UMh>>?bqh=>=RxL0Y&P3L8jK+?sFlQ) zHZ2@(GZjw^HVrw|phWbvcuf=g*LS+_laIHyjqRV&O7!HM8o^uY)9Kw1^T_0H$#8>u zI0B?~UM=TYN9_ImXS)wce7F`FAm08Q7uTi?(313gW|Jk>aP-t>buBlxbW)n;a3yG8 z3#V#r9h6y{ChgG%c%MjI2=uK_-G*|@!L*ZBV zpJf(cLKpH5c~cwexL)nPn@3A#S9Qwx_;}}4U@=Ka96%;v<+?p>v(Gafa*Sn8;(Mow z$!{qrt$8w%#_H}nha~TN1!iDiU|MSM@$tFnU-vmSO6=dzn(@%T;`b77xIC~Ysmgqi zIxk4M*bN&ACRoRu!(PR)matFz_h-!3BS*0IEl76n{)ynXM zhJqqVlTkZ39p7PGL12LThm75Td5a89HG-f0@hm?l21f5em*g)s|(D2Qf(*t#B0$`T(EcLql>4|kI zYw^sLPbas%{fMs)$O2Wr*wFBDSS*2SJD;Yvam023+R4T?vLC-$?ukx!cKUZyU$Unv z_2sgbYV&Cv(1?}C$qc&zUAYtw$tiE(5a9CbL1)%rE&ls-i6;+c)#FvwEZ#rX9uq_p zbhF;S_B$0KQ@)0nkCO|dG)F`^`u*j&!{hI6aUlr7b{dhbb+3`i$5+0AnEM7crVF*? zXWO0%(N)JE)XA%u#0;j&%qJQCcYOIYQaOOS9EIxz%ECfggH0-s_K+(WR=kIim1BLJ z5N^W8-y^!3K_zer83ZUbE1L)jb`9JsDykFrOroh1nzfNnwopP z2<&;%k|P@@lM?=4*+FNXy+0?}?5UjDBG)Y^K2TDwa^79|H1AjGTCQ+ROPTXybUZ25 z9xMd^&~e;;W_7QVF+p}|&T$uWax2pXg2D_e&FAq(UMWXM#?wsxjBxVwBcA;jfCLk8 zCsNYS?p$%A2k$P|U7!kT(^#PsRq@6VoEI?LtLf>D3SM>nQhpQkw4Jme<@a92Z*u#L zfFOwv^o9S(OABgI)rR1D&3VG+!kO%&BLAnVI(CP;#O6HCG^p$wL4p55-GF`)1KGnv ziFHXs8ca!ax!hwX7+;S`ak&{>ZaX847kOn6_Ey|kSlXncx=N~~$fJLFkQCeP?fouI zBu%*wNo7ZU;i}Oo4+qE}&NDFUp`a0QlVZldY5vpJE?n5P4J(nxKt-Kd#+FqD#1C@o zzjhRpA2W5#VSWxS1Bt(K?e+=))-nn$p~X2bqV8w>KV~eijCyHt@l%mvQBhOGJm4P? z2G)7J;&hZZ$Ox>6jZu$KJJ39*3@})jnfJ%4{lE7z$4>*w4g;?f;bQr%loWMfAbPF$ zj95Nq{jhKcFk#r5S}ttW>RJQwX+AP$C0xol8 zDydyA4IGM9MPH0!>e{^X?J>f}<4|!7DQC1nDd^#4%%R>4Dw1c$qN{4avNxmKkX&51 zj7mbiAw;WJt*rXDdI&bpogPq202J8TWInAWP%UipUR#Wp1jUeZM?^&2{uFhY#HqeI zxl46P4#!~n*9)3Bxp1veXus(OTKbA-I&BDZtANB|8mJA%I~_PQSqN&}!93UA!HOTa zR8>?4qf$t;Yn`c#R=@IkL%xKeolgAv+JU_E@k*cm9&Rx|^!h-@G;~pL|}QmlV46t9$TLyT_gaEr4p1&In%n0r<`d}qK6u0eqx}I};B7Qi}o`uKAi~K@0*3wKA5Fje3b;vK1 zxQ36F7Y@4;IE_UO_jqS?6BV%icfpmsy16-7y_~n+a%9SOt<$g`KBog{`7{o%x~)-h z7+1o`1!YRud(sQ0@l@*0bY-Z@zkBz5xI&dfG)Kqgv-rK$^-xAz8v*F}De0oGkt&b3 zqy@qp&e#Q|P~P1id#iqym8Td~Q~!@}bP&Ke7s`=DU1A0yqI}5bqL6S*L%$1J90%g6 z9d^Zk0sTA?biC{pK_-Y%2h^K#a-+77XfzdXhd3&#e_^AoYl4Q&-1T9&#T*d7et6xVZs#?SN!<|0` z^QP>29yK*B$B_&Miegg0?2p$<`O0TD82R)Jt#aPp_y9>FGc`;p zEF66uBmdoEKPgl9S6M=FbHTiZxevSwKb|?h|Uqvqltf}t@i!SfQ%)&MYkNc#jln&wdx)1r)6P{ zYTol<)9M5e$YOx%4;>R%I;22rFqW*>t|<<`b#R9Jx$1{DWM~eTZe$|cxL{b_OA9M3&5M^;J2i)tR>pjYVb-xJAjrYH&E%F%WEXvk704Sx;C5M2&>!8o5+(j0D+8# zrLIjJz=@i`C5|1prYtjj@Q3@@o_bRq5HJM<^5uh>)qmY?&*s0od4-nUrd9{ReR^~o`X4<=@*YI*4=*Xf`G=-w1T78!J`Q2dHe9y1T;|QYn z{kuh;6A@9BTUAynE-`&Em+2qGa*%n3>{xKZ8M>ZX(P+gC({*J6AZ3 ziV~f{1!S4TJBcVg&ISe%L&Rsr5rlyIIU#?8CVeWGc^o{Ny&2_PC+O}UW)t+Kcrwij zb-@2%nLRSv;g501Dwaq*?`t*r`~<`Wqt!5HTHs#&Q+ba{KOef10Oi!)t@13$CT4MM z#2yAk0@1KTXE4Smhfeui&)H`Su&YuYpx0=!yIwHtEL4(aF$_8j z5+syHB2ysmp!ko$%$UISd_WXjbP}T7$RS6 zuUXUTs(`uZJqL90Y?Z}Annh~FscAZs(3Oq zfi}LZYA+yd8-MB_bgkuM>H4*NIO@4z1gFd*c`CuDa{yxq%lf(HS6SIlz_q6)^~1S1 zN}a;c4ym~8pC*Heb@Q2>%S)fO(Zmq%>CW?#P#GA@o1q&70IW)vqSc>D=;;U@wACY0MKszr*-TMJp?*&>+CP|=;SKx zLZ2m1-|=Nm!_t}x5Q?P(@$od^+)U%GL6QpeIt1|7$gyiRPECWU%jho6z#cpKegokQ zPB2C9KYhR?D_u+NKkVmaYU_7-?43X4jX8oj9X0ZTOGgUw8(Iw<%6>iVwW$+lz*9+G z69~L|O>O)Jq_8&T;mip+>n=6E8wsWlNUEq-wc^t-zh~|@A6gTQ#Z~R>|BLR1S$u8J z9!tw)UE(D~yOxQ>+1Rmm0MbOdz>5{Pt_@?*hD>4`?j(yV)wu(16q$m&o@RCGKh>qH zK(=D+=x8fbL)aM<+6QO}SFTqYe-#wO(9h+lK}UQ{%dC@|F(*k|GfVqig{EK&3H;Bu z@5cSN%*x6`<&Q!M1*VNbr z5Kz3E%yn~!qxs_Vt1BrQ$k1AizHmT41psxbH+_EX9sIr!u3{x!k==i7rAVB9N*G-g zEwx^VV9tMSA+$>)U?fd^fo_IhXoQGJ)pRy@1yQ4uT@qg9NPV?-n z^PAbEzHk4O=H>)zj9}*A)%pRqK|aV)i5=Q z(9oDEbX-|+x9t}Ug9$yb1k#m)W#8lGx_WM#pzqpyC$M%se!CE-+vL%(Tn9kc$ON8< zg9;uHPOMNgbAR&|Al(zHQnY@gAvn76_Sb2PWo$u+A?3%UaHthkT&f~_fYcADsdER! z74#Sth(EDC-ks(3GZ{xkRXIPAxm0F=U?ohPcs5P67pA<<5swm|XooamIZn;u{> zfVE-ufW_{@m=IBdEY1T+cizDU&1I9= zfF1rl!9-Q^OgmNN9U^BYqr<$Sk@oOFb1gIAEd;qqNK9(4(0phzUF7RQPIOwu?-CiO z&U1l(4-f|s`l(Gke@yo@K$)?dEB1E$p5oa}u9@&zbk-p0hjVmWP@9(XA|QyJbsAO< z#uz@RLq>~X0U9)_E&TL`eh2~{g2j?!ttu@w`&*{?-AvyYP=^8v5`(LMLKRX$e~p9W zR6q}0cpYr=bpF|Yb>m}GdV_K};4zW;C1s$%p zym06K0c3t>0X6N>jU^=^U*UYP@fNga>Z5^sn5}}Gl~}&T6eEMjX%!H7=3qDX!VQ!G z&2*<>^LtiS*7w(E7dG|7!&PM3b+%-op)~ksfU2sup>%g3S6gL}%tM4mxJ3dlhru-v zZA)0e57L)xV9Q3h+-fIUzGRyRa4~?WM7((Jo2G?PpVZixGtg&j{=0|Ofa+l5RDtJm z$xtv%O5jeY~4h1^M|=pMrfr$%K8$1t zda(k7Wb!h#k+b0JB?mV9jo4~{{vQzDV)MjR{|SO4x`iIEOI^)31S3<;wDDzu#+L#9k~9W0>O?9_JW^_bQv6MhbH##y;}guQyZkZuOiF-V_J)2O?t1?dx0Tc@31y34H_IyS9%j~TS#E3Xs%7#LSG|o><6s7QNxd?f zo8!L8)_no{_b%@ZD0KVs9aPr9x~4 zb{2r^kJ*az3$K)nn8zKmxk+-vrsZV4&3+$lu=q6gZzix+N7N5qM~8%i=2ZcQ;a zVTzLe#&;o3WhT?Ow3f^1{0-66%SMIym#o$A^12t*rrEi>cMqSaT_aD0zk9mS5Fr3F zRo{B!jt^Pog|{T?3!wY^?%xgw7L@Bz>ng6i!F3)QtP4%bH%zTzsGjLzk}R$IBJr?v zbGCZ4B)ehnh5P1a#%R`?Q|q?}pJc2f86FZi23(Y5BoJ#9E1qMoP5iyNP6b=MDtuKs z-x2lM24$HIdnnKxqFo%_rQzrDey!l@vfxh7^lB4+`Ei!q{L{v-?_C=GXQ~U)uGsiH zQkJ=nS&O#|Yu{XU(p|aNxj4}|*4cA&#kV=yS24pG&Xq|;_x!WQ zXBuP_%7#QsXB3PcV`Ny~GQ4n>(IgovroOW}NhOi@i;k;^i33_ix+!uQ;vK#G*f)W2p%k zdEui9GPNHvj;)2WOz_SY?>*YACrf;&r{t4dc5a?^Q4sXG`|Q)AcCNWkj^*@Qjq#eC zoU4k6f)0x_4)r{@iKf*%MpxNx<@rC=R~=BA)_~q`+NA`{?LGghF3fm;d8@|j4L;E| zI)#Y3VqEWABYDG*^QNLK14{B$5pR1EHuAgaQMZa$DY5Ux8kO7R3wZ-Ska6k9cNZ%W zi&824 z!g^BPJscHMHe=W}H>QCBubSv4cmDa7!kEq_*t7W1t}UDSFNZ`#EBIjMfzqBQ^&{Pw zW7a$^0=yy-R#-zOC2zK=dhYzViFc!hOx32y#G_x6#EW*)rg`li#=;i@-KMRxD^O&hM{@Vv&tL#*EuB%H$}u$dwf1PHaEYb9T>t z!Ef+$$L)FXK8;JOk+(peD7q2_{^d3g}jo} zt-^ZA*o4G zx~z!h$dg2^jyQACZ>WskdBYL7+ZlC53Cb*_KRU_w+7MZi@@^;W z%=NKCU#!=*2}N8f!Rw2w_azIg?ov@YtuB19?xgk+<91fD4B-mz+?gWpFYV5oN?-_d0r^VX^^4ciK(8;6$lYBR2lfWnP~KYX;0#I^d+IA+p3yvP zv%NN#>onFYx9VLST_k&umj`q1H@UDejbLc(9^VDA6qz@XN!LD)n-E3aj%6lK6KKzL zmb!=5Sb-}5Sc$rdsD$L`d*Grs5%rh~b$73y#KGC!UcT#u_g`NW8sr2V(PS~~JB)O= z8zZ_%52<0=FjJ&Cboma0T6Np~G;%!P&7BdoibEWI{e=@mVc`!%vo_ikYazjEWi#v6 zLLc!%6lg)%(wUWogjxR!;m^82h+YA!iD|;1)Oy0yQRngy&nWS7=%d>M+~5a};cJS+ zqn0VNa>KXgy4TZZ!0oq!*5G>t^}3tNzI=s64F*Rqf=meF{hQa&s?P;Jh{i-AVi`}J z)d}pnIZ& z<+9Sn1!2O{G1@n(@1FV(h_+c6?0$iY4cw%U)BQ>Bw!qh;B#3H^E$qJbgwg@-JH(&P zRcU^8yK1Xg`tWu!&uQZn(a%35;DtbX!sxhj=RB>|om^4$>qB#HoqV|!O$7=7SQ?Ey zGIb)qS&ES-UEE08Ot_IB;35%a(6fhJmA1!}KXsVt9&RpNw7w|L=^J{9EHUXA zq$`{tyvQKj#*tXt4r?f>(z|VUImcVh=aR+)d56xb>nQxlcL8;awS4m-u|x@d@Pp>s z*K~KkY3E072EVb1a$B$#WPJ_2YLMaCnK1nD{#$O24D%&(S-bd4XHC&Y-?)3QlH0w{ z`6WK9#k;-!th5SX>n2=fyEc&4=@8ljtxY~nF{_-mgwvX)M6>f-hkV-2BL<~^rOov; zQir75YN<0210Uswjy#Ym1$bR6dv&bZQ|wE2io^QC)gR|c-8Y}@@W{76`;s~FhHt%- z6ktr+V=vi}3;3$;@cl}gfwoe%#4f$@GIx_$=XPHL{i`0AjWtx)O7JCEVaE@Y(K^=H zU-Daf-r9_71L$b?>kvjWm7?K+`>U5ixZ~J~TSa-$9vYu7&GV8Lk!_%*zV4BVrm^yx z8tm!=XO9q0*b1HCnhl^>OS3@Vu&sA|KEEPAsJTbnU;Gx9r8GIh$f>FkVkV$n+lDd4 zocictDxMznb#~cQ*gPSAn=hOuGUWKkm~M`g)?stHBTRPOcR2lXtiyFtJa@yC9-AmW zkR%z;jJ2v7`u10B@hJOoy-V{Qd77!~nY`;Y_b`eKW$w9$dybtPQ@`PgooU~an%2|7 zvsgi#_sn!PF`r$Il!)%Qx~^;MO8Nvi2e2{zkUNR}QH(_~yDDry=GbLBUbQnN(|Jec zmEX5M{af5G9M3iS01NJ?*Y#ApOLjCfpdJTDIz(vQD%P{NsZ)1ZpL;YhRvQ4ZD_0=2!o({k_n)`aB+*hhD^f%)P(v+n~ASV9Qvk_ah|P&!<~h%6Tcg)+*#&9cSHb@kcf)WlB}0 zm5Bk8@=4K8Osr|eBm}x0qPfL!+>>sSFLU`#aG^K0Z@zqILE7`U{yuRlJ$|?w{3Xkb zu_L3^L!!83gmZ3}<4mpxdnzW3j9ro6siSji_QPNt|)N-JV-E4>+yEi-4tEltc z8Lv6o=Lecz=xrFe`J+%tmNe)Hno^!gVEvxDJSx=evcNv`#J>Z zMJ+zCncuwQ#MtEHy$ugKr6s^{5%AOy>Dk>fUP5TnWV9VtumyMr`=?&8yMnAYm+J#+)@@HNH^Z$1BEa8b>R4KLke;)NHxRpLCyyPbbh zQ!) zt+%Jb7L|cn)w%b9SsPwznfHsL7L90aa?iD%1n1buMdoeT3CgdN*B!G4sw65@Q8e67 zoow7su)e#&sHQQ#lAdN|7s?|WeeLywh&9cufx*zZwWr_Ioc1EB1KGb;iyAR-ma!Vh zj@={FGMCt--1t~wmU7KK7tqPo7o_L+%x+z#u2@+8&=C%S;v-iZyN6P@m+{Kqlq6n! z7esYTu;tk*Y_J{v$&3m-(|o+|Aw2*<6N=H%F@x&p{BasVJ%h;fPgFN-*5Ye*vd9FV)UGwBr^a|^TLzaaDDScd!=ahbSa_ok-!)}oN;%F?5y!9v?K9~UR{ zK8uL%0mZ8#*Cw9`t}LrBkJFqlX_0@3JN}wHdO`Ff;%uErxFfqRTcCJMN4KoAs5s-q znpZr)X$7Iy_49ppu5pho3qxd!TsH{!(d*+&*y!XlQ$Dz!t*C~WfZ|+mOZ;VPwScM1 z1l!45>~eQ9PRAXK4&%16OXq^cQi7F>+#oZ|yz!TM?K7**!xWZZI-Tg9>oUIlKqc@n zcR2&2$Z^Z^AP#Jc>j3mo!o43);u|M6jHk^zs%iA&d{c6?y?;zzU#+v3)YO<24V%*X z7Cq(1LYw1o*U>9;1=(Jh4QO(iG{Wz8DO}l2{_18CEkH9i`n=W4!eTS9i~sJ*%LLeP zYOs8mp8!QO7vD)+|5)o&(V#t2@By1v##5tl0DZ)Bv!IGWzwxoYkZ#F54E1!#26h30#N%Y(C_Dl!L%|WKr$+#QnkIz+N4lfQLI|`A#zS3XrLIv# z2!m1=u~vYAU<4hsE5`6D5p8kR#1eVc9jSs6(bQm4qd=$xI5Zh9M8RP_NDzv;$N?{e zTHdb)iU=J*$nNSQHZU_G9Xt^&BrhW`1CrLGV7z5TG?;|ch$v@>xvu_i3hJA>h%1>) zfB=C$K0Y!&ax!?L3lOZLq5=fT0%c{TsR(J3uLl`Uk@g^+-lzD*p^GLVi5LPIgZB{H z=Y%8hUSxF<5o){8AO7J8Fxa2;9;DwYQ1t*(-~=F81_Z?6fPc3jk@dW(B)=W{UoA+M z)I&C)Ihus`A|lax-e?c<>AzE;kbl|}yolI?a8O7f8jHqJp(JXr;D2;!0EL_S70t$pgfK*hZQ3?ozv^*FkD~&)YI7=(3z*XcFK}Z!PxXRzCpdKVL+yjZ; zr=pU}V5mIKAcQ;!3`R=JqLjhX^3GsoX%!F(ER8}Sl&D{M6%bthZxp6P3^gm^*uQ(V zPlcjVq2!x0tH8-4yaH_h(4Z(gHwkSgM+)E zfdmhigNA*_23-|`^6h17lxiXnzXMfmP#{O_E%Kzsgr`!xlyn1d!Ep@X!Az>&W?A;Gt8AGufYFh*MD;TD+T@)_`mG>|0WmHUmG5@2lZEw4|O}U{iR5Y zx)q{B7#rwPpFaTrgVFdTYKf6xXiK90+s?Uv(Eu_sPf#oA$xxUc{pUj*G_*n?b9T0P_aeCIA2c literal 0 HcmV?d00001 diff --git a/xml_converter/integration_tests/test_cases/texture/output_xml/texture_one.png b/xml_converter/integration_tests/test_cases/texture/output_xml/texture_one.png new file mode 100644 index 0000000000000000000000000000000000000000..5b7d11285e8f0343fabbd63aef707b59b4f7b5de GIT binary patch literal 6530 zcmeHMc{tSD{~wVxdu1t1qwKRU7$mzPyJXjF7-6QFk)>q0wp)@)$`*<&Awsz%d)7jw zLb8<*KegA8o=QDFY=e*vp_j$k0`<&-}p84I@+DuqbRuBXN z2@}kX?SWq*;1T5K1-?o1dA|W|xiCj(wmmTz%wW>JY5r6&JCs2MQ$uLpAW+CqsY}4o z8L-G&ubQ_2@2;5CmWvP4Etlzb?$iLsIX)E zK%YL&_wKzL!Q38_XWdd5s2fr5WfL9_irwHEqSE@+<}UU<4ZZVDf5bMN_7O5jZV+a! z>j>S^l#x=+H#sYET+)L#If9uJC)pgloACOT>Hd>*#tS!jL_%K{+`iZhVLANOVy)0$ zn>CVK{Z_bIr;1ry+n05|dw5}dN$e9+ZFp(U`@s_4QsKsV`I)Ne2P`L z+&#)nMpA2f`$XUO>e zyEHlSfCUW%X>g9py2dpNp+=ZlZrY-JAV&)~oAxjRdc@{>JO8m;C)0e4pKe7uw?b_i zS}HX!g{rhp-*s08m8uI?C#G_UF|x+8b|*l5GfgPWpfJ(tDov~Fb^v6CWF zB5{2&Nr{s(FuN%%$UUY==AQAUP5Yn{?GmB{0x3pO9ps0Q<4VDcCG^mmJ5qiZEHCOT zxCfO8e%dNZkthpwxF@x<*zzFS_P&ZU?iPtO@OWs4pHxZq3!9wn@W&5L zyL7sC_|>Q}cR*@0%gMZr_8sC0r;I>`%I&j-$k#7Bw7uh%j5jMwcP0%cCP|C+s4LwH zX@TWQ+L^t}W(b|rA4~N#foZXAARlCIn-yA(#@#cWO*9OCYml&ai>+JneaB9oGK(*N z)g+DA)Xl$LILKFgDu^q1A69aA?WxW+$eHE=DfcZPeT){@>G-Ah-_T0hEvLQFPUj>C7TR?E|%>5RD25QbhVCH zl?NgyYl8dL-4gRtx5dj=D%Mx{r*@S^)J2bN!Y(1BzD50Cc%`Kz#kLd%w ze>?g(ZJdio{#BszOq4^cdWCJxmSOKr9gZ4emn3Y{e{JxhrRgFK8Zj!|M6w#Nl^h?Qxm;&=^JNaeoK zu{R6MlW*qZ4`olqZYFv#jNgbkl_dClY^*p>d;ljbBt^^(3kF>$;GYP#B#SQ?Hj8|y z71K)Lo%eD)KYxJxR#KG4;T9W@5%q+&x6-M%QfKd7@BFK+ygs7ZEmzJ+{oEg4lI=WJ zP8wuY^zln6X#_?h8q1kOg;Be2@^uNkzvfo=SMZ1VqiA~O_Cej#?ul}K$MXCAo{99% z8!gM^;0<|*X3`x=uWF^LKz-5tMzb};uD?Kr&2eE z4{UG33H)KGTJNeJ9WK7#Qy#7`;cX_oiZ;o)GVi)`cJ`im2i8d~c4=Qpkm3BX-LvL_ zl6l#ZI}&A4CvV1s>@(N)XKlawr1X9%yoXN(Y_?q~FV{&`)$ow|lB~hD^!T7)1R=pE$DgrH+;30n<%M|nD$()C<;-{|Ab1p@vK&-$6r zt$gk$w?XAS*RymY(&y!D&b33Mo~nr@2u>9mm`I@#N(vIa{hOS|hVsqPD*wEaUsx7dy(g72^I?%WI*!gi)Xr_c`IE4O_L(oRy>o=v8s?%d_`t_!>~mee zEhITf6(zq3R9@fp+#xSF{*;`~_RR>ki}Uxt~q+!mJCL4;n6&SjWz>r)9DP zy#y|-*2<4}=qMDsj`6%S%4fp4OBUi&+pl0mdRKdotH}B6tQq;_(4{7sy}w1& z(M%;iwjc3!)A>J!4R9$vdNZ&GK9}Rp4K1Iad5CKWRw`>Rdu|*0lwtLy!0?U|93{R- zC9~gcOB&9+LQIhrqW3$ZqDfk(RByy!M|IIY*Wl{MYFAUe>YO*3t#X|`eRONe{f8pz zmmx6d5gMIAOgicAxpE~kg`N{vEsa)lGx5gT{aMslF#38>#j6_YSt)Yx9hhRzGW?v~8^NjUf*v~_hTfFm_`)e zwlu==Q_jy|AN})egeE+kf(EY!T%YzHNW~o+ z&1?xg;CMILd6*e~R?oa;-_ABKhkVF31DymdN};urv58!@ph=;aU#yede%P8=I%c;j zEGhbMQ`4EY;@?hHmWh-_gFkXj%#P(vL-u@ut5zi}jMXU2z0-U5g3GY96>~jcYae@f z|DFkwQXM4DQ`}fIQZ=!o2j#s-RbX@>=nTkfj-=bY{yh7t<$aee{0Xh-9z?)I&_t)z z@Yo%jokSCtJ$seqac`nq&$u7dJu&Ida2ZPzM`xugCW)Pj-R|UiX`9vQkZ7%9Km02p znKK6-xMfz`$70`gdPzTc({1TqpdHDxy_{bFvemIXO2WU@cYsild}XcXOvC7s8F%cfk99M7Q4IdXeZHmJ#G%!2;88++*U z`S*Sfr{uXth8x?092}N`k}+qlGudkJLNq4!xO|BIReIN^`rG?n7e93)D-?+CORu$f z0pg2qw2iv?^!SUB{-NOpAKA4vP+kMGPMaV;1{CzNG@x*Iw%U&;(*s~c3Y|oSg#<8w z!X5RVNAl3?D#W14!(#*q{REIEYM{?Lx zzgJK<1P>4dP}xLqNPvGJ3m>8f+2F+kZB92F0^WeI59>jkt!%+YbS4#yfni_>s7VOz zCmszK!9=Z_xS}dtgQZ~4`h8)0nh^;LS(>^ zFa$gx0RE!|i*0fgAo(_-|7yW<1nxg@dn$__#3WNqj#2~Jia%0N$bZ{2f|&jr;ZVqM zsy{UVfU*Fu$e&!A5v*+gw%|zMLknPRSOH@Hgk;ma{}Jn_xp77|!ufF`fcf9NKcTBqCG`OT|JlI20O6LSr?dI0Qvo zQ&W=!45NOaA_TJ7#6U8YLj{n-XaEltMZ#&3(PSu+Od>%sS{N);OPfl8Y7)^D5(Psf zVzm)JP}neOKvoj{f1DMEiULrP00u2BfJMt2gMnha(G(~Ng~ma(02UNNn@pyBqoR=U zrgUZi5m-)I0MUmEX9W6e_}~bRH?Sq>K~S)-UN?Gd{fTUEz(5bOpB5Mt@(|V~{8$2Kf)jiOOUFnaJTpB4FsRyqsmh1Hk~o5;=Ja5PXjkZ^Wb$ z*>t8Oo$jv(;Y+u|F&2}KuZLL3dNu?z+w@#D1g?QSSSjM)xv1w zw1EV`{>;vzd$WUyOsato5GfE1kU$&JfK@i6RQ(wp>`Ue7gg{}S2s9L_>4-w$vD$bb ztq>SI0s(=43mDGX)!!r5h5sK-bTIq$7oqxWfjz5Cmfb zN9jl8)!xSW>?rfb7+52J8_za0YV0k=~n#p!5z>r3n^9 zDT)YU!9tUErHOzjf&%ge^m@JXy?^e^_x`(?IXUO-{j6uL_3X9xWKE*XO%3_D#kfHr z5Fg$MXTiMlFfVRScILO!LO}=!#4G1duwhsbeZgKdstefz05i^b0bsz7>;eM$^;cYV z_Zh_O2;HFXs%5>%x?-~N3}y-uRK` zt0l3M5#K*XDE6$q1M*yR-9*?-Cs0Sv%SDfVzkg7;?%{KS@pm7d^Ft3OzYp-W-*{l% zFx8F#KT`r;_!msBghz=vP*>S6pF>#kV8WQ^0X?03p_Br_}-=;L$BS3M4J4Dwa@m{ z^kntvUkWXIQG2ZcnuU5GnB`Qm(_i+Xb5?i)T(R46H5zjRpdQPc?-`?bYj9 zd1V_BTw^R4q`BtX>9J4ez^1SI85#E}4|C`tnfQThBYo%5U|{_4+XEZp_tvQn@|%CBA?A zd*69j&V*!di%uu|gl}(S+NXh?Z>Mm4C=idSR-|i4VBn7MzGHWc;D7Mema*69ZZ{|; zsx?Wm2iKf?`eFDwebk^gaaDToL<)an*s%VSJq!oj+}S~GJ<9PtVjR^6c)G7y%dFmz zgeHr8d!ikGI`g2>(CSoWDo^v-wK8FRr{ddCT!82hsn_%L+V1-F*GT+S>IXI3Fu4MVd>5zS(Egy|~79VA=b+(p_L!yD-u)%3mrk;{8_x z&iU0F7U@82iM4D`{jr1ri0zG}a9xS}@8f0_S0Kydx3$$(kCu{<>F=*zlTkc_H1 zvpAmQ_e&g>gQ&)X*<)GvgF5y)&utJB zX*VxI?xwJYsZhY(ti~>b`MtBbKvZ|$CE)3)NnY3H%(a>7dp#+3B0LijV)Z5&GXf#) zyfQYVz4afeoiydlAUpLB-;1r`Y>P{I(Wb5J*r~$xN<-(BVrr&%+N~-*r^(cP{vZ*d z&@feVxd&`~+PziMDf4_jJ&#KEEgTYW9IrHoeLtRJaj9eJ?9)Hs4hGR#Y}V->Pm=^3 zT4~N3FI{Gy$q5o=E@p=+`Mddm1fm`UtcpK&Se98MD4WYK>MaJk<1&lG3c8NoA4Sy% zOvM=P+=q~^EDGy8LUD3T#V>sq7(Ure)8BY-2f2SjTQdFl$fIjlQ#X<_@GdFQuj@=m`y5Q%jYw8WIL;(y&dhrx!t-7uM0AKHhRoNY@YEk74|spnt8M>MB=+EqoAje_nfxN* z!?)ATn_4^9F@@`ED<5!JmnI3H=juLriR_t4Shr7|ng3E!^y~}wqv2X0EtT$b{@qjnImb`N zid8iUQK0I2a&M(}*V~2Q*nm^b2bbvHFGSz;g-`-9p;HI$i>})AKG8jJXaR?pS9J?^ z!MW=5h@E{JqkJ5qnAgL4YvgXHbMM}r9=bL@F(dW#*^BH{eFti8nwT;!gmx<00e2&= z|CPs40>oRjTi22_WK{J&4N)vnSKlXPAQlJdaL4W4wQpT_E&I9bi#^)qJG@s`OS|$% z*G`VE_EK1Vt+M(#;&rmqxYG>d40%mZDi7;qT9R}o2+`6t8EI5vx&V;dWiIn_w4VJ$ zO-F6thb8lpm59TG!y}M8@fjqZ5brHJt%J8{Jti12<1vY^`>Z3ZT@n5q$6uq}e+E*emss3k zVmoaJ4O;!gzBtD^_|WRmYQ&DwyI07sx?RI0E3o%Ia_+zKtw^GiFH`%&H?$T8`poLe zVcEO(eS--BBsqe#?fuUM=rBo5yd0MICfDqu=$lvPD>bJ5U1O4UPTAs1T&Q93YdUr5 z$92YzYuasaS}x05mcBAqI)SXZC@{&IdF9+QTx&#h0Z+$HbBydR_cITM7R@oR@ug{x zwWr?N>tAo|mvmp++6K3>!jux)R7n%YF4VUMa^5LTRitg`@U92%= zi2+YoD@HCQJxcnNN1}ce5tbf{_l(?;o07)RWmrnkBqesy=e6Gm4)baO9X5p0uaCM4|G-nC9^eOxJm z{T_BD&?eq&kwVvj&UyKsyO809hUtDbWJOuwKB`z+!s7du!n4_b*@=NIBP zbTN(%XlQFFBjsM^pTfW2FiTaM!m9_Q+J`~R&g`vAEGw9q5vq>x6nPW#;CRTWd|8*x zfx}P`=@VV8^c<&EBQ(IbNT}`TlW}ZJ@$|||jh7`A(m`cCUPsF>o1dMl%Sl{~`s4jj zPj^_oxI%)}#0_`ZbW$^~a+Oc7V^85-yO-;OBh-|&)LlaZNs{UdA;5(i+vRtK+v5&> z`h3Hwz^iX#ti--sKWIGiq02XT`BzpKrFYBeY0a~8a5)<54MUZ%dmYQhJ!#X zp=3QhbG)A3pB)3UPslib5o^?XNW9&_vJkRM=Rl-}bBU=HPJdrLw|?_2CuM;&5jgIL1e$f6zU>BjxCC#!5;W+HFm|;0Uv`6C*P_I2)5A7!sADLUg7& z0V;kJFJ^}a0%;xe^CFVm0S4F!a3y#O36QlZjZVF*o4O&A;rLn5I} z1eAWplR@-@deWsgDSmL^06K|A_F|B!p5RSRq7&7dfrUVr^WZ<@qj;H^{G#`y|5Smg z2h5M?1w*L7VH67NcMCd0--k)^Gob%!K_@U9VVDI#r+U*!fW8ml$&mh?!kP5T-piZj zv6YT92?lro6eg6;^osbKOGCVg`7eu230%n(uPrO4*ndMZ$S!}0^|#nIXSUM$JrJh( zFW$eQ|IB?0%tV=(U~p8D_hxu_92TRx+YYU z2q!{S)zL^zK!b=NBAtGt!h6ygL{Ad1NyQ{rAv1a40MSWR0|20EB(w$;tqGu^nkXk# zs0I;0s;QyjE^t-V-zdyzWM)+oJ${dBlggP%rG_SII%_xsP$FEz35s?`I6;XnY6vI^ z4oAZ^HB{9QF3ww2&LoThl|~^lmy=8(x&kmSPuH!9O~Elb=6EawsRI9N#N30(aA6u? zAxFrb-hO{g5Xcn3l0n>56QPcPt0Pfr8fs`H3XW3$3uFb*=*&vo_Q)$Xioj@K)Jkh@>A*=tLjjhXzc$A5$bZqNgjs+}}S7>d$fVe_1RPN(1Et*HDAP z;Ybt|t)Z$8C8AXkP$U|GaCQOI5hzXMRvN$9=~NenFOdf5xH2jU6roN)A~0|S2FY}Y#=zka*w2Jvo4fkYjJ06@M-#0rz;DL@)9%L@ z^LSyNR} z>;FwI?!Ouyz?1na$d}p9z?XLa?cf)BT+JQDi6NNPCJKpxX1sWJ#}uPRH=X14O>vdFj=}!{ Dw)l`f literal 0 HcmV?d00001 diff --git a/xml_converter/integration_tests/test_cases/texture/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/texture/output_xml/xml_file.xml index 5af46f44..5fa93e32 100644 --- a/xml_converter/integration_tests/test_cases/texture/output_xml/xml_file.xml +++ b/xml_converter/integration_tests/test_cases/texture/output_xml/xml_file.xml @@ -3,9 +3,9 @@
- - - - + + + +
From 61b44e71b408b96253a4de1b18737bc5ebb07fb3 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Tue, 2 Apr 2024 20:14:22 -0400 Subject: [PATCH 440/539] changed to static functions and updated naming --- FileHandler.gd | 24 +++++++++++------------- ImportPackDialog.gd | 13 ++++--------- Spatial.tscn | 11 +---------- 3 files changed, 16 insertions(+), 32 deletions(-) diff --git a/FileHandler.gd b/FileHandler.gd index d6174a9d..51587914 100644 --- a/FileHandler.gd +++ b/FileHandler.gd @@ -1,28 +1,26 @@ -extends Control - -const executable_path: String = "./xml_converter/build/xml_converter" -var protobin_data_folder: String -var split_protobin_data_folder: String +var downloaded_markers_dir: String +var unsaved_markers_dir: String var user_data_dir: String -func _ready(): +func _init(): self.user_data_dir = str(OS.get_user_data_dir()) - self.protobin_data_folder = self.user_data_dir.plus_file("packs") - self.split_protobin_data_folder = self.user_data_dir.plus_file("protobins") - ensure_folder_existance(self.protobin_data_folder) - ensure_folder_existance(self.split_protobin_data_folder) + self.downloaded_markers_dir = self.user_data_dir.plus_file("packs") + self.unsaved_markers_dir = self.user_data_dir.plus_file("protobins") + create_directory_if_missing(self.downloaded_markers_dir) + create_directory_if_missing(self.unsaved_markers_dir) -func call_xml_converter(args): +static func call_xml_converter(args): + var executable_path: String = "./xml_converter/build/xml_converter" var output: Array = [] print(args) - var result: int = OS.execute(self.executable_path, args, true, output, true) + var result: int = OS.execute(executable_path, args, true, output, true) print(output) if result != OK: print("Failed to execute the command. Error code:", result) else: print("Command executed successfully.") -func ensure_folder_existance(path): +static func create_directory_if_missing(path): var dir = Directory.new() if not dir.dir_exists(path): var success = dir.make_dir(path) diff --git a/ImportPackDialog.gd b/ImportPackDialog.gd index 27eaed01..c10193a3 100644 --- a/ImportPackDialog.gd +++ b/ImportPackDialog.gd @@ -1,20 +1,15 @@ extends FileDialog const FileHandler = preload("res://FileHandler.gd") -var file_handler: FileHandler - -func _ready(): - self.file_handler = FileHandler.new() - pass func _on_FileDialog_dir_selected(dir_path): print("Selected folder:", dir_path) - var new_path: String = file_handler.protobin_data_folder.plus_file(dir_path.get_file()) - file_handler.ensure_folder_existance(new_path) + var new_path: String = FileHandler.downloaded_markers_dir.plus_file(dir_path.get_file()) + FileHandler.create_directory_if_missing(new_path) #else: # #Pop up here to confirm overwrite? var args: PoolStringArray = [ "--input-taco-path", dir_path, "--output-waypoint-path", new_path, - "--output-split-waypoint-path", file_handler.split_protobin_data_folder + "--output-split-waypoint-path", FileHandler.unsaved_markers_dir ] - file_handler.call_xml_converter(args) + FileHandler.call_xml_converter(args) diff --git a/Spatial.tscn b/Spatial.tscn index 164877af..05650e14 100644 --- a/Spatial.tscn +++ b/Spatial.tscn @@ -1,9 +1,8 @@ -[gd_scene load_steps=20 format=2] +[gd_scene load_steps=19 format=2] [ext_resource path="res://Spatial.gd" type="Script" id=1] [ext_resource path="res://shaders/range_indicators.shader" type="Shader" id=2] [ext_resource path="res://burrito.png" type="Texture" id=3] -[ext_resource path="res://FileHandler.gd" type="Script" id=4] [ext_resource path="res://icon_close.png" type="Texture" id=5] [ext_resource path="res://RangeDialog.gd" type="Script" id=6] [ext_resource path="res://icon_new_icon.png" type="Texture" id=7] @@ -72,14 +71,6 @@ __meta__ = { "_edit_use_anchors_": false } -[node name="FileHandler" type="Control" parent="Control"] -margin_right = 40.0 -margin_bottom = 40.0 -script = ExtResource( 4 ) -__meta__ = { -"_edit_use_anchors_": false -} - [node name="Markers2D" type="Node2D" parent="Control"] material = SubResource( 2 ) scale = Vector2( 2, 2 ) From e092bcc8630bc968827ea77b20d48db38dc6affc Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sat, 20 Apr 2024 18:56:29 -0400 Subject: [PATCH 441/539] removed metadata from images --- .../input/pack/somedir/texture_three.png | Bin 8184 -> 105 bytes .../texture/input/pack/texture_one.png | Bin 6530 -> 99 bytes .../texture/input/pack/texture_two.png | Bin 7066 -> 109 bytes .../output_proto/somedir/texture_three.png | Bin 8184 -> 105 bytes .../texture/output_proto/texture_one.png | Bin 6530 -> 99 bytes .../texture/output_proto/texture_two.png | Bin 7066 -> 109 bytes .../output_xml/somedir/texture_three.png | Bin 8184 -> 105 bytes .../texture/output_xml/texture_one.png | Bin 6530 -> 99 bytes .../texture/output_xml/texture_two.png | Bin 7066 -> 109 bytes 9 files changed, 0 insertions(+), 0 deletions(-) diff --git a/xml_converter/integration_tests/test_cases/texture/input/pack/somedir/texture_three.png b/xml_converter/integration_tests/test_cases/texture/input/pack/somedir/texture_three.png index 5070d39284dde6276966b1c826e5b26e3707945d..3faad497c7014401f2a8b43c0fb9c33ee9faaaa2 100644 GIT binary patch delta 87 zcmexipE*Gykdc{zfg!@q>;RBr3-AeXW%v(dG2}DXIRhybQv6MhbH##y;}guQyZkZuOiF-V_J)2O?t1?dx0Tc@31y34H_IyS9%j~TS#E3Xs%7#LSG|o><6s7QNxd?f zo8!L8)_no{_b%@ZD0KVs9aPr9x~4 zb{2r^kJ*az3$K)nn8zKmxk+-vrsZV4&3+$lu=q6gZzix+N7N5qM~8%i=2ZcQ;a zVTzLe#&;o3WhT?Ow3f^1{0-66%SMIym#o$A^12t*rrEi>cMqSaT_aD0zk9mS5Fr3F zRo{B!jt^Pog|{T?3!wY^?%xgw7L@Bz>ng6i!F3)QtP4%bH%zTzsGjLzk}R$IBJr?v zbGCZ4B)ehnh5P1a#%R`?Q|q?}pJc2f86FZi23(Y5BoJ#9E1qMoP5iyNP6b=MDtuKs z-x2lM24$HIdnnKxqFo%_rQzrDey!l@vfxh7^lB4+`Ei!q{L{v-?_C=GXQ~U)uGsiH zQkJ=nS&O#|Yu{XU(p|aNxj4}|*4cA&#kV=yS24pG&Xq|;_x!WQ zXBuP_%7#QsXB3PcV`Ny~GQ4n>(IgovroOW}NhOi@i;k;^i33_ix+!uQ;vK#G*f)W2p%k zdEui9GPNHvj;)2WOz_SY?>*YACrf;&r{t4dc5a?^Q4sXG`|Q)AcCNWkj^*@Qjq#eC zoU4k6f)0x_4)r{@iKf*%MpxNx<@rC=R~=BA)_~q`+NA`{?LGghF3fm;d8@|j4L;E| zI)#Y3VqEWABYDG*^QNLK14{B$5pR1EHuAgaQMZa$DY5Ux8kO7R3wZ-Ska6k9cNZ%W zi&824 z!g^BPJscHMHe=W}H>QCBubSv4cmDa7!kEq_*t7W1t}UDSFNZ`#EBIjMfzqBQ^&{Pw zW7a$^0=yy-R#-zOC2zK=dhYzViFc!hOx32y#G_x6#EW*)rg`li#=;i@-KMRxD^O&hM{@Vv&tL#*EuB%H$}u$dwf1PHaEYb9T>t z!Ef+$$L)FXK8;JOk+(peD7q2_{^d3g}jo} zt-^ZA*o4G zx~z!h$dg2^jyQACZ>WskdBYL7+ZlC53Cb*_KRU_w+7MZi@@^;W z%=NKCU#!=*2}N8f!Rw2w_azIg?ov@YtuB19?xgk+<91fD4B-mz+?gWpFYV5oN?-_d0r^VX^^4ciK(8;6$lYBR2lfWnP~KYX;0#I^d+IA+p3yvP zv%NN#>onFYx9VLST_k&umj`q1H@UDejbLc(9^VDA6qz@XN!LD)n-E3aj%6lK6KKzL zmb!=5Sb-}5Sc$rdsD$L`d*Grs5%rh~b$73y#KGC!UcT#u_g`NW8sr2V(PS~~JB)O= z8zZ_%52<0=FjJ&Cboma0T6Np~G;%!P&7BdoibEWI{e=@mVc`!%vo_ikYazjEWi#v6 zLLc!%6lg)%(wUWogjxR!;m^82h+YA!iD|;1)Oy0yQRngy&nWS7=%d>M+~5a};cJS+ zqn0VNa>KXgy4TZZ!0oq!*5G>t^}3tNzI=s64F*Rqf=meF{hQa&s?P;Jh{i-AVi`}J z)d}pnIZ& z<+9Sn1!2O{G1@n(@1FV(h_+c6?0$iY4cw%U)BQ>Bw!qh;B#3H^E$qJbgwg@-JH(&P zRcU^8yK1Xg`tWu!&uQZn(a%35;DtbX!sxhj=RB>|om^4$>qB#HoqV|!O$7=7SQ?Ey zGIb)qS&ES-UEE08Ot_IB;35%a(6fhJmA1!}KXsVt9&RpNw7w|L=^J{9EHUXA zq$`{tyvQKj#*tXt4r?f>(z|VUImcVh=aR+)d56xb>nQxlcL8;awS4m-u|x@d@Pp>s z*K~KkY3E072EVb1a$B$#WPJ_2YLMaCnK1nD{#$O24D%&(S-bd4XHC&Y-?)3QlH0w{ z`6WK9#k;-!th5SX>n2=fyEc&4=@8ljtxY~nF{_-mgwvX)M6>f-hkV-2BL<~^rOov; zQir75YN<0210Uswjy#Ym1$bR6dv&bZQ|wE2io^QC)gR|c-8Y}@@W{76`;s~FhHt%- z6ktr+V=vi}3;3$;@cl}gfwoe%#4f$@GIx_$=XPHL{i`0AjWtx)O7JCEVaE@Y(K^=H zU-Daf-r9_71L$b?>kvjWm7?K+`>U5ixZ~J~TSa-$9vYu7&GV8Lk!_%*zV4BVrm^yx z8tm!=XO9q0*b1HCnhl^>OS3@Vu&sA|KEEPAsJTbnU;Gx9r8GIh$f>FkVkV$n+lDd4 zocictDxMznb#~cQ*gPSAn=hOuGUWKkm~M`g)?stHBTRPOcR2lXtiyFtJa@yC9-AmW zkR%z;jJ2v7`u10B@hJOoy-V{Qd77!~nY`;Y_b`eKW$w9$dybtPQ@`PgooU~an%2|7 zvsgi#_sn!PF`r$Il!)%Qx~^;MO8Nvi2e2{zkUNR}QH(_~yDDry=GbLBUbQnN(|Jec zmEX5M{af5G9M3iS01NJ?*Y#ApOLjCfpdJTDIz(vQD%P{NsZ)1ZpL;YhRvQ4ZD_0=2!o({k_n)`aB+*hhD^f%)P(v+n~ASV9Qvk_ah|P&!<~h%6Tcg)+*#&9cSHb@kcf)WlB}0 zm5Bk8@=4K8Osr|eBm}x0qPfL!+>>sSFLU`#aG^K0Z@zqILE7`U{yuRlJ$|?w{3Xkb zu_L3^L!!83gmZ3}<4mpxdnzW3j9ro6siSji_QPNt|)N-JV-E4>+yEi-4tEltc z8Lv6o=Lecz=xrFe`J+%tmNe)Hno^!gVEvxDJSx=evcNv`#J>Z zMJ+zCncuwQ#MtEHy$ugKr6s^{5%AOy>Dk>fUP5TnWV9VtumyMr`=?&8yMnAYm+J#+)@@HNH^Z$1BEa8b>R4KLke;)NHxRpLCyyPbbh zQ!) zt+%Jb7L|cn)w%b9SsPwznfHsL7L90aa?iD%1n1buMdoeT3CgdN*B!G4sw65@Q8e67 zoow7su)e#&sHQQ#lAdN|7s?|WeeLywh&9cufx*zZwWr_Ioc1EB1KGb;iyAR-ma!Vh zj@={FGMCt--1t~wmU7KK7tqPo7o_L+%x+z#u2@+8&=C%S;v-iZyN6P@m+{Kqlq6n! z7esYTu;tk*Y_J{v$&3m-(|o+|Aw2*<6N=H%F@x&p{BasVJ%h;fPgFN-*5Ye*vd9FV)UGwBr^a|^TLzaaDDScd!=ahbSa_ok-!)}oN;%F?5y!9v?K9~UR{ zK8uL%0mZ8#*Cw9`t}LrBkJFqlX_0@3JN}wHdO`Ff;%uErxFfqRTcCJMN4KoAs5s-q znpZr)X$7Iy_49ppu5pho3qxd!TsH{!(d*+&*y!XlQ$Dz!t*C~WfZ|+mOZ;VPwScM1 z1l!45>~eQ9PRAXK4&%16OXq^cQi7F>+#oZ|yz!TM?K7**!xWZZI-Tg9>oUIlKqc@n zcR2&2$Z^Z^AP#Jc>j3mo!o43);u|M6jHk^zs%iA&d{c6?y?;zzU#+v3)YO<24V%*X z7Cq(1LYw1o*U>9;1=(Jh4QO(iG{Wz8DO}l2{_18CEkH9i`n=W4!eTS9i~sJ*%LLeP zYOs8mp8!QO7vD)+|5)o&(V#t2@By1v##5tl0DZ)Bv!IGWzwxoYkZ#F54E1!#26h30#N%Y(C_Dl!L%|WKr$+#QnkIz+N4lfQLI|`A#zS3XrLIv# z2!m1=u~vYAU<4hsE5`6D5p8kR#1eVc9jSs6(bQm4qd=$xI5Zh9M8RP_NDzv;$N?{e zTHdb)iU=J*$nNSQHZU_G9Xt^&BrhW`1CrLGV7z5TG?;|ch$v@>xvu_i3hJA>h%1>) zfB=C$K0Y!&ax!?L3lOZLq5=fT0%c{TsR(J3uLl`Uk@g^+-lzD*p^GLVi5LPIgZB{H z=Y%8hUSxF<5o){8AO7J8Fxa2;9;DwYQ1t*(-~=F81_Z?6fPc3jk@dW(B)=W{UoA+M z)I&C)Ihus`A|lax-e?c<>AzE;kbl|}yolI?a8O7f8jHqJp(JXr;D2;!0EL_S70t$pgfK*hZQ3?ozv^*FkD~&)YI7=(3z*XcFK}Z!PxXRzCpdKVL+yjZ; zr=pU}V5mIKAcQ;!3`R=JqLjhX^3GsoX%!F(ER8}Sl&D{M6%bthZxp6P3^gm^*uQ(V zPlcjVq2!x0tH8-4yaH_h(4Z(gHwkSgM+)E zfdmhigNA*_23-|`^6h17lxiXnzXMfmP#{O_E%Kzsgr`!xlyn1d!Ep@X!Az>&W?A;Gt8AGufYFh*MD;TD+T@)_`mG>|0WmHUmG5@2lZEw4|O}U{iR5Y zx)q{B7#rwPpFaTrgVFdTYKf6xXiK90+s?Uv(Eu_sPf#oA$xxUc{pUj*G_*n?b9T0P_aeCIA2c diff --git a/xml_converter/integration_tests/test_cases/texture/input/pack/texture_one.png b/xml_converter/integration_tests/test_cases/texture/input/pack/texture_one.png index 5b7d11285e8f0343fabbd63aef707b59b4f7b5de..392885bb045268983c0e7f9a7151abceeebad090 100644 GIT binary patch delta 81 zcmZoNPM#p)&B)Bazz|_)b^u7R1^9%x{s%G`7#tT1fg~h6T^vI=t|uoXBs@q=5J*f& eaCH6Tz{$qIa+M+E%Ahn*ZelF{r5}E)WwiVL= literal 6530 zcmeHMc{tSD{~wVxdu1t1qwKRU7$mzPyJXjF7-6QFk)>q0wp)@)$`*<&Awsz%d)7jw zLb8<*KegA8o=QDFY=e*vp_j$k0`<&-}p84I@+DuqbRuBXN z2@}kX?SWq*;1T5K1-?o1dA|W|xiCj(wmmTz%wW>JY5r6&JCs2MQ$uLpAW+CqsY}4o z8L-G&ubQ_2@2;5CmWvP4Etlzb?$iLsIX)E zK%YL&_wKzL!Q38_XWdd5s2fr5WfL9_irwHEqSE@+<}UU<4ZZVDf5bMN_7O5jZV+a! z>j>S^l#x=+H#sYET+)L#If9uJC)pgloACOT>Hd>*#tS!jL_%K{+`iZhVLANOVy)0$ zn>CVK{Z_bIr;1ry+n05|dw5}dN$e9+ZFp(U`@s_4QsKsV`I)Ne2P`L z+&#)nMpA2f`$XUO>e zyEHlSfCUW%X>g9py2dpNp+=ZlZrY-JAV&)~oAxjRdc@{>JO8m;C)0e4pKe7uw?b_i zS}HX!g{rhp-*s08m8uI?C#G_UF|x+8b|*l5GfgPWpfJ(tDov~Fb^v6CWF zB5{2&Nr{s(FuN%%$UUY==AQAUP5Yn{?GmB{0x3pO9ps0Q<4VDcCG^mmJ5qiZEHCOT zxCfO8e%dNZkthpwxF@x<*zzFS_P&ZU?iPtO@OWs4pHxZq3!9wn@W&5L zyL7sC_|>Q}cR*@0%gMZr_8sC0r;I>`%I&j-$k#7Bw7uh%j5jMwcP0%cCP|C+s4LwH zX@TWQ+L^t}W(b|rA4~N#foZXAARlCIn-yA(#@#cWO*9OCYml&ai>+JneaB9oGK(*N z)g+DA)Xl$LILKFgDu^q1A69aA?WxW+$eHE=DfcZPeT){@>G-Ah-_T0hEvLQFPUj>C7TR?E|%>5RD25QbhVCH zl?NgyYl8dL-4gRtx5dj=D%Mx{r*@S^)J2bN!Y(1BzD50Cc%`Kz#kLd%w ze>?g(ZJdio{#BszOq4^cdWCJxmSOKr9gZ4emn3Y{e{JxhrRgFK8Zj!|M6w#Nl^h?Qxm;&=^JNaeoK zu{R6MlW*qZ4`olqZYFv#jNgbkl_dClY^*p>d;ljbBt^^(3kF>$;GYP#B#SQ?Hj8|y z71K)Lo%eD)KYxJxR#KG4;T9W@5%q+&x6-M%QfKd7@BFK+ygs7ZEmzJ+{oEg4lI=WJ zP8wuY^zln6X#_?h8q1kOg;Be2@^uNkzvfo=SMZ1VqiA~O_Cej#?ul}K$MXCAo{99% z8!gM^;0<|*X3`x=uWF^LKz-5tMzb};uD?Kr&2eE z4{UG33H)KGTJNeJ9WK7#Qy#7`;cX_oiZ;o)GVi)`cJ`im2i8d~c4=Qpkm3BX-LvL_ zl6l#ZI}&A4CvV1s>@(N)XKlawr1X9%yoXN(Y_?q~FV{&`)$ow|lB~hD^!T7)1R=pE$DgrH+;30n<%M|nD$()C<;-{|Ab1p@vK&-$6r zt$gk$w?XAS*RymY(&y!D&b33Mo~nr@2u>9mm`I@#N(vIa{hOS|hVsqPD*wEaUsx7dy(g72^I?%WI*!gi)Xr_c`IE4O_L(oRy>o=v8s?%d_`t_!>~mee zEhITf6(zq3R9@fp+#xSF{*;`~_RR>ki}Uxt~q+!mJCL4;n6&SjWz>r)9DP zy#y|-*2<4}=qMDsj`6%S%4fp4OBUi&+pl0mdRKdotH}B6tQq;_(4{7sy}w1& z(M%;iwjc3!)A>J!4R9$vdNZ&GK9}Rp4K1Iad5CKWRw`>Rdu|*0lwtLy!0?U|93{R- zC9~gcOB&9+LQIhrqW3$ZqDfk(RByy!M|IIY*Wl{MYFAUe>YO*3t#X|`eRONe{f8pz zmmx6d5gMIAOgicAxpE~kg`N{vEsa)lGx5gT{aMslF#38>#j6_YSt)Yx9hhRzGW?v~8^NjUf*v~_hTfFm_`)e zwlu==Q_jy|AN})egeE+kf(EY!T%YzHNW~o+ z&1?xg;CMILd6*e~R?oa;-_ABKhkVF31DymdN};urv58!@ph=;aU#yede%P8=I%c;j zEGhbMQ`4EY;@?hHmWh-_gFkXj%#P(vL-u@ut5zi}jMXU2z0-U5g3GY96>~jcYae@f z|DFkwQXM4DQ`}fIQZ=!o2j#s-RbX@>=nTkfj-=bY{yh7t<$aee{0Xh-9z?)I&_t)z z@Yo%jokSCtJ$seqac`nq&$u7dJu&Ida2ZPzM`xugCW)Pj-R|UiX`9vQkZ7%9Km02p znKK6-xMfz`$70`gdPzTc({1TqpdHDxy_{bFvemIXO2WU@cYsild}XcXOvC7s8F%cfk99M7Q4IdXeZHmJ#G%!2;88++*U z`S*Sfr{uXth8x?092}N`k}+qlGudkJLNq4!xO|BIReIN^`rG?n7e93)D-?+CORu$f z0pg2qw2iv?^!SUB{-NOpAKA4vP+kMGPMaV;1{CzNG@x*Iw%U&;(*s~c3Y|oSg#<8w z!X5RVNAl3?D#W14!(#*q{REIEYM{?Lx zzgJK<1P>4dP}xLqNPvGJ3m>8f+2F+kZB92F0^WeI59>jkt!%+YbS4#yfni_>s7VOz zCmszK!9=Z_xS}dtgQZ~4`h8)0nh^;LS(>^ zFa$gx0RE!|i*0fgAo(_-|7yW<1nxg@dn$__#3WNqj#2~Jia%0N$bZ{2f|&jr;ZVqM zsy{UVfU*Fu$e&!A5v*+gw%|zMLknPRSOH@Hgk;ma{}Jn_xp77|!ufF`fcf9NKcTBqCG`OT|JlI20O6LSr?dI0Qvo zQ&W=!45NOaA_TJ7#6U8YLj{n-XaEltMZ#&3(PSu+Od>%sS{N);OPfl8Y7)^D5(Psf zVzm)JP}neOKvoj{f1DMEiULrP00u2BfJMt2gMnha(G(~Ng~ma(02UNNn@pyBqoR=U zrgUZi5m-)I0MUmEX9W6e_}~bRH?Sq>K~S)-UN?Gd{fTUEz(5bOpB5Mt@(|V~{8$2Kf)jiOOUFnaJTpB4FsRyqsmh1Hk~o5;=Ja5PXjkZ^Wb$ z*>t8Oo$jv(;Y+u|F&2}KuZLL3dNu?z+w@#D1g?QSSSjM)xv1w zw1EV`{>;vzd$WUyOsato5GfE1kU$&JfK@i6RQ(wp>`Ue7gg{}S2s9L_>4-w$vD$bb ztq>SI0s(=43mDGX)!!r5h5sK-bTIq$7oqxWfjz5Cmfb zN9jl8)!xSW>?rfb7+52J8_za0YV0;RBr3-AeXWnlOZWL78bw*yj2o-U3d9M^eIZscW9;9%I0 rBr}I2=D`2>r0Y(XSlUl7o*^&B@`)jCK9|=7plSwBS3j3^P6k=~n#p!5z>r3n^9 zDT)YU!9tUErHOzjf&%ge^m@JXy?^e^_x`(?IXUO-{j6uL_3X9xWKE*XO%3_D#kfHr z5Fg$MXTiMlFfVRScILO!LO}=!#4G1duwhsbeZgKdstefz05i^b0bsz7>;eM$^;cYV z_Zh_O2;HFXs%5>%x?-~N3}y-uRK` zt0l3M5#K*XDE6$q1M*yR-9*?-Cs0Sv%SDfVzkg7;?%{KS@pm7d^Ft3OzYp-W-*{l% zFx8F#KT`r;_!msBghz=vP*>S6pF>#kV8WQ^0X?03p_Br_}-=;L$BS3M4J4Dwa@m{ z^kntvUkWXIQG2ZcnuU5GnB`Qm(_i+Xb5?i)T(R46H5zjRpdQPc?-`?bYj9 zd1V_BTw^R4q`BtX>9J4ez^1SI85#E}4|C`tnfQThBYo%5U|{_4+XEZp_tvQn@|%CBA?A zd*69j&V*!di%uu|gl}(S+NXh?Z>Mm4C=idSR-|i4VBn7MzGHWc;D7Mema*69ZZ{|; zsx?Wm2iKf?`eFDwebk^gaaDToL<)an*s%VSJq!oj+}S~GJ<9PtVjR^6c)G7y%dFmz zgeHr8d!ikGI`g2>(CSoWDo^v-wK8FRr{ddCT!82hsn_%L+V1-F*GT+S>IXI3Fu4MVd>5zS(Egy|~79VA=b+(p_L!yD-u)%3mrk;{8_x z&iU0F7U@82iM4D`{jr1ri0zG}a9xS}@8f0_S0Kydx3$$(kCu{<>F=*zlTkc_H1 zvpAmQ_e&g>gQ&)X*<)GvgF5y)&utJB zX*VxI?xwJYsZhY(ti~>b`MtBbKvZ|$CE)3)NnY3H%(a>7dp#+3B0LijV)Z5&GXf#) zyfQYVz4afeoiydlAUpLB-;1r`Y>P{I(Wb5J*r~$xN<-(BVrr&%+N~-*r^(cP{vZ*d z&@feVxd&`~+PziMDf4_jJ&#KEEgTYW9IrHoeLtRJaj9eJ?9)Hs4hGR#Y}V->Pm=^3 zT4~N3FI{Gy$q5o=E@p=+`Mddm1fm`UtcpK&Se98MD4WYK>MaJk<1&lG3c8NoA4Sy% zOvM=P+=q~^EDGy8LUD3T#V>sq7(Ure)8BY-2f2SjTQdFl$fIjlQ#X<_@GdFQuj@=m`y5Q%jYw8WIL;(y&dhrx!t-7uM0AKHhRoNY@YEk74|spnt8M>MB=+EqoAje_nfxN* z!?)ATn_4^9F@@`ED<5!JmnI3H=juLriR_t4Shr7|ng3E!^y~}wqv2X0EtT$b{@qjnImb`N zid8iUQK0I2a&M(}*V~2Q*nm^b2bbvHFGSz;g-`-9p;HI$i>})AKG8jJXaR?pS9J?^ z!MW=5h@E{JqkJ5qnAgL4YvgXHbMM}r9=bL@F(dW#*^BH{eFti8nwT;!gmx<00e2&= z|CPs40>oRjTi22_WK{J&4N)vnSKlXPAQlJdaL4W4wQpT_E&I9bi#^)qJG@s`OS|$% z*G`VE_EK1Vt+M(#;&rmqxYG>d40%mZDi7;qT9R}o2+`6t8EI5vx&V;dWiIn_w4VJ$ zO-F6thb8lpm59TG!y}M8@fjqZ5brHJt%J8{Jti12<1vY^`>Z3ZT@n5q$6uq}e+E*emss3k zVmoaJ4O;!gzBtD^_|WRmYQ&DwyI07sx?RI0E3o%Ia_+zKtw^GiFH`%&H?$T8`poLe zVcEO(eS--BBsqe#?fuUM=rBo5yd0MICfDqu=$lvPD>bJ5U1O4UPTAs1T&Q93YdUr5 z$92YzYuasaS}x05mcBAqI)SXZC@{&IdF9+QTx&#h0Z+$HbBydR_cITM7R@oR@ug{x zwWr?N>tAo|mvmp++6K3>!jux)R7n%YF4VUMa^5LTRitg`@U92%= zi2+YoD@HCQJxcnNN1}ce5tbf{_l(?;o07)RWmrnkBqesy=e6Gm4)baO9X5p0uaCM4|G-nC9^eOxJm z{T_BD&?eq&kwVvj&UyKsyO809hUtDbWJOuwKB`z+!s7du!n4_b*@=NIBP zbTN(%XlQFFBjsM^pTfW2FiTaM!m9_Q+J`~R&g`vAEGw9q5vq>x6nPW#;CRTWd|8*x zfx}P`=@VV8^c<&EBQ(IbNT}`TlW}ZJ@$|||jh7`A(m`cCUPsF>o1dMl%Sl{~`s4jj zPj^_oxI%)}#0_`ZbW$^~a+Oc7V^85-yO-;OBh-|&)LlaZNs{UdA;5(i+vRtK+v5&> z`h3Hwz^iX#ti--sKWIGiq02XT`BzpKrFYBeY0a~8a5)<54MUZ%dmYQhJ!#X zp=3QhbG)A3pB)3UPslib5o^?XNW9&_vJkRM=Rl-}bBU=HPJdrLw|?_2CuM;&5jgIL1e$f6zU>BjxCC#!5;W+HFm|;0Uv`6C*P_I2)5A7!sADLUg7& z0V;kJFJ^}a0%;xe^CFVm0S4F!a3y#O36QlZjZVF*o4O&A;rLn5I} z1eAWplR@-@deWsgDSmL^06K|A_F|B!p5RSRq7&7dfrUVr^WZ<@qj;H^{G#`y|5Smg z2h5M?1w*L7VH67NcMCd0--k)^Gob%!K_@U9VVDI#r+U*!fW8ml$&mh?!kP5T-piZj zv6YT92?lro6eg6;^osbKOGCVg`7eu230%n(uPrO4*ndMZ$S!}0^|#nIXSUM$JrJh( zFW$eQ|IB?0%tV=(U~p8D_hxu_92TRx+YYU z2q!{S)zL^zK!b=NBAtGt!h6ygL{Ad1NyQ{rAv1a40MSWR0|20EB(w$;tqGu^nkXk# zs0I;0s;QyjE^t-V-zdyzWM)+oJ${dBlggP%rG_SII%_xsP$FEz35s?`I6;XnY6vI^ z4oAZ^HB{9QF3ww2&LoThl|~^lmy=8(x&kmSPuH!9O~Elb=6EawsRI9N#N30(aA6u? zAxFrb-hO{g5Xcn3l0n>56QPcPt0Pfr8fs`H3XW3$3uFb*=*&vo_Q)$Xioj@K)Jkh@>A*=tLjjhXzc$A5$bZqNgjs+}}S7>d$fVe_1RPN(1Et*HDAP z;Ybt|t)Z$8C8AXkP$U|GaCQOI5hzXMRvN$9=~NenFOdf5xH2jU6roN)A~0|S2FY}Y#=zka*w2Jvo4fkYjJ06@M-#0rz;DL@)9%L@ z^LSyNR} z>;FwI?!Ouyz?1na$d}p9z?XLa?cf)BT+JQDi6NNPCJKpxX1sWJ#}uPRH=X14O>vdFj=}!{ Dw)l`f diff --git a/xml_converter/integration_tests/test_cases/texture/output_proto/somedir/texture_three.png b/xml_converter/integration_tests/test_cases/texture/output_proto/somedir/texture_three.png index 5070d39284dde6276966b1c826e5b26e3707945d..3faad497c7014401f2a8b43c0fb9c33ee9faaaa2 100644 GIT binary patch delta 87 zcmexipE*Gykdc{zfg!@q>;RBr3-AeXW%v(dG2}DXIRhybQv6MhbH##y;}guQyZkZuOiF-V_J)2O?t1?dx0Tc@31y34H_IyS9%j~TS#E3Xs%7#LSG|o><6s7QNxd?f zo8!L8)_no{_b%@ZD0KVs9aPr9x~4 zb{2r^kJ*az3$K)nn8zKmxk+-vrsZV4&3+$lu=q6gZzix+N7N5qM~8%i=2ZcQ;a zVTzLe#&;o3WhT?Ow3f^1{0-66%SMIym#o$A^12t*rrEi>cMqSaT_aD0zk9mS5Fr3F zRo{B!jt^Pog|{T?3!wY^?%xgw7L@Bz>ng6i!F3)QtP4%bH%zTzsGjLzk}R$IBJr?v zbGCZ4B)ehnh5P1a#%R`?Q|q?}pJc2f86FZi23(Y5BoJ#9E1qMoP5iyNP6b=MDtuKs z-x2lM24$HIdnnKxqFo%_rQzrDey!l@vfxh7^lB4+`Ei!q{L{v-?_C=GXQ~U)uGsiH zQkJ=nS&O#|Yu{XU(p|aNxj4}|*4cA&#kV=yS24pG&Xq|;_x!WQ zXBuP_%7#QsXB3PcV`Ny~GQ4n>(IgovroOW}NhOi@i;k;^i33_ix+!uQ;vK#G*f)W2p%k zdEui9GPNHvj;)2WOz_SY?>*YACrf;&r{t4dc5a?^Q4sXG`|Q)AcCNWkj^*@Qjq#eC zoU4k6f)0x_4)r{@iKf*%MpxNx<@rC=R~=BA)_~q`+NA`{?LGghF3fm;d8@|j4L;E| zI)#Y3VqEWABYDG*^QNLK14{B$5pR1EHuAgaQMZa$DY5Ux8kO7R3wZ-Ska6k9cNZ%W zi&824 z!g^BPJscHMHe=W}H>QCBubSv4cmDa7!kEq_*t7W1t}UDSFNZ`#EBIjMfzqBQ^&{Pw zW7a$^0=yy-R#-zOC2zK=dhYzViFc!hOx32y#G_x6#EW*)rg`li#=;i@-KMRxD^O&hM{@Vv&tL#*EuB%H$}u$dwf1PHaEYb9T>t z!Ef+$$L)FXK8;JOk+(peD7q2_{^d3g}jo} zt-^ZA*o4G zx~z!h$dg2^jyQACZ>WskdBYL7+ZlC53Cb*_KRU_w+7MZi@@^;W z%=NKCU#!=*2}N8f!Rw2w_azIg?ov@YtuB19?xgk+<91fD4B-mz+?gWpFYV5oN?-_d0r^VX^^4ciK(8;6$lYBR2lfWnP~KYX;0#I^d+IA+p3yvP zv%NN#>onFYx9VLST_k&umj`q1H@UDejbLc(9^VDA6qz@XN!LD)n-E3aj%6lK6KKzL zmb!=5Sb-}5Sc$rdsD$L`d*Grs5%rh~b$73y#KGC!UcT#u_g`NW8sr2V(PS~~JB)O= z8zZ_%52<0=FjJ&Cboma0T6Np~G;%!P&7BdoibEWI{e=@mVc`!%vo_ikYazjEWi#v6 zLLc!%6lg)%(wUWogjxR!;m^82h+YA!iD|;1)Oy0yQRngy&nWS7=%d>M+~5a};cJS+ zqn0VNa>KXgy4TZZ!0oq!*5G>t^}3tNzI=s64F*Rqf=meF{hQa&s?P;Jh{i-AVi`}J z)d}pnIZ& z<+9Sn1!2O{G1@n(@1FV(h_+c6?0$iY4cw%U)BQ>Bw!qh;B#3H^E$qJbgwg@-JH(&P zRcU^8yK1Xg`tWu!&uQZn(a%35;DtbX!sxhj=RB>|om^4$>qB#HoqV|!O$7=7SQ?Ey zGIb)qS&ES-UEE08Ot_IB;35%a(6fhJmA1!}KXsVt9&RpNw7w|L=^J{9EHUXA zq$`{tyvQKj#*tXt4r?f>(z|VUImcVh=aR+)d56xb>nQxlcL8;awS4m-u|x@d@Pp>s z*K~KkY3E072EVb1a$B$#WPJ_2YLMaCnK1nD{#$O24D%&(S-bd4XHC&Y-?)3QlH0w{ z`6WK9#k;-!th5SX>n2=fyEc&4=@8ljtxY~nF{_-mgwvX)M6>f-hkV-2BL<~^rOov; zQir75YN<0210Uswjy#Ym1$bR6dv&bZQ|wE2io^QC)gR|c-8Y}@@W{76`;s~FhHt%- z6ktr+V=vi}3;3$;@cl}gfwoe%#4f$@GIx_$=XPHL{i`0AjWtx)O7JCEVaE@Y(K^=H zU-Daf-r9_71L$b?>kvjWm7?K+`>U5ixZ~J~TSa-$9vYu7&GV8Lk!_%*zV4BVrm^yx z8tm!=XO9q0*b1HCnhl^>OS3@Vu&sA|KEEPAsJTbnU;Gx9r8GIh$f>FkVkV$n+lDd4 zocictDxMznb#~cQ*gPSAn=hOuGUWKkm~M`g)?stHBTRPOcR2lXtiyFtJa@yC9-AmW zkR%z;jJ2v7`u10B@hJOoy-V{Qd77!~nY`;Y_b`eKW$w9$dybtPQ@`PgooU~an%2|7 zvsgi#_sn!PF`r$Il!)%Qx~^;MO8Nvi2e2{zkUNR}QH(_~yDDry=GbLBUbQnN(|Jec zmEX5M{af5G9M3iS01NJ?*Y#ApOLjCfpdJTDIz(vQD%P{NsZ)1ZpL;YhRvQ4ZD_0=2!o({k_n)`aB+*hhD^f%)P(v+n~ASV9Qvk_ah|P&!<~h%6Tcg)+*#&9cSHb@kcf)WlB}0 zm5Bk8@=4K8Osr|eBm}x0qPfL!+>>sSFLU`#aG^K0Z@zqILE7`U{yuRlJ$|?w{3Xkb zu_L3^L!!83gmZ3}<4mpxdnzW3j9ro6siSji_QPNt|)N-JV-E4>+yEi-4tEltc z8Lv6o=Lecz=xrFe`J+%tmNe)Hno^!gVEvxDJSx=evcNv`#J>Z zMJ+zCncuwQ#MtEHy$ugKr6s^{5%AOy>Dk>fUP5TnWV9VtumyMr`=?&8yMnAYm+J#+)@@HNH^Z$1BEa8b>R4KLke;)NHxRpLCyyPbbh zQ!) zt+%Jb7L|cn)w%b9SsPwznfHsL7L90aa?iD%1n1buMdoeT3CgdN*B!G4sw65@Q8e67 zoow7su)e#&sHQQ#lAdN|7s?|WeeLywh&9cufx*zZwWr_Ioc1EB1KGb;iyAR-ma!Vh zj@={FGMCt--1t~wmU7KK7tqPo7o_L+%x+z#u2@+8&=C%S;v-iZyN6P@m+{Kqlq6n! z7esYTu;tk*Y_J{v$&3m-(|o+|Aw2*<6N=H%F@x&p{BasVJ%h;fPgFN-*5Ye*vd9FV)UGwBr^a|^TLzaaDDScd!=ahbSa_ok-!)}oN;%F?5y!9v?K9~UR{ zK8uL%0mZ8#*Cw9`t}LrBkJFqlX_0@3JN}wHdO`Ff;%uErxFfqRTcCJMN4KoAs5s-q znpZr)X$7Iy_49ppu5pho3qxd!TsH{!(d*+&*y!XlQ$Dz!t*C~WfZ|+mOZ;VPwScM1 z1l!45>~eQ9PRAXK4&%16OXq^cQi7F>+#oZ|yz!TM?K7**!xWZZI-Tg9>oUIlKqc@n zcR2&2$Z^Z^AP#Jc>j3mo!o43);u|M6jHk^zs%iA&d{c6?y?;zzU#+v3)YO<24V%*X z7Cq(1LYw1o*U>9;1=(Jh4QO(iG{Wz8DO}l2{_18CEkH9i`n=W4!eTS9i~sJ*%LLeP zYOs8mp8!QO7vD)+|5)o&(V#t2@By1v##5tl0DZ)Bv!IGWzwxoYkZ#F54E1!#26h30#N%Y(C_Dl!L%|WKr$+#QnkIz+N4lfQLI|`A#zS3XrLIv# z2!m1=u~vYAU<4hsE5`6D5p8kR#1eVc9jSs6(bQm4qd=$xI5Zh9M8RP_NDzv;$N?{e zTHdb)iU=J*$nNSQHZU_G9Xt^&BrhW`1CrLGV7z5TG?;|ch$v@>xvu_i3hJA>h%1>) zfB=C$K0Y!&ax!?L3lOZLq5=fT0%c{TsR(J3uLl`Uk@g^+-lzD*p^GLVi5LPIgZB{H z=Y%8hUSxF<5o){8AO7J8Fxa2;9;DwYQ1t*(-~=F81_Z?6fPc3jk@dW(B)=W{UoA+M z)I&C)Ihus`A|lax-e?c<>AzE;kbl|}yolI?a8O7f8jHqJp(JXr;D2;!0EL_S70t$pgfK*hZQ3?ozv^*FkD~&)YI7=(3z*XcFK}Z!PxXRzCpdKVL+yjZ; zr=pU}V5mIKAcQ;!3`R=JqLjhX^3GsoX%!F(ER8}Sl&D{M6%bthZxp6P3^gm^*uQ(V zPlcjVq2!x0tH8-4yaH_h(4Z(gHwkSgM+)E zfdmhigNA*_23-|`^6h17lxiXnzXMfmP#{O_E%Kzsgr`!xlyn1d!Ep@X!Az>&W?A;Gt8AGufYFh*MD;TD+T@)_`mG>|0WmHUmG5@2lZEw4|O}U{iR5Y zx)q{B7#rwPpFaTrgVFdTYKf6xXiK90+s?Uv(Eu_sPf#oA$xxUc{pUj*G_*n?b9T0P_aeCIA2c diff --git a/xml_converter/integration_tests/test_cases/texture/output_proto/texture_one.png b/xml_converter/integration_tests/test_cases/texture/output_proto/texture_one.png index 5b7d11285e8f0343fabbd63aef707b59b4f7b5de..392885bb045268983c0e7f9a7151abceeebad090 100644 GIT binary patch delta 81 zcmZoNPM#p)&B)Bazz|_)b^u7R1^9%x{s%G`7#tT1fg~h6T^vI=t|uoXBs@q=5J*f& eaCH6Tz{$qIa+M+E%Ahn*ZelF{r5}E)WwiVL= literal 6530 zcmeHMc{tSD{~wVxdu1t1qwKRU7$mzPyJXjF7-6QFk)>q0wp)@)$`*<&Awsz%d)7jw zLb8<*KegA8o=QDFY=e*vp_j$k0`<&-}p84I@+DuqbRuBXN z2@}kX?SWq*;1T5K1-?o1dA|W|xiCj(wmmTz%wW>JY5r6&JCs2MQ$uLpAW+CqsY}4o z8L-G&ubQ_2@2;5CmWvP4Etlzb?$iLsIX)E zK%YL&_wKzL!Q38_XWdd5s2fr5WfL9_irwHEqSE@+<}UU<4ZZVDf5bMN_7O5jZV+a! z>j>S^l#x=+H#sYET+)L#If9uJC)pgloACOT>Hd>*#tS!jL_%K{+`iZhVLANOVy)0$ zn>CVK{Z_bIr;1ry+n05|dw5}dN$e9+ZFp(U`@s_4QsKsV`I)Ne2P`L z+&#)nMpA2f`$XUO>e zyEHlSfCUW%X>g9py2dpNp+=ZlZrY-JAV&)~oAxjRdc@{>JO8m;C)0e4pKe7uw?b_i zS}HX!g{rhp-*s08m8uI?C#G_UF|x+8b|*l5GfgPWpfJ(tDov~Fb^v6CWF zB5{2&Nr{s(FuN%%$UUY==AQAUP5Yn{?GmB{0x3pO9ps0Q<4VDcCG^mmJ5qiZEHCOT zxCfO8e%dNZkthpwxF@x<*zzFS_P&ZU?iPtO@OWs4pHxZq3!9wn@W&5L zyL7sC_|>Q}cR*@0%gMZr_8sC0r;I>`%I&j-$k#7Bw7uh%j5jMwcP0%cCP|C+s4LwH zX@TWQ+L^t}W(b|rA4~N#foZXAARlCIn-yA(#@#cWO*9OCYml&ai>+JneaB9oGK(*N z)g+DA)Xl$LILKFgDu^q1A69aA?WxW+$eHE=DfcZPeT){@>G-Ah-_T0hEvLQFPUj>C7TR?E|%>5RD25QbhVCH zl?NgyYl8dL-4gRtx5dj=D%Mx{r*@S^)J2bN!Y(1BzD50Cc%`Kz#kLd%w ze>?g(ZJdio{#BszOq4^cdWCJxmSOKr9gZ4emn3Y{e{JxhrRgFK8Zj!|M6w#Nl^h?Qxm;&=^JNaeoK zu{R6MlW*qZ4`olqZYFv#jNgbkl_dClY^*p>d;ljbBt^^(3kF>$;GYP#B#SQ?Hj8|y z71K)Lo%eD)KYxJxR#KG4;T9W@5%q+&x6-M%QfKd7@BFK+ygs7ZEmzJ+{oEg4lI=WJ zP8wuY^zln6X#_?h8q1kOg;Be2@^uNkzvfo=SMZ1VqiA~O_Cej#?ul}K$MXCAo{99% z8!gM^;0<|*X3`x=uWF^LKz-5tMzb};uD?Kr&2eE z4{UG33H)KGTJNeJ9WK7#Qy#7`;cX_oiZ;o)GVi)`cJ`im2i8d~c4=Qpkm3BX-LvL_ zl6l#ZI}&A4CvV1s>@(N)XKlawr1X9%yoXN(Y_?q~FV{&`)$ow|lB~hD^!T7)1R=pE$DgrH+;30n<%M|nD$()C<;-{|Ab1p@vK&-$6r zt$gk$w?XAS*RymY(&y!D&b33Mo~nr@2u>9mm`I@#N(vIa{hOS|hVsqPD*wEaUsx7dy(g72^I?%WI*!gi)Xr_c`IE4O_L(oRy>o=v8s?%d_`t_!>~mee zEhITf6(zq3R9@fp+#xSF{*;`~_RR>ki}Uxt~q+!mJCL4;n6&SjWz>r)9DP zy#y|-*2<4}=qMDsj`6%S%4fp4OBUi&+pl0mdRKdotH}B6tQq;_(4{7sy}w1& z(M%;iwjc3!)A>J!4R9$vdNZ&GK9}Rp4K1Iad5CKWRw`>Rdu|*0lwtLy!0?U|93{R- zC9~gcOB&9+LQIhrqW3$ZqDfk(RByy!M|IIY*Wl{MYFAUe>YO*3t#X|`eRONe{f8pz zmmx6d5gMIAOgicAxpE~kg`N{vEsa)lGx5gT{aMslF#38>#j6_YSt)Yx9hhRzGW?v~8^NjUf*v~_hTfFm_`)e zwlu==Q_jy|AN})egeE+kf(EY!T%YzHNW~o+ z&1?xg;CMILd6*e~R?oa;-_ABKhkVF31DymdN};urv58!@ph=;aU#yede%P8=I%c;j zEGhbMQ`4EY;@?hHmWh-_gFkXj%#P(vL-u@ut5zi}jMXU2z0-U5g3GY96>~jcYae@f z|DFkwQXM4DQ`}fIQZ=!o2j#s-RbX@>=nTkfj-=bY{yh7t<$aee{0Xh-9z?)I&_t)z z@Yo%jokSCtJ$seqac`nq&$u7dJu&Ida2ZPzM`xugCW)Pj-R|UiX`9vQkZ7%9Km02p znKK6-xMfz`$70`gdPzTc({1TqpdHDxy_{bFvemIXO2WU@cYsild}XcXOvC7s8F%cfk99M7Q4IdXeZHmJ#G%!2;88++*U z`S*Sfr{uXth8x?092}N`k}+qlGudkJLNq4!xO|BIReIN^`rG?n7e93)D-?+CORu$f z0pg2qw2iv?^!SUB{-NOpAKA4vP+kMGPMaV;1{CzNG@x*Iw%U&;(*s~c3Y|oSg#<8w z!X5RVNAl3?D#W14!(#*q{REIEYM{?Lx zzgJK<1P>4dP}xLqNPvGJ3m>8f+2F+kZB92F0^WeI59>jkt!%+YbS4#yfni_>s7VOz zCmszK!9=Z_xS}dtgQZ~4`h8)0nh^;LS(>^ zFa$gx0RE!|i*0fgAo(_-|7yW<1nxg@dn$__#3WNqj#2~Jia%0N$bZ{2f|&jr;ZVqM zsy{UVfU*Fu$e&!A5v*+gw%|zMLknPRSOH@Hgk;ma{}Jn_xp77|!ufF`fcf9NKcTBqCG`OT|JlI20O6LSr?dI0Qvo zQ&W=!45NOaA_TJ7#6U8YLj{n-XaEltMZ#&3(PSu+Od>%sS{N);OPfl8Y7)^D5(Psf zVzm)JP}neOKvoj{f1DMEiULrP00u2BfJMt2gMnha(G(~Ng~ma(02UNNn@pyBqoR=U zrgUZi5m-)I0MUmEX9W6e_}~bRH?Sq>K~S)-UN?Gd{fTUEz(5bOpB5Mt@(|V~{8$2Kf)jiOOUFnaJTpB4FsRyqsmh1Hk~o5;=Ja5PXjkZ^Wb$ z*>t8Oo$jv(;Y+u|F&2}KuZLL3dNu?z+w@#D1g?QSSSjM)xv1w zw1EV`{>;vzd$WUyOsato5GfE1kU$&JfK@i6RQ(wp>`Ue7gg{}S2s9L_>4-w$vD$bb ztq>SI0s(=43mDGX)!!r5h5sK-bTIq$7oqxWfjz5Cmfb zN9jl8)!xSW>?rfb7+52J8_za0YV0;RBr3-AeXWnlOZWL78bw*yj2o-U3d9M^eIZscW9;9%I0 rBr}I2=D`2>r0Y(XSlUl7o*^&B@`)jCK9|=7plSwBS3j3^P6k=~n#p!5z>r3n^9 zDT)YU!9tUErHOzjf&%ge^m@JXy?^e^_x`(?IXUO-{j6uL_3X9xWKE*XO%3_D#kfHr z5Fg$MXTiMlFfVRScILO!LO}=!#4G1duwhsbeZgKdstefz05i^b0bsz7>;eM$^;cYV z_Zh_O2;HFXs%5>%x?-~N3}y-uRK` zt0l3M5#K*XDE6$q1M*yR-9*?-Cs0Sv%SDfVzkg7;?%{KS@pm7d^Ft3OzYp-W-*{l% zFx8F#KT`r;_!msBghz=vP*>S6pF>#kV8WQ^0X?03p_Br_}-=;L$BS3M4J4Dwa@m{ z^kntvUkWXIQG2ZcnuU5GnB`Qm(_i+Xb5?i)T(R46H5zjRpdQPc?-`?bYj9 zd1V_BTw^R4q`BtX>9J4ez^1SI85#E}4|C`tnfQThBYo%5U|{_4+XEZp_tvQn@|%CBA?A zd*69j&V*!di%uu|gl}(S+NXh?Z>Mm4C=idSR-|i4VBn7MzGHWc;D7Mema*69ZZ{|; zsx?Wm2iKf?`eFDwebk^gaaDToL<)an*s%VSJq!oj+}S~GJ<9PtVjR^6c)G7y%dFmz zgeHr8d!ikGI`g2>(CSoWDo^v-wK8FRr{ddCT!82hsn_%L+V1-F*GT+S>IXI3Fu4MVd>5zS(Egy|~79VA=b+(p_L!yD-u)%3mrk;{8_x z&iU0F7U@82iM4D`{jr1ri0zG}a9xS}@8f0_S0Kydx3$$(kCu{<>F=*zlTkc_H1 zvpAmQ_e&g>gQ&)X*<)GvgF5y)&utJB zX*VxI?xwJYsZhY(ti~>b`MtBbKvZ|$CE)3)NnY3H%(a>7dp#+3B0LijV)Z5&GXf#) zyfQYVz4afeoiydlAUpLB-;1r`Y>P{I(Wb5J*r~$xN<-(BVrr&%+N~-*r^(cP{vZ*d z&@feVxd&`~+PziMDf4_jJ&#KEEgTYW9IrHoeLtRJaj9eJ?9)Hs4hGR#Y}V->Pm=^3 zT4~N3FI{Gy$q5o=E@p=+`Mddm1fm`UtcpK&Se98MD4WYK>MaJk<1&lG3c8NoA4Sy% zOvM=P+=q~^EDGy8LUD3T#V>sq7(Ure)8BY-2f2SjTQdFl$fIjlQ#X<_@GdFQuj@=m`y5Q%jYw8WIL;(y&dhrx!t-7uM0AKHhRoNY@YEk74|spnt8M>MB=+EqoAje_nfxN* z!?)ATn_4^9F@@`ED<5!JmnI3H=juLriR_t4Shr7|ng3E!^y~}wqv2X0EtT$b{@qjnImb`N zid8iUQK0I2a&M(}*V~2Q*nm^b2bbvHFGSz;g-`-9p;HI$i>})AKG8jJXaR?pS9J?^ z!MW=5h@E{JqkJ5qnAgL4YvgXHbMM}r9=bL@F(dW#*^BH{eFti8nwT;!gmx<00e2&= z|CPs40>oRjTi22_WK{J&4N)vnSKlXPAQlJdaL4W4wQpT_E&I9bi#^)qJG@s`OS|$% z*G`VE_EK1Vt+M(#;&rmqxYG>d40%mZDi7;qT9R}o2+`6t8EI5vx&V;dWiIn_w4VJ$ zO-F6thb8lpm59TG!y}M8@fjqZ5brHJt%J8{Jti12<1vY^`>Z3ZT@n5q$6uq}e+E*emss3k zVmoaJ4O;!gzBtD^_|WRmYQ&DwyI07sx?RI0E3o%Ia_+zKtw^GiFH`%&H?$T8`poLe zVcEO(eS--BBsqe#?fuUM=rBo5yd0MICfDqu=$lvPD>bJ5U1O4UPTAs1T&Q93YdUr5 z$92YzYuasaS}x05mcBAqI)SXZC@{&IdF9+QTx&#h0Z+$HbBydR_cITM7R@oR@ug{x zwWr?N>tAo|mvmp++6K3>!jux)R7n%YF4VUMa^5LTRitg`@U92%= zi2+YoD@HCQJxcnNN1}ce5tbf{_l(?;o07)RWmrnkBqesy=e6Gm4)baO9X5p0uaCM4|G-nC9^eOxJm z{T_BD&?eq&kwVvj&UyKsyO809hUtDbWJOuwKB`z+!s7du!n4_b*@=NIBP zbTN(%XlQFFBjsM^pTfW2FiTaM!m9_Q+J`~R&g`vAEGw9q5vq>x6nPW#;CRTWd|8*x zfx}P`=@VV8^c<&EBQ(IbNT}`TlW}ZJ@$|||jh7`A(m`cCUPsF>o1dMl%Sl{~`s4jj zPj^_oxI%)}#0_`ZbW$^~a+Oc7V^85-yO-;OBh-|&)LlaZNs{UdA;5(i+vRtK+v5&> z`h3Hwz^iX#ti--sKWIGiq02XT`BzpKrFYBeY0a~8a5)<54MUZ%dmYQhJ!#X zp=3QhbG)A3pB)3UPslib5o^?XNW9&_vJkRM=Rl-}bBU=HPJdrLw|?_2CuM;&5jgIL1e$f6zU>BjxCC#!5;W+HFm|;0Uv`6C*P_I2)5A7!sADLUg7& z0V;kJFJ^}a0%;xe^CFVm0S4F!a3y#O36QlZjZVF*o4O&A;rLn5I} z1eAWplR@-@deWsgDSmL^06K|A_F|B!p5RSRq7&7dfrUVr^WZ<@qj;H^{G#`y|5Smg z2h5M?1w*L7VH67NcMCd0--k)^Gob%!K_@U9VVDI#r+U*!fW8ml$&mh?!kP5T-piZj zv6YT92?lro6eg6;^osbKOGCVg`7eu230%n(uPrO4*ndMZ$S!}0^|#nIXSUM$JrJh( zFW$eQ|IB?0%tV=(U~p8D_hxu_92TRx+YYU z2q!{S)zL^zK!b=NBAtGt!h6ygL{Ad1NyQ{rAv1a40MSWR0|20EB(w$;tqGu^nkXk# zs0I;0s;QyjE^t-V-zdyzWM)+oJ${dBlggP%rG_SII%_xsP$FEz35s?`I6;XnY6vI^ z4oAZ^HB{9QF3ww2&LoThl|~^lmy=8(x&kmSPuH!9O~Elb=6EawsRI9N#N30(aA6u? zAxFrb-hO{g5Xcn3l0n>56QPcPt0Pfr8fs`H3XW3$3uFb*=*&vo_Q)$Xioj@K)Jkh@>A*=tLjjhXzc$A5$bZqNgjs+}}S7>d$fVe_1RPN(1Et*HDAP z;Ybt|t)Z$8C8AXkP$U|GaCQOI5hzXMRvN$9=~NenFOdf5xH2jU6roN)A~0|S2FY}Y#=zka*w2Jvo4fkYjJ06@M-#0rz;DL@)9%L@ z^LSyNR} z>;FwI?!Ouyz?1na$d}p9z?XLa?cf)BT+JQDi6NNPCJKpxX1sWJ#}uPRH=X14O>vdFj=}!{ Dw)l`f diff --git a/xml_converter/integration_tests/test_cases/texture/output_xml/somedir/texture_three.png b/xml_converter/integration_tests/test_cases/texture/output_xml/somedir/texture_three.png index 5070d39284dde6276966b1c826e5b26e3707945d..3faad497c7014401f2a8b43c0fb9c33ee9faaaa2 100644 GIT binary patch delta 87 zcmexipE*Gykdc{zfg!@q>;RBr3-AeXW%v(dG2}DXIRhybQv6MhbH##y;}guQyZkZuOiF-V_J)2O?t1?dx0Tc@31y34H_IyS9%j~TS#E3Xs%7#LSG|o><6s7QNxd?f zo8!L8)_no{_b%@ZD0KVs9aPr9x~4 zb{2r^kJ*az3$K)nn8zKmxk+-vrsZV4&3+$lu=q6gZzix+N7N5qM~8%i=2ZcQ;a zVTzLe#&;o3WhT?Ow3f^1{0-66%SMIym#o$A^12t*rrEi>cMqSaT_aD0zk9mS5Fr3F zRo{B!jt^Pog|{T?3!wY^?%xgw7L@Bz>ng6i!F3)QtP4%bH%zTzsGjLzk}R$IBJr?v zbGCZ4B)ehnh5P1a#%R`?Q|q?}pJc2f86FZi23(Y5BoJ#9E1qMoP5iyNP6b=MDtuKs z-x2lM24$HIdnnKxqFo%_rQzrDey!l@vfxh7^lB4+`Ei!q{L{v-?_C=GXQ~U)uGsiH zQkJ=nS&O#|Yu{XU(p|aNxj4}|*4cA&#kV=yS24pG&Xq|;_x!WQ zXBuP_%7#QsXB3PcV`Ny~GQ4n>(IgovroOW}NhOi@i;k;^i33_ix+!uQ;vK#G*f)W2p%k zdEui9GPNHvj;)2WOz_SY?>*YACrf;&r{t4dc5a?^Q4sXG`|Q)AcCNWkj^*@Qjq#eC zoU4k6f)0x_4)r{@iKf*%MpxNx<@rC=R~=BA)_~q`+NA`{?LGghF3fm;d8@|j4L;E| zI)#Y3VqEWABYDG*^QNLK14{B$5pR1EHuAgaQMZa$DY5Ux8kO7R3wZ-Ska6k9cNZ%W zi&824 z!g^BPJscHMHe=W}H>QCBubSv4cmDa7!kEq_*t7W1t}UDSFNZ`#EBIjMfzqBQ^&{Pw zW7a$^0=yy-R#-zOC2zK=dhYzViFc!hOx32y#G_x6#EW*)rg`li#=;i@-KMRxD^O&hM{@Vv&tL#*EuB%H$}u$dwf1PHaEYb9T>t z!Ef+$$L)FXK8;JOk+(peD7q2_{^d3g}jo} zt-^ZA*o4G zx~z!h$dg2^jyQACZ>WskdBYL7+ZlC53Cb*_KRU_w+7MZi@@^;W z%=NKCU#!=*2}N8f!Rw2w_azIg?ov@YtuB19?xgk+<91fD4B-mz+?gWpFYV5oN?-_d0r^VX^^4ciK(8;6$lYBR2lfWnP~KYX;0#I^d+IA+p3yvP zv%NN#>onFYx9VLST_k&umj`q1H@UDejbLc(9^VDA6qz@XN!LD)n-E3aj%6lK6KKzL zmb!=5Sb-}5Sc$rdsD$L`d*Grs5%rh~b$73y#KGC!UcT#u_g`NW8sr2V(PS~~JB)O= z8zZ_%52<0=FjJ&Cboma0T6Np~G;%!P&7BdoibEWI{e=@mVc`!%vo_ikYazjEWi#v6 zLLc!%6lg)%(wUWogjxR!;m^82h+YA!iD|;1)Oy0yQRngy&nWS7=%d>M+~5a};cJS+ zqn0VNa>KXgy4TZZ!0oq!*5G>t^}3tNzI=s64F*Rqf=meF{hQa&s?P;Jh{i-AVi`}J z)d}pnIZ& z<+9Sn1!2O{G1@n(@1FV(h_+c6?0$iY4cw%U)BQ>Bw!qh;B#3H^E$qJbgwg@-JH(&P zRcU^8yK1Xg`tWu!&uQZn(a%35;DtbX!sxhj=RB>|om^4$>qB#HoqV|!O$7=7SQ?Ey zGIb)qS&ES-UEE08Ot_IB;35%a(6fhJmA1!}KXsVt9&RpNw7w|L=^J{9EHUXA zq$`{tyvQKj#*tXt4r?f>(z|VUImcVh=aR+)d56xb>nQxlcL8;awS4m-u|x@d@Pp>s z*K~KkY3E072EVb1a$B$#WPJ_2YLMaCnK1nD{#$O24D%&(S-bd4XHC&Y-?)3QlH0w{ z`6WK9#k;-!th5SX>n2=fyEc&4=@8ljtxY~nF{_-mgwvX)M6>f-hkV-2BL<~^rOov; zQir75YN<0210Uswjy#Ym1$bR6dv&bZQ|wE2io^QC)gR|c-8Y}@@W{76`;s~FhHt%- z6ktr+V=vi}3;3$;@cl}gfwoe%#4f$@GIx_$=XPHL{i`0AjWtx)O7JCEVaE@Y(K^=H zU-Daf-r9_71L$b?>kvjWm7?K+`>U5ixZ~J~TSa-$9vYu7&GV8Lk!_%*zV4BVrm^yx z8tm!=XO9q0*b1HCnhl^>OS3@Vu&sA|KEEPAsJTbnU;Gx9r8GIh$f>FkVkV$n+lDd4 zocictDxMznb#~cQ*gPSAn=hOuGUWKkm~M`g)?stHBTRPOcR2lXtiyFtJa@yC9-AmW zkR%z;jJ2v7`u10B@hJOoy-V{Qd77!~nY`;Y_b`eKW$w9$dybtPQ@`PgooU~an%2|7 zvsgi#_sn!PF`r$Il!)%Qx~^;MO8Nvi2e2{zkUNR}QH(_~yDDry=GbLBUbQnN(|Jec zmEX5M{af5G9M3iS01NJ?*Y#ApOLjCfpdJTDIz(vQD%P{NsZ)1ZpL;YhRvQ4ZD_0=2!o({k_n)`aB+*hhD^f%)P(v+n~ASV9Qvk_ah|P&!<~h%6Tcg)+*#&9cSHb@kcf)WlB}0 zm5Bk8@=4K8Osr|eBm}x0qPfL!+>>sSFLU`#aG^K0Z@zqILE7`U{yuRlJ$|?w{3Xkb zu_L3^L!!83gmZ3}<4mpxdnzW3j9ro6siSji_QPNt|)N-JV-E4>+yEi-4tEltc z8Lv6o=Lecz=xrFe`J+%tmNe)Hno^!gVEvxDJSx=evcNv`#J>Z zMJ+zCncuwQ#MtEHy$ugKr6s^{5%AOy>Dk>fUP5TnWV9VtumyMr`=?&8yMnAYm+J#+)@@HNH^Z$1BEa8b>R4KLke;)NHxRpLCyyPbbh zQ!) zt+%Jb7L|cn)w%b9SsPwznfHsL7L90aa?iD%1n1buMdoeT3CgdN*B!G4sw65@Q8e67 zoow7su)e#&sHQQ#lAdN|7s?|WeeLywh&9cufx*zZwWr_Ioc1EB1KGb;iyAR-ma!Vh zj@={FGMCt--1t~wmU7KK7tqPo7o_L+%x+z#u2@+8&=C%S;v-iZyN6P@m+{Kqlq6n! z7esYTu;tk*Y_J{v$&3m-(|o+|Aw2*<6N=H%F@x&p{BasVJ%h;fPgFN-*5Ye*vd9FV)UGwBr^a|^TLzaaDDScd!=ahbSa_ok-!)}oN;%F?5y!9v?K9~UR{ zK8uL%0mZ8#*Cw9`t}LrBkJFqlX_0@3JN}wHdO`Ff;%uErxFfqRTcCJMN4KoAs5s-q znpZr)X$7Iy_49ppu5pho3qxd!TsH{!(d*+&*y!XlQ$Dz!t*C~WfZ|+mOZ;VPwScM1 z1l!45>~eQ9PRAXK4&%16OXq^cQi7F>+#oZ|yz!TM?K7**!xWZZI-Tg9>oUIlKqc@n zcR2&2$Z^Z^AP#Jc>j3mo!o43);u|M6jHk^zs%iA&d{c6?y?;zzU#+v3)YO<24V%*X z7Cq(1LYw1o*U>9;1=(Jh4QO(iG{Wz8DO}l2{_18CEkH9i`n=W4!eTS9i~sJ*%LLeP zYOs8mp8!QO7vD)+|5)o&(V#t2@By1v##5tl0DZ)Bv!IGWzwxoYkZ#F54E1!#26h30#N%Y(C_Dl!L%|WKr$+#QnkIz+N4lfQLI|`A#zS3XrLIv# z2!m1=u~vYAU<4hsE5`6D5p8kR#1eVc9jSs6(bQm4qd=$xI5Zh9M8RP_NDzv;$N?{e zTHdb)iU=J*$nNSQHZU_G9Xt^&BrhW`1CrLGV7z5TG?;|ch$v@>xvu_i3hJA>h%1>) zfB=C$K0Y!&ax!?L3lOZLq5=fT0%c{TsR(J3uLl`Uk@g^+-lzD*p^GLVi5LPIgZB{H z=Y%8hUSxF<5o){8AO7J8Fxa2;9;DwYQ1t*(-~=F81_Z?6fPc3jk@dW(B)=W{UoA+M z)I&C)Ihus`A|lax-e?c<>AzE;kbl|}yolI?a8O7f8jHqJp(JXr;D2;!0EL_S70t$pgfK*hZQ3?ozv^*FkD~&)YI7=(3z*XcFK}Z!PxXRzCpdKVL+yjZ; zr=pU}V5mIKAcQ;!3`R=JqLjhX^3GsoX%!F(ER8}Sl&D{M6%bthZxp6P3^gm^*uQ(V zPlcjVq2!x0tH8-4yaH_h(4Z(gHwkSgM+)E zfdmhigNA*_23-|`^6h17lxiXnzXMfmP#{O_E%Kzsgr`!xlyn1d!Ep@X!Az>&W?A;Gt8AGufYFh*MD;TD+T@)_`mG>|0WmHUmG5@2lZEw4|O}U{iR5Y zx)q{B7#rwPpFaTrgVFdTYKf6xXiK90+s?Uv(Eu_sPf#oA$xxUc{pUj*G_*n?b9T0P_aeCIA2c diff --git a/xml_converter/integration_tests/test_cases/texture/output_xml/texture_one.png b/xml_converter/integration_tests/test_cases/texture/output_xml/texture_one.png index 5b7d11285e8f0343fabbd63aef707b59b4f7b5de..392885bb045268983c0e7f9a7151abceeebad090 100644 GIT binary patch delta 81 zcmZoNPM#p)&B)Bazz|_)b^u7R1^9%x{s%G`7#tT1fg~h6T^vI=t|uoXBs@q=5J*f& eaCH6Tz{$qIa+M+E%Ahn*ZelF{r5}E)WwiVL= literal 6530 zcmeHMc{tSD{~wVxdu1t1qwKRU7$mzPyJXjF7-6QFk)>q0wp)@)$`*<&Awsz%d)7jw zLb8<*KegA8o=QDFY=e*vp_j$k0`<&-}p84I@+DuqbRuBXN z2@}kX?SWq*;1T5K1-?o1dA|W|xiCj(wmmTz%wW>JY5r6&JCs2MQ$uLpAW+CqsY}4o z8L-G&ubQ_2@2;5CmWvP4Etlzb?$iLsIX)E zK%YL&_wKzL!Q38_XWdd5s2fr5WfL9_irwHEqSE@+<}UU<4ZZVDf5bMN_7O5jZV+a! z>j>S^l#x=+H#sYET+)L#If9uJC)pgloACOT>Hd>*#tS!jL_%K{+`iZhVLANOVy)0$ zn>CVK{Z_bIr;1ry+n05|dw5}dN$e9+ZFp(U`@s_4QsKsV`I)Ne2P`L z+&#)nMpA2f`$XUO>e zyEHlSfCUW%X>g9py2dpNp+=ZlZrY-JAV&)~oAxjRdc@{>JO8m;C)0e4pKe7uw?b_i zS}HX!g{rhp-*s08m8uI?C#G_UF|x+8b|*l5GfgPWpfJ(tDov~Fb^v6CWF zB5{2&Nr{s(FuN%%$UUY==AQAUP5Yn{?GmB{0x3pO9ps0Q<4VDcCG^mmJ5qiZEHCOT zxCfO8e%dNZkthpwxF@x<*zzFS_P&ZU?iPtO@OWs4pHxZq3!9wn@W&5L zyL7sC_|>Q}cR*@0%gMZr_8sC0r;I>`%I&j-$k#7Bw7uh%j5jMwcP0%cCP|C+s4LwH zX@TWQ+L^t}W(b|rA4~N#foZXAARlCIn-yA(#@#cWO*9OCYml&ai>+JneaB9oGK(*N z)g+DA)Xl$LILKFgDu^q1A69aA?WxW+$eHE=DfcZPeT){@>G-Ah-_T0hEvLQFPUj>C7TR?E|%>5RD25QbhVCH zl?NgyYl8dL-4gRtx5dj=D%Mx{r*@S^)J2bN!Y(1BzD50Cc%`Kz#kLd%w ze>?g(ZJdio{#BszOq4^cdWCJxmSOKr9gZ4emn3Y{e{JxhrRgFK8Zj!|M6w#Nl^h?Qxm;&=^JNaeoK zu{R6MlW*qZ4`olqZYFv#jNgbkl_dClY^*p>d;ljbBt^^(3kF>$;GYP#B#SQ?Hj8|y z71K)Lo%eD)KYxJxR#KG4;T9W@5%q+&x6-M%QfKd7@BFK+ygs7ZEmzJ+{oEg4lI=WJ zP8wuY^zln6X#_?h8q1kOg;Be2@^uNkzvfo=SMZ1VqiA~O_Cej#?ul}K$MXCAo{99% z8!gM^;0<|*X3`x=uWF^LKz-5tMzb};uD?Kr&2eE z4{UG33H)KGTJNeJ9WK7#Qy#7`;cX_oiZ;o)GVi)`cJ`im2i8d~c4=Qpkm3BX-LvL_ zl6l#ZI}&A4CvV1s>@(N)XKlawr1X9%yoXN(Y_?q~FV{&`)$ow|lB~hD^!T7)1R=pE$DgrH+;30n<%M|nD$()C<;-{|Ab1p@vK&-$6r zt$gk$w?XAS*RymY(&y!D&b33Mo~nr@2u>9mm`I@#N(vIa{hOS|hVsqPD*wEaUsx7dy(g72^I?%WI*!gi)Xr_c`IE4O_L(oRy>o=v8s?%d_`t_!>~mee zEhITf6(zq3R9@fp+#xSF{*;`~_RR>ki}Uxt~q+!mJCL4;n6&SjWz>r)9DP zy#y|-*2<4}=qMDsj`6%S%4fp4OBUi&+pl0mdRKdotH}B6tQq;_(4{7sy}w1& z(M%;iwjc3!)A>J!4R9$vdNZ&GK9}Rp4K1Iad5CKWRw`>Rdu|*0lwtLy!0?U|93{R- zC9~gcOB&9+LQIhrqW3$ZqDfk(RByy!M|IIY*Wl{MYFAUe>YO*3t#X|`eRONe{f8pz zmmx6d5gMIAOgicAxpE~kg`N{vEsa)lGx5gT{aMslF#38>#j6_YSt)Yx9hhRzGW?v~8^NjUf*v~_hTfFm_`)e zwlu==Q_jy|AN})egeE+kf(EY!T%YzHNW~o+ z&1?xg;CMILd6*e~R?oa;-_ABKhkVF31DymdN};urv58!@ph=;aU#yede%P8=I%c;j zEGhbMQ`4EY;@?hHmWh-_gFkXj%#P(vL-u@ut5zi}jMXU2z0-U5g3GY96>~jcYae@f z|DFkwQXM4DQ`}fIQZ=!o2j#s-RbX@>=nTkfj-=bY{yh7t<$aee{0Xh-9z?)I&_t)z z@Yo%jokSCtJ$seqac`nq&$u7dJu&Ida2ZPzM`xugCW)Pj-R|UiX`9vQkZ7%9Km02p znKK6-xMfz`$70`gdPzTc({1TqpdHDxy_{bFvemIXO2WU@cYsild}XcXOvC7s8F%cfk99M7Q4IdXeZHmJ#G%!2;88++*U z`S*Sfr{uXth8x?092}N`k}+qlGudkJLNq4!xO|BIReIN^`rG?n7e93)D-?+CORu$f z0pg2qw2iv?^!SUB{-NOpAKA4vP+kMGPMaV;1{CzNG@x*Iw%U&;(*s~c3Y|oSg#<8w z!X5RVNAl3?D#W14!(#*q{REIEYM{?Lx zzgJK<1P>4dP}xLqNPvGJ3m>8f+2F+kZB92F0^WeI59>jkt!%+YbS4#yfni_>s7VOz zCmszK!9=Z_xS}dtgQZ~4`h8)0nh^;LS(>^ zFa$gx0RE!|i*0fgAo(_-|7yW<1nxg@dn$__#3WNqj#2~Jia%0N$bZ{2f|&jr;ZVqM zsy{UVfU*Fu$e&!A5v*+gw%|zMLknPRSOH@Hgk;ma{}Jn_xp77|!ufF`fcf9NKcTBqCG`OT|JlI20O6LSr?dI0Qvo zQ&W=!45NOaA_TJ7#6U8YLj{n-XaEltMZ#&3(PSu+Od>%sS{N);OPfl8Y7)^D5(Psf zVzm)JP}neOKvoj{f1DMEiULrP00u2BfJMt2gMnha(G(~Ng~ma(02UNNn@pyBqoR=U zrgUZi5m-)I0MUmEX9W6e_}~bRH?Sq>K~S)-UN?Gd{fTUEz(5bOpB5Mt@(|V~{8$2Kf)jiOOUFnaJTpB4FsRyqsmh1Hk~o5;=Ja5PXjkZ^Wb$ z*>t8Oo$jv(;Y+u|F&2}KuZLL3dNu?z+w@#D1g?QSSSjM)xv1w zw1EV`{>;vzd$WUyOsato5GfE1kU$&JfK@i6RQ(wp>`Ue7gg{}S2s9L_>4-w$vD$bb ztq>SI0s(=43mDGX)!!r5h5sK-bTIq$7oqxWfjz5Cmfb zN9jl8)!xSW>?rfb7+52J8_za0YV0;RBr3-AeXWnlOZWL78bw*yj2o-U3d9M^eIZscW9;9%I0 rBr}I2=D`2>r0Y(XSlUl7o*^&B@`)jCK9|=7plSwBS3j3^P6k=~n#p!5z>r3n^9 zDT)YU!9tUErHOzjf&%ge^m@JXy?^e^_x`(?IXUO-{j6uL_3X9xWKE*XO%3_D#kfHr z5Fg$MXTiMlFfVRScILO!LO}=!#4G1duwhsbeZgKdstefz05i^b0bsz7>;eM$^;cYV z_Zh_O2;HFXs%5>%x?-~N3}y-uRK` zt0l3M5#K*XDE6$q1M*yR-9*?-Cs0Sv%SDfVzkg7;?%{KS@pm7d^Ft3OzYp-W-*{l% zFx8F#KT`r;_!msBghz=vP*>S6pF>#kV8WQ^0X?03p_Br_}-=;L$BS3M4J4Dwa@m{ z^kntvUkWXIQG2ZcnuU5GnB`Qm(_i+Xb5?i)T(R46H5zjRpdQPc?-`?bYj9 zd1V_BTw^R4q`BtX>9J4ez^1SI85#E}4|C`tnfQThBYo%5U|{_4+XEZp_tvQn@|%CBA?A zd*69j&V*!di%uu|gl}(S+NXh?Z>Mm4C=idSR-|i4VBn7MzGHWc;D7Mema*69ZZ{|; zsx?Wm2iKf?`eFDwebk^gaaDToL<)an*s%VSJq!oj+}S~GJ<9PtVjR^6c)G7y%dFmz zgeHr8d!ikGI`g2>(CSoWDo^v-wK8FRr{ddCT!82hsn_%L+V1-F*GT+S>IXI3Fu4MVd>5zS(Egy|~79VA=b+(p_L!yD-u)%3mrk;{8_x z&iU0F7U@82iM4D`{jr1ri0zG}a9xS}@8f0_S0Kydx3$$(kCu{<>F=*zlTkc_H1 zvpAmQ_e&g>gQ&)X*<)GvgF5y)&utJB zX*VxI?xwJYsZhY(ti~>b`MtBbKvZ|$CE)3)NnY3H%(a>7dp#+3B0LijV)Z5&GXf#) zyfQYVz4afeoiydlAUpLB-;1r`Y>P{I(Wb5J*r~$xN<-(BVrr&%+N~-*r^(cP{vZ*d z&@feVxd&`~+PziMDf4_jJ&#KEEgTYW9IrHoeLtRJaj9eJ?9)Hs4hGR#Y}V->Pm=^3 zT4~N3FI{Gy$q5o=E@p=+`Mddm1fm`UtcpK&Se98MD4WYK>MaJk<1&lG3c8NoA4Sy% zOvM=P+=q~^EDGy8LUD3T#V>sq7(Ure)8BY-2f2SjTQdFl$fIjlQ#X<_@GdFQuj@=m`y5Q%jYw8WIL;(y&dhrx!t-7uM0AKHhRoNY@YEk74|spnt8M>MB=+EqoAje_nfxN* z!?)ATn_4^9F@@`ED<5!JmnI3H=juLriR_t4Shr7|ng3E!^y~}wqv2X0EtT$b{@qjnImb`N zid8iUQK0I2a&M(}*V~2Q*nm^b2bbvHFGSz;g-`-9p;HI$i>})AKG8jJXaR?pS9J?^ z!MW=5h@E{JqkJ5qnAgL4YvgXHbMM}r9=bL@F(dW#*^BH{eFti8nwT;!gmx<00e2&= z|CPs40>oRjTi22_WK{J&4N)vnSKlXPAQlJdaL4W4wQpT_E&I9bi#^)qJG@s`OS|$% z*G`VE_EK1Vt+M(#;&rmqxYG>d40%mZDi7;qT9R}o2+`6t8EI5vx&V;dWiIn_w4VJ$ zO-F6thb8lpm59TG!y}M8@fjqZ5brHJt%J8{Jti12<1vY^`>Z3ZT@n5q$6uq}e+E*emss3k zVmoaJ4O;!gzBtD^_|WRmYQ&DwyI07sx?RI0E3o%Ia_+zKtw^GiFH`%&H?$T8`poLe zVcEO(eS--BBsqe#?fuUM=rBo5yd0MICfDqu=$lvPD>bJ5U1O4UPTAs1T&Q93YdUr5 z$92YzYuasaS}x05mcBAqI)SXZC@{&IdF9+QTx&#h0Z+$HbBydR_cITM7R@oR@ug{x zwWr?N>tAo|mvmp++6K3>!jux)R7n%YF4VUMa^5LTRitg`@U92%= zi2+YoD@HCQJxcnNN1}ce5tbf{_l(?;o07)RWmrnkBqesy=e6Gm4)baO9X5p0uaCM4|G-nC9^eOxJm z{T_BD&?eq&kwVvj&UyKsyO809hUtDbWJOuwKB`z+!s7du!n4_b*@=NIBP zbTN(%XlQFFBjsM^pTfW2FiTaM!m9_Q+J`~R&g`vAEGw9q5vq>x6nPW#;CRTWd|8*x zfx}P`=@VV8^c<&EBQ(IbNT}`TlW}ZJ@$|||jh7`A(m`cCUPsF>o1dMl%Sl{~`s4jj zPj^_oxI%)}#0_`ZbW$^~a+Oc7V^85-yO-;OBh-|&)LlaZNs{UdA;5(i+vRtK+v5&> z`h3Hwz^iX#ti--sKWIGiq02XT`BzpKrFYBeY0a~8a5)<54MUZ%dmYQhJ!#X zp=3QhbG)A3pB)3UPslib5o^?XNW9&_vJkRM=Rl-}bBU=HPJdrLw|?_2CuM;&5jgIL1e$f6zU>BjxCC#!5;W+HFm|;0Uv`6C*P_I2)5A7!sADLUg7& z0V;kJFJ^}a0%;xe^CFVm0S4F!a3y#O36QlZjZVF*o4O&A;rLn5I} z1eAWplR@-@deWsgDSmL^06K|A_F|B!p5RSRq7&7dfrUVr^WZ<@qj;H^{G#`y|5Smg z2h5M?1w*L7VH67NcMCd0--k)^Gob%!K_@U9VVDI#r+U*!fW8ml$&mh?!kP5T-piZj zv6YT92?lro6eg6;^osbKOGCVg`7eu230%n(uPrO4*ndMZ$S!}0^|#nIXSUM$JrJh( zFW$eQ|IB?0%tV=(U~p8D_hxu_92TRx+YYU z2q!{S)zL^zK!b=NBAtGt!h6ygL{Ad1NyQ{rAv1a40MSWR0|20EB(w$;tqGu^nkXk# zs0I;0s;QyjE^t-V-zdyzWM)+oJ${dBlggP%rG_SII%_xsP$FEz35s?`I6;XnY6vI^ z4oAZ^HB{9QF3ww2&LoThl|~^lmy=8(x&kmSPuH!9O~Elb=6EawsRI9N#N30(aA6u? zAxFrb-hO{g5Xcn3l0n>56QPcPt0Pfr8fs`H3XW3$3uFb*=*&vo_Q)$Xioj@K)Jkh@>A*=tLjjhXzc$A5$bZqNgjs+}}S7>d$fVe_1RPN(1Et*HDAP z;Ybt|t)Z$8C8AXkP$U|GaCQOI5hzXMRvN$9=~NenFOdf5xH2jU6roN)A~0|S2FY}Y#=zka*w2Jvo4fkYjJ06@M-#0rz;DL@)9%L@ z^LSyNR} z>;FwI?!Ouyz?1na$d}p9z?XLa?cf)BT+JQDi6NNPCJKpxX1sWJ#}uPRH=X14O>vdFj=}!{ Dw)l`f From b022773e02cc63a6b79170851ada72cc93189980 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sat, 27 Apr 2024 11:18:11 -0400 Subject: [PATCH 442/539] Moved variables back to pack dialog --- ImportPackDialog.gd | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ImportPackDialog.gd b/ImportPackDialog.gd index c10193a3..b28aaa16 100644 --- a/ImportPackDialog.gd +++ b/ImportPackDialog.gd @@ -1,15 +1,23 @@ extends FileDialog const FileHandler = preload("res://FileHandler.gd") +var downloaded_markers_dir: String +var unsaved_markers_dir: String +var user_data_dir: String func _on_FileDialog_dir_selected(dir_path): print("Selected folder:", dir_path) - var new_path: String = FileHandler.downloaded_markers_dir.plus_file(dir_path.get_file()) + self.user_data_dir = str(OS.get_user_data_dir()) + self.downloaded_markers_dir = self.user_data_dir.plus_file("packs") + self.unsaved_markers_dir = self.user_data_dir.plus_file("protobins") + FileHandler.create_directory_if_missing(self.downloaded_markers_dir) + FileHandler.create_directory_if_missing(self.unsaved_markers_dir) + var new_path: String = self.downloaded_markers_dir.plus_file(dir_path.get_file()) FileHandler.create_directory_if_missing(new_path) #else: # #Pop up here to confirm overwrite? var args: PoolStringArray = [ "--input-taco-path", dir_path, "--output-waypoint-path", new_path, - "--output-split-waypoint-path", FileHandler.unsaved_markers_dir + "--output-split-waypoint-path", self.unsaved_markers_dir ] FileHandler.call_xml_converter(args) From 7757841adc792e923375617613f75d450c406017 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sat, 27 Apr 2024 15:35:15 -0400 Subject: [PATCH 443/539] Move variable creation to ready function --- ImportPackDialog.gd | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ImportPackDialog.gd b/ImportPackDialog.gd index b28aaa16..d146d77e 100644 --- a/ImportPackDialog.gd +++ b/ImportPackDialog.gd @@ -1,20 +1,21 @@ extends FileDialog + const FileHandler = preload("res://FileHandler.gd") var downloaded_markers_dir: String var unsaved_markers_dir: String var user_data_dir: String -func _on_FileDialog_dir_selected(dir_path): - print("Selected folder:", dir_path) +func _ready(): self.user_data_dir = str(OS.get_user_data_dir()) self.downloaded_markers_dir = self.user_data_dir.plus_file("packs") self.unsaved_markers_dir = self.user_data_dir.plus_file("protobins") FileHandler.create_directory_if_missing(self.downloaded_markers_dir) FileHandler.create_directory_if_missing(self.unsaved_markers_dir) + +func _on_FileDialog_dir_selected(dir_path): + print("Selected folder:", dir_path) var new_path: String = self.downloaded_markers_dir.plus_file(dir_path.get_file()) FileHandler.create_directory_if_missing(new_path) - #else: - # #Pop up here to confirm overwrite? var args: PoolStringArray = [ "--input-taco-path", dir_path, "--output-waypoint-path", new_path, From bccee54f7a0118c84891ec6aae07b5bb59a76a49 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sat, 27 Apr 2024 15:55:42 -0400 Subject: [PATCH 444/539] Removed lines from File Handler --- FileHandler.gd | 16 ++-------------- ImportPackDialog.gd | 7 +++++-- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/FileHandler.gd b/FileHandler.gd index 51587914..a1f6bcc5 100644 --- a/FileHandler.gd +++ b/FileHandler.gd @@ -1,16 +1,4 @@ -var downloaded_markers_dir: String -var unsaved_markers_dir: String -var user_data_dir: String - -func _init(): - self.user_data_dir = str(OS.get_user_data_dir()) - self.downloaded_markers_dir = self.user_data_dir.plus_file("packs") - self.unsaved_markers_dir = self.user_data_dir.plus_file("protobins") - create_directory_if_missing(self.downloaded_markers_dir) - create_directory_if_missing(self.unsaved_markers_dir) - -static func call_xml_converter(args): - var executable_path: String = "./xml_converter/build/xml_converter" +static func call_xml_converter(executable_path: String, args: PoolStringArray): var output: Array = [] print(args) var result: int = OS.execute(executable_path, args, true, output, true) @@ -20,7 +8,7 @@ static func call_xml_converter(args): else: print("Command executed successfully.") -static func create_directory_if_missing(path): +static func create_directory_if_missing(path: String): var dir = Directory.new() if not dir.dir_exists(path): var success = dir.make_dir(path) diff --git a/ImportPackDialog.gd b/ImportPackDialog.gd index d146d77e..5e26a9f0 100644 --- a/ImportPackDialog.gd +++ b/ImportPackDialog.gd @@ -4,6 +4,7 @@ const FileHandler = preload("res://FileHandler.gd") var downloaded_markers_dir: String var unsaved_markers_dir: String var user_data_dir: String +var executable_path: String = "./xml_converter/build/xml_converter" func _ready(): self.user_data_dir = str(OS.get_user_data_dir()) @@ -12,13 +13,15 @@ func _ready(): FileHandler.create_directory_if_missing(self.downloaded_markers_dir) FileHandler.create_directory_if_missing(self.unsaved_markers_dir) -func _on_FileDialog_dir_selected(dir_path): +func _on_FileDialog_dir_selected(dir_path: String): print("Selected folder:", dir_path) var new_path: String = self.downloaded_markers_dir.plus_file(dir_path.get_file()) FileHandler.create_directory_if_missing(new_path) + #else: + # #Pop up here to confirm overwrite? var args: PoolStringArray = [ "--input-taco-path", dir_path, "--output-waypoint-path", new_path, "--output-split-waypoint-path", self.unsaved_markers_dir ] - FileHandler.call_xml_converter(args) + FileHandler.call_xml_converter(self.executable_path, args) From 691920459d8a249b1193224baaadaa25a2cf8ec2 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 5 May 2024 16:21:18 -0400 Subject: [PATCH 445/539] Change from clearing to creating a new object for data from file --- Spatial.gd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Spatial.gd b/Spatial.gd index 63d186b3..ebcef36c 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -392,7 +392,7 @@ var marker_file_path = "" func load_waypoint_markers(map_id): self.marker_file_path = self.marker_file_dir + String(map_id) + ".data" - self.waypoint_data.clear_category() + self.waypoint_data = Waypoint.Waypoint.new() clear_map_markers() init_category_tree() var file = File.new() From e333616874b86752a2acbcea480295f150a09d27 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Fri, 17 May 2024 19:01:45 -0400 Subject: [PATCH 446/539] fixed function that calls only one program to only call that program. Edited comments --- FileHandler.gd | 6 +++--- ImportPackDialog.gd | 6 ++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/FileHandler.gd b/FileHandler.gd index a1f6bcc5..3f018386 100644 --- a/FileHandler.gd +++ b/FileHandler.gd @@ -1,10 +1,10 @@ -static func call_xml_converter(executable_path: String, args: PoolStringArray): +static func call_xml_converter(args: PoolStringArray): var output: Array = [] print(args) - var result: int = OS.execute(executable_path, args, true, output, true) + var result: int = OS.execute("./xml_converter/build/xml_converter", args, true, output, true) print(output) if result != OK: - print("Failed to execute the command. Error code:", result) + print("Failed to execute the converter. Error code:", result) else: print("Command executed successfully.") diff --git a/ImportPackDialog.gd b/ImportPackDialog.gd index 5e26a9f0..3db05f00 100644 --- a/ImportPackDialog.gd +++ b/ImportPackDialog.gd @@ -4,9 +4,9 @@ const FileHandler = preload("res://FileHandler.gd") var downloaded_markers_dir: String var unsaved_markers_dir: String var user_data_dir: String -var executable_path: String = "./xml_converter/build/xml_converter" func _ready(): + #TODO: Move these to global file Settings so they can be customized self.user_data_dir = str(OS.get_user_data_dir()) self.downloaded_markers_dir = self.user_data_dir.plus_file("packs") self.unsaved_markers_dir = self.user_data_dir.plus_file("protobins") @@ -17,11 +17,9 @@ func _on_FileDialog_dir_selected(dir_path: String): print("Selected folder:", dir_path) var new_path: String = self.downloaded_markers_dir.plus_file(dir_path.get_file()) FileHandler.create_directory_if_missing(new_path) - #else: - # #Pop up here to confirm overwrite? var args: PoolStringArray = [ "--input-taco-path", dir_path, "--output-waypoint-path", new_path, "--output-split-waypoint-path", self.unsaved_markers_dir ] - FileHandler.call_xml_converter(self.executable_path, args) + FileHandler.call_xml_converter(args) From 6f0ee47f67a647619bffa950413143d273475d36 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Fri, 17 May 2024 20:29:53 -0400 Subject: [PATCH 447/539] changed to constant variable --- FileHandler.gd | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/FileHandler.gd b/FileHandler.gd index 3f018386..eb0207f5 100644 --- a/FileHandler.gd +++ b/FileHandler.gd @@ -1,7 +1,9 @@ +const converter_executable_path = "./xml_converter/build/xml_converter" + static func call_xml_converter(args: PoolStringArray): var output: Array = [] print(args) - var result: int = OS.execute("./xml_converter/build/xml_converter", args, true, output, true) + var result: int = OS.execute(converter_executable_path, args, true, output, true) print(output) if result != OK: print("Failed to execute the converter. Error code:", result) From 44a5343d922175d4e6f9bd9bc1ad854de9e0a460 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sat, 18 May 2024 19:17:40 -0500 Subject: [PATCH 448/539] adding sanity checks and usage to make_test.sh --- xml_converter/integration_tests/make_test.sh | 38 ++++++++++++++++---- 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/xml_converter/integration_tests/make_test.sh b/xml_converter/integration_tests/make_test.sh index b8bb155a..65ad638d 100755 --- a/xml_converter/integration_tests/make_test.sh +++ b/xml_converter/integration_tests/make_test.sh @@ -1,19 +1,43 @@ #!/bin/bash +if [[ $# -eq 0 || "$1" == "-h" || "$1" == "--help" ]]; then + echo "make_test.sh is used to create a new integration test. It creates a skeleton of" + echo "the files that are necessary for an integration test so that they can be easily" + echo "edited, instead of needing to remember all of the files that must be created" + echo "for each new integration test." + echo "" + echo "Usage:" + echo " ./make_test.sh " + echo " ./make_test.sh my_new_test" + echo " ./make_test.sh [-h,--help]" +fi + +# Fix the working directory if the script is being executed from somewhere +# other than its own directory. +cd "$(dirname "$0")" + # Base testcase directory mkdir -p test_cases/$1 -# Testcase configuration -touch test_cases/$1/testcase.yaml -echo 'input_paths: ' >> test_cases/$1/testcase.yaml -echo ' "pack": "xml"' >> test_cases/$1/testcase.yaml -echo 'expected_stdout: |' >> test_cases/$1/testcase.yaml -echo 'expected_stderr: |' >> test_cases/$1/testcase.yaml -echo 'expected_returncode: 0' >> test_cases/$1/testcase.yaml + +# Configuration Data +yaml_file="test_cases/${1}/testcase.yaml" +if [ ! -f "$yaml_file" ]; then + touch "$yaml_file" + echo 'input_paths: ' >> "$yaml_file" + echo ' "pack": "xml"' >> "$yaml_file" + echo 'expected_stdout: |' >> "$yaml_file" + echo 'expected_stderr: |' >> "$yaml_file" + echo 'expected_returncode: 0' >> "$yaml_file" +else + echo "$yaml_file already exists, skipping setting it up" +fi + # Input folder and test marker pack mkdir -p test_cases/$1/input/pack + # Output folders and blank output files mkdir -p test_cases/$1/output_proto touch test_cases/$1/output_proto/markers.bin From 76bb807b0854b64c23326d06b696302b3f43faac Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sat, 18 May 2024 21:06:15 -0500 Subject: [PATCH 449/539] adding support for custom examples for fields --- xml_converter/generators/main.py | 41 +++++++++++++++++--------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/xml_converter/generators/main.py b/xml_converter/generators/main.py index 63ba4d10..fdfbf912 100644 --- a/xml_converter/generators/main.py +++ b/xml_converter/generators/main.py @@ -19,7 +19,7 @@ ATTRIBUTE_NAME_REGEX: Final[str] = "^[A-Za-z ]+$" CUSTOM_SERIALIZER_REGEX: Final[str] = r"^(?:read|write)(?:\.xml|\.proto)(?:\.icon|\.trail)?$" -shared_field_properties: Dict[str, DefType] = { +shared_required_fields: Dict[str, DefType] = { "type": string_t(), "name": string_t(pattern=ATTRIBUTE_NAME_REGEX), "applies_to": array_t(enum_t(["Icon", "Trail", "Category"])), @@ -27,33 +27,34 @@ "protobuf_field": string_t(pattern=PROTO_FIELD_REGEX), } -custom_serial_functions: Dict[str, DefType] = { +shared_optional_fields: Dict[str, DefType] = { "custom_functions": pattern_dictionary_t({CUSTOM_SERIALIZER_REGEX: object_t({ "function": string_t(), "side_effects": array_t(string_t()), })}), + "examples": array_t(string_t()) } schema = union_t({ - "Int32": union_partial_t(required=shared_field_properties, optional=custom_serial_functions), - "Fixed32": union_partial_t(required=shared_field_properties, optional=custom_serial_functions), - "Float32": union_partial_t(required=shared_field_properties, optional=custom_serial_functions), - "String": union_partial_t(required=shared_field_properties, optional=custom_serial_functions), - "Boolean": union_partial_t(required=shared_field_properties, optional=custom_serial_functions), + "Int32": union_partial_t(required=shared_required_fields, optional=shared_optional_fields), + "Fixed32": union_partial_t(required=shared_required_fields, optional=shared_optional_fields), + "Float32": union_partial_t(required=shared_required_fields, optional=shared_optional_fields), + "String": union_partial_t(required=shared_required_fields, optional=shared_optional_fields), + "Boolean": union_partial_t(required=shared_required_fields, optional=shared_optional_fields), "MultiflagValue": union_partial_t( - required={**shared_field_properties, **{ + required={**shared_required_fields, **{ "flags": pattern_dictionary_t({INTERNAL_VARIABLE_REGEX: array_t(string_t())}), }}, - optional=custom_serial_functions, + optional=shared_optional_fields, ), "Enum": union_partial_t( - required={**shared_field_properties, **{ + required={**shared_required_fields, **{ "values": pattern_dictionary_t({INTERNAL_VARIABLE_REGEX: array_t(string_t())}) }}, - optional=custom_serial_functions, + optional=shared_optional_fields, ), "CompoundValue": union_partial_t( - required={**shared_field_properties, **{ + required={**shared_required_fields, **{ "xml_bundled_components": array_t(string_t()), "xml_separate_components": array_t(string_t()), "components": array_t(object_t({ @@ -63,10 +64,10 @@ "protobuf_field": string_t(PROTO_FIELD_REGEX), })), }}, - optional=custom_serial_functions, + optional=shared_optional_fields, ), "CompoundCustomClass": union_partial_t( - required={**shared_field_properties, **{ + required={**shared_required_fields, **{ "class": string_t(), "xml_bundled_components": array_t(string_t()), "xml_separate_components": array_t(string_t()), @@ -77,12 +78,12 @@ "protobuf_field": string_t(PROTO_FIELD_REGEX), })), }}, - optional=custom_serial_functions, + optional=shared_optional_fields, ), "Custom": union_partial_t( - required={**shared_field_properties, **{"class": string_t()}}, + required={**shared_required_fields, **{"class": string_t()}}, optional={ - **custom_serial_functions, + **shared_optional_fields, "uses_file_path": boolean_t(), # This will eventually be part of a struct that is passed into everything } ), @@ -191,7 +192,9 @@ def write_webdocs(self, output_directory: str) -> None: content_nav=navigation_links )) - def get_examples(self, field_type: str) -> List[str]: + def get_examples(self, field_type: str, field_key: str) -> List[str]: + if "examples" in self.data[field_key].metadata: + return [f'"{x}"' for x in self.data[field_key].metadata["examples"]] return ["???"] def get_fixed_option_examples(self, field_type: str, pairings: Any) -> List[str]: @@ -300,7 +303,7 @@ def generate_auto_docs(self, metadata: Dict[str, SchemaType], content: Dict[str, xml_field=fieldval['xml_fields'][0], examples=self.get_examples( field_type=fieldval['type'], - # pairings=pairings + field_key=fieldkey, ) ) # self.get_examples(fieldval['type'], fieldval['applies_to'], fieldval['xml_fieldsval'][0]) From 31db759ed4db697ea36e5e5333399dc445c3807b Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sat, 18 May 2024 21:12:32 -0500 Subject: [PATCH 450/539] . --- xml_converter/generators/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml_converter/generators/main.py b/xml_converter/generators/main.py index fdfbf912..722b0a05 100644 --- a/xml_converter/generators/main.py +++ b/xml_converter/generators/main.py @@ -194,7 +194,7 @@ def write_webdocs(self, output_directory: str) -> None: def get_examples(self, field_type: str, field_key: str) -> List[str]: if "examples" in self.data[field_key].metadata: - return [f'"{x}"' for x in self.data[field_key].metadata["examples"]] + return [f'"{x}"' for x in self.data[field_key].metadata["examples"]] return ["???"] def get_fixed_option_examples(self, field_type: str, pairings: Any) -> List[str]: From d8745640da48df99bdf7938ddd3204e0e0f6676d Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sat, 18 May 2024 21:35:38 -0500 Subject: [PATCH 451/539] fixing some misconceptions about achivement bit --- .../doc/acheivement/achievement_bitmask.md | 49 +++++++++++++++--- .../input/pack/xml_file.xml | 9 +--- .../output_proto/markers.bin | Bin 163 -> 132 bytes .../output_xml/xml_file.xml | 3 +- .../achievement_id/output_proto/markers.bin | 2 +- xml_converter/proto/waypoint.proto | 10 ++-- xml_converter/src/icon_gen.cpp | 31 ++++++----- xml_converter/src/icon_gen.hpp | 4 +- xml_converter/src/trail_gen.cpp | 31 ++++++----- xml_converter/src/trail_gen.hpp | 4 +- 10 files changed, 88 insertions(+), 55 deletions(-) diff --git a/xml_converter/doc/acheivement/achievement_bitmask.md b/xml_converter/doc/acheivement/achievement_bitmask.md index fc4f2a05..909d189f 100644 --- a/xml_converter/doc/acheivement/achievement_bitmask.md +++ b/xml_converter/doc/acheivement/achievement_bitmask.md @@ -1,13 +1,46 @@ --- -name: Achievement Bitmask -type: Fixed32 +name: Achievement Bit Index +type: Int32 applies_to: [Icon, Trail] -xml_fields: ["AchievementBit"] -protobuf_field: achievement_bit +xml_fields: ["AchievementBit", "AchievementBitIndex"] +protobuf_field: achievement_bit_index +examples: ["0", "1", "2", "14"] --- -A portion of an achievement that, if completed, will hide this marker. +A portion of the achievement that will hide this marker if it is completed. + +This value corrisponds to an `index` of a "bit" of an achivment. For example we can look at the achivement "RGB" which has the id `2655`. + +[https://api.guildwars2.com/v2/achievements?ids=2655](https://api.guildwars2.com/v2/achievements?ids=2655) + +```json +[ + { + "id": 2655, + "name": "RGB", + "description": "", + "requirement": "Obtain each pylon attunement once, and defeat the Vale Guardian.", + "locked_text": "", + "type": "Default", + "flags": ["Permanent"], + "bits": [ + {"type": "Text", "text": "Red Attunement"}, + {"type": "Text", "text": "Green Attunement"}, + {"type": "Text", "text": "Blue Attunement"} + ], + "tiers": [{"count": 3, "points": 1}] + } +] +``` +`Red Attunement` is the first one, so because we start with 0 it has the index **"0"** +`Green Attunement` is the second, so it has the index **"1"** +`Blue Attunement` is the third, so it has the index **"2"** + +If we wanted to hide this marker when "Green Attunment" had been completed we would set the Achievement Bit Index to `1` + + + +External Resources +-------------------------------------------------------------------------------- +* [https://gw2pathing.com/docs/marker-dev/attributes/achievement/](https://gw2pathing.com/docs/marker-dev/attributes/achievement/) -Notes -===== -https://blishhud.com/docs/markers/attributes/achievement \ No newline at end of file diff --git a/xml_converter/integration_tests/test_cases/achievement_bitmask_valid/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/achievement_bitmask_valid/input/pack/xml_file.xml index 17232a3e..84632948 100644 --- a/xml_converter/integration_tests/test_cases/achievement_bitmask_valid/input/pack/xml_file.xml +++ b/xml_converter/integration_tests/test_cases/achievement_bitmask_valid/input/pack/xml_file.xml @@ -7,13 +7,6 @@ - - - - - - - - +
diff --git a/xml_converter/integration_tests/test_cases/achievement_bitmask_valid/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/achievement_bitmask_valid/output_proto/markers.bin index a78bad0809d339dc9aa675ae823c39978ece2fd4..5872b2a00e603d6019027850a27f663b90158a20 100644 GIT binary patch literal 132 zcmd;TWaQ%ZtyFMMEJ;nzFRGLhRxonn=Z!h9=`5PIEXY~5`bxO7lo%Gl4n|ffDXilE Yfq)&KoDwrovlEBLi!*G8CdW+!0CB}EWdHyG literal 163 zcmd;Dz{thzTdCljSdyBaUsNe2tYGBC&l_`I(^)iaS&*}A^_6gEDM>7Xt&FS;3=BA= i{{R19k3$NmsR4)7Z=g0MHi*Ga92zgqupOElHw^%7Co?7h diff --git a/xml_converter/integration_tests/test_cases/achievement_bitmask_valid/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/achievement_bitmask_valid/output_xml/xml_file.xml index b07e3ef9..31ef0384 100644 --- a/xml_converter/integration_tests/test_cases/achievement_bitmask_valid/output_xml/xml_file.xml +++ b/xml_converter/integration_tests/test_cases/achievement_bitmask_valid/output_xml/xml_file.xml @@ -7,7 +7,6 @@ - - +
diff --git a/xml_converter/integration_tests/test_cases/achievement_id/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/achievement_id/output_proto/markers.bin index df6a9bb5..aadb6812 100644 --- a/xml_converter/integration_tests/test_cases/achievement_id/output_proto/markers.bin +++ b/xml_converter/integration_tests/test_cases/achievement_id/output_proto/markers.bin @@ -1,3 +1,3 @@ ¿ - My Category 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWCˆ 2B \Ï)Cf¦RC{ÔWCˆ 2B \Ï)Cf¦RC{ÔWCˆÿÿÿÿ 2B \Ï)Cf¦RC{ÔWCˆ€€€€øÿÿÿÿ 2B \Ï)Cf¦RC{ÔWCˆûÿÿÿÿÿÿÿÿ"ˆB(èÌ“^– \ No newline at end of file + My Category 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC€ 2B \Ï)Cf¦RC{ÔWC€ 2B \Ï)Cf¦RC{ÔWC€ÿÿÿÿ 2B \Ï)Cf¦RC{ÔWC€€€€€øÿÿÿÿ 2B \Ï)Cf¦RC{ÔWC€ûÿÿÿÿÿÿÿÿ"€B(èÌ“^– \ No newline at end of file diff --git a/xml_converter/proto/waypoint.proto b/xml_converter/proto/waypoint.proto index 53b50e79..95a29c1f 100644 --- a/xml_converter/proto/waypoint.proto +++ b/xml_converter/proto/waypoint.proto @@ -37,8 +37,9 @@ message Icon { Trigger trigger = 9; EulerRotation euler_rotation = 10; - fixed32 achievement_bit = 16; - int32 achievement_id = 17; + int32 achievement_id = 16; + int32 achievement_bit_index = 17; + bool disable_player_cutout = 19; int32 minimum_size_on_screen = 20; int32 map_display_size = 21; @@ -75,8 +76,9 @@ message Trail { TrailData trail_data = 7; float animation_speed = 8; - fixed32 achievement_bit = 16; - int32 achievement_id = 17; + int32 achievement_id = 16; + int32 achievement_bit_index = 17; + bool disable_player_cutout = 19; bool is_wall = 20; float scale = 21; diff --git a/xml_converter/src/icon_gen.cpp b/xml_converter/src/icon_gen.cpp index b8e40350..984f4256 100644 --- a/xml_converter/src/icon_gen.cpp +++ b/xml_converter/src/icon_gen.cpp @@ -23,7 +23,10 @@ bool Icon::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectorachievement_bitmask), &(this->achievement_bitmask_is_set)); + xml_attribute_to_int(attribute, errors, state, &(this->achievement_bit_index), &(this->achievement_bit_index_is_set)); + } + else if (attributename == "achievementbitindex") { + xml_attribute_to_int(attribute, errors, state, &(this->achievement_bit_index), &(this->achievement_bit_index_is_set)); } else if (attributename == "achievementid") { xml_attribute_to_int(attribute, errors, state, &(this->achievement_id), &(this->achievement_id_is_set)); @@ -255,8 +258,8 @@ bool Icon::validate_attributes_of_type_marker_category() { vector Icon::as_xml(XMLWriterState* state) const { vector xml_node_contents; xml_node_contents.push_back("achievement_bitmask_is_set) { - xml_node_contents.push_back(int_to_xml_attribute("AchievementBit", state, &this->achievement_bitmask)); + if (this->achievement_bit_index_is_set) { + xml_node_contents.push_back(int_to_xml_attribute("AchievementBit", state, &this->achievement_bit_index)); } if (this->achievement_id_is_set) { xml_node_contents.push_back(int_to_xml_attribute("AchievementId", state, &this->achievement_id)); @@ -408,9 +411,9 @@ vector Icon::as_xml(XMLWriterState* state) const { waypoint::Icon Icon::as_protobuf(ProtoWriterState* state) const { waypoint::Icon proto_icon; - if (this->achievement_bitmask_is_set) { - std::function setter = [&proto_icon](int val) { proto_icon.set_achievement_bit(val); }; - int_to_proto(this->achievement_bitmask, state, setter); + if (this->achievement_bit_index_is_set) { + std::function setter = [&proto_icon](int val) { proto_icon.set_achievement_bit_index(val); }; + int_to_proto(this->achievement_bit_index, state, setter); } if (this->achievement_id_is_set) { std::function setter = [&proto_icon](int val) { proto_icon.set_achievement_id(val); }; @@ -600,8 +603,8 @@ waypoint::Icon Icon::as_protobuf(ProtoWriterState* state) const { } void Icon::parse_protobuf(waypoint::Icon proto_icon, ProtoReaderState* state) { - if (proto_icon.achievement_bit() != 0) { - proto_to_int(proto_icon.achievement_bit(), state, &(this->achievement_bitmask), &(this->achievement_bitmask_is_set)); + if (proto_icon.achievement_bit_index() != 0) { + proto_to_int(proto_icon.achievement_bit_index(), state, &(this->achievement_bit_index), &(this->achievement_bit_index_is_set)); } if (proto_icon.achievement_id() != 0) { proto_to_int(proto_icon.achievement_id(), state, &(this->achievement_id), &(this->achievement_id_is_set)); @@ -750,9 +753,9 @@ void Icon::parse_protobuf(waypoint::Icon proto_icon, ProtoReaderState* state) { // underlay argument. //////////////////////////////////////////////////////////////////////////////// void Icon::apply_underlay(const Icon& underlay) { - if (!this->achievement_bitmask_is_set && underlay.achievement_bitmask_is_set) { - this->achievement_bitmask = underlay.achievement_bitmask; - this->achievement_bitmask_is_set = true; + if (!this->achievement_bit_index_is_set && underlay.achievement_bit_index_is_set) { + this->achievement_bit_index = underlay.achievement_bit_index; + this->achievement_bit_index_is_set = true; } if (!this->achievement_id_is_set && underlay.achievement_id_is_set) { this->achievement_id = underlay.achievement_id; @@ -947,9 +950,9 @@ void Icon::apply_underlay(const Icon& underlay) { // top of this class. //////////////////////////////////////////////////////////////////////////////// void Icon::apply_overlay(const Icon& overlay) { - if (overlay.achievement_bitmask_is_set) { - this->achievement_bitmask = overlay.achievement_bitmask; - this->achievement_bitmask_is_set = true; + if (overlay.achievement_bit_index_is_set) { + this->achievement_bit_index = overlay.achievement_bit_index; + this->achievement_bit_index_is_set = true; } if (overlay.achievement_id_is_set) { this->achievement_id = overlay.achievement_id; diff --git a/xml_converter/src/icon_gen.hpp b/xml_converter/src/icon_gen.hpp index efbdf12d..ae2e0597 100644 --- a/xml_converter/src/icon_gen.hpp +++ b/xml_converter/src/icon_gen.hpp @@ -27,7 +27,7 @@ class XMLError; class Icon : public Parseable { public: - int achievement_bitmask; + int achievement_bit_index; int achievement_id; bool auto_trigger; float bounce_delay; @@ -74,7 +74,7 @@ class Icon : public Parseable { std::string tooltip_description; std::string tooltip_name; float trigger_range; - bool achievement_bitmask_is_set = false; + bool achievement_bit_index_is_set = false; bool achievement_id_is_set = false; bool auto_trigger_is_set = false; bool bounce_delay_is_set = false; diff --git a/xml_converter/src/trail_gen.cpp b/xml_converter/src/trail_gen.cpp index becc14ae..76c05bf8 100644 --- a/xml_converter/src/trail_gen.cpp +++ b/xml_converter/src/trail_gen.cpp @@ -23,7 +23,10 @@ bool Trail::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectorachievement_bitmask), &(this->achievement_bitmask_is_set)); + xml_attribute_to_int(attribute, errors, state, &(this->achievement_bit_index), &(this->achievement_bit_index_is_set)); + } + else if (attributename == "achievementbitindex") { + xml_attribute_to_int(attribute, errors, state, &(this->achievement_bit_index), &(this->achievement_bit_index_is_set)); } else if (attributename == "achievementid") { xml_attribute_to_int(attribute, errors, state, &(this->achievement_id), &(this->achievement_id_is_set)); @@ -156,8 +159,8 @@ bool Trail::validate_attributes_of_type_marker_category() { vector Trail::as_xml(XMLWriterState* state) const { vector xml_node_contents; xml_node_contents.push_back("achievement_bitmask_is_set) { - xml_node_contents.push_back(int_to_xml_attribute("AchievementBit", state, &this->achievement_bitmask)); + if (this->achievement_bit_index_is_set) { + xml_node_contents.push_back(int_to_xml_attribute("AchievementBit", state, &this->achievement_bit_index)); } if (this->achievement_id_is_set) { xml_node_contents.push_back(int_to_xml_attribute("AchievementId", state, &this->achievement_id)); @@ -246,9 +249,9 @@ vector Trail::as_xml(XMLWriterState* state) const { waypoint::Trail Trail::as_protobuf(ProtoWriterState* state) const { waypoint::Trail proto_trail; - if (this->achievement_bitmask_is_set) { - std::function setter = [&proto_trail](int val) { proto_trail.set_achievement_bit(val); }; - int_to_proto(this->achievement_bitmask, state, setter); + if (this->achievement_bit_index_is_set) { + std::function setter = [&proto_trail](int val) { proto_trail.set_achievement_bit_index(val); }; + int_to_proto(this->achievement_bit_index, state, setter); } if (this->achievement_id_is_set) { std::function setter = [&proto_trail](int val) { proto_trail.set_achievement_id(val); }; @@ -358,8 +361,8 @@ waypoint::Trail Trail::as_protobuf(ProtoWriterState* state) const { } void Trail::parse_protobuf(waypoint::Trail proto_trail, ProtoReaderState* state) { - if (proto_trail.achievement_bit() != 0) { - proto_to_int(proto_trail.achievement_bit(), state, &(this->achievement_bitmask), &(this->achievement_bitmask_is_set)); + if (proto_trail.achievement_bit_index() != 0) { + proto_to_int(proto_trail.achievement_bit_index(), state, &(this->achievement_bit_index), &(this->achievement_bit_index_is_set)); } if (proto_trail.achievement_id() != 0) { proto_to_int(proto_trail.achievement_id(), state, &(this->achievement_id), &(this->achievement_id_is_set)); @@ -448,9 +451,9 @@ void Trail::parse_protobuf(waypoint::Trail proto_trail, ProtoReaderState* state) // underlay argument. //////////////////////////////////////////////////////////////////////////////// void Trail::apply_underlay(const Trail& underlay) { - if (!this->achievement_bitmask_is_set && underlay.achievement_bitmask_is_set) { - this->achievement_bitmask = underlay.achievement_bitmask; - this->achievement_bitmask_is_set = true; + if (!this->achievement_bit_index_is_set && underlay.achievement_bit_index_is_set) { + this->achievement_bit_index = underlay.achievement_bit_index; + this->achievement_bit_index_is_set = true; } if (!this->achievement_id_is_set && underlay.achievement_id_is_set) { this->achievement_id = underlay.achievement_id; @@ -565,9 +568,9 @@ void Trail::apply_underlay(const Trail& underlay) { // top of this class. //////////////////////////////////////////////////////////////////////////////// void Trail::apply_overlay(const Trail& overlay) { - if (overlay.achievement_bitmask_is_set) { - this->achievement_bitmask = overlay.achievement_bitmask; - this->achievement_bitmask_is_set = true; + if (overlay.achievement_bit_index_is_set) { + this->achievement_bit_index = overlay.achievement_bit_index; + this->achievement_bit_index_is_set = true; } if (overlay.achievement_id_is_set) { this->achievement_id = overlay.achievement_id; diff --git a/xml_converter/src/trail_gen.hpp b/xml_converter/src/trail_gen.hpp index 28f0ec19..68941c86 100644 --- a/xml_converter/src/trail_gen.hpp +++ b/xml_converter/src/trail_gen.hpp @@ -25,7 +25,7 @@ class XMLError; class Trail : public Parseable { public: - int achievement_bitmask; + int achievement_bit_index; int achievement_id; float animation_speed; MarkerCategory category; @@ -52,7 +52,7 @@ class Trail : public Parseable { Image texture; TrailData trail_data; float trail_scale; - bool achievement_bitmask_is_set = false; + bool achievement_bit_index_is_set = false; bool achievement_id_is_set = false; bool animation_speed_is_set = false; bool category_is_set = false; From da77f3b356d9ab417253784e7f6c24edd6233452 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sat, 18 May 2024 21:37:34 -0500 Subject: [PATCH 452/539] fixing all remaning incorrect references to bitmask --- .../{achievement_bitmask.md => achievement_bit_index.md} | 0 .../input/pack/xml_file.xml | 0 .../output_proto/markers.bin | 0 .../output_xml/xml_file.xml | 0 .../testcase.yaml | 0 5 files changed, 0 insertions(+), 0 deletions(-) rename xml_converter/doc/acheivement/{achievement_bitmask.md => achievement_bit_index.md} (100%) rename xml_converter/integration_tests/test_cases/{achievement_bitmask_valid => achievement_bit_index_valid}/input/pack/xml_file.xml (100%) rename xml_converter/integration_tests/test_cases/{achievement_bitmask_valid => achievement_bit_index_valid}/output_proto/markers.bin (100%) rename xml_converter/integration_tests/test_cases/{achievement_bitmask_valid => achievement_bit_index_valid}/output_xml/xml_file.xml (100%) rename xml_converter/integration_tests/test_cases/{achievement_bitmask_valid => achievement_bit_index_valid}/testcase.yaml (100%) diff --git a/xml_converter/doc/acheivement/achievement_bitmask.md b/xml_converter/doc/acheivement/achievement_bit_index.md similarity index 100% rename from xml_converter/doc/acheivement/achievement_bitmask.md rename to xml_converter/doc/acheivement/achievement_bit_index.md diff --git a/xml_converter/integration_tests/test_cases/achievement_bitmask_valid/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/achievement_bit_index_valid/input/pack/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/achievement_bitmask_valid/input/pack/xml_file.xml rename to xml_converter/integration_tests/test_cases/achievement_bit_index_valid/input/pack/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/achievement_bitmask_valid/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/achievement_bit_index_valid/output_proto/markers.bin similarity index 100% rename from xml_converter/integration_tests/test_cases/achievement_bitmask_valid/output_proto/markers.bin rename to xml_converter/integration_tests/test_cases/achievement_bit_index_valid/output_proto/markers.bin diff --git a/xml_converter/integration_tests/test_cases/achievement_bitmask_valid/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/achievement_bit_index_valid/output_xml/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/achievement_bitmask_valid/output_xml/xml_file.xml rename to xml_converter/integration_tests/test_cases/achievement_bit_index_valid/output_xml/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/achievement_bitmask_valid/testcase.yaml b/xml_converter/integration_tests/test_cases/achievement_bit_index_valid/testcase.yaml similarity index 100% rename from xml_converter/integration_tests/test_cases/achievement_bitmask_valid/testcase.yaml rename to xml_converter/integration_tests/test_cases/achievement_bit_index_valid/testcase.yaml From a4a2dc3b69240e1fc491e0ef55fda9f3fb471365 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sun, 19 May 2024 08:05:10 -0500 Subject: [PATCH 453/539] Adding integration tests for the "type" attribute --- .../type_invalid/input/pack/xml_file.xml | 14 ++++++++++++++ .../type_invalid/output_proto/markers.bin | 0 .../type_invalid/output_xml/xml_file.xml | 16 ++++++++++++++++ .../test_cases/type_invalid/testcase.yaml | 13 +++++++++++++ .../type_valid/input/pack/xml_file.xml | 16 ++++++++++++++++ .../type_valid/output_proto/markers.bin | 3 +++ .../type_valid/output_xml/xml_file.xml | 18 ++++++++++++++++++ .../test_cases/type_valid/testcase.yaml | 5 +++++ 8 files changed, 85 insertions(+) create mode 100644 xml_converter/integration_tests/test_cases/type_invalid/input/pack/xml_file.xml create mode 100644 xml_converter/integration_tests/test_cases/type_invalid/output_proto/markers.bin create mode 100644 xml_converter/integration_tests/test_cases/type_invalid/output_xml/xml_file.xml create mode 100644 xml_converter/integration_tests/test_cases/type_invalid/testcase.yaml create mode 100644 xml_converter/integration_tests/test_cases/type_valid/input/pack/xml_file.xml create mode 100644 xml_converter/integration_tests/test_cases/type_valid/output_proto/markers.bin create mode 100644 xml_converter/integration_tests/test_cases/type_valid/output_xml/xml_file.xml create mode 100644 xml_converter/integration_tests/test_cases/type_valid/testcase.yaml diff --git a/xml_converter/integration_tests/test_cases/type_invalid/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/type_invalid/input/pack/xml_file.xml new file mode 100644 index 00000000..900fbd2c --- /dev/null +++ b/xml_converter/integration_tests/test_cases/type_invalid/input/pack/xml_file.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/xml_converter/integration_tests/test_cases/type_invalid/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/type_invalid/output_proto/markers.bin new file mode 100644 index 00000000..e69de29b diff --git a/xml_converter/integration_tests/test_cases/type_invalid/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/type_invalid/output_xml/xml_file.xml new file mode 100644 index 00000000..c4902555 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/type_invalid/output_xml/xml_file.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/xml_converter/integration_tests/test_cases/type_invalid/testcase.yaml b/xml_converter/integration_tests/test_cases/type_invalid/testcase.yaml new file mode 100644 index 00000000..2b5ad167 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/type_invalid/testcase.yaml @@ -0,0 +1,13 @@ +input_paths: + "pack": "xml" +expected_stdout: | + Error: Category Not Found "notmycategory" + test_cases/type_invalid/input/pack/xml_file.xml + 11 | + | ^^^^^^^^^^^^^ + Error: Category Not Found "nestedlevel4" + test_cases/type_invalid/input/pack/xml_file.xml + 12 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +expected_stderr: | +expected_returncode: 0 diff --git a/xml_converter/integration_tests/test_cases/type_valid/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/type_valid/input/pack/xml_file.xml new file mode 100644 index 00000000..664b0e0f --- /dev/null +++ b/xml_converter/integration_tests/test_cases/type_valid/input/pack/xml_file.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/xml_converter/integration_tests/test_cases/type_valid/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/type_valid/output_proto/markers.bin new file mode 100644 index 00000000..ef329220 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/type_valid/output_proto/markers.bin @@ -0,0 +1,3 @@ + + 2B \Ï)Cf¦RC{ÔWCB(èÌ“^– +a@ 2B \Ï)Cf¦RC{ÔWCBp,Tԅ߈¤ 2B \Ï)Cf¦RC{ÔWCB¸šÜ¸·xjÏ 2B \Ï)Cf¦RC{ÔWCB,’§íj@: \ No newline at end of file diff --git a/xml_converter/integration_tests/test_cases/type_valid/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/type_valid/output_xml/xml_file.xml new file mode 100644 index 00000000..8a7e7198 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/type_valid/output_xml/xml_file.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/xml_converter/integration_tests/test_cases/type_valid/testcase.yaml b/xml_converter/integration_tests/test_cases/type_valid/testcase.yaml new file mode 100644 index 00000000..9510c793 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/type_valid/testcase.yaml @@ -0,0 +1,5 @@ +input_paths: + "pack": "xml" +expected_stdout: | +expected_stderr: | +expected_returncode: 0 From 79e0586e4460f71614a4b23f780a9059cd944233 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sun, 19 May 2024 11:56:25 -0500 Subject: [PATCH 454/539] making the implicit copy explicit --- xml_converter/src/packaging_xml.cpp | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/xml_converter/src/packaging_xml.cpp b/xml_converter/src/packaging_xml.cpp index f5700314..ef7525bc 100644 --- a/xml_converter/src/packaging_xml.cpp +++ b/xml_converter/src/packaging_xml.cpp @@ -83,10 +83,13 @@ void parse_marker_categories( } } +//////////////////////////////////////////////////////////////////////////////// +// get_category +// +// Gets the category that this node references as its "type" so that the +// defaults of that category can be used when creating the new node. +//////////////////////////////////////////////////////////////////////////////// Category* get_category(rapidxml::xml_node<>* node, map* marker_categories, vector* errors) { - // TODO: This is a slow linear search, replace with something faster. - // maybe use data from already parsed node instead of searching for - // the attribute. rapidxml::xml_attribute<>* attribute = find_attribute(node, "type"); if (attribute == 0) { @@ -133,10 +136,12 @@ vector parse_pois(rapidxml::xml_node<>* root_node, mapdefault_icon; + icon = new Icon(default_category->default_icon); + } + else { + icon = new Icon(); } icon->init_from_xml(node, errors, state); @@ -145,10 +150,12 @@ vector parse_pois(rapidxml::xml_node<>* root_node, mapdefault_trail; + trail = new Trail(default_category->default_trail); + } + else { + trail = new Trail(); } trail->init_from_xml(node, errors, state); From d23b00ffaece8fcaf4ba99ff2977daf56ad3af41 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sun, 19 May 2024 16:32:25 -0500 Subject: [PATCH 455/539] remaking how category inheritance works --- .../cpp_templates/class_template.cpp | 64 +-- .../cpp_templates/class_template.hpp | 6 +- .../input/pack/xml_file.xml | 21 + .../output_proto/markers.bin | Bin 0 -> 159 bytes .../output_xml/xml_file.xml | 20 + .../category_inheritance/testcase.yaml | 5 + xml_converter/src/category_gen.cpp | 92 +--- xml_converter/src/category_gen.hpp | 6 +- xml_converter/src/icon_gen.cpp | 394 ------------------ xml_converter/src/icon_gen.hpp | 2 - xml_converter/src/packaging_xml.cpp | 128 +++--- xml_converter/src/trail_gen.cpp | 234 ----------- xml_converter/src/trail_gen.hpp | 2 - 13 files changed, 154 insertions(+), 820 deletions(-) create mode 100644 xml_converter/integration_tests/test_cases/category_inheritance/input/pack/xml_file.xml create mode 100644 xml_converter/integration_tests/test_cases/category_inheritance/output_proto/markers.bin create mode 100644 xml_converter/integration_tests/test_cases/category_inheritance/output_xml/xml_file.xml create mode 100644 xml_converter/integration_tests/test_cases/category_inheritance/testcase.yaml diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index c9311c0f..e73c9ee6 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -20,14 +20,26 @@ string {{cpp_class}}::classname() { {% if cpp_class == "Category" %} void {{cpp_class}}::init_from_xml(rapidxml::xml_node<>* node, vector* errors, XMLReaderState* state) { for (rapidxml::xml_attribute<>* attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()) { - bool is_icon_value = this->default_icon.init_xml_attribute(attribute, errors, state); - bool is_trail_value = this->default_trail.init_xml_attribute(attribute, errors, state); + bool handled = false; if (init_xml_attribute(attribute, errors, state)) { + handled = true; } - else if (is_icon_value || is_trail_value) { + // Attempt to parse the attributes and throw away the results. We + // perform this extra work here to identify if the attribute is + // part of the particular marker, and to gather any errors there + // might be with that attribute so they can be correctly attributed + // to this node instead of the children that inherit the field. + if (Icon().init_xml_attribute(attribute, errors, state)) { + this->icon_attributes.push_back(attribute); + handled = true; } - else { + if (Trail().init_xml_attribute(attribute, errors, state)) { + this->trail_attributes.push_back(attribute); + handled = true; + } + + if (!handled) { errors->push_back(new XMLAttributeNameError("Unknown " + this->classname() + " attribute ", attribute)); } } @@ -120,47 +132,3 @@ void {{cpp_class}}::parse_protobuf(waypoint::{{cpp_class}} proto_{{cpp_class_hea {% endif %} {% endfor %} } - -//////////////////////////////////////////////////////////////////////////////// -// apply_underlay -// -// Transforms this {{cpp_class}} as if this class was overlayed on top of the -// underlay argument. -//////////////////////////////////////////////////////////////////////////////// -void {{cpp_class}}::apply_underlay(const {{cpp_class}}& underlay) { - {% for attribute_variable in attribute_variables %} - {% if attribute_variable.is_component == false %} - if (!this->{{attribute_variable.attribute_flag_name}} && underlay.{{attribute_variable.attribute_flag_name}}) { - this->{{attribute_variable.attribute_name}} = underlay.{{attribute_variable.attribute_name}}; - this->{{attribute_variable.attribute_flag_name}} = true; - } - {% endif %} - {% endfor %} - {% if cpp_class == "Category" %} - - this->default_icon.apply_underlay(underlay.default_icon); - this->default_trail.apply_underlay(underlay.default_trail); - {% endif %} -} - -//////////////////////////////////////////////////////////////////////////////// -// apply_overlay -// -// Transforms this {{cpp_class}} as if the overlay argument were overlayed on -// top of this class. -//////////////////////////////////////////////////////////////////////////////// -void {{cpp_class}}::apply_overlay(const {{cpp_class}}& overlay) { - {% for attribute_variable in attribute_variables %} - {% if attribute_variable.is_component == false %} - if (overlay.{{attribute_variable.attribute_flag_name}}) { - this->{{attribute_variable.attribute_name}} = overlay.{{attribute_variable.attribute_name}}; - this->{{attribute_variable.attribute_flag_name}} = true; - } - {% endif %} - {% endfor %} - {% if cpp_class == "Category" %} - - this->default_icon.apply_overlay(overlay.default_icon); - this->default_trail.apply_overlay(overlay.default_trail); - {% endif %} -} diff --git a/xml_converter/generators/cpp_templates/class_template.hpp b/xml_converter/generators/cpp_templates/class_template.hpp index f5294cc1..6ff5f12f 100644 --- a/xml_converter/generators/cpp_templates/class_template.hpp +++ b/xml_converter/generators/cpp_templates/class_template.hpp @@ -26,8 +26,8 @@ class {{cpp_class}} : public Parseable { {% endfor %} {% if cpp_class == "Category" %} std::map children; - Icon default_icon; - Trail default_trail; + std::vector*> icon_attributes; + std::vector*> trail_attributes; Category* parent; void init_from_xml(rapidxml::xml_node<>* node, std::vector* errors, XMLReaderState* state); @@ -40,6 +40,4 @@ class {{cpp_class}} : public Parseable { {% if attributes_of_type_marker_category %} bool validate_attributes_of_type_marker_category(); {% endif %} - void apply_underlay(const {{cpp_class}}& underlay); - void apply_overlay(const {{cpp_class}}& overlay); }; diff --git a/xml_converter/integration_tests/test_cases/category_inheritance/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/category_inheritance/input/pack/xml_file.xml new file mode 100644 index 00000000..108f244a --- /dev/null +++ b/xml_converter/integration_tests/test_cases/category_inheritance/input/pack/xml_file.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/xml_converter/integration_tests/test_cases/category_inheritance/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/category_inheritance/output_proto/markers.bin new file mode 100644 index 0000000000000000000000000000000000000000..98788ad4502a7215e229ba79f32a38f148cfe7ff GIT binary patch literal 159 zcmd<`loD1ja^mNWIj`v~nzk&+S+@F0xHDW(3!5NVWiUjg6Nko&Gi-+@$4%o360#PO zhw5ZtxaTCwz!2vw%h0gQ*@>e-C*(@&{f;G4d_dc{c;V7c96M&+*|EJM>%0^vP=*yO P + + + + + + + + + + + + + + + + + + +
diff --git a/xml_converter/integration_tests/test_cases/category_inheritance/testcase.yaml b/xml_converter/integration_tests/test_cases/category_inheritance/testcase.yaml new file mode 100644 index 00000000..9510c793 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/category_inheritance/testcase.yaml @@ -0,0 +1,5 @@ +input_paths: + "pack": "xml" +expected_stdout: | +expected_stderr: | +expected_returncode: 0 diff --git a/xml_converter/src/category_gen.cpp b/xml_converter/src/category_gen.cpp index c2674d65..251be4d3 100644 --- a/xml_converter/src/category_gen.cpp +++ b/xml_converter/src/category_gen.cpp @@ -20,14 +20,26 @@ string Category::classname() { } void Category::init_from_xml(rapidxml::xml_node<>* node, vector* errors, XMLReaderState* state) { for (rapidxml::xml_attribute<>* attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()) { - bool is_icon_value = this->default_icon.init_xml_attribute(attribute, errors, state); - bool is_trail_value = this->default_trail.init_xml_attribute(attribute, errors, state); + bool handled = false; if (init_xml_attribute(attribute, errors, state)) { + handled = true; } - else if (is_icon_value || is_trail_value) { + // Attempt to parse the attributes and throw away the results. We + // perform this extra work here to identify if the attribute is + // part of the particular marker, and to gather any errors there + // might be with that attribute so they can be correctly attributed + // to this node instead of the children that inherit the field. + if (Icon().init_xml_attribute(attribute, errors, state)) { + this->icon_attributes.push_back(attribute); + handled = true; } - else { + if (Trail().init_xml_attribute(attribute, errors, state)) { + this->trail_attributes.push_back(attribute); + handled = true; + } + + if (!handled) { errors->push_back(new XMLAttributeNameError("Unknown " + this->classname() + " attribute ", attribute)); } } @@ -148,75 +160,3 @@ void Category::parse_protobuf(waypoint::Category proto_category, ProtoReaderStat proto_to_string(proto_category.tip_description(), state, &(this->tooltip_description), &(this->tooltip_description_is_set)); } } - -//////////////////////////////////////////////////////////////////////////////// -// apply_underlay -// -// Transforms this Category as if this class was overlayed on top of the -// underlay argument. -//////////////////////////////////////////////////////////////////////////////// -void Category::apply_underlay(const Category& underlay) { - if (!this->default_visibility_is_set && underlay.default_visibility_is_set) { - this->default_visibility = underlay.default_visibility; - this->default_visibility_is_set = true; - } - if (!this->display_name_is_set && underlay.display_name_is_set) { - this->display_name = underlay.display_name; - this->display_name_is_set = true; - } - if (!this->is_separator_is_set && underlay.is_separator_is_set) { - this->is_separator = underlay.is_separator; - this->is_separator_is_set = true; - } - if (!this->menu_id_is_set && underlay.menu_id_is_set) { - this->menu_id = underlay.menu_id; - this->menu_id_is_set = true; - } - if (!this->name_is_set && underlay.name_is_set) { - this->name = underlay.name; - this->name_is_set = true; - } - if (!this->tooltip_description_is_set && underlay.tooltip_description_is_set) { - this->tooltip_description = underlay.tooltip_description; - this->tooltip_description_is_set = true; - } - - this->default_icon.apply_underlay(underlay.default_icon); - this->default_trail.apply_underlay(underlay.default_trail); -} - -//////////////////////////////////////////////////////////////////////////////// -// apply_overlay -// -// Transforms this Category as if the overlay argument were overlayed on -// top of this class. -//////////////////////////////////////////////////////////////////////////////// -void Category::apply_overlay(const Category& overlay) { - if (overlay.default_visibility_is_set) { - this->default_visibility = overlay.default_visibility; - this->default_visibility_is_set = true; - } - if (overlay.display_name_is_set) { - this->display_name = overlay.display_name; - this->display_name_is_set = true; - } - if (overlay.is_separator_is_set) { - this->is_separator = overlay.is_separator; - this->is_separator_is_set = true; - } - if (overlay.menu_id_is_set) { - this->menu_id = overlay.menu_id; - this->menu_id_is_set = true; - } - if (overlay.name_is_set) { - this->name = overlay.name; - this->name_is_set = true; - } - if (overlay.tooltip_description_is_set) { - this->tooltip_description = overlay.tooltip_description; - this->tooltip_description_is_set = true; - } - - this->default_icon.apply_overlay(overlay.default_icon); - this->default_trail.apply_overlay(overlay.default_trail); -} diff --git a/xml_converter/src/category_gen.hpp b/xml_converter/src/category_gen.hpp index 840ee16a..5a04029b 100644 --- a/xml_converter/src/category_gen.hpp +++ b/xml_converter/src/category_gen.hpp @@ -30,8 +30,8 @@ class Category : public Parseable { bool name_is_set = false; bool tooltip_description_is_set = false; std::map children; - Icon default_icon; - Trail default_trail; + std::vector*> icon_attributes; + std::vector*> trail_attributes; Category* parent; void init_from_xml(rapidxml::xml_node<>* node, std::vector* errors, XMLReaderState* state); @@ -40,6 +40,4 @@ class Category : public Parseable { bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, XMLReaderState* state); waypoint::Category as_protobuf(ProtoWriterState* state) const; void parse_protobuf(waypoint::Category proto_category, ProtoReaderState* state); - void apply_underlay(const Category& underlay); - void apply_overlay(const Category& overlay); }; diff --git a/xml_converter/src/icon_gen.cpp b/xml_converter/src/icon_gen.cpp index 984f4256..f9573791 100644 --- a/xml_converter/src/icon_gen.cpp +++ b/xml_converter/src/icon_gen.cpp @@ -745,397 +745,3 @@ void Icon::parse_protobuf(waypoint::Icon proto_icon, ProtoReaderState* state) { proto_to_float(proto_icon.trigger().range(), state, &(this->trigger_range), &(this->trigger_range_is_set)); } } - -//////////////////////////////////////////////////////////////////////////////// -// apply_underlay -// -// Transforms this Icon as if this class was overlayed on top of the -// underlay argument. -//////////////////////////////////////////////////////////////////////////////// -void Icon::apply_underlay(const Icon& underlay) { - if (!this->achievement_bit_index_is_set && underlay.achievement_bit_index_is_set) { - this->achievement_bit_index = underlay.achievement_bit_index; - this->achievement_bit_index_is_set = true; - } - if (!this->achievement_id_is_set && underlay.achievement_id_is_set) { - this->achievement_id = underlay.achievement_id; - this->achievement_id_is_set = true; - } - if (!this->auto_trigger_is_set && underlay.auto_trigger_is_set) { - this->auto_trigger = underlay.auto_trigger; - this->auto_trigger_is_set = true; - } - if (!this->bounce_delay_is_set && underlay.bounce_delay_is_set) { - this->bounce_delay = underlay.bounce_delay; - this->bounce_delay_is_set = true; - } - if (!this->bounce_duration_is_set && underlay.bounce_duration_is_set) { - this->bounce_duration = underlay.bounce_duration; - this->bounce_duration_is_set = true; - } - if (!this->bounce_height_is_set && underlay.bounce_height_is_set) { - this->bounce_height = underlay.bounce_height; - this->bounce_height_is_set = true; - } - if (!this->category_is_set && underlay.category_is_set) { - this->category = underlay.category; - this->category_is_set = true; - } - if (!this->color_is_set && underlay.color_is_set) { - this->color = underlay.color; - this->color_is_set = true; - } - if (!this->copy_clipboard_is_set && underlay.copy_clipboard_is_set) { - this->copy_clipboard = underlay.copy_clipboard; - this->copy_clipboard_is_set = true; - } - if (!this->copy_message_is_set && underlay.copy_message_is_set) { - this->copy_message = underlay.copy_message; - this->copy_message_is_set = true; - } - if (!this->cull_chirality_is_set && underlay.cull_chirality_is_set) { - this->cull_chirality = underlay.cull_chirality; - this->cull_chirality_is_set = true; - } - if (!this->disable_player_cutout_is_set && underlay.disable_player_cutout_is_set) { - this->disable_player_cutout = underlay.disable_player_cutout; - this->disable_player_cutout_is_set = true; - } - if (!this->distance_fade_end_is_set && underlay.distance_fade_end_is_set) { - this->distance_fade_end = underlay.distance_fade_end; - this->distance_fade_end_is_set = true; - } - if (!this->distance_fade_start_is_set && underlay.distance_fade_start_is_set) { - this->distance_fade_start = underlay.distance_fade_start; - this->distance_fade_start_is_set = true; - } - if (!this->euler_rotation_is_set && underlay.euler_rotation_is_set) { - this->euler_rotation = underlay.euler_rotation; - this->euler_rotation_is_set = true; - } - if (!this->festival_filter_is_set && underlay.festival_filter_is_set) { - this->festival_filter = underlay.festival_filter; - this->festival_filter_is_set = true; - } - if (!this->guid_is_set && underlay.guid_is_set) { - this->guid = underlay.guid; - this->guid_is_set = true; - } - if (!this->has_countdown_is_set && underlay.has_countdown_is_set) { - this->has_countdown = underlay.has_countdown; - this->has_countdown_is_set = true; - } - if (!this->height_offset_is_set && underlay.height_offset_is_set) { - this->height_offset = underlay.height_offset; - this->height_offset_is_set = true; - } - if (!this->hide_category_is_set && underlay.hide_category_is_set) { - this->hide_category = underlay.hide_category; - this->hide_category_is_set = true; - } - if (!this->icon_is_set && underlay.icon_is_set) { - this->icon = underlay.icon; - this->icon_is_set = true; - } - if (!this->icon_size_is_set && underlay.icon_size_is_set) { - this->icon_size = underlay.icon_size; - this->icon_size_is_set = true; - } - if (!this->info_message_is_set && underlay.info_message_is_set) { - this->info_message = underlay.info_message; - this->info_message_is_set = true; - } - if (!this->invert_visibility_is_set && underlay.invert_visibility_is_set) { - this->invert_visibility = underlay.invert_visibility; - this->invert_visibility_is_set = true; - } - if (!this->map_display_size_is_set && underlay.map_display_size_is_set) { - this->map_display_size = underlay.map_display_size; - this->map_display_size_is_set = true; - } - if (!this->map_id_is_set && underlay.map_id_is_set) { - this->map_id = underlay.map_id; - this->map_id_is_set = true; - } - if (!this->map_type_filter_is_set && underlay.map_type_filter_is_set) { - this->map_type_filter = underlay.map_type_filter; - this->map_type_filter_is_set = true; - } - if (!this->maximum_size_on_screen_is_set && underlay.maximum_size_on_screen_is_set) { - this->maximum_size_on_screen = underlay.maximum_size_on_screen; - this->maximum_size_on_screen_is_set = true; - } - if (!this->minimum_size_on_screen_is_set && underlay.minimum_size_on_screen_is_set) { - this->minimum_size_on_screen = underlay.minimum_size_on_screen; - this->minimum_size_on_screen_is_set = true; - } - if (!this->mount_filter_is_set && underlay.mount_filter_is_set) { - this->mount_filter = underlay.mount_filter; - this->mount_filter_is_set = true; - } - if (!this->position_is_set && underlay.position_is_set) { - this->position = underlay.position; - this->position_is_set = true; - } - if (!this->profession_filter_is_set && underlay.profession_filter_is_set) { - this->profession_filter = underlay.profession_filter; - this->profession_filter_is_set = true; - } - if (!this->render_ingame_is_set && underlay.render_ingame_is_set) { - this->render_ingame = underlay.render_ingame; - this->render_ingame_is_set = true; - } - if (!this->render_on_map_is_set && underlay.render_on_map_is_set) { - this->render_on_map = underlay.render_on_map; - this->render_on_map_is_set = true; - } - if (!this->render_on_minimap_is_set && underlay.render_on_minimap_is_set) { - this->render_on_minimap = underlay.render_on_minimap; - this->render_on_minimap_is_set = true; - } - if (!this->reset_behavior_is_set && underlay.reset_behavior_is_set) { - this->reset_behavior = underlay.reset_behavior; - this->reset_behavior_is_set = true; - } - if (!this->reset_length_is_set && underlay.reset_length_is_set) { - this->reset_length = underlay.reset_length; - this->reset_length_is_set = true; - } - if (!this->scale_on_map_with_zoom_is_set && underlay.scale_on_map_with_zoom_is_set) { - this->scale_on_map_with_zoom = underlay.scale_on_map_with_zoom; - this->scale_on_map_with_zoom_is_set = true; - } - if (!this->schedule_is_set && underlay.schedule_is_set) { - this->schedule = underlay.schedule; - this->schedule_is_set = true; - } - if (!this->schedule_duration_is_set && underlay.schedule_duration_is_set) { - this->schedule_duration = underlay.schedule_duration; - this->schedule_duration_is_set = true; - } - if (!this->show_category_is_set && underlay.show_category_is_set) { - this->show_category = underlay.show_category; - this->show_category_is_set = true; - } - if (!this->specialization_filter_is_set && underlay.specialization_filter_is_set) { - this->specialization_filter = underlay.specialization_filter; - this->specialization_filter_is_set = true; - } - if (!this->species_filter_is_set && underlay.species_filter_is_set) { - this->species_filter = underlay.species_filter; - this->species_filter_is_set = true; - } - if (!this->toggle_category_is_set && underlay.toggle_category_is_set) { - this->toggle_category = underlay.toggle_category; - this->toggle_category_is_set = true; - } - if (!this->tooltip_description_is_set && underlay.tooltip_description_is_set) { - this->tooltip_description = underlay.tooltip_description; - this->tooltip_description_is_set = true; - } - if (!this->tooltip_name_is_set && underlay.tooltip_name_is_set) { - this->tooltip_name = underlay.tooltip_name; - this->tooltip_name_is_set = true; - } - if (!this->trigger_range_is_set && underlay.trigger_range_is_set) { - this->trigger_range = underlay.trigger_range; - this->trigger_range_is_set = true; - } -} - -//////////////////////////////////////////////////////////////////////////////// -// apply_overlay -// -// Transforms this Icon as if the overlay argument were overlayed on -// top of this class. -//////////////////////////////////////////////////////////////////////////////// -void Icon::apply_overlay(const Icon& overlay) { - if (overlay.achievement_bit_index_is_set) { - this->achievement_bit_index = overlay.achievement_bit_index; - this->achievement_bit_index_is_set = true; - } - if (overlay.achievement_id_is_set) { - this->achievement_id = overlay.achievement_id; - this->achievement_id_is_set = true; - } - if (overlay.auto_trigger_is_set) { - this->auto_trigger = overlay.auto_trigger; - this->auto_trigger_is_set = true; - } - if (overlay.bounce_delay_is_set) { - this->bounce_delay = overlay.bounce_delay; - this->bounce_delay_is_set = true; - } - if (overlay.bounce_duration_is_set) { - this->bounce_duration = overlay.bounce_duration; - this->bounce_duration_is_set = true; - } - if (overlay.bounce_height_is_set) { - this->bounce_height = overlay.bounce_height; - this->bounce_height_is_set = true; - } - if (overlay.category_is_set) { - this->category = overlay.category; - this->category_is_set = true; - } - if (overlay.color_is_set) { - this->color = overlay.color; - this->color_is_set = true; - } - if (overlay.copy_clipboard_is_set) { - this->copy_clipboard = overlay.copy_clipboard; - this->copy_clipboard_is_set = true; - } - if (overlay.copy_message_is_set) { - this->copy_message = overlay.copy_message; - this->copy_message_is_set = true; - } - if (overlay.cull_chirality_is_set) { - this->cull_chirality = overlay.cull_chirality; - this->cull_chirality_is_set = true; - } - if (overlay.disable_player_cutout_is_set) { - this->disable_player_cutout = overlay.disable_player_cutout; - this->disable_player_cutout_is_set = true; - } - if (overlay.distance_fade_end_is_set) { - this->distance_fade_end = overlay.distance_fade_end; - this->distance_fade_end_is_set = true; - } - if (overlay.distance_fade_start_is_set) { - this->distance_fade_start = overlay.distance_fade_start; - this->distance_fade_start_is_set = true; - } - if (overlay.euler_rotation_is_set) { - this->euler_rotation = overlay.euler_rotation; - this->euler_rotation_is_set = true; - } - if (overlay.festival_filter_is_set) { - this->festival_filter = overlay.festival_filter; - this->festival_filter_is_set = true; - } - if (overlay.guid_is_set) { - this->guid = overlay.guid; - this->guid_is_set = true; - } - if (overlay.has_countdown_is_set) { - this->has_countdown = overlay.has_countdown; - this->has_countdown_is_set = true; - } - if (overlay.height_offset_is_set) { - this->height_offset = overlay.height_offset; - this->height_offset_is_set = true; - } - if (overlay.hide_category_is_set) { - this->hide_category = overlay.hide_category; - this->hide_category_is_set = true; - } - if (overlay.icon_is_set) { - this->icon = overlay.icon; - this->icon_is_set = true; - } - if (overlay.icon_size_is_set) { - this->icon_size = overlay.icon_size; - this->icon_size_is_set = true; - } - if (overlay.info_message_is_set) { - this->info_message = overlay.info_message; - this->info_message_is_set = true; - } - if (overlay.invert_visibility_is_set) { - this->invert_visibility = overlay.invert_visibility; - this->invert_visibility_is_set = true; - } - if (overlay.map_display_size_is_set) { - this->map_display_size = overlay.map_display_size; - this->map_display_size_is_set = true; - } - if (overlay.map_id_is_set) { - this->map_id = overlay.map_id; - this->map_id_is_set = true; - } - if (overlay.map_type_filter_is_set) { - this->map_type_filter = overlay.map_type_filter; - this->map_type_filter_is_set = true; - } - if (overlay.maximum_size_on_screen_is_set) { - this->maximum_size_on_screen = overlay.maximum_size_on_screen; - this->maximum_size_on_screen_is_set = true; - } - if (overlay.minimum_size_on_screen_is_set) { - this->minimum_size_on_screen = overlay.minimum_size_on_screen; - this->minimum_size_on_screen_is_set = true; - } - if (overlay.mount_filter_is_set) { - this->mount_filter = overlay.mount_filter; - this->mount_filter_is_set = true; - } - if (overlay.position_is_set) { - this->position = overlay.position; - this->position_is_set = true; - } - if (overlay.profession_filter_is_set) { - this->profession_filter = overlay.profession_filter; - this->profession_filter_is_set = true; - } - if (overlay.render_ingame_is_set) { - this->render_ingame = overlay.render_ingame; - this->render_ingame_is_set = true; - } - if (overlay.render_on_map_is_set) { - this->render_on_map = overlay.render_on_map; - this->render_on_map_is_set = true; - } - if (overlay.render_on_minimap_is_set) { - this->render_on_minimap = overlay.render_on_minimap; - this->render_on_minimap_is_set = true; - } - if (overlay.reset_behavior_is_set) { - this->reset_behavior = overlay.reset_behavior; - this->reset_behavior_is_set = true; - } - if (overlay.reset_length_is_set) { - this->reset_length = overlay.reset_length; - this->reset_length_is_set = true; - } - if (overlay.scale_on_map_with_zoom_is_set) { - this->scale_on_map_with_zoom = overlay.scale_on_map_with_zoom; - this->scale_on_map_with_zoom_is_set = true; - } - if (overlay.schedule_is_set) { - this->schedule = overlay.schedule; - this->schedule_is_set = true; - } - if (overlay.schedule_duration_is_set) { - this->schedule_duration = overlay.schedule_duration; - this->schedule_duration_is_set = true; - } - if (overlay.show_category_is_set) { - this->show_category = overlay.show_category; - this->show_category_is_set = true; - } - if (overlay.specialization_filter_is_set) { - this->specialization_filter = overlay.specialization_filter; - this->specialization_filter_is_set = true; - } - if (overlay.species_filter_is_set) { - this->species_filter = overlay.species_filter; - this->species_filter_is_set = true; - } - if (overlay.toggle_category_is_set) { - this->toggle_category = overlay.toggle_category; - this->toggle_category_is_set = true; - } - if (overlay.tooltip_description_is_set) { - this->tooltip_description = overlay.tooltip_description; - this->tooltip_description_is_set = true; - } - if (overlay.tooltip_name_is_set) { - this->tooltip_name = overlay.tooltip_name; - this->tooltip_name_is_set = true; - } - if (overlay.trigger_range_is_set) { - this->trigger_range = overlay.trigger_range; - this->trigger_range_is_set = true; - } -} diff --git a/xml_converter/src/icon_gen.hpp b/xml_converter/src/icon_gen.hpp index ae2e0597..11177895 100644 --- a/xml_converter/src/icon_gen.hpp +++ b/xml_converter/src/icon_gen.hpp @@ -127,6 +127,4 @@ class Icon : public Parseable { waypoint::Icon as_protobuf(ProtoWriterState* state) const; void parse_protobuf(waypoint::Icon proto_icon, ProtoReaderState* state); bool validate_attributes_of_type_marker_category(); - void apply_underlay(const Icon& underlay); - void apply_overlay(const Icon& overlay); }; diff --git a/xml_converter/src/packaging_xml.cpp b/xml_converter/src/packaging_xml.cpp index ef7525bc..3f096b1d 100644 --- a/xml_converter/src/packaging_xml.cpp +++ b/xml_converter/src/packaging_xml.cpp @@ -24,30 +24,49 @@ void parse_marker_categories( XMLReaderState* state, int depth = 0) { if (get_node_name(node) == "MarkerCategory") { - Category new_category; - new_category.init_from_xml(node, errors, state); - string name; - if (!new_category.name_is_set) { + + rapidxml::xml_attribute<>* name_attribute = find_attribute(node, "name"); + if (name_attribute == 0) { + // TODO: This error should really be for the entire node not just the name errors->push_back(new XMLNodeNameError("Category attribute 'name' is missing so it cannot be properly referenced", node)); + // TODO: Maybe fall back on display name slugification. name = "UNKNOWN_CATEGORY_" + to_string(UNKNOWN_CATEGORY_COUNTER); UNKNOWN_CATEGORY_COUNTER++; } - else if (new_category.name == "") { + else { + name = lowercase(get_attribute_value(name_attribute)); + } + + if (name == "") { errors->push_back(new XMLNodeNameError("Category attribute 'name' is an empty string so it cannot be properly referenced", node)); // TODO: Maybe fall back on display name slugification. name = "UNKNOWN_CATEGORY_" + to_string(UNKNOWN_CATEGORY_COUNTER); UNKNOWN_CATEGORY_COUNTER++; } + + // Build the new category + Category* category; + + // Create and initialize a new category if this one does not exist + auto existing_category_search = marker_categories->find(name); + if (existing_category_search == marker_categories->end()) { + category = &(*marker_categories)[name]; + category->parent = parent; + } else { - name = lowercase(new_category.name); + category = &existing_category_search->second; + if (category->parent != parent) { + errors->push_back(new XMLNodeNameError("Category somehow has a different parent then it used to. This might be a bug in xml_converter", node)); + } } - // If this category itself, without any cascading values, does not have - // an id then create a new one for it based on the hashes of its name - // and its parents names. - if (!new_category.menu_id_is_set) { + category->init_from_xml(node, errors, state); + + // If this category does not have an id then create a new one for it + // based on the hashes of its name and its parents names. + if (!category->menu_id_is_set) { Hash128 new_id; new_id.update(name); @@ -56,26 +75,12 @@ void parse_marker_categories( new_id.update(next_node->name); next_node = next_node->parent; } - new_category.menu_id = new_id.unique_id(); - new_category.menu_id_is_set = true; - } - // Create and initialize a new category if this one does not exist - Category* existing_category; - auto existing_category_search = marker_categories->find(name); - if (existing_category_search == marker_categories->end()) { - existing_category = &(*marker_categories)[name]; - existing_category->parent = parent; - } - else { - existing_category = &existing_category_search->second; - if (existing_category->parent != parent) { - errors->push_back(new XMLNodeNameError("Category somehow has a different parent then it used to. This might be a bug in xml_converter", node)); - } + category->menu_id = new_id.unique_id(); + category->menu_id_is_set = true; } - existing_category->apply_overlay(new_category); for (rapidxml::xml_node<>* child_node = node->first_node(); child_node; child_node = child_node->next_sibling()) { - parse_marker_categories(child_node, &(existing_category->children), existing_category, errors, state, depth + 1); + parse_marker_categories(child_node, &(category->children), category, errors, state, depth + 1); } } else { @@ -84,44 +89,45 @@ void parse_marker_categories( } //////////////////////////////////////////////////////////////////////////////// -// get_category +// get_categories // -// Gets the category that this node references as its "type" so that the -// defaults of that category can be used when creating the new node. +// Gets the hirearchy of categories that this node references as its "type" so +// that the defaults of those categories can be used when creating the new node. //////////////////////////////////////////////////////////////////////////////// -Category* get_category(rapidxml::xml_node<>* node, map* marker_categories, vector* errors) { +vector get_categories( + rapidxml::xml_node<>* node, + map* marker_categories, + vector* errors) { + vector categories; + rapidxml::xml_attribute<>* attribute = find_attribute(node, "type"); if (attribute == 0) { // TODO: This error should really be for the entire node not just the name errors->push_back(new XMLNodeNameError("No Attribute Named Type", node)); - return nullptr; + return categories; } vector split_categories = split(get_attribute_value(attribute), "."); - if (split_categories.size() == 0) { errors->push_back(new XMLAttributeValueError("Empty Type", attribute)); - return nullptr; + return categories; } - Category* output = nullptr; - for (unsigned int i = 0; i < split_categories.size(); i++) { string category_name = lowercase(split_categories[i]); auto category = marker_categories->find(category_name); - if (category == marker_categories->end()) { errors->push_back(new XMLAttributeValueError("Category Not Found \"" + category_name + "\"", attribute)); - return nullptr; + return categories; } - output = &category->second; - - marker_categories = &output->children; + categories.push_back(&category->second); + marker_categories = &category->second.children; } - return output; + + return categories; } //////////////////////////////////////////////////////////////////////////////// @@ -132,30 +138,40 @@ Category* get_category(rapidxml::xml_node<>* node, map* marker vector parse_pois(rapidxml::xml_node<>* root_node, map* marker_categories, vector* errors, XMLReaderState* state) { vector markers; + // A new error array to ignore the parsing erorrs that would have already + // been caught when the attributes were parsed in the category. + vector ignored_errors; + for (rapidxml::xml_node<>* node = root_node->first_node(); node; node = node->next_sibling()) { if (get_node_name(node) == "POI") { - Category* default_category = get_category(node, marker_categories, errors); + vector categories = get_categories(node, marker_categories, errors); - Icon* icon; - if (default_category != nullptr) { - icon = new Icon(default_category->default_icon); - } - else { - icon = new Icon(); + Icon* icon = new Icon(); + + for (size_t category_index = 0; category_index < categories.size(); category_index++) { + for (size_t i = 0; i < categories[category_index]->icon_attributes.size(); i++) { + icon->init_xml_attribute( + categories[category_index]->icon_attributes[i], + &ignored_errors, + state); + } } icon->init_from_xml(node, errors, state); markers.push_back(icon); } else if (get_node_name(node) == "Trail") { - Category* default_category = get_category(node, marker_categories, errors); + vector categories = get_categories(node, marker_categories, errors); - Trail* trail; - if (default_category != nullptr) { - trail = new Trail(default_category->default_trail); - } - else { - trail = new Trail(); + Trail* trail = new Trail(); + + for (size_t category_index = 0; category_index < categories.size(); category_index++) { + for (size_t i = 0; i < categories[category_index]->icon_attributes.size(); i++) { + trail->init_xml_attribute( + categories[category_index]->icon_attributes[i], + &ignored_errors, + state); + } } trail->init_from_xml(node, errors, state); diff --git a/xml_converter/src/trail_gen.cpp b/xml_converter/src/trail_gen.cpp index 76c05bf8..d3d269da 100644 --- a/xml_converter/src/trail_gen.cpp +++ b/xml_converter/src/trail_gen.cpp @@ -443,237 +443,3 @@ void Trail::parse_protobuf(waypoint::Trail proto_trail, ProtoReaderState* state) proto_to_float(proto_trail.scale(), state, &(this->trail_scale), &(this->trail_scale_is_set)); } } - -//////////////////////////////////////////////////////////////////////////////// -// apply_underlay -// -// Transforms this Trail as if this class was overlayed on top of the -// underlay argument. -//////////////////////////////////////////////////////////////////////////////// -void Trail::apply_underlay(const Trail& underlay) { - if (!this->achievement_bit_index_is_set && underlay.achievement_bit_index_is_set) { - this->achievement_bit_index = underlay.achievement_bit_index; - this->achievement_bit_index_is_set = true; - } - if (!this->achievement_id_is_set && underlay.achievement_id_is_set) { - this->achievement_id = underlay.achievement_id; - this->achievement_id_is_set = true; - } - if (!this->animation_speed_is_set && underlay.animation_speed_is_set) { - this->animation_speed = underlay.animation_speed; - this->animation_speed_is_set = true; - } - if (!this->category_is_set && underlay.category_is_set) { - this->category = underlay.category; - this->category_is_set = true; - } - if (!this->color_is_set && underlay.color_is_set) { - this->color = underlay.color; - this->color_is_set = true; - } - if (!this->cull_chirality_is_set && underlay.cull_chirality_is_set) { - this->cull_chirality = underlay.cull_chirality; - this->cull_chirality_is_set = true; - } - if (!this->disable_player_cutout_is_set && underlay.disable_player_cutout_is_set) { - this->disable_player_cutout = underlay.disable_player_cutout; - this->disable_player_cutout_is_set = true; - } - if (!this->distance_fade_end_is_set && underlay.distance_fade_end_is_set) { - this->distance_fade_end = underlay.distance_fade_end; - this->distance_fade_end_is_set = true; - } - if (!this->distance_fade_start_is_set && underlay.distance_fade_start_is_set) { - this->distance_fade_start = underlay.distance_fade_start; - this->distance_fade_start_is_set = true; - } - if (!this->festival_filter_is_set && underlay.festival_filter_is_set) { - this->festival_filter = underlay.festival_filter; - this->festival_filter_is_set = true; - } - if (!this->guid_is_set && underlay.guid_is_set) { - this->guid = underlay.guid; - this->guid_is_set = true; - } - if (!this->is_wall_is_set && underlay.is_wall_is_set) { - this->is_wall = underlay.is_wall; - this->is_wall_is_set = true; - } - if (!this->map_display_size_is_set && underlay.map_display_size_is_set) { - this->map_display_size = underlay.map_display_size; - this->map_display_size_is_set = true; - } - if (!this->map_id_is_set && underlay.map_id_is_set) { - this->map_id = underlay.map_id; - this->map_id_is_set = true; - } - if (!this->map_type_filter_is_set && underlay.map_type_filter_is_set) { - this->map_type_filter = underlay.map_type_filter; - this->map_type_filter_is_set = true; - } - if (!this->mount_filter_is_set && underlay.mount_filter_is_set) { - this->mount_filter = underlay.mount_filter; - this->mount_filter_is_set = true; - } - if (!this->profession_filter_is_set && underlay.profession_filter_is_set) { - this->profession_filter = underlay.profession_filter; - this->profession_filter_is_set = true; - } - if (!this->render_ingame_is_set && underlay.render_ingame_is_set) { - this->render_ingame = underlay.render_ingame; - this->render_ingame_is_set = true; - } - if (!this->render_on_map_is_set && underlay.render_on_map_is_set) { - this->render_on_map = underlay.render_on_map; - this->render_on_map_is_set = true; - } - if (!this->render_on_minimap_is_set && underlay.render_on_minimap_is_set) { - this->render_on_minimap = underlay.render_on_minimap; - this->render_on_minimap_is_set = true; - } - if (!this->schedule_is_set && underlay.schedule_is_set) { - this->schedule = underlay.schedule; - this->schedule_is_set = true; - } - if (!this->schedule_duration_is_set && underlay.schedule_duration_is_set) { - this->schedule_duration = underlay.schedule_duration; - this->schedule_duration_is_set = true; - } - if (!this->specialization_filter_is_set && underlay.specialization_filter_is_set) { - this->specialization_filter = underlay.specialization_filter; - this->specialization_filter_is_set = true; - } - if (!this->species_filter_is_set && underlay.species_filter_is_set) { - this->species_filter = underlay.species_filter; - this->species_filter_is_set = true; - } - if (!this->texture_is_set && underlay.texture_is_set) { - this->texture = underlay.texture; - this->texture_is_set = true; - } - if (!this->trail_data_is_set && underlay.trail_data_is_set) { - this->trail_data = underlay.trail_data; - this->trail_data_is_set = true; - } - if (!this->trail_scale_is_set && underlay.trail_scale_is_set) { - this->trail_scale = underlay.trail_scale; - this->trail_scale_is_set = true; - } -} - -//////////////////////////////////////////////////////////////////////////////// -// apply_overlay -// -// Transforms this Trail as if the overlay argument were overlayed on -// top of this class. -//////////////////////////////////////////////////////////////////////////////// -void Trail::apply_overlay(const Trail& overlay) { - if (overlay.achievement_bit_index_is_set) { - this->achievement_bit_index = overlay.achievement_bit_index; - this->achievement_bit_index_is_set = true; - } - if (overlay.achievement_id_is_set) { - this->achievement_id = overlay.achievement_id; - this->achievement_id_is_set = true; - } - if (overlay.animation_speed_is_set) { - this->animation_speed = overlay.animation_speed; - this->animation_speed_is_set = true; - } - if (overlay.category_is_set) { - this->category = overlay.category; - this->category_is_set = true; - } - if (overlay.color_is_set) { - this->color = overlay.color; - this->color_is_set = true; - } - if (overlay.cull_chirality_is_set) { - this->cull_chirality = overlay.cull_chirality; - this->cull_chirality_is_set = true; - } - if (overlay.disable_player_cutout_is_set) { - this->disable_player_cutout = overlay.disable_player_cutout; - this->disable_player_cutout_is_set = true; - } - if (overlay.distance_fade_end_is_set) { - this->distance_fade_end = overlay.distance_fade_end; - this->distance_fade_end_is_set = true; - } - if (overlay.distance_fade_start_is_set) { - this->distance_fade_start = overlay.distance_fade_start; - this->distance_fade_start_is_set = true; - } - if (overlay.festival_filter_is_set) { - this->festival_filter = overlay.festival_filter; - this->festival_filter_is_set = true; - } - if (overlay.guid_is_set) { - this->guid = overlay.guid; - this->guid_is_set = true; - } - if (overlay.is_wall_is_set) { - this->is_wall = overlay.is_wall; - this->is_wall_is_set = true; - } - if (overlay.map_display_size_is_set) { - this->map_display_size = overlay.map_display_size; - this->map_display_size_is_set = true; - } - if (overlay.map_id_is_set) { - this->map_id = overlay.map_id; - this->map_id_is_set = true; - } - if (overlay.map_type_filter_is_set) { - this->map_type_filter = overlay.map_type_filter; - this->map_type_filter_is_set = true; - } - if (overlay.mount_filter_is_set) { - this->mount_filter = overlay.mount_filter; - this->mount_filter_is_set = true; - } - if (overlay.profession_filter_is_set) { - this->profession_filter = overlay.profession_filter; - this->profession_filter_is_set = true; - } - if (overlay.render_ingame_is_set) { - this->render_ingame = overlay.render_ingame; - this->render_ingame_is_set = true; - } - if (overlay.render_on_map_is_set) { - this->render_on_map = overlay.render_on_map; - this->render_on_map_is_set = true; - } - if (overlay.render_on_minimap_is_set) { - this->render_on_minimap = overlay.render_on_minimap; - this->render_on_minimap_is_set = true; - } - if (overlay.schedule_is_set) { - this->schedule = overlay.schedule; - this->schedule_is_set = true; - } - if (overlay.schedule_duration_is_set) { - this->schedule_duration = overlay.schedule_duration; - this->schedule_duration_is_set = true; - } - if (overlay.specialization_filter_is_set) { - this->specialization_filter = overlay.specialization_filter; - this->specialization_filter_is_set = true; - } - if (overlay.species_filter_is_set) { - this->species_filter = overlay.species_filter; - this->species_filter_is_set = true; - } - if (overlay.texture_is_set) { - this->texture = overlay.texture; - this->texture_is_set = true; - } - if (overlay.trail_data_is_set) { - this->trail_data = overlay.trail_data; - this->trail_data_is_set = true; - } - if (overlay.trail_scale_is_set) { - this->trail_scale = overlay.trail_scale; - this->trail_scale_is_set = true; - } -} diff --git a/xml_converter/src/trail_gen.hpp b/xml_converter/src/trail_gen.hpp index 68941c86..5d14ff10 100644 --- a/xml_converter/src/trail_gen.hpp +++ b/xml_converter/src/trail_gen.hpp @@ -85,6 +85,4 @@ class Trail : public Parseable { waypoint::Trail as_protobuf(ProtoWriterState* state) const; void parse_protobuf(waypoint::Trail proto_trail, ProtoReaderState* state); bool validate_attributes_of_type_marker_category(); - void apply_underlay(const Trail& underlay); - void apply_overlay(const Trail& overlay); }; From a07c4623231f0408ffbb44dce995cca58abb95e7 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sun, 19 May 2024 23:22:38 -0500 Subject: [PATCH 456/539] setting up a parallel method of accessing metadata contents --- xml_converter/generators/main.py | 5 +- xml_converter/generators/metadata.py | 146 +++++++++++++++++++++++++++ xml_converter/generators/util.py | 2 + xml_converter/requirements.txt | 3 +- 4 files changed, 154 insertions(+), 2 deletions(-) create mode 100644 xml_converter/generators/metadata.py diff --git a/xml_converter/generators/main.py b/xml_converter/generators/main.py index 722b0a05..d9934672 100644 --- a/xml_converter/generators/main.py +++ b/xml_converter/generators/main.py @@ -11,7 +11,7 @@ from util import capitalize, SchemaType, Document from generate_cpp import write_cpp_classes, write_attribute import argparse - +import metadata XML_ATTRIBUTE_REGEX: Final[str] = "^[A-Za-z]+$" PROTO_FIELD_REGEX: Final[str] = "^[a-z_.]+$" @@ -136,6 +136,8 @@ def load_input_doc(self, dir_path: str) -> None: print(filepath) raise e + metadata_dataclass = metadata.parse_data(document.metadata) + error = validate_front_matter_schema(document.metadata) if error != "": print(filepath) @@ -143,6 +145,7 @@ def load_input_doc(self, dir_path: str) -> None: self.data[filepath] = Document( metadata=document.metadata, + metadata_dataclass=metadata_dataclass, content=document.content ) diff --git a/xml_converter/generators/metadata.py b/xml_converter/generators/metadata.py new file mode 100644 index 00000000..344c1cfc --- /dev/null +++ b/xml_converter/generators/metadata.py @@ -0,0 +1,146 @@ +from dataclasses import dataclass, field +import enum +from typing import Dict, List, Literal, Optional, Any, Union +import classnotation + + +class NodeType(enum.Enum): + icon = "Icon" + trail = "Trail" + category = "Category" + + +class SubcomponentType(enum.Enum): + int32 = "Int32" + fixed32 = "Fixed32" + float32 = "Float32" + + +@dataclass +class CustomFunction: + function: str + side_effects: List[str] + + +@dataclass +class CustomFunctions: + read_xml: Optional[CustomFunction] = field(default=None, metadata={"json": "read.xml"}) + read_xml_icon: Optional[CustomFunction] = field(default=None, metadata={"json": "read.xml.icon"}) + read_xml_trail: Optional[CustomFunction] = field(default=None, metadata={"json": "read.xml.trail"}) + + read_proto: Optional[CustomFunction] = field(default=None, metadata={"json": "read.proto"}) + read_proto_icon: Optional[CustomFunction] = field(default=None, metadata={"json": "read.proto.icon"}) + read_proto_trail: Optional[CustomFunction] = field(default=None, metadata={"json": "read.proto.trail"}) + + write_xml: Optional[CustomFunction] = field(default=None, metadata={"json": "write.xml"}) + write_xml_icon: Optional[CustomFunction] = field(default=None, metadata={"json": "write.xml.icon"}) + write_xml_trail: Optional[CustomFunction] = field(default=None, metadata={"json": "write.xml.trail"}) + + write_proto: Optional[CustomFunction] = field(default=None, metadata={"json": "write.proto"}) + write_proto_icon: Optional[CustomFunction] = field(default=None, metadata={"json": "write.proto.icon"}) + write_proto_trail: Optional[CustomFunction] = field(default=None, metadata={"json": "write.proto.trail"}) + + +@dataclass(kw_only=True) +class BaseMetadata: + name: str # TODO Match this to the regex ATTRIBUTE_NAME_REGEX + applies_to: List[NodeType] + xml_fields: List[str] # TODO: Matche these to XML_ATTRIBUTE_REGEX + protobuf_field: str # TODO: Match this to PROTO_FIELD_REGEX + + custom_functions: CustomFunctions = CustomFunctions() + examples: List[str] = field(default_factory=list) + + +@dataclass(kw_only=True) +class Int32Metadata(BaseMetadata): + variable_type: Literal["Int32"] = field(metadata={"json": "type"}) + + +@dataclass(kw_only=True) +class Fixed32Metadata(BaseMetadata): + variable_type: Literal["Fixed32"] = field(metadata={"json": "type"}) + + +@dataclass(kw_only=True) +class Float32Metadata(BaseMetadata): + variable_type: Literal["Float32"] = field(metadata={"json": "type"}) + + +@dataclass(kw_only=True) +class StringMetadata(BaseMetadata): + variable_type: Literal["String"] = field(metadata={"json": "type"}) + + +@dataclass(kw_only=True) +class BooleanMetadata(BaseMetadata): + variable_type: Literal["Boolean"] = field(metadata={"json": "type"}) + + +@dataclass(kw_only=True) +class MultiFlagValueMetadata(BaseMetadata): + variable_type: Literal["MultiflagValue"] = field(metadata={"json": "type"}) + flags: Dict[str, List[str]] # Validate keys against INTERNAL_VARIBLE_REGEX + + +@dataclass(kw_only=True) +class EnumMetadata(BaseMetadata): + variable_type: Literal["Enum"] = field(metadata={"json": "type"}) + values: Dict[str, List[str]] # Validate keys against INTERNAL_VARIBLE_REGEX + + +@dataclass +class CompoundSubComponent: + name: str + subcomponent_type: SubcomponentType = field(metadata={"json": "type"}) + xml_fields: List[str] + protobuf_field: str + + +@dataclass(kw_only=True) +class CompoundValueMetadata(BaseMetadata): + variable_type: Literal["CompoundValue"] = field(metadata={"json": "type"}) + xml_bundled_components: List[str] + xml_separate_components: List[str] + + components: List[CompoundSubComponent] + + +@dataclass(kw_only=True) +class CompoundCustomClassMetadata(BaseMetadata): + variable_type: Literal["CompoundCustomClass"] = field(metadata={"json": "type"}) + cpp_class: str = field(metadata={"json": "class"}) + xml_bundled_components: List[str] + xml_separate_components: List[str] + components: List[CompoundSubComponent] + + +@dataclass(kw_only=True) +class CustomMetadata(BaseMetadata): + variable_type: Literal["Custom"] = field(metadata={"json": "type"}) + cpp_class: str = field(metadata={"json": "class"}) + uses_file_path: Optional[bool] = None + + +MetadataType = Union[ + Int32Metadata, + Fixed32Metadata, + Float32Metadata, + StringMetadata, + BooleanMetadata, + MultiFlagValueMetadata, + EnumMetadata, + CompoundValueMetadata, + CompoundCustomClassMetadata, + CustomMetadata +] + + +@dataclass +class Wrapper: + metadata: MetadataType + + +def parse_data(document: Any) -> MetadataType: + wrapper: Wrapper = classnotation.load_data(Wrapper, {"metadata": document}) + return wrapper.metadata diff --git a/xml_converter/generators/util.py b/xml_converter/generators/util.py index 5137cb8d..f185504f 100644 --- a/xml_converter/generators/util.py +++ b/xml_converter/generators/util.py @@ -1,5 +1,6 @@ from dataclasses import dataclass from typing import Dict, Any +from metadata import MetadataType ################################################################################ @@ -62,4 +63,5 @@ def normalize(word: str) -> str: @dataclass class Document: metadata: SchemaType + metadata_dataclass: MetadataType content: str diff --git a/xml_converter/requirements.txt b/xml_converter/requirements.txt index 30748836..62bb8a72 100644 --- a/xml_converter/requirements.txt +++ b/xml_converter/requirements.txt @@ -1,3 +1,4 @@ +classnotation==1.2.1 attrs==21.4.0 flake8==4.0.1 Jinja2==3.1.2 @@ -5,7 +6,7 @@ jsonschema==4.7.2 Markdown==3.4.1 MarkupSafe==2.1.1 mccabe==0.6.1 -mypy==1.5.1 +mypy==1.10.0 pyaml==21.10.1 pycodestyle==2.8.0 pyflakes==2.4.0 From 258c217fac82676a0c4a20881c4fa6a3c43f36d1 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Mon, 20 May 2024 09:28:10 -0500 Subject: [PATCH 457/539] fixing metadata dataclasses for pre 3.10 python --- xml_converter/generators/metadata.py | 114 ++++++++++++++++++++++----- 1 file changed, 93 insertions(+), 21 deletions(-) diff --git a/xml_converter/generators/metadata.py b/xml_converter/generators/metadata.py index 344c1cfc..12558788 100644 --- a/xml_converter/generators/metadata.py +++ b/xml_converter/generators/metadata.py @@ -41,54 +41,106 @@ class CustomFunctions: write_proto_trail: Optional[CustomFunction] = field(default=None, metadata={"json": "write.proto.trail"}) -@dataclass(kw_only=True) +@dataclass class BaseMetadata: name: str # TODO Match this to the regex ATTRIBUTE_NAME_REGEX applies_to: List[NodeType] xml_fields: List[str] # TODO: Matche these to XML_ATTRIBUTE_REGEX protobuf_field: str # TODO: Match this to PROTO_FIELD_REGEX +@dataclass +class OptionalBaseMetadata: custom_functions: CustomFunctions = CustomFunctions() examples: List[str] = field(default_factory=list) -@dataclass(kw_only=True) -class Int32Metadata(BaseMetadata): + +################################################################################ +# Int32Metadata +################################################################################ +@dataclass +class _Int32Metadata: variable_type: Literal["Int32"] = field(metadata={"json": "type"}) -@dataclass(kw_only=True) -class Fixed32Metadata(BaseMetadata): +@dataclass +class Int32Metadata(OptionalBaseMetadata, _Int32Metadata, BaseMetadata): + pass + + +################################################################################ +# Fixed32Metadata +################################################################################ +@dataclass +class _Fixed32Metadata: variable_type: Literal["Fixed32"] = field(metadata={"json": "type"}) -@dataclass(kw_only=True) -class Float32Metadata(BaseMetadata): +@dataclass +class Fixed32Metadata(OptionalBaseMetadata, _Fixed32Metadata, BaseMetadata): + pass + + +################################################################################ +# Float32Metadata +################################################################################ +@dataclass +class _Float32Metadata: variable_type: Literal["Float32"] = field(metadata={"json": "type"}) +@dataclass +class Float32Metadata(OptionalBaseMetadata, _Float32Metadata, BaseMetadata): + pass -@dataclass(kw_only=True) -class StringMetadata(BaseMetadata): +################################################################################ +# StringMetadata +################################################################################ +@dataclass +class _StringMetadata: variable_type: Literal["String"] = field(metadata={"json": "type"}) +@dataclass +class StringMetadata(OptionalBaseMetadata, _StringMetadata, BaseMetadata): + pass -@dataclass(kw_only=True) -class BooleanMetadata(BaseMetadata): +################################################################################ +# BooleanMetadata +################################################################################ +@dataclass +class _BooleanMetadata: variable_type: Literal["Boolean"] = field(metadata={"json": "type"}) +@dataclass +class BooleanMetadata(OptionalBaseMetadata, _BooleanMetadata, BaseMetadata): + pass -@dataclass(kw_only=True) -class MultiFlagValueMetadata(BaseMetadata): +################################################################################ +# MultiFlagValueMetadata +################################################################################ +@dataclass +class _MultiFlagValueMetadata: variable_type: Literal["MultiflagValue"] = field(metadata={"json": "type"}) flags: Dict[str, List[str]] # Validate keys against INTERNAL_VARIBLE_REGEX +@dataclass +class MultiFlagValueMetadata(OptionalBaseMetadata, _MultiFlagValueMetadata, BaseMetadata): + pass -@dataclass(kw_only=True) -class EnumMetadata(BaseMetadata): +################################################################################ +# EnumMetadata +################################################################################ +@dataclass +class _EnumMetadata: variable_type: Literal["Enum"] = field(metadata={"json": "type"}) values: Dict[str, List[str]] # Validate keys against INTERNAL_VARIBLE_REGEX +@dataclass +class EnumMetadata(OptionalBaseMetadata, _EnumMetadata, BaseMetadata): + pass +################################################################################ +# CompoundValueMetadata +################################################################################ @dataclass class CompoundSubComponent: name: str @@ -97,8 +149,8 @@ class CompoundSubComponent: protobuf_field: str -@dataclass(kw_only=True) -class CompoundValueMetadata(BaseMetadata): +@dataclass +class _CompoundValueMetadata: variable_type: Literal["CompoundValue"] = field(metadata={"json": "type"}) xml_bundled_components: List[str] xml_separate_components: List[str] @@ -106,8 +158,16 @@ class CompoundValueMetadata(BaseMetadata): components: List[CompoundSubComponent] -@dataclass(kw_only=True) -class CompoundCustomClassMetadata(BaseMetadata): +@dataclass +class CompoundValueMetadata(OptionalBaseMetadata, _CompoundValueMetadata, BaseMetadata): + pass + + +################################################################################ +# CompoundCustomClassMetadata +################################################################################ +@dataclass +class _CompoundCustomClassMetadata: variable_type: Literal["CompoundCustomClass"] = field(metadata={"json": "type"}) cpp_class: str = field(metadata={"json": "class"}) xml_bundled_components: List[str] @@ -115,13 +175,25 @@ class CompoundCustomClassMetadata(BaseMetadata): components: List[CompoundSubComponent] -@dataclass(kw_only=True) -class CustomMetadata(BaseMetadata): +@dataclass +class CompoundCustomClassMetadata(OptionalBaseMetadata, _CompoundCustomClassMetadata, BaseMetadata): + pass + + +################################################################################ +# CustomMetadata +################################################################################ +@dataclass +class _CustomMetadata: variable_type: Literal["Custom"] = field(metadata={"json": "type"}) cpp_class: str = field(metadata={"json": "class"}) uses_file_path: Optional[bool] = None +@dataclass +class CustomMetadata(OptionalBaseMetadata, _CustomMetadata, BaseMetadata): + pass + MetadataType = Union[ Int32Metadata, Fixed32Metadata, From 53995fe125308b17b3e50b9d22ed6639aea7c7e3 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Mon, 20 May 2024 10:04:44 -0500 Subject: [PATCH 458/539] removing repeated test line --- .../achievement_bit_index_valid/input/pack/xml_file.xml | 1 - .../achievement_bit_index_valid/output_proto/markers.bin | 4 ++-- .../achievement_bit_index_valid/output_xml/xml_file.xml | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/xml_converter/integration_tests/test_cases/achievement_bit_index_valid/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/achievement_bit_index_valid/input/pack/xml_file.xml index 84632948..e15371aa 100644 --- a/xml_converter/integration_tests/test_cases/achievement_bit_index_valid/input/pack/xml_file.xml +++ b/xml_converter/integration_tests/test_cases/achievement_bit_index_valid/input/pack/xml_file.xml @@ -7,6 +7,5 @@ -
diff --git a/xml_converter/integration_tests/test_cases/achievement_bit_index_valid/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/achievement_bit_index_valid/output_proto/markers.bin index 5872b2a0..b2fe80f1 100644 --- a/xml_converter/integration_tests/test_cases/achievement_bit_index_valid/output_proto/markers.bin +++ b/xml_converter/integration_tests/test_cases/achievement_bit_index_valid/output_proto/markers.bin @@ -1,3 +1,3 @@ - - My Category 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWCˆ 2B \Ï)Cf¦RC{ÔWCˆÿÿÿÿ 2B \Ï)Cf¦RC{ÔWCˆÿÿÿÿ"ˆB(èÌ“^– \ No newline at end of file +e + My Category 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWCˆ 2B \Ï)Cf¦RC{ÔWCˆÿÿÿÿ"ˆB(èÌ“^– \ No newline at end of file diff --git a/xml_converter/integration_tests/test_cases/achievement_bit_index_valid/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/achievement_bit_index_valid/output_xml/xml_file.xml index 31ef0384..8bc8145c 100644 --- a/xml_converter/integration_tests/test_cases/achievement_bit_index_valid/output_xml/xml_file.xml +++ b/xml_converter/integration_tests/test_cases/achievement_bit_index_valid/output_xml/xml_file.xml @@ -7,6 +7,5 @@ -
From 33a2ebd191f703905694b7a33dfe1edffd4cb80a Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Mon, 20 May 2024 10:07:26 -0500 Subject: [PATCH 459/539] fixing spacing --- xml_converter/generators/metadata.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/xml_converter/generators/metadata.py b/xml_converter/generators/metadata.py index 12558788..ea559613 100644 --- a/xml_converter/generators/metadata.py +++ b/xml_converter/generators/metadata.py @@ -48,13 +48,13 @@ class BaseMetadata: xml_fields: List[str] # TODO: Matche these to XML_ATTRIBUTE_REGEX protobuf_field: str # TODO: Match this to PROTO_FIELD_REGEX + @dataclass class OptionalBaseMetadata: custom_functions: CustomFunctions = CustomFunctions() examples: List[str] = field(default_factory=list) - ################################################################################ # Int32Metadata ################################################################################ @@ -87,6 +87,8 @@ class Fixed32Metadata(OptionalBaseMetadata, _Fixed32Metadata, BaseMetadata): @dataclass class _Float32Metadata: variable_type: Literal["Float32"] = field(metadata={"json": "type"}) + + @dataclass class Float32Metadata(OptionalBaseMetadata, _Float32Metadata, BaseMetadata): pass @@ -98,6 +100,8 @@ class Float32Metadata(OptionalBaseMetadata, _Float32Metadata, BaseMetadata): @dataclass class _StringMetadata: variable_type: Literal["String"] = field(metadata={"json": "type"}) + + @dataclass class StringMetadata(OptionalBaseMetadata, _StringMetadata, BaseMetadata): pass @@ -109,6 +113,8 @@ class StringMetadata(OptionalBaseMetadata, _StringMetadata, BaseMetadata): @dataclass class _BooleanMetadata: variable_type: Literal["Boolean"] = field(metadata={"json": "type"}) + + @dataclass class BooleanMetadata(OptionalBaseMetadata, _BooleanMetadata, BaseMetadata): pass @@ -121,6 +127,8 @@ class BooleanMetadata(OptionalBaseMetadata, _BooleanMetadata, BaseMetadata): class _MultiFlagValueMetadata: variable_type: Literal["MultiflagValue"] = field(metadata={"json": "type"}) flags: Dict[str, List[str]] # Validate keys against INTERNAL_VARIBLE_REGEX + + @dataclass class MultiFlagValueMetadata(OptionalBaseMetadata, _MultiFlagValueMetadata, BaseMetadata): pass @@ -134,10 +142,12 @@ class _EnumMetadata: variable_type: Literal["Enum"] = field(metadata={"json": "type"}) values: Dict[str, List[str]] # Validate keys against INTERNAL_VARIBLE_REGEX + @dataclass class EnumMetadata(OptionalBaseMetadata, _EnumMetadata, BaseMetadata): pass + ################################################################################ # CompoundValueMetadata ################################################################################ @@ -194,6 +204,7 @@ class _CustomMetadata: class CustomMetadata(OptionalBaseMetadata, _CustomMetadata, BaseMetadata): pass + MetadataType = Union[ Int32Metadata, Fixed32Metadata, From a808f240e0988cbc86b6887d4bd436c1acd77429 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Mon, 20 May 2024 10:01:15 -0500 Subject: [PATCH 460/539] migrate web docs to use dataclass metadata --- xml_converter/generators/main.py | 99 ++++++++++++++-------------- xml_converter/generators/metadata.py | 3 + 2 files changed, 54 insertions(+), 48 deletions(-) diff --git a/xml_converter/generators/main.py b/xml_converter/generators/main.py index d9934672..5c98eaed 100644 --- a/xml_converter/generators/main.py +++ b/xml_converter/generators/main.py @@ -8,10 +8,10 @@ from jinja2 import FileSystemLoader, Environment from schema import string_t, array_t, enum_t, union_t, union_partial_t, pattern_dictionary_t, object_t, boolean_t, DefType from protobuf_types import get_proto_field_type -from util import capitalize, SchemaType, Document +from util import capitalize, Document from generate_cpp import write_cpp_classes, write_attribute import argparse -import metadata +from metadata import parse_data, MetadataType XML_ATTRIBUTE_REGEX: Final[str] = "^[A-Za-z]+$" PROTO_FIELD_REGEX: Final[str] = "^[a-z_.]+$" @@ -136,7 +136,7 @@ def load_input_doc(self, dir_path: str) -> None: print(filepath) raise e - metadata_dataclass = metadata.parse_data(document.metadata) + metadata_dataclass = parse_data(document.metadata) error = validate_front_matter_schema(document.metadata) if error != "": @@ -176,12 +176,12 @@ def write_webdocs(self, output_directory: str) -> None: for page in sorted(categories): content: Dict[str, str] = {} - metadata: Dict[str, SchemaType] = {} + metadata: Dict[str, MetadataType] = {} # Resets the content and metadata to empty for each loop for subpage in categories[page]: content[subpage] = markdown.markdown(self.data[subpage].content, extensions=['extra', 'codehilite']) - metadata[subpage] = self.data[subpage].metadata + metadata[subpage] = self.data[subpage].metadata_dataclass generated_doc, field_rows = self.generate_auto_docs(metadata, content) @@ -196,8 +196,12 @@ def write_webdocs(self, output_directory: str) -> None: )) def get_examples(self, field_type: str, field_key: str) -> List[str]: - if "examples" in self.data[field_key].metadata: - return [f'"{x}"' for x in self.data[field_key].metadata["examples"]] + field_examples = self.data[field_key].metadata_dataclass.examples + if len(field_examples) > 0: + return [f'"{x}"' for x in field_examples] + + # TODO: Type Examples + return ["???"] def get_fixed_option_examples(self, field_type: str, pairings: Any) -> List[str]: @@ -247,7 +251,7 @@ def build_example(self, type: str, applies_to: List[str], xml_field: str, exampl # # This will output documentation for a single category of attributes. ############################################################################ - def generate_auto_docs(self, metadata: Dict[str, SchemaType], content: Dict[str, str]) -> Tuple[str, List[FieldRow]]: + def generate_auto_docs(self, metadata: Dict[str, MetadataType], content: Dict[str, str]) -> Tuple[str, List[FieldRow]]: file_loader = FileSystemLoader('web_templates') env = Environment(loader=file_loader) template = env.get_template("infotable.html") @@ -256,30 +260,29 @@ def generate_auto_docs(self, metadata: Dict[str, SchemaType], content: Dict[str, for fieldkey, fieldval in metadata.items(): valid_values = "" - if fieldval['type'] == "MultiflagValue" or fieldval['type'] == "Enum": - - if (fieldval["type"] == "MultiflagValue"): - pairings = fieldval["flags"] - elif (fieldval["type"] == "Enum"): - pairings = fieldval["values"] + if fieldval.variable_type == "MultiflagValue" or fieldval.variable_type == "Enum": + if fieldval.variable_type == "MultiflagValue": + pairings = fieldval.flags + elif (fieldval.variable_type == "Enum"): + pairings = fieldval.values else: raise ValueError("Type was MultiflagValue or Enum but not MultiflagValue or Enum. Not sure what happened.") example = self.build_example( - type=fieldval['type'], - applies_to=fieldval['applies_to'], - xml_field=fieldval['xml_fields'][0], + type=fieldval.variable_type, + applies_to=fieldval.applies_to_as_str(), + xml_field=fieldval.xml_fields[0], examples=self.get_fixed_option_examples( - field_type=fieldval['type'], + field_type=fieldval.variable_type, pairings=pairings ) ) valid_values = "" @@ -290,42 +293,42 @@ def generate_auto_docs(self, metadata: Dict[str, SchemaType], content: Dict[str, valid_values += "" valid_values += "
XML Value" - if (fieldval["type"] == "MultiflagValue"): + if (fieldval.variable_type == "MultiflagValue"): valid_values += "Set Flag" - elif (fieldval["type"] == "Enum"): + elif (fieldval.variable_type == "Enum"): valid_values += "Enum Value" valid_values += "
" + elem + "
" - elif fieldval['type'] == "CompoundValue": + elif fieldval.variable_type == "CompoundValue": example = self.build_example( - type=fieldval['type'], - applies_to=fieldval['applies_to'], - xml_field=fieldval['xml_fields'][0], + type=fieldval.variable_type, + applies_to=fieldval.applies_to_as_str(), + xml_field=fieldval.xml_fields[0], examples=["???TODO???"] ) # ",".join( [ self.get_examples(x['type'], fieldval['applies_to'], fieldval['xml_fields'][0]) for x in fieldval['components'] ]) else: example = self.build_example( - type=fieldval['type'], - applies_to=fieldval['applies_to'], - xml_field=fieldval['xml_fields'][0], + type=fieldval.variable_type, + applies_to=fieldval.applies_to_as_str(), + xml_field=fieldval.xml_fields[0], examples=self.get_examples( - field_type=fieldval['type'], + field_type=fieldval.variable_type, field_key=fieldkey, ) ) # self.get_examples(fieldval['type'], fieldval['applies_to'], fieldval['xml_fieldsval'][0]) proto_field_type: str = "" - for marker_type in fieldval["applies_to"]: - proto_field_type = get_proto_field_type(marker_type, fieldval["protobuf_field"]) + for marker_type in fieldval.applies_to_as_str(): + proto_field_type = get_proto_field_type(marker_type, fieldval.protobuf_field) # TODO: catch discrepencies if the proto field types across # different messages have differing types. This will be caught # in the cpp code regardless. field_rows.append(FieldRow( - name=fieldval["name"], - xml_attribute=fieldval["xml_fields"][0], - alternate_xml_attributes=fieldval["xml_fields"][1:], - binary_field=fieldval["protobuf_field"], + name=fieldval.name, + xml_attribute=fieldval.xml_fields[0], + alternate_xml_attributes=fieldval.xml_fields[1:], + binary_field=fieldval.protobuf_field, binary_field_type=proto_field_type, - data_type=fieldval["type"], - usable_on_html="
".join(fieldval["applies_to"]), + data_type=fieldval.variable_type, + usable_on_html="
".join(fieldval.applies_to_as_str()), example=example, valid_values_html=valid_values, is_sub_field=False, @@ -333,30 +336,30 @@ def generate_auto_docs(self, metadata: Dict[str, SchemaType], content: Dict[str, description=content[fieldkey] # todo: )) - if fieldval['type'] == "CompoundValue": - for component_field in fieldval["components"]: + if fieldval.variable_type == "CompoundValue": + for component_field in fieldval.components: - binary_field_name = fieldval["protobuf_field"] + "." + component_field["protobuf_field"] + binary_field_name = fieldval.protobuf_field + "." + component_field.protobuf_field component_field_type: str = "" - for marker_type in fieldval["applies_to"]: + for marker_type in fieldval.applies_to_as_str(): component_field_type = get_proto_field_type(marker_type, binary_field_name) # TODO: catch discrepencies if the proto field types across # different messages have differing types. This will be caught # in the cpp code regardless. field_rows.append(FieldRow( - name=component_field["name"], - xml_attribute=component_field["xml_fields"][0], - alternate_xml_attributes=component_field["xml_fields"][1:], + name=component_field.name, + xml_attribute=component_field.xml_fields[0], + alternate_xml_attributes=component_field.xml_fields[1:], binary_field=binary_field_name, binary_field_type=component_field_type, - data_type=component_field["type"], - usable_on_html="
".join(fieldval["applies_to"]), + data_type=component_field.subcomponent_type.value, + usable_on_html="
".join(fieldval.applies_to_as_str()), example=self.build_example( - type=component_field["type"], - applies_to=fieldval["applies_to"], - xml_field=fieldval["xml_fields"][0], + type=component_field.subcomponent_type.value, + applies_to=fieldval.applies_to_as_str(), + xml_field=fieldval.xml_fields[0], examples=["???TODO2???"], ), description=content[fieldkey], diff --git a/xml_converter/generators/metadata.py b/xml_converter/generators/metadata.py index ea559613..142fb5c2 100644 --- a/xml_converter/generators/metadata.py +++ b/xml_converter/generators/metadata.py @@ -48,6 +48,9 @@ class BaseMetadata: xml_fields: List[str] # TODO: Matche these to XML_ATTRIBUTE_REGEX protobuf_field: str # TODO: Match this to PROTO_FIELD_REGEX + def applies_to_as_str(self) -> List[str]: + return [x.value for x in self.applies_to] + @dataclass class OptionalBaseMetadata: From a9c2d121e469115c4dc2180ce414d9d20813e1a9 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 20 May 2024 19:05:17 -0400 Subject: [PATCH 461/539] Remove gizmo link function and move functionality --- Gizmo/PointEdit.gd | 32 +++------------- Icon.gd | 3 ++ Route.gd | 2 +- Route2D.tscn | 5 ++- Spatial.gd | 96 +++++++++++++++++++++++++--------------------- 5 files changed, 65 insertions(+), 73 deletions(-) diff --git a/Gizmo/PointEdit.gd b/Gizmo/PointEdit.gd index 93ddfa5c..cff3dce0 100644 --- a/Gizmo/PointEdit.gd +++ b/Gizmo/PointEdit.gd @@ -3,6 +3,7 @@ extends Spatial var camera: Camera signal selected(selected_object) signal deselected(selected_object) +signal updated(point_position) var last_translation var selected: bool = false @@ -27,32 +28,6 @@ func select(camera, event): $Pillar/CollisionShape.disabled = false emit_signal("selected", self) -var object_link = null -var object_2d_link = null -var object_index:int = 0 -var point_type: String - - -func link_point(point_type: String, object_link, object_2d_link = null, object_index = 0): - self.point_type = point_type - self.object_link = object_link - if point_type == "path" || point_type == "area": - self.object_2d_link = object_2d_link - self.object_index = object_index - if point_type == "icon": - pass - - -func update_point(): - if self.translation != self.last_translation: - if point_type == "path" || point_type == "area": - self.object_link.set_point_position(self.object_index, self.translation) - self.object_2d_link.points[self.object_index] = Vector2(self.translation.x, self.translation.z) - if point_type == "icon": - self.object_link.translation = self.translation - print("update") - self.last_translation = self.translation - ################################################################################ # Handle resizing the control nodes so that no matter how far away from the @@ -70,4 +45,7 @@ func _process(delta): $Plane.scale = new_scale $Pillar.scale = new_scale - update_point() + if self.translation != self.last_translation: + #print("update") + emit_signal("updated", self.translation) + self.last_translation = self.translation diff --git a/Icon.gd b/Icon.gd index cc171b55..fc0eca8c 100644 --- a/Icon.gd +++ b/Icon.gd @@ -22,3 +22,6 @@ func set_icon_image(texture_path: String): self.texture = texture self.material_override.set_shader_param("texture_albedo", texture) + +func set_point_position(position: Vector3): + self.translation = position diff --git a/Route.gd b/Route.gd index 24717e1e..0f3ba2a5 100644 --- a/Route.gd +++ b/Route.gd @@ -78,7 +78,7 @@ func get_point_count(): func get_point_position(index: int): return self.point_list[index] -func set_point_position(index: int, position: Vector3): +func set_point_position(position: Vector3, index: int): self.point_list[index] = position refresh_mesh() diff --git a/Route2D.tscn b/Route2D.tscn index 5b3da3ed..8aed8671 100644 --- a/Route2D.tscn +++ b/Route2D.tscn @@ -1,4 +1,6 @@ -[gd_scene load_steps=3 format=2] +[gd_scene load_steps=4 format=2] + +[ext_resource path="res://Route2D.gd" type="Script" id=1] [sub_resource type="Shader" id=1] code = "shader_type canvas_item; @@ -27,3 +29,4 @@ material = SubResource( 2 ) points = PoolVector2Array( 0, 0, 0, 0, 0, 0 ) default_color = Color( 1, 1, 1, 1 ) texture_mode = 1 +script = ExtResource( 1 ) diff --git a/Spatial.gd b/Spatial.gd index c806ee30..0f3070b1 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -19,6 +19,7 @@ var next_texture_path: String = "" # will be created. var currently_active_path = null var currently_active_path_2d = null +var currently_active_icon = null var currently_active_category = null var map_was_open = false @@ -692,25 +693,30 @@ func gen_adjustment_nodes(): continue var new_gizmo = gizmo_scene.instance() new_gizmo.translation = gizmo_position - new_gizmo.link_point("path", route, path2d, i) - new_gizmo.connect("selected", self, "on_gizmo_selected") + new_gizmo.connect("selected", self, "on_gizmo_selected", ["path"]) new_gizmo.connect("deselected", self, "on_gizmo_deselected") + new_gizmo.connect("updated", route, "set_point_position", [i]) + new_gizmo.connect("updated", path2d, "update_point_position", [i]) $Gizmos.add_child(new_gizmo) for icon in category3d.icons: var new_gizmo = gizmo_scene.instance() new_gizmo.translation = icon.translation - new_gizmo.link_point("icon", icon) - new_gizmo.connect("selected", self, "on_gizmo_selected") + new_gizmo.connect("selected", self, "on_gizmo_selected", ["icon"]) new_gizmo.connect("deselected", self, "on_gizmo_deselected") + new_gizmo.connect("updated", icon, "set_point_position") $Gizmos.add_child(new_gizmo) +var currently_selected_gizmo = null +var currently_selected_node_type: String = "" -var currently_selected_node = null -func on_gizmo_selected(object): - self.currently_selected_node = object +func on_gizmo_selected(object, point_type): + print(point_type) + print("selected") + self.currently_selected_gizmo = object + self.currently_selected_node_type = point_type[0] $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/DeleteNode.disabled = false # Only enable these buttons if the object selected is a point on the path not an icon - if object.point_type == "path": + if self.currently_selected_node_type == "path": $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/NewNodeAfter.disabled = false $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/ReversePathDirection.disabled = false $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/SetActivePath.disabled = false @@ -720,7 +726,8 @@ func on_gizmo_selected(object): func on_gizmo_deselected(object): - self.currently_selected_node = null + self.currently_selected_gizmo = null + self.currently_selected_node_type = "" $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/DeleteNode.disabled = true $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/NewNodeAfter.disabled = true $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/SnapSelectedToPlayer.disabled = true @@ -819,74 +826,75 @@ func _on_NewPathPoint_pressed(): self.currently_active_path_2d.add_point(Vector2(self.player_position.x, -self.player_position.z)) func _on_NodeEditorDialog_hide(): - self.currently_selected_node = null + self.currently_selected_gizmo = null clear_adjustment_nodes() _on_Dialog_hide() func _on_DeleteNode_pressed(): - if self.currently_selected_node.point_type == "icon": - self.currently_selected_node.object_link.get_parent().remove_child(self.currently_selected_node.object_link) - self.currently_selected_node.object_link.queue_free() - elif self.currently_selected_node.point_type == "path": - var path = self.currently_selected_node.object_link - var path2d = self.currently_selected_node.object_2d_link - var index = self.currently_selected_node.object_index - - path.remove_point(index) - path2d.remove_point(index) +# if self.currently_selected_node_type == "icon": +# self.currently_selected_node.object_link.get_parent().remove_child(self.currently_selected_node.object_link) +# self.currently_selected_node.object_link.queue_free() +# elif self.currently_selected_node_type == "path": +# var path = self.currently_selected_node.object_link +# var path2d = self.currently_selected_node.object_2d_link +# var index = self.currently_selected_node.object_index + +# path.remove_point(index) +# path2d.remove_point(index) clear_adjustment_nodes() gen_adjustment_nodes() - on_gizmo_deselected(self.currently_selected_node) + on_gizmo_deselected(self.currently_selected_gizmo) func _on_NewNodeAfter_pressed(): - if self.currently_selected_node.point_type == "icon": + if self.currently_selected_node_type == "icon": print("Warning: Cannot add node to icon") - elif self.currently_selected_node.point_type == "path": + elif self.currently_selected_node_type == "path": print("insert path node") - var path = self.currently_selected_node.object_link - var path2d = self.currently_selected_node.object_2d_link - var index = self.currently_selected_node.object_index + #var path = self.currently_selected_node.object_link + #var path2d = self.currently_selected_node.object_2d_link + #var index = self.currently_selected_node.object_index - var start = path.get_point_position(index) + #var start = path.get_point_position(index) var midpoint = self.player_position midpoint.z = -midpoint.z - if path.get_point_count() > index+1: - var end = path.get_point_position(index+1) - midpoint = ((start-end)/2) + end + #if path.get_point_count() > index+1: + # var end = path.get_point_position(index+1) + # midpoint = ((start-end)/2) + end - path.add_point(midpoint, index+1) - path2d.add_point(Vector2(midpoint.x, midpoint.z), index+1) + #path.add_point(midpoint, index+1) + #path2d.add_point(Vector2(midpoint.x, midpoint.z), index+1) clear_adjustment_nodes() gen_adjustment_nodes() - on_gizmo_deselected(self.currently_selected_node) + on_gizmo_deselected(self.currently_selected_gizmo) func _on_XZSnapToPlayer_pressed(): - self.currently_selected_node.translation.x = self.player_position.x - self.currently_selected_node.translation.z = -self.player_position.z + self.currently_selected_gizmo.translation.x = self.player_position.x + self.currently_selected_gizmo.translation.z = -self.player_position.z func _on_YSnapToPlayer_pressed(): - self.currently_selected_node.translation.y = self.player_position.y + self.currently_selected_gizmo.translation.y = self.player_position.y func _on_SnapSelectedToPlayer_pressed(): - self.currently_selected_node.translation.x = self.player_position.x - self.currently_selected_node.translation.z = -self.player_position.z - self.currently_selected_node.translation.y = self.player_position.y + self.currently_selected_gizmo.translation.x = self.player_position.x + self.currently_selected_gizmo.translation.z = -self.player_position.z + self.currently_selected_gizmo.translation.y = self.player_position.y func _on_SetActivePath_pressed(): - if self.currently_selected_node.point_type == "icon": + if self.currently_selected_node_type == "icon": print("Warning: Cannot set icon as active path") - elif self.currently_selected_node.point_type == "path": - self.currently_active_path = self.currently_selected_node.object_link - self.currently_active_path_2d = self.currently_selected_node.object_2d_link + elif self.currently_selected_node_type == "path": + #self.currently_active_path = self.currently_selected_node.object_link + #self.currently_active_path_2d = self.currently_selected_node.object_2d_link + pass func _on_ReversePathDirection_pressed(): - self.currently_selected_node.object_link.reverse() + self.currently_selected_gizmo.object_link.reverse() func _on_ExitButton_pressed(): From 78f05687de71cc276789c2268164aebd1b0c346d Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Tue, 21 May 2024 08:19:45 -0500 Subject: [PATCH 462/539] migrating the cpp generator to use dataclasses --- xml_converter/generators/generate_cpp.py | 250 ++++++++++++----------- xml_converter/generators/metadata.py | 2 +- 2 files changed, 132 insertions(+), 120 deletions(-) diff --git a/xml_converter/generators/generate_cpp.py b/xml_converter/generators/generate_cpp.py index 5534ca13..33564ce0 100644 --- a/xml_converter/generators/generate_cpp.py +++ b/xml_converter/generators/generate_cpp.py @@ -1,8 +1,9 @@ from dataclasses import dataclass, field -from typing import Set, List, Dict, Optional, Tuple, TypedDict, Any +from typing import Set, List, Dict, Optional, Tuple, TypedDict from jinja2 import FileSystemLoader, Environment, Template +from metadata import CustomFunction, MetadataType from jinja_helpers import UnindentBlocks -from util import lowercase, capitalize, normalize, Document, SchemaType +from util import lowercase, capitalize, normalize, Document import os from protobuf_types import is_proto_field_scalar, get_proto_field_cpp_type, get_proto_field_cpp_prototype @@ -209,14 +210,22 @@ def write_cpp_classes( return written_files -def build_custom_function_data(config: Dict[str, Any]) -> Tuple[str, List[str]]: - function = config["function"] - side_effects = [] - for side_effect in config["side_effects"]: - side_effects.append(attribute_name_from_markdown_data(side_effect)) - side_effects.append(attribute_name_from_markdown_data(side_effect) + "_is_set") +################################################################################ +# convert_side_effects_to_variable_names +# +# The side effects defined in the markdown documentation files are not the same +# as the internal variables used. This function takes the markdown side effects +# and converts them to thir variable names, it also adds the boolean is_set +# flags as part of the arguments passed. +################################################################################ +def convert_side_effects_to_variable_names(side_effects: List[str]) -> List[str]: + side_effect_variables: List[str] = [] + + for side_effect in side_effects: + side_effect_variables.append(attribute_name_from_markdown_data(side_effect)) + side_effect_variables.append(attribute_name_from_markdown_data(side_effect) + "_is_set") - return function, side_effects + return side_effect_variables ############################################################################ @@ -260,26 +269,27 @@ def generate_cpp_variable_data( cpp_includes.cpp_absolute_includes.add("type_traits") for filepath, document in sorted(data.items()): - fieldval = document.metadata - attribute_name: str = attribute_name_from_markdown_data(fieldval['name']) + fieldval = document.metadata_dataclass + attribute_name: str = attribute_name_from_markdown_data(fieldval.name) - if doc_type in fieldval['applies_to']: + if doc_type in fieldval.applies_to_as_str(): xml_fields: List[str] = [] side_effects: List[str] = [] write_to_xml: bool = True default_xml_field: str = "" - if fieldval['type'] in documentation_type_data: - cpp_type = documentation_type_data[fieldval['type']]["cpp_type"] - class_name = documentation_type_data[fieldval['type']]["class_name"] + if fieldval.variable_type in documentation_type_data: + cpp_type = documentation_type_data[fieldval.variable_type]["cpp_type"] + class_name = documentation_type_data[fieldval.variable_type]["class_name"] cpp_includes.cpp_relative_includes.add("attribute/{}.hpp".format(class_name)) - elif fieldval['type'] in ["Custom", "CompoundCustomClass"]: - cpp_type = fieldval['class'] - class_name = insert_delimiter(fieldval['class'], delimiter="_") + # elif fieldval.variable_type in ("Custom", "CompoundCustomClass"): + elif fieldval.variable_type == "Custom" or fieldval.variable_type == "CompoundCustomClass": + cpp_type = fieldval.cpp_class + class_name = insert_delimiter(fieldval.cpp_class, delimiter="_") cpp_includes.hpp_relative_includes.add("attribute/{}.hpp".format(class_name)) - elif fieldval['type'] in ["Enum", "MultiflagValue", "CompoundValue"]: + elif fieldval.variable_type in ("Enum", "MultiflagValue", "CompoundValue"): cpp_type = capitalize(attribute_name, delimiter="") class_name = attribute_name @@ -287,44 +297,45 @@ def generate_cpp_variable_data( else: raise ValueError("Unexpected type {field_type} for attribute {attribute_name}".format( - field_type=fieldval['type'], + field_type=fieldval.variable_type, attribute_name=attribute_name, )) - for x in fieldval['xml_fields']: + for x in fieldval.xml_fields: xml_fields.append(lowercase(x, delimiter="")) - default_xml_field = fieldval['xml_fields'][0] + default_xml_field = fieldval.xml_fields[0] proto_drilldown_calls: str mutable_proto_drilldown_calls: str protobuf_field: str - proto_drilldown_calls, mutable_proto_drilldown_calls, protobuf_field = split_field_into_drilldown(fieldval["protobuf_field"]) + proto_drilldown_calls, mutable_proto_drilldown_calls, protobuf_field = split_field_into_drilldown(fieldval.protobuf_field) # Compound Values are unique in that the components have xml fields in addition to the compound variable - if fieldval['type'] in ["CompoundValue", "CompoundCustomClass"]: - for component in fieldval['components']: + # if fieldval.variable_type in ("CompoundValue", "CompoundCustomClass"): + if fieldval.variable_type == "CompoundValue" or fieldval.variable_type == "CompoundCustomClass": + for component in fieldval.components: component_xml_fields: List[str] = [] - component_name: str = attribute_name_from_markdown_data(component['name']) + component_name: str = attribute_name_from_markdown_data(component.name) component_default_xml_field: str = "" - for x in component['xml_fields']: + for x in component.xml_fields: component_xml_fields.append(lowercase(x, delimiter="")) - component_class_name = documentation_type_data[component['type']]["class_name"] - if component['name'] in fieldval['xml_separate_components']: - component_default_xml_field = component['xml_fields'][0] + component_class_name = documentation_type_data[component.subcomponent_type.value]["class_name"] + if component.name in fieldval.xml_separate_components: + component_default_xml_field = component.xml_fields[0] write_to_xml = True - if component['name'] in fieldval['xml_bundled_components']: - component_default_xml_field = fieldval['xml_fields'][0] + if component.name in fieldval.xml_bundled_components: + component_default_xml_field = fieldval.xml_fields[0] write_to_xml = False component_attribute_variable = AttributeVariable( attribute_name=attribute_name + "." + component_name, attribute_type="CompoundValue", - cpp_type=documentation_type_data[component['type']]["cpp_type"], + cpp_type=documentation_type_data[component.subcomponent_type.value]["cpp_type"], class_name=component_class_name, xml_fields=component_xml_fields, default_xml_field=component_default_xml_field, - protobuf_field=component["protobuf_field"], - protobuf_cpp_type=get_proto_field_cpp_type(doc_type, fieldval["protobuf_field"] + "." + component["protobuf_field"]), - is_proto_field_scalar=is_proto_field_scalar(doc_type, fieldval["protobuf_field"] + "." + component["protobuf_field"]), + protobuf_field=component.protobuf_field, + protobuf_cpp_type=get_proto_field_cpp_type(doc_type, fieldval.protobuf_field + "." + component.protobuf_field), + is_proto_field_scalar=is_proto_field_scalar(doc_type, fieldval.protobuf_field + "." + component.protobuf_field), attribute_flag_name=attribute_name + "_is_set", write_to_xml=write_to_xml, is_component=True, @@ -340,65 +351,67 @@ def generate_cpp_variable_data( ) attribute_variables.append(component_attribute_variable) # If there aren't any components to bundle, we don't want to render the attribute - if fieldval['xml_bundled_components'] == []: + if fieldval.xml_bundled_components == []: write_to_xml = False - serialize_xml_function: str = class_name + "_to_xml_attribute" - serialize_xml_side_effects: List[str] = [] - deserialize_xml_function: str = "xml_attribute_to_" + class_name - deserialize_xml_side_effects: List[str] = [] - serialize_proto_function: str = class_name + "_to_proto" - serialize_proto_side_effects: List[str] = [] - deserialize_proto_function: str = "proto_to_" + class_name - deserialize_proto_side_effects: List[str] = [] - if "custom_functions" in fieldval: - # Overwrite defaults with xml/proto read/write functions - for custom_function in fieldval["custom_functions"]: - if custom_function == "read.xml": - deserialize_xml_function, deserialize_xml_side_effects = build_custom_function_data( - fieldval["custom_functions"][custom_function] - ) - elif custom_function == "write.xml": - serialize_xml_function, serialize_xml_side_effects = build_custom_function_data( - fieldval["custom_functions"][custom_function] - ) - elif custom_function == "read.proto": - deserialize_proto_function, deserialize_proto_side_effects = build_custom_function_data( - fieldval["custom_functions"][custom_function] - ) - elif custom_function == "write.proto": - serialize_proto_function, serialize_proto_side_effects = build_custom_function_data( - fieldval["custom_functions"][custom_function] - ) - # Overwrite with marker type specific functions - for custom_function in fieldval["custom_functions"]: - if custom_function == "read.xml." + doc_type: - deserialize_xml_function, deserialize_xml_side_effects = build_custom_function_data( - fieldval["custom_functions"][custom_function] - ) - elif custom_function == "write.xml." + doc_type: - serialize_xml_function, serialize_xml_side_effects = build_custom_function_data( - fieldval["custom_functions"][custom_function] - ) - elif custom_function == "read.proto." + doc_type: - deserialize_proto_function, deserialize_proto_side_effects = build_custom_function_data( - fieldval["custom_functions"][custom_function] - ) - elif custom_function == "write.proto." + doc_type: - serialize_proto_function, serialize_proto_side_effects = build_custom_function_data( - fieldval["custom_functions"][custom_function] - ) + # Identify the XML serialize function info + serialize_xml_function: CustomFunction = CustomFunction( + function=class_name + "_to_xml_attribute", + side_effects=[], + ) + if fieldval.custom_functions.write_xml_trail is not None and doc_type == "Trail": + serialize_xml_function = fieldval.custom_functions.write_xml_trail + if fieldval.custom_functions.write_xml_icon is not None and doc_type == "Icon": + serialize_xml_function = fieldval.custom_functions.write_xml_icon + elif fieldval.custom_functions.write_xml is not None: + serialize_xml_function = fieldval.custom_functions.write_xml + + # Identify the XML deserialize function info + deserialize_xml_function: CustomFunction = CustomFunction( + function="xml_attribute_to_" + class_name, + side_effects=[], + ) + if fieldval.custom_functions.read_xml_trail is not None and doc_type == "Trail": + deserialize_xml_function = fieldval.custom_functions.read_xml_trail + if fieldval.custom_functions.read_xml_icon is not None and doc_type == "Icon": + deserialize_xml_function = fieldval.custom_functions.read_xml_icon + elif fieldval.custom_functions.read_xml is not None: + deserialize_xml_function = fieldval.custom_functions.read_xml + + # Identify the proto serialize function info + serialize_proto_function: CustomFunction = CustomFunction( + function=class_name + "_to_proto", + side_effects=[], + ) + if fieldval.custom_functions.write_proto_trail is not None and doc_type == "Trail": + serialize_proto_function = fieldval.custom_functions.write_proto_trail + if fieldval.custom_functions.write_proto_icon is not None and doc_type == "Icon": + serialize_proto_function = fieldval.custom_functions.write_proto_icon + elif fieldval.custom_functions.write_proto is not None: + serialize_proto_function = fieldval.custom_functions.write_proto + + # Identify the proto deserialize function info + deserialize_proto_function: CustomFunction = CustomFunction( + function="proto_to_" + class_name, + side_effects=[], + ) + if fieldval.custom_functions.read_proto_trail is not None and doc_type == "Trail": + deserialize_proto_function = fieldval.custom_functions.read_proto_trail + if fieldval.custom_functions.read_proto_icon is not None and doc_type == "Icon": + deserialize_proto_function = fieldval.custom_functions.read_proto_icon + elif fieldval.custom_functions.read_proto is not None: + deserialize_proto_function = fieldval.custom_functions.read_proto attribute_variable = AttributeVariable( attribute_name=attribute_name, - attribute_type=fieldval["type"], + attribute_type=fieldval.variable_type, cpp_type=cpp_type, class_name=class_name, xml_fields=xml_fields, default_xml_field=default_xml_field, protobuf_field=protobuf_field, - protobuf_cpp_type=get_proto_field_cpp_type(doc_type, fieldval["protobuf_field"]), - is_proto_field_scalar=is_proto_field_scalar(doc_type, fieldval["protobuf_field"]), + protobuf_cpp_type=get_proto_field_cpp_type(doc_type, fieldval.protobuf_field), + is_proto_field_scalar=is_proto_field_scalar(doc_type, fieldval.protobuf_field), proto_drilldown_calls=proto_drilldown_calls, mutable_proto_drilldown_calls=mutable_proto_drilldown_calls, @@ -406,16 +419,16 @@ def generate_cpp_variable_data( attribute_flag_name=attribute_name + "_is_set", side_effects=side_effects, - serialize_xml_function=serialize_xml_function, - serialize_xml_side_effects=serialize_xml_side_effects, - deserialize_xml_function=deserialize_xml_function, - deserialize_xml_side_effects=deserialize_xml_side_effects, - serialize_proto_function=serialize_proto_function, - serialize_proto_side_effects=serialize_proto_side_effects, - deserialize_proto_function=deserialize_proto_function, - deserialize_proto_side_effects=deserialize_proto_side_effects, + serialize_xml_function=serialize_xml_function.function, + serialize_xml_side_effects=convert_side_effects_to_variable_names(serialize_xml_function.side_effects), + deserialize_xml_function=deserialize_xml_function.function, + deserialize_xml_side_effects=convert_side_effects_to_variable_names(deserialize_xml_function.side_effects), + serialize_proto_function=serialize_proto_function.function, + serialize_proto_side_effects=convert_side_effects_to_variable_names(serialize_proto_function.side_effects), + deserialize_proto_function=deserialize_proto_function.function, + deserialize_proto_side_effects=convert_side_effects_to_variable_names(deserialize_proto_function.side_effects), - uses_file_path=fieldval.get("uses_file_path", False) + uses_file_path=fieldval.uses_file_path if fieldval.variable_type == "Custom" else False ) attribute_variables.append(attribute_variable) @@ -441,7 +454,6 @@ def write_attribute(output_directory: str, data: Dict[str, Document]) -> List[st lstrip_blocks=True ) attribute_names: Dict[str, str] = {} - metadata: Dict[str, SchemaType] = {} template: Dict[str, Template] = { "MultiflagValue": env.get_template("attribute_template_multiflagvalue.cpp"), "CompoundValue": env.get_template("attribute_template_compoundvalue.cpp"), @@ -455,29 +467,29 @@ def write_attribute(output_directory: str, data: Dict[str, Document]) -> List[st for filepath in attribute_names: attribute_components: List[AttributeComponent] = [] xml_bundled_components: List[str] = [] - metadata[filepath] = data[filepath].metadata - attribute_name = attribute_name_from_markdown_data(metadata[filepath]['name']) + attribute_data: MetadataType = data[filepath].metadata_dataclass + attribute_name = attribute_name_from_markdown_data(attribute_data.name) proto_field_type: str = "" proto_field_prototype: Optional[str] = None - for marker_type in metadata[filepath]["applies_to"]: - new_type = get_proto_field_cpp_type(marker_type, metadata[filepath]["protobuf_field"]) + for marker_type in attribute_data.applies_to_as_str(): + new_type = get_proto_field_cpp_type(marker_type, attribute_data.protobuf_field) if proto_field_type != "" and proto_field_type != new_type: - print("Proto Field type differes between different marker types for ", metadata[filepath]["protobuf_field"]) + print("Proto Field type differes between different marker types for ", attribute_data.protobuf_field) proto_field_type = new_type - new_prototype = get_proto_field_cpp_prototype(marker_type, metadata[filepath]["protobuf_field"]) + new_prototype = get_proto_field_cpp_prototype(marker_type, attribute_data.protobuf_field) if proto_field_prototype is not None and proto_field_prototype != new_prototype: - print("Proto Field prototype differes between different marker types for ", metadata[filepath]["protobuf_field"]) + print("Proto Field prototype differes between different marker types for ", attribute_data.protobuf_field) proto_field_prototype = new_prototype protobuf_field: str - _, _, protobuf_field = split_field_into_drilldown(metadata[filepath]["protobuf_field"]) + _, _, protobuf_field = split_field_into_drilldown(attribute_data.protobuf_field) - if metadata[filepath]['type'] == "MultiflagValue": - for flag in metadata[filepath]['flags']: + if attribute_data.variable_type == "MultiflagValue": + for flag in attribute_data.flags: xml_fields = [] - for item in metadata[filepath]['flags'][flag]: + for item in attribute_data.flags[flag]: xml_fields.append(normalize(item)) attribute_component = AttributeComponent( attribute_name=flag, @@ -487,30 +499,30 @@ def write_attribute(output_directory: str, data: Dict[str, Document]) -> List[st ) attribute_components.append(attribute_component) - elif metadata[filepath]['type'] == "CompoundValue": - for component in metadata[filepath]['components']: + elif attribute_data.variable_type == "CompoundValue": + for component in attribute_data.components: xml_fields = [] - if component['type'] not in documentation_type_data: + if component.subcomponent_type.value not in documentation_type_data: raise ValueError("Unexpected type for component. Look at markdown file {attribute_name}".format( attribute_name=attribute_name )) - component_attribute_name: str = attribute_name_from_markdown_data(component['name']) - for item in component['xml_fields']: + component_attribute_name: str = attribute_name_from_markdown_data(component.name) + for item in component.xml_fields: xml_fields.append(normalize(item)) - if component['name'] in metadata[filepath]['xml_bundled_components']: + if component.name in attribute_data.xml_bundled_components: xml_bundled_components.append(component_attribute_name) attribute_component = AttributeComponent( attribute_name=component_attribute_name, - cpp_type=documentation_type_data[component['type']]["cpp_type"], + cpp_type=documentation_type_data[component.subcomponent_type.value]["cpp_type"], xml_fields=xml_fields, - protobuf_field=component["protobuf_field"], + protobuf_field=component.protobuf_field, ) attribute_components.append(attribute_component) - elif metadata[filepath]['type'] == "Enum": - for value in metadata[filepath]['values']: + elif attribute_data.variable_type == "Enum": + for value in attribute_data.values: xml_fields = [] - for item in metadata[filepath]['values'][value]: + for item in attribute_data.values[value]: xml_fields.append(normalize(item)) attribute_component = AttributeComponent( attribute_name=value, @@ -530,7 +542,7 @@ def write_attribute(output_directory: str, data: Dict[str, Document]) -> List[st attribute_name=attribute_name, attribute_components=sorted(attribute_components, key=get_attribute_component_key), class_name=capitalize(attribute_name, delimiter=""), - type=metadata[filepath]['type'], + type=attribute_data.variable_type, proto_field_cpp_type=proto_field_type, proto_field_cpp_type_prototype=proto_field_prototype, ) @@ -540,7 +552,7 @@ def write_attribute(output_directory: str, data: Dict[str, Document]) -> List[st cpp_filepath = os.path.join(output_directory, attribute_name + "_gen.cpp") write_if_different( cpp_filepath, - template[metadata[filepath]['type']].render( + template[attribute_data.variable_type].render( attribute_name=attribute_name, # TODO: Should this attribute_components list be sorted? The hpp one is. attribute_components=attribute_components, diff --git a/xml_converter/generators/metadata.py b/xml_converter/generators/metadata.py index 142fb5c2..b5e28836 100644 --- a/xml_converter/generators/metadata.py +++ b/xml_converter/generators/metadata.py @@ -200,7 +200,7 @@ class CompoundCustomClassMetadata(OptionalBaseMetadata, _CompoundCustomClassMeta class _CustomMetadata: variable_type: Literal["Custom"] = field(metadata={"json": "type"}) cpp_class: str = field(metadata={"json": "class"}) - uses_file_path: Optional[bool] = None + uses_file_path: bool = False @dataclass From 76dfee5ee03541c2cd9c1ac211173453d5cbbed8 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Tue, 21 May 2024 08:35:39 -0500 Subject: [PATCH 463/539] removing the old json schema based validator --- xml_converter/generators/main.py | 95 +------------ xml_converter/generators/metadata.py | 7 +- xml_converter/generators/schema.py | 202 --------------------------- xml_converter/generators/util.py | 5 - xml_converter/requirements.txt | 23 ++- 5 files changed, 18 insertions(+), 314 deletions(-) delete mode 100644 xml_converter/generators/schema.py diff --git a/xml_converter/generators/main.py b/xml_converter/generators/main.py index 5c98eaed..1b7c19ec 100644 --- a/xml_converter/generators/main.py +++ b/xml_converter/generators/main.py @@ -1,102 +1,15 @@ -from jsonschema import validate # type:ignore -from jsonschema.exceptions import ValidationError # type:ignore import frontmatter # type:ignore -from typing import Any, Dict, List, Tuple, Final, Set +from typing import Any, Dict, List, Tuple, Set import os import markdown from dataclasses import dataclass from jinja2 import FileSystemLoader, Environment -from schema import string_t, array_t, enum_t, union_t, union_partial_t, pattern_dictionary_t, object_t, boolean_t, DefType from protobuf_types import get_proto_field_type from util import capitalize, Document from generate_cpp import write_cpp_classes, write_attribute import argparse from metadata import parse_data, MetadataType -XML_ATTRIBUTE_REGEX: Final[str] = "^[A-Za-z]+$" -PROTO_FIELD_REGEX: Final[str] = "^[a-z_.]+$" -INTERNAL_VARIABLE_REGEX: Final[str] = "^[a-z_]+$" -ATTRIBUTE_NAME_REGEX: Final[str] = "^[A-Za-z ]+$" -CUSTOM_SERIALIZER_REGEX: Final[str] = r"^(?:read|write)(?:\.xml|\.proto)(?:\.icon|\.trail)?$" - -shared_required_fields: Dict[str, DefType] = { - "type": string_t(), - "name": string_t(pattern=ATTRIBUTE_NAME_REGEX), - "applies_to": array_t(enum_t(["Icon", "Trail", "Category"])), - "xml_fields": array_t(string_t(pattern=XML_ATTRIBUTE_REGEX)), - "protobuf_field": string_t(pattern=PROTO_FIELD_REGEX), -} - -shared_optional_fields: Dict[str, DefType] = { - "custom_functions": pattern_dictionary_t({CUSTOM_SERIALIZER_REGEX: object_t({ - "function": string_t(), - "side_effects": array_t(string_t()), - })}), - "examples": array_t(string_t()) -} - -schema = union_t({ - "Int32": union_partial_t(required=shared_required_fields, optional=shared_optional_fields), - "Fixed32": union_partial_t(required=shared_required_fields, optional=shared_optional_fields), - "Float32": union_partial_t(required=shared_required_fields, optional=shared_optional_fields), - "String": union_partial_t(required=shared_required_fields, optional=shared_optional_fields), - "Boolean": union_partial_t(required=shared_required_fields, optional=shared_optional_fields), - "MultiflagValue": union_partial_t( - required={**shared_required_fields, **{ - "flags": pattern_dictionary_t({INTERNAL_VARIABLE_REGEX: array_t(string_t())}), - }}, - optional=shared_optional_fields, - ), - "Enum": union_partial_t( - required={**shared_required_fields, **{ - "values": pattern_dictionary_t({INTERNAL_VARIABLE_REGEX: array_t(string_t())}) - }}, - optional=shared_optional_fields, - ), - "CompoundValue": union_partial_t( - required={**shared_required_fields, **{ - "xml_bundled_components": array_t(string_t()), - "xml_separate_components": array_t(string_t()), - "components": array_t(object_t({ - "name": string_t(), - "type": enum_t(["Int32", "Fixed32", "Float32"]), - "xml_fields": array_t(string_t(XML_ATTRIBUTE_REGEX)), - "protobuf_field": string_t(PROTO_FIELD_REGEX), - })), - }}, - optional=shared_optional_fields, - ), - "CompoundCustomClass": union_partial_t( - required={**shared_required_fields, **{ - "class": string_t(), - "xml_bundled_components": array_t(string_t()), - "xml_separate_components": array_t(string_t()), - "components": array_t(object_t({ - "name": string_t(), - "type": enum_t(["Int32", "Fixed32", "Float32"]), - "xml_fields": array_t(string_t(XML_ATTRIBUTE_REGEX)), - "protobuf_field": string_t(PROTO_FIELD_REGEX), - })), - }}, - optional=shared_optional_fields, - ), - "Custom": union_partial_t( - required={**shared_required_fields, **{"class": string_t()}}, - optional={ - **shared_optional_fields, - "uses_file_path": boolean_t(), # This will eventually be part of a struct that is passed into everything - } - ), -}) - - -def validate_front_matter_schema(front_matter: Any) -> str: - try: - validate(front_matter, schema) - except ValidationError as e: - return "Error Message: {} (Path: {}".format(e.message, e.json_path) - return "" - @dataclass class FieldRow: @@ -138,13 +51,7 @@ def load_input_doc(self, dir_path: str) -> None: metadata_dataclass = parse_data(document.metadata) - error = validate_front_matter_schema(document.metadata) - if error != "": - print(filepath) - print(error) - self.data[filepath] = Document( - metadata=document.metadata, metadata_dataclass=metadata_dataclass, content=document.content ) diff --git a/xml_converter/generators/metadata.py b/xml_converter/generators/metadata.py index b5e28836..00eb0caf 100644 --- a/xml_converter/generators/metadata.py +++ b/xml_converter/generators/metadata.py @@ -1,8 +1,13 @@ from dataclasses import dataclass, field import enum -from typing import Dict, List, Literal, Optional, Any, Union +from typing import Dict, List, Literal, Optional, Any, Union, Final import classnotation +XML_ATTRIBUTE_REGEX: Final[str] = "^[A-Za-z]+$" +PROTO_FIELD_REGEX: Final[str] = "^[a-z_.]+$" +INTERNAL_VARIABLE_REGEX: Final[str] = "^[a-z_]+$" +ATTRIBUTE_NAME_REGEX: Final[str] = "^[A-Za-z ]+$" + class NodeType(enum.Enum): icon = "Icon" diff --git a/xml_converter/generators/schema.py b/xml_converter/generators/schema.py deleted file mode 100644 index d2e9784b..00000000 --- a/xml_converter/generators/schema.py +++ /dev/null @@ -1,202 +0,0 @@ -from typing import Optional, List, Dict, Iterable, TypedDict, Literal, Union, Tuple - - -################################################################################ -# A union type of all of the different type helpers found below -################################################################################ -DefType = Union[ - "StringDef", - "BooleanDef", - "EnumDef", - "ArrayDef", - "ObjectDef", - "PatternDictionaryDef" -] - - -################################################################################ -# String Definition Helpers -# -# These are used as helpers for string_t() which is a helper for creating a -# "string" jsonschema definition object. Optionally string_t() can be called -# with a regex pattern that will be applied to the json schema. -################################################################################ -class BaseStringDef(TypedDict): - type: Literal["string"] - - -class StringDef(BaseStringDef, total=False): - pattern: Optional[str] - - -def string_t(pattern: Optional[str] = None) -> StringDef: - if pattern is None: - return { - "type": "string" - } - else: - return { - "type": "string", - "pattern": pattern, - } - - -################################################################################ -# Boolean Definition Helpers -# -# These are helpers for creating a "boolean" jsonschema definition object. -# boolean_t() does not take any arguments and will always return the same value -################################################################################ -class BooleanDef(TypedDict): - type: Literal["boolean"] - - -def boolean_t() -> BooleanDef: - return { - "type": "boolean" - } - - -################################################################################ -# Enumeration Definition Helpers -# -# These are helpers for creating "enum" jsonschema definition objects. These -# are string values that can only be one of a set number of values. The values -# that are allowed are passed into the enum_t() function. -################################################################################ -class EnumDef(TypedDict): - type: Literal["string"] - enum: List[str] - - -def enum_t(options: Iterable[str]) -> EnumDef: - return { - "type": "string", - "enum": list(options) - } - - -################################################################################ -# Array Definition Helpers -# -# Theses are helpers for creating "array" jsonschema definition objects. Arrays -# Take in a subtype that represents the type of their elements. -################################################################################ -class ArrayDef(TypedDict): - type: Literal["array"] - items: DefType - - -def array_t(element_type: DefType) -> ArrayDef: - return { - "type": "array", - "items": element_type - } - - -################################################################################ -# Object Definition Helpers -# -# These are helpers for creating object jsonschema definitions. Objects contain -# both required and optional fields. Objects in jsonschema normally just -# denote fields that might exist, but dont force them to exist or prevent other -# fields from existing by default. This helper automatically forces all of the -# required fields to exist, and restricts any non-required non-optional field. -################################################################################ -class ObjectDef(TypedDict): - type: Literal["object"] - additionalProperties: Literal[False] - required: List[str] - properties: Dict[str, DefType] - - -def object_t(fields: Dict[str, DefType], optional_fields: Dict[str, DefType] = {}) -> ObjectDef: - return { - "type": "object", - "additionalProperties": False, - "required": list(fields.keys()), - "properties": {**fields, **optional_fields} - } - - -################################################################################ -# Pattern Dictionary Definition Helpers -# -# These are helpers for creating dictionary types that have pattern -# requirements on their keys. This is a special type for jsonschema and it -# may be replaced in the future with something else given its uniqueness. -################################################################################ -class PatternDictionaryDef(TypedDict): - type: Literal["object"] - patternProperties: Dict[str, DefType] - - -def pattern_dictionary_t(pattern_properties: Dict[str, DefType]) -> PatternDictionaryDef: - return { - "type": "object", - "patternProperties": pattern_properties - } - - -################################################################################ -# Union Definition Type -# -# These are helpers for creating union types in jsonschema. Unions seem to be -# very difficult to accomplish in jsonschema but union_t() will abstract all -# of the complexities away, only requiring a map of strings to required and -# optional fields, similar to an object. -################################################################################ -# Helper function for the union types to more easily write required/optional -# tuples inline. -def union_partial_t( - *, - required: Dict[str, DefType] = {}, - optional: Dict[str, DefType] = {} -) -> Tuple[Dict[str, DefType], Dict[str, DefType]]: - return (required, optional) - - -class UnionBranchThenDef(TypedDict): - additionalProperties: Literal[False] - required: List[str] - properties: Dict[str, DefType] - - -UnionBranchDef = TypedDict('UnionBranchDef', { - 'if': Dict[Literal["properties"], Dict[Literal["type"], Dict[Literal["const"], str]]], - 'then': UnionBranchThenDef, -}) - - -class UnionDef(TypedDict): - type: Literal["object"] - properties: Dict[Literal["type"], EnumDef] - allOf: List[UnionBranchDef] - - -def union_t(options: Dict[str, Tuple[Dict[str, DefType], Dict[str, DefType]]]) -> UnionDef: - union_type: UnionDef = { - "type": "object", - "properties": { - "type": enum_t(options.keys()) - }, - "allOf": [ - { - "if": { - "properties": { - "type": { - "const": key - } - } - }, - "then": { - "additionalProperties": False, - "required": list(value[0].keys()), - "properties": {**value[0], **value[1]} - } - } - for key, value in options.items() - ] - } - - return union_type diff --git a/xml_converter/generators/util.py b/xml_converter/generators/util.py index f185504f..03df16df 100644 --- a/xml_converter/generators/util.py +++ b/xml_converter/generators/util.py @@ -1,5 +1,4 @@ from dataclasses import dataclass -from typing import Dict, Any from metadata import MetadataType @@ -57,11 +56,7 @@ def normalize(word: str) -> str: return "".join(normalized_word_array) -SchemaType = Dict[str, Any] - - @dataclass class Document: - metadata: SchemaType metadata_dataclass: MetadataType content: str diff --git a/xml_converter/requirements.txt b/xml_converter/requirements.txt index 62bb8a72..6020d3a2 100644 --- a/xml_converter/requirements.txt +++ b/xml_converter/requirements.txt @@ -1,21 +1,20 @@ classnotation==1.2.1 -attrs==21.4.0 flake8==4.0.1 Jinja2==3.1.2 -jsonschema==4.7.2 +lark==1.1.8 Markdown==3.4.1 -MarkupSafe==2.1.1 -mccabe==0.6.1 mypy==1.10.0 -pyaml==21.10.1 -pycodestyle==2.8.0 -pyflakes==2.4.0 -Pygments==2.17.2 -pyrsistent==0.18.1 python-frontmatter==1.0.0 PyYAML==5.1 -tomli==2.0.1 types-Markdown==3.4.0 types-PyYAML==6.0.10 -typing_extensions==4.3.0 -lark==1.1.8 \ No newline at end of file +Pygments==2.17.2 + +## The following requirements were added by pip freeze: +MarkupSafe==2.1.5 +mccabe==0.6.1 +mypy-extensions==1.0.0 +pycodestyle==2.8.0 +pyflakes==2.4.0 +tomli==2.0.1 +typing_extensions==4.11.0 \ No newline at end of file From f3cd838c45e43382f1f060d8d7620d2a00b820fe Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Tue, 21 May 2024 08:45:05 -0500 Subject: [PATCH 464/539] renaming metadata_dataclass to just metadata --- xml_converter/generators/generate_cpp.py | 4 ++-- xml_converter/generators/main.py | 8 ++++---- xml_converter/generators/util.py | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/xml_converter/generators/generate_cpp.py b/xml_converter/generators/generate_cpp.py index 33564ce0..a815cdb0 100644 --- a/xml_converter/generators/generate_cpp.py +++ b/xml_converter/generators/generate_cpp.py @@ -269,7 +269,7 @@ def generate_cpp_variable_data( cpp_includes.cpp_absolute_includes.add("type_traits") for filepath, document in sorted(data.items()): - fieldval = document.metadata_dataclass + fieldval = document.metadata attribute_name: str = attribute_name_from_markdown_data(fieldval.name) if doc_type in fieldval.applies_to_as_str(): @@ -467,7 +467,7 @@ def write_attribute(output_directory: str, data: Dict[str, Document]) -> List[st for filepath in attribute_names: attribute_components: List[AttributeComponent] = [] xml_bundled_components: List[str] = [] - attribute_data: MetadataType = data[filepath].metadata_dataclass + attribute_data: MetadataType = data[filepath].metadata attribute_name = attribute_name_from_markdown_data(attribute_data.name) proto_field_type: str = "" diff --git a/xml_converter/generators/main.py b/xml_converter/generators/main.py index 1b7c19ec..10d78096 100644 --- a/xml_converter/generators/main.py +++ b/xml_converter/generators/main.py @@ -49,10 +49,10 @@ def load_input_doc(self, dir_path: str) -> None: print(filepath) raise e - metadata_dataclass = parse_data(document.metadata) + metadata = parse_data(document.metadata) self.data[filepath] = Document( - metadata_dataclass=metadata_dataclass, + metadata=metadata, content=document.content ) @@ -88,7 +88,7 @@ def write_webdocs(self, output_directory: str) -> None: for subpage in categories[page]: content[subpage] = markdown.markdown(self.data[subpage].content, extensions=['extra', 'codehilite']) - metadata[subpage] = self.data[subpage].metadata_dataclass + metadata[subpage] = self.data[subpage].metadata generated_doc, field_rows = self.generate_auto_docs(metadata, content) @@ -103,7 +103,7 @@ def write_webdocs(self, output_directory: str) -> None: )) def get_examples(self, field_type: str, field_key: str) -> List[str]: - field_examples = self.data[field_key].metadata_dataclass.examples + field_examples = self.data[field_key].metadata.examples if len(field_examples) > 0: return [f'"{x}"' for x in field_examples] diff --git a/xml_converter/generators/util.py b/xml_converter/generators/util.py index 03df16df..b0c039a7 100644 --- a/xml_converter/generators/util.py +++ b/xml_converter/generators/util.py @@ -58,5 +58,5 @@ def normalize(word: str) -> str: @dataclass class Document: - metadata_dataclass: MetadataType + metadata: MetadataType content: str From 53618cb21b641e560556b875f43ecd9f04974140 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Tue, 21 May 2024 09:25:51 -0500 Subject: [PATCH 465/539] adding more examples to the documentation --- .../doc/acheivement/achievement_id.md | 2 + xml_converter/doc/category/category.md | 4 + xml_converter/doc/fade/distance_fade_end.md | 5 + xml_converter/doc/fade/distance_fade_start.md | 5 + xml_converter/doc/map_id/map_id.md | 4 + xml_converter/doc/menu/display_name.md | 3 + xml_converter/doc/menu/menu_id.md | 5 + xml_converter/doc/menu/name.md | 3 + xml_converter/doc/position/height_offset.md | 2 + xml_converter/doc/trail_data/byte layout.svg | 593 ++++++++++++++++++ xml_converter/doc/trail_data/trail_data.md | 3 + xml_converter/generators/main.py | 8 +- 12 files changed, 635 insertions(+), 2 deletions(-) create mode 100644 xml_converter/doc/trail_data/byte layout.svg diff --git a/xml_converter/doc/acheivement/achievement_id.md b/xml_converter/doc/acheivement/achievement_id.md index 8b9a8d49..5935436c 100644 --- a/xml_converter/doc/acheivement/achievement_id.md +++ b/xml_converter/doc/acheivement/achievement_id.md @@ -4,6 +4,8 @@ type: Int32 applies_to: [Icon, Trail] xml_fields: ["AchievementId"] protobuf_field: achievement_id +examples: + - "2655" --- An achivement that, if completed, will hide this marker diff --git a/xml_converter/doc/category/category.md b/xml_converter/doc/category/category.md index f8453815..438044d7 100644 --- a/xml_converter/doc/category/category.md +++ b/xml_converter/doc/category/category.md @@ -5,6 +5,10 @@ class: MarkerCategory applies_to: [Icon, Trail] xml_fields: [Type, Category] protobuf_field: category +examples: + - "mycategory" + - "mycategory.subcategory" + - "mycategory.subcategory.subsubcategory" custom_functions: read.proto: function: do_nothing diff --git a/xml_converter/doc/fade/distance_fade_end.md b/xml_converter/doc/fade/distance_fade_end.md index 4a40019b..ca4508fb 100644 --- a/xml_converter/doc/fade/distance_fade_end.md +++ b/xml_converter/doc/fade/distance_fade_end.md @@ -4,8 +4,13 @@ type: Float32 applies_to: [Icon, Trail] xml_fields: [FadeFar, DistanceFadeEnd] protobuf_field: distance_fade_end +examples: + - "850" + - "600" + - "1100" --- Any part of the object that is farther then this value will be at 0 alpha. +Defaults to 900 Notes ===== diff --git a/xml_converter/doc/fade/distance_fade_start.md b/xml_converter/doc/fade/distance_fade_start.md index 24dbc293..78a1bea5 100644 --- a/xml_converter/doc/fade/distance_fade_start.md +++ b/xml_converter/doc/fade/distance_fade_start.md @@ -4,8 +4,13 @@ type: Float32 applies_to: [Icon, Trail] xml_fields: [FadeNear, DistanceFadeStart] protobuf_field: distance_fade_start +examples: + - "650" + - "400" + - "900" --- Any part of the object that is farther then this value will begin to alpha fade gradually until it reaches 0 alpha at Distance Fade End. +Defaults to 700 Notes ===== diff --git a/xml_converter/doc/map_id/map_id.md b/xml_converter/doc/map_id/map_id.md index fe64cc21..58b4ccda 100644 --- a/xml_converter/doc/map_id/map_id.md +++ b/xml_converter/doc/map_id/map_id.md @@ -4,6 +4,10 @@ type: Int32 applies_to: [Icon, Trail] xml_fields: [MapID] protobuf_field: map_id +examples: + - "24" + - "50" + - "1509" --- The Map which this marker should be displayed on. diff --git a/xml_converter/doc/menu/display_name.md b/xml_converter/doc/menu/display_name.md index d998a215..291f2ffb 100644 --- a/xml_converter/doc/menu/display_name.md +++ b/xml_converter/doc/menu/display_name.md @@ -4,6 +4,9 @@ type: String applies_to: [Category] xml_fields: [DisplayName] protobuf_field: name +examples: + - "My Category" + - "Tribulation Mode 203" custom_functions: read.proto: function: proto_display_name_to_display_name_and_name diff --git a/xml_converter/doc/menu/menu_id.md b/xml_converter/doc/menu/menu_id.md index ae312b8a..b097093c 100644 --- a/xml_converter/doc/menu/menu_id.md +++ b/xml_converter/doc/menu/menu_id.md @@ -5,6 +5,11 @@ class: UniqueId xml_fields: [ID, MenuID] applies_to: [Category] protobuf_field: id +examples: + - "KOjMBsKTXpY=" + - "LJKn7WpADjo=" + - "uJrcuLd4as8=" + - "cCxU1IXfiKQ=" --- Notes diff --git a/xml_converter/doc/menu/name.md b/xml_converter/doc/menu/name.md index f0c161be..e62e87b3 100644 --- a/xml_converter/doc/menu/name.md +++ b/xml_converter/doc/menu/name.md @@ -4,6 +4,9 @@ type: String applies_to: [Category] xml_fields: [Name] protobuf_field: name +examples: + - "mycategory" + - "tribulationmode203" custom_functions: read.proto: function: do_nothing diff --git a/xml_converter/doc/position/height_offset.md b/xml_converter/doc/position/height_offset.md index aca77314..b0f2823f 100644 --- a/xml_converter/doc/position/height_offset.md +++ b/xml_converter/doc/position/height_offset.md @@ -4,6 +4,8 @@ type: Float32 applies_to: ["Icon"] xml_fields: ["HeightOffset", "BHHeightOffset"] protobuf_field: height_offset +examples: + - "0" --- A vertical offset of the object from the recorded position. diff --git a/xml_converter/doc/trail_data/byte layout.svg b/xml_converter/doc/trail_data/byte layout.svg new file mode 100644 index 00000000..a24d038a --- /dev/null +++ b/xml_converter/doc/trail_data/byte layout.svg @@ -0,0 +1,593 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + X6 + + Y6 + + Z6 + + X7 + + Y7 + + Z7 + + Version + Map ID + X1 + Y1 + Z1 + X2 + Y2 + Z2 + X3 + Y3 + Z3 + X4 + Y4 + Z4 + ... + X5 + Y5 + Z5 + + + + + + + + + + + + + + + + + + + diff --git a/xml_converter/doc/trail_data/trail_data.md b/xml_converter/doc/trail_data/trail_data.md index 35ad1556..a3414ce9 100644 --- a/xml_converter/doc/trail_data/trail_data.md +++ b/xml_converter/doc/trail_data/trail_data.md @@ -6,6 +6,9 @@ xml_fields: ["TrailData"] uses_file_path: true protobuf_field: trail_data applies_to: [Trail] +examples: + - "trails/my_trail.trl" + - "jumping_puzzle_path.trl" custom_functions: read.xml: function: xml_attribute_to_trail_data diff --git a/xml_converter/generators/main.py b/xml_converter/generators/main.py index 10d78096..aa67b681 100644 --- a/xml_converter/generators/main.py +++ b/xml_converter/generators/main.py @@ -107,8 +107,11 @@ def get_examples(self, field_type: str, field_key: str) -> List[str]: if len(field_examples) > 0: return [f'"{x}"' for x in field_examples] - # TODO: Type Examples + # Type Examples + if field_type == "Boolean": + return ["\"True\"", "\"False\""] + print(" Unknown Examples for {} {}".format(field_type, field_key)) return ["???"] def get_fixed_option_examples(self, field_type: str, pairings: Any) -> List[str]: @@ -201,7 +204,7 @@ def generate_auto_docs(self, metadata: Dict[str, MetadataType], content: Dict[st valid_values += "" elif fieldval.variable_type == "CompoundValue": - + print(" Unknown examples for {} {}".format(fieldval.variable_type, fieldkey)) example = self.build_example( type=fieldval.variable_type, applies_to=fieldval.applies_to_as_str(), @@ -255,6 +258,7 @@ def generate_auto_docs(self, metadata: Dict[str, MetadataType], content: Dict[st # different messages have differing types. This will be caught # in the cpp code regardless. + print(" Unknown examples for {} {}".format(fieldval.variable_type, fieldkey)) field_rows.append(FieldRow( name=component_field.name, xml_attribute=component_field.xml_fields[0], From 8dab096967b678d6cad5ebd64b146c8c9218f630 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Tue, 21 May 2024 21:29:39 -0400 Subject: [PATCH 466/539] Added signals to paths and icon nodes --- Icon.gd | 5 ++- Route.gd | 8 ++++- Route2D.gd | 15 ++++++++ Spatial.gd | 104 ++++++++++++++++++++++++----------------------------- 4 files changed, 72 insertions(+), 60 deletions(-) create mode 100644 Route2D.gd diff --git a/Icon.gd b/Icon.gd index fc0eca8c..55c403f2 100644 --- a/Icon.gd +++ b/Icon.gd @@ -23,5 +23,8 @@ func set_icon_image(texture_path: String): self.texture = texture self.material_override.set_shader_param("texture_albedo", texture) -func set_point_position(position: Vector3): +func update_point_poistion(position: Vector3): self.translation = position + +func remove_point(index): + queue_free() diff --git a/Route.gd b/Route.gd index 0f3ba2a5..b893be44 100644 --- a/Route.gd +++ b/Route.gd @@ -78,7 +78,7 @@ func get_point_count(): func get_point_position(index: int): return self.point_list[index] -func set_point_position(position: Vector3, index: int): +func update_point_poistion(position: Vector3, index: int): self.point_list[index] = position refresh_mesh() @@ -93,6 +93,12 @@ func remove_point(index: int): self.point_list.remove(index) refresh_mesh() +func new_point_after(midpoint, index): + var start = self.get_point_position(index) + if self.get_point_count() > index+1: + var end = self.get_point_position(index+1) + midpoint = ((start-end)/2) + end + add_point(midpoint, index+1) func set_texture(texture): $MeshInstance.material_override.set_shader_param("texture_albedo", texture) diff --git a/Route2D.gd b/Route2D.gd new file mode 100644 index 00000000..ee269897 --- /dev/null +++ b/Route2D.gd @@ -0,0 +1,15 @@ +extends Line2D + +func add_new_point(position: Vector3, index: int = -1): + self.add_point(Vector2(position.x, position.z), index) + +func update_point_poistion(position: Vector3, index: int): + self.set_point_position(index, Vector2(position.x, position.z)) + +func new_point_after(midpoint, index): + var start = self.get_point_position(index) + + if self.get_point_count() > index+1: + var end = self.get_point_position(index+1) + midpoint = ((start-end)/2) + end + add_point(midpoint, index+1) diff --git a/Spatial.gd b/Spatial.gd index 0f3070b1..ab243286 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -18,7 +18,6 @@ var next_texture_path: String = "" # the value is null then a new path will be created the next time a path point # will be created. var currently_active_path = null -var currently_active_path_2d = null var currently_active_icon = null var currently_active_category = null @@ -622,7 +621,6 @@ func gen_new_path(points: Array, texture_path: String, waypoint_trail, category_ category_data.category2d.add_path2d(new_2d_path) self.currently_active_path = new_route - self.currently_active_path_2d = new_2d_path func gen_new_icon(position: Vector3, texture_path: String, waypoint_icon, category_item: TreeItem): @@ -683,7 +681,7 @@ func gen_adjustment_nodes(): var category2d = self.currently_active_category.get_metadata(0).category2d for index in category3d.paths.size(): var route = category3d.paths[index] - var path2d = category2d.paths2d[index] + var paths2d = category2d.paths2d[index] for i in range(route.get_point_count()): var gizmo_position = route.get_point_position(i) # Simplistic cull to prevent nodes that are too far away to be @@ -693,41 +691,57 @@ func gen_adjustment_nodes(): continue var new_gizmo = gizmo_scene.instance() new_gizmo.translation = gizmo_position - new_gizmo.connect("selected", self, "on_gizmo_selected", ["path"]) - new_gizmo.connect("deselected", self, "on_gizmo_deselected") - new_gizmo.connect("updated", route, "set_point_position", [i]) - new_gizmo.connect("updated", path2d, "update_point_position", [i]) + new_gizmo.connect("selected", self, "on_gizmo_selected", [route, "path", paths2d, i]) + new_gizmo.connect("deselected", self, "on_gizmo_deselected", [route, "path", paths2d, i]) + new_gizmo.connect("updated", route, "update_point_poistion", [i]) + new_gizmo.connect("updated", paths2d, "update_point_poistion", [i]) $Gizmos.add_child(new_gizmo) for icon in category3d.icons: var new_gizmo = gizmo_scene.instance() new_gizmo.translation = icon.translation - new_gizmo.connect("selected", self, "on_gizmo_selected", ["icon"]) - new_gizmo.connect("deselected", self, "on_gizmo_deselected") - new_gizmo.connect("updated", icon, "set_point_position") + new_gizmo.connect("selected", self, "on_gizmo_selected", [icon, "icon"]) + new_gizmo.connect("deselected", self, "on_gizmo_deselected", [icon, "icon"]) + new_gizmo.connect("updated", icon, "update_point_poistion") $Gizmos.add_child(new_gizmo) var currently_selected_gizmo = null -var currently_selected_node_type: String = "" +signal delete_node(index) +signal add_point(position) +signal new_node_after(position) +signal reverse() +signal set_active_path(path) -func on_gizmo_selected(object, point_type): - print(point_type) - print("selected") +func on_gizmo_selected(object, node, point_type, node2d=null, index=-1): self.currently_selected_gizmo = object - self.currently_selected_node_type = point_type[0] $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/DeleteNode.disabled = false + self.connect("delete_node", node, "remove_point", [index]) + self.connect("delete_node", node2d, "remove_point", [index]) # Only enable these buttons if the object selected is a point on the path not an icon - if self.currently_selected_node_type == "path": + if point_type == "path": + self.connect("add_point", node, "add_point", [index]) + self.connect("add_point", node2d, "add_point", [index]) $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/NewNodeAfter.disabled = false + self.connect("new_node_after", node, "new_point_after", [index]) + self.connect("new_node_after", node2d, "new_point_after", [index]) $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/ReversePathDirection.disabled = false + self.connect("reverse", node, "reverse") $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/SetActivePath.disabled = false + self.connect("set_active_path", self, "set_active_path", [node]) $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/SnapSelectedToPlayer.disabled = false $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/XZSnapToPlayer.disabled = false $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/YSnapToPlayer.disabled = false -func on_gizmo_deselected(object): +func on_gizmo_deselected(object, node=null, point_type="", node2d=null): + self.disconnect("delete_node", node, "remove_point") + self.disconnect("delete_node", node2d, "remove_point") + self.disconnect("add_point", node, "add_point") + self.disconnect("add_point", node2d, "add_point") + self.disconnect("new_node_after", node, "new_point_after") + self.disconnect("new_node_after", node2d, "new_point_after") + self.disconnect("reverse", node, "reverse") + self.disconnect("set_active_path", self, "set_active_path") self.currently_selected_gizmo = null - self.currently_selected_node_type = "" $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/DeleteNode.disabled = true $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/NewNodeAfter.disabled = true $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/SnapSelectedToPlayer.disabled = true @@ -822,8 +836,7 @@ func _on_NewPathPoint_pressed(): else: var z_accurate_player_position = player_position z_accurate_player_position.z = -z_accurate_player_position.z - self.currently_active_path.add_point(z_accurate_player_position) - self.currently_active_path_2d.add_point(Vector2(self.player_position.x, -self.player_position.z)) + emit_signal("add_point", z_accurate_player_position) func _on_NodeEditorDialog_hide(): self.currently_selected_gizmo = null @@ -832,43 +845,21 @@ func _on_NodeEditorDialog_hide(): func _on_DeleteNode_pressed(): -# if self.currently_selected_node_type == "icon": -# self.currently_selected_node.object_link.get_parent().remove_child(self.currently_selected_node.object_link) -# self.currently_selected_node.object_link.queue_free() -# elif self.currently_selected_node_type == "path": -# var path = self.currently_selected_node.object_link -# var path2d = self.currently_selected_node.object_2d_link -# var index = self.currently_selected_node.object_index - -# path.remove_point(index) -# path2d.remove_point(index) + emit_signal("delete_node") clear_adjustment_nodes() gen_adjustment_nodes() on_gizmo_deselected(self.currently_selected_gizmo) func _on_NewNodeAfter_pressed(): - if self.currently_selected_node_type == "icon": - print("Warning: Cannot add node to icon") - elif self.currently_selected_node_type == "path": - print("insert path node") - #var path = self.currently_selected_node.object_link - #var path2d = self.currently_selected_node.object_2d_link - #var index = self.currently_selected_node.object_index - - #var start = path.get_point_position(index) - var midpoint = self.player_position - midpoint.z = -midpoint.z - #if path.get_point_count() > index+1: - # var end = path.get_point_position(index+1) - # midpoint = ((start-end)/2) + end - - #path.add_point(midpoint, index+1) - #path2d.add_point(Vector2(midpoint.x, midpoint.z), index+1) - - clear_adjustment_nodes() - gen_adjustment_nodes() - on_gizmo_deselected(self.currently_selected_gizmo) + print("insert path node") + var midpoint = self.player_position + midpoint.z = -midpoint.z + emit_signal("new_node_after", midpoint) + + clear_adjustment_nodes() + gen_adjustment_nodes() + on_gizmo_deselected(self.currently_selected_gizmo) func _on_XZSnapToPlayer_pressed(): self.currently_selected_gizmo.translation.x = self.player_position.x @@ -885,16 +876,13 @@ func _on_SnapSelectedToPlayer_pressed(): self.currently_selected_gizmo.translation.y = self.player_position.y func _on_SetActivePath_pressed(): - if self.currently_selected_node_type == "icon": - print("Warning: Cannot set icon as active path") - elif self.currently_selected_node_type == "path": - #self.currently_active_path = self.currently_selected_node.object_link - #self.currently_active_path_2d = self.currently_selected_node.object_2d_link - pass + emit_signal("set_active_path") +func set_active_path(path): + self.currently_active_path = path func _on_ReversePathDirection_pressed(): - self.currently_selected_gizmo.object_link.reverse() + emit_signal("reverse") func _on_ExitButton_pressed(): From e563c079b645946cd2900cd5da8048908b976129 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Tue, 21 May 2024 21:56:03 -0400 Subject: [PATCH 467/539] added typing and changed deselected to a signal --- Route.gd | 6 +++--- Route2D.gd | 11 ++++++----- Spatial.gd | 19 +++++++++++-------- 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/Route.gd b/Route.gd index b893be44..5fd3c5ba 100644 --- a/Route.gd +++ b/Route.gd @@ -93,10 +93,10 @@ func remove_point(index: int): self.point_list.remove(index) refresh_mesh() -func new_point_after(midpoint, index): - var start = self.get_point_position(index) +func new_point_after(midpoint: Vector3, index): + var start: Vector3 = self.get_point_position(index) if self.get_point_count() > index+1: - var end = self.get_point_position(index+1) + var end: Vector3 = self.get_point_position(index+1) midpoint = ((start-end)/2) + end add_point(midpoint, index+1) diff --git a/Route2D.gd b/Route2D.gd index ee269897..19b330fb 100644 --- a/Route2D.gd +++ b/Route2D.gd @@ -6,10 +6,11 @@ func add_new_point(position: Vector3, index: int = -1): func update_point_poistion(position: Vector3, index: int): self.set_point_position(index, Vector2(position.x, position.z)) -func new_point_after(midpoint, index): - var start = self.get_point_position(index) +func new_point_after(midpoint: Vector3, index: int): + var midpoint2d: Vector2 = Vector2(midpoint.x, midpoint.z) + var start: Vector2 = self.get_point_position(index) if self.get_point_count() > index+1: - var end = self.get_point_position(index+1) - midpoint = ((start-end)/2) + end - add_point(midpoint, index+1) + var end: Vector2 = self.get_point_position(index+1) + midpoint2d = ((start-end)/2) + end + add_point(midpoint2d, index+1) diff --git a/Spatial.gd b/Spatial.gd index ab243286..12391701 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -681,7 +681,7 @@ func gen_adjustment_nodes(): var category2d = self.currently_active_category.get_metadata(0).category2d for index in category3d.paths.size(): var route = category3d.paths[index] - var paths2d = category2d.paths2d[index] + var path2d = category2d.paths2d[index] for i in range(route.get_point_count()): var gizmo_position = route.get_point_position(i) # Simplistic cull to prevent nodes that are too far away to be @@ -691,16 +691,18 @@ func gen_adjustment_nodes(): continue var new_gizmo = gizmo_scene.instance() new_gizmo.translation = gizmo_position - new_gizmo.connect("selected", self, "on_gizmo_selected", [route, "path", paths2d, i]) - new_gizmo.connect("deselected", self, "on_gizmo_deselected", [route, "path", paths2d, i]) + new_gizmo.connect("selected", self, "on_gizmo_selected", [route, "path", path2d, i]) + new_gizmo.connect("deselected", self, "on_gizmo_deselected", [route, "path", path2d, i]) + self.connect("deselected", self, "on_gizmo_deselected", [route, "path", path2d, i]) new_gizmo.connect("updated", route, "update_point_poistion", [i]) - new_gizmo.connect("updated", paths2d, "update_point_poistion", [i]) + new_gizmo.connect("updated", path2d, "update_point_poistion", [i]) $Gizmos.add_child(new_gizmo) for icon in category3d.icons: var new_gizmo = gizmo_scene.instance() new_gizmo.translation = icon.translation new_gizmo.connect("selected", self, "on_gizmo_selected", [icon, "icon"]) new_gizmo.connect("deselected", self, "on_gizmo_deselected", [icon, "icon"]) + self.connect("deselected", self, "on_gizmo_deselected", [icon, "icon"]) new_gizmo.connect("updated", icon, "update_point_poistion") $Gizmos.add_child(new_gizmo) @@ -710,8 +712,9 @@ signal add_point(position) signal new_node_after(position) signal reverse() signal set_active_path(path) +signal deselected(gizmo) -func on_gizmo_selected(object, node, point_type, node2d=null, index=-1): +func on_gizmo_selected(object, node, point_type: String, node2d = null, index: int = -1): self.currently_selected_gizmo = object $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/DeleteNode.disabled = false self.connect("delete_node", node, "remove_point", [index]) @@ -732,7 +735,7 @@ func on_gizmo_selected(object, node, point_type, node2d=null, index=-1): $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/YSnapToPlayer.disabled = false -func on_gizmo_deselected(object, node=null, point_type="", node2d=null): +func on_gizmo_deselected(object, node, point_type: String, node2d = null): self.disconnect("delete_node", node, "remove_point") self.disconnect("delete_node", node2d, "remove_point") self.disconnect("add_point", node, "add_point") @@ -848,7 +851,7 @@ func _on_DeleteNode_pressed(): emit_signal("delete_node") clear_adjustment_nodes() gen_adjustment_nodes() - on_gizmo_deselected(self.currently_selected_gizmo) + emit_signal("deselected", self.currently_selected_gizmo) func _on_NewNodeAfter_pressed(): @@ -859,7 +862,7 @@ func _on_NewNodeAfter_pressed(): clear_adjustment_nodes() gen_adjustment_nodes() - on_gizmo_deselected(self.currently_selected_gizmo) + emit_signal("deselected", self.currently_selected_gizmo) func _on_XZSnapToPlayer_pressed(): self.currently_selected_gizmo.translation.x = self.player_position.x From 62b851267ea34524792cc55c9dd2f496915c07b1 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Wed, 22 May 2024 10:32:00 -0500 Subject: [PATCH 468/539] Attempting to upgrade the doc styles --- xml_converter/generators/main.py | 8 +- .../web_templates/documentation.html | 81 ++++++++++++------- .../generators/web_templates/infotable.html | 2 - 3 files changed, 57 insertions(+), 34 deletions(-) diff --git a/xml_converter/generators/main.py b/xml_converter/generators/main.py index aa67b681..336b2e3b 100644 --- a/xml_converter/generators/main.py +++ b/xml_converter/generators/main.py @@ -144,15 +144,13 @@ def get_fixed_option_examples(self, field_type: str, pairings: Any) -> List[str] return examples def build_example(self, type: str, applies_to: List[str], xml_field: str, examples: List[str]) -> str: - example = "
" + example = "
"
 
         for node_type in applies_to:
             for value in examples:
-                example += "<" + node_type + " ... " + xml_field + "=" + value + " ... >
" + example += f'<{node_type} ... {xml_field}={value} ... >\n' break - # example += "
" - - example += "
" + example += "
" return example diff --git a/xml_converter/generators/web_templates/documentation.html b/xml_converter/generators/web_templates/documentation.html index db2d6add..ea7b2f0f 100644 --- a/xml_converter/generators/web_templates/documentation.html +++ b/xml_converter/generators/web_templates/documentation.html @@ -1,18 +1,52 @@ - + -
Hello world
-
+ +
{{generated_doc}}
diff --git a/xml_converter/generators/web_templates/infotable.html b/xml_converter/generators/web_templates/infotable.html index 4063fd4f..a52a9531 100644 --- a/xml_converter/generators/web_templates/infotable.html +++ b/xml_converter/generators/web_templates/infotable.html @@ -17,8 +17,6 @@ {% endfor %} -

Type Info

- {% for field_row in field_rows %}

{{field_row.name}}

From b270b178dc672c3dda459335bf8676a43d7110ac Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sun, 26 May 2024 10:56:25 -0500 Subject: [PATCH 469/539] adding the ability to add examples to component fields --- xml_converter/doc/position/position.md | 4 ++++ xml_converter/generators/main.py | 26 ++++++++++++++++++-------- xml_converter/generators/metadata.py | 1 + 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/xml_converter/doc/position/position.md b/xml_converter/doc/position/position.md index 4e083c4f..3500f66d 100644 --- a/xml_converter/doc/position/position.md +++ b/xml_converter/doc/position/position.md @@ -11,16 +11,20 @@ components: type: Float32 xml_fields: [XPos, PositionX] protobuf_field: "x" + examples: ["166.735", "1110.4", "-433.615", "-196.412"] - name: Y Position type: Float32 xml_fields: [YPos, PositionY] protobuf_field: "y" + examples: ["81.727", "24.5189", "9.12564", "3.91473"] - name: Z Position type: Float32 xml_fields: [ZPos, PositionZ] protobuf_field: "z" + examples: ["-103.464", "-135.401", "164.66", "625.115"] + --- An XYZ location of a point in the game world. diff --git a/xml_converter/generators/main.py b/xml_converter/generators/main.py index 336b2e3b..4e196904 100644 --- a/xml_converter/generators/main.py +++ b/xml_converter/generators/main.py @@ -2,7 +2,7 @@ from typing import Any, Dict, List, Tuple, Set import os import markdown -from dataclasses import dataclass +from dataclasses import dataclass, field from jinja2 import FileSystemLoader, Environment from protobuf_types import get_proto_field_type from util import capitalize, Document @@ -102,10 +102,15 @@ def write_webdocs(self, output_directory: str) -> None: content_nav=navigation_links )) - def get_examples(self, field_type: str, field_key: str) -> List[str]: - field_examples = self.data[field_key].metadata.examples - if len(field_examples) > 0: - return [f'"{x}"' for x in field_examples] + # TODO: This might not be a great tool unless we want to add special logic here for compound types + def get_examples(self, field_type: str, field_key: str, examples: List[str] = []) -> List[str]: + if len(examples) > 0: + return [f'"{x}"' for x in examples] + + if field_key in self.data: + field_examples = self.data[field_key].metadata.examples + if len(field_examples) > 0: + return [f'"{x}"' for x in field_examples] # Type Examples if field_type == "Boolean": @@ -256,7 +261,12 @@ def generate_auto_docs(self, metadata: Dict[str, MetadataType], content: Dict[st # different messages have differing types. This will be caught # in the cpp code regardless. - print(" Unknown examples for {} {}".format(fieldval.variable_type, fieldkey)) + examples = self.get_examples( + field_type=component_field.subcomponent_type.value, + field_key=fieldkey + "[" + component_field.name + "]", # TODO + examples=component_field.examples, + ) + field_rows.append(FieldRow( name=component_field.name, xml_attribute=component_field.xml_fields[0], @@ -268,8 +278,8 @@ def generate_auto_docs(self, metadata: Dict[str, MetadataType], content: Dict[st example=self.build_example( type=component_field.subcomponent_type.value, applies_to=fieldval.applies_to_as_str(), - xml_field=fieldval.xml_fields[0], - examples=["???TODO2???"], + xml_field=component_field.xml_fields[0], + examples=examples, ), description=content[fieldkey], valid_values_html=valid_values, diff --git a/xml_converter/generators/metadata.py b/xml_converter/generators/metadata.py index 00eb0caf..47da3be6 100644 --- a/xml_converter/generators/metadata.py +++ b/xml_converter/generators/metadata.py @@ -165,6 +165,7 @@ class CompoundSubComponent: subcomponent_type: SubcomponentType = field(metadata={"json": "type"}) xml_fields: List[str] protobuf_field: str + examples: List[str] = field(default_factory=list) @dataclass From d434c2d9c9d8c82ef4d72afb78051a4a5635f067 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sun, 26 May 2024 11:10:26 -0500 Subject: [PATCH 470/539] . --- xml_converter/generators/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xml_converter/generators/main.py b/xml_converter/generators/main.py index 4e196904..873c4aaa 100644 --- a/xml_converter/generators/main.py +++ b/xml_converter/generators/main.py @@ -2,7 +2,7 @@ from typing import Any, Dict, List, Tuple, Set import os import markdown -from dataclasses import dataclass, field +from dataclasses import dataclass from jinja2 import FileSystemLoader, Environment from protobuf_types import get_proto_field_type from util import capitalize, Document @@ -263,7 +263,7 @@ def generate_auto_docs(self, metadata: Dict[str, MetadataType], content: Dict[st examples = self.get_examples( field_type=component_field.subcomponent_type.value, - field_key=fieldkey + "[" + component_field.name + "]", # TODO + field_key=fieldkey + "[" + component_field.name + "]", examples=component_field.examples, ) From e9082792355d14f92e70e79927423442e5f64cbc Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sun, 26 May 2024 12:01:03 -0500 Subject: [PATCH 471/539] adding a list of known markerpacks for regression testing --- xml_converter/xml_pack_sources/.gitignore | 2 ++ xml_converter/xml_pack_sources/database.yaml | 33 ++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 xml_converter/xml_pack_sources/.gitignore create mode 100644 xml_converter/xml_pack_sources/database.yaml diff --git a/xml_converter/xml_pack_sources/.gitignore b/xml_converter/xml_pack_sources/.gitignore new file mode 100644 index 00000000..c388a590 --- /dev/null +++ b/xml_converter/xml_pack_sources/.gitignore @@ -0,0 +1,2 @@ +*.taco +*.zip diff --git a/xml_converter/xml_pack_sources/database.yaml b/xml_converter/xml_pack_sources/database.yaml new file mode 100644 index 00000000..cf3313b0 --- /dev/null +++ b/xml_converter/xml_pack_sources/database.yaml @@ -0,0 +1,33 @@ +- https://drive.google.com/file/d/15Eqex_HIO3B0Aga4qWL8kLc1vlVEIJ8e/view +- https://fast.farming-community.eu/fast/markers/fast_TacO_pack.taco +- https://github.com/agaertner/bhud-markers/releases/download/v0.0.2/Nekres.Markers.taco +- https://github.com/AsherGlick/TurtlePoint/releases/download/1.0/TurtlePoint.taco +- https://github.com/czokalapik/Czokalapik-s-Guides-for-GW2Taco/releases/download/v1.0.0/Czokalapik-s-Guides-for-GW2Taco.taco +- https://github.com/dlamkins/heart-zones/releases/download/2.0.1/HeartZones.taco +- https://github.com/Emythiel/gw2-blish-markers/releases/download/v1.0.6/emysmarkers.zip +- https://github.com/Garfried/RACE-Beetle-Racing-Tracks/releases/download/v1.0/RACE_BeetleTracks.taco +- https://github.com/Girbilcannon/Pewpews-Power-Paths/releases/download/v1.2.0/Pewpews_Power_Paths.taco +- https://github.com/Girbilcannon/zippy/releases/download/Zippy1_8_0/Zippy.taco +- https://github.com/HeroineDark/HeroineDarks-Super-Adventure-Box-Guide/blob/main/HeroineDark%20SAB%20Guides.taco +- https://github.com/HeroineDark/HeroineDarks-Super-Adventure-Box-Guide/raw/main/HeroineDark%20SAB%20Guides.taco +- https://github.com/Kaedalus/Mesmer-Fractal-Skips/releases/download/v1.0.2/MesmerFractalSkips.taco +- https://github.com/LadyElyssa/LadyElyssaTacoTrails/releases/download/v12.2/LadyElyssa.taco +- https://github.com/Metallis/Metal-Marker-Myriad/releases/download/v7.3/Metal-Marker-Myriad.taco +- https://github.com/Metallis/Only-Fish-Marker-Pack/releases/download/v1.10/Only-Fish.taco +- https://github.com/n1nj44r91/Tyria-Drift-DRFT-GW2-TacO-Racetracks/releases/download/v3.1/DRFT_Main.taco +- https://github.com/Nexrym/Nexploration/releases/download/v0.9.0/Nexploration.taco +- https://github.com/OlivierCharton/JapyxTrails/releases/download/1.1/JapyxTrails.taco +- https://github.com/placeholderwastakentwice/flooch-friendly-collection-routes/releases/download/V3/ffcr.taco +- https://github.com/QuitarHero/Heros-Marker-Pack/releases/download/v2.7.0/Hero.Blish.Pack.zip +- https://github.com/rediche/rediche-wvw-pack/releases/download/v1.0.8/RedicheWvwPack.taco +- https://github.com/Sutcenes/MovementOnTheWorld_TacoSupport/releases/download/31.05/MoW.taco +- https://github.com/SZG5/gw2-twisted-castle/releases/download/0.4/TwistedCastle.taco +- https://github.com/xrandox/Automatic-Arrows/releases/download/v1.1.0/AutomaticArrows.taco +- https://github.com/xrandox/Tehs_Trails_MKL/releases/download/v1.2/TehsTrailsMKL.taco +- https://github.com/xrandox/TehsTrails-HeroPoints/releases/download/v1.0/TehsTrails-HeroPoints.taco +- https://github.com/xrandox/TehsTrails/releases/download/v5.2.0/TehsTrails.taco +- https://gitlab.com/lepaperwan/gw2-abaddon/-/jobs/2400738870/artifacts/raw/Abaddon.taco +- https://moar-loot.web.app/releases/moar.taco +- https://www.heinze.fr/taco/download.php?f=3 +- https://www.heinze.fr/taco/download.php?f=6 +- https://www.tekkitsworkshop.net/download?download=1:tw-all-in-one \ No newline at end of file From d17792c741ac9bfdbbabeb4d73d800006344f6e4 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sun, 26 May 2024 12:49:18 -0500 Subject: [PATCH 472/539] adding examples for compound fields based on their components --- xml_converter/doc/rotation/euler_rotation.md | 6 +++- xml_converter/generators/main.py | 35 +++++++++++++++++--- 2 files changed, 36 insertions(+), 5 deletions(-) diff --git a/xml_converter/doc/rotation/euler_rotation.md b/xml_converter/doc/rotation/euler_rotation.md index 6e65adb0..cfeff7ce 100644 --- a/xml_converter/doc/rotation/euler_rotation.md +++ b/xml_converter/doc/rotation/euler_rotation.md @@ -11,19 +11,23 @@ components: type: Float32 xml_fields: [RotateX] protobuf_field: "x" + examples: ["180", "90", "0", "85", "-90", "0.01"] - name: Y Rotation type: Float32 xml_fields: [RotateY] protobuf_field: "y" + examples: ["10", "-18", "0", "-1.5", "20", "359"] - name: Z Rotation type: Float32 xml_fields: [RotateZ] protobuf_field: "z" + examples: ["-38", "-10.55", "-0.65", "123", "53.5", "-75"] --- -Euler X Y Z rotation. +Euler X Y Z rotation in degrees. +Can be any floating point value but will be modulo 360 when applied Notes ===== diff --git a/xml_converter/generators/main.py b/xml_converter/generators/main.py index 873c4aaa..7e7f99e7 100644 --- a/xml_converter/generators/main.py +++ b/xml_converter/generators/main.py @@ -207,14 +207,27 @@ def generate_auto_docs(self, metadata: Dict[str, MetadataType], content: Dict[st valid_values += "" elif fieldval.variable_type == "CompoundValue": - print(" Unknown examples for {} {}".format(fieldval.variable_type, fieldkey)) + subcomponent_examples = [ + self.get_examples( + field_type=x.subcomponent_type.value, + field_key=fieldkey + "[" + x.name + "]", + examples=x.examples + ) for x in fieldval.components + ] + + compound_examples = build_combinations( + subcomponent_examples + ) + + # TODO: the get_examples function above is not great because it puts quotes around everything and we need to remove them before joining + examples = ["\"" + ",".join([y.strip("\"") for y in x]) + "\"" for x in compound_examples] + example = self.build_example( type=fieldval.variable_type, applies_to=fieldval.applies_to_as_str(), xml_field=fieldval.xml_fields[0], - examples=["???TODO???"] + examples=examples ) - # ",".join( [ self.get_examples(x['type'], fieldval['applies_to'], fieldval['xml_fields'][0]) for x in fieldval['components'] ]) else: example = self.build_example( type=fieldval.variable_type, @@ -225,7 +238,6 @@ def generate_auto_docs(self, metadata: Dict[str, MetadataType], content: Dict[st field_key=fieldkey, ) ) - # self.get_examples(fieldval['type'], fieldval['applies_to'], fieldval['xml_fieldsval'][0]) proto_field_type: str = "" for marker_type in fieldval.applies_to_as_str(): @@ -290,6 +302,21 @@ def generate_auto_docs(self, metadata: Dict[str, MetadataType], content: Dict[st return template.render(field_rows=field_rows), field_rows +def build_combinations(inputs: List[List[str]]) -> List[List[str]]: + output_list: List[List[str]] = [] + + longest_input_list = max([len(x) for x in inputs]) + + for i in range(longest_input_list): + inner_list: List[str] = [] + for input_list in inputs: + inner_list.append(input_list[i % len(input_list)]) + + output_list.append(inner_list) + + return output_list + + ################################################################################ # main # From 65ff8492386685b84fbb1785028ba6f41196b435 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sun, 26 May 2024 16:26:25 -0500 Subject: [PATCH 473/539] adding the components of custom compound attributes to the web docs --- xml_converter/generators/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xml_converter/generators/main.py b/xml_converter/generators/main.py index 7e7f99e7..187b2440 100644 --- a/xml_converter/generators/main.py +++ b/xml_converter/generators/main.py @@ -261,7 +261,8 @@ def generate_auto_docs(self, metadata: Dict[str, MetadataType], content: Dict[st description=content[fieldkey] # todo: )) - if fieldval.variable_type == "CompoundValue": + # Include the "component" fields of any compound fields + if fieldval.variable_type == "CompoundValue" or fieldval.variable_type == "CompoundCustomClass": for component_field in fieldval.components: binary_field_name = fieldval.protobuf_field + "." + component_field.protobuf_field From 84040b50125bd656d836f508da36cc95c8112114 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sun, 26 May 2024 16:29:12 -0500 Subject: [PATCH 474/539] adding more examples to round out the core attributes --- xml_converter/doc/texture/color.md | 23 ++++++++++++++++++++++- xml_converter/doc/texture/icon.md | 4 ++++ xml_converter/doc/texture/texture.md | 4 ++++ xml_converter/doc/trigger/guid.md | 7 +++++++ 4 files changed, 37 insertions(+), 1 deletion(-) diff --git a/xml_converter/doc/texture/color.md b/xml_converter/doc/texture/color.md index 73ecfe6b..310175b6 100644 --- a/xml_converter/doc/texture/color.md +++ b/xml_converter/doc/texture/color.md @@ -7,31 +7,52 @@ xml_fields: [Color, BHColor] protobuf_field: rgba_color xml_bundled_components: ['Red', 'Green', 'Blue'] xml_separate_components: ['Alpha'] +examples: + - "FFFFFF" + - "#FFFFFF" + - "#FF8800" + - "#CCCCCCFF" + - "#000000CC" + components: - name: Red type: Float32 xml_fields: [Red] protobuf_field: rgba_color + examples: ["0", "0.25", "0.5", "0.75", "1.0"] - name: Green type: Float32 xml_fields: [Green] protobuf_field: rgba_color - + examples: ["0", "0.25", "0.5", "0.75", "1.0"] + - name: Blue type: Float32 xml_fields: [Blue] protobuf_field: rgba_color + examples: ["0", "0.25", "0.5", "0.75", "1.0"] - name: Alpha type: Float32 xml_fields: [Alpha] protobuf_field: rgba_color + examples: ["0", "0.25", "0.5", "0.75", "1.0"] --- A multiplier color to tint the raw albedo texture of a marker of trail texture. (Unclear) Solid white will result in no change, solid black will result in a black texture. +Note: Burrito and BlishHUD treat the alpha channel of "Color" differently. Burrito treats the 7th and 8th hex of the color as a true alpha channel, just the same as if the Alpha attribute had been used. BlishHUD treats the 7th and 8th hex as a modulator for #FFFFFF. + +A color of #00000000 will apear as transparent in Burrito, but will apear as the original texture on BlishHUD +A color of #000000 will appear as black for both Burrito and BlishHUD +A color of #FFFFFF00 will apear transparent for burrito and the original texture on BlishHUD + +Numbers are stored in an 8bit precision format so these are the floating point values that will be used if more precise values are specified: 0.000, 0.003, 0.007, 0.011, 0.015, 0.019, 0.023, 0.027, 0.031, 0.035, 0.039, 0.043, 0.047, 0.050, 0.054, 0.058, 0.062, 0.066, 0.070, 0.074, 0.078, 0.082, 0.086, 0.090, 0.094, 0.098, 0.101, 0.105, 0.109, 0.113, 0.117, 0.121, 0.125, 0.129, 0.133, 0.137, 0.141, 0.145, 0.149, 0.152, 0.156, 0.160, 0.164, 0.168, 0.172, 0.176, 0.180, 0.184, 0.188, 0.192, 0.196, 0.200, 0.203, 0.207, 0.211, 0.215, 0.219, 0.223, 0.227, 0.231, 0.235, 0.239, 0.243, 0.247, 0.250, 0.254, 0.258, 0.262, 0.266, 0.270, 0.274, 0.278, 0.282, 0.286, 0.290, 0.294, 0.298, 0.301, 0.305, 0.309, 0.313, 0.317, 0.321, 0.325, 0.329, 0.333, 0.337, 0.341, 0.345, 0.349, 0.352, 0.356, 0.360, 0.364, 0.368, 0.372, 0.376, 0.380, 0.384, 0.388, 0.392, 0.396, 0.400, 0.403, 0.407, 0.411, 0.415, 0.419, 0.423, 0.427, 0.431, 0.435, 0.439, 0.443, 0.447, 0.450, 0.454, 0.458, 0.462, 0.466, 0.470, 0.474, 0.478, 0.482, 0.486, 0.490, 0.494, 0.498, 0.501, 0.505, 0.509, 0.513, 0.517, 0.521, 0.525, 0.529, 0.533, 0.537, 0.541, 0.545, 0.549, 0.552, 0.556, 0.560, 0.564, 0.568, 0.572, 0.576, 0.580, 0.584, 0.588, 0.592, 0.596, 0.600, 0.603, 0.607, 0.611, 0.615, 0.619, 0.623, 0.627, 0.631, 0.635, 0.639, 0.643, 0.647, 0.650, 0.654, 0.658, 0.662, 0.666, 0.670, 0.674, 0.678, 0.682, 0.686, 0.690, 0.694, 0.698, 0.701, 0.705, 0.709, 0.713, 0.717, 0.721, 0.725, 0.729, 0.733, 0.737, 0.741, 0.745, 0.749, 0.752, 0.756, 0.760, 0.764, 0.768, 0.772, 0.776, 0.780, 0.784, 0.788, 0.792, 0.796, 0.800, 0.803, 0.807, 0.811, 0.815, 0.819, 0.823, 0.827, 0.831, 0.835, 0.839, 0.843, 0.847, 0.850, 0.854, 0.858, 0.862, 0.866, 0.870, 0.874, 0.878, 0.882, 0.886, 0.890, 0.894, 0.898, 0.901, 0.905, 0.909, 0.913, 0.917, 0.921, 0.925, 0.929, 0.933, 0.937, 0.941, 0.945, 0.949, 0.952, 0.956, 0.960, 0.964, 0.968, 0.972, 0.976, 0.980, 0.984, 0.988, 0.992, 0.996, 1.000 + +Values below 0 or above 1 will be clamped to 0 or 1 + Notes ===== https://blishhud.com/docs/markers/attributes/texture diff --git a/xml_converter/doc/texture/icon.md b/xml_converter/doc/texture/icon.md index 673549d7..077d0c02 100644 --- a/xml_converter/doc/texture/icon.md +++ b/xml_converter/doc/texture/icon.md @@ -6,6 +6,10 @@ applies_to: [Icon] xml_fields: [IconFile] uses_file_path: false protobuf_field: texture_id +examples: + - "data/cool_icon.png" + - "data/good_direction.png" + - "data/heart_of_thorns/mastery_point.png" --- The path to an image which contains the texture that will be present on an icon. diff --git a/xml_converter/doc/texture/texture.md b/xml_converter/doc/texture/texture.md index 29fc0dd0..07d931d4 100644 --- a/xml_converter/doc/texture/texture.md +++ b/xml_converter/doc/texture/texture.md @@ -6,6 +6,10 @@ applies_to: [Trail] xml_fields: [Texture] uses_file_path: false protobuf_field: texture_id +examples: + - "data/cool_trail.png" + - "data/bad_path.png" + - "data/heart_of_thorns/glider_only_path.png" --- The path to an image which contains the texture that will be present on a trail. diff --git a/xml_converter/doc/trigger/guid.md b/xml_converter/doc/trigger/guid.md index ad4a8094..909983f4 100644 --- a/xml_converter/doc/trigger/guid.md +++ b/xml_converter/doc/trigger/guid.md @@ -5,6 +5,13 @@ class: UniqueId xml_fields: ["GUID"] applies_to: ["Icon", "Trail"] protobuf_field: guid +examples: + - oC75IfZgR3q+PO0T+6YJNQ== + - 0lBvpjZWS6edFG6kNFgutQ== + - tBQmxZ7XSfWxmSvAwKr1MA + - MeUxljBJSJSFgnCUFVFMyg + - XSGdb93xRxeCWm0fgMBCBQ + - OluemQSXQpSCeWb3RbWlNA --- A globally unique identifier value to make sure this maker's trigger reset data is always assocaited with this marker and never lost or confused with other markers. From 7318bc2cb9a5385e6a39d01248a5d88e15adf726 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sun, 26 May 2024 21:08:23 -0500 Subject: [PATCH 475/539] breaking out proto info inside AttributeVariable --- .../cpp_templates/class_template.cpp | 20 ++-- xml_converter/generators/generate_cpp.py | 100 ++++++++++-------- 2 files changed, 68 insertions(+), 52 deletions(-) diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index e73c9ee6..bf2b5d1e 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -105,12 +105,12 @@ waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf(ProtoWriterState* state) cons {% for attribute_variable in attribute_variables %} {% if attribute_variable.is_component == false %} if (this->{{attribute_variable.attribute_flag_name}}) { - {% if not attribute_variable.is_proto_field_scalar %} - std::function setter = [&proto_{{cpp_class_header}}]({{attribute_variable.protobuf_cpp_type}}* val) { proto_{{cpp_class_header}}.{{attribute_variable.mutable_proto_drilldown_calls}}set_allocated_{{attribute_variable.protobuf_field}}(val); }; + {% if not attribute_variable.proto_info.is_proto_field_scalar %} + std::function setter = [&proto_{{cpp_class_header}}]({{attribute_variable.proto_info.protobuf_cpp_type}}* val) { proto_{{cpp_class_header}}.{{attribute_variable.proto_info.mutable_proto_drilldown_calls}}set_allocated_{{attribute_variable.proto_info.protobuf_field}}(val); }; {% else %} - std::function setter = [&proto_{{cpp_class_header}}]({{attribute_variable.protobuf_cpp_type}} val) { proto_{{cpp_class_header}}.{{attribute_variable.mutable_proto_drilldown_calls}}set_{{attribute_variable.protobuf_field}}(val); }; + std::function setter = [&proto_{{cpp_class_header}}]({{attribute_variable.proto_info.protobuf_cpp_type}} val) { proto_{{cpp_class_header}}.{{attribute_variable.proto_info.mutable_proto_drilldown_calls}}set_{{attribute_variable.proto_info.protobuf_field}}(val); }; {% endif %} - {{attribute_variable.serialize_proto_function}}(this->{{attribute_variable.attribute_name}}, state, setter{% for side_effect in attribute_variable.serialize_proto_side_effects %}, &(this->{{side_effect}}){% endfor %}); + {{attribute_variable.proto_info.serialize_proto_function}}(this->{{attribute_variable.attribute_name}}, state, setter{% for side_effect in attribute_variable.proto_info.serialize_proto_side_effects %}, &(this->{{side_effect}}){% endfor %}); } {% endif %} {% endfor %} @@ -120,14 +120,14 @@ waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf(ProtoWriterState* state) cons void {{cpp_class}}::parse_protobuf(waypoint::{{cpp_class}} proto_{{cpp_class_header}}, ProtoReaderState* state) { {% for attribute_variable in attribute_variables %} {% if attribute_variable.is_component == false %} - {% if not attribute_variable.is_proto_field_scalar %} - if (proto_{{cpp_class_header}}{{attribute_variable.proto_drilldown_calls}}.has_{{attribute_variable.protobuf_field}}()) { - {% elif attribute_variable.protobuf_cpp_type == "std::string" %} - if (proto_{{cpp_class_header}}{{attribute_variable.proto_drilldown_calls}}.{{attribute_variable.protobuf_field}}() != "") { + {% if not attribute_variable.proto_info.is_proto_field_scalar %} + if (proto_{{cpp_class_header}}{{attribute_variable.proto_info.proto_drilldown_calls}}.has_{{attribute_variable.proto_info.protobuf_field}}()) { + {% elif attribute_variable.proto_info.protobuf_cpp_type == "std::string" %} + if (proto_{{cpp_class_header}}{{attribute_variable.proto_info.proto_drilldown_calls}}.{{attribute_variable.proto_info.protobuf_field}}() != "") { {% else %} - if (proto_{{cpp_class_header}}{{attribute_variable.proto_drilldown_calls}}.{{attribute_variable.protobuf_field}}() != 0) { + if (proto_{{cpp_class_header}}{{attribute_variable.proto_info.proto_drilldown_calls}}.{{attribute_variable.proto_info.protobuf_field}}() != 0) { {% endif %} - {{attribute_variable.deserialize_proto_function}}(proto_{{cpp_class_header}}{{attribute_variable.proto_drilldown_calls}}.{{attribute_variable.protobuf_field}}(), state, &(this->{{attribute_variable.attribute_name}}), &(this->{{attribute_variable.attribute_flag_name}}){% for side_effect in attribute_variable.deserialize_proto_side_effects %}, &(this->{{side_effect}}){% endfor %}); + {{attribute_variable.proto_info.deserialize_proto_function}}(proto_{{cpp_class_header}}{{attribute_variable.proto_info.proto_drilldown_calls}}.{{attribute_variable.proto_info.protobuf_field}}(), state, &(this->{{attribute_variable.attribute_name}}), &(this->{{attribute_variable.attribute_flag_name}}){% for side_effect in attribute_variable.proto_info.deserialize_proto_side_effects %}, &(this->{{side_effect}}){% endfor %}); } {% endif %} {% endfor %} diff --git a/xml_converter/generators/generate_cpp.py b/xml_converter/generators/generate_cpp.py index a815cdb0..2a7b7c47 100644 --- a/xml_converter/generators/generate_cpp.py +++ b/xml_converter/generators/generate_cpp.py @@ -1,6 +1,6 @@ from dataclasses import dataclass, field from typing import Set, List, Dict, Optional, Tuple, TypedDict -from jinja2 import FileSystemLoader, Environment, Template +from jinja2 import FileSystemLoader, Environment, StrictUndefined, Template from metadata import CustomFunction, MetadataType from jinja_helpers import UnindentBlocks from util import lowercase, capitalize, normalize, Document @@ -44,23 +44,8 @@ class DocumentationTypeData(TypedDict): } } - @dataclass -class AttributeVariable: - attribute_name: str - attribute_type: str - cpp_type: str - class_name: str - xml_fields: List[str] - - # The function name and additional side effect pointers for xml serialization. - serialize_xml_function: str - serialize_xml_side_effects: List[str] - - # The function name and additional side effect pointers for xml deserialization. - deserialize_xml_function: str - deserialize_xml_side_effects: List[str] - +class AttributeVariableProtoInfo: # The function name and additional side effect pointers for proto serialization. serialize_proto_function: str serialize_proto_side_effects: List[str] @@ -78,12 +63,6 @@ class AttributeVariable: # Protoc cares if a field is scalar or not in the case of "set" vs "set allocated". is_proto_field_scalar: bool - default_xml_field: str = "" - side_effects: List[str] = field(default_factory=list) - xml_bundled_components: List[str] = field(default_factory=list) - attribute_flag_name: Optional[str] = "" - write_to_xml: bool = True - # The CPP code to inject into the variable getter to drill down to the # variable we are looking for. eg ".trigger()" or ".one().two()" proto_drilldown_calls: str = "" @@ -92,10 +71,37 @@ class AttributeVariable: # variable we are looking for. eg ".mutable_trigger()" or "mutable_one()->mutable_two()->" mutable_proto_drilldown_calls: str = "" + + +@dataclass +class AttributeVariable: + attribute_name: str + attribute_type: str + cpp_type: str + class_name: str + xml_fields: List[str] + + # The function name and additional side effect pointers for xml serialization. + serialize_xml_function: str + serialize_xml_side_effects: List[str] + + # The function name and additional side effect pointers for xml deserialization. + deserialize_xml_function: str + deserialize_xml_side_effects: List[str] + + proto_info: AttributeVariableProtoInfo + + default_xml_field: str = "" + side_effects: List[str] = field(default_factory=list) + xml_bundled_components: List[str] = field(default_factory=list) + attribute_flag_name: Optional[str] = "" + write_to_xml: bool = True + uses_file_path: bool = False is_component: bool = False + @dataclass class AttributeComponent: attribute_name: str @@ -158,7 +164,8 @@ def write_cpp_classes( extensions=[UnindentBlocks], keep_trailing_newline=True, trim_blocks=True, - lstrip_blocks=True + lstrip_blocks=True, + undefined=StrictUndefined ) header_template: Template = env.get_template("class_template.hpp") code_template: Template = env.get_template("class_template.cpp") @@ -333,9 +340,6 @@ def generate_cpp_variable_data( class_name=component_class_name, xml_fields=component_xml_fields, default_xml_field=component_default_xml_field, - protobuf_field=component.protobuf_field, - protobuf_cpp_type=get_proto_field_cpp_type(doc_type, fieldval.protobuf_field + "." + component.protobuf_field), - is_proto_field_scalar=is_proto_field_scalar(doc_type, fieldval.protobuf_field + "." + component.protobuf_field), attribute_flag_name=attribute_name + "_is_set", write_to_xml=write_to_xml, is_component=True, @@ -344,10 +348,17 @@ def generate_cpp_variable_data( serialize_xml_side_effects=[], deserialize_xml_function="xml_attribute_to_" + component_class_name, deserialize_xml_side_effects=[], - serialize_proto_function="to_proto_" + component_class_name, - serialize_proto_side_effects=[], - deserialize_proto_function="from_proto_" + component_class_name, - deserialize_proto_side_effects=[], + + proto_info=AttributeVariableProtoInfo( + protobuf_field=component.protobuf_field, + protobuf_cpp_type=get_proto_field_cpp_type(doc_type, fieldval.protobuf_field + "." + component.protobuf_field), + is_proto_field_scalar=is_proto_field_scalar(doc_type, fieldval.protobuf_field + "." + component.protobuf_field), + serialize_proto_function="to_proto_" + component_class_name, + serialize_proto_side_effects=[], + deserialize_proto_function="from_proto_" + component_class_name, + deserialize_proto_side_effects=[], + ), + ) attribute_variables.append(component_attribute_variable) # If there aren't any components to bundle, we don't want to render the attribute @@ -409,11 +420,6 @@ def generate_cpp_variable_data( class_name=class_name, xml_fields=xml_fields, default_xml_field=default_xml_field, - protobuf_field=protobuf_field, - protobuf_cpp_type=get_proto_field_cpp_type(doc_type, fieldval.protobuf_field), - is_proto_field_scalar=is_proto_field_scalar(doc_type, fieldval.protobuf_field), - proto_drilldown_calls=proto_drilldown_calls, - mutable_proto_drilldown_calls=mutable_proto_drilldown_calls, write_to_xml=write_to_xml, attribute_flag_name=attribute_name + "_is_set", @@ -423,12 +429,21 @@ def generate_cpp_variable_data( serialize_xml_side_effects=convert_side_effects_to_variable_names(serialize_xml_function.side_effects), deserialize_xml_function=deserialize_xml_function.function, deserialize_xml_side_effects=convert_side_effects_to_variable_names(deserialize_xml_function.side_effects), - serialize_proto_function=serialize_proto_function.function, - serialize_proto_side_effects=convert_side_effects_to_variable_names(serialize_proto_function.side_effects), - deserialize_proto_function=deserialize_proto_function.function, - deserialize_proto_side_effects=convert_side_effects_to_variable_names(deserialize_proto_function.side_effects), - uses_file_path=fieldval.uses_file_path if fieldval.variable_type == "Custom" else False + uses_file_path=fieldval.uses_file_path if fieldval.variable_type == "Custom" else False, + + proto_info=AttributeVariableProtoInfo( + protobuf_field=protobuf_field, + protobuf_cpp_type=get_proto_field_cpp_type(doc_type, fieldval.protobuf_field), + is_proto_field_scalar=is_proto_field_scalar(doc_type, fieldval.protobuf_field), + proto_drilldown_calls=proto_drilldown_calls, + mutable_proto_drilldown_calls=mutable_proto_drilldown_calls, # Is this used? + serialize_proto_function=serialize_proto_function.function, + serialize_proto_side_effects=convert_side_effects_to_variable_names(serialize_proto_function.side_effects), + deserialize_proto_function=deserialize_proto_function.function, + deserialize_proto_side_effects=convert_side_effects_to_variable_names(deserialize_proto_function.side_effects), + ) + ) attribute_variables.append(attribute_variable) @@ -451,7 +466,8 @@ def write_attribute(output_directory: str, data: Dict[str, Document]) -> List[st extensions=[UnindentBlocks], keep_trailing_newline=True, trim_blocks=True, - lstrip_blocks=True + lstrip_blocks=True, + undefined=StrictUndefined ) attribute_names: Dict[str, str] = {} template: Dict[str, Template] = { From 3c5496842e614042c39f3b8f1b5fba4f3f8dae70 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sun, 26 May 2024 21:11:40 -0500 Subject: [PATCH 476/539] . --- xml_converter/generators/generate_cpp.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/xml_converter/generators/generate_cpp.py b/xml_converter/generators/generate_cpp.py index 2a7b7c47..e8a798a8 100644 --- a/xml_converter/generators/generate_cpp.py +++ b/xml_converter/generators/generate_cpp.py @@ -44,6 +44,7 @@ class DocumentationTypeData(TypedDict): } } + @dataclass class AttributeVariableProtoInfo: # The function name and additional side effect pointers for proto serialization. @@ -72,7 +73,6 @@ class AttributeVariableProtoInfo: mutable_proto_drilldown_calls: str = "" - @dataclass class AttributeVariable: attribute_name: str @@ -101,7 +101,6 @@ class AttributeVariable: is_component: bool = False - @dataclass class AttributeComponent: attribute_name: str @@ -437,7 +436,7 @@ def generate_cpp_variable_data( protobuf_cpp_type=get_proto_field_cpp_type(doc_type, fieldval.protobuf_field), is_proto_field_scalar=is_proto_field_scalar(doc_type, fieldval.protobuf_field), proto_drilldown_calls=proto_drilldown_calls, - mutable_proto_drilldown_calls=mutable_proto_drilldown_calls, # Is this used? + mutable_proto_drilldown_calls=mutable_proto_drilldown_calls, serialize_proto_function=serialize_proto_function.function, serialize_proto_side_effects=convert_side_effects_to_variable_names(serialize_proto_function.side_effects), deserialize_proto_function=deserialize_proto_function.function, From 4e0daa1f1397ec47cbbd4b998bed5e2f3b14d747 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sun, 26 May 2024 21:19:57 -0500 Subject: [PATCH 477/539] breaking out xml info like proto info for consistency --- .../cpp_templates/class_template.cpp | 8 +-- xml_converter/generators/generate_cpp.py | 58 +++++++++++-------- 2 files changed, 37 insertions(+), 29 deletions(-) diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index bf2b5d1e..3204c490 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -50,9 +50,9 @@ bool {{cpp_class}}::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vec string attributename; attributename = normalize(get_attribute_name(attribute)); {% for n, attribute_variable in enumerate(attribute_variables) %} - {% for i, value in enumerate(attribute_variable.xml_fields) %} + {% for i, value in enumerate(attribute_variable.xml_info.xml_fields) %} {{ "if" if i == n == 0 else "else if" }} (attributename == "{{value}}") { - {{attribute_variable.deserialize_xml_function}}(attribute, errors, state, &(this->{{attribute_variable.attribute_name}}), &(this->{{attribute_variable.attribute_flag_name}}){% for side_effect in attribute_variable.deserialize_xml_side_effects %}, &(this->{{side_effect}}){% endfor %}); + {{attribute_variable.xml_info.deserialize_xml_function}}(attribute, errors, state, &(this->{{attribute_variable.attribute_name}}), &(this->{{attribute_variable.attribute_flag_name}}){% for side_effect in attribute_variable.xml_info.deserialize_xml_side_effects %}, &(this->{{side_effect}}){% endfor %}); } {% endfor %} {% endfor %} @@ -75,9 +75,9 @@ vector {{cpp_class}}::as_xml(XMLWriterState* state) const { vector xml_node_contents; xml_node_contents.push_back("<{{xml_class_name}} "); {% for attribute_variable in attribute_variables %} - {% if attribute_variable.write_to_xml == true %} + {% if attribute_variable.xml_info.write_to_xml == true %} if (this->{{attribute_variable.attribute_flag_name}}) { - xml_node_contents.push_back({{attribute_variable.serialize_xml_function}}("{{attribute_variable.default_xml_field}}", state, &this->{{attribute_variable.attribute_name}}{% for side_effect in attribute_variable.serialize_xml_side_effects %}, &(this->{{side_effect}}){% endfor %})); + xml_node_contents.push_back({{attribute_variable.xml_info.serialize_xml_function}}("{{attribute_variable.xml_info.default_xml_field}}", state, &this->{{attribute_variable.attribute_name}}{% for side_effect in attribute_variable.xml_info.serialize_xml_side_effects %}, &(this->{{side_effect}}){% endfor %})); } {% endif %} {% endfor %} diff --git a/xml_converter/generators/generate_cpp.py b/xml_converter/generators/generate_cpp.py index e8a798a8..8113514a 100644 --- a/xml_converter/generators/generate_cpp.py +++ b/xml_converter/generators/generate_cpp.py @@ -74,11 +74,7 @@ class AttributeVariableProtoInfo: @dataclass -class AttributeVariable: - attribute_name: str - attribute_type: str - cpp_type: str - class_name: str +class AttributeVariableXMLInfo: xml_fields: List[str] # The function name and additional side effect pointers for xml serialization. @@ -89,13 +85,23 @@ class AttributeVariable: deserialize_xml_function: str deserialize_xml_side_effects: List[str] + default_xml_field: str = "" + xml_bundled_components: List[str] = field(default_factory=list) + write_to_xml: bool = True + + +@dataclass +class AttributeVariable: + attribute_name: str + attribute_type: str + cpp_type: str + class_name: str + proto_info: AttributeVariableProtoInfo + xml_info: AttributeVariableXMLInfo - default_xml_field: str = "" side_effects: List[str] = field(default_factory=list) - xml_bundled_components: List[str] = field(default_factory=list) attribute_flag_name: Optional[str] = "" - write_to_xml: bool = True uses_file_path: bool = False is_component: bool = False @@ -337,17 +343,9 @@ def generate_cpp_variable_data( attribute_type="CompoundValue", cpp_type=documentation_type_data[component.subcomponent_type.value]["cpp_type"], class_name=component_class_name, - xml_fields=component_xml_fields, - default_xml_field=component_default_xml_field, attribute_flag_name=attribute_name + "_is_set", - write_to_xml=write_to_xml, is_component=True, - serialize_xml_function=component_class_name + "_to_xml_attribute", - serialize_xml_side_effects=[], - deserialize_xml_function="xml_attribute_to_" + component_class_name, - deserialize_xml_side_effects=[], - proto_info=AttributeVariableProtoInfo( protobuf_field=component.protobuf_field, protobuf_cpp_type=get_proto_field_cpp_type(doc_type, fieldval.protobuf_field + "." + component.protobuf_field), @@ -358,6 +356,15 @@ def generate_cpp_variable_data( deserialize_proto_side_effects=[], ), + xml_info=AttributeVariableXMLInfo( + xml_fields=component_xml_fields, + default_xml_field=component_default_xml_field, + write_to_xml=write_to_xml, + serialize_xml_function=component_class_name + "_to_xml_attribute", + serialize_xml_side_effects=[], + deserialize_xml_function="xml_attribute_to_" + component_class_name, + deserialize_xml_side_effects=[], + ) ) attribute_variables.append(component_attribute_variable) # If there aren't any components to bundle, we don't want to render the attribute @@ -417,18 +424,10 @@ def generate_cpp_variable_data( attribute_type=fieldval.variable_type, cpp_type=cpp_type, class_name=class_name, - xml_fields=xml_fields, - default_xml_field=default_xml_field, - write_to_xml=write_to_xml, attribute_flag_name=attribute_name + "_is_set", side_effects=side_effects, - serialize_xml_function=serialize_xml_function.function, - serialize_xml_side_effects=convert_side_effects_to_variable_names(serialize_xml_function.side_effects), - deserialize_xml_function=deserialize_xml_function.function, - deserialize_xml_side_effects=convert_side_effects_to_variable_names(deserialize_xml_function.side_effects), - uses_file_path=fieldval.uses_file_path if fieldval.variable_type == "Custom" else False, proto_info=AttributeVariableProtoInfo( @@ -441,8 +440,17 @@ def generate_cpp_variable_data( serialize_proto_side_effects=convert_side_effects_to_variable_names(serialize_proto_function.side_effects), deserialize_proto_function=deserialize_proto_function.function, deserialize_proto_side_effects=convert_side_effects_to_variable_names(deserialize_proto_function.side_effects), - ) + ), + xml_info=AttributeVariableXMLInfo( + xml_fields=xml_fields, + default_xml_field=default_xml_field, + write_to_xml=write_to_xml, + serialize_xml_function=serialize_xml_function.function, + serialize_xml_side_effects=convert_side_effects_to_variable_names(serialize_xml_function.side_effects), + deserialize_xml_function=deserialize_xml_function.function, + deserialize_xml_side_effects=convert_side_effects_to_variable_names(deserialize_xml_function.side_effects), + ), ) attribute_variables.append(attribute_variable) From eb0e8a07f33f8e42b4d7176bad401e0f4573b190 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sun, 26 May 2024 21:44:16 -0500 Subject: [PATCH 478/539] Cleaning up all the unused AttributeVariable template fields --- xml_converter/generators/generate_cpp.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/xml_converter/generators/generate_cpp.py b/xml_converter/generators/generate_cpp.py index 8113514a..11e64da3 100644 --- a/xml_converter/generators/generate_cpp.py +++ b/xml_converter/generators/generate_cpp.py @@ -86,24 +86,20 @@ class AttributeVariableXMLInfo: deserialize_xml_side_effects: List[str] default_xml_field: str = "" - xml_bundled_components: List[str] = field(default_factory=list) write_to_xml: bool = True @dataclass class AttributeVariable: attribute_name: str - attribute_type: str cpp_type: str class_name: str proto_info: AttributeVariableProtoInfo xml_info: AttributeVariableXMLInfo - side_effects: List[str] = field(default_factory=list) attribute_flag_name: Optional[str] = "" - uses_file_path: bool = False is_component: bool = False @@ -286,7 +282,6 @@ def generate_cpp_variable_data( if doc_type in fieldval.applies_to_as_str(): xml_fields: List[str] = [] - side_effects: List[str] = [] write_to_xml: bool = True default_xml_field: str = "" @@ -340,7 +335,6 @@ def generate_cpp_variable_data( write_to_xml = False component_attribute_variable = AttributeVariable( attribute_name=attribute_name + "." + component_name, - attribute_type="CompoundValue", cpp_type=documentation_type_data[component.subcomponent_type.value]["cpp_type"], class_name=component_class_name, attribute_flag_name=attribute_name + "_is_set", @@ -421,14 +415,10 @@ def generate_cpp_variable_data( attribute_variable = AttributeVariable( attribute_name=attribute_name, - attribute_type=fieldval.variable_type, cpp_type=cpp_type, class_name=class_name, attribute_flag_name=attribute_name + "_is_set", - side_effects=side_effects, - - uses_file_path=fieldval.uses_file_path if fieldval.variable_type == "Custom" else False, proto_info=AttributeVariableProtoInfo( protobuf_field=protobuf_field, From 5976f189fcfe825e885fb9d83473d37e03263455 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sun, 26 May 2024 22:08:28 -0500 Subject: [PATCH 479/539] Removing the requirement for protofields on each attribute --- xml_converter/doc/category/category.md | 9 +---- xml_converter/doc/menu/name.md | 9 +---- .../cpp_templates/class_template.cpp | 4 +- xml_converter/generators/generate_cpp.py | 40 ++++++++++++------- xml_converter/generators/main.py | 28 +++++++++---- xml_converter/generators/metadata.py | 2 +- xml_converter/proto/waypoint.proto | 6 --- xml_converter/src/attribute/string.hpp | 2 - xml_converter/src/category_gen.cpp | 7 ---- xml_converter/src/icon_gen.cpp | 7 ---- xml_converter/src/trail_gen.cpp | 7 ---- 11 files changed, 50 insertions(+), 71 deletions(-) diff --git a/xml_converter/doc/category/category.md b/xml_converter/doc/category/category.md index 438044d7..0790e495 100644 --- a/xml_converter/doc/category/category.md +++ b/xml_converter/doc/category/category.md @@ -4,18 +4,11 @@ type: Custom class: MarkerCategory applies_to: [Icon, Trail] xml_fields: [Type, Category] -protobuf_field: category +protobuf_field: null examples: - "mycategory" - "mycategory.subcategory" - "mycategory.subcategory.subsubcategory" -custom_functions: - read.proto: - function: do_nothing - side_effects: [] - write.proto: - function: do_nothing - side_effects: [] --- The category this object belongs to. diff --git a/xml_converter/doc/menu/name.md b/xml_converter/doc/menu/name.md index e62e87b3..84de7591 100644 --- a/xml_converter/doc/menu/name.md +++ b/xml_converter/doc/menu/name.md @@ -3,17 +3,10 @@ name: Name type: String applies_to: [Category] xml_fields: [Name] -protobuf_field: name +protobuf_field: null examples: - "mycategory" - "tribulationmode203" -custom_functions: - read.proto: - function: do_nothing - side_effects: [] - write.proto: - function: do_nothing - side_effects: [] --- Notes diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index 3204c490..cba55e91 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -103,7 +103,7 @@ vector {{cpp_class}}::as_xml(XMLWriterState* state) const { waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf(ProtoWriterState* state) const { waypoint::{{cpp_class}} proto_{{cpp_class_header}}; {% for attribute_variable in attribute_variables %} - {% if attribute_variable.is_component == false %} + {% if attribute_variable.is_component == false and attribute_variable.proto_info != None %} if (this->{{attribute_variable.attribute_flag_name}}) { {% if not attribute_variable.proto_info.is_proto_field_scalar %} std::function setter = [&proto_{{cpp_class_header}}]({{attribute_variable.proto_info.protobuf_cpp_type}}* val) { proto_{{cpp_class_header}}.{{attribute_variable.proto_info.mutable_proto_drilldown_calls}}set_allocated_{{attribute_variable.proto_info.protobuf_field}}(val); }; @@ -119,7 +119,7 @@ waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf(ProtoWriterState* state) cons void {{cpp_class}}::parse_protobuf(waypoint::{{cpp_class}} proto_{{cpp_class_header}}, ProtoReaderState* state) { {% for attribute_variable in attribute_variables %} - {% if attribute_variable.is_component == false %} + {% if attribute_variable.is_component == false and attribute_variable.proto_info != None %} {% if not attribute_variable.proto_info.is_proto_field_scalar %} if (proto_{{cpp_class_header}}{{attribute_variable.proto_info.proto_drilldown_calls}}.has_{{attribute_variable.proto_info.protobuf_field}}()) { {% elif attribute_variable.proto_info.protobuf_cpp_type == "std::string" %} diff --git a/xml_converter/generators/generate_cpp.py b/xml_converter/generators/generate_cpp.py index 11e64da3..13932a84 100644 --- a/xml_converter/generators/generate_cpp.py +++ b/xml_converter/generators/generate_cpp.py @@ -95,7 +95,7 @@ class AttributeVariable: cpp_type: str class_name: str - proto_info: AttributeVariableProtoInfo + proto_info: Optional[AttributeVariableProtoInfo] xml_info: AttributeVariableXMLInfo attribute_flag_name: Optional[str] = "" @@ -312,11 +312,6 @@ def generate_cpp_variable_data( xml_fields.append(lowercase(x, delimiter="")) default_xml_field = fieldval.xml_fields[0] - proto_drilldown_calls: str - mutable_proto_drilldown_calls: str - protobuf_field: str - proto_drilldown_calls, mutable_proto_drilldown_calls, protobuf_field = split_field_into_drilldown(fieldval.protobuf_field) - # Compound Values are unique in that the components have xml fields in addition to the compound variable # if fieldval.variable_type in ("CompoundValue", "CompoundCustomClass"): if fieldval.variable_type == "CompoundValue" or fieldval.variable_type == "CompoundCustomClass": @@ -348,7 +343,7 @@ def generate_cpp_variable_data( serialize_proto_side_effects=[], deserialize_proto_function="from_proto_" + component_class_name, deserialize_proto_side_effects=[], - ), + ) if fieldval.protobuf_field is not None else None, xml_info=AttributeVariableXMLInfo( xml_fields=component_xml_fields, @@ -413,14 +408,14 @@ def generate_cpp_variable_data( elif fieldval.custom_functions.read_proto is not None: deserialize_proto_function = fieldval.custom_functions.read_proto - attribute_variable = AttributeVariable( - attribute_name=attribute_name, - cpp_type=cpp_type, - class_name=class_name, - - attribute_flag_name=attribute_name + "_is_set", + proto_info: Optional[AttributeVariableProtoInfo] = None + if fieldval.protobuf_field is not None: + proto_drilldown_calls: str + mutable_proto_drilldown_calls: str + protobuf_field: str + proto_drilldown_calls, mutable_proto_drilldown_calls, protobuf_field = split_field_into_drilldown(fieldval.protobuf_field) - proto_info=AttributeVariableProtoInfo( + proto_info = AttributeVariableProtoInfo( protobuf_field=protobuf_field, protobuf_cpp_type=get_proto_field_cpp_type(doc_type, fieldval.protobuf_field), is_proto_field_scalar=is_proto_field_scalar(doc_type, fieldval.protobuf_field), @@ -430,7 +425,16 @@ def generate_cpp_variable_data( serialize_proto_side_effects=convert_side_effects_to_variable_names(serialize_proto_function.side_effects), deserialize_proto_function=deserialize_proto_function.function, deserialize_proto_side_effects=convert_side_effects_to_variable_names(deserialize_proto_function.side_effects), - ), + ) + + attribute_variable = AttributeVariable( + attribute_name=attribute_name, + cpp_type=cpp_type, + class_name=class_name, + + attribute_flag_name=attribute_name + "_is_set", + + proto_info=proto_info, xml_info=AttributeVariableXMLInfo( xml_fields=xml_fields, @@ -483,6 +487,12 @@ def write_attribute(output_directory: str, data: Dict[str, Document]) -> List[st attribute_data: MetadataType = data[filepath].metadata attribute_name = attribute_name_from_markdown_data(attribute_data.name) + # Early exit if this attribute is not an attribute to generate code for + if attribute_data.variable_type not in template: + continue + if attribute_data.protobuf_field is None: + raise ValueError("We dont yet support null protobuf fields for generated attribute classes {}".format(attribute_data)) + proto_field_type: str = "" proto_field_prototype: Optional[str] = None for marker_type in attribute_data.applies_to_as_str(): diff --git a/xml_converter/generators/main.py b/xml_converter/generators/main.py index 187b2440..a3448a66 100644 --- a/xml_converter/generators/main.py +++ b/xml_converter/generators/main.py @@ -239,18 +239,27 @@ def generate_auto_docs(self, metadata: Dict[str, MetadataType], content: Dict[st ) ) - proto_field_type: str = "" - for marker_type in fieldval.applies_to_as_str(): - proto_field_type = get_proto_field_type(marker_type, fieldval.protobuf_field) - # TODO: catch discrepencies if the proto field types across - # different messages have differing types. This will be caught - # in the cpp code regardless. + proto_field_type: str + proto_field_name: str + if fieldval.protobuf_field is not None: + proto_field_name = fieldval.protobuf_field + proto_field_type = "" + for marker_type in fieldval.applies_to_as_str(): + proto_field_type = get_proto_field_type(marker_type, fieldval.protobuf_field) + # TODO: catch discrepencies if the proto field types across + # different messages have differing types. This will be caught + # in the cpp code regardless. + if proto_field_type == "": + print("Could not find proto field type from proto schema") + else: + proto_field_name = "" + proto_field_type = "None" field_rows.append(FieldRow( name=fieldval.name, xml_attribute=fieldval.xml_fields[0], alternate_xml_attributes=fieldval.xml_fields[1:], - binary_field=fieldval.protobuf_field, + binary_field=proto_field_name, binary_field_type=proto_field_type, data_type=fieldval.variable_type, usable_on_html="
".join(fieldval.applies_to_as_str()), @@ -265,7 +274,10 @@ def generate_auto_docs(self, metadata: Dict[str, MetadataType], content: Dict[st if fieldval.variable_type == "CompoundValue" or fieldval.variable_type == "CompoundCustomClass": for component_field in fieldval.components: - binary_field_name = fieldval.protobuf_field + "." + component_field.protobuf_field + if fieldval.protobuf_field is not None: + binary_field_name = fieldval.protobuf_field + "." + component_field.protobuf_field + else: + binary_field_name = "" component_field_type: str = "" for marker_type in fieldval.applies_to_as_str(): diff --git a/xml_converter/generators/metadata.py b/xml_converter/generators/metadata.py index 47da3be6..26de1152 100644 --- a/xml_converter/generators/metadata.py +++ b/xml_converter/generators/metadata.py @@ -51,7 +51,7 @@ class BaseMetadata: name: str # TODO Match this to the regex ATTRIBUTE_NAME_REGEX applies_to: List[NodeType] xml_fields: List[str] # TODO: Matche these to XML_ATTRIBUTE_REGEX - protobuf_field: str # TODO: Match this to PROTO_FIELD_REGEX + protobuf_field: Optional[str] # TODO: Match this to PROTO_FIELD_REGEX def applies_to_as_str(self) -> List[str]: return [x.value for x in self.applies_to] diff --git a/xml_converter/proto/waypoint.proto b/xml_converter/proto/waypoint.proto index 95a29c1f..cbd52424 100644 --- a/xml_converter/proto/waypoint.proto +++ b/xml_converter/proto/waypoint.proto @@ -62,9 +62,6 @@ message Icon { bool tentative__render_on_minimap = 2051; string bhdraft__schedule = 2052; float bhdraft__schedule_duration = 2053; - - // TODO: Delete this when we can parse data per marker instead of per field - bool category = 2054; } message Trail { @@ -97,9 +94,6 @@ message Trail { bool tentative__render_on_minimap = 2051; string bhdraft__schedule = 2052; float bhdraft__schedule_duration = 2053; - - // TODO: Delete this when we can parse data per marker instead of per field - bool category = 2054; } message RGBAColor { diff --git a/xml_converter/src/attribute/string.hpp b/xml_converter/src/attribute/string.hpp index db71a35d..a6cdb6a1 100644 --- a/xml_converter/src/attribute/string.hpp +++ b/xml_converter/src/attribute/string.hpp @@ -52,5 +52,3 @@ void display_name_and_name_to_proto_display_name( std::function setter, const std::string* name, const bool* is_name_set); - -#define do_nothing(...) diff --git a/xml_converter/src/category_gen.cpp b/xml_converter/src/category_gen.cpp index 251be4d3..91d69ce7 100644 --- a/xml_converter/src/category_gen.cpp +++ b/xml_converter/src/category_gen.cpp @@ -129,10 +129,6 @@ waypoint::Category Category::as_protobuf(ProtoWriterState* state) const { std::function setter = [&proto_category](std::string val) { proto_category.set_id(val); }; unique_id_to_proto(this->menu_id, state, setter); } - if (this->name_is_set) { - std::function setter = [&proto_category](std::string val) { proto_category.set_name(val); }; - do_nothing(this->name, state, setter); - } if (this->tooltip_description_is_set) { std::function setter = [&proto_category](std::string val) { proto_category.set_tip_description(val); }; string_to_proto(this->tooltip_description, state, setter); @@ -153,9 +149,6 @@ void Category::parse_protobuf(waypoint::Category proto_category, ProtoReaderStat if (proto_category.id() != "") { proto_to_unique_id(proto_category.id(), state, &(this->menu_id), &(this->menu_id_is_set)); } - if (proto_category.name() != "") { - do_nothing(proto_category.name(), state, &(this->name), &(this->name_is_set)); - } if (proto_category.tip_description() != "") { proto_to_string(proto_category.tip_description(), state, &(this->tooltip_description), &(this->tooltip_description_is_set)); } diff --git a/xml_converter/src/icon_gen.cpp b/xml_converter/src/icon_gen.cpp index f9573791..400bbb5f 100644 --- a/xml_converter/src/icon_gen.cpp +++ b/xml_converter/src/icon_gen.cpp @@ -435,10 +435,6 @@ waypoint::Icon Icon::as_protobuf(ProtoWriterState* state) const { std::function setter = [&proto_icon](float val) { proto_icon.mutable_trigger()->set_bounce_height(val); }; float_to_proto(this->bounce_height, state, setter); } - if (this->category_is_set) { - std::function setter = [&proto_icon](bool val) { proto_icon.set_category(val); }; - do_nothing(this->category, state, setter); - } if (this->color_is_set) { std::function setter = [&proto_icon](waypoint::RGBAColor* val) { proto_icon.set_allocated_rgba_color(val); }; color_to_proto(this->color, state, setter); @@ -621,9 +617,6 @@ void Icon::parse_protobuf(waypoint::Icon proto_icon, ProtoReaderState* state) { if (proto_icon.trigger().bounce_height() != 0) { proto_to_float(proto_icon.trigger().bounce_height(), state, &(this->bounce_height), &(this->bounce_height_is_set)); } - if (proto_icon.category() != 0) { - do_nothing(proto_icon.category(), state, &(this->category), &(this->category_is_set)); - } if (proto_icon.has_rgba_color()) { proto_to_color(proto_icon.rgba_color(), state, &(this->color), &(this->color_is_set)); } diff --git a/xml_converter/src/trail_gen.cpp b/xml_converter/src/trail_gen.cpp index d3d269da..50c6cd71 100644 --- a/xml_converter/src/trail_gen.cpp +++ b/xml_converter/src/trail_gen.cpp @@ -261,10 +261,6 @@ waypoint::Trail Trail::as_protobuf(ProtoWriterState* state) const { std::function setter = [&proto_trail](float val) { proto_trail.set_animation_speed(val); }; float_to_proto(this->animation_speed, state, setter); } - if (this->category_is_set) { - std::function setter = [&proto_trail](bool val) { proto_trail.set_category(val); }; - do_nothing(this->category, state, setter); - } if (this->color_is_set) { std::function setter = [&proto_trail](waypoint::RGBAColor* val) { proto_trail.set_allocated_rgba_color(val); }; color_to_proto(this->color, state, setter); @@ -370,9 +366,6 @@ void Trail::parse_protobuf(waypoint::Trail proto_trail, ProtoReaderState* state) if (proto_trail.animation_speed() != 0) { proto_to_float(proto_trail.animation_speed(), state, &(this->animation_speed), &(this->animation_speed_is_set)); } - if (proto_trail.category() != 0) { - do_nothing(proto_trail.category(), state, &(this->category), &(this->category_is_set)); - } if (proto_trail.has_rgba_color()) { proto_to_color(proto_trail.rgba_color(), state, &(this->color), &(this->color_is_set)); } From 79300646cb8e81b561cdf769189f22532cbfa1fb Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Mon, 27 May 2024 11:06:54 -0500 Subject: [PATCH 480/539] Simplifying rgbcolor to a single fixed32 field --- xml_converter/doc/texture/color.md | 8 ++++---- .../attribute_template_compoundvalue.cpp | 8 ++++++-- xml_converter/generators/generate_cpp.py | 14 ++++++++++---- xml_converter/generators/main.py | 4 +++- xml_converter/generators/metadata.py | 2 +- xml_converter/generators/protobuf_types.py | 2 +- xml_converter/proto/waypoint.proto | 9 ++------- xml_converter/src/attribute/color.cpp | 17 +++++++---------- xml_converter/src/attribute/color.hpp | 4 ++-- xml_converter/src/icon_gen.cpp | 4 ++-- xml_converter/src/trail_gen.cpp | 4 ++-- 11 files changed, 40 insertions(+), 36 deletions(-) diff --git a/xml_converter/doc/texture/color.md b/xml_converter/doc/texture/color.md index 310175b6..2be02b3c 100644 --- a/xml_converter/doc/texture/color.md +++ b/xml_converter/doc/texture/color.md @@ -18,25 +18,25 @@ components: - name: Red type: Float32 xml_fields: [Red] - protobuf_field: rgba_color + protobuf_field: null examples: ["0", "0.25", "0.5", "0.75", "1.0"] - name: Green type: Float32 xml_fields: [Green] - protobuf_field: rgba_color + protobuf_field: null examples: ["0", "0.25", "0.5", "0.75", "1.0"] - name: Blue type: Float32 xml_fields: [Blue] - protobuf_field: rgba_color + protobuf_field: null examples: ["0", "0.25", "0.5", "0.75", "1.0"] - name: Alpha type: Float32 xml_fields: [Alpha] - protobuf_field: rgba_color + protobuf_field: null examples: ["0", "0.25", "0.5", "0.75", "1.0"] diff --git a/xml_converter/generators/cpp_templates/attribute_template_compoundvalue.cpp b/xml_converter/generators/cpp_templates/attribute_template_compoundvalue.cpp index 214a7a8c..b7d868ca 100644 --- a/xml_converter/generators/cpp_templates/attribute_template_compoundvalue.cpp +++ b/xml_converter/generators/cpp_templates/attribute_template_compoundvalue.cpp @@ -59,7 +59,9 @@ void proto_to_{{attribute_name}}( bool* is_set) { {{class_name}} {{attribute_name}}; {% for attribute_component in attribute_components %} - {{attribute_name}}.{{attribute_component.attribute_name}} = input.{{attribute_component.protobuf_field}}(); + {% if attribute_component.protobuf_field != None %} + {{attribute_name}}.{{attribute_component.attribute_name}} = input.{{attribute_component.protobuf_field}}(); + {% endif %} {% endfor %} *value = {{attribute_name}}; *is_set = true; @@ -71,7 +73,9 @@ void {{attribute_name}}_to_proto( std::function setter) { {{proto_field_cpp_type}}* proto_{{attribute_name}} = new {{proto_field_cpp_type}}(); {% for attribute_component in attribute_components %} - proto_{{attribute_name}}->set_{{attribute_component.protobuf_field}}(value.{{attribute_component.attribute_name}}); + {% if attribute_component.protobuf_field != None %} + proto_{{attribute_name}}->set_{{attribute_component.protobuf_field}}(value.{{attribute_component.attribute_name}}); + {% endif %} {% endfor %} setter(proto_{{attribute_name}}); } diff --git a/xml_converter/generators/generate_cpp.py b/xml_converter/generators/generate_cpp.py index 13932a84..21d01e00 100644 --- a/xml_converter/generators/generate_cpp.py +++ b/xml_converter/generators/generate_cpp.py @@ -107,7 +107,7 @@ class AttributeVariable: class AttributeComponent: attribute_name: str cpp_type: str - protobuf_field: str + protobuf_field: Optional[str] xml_fields: List[str] @@ -337,13 +337,13 @@ def generate_cpp_variable_data( proto_info=AttributeVariableProtoInfo( protobuf_field=component.protobuf_field, - protobuf_cpp_type=get_proto_field_cpp_type(doc_type, fieldval.protobuf_field + "." + component.protobuf_field), - is_proto_field_scalar=is_proto_field_scalar(doc_type, fieldval.protobuf_field + "." + component.protobuf_field), + protobuf_cpp_type=get_proto_field_cpp_type(doc_type, combine_fields(fieldval.protobuf_field, component.protobuf_field)), + is_proto_field_scalar=is_proto_field_scalar(doc_type, combine_fields(fieldval.protobuf_field, component.protobuf_field)), serialize_proto_function="to_proto_" + component_class_name, serialize_proto_side_effects=[], deserialize_proto_function="from_proto_" + component_class_name, deserialize_proto_side_effects=[], - ) if fieldval.protobuf_field is not None else None, + ) if fieldval.protobuf_field is not None and component.protobuf_field is not None else None, xml_info=AttributeVariableXMLInfo( xml_fields=component_xml_fields, @@ -591,6 +591,12 @@ def write_attribute(output_directory: str, data: Dict[str, Document]) -> List[st return files_written +def combine_fields(base_field: str, sub_field: Optional[str]) -> str: + if sub_field is None: + return base_field + return base_field + "." + sub_field + + ################################################################################ # write_if_different # diff --git a/xml_converter/generators/main.py b/xml_converter/generators/main.py index a3448a66..4ff3435d 100644 --- a/xml_converter/generators/main.py +++ b/xml_converter/generators/main.py @@ -274,8 +274,10 @@ def generate_auto_docs(self, metadata: Dict[str, MetadataType], content: Dict[st if fieldval.variable_type == "CompoundValue" or fieldval.variable_type == "CompoundCustomClass": for component_field in fieldval.components: - if fieldval.protobuf_field is not None: + if fieldval.protobuf_field is not None and component_field.protobuf_field is not None: binary_field_name = fieldval.protobuf_field + "." + component_field.protobuf_field + elif fieldval.protobuf_field is not None: + binary_field_name = fieldval.protobuf_field else: binary_field_name = "" diff --git a/xml_converter/generators/metadata.py b/xml_converter/generators/metadata.py index 26de1152..c2910a26 100644 --- a/xml_converter/generators/metadata.py +++ b/xml_converter/generators/metadata.py @@ -164,7 +164,7 @@ class CompoundSubComponent: name: str subcomponent_type: SubcomponentType = field(metadata={"json": "type"}) xml_fields: List[str] - protobuf_field: str + protobuf_field: Optional[str] examples: List[str] = field(default_factory=list) diff --git a/xml_converter/generators/protobuf_types.py b/xml_converter/generators/protobuf_types.py index 3f4abd0b..a855dffa 100644 --- a/xml_converter/generators/protobuf_types.py +++ b/xml_converter/generators/protobuf_types.py @@ -158,7 +158,7 @@ def get_proto_field_type(message: str, field: str) -> str: "uint64": "unsigned long", "sint32": "int", "sint64": "long", - "fixed32": "int", + "fixed32": "uint32_t", "fixed64": "long", "sfixed32": "int", "sfixed64": "long", diff --git a/xml_converter/proto/waypoint.proto b/xml_converter/proto/waypoint.proto index cbd52424..74d77133 100644 --- a/xml_converter/proto/waypoint.proto +++ b/xml_converter/proto/waypoint.proto @@ -47,7 +47,7 @@ message Icon { bool scale_on_map_with_zoom = 23; string tip_description = 24; string tip_name = 25; - RGBAColor rgba_color = 26; + fixed32 rgba_color = 26; FestivalFilter festival_filter = 27; MapTypeFilter map_type_filter = 28; MountFilter mount_filter = 29; @@ -75,11 +75,10 @@ message Trail { int32 achievement_id = 16; int32 achievement_bit_index = 17; - bool disable_player_cutout = 19; bool is_wall = 20; float scale = 21; - RGBAColor rgba_color = 22; + fixed32 rgba_color = 22; FestivalFilter festival_filter = 23; MapTypeFilter map_type_filter = 24; MountFilter mount_filter = 25; @@ -96,10 +95,6 @@ message Trail { float bhdraft__schedule_duration = 2053; } -message RGBAColor { - int32 rgba_color = 1; -} - message Position { float x = 1; float y = 2; diff --git a/xml_converter/src/attribute/color.cpp b/xml_converter/src/attribute/color.cpp index feb9c4ee..b4e6d358 100644 --- a/xml_converter/src/attribute/color.cpp +++ b/xml_converter/src/attribute/color.cpp @@ -123,18 +123,17 @@ string color_to_xml_attribute( // Parses a Color from a proto field. //////////////////////////////////////////////////////////////////////////////// void proto_to_color( - waypoint::RGBAColor input, + uint32_t input, ProtoReaderState*, Color* value, bool* is_set) { Color color; std::stringstream stream; - uint32_t rgba = input.rgba_color(); - color.red = convert_color_channel_int_to_float((rgba >> 24) & 0xff); - color.green = convert_color_channel_int_to_float((rgba >> 16) & 0xff); - color.blue = convert_color_channel_int_to_float((rgba >> 8) & 0xff); - color.alpha = convert_color_channel_int_to_float(rgba & 0xff); + color.red = convert_color_channel_int_to_float((input >> 24) & 0xff); + color.green = convert_color_channel_int_to_float((input >> 16) & 0xff); + color.blue = convert_color_channel_int_to_float((input >> 8) & 0xff); + color.alpha = convert_color_channel_int_to_float(input & 0xff); *value = color; *is_set = true; @@ -148,8 +147,7 @@ void proto_to_color( void color_to_proto( Color value, ProtoWriterState*, - std::function setter) { - waypoint::RGBAColor* color = new waypoint::RGBAColor(); + std::function setter) { // The default RGB in burrito will be 000000 (i.e. black) // Default value of alpha in Burrito is 1.0 (i.e. 255) int int_alpha = 255; @@ -164,6 +162,5 @@ void color_to_proto( uint32_t a = (int_alpha & 0xff); uint32_t rgba = r | g | b | a; - color->set_rgba_color(rgba); - setter(color); + setter(rgba); } diff --git a/xml_converter/src/attribute/color.hpp b/xml_converter/src/attribute/color.hpp index 9d797cb6..837ffbdd 100644 --- a/xml_converter/src/attribute/color.hpp +++ b/xml_converter/src/attribute/color.hpp @@ -37,7 +37,7 @@ std::string color_to_xml_attribute( const Color* value); void proto_to_color( - waypoint::RGBAColor input, + uint32_t input, ProtoReaderState* state, Color* value, bool* is_set); @@ -45,4 +45,4 @@ void proto_to_color( void color_to_proto( Color value, ProtoWriterState* state, - std::function setter); + std::function setter); diff --git a/xml_converter/src/icon_gen.cpp b/xml_converter/src/icon_gen.cpp index 400bbb5f..13df4abb 100644 --- a/xml_converter/src/icon_gen.cpp +++ b/xml_converter/src/icon_gen.cpp @@ -436,7 +436,7 @@ waypoint::Icon Icon::as_protobuf(ProtoWriterState* state) const { float_to_proto(this->bounce_height, state, setter); } if (this->color_is_set) { - std::function setter = [&proto_icon](waypoint::RGBAColor* val) { proto_icon.set_allocated_rgba_color(val); }; + std::function setter = [&proto_icon](uint32_t val) { proto_icon.set_rgba_color(val); }; color_to_proto(this->color, state, setter); } if (this->copy_clipboard_is_set) { @@ -617,7 +617,7 @@ void Icon::parse_protobuf(waypoint::Icon proto_icon, ProtoReaderState* state) { if (proto_icon.trigger().bounce_height() != 0) { proto_to_float(proto_icon.trigger().bounce_height(), state, &(this->bounce_height), &(this->bounce_height_is_set)); } - if (proto_icon.has_rgba_color()) { + if (proto_icon.rgba_color() != 0) { proto_to_color(proto_icon.rgba_color(), state, &(this->color), &(this->color_is_set)); } if (proto_icon.trigger().action_copy_clipboard() != "") { diff --git a/xml_converter/src/trail_gen.cpp b/xml_converter/src/trail_gen.cpp index 50c6cd71..a22ff256 100644 --- a/xml_converter/src/trail_gen.cpp +++ b/xml_converter/src/trail_gen.cpp @@ -262,7 +262,7 @@ waypoint::Trail Trail::as_protobuf(ProtoWriterState* state) const { float_to_proto(this->animation_speed, state, setter); } if (this->color_is_set) { - std::function setter = [&proto_trail](waypoint::RGBAColor* val) { proto_trail.set_allocated_rgba_color(val); }; + std::function setter = [&proto_trail](uint32_t val) { proto_trail.set_rgba_color(val); }; color_to_proto(this->color, state, setter); } if (this->cull_chirality_is_set) { @@ -366,7 +366,7 @@ void Trail::parse_protobuf(waypoint::Trail proto_trail, ProtoReaderState* state) if (proto_trail.animation_speed() != 0) { proto_to_float(proto_trail.animation_speed(), state, &(this->animation_speed), &(this->animation_speed_is_set)); } - if (proto_trail.has_rgba_color()) { + if (proto_trail.rgba_color() != 0) { proto_to_color(proto_trail.rgba_color(), state, &(this->color), &(this->color_is_set)); } if (proto_trail.cull_chirality() != 0) { From 97204bd3247f7d07a4acd7e9bcf5f9d2ade4c793 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Mon, 27 May 2024 11:21:22 -0500 Subject: [PATCH 481/539] making it easier to read what include values are going where --- xml_converter/generators/generate_cpp.py | 58 +++++++++++++++--------- 1 file changed, 37 insertions(+), 21 deletions(-) diff --git a/xml_converter/generators/generate_cpp.py b/xml_converter/generators/generate_cpp.py index 21d01e00..0f74007a 100644 --- a/xml_converter/generators/generate_cpp.py +++ b/xml_converter/generators/generate_cpp.py @@ -252,29 +252,45 @@ def generate_cpp_variable_data( attribute_variables: List[AttributeVariable] = [] cpp_includes: CPPInclude = CPPInclude() - cpp_includes.hpp_absolute_includes.add("string") - cpp_includes.hpp_absolute_includes.add("vector") - cpp_includes.hpp_absolute_includes.add("functional") - cpp_includes.hpp_relative_includes.add("rapidxml-1.13/rapidxml.hpp") - cpp_includes.hpp_relative_includes.add("parseable.hpp") - cpp_includes.hpp_relative_includes.add("waypoint.pb.h") - cpp_includes.hpp_relative_includes.add("state_structs/xml_reader_state.hpp") - cpp_includes.hpp_forward_declarations.add("XMLError") - - cpp_includes.cpp_absolute_includes.add("iosfwd") - cpp_includes.cpp_absolute_includes.add("string") - cpp_includes.cpp_relative_includes.add("rapidxml-1.13/rapidxml.hpp") - cpp_includes.cpp_relative_includes.add("string_helper.hpp") - cpp_includes.cpp_relative_includes.add("rapid_helpers.hpp") - cpp_includes.cpp_relative_includes.add("waypoint.pb.h") + cpp_includes.hpp_absolute_includes.update([ + "string", + "vector", + "functional", + ]) + cpp_includes.hpp_relative_includes.update([ + "rapidxml-1.13/rapidxml.hpp", + "parseable.hpp", + "waypoint.pb.h", + "state_structs/xml_reader_state.hpp", + ]) + cpp_includes.hpp_forward_declarations.update([ + "XMLError", + ]) + + cpp_includes.cpp_absolute_includes.update([ + "iosfwd", + "string", + ]) + cpp_includes.cpp_relative_includes.update([ + "rapidxml-1.13/rapidxml.hpp", + "string_helper.hpp", + "rapid_helpers.hpp", + "waypoint.pb.h", + ]) if (doc_type == "Category"): - cpp_includes.hpp_absolute_includes.add("map") - cpp_includes.hpp_relative_includes.add("icon_gen.hpp") - cpp_includes.hpp_relative_includes.add("trail_gen.hpp") - - cpp_includes.cpp_absolute_includes.add("utility") - cpp_includes.cpp_absolute_includes.add("type_traits") + cpp_includes.hpp_absolute_includes.update([ + "map", + ]) + cpp_includes.hpp_relative_includes.update([ + "icon_gen.hpp", + "trail_gen.hpp", + ]) + + cpp_includes.cpp_absolute_includes.update([ + "utility", + "type_traits", + ]) for filepath, document in sorted(data.items()): fieldval = document.metadata From 0af1d9753806f94b88dffd351330f49bf3f0ce1b Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 27 May 2024 17:30:04 -0400 Subject: [PATCH 482/539] switching from signals to function calls --- Gizmo/PointEdit.gd | 1 - Icon.gd | 4 +-- Route.gd | 4 +-- Route2D.gd | 5 +++- Spatial.gd | 61 ++++++++++++++++++++-------------------------- 5 files changed, 34 insertions(+), 41 deletions(-) diff --git a/Gizmo/PointEdit.gd b/Gizmo/PointEdit.gd index cff3dce0..aeda1ceb 100644 --- a/Gizmo/PointEdit.gd +++ b/Gizmo/PointEdit.gd @@ -46,6 +46,5 @@ func _process(delta): $Pillar.scale = new_scale if self.translation != self.last_translation: - #print("update") emit_signal("updated", self.translation) self.last_translation = self.translation diff --git a/Icon.gd b/Icon.gd index 55c403f2..3ad5acf3 100644 --- a/Icon.gd +++ b/Icon.gd @@ -23,8 +23,8 @@ func set_icon_image(texture_path: String): self.texture = texture self.material_override.set_shader_param("texture_albedo", texture) -func update_point_poistion(position: Vector3): +func update_poistion(position: Vector3): self.translation = position -func remove_point(index): +func remove(index = 0): queue_free() diff --git a/Route.gd b/Route.gd index 5fd3c5ba..92af260e 100644 --- a/Route.gd +++ b/Route.gd @@ -78,7 +78,7 @@ func get_point_count(): func get_point_position(index: int): return self.point_list[index] -func update_point_poistion(position: Vector3, index: int): +func update_poistion(position: Vector3, index: int): self.point_list[index] = position refresh_mesh() @@ -89,7 +89,7 @@ func add_point(position: Vector3, index: int = -1): self.point_list.insert(index, position) refresh_mesh() -func remove_point(index: int): +func remove(index: int): self.point_list.remove(index) refresh_mesh() diff --git a/Route2D.gd b/Route2D.gd index 19b330fb..b93e758e 100644 --- a/Route2D.gd +++ b/Route2D.gd @@ -3,7 +3,7 @@ extends Line2D func add_new_point(position: Vector3, index: int = -1): self.add_point(Vector2(position.x, position.z), index) -func update_point_poistion(position: Vector3, index: int): +func update_poistion(position: Vector3, index: int): self.set_point_position(index, Vector2(position.x, position.z)) func new_point_after(midpoint: Vector3, index: int): @@ -14,3 +14,6 @@ func new_point_after(midpoint: Vector3, index: int): var end: Vector2 = self.get_point_position(index+1) midpoint2d = ((start-end)/2) + end add_point(midpoint2d, index+1) + +func remove(index: int): + self.remove_point(index) diff --git a/Spatial.gd b/Spatial.gd index 12391701..0d36734c 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -18,7 +18,7 @@ var next_texture_path: String = "" # the value is null then a new path will be created the next time a path point # will be created. var currently_active_path = null -var currently_active_icon = null +var currently_active_path2d = null var currently_active_category = null var map_was_open = false @@ -693,7 +693,6 @@ func gen_adjustment_nodes(): new_gizmo.translation = gizmo_position new_gizmo.connect("selected", self, "on_gizmo_selected", [route, "path", path2d, i]) new_gizmo.connect("deselected", self, "on_gizmo_deselected", [route, "path", path2d, i]) - self.connect("deselected", self, "on_gizmo_deselected", [route, "path", path2d, i]) new_gizmo.connect("updated", route, "update_point_poistion", [i]) new_gizmo.connect("updated", path2d, "update_point_poistion", [i]) $Gizmos.add_child(new_gizmo) @@ -702,49 +701,35 @@ func gen_adjustment_nodes(): new_gizmo.translation = icon.translation new_gizmo.connect("selected", self, "on_gizmo_selected", [icon, "icon"]) new_gizmo.connect("deselected", self, "on_gizmo_deselected", [icon, "icon"]) - self.connect("deselected", self, "on_gizmo_deselected", [icon, "icon"]) new_gizmo.connect("updated", icon, "update_point_poistion") $Gizmos.add_child(new_gizmo) var currently_selected_gizmo = null -signal delete_node(index) -signal add_point(position) -signal new_node_after(position) -signal reverse() -signal set_active_path(path) -signal deselected(gizmo) - -func on_gizmo_selected(object, node, point_type: String, node2d = null, index: int = -1): +var currently_selected_node3d = null +var currently_selected_node2d = null +var currently_selected_index = 0 + +func on_gizmo_selected(object, node3d, point_type: String, node2d = null, index: int = 0): self.currently_selected_gizmo = object + self.currently_selected_node3d = node3d + self.currently_selected_node2d = node2d + self.currently_selected_index = index $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/DeleteNode.disabled = false - self.connect("delete_node", node, "remove_point", [index]) - self.connect("delete_node", node2d, "remove_point", [index]) # Only enable these buttons if the object selected is a point on the path not an icon if point_type == "path": - self.connect("add_point", node, "add_point", [index]) - self.connect("add_point", node2d, "add_point", [index]) $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/NewNodeAfter.disabled = false - self.connect("new_node_after", node, "new_point_after", [index]) - self.connect("new_node_after", node2d, "new_point_after", [index]) $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/ReversePathDirection.disabled = false - self.connect("reverse", node, "reverse") $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/SetActivePath.disabled = false - self.connect("set_active_path", self, "set_active_path", [node]) $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/SnapSelectedToPlayer.disabled = false $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/XZSnapToPlayer.disabled = false $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/YSnapToPlayer.disabled = false -func on_gizmo_deselected(object, node, point_type: String, node2d = null): - self.disconnect("delete_node", node, "remove_point") - self.disconnect("delete_node", node2d, "remove_point") - self.disconnect("add_point", node, "add_point") - self.disconnect("add_point", node2d, "add_point") - self.disconnect("new_node_after", node, "new_point_after") - self.disconnect("new_node_after", node2d, "new_point_after") - self.disconnect("reverse", node, "reverse") - self.disconnect("set_active_path", self, "set_active_path") +func on_gizmo_deselected(object): self.currently_selected_gizmo = null + self.currently_selected_node3d = null + self.currently_selected_node2d = null + self.currently_selected_index = 0 $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/DeleteNode.disabled = true $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/NewNodeAfter.disabled = true $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/SnapSelectedToPlayer.disabled = true @@ -839,7 +824,8 @@ func _on_NewPathPoint_pressed(): else: var z_accurate_player_position = player_position z_accurate_player_position.z = -z_accurate_player_position.z - emit_signal("add_point", z_accurate_player_position) + self.currently_active_path.add_point(z_accurate_player_position) + self.currently_active_path2d.add_point(z_accurate_player_position) func _on_NodeEditorDialog_hide(): self.currently_selected_gizmo = null @@ -848,21 +834,25 @@ func _on_NodeEditorDialog_hide(): func _on_DeleteNode_pressed(): - emit_signal("delete_node") + self.currently_selected_node3d.remove(self.currently_selected_index) + if self.currently_selected_node2d != null: + self.currently_selected_node2d.remove(self.currently_selected_index) + on_gizmo_deselected(self.currently_selected_gizmo) clear_adjustment_nodes() gen_adjustment_nodes() - emit_signal("deselected", self.currently_selected_gizmo) func _on_NewNodeAfter_pressed(): print("insert path node") var midpoint = self.player_position midpoint.z = -midpoint.z - emit_signal("new_node_after", midpoint) + self.currently_selected_node3d.new_point_after(midpoint, self.currently_selected_index) + if self.currently_selected_node2d != null: + self.currently_selected_node2d.new_point_after(midpoint, self.currently_selected_index) + on_gizmo_deselected(self.currently_selected_gizmo) clear_adjustment_nodes() gen_adjustment_nodes() - emit_signal("deselected", self.currently_selected_gizmo) func _on_XZSnapToPlayer_pressed(): self.currently_selected_gizmo.translation.x = self.player_position.x @@ -879,13 +869,14 @@ func _on_SnapSelectedToPlayer_pressed(): self.currently_selected_gizmo.translation.y = self.player_position.y func _on_SetActivePath_pressed(): - emit_signal("set_active_path") + self.currently_active_path = self.currently_selected_node3d + self.currently_active_path2d = self.currently_selected_node2d func set_active_path(path): self.currently_active_path = path func _on_ReversePathDirection_pressed(): - emit_signal("reverse") + self.currently_selected_node3d.reverse() func _on_ExitButton_pressed(): From 8404ea95b8d704685d649f914f14f934987e502c Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 27 May 2024 17:30:49 -0400 Subject: [PATCH 483/539] added missing type --- Icon.gd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Icon.gd b/Icon.gd index 3ad5acf3..5f488793 100644 --- a/Icon.gd +++ b/Icon.gd @@ -26,5 +26,5 @@ func set_icon_image(texture_path: String): func update_poistion(position: Vector3): self.translation = position -func remove(index = 0): +func remove(index: int = 0): queue_free() From 26c23e2f09502abb125530a1488e601dc482a641 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 27 May 2024 17:35:04 -0400 Subject: [PATCH 484/539] readded assignment of currently active path 2d --- Spatial.gd | 1 + 1 file changed, 1 insertion(+) diff --git a/Spatial.gd b/Spatial.gd index 0d36734c..a444a7d4 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -621,6 +621,7 @@ func gen_new_path(points: Array, texture_path: String, waypoint_trail, category_ category_data.category2d.add_path2d(new_2d_path) self.currently_active_path = new_route + self.currently_active_path2d = new_2d_path func gen_new_icon(position: Vector3, texture_path: String, waypoint_icon, category_item: TreeItem): From 96e0385820f5599d61aa4811c9195d15f0e2cb30 Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Mon, 27 May 2024 17:13:00 -0500 Subject: [PATCH 485/539] adding a negative y position example --- xml_converter/doc/position/position.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml_converter/doc/position/position.md b/xml_converter/doc/position/position.md index 3500f66d..ff5383a2 100644 --- a/xml_converter/doc/position/position.md +++ b/xml_converter/doc/position/position.md @@ -17,7 +17,7 @@ components: type: Float32 xml_fields: [YPos, PositionY] protobuf_field: "y" - examples: ["81.727", "24.5189", "9.12564", "3.91473"] + examples: ["81.727", "24.5189", "-9.12564", "3.91473"] - name: Z Position type: Float32 From b1e858ea5231f6df6a0031a3702183e18b0908df Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 9 Jun 2024 13:18:09 -0400 Subject: [PATCH 486/539] Addressing code review. Splits from using node to having explicit variables and pathways --- Gizmo/PointEdit.gd | 2 +- Icon.gd | 6 +-- Route.gd | 6 +-- Route2D.gd | 12 +++--- Spatial.gd | 93 +++++++++++++++++++++++++++++----------------- Spatial.tscn | 4 +- 6 files changed, 74 insertions(+), 49 deletions(-) diff --git a/Gizmo/PointEdit.gd b/Gizmo/PointEdit.gd index aeda1ceb..1b9bcb3f 100644 --- a/Gizmo/PointEdit.gd +++ b/Gizmo/PointEdit.gd @@ -2,7 +2,7 @@ extends Spatial var camera: Camera signal selected(selected_object) -signal deselected(selected_object) +signal deselected() signal updated(point_position) var last_translation var selected: bool = false diff --git a/Icon.gd b/Icon.gd index 5f488793..d291db53 100644 --- a/Icon.gd +++ b/Icon.gd @@ -23,8 +23,8 @@ func set_icon_image(texture_path: String): self.texture = texture self.material_override.set_shader_param("texture_albedo", texture) -func update_poistion(position: Vector3): +func set_position(position: Vector3): self.translation = position -func remove(index: int = 0): - queue_free() +func remove_icon(): + self.queue_free() diff --git a/Route.gd b/Route.gd index 92af260e..d6cb8231 100644 --- a/Route.gd +++ b/Route.gd @@ -78,7 +78,7 @@ func get_point_count(): func get_point_position(index: int): return self.point_list[index] -func update_poistion(position: Vector3, index: int): +func set_point_position(position: Vector3, index: int): self.point_list[index] = position refresh_mesh() @@ -89,11 +89,11 @@ func add_point(position: Vector3, index: int = -1): self.point_list.insert(index, position) refresh_mesh() -func remove(index: int): +func remove_point(index: int): self.point_list.remove(index) refresh_mesh() -func new_point_after(midpoint: Vector3, index): +func new_point_after(midpoint: Vector3, index: int): var start: Vector3 = self.get_point_position(index) if self.get_point_count() > index+1: var end: Vector3 = self.get_point_position(index+1) diff --git a/Route2D.gd b/Route2D.gd index b93e758e..cd891542 100644 --- a/Route2D.gd +++ b/Route2D.gd @@ -1,9 +1,6 @@ extends Line2D -func add_new_point(position: Vector3, index: int = -1): - self.add_point(Vector2(position.x, position.z), index) - -func update_poistion(position: Vector3, index: int): +func on_update_position(position: Vector3, index: int): self.set_point_position(index, Vector2(position.x, position.z)) func new_point_after(midpoint: Vector3, index: int): @@ -15,5 +12,10 @@ func new_point_after(midpoint: Vector3, index: int): midpoint2d = ((start-end)/2) + end add_point(midpoint2d, index+1) -func remove(index: int): +func remove_point(index: int): self.remove_point(index) + +func reverse(): + var points = self.points + points.invert() + self.points = points diff --git a/Spatial.gd b/Spatial.gd index a444a7d4..8da9fc71 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -692,47 +692,56 @@ func gen_adjustment_nodes(): continue var new_gizmo = gizmo_scene.instance() new_gizmo.translation = gizmo_position - new_gizmo.connect("selected", self, "on_gizmo_selected", [route, "path", path2d, i]) - new_gizmo.connect("deselected", self, "on_gizmo_deselected", [route, "path", path2d, i]) - new_gizmo.connect("updated", route, "update_point_poistion", [i]) - new_gizmo.connect("updated", path2d, "update_point_poistion", [i]) + new_gizmo.connect("selected", self, "on_path_gizmo_selected", [route, path2d, i]) + new_gizmo.connect("deselected", self, "on_gizmo_deselected") + new_gizmo.connect("updated", route, "set_point_position", [i]) + new_gizmo.connect("updated", path2d, "on_update_position", [i]) $Gizmos.add_child(new_gizmo) for icon in category3d.icons: var new_gizmo = gizmo_scene.instance() new_gizmo.translation = icon.translation - new_gizmo.connect("selected", self, "on_gizmo_selected", [icon, "icon"]) - new_gizmo.connect("deselected", self, "on_gizmo_deselected", [icon, "icon"]) - new_gizmo.connect("updated", icon, "update_point_poistion") + new_gizmo.connect("selected", self, "on_icon_gizmo_selected", [icon]) + new_gizmo.connect("deselected", self, "on_gizmo_deselected") + new_gizmo.connect("updated", icon, "set_position") $Gizmos.add_child(new_gizmo) var currently_selected_gizmo = null -var currently_selected_node3d = null -var currently_selected_node2d = null +var currently_selected_icon = null +var currently_selected_path3d = null +var currently_selected_path2d = null var currently_selected_index = 0 -func on_gizmo_selected(object, node3d, point_type: String, node2d = null, index: int = 0): +func on_icon_gizmo_selected(object: Spatial, icon: Sprite3D): self.currently_selected_gizmo = object - self.currently_selected_node3d = node3d - self.currently_selected_node2d = node2d + self.currently_selected_icon = icon + $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/DeleteNode.disabled = false + $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/SnapSelectedToPlayer.disabled = false + $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/XZSnapToPlayer.disabled = false + $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/YSnapToPlayer.disabled = false + + +func on_path_gizmo_selected(object: Spatial, path3d: Spatial, path2d: Line2D, index: int): + self.currently_selected_gizmo = object + self.currently_selected_path3d = path3d + self.currently_selected_path2d = path2d self.currently_selected_index = index $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/DeleteNode.disabled = false - # Only enable these buttons if the object selected is a point on the path not an icon - if point_type == "path": - $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/NewNodeAfter.disabled = false - $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/ReversePathDirection.disabled = false - $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/SetActivePath.disabled = false + $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/NewPathPointAfter.disabled = false + $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/ReversePathDirection.disabled = false + $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/SetActivePath.disabled = false $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/SnapSelectedToPlayer.disabled = false $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/XZSnapToPlayer.disabled = false $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/YSnapToPlayer.disabled = false -func on_gizmo_deselected(object): +func on_gizmo_deselected(): self.currently_selected_gizmo = null - self.currently_selected_node3d = null - self.currently_selected_node2d = null + self.currently_selected_icon = null + self.currently_selected_path3d = null + self.currently_selected_path2d = null self.currently_selected_index = 0 $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/DeleteNode.disabled = true - $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/NewNodeAfter.disabled = true + $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/NewPathPointAfter.disabled = true $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/SnapSelectedToPlayer.disabled = true $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/XZSnapToPlayer.disabled = true $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/YSnapToPlayer.disabled = true @@ -826,58 +835,72 @@ func _on_NewPathPoint_pressed(): var z_accurate_player_position = player_position z_accurate_player_position.z = -z_accurate_player_position.z self.currently_active_path.add_point(z_accurate_player_position) - self.currently_active_path2d.add_point(z_accurate_player_position) + self.currently_active_path2d.add_point(Vector2(z_accurate_player_position.x, z_accurate_player_position.z)) func _on_NodeEditorDialog_hide(): - self.currently_selected_gizmo = null + on_gizmo_deselected() clear_adjustment_nodes() _on_Dialog_hide() func _on_DeleteNode_pressed(): - self.currently_selected_node3d.remove(self.currently_selected_index) - if self.currently_selected_node2d != null: - self.currently_selected_node2d.remove(self.currently_selected_index) - on_gizmo_deselected(self.currently_selected_gizmo) + if self.currently_selected_icon != null: + self.currently_selected_icon.remove_icon() + if self.currently_selected_path3d != null: + self.currently_selected_path3d.remove_point(self.currently_selected_index) + if self.currently_selected_path2d != null: + self.currently_selected_path2d.remove_point(self.currently_selected_index) + on_gizmo_deselected() clear_adjustment_nodes() gen_adjustment_nodes() -func _on_NewNodeAfter_pressed(): +func _on_NewPathPointAfter_pressed(): print("insert path node") var midpoint = self.player_position midpoint.z = -midpoint.z - self.currently_selected_node3d.new_point_after(midpoint, self.currently_selected_index) - if self.currently_selected_node2d != null: - self.currently_selected_node2d.new_point_after(midpoint, self.currently_selected_index) + if self.currently_selected_path3d != null: + self.currently_selected_path3d.new_point_after(midpoint, self.currently_selected_index) + if self.currently_selected_path2d != null: + self.currently_selected_path2d.new_point_after(midpoint, self.currently_selected_index) - on_gizmo_deselected(self.currently_selected_gizmo) + on_gizmo_deselected() clear_adjustment_nodes() gen_adjustment_nodes() func _on_XZSnapToPlayer_pressed(): + if self.currently_selected_gizmo == null: + print("Warning: No Point Selected") self.currently_selected_gizmo.translation.x = self.player_position.x self.currently_selected_gizmo.translation.z = -self.player_position.z func _on_YSnapToPlayer_pressed(): + if self.currently_selected_gizmo == null: + print("Warning: No Point Selected") self.currently_selected_gizmo.translation.y = self.player_position.y func _on_SnapSelectedToPlayer_pressed(): + if self.currently_selected_gizmo == null: + print("Warning: No Point Selected") self.currently_selected_gizmo.translation.x = self.player_position.x self.currently_selected_gizmo.translation.z = -self.player_position.z self.currently_selected_gizmo.translation.y = self.player_position.y func _on_SetActivePath_pressed(): - self.currently_active_path = self.currently_selected_node3d - self.currently_active_path2d = self.currently_selected_node2d + self.currently_active_path = self.currently_selected_path3d + self.currently_active_path2d = self.currently_selected_path2d func set_active_path(path): self.currently_active_path = path func _on_ReversePathDirection_pressed(): - self.currently_selected_node3d.reverse() + self.currently_selected_path3d.reverse() + self.currently_selected_path2d.reverse() + on_gizmo_deselected() + clear_adjustment_nodes() + gen_adjustment_nodes() func _on_ExitButton_pressed(): diff --git a/Spatial.tscn b/Spatial.tscn index 05650e14..32505f06 100644 --- a/Spatial.tscn +++ b/Spatial.tscn @@ -550,7 +550,7 @@ size_flags_horizontal = 3 disabled = true text = "Delete Selected" -[node name="NewNodeAfter" type="Button" parent="Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer"] +[node name="NewPathPointAfter" type="Button" parent="Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer"] margin_top = 44.0 margin_right = 323.0 margin_bottom = 84.0 @@ -917,7 +917,7 @@ material/0 = SubResource( 4 ) [connection signal="hide" from="Control/Dialogs/SaveDialog" to="." method="_on_Dialog_hide"] [connection signal="hide" from="Control/Dialogs/NodeEditorDialog" to="." method="_on_NodeEditorDialog_hide"] [connection signal="pressed" from="Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/DeleteNode" to="." method="_on_DeleteNode_pressed"] -[connection signal="pressed" from="Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/NewNodeAfter" to="." method="_on_NewNodeAfter_pressed"] +[connection signal="pressed" from="Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/NewPathPointAfter" to="." method="_on_NewPathPointAfter_pressed"] [connection signal="pressed" from="Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/SnapSelectedToPlayer" to="." method="_on_SnapSelectedToPlayer_pressed"] [connection signal="pressed" from="Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/XZSnapToPlayer" to="." method="_on_XZSnapToPlayer_pressed"] [connection signal="pressed" from="Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/YSnapToPlayer" to="." method="_on_YSnapToPlayer_pressed"] From 4376731dd714423d9f46b4cab55a2bf149e418b2 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 9 Jun 2024 18:26:35 -0400 Subject: [PATCH 487/539] Small changes to address review --- Route2D.gd | 7 +------ Spatial.gd | 12 +++++++++--- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Route2D.gd b/Route2D.gd index cd891542..2b6c27b4 100644 --- a/Route2D.gd +++ b/Route2D.gd @@ -1,8 +1,5 @@ extends Line2D -func on_update_position(position: Vector3, index: int): - self.set_point_position(index, Vector2(position.x, position.z)) - func new_point_after(midpoint: Vector3, index: int): var midpoint2d: Vector2 = Vector2(midpoint.x, midpoint.z) var start: Vector2 = self.get_point_position(index) @@ -16,6 +13,4 @@ func remove_point(index: int): self.remove_point(index) func reverse(): - var points = self.points - points.invert() - self.points = points + self.points.invert() diff --git a/Spatial.gd b/Spatial.gd index 8da9fc71..6a784eae 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -695,7 +695,7 @@ func gen_adjustment_nodes(): new_gizmo.connect("selected", self, "on_path_gizmo_selected", [route, path2d, i]) new_gizmo.connect("deselected", self, "on_gizmo_deselected") new_gizmo.connect("updated", route, "set_point_position", [i]) - new_gizmo.connect("updated", path2d, "on_update_position", [i]) + new_gizmo.connect("updated", self, "set_2D_position_from_3D_point", [path2d, i]) $Gizmos.add_child(new_gizmo) for icon in category3d.icons: var new_gizmo = gizmo_scene.instance() @@ -709,7 +709,10 @@ var currently_selected_gizmo = null var currently_selected_icon = null var currently_selected_path3d = null var currently_selected_path2d = null -var currently_selected_index = 0 +var currently_selected_index = null + +func set_2D_position_from_3D_point(position: Vector3, path2D: Line2D, index: int): + path2D.set_point_position(index, Vector2(position.x, position.z)) func on_icon_gizmo_selected(object: Spatial, icon: Sprite3D): self.currently_selected_gizmo = object @@ -739,7 +742,7 @@ func on_gizmo_deselected(): self.currently_selected_icon = null self.currently_selected_path3d = null self.currently_selected_path2d = null - self.currently_selected_index = 0 + self.currently_selected_index = null $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/DeleteNode.disabled = true $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/NewPathPointAfter.disabled = true $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/SnapSelectedToPlayer.disabled = true @@ -871,6 +874,7 @@ func _on_NewPathPointAfter_pressed(): func _on_XZSnapToPlayer_pressed(): if self.currently_selected_gizmo == null: print("Warning: No Point Selected") + return self.currently_selected_gizmo.translation.x = self.player_position.x self.currently_selected_gizmo.translation.z = -self.player_position.z @@ -878,12 +882,14 @@ func _on_XZSnapToPlayer_pressed(): func _on_YSnapToPlayer_pressed(): if self.currently_selected_gizmo == null: print("Warning: No Point Selected") + return self.currently_selected_gizmo.translation.y = self.player_position.y func _on_SnapSelectedToPlayer_pressed(): if self.currently_selected_gizmo == null: print("Warning: No Point Selected") + return self.currently_selected_gizmo.translation.x = self.player_position.x self.currently_selected_gizmo.translation.z = -self.player_position.z self.currently_selected_gizmo.translation.y = self.player_position.y From 6f800370861f224932ddf927daa11ac7392c22e1 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Wed, 12 Jun 2024 08:58:30 -0400 Subject: [PATCH 488/539] Made the waypoint data the source of truth for position of icons and trails --- Category3D.gd | 5 ++ Icon.gd | 3 - Spatial.gd | 195 +++++++++++++++++++++++++++++++++++--------------- 3 files changed, 141 insertions(+), 62 deletions(-) diff --git a/Category3D.gd b/Category3D.gd index 21846e5e..abc5b3d0 100644 --- a/Category3D.gd +++ b/Category3D.gd @@ -23,3 +23,8 @@ func clear_all(): self.subcategories = [] for child in self.get_children(): child.queue_free() + +func remove_icon(icon_index): + var icon = self.icons[icon_index] + self.icons.remove(icon) + icon.queue_free() diff --git a/Icon.gd b/Icon.gd index d291db53..ff072d25 100644 --- a/Icon.gd +++ b/Icon.gd @@ -25,6 +25,3 @@ func set_icon_image(texture_path: String): func set_position(position: Vector3): self.translation = position - -func remove_icon(): - self.queue_free() diff --git a/Spatial.gd b/Spatial.gd index 6a784eae..55c56f31 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -17,8 +17,7 @@ var next_texture_path: String = "" # A pointer to the path object that any new nodes should be appended to. If # the value is null then a new path will be created the next time a path point # will be created. -var currently_active_path = null -var currently_active_path2d = null +var currently_active_path_index = null var currently_active_category = null var map_was_open = false @@ -620,9 +619,6 @@ func gen_new_path(points: Array, texture_path: String, waypoint_trail, category_ new_2d_path.texture = texture category_data.category2d.add_path2d(new_2d_path) - self.currently_active_path = new_route - self.currently_active_path2d = new_2d_path - func gen_new_icon(position: Vector3, texture_path: String, waypoint_icon, category_item: TreeItem): position.z = -position.z @@ -680,11 +676,11 @@ func gen_adjustment_nodes(): var category3d = self.currently_active_category.get_metadata(0).category3d var category2d = self.currently_active_category.get_metadata(0).category2d - for index in category3d.paths.size(): - var route = category3d.paths[index] - var path2d = category2d.paths2d[index] - for i in range(route.get_point_count()): - var gizmo_position = route.get_point_position(i) + for path_index in category3d.paths.size(): + var route = category3d.paths[path_index] + var path2d = category2d.paths2d[path_index] + for point_index in get_trail_point_count(path_index): + var gizmo_position = get_trail_point_position(path_index, point_index) # Simplistic cull to prevent nodes that are too far away to be # visible from being created. Additional work can be done here # if this is not enough of an optimization in the future. @@ -692,42 +688,39 @@ func gen_adjustment_nodes(): continue var new_gizmo = gizmo_scene.instance() new_gizmo.translation = gizmo_position - new_gizmo.connect("selected", self, "on_path_gizmo_selected", [route, path2d, i]) + new_gizmo.connect("selected", self, "on_path_gizmo_selected", [path_index, point_index]) new_gizmo.connect("deselected", self, "on_gizmo_deselected") - new_gizmo.connect("updated", route, "set_point_position", [i]) - new_gizmo.connect("updated", self, "set_2D_position_from_3D_point", [path2d, i]) + new_gizmo.connect("updated", self, "set_trail_position", [path_index, point_index]) $Gizmos.add_child(new_gizmo) - for icon in category3d.icons: + for index in category3d.icons.size(): var new_gizmo = gizmo_scene.instance() - new_gizmo.translation = icon.translation - new_gizmo.connect("selected", self, "on_icon_gizmo_selected", [icon]) + new_gizmo.translation = category3d.icons[index].translation + new_gizmo.connect("selected", self, "on_icon_gizmo_selected", [index]) new_gizmo.connect("deselected", self, "on_gizmo_deselected") - new_gizmo.connect("updated", icon, "set_position") + new_gizmo.connect("updated", self, "set_icon_position", [index]) $Gizmos.add_child(new_gizmo) var currently_selected_gizmo = null -var currently_selected_icon = null -var currently_selected_path3d = null -var currently_selected_path2d = null -var currently_selected_index = null +var currently_selected_icon_index = null +var currently_selected_path_index = null +var currently_selected_point_index = null func set_2D_position_from_3D_point(position: Vector3, path2D: Line2D, index: int): path2D.set_point_position(index, Vector2(position.x, position.z)) -func on_icon_gizmo_selected(object: Spatial, icon: Sprite3D): +func on_icon_gizmo_selected(object: Spatial, icon_index: int): self.currently_selected_gizmo = object - self.currently_selected_icon = icon + self.currently_selected_icon_index = icon_index $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/DeleteNode.disabled = false $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/SnapSelectedToPlayer.disabled = false $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/XZSnapToPlayer.disabled = false $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/YSnapToPlayer.disabled = false -func on_path_gizmo_selected(object: Spatial, path3d: Spatial, path2d: Line2D, index: int): +func on_path_gizmo_selected(object: Spatial, path_index: int, point_index: int): self.currently_selected_gizmo = object - self.currently_selected_path3d = path3d - self.currently_selected_path2d = path2d - self.currently_selected_index = index + self.currently_selected_path_index = path_index + self.currently_selected_point_index = point_index $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/DeleteNode.disabled = false $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/NewPathPointAfter.disabled = false $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/ReversePathDirection.disabled = false @@ -739,10 +732,9 @@ func on_path_gizmo_selected(object: Spatial, path3d: Spatial, path2d: Line2D, in func on_gizmo_deselected(): self.currently_selected_gizmo = null - self.currently_selected_icon = null - self.currently_selected_path3d = null - self.currently_selected_path2d = null - self.currently_selected_index = null + self.currently_selected_icon_index = null + self.currently_selected_path_index = null + self.currently_selected_point_index = null $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/DeleteNode.disabled = true $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/NewPathPointAfter.disabled = true $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/SnapSelectedToPlayer.disabled = true @@ -757,6 +749,97 @@ func clear_adjustment_nodes(): $Gizmos.remove_child(child) child.queue_free() +################################################################################ +# Update Waypoint datum +################################################################################ +func set_icon_position(position: Vector3, icon_index: int): + var icon = self.currently_active_category.get_metadata(0).category3d.icons[icon_index] + icon.waypoint.new_position(position) + icon.set_position(icon.waypoint.get_position()) + +func remove_icon(icon_index: int): + var category: CategoryData = self.currently_active_category.get_metadata(0) + var icons = category.waypoint_category.get_icon() + icons.remove(icon_index) + category.category3d.remove_icon(icon_index) + +func set_trail_position(position: Vector3, path_index: int, point_index: int): + var trail_data = self.currently_active_category.get_metadata(0).category3d.paths[path_index].waypoint.get_trail_data() + trail_data.get_points_x()[point_index] = position.x + trail_data.get_points_y()[point_index] = position.y + trail_data.get_points_z()[point_index] = -position.z + refresh_path3D_points(path_index) + refresh_path2D_points(path_index) + +func reverse_trail(path_index: int): + var trail_data = self.currently_active_category.get_metadata(0).category3d.paths[path_index].waypoint.get_trail_data() + trail_data.get_points_x().invert() + trail_data.get_points_y().invert() + trail_data.get_points_z().invert() + refresh_path3D_points(path_index) + refresh_path2D_points(path_index) + +func get_trail_point_count(path_index: int): + var trail_data = self.currently_active_category.get_metadata(0).category3d.paths[path_index].waypoint.get_trail_data() + return len(trail_data.get_points_x()) + +func get_trail_point_position(path_index: int, point_index: int): + var position: Vector3 + var trail_data = self.currently_active_category.get_metadata(0).category3d.paths[path_index].waypoint.get_trail_data() + position[0] = trail_data.get_points_x()[point_index] + position[1] = trail_data.get_points_y()[point_index] + position[2] = trail_data.get_points_z()[point_index] + return position + +func add_trail_point(position: Vector3, path_index: int, point_index: int = -1): + var trail_data = self.currently_active_category.get_metadata(0).category3d.paths[path_index].waypoint.get_trail_data() + if point_index == -1: + trail_data.get_points_x().append(position.x) + trail_data.get_points_y().append(position.y) + trail_data.get_points_z().append(-position.z) + else: + trail_data.get_points_x().insert(point_index, position.x) + trail_data.get_points_y().insert(point_index, position.y) + trail_data.get_points_z().insert(point_index, -position.z) + refresh_path3D_points(path_index) + refresh_path2D_points(path_index) + +func remove_trail_point(position: Vector3, path_index: int, point_index: int = -1): + var trail_data = self.currently_active_category.get_metadata(0).category3d.paths[path_index].waypoint.get_trail_data() + trail_data.get_points_x().remove(position.x) + trail_data.get_points_y().remove(position.y) + trail_data.get_points_z().remove(-position.z) + refresh_path3D_points(path_index) + refresh_path2D_points(path_index) + +func new_trail_point_after(path_index: int, point_index: int): + var start: Vector3 = get_trail_point_position(path_index, point_index) + var target_position: Vector3 + if get_trail_point_count(path_index) > point_index+1: + var end: Vector3 = get_trail_point_position(path_index, point_index+1) + target_position = ((start-end)/2) + end + else: + target_position = Vector3(self.player_position.x, self.player_position.y, -self.player_position.z) + add_trail_point(target_position, point_index+1) + +func refresh_path3D_points(path_index: int): + var path_points := PoolVector3Array() + var path3d = self.currently_active_category.get_metadata(0).category3d.paths[path_index] + var trail_data = path3d.waypoint.get_trail_data() + for index in range(0, trail_data.get_points_z().size()): + path_points.append(Vector3(trail_data.get_points_x()[index], trail_data.get_points_y()[index], -trail_data.get_points_z()[index])) + path3d.point_list = path_points + path3d.refresh_mesh() + +func refresh_path2D_points(path_index: int): + var path_points := PoolVector2Array() + var path2d = self.currently_active_category.get_metadata(0).category2d.paths[path_index] + var trail_data = path2d.waypoint.get_trail_data() + for index in range(0, trail_data.get_points_z().size()): + path_points.append(Vector2(trail_data.get_points_x()[index], -trail_data.get_points_z()[index])) + path2d.points = path_points + + ################################################################################ # Signal Functions ################################################################################ @@ -818,27 +901,33 @@ func _on_TexturePathOpen_file_selected(path): # a path node is created. ################################################################################ func _on_NewPath_pressed(): - self.currently_active_path = null + self.currently_active_path_index = null ################################################################################ # Create a new icon and give it the texture ################################################################################ func _on_NewIcon_pressed(): var waypoint_category: Waypoint.Category = self.currently_active_category.get_metadata(0).waypoint_category - var waypoint_icon = waypoint_category.new_icon() + var waypoint_icon = waypoint_category.add_icon() + var position = waypoint_icon.new_position() + position.set_x(self.player_position.x) + position.set_y(self.player_position.y) + position.set_z(-self.player_position.z) gen_new_icon(self.player_position, self.next_texture_path, waypoint_icon, self.currently_active_category) # A new path point is created func _on_NewPathPoint_pressed(): - if self.currently_active_path == null: + if self.currently_active_path_index == null: var waypoint_category: Waypoint.Category = self.currently_active_category.get_metadata(0).waypoint_category - var waypoint_trail = waypoint_category.new_trail() + var waypoint_trail = waypoint_category.add_trail() + var trail_data = waypoint_trail.new_trail_data() + trail_data.add_points_x(self.player_position.x) + trail_data.add_points_y(self.player_position.y) + trail_data.add_points_z(-self.player_position.z) gen_new_path([self.player_position], self.next_texture_path, waypoint_trail, self.currently_active_category) + self.currently_active_path_index = len(waypoint_category.get_trail()) - 1 else: - var z_accurate_player_position = player_position - z_accurate_player_position.z = -z_accurate_player_position.z - self.currently_active_path.add_point(z_accurate_player_position) - self.currently_active_path2d.add_point(Vector2(z_accurate_player_position.x, z_accurate_player_position.z)) + add_trail_point(self.player_position, self.currently_active_path_index) func _on_NodeEditorDialog_hide(): on_gizmo_deselected() @@ -847,26 +936,18 @@ func _on_NodeEditorDialog_hide(): func _on_DeleteNode_pressed(): - if self.currently_selected_icon != null: - self.currently_selected_icon.remove_icon() - if self.currently_selected_path3d != null: - self.currently_selected_path3d.remove_point(self.currently_selected_index) - if self.currently_selected_path2d != null: - self.currently_selected_path2d.remove_point(self.currently_selected_index) + if self.currently_selected_icon_index != null: + remove_icon(self.currently_selected_icon_index) + if self.currently_selected_path_index != null: + remove_trail_point(self.currently_selected_path_index, self.currently_selected_point_index) on_gizmo_deselected() clear_adjustment_nodes() gen_adjustment_nodes() func _on_NewPathPointAfter_pressed(): - print("insert path node") - var midpoint = self.player_position - midpoint.z = -midpoint.z - if self.currently_selected_path3d != null: - self.currently_selected_path3d.new_point_after(midpoint, self.currently_selected_index) - if self.currently_selected_path2d != null: - self.currently_selected_path2d.new_point_after(midpoint, self.currently_selected_index) - + if self.currently_selected_path_index != null: + new_trail_point_after(self.currently_selected_path_index, self.currently_selected_point_index) on_gizmo_deselected() clear_adjustment_nodes() gen_adjustment_nodes() @@ -895,15 +976,11 @@ func _on_SnapSelectedToPlayer_pressed(): self.currently_selected_gizmo.translation.y = self.player_position.y func _on_SetActivePath_pressed(): - self.currently_active_path = self.currently_selected_path3d - self.currently_active_path2d = self.currently_selected_path2d + self.currently_active_path_index = self.currently_selected_path_index -func set_active_path(path): - self.currently_active_path = path func _on_ReversePathDirection_pressed(): - self.currently_selected_path3d.reverse() - self.currently_selected_path2d.reverse() + reverse_trail(self.currently_selected_path_index) on_gizmo_deselected() clear_adjustment_nodes() gen_adjustment_nodes() From abcfdb811bb6f2360154fe4086f6c0a1906fdf7f Mon Sep 17 00:00:00 2001 From: klingbolt Date: Wed, 12 Jun 2024 09:03:57 -0400 Subject: [PATCH 489/539] added a type --- Category3D.gd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Category3D.gd b/Category3D.gd index abc5b3d0..85fcb7d9 100644 --- a/Category3D.gd +++ b/Category3D.gd @@ -24,7 +24,7 @@ func clear_all(): for child in self.get_children(): child.queue_free() -func remove_icon(icon_index): +func remove_icon(icon_index: int): var icon = self.icons[icon_index] self.icons.remove(icon) icon.queue_free() From 9b207cf9b07954f00b5f88293ca2a233448b319b Mon Sep 17 00:00:00 2001 From: klingbolt Date: Fri, 14 Jun 2024 00:23:02 -0400 Subject: [PATCH 490/539] Changed from using index to passing Waypoint class --- Route.gd | 7 +- Route2D.gd | 3 + Spatial.gd | 217 ++++++++++++++++++++++++++++++++--------------------- 3 files changed, 138 insertions(+), 89 deletions(-) diff --git a/Route.gd b/Route.gd index d6cb8231..2916f9e5 100644 --- a/Route.gd +++ b/Route.gd @@ -17,9 +17,10 @@ func refresh_mesh(): var tmpMesh = Mesh.new() var i = 0 var last_uv: float = 0.0 - for point_index in range(len(point_list)-1): - var point:Vector3 = point_list[point_index] - var next_point:Vector3 = point_list[point_index+1] + var trail_data = self.waypoint.get_trail_data() + for point_index in range(trail_data.get_points_x().size()-1): + var point:Vector3 = Vector3(trail_data.get_points_x()[point_index], trail_data.get_points_y()[point_index], -trail_data.get_points_z()[point_index]) + var next_point:Vector3 = Vector3(trail_data.get_points_x()[point_index+1], trail_data.get_points_y()[point_index+1], -trail_data.get_points_z()[point_index+1]) # If the line starts or ends at map coordinates (0,0,0), don't draw the line. if point == Vector3(0,0,0) or next_point == Vector3(0,0,0): continue diff --git a/Route2D.gd b/Route2D.gd index 2b6c27b4..742bf34f 100644 --- a/Route2D.gd +++ b/Route2D.gd @@ -1,5 +1,8 @@ extends Line2D +const Waypoint = preload("res://waypoint.gd") +var waypoint: Waypoint.Trail + func new_point_after(midpoint: Vector3, index: int): var midpoint2d: Vector2 = Vector2(midpoint.x, midpoint.z) var start: Vector2 = self.get_point_position(index) diff --git a/Spatial.gd b/Spatial.gd index 55c56f31..5c36b81d 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -17,7 +17,9 @@ var next_texture_path: String = "" # A pointer to the path object that any new nodes should be appended to. If # the value is null then a new path will be created the next time a path point # will be created. -var currently_active_path_index = null +var currently_active_path3d = null +var currently_active_path2d = null +var currently_active_waypoint_trail = null var currently_active_category = null var map_was_open = false @@ -603,9 +605,9 @@ func gen_new_path(points: Array, texture_path: String, waypoint_trail, category_ for point in points: points_3d.append(Vector3(point[0], point[1], -point[2])) - new_route.create_mesh(points_3d) - new_route.set_texture(texture) new_route.waypoint = waypoint_trail + new_route.refresh_mesh() + new_route.set_texture(texture) var category_data = category_item.get_metadata(0) category_data.category3d.add_path(new_route) @@ -617,8 +619,10 @@ func gen_new_path(points: Array, texture_path: String, waypoint_trail, category_ points_2d.append(Vector2(point[0], -point[2])) new_2d_path.points = points_2d new_2d_path.texture = texture + new_2d_path.waypoint = waypoint_trail category_data.category2d.add_path2d(new_2d_path) + return [new_route, new_2d_path] func gen_new_icon(position: Vector3, texture_path: String, waypoint_icon, category_item: TreeItem): position.z = -position.z @@ -673,14 +677,15 @@ func gen_adjustment_nodes(): if self.currently_active_category == null: print("No category selected") return - + var waypoint_category = self.currently_active_category.get_metadata(0).waypoint_category var category3d = self.currently_active_category.get_metadata(0).category3d var category2d = self.currently_active_category.get_metadata(0).category2d - for path_index in category3d.paths.size(): + for path_index in waypoint_category.get_trail().size(): + var waypoint_trail = waypoint_category.get_trail()[path_index] var route = category3d.paths[path_index] var path2d = category2d.paths2d[path_index] - for point_index in get_trail_point_count(path_index): - var gizmo_position = get_trail_point_position(path_index, point_index) + for point_index in get_trail_point_count(waypoint_trail): + var gizmo_position = get_trail_point_position(waypoint_trail, point_index) # Simplistic cull to prevent nodes that are too far away to be # visible from being created. Additional work can be done here # if this is not enough of an optimization in the future. @@ -688,38 +693,46 @@ func gen_adjustment_nodes(): continue var new_gizmo = gizmo_scene.instance() new_gizmo.translation = gizmo_position - new_gizmo.connect("selected", self, "on_path_gizmo_selected", [path_index, point_index]) + new_gizmo.connect("selected", self, "on_path_gizmo_selected", [waypoint_trail, route, path2d, point_index]) new_gizmo.connect("deselected", self, "on_gizmo_deselected") - new_gizmo.connect("updated", self, "set_trail_position", [path_index, point_index]) + new_gizmo.connect("updated", self, "set_trail_position", [waypoint_trail, route, path2d, point_index]) $Gizmos.add_child(new_gizmo) - for index in category3d.icons.size(): + for icon_index in waypoint_category.get_icon().size(): + var waypoint_icon = waypoint_category.get_icon()[icon_index] + var icon = category3d.icons[icon_index] var new_gizmo = gizmo_scene.instance() - new_gizmo.translation = category3d.icons[index].translation - new_gizmo.connect("selected", self, "on_icon_gizmo_selected", [index]) + new_gizmo.translation = get_icon_position(waypoint_icon) + new_gizmo.connect("selected", self, "on_icon_gizmo_selected", [waypoint_icon, icon]) new_gizmo.connect("deselected", self, "on_gizmo_deselected") - new_gizmo.connect("updated", self, "set_icon_position", [index]) + new_gizmo.connect("updated", self, "set_icon_position", [waypoint_icon, icon]) $Gizmos.add_child(new_gizmo) var currently_selected_gizmo = null -var currently_selected_icon_index = null -var currently_selected_path_index = null +var currently_selected_icon = null +var currently_selected_waypoint_icon = null +var currently_selected_waypoint_trail = null +var currently_selected_path3d = null +var currently_selected_path2d = null var currently_selected_point_index = null func set_2D_position_from_3D_point(position: Vector3, path2D: Line2D, index: int): path2D.set_point_position(index, Vector2(position.x, position.z)) -func on_icon_gizmo_selected(object: Spatial, icon_index: int): +func on_icon_gizmo_selected(object: Spatial, waypoint_icon: Waypoint.Icon, icon: Sprite3D): self.currently_selected_gizmo = object - self.currently_selected_icon_index = icon_index + self.currently_selected_icon = icon + self.currently_selected_waypoint_icon = waypoint_icon $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/DeleteNode.disabled = false $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/SnapSelectedToPlayer.disabled = false $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/XZSnapToPlayer.disabled = false $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/YSnapToPlayer.disabled = false -func on_path_gizmo_selected(object: Spatial, path_index: int, point_index: int): +func on_path_gizmo_selected(object: Spatial, waypoint_trail: Waypoint.Trail, path3d: Spatial, path2d: Line2D, point_index: int): self.currently_selected_gizmo = object - self.currently_selected_path_index = path_index + self.currently_selected_waypoint_trail = waypoint_trail + self.currently_selected_path3d = path3d + self.currently_selected_path2d = path2d self.currently_selected_point_index = point_index $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/DeleteNode.disabled = false $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/NewPathPointAfter.disabled = false @@ -732,8 +745,11 @@ func on_path_gizmo_selected(object: Spatial, path_index: int, point_index: int): func on_gizmo_deselected(): self.currently_selected_gizmo = null - self.currently_selected_icon_index = null - self.currently_selected_path_index = null + self.currently_selected_icon = null + self.currently_selected_waypoint_icon = null + self.currently_selected_waypoint_trail = null + self.currently_selected_path3d = null + self.currently_selected_path2d = null self.currently_selected_point_index = null $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/DeleteNode.disabled = true $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/NewPathPointAfter.disabled = true @@ -752,88 +768,102 @@ func clear_adjustment_nodes(): ################################################################################ # Update Waypoint datum ################################################################################ -func set_icon_position(position: Vector3, icon_index: int): - var icon = self.currently_active_category.get_metadata(0).category3d.icons[icon_index] - icon.waypoint.new_position(position) - icon.set_position(icon.waypoint.get_position()) - -func remove_icon(icon_index: int): - var category: CategoryData = self.currently_active_category.get_metadata(0) - var icons = category.waypoint_category.get_icon() - icons.remove(icon_index) +func set_icon_position(new_position: Vector3, waypoint_icon: Waypoint.Icon, icon: Sprite3D): + if icon.waypoint != waypoint_icon: + push_error("Desync between Waypoint and Icon") + var position = waypoint_icon.new_position() + position.set_x(new_position.x) + position.set_y(new_position.y) + position.set_z(new_position.z) + icon.set_position(new_position) + +func remove_icon(waypoint_icon: Waypoint.Icon, icon: Sprite3D): + if icon.waypoint != waypoint_icon: + push_error("Desync between Waypoint and Icon") + var category: Node = icon.get_parent() + var icon_index: int = category.icons.find(icon) + category.waypoint_category.get_icon().remove(icon_index) category.category3d.remove_icon(icon_index) -func set_trail_position(position: Vector3, path_index: int, point_index: int): - var trail_data = self.currently_active_category.get_metadata(0).category3d.paths[path_index].waypoint.get_trail_data() +func get_icon_position(waypoint_icon: Waypoint.Icon): + var position: Vector3 + position[0] = waypoint_icon.get_position().get_x() + position[1] = waypoint_icon.get_position().get_y() + position[2] = -waypoint_icon.get_position().get_z() + return position + +func set_trail_position(position: Vector3, waypoint_trail: Waypoint.Trail, path: Spatial, path2d: Line2D, point_index: int): + if path.waypoint != path2d.waypoint or path2d.waypoint != waypoint_trail: + push_error("Desync between Waypoint, Route, and Route2D") + var trail_data = waypoint_trail.get_trail_data() trail_data.get_points_x()[point_index] = position.x trail_data.get_points_y()[point_index] = position.y trail_data.get_points_z()[point_index] = -position.z - refresh_path3D_points(path_index) - refresh_path2D_points(path_index) + refresh_path3d_points(path) + refresh_path2d_points(path2d) -func reverse_trail(path_index: int): - var trail_data = self.currently_active_category.get_metadata(0).category3d.paths[path_index].waypoint.get_trail_data() +func reverse_trail(waypoint_trail: Waypoint.Trail, path: Spatial, path2d: Line2D): + if path.waypoint != path2d.waypoint or path2d.waypoint != waypoint_trail: + push_error("Desync between Waypoint, Route, and Route2D") + var trail_data = waypoint_trail.get_trail_data() trail_data.get_points_x().invert() trail_data.get_points_y().invert() trail_data.get_points_z().invert() - refresh_path3D_points(path_index) - refresh_path2D_points(path_index) + refresh_path3d_points(path) + refresh_path2d_points(path2d) -func get_trail_point_count(path_index: int): - var trail_data = self.currently_active_category.get_metadata(0).category3d.paths[path_index].waypoint.get_trail_data() - return len(trail_data.get_points_x()) +func get_trail_point_count(waypoint_trail: Waypoint.Trail): + var trail_data = waypoint_trail.get_trail_data() + return trail_data.get_points_x().size() -func get_trail_point_position(path_index: int, point_index: int): +func get_trail_point_position(waypoint_trail: Waypoint.Trail, point_index: int): var position: Vector3 - var trail_data = self.currently_active_category.get_metadata(0).category3d.paths[path_index].waypoint.get_trail_data() + var trail_data = waypoint_trail.get_trail_data() position[0] = trail_data.get_points_x()[point_index] position[1] = trail_data.get_points_y()[point_index] - position[2] = trail_data.get_points_z()[point_index] + position[2] = -trail_data.get_points_z()[point_index] return position -func add_trail_point(position: Vector3, path_index: int, point_index: int = -1): - var trail_data = self.currently_active_category.get_metadata(0).category3d.paths[path_index].waypoint.get_trail_data() +func add_trail_point(position: Vector3, waypoint_trail: Waypoint.Trail, path: Spatial, path2d: Line2D, point_index: int = -1): + if path.waypoint != path2d.waypoint or path2d.waypoint != waypoint_trail: + push_error("Desync between Waypoint, Route, and Route2D") + var trail_data = path.waypoint.get_trail_data() if point_index == -1: trail_data.get_points_x().append(position.x) trail_data.get_points_y().append(position.y) - trail_data.get_points_z().append(-position.z) + trail_data.get_points_z().append(position.z) else: trail_data.get_points_x().insert(point_index, position.x) trail_data.get_points_y().insert(point_index, position.y) trail_data.get_points_z().insert(point_index, -position.z) - refresh_path3D_points(path_index) - refresh_path2D_points(path_index) - -func remove_trail_point(position: Vector3, path_index: int, point_index: int = -1): - var trail_data = self.currently_active_category.get_metadata(0).category3d.paths[path_index].waypoint.get_trail_data() - trail_data.get_points_x().remove(position.x) - trail_data.get_points_y().remove(position.y) - trail_data.get_points_z().remove(-position.z) - refresh_path3D_points(path_index) - refresh_path2D_points(path_index) - -func new_trail_point_after(path_index: int, point_index: int): - var start: Vector3 = get_trail_point_position(path_index, point_index) + refresh_path3d_points(path) + refresh_path2d_points(path2d) + +func remove_trail_point(waypoint_trail: Waypoint.Trail, path: Spatial, path2d: Line2D, point_index: int): + if path.waypoint != path2d.waypoint or path2d.waypoint != waypoint_trail: + push_error("Desync between Waypoint, Route, and Route2D") + var trail_data = path.waypoint.get_trail_data() + trail_data.get_points_x().remove(point_index) + trail_data.get_points_y().remove(point_index) + trail_data.get_points_z().remove(point_index) + refresh_path3d_points(path) + refresh_path2d_points(path2d) + +func new_trail_point_after(waypoint_trail: Waypoint.Trail, path: Spatial, path2d: Line2D, point_index: int): + var start: Vector3 = get_trail_point_position(waypoint_trail, point_index) var target_position: Vector3 - if get_trail_point_count(path_index) > point_index+1: - var end: Vector3 = get_trail_point_position(path_index, point_index+1) + if get_trail_point_count(waypoint_trail) > point_index+1: + var end: Vector3 = get_trail_point_position(waypoint_trail, point_index+1) target_position = ((start-end)/2) + end else: target_position = Vector3(self.player_position.x, self.player_position.y, -self.player_position.z) - add_trail_point(target_position, point_index+1) + add_trail_point(target_position, waypoint_trail, path, path2d, point_index+1) -func refresh_path3D_points(path_index: int): - var path_points := PoolVector3Array() - var path3d = self.currently_active_category.get_metadata(0).category3d.paths[path_index] - var trail_data = path3d.waypoint.get_trail_data() - for index in range(0, trail_data.get_points_z().size()): - path_points.append(Vector3(trail_data.get_points_x()[index], trail_data.get_points_y()[index], -trail_data.get_points_z()[index])) - path3d.point_list = path_points - path3d.refresh_mesh() +func refresh_path3d_points(path: Spatial): + path.refresh_mesh() -func refresh_path2D_points(path_index: int): +func refresh_path2d_points(path2d: Line2D): var path_points := PoolVector2Array() - var path2d = self.currently_active_category.get_metadata(0).category2d.paths[path_index] var trail_data = path2d.waypoint.get_trail_data() for index in range(0, trail_data.get_points_z().size()): path_points.append(Vector2(trail_data.get_points_x()[index], -trail_data.get_points_z()[index])) @@ -901,7 +931,9 @@ func _on_TexturePathOpen_file_selected(path): # a path node is created. ################################################################################ func _on_NewPath_pressed(): - self.currently_active_path_index = null + self.currently_active_path = null + self.currently_active_path2d = null + self.currently_active_waypoint_trail = null ################################################################################ # Create a new icon and give it the texture @@ -917,17 +949,21 @@ func _on_NewIcon_pressed(): # A new path point is created func _on_NewPathPoint_pressed(): - if self.currently_active_path_index == null: + if self.currently_active_path3d == null: + if self.currently_active_category == null: + print("No category selected") + return var waypoint_category: Waypoint.Category = self.currently_active_category.get_metadata(0).waypoint_category var waypoint_trail = waypoint_category.add_trail() var trail_data = waypoint_trail.new_trail_data() trail_data.add_points_x(self.player_position.x) trail_data.add_points_y(self.player_position.y) trail_data.add_points_z(-self.player_position.z) - gen_new_path([self.player_position], self.next_texture_path, waypoint_trail, self.currently_active_category) - self.currently_active_path_index = len(waypoint_category.get_trail()) - 1 + var new_paths = gen_new_path([self.player_position], self.next_texture_path, waypoint_trail, self.currently_active_category) + self.currently_active_path3d = new_paths[0] + self.currently_active_path2d = new_paths[1] else: - add_trail_point(self.player_position, self.currently_active_path_index) + add_trail_point(self.player_position, self.currently_active_waypoint_trail, self.currently_active_path3d, self.currently_active_path2d) func _on_NodeEditorDialog_hide(): on_gizmo_deselected() @@ -936,18 +972,18 @@ func _on_NodeEditorDialog_hide(): func _on_DeleteNode_pressed(): - if self.currently_selected_icon_index != null: - remove_icon(self.currently_selected_icon_index) - if self.currently_selected_path_index != null: - remove_trail_point(self.currently_selected_path_index, self.currently_selected_point_index) + if self.currently_selected_waypoint_icon != null: + remove_icon(self.currently_selected_waypoint_icon, self.currently_selected_icon) + if self.currently_selected_waypoint_trail != null : + remove_trail_point(self.currently_selected_waypoint_trail, self.currently_selected_path3d, self.currently_active_path2d, self.currently_selected_point_index) on_gizmo_deselected() clear_adjustment_nodes() gen_adjustment_nodes() func _on_NewPathPointAfter_pressed(): - if self.currently_selected_path_index != null: - new_trail_point_after(self.currently_selected_path_index, self.currently_selected_point_index) + if self.currently_selected_waypoint_trail != null: + new_trail_point_after(self.currently_selected_waypoint_trail, self.currently_selected_path3d, self.currently_selected_path2d, self.currently_selected_point_index) on_gizmo_deselected() clear_adjustment_nodes() gen_adjustment_nodes() @@ -975,12 +1011,16 @@ func _on_SnapSelectedToPlayer_pressed(): self.currently_selected_gizmo.translation.z = -self.player_position.z self.currently_selected_gizmo.translation.y = self.player_position.y + func _on_SetActivePath_pressed(): - self.currently_active_path_index = self.currently_selected_path_index + self.currently_active_waypoint_trail = self.currently_selected_waypoint_trail + self.currently_active_path3d = self.currently_selected_path3d + self.currently_active_path2d = self.currently_selected_path2d func _on_ReversePathDirection_pressed(): - reverse_trail(self.currently_selected_path_index) + if self.currently_selected_waypoint_trail != null: + reverse_trail(self.currently_selected_waypoint_trail, self.currently_selected_path3d, self.currently_active_path2d) on_gizmo_deselected() clear_adjustment_nodes() gen_adjustment_nodes() @@ -999,6 +1039,11 @@ func _on_Settings_pressed(): func _on_MarkersUI_cell_selected(): var category_item = self.markers_ui.get_selected() self.currently_active_category = category_item + self.currently_active_path2d = null + self.currently_active_path3d = null + self.currently_active_waypoint_trail = null + on_gizmo_deselected() + clear_adjustment_nodes() func _on_MarkersUI_item_edited(): From 872dee2b12d9759836f72e40c80e661777c64ac5 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Fri, 14 Jun 2024 00:33:43 -0400 Subject: [PATCH 491/539] Changing the remove_icon function to pass in the icon --- Category3D.gd | 3 +-- Spatial.gd | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Category3D.gd b/Category3D.gd index 85fcb7d9..50b18bb1 100644 --- a/Category3D.gd +++ b/Category3D.gd @@ -24,7 +24,6 @@ func clear_all(): for child in self.get_children(): child.queue_free() -func remove_icon(icon_index: int): - var icon = self.icons[icon_index] +func remove_icon(icon): self.icons.remove(icon) icon.queue_free() diff --git a/Spatial.gd b/Spatial.gd index 5c36b81d..ad028a7c 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -783,7 +783,7 @@ func remove_icon(waypoint_icon: Waypoint.Icon, icon: Sprite3D): var category: Node = icon.get_parent() var icon_index: int = category.icons.find(icon) category.waypoint_category.get_icon().remove(icon_index) - category.category3d.remove_icon(icon_index) + category.category3d.remove_icon(icon) func get_icon_position(waypoint_icon: Waypoint.Icon): var position: Vector3 From 7ea217389c288c7b14e70e9de04988c4ce0c2285 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 16 Jun 2024 22:26:01 -0400 Subject: [PATCH 492/539] Deleted obsolete functions and variables --- Route.gd | 41 ----------------------------------------- Route2D.gd | 20 ++++++-------------- Spatial.gd | 52 ++++++++++++++++++---------------------------------- 3 files changed, 24 insertions(+), 89 deletions(-) diff --git a/Route.gd b/Route.gd index 2916f9e5..258ffa74 100644 --- a/Route.gd +++ b/Route.gd @@ -7,12 +7,6 @@ var color = Color(0.9, 0.1, 0.1) var waypoint: Waypoint.Trail var category: TreeItem -var point_list := PoolVector3Array() - -func create_mesh(point_list: PoolVector3Array): - self.point_list = point_list - refresh_mesh() - func refresh_mesh(): var tmpMesh = Mesh.new() var i = 0 @@ -66,41 +60,6 @@ func refresh_mesh(): $MeshInstance.mesh = tmpMesh -func update_point_vertical(index, y_value): - pass - -func reverse(): - self.point_list.invert() - refresh_mesh() - -func get_point_count(): - return len(self.point_list) - -func get_point_position(index: int): - return self.point_list[index] - -func set_point_position(position: Vector3, index: int): - self.point_list[index] = position - refresh_mesh() - -func add_point(position: Vector3, index: int = -1): - if index == -1: - self.point_list.append(position) - else: - self.point_list.insert(index, position) - refresh_mesh() - -func remove_point(index: int): - self.point_list.remove(index) - refresh_mesh() - -func new_point_after(midpoint: Vector3, index: int): - var start: Vector3 = self.get_point_position(index) - if self.get_point_count() > index+1: - var end: Vector3 = self.get_point_position(index+1) - midpoint = ((start-end)/2) + end - add_point(midpoint, index+1) - func set_texture(texture): $MeshInstance.material_override.set_shader_param("texture_albedo", texture) diff --git a/Route2D.gd b/Route2D.gd index 742bf34f..6ed0cd1b 100644 --- a/Route2D.gd +++ b/Route2D.gd @@ -3,17 +3,9 @@ extends Line2D const Waypoint = preload("res://waypoint.gd") var waypoint: Waypoint.Trail -func new_point_after(midpoint: Vector3, index: int): - var midpoint2d: Vector2 = Vector2(midpoint.x, midpoint.z) - var start: Vector2 = self.get_point_position(index) - - if self.get_point_count() > index+1: - var end: Vector2 = self.get_point_position(index+1) - midpoint2d = ((start-end)/2) + end - add_point(midpoint2d, index+1) - -func remove_point(index: int): - self.remove_point(index) - -func reverse(): - self.points.invert() +func refresh_points(): + var path_points := PoolVector2Array() + var trail_data = self.waypoint.get_trail_data() + for index in range(0, trail_data.get_points_z().size()): + path_points.append(Vector2(trail_data.get_points_x()[index], -trail_data.get_points_z()[index])) + self.points = path_points diff --git a/Spatial.gd b/Spatial.gd index ad028a7c..3d49bef3 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -533,32 +533,21 @@ func _waypoint_categories_to_godot_nodes(item: TreeItem, waypoint_category: Wayp godot_category2d.visible = category_data.is_visible for path in waypoint_category.get_trail(): - var path_points := PoolVector3Array() - var trail_data = path.get_trail_data() - if trail_data.get_points_x().size() != trail_data.get_points_y().size() or trail_data.get_points_x().size() != trail_data.get_points_z().size(): - print("Warning: Trail ", category_name, " does not have equal number of X, Y, and Z coordinates.") - for index in range(0, trail_data.get_points_z().size()): - path_points.append(Vector3(trail_data.get_points_x()[index], trail_data.get_points_y()[index], trail_data.get_points_z()[index])) var texture_id = path.get_texture_id() if texture_id == null: print("Warning: No texture found in " , category_name) continue var full_texture_path = self.marker_file_dir + self.waypoint_data.get_textures()[texture_id].get_filepath() - gen_new_path(path_points, full_texture_path, path, category_item) + gen_new_path(full_texture_path, path, category_item) for icon in waypoint_category.get_icon(): - var position = icon.get_position() - if position == null: - print("Warning: No position found for icon ", category_name) - continue - var position_vector = Vector3(position.get_x(), position.get_y(), position.get_z()) var texture_id = icon.get_texture_id() if texture_id == null: print("Warning: No texture found in " , category_name) continue var full_texture_path = self.marker_file_dir + self.waypoint_data.get_textures()[texture_id].get_filepath() - gen_new_icon(position_vector, full_texture_path, icon, category_item) + gen_new_icon(full_texture_path, icon, category_item) for category_child in waypoint_category.get_children(): _waypoint_categories_to_godot_nodes(category_item, category_child, godot_category3d, godot_category2d, true) @@ -579,13 +568,14 @@ func apply_category_visibility_to_nodes(category_item: TreeItem): category_data.category2d.visible = category_data.is_visible -func gen_new_path(points: Array, texture_path: String, waypoint_trail, category_item: TreeItem): +func gen_new_path(texture_path: String, waypoint_trail: Waypoint.Trail, category_item: TreeItem): # Create the texture to use from an image file # TODO: We want to be able to cache this data so that if a texture is used # by multiple objects we only need to keep ony copy of it in memory. #22. # TODO: We want to have two copies of each texture in memory one for 2D # which does not use srgb to render properly, and one for 3D which forces # srgb to render properly. Issue #23. + # TODO: Search within waypoint data for texture paths instead of input var texture_file = File.new() var image = Image.new() if !texture_file.file_exists(texture_path): @@ -600,11 +590,6 @@ func gen_new_path(points: Array, texture_path: String, waypoint_trail, category_ var new_route = route_scene.instance() new_route.texture_path = texture_path # Save the location of the image for later - - var points_3d := PoolVector3Array() - for point in points: - points_3d.append(Vector3(point[0], point[1], -point[2])) - new_route.waypoint = waypoint_trail new_route.refresh_mesh() new_route.set_texture(texture) @@ -615,19 +600,22 @@ func gen_new_path(points: Array, texture_path: String, waypoint_trail, category_ # Create a new 2D Path var new_2d_path = path2d_scene.instance() var points_2d := PoolVector2Array() - for point in points: - points_2d.append(Vector2(point[0], -point[2])) - new_2d_path.points = points_2d new_2d_path.texture = texture new_2d_path.waypoint = waypoint_trail + new_2d_path.refresh_points() category_data.category2d.add_path2d(new_2d_path) return [new_route, new_2d_path] -func gen_new_icon(position: Vector3, texture_path: String, waypoint_icon, category_item: TreeItem): - position.z = -position.z +func gen_new_icon(texture_path: String, waypoint_icon: Waypoint.Icon, category_item: TreeItem): + # TODO: Search within waypoint data for texture paths instead of input + var position = waypoint_icon.get_position() + if position == null: + print("Warning: No position found for icon ", category_item.get_metadata(0).waypoint_category.get_name()) + return + var position_vector = Vector3(position.get_x(), position.get_y(), -position.get_z()) var new_icon = icon_scene.instance() - new_icon.translation = position + new_icon.translation = position_vector new_icon.set_icon_image(texture_path) new_icon.waypoint = waypoint_icon var category_data = category_item.get_metadata(0) @@ -695,7 +683,7 @@ func gen_adjustment_nodes(): new_gizmo.translation = gizmo_position new_gizmo.connect("selected", self, "on_path_gizmo_selected", [waypoint_trail, route, path2d, point_index]) new_gizmo.connect("deselected", self, "on_gizmo_deselected") - new_gizmo.connect("updated", self, "set_trail_position", [waypoint_trail, route, path2d, point_index]) + new_gizmo.connect("updated", self, "set_trail_point_position", [waypoint_trail, route, path2d, point_index]) $Gizmos.add_child(new_gizmo) for icon_index in waypoint_category.get_icon().size(): var waypoint_icon = waypoint_category.get_icon()[icon_index] @@ -792,7 +780,7 @@ func get_icon_position(waypoint_icon: Waypoint.Icon): position[2] = -waypoint_icon.get_position().get_z() return position -func set_trail_position(position: Vector3, waypoint_trail: Waypoint.Trail, path: Spatial, path2d: Line2D, point_index: int): +func set_trail_point_position(position: Vector3, waypoint_trail: Waypoint.Trail, path: Spatial, path2d: Line2D, point_index: int): if path.waypoint != path2d.waypoint or path2d.waypoint != waypoint_trail: push_error("Desync between Waypoint, Route, and Route2D") var trail_data = waypoint_trail.get_trail_data() @@ -863,11 +851,7 @@ func refresh_path3d_points(path: Spatial): path.refresh_mesh() func refresh_path2d_points(path2d: Line2D): - var path_points := PoolVector2Array() - var trail_data = path2d.waypoint.get_trail_data() - for index in range(0, trail_data.get_points_z().size()): - path_points.append(Vector2(trail_data.get_points_x()[index], -trail_data.get_points_z()[index])) - path2d.points = path_points + path2d.refresh_points() ################################################################################ @@ -945,7 +929,7 @@ func _on_NewIcon_pressed(): position.set_x(self.player_position.x) position.set_y(self.player_position.y) position.set_z(-self.player_position.z) - gen_new_icon(self.player_position, self.next_texture_path, waypoint_icon, self.currently_active_category) + gen_new_icon(self.next_texture_path, waypoint_icon, self.currently_active_category) # A new path point is created func _on_NewPathPoint_pressed(): @@ -959,7 +943,7 @@ func _on_NewPathPoint_pressed(): trail_data.add_points_x(self.player_position.x) trail_data.add_points_y(self.player_position.y) trail_data.add_points_z(-self.player_position.z) - var new_paths = gen_new_path([self.player_position], self.next_texture_path, waypoint_trail, self.currently_active_category) + var new_paths = gen_new_path(self.next_texture_path, waypoint_trail, self.currently_active_category) self.currently_active_path3d = new_paths[0] self.currently_active_path2d = new_paths[1] else: From 513f1636f6f39c2f9a55ed3507513d184d9f2c48 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 17 Jun 2024 19:13:46 -0400 Subject: [PATCH 493/539] Changed all instances of the word path or route to Trail --- Category2D.gd | 8 +- Category3D.gd | 10 +- Route.tscn | 10 -- Spatial.gd | 219 +++++++++++++++++------------------ Spatial.tscn | 50 ++++---- Route.gd => Trail.gd | 0 Route.tres => Trail.tres | 0 Trail.tscn | 10 ++ Route2D.gd => Trail2D.gd | 6 +- Route2D.tscn => Trail2D.tscn | 2 +- 10 files changed, 157 insertions(+), 158 deletions(-) delete mode 100644 Route.tscn rename Route.gd => Trail.gd (100%) rename Route.tres => Trail.tres (100%) create mode 100644 Trail.tscn rename Route2D.gd => Trail2D.gd (56%) rename Route2D.tscn => Trail2D.tscn (94%) diff --git a/Category2D.gd b/Category2D.gd index 27d5fadd..ebdbf432 100644 --- a/Category2D.gd +++ b/Category2D.gd @@ -1,18 +1,18 @@ extends Node2D -var paths2d: Array = [] +var trails2d: Array = [] var subcategories: Array = [] -func add_path2d(path): +func add_trail2d(path): self.add_child(path, true) - paths2d.push_back(path) + trails2d.push_back(path) func add_subcategory(subcategory): self.add_child(subcategory, true) subcategories.push_back(subcategory) func clear_all(): - self.paths2d = [] + self.trails2d = [] self.subcategories = [] for child in self.get_children(): child.queue_free() diff --git a/Category3D.gd b/Category3D.gd index 50b18bb1..693117a7 100644 --- a/Category3D.gd +++ b/Category3D.gd @@ -1,13 +1,13 @@ extends Spatial -var paths: Array = [] +var trails: Array = [] var icons: Array = [] var subcategories: Array = [] -func add_path(path): - self.add_child(path, true) - paths.push_back(path) +func add_trail(trail): + self.add_child(trail, true) + trails.push_back(trail) func add_icon(icon): self.add_child(icon, true) @@ -18,7 +18,7 @@ func add_subcategory(subcategory): subcategories.push_back(subcategory) func clear_all(): - self.paths = [] + self.trails = [] self.icons = [] self.subcategories = [] for child in self.get_children(): diff --git a/Route.tscn b/Route.tscn deleted file mode 100644 index 35c293f9..00000000 --- a/Route.tscn +++ /dev/null @@ -1,10 +0,0 @@ -[gd_scene load_steps=3 format=2] - -[ext_resource path="res://Route.gd" type="Script" id=1] -[ext_resource path="res://Route.tres" type="Material" id=2] - -[node name="Path" type="Spatial"] -script = ExtResource( 1 ) - -[node name="MeshInstance" type="MeshInstance" parent="."] -material_override = ExtResource( 2 ) diff --git a/Spatial.gd b/Spatial.gd index 3d49bef3..1c6566b7 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -14,11 +14,11 @@ var edit_panel_open: bool = false # object or icon object in the UI var next_texture_path: String = "" -# A pointer to the path object that any new nodes should be appended to. If -# the value is null then a new path will be created the next time a path point +# A pointer to the trail object that any new nodes should be appended to. If +# the value is null then a new trail will be created the next time a trail point # will be created. -var currently_active_path3d = null -var currently_active_path2d = null +var currently_active_trail3d = null +var currently_active_trail2d = null var currently_active_waypoint_trail = null var currently_active_category = null @@ -37,7 +37,7 @@ var compass_width: int = 0; # A temporary setting able to be configured by the user. It is used to allow # for faster trail mesh generation. The higher the value the fewer samples are # taken for the MeshCSG leading to an overall lower number of polygons. -var path_resolution = 1 +var trail_resolution = 1 #x11 fg and window id var x11_fg: X11_FG @@ -46,11 +46,11 @@ var x11_window_id_burrito: int var is_transient:bool = false # Scenes used throughout this scene -const route_scene = preload("res://Route.tscn") +const trail_scene = preload("res://Trail.tscn") const icon_scene = preload("res://Icon.tscn") const category3d_scene = preload("res://Category3D.tscn") const category2d_scene = preload("res://Category2D.tscn") -const path2d_scene = preload("res://Route2D.tscn") +const trail2d_scene = preload("res://Trail2D.tscn") const gizmo_scene = preload("res://Gizmo/PointEdit.tscn") # Scripts containing code used by this scene @@ -373,15 +373,15 @@ func reset_minimap_masks(reset_3d: bool = true): reset_3D_minimap_masks(category) func reset_2D_minimap_masks(category2d: Node2D, compass_corner1: Vector2, compass_corner2: Vector2): - for path2d in category2d.paths2d: - path2d.material.set_shader_param("minimap_corner", compass_corner1) - path2d.material.set_shader_param("minimap_corner2", compass_corner2) + for trail2d in category2d.trails2d: + trail2d.material.set_shader_param("minimap_corner", compass_corner1) + trail2d.material.set_shader_param("minimap_corner2", compass_corner2) for subcategory in category2d.subcategories: reset_2D_minimap_masks(subcategory, compass_corner1, compass_corner2) func reset_3D_minimap_masks(category: Spatial): - for path in category.paths: - path.get_node("MeshInstance").material_override.set_shader_param("map_size", Vector2(self.compass_width, self.compass_height)) + for trail in category.trails: + trail.get_node("MeshInstance").material_override.set_shader_param("map_size", Vector2(self.compass_width, self.compass_height)) for icon in category.icons: icon.material_override.set_shader_param("map_size", Vector2(self.compass_width, self.compass_height)) for subcategory in category.subcategories: @@ -532,13 +532,13 @@ func _waypoint_categories_to_godot_nodes(item: TreeItem, waypoint_category: Wayp godot_category3d.visible = category_data.is_visible godot_category2d.visible = category_data.is_visible - for path in waypoint_category.get_trail(): - var texture_id = path.get_texture_id() + for trail in waypoint_category.get_trail(): + var texture_id = trail.get_texture_id() if texture_id == null: print("Warning: No texture found in " , category_name) continue var full_texture_path = self.marker_file_dir + self.waypoint_data.get_textures()[texture_id].get_filepath() - gen_new_path(full_texture_path, path, category_item) + gen_new_trail(full_texture_path, trail, category_item) for icon in waypoint_category.get_icon(): @@ -568,7 +568,7 @@ func apply_category_visibility_to_nodes(category_item: TreeItem): category_data.category2d.visible = category_data.is_visible -func gen_new_path(texture_path: String, waypoint_trail: Waypoint.Trail, category_item: TreeItem): +func gen_new_trail(texture_path: String, waypoint_trail: Waypoint.Trail, category_item: TreeItem): # Create the texture to use from an image file # TODO: We want to be able to cache this data so that if a texture is used # by multiple objects we only need to keep ony copy of it in memory. #22. @@ -588,24 +588,24 @@ func gen_new_path(texture_path: String, waypoint_trail: Waypoint.Trail, category texture.storage = ImageTexture.STORAGE_COMPRESS_LOSSLESS texture.create_from_image(image, 22) - var new_route = route_scene.instance() - new_route.texture_path = texture_path # Save the location of the image for later - new_route.waypoint = waypoint_trail - new_route.refresh_mesh() - new_route.set_texture(texture) + var new_trail = trail_scene.instance() + new_trail.texture_path = texture_path # Save the location of the image for later + new_trail.waypoint = waypoint_trail + new_trail.refresh_mesh() + new_trail.set_texture(texture) var category_data = category_item.get_metadata(0) - category_data.category3d.add_path(new_route) + category_data.category3d.add_trail(new_trail) - # Create a new 2D Path - var new_2d_path = path2d_scene.instance() + # Create a new 2D Trail + var new_2d_trail = trail2d_scene.instance() var points_2d := PoolVector2Array() - new_2d_path.texture = texture - new_2d_path.waypoint = waypoint_trail - new_2d_path.refresh_points() - category_data.category2d.add_path2d(new_2d_path) + new_2d_trail.texture = texture + new_2d_trail.waypoint = waypoint_trail + new_2d_trail.refresh_points() + category_data.category2d.add_trail2d(new_2d_trail) - return [new_route, new_2d_path] + return [new_trail, new_2d_trail] func gen_new_icon(texture_path: String, waypoint_icon: Waypoint.Icon, category_item: TreeItem): # TODO: Search within waypoint data for texture paths instead of input @@ -668,10 +668,10 @@ func gen_adjustment_nodes(): var waypoint_category = self.currently_active_category.get_metadata(0).waypoint_category var category3d = self.currently_active_category.get_metadata(0).category3d var category2d = self.currently_active_category.get_metadata(0).category2d - for path_index in waypoint_category.get_trail().size(): - var waypoint_trail = waypoint_category.get_trail()[path_index] - var route = category3d.paths[path_index] - var path2d = category2d.paths2d[path_index] + for trail_index in waypoint_category.get_trail().size(): + var waypoint_trail = waypoint_category.get_trail()[trail_index] + var trail = category3d.trails[trail_index] + var trail2d = category2d.trails2d[trail_index] for point_index in get_trail_point_count(waypoint_trail): var gizmo_position = get_trail_point_position(waypoint_trail, point_index) # Simplistic cull to prevent nodes that are too far away to be @@ -681,9 +681,9 @@ func gen_adjustment_nodes(): continue var new_gizmo = gizmo_scene.instance() new_gizmo.translation = gizmo_position - new_gizmo.connect("selected", self, "on_path_gizmo_selected", [waypoint_trail, route, path2d, point_index]) + new_gizmo.connect("selected", self, "on_trail_gizmo_selected", [waypoint_trail, trail, trail2d, point_index]) new_gizmo.connect("deselected", self, "on_gizmo_deselected") - new_gizmo.connect("updated", self, "set_trail_point_position", [waypoint_trail, route, path2d, point_index]) + new_gizmo.connect("updated", self, "set_trail_point_position", [waypoint_trail, trail, trail2d, point_index]) $Gizmos.add_child(new_gizmo) for icon_index in waypoint_category.get_icon().size(): var waypoint_icon = waypoint_category.get_icon()[icon_index] @@ -699,12 +699,12 @@ var currently_selected_gizmo = null var currently_selected_icon = null var currently_selected_waypoint_icon = null var currently_selected_waypoint_trail = null -var currently_selected_path3d = null -var currently_selected_path2d = null +var currently_selected_trail3d = null +var currently_selected_trail2d = null var currently_selected_point_index = null -func set_2D_position_from_3D_point(position: Vector3, path2D: Line2D, index: int): - path2D.set_point_position(index, Vector2(position.x, position.z)) +func set_2D_position_from_3D_point(position: Vector3, trail2D: Line2D, index: int): + trail2D.set_point_position(index, Vector2(position.x, position.z)) func on_icon_gizmo_selected(object: Spatial, waypoint_icon: Waypoint.Icon, icon: Sprite3D): self.currently_selected_gizmo = object @@ -716,16 +716,16 @@ func on_icon_gizmo_selected(object: Spatial, waypoint_icon: Waypoint.Icon, icon: $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/YSnapToPlayer.disabled = false -func on_path_gizmo_selected(object: Spatial, waypoint_trail: Waypoint.Trail, path3d: Spatial, path2d: Line2D, point_index: int): +func on_trail_gizmo_selected(object: Spatial, waypoint_trail: Waypoint.Trail, trail3d: Spatial, trail2d: Line2D, point_index: int): self.currently_selected_gizmo = object self.currently_selected_waypoint_trail = waypoint_trail - self.currently_selected_path3d = path3d - self.currently_selected_path2d = path2d + self.currently_selected_trail3d = trail3d + self.currently_selected_trail2d = trail2d self.currently_selected_point_index = point_index $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/DeleteNode.disabled = false - $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/NewPathPointAfter.disabled = false - $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/ReversePathDirection.disabled = false - $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/SetActivePath.disabled = false + $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/NewTrailPointAfter.disabled = false + $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/ReverseTrailDirection.disabled = false + $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/SetActiveTrail.disabled = false $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/SnapSelectedToPlayer.disabled = false $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/XZSnapToPlayer.disabled = false $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/YSnapToPlayer.disabled = false @@ -736,16 +736,16 @@ func on_gizmo_deselected(): self.currently_selected_icon = null self.currently_selected_waypoint_icon = null self.currently_selected_waypoint_trail = null - self.currently_selected_path3d = null - self.currently_selected_path2d = null + self.currently_selected_trail3d = null + self.currently_selected_trail2d = null self.currently_selected_point_index = null $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/DeleteNode.disabled = true - $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/NewPathPointAfter.disabled = true + $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/NewTrailPointAfter.disabled = true $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/SnapSelectedToPlayer.disabled = true $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/XZSnapToPlayer.disabled = true $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/YSnapToPlayer.disabled = true - $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/SetActivePath.disabled = true - $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/ReversePathDirection.disabled = true + $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/SetActiveTrail.disabled = true + $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/ReverseTrailDirection.disabled = true func clear_adjustment_nodes(): @@ -780,25 +780,25 @@ func get_icon_position(waypoint_icon: Waypoint.Icon): position[2] = -waypoint_icon.get_position().get_z() return position -func set_trail_point_position(position: Vector3, waypoint_trail: Waypoint.Trail, path: Spatial, path2d: Line2D, point_index: int): - if path.waypoint != path2d.waypoint or path2d.waypoint != waypoint_trail: - push_error("Desync between Waypoint, Route, and Route2D") +func set_trail_point_position(position: Vector3, waypoint_trail: Waypoint.Trail, trail: Spatial, trail2d: Line2D, point_index: int): + if trail.waypoint != trail2d.waypoint or trail2d.waypoint != waypoint_trail: + push_error("Desync between Waypoint, Trail, and Trail2D") var trail_data = waypoint_trail.get_trail_data() trail_data.get_points_x()[point_index] = position.x trail_data.get_points_y()[point_index] = position.y trail_data.get_points_z()[point_index] = -position.z - refresh_path3d_points(path) - refresh_path2d_points(path2d) + refresh_trail3d_points(trail) + refresh_trail2d_points(trail2d) -func reverse_trail(waypoint_trail: Waypoint.Trail, path: Spatial, path2d: Line2D): - if path.waypoint != path2d.waypoint or path2d.waypoint != waypoint_trail: - push_error("Desync between Waypoint, Route, and Route2D") +func reverse_trail(waypoint_trail: Waypoint.Trail, trail: Spatial, trail2d: Line2D): + if trail.waypoint != trail2d.waypoint or trail2d.waypoint != waypoint_trail: + push_error("Desync between Waypoint, Trail, and Trail2D") var trail_data = waypoint_trail.get_trail_data() trail_data.get_points_x().invert() trail_data.get_points_y().invert() trail_data.get_points_z().invert() - refresh_path3d_points(path) - refresh_path2d_points(path2d) + refresh_trail3d_points(trail) + refresh_trail2d_points(trail2d) func get_trail_point_count(waypoint_trail: Waypoint.Trail): var trail_data = waypoint_trail.get_trail_data() @@ -812,10 +812,10 @@ func get_trail_point_position(waypoint_trail: Waypoint.Trail, point_index: int): position[2] = -trail_data.get_points_z()[point_index] return position -func add_trail_point(position: Vector3, waypoint_trail: Waypoint.Trail, path: Spatial, path2d: Line2D, point_index: int = -1): - if path.waypoint != path2d.waypoint or path2d.waypoint != waypoint_trail: - push_error("Desync between Waypoint, Route, and Route2D") - var trail_data = path.waypoint.get_trail_data() +func add_trail_point(position: Vector3, waypoint_trail: Waypoint.Trail, trail: Spatial, trail2d: Line2D, point_index: int = -1): + if trail.waypoint != trail2d.waypoint or trail2d.waypoint != waypoint_trail: + push_error("Desync between Waypoint, Trail, and Trail2D") + var trail_data = trail.waypoint.get_trail_data() if point_index == -1: trail_data.get_points_x().append(position.x) trail_data.get_points_y().append(position.y) @@ -824,20 +824,20 @@ func add_trail_point(position: Vector3, waypoint_trail: Waypoint.Trail, path: Sp trail_data.get_points_x().insert(point_index, position.x) trail_data.get_points_y().insert(point_index, position.y) trail_data.get_points_z().insert(point_index, -position.z) - refresh_path3d_points(path) - refresh_path2d_points(path2d) + refresh_trail3d_points(trail) + refresh_trail2d_points(trail2d) -func remove_trail_point(waypoint_trail: Waypoint.Trail, path: Spatial, path2d: Line2D, point_index: int): - if path.waypoint != path2d.waypoint or path2d.waypoint != waypoint_trail: - push_error("Desync between Waypoint, Route, and Route2D") - var trail_data = path.waypoint.get_trail_data() +func remove_trail_point(waypoint_trail: Waypoint.Trail, trail: Spatial, trail2d: Line2D, point_index: int): + if trail.waypoint != trail2d.waypoint or trail2d.waypoint != waypoint_trail: + push_error("Desync between Waypoint, Trail, and Trail2D") + var trail_data = trail.waypoint.get_trail_data() trail_data.get_points_x().remove(point_index) trail_data.get_points_y().remove(point_index) trail_data.get_points_z().remove(point_index) - refresh_path3d_points(path) - refresh_path2d_points(path2d) + refresh_trail3d_points(trail) + refresh_trail2d_points(trail2d) -func new_trail_point_after(waypoint_trail: Waypoint.Trail, path: Spatial, path2d: Line2D, point_index: int): +func new_trail_point_after(waypoint_trail: Waypoint.Trail, trail: Spatial, trail2d: Line2D, point_index: int): var start: Vector3 = get_trail_point_position(waypoint_trail, point_index) var target_position: Vector3 if get_trail_point_count(waypoint_trail) > point_index+1: @@ -845,13 +845,13 @@ func new_trail_point_after(waypoint_trail: Waypoint.Trail, path: Spatial, path2d target_position = ((start-end)/2) + end else: target_position = Vector3(self.player_position.x, self.player_position.y, -self.player_position.z) - add_trail_point(target_position, waypoint_trail, path, path2d, point_index+1) + add_trail_point(target_position, waypoint_trail, trail, trail2d, point_index+1) -func refresh_path3d_points(path: Spatial): - path.refresh_mesh() +func refresh_trail3d_points(trail: Spatial): + trail.refresh_mesh() -func refresh_path2d_points(path2d: Line2D): - path2d.refresh_points() +func refresh_trail2d_points(trail2d: Line2D): + trail2d.refresh_points() ################################################################################ @@ -868,7 +868,7 @@ func _on_Dialog_hide(): set_minimal_mouse_block() -func _on_LoadPath_pressed(): +func _on_LoadTrail_pressed(): if $Control/Dialogs/CategoriesDialog.is_visible(): $Control/Dialogs/CategoriesDialog.hide() else: @@ -879,12 +879,12 @@ func _on_RangesButton_pressed(): $Control/Dialogs/RangesDialog.show() -func _on_PathResolution_value_changed(value): - path_resolution = value - for path in $Paths.get_children(): - var csg:CSGPolygon = path.get_node("CSGPolygon") - csg.path_interval = path_resolution - csg.material.set_shader_param("interval", path_resolution) +func _on_TrailResolution_value_changed(value): + trail_resolution = value + for trail in $Trails.get_children(): + var csg:CSGPolygon = trail.get_node("CSGPolygon") + csg.trail_interval = trail_resolution + csg.material.set_shader_param("interval", trail_resolution) func _on_CloseEditorQuickPanel_pressed(): @@ -904,19 +904,19 @@ func _on_ChangeTexture_pressed(): set_maximal_mouse_block() ################################################################################ -# Set the file that will be used to create a new path or icon when a new path +# Set the file that will be used to create a new trail or icon when a new trail # or icon is created. ################################################################################ func _on_TexturePathOpen_file_selected(path): self.next_texture_path = path ################################################################################ -# Null out the currently active path so that a new one is created the next time -# a path node is created. +# Null out the currently active trail so that a new one is created the next time +# a trail node is created. ################################################################################ -func _on_NewPath_pressed(): - self.currently_active_path = null - self.currently_active_path2d = null +func _on_NewTrail_pressed(): + self.currently_active_trail = null + self.currently_active_trail2d = null self.currently_active_waypoint_trail = null ################################################################################ @@ -929,11 +929,11 @@ func _on_NewIcon_pressed(): position.set_x(self.player_position.x) position.set_y(self.player_position.y) position.set_z(-self.player_position.z) - gen_new_icon(self.next_texture_path, waypoint_icon, self.currently_active_category) + gen_new_icon(self.next_texture_trail, waypoint_icon, self.currently_active_category) -# A new path point is created -func _on_NewPathPoint_pressed(): - if self.currently_active_path3d == null: +# A new trail point is created +func _on_NewTrailPoint_pressed(): + if self.currently_active_trail3d == null: if self.currently_active_category == null: print("No category selected") return @@ -943,11 +943,11 @@ func _on_NewPathPoint_pressed(): trail_data.add_points_x(self.player_position.x) trail_data.add_points_y(self.player_position.y) trail_data.add_points_z(-self.player_position.z) - var new_paths = gen_new_path(self.next_texture_path, waypoint_trail, self.currently_active_category) - self.currently_active_path3d = new_paths[0] - self.currently_active_path2d = new_paths[1] + var new_trails = gen_new_trail(self.next_texture_path, waypoint_trail, self.currently_active_category) + self.currently_active_trail3d = new_trails[0] + self.currently_active_trail2d = new_trails[1] else: - add_trail_point(self.player_position, self.currently_active_waypoint_trail, self.currently_active_path3d, self.currently_active_path2d) + add_trail_point(self.player_position, self.currently_active_waypoint_trail, self.currently_active_trail3d, self.currently_active_trail2d) func _on_NodeEditorDialog_hide(): on_gizmo_deselected() @@ -959,15 +959,15 @@ func _on_DeleteNode_pressed(): if self.currently_selected_waypoint_icon != null: remove_icon(self.currently_selected_waypoint_icon, self.currently_selected_icon) if self.currently_selected_waypoint_trail != null : - remove_trail_point(self.currently_selected_waypoint_trail, self.currently_selected_path3d, self.currently_active_path2d, self.currently_selected_point_index) + remove_trail_point(self.currently_selected_waypoint_trail, self.currently_selected_trail3d, self.currently_active_trail2d, self.currently_selected_point_index) on_gizmo_deselected() clear_adjustment_nodes() gen_adjustment_nodes() -func _on_NewPathPointAfter_pressed(): +func _on_NewTrailPointAfter_pressed(): if self.currently_selected_waypoint_trail != null: - new_trail_point_after(self.currently_selected_waypoint_trail, self.currently_selected_path3d, self.currently_selected_path2d, self.currently_selected_point_index) + new_trail_point_after(self.currently_selected_waypoint_trail, self.currently_selected_trail3d, self.currently_selected_trail2d, self.currently_selected_point_index) on_gizmo_deselected() clear_adjustment_nodes() gen_adjustment_nodes() @@ -996,15 +996,15 @@ func _on_SnapSelectedToPlayer_pressed(): self.currently_selected_gizmo.translation.y = self.player_position.y -func _on_SetActivePath_pressed(): +func _on_SetActiveTrail_pressed(): self.currently_active_waypoint_trail = self.currently_selected_waypoint_trail - self.currently_active_path3d = self.currently_selected_path3d - self.currently_active_path2d = self.currently_selected_path2d + self.currently_active_trail3d = self.currently_selected_trail3d + self.currently_active_trail2d = self.currently_selected_trail2d -func _on_ReversePathDirection_pressed(): +func _on_ReverseTrailDirection_pressed(): if self.currently_selected_waypoint_trail != null: - reverse_trail(self.currently_selected_waypoint_trail, self.currently_selected_path3d, self.currently_active_path2d) + reverse_trail(self.currently_selected_waypoint_trail, self.currently_selected_trail3d, self.currently_active_trail2d) on_gizmo_deselected() clear_adjustment_nodes() gen_adjustment_nodes() @@ -1023,8 +1023,8 @@ func _on_Settings_pressed(): func _on_MarkersUI_cell_selected(): var category_item = self.markers_ui.get_selected() self.currently_active_category = category_item - self.currently_active_path2d = null - self.currently_active_path3d = null + self.currently_active_trail2d = null + self.currently_active_trail3d = null self.currently_active_waypoint_trail = null on_gizmo_deselected() clear_adjustment_nodes() @@ -1037,4 +1037,3 @@ func _on_MarkersUI_item_edited(): func _on_ImportPath_pressed(): $Control/Dialogs/ImportPackDialog.show() - diff --git a/Spatial.tscn b/Spatial.tscn index 32505f06..22a1adfc 100644 --- a/Spatial.tscn +++ b/Spatial.tscn @@ -147,19 +147,19 @@ margin_right = 116.0 margin_bottom = 35.0 text = "APoint" -[node name="NewPath" type="Button" parent="Control/GlobalMenuButton/EditorQuckPanel/HBoxContainer"] +[node name="NewTrail" type="Button" parent="Control/GlobalMenuButton/EditorQuckPanel/HBoxContainer"] margin_left = 100.0 margin_right = 146.0 margin_bottom = 40.0 rect_min_size = Vector2( 40, 0 ) -hint_tooltip = "Create New Path" +hint_tooltip = "Create New Trail" icon = ExtResource( 10 ) -[node name="NewPathPoint" type="Button" parent="Control/GlobalMenuButton/EditorQuckPanel/HBoxContainer"] +[node name="NewTrailPoint" type="Button" parent="Control/GlobalMenuButton/EditorQuckPanel/HBoxContainer"] margin_left = 150.0 margin_right = 196.0 margin_bottom = 40.0 -hint_tooltip = "Create New Point on Active Path" +hint_tooltip = "Create New Point on Active Trail" icon = ExtResource( 11 ) [node name="NewIcon" type="Button" parent="Control/GlobalMenuButton/EditorQuckPanel/HBoxContainer"] @@ -173,7 +173,7 @@ icon = ExtResource( 7 ) margin_left = 250.0 margin_right = 296.0 margin_bottom = 40.0 -hint_tooltip = "Adjust Path and Icon Positions" +hint_tooltip = "Adjust Trail and Icon Positions" icon = ExtResource( 9 ) [node name="Dialogs" type="Control" parent="Control"] @@ -222,7 +222,7 @@ margin_right = 220.0 margin_bottom = 336.0 size_flags_horizontal = 3 -[node name="LoadPath" type="Button" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] +[node name="LoadTrail" type="Button" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] margin_right = 220.0 margin_bottom = 40.0 rect_min_size = Vector2( 0, 40 ) @@ -243,7 +243,7 @@ margin_bottom = 92.0 rect_min_size = Vector2( 0, 40 ) text = "Import Marker Pack" -[node name="SavePath" type="Button" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] +[node name="SaveTrail" type="Button" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] margin_top = 96.0 margin_right = 220.0 margin_bottom = 136.0 @@ -308,20 +308,20 @@ margin_top = 219.0 margin_right = 213.0 margin_bottom = 264.0 bbcode_enabled = true -bbcode_text = "[u]Active Path[/u]: Draws a line from your character to the final node in the currently active path." -text = "Active Path: Draws a line from your character to the final node in the currently active path." +bbcode_text = "[u]Active Trail[/u]: Draws a line from your character to the final node in the currently active trail." +text = "Active Trail: Draws a line from your character to the final node in the currently active trail." fit_content_height = true scroll_active = false __meta__ = { "_edit_use_anchors_": false } -[node name="ActivePath" type="CheckButton" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] +[node name="ActiveTrail" type="CheckButton" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] visible = false margin_top = 276.0 margin_right = 220.0 margin_bottom = 316.0 -text = "Active Path" +text = "Active Trail" [node name="ExitButton" type="Button" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] margin_top = 296.0 @@ -550,7 +550,7 @@ size_flags_horizontal = 3 disabled = true text = "Delete Selected" -[node name="NewPathPointAfter" type="Button" parent="Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer"] +[node name="NewTrailPointAfter" type="Button" parent="Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer"] margin_top = 44.0 margin_right = 323.0 margin_bottom = 84.0 @@ -586,23 +586,23 @@ size_flags_horizontal = 3 disabled = true text = "Vertical Snap Selected To Player" -[node name="SetActivePath" type="Button" parent="Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer"] +[node name="SetActiveTrail" type="Button" parent="Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer"] margin_top = 220.0 margin_right = 323.0 margin_bottom = 260.0 rect_min_size = Vector2( 0, 40 ) size_flags_horizontal = 3 disabled = true -text = "SetActivePath" +text = "SetActiveTrail" -[node name="ReversePathDirection" type="Button" parent="Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer"] +[node name="ReverseTrailDirection" type="Button" parent="Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer"] margin_top = 264.0 margin_right = 323.0 margin_bottom = 304.0 rect_min_size = Vector2( 0, 40 ) size_flags_horizontal = 3 disabled = true -text = "Reverse Path Direction" +text = "Reverse Trail Direction" [node name="Set Floating Mark" type="Button" parent="Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer"] visible = false @@ -612,7 +612,7 @@ margin_bottom = 348.0 rect_min_size = Vector2( 0, 40 ) size_flags_horizontal = 3 disabled = true -text = "Reverse Path Direction" +text = "Reverse Trail Direction" [node name="SettingsDialog" type="WindowDialog" parent="Control/Dialogs"] margin_left = 592.0 @@ -869,7 +869,7 @@ anchor_bottom = 1.0 margin_top = -6.0 color = Color( 0, 0, 0, 1 ) -[node name="Paths" type="Spatial" parent="."] +[node name="Trails" type="Spatial" parent="."] [node name="Icons" type="Spatial" parent="."] @@ -882,16 +882,16 @@ material/0 = SubResource( 4 ) [connection signal="pressed" from="Control/GlobalMenuButton/main_menu_toggle" to="." method="_on_main_menu_toggle_pressed"] [connection signal="pressed" from="Control/GlobalMenuButton/EditorQuckPanel/HBoxContainer/CloseEditorQuickPanel" to="." method="_on_CloseEditorQuickPanel_pressed"] [connection signal="pressed" from="Control/GlobalMenuButton/EditorQuckPanel/HBoxContainer/ChangeTexture" to="." method="_on_ChangeTexture_pressed"] -[connection signal="pressed" from="Control/GlobalMenuButton/EditorQuckPanel/HBoxContainer/NewPath" to="." method="_on_NewPath_pressed"] -[connection signal="pressed" from="Control/GlobalMenuButton/EditorQuckPanel/HBoxContainer/NewPathPoint" to="." method="_on_NewPathPoint_pressed"] +[connection signal="pressed" from="Control/GlobalMenuButton/EditorQuckPanel/HBoxContainer/NewTrail" to="." method="_on_NewTrail_pressed"] +[connection signal="pressed" from="Control/GlobalMenuButton/EditorQuckPanel/HBoxContainer/NewTrailPoint" to="." method="_on_NewTrailPoint_pressed"] [connection signal="pressed" from="Control/GlobalMenuButton/EditorQuckPanel/HBoxContainer/NewIcon" to="." method="_on_NewIcon_pressed"] [connection signal="pressed" from="Control/GlobalMenuButton/EditorQuckPanel/HBoxContainer/AdjustPoints" to="." method="_on_AdjustNodesButton_pressed"] [connection signal="dir_selected" from="Control/Dialogs/ImportPackDialog" to="Control/Dialogs/ImportPackDialog" method="_on_FileDialog_dir_selected"] [connection signal="hide" from="Control/Dialogs/ImportPackDialog" to="." method="_on_Dialog_hide"] [connection signal="hide" from="Control/Dialogs/MainMenu" to="." method="_on_Dialog_hide"] -[connection signal="pressed" from="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer/LoadPath" to="." method="_on_LoadPath_pressed"] +[connection signal="pressed" from="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer/LoadTrail" to="." method="_on_LoadTrail_pressed"] [connection signal="pressed" from="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer/ImportPath" to="." method="_on_ImportPath_pressed"] -[connection signal="pressed" from="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer/SavePath" to="." method="_on_SavePath_pressed"] +[connection signal="pressed" from="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer/SaveTrail" to="." method="_on_SaveTrail_pressed"] [connection signal="pressed" from="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer/OpenEditorQuickPanel" to="." method="_on_OpenEditorQuickPanel_pressed"] [connection signal="pressed" from="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer/Ranges" to="." method="_on_RangesButton_pressed"] [connection signal="pressed" from="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer/Settings" to="." method="_on_Settings_pressed"] @@ -917,12 +917,12 @@ material/0 = SubResource( 4 ) [connection signal="hide" from="Control/Dialogs/SaveDialog" to="." method="_on_Dialog_hide"] [connection signal="hide" from="Control/Dialogs/NodeEditorDialog" to="." method="_on_NodeEditorDialog_hide"] [connection signal="pressed" from="Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/DeleteNode" to="." method="_on_DeleteNode_pressed"] -[connection signal="pressed" from="Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/NewPathPointAfter" to="." method="_on_NewPathPointAfter_pressed"] +[connection signal="pressed" from="Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/NewTrailPointAfter" to="." method="_on_NewTrailPointAfter_pressed"] [connection signal="pressed" from="Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/SnapSelectedToPlayer" to="." method="_on_SnapSelectedToPlayer_pressed"] [connection signal="pressed" from="Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/XZSnapToPlayer" to="." method="_on_XZSnapToPlayer_pressed"] [connection signal="pressed" from="Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/YSnapToPlayer" to="." method="_on_YSnapToPlayer_pressed"] -[connection signal="pressed" from="Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/SetActivePath" to="." method="_on_SetActivePath_pressed"] -[connection signal="pressed" from="Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/ReversePathDirection" to="." method="_on_ReversePathDirection_pressed"] +[connection signal="pressed" from="Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/SetActiveTrail" to="." method="_on_SetActiveTrail_pressed"] +[connection signal="pressed" from="Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/ReverseTrailDirection" to="." method="_on_ReverseTrailDirection_pressed"] [connection signal="hide" from="Control/Dialogs/SettingsDialog" to="." method="_on_NodeEditorDialog_hide"] [connection signal="text_changed" from="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer/MinimumWidth" to="Control/Dialogs/SettingsDialog" method="save_settings"] [connection signal="text_changed" from="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer/MinimumHeight" to="Control/Dialogs/SettingsDialog" method="save_settings"] diff --git a/Route.gd b/Trail.gd similarity index 100% rename from Route.gd rename to Trail.gd diff --git a/Route.tres b/Trail.tres similarity index 100% rename from Route.tres rename to Trail.tres diff --git a/Trail.tscn b/Trail.tscn new file mode 100644 index 00000000..7220f222 --- /dev/null +++ b/Trail.tscn @@ -0,0 +1,10 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://Trail.tres" type="Material" id=1] +[ext_resource path="res://Trail.gd" type="Script" id=2] + +[node name="Trail" type="Spatial"] +script = ExtResource( 2 ) + +[node name="MeshInstance" type="MeshInstance" parent="."] +material_override = ExtResource( 1 ) diff --git a/Route2D.gd b/Trail2D.gd similarity index 56% rename from Route2D.gd rename to Trail2D.gd index 6ed0cd1b..00fdd8a5 100644 --- a/Route2D.gd +++ b/Trail2D.gd @@ -4,8 +4,8 @@ const Waypoint = preload("res://waypoint.gd") var waypoint: Waypoint.Trail func refresh_points(): - var path_points := PoolVector2Array() + var trail_points := PoolVector2Array() var trail_data = self.waypoint.get_trail_data() for index in range(0, trail_data.get_points_z().size()): - path_points.append(Vector2(trail_data.get_points_x()[index], -trail_data.get_points_z()[index])) - self.points = path_points + trail_points.append(Vector2(trail_data.get_points_x()[index], -trail_data.get_points_z()[index])) + self.points = trail_points diff --git a/Route2D.tscn b/Trail2D.tscn similarity index 94% rename from Route2D.tscn rename to Trail2D.tscn index 8aed8671..9af82593 100644 --- a/Route2D.tscn +++ b/Trail2D.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=4 format=2] -[ext_resource path="res://Route2D.gd" type="Script" id=1] +[ext_resource path="res://Trail2D.gd" type="Script" id=1] [sub_resource type="Shader" id=1] code = "shader_type canvas_item; From 501f6bd4900e4e3a615d443637ec4f100684c1f0 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 17 Jun 2024 23:09:27 -0400 Subject: [PATCH 494/539] Changed to consistant x2d and x3d naming --- Category2D.gd | 6 +-- Category3D.gd | 10 ++--- Spatial.gd | 86 +++++++++++++++++++------------------- Trail.gd => Trail3D.gd | 0 Trail.tscn => Trail3D.tscn | 4 +- 5 files changed, 53 insertions(+), 53 deletions(-) rename Trail.gd => Trail3D.gd (100%) rename Trail.tscn => Trail3D.tscn (69%) diff --git a/Category2D.gd b/Category2D.gd index ebdbf432..8f028b83 100644 --- a/Category2D.gd +++ b/Category2D.gd @@ -3,9 +3,9 @@ extends Node2D var trails2d: Array = [] var subcategories: Array = [] -func add_trail2d(path): - self.add_child(path, true) - trails2d.push_back(path) +func add_trail2d(trail2d): + self.add_child(trail2d, true) + trails2d.push_back(trail2d) func add_subcategory(subcategory): self.add_child(subcategory, true) diff --git a/Category3D.gd b/Category3D.gd index 693117a7..1bf64737 100644 --- a/Category3D.gd +++ b/Category3D.gd @@ -1,13 +1,13 @@ extends Spatial -var trails: Array = [] +var trails3d: Array = [] var icons: Array = [] var subcategories: Array = [] -func add_trail(trail): - self.add_child(trail, true) - trails.push_back(trail) +func add_trail3d(trail3d): + self.add_child(trail3d, true) + trails3d.push_back(trail3d) func add_icon(icon): self.add_child(icon, true) @@ -18,7 +18,7 @@ func add_subcategory(subcategory): subcategories.push_back(subcategory) func clear_all(): - self.trails = [] + self.trails3d = [] self.icons = [] self.subcategories = [] for child in self.get_children(): diff --git a/Spatial.gd b/Spatial.gd index 1c6566b7..d0b1bc38 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -46,7 +46,7 @@ var x11_window_id_burrito: int var is_transient:bool = false # Scenes used throughout this scene -const trail_scene = preload("res://Trail.tscn") +const trail3d_scene = preload("res://Trail3D.tscn") const icon_scene = preload("res://Icon.tscn") const category3d_scene = preload("res://Category3D.tscn") const category2d_scene = preload("res://Category2D.tscn") @@ -588,24 +588,24 @@ func gen_new_trail(texture_path: String, waypoint_trail: Waypoint.Trail, categor texture.storage = ImageTexture.STORAGE_COMPRESS_LOSSLESS texture.create_from_image(image, 22) - var new_trail = trail_scene.instance() - new_trail.texture_path = texture_path # Save the location of the image for later - new_trail.waypoint = waypoint_trail - new_trail.refresh_mesh() - new_trail.set_texture(texture) + var new_trail3d = trail3d_scene.instance() + new_trail3d.texture_path = texture_path # Save the location of the image for later + new_trail3d.waypoint = waypoint_trail + new_trail3d.refresh_mesh() + new_trail3d.set_texture(texture) var category_data = category_item.get_metadata(0) - category_data.category3d.add_trail(new_trail) + category_data.category3d.add_trail(new_trail3d) # Create a new 2D Trail - var new_2d_trail = trail2d_scene.instance() + var new_trail2d = trail2d_scene.instance() var points_2d := PoolVector2Array() - new_2d_trail.texture = texture - new_2d_trail.waypoint = waypoint_trail - new_2d_trail.refresh_points() - category_data.category2d.add_trail2d(new_2d_trail) + new_trail2d.texture = texture + new_trail2d.waypoint = waypoint_trail + new_trail2d.refresh_points() + category_data.category2d.add_trail2d(new_trail2d) - return [new_trail, new_2d_trail] + return [new_trail3d, new_trail2d] func gen_new_icon(texture_path: String, waypoint_icon: Waypoint.Icon, category_item: TreeItem): # TODO: Search within waypoint data for texture paths instead of input @@ -670,7 +670,7 @@ func gen_adjustment_nodes(): var category2d = self.currently_active_category.get_metadata(0).category2d for trail_index in waypoint_category.get_trail().size(): var waypoint_trail = waypoint_category.get_trail()[trail_index] - var trail = category3d.trails[trail_index] + var trail3d = category3d.trails3d[trail_index] var trail2d = category2d.trails2d[trail_index] for point_index in get_trail_point_count(waypoint_trail): var gizmo_position = get_trail_point_position(waypoint_trail, point_index) @@ -681,9 +681,9 @@ func gen_adjustment_nodes(): continue var new_gizmo = gizmo_scene.instance() new_gizmo.translation = gizmo_position - new_gizmo.connect("selected", self, "on_trail_gizmo_selected", [waypoint_trail, trail, trail2d, point_index]) + new_gizmo.connect("selected", self, "on_trail_gizmo_selected", [waypoint_trail, trail3d, trail2d, point_index]) new_gizmo.connect("deselected", self, "on_gizmo_deselected") - new_gizmo.connect("updated", self, "set_trail_point_position", [waypoint_trail, trail, trail2d, point_index]) + new_gizmo.connect("updated", self, "set_trail_point_position", [waypoint_trail, trail3d, trail2d, point_index]) $Gizmos.add_child(new_gizmo) for icon_index in waypoint_category.get_icon().size(): var waypoint_icon = waypoint_category.get_icon()[icon_index] @@ -703,8 +703,8 @@ var currently_selected_trail3d = null var currently_selected_trail2d = null var currently_selected_point_index = null -func set_2D_position_from_3D_point(position: Vector3, trail2D: Line2D, index: int): - trail2D.set_point_position(index, Vector2(position.x, position.z)) +func set_2D_position_from_3D_point(position: Vector3, trail2d: Line2D, index: int): + trail2d.set_point_position(index, Vector2(position.x, position.z)) func on_icon_gizmo_selected(object: Spatial, waypoint_icon: Waypoint.Icon, icon: Sprite3D): self.currently_selected_gizmo = object @@ -780,24 +780,24 @@ func get_icon_position(waypoint_icon: Waypoint.Icon): position[2] = -waypoint_icon.get_position().get_z() return position -func set_trail_point_position(position: Vector3, waypoint_trail: Waypoint.Trail, trail: Spatial, trail2d: Line2D, point_index: int): - if trail.waypoint != trail2d.waypoint or trail2d.waypoint != waypoint_trail: - push_error("Desync between Waypoint, Trail, and Trail2D") +func set_trail_point_position(position: Vector3, waypoint_trail: Waypoint.Trail, trail3d: Spatial, trail2d: Line2D, point_index: int): + if trail3d.waypoint != trail2d.waypoint or trail2d.waypoint != waypoint_trail: + push_error("Desync between Waypoint, Trail3D, and Trail2D") var trail_data = waypoint_trail.get_trail_data() trail_data.get_points_x()[point_index] = position.x trail_data.get_points_y()[point_index] = position.y trail_data.get_points_z()[point_index] = -position.z - refresh_trail3d_points(trail) + refresh_trail3d_points(trail3d) refresh_trail2d_points(trail2d) -func reverse_trail(waypoint_trail: Waypoint.Trail, trail: Spatial, trail2d: Line2D): - if trail.waypoint != trail2d.waypoint or trail2d.waypoint != waypoint_trail: - push_error("Desync between Waypoint, Trail, and Trail2D") +func reverse_trail(waypoint_trail: Waypoint.Trail, trail3d: Spatial, trail2d: Line2D): + if trail3d.waypoint != trail2d.waypoint or trail2d.waypoint != waypoint_trail: + push_error("Desync between Waypoint, Trail3D, and Trail2D") var trail_data = waypoint_trail.get_trail_data() trail_data.get_points_x().invert() trail_data.get_points_y().invert() trail_data.get_points_z().invert() - refresh_trail3d_points(trail) + refresh_trail3d_points(trail3d) refresh_trail2d_points(trail2d) func get_trail_point_count(waypoint_trail: Waypoint.Trail): @@ -812,10 +812,10 @@ func get_trail_point_position(waypoint_trail: Waypoint.Trail, point_index: int): position[2] = -trail_data.get_points_z()[point_index] return position -func add_trail_point(position: Vector3, waypoint_trail: Waypoint.Trail, trail: Spatial, trail2d: Line2D, point_index: int = -1): - if trail.waypoint != trail2d.waypoint or trail2d.waypoint != waypoint_trail: - push_error("Desync between Waypoint, Trail, and Trail2D") - var trail_data = trail.waypoint.get_trail_data() +func add_trail_point(position: Vector3, waypoint_trail: Waypoint.Trail, trail3d: Spatial, trail2d: Line2D, point_index: int = -1): + if trail3d.waypoint != trail2d.waypoint or trail2d.waypoint != waypoint_trail: + push_error("Desync between Waypoint, Trail3D, and Trail2D") + var trail_data = trail3d.waypoint.get_trail_data() if point_index == -1: trail_data.get_points_x().append(position.x) trail_data.get_points_y().append(position.y) @@ -824,20 +824,20 @@ func add_trail_point(position: Vector3, waypoint_trail: Waypoint.Trail, trail: S trail_data.get_points_x().insert(point_index, position.x) trail_data.get_points_y().insert(point_index, position.y) trail_data.get_points_z().insert(point_index, -position.z) - refresh_trail3d_points(trail) + refresh_trail3d_points(trail3d) refresh_trail2d_points(trail2d) -func remove_trail_point(waypoint_trail: Waypoint.Trail, trail: Spatial, trail2d: Line2D, point_index: int): - if trail.waypoint != trail2d.waypoint or trail2d.waypoint != waypoint_trail: - push_error("Desync between Waypoint, Trail, and Trail2D") - var trail_data = trail.waypoint.get_trail_data() +func remove_trail_point(waypoint_trail: Waypoint.Trail, trail3d: Spatial, trail2d: Line2D, point_index: int): + if trail3d.waypoint != trail2d.waypoint or trail2d.waypoint != waypoint_trail: + push_error("Desync between Waypoint, Trail3D, and Trail2D") + var trail_data = trail3d.waypoint.get_trail_data() trail_data.get_points_x().remove(point_index) trail_data.get_points_y().remove(point_index) trail_data.get_points_z().remove(point_index) - refresh_trail3d_points(trail) + refresh_trail3d_points(trail3d) refresh_trail2d_points(trail2d) -func new_trail_point_after(waypoint_trail: Waypoint.Trail, trail: Spatial, trail2d: Line2D, point_index: int): +func new_trail_point_after(waypoint_trail: Waypoint.Trail, trail3d: Spatial, trail2d: Line2D, point_index: int): var start: Vector3 = get_trail_point_position(waypoint_trail, point_index) var target_position: Vector3 if get_trail_point_count(waypoint_trail) > point_index+1: @@ -845,10 +845,10 @@ func new_trail_point_after(waypoint_trail: Waypoint.Trail, trail: Spatial, trail target_position = ((start-end)/2) + end else: target_position = Vector3(self.player_position.x, self.player_position.y, -self.player_position.z) - add_trail_point(target_position, waypoint_trail, trail, trail2d, point_index+1) + add_trail_point(target_position, waypoint_trail, trail3d, trail2d, point_index+1) -func refresh_trail3d_points(trail: Spatial): - trail.refresh_mesh() +func refresh_trail3d_points(trail3d: Spatial): + trail3d.refresh_mesh() func refresh_trail2d_points(trail2d: Line2D): trail2d.refresh_points() @@ -881,8 +881,8 @@ func _on_RangesButton_pressed(): func _on_TrailResolution_value_changed(value): trail_resolution = value - for trail in $Trails.get_children(): - var csg:CSGPolygon = trail.get_node("CSGPolygon") + for trail3d in $Trails.get_children(): + var csg:CSGPolygon = trail3d.get_node("CSGPolygon") csg.trail_interval = trail_resolution csg.material.set_shader_param("interval", trail_resolution) @@ -915,7 +915,7 @@ func _on_TexturePathOpen_file_selected(path): # a trail node is created. ################################################################################ func _on_NewTrail_pressed(): - self.currently_active_trail = null + self.currently_active_trail3d = null self.currently_active_trail2d = null self.currently_active_waypoint_trail = null diff --git a/Trail.gd b/Trail3D.gd similarity index 100% rename from Trail.gd rename to Trail3D.gd diff --git a/Trail.tscn b/Trail3D.tscn similarity index 69% rename from Trail.tscn rename to Trail3D.tscn index 7220f222..5d495687 100644 --- a/Trail.tscn +++ b/Trail3D.tscn @@ -1,9 +1,9 @@ [gd_scene load_steps=3 format=2] [ext_resource path="res://Trail.tres" type="Material" id=1] -[ext_resource path="res://Trail.gd" type="Script" id=2] +[ext_resource path="res://Trail3D.gd" type="Script" id=2] -[node name="Trail" type="Spatial"] +[node name="Trail3D" type="Spatial"] script = ExtResource( 2 ) [node name="MeshInstance" type="MeshInstance" parent="."] From 2f7f02c75b2fe81185212a2a5526fcfed5fd3083 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 23 Jun 2024 15:23:18 -0400 Subject: [PATCH 495/539] Changed Textures to be assigned by waypoint texture ID. Assign new ID to new images --- FileHandler.gd | 58 +++++++++++++++++++++++++++++++++++++++++++++ Icon.gd | 3 --- Spatial.gd | 64 +++++++++++++++++++++++++++++++++----------------- 3 files changed, 100 insertions(+), 25 deletions(-) diff --git a/FileHandler.gd b/FileHandler.gd index eb0207f5..d797f00d 100644 --- a/FileHandler.gd +++ b/FileHandler.gd @@ -16,3 +16,61 @@ static func create_directory_if_missing(path: String): var success = dir.make_dir(path) if success != OK: print("Error: Could not create data folder:", path) + +static func generate_unique_file_name(base_name: String, extension: String, destination_folder: String) -> String: + var unique_name: String = base_name + var counter: int = 1 + var new_file_path: String = destination_folder.plus_file(unique_name + "." + extension) + + while File.new().file_exists(new_file_path): + unique_name = base_name + "_" + str(counter) + new_file_path = destination_folder.plus_file(unique_name + "." + extension) + counter += 1 + return unique_name + "." + extension + +static func copy_supported_image_file(file_path: String, destintation_dir: String) -> String: + # These are all supported file types in Godot but may not be supported + # by other marker programs. + var supported_image_extensions: Array = ["png", "jpg", "jpeg", "bmp", "tga"] + var file_name: String = file_path.get_file() + var file_extension: String = file_name.get_extension().to_lower() + if not supported_image_extensions.has(file_extension): + print("File is not a supported image type. Please choose a png, jpg, jpeg, bmp, or tga.") + return "" + create_directory_if_missing(destintation_dir) + var destination_path: String = destintation_dir.plus_file(file_name) + + var file: File = File.new() + + if file.file_exists(destination_path): + file.open(file_path, File.READ) + var original_size: int = file.get_len() + var original_mod_time: int = file.get_modified_time(file_name) + file.close() + + file.open(destination_path, File.READ) + var destination_size: int = file.get_len() + var destination_mod_time: int = file.get_modified_time(file_name) + file.close() + + if original_size == destination_size and original_mod_time == destination_mod_time: + return destination_path + else: + var base_name: String = file_name.get_basename() + var extension: String = file_name.get_extension() + var unique_name: String = generate_unique_file_name(base_name, extension, destintation_dir) + destination_path = destintation_dir.plus_file(unique_name) + + file.open(file_path, File.READ) + var content: PoolByteArray = file.get_buffer(file.get_len()) + file.close() + + var result: int = file.open(destination_path, File.WRITE) + if result == OK: + file.store_buffer(content) + file.close() + print("File imported successfully.") + return destination_path + else: + print("Failed to import file.") + return "" diff --git a/Icon.gd b/Icon.gd index ff072d25..2c3fa437 100644 --- a/Icon.gd +++ b/Icon.gd @@ -2,13 +2,10 @@ extends Sprite3D const Waypoint = preload("res://waypoint.gd") -var texture_path var waypoint: Waypoint.Icon var category: TreeItem func set_icon_image(texture_path: String): - self.texture_path = texture_path - var texture_file = File.new() var image = Image.new() texture_file.open(texture_path, File.READ) diff --git a/Spatial.gd b/Spatial.gd index 3d49bef3..ca2ced70 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -56,6 +56,7 @@ const gizmo_scene = preload("res://Gizmo/PointEdit.tscn") # Scripts containing code used by this scene const CategoryData = preload("res://CategoryData.gd") const Waypoint = preload("res://waypoint.gd") +const FileHandler = preload("res://FileHandler.gd") ##########Node Connections########### onready var markers_ui := $Control/Dialogs/CategoriesDialog/MarkersUI as Tree @@ -533,21 +534,10 @@ func _waypoint_categories_to_godot_nodes(item: TreeItem, waypoint_category: Wayp godot_category2d.visible = category_data.is_visible for path in waypoint_category.get_trail(): - var texture_id = path.get_texture_id() - if texture_id == null: - print("Warning: No texture found in " , category_name) - continue - var full_texture_path = self.marker_file_dir + self.waypoint_data.get_textures()[texture_id].get_filepath() - gen_new_path(full_texture_path, path, category_item) - + gen_new_path(path, category_item) for icon in waypoint_category.get_icon(): - var texture_id = icon.get_texture_id() - if texture_id == null: - print("Warning: No texture found in " , category_name) - continue - var full_texture_path = self.marker_file_dir + self.waypoint_data.get_textures()[texture_id].get_filepath() - gen_new_icon(full_texture_path, icon, category_item) + gen_new_icon(icon, category_item) for category_child in waypoint_category.get_children(): _waypoint_categories_to_godot_nodes(category_item, category_child, godot_category3d, godot_category2d, true) @@ -568,14 +558,17 @@ func apply_category_visibility_to_nodes(category_item: TreeItem): category_data.category2d.visible = category_data.is_visible -func gen_new_path(texture_path: String, waypoint_trail: Waypoint.Trail, category_item: TreeItem): +func gen_new_path(waypoint_trail: Waypoint.Trail, category_item: TreeItem) -> PoolStringArray: # Create the texture to use from an image file # TODO: We want to be able to cache this data so that if a texture is used # by multiple objects we only need to keep ony copy of it in memory. #22. # TODO: We want to have two copies of each texture in memory one for 2D # which does not use srgb to render properly, and one for 3D which forces # srgb to render properly. Issue #23. - # TODO: Search within waypoint data for texture paths instead of input + var texture_id: int = waypoint_trail.get_texture_id() + if texture_id == null: + print("Warning: No texture found in " , category_item.get_metadata(0).waypoint_category.get_name()) + var texture_path: String = self.marker_file_dir + self.waypoint_data.get_textures()[texture_id].get_filepath() var texture_file = File.new() var image = Image.new() if !texture_file.file_exists(texture_path): @@ -589,7 +582,6 @@ func gen_new_path(texture_path: String, waypoint_trail: Waypoint.Trail, category texture.create_from_image(image, 22) var new_route = route_scene.instance() - new_route.texture_path = texture_path # Save the location of the image for later new_route.waypoint = waypoint_trail new_route.refresh_mesh() new_route.set_texture(texture) @@ -605,10 +597,13 @@ func gen_new_path(texture_path: String, waypoint_trail: Waypoint.Trail, category new_2d_path.refresh_points() category_data.category2d.add_path2d(new_2d_path) - return [new_route, new_2d_path] + return PoolStringArray([new_route, new_2d_path]) -func gen_new_icon(texture_path: String, waypoint_icon: Waypoint.Icon, category_item: TreeItem): - # TODO: Search within waypoint data for texture paths instead of input +func gen_new_icon(waypoint_icon: Waypoint.Icon, category_item: TreeItem): + var texture_id: int = waypoint_icon.get_texture_id() + if texture_id == null: + print("Warning: No texture found in " , category_item.get_metadata(0).waypoint_category.get_name()) + var texture_path: String = self.marker_file_dir + self.waypoint_data.get_textures()[texture_id].get_filepath() var position = waypoint_icon.get_position() if position == null: print("Warning: No position found for icon ", category_item.get_metadata(0).waypoint_category.get_name()) @@ -756,6 +751,12 @@ func clear_adjustment_nodes(): ################################################################################ # Update Waypoint datum ################################################################################ +func get_texture_index(path: String) -> int: + for i in self.waypoint_data.get_textures().size: + if path == self.waypoint_data.get_textures()[i].get_filepath(): + return i + return -1 + func set_icon_position(new_position: Vector3, waypoint_icon: Waypoint.Icon, icon: Sprite3D): if icon.waypoint != waypoint_icon: push_error("Desync between Waypoint and Icon") @@ -908,7 +909,12 @@ func _on_ChangeTexture_pressed(): # or icon is created. ################################################################################ func _on_TexturePathOpen_file_selected(path): - self.next_texture_path = path + var data_dir: String = self.marker_file_dir.plus_file("Data") + var new_texture_path: String = FileHandler.copy_supported_image_file(path, data_dir) + if new_texture_path != "": + self.next_texture_path = new_texture_path + else: + print("Warning: Error on selected file") ################################################################################ # Null out the currently active path so that a new one is created the next time @@ -929,7 +935,14 @@ func _on_NewIcon_pressed(): position.set_x(self.player_position.x) position.set_y(self.player_position.y) position.set_z(-self.player_position.z) - gen_new_icon(self.next_texture_path, waypoint_icon, self.currently_active_category) + var texture_id: int = get_texture_index(self.next_texture_path) + if texture_id != -1: + waypoint_icon.set_texture_id(texture_id) + else: + self.waypoint_data.get_textures().add_textures().set_filepath(self.next_texture_path) + texture_id = self.waypoint_data.get_textures().add_textures().size() - 1 + waypoint_icon.set_texture_id(texture_id) + gen_new_icon(waypoint_icon, self.currently_active_category) # A new path point is created func _on_NewPathPoint_pressed(): @@ -943,7 +956,14 @@ func _on_NewPathPoint_pressed(): trail_data.add_points_x(self.player_position.x) trail_data.add_points_y(self.player_position.y) trail_data.add_points_z(-self.player_position.z) - var new_paths = gen_new_path(self.next_texture_path, waypoint_trail, self.currently_active_category) + var texture_id: int = get_texture_index(self.next_texture_path) + if texture_id != -1: + waypoint_trail.set_texture_id(texture_id) + else: + self.waypoint_data.get_textures().add_textures().set_filepath(self.next_texture_path) + texture_id = self.waypoint_data.get_textures().add_textures().size() - 1 + waypoint_trail.set_texture_id(texture_id) + var new_paths: PoolStringArray = gen_new_path(waypoint_trail, self.currently_active_category) self.currently_active_path3d = new_paths[0] self.currently_active_path2d = new_paths[1] else: From 354d67ae9f8033ca915a1765acaf61b33b898d89 Mon Sep 17 00:00:00 2001 From: klingbolt <89052698+klingbolt@users.noreply.github.com> Date: Sun, 23 Jun 2024 15:35:04 -0400 Subject: [PATCH 496/539] Update Spatial.gd --- Spatial.gd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Spatial.gd b/Spatial.gd index 47dc144a..5fac8907 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -534,7 +534,7 @@ func _waypoint_categories_to_godot_nodes(item: TreeItem, waypoint_category: Wayp godot_category2d.visible = category_data.is_visible for trail in waypoint_category.get_trail(): - gen_new_path(trail, category_item) + gen_new_trail(trail, category_item) for icon in waypoint_category.get_icon(): gen_new_icon(icon, category_item) From c35d29fe0b50cf44cbbd7de8de7161db65207f3e Mon Sep 17 00:00:00 2001 From: klingbolt <89052698+klingbolt@users.noreply.github.com> Date: Sun, 23 Jun 2024 15:35:08 -0400 Subject: [PATCH 497/539] Update Spatial.gd --- Spatial.gd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Spatial.gd b/Spatial.gd index 5fac8907..0999a9c8 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -908,7 +908,7 @@ func _on_ChangeTexture_pressed(): # Set the file that will be used to create a new trail or icon when a new trail # or icon is created. ################################################################################ -func _on_TexturePathOpen_file_selected(path): +func _on_TexturePathOpen_file_selected(path: String): var data_dir: String = self.marker_file_dir.plus_file("Data") var new_texture_path: String = FileHandler.copy_supported_image_file(path, data_dir) if new_texture_path != "": From 779370d419137b928a786a0cb846de3cb40d6b13 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 1 Jul 2024 20:16:48 -0400 Subject: [PATCH 498/539] Updating the godobuf file to reflect recent changes to protobuf --- waypoint.gd | 171 +++++++++++++++++----------------------------------- 1 file changed, 56 insertions(+), 115 deletions(-) diff --git a/waypoint.gd b/waypoint.gd index 2cea1d5a..00c6e815 100644 --- a/waypoint.gd +++ b/waypoint.gd @@ -804,6 +804,11 @@ class Category: service.field = _tip_description data[_tip_description.tag] = service + _id = PBField.new("id", PB_DATA_TYPE.BYTES, PB_RULE.OPTIONAL, 8, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BYTES]) + service = PBServiceField.new() + service.field = _id + data[_id.tag] = service + var data = {} var _name: PBField @@ -875,6 +880,15 @@ class Category: func set_tip_description(value : String) -> void: _tip_description.value = value + var _id: PBField + func get_id() -> PoolByteArray: + return _id.value + func clear_id() -> void: + data[8].state = PB_SERVICE_STATE.UNFILLED + _id.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BYTES] + func set_id(value : PoolByteArray) -> void: + _id.value = value + func to_string() -> String: return PBPacker.message_to_string(data) @@ -948,16 +962,16 @@ class Icon: service.func_ref = funcref(self, "new_euler_rotation") data[_euler_rotation.tag] = service - _achievement_bit = PBField.new("achievement_bit", PB_DATA_TYPE.FIXED32, PB_RULE.OPTIONAL, 16, true, DEFAULT_VALUES_3[PB_DATA_TYPE.FIXED32]) - service = PBServiceField.new() - service.field = _achievement_bit - data[_achievement_bit.tag] = service - - _achievement_id = PBField.new("achievement_id", PB_DATA_TYPE.INT32, PB_RULE.OPTIONAL, 17, true, DEFAULT_VALUES_3[PB_DATA_TYPE.INT32]) + _achievement_id = PBField.new("achievement_id", PB_DATA_TYPE.INT32, PB_RULE.OPTIONAL, 16, true, DEFAULT_VALUES_3[PB_DATA_TYPE.INT32]) service = PBServiceField.new() service.field = _achievement_id data[_achievement_id.tag] = service + _achievement_bit_index = PBField.new("achievement_bit_index", PB_DATA_TYPE.INT32, PB_RULE.OPTIONAL, 17, true, DEFAULT_VALUES_3[PB_DATA_TYPE.INT32]) + service = PBServiceField.new() + service.field = _achievement_bit_index + data[_achievement_bit_index.tag] = service + _disable_player_cutout = PBField.new("disable_player_cutout", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 19, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) service = PBServiceField.new() service.field = _disable_player_cutout @@ -993,10 +1007,9 @@ class Icon: service.field = _tip_name data[_tip_name.tag] = service - _rgba_color = PBField.new("rgba_color", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 26, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) + _rgba_color = PBField.new("rgba_color", PB_DATA_TYPE.FIXED32, PB_RULE.OPTIONAL, 26, true, DEFAULT_VALUES_3[PB_DATA_TYPE.FIXED32]) service = PBServiceField.new() service.field = _rgba_color - service.func_ref = funcref(self, "new_rgba_color") data[_rgba_color.tag] = service _festival_filter = PBField.new("festival_filter", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 27, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) @@ -1070,11 +1083,6 @@ class Icon: service.field = _bhdraft__schedule_duration data[_bhdraft__schedule_duration.tag] = service - _category = PBField.new("category", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 2054, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) - service = PBServiceField.new() - service.field = _category - data[_category.tag] = service - var data = {} var _texture_id: PBField @@ -1161,24 +1169,24 @@ class Icon: _euler_rotation.value = EulerRotation.new() return _euler_rotation.value - var _achievement_bit: PBField - func get_achievement_bit() -> int: - return _achievement_bit.value - func clear_achievement_bit() -> void: - data[16].state = PB_SERVICE_STATE.UNFILLED - _achievement_bit.value = DEFAULT_VALUES_3[PB_DATA_TYPE.FIXED32] - func set_achievement_bit(value : int) -> void: - _achievement_bit.value = value - var _achievement_id: PBField func get_achievement_id() -> int: return _achievement_id.value func clear_achievement_id() -> void: - data[17].state = PB_SERVICE_STATE.UNFILLED + data[16].state = PB_SERVICE_STATE.UNFILLED _achievement_id.value = DEFAULT_VALUES_3[PB_DATA_TYPE.INT32] func set_achievement_id(value : int) -> void: _achievement_id.value = value + var _achievement_bit_index: PBField + func get_achievement_bit_index() -> int: + return _achievement_bit_index.value + func clear_achievement_bit_index() -> void: + data[17].state = PB_SERVICE_STATE.UNFILLED + _achievement_bit_index.value = DEFAULT_VALUES_3[PB_DATA_TYPE.INT32] + func set_achievement_bit_index(value : int) -> void: + _achievement_bit_index.value = value + var _disable_player_cutout: PBField func get_disable_player_cutout() -> bool: return _disable_player_cutout.value @@ -1243,14 +1251,13 @@ class Icon: _tip_name.value = value var _rgba_color: PBField - func get_rgba_color() -> RGBAColor: + func get_rgba_color() -> int: return _rgba_color.value func clear_rgba_color() -> void: data[26].state = PB_SERVICE_STATE.UNFILLED - _rgba_color.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] - func new_rgba_color() -> RGBAColor: - _rgba_color.value = RGBAColor.new() - return _rgba_color.value + _rgba_color.value = DEFAULT_VALUES_3[PB_DATA_TYPE.FIXED32] + func set_rgba_color(value : int) -> void: + _rgba_color.value = value var _festival_filter: PBField func get_festival_filter() -> FestivalFilter: @@ -1375,15 +1382,6 @@ class Icon: func set_bhdraft__schedule_duration(value : float) -> void: _bhdraft__schedule_duration.value = value - var _category: PBField - func get_category() -> bool: - return _category.value - func clear_category() -> void: - data[2054].state = PB_SERVICE_STATE.UNFILLED - _category.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] - func set_category(value : bool) -> void: - _category.value = value - func to_string() -> String: return PBPacker.message_to_string(data) @@ -1445,16 +1443,16 @@ class Trail: service.field = _animation_speed data[_animation_speed.tag] = service - _achievement_bit = PBField.new("achievement_bit", PB_DATA_TYPE.FIXED32, PB_RULE.OPTIONAL, 16, true, DEFAULT_VALUES_3[PB_DATA_TYPE.FIXED32]) - service = PBServiceField.new() - service.field = _achievement_bit - data[_achievement_bit.tag] = service - - _achievement_id = PBField.new("achievement_id", PB_DATA_TYPE.INT32, PB_RULE.OPTIONAL, 17, true, DEFAULT_VALUES_3[PB_DATA_TYPE.INT32]) + _achievement_id = PBField.new("achievement_id", PB_DATA_TYPE.INT32, PB_RULE.OPTIONAL, 16, true, DEFAULT_VALUES_3[PB_DATA_TYPE.INT32]) service = PBServiceField.new() service.field = _achievement_id data[_achievement_id.tag] = service + _achievement_bit_index = PBField.new("achievement_bit_index", PB_DATA_TYPE.INT32, PB_RULE.OPTIONAL, 17, true, DEFAULT_VALUES_3[PB_DATA_TYPE.INT32]) + service = PBServiceField.new() + service.field = _achievement_bit_index + data[_achievement_bit_index.tag] = service + _disable_player_cutout = PBField.new("disable_player_cutout", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 19, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) service = PBServiceField.new() service.field = _disable_player_cutout @@ -1470,10 +1468,9 @@ class Trail: service.field = _scale data[_scale.tag] = service - _rgba_color = PBField.new("rgba_color", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 22, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) + _rgba_color = PBField.new("rgba_color", PB_DATA_TYPE.FIXED32, PB_RULE.OPTIONAL, 22, true, DEFAULT_VALUES_3[PB_DATA_TYPE.FIXED32]) service = PBServiceField.new() service.field = _rgba_color - service.func_ref = funcref(self, "new_rgba_color") data[_rgba_color.tag] = service _festival_filter = PBField.new("festival_filter", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 23, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) @@ -1547,11 +1544,6 @@ class Trail: service.field = _bhdraft__schedule_duration data[_bhdraft__schedule_duration.tag] = service - _category = PBField.new("category", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 2054, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) - service = PBServiceField.new() - service.field = _category - data[_category.tag] = service - var data = {} var _texture_id: PBField @@ -1618,24 +1610,24 @@ class Trail: func set_animation_speed(value : float) -> void: _animation_speed.value = value - var _achievement_bit: PBField - func get_achievement_bit() -> int: - return _achievement_bit.value - func clear_achievement_bit() -> void: - data[16].state = PB_SERVICE_STATE.UNFILLED - _achievement_bit.value = DEFAULT_VALUES_3[PB_DATA_TYPE.FIXED32] - func set_achievement_bit(value : int) -> void: - _achievement_bit.value = value - var _achievement_id: PBField func get_achievement_id() -> int: return _achievement_id.value func clear_achievement_id() -> void: - data[17].state = PB_SERVICE_STATE.UNFILLED + data[16].state = PB_SERVICE_STATE.UNFILLED _achievement_id.value = DEFAULT_VALUES_3[PB_DATA_TYPE.INT32] func set_achievement_id(value : int) -> void: _achievement_id.value = value + var _achievement_bit_index: PBField + func get_achievement_bit_index() -> int: + return _achievement_bit_index.value + func clear_achievement_bit_index() -> void: + data[17].state = PB_SERVICE_STATE.UNFILLED + _achievement_bit_index.value = DEFAULT_VALUES_3[PB_DATA_TYPE.INT32] + func set_achievement_bit_index(value : int) -> void: + _achievement_bit_index.value = value + var _disable_player_cutout: PBField func get_disable_player_cutout() -> bool: return _disable_player_cutout.value @@ -1664,14 +1656,13 @@ class Trail: _scale.value = value var _rgba_color: PBField - func get_rgba_color() -> RGBAColor: + func get_rgba_color() -> int: return _rgba_color.value func clear_rgba_color() -> void: data[22].state = PB_SERVICE_STATE.UNFILLED - _rgba_color.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] - func new_rgba_color() -> RGBAColor: - _rgba_color.value = RGBAColor.new() - return _rgba_color.value + _rgba_color.value = DEFAULT_VALUES_3[PB_DATA_TYPE.FIXED32] + func set_rgba_color(value : int) -> void: + _rgba_color.value = value var _festival_filter: PBField func get_festival_filter() -> FestivalFilter: @@ -1796,56 +1787,6 @@ class Trail: func set_bhdraft__schedule_duration(value : float) -> void: _bhdraft__schedule_duration.value = value - var _category: PBField - func get_category() -> bool: - return _category.value - func clear_category() -> void: - data[2054].state = PB_SERVICE_STATE.UNFILLED - _category.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] - func set_category(value : bool) -> void: - _category.value = value - - func to_string() -> String: - return PBPacker.message_to_string(data) - - func to_bytes() -> PoolByteArray: - return PBPacker.pack_message(data) - - func from_bytes(bytes : PoolByteArray, offset : int = 0, limit : int = -1) -> int: - var cur_limit = bytes.size() - if limit != -1: - cur_limit = limit - var result = PBPacker.unpack_message(data, bytes, offset, cur_limit) - if result == cur_limit: - if PBPacker.check_required(data): - if limit == -1: - return PB_ERR.NO_ERRORS - else: - return PB_ERR.REQUIRED_FIELDS - elif limit == -1 && result > 0: - return PB_ERR.PARSE_INCOMPLETE - return result - -class RGBAColor: - func _init(): - var service - - _rgba_color = PBField.new("rgba_color", PB_DATA_TYPE.INT32, PB_RULE.OPTIONAL, 1, true, DEFAULT_VALUES_3[PB_DATA_TYPE.INT32]) - service = PBServiceField.new() - service.field = _rgba_color - data[_rgba_color.tag] = service - - var data = {} - - var _rgba_color: PBField - func get_rgba_color() -> int: - return _rgba_color.value - func clear_rgba_color() -> void: - data[1].state = PB_SERVICE_STATE.UNFILLED - _rgba_color.value = DEFAULT_VALUES_3[PB_DATA_TYPE.INT32] - func set_rgba_color(value : int) -> void: - _rgba_color.value = value - func to_string() -> String: return PBPacker.message_to_string(data) From f66212bb169a83a984723903177451229e841513 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 1 Jul 2024 20:32:02 -0400 Subject: [PATCH 499/539] Added a test for having a large array of textures. This one does not have files to support the texture paths. --- .../input/pack/xml_file.xml | 108 ++++++++++ .../output_proto/markers.bin | Bin 0 -> 2429 bytes .../output_xml/xml_file.xml | 108 ++++++++++ .../large_texture_array_invalid/testcase.yaml | 203 ++++++++++++++++++ 4 files changed, 419 insertions(+) create mode 100644 xml_converter/integration_tests/test_cases/large_texture_array_invalid/input/pack/xml_file.xml create mode 100644 xml_converter/integration_tests/test_cases/large_texture_array_invalid/output_proto/markers.bin create mode 100644 xml_converter/integration_tests/test_cases/large_texture_array_invalid/output_xml/xml_file.xml create mode 100644 xml_converter/integration_tests/test_cases/large_texture_array_invalid/testcase.yaml diff --git a/xml_converter/integration_tests/test_cases/large_texture_array_invalid/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/large_texture_array_invalid/input/pack/xml_file.xml new file mode 100644 index 00000000..94dc8967 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/large_texture_array_invalid/input/pack/xml_file.xml @@ -0,0 +1,108 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/xml_converter/integration_tests/test_cases/large_texture_array_invalid/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/large_texture_array_invalid/output_proto/markers.bin new file mode 100644 index 0000000000000000000000000000000000000000..f0d759ddb04616e91161b42d3a15c542ead8691c GIT binary patch literal 2429 zcmZY3w{BBm06<}i6O04Fm=;2FsG$Yl|8`oyp@d=xy%QYE$`A>VWhAm8-iGI3MT|TH zya6NVY;cxuIMbpe+@dTd4Q+OI@@C>#v!hkU*m|})G7Fgn0JcsA;0$#*fyo8srjdOSfui`blj`Mf} zZ{jVyjUBv$cX0vl;eC975AhK`#wYj`pW$J!g8( z^qlEA({rZhOwXB~Gd*W|&h?z@IoETp=UmUZo^w6tdd~Hn>$%W#q31%+g`NvN7kV!A hT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/xml_converter/integration_tests/test_cases/large_texture_array_invalid/testcase.yaml b/xml_converter/integration_tests/test_cases/large_texture_array_invalid/testcase.yaml new file mode 100644 index 00000000..0e648dae --- /dev/null +++ b/xml_converter/integration_tests/test_cases/large_texture_array_invalid/testcase.yaml @@ -0,0 +1,203 @@ +input_paths: + "pack": "xml" +expected_stdout: | + Warning: File path test_cases/texture_invalid/input/pack/texture_01.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_02.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_03.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_04.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_05.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_06.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_07.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_08.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_09.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_10.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_11.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_12.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_13.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_14.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_15.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_16.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_17.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_18.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_19.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_20.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_21.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_22.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_23.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_24.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_25.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_26.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_27.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_28.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_29.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_30.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_31.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_32.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_33.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_34.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_35.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_36.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_37.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_38.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_39.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_40.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_41.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_42.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_43.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_44.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_45.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_46.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_47.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_48.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_49.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_50.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_51.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_52.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_53.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_54.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_55.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_56.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_57.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_58.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_59.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_60.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_61.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_62.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_63.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_64.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_65.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_66.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_67.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_68.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_69.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_70.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_71.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_72.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_73.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_74.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_75.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_76.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_77.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_78.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_79.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_80.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_81.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_82.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_83.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_84.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_85.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_86.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_87.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_88.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_89.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_90.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_91.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_92.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_93.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_94.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_95.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_96.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_97.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_98.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_99.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_01.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_02.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_03.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_04.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_05.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_06.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_07.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_08.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_09.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_10.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_11.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_12.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_13.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_14.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_15.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_16.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_17.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_18.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_19.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_20.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_21.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_22.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_23.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_24.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_25.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_26.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_27.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_28.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_29.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_30.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_31.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_32.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_33.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_34.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_35.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_36.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_37.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_38.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_39.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_40.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_41.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_42.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_43.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_44.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_45.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_46.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_47.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_48.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_49.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_50.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_51.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_52.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_53.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_54.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_55.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_56.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_57.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_58.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_59.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_60.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_61.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_62.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_63.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_64.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_65.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_66.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_67.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_68.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_69.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_70.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_71.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_72.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_73.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_74.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_75.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_76.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_77.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_78.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_79.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_80.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_81.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_82.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_83.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_84.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_85.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_86.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_87.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_88.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_89.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_90.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_91.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_92.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_93.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_94.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_95.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_96.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_97.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_98.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_99.png not found. +expected_stderr: | +expected_returncode: 0 From a3ef255a278559de91be6f48094bea51601d3716 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 1 Jul 2024 22:56:28 -0400 Subject: [PATCH 500/539] Reduced test to cover only a single instance --- .../input/pack/xml_file.xml | 108 ---------- .../output_proto/markers.bin | Bin 2429 -> 0 bytes .../output_xml/xml_file.xml | 108 ---------- .../large_texture_array_invalid/testcase.yaml | 203 ------------------ .../texture_invalid/input/pack/xml_file.xml | 8 + .../texture_invalid/output_proto/markers.bin | Bin 0 -> 50 bytes .../texture_invalid/output_xml/xml_file.xml | 8 + .../test_cases/texture_invalid/testcase.yaml | 7 + 8 files changed, 23 insertions(+), 419 deletions(-) delete mode 100644 xml_converter/integration_tests/test_cases/large_texture_array_invalid/input/pack/xml_file.xml delete mode 100644 xml_converter/integration_tests/test_cases/large_texture_array_invalid/output_proto/markers.bin delete mode 100644 xml_converter/integration_tests/test_cases/large_texture_array_invalid/output_xml/xml_file.xml delete mode 100644 xml_converter/integration_tests/test_cases/large_texture_array_invalid/testcase.yaml create mode 100644 xml_converter/integration_tests/test_cases/texture_invalid/input/pack/xml_file.xml create mode 100644 xml_converter/integration_tests/test_cases/texture_invalid/output_proto/markers.bin create mode 100644 xml_converter/integration_tests/test_cases/texture_invalid/output_xml/xml_file.xml create mode 100644 xml_converter/integration_tests/test_cases/texture_invalid/testcase.yaml diff --git a/xml_converter/integration_tests/test_cases/large_texture_array_invalid/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/large_texture_array_invalid/input/pack/xml_file.xml deleted file mode 100644 index 94dc8967..00000000 --- a/xml_converter/integration_tests/test_cases/large_texture_array_invalid/input/pack/xml_file.xml +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/xml_converter/integration_tests/test_cases/large_texture_array_invalid/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/large_texture_array_invalid/output_proto/markers.bin deleted file mode 100644 index f0d759ddb04616e91161b42d3a15c542ead8691c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2429 zcmZY3w{BBm06<}i6O04Fm=;2FsG$Yl|8`oyp@d=xy%QYE$`A>VWhAm8-iGI3MT|TH zya6NVY;cxuIMbpe+@dTd4Q+OI@@C>#v!hkU*m|})G7Fgn0JcsA;0$#*fyo8srjdOSfui`blj`Mf} zZ{jVyjUBv$cX0vl;eC975AhK`#wYj`pW$J!g8( z^qlEA({rZhOwXB~Gd*W|&h?z@IoETp=UmUZo^w6tdd~Hn>$%W#q31%+g`NvN7kV!A hT - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/xml_converter/integration_tests/test_cases/large_texture_array_invalid/testcase.yaml b/xml_converter/integration_tests/test_cases/large_texture_array_invalid/testcase.yaml deleted file mode 100644 index 0e648dae..00000000 --- a/xml_converter/integration_tests/test_cases/large_texture_array_invalid/testcase.yaml +++ /dev/null @@ -1,203 +0,0 @@ -input_paths: - "pack": "xml" -expected_stdout: | - Warning: File path test_cases/texture_invalid/input/pack/texture_01.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_02.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_03.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_04.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_05.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_06.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_07.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_08.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_09.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_10.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_11.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_12.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_13.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_14.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_15.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_16.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_17.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_18.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_19.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_20.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_21.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_22.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_23.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_24.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_25.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_26.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_27.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_28.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_29.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_30.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_31.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_32.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_33.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_34.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_35.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_36.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_37.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_38.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_39.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_40.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_41.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_42.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_43.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_44.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_45.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_46.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_47.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_48.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_49.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_50.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_51.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_52.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_53.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_54.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_55.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_56.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_57.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_58.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_59.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_60.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_61.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_62.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_63.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_64.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_65.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_66.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_67.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_68.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_69.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_70.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_71.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_72.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_73.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_74.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_75.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_76.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_77.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_78.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_79.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_80.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_81.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_82.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_83.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_84.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_85.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_86.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_87.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_88.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_89.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_90.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_91.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_92.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_93.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_94.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_95.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_96.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_97.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_98.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_99.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_01.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_02.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_03.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_04.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_05.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_06.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_07.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_08.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_09.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_10.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_11.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_12.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_13.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_14.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_15.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_16.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_17.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_18.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_19.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_20.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_21.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_22.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_23.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_24.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_25.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_26.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_27.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_28.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_29.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_30.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_31.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_32.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_33.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_34.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_35.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_36.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_37.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_38.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_39.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_40.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_41.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_42.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_43.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_44.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_45.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_46.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_47.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_48.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_49.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_50.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_51.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_52.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_53.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_54.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_55.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_56.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_57.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_58.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_59.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_60.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_61.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_62.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_63.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_64.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_65.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_66.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_67.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_68.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_69.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_70.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_71.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_72.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_73.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_74.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_75.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_76.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_77.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_78.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_79.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_80.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_81.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_82.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_83.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_84.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_85.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_86.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_87.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_88.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_89.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_90.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_91.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_92.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_93.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_94.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_95.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_96.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_97.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_98.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_99.png not found. -expected_stderr: | -expected_returncode: 0 diff --git a/xml_converter/integration_tests/test_cases/texture_invalid/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/texture_invalid/input/pack/xml_file.xml new file mode 100644 index 00000000..1ef3d4c1 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/texture_invalid/input/pack/xml_file.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/xml_converter/integration_tests/test_cases/texture_invalid/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/texture_invalid/output_proto/markers.bin new file mode 100644 index 0000000000000000000000000000000000000000..e3e57428dff74f3e3e7228a424f87989af890998 GIT binary patch literal 50 zcmd;*;o|bGbWSWuP0uf?lwuKJR4{Vl(0Fl%?a<`7X+jJ_0$hA0sTC!qMXB)yhI$2g F=>T5b4#fZf literal 0 HcmV?d00001 diff --git a/xml_converter/integration_tests/test_cases/texture_invalid/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/texture_invalid/output_xml/xml_file.xml new file mode 100644 index 00000000..995b3617 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/texture_invalid/output_xml/xml_file.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/xml_converter/integration_tests/test_cases/texture_invalid/testcase.yaml b/xml_converter/integration_tests/test_cases/texture_invalid/testcase.yaml new file mode 100644 index 00000000..14623cbf --- /dev/null +++ b/xml_converter/integration_tests/test_cases/texture_invalid/testcase.yaml @@ -0,0 +1,7 @@ +input_paths: + "pack": "xml" +expected_stdout: | + Warning: File path test_cases/texture_invalid/input/pack/texture_01.png not found. + Warning: File path test_cases/texture_invalid/input/pack/texture_01.png not found. +expected_stderr: | +expected_returncode: 0 From 89774cd5d9b5548db0033987e0ca4d3fab79b036 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Wed, 3 Jul 2024 00:07:14 -0400 Subject: [PATCH 501/539] Changed switching files to let user choose save location. Improved searching for existing files. Addressed code review --- FileHandler.gd | 80 ++++++++++++++++++++++---------------------------- Spatial.gd | 64 +++++++++++++++++++++++----------------- Spatial.tscn | 23 ++++++++++++--- 3 files changed, 91 insertions(+), 76 deletions(-) diff --git a/FileHandler.gd b/FileHandler.gd index d797f00d..5be7d1a6 100644 --- a/FileHandler.gd +++ b/FileHandler.gd @@ -17,60 +17,50 @@ static func create_directory_if_missing(path: String): if success != OK: print("Error: Could not create data folder:", path) -static func generate_unique_file_name(base_name: String, extension: String, destination_folder: String) -> String: - var unique_name: String = base_name - var counter: int = 1 - var new_file_path: String = destination_folder.plus_file(unique_name + "." + extension) - - while File.new().file_exists(new_file_path): - unique_name = base_name + "_" + str(counter) - new_file_path = destination_folder.plus_file(unique_name + "." + extension) - counter += 1 - return unique_name + "." + extension +static func find_file_duplicate(directory_path: String, target_name: String, target_content: PoolByteArray, relative_path: String): + var dir = Directory.new() + if dir.open(directory_path) == OK: + dir.list_dir_begin(true) + var file_name = dir.get_next() + while file_name != "": + var full_path = directory_path.plus_file(file_name) + var current_relative_path = relative_path.plus_file(file_name) + if dir.current_is_dir(): + var found_path = find_file_duplicate(full_path, target_name, target_content, current_relative_path) + if found_path != "": + dir.list_dir_end() + return found_path + if file_name == target_name: + var file = File.new() + file.open(full_path, File.READ) + var file_content = file.get_buffer(file.get_len()) + file.close() + if file_content == target_content: + dir.list_dir_end() + return current_relative_path + file_name = dir.get_next() + return "" -static func copy_supported_image_file(file_path: String, destintation_dir: String) -> String: - # These are all supported file types in Godot but may not be supported - # by other marker programs. - var supported_image_extensions: Array = ["png", "jpg", "jpeg", "bmp", "tga"] +static func find_image_duplicates(file_path: String, destintation_dir: String) -> String: + # These are all supported file types in Godot that are not supported + # by other marker programs. "jpg", "jpeg", "bmp", "tga" var file_name: String = file_path.get_file() var file_extension: String = file_name.get_extension().to_lower() - if not supported_image_extensions.has(file_extension): - print("File is not a supported image type. Please choose a png, jpg, jpeg, bmp, or tga.") + if not file_extension == "png": + print("File is not a supported image type. Please choose a png") return "" - create_directory_if_missing(destintation_dir) - var destination_path: String = destintation_dir.plus_file(file_name) var file: File = File.new() - - if file.file_exists(destination_path): - file.open(file_path, File.READ) - var original_size: int = file.get_len() - var original_mod_time: int = file.get_modified_time(file_name) - file.close() - - file.open(destination_path, File.READ) - var destination_size: int = file.get_len() - var destination_mod_time: int = file.get_modified_time(file_name) - file.close() - - if original_size == destination_size and original_mod_time == destination_mod_time: - return destination_path - else: - var base_name: String = file_name.get_basename() - var extension: String = file_name.get_extension() - var unique_name: String = generate_unique_file_name(base_name, extension, destintation_dir) - destination_path = destintation_dir.plus_file(unique_name) - file.open(file_path, File.READ) - var content: PoolByteArray = file.get_buffer(file.get_len()) - file.close() + var file_content = file.get_buffer(file.get_len()) + var relative_path = find_file_duplicate(destintation_dir, file_name, file_content, "") + return relative_path + - var result: int = file.open(destination_path, File.WRITE) +static func copy_file(file_path: String, destination_path: String): + var dir = Directory.new() + var result = dir.copy(file_path, destination_path) if result == OK: - file.store_buffer(content) - file.close() print("File imported successfully.") - return destination_path else: print("Failed to import file.") - return "" diff --git a/Spatial.gd b/Spatial.gd index 0999a9c8..b93b6ff3 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -12,7 +12,7 @@ var edit_panel_open: bool = false # This is the path to the texture that will be used for the next created 3d-path # object or icon object in the UI -var next_texture_path: String = "" +var next_texture_id: int = 0 # A pointer to the trail object that any new nodes should be appended to. If # the value is null then a new trail will be created the next time a trail point @@ -340,9 +340,18 @@ func decode_context_packet(spb: StreamPeerBuffer): if self.map_id != old_map_id: print("New Map") + var old_textue_path: String = "" + if self.next_texture_id != 0: + old_textue_path = self.waypoint_data.get_textures()[self.next_texture_id] print("Saving Old Map") print("Loading New Map") load_waypoint_markers(self.map_id) + if old_textue_path != "": + self.next_texture_id = get_texture_index(old_textue_path) + if self.next_texture_id == -1: + self.waypoint_data.add_textures().set_filepath(old_textue_path) + self.next_texture_id = self.waypoint_data.get_textures().size() - 1 + reset_minimap_masks() @@ -558,7 +567,7 @@ func apply_category_visibility_to_nodes(category_item: TreeItem): category_data.category2d.visible = category_data.is_visible -func gen_new_trail(waypoint_trail: Waypoint.Trail, category_item: TreeItem) -> PoolStringArray: +func gen_new_trail(waypoint_trail: Waypoint.Trail, category_item: TreeItem) -> Array: # Create the texture to use from an image file # TODO: We want to be able to cache this data so that if a texture is used # by multiple objects we only need to keep ony copy of it in memory. #22. @@ -567,7 +576,8 @@ func gen_new_trail(waypoint_trail: Waypoint.Trail, category_item: TreeItem) -> P # srgb to render properly. Issue #23. var texture_id: int = waypoint_trail.get_texture_id() if texture_id == null: - print("Warning: No texture found in " , category_item.get_metadata(0).waypoint_category.get_name()) + var category_data = category_item.get_metadata(0) + print("Warning: No texture found in " , category_data.waypoint_category.get_name()) var texture_path: String = self.marker_file_dir + self.waypoint_data.get_textures()[texture_id].get_filepath() var texture_file = File.new() var image = Image.new() @@ -597,16 +607,18 @@ func gen_new_trail(waypoint_trail: Waypoint.Trail, category_item: TreeItem) -> P new_trail2d.refresh_points() category_data.category2d.add_trail2d(new_trail2d) - return PoolStringArray([new_trail3d, new_trail2d]) + return Array([new_trail3d, new_trail2d]) func gen_new_icon(waypoint_icon: Waypoint.Icon, category_item: TreeItem): var texture_id: int = waypoint_icon.get_texture_id() if texture_id == null: - print("Warning: No texture found in " , category_item.get_metadata(0).waypoint_category.get_name()) + var category_data = category_item.get_metadata(0) + print("Warning: No texture found in " , category_data.waypoint_category.get_name()) var texture_path: String = self.marker_file_dir + self.waypoint_data.get_textures()[texture_id].get_filepath() var position = waypoint_icon.get_position() if position == null: - print("Warning: No position found for icon ", category_item.get_metadata(0).waypoint_category.get_name()) + var category_data = category_item.get_metadata(0) + print("Warning: No position found for icon ", category_data.waypoint_category.get_name()) return var position_vector = Vector3(position.get_x(), position.get_y(), -position.get_z()) var new_icon = icon_scene.instance() @@ -752,7 +764,7 @@ func clear_adjustment_nodes(): # Update Waypoint datum ################################################################################ func get_texture_index(path: String) -> int: - for i in self.waypoint_data.get_textures().size: + for i in self.waypoint_data.get_textures().size(): if path == self.waypoint_data.get_textures()[i].get_filepath(): return i return -1 @@ -908,13 +920,23 @@ func _on_ChangeTexture_pressed(): # Set the file that will be used to create a new trail or icon when a new trail # or icon is created. ################################################################################ +var temp_image_file_path: String = "" + func _on_TexturePathOpen_file_selected(path: String): - var data_dir: String = self.marker_file_dir.plus_file("Data") - var new_texture_path: String = FileHandler.copy_supported_image_file(path, data_dir) - if new_texture_path != "": - self.next_texture_path = new_texture_path - else: - print("Warning: Error on selected file") + var new_texture_path: String = FileHandler.find_image_duplicates(path, self.marker_file_dir) + if new_texture_path == "": + self.temp_image_file_path = path + $Control/Dialogs/TexturePathOpen.hide() + $Control/Dialogs/TexturePathSave.show() + $Control/Dialogs/TexturePathSave.set_current_file(path.get_file()) + self.next_texture_id = get_texture_index(path) + +func _on_TexturePathSave_file_selected(path): + FileHandler.copy_file(self.temp_image_file_path, path) + var prefix = self.marker_file_dir + var relative_path = path.substr(prefix.length(), path.length() - prefix.length()) + self.waypoint_data.add_textures().set_filepath(relative_path) + self.next_texture_id = self.waypoint_data.get_textures().size() - 1 ################################################################################ # Null out the currently active trail so that a new one is created the next time @@ -935,13 +957,7 @@ func _on_NewIcon_pressed(): position.set_x(self.player_position.x) position.set_y(self.player_position.y) position.set_z(-self.player_position.z) - var texture_id: int = get_texture_index(self.next_texture_path) - if texture_id != -1: - waypoint_icon.set_texture_id(texture_id) - else: - self.waypoint_data.get_textures().add_textures().set_filepath(self.next_texture_path) - texture_id = self.waypoint_data.get_textures().add_textures().size() - 1 - waypoint_icon.set_texture_id(texture_id) + waypoint_icon.set_texture_id(self.next_texture_id) gen_new_icon(waypoint_icon, self.currently_active_category) # A new trail point is created @@ -956,13 +972,7 @@ func _on_NewTrailPoint_pressed(): trail_data.add_points_x(self.player_position.x) trail_data.add_points_y(self.player_position.y) trail_data.add_points_z(-self.player_position.z) - var texture_id: int = get_texture_index(self.next_texture_path) - if texture_id != -1: - waypoint_trail.set_texture_id(texture_id) - else: - self.waypoint_data.get_textures().add_textures().set_filepath(self.next_texture_path) - texture_id = self.waypoint_data.get_textures().add_textures().size() - 1 - waypoint_trail.set_texture_id(texture_id) + waypoint_trail.set_texture_id(self.next_texture_id) var new_trails: PoolStringArray = gen_new_trail(waypoint_trail, self.currently_active_category) self.currently_active_trail3d = new_trails[0] self.currently_active_trail2d = new_trails[1] diff --git a/Spatial.tscn b/Spatial.tscn index 22a1adfc..a4f24471 100644 --- a/Spatial.tscn +++ b/Spatial.tscn @@ -489,10 +489,10 @@ __meta__ = { } [node name="TexturePathOpen" type="FileDialog" parent="Control/Dialogs"] -margin_left = 740.978 -margin_top = 139.437 -margin_right = 1343.98 -margin_bottom = 602.437 +margin_left = 327.0 +margin_top = 97.0 +margin_right = 930.0 +margin_bottom = 560.0 window_title = "Open a File" mode = 0 access = 1 @@ -503,6 +503,19 @@ __meta__ = { "_edit_use_anchors_": false } +[node name="TexturePathSave" type="FileDialog" parent="Control/Dialogs"] +margin_left = 327.0 +margin_top = 967.0 +margin_right = 930.0 +margin_bottom = 560.0 +access = 1 +filters = PoolStringArray( "*.png" ) +current_dir = "user://protobins" +current_path = "user://protobins/" +__meta__ = { +"_edit_use_anchors_": false +} + [node name="SaveDialog" type="FileDialog" parent="Control/Dialogs"] margin_left = 180.169 margin_top = 105.833 @@ -913,6 +926,8 @@ material/0 = SubResource( 4 ) [connection signal="value_changed" from="Control/Dialogs/RangesDialog/GridContainer/SpinBox7" to="Control/Dialogs/RangesDialog" method="on_change"] [connection signal="file_selected" from="Control/Dialogs/TexturePathOpen" to="." method="_on_TexturePathOpen_file_selected"] [connection signal="hide" from="Control/Dialogs/TexturePathOpen" to="." method="_on_Dialog_hide"] +[connection signal="file_selected" from="Control/Dialogs/TexturePathSave" to="." method="_on_TexturePathSave_file_selected"] +[connection signal="hide" from="Control/Dialogs/TexturePathSave" to="." method="_on_Dialog_hide"] [connection signal="file_selected" from="Control/Dialogs/SaveDialog" to="." method="_on_SaveDialog_file_selected"] [connection signal="hide" from="Control/Dialogs/SaveDialog" to="." method="_on_Dialog_hide"] [connection signal="hide" from="Control/Dialogs/NodeEditorDialog" to="." method="_on_NodeEditorDialog_hide"] From 55ab88145b0acb06b01e0fe52e6a63c8c50967f7 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 8 Jul 2024 19:54:33 -0400 Subject: [PATCH 502/539] Changes to not show the user directory when selecting a file --- Spatial.gd | 28 ++++++++++++++-------------- Spatial.tscn | 6 +++--- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Spatial.gd b/Spatial.gd index b93b6ff3..68c6be8b 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -923,20 +923,20 @@ func _on_ChangeTexture_pressed(): var temp_image_file_path: String = "" func _on_TexturePathOpen_file_selected(path: String): - var new_texture_path: String = FileHandler.find_image_duplicates(path, self.marker_file_dir) - if new_texture_path == "": - self.temp_image_file_path = path - $Control/Dialogs/TexturePathOpen.hide() - $Control/Dialogs/TexturePathSave.show() - $Control/Dialogs/TexturePathSave.set_current_file(path.get_file()) - self.next_texture_id = get_texture_index(path) - -func _on_TexturePathSave_file_selected(path): - FileHandler.copy_file(self.temp_image_file_path, path) - var prefix = self.marker_file_dir - var relative_path = path.substr(prefix.length(), path.length() - prefix.length()) - self.waypoint_data.add_textures().set_filepath(relative_path) - self.next_texture_id = self.waypoint_data.get_textures().size() - 1 + var next_texture_path: String = FileHandler.find_image_duplicates(path, self.marker_file_dir) + if next_texture_path == "": + next_texture_path = "Data".plus_file(path.get_file()) + var file = File.new() + if file.file_exists(self.marker_file_dir.plus_file(next_texture_path)): + print("Error: A different image with the name ", path.get_file(), " has already been imported. Please rename the file and try again.") + return + FileHandler.copy_file(path, self.marker_file_dir.plus_file(next_texture_path)) + var texture_index = get_texture_index(next_texture_path) + if texture_index == -1: + self.waypoint_data.add_textures().set_filepath(next_texture_path) + texture_index = self.waypoint_data.get_textures().size() - 1 + self.next_texture_id = texture_index + ################################################################################ # Null out the currently active trail so that a new one is created the next time diff --git a/Spatial.tscn b/Spatial.tscn index a4f24471..1121e0de 100644 --- a/Spatial.tscn +++ b/Spatial.tscn @@ -495,10 +495,10 @@ margin_right = 930.0 margin_bottom = 560.0 window_title = "Open a File" mode = 0 -access = 1 +access = 2 filters = PoolStringArray( "*.png" ) -current_dir = "user://" -current_path = "user://" +current_dir = "/" +current_path = "/" __meta__ = { "_edit_use_anchors_": false } From 3bf32de15bf7bddf192a483920ea63e1b7ea1f09 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Mon, 8 Jul 2024 23:08:03 -0400 Subject: [PATCH 503/539] Added toast command and removed erroneous node --- Spatial.gd | 4 +++- Spatial.tscn | 15 --------------- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/Spatial.gd b/Spatial.gd index 68c6be8b..f7218f16 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -866,6 +866,8 @@ func refresh_trail3d_points(trail3d: Spatial): func refresh_trail2d_points(trail2d: Line2D): trail2d.refresh_points() +func toast(message: String): + print(message) ################################################################################ # Signal Functions @@ -928,7 +930,7 @@ func _on_TexturePathOpen_file_selected(path: String): next_texture_path = "Data".plus_file(path.get_file()) var file = File.new() if file.file_exists(self.marker_file_dir.plus_file(next_texture_path)): - print("Error: A different image with the name ", path.get_file(), " has already been imported. Please rename the file and try again.") + toast(String(["Error: A different image with the name ", path.get_file(), " has already been imported. Please rename the file and try again."])) return FileHandler.copy_file(path, self.marker_file_dir.plus_file(next_texture_path)) var texture_index = get_texture_index(next_texture_path) diff --git a/Spatial.tscn b/Spatial.tscn index 1121e0de..4f484ba5 100644 --- a/Spatial.tscn +++ b/Spatial.tscn @@ -503,19 +503,6 @@ __meta__ = { "_edit_use_anchors_": false } -[node name="TexturePathSave" type="FileDialog" parent="Control/Dialogs"] -margin_left = 327.0 -margin_top = 967.0 -margin_right = 930.0 -margin_bottom = 560.0 -access = 1 -filters = PoolStringArray( "*.png" ) -current_dir = "user://protobins" -current_path = "user://protobins/" -__meta__ = { -"_edit_use_anchors_": false -} - [node name="SaveDialog" type="FileDialog" parent="Control/Dialogs"] margin_left = 180.169 margin_top = 105.833 @@ -926,8 +913,6 @@ material/0 = SubResource( 4 ) [connection signal="value_changed" from="Control/Dialogs/RangesDialog/GridContainer/SpinBox7" to="Control/Dialogs/RangesDialog" method="on_change"] [connection signal="file_selected" from="Control/Dialogs/TexturePathOpen" to="." method="_on_TexturePathOpen_file_selected"] [connection signal="hide" from="Control/Dialogs/TexturePathOpen" to="." method="_on_Dialog_hide"] -[connection signal="file_selected" from="Control/Dialogs/TexturePathSave" to="." method="_on_TexturePathSave_file_selected"] -[connection signal="hide" from="Control/Dialogs/TexturePathSave" to="." method="_on_Dialog_hide"] [connection signal="file_selected" from="Control/Dialogs/SaveDialog" to="." method="_on_SaveDialog_file_selected"] [connection signal="hide" from="Control/Dialogs/SaveDialog" to="." method="_on_Dialog_hide"] [connection signal="hide" from="Control/Dialogs/NodeEditorDialog" to="." method="_on_NodeEditorDialog_hide"] From 5fdec31ddc122e24f0b11c75306ceaf36a479b2b Mon Sep 17 00:00:00 2001 From: klingbolt Date: Thu, 18 Jul 2024 19:21:18 -0400 Subject: [PATCH 504/539] Fixed two small issues. bin is the new data format for proto files. 2 places where 3d was not added to new names --- Spatial.gd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Spatial.gd b/Spatial.gd index d0b1bc38..e7cc839d 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -380,7 +380,7 @@ func reset_2D_minimap_masks(category2d: Node2D, compass_corner1: Vector2, compas reset_2D_minimap_masks(subcategory, compass_corner1, compass_corner2) func reset_3D_minimap_masks(category: Spatial): - for trail in category.trails: + for trail in category.trails3d: trail.get_node("MeshInstance").material_override.set_shader_param("map_size", Vector2(self.compass_width, self.compass_height)) for icon in category.icons: icon.material_override.set_shader_param("map_size", Vector2(self.compass_width, self.compass_height)) @@ -393,7 +393,7 @@ var marker_file_dir = "user://protobins/" var marker_file_path = "" func load_waypoint_markers(map_id): - self.marker_file_path = self.marker_file_dir + String(map_id) + ".data" + self.marker_file_path = self.marker_file_dir + String(map_id) + ".bin" self.waypoint_data = Waypoint.Waypoint.new() clear_map_markers() init_category_tree() @@ -594,7 +594,7 @@ func gen_new_trail(texture_path: String, waypoint_trail: Waypoint.Trail, categor new_trail3d.refresh_mesh() new_trail3d.set_texture(texture) var category_data = category_item.get_metadata(0) - category_data.category3d.add_trail(new_trail3d) + category_data.category3d.add_trail3d(new_trail3d) # Create a new 2D Trail From 477ed2fcdcda256746c6098fc646c814d2f6c543 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Tue, 23 Jul 2024 20:05:57 -0400 Subject: [PATCH 505/539] Save the current data to the map files --- Spatial.gd | 71 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 41 insertions(+), 30 deletions(-) diff --git a/Spatial.gd b/Spatial.gd index e7cc839d..a3479d0d 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -9,6 +9,7 @@ var map_is_open: bool var compass_is_top_right: bool var edit_panel_open: bool = false +var unsaved_changes: bool = false setget set_unsaved_changes # This is the path to the texture that will be used for the next created 3d-path # object or icon object in the UI @@ -389,11 +390,14 @@ func reset_3D_minimap_masks(category: Spatial): var waypoint_data = Waypoint.Waypoint.new() -var marker_file_dir = "user://protobins/" +#We save the marker data in this directory when the files are have been split +#by Map ID. All changes made by the editor are automatically saved in these +#files prior to export. +var unsaved_markers_dir = "user://protobins/" var marker_file_path = "" -func load_waypoint_markers(map_id): - self.marker_file_path = self.marker_file_dir + String(map_id) + ".bin" +func load_waypoint_markers(map_id_to_load: int): + self.marker_file_path = self.unsaved_markers_dir + String(map_id_to_load) + ".bin" self.waypoint_data = Waypoint.Waypoint.new() clear_map_markers() init_category_tree() @@ -537,7 +541,7 @@ func _waypoint_categories_to_godot_nodes(item: TreeItem, waypoint_category: Wayp if texture_id == null: print("Warning: No texture found in " , category_name) continue - var full_texture_path = self.marker_file_dir + self.waypoint_data.get_textures()[texture_id].get_filepath() + var full_texture_path = self.unsaved_markers_dir + self.waypoint_data.get_textures()[texture_id].get_filepath() gen_new_trail(full_texture_path, trail, category_item) @@ -546,7 +550,7 @@ func _waypoint_categories_to_godot_nodes(item: TreeItem, waypoint_category: Wayp if texture_id == null: print("Warning: No texture found in " , category_name) continue - var full_texture_path = self.marker_file_dir + self.waypoint_data.get_textures()[texture_id].get_filepath() + var full_texture_path = self.unsaved_markers_dir + self.waypoint_data.get_textures()[texture_id].get_filepath() gen_new_icon(full_texture_path, icon, category_item) for category_child in waypoint_category.get_children(): @@ -621,31 +625,30 @@ func gen_new_icon(texture_path: String, waypoint_icon: Waypoint.Icon, category_i var category_data = category_item.get_metadata(0) category_data.category3d.add_icon(new_icon) -# This function take all of the currently rendered objects and converts it into -# the data format that is saved/loaded from. -func data_from_renderview(): - var icons_data = [] - var paths_data = [] - - for icon in $Icons.get_children(): - icons_data.append({ - "position": [icon.translation.x, icon.translation.y, -icon.translation.z], - "texture": icon.texture_path - }) - - for path in $Paths.get_children(): - #print(path) - var points = [] - for point in range(path.get_point_count()): - var point_position:Vector3 = path.get_point_position(point) - points.append([point_position.x, point_position.y, -point_position.z]) - paths_data.append({ - "points": points, - "texture": path.texture_path - }) - - var data_out = {"icons": icons_data, "paths": paths_data} - return data_out +################################################################################ +# Section of functions for saving data to file +################################################################################ +func set_unsaved_changes(value): + if self.unsaved_changes != value: + unsaved_changes = value + update_burrito_icon() + +func update_burrito_icon(): + if self.unsaved_changes: + #TODO: Determine if this is the best color and alpha value to use + $Control/GlobalMenuButton/TextureRect.modulate = ColorN("red", 1) + $Control/GlobalMenuButton/main_menu_toggle.hint_tooltip = "Unsaved Data" + else: + $Control/GlobalMenuButton/TextureRect.modulate = ColorN("white", 0.44) + $Control/GlobalMenuButton/main_menu_toggle.hint_tooltip = "" + +func save_current_map_data(): + var packed_bytes = self.waypoint_data.to_bytes() + var file = File.new() + file.open(self.marker_file_path, file.WRITE) + file.store_buffer(packed_bytes) + set_unsaved_changes(false) + ################################################################################ # Adjustment and gizmo functions @@ -764,6 +767,7 @@ func set_icon_position(new_position: Vector3, waypoint_icon: Waypoint.Icon, icon position.set_y(new_position.y) position.set_z(new_position.z) icon.set_position(new_position) + set_unsaved_changes(true) func remove_icon(waypoint_icon: Waypoint.Icon, icon: Sprite3D): if icon.waypoint != waypoint_icon: @@ -849,14 +853,19 @@ func new_trail_point_after(waypoint_trail: Waypoint.Trail, trail3d: Spatial, tra func refresh_trail3d_points(trail3d: Spatial): trail3d.refresh_mesh() + set_unsaved_changes(true) func refresh_trail2d_points(trail2d: Line2D): trail2d.refresh_points() + set_unsaved_changes(true) ################################################################################ # Signal Functions ################################################################################ +func _on_SaveTrail_pressed(): + save_current_map_data() + func _on_main_menu_toggle_pressed(): $Control/Dialogs/MainMenu.show() set_maximal_mouse_block() @@ -1011,6 +1020,8 @@ func _on_ReverseTrailDirection_pressed(): func _on_ExitButton_pressed(): + if self.unsaved_changes: + save_current_map_data() exit_burrito() From e0212162ff23d6c58dafda5843fbb138498e6289 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Tue, 23 Jul 2024 22:00:33 -0400 Subject: [PATCH 506/539] Added a check to save if the map changes --- Spatial.gd | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Spatial.gd b/Spatial.gd index a3479d0d..37709a4a 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -341,6 +341,8 @@ func decode_context_packet(spb: StreamPeerBuffer): if self.map_id != old_map_id: print("New Map") print("Saving Old Map") + if self.unsaved_changes: + save_current_map_data() print("Loading New Map") load_waypoint_markers(self.map_id) From 5d0832d1833abbf45bf8fc54f1dbea0a9e2e8f8c Mon Sep 17 00:00:00 2001 From: klingbolt Date: Tue, 30 Jul 2024 23:13:23 -0400 Subject: [PATCH 507/539] Added hashing functionality and moved import function to allow simpler calling of hashing functions --- Spatial.gd | 86 +++++++++++++++++++++++++++++++++++----------------- Spatial.tscn | 6 ++-- 2 files changed, 61 insertions(+), 31 deletions(-) diff --git a/Spatial.gd b/Spatial.gd index 37709a4a..0b06b83a 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -9,7 +9,6 @@ var map_is_open: bool var compass_is_top_right: bool var edit_panel_open: bool = false -var unsaved_changes: bool = false setget set_unsaved_changes # This is the path to the texture that will be used for the next created 3d-path # object or icon object in the UI @@ -57,6 +56,7 @@ const gizmo_scene = preload("res://Gizmo/PointEdit.tscn") # Scripts containing code used by this scene const CategoryData = preload("res://CategoryData.gd") const Waypoint = preload("res://waypoint.gd") +const FileHandler = preload("res://FileHandler.gd") ##########Node Connections########### onready var markers_ui := $Control/Dialogs/CategoriesDialog/MarkersUI as Tree @@ -340,9 +340,11 @@ func decode_context_packet(spb: StreamPeerBuffer): if self.map_id != old_map_id: print("New Map") - print("Saving Old Map") - if self.unsaved_changes: - save_current_map_data() + if old_map_id != 0: + if not read_hash(old_map_id) == get_hash(self.waypoint_data.to_bytes()): + print("Saving Old Map") + save_map_data(old_map_id) + print("not same") print("Loading New Map") load_waypoint_markers(self.map_id) @@ -395,7 +397,7 @@ var waypoint_data = Waypoint.Waypoint.new() #We save the marker data in this directory when the files are have been split #by Map ID. All changes made by the editor are automatically saved in these #files prior to export. -var unsaved_markers_dir = "user://protobins/" +var unsaved_markers_dir = "user://protobin_by_map_id/" var marker_file_path = "" func load_waypoint_markers(map_id_to_load: int): @@ -630,27 +632,46 @@ func gen_new_icon(texture_path: String, waypoint_icon: Waypoint.Icon, category_i ################################################################################ # Section of functions for saving data to file ################################################################################ -func set_unsaved_changes(value): - if self.unsaved_changes != value: - unsaved_changes = value - update_burrito_icon() - -func update_burrito_icon(): - if self.unsaved_changes: - #TODO: Determine if this is the best color and alpha value to use - $Control/GlobalMenuButton/TextureRect.modulate = ColorN("red", 1) - $Control/GlobalMenuButton/main_menu_toggle.hint_tooltip = "Unsaved Data" - else: - $Control/GlobalMenuButton/TextureRect.modulate = ColorN("white", 0.44) - $Control/GlobalMenuButton/main_menu_toggle.hint_tooltip = "" - -func save_current_map_data(): +func save_map_data(map_id: int): var packed_bytes = self.waypoint_data.to_bytes() var file = File.new() file.open(self.marker_file_path, file.WRITE) file.store_buffer(packed_bytes) - set_unsaved_changes(false) +func get_hash(data: PoolByteArray) -> String: + var ctx = HashingContext.new() + ctx.start(HashingContext.HASH_MD5) + ctx.update(data) + var res: PoolByteArray = ctx.finish() + return res.hex_encode() + +const FILE_HASH_PATH: String = "user://file_hash.json" + +# Save all hashes +func save_hashes(): + var file = File.new() + var data = {} + var dir = Directory.new() + dir.open(self.unsaved_markers_dir) + dir.list_dir_begin() + var file_name = dir.get_next() + while file_name != "": + if dir.file_exists(file_name): + file.open(file_name, File.READ) + var hash_data = get_hash(file.get_buffer(file.get_len())) + data[file_name.get_basename()] = hash_data + file_name = dir.get_next() + file.open(FILE_HASH_PATH, File.WRITE) + file.store_string(JSON.print(data)) + +func read_hash(map_id: int) -> String: + var file = File.new() + if not file.file_exists(FILE_HASH_PATH): + return "" + var data = {} + file.open(FILE_HASH_PATH, File.READ) + data = JSON.parse(file.get_as_text()).result + return data.get(String(map_id), "") ################################################################################ # Adjustment and gizmo functions @@ -769,7 +790,6 @@ func set_icon_position(new_position: Vector3, waypoint_icon: Waypoint.Icon, icon position.set_y(new_position.y) position.set_z(new_position.z) icon.set_position(new_position) - set_unsaved_changes(true) func remove_icon(waypoint_icon: Waypoint.Icon, icon: Sprite3D): if icon.waypoint != waypoint_icon: @@ -855,18 +875,16 @@ func new_trail_point_after(waypoint_trail: Waypoint.Trail, trail3d: Spatial, tra func refresh_trail3d_points(trail3d: Spatial): trail3d.refresh_mesh() - set_unsaved_changes(true) func refresh_trail2d_points(trail2d: Line2D): trail2d.refresh_points() - set_unsaved_changes(true) ################################################################################ # Signal Functions ################################################################################ func _on_SaveTrail_pressed(): - save_current_map_data() + save_map_data(self.map_id) func _on_main_menu_toggle_pressed(): $Control/Dialogs/MainMenu.show() @@ -1022,8 +1040,8 @@ func _on_ReverseTrailDirection_pressed(): func _on_ExitButton_pressed(): - if self.unsaved_changes: - save_current_map_data() + if not read_hash(self.map_id) == get_hash(self.waypoint_data.to_bytes()): + save_map_data(self.map_id) exit_burrito() @@ -1050,3 +1068,17 @@ func _on_MarkersUI_item_edited(): func _on_ImportPath_pressed(): $Control/Dialogs/ImportPackDialog.show() + + +func _on_ImportPackDialog_dir_selected(dir): + var user_data_dir = str(OS.get_user_data_dir()) + var args: PoolStringArray = [ + "--input-taco-path", dir, + # TODO: This line is not working as intended and needs to be investigated + #"--input-waypoint-path", user_data_dir.plus_file("protobin"), + "--output-waypoint-path", user_data_dir.plus_file("protobin"), + "--output-split-waypoint-path", ProjectSettings.globalize_path(self.unsaved_markers_dir) + ] + FileHandler.call_xml_converter(args) + save_hashes() + load_waypoint_markers(self.map_id) diff --git a/Spatial.tscn b/Spatial.tscn index 22a1adfc..d67e2225 100644 --- a/Spatial.tscn +++ b/Spatial.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=19 format=2] +[gd_scene load_steps=18 format=2] [ext_resource path="res://Spatial.gd" type="Script" id=1] [ext_resource path="res://shaders/range_indicators.shader" type="Shader" id=2] @@ -12,7 +12,6 @@ [ext_resource path="res://icon_new_point.png" type="Texture" id=11] [ext_resource path="res://SettingsDialog.gd" type="Script" id=12] [ext_resource path="res://Category3D.gd" type="Script" id=13] -[ext_resource path="res://ImportPackDialog.gd" type="Script" id=14] [ext_resource path="res://Category2D.gd" type="Script" id=15] [sub_resource type="Shader" id=1] @@ -193,7 +192,6 @@ mode = 2 access = 2 current_dir = "" current_path = "" -script = ExtResource( 14 ) __meta__ = { "_edit_use_anchors_": false } @@ -886,7 +884,7 @@ material/0 = SubResource( 4 ) [connection signal="pressed" from="Control/GlobalMenuButton/EditorQuckPanel/HBoxContainer/NewTrailPoint" to="." method="_on_NewTrailPoint_pressed"] [connection signal="pressed" from="Control/GlobalMenuButton/EditorQuckPanel/HBoxContainer/NewIcon" to="." method="_on_NewIcon_pressed"] [connection signal="pressed" from="Control/GlobalMenuButton/EditorQuckPanel/HBoxContainer/AdjustPoints" to="." method="_on_AdjustNodesButton_pressed"] -[connection signal="dir_selected" from="Control/Dialogs/ImportPackDialog" to="Control/Dialogs/ImportPackDialog" method="_on_FileDialog_dir_selected"] +[connection signal="dir_selected" from="Control/Dialogs/ImportPackDialog" to="." method="_on_ImportPackDialog_dir_selected"] [connection signal="hide" from="Control/Dialogs/ImportPackDialog" to="." method="_on_Dialog_hide"] [connection signal="hide" from="Control/Dialogs/MainMenu" to="." method="_on_Dialog_hide"] [connection signal="pressed" from="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer/LoadTrail" to="." method="_on_LoadTrail_pressed"] From 981cf43ff90425bd00c1964d2ae6a2d57231465e Mon Sep 17 00:00:00 2001 From: klingbolt Date: Tue, 30 Jul 2024 23:15:52 -0400 Subject: [PATCH 508/539] added spaced in comments --- Spatial.gd | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Spatial.gd b/Spatial.gd index 0b06b83a..fbc1b684 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -394,9 +394,9 @@ func reset_3D_minimap_masks(category: Spatial): var waypoint_data = Waypoint.Waypoint.new() -#We save the marker data in this directory when the files are have been split -#by Map ID. All changes made by the editor are automatically saved in these -#files prior to export. +# We save the marker data in this directory when the files are have been split +# by Map ID. All changes made by the editor are automatically saved in these +# files prior to export. var unsaved_markers_dir = "user://protobin_by_map_id/" var marker_file_path = "" @@ -1075,7 +1075,7 @@ func _on_ImportPackDialog_dir_selected(dir): var args: PoolStringArray = [ "--input-taco-path", dir, # TODO: This line is not working as intended and needs to be investigated - #"--input-waypoint-path", user_data_dir.plus_file("protobin"), + # "--input-waypoint-path", user_data_dir.plus_file("protobin"), "--output-waypoint-path", user_data_dir.plus_file("protobin"), "--output-split-waypoint-path", ProjectSettings.globalize_path(self.unsaved_markers_dir) ] From d4944b7bd67dd5cad12b10a84312aa2df10ec72d Mon Sep 17 00:00:00 2001 From: klingbolt Date: Wed, 31 Jul 2024 23:32:02 -0400 Subject: [PATCH 509/539] addressing code review --- Spatial.gd | 32 +++++++++++++------------------- Spatial.tscn | 1 - 2 files changed, 13 insertions(+), 20 deletions(-) diff --git a/Spatial.gd b/Spatial.gd index fbc1b684..12e82926 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -58,6 +58,9 @@ const CategoryData = preload("res://CategoryData.gd") const Waypoint = preload("res://waypoint.gd") const FileHandler = preload("res://FileHandler.gd") +# File path for the the json that contains a hash of the data files +const HASH_BY_MAP_ID_FILEPATH: String = "user://hash_by_map_id.json" + ##########Node Connections########### onready var markers_ui := $Control/Dialogs/CategoriesDialog/MarkersUI as Tree onready var markers_3d := $Markers3D as Spatial @@ -340,11 +343,9 @@ func decode_context_packet(spb: StreamPeerBuffer): if self.map_id != old_map_id: print("New Map") - if old_map_id != 0: - if not read_hash(old_map_id) == get_hash(self.waypoint_data.to_bytes()): - print("Saving Old Map") - save_map_data(old_map_id) - print("not same") + if old_map_id != 0 and not read_hash(old_map_id) == make_hash(self.waypoint_data.to_bytes()): + print("Saving Old Map") + save_map_data(old_map_id) print("Loading New Map") load_waypoint_markers(self.map_id) @@ -638,14 +639,13 @@ func save_map_data(map_id: int): file.open(self.marker_file_path, file.WRITE) file.store_buffer(packed_bytes) -func get_hash(data: PoolByteArray) -> String: +func make_hash(data: PoolByteArray) -> String: var ctx = HashingContext.new() ctx.start(HashingContext.HASH_MD5) ctx.update(data) var res: PoolByteArray = ctx.finish() return res.hex_encode() -const FILE_HASH_PATH: String = "user://file_hash.json" # Save all hashes func save_hashes(): @@ -658,20 +658,17 @@ func save_hashes(): while file_name != "": if dir.file_exists(file_name): file.open(file_name, File.READ) - var hash_data = get_hash(file.get_buffer(file.get_len())) - data[file_name.get_basename()] = hash_data + data[file_name.get_basename()] = make_hash(file.get_buffer(file.get_len())) file_name = dir.get_next() - file.open(FILE_HASH_PATH, File.WRITE) + file.open(HASH_BY_MAP_ID_FILEPATH, File.WRITE) file.store_string(JSON.print(data)) func read_hash(map_id: int) -> String: var file = File.new() - if not file.file_exists(FILE_HASH_PATH): + if not file.file_exists(HASH_BY_MAP_ID_FILEPATH): return "" - var data = {} - file.open(FILE_HASH_PATH, File.READ) - data = JSON.parse(file.get_as_text()).result - return data.get(String(map_id), "") + file.open(HASH_BY_MAP_ID_FILEPATH, File.READ) + return JSON.parse(file.get_as_text()).result.get(String(map_id), "") ################################################################################ # Adjustment and gizmo functions @@ -883,9 +880,6 @@ func refresh_trail2d_points(trail2d: Line2D): ################################################################################ # Signal Functions ################################################################################ -func _on_SaveTrail_pressed(): - save_map_data(self.map_id) - func _on_main_menu_toggle_pressed(): $Control/Dialogs/MainMenu.show() set_maximal_mouse_block() @@ -1040,7 +1034,7 @@ func _on_ReverseTrailDirection_pressed(): func _on_ExitButton_pressed(): - if not read_hash(self.map_id) == get_hash(self.waypoint_data.to_bytes()): + if not read_hash(self.map_id) == make_hash(self.waypoint_data.to_bytes()): save_map_data(self.map_id) exit_burrito() diff --git a/Spatial.tscn b/Spatial.tscn index d67e2225..3483cd77 100644 --- a/Spatial.tscn +++ b/Spatial.tscn @@ -911,7 +911,6 @@ material/0 = SubResource( 4 ) [connection signal="value_changed" from="Control/Dialogs/RangesDialog/GridContainer/SpinBox7" to="Control/Dialogs/RangesDialog" method="on_change"] [connection signal="file_selected" from="Control/Dialogs/TexturePathOpen" to="." method="_on_TexturePathOpen_file_selected"] [connection signal="hide" from="Control/Dialogs/TexturePathOpen" to="." method="_on_Dialog_hide"] -[connection signal="file_selected" from="Control/Dialogs/SaveDialog" to="." method="_on_SaveDialog_file_selected"] [connection signal="hide" from="Control/Dialogs/SaveDialog" to="." method="_on_Dialog_hide"] [connection signal="hide" from="Control/Dialogs/NodeEditorDialog" to="." method="_on_NodeEditorDialog_hide"] [connection signal="pressed" from="Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/DeleteNode" to="." method="_on_DeleteNode_pressed"] From d6485ccc6336d26037762ec324bf0d101b99d801 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sat, 17 Aug 2024 18:12:28 -0400 Subject: [PATCH 510/539] Fixing errors from conflict merge --- Spatial.gd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Spatial.gd b/Spatial.gd index 0c2d60ec..fcb44f70 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -346,7 +346,7 @@ func decode_context_packet(spb: StreamPeerBuffer): var old_textue_path: String = "" if old_map_id != 0 and not read_hash(old_map_id) == make_hash(self.waypoint_data.to_bytes()): print("Saving Old Map") - old_textue_path = self.waypoint_data.get_textures()[self.next_texture_id] + old_textue_path = self.waypoint_data.get_textures()[self.next_texture_id].get_filepath() save_map_data(old_map_id) print("Loading New Map") load_waypoint_markers(self.map_id) @@ -586,7 +586,7 @@ func gen_new_trail(waypoint_trail: Waypoint.Trail, category_item: TreeItem) -> A if texture_id == null: var category_data = category_item.get_metadata(0) print("Warning: No texture found in " , category_data.waypoint_category.get_name()) - var texture_path: String = self.marker_file_dir + self.waypoint_data.get_textures()[texture_id].get_filepath() + var texture_path: String = self.unsaved_markers_dir + self.waypoint_data.get_textures()[texture_id].get_filepath() var texture_file = File.new() var image = Image.new() if !texture_file.file_exists(texture_path): @@ -622,7 +622,7 @@ func gen_new_icon(waypoint_icon: Waypoint.Icon, category_item: TreeItem): if texture_id == null: var category_data = category_item.get_metadata(0) print("Warning: No texture found in " , category_data.waypoint_category.get_name()) - var texture_path: String = self.marker_file_dir + self.waypoint_data.get_textures()[texture_id].get_filepath() + var texture_path: String = self.unsaved_markers_dir + self.waypoint_data.get_textures()[texture_id].get_filepath() var position = waypoint_icon.get_position() if position == null: var category_data = category_item.get_metadata(0) From c1c9f4296cf259aa0cc1f003cf63a8f36fb5a2aa Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sat, 17 Aug 2024 21:47:35 -0400 Subject: [PATCH 511/539] Addressing code review. Small changes, new function for getting texture path from id --- Spatial.gd | 50 ++++++++++++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 20 deletions(-) diff --git a/Spatial.gd b/Spatial.gd index fcb44f70..2a881363 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -343,19 +343,17 @@ func decode_context_packet(spb: StreamPeerBuffer): if self.map_id != old_map_id: print("New Map") - var old_textue_path: String = "" + var old_texture_path: String = "" + old_texture_path = get_texture_path(self.next_texture_id) if old_map_id != 0 and not read_hash(old_map_id) == make_hash(self.waypoint_data.to_bytes()): print("Saving Old Map") - old_textue_path = self.waypoint_data.get_textures()[self.next_texture_id].get_filepath() save_map_data(old_map_id) print("Loading New Map") load_waypoint_markers(self.map_id) - if old_textue_path != "": - self.next_texture_id = get_texture_index(old_textue_path) - if self.next_texture_id == -1: - self.waypoint_data.add_textures().set_filepath(old_textue_path) - self.next_texture_id = self.waypoint_data.get_textures().size() - 1 - + self.next_texture_id = get_texture_index(old_texture_path) + if self.next_texture_id == -1: + self.waypoint_data.add_textures().set_filepath(old_texture_path) + self.next_texture_id = self.waypoint_data.get_textures().size() - 1 reset_minimap_masks() @@ -583,10 +581,11 @@ func gen_new_trail(waypoint_trail: Waypoint.Trail, category_item: TreeItem) -> A # which does not use srgb to render properly, and one for 3D which forces # srgb to render properly. Issue #23. var texture_id: int = waypoint_trail.get_texture_id() - if texture_id == null: + if texture_id == 0: var category_data = category_item.get_metadata(0) print("Warning: No texture found in " , category_data.waypoint_category.get_name()) - var texture_path: String = self.unsaved_markers_dir + self.waypoint_data.get_textures()[texture_id].get_filepath() + # TODO(330): Error Textures + var texture_path: String = self.unsaved_markers_dir + get_texture_path(texture_id) var texture_file = File.new() var image = Image.new() if !texture_file.file_exists(texture_path): @@ -615,14 +614,15 @@ func gen_new_trail(waypoint_trail: Waypoint.Trail, category_item: TreeItem) -> A new_trail2d.refresh_points() category_data.category2d.add_trail2d(new_trail2d) - return Array([new_trail3d, new_trail2d]) + return [new_trail3d, new_trail2d] func gen_new_icon(waypoint_icon: Waypoint.Icon, category_item: TreeItem): var texture_id: int = waypoint_icon.get_texture_id() - if texture_id == null: + if texture_id == 0: var category_data = category_item.get_metadata(0) print("Warning: No texture found in " , category_data.waypoint_category.get_name()) - var texture_path: String = self.unsaved_markers_dir + self.waypoint_data.get_textures()[texture_id].get_filepath() + # TODO(330) Error Textures + var texture_path: String = self.unsaved_markers_dir + get_texture_path(texture_id) var position = waypoint_icon.get_position() if position == null: var category_data = category_item.get_metadata(0) @@ -786,11 +786,22 @@ func clear_adjustment_nodes(): # Update Waypoint datum ################################################################################ func get_texture_index(path: String) -> int: + if path == "": + return 0 for i in self.waypoint_data.get_textures().size(): if path == self.waypoint_data.get_textures()[i].get_filepath(): return i return -1 +func get_texture_path(texture_id: int) -> String: + if texture_id == 0: + return "" + if texture_id >= self.waypoint_data.get_textures().size() or texture_id < 0: + toast("Invalid texture index found") + # TODO(330): This should return an error texture filepath instead of empty string + return "" + return self.waypoint_data.get_textures()[texture_id].get_filepath() + func set_icon_position(new_position: Vector3, waypoint_icon: Waypoint.Icon, icon: Sprite3D): if icon.waypoint != waypoint_icon: push_error("Desync between Waypoint and Icon") @@ -944,17 +955,16 @@ func _on_ChangeTexture_pressed(): # Set the file that will be used to create a new trail or icon when a new trail # or icon is created. ################################################################################ -var temp_image_file_path: String = "" - func _on_TexturePathOpen_file_selected(path: String): - var next_texture_path: String = FileHandler.find_image_duplicates(path, self.marker_file_dir) - if next_texture_path == "": + var next_texture_path = FileHandler.find_image_duplicates(path, self.unsaved_markers_dir) + if next_texture_path == null: + FileHandler.create_directory_if_missing(self.unsaved_markers_dir.plus_file("Data")) next_texture_path = "Data".plus_file(path.get_file()) var file = File.new() - if file.file_exists(self.marker_file_dir.plus_file(next_texture_path)): + if file.file_exists(self.unsaved_markers_dir.plus_file(next_texture_path)): toast(String(["Error: A different image with the name ", path.get_file(), " has already been imported. Please rename the file and try again."])) return - FileHandler.copy_file(path, self.marker_file_dir.plus_file(next_texture_path)) + FileHandler.copy_file(path, self.unsaved_markers_dir.plus_file(next_texture_path)) var texture_index = get_texture_index(next_texture_path) if texture_index == -1: self.waypoint_data.add_textures().set_filepath(next_texture_path) @@ -997,7 +1007,7 @@ func _on_NewTrailPoint_pressed(): trail_data.add_points_y(self.player_position.y) trail_data.add_points_z(-self.player_position.z) waypoint_trail.set_texture_id(self.next_texture_id) - var new_trails: PoolStringArray = gen_new_trail(waypoint_trail, self.currently_active_category) + var new_trails: Array = gen_new_trail(waypoint_trail, self.currently_active_category) self.currently_active_trail3d = new_trails[0] self.currently_active_trail2d = new_trails[1] else: From 14aa061d0bd4cbc352a64981018ea4ba0df7fbdd Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sat, 17 Aug 2024 23:08:26 -0500 Subject: [PATCH 512/539] Fixing the category key when loading proto files --- xml_converter/integration_tests/run_tests.py | 2 ++ .../display_name_valid/input/pack/xml_file.xml | 16 ++++++++++++++++ .../output_proto/markers.bin | 7 +++++++ .../display_name_valid/output_xml/xml_file.xml | 18 ++++++++++++++++++ .../display_name_valid/testcase.yaml | 5 +++++ .../proto_type_valid/input/pack/markers.bin | 7 +++++++ .../proto_type_valid/output_proto/markers.bin | 7 +++++++ .../proto_type_valid/output_xml/xml_file.xml | 18 ++++++++++++++++++ .../test_cases/proto_type_valid/testcase.yaml | 5 +++++ xml_converter/src/packaging_protobin.cpp | 10 ++++++++-- 10 files changed, 93 insertions(+), 2 deletions(-) create mode 100644 xml_converter/integration_tests/test_cases/display_name_valid/input/pack/xml_file.xml create mode 100644 xml_converter/integration_tests/test_cases/display_name_valid/output_proto/markers.bin create mode 100644 xml_converter/integration_tests/test_cases/display_name_valid/output_xml/xml_file.xml create mode 100644 xml_converter/integration_tests/test_cases/display_name_valid/testcase.yaml create mode 100644 xml_converter/integration_tests/test_cases/proto_type_valid/input/pack/markers.bin create mode 100644 xml_converter/integration_tests/test_cases/proto_type_valid/output_proto/markers.bin create mode 100644 xml_converter/integration_tests/test_cases/proto_type_valid/output_xml/xml_file.xml create mode 100644 xml_converter/integration_tests/test_cases/proto_type_valid/testcase.yaml diff --git a/xml_converter/integration_tests/run_tests.py b/xml_converter/integration_tests/run_tests.py index dd4ad715..64589d29 100755 --- a/xml_converter/integration_tests/run_tests.py +++ b/xml_converter/integration_tests/run_tests.py @@ -118,6 +118,7 @@ def rebuild_xml_converter_binary() -> None: ################################################################################ line_patterns_to_ignore = [ r"^Loading taco pack .*$", + r"^Loading waypoint pack .*$", r"^The taco parse function took [0-9]+ milliseconds to run$", r"^The xml write function took [0-9]+ milliseconds to run$", r"^The protobuf read function took [0-9]+ milliseconds to run$", @@ -170,6 +171,7 @@ def main() -> bool: rawstdout, rawstderr, returncode = run_xml_converter( input_xml=testcase.xml_input_paths, + input_proto=testcase.proto_input_paths, output_xml=[xml_output_dir_path], output_proto=[proto_output_dir_path], ) diff --git a/xml_converter/integration_tests/test_cases/display_name_valid/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/display_name_valid/input/pack/xml_file.xml new file mode 100644 index 00000000..651af9cb --- /dev/null +++ b/xml_converter/integration_tests/test_cases/display_name_valid/input/pack/xml_file.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/xml_converter/integration_tests/test_cases/display_name_valid/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/display_name_valid/output_proto/markers.bin new file mode 100644 index 00000000..478c3f29 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/display_name_valid/output_proto/markers.bin @@ -0,0 +1,7 @@ + +, + My Category 2B \Ï)Cf¦RC{ÔWCB(èÌ“^– +™ +Nested Level Onef +Nested Level Two3 +Nested Level Three 2B \Ï)Cf¦RC{ÔWCBp,Tԅ߈¤ 2B \Ï)Cf¦RC{ÔWCB¸šÜ¸·xjÏ 2B \Ï)Cf¦RC{ÔWCB,’§íj@: \ No newline at end of file diff --git a/xml_converter/integration_tests/test_cases/display_name_valid/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/display_name_valid/output_xml/xml_file.xml new file mode 100644 index 00000000..78dbad1a --- /dev/null +++ b/xml_converter/integration_tests/test_cases/display_name_valid/output_xml/xml_file.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/xml_converter/integration_tests/test_cases/display_name_valid/testcase.yaml b/xml_converter/integration_tests/test_cases/display_name_valid/testcase.yaml new file mode 100644 index 00000000..9510c793 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/display_name_valid/testcase.yaml @@ -0,0 +1,5 @@ +input_paths: + "pack": "xml" +expected_stdout: | +expected_stderr: | +expected_returncode: 0 diff --git a/xml_converter/integration_tests/test_cases/proto_type_valid/input/pack/markers.bin b/xml_converter/integration_tests/test_cases/proto_type_valid/input/pack/markers.bin new file mode 100644 index 00000000..478c3f29 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/proto_type_valid/input/pack/markers.bin @@ -0,0 +1,7 @@ + +, + My Category 2B \Ï)Cf¦RC{ÔWCB(èÌ“^– +™ +Nested Level Onef +Nested Level Two3 +Nested Level Three 2B \Ï)Cf¦RC{ÔWCBp,Tԅ߈¤ 2B \Ï)Cf¦RC{ÔWCB¸šÜ¸·xjÏ 2B \Ï)Cf¦RC{ÔWCB,’§íj@: \ No newline at end of file diff --git a/xml_converter/integration_tests/test_cases/proto_type_valid/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/proto_type_valid/output_proto/markers.bin new file mode 100644 index 00000000..478c3f29 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/proto_type_valid/output_proto/markers.bin @@ -0,0 +1,7 @@ + +, + My Category 2B \Ï)Cf¦RC{ÔWCB(èÌ“^– +™ +Nested Level Onef +Nested Level Two3 +Nested Level Three 2B \Ï)Cf¦RC{ÔWCBp,Tԅ߈¤ 2B \Ï)Cf¦RC{ÔWCB¸šÜ¸·xjÏ 2B \Ï)Cf¦RC{ÔWCB,’§íj@: \ No newline at end of file diff --git a/xml_converter/integration_tests/test_cases/proto_type_valid/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/proto_type_valid/output_xml/xml_file.xml new file mode 100644 index 00000000..5e25a018 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/proto_type_valid/output_xml/xml_file.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/xml_converter/integration_tests/test_cases/proto_type_valid/testcase.yaml b/xml_converter/integration_tests/test_cases/proto_type_valid/testcase.yaml new file mode 100644 index 00000000..d87f4066 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/proto_type_valid/testcase.yaml @@ -0,0 +1,5 @@ +input_paths: + "pack": "proto" +expected_stdout: | +expected_stderr: | +expected_returncode: 0 diff --git a/xml_converter/src/packaging_protobin.cpp b/xml_converter/src/packaging_protobin.cpp index 94cd27f8..282e0ff3 100644 --- a/xml_converter/src/packaging_protobin.cpp +++ b/xml_converter/src/packaging_protobin.cpp @@ -29,8 +29,10 @@ void parse_waypoint_categories( map* marker_categories, vector* parsed_pois, ProtoReaderState* state) { - full_category_name += proto_category.name(); - Category* this_category = &(*marker_categories)[full_category_name]; + + string category_name = normalize(proto_category.name()); + full_category_name += category_name; + Category* this_category = &(*marker_categories)[category_name]; this_category->parse_protobuf(proto_category, state); @@ -40,6 +42,7 @@ void parse_waypoint_categories( // TODO: The field category in Icon is being deprciated // This overwrites any icon.category with its position in the heirarchy icon->category.category = full_category_name; + icon->category_is_set = true; parsed_pois->push_back(icon); } for (int i = 0; i < proto_category.trail_size(); i++) { @@ -48,6 +51,7 @@ void parse_waypoint_categories( // TODO: The field category in Trail is being deprciated // This overwrites any trail.category with its position in the heirarchy trail->category.category = full_category_name; + trail->category_is_set = true; parsed_pois->push_back(trail); } @@ -216,10 +220,12 @@ void write_protobuf_file( Parseable* parsed_poi = (*parsed_pois)[i]; if (parsed_poi->classname() == "POI") { Icon* icon = dynamic_cast(parsed_poi); + // TODO(331): This is the wrong place to lowercase() the category and is hiding some crimes elsewhere category_to_pois[lowercase(icon->category.category)].push_back(parsed_poi); } else if (parsed_poi->classname() == "Trail") { Trail* trail = dynamic_cast(parsed_poi); + // TODO(331): This is the wrong place to lowercase() the category and is hiding some crimes elsewhere category_to_pois[lowercase(trail->category.category)].push_back(parsed_poi); } else { From 39963b328f067f6e07b161481e62c01d37f2d7ea Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Sun, 18 Aug 2024 16:25:54 -0500 Subject: [PATCH 513/539] fixing clang format issues --- xml_converter/src/packaging_protobin.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/xml_converter/src/packaging_protobin.cpp b/xml_converter/src/packaging_protobin.cpp index 282e0ff3..3fe1b03a 100644 --- a/xml_converter/src/packaging_protobin.cpp +++ b/xml_converter/src/packaging_protobin.cpp @@ -29,7 +29,6 @@ void parse_waypoint_categories( map* marker_categories, vector* parsed_pois, ProtoReaderState* state) { - string category_name = normalize(proto_category.name()); full_category_name += category_name; Category* this_category = &(*marker_categories)[category_name]; From bbc197703ab275c7a0e3b60d0eed888bf311c2f3 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Wed, 21 Aug 2024 23:42:27 -0400 Subject: [PATCH 514/539] Removed unneeded comment and changed logic to unindent some lines --- FileHandler.gd | 47 +++++++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/FileHandler.gd b/FileHandler.gd index 5be7d1a6..c74f53ce 100644 --- a/FileHandler.gd +++ b/FileHandler.gd @@ -19,31 +19,30 @@ static func create_directory_if_missing(path: String): static func find_file_duplicate(directory_path: String, target_name: String, target_content: PoolByteArray, relative_path: String): var dir = Directory.new() - if dir.open(directory_path) == OK: - dir.list_dir_begin(true) - var file_name = dir.get_next() - while file_name != "": - var full_path = directory_path.plus_file(file_name) - var current_relative_path = relative_path.plus_file(file_name) - if dir.current_is_dir(): - var found_path = find_file_duplicate(full_path, target_name, target_content, current_relative_path) - if found_path != "": - dir.list_dir_end() - return found_path - if file_name == target_name: - var file = File.new() - file.open(full_path, File.READ) - var file_content = file.get_buffer(file.get_len()) - file.close() - if file_content == target_content: - dir.list_dir_end() - return current_relative_path - file_name = dir.get_next() - return "" + if dir.open(directory_path) != OK: + return null + dir.list_dir_begin(true) + var file_name = dir.get_next() + while file_name != "": + var full_path = directory_path.plus_file(file_name) + var current_relative_path = relative_path.plus_file(file_name) + if dir.current_is_dir(): + var found_path = find_file_duplicate(full_path, target_name, target_content, current_relative_path) + if found_path != "": + dir.list_dir_end() + return found_path + if file_name == target_name: + var file = File.new() + file.open(full_path, File.READ) + var file_content = file.get_buffer(file.get_len()) + file.close() + if file_content == target_content: + dir.list_dir_end() + return current_relative_path + file_name = dir.get_next() + return null -static func find_image_duplicates(file_path: String, destintation_dir: String) -> String: - # These are all supported file types in Godot that are not supported - # by other marker programs. "jpg", "jpeg", "bmp", "tga" +static func find_image_duplicates(file_path: String, destintation_dir: String): var file_name: String = file_path.get_file() var file_extension: String = file_name.get_extension().to_lower() if not file_extension == "png": From 543d09f8516a307a000d750494b075ab140014aa Mon Sep 17 00:00:00 2001 From: Asher Glick Date: Thu, 22 Aug 2024 12:43:05 -0500 Subject: [PATCH 515/539] Renaming integration tests to prepare for more proto tests --- .../test_cases/texture_invalid/testcase.yaml | 7 ------- .../input/pack/xml_file.xml | 0 .../output_proto/markers.bin | 0 .../output_xml/xml_file.xml | 0 .../testcase.yaml | 0 .../input/pack/xml_file.xml | 0 .../output_proto/markers.bin | 0 .../output_xml/xml_file.xml | 0 .../testcase.yaml | 0 .../input/pack/trail.trl | Bin .../input/pack/xml_file.xml | 0 .../output_proto/markers.bin | Bin .../output_xml/037aa160e392f1c8.trl | Bin .../output_xml/xml_file.xml | 0 .../testcase.yaml | 0 .../input/pack/xml_file.xml | 0 .../output_proto/markers.bin | 0 .../output_xml/xml_file.xml | 0 .../testcase.yaml | 4 ++-- .../input/pack/xml_file.xml | 0 .../output_proto/markers.bin | 0 .../output_xml/xml_file.xml | 0 .../testcase.yaml | 0 .../input/pack/xml_file.xml | 0 .../output_proto/markers.bin | Bin .../output_xml/xml_file.xml | 0 .../testcase.yaml | 0 .../input/pack/xml_file.xml | 0 .../input/pack/xml_file2.xml | 0 .../output_proto/markers.bin | 0 .../output_xml/xml_file.xml | 0 .../testcase.yaml | 0 .../input/pack/xml_file.xml | 0 .../output_proto/markers.bin | 0 .../output_xml/xml_file.xml | 0 .../testcase.yaml | 4 ++-- .../input/pack/xml_file.xml | 0 .../output_proto/markers.bin | 0 .../output_xml/xml_file.xml | 0 .../testcase.yaml | 0 .../input/pack/xml_file.xml | 0 .../output_proto/markers.bin | 0 .../output_xml/xml_file.xml | 0 .../testcase.yaml | 0 .../input/pack/xml_file.xml | 0 .../output_proto/markers.bin | Bin .../output_xml/xml_file.xml | 0 .../testcase.yaml | 0 .../input/pack/xml_file.xml | 0 .../output_proto/markers.bin | 0 .../output_xml/xml_file.xml | 0 .../testcase.yaml | 0 .../input/pack/xml_file.xml | 0 .../output_proto/markers.bin | 0 .../output_xml/xml_file.xml | 0 .../{is_wall => xml_is_wall}/testcase.yaml | 0 .../{map_id => xml_map_id}/input/pack/xml_file.xml | 0 .../{map_id => xml_map_id}/output_proto/markers.bin | 0 .../{map_id => xml_map_id}/output_xml/xml_file.xml | 0 .../test_cases/{map_id => xml_map_id}/testcase.yaml | 0 .../input/pack/xml_file.xml | 0 .../output_proto/markers.bin | 0 .../output_xml/xml_file.xml | 0 .../testcase.yaml | 0 .../input/pack/xml_file.xml | 0 .../output_proto/markers.bin | 0 .../output_xml/xml_file.xml | 0 .../testcase.yaml | 8 ++++---- .../input/pack/xml_file.xml | 0 .../output_proto/markers.bin | 0 .../output_xml/xml_file.xml | 0 .../testcase.yaml | 0 .../input/pack/xml_file.xml | 0 .../output_proto/markers.bin | 0 .../output_xml/xml_file.xml | 0 .../testcase.yaml | 0 .../input/pack/xml_file.xml | 0 .../output_proto/markers.bin | 0 .../output_xml/xml_file.xml | 0 .../testcase.yaml | 0 .../input/pack/xml_file.xml | 0 .../output_proto/markers.bin | 0 .../output_xml/xml_file.xml | 0 .../testcase.yaml | 0 .../input/pack/somedir/texture_three.png | Bin .../input/pack/texture_one.png | Bin .../input/pack/texture_two.png | Bin .../input/pack/xml_file.xml | 0 .../output_proto/markers.bin | Bin .../output_proto/somedir/texture_three.png | Bin .../output_proto/texture_one.png | Bin .../output_proto/texture_two.png | Bin .../output_xml/somedir/texture_three.png | Bin .../output_xml/texture_one.png | Bin .../output_xml/texture_two.png | Bin .../output_xml/xml_file.xml | 0 .../{texture => xml_texture}/testcase.yaml | 0 .../input/pack/xml_file.xml | 0 .../output_proto/markers.bin | Bin .../output_xml/xml_file.xml | 0 .../test_cases/xml_texture_invalid/testcase.yaml | 7 +++++++ .../input/pack/trail.trl | Bin .../input/pack/xml_file.xml | 0 .../output_proto/markers.bin | Bin .../output_xml/037aa160e392f1c8.trl | Bin .../output_xml/xml_file.xml | 0 .../{trail_data => xml_trail_data}/testcase.yaml | 0 .../input/pack/xml_file.xml | 0 .../output_proto/markers.bin | 0 .../output_xml/xml_file.xml | 0 .../testcase.yaml | 4 ++-- .../input/pack/xml_file.xml | 0 .../output_proto/markers.bin | 0 .../output_xml/xml_file.xml | 0 .../{type_valid => xml_type_valid}/testcase.yaml | 0 115 files changed, 17 insertions(+), 17 deletions(-) delete mode 100644 xml_converter/integration_tests/test_cases/texture_invalid/testcase.yaml rename xml_converter/integration_tests/test_cases/{achievement_bit_index_valid => xml_achievement_bit_index_valid}/input/pack/xml_file.xml (100%) rename xml_converter/integration_tests/test_cases/{achievement_bit_index_valid => xml_achievement_bit_index_valid}/output_proto/markers.bin (100%) rename xml_converter/integration_tests/test_cases/{achievement_bit_index_valid => xml_achievement_bit_index_valid}/output_xml/xml_file.xml (100%) rename xml_converter/integration_tests/test_cases/{achievement_bit_index_valid => xml_achievement_bit_index_valid}/testcase.yaml (100%) rename xml_converter/integration_tests/test_cases/{achievement_id => xml_achievement_id}/input/pack/xml_file.xml (100%) rename xml_converter/integration_tests/test_cases/{achievement_id => xml_achievement_id}/output_proto/markers.bin (100%) rename xml_converter/integration_tests/test_cases/{achievement_id => xml_achievement_id}/output_xml/xml_file.xml (100%) rename xml_converter/integration_tests/test_cases/{achievement_id => xml_achievement_id}/testcase.yaml (100%) rename xml_converter/integration_tests/test_cases/{animation_speed => xml_animation_speed}/input/pack/trail.trl (100%) rename xml_converter/integration_tests/test_cases/{animation_speed => xml_animation_speed}/input/pack/xml_file.xml (100%) rename xml_converter/integration_tests/test_cases/{animation_speed => xml_animation_speed}/output_proto/markers.bin (100%) rename xml_converter/integration_tests/test_cases/{animation_speed => xml_animation_speed}/output_xml/037aa160e392f1c8.trl (100%) rename xml_converter/integration_tests/test_cases/{animation_speed => xml_animation_speed}/output_xml/xml_file.xml (100%) rename xml_converter/integration_tests/test_cases/{animation_speed => xml_animation_speed}/testcase.yaml (100%) rename xml_converter/integration_tests/test_cases/{canfade_invalid => xml_canfade_invalid}/input/pack/xml_file.xml (100%) rename xml_converter/integration_tests/test_cases/{canfade_invalid => xml_canfade_invalid}/output_proto/markers.bin (100%) rename xml_converter/integration_tests/test_cases/{canfade_invalid => xml_canfade_invalid}/output_xml/xml_file.xml (100%) rename xml_converter/integration_tests/test_cases/{canfade_invalid => xml_canfade_invalid}/testcase.yaml (81%) rename xml_converter/integration_tests/test_cases/{canfade_valid => xml_canfade_valid}/input/pack/xml_file.xml (100%) rename xml_converter/integration_tests/test_cases/{canfade_valid => xml_canfade_valid}/output_proto/markers.bin (100%) rename xml_converter/integration_tests/test_cases/{canfade_valid => xml_canfade_valid}/output_xml/xml_file.xml (100%) rename xml_converter/integration_tests/test_cases/{canfade_valid => xml_canfade_valid}/testcase.yaml (100%) rename xml_converter/integration_tests/test_cases/{category_inheritance => xml_category_inheritance}/input/pack/xml_file.xml (100%) rename xml_converter/integration_tests/test_cases/{category_inheritance => xml_category_inheritance}/output_proto/markers.bin (100%) rename xml_converter/integration_tests/test_cases/{category_inheritance => xml_category_inheritance}/output_xml/xml_file.xml (100%) rename xml_converter/integration_tests/test_cases/{category_inheritance => xml_category_inheritance}/testcase.yaml (100%) rename xml_converter/integration_tests/test_cases/{category_name => xml_category_name}/input/pack/xml_file.xml (100%) rename xml_converter/integration_tests/test_cases/{category_name => xml_category_name}/input/pack/xml_file2.xml (100%) rename xml_converter/integration_tests/test_cases/{category_name => xml_category_name}/output_proto/markers.bin (100%) rename xml_converter/integration_tests/test_cases/{category_name => xml_category_name}/output_xml/xml_file.xml (100%) rename xml_converter/integration_tests/test_cases/{category_name => xml_category_name}/testcase.yaml (100%) rename xml_converter/integration_tests/test_cases/{category_name_invalid => xml_category_name_invalid}/input/pack/xml_file.xml (100%) rename xml_converter/integration_tests/test_cases/{category_name_invalid => xml_category_name_invalid}/output_proto/markers.bin (100%) rename xml_converter/integration_tests/test_cases/{category_name_invalid => xml_category_name_invalid}/output_xml/xml_file.xml (100%) rename xml_converter/integration_tests/test_cases/{category_name_invalid => xml_category_name_invalid}/testcase.yaml (77%) rename xml_converter/integration_tests/test_cases/{cull_chirality => xml_cull_chirality}/input/pack/xml_file.xml (100%) rename xml_converter/integration_tests/test_cases/{cull_chirality => xml_cull_chirality}/output_proto/markers.bin (100%) rename xml_converter/integration_tests/test_cases/{cull_chirality => xml_cull_chirality}/output_xml/xml_file.xml (100%) rename xml_converter/integration_tests/test_cases/{cull_chirality => xml_cull_chirality}/testcase.yaml (100%) rename xml_converter/integration_tests/test_cases/{display_name_valid => xml_display_name_valid}/input/pack/xml_file.xml (100%) rename xml_converter/integration_tests/test_cases/{display_name_valid => xml_display_name_valid}/output_proto/markers.bin (100%) rename xml_converter/integration_tests/test_cases/{display_name_valid => xml_display_name_valid}/output_xml/xml_file.xml (100%) rename xml_converter/integration_tests/test_cases/{display_name_valid => xml_display_name_valid}/testcase.yaml (100%) rename xml_converter/integration_tests/test_cases/{fade_distance => xml_fade_distance}/input/pack/xml_file.xml (100%) rename xml_converter/integration_tests/test_cases/{fade_distance => xml_fade_distance}/output_proto/markers.bin (100%) rename xml_converter/integration_tests/test_cases/{fade_distance => xml_fade_distance}/output_xml/xml_file.xml (100%) rename xml_converter/integration_tests/test_cases/{fade_distance => xml_fade_distance}/testcase.yaml (100%) rename xml_converter/integration_tests/test_cases/{festival_filter => xml_festival_filter}/input/pack/xml_file.xml (100%) rename xml_converter/integration_tests/test_cases/{festival_filter => xml_festival_filter}/output_proto/markers.bin (100%) rename xml_converter/integration_tests/test_cases/{festival_filter => xml_festival_filter}/output_xml/xml_file.xml (100%) rename xml_converter/integration_tests/test_cases/{festival_filter => xml_festival_filter}/testcase.yaml (100%) rename xml_converter/integration_tests/test_cases/{is_wall => xml_is_wall}/input/pack/xml_file.xml (100%) rename xml_converter/integration_tests/test_cases/{is_wall => xml_is_wall}/output_proto/markers.bin (100%) rename xml_converter/integration_tests/test_cases/{is_wall => xml_is_wall}/output_xml/xml_file.xml (100%) rename xml_converter/integration_tests/test_cases/{is_wall => xml_is_wall}/testcase.yaml (100%) rename xml_converter/integration_tests/test_cases/{map_id => xml_map_id}/input/pack/xml_file.xml (100%) rename xml_converter/integration_tests/test_cases/{map_id => xml_map_id}/output_proto/markers.bin (100%) rename xml_converter/integration_tests/test_cases/{map_id => xml_map_id}/output_xml/xml_file.xml (100%) rename xml_converter/integration_tests/test_cases/{map_id => xml_map_id}/testcase.yaml (100%) rename xml_converter/integration_tests/test_cases/{map_type_filter => xml_map_type_filter}/input/pack/xml_file.xml (100%) rename xml_converter/integration_tests/test_cases/{map_type_filter => xml_map_type_filter}/output_proto/markers.bin (100%) rename xml_converter/integration_tests/test_cases/{map_type_filter => xml_map_type_filter}/output_xml/xml_file.xml (100%) rename xml_converter/integration_tests/test_cases/{map_type_filter => xml_map_type_filter}/testcase.yaml (100%) rename xml_converter/integration_tests/test_cases/{mount_filter_invalid => xml_mount_filter_invalid}/input/pack/xml_file.xml (100%) rename xml_converter/integration_tests/test_cases/{mount_filter_invalid => xml_mount_filter_invalid}/output_proto/markers.bin (100%) rename xml_converter/integration_tests/test_cases/{mount_filter_invalid => xml_mount_filter_invalid}/output_xml/xml_file.xml (100%) rename xml_converter/integration_tests/test_cases/{mount_filter_invalid => xml_mount_filter_invalid}/testcase.yaml (78%) rename xml_converter/integration_tests/test_cases/{mountfilter_valid => xml_mountfilter_valid}/input/pack/xml_file.xml (100%) rename xml_converter/integration_tests/test_cases/{mountfilter_valid => xml_mountfilter_valid}/output_proto/markers.bin (100%) rename xml_converter/integration_tests/test_cases/{mountfilter_valid => xml_mountfilter_valid}/output_xml/xml_file.xml (100%) rename xml_converter/integration_tests/test_cases/{mountfilter_valid => xml_mountfilter_valid}/testcase.yaml (100%) rename xml_converter/integration_tests/test_cases/{profession_filter => xml_profession_filter}/input/pack/xml_file.xml (100%) rename xml_converter/integration_tests/test_cases/{profession_filter => xml_profession_filter}/output_proto/markers.bin (100%) rename xml_converter/integration_tests/test_cases/{profession_filter => xml_profession_filter}/output_xml/xml_file.xml (100%) rename xml_converter/integration_tests/test_cases/{profession_filter => xml_profession_filter}/testcase.yaml (100%) rename xml_converter/integration_tests/test_cases/{specialization_filter => xml_specialization_filter}/input/pack/xml_file.xml (100%) rename xml_converter/integration_tests/test_cases/{specialization_filter => xml_specialization_filter}/output_proto/markers.bin (100%) rename xml_converter/integration_tests/test_cases/{specialization_filter => xml_specialization_filter}/output_xml/xml_file.xml (100%) rename xml_converter/integration_tests/test_cases/{specialization_filter => xml_specialization_filter}/testcase.yaml (100%) rename xml_converter/integration_tests/test_cases/{species_filter => xml_species_filter}/input/pack/xml_file.xml (100%) rename xml_converter/integration_tests/test_cases/{species_filter => xml_species_filter}/output_proto/markers.bin (100%) rename xml_converter/integration_tests/test_cases/{species_filter => xml_species_filter}/output_xml/xml_file.xml (100%) rename xml_converter/integration_tests/test_cases/{species_filter => xml_species_filter}/testcase.yaml (100%) rename xml_converter/integration_tests/test_cases/{texture => xml_texture}/input/pack/somedir/texture_three.png (100%) rename xml_converter/integration_tests/test_cases/{texture => xml_texture}/input/pack/texture_one.png (100%) rename xml_converter/integration_tests/test_cases/{texture => xml_texture}/input/pack/texture_two.png (100%) rename xml_converter/integration_tests/test_cases/{texture => xml_texture}/input/pack/xml_file.xml (100%) rename xml_converter/integration_tests/test_cases/{texture => xml_texture}/output_proto/markers.bin (100%) rename xml_converter/integration_tests/test_cases/{texture => xml_texture}/output_proto/somedir/texture_three.png (100%) rename xml_converter/integration_tests/test_cases/{texture => xml_texture}/output_proto/texture_one.png (100%) rename xml_converter/integration_tests/test_cases/{texture => xml_texture}/output_proto/texture_two.png (100%) rename xml_converter/integration_tests/test_cases/{texture => xml_texture}/output_xml/somedir/texture_three.png (100%) rename xml_converter/integration_tests/test_cases/{texture => xml_texture}/output_xml/texture_one.png (100%) rename xml_converter/integration_tests/test_cases/{texture => xml_texture}/output_xml/texture_two.png (100%) rename xml_converter/integration_tests/test_cases/{texture => xml_texture}/output_xml/xml_file.xml (100%) rename xml_converter/integration_tests/test_cases/{texture => xml_texture}/testcase.yaml (100%) rename xml_converter/integration_tests/test_cases/{texture_invalid => xml_texture_invalid}/input/pack/xml_file.xml (100%) rename xml_converter/integration_tests/test_cases/{texture_invalid => xml_texture_invalid}/output_proto/markers.bin (100%) rename xml_converter/integration_tests/test_cases/{texture_invalid => xml_texture_invalid}/output_xml/xml_file.xml (100%) create mode 100644 xml_converter/integration_tests/test_cases/xml_texture_invalid/testcase.yaml rename xml_converter/integration_tests/test_cases/{trail_data => xml_trail_data}/input/pack/trail.trl (100%) rename xml_converter/integration_tests/test_cases/{trail_data => xml_trail_data}/input/pack/xml_file.xml (100%) rename xml_converter/integration_tests/test_cases/{trail_data => xml_trail_data}/output_proto/markers.bin (100%) rename xml_converter/integration_tests/test_cases/{trail_data => xml_trail_data}/output_xml/037aa160e392f1c8.trl (100%) rename xml_converter/integration_tests/test_cases/{trail_data => xml_trail_data}/output_xml/xml_file.xml (100%) rename xml_converter/integration_tests/test_cases/{trail_data => xml_trail_data}/testcase.yaml (100%) rename xml_converter/integration_tests/test_cases/{type_invalid => xml_type_invalid}/input/pack/xml_file.xml (100%) rename xml_converter/integration_tests/test_cases/{type_invalid => xml_type_invalid}/output_proto/markers.bin (100%) rename xml_converter/integration_tests/test_cases/{type_invalid => xml_type_invalid}/output_xml/xml_file.xml (100%) rename xml_converter/integration_tests/test_cases/{type_invalid => xml_type_invalid}/testcase.yaml (82%) rename xml_converter/integration_tests/test_cases/{type_valid => xml_type_valid}/input/pack/xml_file.xml (100%) rename xml_converter/integration_tests/test_cases/{type_valid => xml_type_valid}/output_proto/markers.bin (100%) rename xml_converter/integration_tests/test_cases/{type_valid => xml_type_valid}/output_xml/xml_file.xml (100%) rename xml_converter/integration_tests/test_cases/{type_valid => xml_type_valid}/testcase.yaml (100%) diff --git a/xml_converter/integration_tests/test_cases/texture_invalid/testcase.yaml b/xml_converter/integration_tests/test_cases/texture_invalid/testcase.yaml deleted file mode 100644 index 14623cbf..00000000 --- a/xml_converter/integration_tests/test_cases/texture_invalid/testcase.yaml +++ /dev/null @@ -1,7 +0,0 @@ -input_paths: - "pack": "xml" -expected_stdout: | - Warning: File path test_cases/texture_invalid/input/pack/texture_01.png not found. - Warning: File path test_cases/texture_invalid/input/pack/texture_01.png not found. -expected_stderr: | -expected_returncode: 0 diff --git a/xml_converter/integration_tests/test_cases/achievement_bit_index_valid/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_achievement_bit_index_valid/input/pack/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/achievement_bit_index_valid/input/pack/xml_file.xml rename to xml_converter/integration_tests/test_cases/xml_achievement_bit_index_valid/input/pack/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/achievement_bit_index_valid/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/xml_achievement_bit_index_valid/output_proto/markers.bin similarity index 100% rename from xml_converter/integration_tests/test_cases/achievement_bit_index_valid/output_proto/markers.bin rename to xml_converter/integration_tests/test_cases/xml_achievement_bit_index_valid/output_proto/markers.bin diff --git a/xml_converter/integration_tests/test_cases/achievement_bit_index_valid/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_achievement_bit_index_valid/output_xml/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/achievement_bit_index_valid/output_xml/xml_file.xml rename to xml_converter/integration_tests/test_cases/xml_achievement_bit_index_valid/output_xml/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/achievement_bit_index_valid/testcase.yaml b/xml_converter/integration_tests/test_cases/xml_achievement_bit_index_valid/testcase.yaml similarity index 100% rename from xml_converter/integration_tests/test_cases/achievement_bit_index_valid/testcase.yaml rename to xml_converter/integration_tests/test_cases/xml_achievement_bit_index_valid/testcase.yaml diff --git a/xml_converter/integration_tests/test_cases/achievement_id/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_achievement_id/input/pack/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/achievement_id/input/pack/xml_file.xml rename to xml_converter/integration_tests/test_cases/xml_achievement_id/input/pack/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/achievement_id/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/xml_achievement_id/output_proto/markers.bin similarity index 100% rename from xml_converter/integration_tests/test_cases/achievement_id/output_proto/markers.bin rename to xml_converter/integration_tests/test_cases/xml_achievement_id/output_proto/markers.bin diff --git a/xml_converter/integration_tests/test_cases/achievement_id/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_achievement_id/output_xml/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/achievement_id/output_xml/xml_file.xml rename to xml_converter/integration_tests/test_cases/xml_achievement_id/output_xml/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/achievement_id/testcase.yaml b/xml_converter/integration_tests/test_cases/xml_achievement_id/testcase.yaml similarity index 100% rename from xml_converter/integration_tests/test_cases/achievement_id/testcase.yaml rename to xml_converter/integration_tests/test_cases/xml_achievement_id/testcase.yaml diff --git a/xml_converter/integration_tests/test_cases/animation_speed/input/pack/trail.trl b/xml_converter/integration_tests/test_cases/xml_animation_speed/input/pack/trail.trl similarity index 100% rename from xml_converter/integration_tests/test_cases/animation_speed/input/pack/trail.trl rename to xml_converter/integration_tests/test_cases/xml_animation_speed/input/pack/trail.trl diff --git a/xml_converter/integration_tests/test_cases/animation_speed/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_animation_speed/input/pack/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/animation_speed/input/pack/xml_file.xml rename to xml_converter/integration_tests/test_cases/xml_animation_speed/input/pack/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/animation_speed/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/xml_animation_speed/output_proto/markers.bin similarity index 100% rename from xml_converter/integration_tests/test_cases/animation_speed/output_proto/markers.bin rename to xml_converter/integration_tests/test_cases/xml_animation_speed/output_proto/markers.bin diff --git a/xml_converter/integration_tests/test_cases/animation_speed/output_xml/037aa160e392f1c8.trl b/xml_converter/integration_tests/test_cases/xml_animation_speed/output_xml/037aa160e392f1c8.trl similarity index 100% rename from xml_converter/integration_tests/test_cases/animation_speed/output_xml/037aa160e392f1c8.trl rename to xml_converter/integration_tests/test_cases/xml_animation_speed/output_xml/037aa160e392f1c8.trl diff --git a/xml_converter/integration_tests/test_cases/animation_speed/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_animation_speed/output_xml/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/animation_speed/output_xml/xml_file.xml rename to xml_converter/integration_tests/test_cases/xml_animation_speed/output_xml/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/animation_speed/testcase.yaml b/xml_converter/integration_tests/test_cases/xml_animation_speed/testcase.yaml similarity index 100% rename from xml_converter/integration_tests/test_cases/animation_speed/testcase.yaml rename to xml_converter/integration_tests/test_cases/xml_animation_speed/testcase.yaml diff --git a/xml_converter/integration_tests/test_cases/canfade_invalid/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_canfade_invalid/input/pack/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/canfade_invalid/input/pack/xml_file.xml rename to xml_converter/integration_tests/test_cases/xml_canfade_invalid/input/pack/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/canfade_invalid/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/xml_canfade_invalid/output_proto/markers.bin similarity index 100% rename from xml_converter/integration_tests/test_cases/canfade_invalid/output_proto/markers.bin rename to xml_converter/integration_tests/test_cases/xml_canfade_invalid/output_proto/markers.bin diff --git a/xml_converter/integration_tests/test_cases/canfade_invalid/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_canfade_invalid/output_xml/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/canfade_invalid/output_xml/xml_file.xml rename to xml_converter/integration_tests/test_cases/xml_canfade_invalid/output_xml/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/canfade_invalid/testcase.yaml b/xml_converter/integration_tests/test_cases/xml_canfade_invalid/testcase.yaml similarity index 81% rename from xml_converter/integration_tests/test_cases/canfade_invalid/testcase.yaml rename to xml_converter/integration_tests/test_cases/xml_canfade_invalid/testcase.yaml index c802cb86..b035ce3f 100644 --- a/xml_converter/integration_tests/test_cases/canfade_invalid/testcase.yaml +++ b/xml_converter/integration_tests/test_cases/xml_canfade_invalid/testcase.yaml @@ -2,11 +2,11 @@ input_paths: "pack": "xml" expected_stdout: | Error: Found a boolean value that was not a '1', '0', 'true', or 'false' - test_cases/canfade_invalid/input/pack/xml_file.xml + test_cases/xml_canfade_invalid/input/pack/xml_file.xml 6 | | ^^^ Error: Found a boolean value that was not a '1', '0', 'true', or 'false' - test_cases/canfade_invalid/input/pack/xml_file.xml + test_cases/xml_canfade_invalid/input/pack/xml_file.xml 7 | | ^^^^^^ expected_stderr: | diff --git a/xml_converter/integration_tests/test_cases/canfade_valid/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_canfade_valid/input/pack/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/canfade_valid/input/pack/xml_file.xml rename to xml_converter/integration_tests/test_cases/xml_canfade_valid/input/pack/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/canfade_valid/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/xml_canfade_valid/output_proto/markers.bin similarity index 100% rename from xml_converter/integration_tests/test_cases/canfade_valid/output_proto/markers.bin rename to xml_converter/integration_tests/test_cases/xml_canfade_valid/output_proto/markers.bin diff --git a/xml_converter/integration_tests/test_cases/canfade_valid/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_canfade_valid/output_xml/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/canfade_valid/output_xml/xml_file.xml rename to xml_converter/integration_tests/test_cases/xml_canfade_valid/output_xml/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/canfade_valid/testcase.yaml b/xml_converter/integration_tests/test_cases/xml_canfade_valid/testcase.yaml similarity index 100% rename from xml_converter/integration_tests/test_cases/canfade_valid/testcase.yaml rename to xml_converter/integration_tests/test_cases/xml_canfade_valid/testcase.yaml diff --git a/xml_converter/integration_tests/test_cases/category_inheritance/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_category_inheritance/input/pack/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/category_inheritance/input/pack/xml_file.xml rename to xml_converter/integration_tests/test_cases/xml_category_inheritance/input/pack/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/category_inheritance/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/xml_category_inheritance/output_proto/markers.bin similarity index 100% rename from xml_converter/integration_tests/test_cases/category_inheritance/output_proto/markers.bin rename to xml_converter/integration_tests/test_cases/xml_category_inheritance/output_proto/markers.bin diff --git a/xml_converter/integration_tests/test_cases/category_inheritance/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_category_inheritance/output_xml/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/category_inheritance/output_xml/xml_file.xml rename to xml_converter/integration_tests/test_cases/xml_category_inheritance/output_xml/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/category_inheritance/testcase.yaml b/xml_converter/integration_tests/test_cases/xml_category_inheritance/testcase.yaml similarity index 100% rename from xml_converter/integration_tests/test_cases/category_inheritance/testcase.yaml rename to xml_converter/integration_tests/test_cases/xml_category_inheritance/testcase.yaml diff --git a/xml_converter/integration_tests/test_cases/category_name/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_category_name/input/pack/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/category_name/input/pack/xml_file.xml rename to xml_converter/integration_tests/test_cases/xml_category_name/input/pack/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/category_name/input/pack/xml_file2.xml b/xml_converter/integration_tests/test_cases/xml_category_name/input/pack/xml_file2.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/category_name/input/pack/xml_file2.xml rename to xml_converter/integration_tests/test_cases/xml_category_name/input/pack/xml_file2.xml diff --git a/xml_converter/integration_tests/test_cases/category_name/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/xml_category_name/output_proto/markers.bin similarity index 100% rename from xml_converter/integration_tests/test_cases/category_name/output_proto/markers.bin rename to xml_converter/integration_tests/test_cases/xml_category_name/output_proto/markers.bin diff --git a/xml_converter/integration_tests/test_cases/category_name/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_category_name/output_xml/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/category_name/output_xml/xml_file.xml rename to xml_converter/integration_tests/test_cases/xml_category_name/output_xml/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/category_name/testcase.yaml b/xml_converter/integration_tests/test_cases/xml_category_name/testcase.yaml similarity index 100% rename from xml_converter/integration_tests/test_cases/category_name/testcase.yaml rename to xml_converter/integration_tests/test_cases/xml_category_name/testcase.yaml diff --git a/xml_converter/integration_tests/test_cases/category_name_invalid/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_category_name_invalid/input/pack/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/category_name_invalid/input/pack/xml_file.xml rename to xml_converter/integration_tests/test_cases/xml_category_name_invalid/input/pack/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/category_name_invalid/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/xml_category_name_invalid/output_proto/markers.bin similarity index 100% rename from xml_converter/integration_tests/test_cases/category_name_invalid/output_proto/markers.bin rename to xml_converter/integration_tests/test_cases/xml_category_name_invalid/output_proto/markers.bin diff --git a/xml_converter/integration_tests/test_cases/category_name_invalid/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_category_name_invalid/output_xml/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/category_name_invalid/output_xml/xml_file.xml rename to xml_converter/integration_tests/test_cases/xml_category_name_invalid/output_xml/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/category_name_invalid/testcase.yaml b/xml_converter/integration_tests/test_cases/xml_category_name_invalid/testcase.yaml similarity index 77% rename from xml_converter/integration_tests/test_cases/category_name_invalid/testcase.yaml rename to xml_converter/integration_tests/test_cases/xml_category_name_invalid/testcase.yaml index 23f69adc..04298ac6 100644 --- a/xml_converter/integration_tests/test_cases/category_name_invalid/testcase.yaml +++ b/xml_converter/integration_tests/test_cases/xml_category_name_invalid/testcase.yaml @@ -2,11 +2,11 @@ input_paths: "pack": "xml" expected_stdout: | Error: Category attribute 'name' is missing so it cannot be properly referenced - test_cases/category_name_invalid/input/pack/xml_file.xml + test_cases/xml_category_name_invalid/input/pack/xml_file.xml 2 | | ^^^^^^^^^^^^^^ Error: Category attribute 'name' is an empty string so it cannot be properly referenced - test_cases/category_name_invalid/input/pack/xml_file.xml + test_cases/xml_category_name_invalid/input/pack/xml_file.xml 3 | | ^^^^^^^^^^^^^^ expected_stderr: | diff --git a/xml_converter/integration_tests/test_cases/cull_chirality/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_cull_chirality/input/pack/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/cull_chirality/input/pack/xml_file.xml rename to xml_converter/integration_tests/test_cases/xml_cull_chirality/input/pack/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/cull_chirality/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/xml_cull_chirality/output_proto/markers.bin similarity index 100% rename from xml_converter/integration_tests/test_cases/cull_chirality/output_proto/markers.bin rename to xml_converter/integration_tests/test_cases/xml_cull_chirality/output_proto/markers.bin diff --git a/xml_converter/integration_tests/test_cases/cull_chirality/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_cull_chirality/output_xml/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/cull_chirality/output_xml/xml_file.xml rename to xml_converter/integration_tests/test_cases/xml_cull_chirality/output_xml/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/cull_chirality/testcase.yaml b/xml_converter/integration_tests/test_cases/xml_cull_chirality/testcase.yaml similarity index 100% rename from xml_converter/integration_tests/test_cases/cull_chirality/testcase.yaml rename to xml_converter/integration_tests/test_cases/xml_cull_chirality/testcase.yaml diff --git a/xml_converter/integration_tests/test_cases/display_name_valid/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_display_name_valid/input/pack/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/display_name_valid/input/pack/xml_file.xml rename to xml_converter/integration_tests/test_cases/xml_display_name_valid/input/pack/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/display_name_valid/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/xml_display_name_valid/output_proto/markers.bin similarity index 100% rename from xml_converter/integration_tests/test_cases/display_name_valid/output_proto/markers.bin rename to xml_converter/integration_tests/test_cases/xml_display_name_valid/output_proto/markers.bin diff --git a/xml_converter/integration_tests/test_cases/display_name_valid/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_display_name_valid/output_xml/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/display_name_valid/output_xml/xml_file.xml rename to xml_converter/integration_tests/test_cases/xml_display_name_valid/output_xml/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/display_name_valid/testcase.yaml b/xml_converter/integration_tests/test_cases/xml_display_name_valid/testcase.yaml similarity index 100% rename from xml_converter/integration_tests/test_cases/display_name_valid/testcase.yaml rename to xml_converter/integration_tests/test_cases/xml_display_name_valid/testcase.yaml diff --git a/xml_converter/integration_tests/test_cases/fade_distance/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_fade_distance/input/pack/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/fade_distance/input/pack/xml_file.xml rename to xml_converter/integration_tests/test_cases/xml_fade_distance/input/pack/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/fade_distance/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/xml_fade_distance/output_proto/markers.bin similarity index 100% rename from xml_converter/integration_tests/test_cases/fade_distance/output_proto/markers.bin rename to xml_converter/integration_tests/test_cases/xml_fade_distance/output_proto/markers.bin diff --git a/xml_converter/integration_tests/test_cases/fade_distance/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_fade_distance/output_xml/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/fade_distance/output_xml/xml_file.xml rename to xml_converter/integration_tests/test_cases/xml_fade_distance/output_xml/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/fade_distance/testcase.yaml b/xml_converter/integration_tests/test_cases/xml_fade_distance/testcase.yaml similarity index 100% rename from xml_converter/integration_tests/test_cases/fade_distance/testcase.yaml rename to xml_converter/integration_tests/test_cases/xml_fade_distance/testcase.yaml diff --git a/xml_converter/integration_tests/test_cases/festival_filter/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_festival_filter/input/pack/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/festival_filter/input/pack/xml_file.xml rename to xml_converter/integration_tests/test_cases/xml_festival_filter/input/pack/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/festival_filter/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/xml_festival_filter/output_proto/markers.bin similarity index 100% rename from xml_converter/integration_tests/test_cases/festival_filter/output_proto/markers.bin rename to xml_converter/integration_tests/test_cases/xml_festival_filter/output_proto/markers.bin diff --git a/xml_converter/integration_tests/test_cases/festival_filter/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_festival_filter/output_xml/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/festival_filter/output_xml/xml_file.xml rename to xml_converter/integration_tests/test_cases/xml_festival_filter/output_xml/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/festival_filter/testcase.yaml b/xml_converter/integration_tests/test_cases/xml_festival_filter/testcase.yaml similarity index 100% rename from xml_converter/integration_tests/test_cases/festival_filter/testcase.yaml rename to xml_converter/integration_tests/test_cases/xml_festival_filter/testcase.yaml diff --git a/xml_converter/integration_tests/test_cases/is_wall/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_is_wall/input/pack/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/is_wall/input/pack/xml_file.xml rename to xml_converter/integration_tests/test_cases/xml_is_wall/input/pack/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/is_wall/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/xml_is_wall/output_proto/markers.bin similarity index 100% rename from xml_converter/integration_tests/test_cases/is_wall/output_proto/markers.bin rename to xml_converter/integration_tests/test_cases/xml_is_wall/output_proto/markers.bin diff --git a/xml_converter/integration_tests/test_cases/is_wall/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_is_wall/output_xml/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/is_wall/output_xml/xml_file.xml rename to xml_converter/integration_tests/test_cases/xml_is_wall/output_xml/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/is_wall/testcase.yaml b/xml_converter/integration_tests/test_cases/xml_is_wall/testcase.yaml similarity index 100% rename from xml_converter/integration_tests/test_cases/is_wall/testcase.yaml rename to xml_converter/integration_tests/test_cases/xml_is_wall/testcase.yaml diff --git a/xml_converter/integration_tests/test_cases/map_id/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_map_id/input/pack/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/map_id/input/pack/xml_file.xml rename to xml_converter/integration_tests/test_cases/xml_map_id/input/pack/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/map_id/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/xml_map_id/output_proto/markers.bin similarity index 100% rename from xml_converter/integration_tests/test_cases/map_id/output_proto/markers.bin rename to xml_converter/integration_tests/test_cases/xml_map_id/output_proto/markers.bin diff --git a/xml_converter/integration_tests/test_cases/map_id/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_map_id/output_xml/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/map_id/output_xml/xml_file.xml rename to xml_converter/integration_tests/test_cases/xml_map_id/output_xml/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/map_id/testcase.yaml b/xml_converter/integration_tests/test_cases/xml_map_id/testcase.yaml similarity index 100% rename from xml_converter/integration_tests/test_cases/map_id/testcase.yaml rename to xml_converter/integration_tests/test_cases/xml_map_id/testcase.yaml diff --git a/xml_converter/integration_tests/test_cases/map_type_filter/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_map_type_filter/input/pack/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/map_type_filter/input/pack/xml_file.xml rename to xml_converter/integration_tests/test_cases/xml_map_type_filter/input/pack/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/map_type_filter/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/xml_map_type_filter/output_proto/markers.bin similarity index 100% rename from xml_converter/integration_tests/test_cases/map_type_filter/output_proto/markers.bin rename to xml_converter/integration_tests/test_cases/xml_map_type_filter/output_proto/markers.bin diff --git a/xml_converter/integration_tests/test_cases/map_type_filter/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_map_type_filter/output_xml/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/map_type_filter/output_xml/xml_file.xml rename to xml_converter/integration_tests/test_cases/xml_map_type_filter/output_xml/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/map_type_filter/testcase.yaml b/xml_converter/integration_tests/test_cases/xml_map_type_filter/testcase.yaml similarity index 100% rename from xml_converter/integration_tests/test_cases/map_type_filter/testcase.yaml rename to xml_converter/integration_tests/test_cases/xml_map_type_filter/testcase.yaml diff --git a/xml_converter/integration_tests/test_cases/mount_filter_invalid/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_mount_filter_invalid/input/pack/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/mount_filter_invalid/input/pack/xml_file.xml rename to xml_converter/integration_tests/test_cases/xml_mount_filter_invalid/input/pack/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/mount_filter_invalid/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/xml_mount_filter_invalid/output_proto/markers.bin similarity index 100% rename from xml_converter/integration_tests/test_cases/mount_filter_invalid/output_proto/markers.bin rename to xml_converter/integration_tests/test_cases/xml_mount_filter_invalid/output_proto/markers.bin diff --git a/xml_converter/integration_tests/test_cases/mount_filter_invalid/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_mount_filter_invalid/output_xml/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/mount_filter_invalid/output_xml/xml_file.xml rename to xml_converter/integration_tests/test_cases/xml_mount_filter_invalid/output_xml/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/mount_filter_invalid/testcase.yaml b/xml_converter/integration_tests/test_cases/xml_mount_filter_invalid/testcase.yaml similarity index 78% rename from xml_converter/integration_tests/test_cases/mount_filter_invalid/testcase.yaml rename to xml_converter/integration_tests/test_cases/xml_mount_filter_invalid/testcase.yaml index 1d31270c..be56f91b 100644 --- a/xml_converter/integration_tests/test_cases/mount_filter_invalid/testcase.yaml +++ b/xml_converter/integration_tests/test_cases/xml_mount_filter_invalid/testcase.yaml @@ -2,19 +2,19 @@ input_paths: "pack": "xml" expected_stdout: | Error: Invalid Filter for MountFilter. Found - test_cases/mount_filter_invalid/input/pack/xml_file.xml + test_cases/xml_mount_filter_invalid/input/pack/xml_file.xml 6 | | Error: Invalid Filter for MountFilter. Found NotAMount - test_cases/mount_filter_invalid/input/pack/xml_file.xml + test_cases/xml_mount_filter_invalid/input/pack/xml_file.xml 7 | | ^^^^^^^^^ Error: Invalid Filter for MountFilter. Found - test_cases/mount_filter_invalid/input/pack/xml_file.xml + test_cases/xml_mount_filter_invalid/input/pack/xml_file.xml 8 | | ^^^^^^^^^^^^^^^^ Error: Invalid Filter for MountFilter. Found NotAMount - test_cases/mount_filter_invalid/input/pack/xml_file.xml + test_cases/xml_mount_filter_invalid/input/pack/xml_file.xml 9 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ expected_stderr: | diff --git a/xml_converter/integration_tests/test_cases/mountfilter_valid/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_mountfilter_valid/input/pack/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/mountfilter_valid/input/pack/xml_file.xml rename to xml_converter/integration_tests/test_cases/xml_mountfilter_valid/input/pack/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/mountfilter_valid/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/xml_mountfilter_valid/output_proto/markers.bin similarity index 100% rename from xml_converter/integration_tests/test_cases/mountfilter_valid/output_proto/markers.bin rename to xml_converter/integration_tests/test_cases/xml_mountfilter_valid/output_proto/markers.bin diff --git a/xml_converter/integration_tests/test_cases/mountfilter_valid/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_mountfilter_valid/output_xml/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/mountfilter_valid/output_xml/xml_file.xml rename to xml_converter/integration_tests/test_cases/xml_mountfilter_valid/output_xml/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/mountfilter_valid/testcase.yaml b/xml_converter/integration_tests/test_cases/xml_mountfilter_valid/testcase.yaml similarity index 100% rename from xml_converter/integration_tests/test_cases/mountfilter_valid/testcase.yaml rename to xml_converter/integration_tests/test_cases/xml_mountfilter_valid/testcase.yaml diff --git a/xml_converter/integration_tests/test_cases/profession_filter/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_profession_filter/input/pack/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/profession_filter/input/pack/xml_file.xml rename to xml_converter/integration_tests/test_cases/xml_profession_filter/input/pack/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/profession_filter/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/xml_profession_filter/output_proto/markers.bin similarity index 100% rename from xml_converter/integration_tests/test_cases/profession_filter/output_proto/markers.bin rename to xml_converter/integration_tests/test_cases/xml_profession_filter/output_proto/markers.bin diff --git a/xml_converter/integration_tests/test_cases/profession_filter/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_profession_filter/output_xml/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/profession_filter/output_xml/xml_file.xml rename to xml_converter/integration_tests/test_cases/xml_profession_filter/output_xml/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/profession_filter/testcase.yaml b/xml_converter/integration_tests/test_cases/xml_profession_filter/testcase.yaml similarity index 100% rename from xml_converter/integration_tests/test_cases/profession_filter/testcase.yaml rename to xml_converter/integration_tests/test_cases/xml_profession_filter/testcase.yaml diff --git a/xml_converter/integration_tests/test_cases/specialization_filter/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_specialization_filter/input/pack/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/specialization_filter/input/pack/xml_file.xml rename to xml_converter/integration_tests/test_cases/xml_specialization_filter/input/pack/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/specialization_filter/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/xml_specialization_filter/output_proto/markers.bin similarity index 100% rename from xml_converter/integration_tests/test_cases/specialization_filter/output_proto/markers.bin rename to xml_converter/integration_tests/test_cases/xml_specialization_filter/output_proto/markers.bin diff --git a/xml_converter/integration_tests/test_cases/specialization_filter/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_specialization_filter/output_xml/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/specialization_filter/output_xml/xml_file.xml rename to xml_converter/integration_tests/test_cases/xml_specialization_filter/output_xml/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/specialization_filter/testcase.yaml b/xml_converter/integration_tests/test_cases/xml_specialization_filter/testcase.yaml similarity index 100% rename from xml_converter/integration_tests/test_cases/specialization_filter/testcase.yaml rename to xml_converter/integration_tests/test_cases/xml_specialization_filter/testcase.yaml diff --git a/xml_converter/integration_tests/test_cases/species_filter/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_species_filter/input/pack/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/species_filter/input/pack/xml_file.xml rename to xml_converter/integration_tests/test_cases/xml_species_filter/input/pack/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/species_filter/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/xml_species_filter/output_proto/markers.bin similarity index 100% rename from xml_converter/integration_tests/test_cases/species_filter/output_proto/markers.bin rename to xml_converter/integration_tests/test_cases/xml_species_filter/output_proto/markers.bin diff --git a/xml_converter/integration_tests/test_cases/species_filter/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_species_filter/output_xml/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/species_filter/output_xml/xml_file.xml rename to xml_converter/integration_tests/test_cases/xml_species_filter/output_xml/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/species_filter/testcase.yaml b/xml_converter/integration_tests/test_cases/xml_species_filter/testcase.yaml similarity index 100% rename from xml_converter/integration_tests/test_cases/species_filter/testcase.yaml rename to xml_converter/integration_tests/test_cases/xml_species_filter/testcase.yaml diff --git a/xml_converter/integration_tests/test_cases/texture/input/pack/somedir/texture_three.png b/xml_converter/integration_tests/test_cases/xml_texture/input/pack/somedir/texture_three.png similarity index 100% rename from xml_converter/integration_tests/test_cases/texture/input/pack/somedir/texture_three.png rename to xml_converter/integration_tests/test_cases/xml_texture/input/pack/somedir/texture_three.png diff --git a/xml_converter/integration_tests/test_cases/texture/input/pack/texture_one.png b/xml_converter/integration_tests/test_cases/xml_texture/input/pack/texture_one.png similarity index 100% rename from xml_converter/integration_tests/test_cases/texture/input/pack/texture_one.png rename to xml_converter/integration_tests/test_cases/xml_texture/input/pack/texture_one.png diff --git a/xml_converter/integration_tests/test_cases/texture/input/pack/texture_two.png b/xml_converter/integration_tests/test_cases/xml_texture/input/pack/texture_two.png similarity index 100% rename from xml_converter/integration_tests/test_cases/texture/input/pack/texture_two.png rename to xml_converter/integration_tests/test_cases/xml_texture/input/pack/texture_two.png diff --git a/xml_converter/integration_tests/test_cases/texture/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_texture/input/pack/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/texture/input/pack/xml_file.xml rename to xml_converter/integration_tests/test_cases/xml_texture/input/pack/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/texture/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/xml_texture/output_proto/markers.bin similarity index 100% rename from xml_converter/integration_tests/test_cases/texture/output_proto/markers.bin rename to xml_converter/integration_tests/test_cases/xml_texture/output_proto/markers.bin diff --git a/xml_converter/integration_tests/test_cases/texture/output_proto/somedir/texture_three.png b/xml_converter/integration_tests/test_cases/xml_texture/output_proto/somedir/texture_three.png similarity index 100% rename from xml_converter/integration_tests/test_cases/texture/output_proto/somedir/texture_three.png rename to xml_converter/integration_tests/test_cases/xml_texture/output_proto/somedir/texture_three.png diff --git a/xml_converter/integration_tests/test_cases/texture/output_proto/texture_one.png b/xml_converter/integration_tests/test_cases/xml_texture/output_proto/texture_one.png similarity index 100% rename from xml_converter/integration_tests/test_cases/texture/output_proto/texture_one.png rename to xml_converter/integration_tests/test_cases/xml_texture/output_proto/texture_one.png diff --git a/xml_converter/integration_tests/test_cases/texture/output_proto/texture_two.png b/xml_converter/integration_tests/test_cases/xml_texture/output_proto/texture_two.png similarity index 100% rename from xml_converter/integration_tests/test_cases/texture/output_proto/texture_two.png rename to xml_converter/integration_tests/test_cases/xml_texture/output_proto/texture_two.png diff --git a/xml_converter/integration_tests/test_cases/texture/output_xml/somedir/texture_three.png b/xml_converter/integration_tests/test_cases/xml_texture/output_xml/somedir/texture_three.png similarity index 100% rename from xml_converter/integration_tests/test_cases/texture/output_xml/somedir/texture_three.png rename to xml_converter/integration_tests/test_cases/xml_texture/output_xml/somedir/texture_three.png diff --git a/xml_converter/integration_tests/test_cases/texture/output_xml/texture_one.png b/xml_converter/integration_tests/test_cases/xml_texture/output_xml/texture_one.png similarity index 100% rename from xml_converter/integration_tests/test_cases/texture/output_xml/texture_one.png rename to xml_converter/integration_tests/test_cases/xml_texture/output_xml/texture_one.png diff --git a/xml_converter/integration_tests/test_cases/texture/output_xml/texture_two.png b/xml_converter/integration_tests/test_cases/xml_texture/output_xml/texture_two.png similarity index 100% rename from xml_converter/integration_tests/test_cases/texture/output_xml/texture_two.png rename to xml_converter/integration_tests/test_cases/xml_texture/output_xml/texture_two.png diff --git a/xml_converter/integration_tests/test_cases/texture/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_texture/output_xml/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/texture/output_xml/xml_file.xml rename to xml_converter/integration_tests/test_cases/xml_texture/output_xml/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/texture/testcase.yaml b/xml_converter/integration_tests/test_cases/xml_texture/testcase.yaml similarity index 100% rename from xml_converter/integration_tests/test_cases/texture/testcase.yaml rename to xml_converter/integration_tests/test_cases/xml_texture/testcase.yaml diff --git a/xml_converter/integration_tests/test_cases/texture_invalid/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_texture_invalid/input/pack/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/texture_invalid/input/pack/xml_file.xml rename to xml_converter/integration_tests/test_cases/xml_texture_invalid/input/pack/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/texture_invalid/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/xml_texture_invalid/output_proto/markers.bin similarity index 100% rename from xml_converter/integration_tests/test_cases/texture_invalid/output_proto/markers.bin rename to xml_converter/integration_tests/test_cases/xml_texture_invalid/output_proto/markers.bin diff --git a/xml_converter/integration_tests/test_cases/texture_invalid/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_texture_invalid/output_xml/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/texture_invalid/output_xml/xml_file.xml rename to xml_converter/integration_tests/test_cases/xml_texture_invalid/output_xml/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/xml_texture_invalid/testcase.yaml b/xml_converter/integration_tests/test_cases/xml_texture_invalid/testcase.yaml new file mode 100644 index 00000000..22349adc --- /dev/null +++ b/xml_converter/integration_tests/test_cases/xml_texture_invalid/testcase.yaml @@ -0,0 +1,7 @@ +input_paths: + "pack": "xml" +expected_stdout: | + Warning: File path test_cases/xml_texture_invalid/input/pack/texture_01.png not found. + Warning: File path test_cases/xml_texture_invalid/input/pack/texture_01.png not found. +expected_stderr: | +expected_returncode: 0 diff --git a/xml_converter/integration_tests/test_cases/trail_data/input/pack/trail.trl b/xml_converter/integration_tests/test_cases/xml_trail_data/input/pack/trail.trl similarity index 100% rename from xml_converter/integration_tests/test_cases/trail_data/input/pack/trail.trl rename to xml_converter/integration_tests/test_cases/xml_trail_data/input/pack/trail.trl diff --git a/xml_converter/integration_tests/test_cases/trail_data/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_trail_data/input/pack/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/trail_data/input/pack/xml_file.xml rename to xml_converter/integration_tests/test_cases/xml_trail_data/input/pack/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/trail_data/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/xml_trail_data/output_proto/markers.bin similarity index 100% rename from xml_converter/integration_tests/test_cases/trail_data/output_proto/markers.bin rename to xml_converter/integration_tests/test_cases/xml_trail_data/output_proto/markers.bin diff --git a/xml_converter/integration_tests/test_cases/trail_data/output_xml/037aa160e392f1c8.trl b/xml_converter/integration_tests/test_cases/xml_trail_data/output_xml/037aa160e392f1c8.trl similarity index 100% rename from xml_converter/integration_tests/test_cases/trail_data/output_xml/037aa160e392f1c8.trl rename to xml_converter/integration_tests/test_cases/xml_trail_data/output_xml/037aa160e392f1c8.trl diff --git a/xml_converter/integration_tests/test_cases/trail_data/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_trail_data/output_xml/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/trail_data/output_xml/xml_file.xml rename to xml_converter/integration_tests/test_cases/xml_trail_data/output_xml/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/trail_data/testcase.yaml b/xml_converter/integration_tests/test_cases/xml_trail_data/testcase.yaml similarity index 100% rename from xml_converter/integration_tests/test_cases/trail_data/testcase.yaml rename to xml_converter/integration_tests/test_cases/xml_trail_data/testcase.yaml diff --git a/xml_converter/integration_tests/test_cases/type_invalid/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_type_invalid/input/pack/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/type_invalid/input/pack/xml_file.xml rename to xml_converter/integration_tests/test_cases/xml_type_invalid/input/pack/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/type_invalid/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/xml_type_invalid/output_proto/markers.bin similarity index 100% rename from xml_converter/integration_tests/test_cases/type_invalid/output_proto/markers.bin rename to xml_converter/integration_tests/test_cases/xml_type_invalid/output_proto/markers.bin diff --git a/xml_converter/integration_tests/test_cases/type_invalid/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_type_invalid/output_xml/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/type_invalid/output_xml/xml_file.xml rename to xml_converter/integration_tests/test_cases/xml_type_invalid/output_xml/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/type_invalid/testcase.yaml b/xml_converter/integration_tests/test_cases/xml_type_invalid/testcase.yaml similarity index 82% rename from xml_converter/integration_tests/test_cases/type_invalid/testcase.yaml rename to xml_converter/integration_tests/test_cases/xml_type_invalid/testcase.yaml index 2b5ad167..11ff2981 100644 --- a/xml_converter/integration_tests/test_cases/type_invalid/testcase.yaml +++ b/xml_converter/integration_tests/test_cases/xml_type_invalid/testcase.yaml @@ -2,11 +2,11 @@ input_paths: "pack": "xml" expected_stdout: | Error: Category Not Found "notmycategory" - test_cases/type_invalid/input/pack/xml_file.xml + test_cases/xml_type_invalid/input/pack/xml_file.xml 11 | | ^^^^^^^^^^^^^ Error: Category Not Found "nestedlevel4" - test_cases/type_invalid/input/pack/xml_file.xml + test_cases/xml_type_invalid/input/pack/xml_file.xml 12 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected_stderr: | diff --git a/xml_converter/integration_tests/test_cases/type_valid/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_type_valid/input/pack/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/type_valid/input/pack/xml_file.xml rename to xml_converter/integration_tests/test_cases/xml_type_valid/input/pack/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/type_valid/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/xml_type_valid/output_proto/markers.bin similarity index 100% rename from xml_converter/integration_tests/test_cases/type_valid/output_proto/markers.bin rename to xml_converter/integration_tests/test_cases/xml_type_valid/output_proto/markers.bin diff --git a/xml_converter/integration_tests/test_cases/type_valid/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_type_valid/output_xml/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/type_valid/output_xml/xml_file.xml rename to xml_converter/integration_tests/test_cases/xml_type_valid/output_xml/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/type_valid/testcase.yaml b/xml_converter/integration_tests/test_cases/xml_type_valid/testcase.yaml similarity index 100% rename from xml_converter/integration_tests/test_cases/type_valid/testcase.yaml rename to xml_converter/integration_tests/test_cases/xml_type_valid/testcase.yaml From b56e3b4b9816f7a14c63c26f7a4bf847d9d3f95b Mon Sep 17 00:00:00 2001 From: klingbolt Date: Wed, 28 Aug 2024 22:01:56 -0400 Subject: [PATCH 516/539] Changed import button to add new pack into existing packs instead of overwriting --- Spatial.gd | 15 ++++++++++++--- Spatial.tscn | 4 ++-- xml_converter/src/attribute/image.cpp | 12 ++++++++---- 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/Spatial.gd b/Spatial.gd index 2a881363..7d3f1e69 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -405,6 +405,7 @@ var waypoint_data = Waypoint.Waypoint.new() # by Map ID. All changes made by the editor are automatically saved in these # files prior to export. var unsaved_markers_dir = "user://protobin_by_map_id/" +var saved_markers_dir = "user://protobin/" var marker_file_path = "" func load_waypoint_markers(map_id_to_load: int): @@ -1109,11 +1110,19 @@ func _on_ImportPackDialog_dir_selected(dir): var user_data_dir = str(OS.get_user_data_dir()) var args: PoolStringArray = [ "--input-taco-path", dir, - # TODO: This line is not working as intended and needs to be investigated - # "--input-waypoint-path", user_data_dir.plus_file("protobin"), - "--output-waypoint-path", user_data_dir.plus_file("protobin"), + "--input-waypoint-path", self.saved_markers_dir, + "--output-waypoint-path", self.saved_markers_dir, "--output-split-waypoint-path", ProjectSettings.globalize_path(self.unsaved_markers_dir) ] FileHandler.call_xml_converter(args) save_hashes() load_waypoint_markers(self.map_id) + + +func _on_SaveData_pressed(): + var user_data_dir = str(OS.get_user_data_dir()) + var args: PoolStringArray = [ + "--input-waypoint-path", ProjectSettings.globalize_path(self.unsaved_markers_dir), + "--output-waypoint-path", self.saved_markers_dir, + ] + FileHandler.call_xml_converter(args) diff --git a/Spatial.tscn b/Spatial.tscn index 6d3dfc86..09c60b14 100644 --- a/Spatial.tscn +++ b/Spatial.tscn @@ -241,7 +241,7 @@ margin_bottom = 92.0 rect_min_size = Vector2( 0, 40 ) text = "Import Marker Pack" -[node name="SaveTrail" type="Button" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] +[node name="SaveData" type="Button" parent="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer"] margin_top = 96.0 margin_right = 220.0 margin_bottom = 136.0 @@ -889,7 +889,7 @@ material/0 = SubResource( 4 ) [connection signal="hide" from="Control/Dialogs/MainMenu" to="." method="_on_Dialog_hide"] [connection signal="pressed" from="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer/LoadTrail" to="." method="_on_LoadTrail_pressed"] [connection signal="pressed" from="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer/ImportPath" to="." method="_on_ImportPath_pressed"] -[connection signal="pressed" from="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer/SaveTrail" to="." method="_on_SaveTrail_pressed"] +[connection signal="pressed" from="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer/SaveData" to="." method="_on_SaveData_pressed"] [connection signal="pressed" from="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer/OpenEditorQuickPanel" to="." method="_on_OpenEditorQuickPanel_pressed"] [connection signal="pressed" from="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer/Ranges" to="." method="_on_RangesButton_pressed"] [connection signal="pressed" from="Control/Dialogs/MainMenu/ScrollContainer/VBoxContainer/Settings" to="." method="_on_Settings_pressed"] diff --git a/xml_converter/src/attribute/image.cpp b/xml_converter/src/attribute/image.cpp index ad8cdf04..908f6e3a 100644 --- a/xml_converter/src/attribute/image.cpp +++ b/xml_converter/src/attribute/image.cpp @@ -39,8 +39,10 @@ string image_to_xml_attribute( const Image* value) { if (filesystem::exists(filesystem::path(value->original_filepath))) { filesystem::path output_path = filesystem::path(state->marker_pack_root_directory) / value->filename; - filesystem::create_directories(output_path.parent_path()); - filesystem::copy_file(filesystem::path(value->original_filepath), output_path, filesystem::copy_options::overwrite_existing); + if (value->original_filepath != output_path){ + filesystem::create_directories(output_path.parent_path()); + filesystem::copy_file(filesystem::path(value->original_filepath), output_path, filesystem::copy_options::overwrite_existing); + } } else { cout << "Warning: File path " << value->original_filepath << " not found." << endl; @@ -87,8 +89,10 @@ void image_to_proto( state->textures.push_back(&value); if (filesystem::exists(filesystem::path(value.original_filepath))) { filesystem::path output_path = filesystem::path(state->marker_pack_root_directory) / value.filename; - filesystem::create_directories(output_path.parent_path()); - filesystem::copy_file(filesystem::path(value.original_filepath), output_path, filesystem::copy_options::overwrite_existing); + if (value.original_filepath != output_path){ + filesystem::create_directories(output_path.parent_path()); + filesystem::copy_file(filesystem::path(value.original_filepath), output_path, filesystem::copy_options::overwrite_existing); + } } else { cout << "Warning: File path " << value.original_filepath << " not found." << endl; From d69db9af2ee973c1713813a95869eef0db04aaa5 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Wed, 28 Aug 2024 22:17:23 -0400 Subject: [PATCH 517/539] clang formatting --- xml_converter/src/attribute/image.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xml_converter/src/attribute/image.cpp b/xml_converter/src/attribute/image.cpp index 908f6e3a..a68ada61 100644 --- a/xml_converter/src/attribute/image.cpp +++ b/xml_converter/src/attribute/image.cpp @@ -39,7 +39,7 @@ string image_to_xml_attribute( const Image* value) { if (filesystem::exists(filesystem::path(value->original_filepath))) { filesystem::path output_path = filesystem::path(state->marker_pack_root_directory) / value->filename; - if (value->original_filepath != output_path){ + if (value->original_filepath != output_path) { filesystem::create_directories(output_path.parent_path()); filesystem::copy_file(filesystem::path(value->original_filepath), output_path, filesystem::copy_options::overwrite_existing); } @@ -89,7 +89,7 @@ void image_to_proto( state->textures.push_back(&value); if (filesystem::exists(filesystem::path(value.original_filepath))) { filesystem::path output_path = filesystem::path(state->marker_pack_root_directory) / value.filename; - if (value.original_filepath != output_path){ + if (value.original_filepath != output_path) { filesystem::create_directories(output_path.parent_path()); filesystem::copy_file(filesystem::path(value.original_filepath), output_path, filesystem::copy_options::overwrite_existing); } From 2723a49415f002da1b64c75bd65e8b4b3136b694 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Wed, 28 Aug 2024 22:48:14 -0400 Subject: [PATCH 518/539] Added globalize path to arguments --- Spatial.gd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Spatial.gd b/Spatial.gd index 7d3f1e69..66206751 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -1110,8 +1110,8 @@ func _on_ImportPackDialog_dir_selected(dir): var user_data_dir = str(OS.get_user_data_dir()) var args: PoolStringArray = [ "--input-taco-path", dir, - "--input-waypoint-path", self.saved_markers_dir, - "--output-waypoint-path", self.saved_markers_dir, + "--input-waypoint-path", ProjectSettings.globalize_path(self.saved_markers_dir), + "--output-waypoint-path", ProjectSettings.globalize_path(self.saved_markers_dir), "--output-split-waypoint-path", ProjectSettings.globalize_path(self.unsaved_markers_dir) ] FileHandler.call_xml_converter(args) @@ -1123,6 +1123,6 @@ func _on_SaveData_pressed(): var user_data_dir = str(OS.get_user_data_dir()) var args: PoolStringArray = [ "--input-waypoint-path", ProjectSettings.globalize_path(self.unsaved_markers_dir), - "--output-waypoint-path", self.saved_markers_dir, + "--output-waypoint-path", ProjectSettings.globalize_path(self.saved_markers_dir), ] FileHandler.call_xml_converter(args) From 90e4f9c10e1c21a8501872070ac7881dd19936b8 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Wed, 4 Sep 2024 20:43:39 -0400 Subject: [PATCH 519/539] Changed Default_toggle to hide_category in the proto --- xml_converter/doc/menu/default_visibility.md | 9 ++++++++- xml_converter/proto/waypoint.proto | 2 +- xml_converter/src/category_gen.cpp | 10 +++++----- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/xml_converter/doc/menu/default_visibility.md b/xml_converter/doc/menu/default_visibility.md index b598d83d..802825fd 100644 --- a/xml_converter/doc/menu/default_visibility.md +++ b/xml_converter/doc/menu/default_visibility.md @@ -3,7 +3,14 @@ name: Default Visibility type: Boolean applies_to: [Category] xml_fields: [DefaultToggle] -protobuf_field: default_visibility +protobuf_field: hide_category +custom_functions: + read.xml: + function: inverted_xml_attribute_to_bool + side_effects: [] + write.xml: + function: bool_to_inverted_xml_attribute + side_effects: [] --- Notes diff --git a/xml_converter/proto/waypoint.proto b/xml_converter/proto/waypoint.proto index 74d77133..d81d0e9e 100644 --- a/xml_converter/proto/waypoint.proto +++ b/xml_converter/proto/waypoint.proto @@ -21,7 +21,7 @@ message Category { repeated Icon icon = 3; repeated Trail trail = 4; bool is_separator = 5; - bool default_visibility = 6; + bool hide_category = 6; string tip_description = 7; bytes id = 8; } diff --git a/xml_converter/src/category_gen.cpp b/xml_converter/src/category_gen.cpp index 91d69ce7..9134b5a5 100644 --- a/xml_converter/src/category_gen.cpp +++ b/xml_converter/src/category_gen.cpp @@ -49,7 +49,7 @@ bool Category::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectordefault_visibility), &(this->default_visibility_is_set)); + inverted_xml_attribute_to_bool(attribute, errors, state, &(this->default_visibility), &(this->default_visibility_is_set)); } else if (attributename == "displayname") { xml_attribute_to_string(attribute, errors, state, &(this->display_name), &(this->display_name_is_set)); @@ -79,7 +79,7 @@ vector Category::as_xml(XMLWriterState* state) const { vector xml_node_contents; xml_node_contents.push_back("default_visibility_is_set) { - xml_node_contents.push_back(bool_to_xml_attribute("DefaultToggle", state, &this->default_visibility)); + xml_node_contents.push_back(bool_to_inverted_xml_attribute("DefaultToggle", state, &this->default_visibility)); } if (this->display_name_is_set) { xml_node_contents.push_back(string_to_xml_attribute("DisplayName", state, &this->display_name)); @@ -114,7 +114,7 @@ vector Category::as_xml(XMLWriterState* state) const { waypoint::Category Category::as_protobuf(ProtoWriterState* state) const { waypoint::Category proto_category; if (this->default_visibility_is_set) { - std::function setter = [&proto_category](bool val) { proto_category.set_default_visibility(val); }; + std::function setter = [&proto_category](bool val) { proto_category.set_hide_category(val); }; bool_to_proto(this->default_visibility, state, setter); } if (this->display_name_is_set) { @@ -137,8 +137,8 @@ waypoint::Category Category::as_protobuf(ProtoWriterState* state) const { } void Category::parse_protobuf(waypoint::Category proto_category, ProtoReaderState* state) { - if (proto_category.default_visibility() != 0) { - proto_to_bool(proto_category.default_visibility(), state, &(this->default_visibility), &(this->default_visibility_is_set)); + if (proto_category.hide_category() != 0) { + proto_to_bool(proto_category.hide_category(), state, &(this->default_visibility), &(this->default_visibility_is_set)); } if (proto_category.name() != "") { proto_display_name_to_display_name_and_name(proto_category.name(), state, &(this->display_name), &(this->display_name_is_set), &(this->name), &(this->name_is_set)); From 7800c5b30d3bbec14c8682a1cf49e88b01f04418 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Wed, 4 Sep 2024 20:45:56 -0400 Subject: [PATCH 520/539] Added integrations tests --- .../default_toggle/input/pack/xml_file.xml | 16 +++++++++++++++ .../default_toggle/output_proto/markers.bin | 9 +++++++++ .../default_toggle/output_xml/xml_file.xml | 20 +++++++++++++++++++ .../test_cases/default_toggle/testcase.yaml | 5 +++++ 4 files changed, 50 insertions(+) create mode 100644 xml_converter/integration_tests/test_cases/default_toggle/input/pack/xml_file.xml create mode 100644 xml_converter/integration_tests/test_cases/default_toggle/output_proto/markers.bin create mode 100644 xml_converter/integration_tests/test_cases/default_toggle/output_xml/xml_file.xml create mode 100644 xml_converter/integration_tests/test_cases/default_toggle/testcase.yaml diff --git a/xml_converter/integration_tests/test_cases/default_toggle/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/default_toggle/input/pack/xml_file.xml new file mode 100644 index 00000000..ebea9d36 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/default_toggle/input/pack/xml_file.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/xml_converter/integration_tests/test_cases/default_toggle/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/default_toggle/output_proto/markers.bin new file mode 100644 index 00000000..d46368ee --- /dev/null +++ b/xml_converter/integration_tests/test_cases/default_toggle/output_proto/markers.bin @@ -0,0 +1,9 @@ + +. + My Category 2B \Ï)Cf¦RC{ÔWC0B(èÌ“^– +. + My Category 2 2B \Ï)Cf¦RC{ÔWCB(íià4 1b +0 + My Category 3 2B \Ï)Cf¦RC{ÔWC0B(íià5 1b +. + My Category 4 2B \Ï)Cf¦RC{ÔWCB(íià6 1b \ No newline at end of file diff --git a/xml_converter/integration_tests/test_cases/default_toggle/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/default_toggle/output_xml/xml_file.xml new file mode 100644 index 00000000..b72af1dc --- /dev/null +++ b/xml_converter/integration_tests/test_cases/default_toggle/output_xml/xml_file.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/xml_converter/integration_tests/test_cases/default_toggle/testcase.yaml b/xml_converter/integration_tests/test_cases/default_toggle/testcase.yaml new file mode 100644 index 00000000..9510c793 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/default_toggle/testcase.yaml @@ -0,0 +1,5 @@ +input_paths: + "pack": "xml" +expected_stdout: | +expected_stderr: | +expected_returncode: 0 From f72024f466a777fe6cbf61bc41cbd2b4da414a8f Mon Sep 17 00:00:00 2001 From: klingbolt Date: Wed, 4 Sep 2024 20:51:20 -0400 Subject: [PATCH 521/539] Added tests for the proto input field hide_category --- .../input/pack/markers.bin | 9 +++++++++ .../output_proto/markers.bin | 9 +++++++++ .../output_xml/xml_file.xml | 20 +++++++++++++++++++ .../proto_hide_category/testcase.yaml | 5 +++++ 4 files changed, 43 insertions(+) create mode 100644 xml_converter/integration_tests/test_cases/proto_hide_category/input/pack/markers.bin create mode 100644 xml_converter/integration_tests/test_cases/proto_hide_category/output_proto/markers.bin create mode 100644 xml_converter/integration_tests/test_cases/proto_hide_category/output_xml/xml_file.xml create mode 100644 xml_converter/integration_tests/test_cases/proto_hide_category/testcase.yaml diff --git a/xml_converter/integration_tests/test_cases/proto_hide_category/input/pack/markers.bin b/xml_converter/integration_tests/test_cases/proto_hide_category/input/pack/markers.bin new file mode 100644 index 00000000..d46368ee --- /dev/null +++ b/xml_converter/integration_tests/test_cases/proto_hide_category/input/pack/markers.bin @@ -0,0 +1,9 @@ + +. + My Category 2B \Ï)Cf¦RC{ÔWC0B(èÌ“^– +. + My Category 2 2B \Ï)Cf¦RC{ÔWCB(íià4 1b +0 + My Category 3 2B \Ï)Cf¦RC{ÔWC0B(íià5 1b +. + My Category 4 2B \Ï)Cf¦RC{ÔWCB(íià6 1b \ No newline at end of file diff --git a/xml_converter/integration_tests/test_cases/proto_hide_category/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/proto_hide_category/output_proto/markers.bin new file mode 100644 index 00000000..d46368ee --- /dev/null +++ b/xml_converter/integration_tests/test_cases/proto_hide_category/output_proto/markers.bin @@ -0,0 +1,9 @@ + +. + My Category 2B \Ï)Cf¦RC{ÔWC0B(èÌ“^– +. + My Category 2 2B \Ï)Cf¦RC{ÔWCB(íià4 1b +0 + My Category 3 2B \Ï)Cf¦RC{ÔWC0B(íià5 1b +. + My Category 4 2B \Ï)Cf¦RC{ÔWCB(íià6 1b \ No newline at end of file diff --git a/xml_converter/integration_tests/test_cases/proto_hide_category/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/proto_hide_category/output_xml/xml_file.xml new file mode 100644 index 00000000..3fdfdf9e --- /dev/null +++ b/xml_converter/integration_tests/test_cases/proto_hide_category/output_xml/xml_file.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/xml_converter/integration_tests/test_cases/proto_hide_category/testcase.yaml b/xml_converter/integration_tests/test_cases/proto_hide_category/testcase.yaml new file mode 100644 index 00000000..d87f4066 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/proto_hide_category/testcase.yaml @@ -0,0 +1,5 @@ +input_paths: + "pack": "proto" +expected_stdout: | +expected_stderr: | +expected_returncode: 0 From 352ce712f467425c15aeb6fba806ff6285fa1e65 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Wed, 4 Sep 2024 20:58:38 -0400 Subject: [PATCH 522/539] Changed name of variable in documentation and regenerated code --- ...default_visibility.md => hide_category.md} | 2 +- .../default_toggle/output_xml/xml_file.xml | 8 +++--- .../output_xml/xml_file.xml | 4 +-- xml_converter/src/category_gen.cpp | 28 +++++++++---------- xml_converter/src/category_gen.hpp | 4 +-- 5 files changed, 23 insertions(+), 23 deletions(-) rename xml_converter/doc/menu/{default_visibility.md => hide_category.md} (94%) diff --git a/xml_converter/doc/menu/default_visibility.md b/xml_converter/doc/menu/hide_category.md similarity index 94% rename from xml_converter/doc/menu/default_visibility.md rename to xml_converter/doc/menu/hide_category.md index 802825fd..c1773fc9 100644 --- a/xml_converter/doc/menu/default_visibility.md +++ b/xml_converter/doc/menu/hide_category.md @@ -1,5 +1,5 @@ --- -name: Default Visibility +name: Hide Category type: Boolean applies_to: [Category] xml_fields: [DefaultToggle] diff --git a/xml_converter/integration_tests/test_cases/default_toggle/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/default_toggle/output_xml/xml_file.xml index b72af1dc..dd9d98b4 100644 --- a/xml_converter/integration_tests/test_cases/default_toggle/output_xml/xml_file.xml +++ b/xml_converter/integration_tests/test_cases/default_toggle/output_xml/xml_file.xml @@ -1,14 +1,14 @@ - + - + - + - + diff --git a/xml_converter/integration_tests/test_cases/proto_hide_category/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/proto_hide_category/output_xml/xml_file.xml index 3fdfdf9e..0bc237c6 100644 --- a/xml_converter/integration_tests/test_cases/proto_hide_category/output_xml/xml_file.xml +++ b/xml_converter/integration_tests/test_cases/proto_hide_category/output_xml/xml_file.xml @@ -1,11 +1,11 @@ - + - + diff --git a/xml_converter/src/category_gen.cpp b/xml_converter/src/category_gen.cpp index 9134b5a5..0cf59014 100644 --- a/xml_converter/src/category_gen.cpp +++ b/xml_converter/src/category_gen.cpp @@ -48,12 +48,12 @@ void Category::init_from_xml(rapidxml::xml_node<>* node, vector* erro bool Category::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector* errors, XMLReaderState* state) { string attributename; attributename = normalize(get_attribute_name(attribute)); - if (attributename == "defaulttoggle") { - inverted_xml_attribute_to_bool(attribute, errors, state, &(this->default_visibility), &(this->default_visibility_is_set)); - } - else if (attributename == "displayname") { + if (attributename == "displayname") { xml_attribute_to_string(attribute, errors, state, &(this->display_name), &(this->display_name_is_set)); } + else if (attributename == "defaulttoggle") { + inverted_xml_attribute_to_bool(attribute, errors, state, &(this->hide_category), &(this->hide_category_is_set)); + } else if (attributename == "isseparator") { xml_attribute_to_bool(attribute, errors, state, &(this->is_separator), &(this->is_separator_is_set)); } @@ -78,12 +78,12 @@ bool Category::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector Category::as_xml(XMLWriterState* state) const { vector xml_node_contents; xml_node_contents.push_back("default_visibility_is_set) { - xml_node_contents.push_back(bool_to_inverted_xml_attribute("DefaultToggle", state, &this->default_visibility)); - } if (this->display_name_is_set) { xml_node_contents.push_back(string_to_xml_attribute("DisplayName", state, &this->display_name)); } + if (this->hide_category_is_set) { + xml_node_contents.push_back(bool_to_inverted_xml_attribute("DefaultToggle", state, &this->hide_category)); + } if (this->is_separator_is_set) { xml_node_contents.push_back(bool_to_xml_attribute("IsSeparator", state, &this->is_separator)); } @@ -113,14 +113,14 @@ vector Category::as_xml(XMLWriterState* state) const { waypoint::Category Category::as_protobuf(ProtoWriterState* state) const { waypoint::Category proto_category; - if (this->default_visibility_is_set) { - std::function setter = [&proto_category](bool val) { proto_category.set_hide_category(val); }; - bool_to_proto(this->default_visibility, state, setter); - } if (this->display_name_is_set) { std::function setter = [&proto_category](std::string val) { proto_category.set_name(val); }; display_name_and_name_to_proto_display_name(this->display_name, state, setter, &(this->name), &(this->name_is_set)); } + if (this->hide_category_is_set) { + std::function setter = [&proto_category](bool val) { proto_category.set_hide_category(val); }; + bool_to_proto(this->hide_category, state, setter); + } if (this->is_separator_is_set) { std::function setter = [&proto_category](bool val) { proto_category.set_is_separator(val); }; bool_to_proto(this->is_separator, state, setter); @@ -137,12 +137,12 @@ waypoint::Category Category::as_protobuf(ProtoWriterState* state) const { } void Category::parse_protobuf(waypoint::Category proto_category, ProtoReaderState* state) { - if (proto_category.hide_category() != 0) { - proto_to_bool(proto_category.hide_category(), state, &(this->default_visibility), &(this->default_visibility_is_set)); - } if (proto_category.name() != "") { proto_display_name_to_display_name_and_name(proto_category.name(), state, &(this->display_name), &(this->display_name_is_set), &(this->name), &(this->name_is_set)); } + if (proto_category.hide_category() != 0) { + proto_to_bool(proto_category.hide_category(), state, &(this->hide_category), &(this->hide_category_is_set)); + } if (proto_category.is_separator() != 0) { proto_to_bool(proto_category.is_separator(), state, &(this->is_separator), &(this->is_separator_is_set)); } diff --git a/xml_converter/src/category_gen.hpp b/xml_converter/src/category_gen.hpp index 5a04029b..5746d2d9 100644 --- a/xml_converter/src/category_gen.hpp +++ b/xml_converter/src/category_gen.hpp @@ -17,14 +17,14 @@ class XMLError; class Category : public Parseable { public: - bool default_visibility; std::string display_name; + bool hide_category; bool is_separator; UniqueId menu_id; std::string name; std::string tooltip_description; - bool default_visibility_is_set = false; bool display_name_is_set = false; + bool hide_category_is_set = false; bool is_separator_is_set = false; bool menu_id_is_set = false; bool name_is_set = false; From 42371315a909da35ef2fd7117a6a2411310bca83 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Wed, 4 Sep 2024 21:23:30 -0400 Subject: [PATCH 523/539] renamed to match new test format --- .../input/pack/xml_file.xml | 0 .../output_proto/markers.bin | 0 .../output_xml/xml_file.xml | 0 .../{default_toggle => xml_default_toggle}/testcase.yaml | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename xml_converter/integration_tests/test_cases/{default_toggle => xml_default_toggle}/input/pack/xml_file.xml (100%) rename xml_converter/integration_tests/test_cases/{default_toggle => xml_default_toggle}/output_proto/markers.bin (100%) rename xml_converter/integration_tests/test_cases/{default_toggle => xml_default_toggle}/output_xml/xml_file.xml (100%) rename xml_converter/integration_tests/test_cases/{default_toggle => xml_default_toggle}/testcase.yaml (100%) diff --git a/xml_converter/integration_tests/test_cases/default_toggle/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_default_toggle/input/pack/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/default_toggle/input/pack/xml_file.xml rename to xml_converter/integration_tests/test_cases/xml_default_toggle/input/pack/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/default_toggle/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/xml_default_toggle/output_proto/markers.bin similarity index 100% rename from xml_converter/integration_tests/test_cases/default_toggle/output_proto/markers.bin rename to xml_converter/integration_tests/test_cases/xml_default_toggle/output_proto/markers.bin diff --git a/xml_converter/integration_tests/test_cases/default_toggle/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_default_toggle/output_xml/xml_file.xml similarity index 100% rename from xml_converter/integration_tests/test_cases/default_toggle/output_xml/xml_file.xml rename to xml_converter/integration_tests/test_cases/xml_default_toggle/output_xml/xml_file.xml diff --git a/xml_converter/integration_tests/test_cases/default_toggle/testcase.yaml b/xml_converter/integration_tests/test_cases/xml_default_toggle/testcase.yaml similarity index 100% rename from xml_converter/integration_tests/test_cases/default_toggle/testcase.yaml rename to xml_converter/integration_tests/test_cases/xml_default_toggle/testcase.yaml From 5322ee722a4d5a18dd745983cd2cef3dc4a01953 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sat, 7 Sep 2024 20:47:22 -0400 Subject: [PATCH 524/539] changed name to is_hidden --- .../doc/menu/{hide_category.md => is_hidden.md} | 4 ++-- xml_converter/proto/waypoint.proto | 2 +- xml_converter/src/category_gen.cpp | 16 ++++++++-------- xml_converter/src/category_gen.hpp | 4 ++-- 4 files changed, 13 insertions(+), 13 deletions(-) rename xml_converter/doc/menu/{hide_category.md => is_hidden.md} (88%) diff --git a/xml_converter/doc/menu/hide_category.md b/xml_converter/doc/menu/is_hidden.md similarity index 88% rename from xml_converter/doc/menu/hide_category.md rename to xml_converter/doc/menu/is_hidden.md index c1773fc9..a78b08d8 100644 --- a/xml_converter/doc/menu/hide_category.md +++ b/xml_converter/doc/menu/is_hidden.md @@ -1,9 +1,9 @@ --- -name: Hide Category +name: Is Hidden type: Boolean applies_to: [Category] xml_fields: [DefaultToggle] -protobuf_field: hide_category +protobuf_field: is_hidden custom_functions: read.xml: function: inverted_xml_attribute_to_bool diff --git a/xml_converter/proto/waypoint.proto b/xml_converter/proto/waypoint.proto index d81d0e9e..702e07b1 100644 --- a/xml_converter/proto/waypoint.proto +++ b/xml_converter/proto/waypoint.proto @@ -21,7 +21,7 @@ message Category { repeated Icon icon = 3; repeated Trail trail = 4; bool is_separator = 5; - bool hide_category = 6; + bool is_hidden = 6; string tip_description = 7; bytes id = 8; } diff --git a/xml_converter/src/category_gen.cpp b/xml_converter/src/category_gen.cpp index 0cf59014..90be2254 100644 --- a/xml_converter/src/category_gen.cpp +++ b/xml_converter/src/category_gen.cpp @@ -52,7 +52,7 @@ bool Category::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectordisplay_name), &(this->display_name_is_set)); } else if (attributename == "defaulttoggle") { - inverted_xml_attribute_to_bool(attribute, errors, state, &(this->hide_category), &(this->hide_category_is_set)); + inverted_xml_attribute_to_bool(attribute, errors, state, &(this->is_hidden), &(this->is_hidden_is_set)); } else if (attributename == "isseparator") { xml_attribute_to_bool(attribute, errors, state, &(this->is_separator), &(this->is_separator_is_set)); @@ -81,8 +81,8 @@ vector Category::as_xml(XMLWriterState* state) const { if (this->display_name_is_set) { xml_node_contents.push_back(string_to_xml_attribute("DisplayName", state, &this->display_name)); } - if (this->hide_category_is_set) { - xml_node_contents.push_back(bool_to_inverted_xml_attribute("DefaultToggle", state, &this->hide_category)); + if (this->is_hidden_is_set) { + xml_node_contents.push_back(bool_to_inverted_xml_attribute("DefaultToggle", state, &this->is_hidden)); } if (this->is_separator_is_set) { xml_node_contents.push_back(bool_to_xml_attribute("IsSeparator", state, &this->is_separator)); @@ -117,9 +117,9 @@ waypoint::Category Category::as_protobuf(ProtoWriterState* state) const { std::function setter = [&proto_category](std::string val) { proto_category.set_name(val); }; display_name_and_name_to_proto_display_name(this->display_name, state, setter, &(this->name), &(this->name_is_set)); } - if (this->hide_category_is_set) { - std::function setter = [&proto_category](bool val) { proto_category.set_hide_category(val); }; - bool_to_proto(this->hide_category, state, setter); + if (this->is_hidden_is_set) { + std::function setter = [&proto_category](bool val) { proto_category.set_is_hidden(val); }; + bool_to_proto(this->is_hidden, state, setter); } if (this->is_separator_is_set) { std::function setter = [&proto_category](bool val) { proto_category.set_is_separator(val); }; @@ -140,8 +140,8 @@ void Category::parse_protobuf(waypoint::Category proto_category, ProtoReaderStat if (proto_category.name() != "") { proto_display_name_to_display_name_and_name(proto_category.name(), state, &(this->display_name), &(this->display_name_is_set), &(this->name), &(this->name_is_set)); } - if (proto_category.hide_category() != 0) { - proto_to_bool(proto_category.hide_category(), state, &(this->hide_category), &(this->hide_category_is_set)); + if (proto_category.is_hidden() != 0) { + proto_to_bool(proto_category.is_hidden(), state, &(this->is_hidden), &(this->is_hidden_is_set)); } if (proto_category.is_separator() != 0) { proto_to_bool(proto_category.is_separator(), state, &(this->is_separator), &(this->is_separator_is_set)); diff --git a/xml_converter/src/category_gen.hpp b/xml_converter/src/category_gen.hpp index 5746d2d9..3bc738cf 100644 --- a/xml_converter/src/category_gen.hpp +++ b/xml_converter/src/category_gen.hpp @@ -18,13 +18,13 @@ class XMLError; class Category : public Parseable { public: std::string display_name; - bool hide_category; + bool is_hidden; bool is_separator; UniqueId menu_id; std::string name; std::string tooltip_description; bool display_name_is_set = false; - bool hide_category_is_set = false; + bool is_hidden_is_set = false; bool is_separator_is_set = false; bool menu_id_is_set = false; bool name_is_set = false; From 6cd4cb719c6bdf180c749f15b8f08a1ef3227c09 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sat, 7 Sep 2024 21:33:45 -0400 Subject: [PATCH 525/539] Change Scale On Map with Zoom to Constant Size on Map --- .../doc/rendering/constant_size_on_map.md | 21 +++++++++++++++ .../doc/rendering/scale_on_map_with_zoom.md | 14 ---------- .../input/pack/markers.bin | 3 +++ .../output_proto/markers.bin | 3 +++ .../output_xml/xml_file.xml | 11 ++++++++ .../proto_constant_size_on_map/testcase.yaml | 5 ++++ .../input/pack/xml_file.xml | 10 +++++++ .../output_proto/markers.bin | 3 +++ .../output_xml/xml_file.xml | 11 ++++++++ .../xml_scale_on_map_with_zoom/testcase.yaml | 5 ++++ xml_converter/proto/waypoint.proto | 2 +- xml_converter/src/icon_gen.cpp | 26 +++++++++---------- xml_converter/src/icon_gen.hpp | 4 +-- 13 files changed, 88 insertions(+), 30 deletions(-) create mode 100644 xml_converter/doc/rendering/constant_size_on_map.md delete mode 100644 xml_converter/doc/rendering/scale_on_map_with_zoom.md create mode 100644 xml_converter/integration_tests/test_cases/proto_constant_size_on_map/input/pack/markers.bin create mode 100644 xml_converter/integration_tests/test_cases/proto_constant_size_on_map/output_proto/markers.bin create mode 100644 xml_converter/integration_tests/test_cases/proto_constant_size_on_map/output_xml/xml_file.xml create mode 100644 xml_converter/integration_tests/test_cases/proto_constant_size_on_map/testcase.yaml create mode 100644 xml_converter/integration_tests/test_cases/xml_scale_on_map_with_zoom/input/pack/xml_file.xml create mode 100644 xml_converter/integration_tests/test_cases/xml_scale_on_map_with_zoom/output_proto/markers.bin create mode 100644 xml_converter/integration_tests/test_cases/xml_scale_on_map_with_zoom/output_xml/xml_file.xml create mode 100644 xml_converter/integration_tests/test_cases/xml_scale_on_map_with_zoom/testcase.yaml diff --git a/xml_converter/doc/rendering/constant_size_on_map.md b/xml_converter/doc/rendering/constant_size_on_map.md new file mode 100644 index 00000000..b73d9932 --- /dev/null +++ b/xml_converter/doc/rendering/constant_size_on_map.md @@ -0,0 +1,21 @@ +--- +name: Constant Size On Map +type: Boolean +applies_to: [Icon] +xml_fields: [ScaleOnMapWithZoom] +protobuf_field: constant_size_on_map +custom_functions: + read.xml: + function: inverted_xml_attribute_to_bool + side_effects: [] + write.xml: + function: bool_to_inverted_xml_attribute + side_effects: [] +--- +Scale the size of the object to be the same scale as the map. + +Notes +===== + +https://blishhud.com/docs/markers/attributes/scaleonmapwithzoom + diff --git a/xml_converter/doc/rendering/scale_on_map_with_zoom.md b/xml_converter/doc/rendering/scale_on_map_with_zoom.md deleted file mode 100644 index ff2d3c99..00000000 --- a/xml_converter/doc/rendering/scale_on_map_with_zoom.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -name: Scale on Map With Zoom -type: Boolean -applies_to: [Icon] -xml_fields: [ScaleOnMapWithZoom] -protobuf_field: scale_on_map_with_zoom ---- -Scale the size of the object to be the same scale as the map. - -Notes -===== - -https://blishhud.com/docs/markers/attributes/scaleonmapwithzoom - diff --git a/xml_converter/integration_tests/test_cases/proto_constant_size_on_map/input/pack/markers.bin b/xml_converter/integration_tests/test_cases/proto_constant_size_on_map/input/pack/markers.bin new file mode 100644 index 00000000..3f954555 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/proto_constant_size_on_map/input/pack/markers.bin @@ -0,0 +1,3 @@ + +q + My Category 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC¸ 2B \Ï)Cf¦RC{ÔWC¸ 2B \Ï)Cf¦RC{ÔWCB(èÌ“^– \ No newline at end of file diff --git a/xml_converter/integration_tests/test_cases/proto_constant_size_on_map/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/proto_constant_size_on_map/output_proto/markers.bin new file mode 100644 index 00000000..3f954555 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/proto_constant_size_on_map/output_proto/markers.bin @@ -0,0 +1,3 @@ + +q + My Category 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC¸ 2B \Ï)Cf¦RC{ÔWC¸ 2B \Ï)Cf¦RC{ÔWCB(èÌ“^– \ No newline at end of file diff --git a/xml_converter/integration_tests/test_cases/proto_constant_size_on_map/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/proto_constant_size_on_map/output_xml/xml_file.xml new file mode 100644 index 00000000..652c2abc --- /dev/null +++ b/xml_converter/integration_tests/test_cases/proto_constant_size_on_map/output_xml/xml_file.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/xml_converter/integration_tests/test_cases/proto_constant_size_on_map/testcase.yaml b/xml_converter/integration_tests/test_cases/proto_constant_size_on_map/testcase.yaml new file mode 100644 index 00000000..d87f4066 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/proto_constant_size_on_map/testcase.yaml @@ -0,0 +1,5 @@ +input_paths: + "pack": "proto" +expected_stdout: | +expected_stderr: | +expected_returncode: 0 diff --git a/xml_converter/integration_tests/test_cases/xml_scale_on_map_with_zoom/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_scale_on_map_with_zoom/input/pack/xml_file.xml new file mode 100644 index 00000000..9cee2191 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/xml_scale_on_map_with_zoom/input/pack/xml_file.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/xml_converter/integration_tests/test_cases/xml_scale_on_map_with_zoom/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/xml_scale_on_map_with_zoom/output_proto/markers.bin new file mode 100644 index 00000000..3f954555 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/xml_scale_on_map_with_zoom/output_proto/markers.bin @@ -0,0 +1,3 @@ + +q + My Category 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC¸ 2B \Ï)Cf¦RC{ÔWC¸ 2B \Ï)Cf¦RC{ÔWCB(èÌ“^– \ No newline at end of file diff --git a/xml_converter/integration_tests/test_cases/xml_scale_on_map_with_zoom/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_scale_on_map_with_zoom/output_xml/xml_file.xml new file mode 100644 index 00000000..81afab86 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/xml_scale_on_map_with_zoom/output_xml/xml_file.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/xml_converter/integration_tests/test_cases/xml_scale_on_map_with_zoom/testcase.yaml b/xml_converter/integration_tests/test_cases/xml_scale_on_map_with_zoom/testcase.yaml new file mode 100644 index 00000000..9510c793 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/xml_scale_on_map_with_zoom/testcase.yaml @@ -0,0 +1,5 @@ +input_paths: + "pack": "xml" +expected_stdout: | +expected_stderr: | +expected_returncode: 0 diff --git a/xml_converter/proto/waypoint.proto b/xml_converter/proto/waypoint.proto index 702e07b1..1a028d79 100644 --- a/xml_converter/proto/waypoint.proto +++ b/xml_converter/proto/waypoint.proto @@ -44,7 +44,7 @@ message Icon { int32 minimum_size_on_screen = 20; int32 map_display_size = 21; int32 maximum_size_on_screen = 22; - bool scale_on_map_with_zoom = 23; + bool constant_size_on_map = 23; string tip_description = 24; string tip_name = 25; fixed32 rgba_color = 26; diff --git a/xml_converter/src/icon_gen.cpp b/xml_converter/src/icon_gen.cpp index 13df4abb..36c87c83 100644 --- a/xml_converter/src/icon_gen.cpp +++ b/xml_converter/src/icon_gen.cpp @@ -67,6 +67,9 @@ bool Icon::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectorcolor.red), &(this->color_is_set)); } + else if (attributename == "scaleonmapwithzoom") { + inverted_xml_attribute_to_bool(attribute, errors, state, &(this->constant_size_on_map), &(this->constant_size_on_map_is_set)); + } else if (attributename == "copy") { xml_attribute_to_string(attribute, errors, state, &(this->copy_clipboard), &(this->copy_clipboard_is_set)); } @@ -202,9 +205,6 @@ bool Icon::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectorreset_length), &(this->reset_length_is_set)); } - else if (attributename == "scaleonmapwithzoom") { - xml_attribute_to_bool(attribute, errors, state, &(this->scale_on_map_with_zoom), &(this->scale_on_map_with_zoom_is_set)); - } else if (attributename == "schedule") { xml_attribute_to_string(attribute, errors, state, &(this->schedule), &(this->schedule_is_set)); } @@ -285,6 +285,9 @@ vector Icon::as_xml(XMLWriterState* state) const { if (this->color_is_set) { xml_node_contents.push_back(float_to_xml_attribute("Alpha", state, &this->color.alpha)); } + if (this->constant_size_on_map_is_set) { + xml_node_contents.push_back(bool_to_inverted_xml_attribute("ScaleOnMapWithZoom", state, &this->constant_size_on_map)); + } if (this->copy_clipboard_is_set) { xml_node_contents.push_back(string_to_xml_attribute("Copy", state, &this->copy_clipboard)); } @@ -375,9 +378,6 @@ vector Icon::as_xml(XMLWriterState* state) const { if (this->reset_length_is_set) { xml_node_contents.push_back(float_to_xml_attribute("ResetLength", state, &this->reset_length)); } - if (this->scale_on_map_with_zoom_is_set) { - xml_node_contents.push_back(bool_to_xml_attribute("ScaleOnMapWithZoom", state, &this->scale_on_map_with_zoom)); - } if (this->schedule_is_set) { xml_node_contents.push_back(string_to_xml_attribute("Schedule", state, &this->schedule)); } @@ -439,6 +439,10 @@ waypoint::Icon Icon::as_protobuf(ProtoWriterState* state) const { std::function setter = [&proto_icon](uint32_t val) { proto_icon.set_rgba_color(val); }; color_to_proto(this->color, state, setter); } + if (this->constant_size_on_map_is_set) { + std::function setter = [&proto_icon](bool val) { proto_icon.set_constant_size_on_map(val); }; + bool_to_proto(this->constant_size_on_map, state, setter); + } if (this->copy_clipboard_is_set) { std::function setter = [&proto_icon](std::string val) { proto_icon.mutable_trigger()->set_action_copy_clipboard(val); }; string_to_proto(this->copy_clipboard, state, setter); @@ -555,10 +559,6 @@ waypoint::Icon Icon::as_protobuf(ProtoWriterState* state) const { std::function setter = [&proto_icon](float val) { proto_icon.mutable_trigger()->set_reset_length(val); }; float_to_proto(this->reset_length, state, setter); } - if (this->scale_on_map_with_zoom_is_set) { - std::function setter = [&proto_icon](bool val) { proto_icon.set_scale_on_map_with_zoom(val); }; - bool_to_proto(this->scale_on_map_with_zoom, state, setter); - } if (this->schedule_is_set) { std::function setter = [&proto_icon](std::string val) { proto_icon.set_bhdraft__schedule(val); }; string_to_proto(this->schedule, state, setter); @@ -620,6 +620,9 @@ void Icon::parse_protobuf(waypoint::Icon proto_icon, ProtoReaderState* state) { if (proto_icon.rgba_color() != 0) { proto_to_color(proto_icon.rgba_color(), state, &(this->color), &(this->color_is_set)); } + if (proto_icon.constant_size_on_map() != 0) { + proto_to_bool(proto_icon.constant_size_on_map(), state, &(this->constant_size_on_map), &(this->constant_size_on_map_is_set)); + } if (proto_icon.trigger().action_copy_clipboard() != "") { proto_to_string(proto_icon.trigger().action_copy_clipboard(), state, &(this->copy_clipboard), &(this->copy_clipboard_is_set)); } @@ -707,9 +710,6 @@ void Icon::parse_protobuf(waypoint::Icon proto_icon, ProtoReaderState* state) { if (proto_icon.trigger().reset_length() != 0) { proto_to_float(proto_icon.trigger().reset_length(), state, &(this->reset_length), &(this->reset_length_is_set)); } - if (proto_icon.scale_on_map_with_zoom() != 0) { - proto_to_bool(proto_icon.scale_on_map_with_zoom(), state, &(this->scale_on_map_with_zoom), &(this->scale_on_map_with_zoom_is_set)); - } if (proto_icon.bhdraft__schedule() != "") { proto_to_string(proto_icon.bhdraft__schedule(), state, &(this->schedule), &(this->schedule_is_set)); } diff --git a/xml_converter/src/icon_gen.hpp b/xml_converter/src/icon_gen.hpp index 11177895..a49d9c44 100644 --- a/xml_converter/src/icon_gen.hpp +++ b/xml_converter/src/icon_gen.hpp @@ -35,6 +35,7 @@ class Icon : public Parseable { float bounce_height; MarkerCategory category; Color color; + bool constant_size_on_map; std::string copy_clipboard; std::string copy_message; CullChirality cull_chirality; @@ -64,7 +65,6 @@ class Icon : public Parseable { bool render_on_minimap; ResetBehavior reset_behavior; float reset_length; - bool scale_on_map_with_zoom; std::string schedule; float schedule_duration; MarkerCategory show_category; @@ -82,6 +82,7 @@ class Icon : public Parseable { bool bounce_height_is_set = false; bool category_is_set = false; bool color_is_set = false; + bool constant_size_on_map_is_set = false; bool copy_clipboard_is_set = false; bool copy_message_is_set = false; bool cull_chirality_is_set = false; @@ -111,7 +112,6 @@ class Icon : public Parseable { bool render_on_minimap_is_set = false; bool reset_behavior_is_set = false; bool reset_length_is_set = false; - bool scale_on_map_with_zoom_is_set = false; bool schedule_is_set = false; bool schedule_duration_is_set = false; bool show_category_is_set = false; From 8c1e6f200c4526e3a0ef863cad99b48e39551d6f Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 8 Sep 2024 00:06:02 -0400 Subject: [PATCH 526/539] Edit description of Icon Size to clarify what the value does --- xml_converter/doc/scale/icon_size.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml_converter/doc/scale/icon_size.md b/xml_converter/doc/scale/icon_size.md index 7c79b609..632cc6ef 100644 --- a/xml_converter/doc/scale/icon_size.md +++ b/xml_converter/doc/scale/icon_size.md @@ -5,7 +5,7 @@ applies_to: [Icon] xml_fields: [IconSize] protobuf_field: tentative__scale --- -Unclear) Some value representation of how large an icon should be. Is this a scale multiplier or a fixed size value? How does this relate to MinSize and MaxSize. +Multiplier on the size of an image (i.e. 1 is a 100%, 2 is 200%). Notes ===== From 514f2269983cc842268ccddd43252be41152b8c1 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 8 Sep 2024 00:06:55 -0400 Subject: [PATCH 527/539] fixed grammar --- xml_converter/doc/scale/icon_size.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml_converter/doc/scale/icon_size.md b/xml_converter/doc/scale/icon_size.md index 632cc6ef..7f13327e 100644 --- a/xml_converter/doc/scale/icon_size.md +++ b/xml_converter/doc/scale/icon_size.md @@ -5,7 +5,7 @@ applies_to: [Icon] xml_fields: [IconSize] protobuf_field: tentative__scale --- -Multiplier on the size of an image (i.e. 1 is a 100%, 2 is 200%). +Multiplier on the size of an image (i.e. 1 is 100%, 2 is 200%). Notes ===== From b107b5d3d3debb8645eb2380c9b30c41b8d725d8 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Tue, 10 Sep 2024 19:37:00 -0400 Subject: [PATCH 528/539] Changed render in game to is_hidden_ingame --- xml_converter/doc/rendering/render_ingame.md | 12 +++++++++--- .../proto_is_hidden_ingame/input/pack/markers.bin | 3 +++ .../output_proto/markers.bin | 3 +++ .../output_xml/xml_file.xml | 15 +++++++++++++++ .../proto_is_hidden_ingame/testcase.yaml | 5 +++++ .../xml_render_ingame/input/pack/xml_file.xml | 15 +++++++++++++++ .../xml_render_ingame/output_proto/markers.bin | 3 +++ .../xml_render_ingame/output_xml/xml_file.xml | 15 +++++++++++++++ .../test_cases/xml_render_ingame/testcase.yaml | 5 +++++ xml_converter/proto/waypoint.proto | 4 ++-- xml_converter/src/icon_gen.cpp | 12 ++++++------ xml_converter/src/trail_gen.cpp | 12 ++++++------ 12 files changed, 87 insertions(+), 17 deletions(-) create mode 100644 xml_converter/integration_tests/test_cases/proto_is_hidden_ingame/input/pack/markers.bin create mode 100644 xml_converter/integration_tests/test_cases/proto_is_hidden_ingame/output_proto/markers.bin create mode 100644 xml_converter/integration_tests/test_cases/proto_is_hidden_ingame/output_xml/xml_file.xml create mode 100644 xml_converter/integration_tests/test_cases/proto_is_hidden_ingame/testcase.yaml create mode 100644 xml_converter/integration_tests/test_cases/xml_render_ingame/input/pack/xml_file.xml create mode 100644 xml_converter/integration_tests/test_cases/xml_render_ingame/output_proto/markers.bin create mode 100644 xml_converter/integration_tests/test_cases/xml_render_ingame/output_xml/xml_file.xml create mode 100644 xml_converter/integration_tests/test_cases/xml_render_ingame/testcase.yaml diff --git a/xml_converter/doc/rendering/render_ingame.md b/xml_converter/doc/rendering/render_ingame.md index b84edfb2..3000df16 100644 --- a/xml_converter/doc/rendering/render_ingame.md +++ b/xml_converter/doc/rendering/render_ingame.md @@ -3,8 +3,14 @@ name: Render Ingame type: Boolean applies_to: [Icon, Trail] xml_fields: [IngameVisibility, BHIngameVisibility] -protobuf_field: tentative__render_ingame - +protobuf_field: is_hidden_ingame +custom_functions: + read.xml: + function: inverted_xml_attribute_to_bool + side_effects: [] + write.xml: + function: bool_to_inverted_xml_attribute + side_effects: [] --- Allows or Prevents this object from being rendered in the 3D game space. @@ -12,5 +18,5 @@ Allows or Prevents this object from being rendered in the 3D game space. Notes ===== -We want to figure out a way to invert this value becuase a "false" value is the default value inside a protobuf and if we set the default as "true" then we have to write this field for every object. This inversion will need to be present in the code generator and that might take a bit to design and implement. +https://gw2pathing.com/docs/marker-dev/attributes/visibility diff --git a/xml_converter/integration_tests/test_cases/proto_is_hidden_ingame/input/pack/markers.bin b/xml_converter/integration_tests/test_cases/proto_is_hidden_ingame/input/pack/markers.bin new file mode 100644 index 00000000..02eeace6 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/proto_is_hidden_ingame/input/pack/markers.bin @@ -0,0 +1,3 @@ + +Ë + My Category 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWCB(èÌ“^– \ No newline at end of file diff --git a/xml_converter/integration_tests/test_cases/proto_is_hidden_ingame/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/proto_is_hidden_ingame/output_proto/markers.bin new file mode 100644 index 00000000..02eeace6 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/proto_is_hidden_ingame/output_proto/markers.bin @@ -0,0 +1,3 @@ + +Ë + My Category 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWCB(èÌ“^– \ No newline at end of file diff --git a/xml_converter/integration_tests/test_cases/proto_is_hidden_ingame/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/proto_is_hidden_ingame/output_xml/xml_file.xml new file mode 100644 index 00000000..364d1262 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/proto_is_hidden_ingame/output_xml/xml_file.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/xml_converter/integration_tests/test_cases/proto_is_hidden_ingame/testcase.yaml b/xml_converter/integration_tests/test_cases/proto_is_hidden_ingame/testcase.yaml new file mode 100644 index 00000000..d87f4066 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/proto_is_hidden_ingame/testcase.yaml @@ -0,0 +1,5 @@ +input_paths: + "pack": "proto" +expected_stdout: | +expected_stderr: | +expected_returncode: 0 diff --git a/xml_converter/integration_tests/test_cases/xml_render_ingame/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_render_ingame/input/pack/xml_file.xml new file mode 100644 index 00000000..917be8d6 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/xml_render_ingame/input/pack/xml_file.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/xml_converter/integration_tests/test_cases/xml_render_ingame/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/xml_render_ingame/output_proto/markers.bin new file mode 100644 index 00000000..02eeace6 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/xml_render_ingame/output_proto/markers.bin @@ -0,0 +1,3 @@ + +Ë + My Category 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWCB(èÌ“^– \ No newline at end of file diff --git a/xml_converter/integration_tests/test_cases/xml_render_ingame/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_render_ingame/output_xml/xml_file.xml new file mode 100644 index 00000000..c71302b0 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/xml_render_ingame/output_xml/xml_file.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/xml_converter/integration_tests/test_cases/xml_render_ingame/testcase.yaml b/xml_converter/integration_tests/test_cases/xml_render_ingame/testcase.yaml new file mode 100644 index 00000000..9510c793 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/xml_render_ingame/testcase.yaml @@ -0,0 +1,5 @@ +input_paths: + "pack": "xml" +expected_stdout: | +expected_stderr: | +expected_returncode: 0 diff --git a/xml_converter/proto/waypoint.proto b/xml_converter/proto/waypoint.proto index 1a028d79..d5520acb 100644 --- a/xml_converter/proto/waypoint.proto +++ b/xml_converter/proto/waypoint.proto @@ -55,9 +55,9 @@ message Icon { SpecializationFilter specialization_filter = 31; SpeciesFilter species_filter = 32; CullChirality cull_chirality = 33; + bool is_hidden_ingame = 34; float tentative__scale = 2048; - bool tentative__render_ingame = 2049; bool tentative__render_on_map = 2050; bool tentative__render_on_minimap = 2051; string bhdraft__schedule = 2052; @@ -87,8 +87,8 @@ message Trail { SpeciesFilter species_filter = 28; int32 map_display_size = 29; CullChirality cull_chirality = 30; + bool is_hidden_ingame = 31; - bool tentative__render_ingame = 2049; bool tentative__render_on_map = 2050; bool tentative__render_on_minimap = 2051; string bhdraft__schedule = 2052; diff --git a/xml_converter/src/icon_gen.cpp b/xml_converter/src/icon_gen.cpp index 36c87c83..73443810 100644 --- a/xml_converter/src/icon_gen.cpp +++ b/xml_converter/src/icon_gen.cpp @@ -182,10 +182,10 @@ bool Icon::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectorprofession_filter), &(this->profession_filter_is_set)); } else if (attributename == "ingamevisibility") { - xml_attribute_to_bool(attribute, errors, state, &(this->render_ingame), &(this->render_ingame_is_set)); + inverted_xml_attribute_to_bool(attribute, errors, state, &(this->render_ingame), &(this->render_ingame_is_set)); } else if (attributename == "bhingamevisibility") { - xml_attribute_to_bool(attribute, errors, state, &(this->render_ingame), &(this->render_ingame_is_set)); + inverted_xml_attribute_to_bool(attribute, errors, state, &(this->render_ingame), &(this->render_ingame_is_set)); } else if (attributename == "mapvisibility") { xml_attribute_to_bool(attribute, errors, state, &(this->render_on_map), &(this->render_on_map_is_set)); @@ -364,7 +364,7 @@ vector Icon::as_xml(XMLWriterState* state) const { xml_node_contents.push_back(profession_filter_to_xml_attribute("Profession", state, &this->profession_filter)); } if (this->render_ingame_is_set) { - xml_node_contents.push_back(bool_to_xml_attribute("IngameVisibility", state, &this->render_ingame)); + xml_node_contents.push_back(bool_to_inverted_xml_attribute("IngameVisibility", state, &this->render_ingame)); } if (this->render_on_map_is_set) { xml_node_contents.push_back(bool_to_xml_attribute("MapVisibility", state, &this->render_on_map)); @@ -540,7 +540,7 @@ waypoint::Icon Icon::as_protobuf(ProtoWriterState* state) const { profession_filter_to_proto(this->profession_filter, state, setter); } if (this->render_ingame_is_set) { - std::function setter = [&proto_icon](bool val) { proto_icon.set_tentative__render_ingame(val); }; + std::function setter = [&proto_icon](bool val) { proto_icon.set_is_hidden_ingame(val); }; bool_to_proto(this->render_ingame, state, setter); } if (this->render_on_map_is_set) { @@ -695,8 +695,8 @@ void Icon::parse_protobuf(waypoint::Icon proto_icon, ProtoReaderState* state) { if (proto_icon.has_profession_filter()) { proto_to_profession_filter(proto_icon.profession_filter(), state, &(this->profession_filter), &(this->profession_filter_is_set)); } - if (proto_icon.tentative__render_ingame() != 0) { - proto_to_bool(proto_icon.tentative__render_ingame(), state, &(this->render_ingame), &(this->render_ingame_is_set)); + if (proto_icon.is_hidden_ingame() != 0) { + proto_to_bool(proto_icon.is_hidden_ingame(), state, &(this->render_ingame), &(this->render_ingame_is_set)); } if (proto_icon.tentative__render_on_map() != 0) { proto_to_bool(proto_icon.tentative__render_on_map(), state, &(this->render_on_map), &(this->render_on_map_is_set)); diff --git a/xml_converter/src/trail_gen.cpp b/xml_converter/src/trail_gen.cpp index a22ff256..274cb021 100644 --- a/xml_converter/src/trail_gen.cpp +++ b/xml_converter/src/trail_gen.cpp @@ -104,10 +104,10 @@ bool Trail::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectorprofession_filter), &(this->profession_filter_is_set)); } else if (attributename == "ingamevisibility") { - xml_attribute_to_bool(attribute, errors, state, &(this->render_ingame), &(this->render_ingame_is_set)); + inverted_xml_attribute_to_bool(attribute, errors, state, &(this->render_ingame), &(this->render_ingame_is_set)); } else if (attributename == "bhingamevisibility") { - xml_attribute_to_bool(attribute, errors, state, &(this->render_ingame), &(this->render_ingame_is_set)); + inverted_xml_attribute_to_bool(attribute, errors, state, &(this->render_ingame), &(this->render_ingame_is_set)); } else if (attributename == "mapvisibility") { xml_attribute_to_bool(attribute, errors, state, &(this->render_on_map), &(this->render_on_map_is_set)); @@ -214,7 +214,7 @@ vector Trail::as_xml(XMLWriterState* state) const { xml_node_contents.push_back(profession_filter_to_xml_attribute("Profession", state, &this->profession_filter)); } if (this->render_ingame_is_set) { - xml_node_contents.push_back(bool_to_xml_attribute("IngameVisibility", state, &this->render_ingame)); + xml_node_contents.push_back(bool_to_inverted_xml_attribute("IngameVisibility", state, &this->render_ingame)); } if (this->render_on_map_is_set) { xml_node_contents.push_back(bool_to_xml_attribute("MapVisibility", state, &this->render_on_map)); @@ -314,7 +314,7 @@ waypoint::Trail Trail::as_protobuf(ProtoWriterState* state) const { profession_filter_to_proto(this->profession_filter, state, setter); } if (this->render_ingame_is_set) { - std::function setter = [&proto_trail](bool val) { proto_trail.set_tentative__render_ingame(val); }; + std::function setter = [&proto_trail](bool val) { proto_trail.set_is_hidden_ingame(val); }; bool_to_proto(this->render_ingame, state, setter); } if (this->render_on_map_is_set) { @@ -405,8 +405,8 @@ void Trail::parse_protobuf(waypoint::Trail proto_trail, ProtoReaderState* state) if (proto_trail.has_profession_filter()) { proto_to_profession_filter(proto_trail.profession_filter(), state, &(this->profession_filter), &(this->profession_filter_is_set)); } - if (proto_trail.tentative__render_ingame() != 0) { - proto_to_bool(proto_trail.tentative__render_ingame(), state, &(this->render_ingame), &(this->render_ingame_is_set)); + if (proto_trail.is_hidden_ingame() != 0) { + proto_to_bool(proto_trail.is_hidden_ingame(), state, &(this->render_ingame), &(this->render_ingame_is_set)); } if (proto_trail.tentative__render_on_map() != 0) { proto_to_bool(proto_trail.tentative__render_on_map(), state, &(this->render_on_map), &(this->render_on_map_is_set)); From 0f328ccea5928015d5c1862e1dd316fa4e517e92 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Tue, 10 Sep 2024 19:41:59 -0400 Subject: [PATCH 529/539] reduced size of proto tests --- .../proto_is_hidden_ingame/input/pack/markers.bin | 4 ++-- .../proto_is_hidden_ingame/output_proto/markers.bin | 4 ++-- .../proto_is_hidden_ingame/output_xml/xml_file.xml | 6 ------ 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/xml_converter/integration_tests/test_cases/proto_is_hidden_ingame/input/pack/markers.bin b/xml_converter/integration_tests/test_cases/proto_is_hidden_ingame/input/pack/markers.bin index 02eeace6..2416297b 100644 --- a/xml_converter/integration_tests/test_cases/proto_is_hidden_ingame/input/pack/markers.bin +++ b/xml_converter/integration_tests/test_cases/proto_is_hidden_ingame/input/pack/markers.bin @@ -1,3 +1,3 @@ -Ë - My Category 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWCB(èÌ“^– \ No newline at end of file +D + My Category 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWCB(èÌ“^– \ No newline at end of file diff --git a/xml_converter/integration_tests/test_cases/proto_is_hidden_ingame/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/proto_is_hidden_ingame/output_proto/markers.bin index 02eeace6..2416297b 100644 --- a/xml_converter/integration_tests/test_cases/proto_is_hidden_ingame/output_proto/markers.bin +++ b/xml_converter/integration_tests/test_cases/proto_is_hidden_ingame/output_proto/markers.bin @@ -1,3 +1,3 @@ -Ë - My Category 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWCB(èÌ“^– \ No newline at end of file +D + My Category 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWCB(èÌ“^– \ No newline at end of file diff --git a/xml_converter/integration_tests/test_cases/proto_is_hidden_ingame/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/proto_is_hidden_ingame/output_xml/xml_file.xml index 364d1262..4ad18f6e 100644 --- a/xml_converter/integration_tests/test_cases/proto_is_hidden_ingame/output_xml/xml_file.xml +++ b/xml_converter/integration_tests/test_cases/proto_is_hidden_ingame/output_xml/xml_file.xml @@ -4,12 +4,6 @@ - - - - - - From 4c12c44d651669443f11af28ef9549a538f96d87 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Tue, 10 Sep 2024 20:48:56 -0400 Subject: [PATCH 530/539] Changed render_on_map to _is_hidden_on_map --- xml_converter/doc/rendering/render_on_map.md | 9 ++++++++- .../proto_is_hidden_on_map/input/pack/markers.bin | 3 +++ .../output_proto/markers.bin | 3 +++ .../output_xml/xml_file.xml | 9 +++++++++ .../proto_is_hidden_on_map/testcase.yaml | 5 +++++ .../xml_render_on_map/input/pack/xml_file.xml | 15 +++++++++++++++ .../xml_render_on_map/output_proto/markers.bin | 3 +++ .../xml_render_on_map/output_xml/xml_file.xml | 15 +++++++++++++++ .../test_cases/xml_render_on_map/testcase.yaml | 5 +++++ xml_converter/proto/waypoint.proto | 4 ++-- xml_converter/src/icon_gen.cpp | 12 ++++++------ xml_converter/src/trail_gen.cpp | 12 ++++++------ 12 files changed, 80 insertions(+), 15 deletions(-) create mode 100644 xml_converter/integration_tests/test_cases/proto_is_hidden_on_map/input/pack/markers.bin create mode 100644 xml_converter/integration_tests/test_cases/proto_is_hidden_on_map/output_proto/markers.bin create mode 100644 xml_converter/integration_tests/test_cases/proto_is_hidden_on_map/output_xml/xml_file.xml create mode 100644 xml_converter/integration_tests/test_cases/proto_is_hidden_on_map/testcase.yaml create mode 100644 xml_converter/integration_tests/test_cases/xml_render_on_map/input/pack/xml_file.xml create mode 100644 xml_converter/integration_tests/test_cases/xml_render_on_map/output_proto/markers.bin create mode 100644 xml_converter/integration_tests/test_cases/xml_render_on_map/output_xml/xml_file.xml create mode 100644 xml_converter/integration_tests/test_cases/xml_render_on_map/testcase.yaml diff --git a/xml_converter/doc/rendering/render_on_map.md b/xml_converter/doc/rendering/render_on_map.md index a5981c7b..375fb135 100644 --- a/xml_converter/doc/rendering/render_on_map.md +++ b/xml_converter/doc/rendering/render_on_map.md @@ -3,7 +3,14 @@ name: Render on Map type: Boolean applies_to: [Icon, Trail] xml_fields: [MapVisibility, BHMapVisibility] -protobuf_field: tentative__render_on_map +protobuf_field: is_hidden_on_map +custom_functions: + read.xml: + function: inverted_xml_attribute_to_bool + side_effects: [] + write.xml: + function: bool_to_inverted_xml_attribute + side_effects: [] --- Allows or Prevents this object from being rendered on the world map. diff --git a/xml_converter/integration_tests/test_cases/proto_is_hidden_on_map/input/pack/markers.bin b/xml_converter/integration_tests/test_cases/proto_is_hidden_on_map/input/pack/markers.bin new file mode 100644 index 00000000..06a072a0 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/proto_is_hidden_on_map/input/pack/markers.bin @@ -0,0 +1,3 @@ + +D + My Category 2B \Ï)Cf¦RC{ÔWC˜ 2B \Ï)Cf¦RC{ÔWCB(èÌ“^– \ No newline at end of file diff --git a/xml_converter/integration_tests/test_cases/proto_is_hidden_on_map/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/proto_is_hidden_on_map/output_proto/markers.bin new file mode 100644 index 00000000..06a072a0 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/proto_is_hidden_on_map/output_proto/markers.bin @@ -0,0 +1,3 @@ + +D + My Category 2B \Ï)Cf¦RC{ÔWC˜ 2B \Ï)Cf¦RC{ÔWCB(èÌ“^– \ No newline at end of file diff --git a/xml_converter/integration_tests/test_cases/proto_is_hidden_on_map/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/proto_is_hidden_on_map/output_xml/xml_file.xml new file mode 100644 index 00000000..c01df540 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/proto_is_hidden_on_map/output_xml/xml_file.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/xml_converter/integration_tests/test_cases/proto_is_hidden_on_map/testcase.yaml b/xml_converter/integration_tests/test_cases/proto_is_hidden_on_map/testcase.yaml new file mode 100644 index 00000000..d87f4066 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/proto_is_hidden_on_map/testcase.yaml @@ -0,0 +1,5 @@ +input_paths: + "pack": "proto" +expected_stdout: | +expected_stderr: | +expected_returncode: 0 diff --git a/xml_converter/integration_tests/test_cases/xml_render_on_map/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_render_on_map/input/pack/xml_file.xml new file mode 100644 index 00000000..f250afbd --- /dev/null +++ b/xml_converter/integration_tests/test_cases/xml_render_on_map/input/pack/xml_file.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/xml_converter/integration_tests/test_cases/xml_render_on_map/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/xml_render_on_map/output_proto/markers.bin new file mode 100644 index 00000000..7f148a4f --- /dev/null +++ b/xml_converter/integration_tests/test_cases/xml_render_on_map/output_proto/markers.bin @@ -0,0 +1,3 @@ + +Ë + My Category 2B \Ï)Cf¦RC{ÔWC˜ 2B \Ï)Cf¦RC{ÔWC˜ 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC˜ 2B \Ï)Cf¦RC{ÔWC˜ 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWCB(èÌ“^– \ No newline at end of file diff --git a/xml_converter/integration_tests/test_cases/xml_render_on_map/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_render_on_map/output_xml/xml_file.xml new file mode 100644 index 00000000..d9bc1940 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/xml_render_on_map/output_xml/xml_file.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/xml_converter/integration_tests/test_cases/xml_render_on_map/testcase.yaml b/xml_converter/integration_tests/test_cases/xml_render_on_map/testcase.yaml new file mode 100644 index 00000000..9510c793 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/xml_render_on_map/testcase.yaml @@ -0,0 +1,5 @@ +input_paths: + "pack": "xml" +expected_stdout: | +expected_stderr: | +expected_returncode: 0 diff --git a/xml_converter/proto/waypoint.proto b/xml_converter/proto/waypoint.proto index 1a028d79..ddddd635 100644 --- a/xml_converter/proto/waypoint.proto +++ b/xml_converter/proto/waypoint.proto @@ -55,10 +55,10 @@ message Icon { SpecializationFilter specialization_filter = 31; SpeciesFilter species_filter = 32; CullChirality cull_chirality = 33; + bool is_hidden_on_map = 35; float tentative__scale = 2048; bool tentative__render_ingame = 2049; - bool tentative__render_on_map = 2050; bool tentative__render_on_minimap = 2051; string bhdraft__schedule = 2052; float bhdraft__schedule_duration = 2053; @@ -87,9 +87,9 @@ message Trail { SpeciesFilter species_filter = 28; int32 map_display_size = 29; CullChirality cull_chirality = 30; + bool is_hidden_on_map = 32; bool tentative__render_ingame = 2049; - bool tentative__render_on_map = 2050; bool tentative__render_on_minimap = 2051; string bhdraft__schedule = 2052; float bhdraft__schedule_duration = 2053; diff --git a/xml_converter/src/icon_gen.cpp b/xml_converter/src/icon_gen.cpp index 36c87c83..dbdb4f50 100644 --- a/xml_converter/src/icon_gen.cpp +++ b/xml_converter/src/icon_gen.cpp @@ -188,10 +188,10 @@ bool Icon::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectorrender_ingame), &(this->render_ingame_is_set)); } else if (attributename == "mapvisibility") { - xml_attribute_to_bool(attribute, errors, state, &(this->render_on_map), &(this->render_on_map_is_set)); + inverted_xml_attribute_to_bool(attribute, errors, state, &(this->render_on_map), &(this->render_on_map_is_set)); } else if (attributename == "bhmapvisibility") { - xml_attribute_to_bool(attribute, errors, state, &(this->render_on_map), &(this->render_on_map_is_set)); + inverted_xml_attribute_to_bool(attribute, errors, state, &(this->render_on_map), &(this->render_on_map_is_set)); } else if (attributename == "minimapvisibility") { xml_attribute_to_bool(attribute, errors, state, &(this->render_on_minimap), &(this->render_on_minimap_is_set)); @@ -367,7 +367,7 @@ vector Icon::as_xml(XMLWriterState* state) const { xml_node_contents.push_back(bool_to_xml_attribute("IngameVisibility", state, &this->render_ingame)); } if (this->render_on_map_is_set) { - xml_node_contents.push_back(bool_to_xml_attribute("MapVisibility", state, &this->render_on_map)); + xml_node_contents.push_back(bool_to_inverted_xml_attribute("MapVisibility", state, &this->render_on_map)); } if (this->render_on_minimap_is_set) { xml_node_contents.push_back(bool_to_xml_attribute("MinimapVisibility", state, &this->render_on_minimap)); @@ -544,7 +544,7 @@ waypoint::Icon Icon::as_protobuf(ProtoWriterState* state) const { bool_to_proto(this->render_ingame, state, setter); } if (this->render_on_map_is_set) { - std::function setter = [&proto_icon](bool val) { proto_icon.set_tentative__render_on_map(val); }; + std::function setter = [&proto_icon](bool val) { proto_icon.set_is_hidden_on_map(val); }; bool_to_proto(this->render_on_map, state, setter); } if (this->render_on_minimap_is_set) { @@ -698,8 +698,8 @@ void Icon::parse_protobuf(waypoint::Icon proto_icon, ProtoReaderState* state) { if (proto_icon.tentative__render_ingame() != 0) { proto_to_bool(proto_icon.tentative__render_ingame(), state, &(this->render_ingame), &(this->render_ingame_is_set)); } - if (proto_icon.tentative__render_on_map() != 0) { - proto_to_bool(proto_icon.tentative__render_on_map(), state, &(this->render_on_map), &(this->render_on_map_is_set)); + if (proto_icon.is_hidden_on_map() != 0) { + proto_to_bool(proto_icon.is_hidden_on_map(), state, &(this->render_on_map), &(this->render_on_map_is_set)); } if (proto_icon.tentative__render_on_minimap() != 0) { proto_to_bool(proto_icon.tentative__render_on_minimap(), state, &(this->render_on_minimap), &(this->render_on_minimap_is_set)); diff --git a/xml_converter/src/trail_gen.cpp b/xml_converter/src/trail_gen.cpp index a22ff256..1267fd60 100644 --- a/xml_converter/src/trail_gen.cpp +++ b/xml_converter/src/trail_gen.cpp @@ -110,10 +110,10 @@ bool Trail::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectorrender_ingame), &(this->render_ingame_is_set)); } else if (attributename == "mapvisibility") { - xml_attribute_to_bool(attribute, errors, state, &(this->render_on_map), &(this->render_on_map_is_set)); + inverted_xml_attribute_to_bool(attribute, errors, state, &(this->render_on_map), &(this->render_on_map_is_set)); } else if (attributename == "bhmapvisibility") { - xml_attribute_to_bool(attribute, errors, state, &(this->render_on_map), &(this->render_on_map_is_set)); + inverted_xml_attribute_to_bool(attribute, errors, state, &(this->render_on_map), &(this->render_on_map_is_set)); } else if (attributename == "minimapvisibility") { xml_attribute_to_bool(attribute, errors, state, &(this->render_on_minimap), &(this->render_on_minimap_is_set)); @@ -217,7 +217,7 @@ vector Trail::as_xml(XMLWriterState* state) const { xml_node_contents.push_back(bool_to_xml_attribute("IngameVisibility", state, &this->render_ingame)); } if (this->render_on_map_is_set) { - xml_node_contents.push_back(bool_to_xml_attribute("MapVisibility", state, &this->render_on_map)); + xml_node_contents.push_back(bool_to_inverted_xml_attribute("MapVisibility", state, &this->render_on_map)); } if (this->render_on_minimap_is_set) { xml_node_contents.push_back(bool_to_xml_attribute("MinimapVisibility", state, &this->render_on_minimap)); @@ -318,7 +318,7 @@ waypoint::Trail Trail::as_protobuf(ProtoWriterState* state) const { bool_to_proto(this->render_ingame, state, setter); } if (this->render_on_map_is_set) { - std::function setter = [&proto_trail](bool val) { proto_trail.set_tentative__render_on_map(val); }; + std::function setter = [&proto_trail](bool val) { proto_trail.set_is_hidden_on_map(val); }; bool_to_proto(this->render_on_map, state, setter); } if (this->render_on_minimap_is_set) { @@ -408,8 +408,8 @@ void Trail::parse_protobuf(waypoint::Trail proto_trail, ProtoReaderState* state) if (proto_trail.tentative__render_ingame() != 0) { proto_to_bool(proto_trail.tentative__render_ingame(), state, &(this->render_ingame), &(this->render_ingame_is_set)); } - if (proto_trail.tentative__render_on_map() != 0) { - proto_to_bool(proto_trail.tentative__render_on_map(), state, &(this->render_on_map), &(this->render_on_map_is_set)); + if (proto_trail.is_hidden_on_map() != 0) { + proto_to_bool(proto_trail.is_hidden_on_map(), state, &(this->render_on_map), &(this->render_on_map_is_set)); } if (proto_trail.tentative__render_on_minimap() != 0) { proto_to_bool(proto_trail.tentative__render_on_minimap(), state, &(this->render_on_minimap), &(this->render_on_minimap_is_set)); From 93cb8eb75843d6e462ea43002c67094a0bcc540d Mon Sep 17 00:00:00 2001 From: klingbolt Date: Tue, 10 Sep 2024 21:16:47 -0400 Subject: [PATCH 531/539] Changed render_on_minimap to is_hidden_on_minimap --- xml_converter/doc/rendering/render_on_minimap.md | 9 ++++++++- .../input/pack/markers.bin | 3 +++ .../output_proto/markers.bin | 3 +++ .../output_xml/xml_file.xml | 9 +++++++++ .../proto_is_hidden_on_minimap/testcase.yaml | 5 +++++ .../xml_render_on_minimap/input/pack/xml_file.xml | 15 +++++++++++++++ .../output_proto/markers.bin | 3 +++ .../xml_render_on_minimap/output_xml/xml_file.xml | 15 +++++++++++++++ .../xml_render_on_minimap/testcase.yaml | 5 +++++ xml_converter/proto/waypoint.proto | 4 ++-- xml_converter/src/icon_gen.cpp | 12 ++++++------ xml_converter/src/trail_gen.cpp | 12 ++++++------ 12 files changed, 80 insertions(+), 15 deletions(-) create mode 100644 xml_converter/integration_tests/test_cases/proto_is_hidden_on_minimap/input/pack/markers.bin create mode 100644 xml_converter/integration_tests/test_cases/proto_is_hidden_on_minimap/output_proto/markers.bin create mode 100644 xml_converter/integration_tests/test_cases/proto_is_hidden_on_minimap/output_xml/xml_file.xml create mode 100644 xml_converter/integration_tests/test_cases/proto_is_hidden_on_minimap/testcase.yaml create mode 100644 xml_converter/integration_tests/test_cases/xml_render_on_minimap/input/pack/xml_file.xml create mode 100644 xml_converter/integration_tests/test_cases/xml_render_on_minimap/output_proto/markers.bin create mode 100644 xml_converter/integration_tests/test_cases/xml_render_on_minimap/output_xml/xml_file.xml create mode 100644 xml_converter/integration_tests/test_cases/xml_render_on_minimap/testcase.yaml diff --git a/xml_converter/doc/rendering/render_on_minimap.md b/xml_converter/doc/rendering/render_on_minimap.md index 674c1ce4..989d89cb 100644 --- a/xml_converter/doc/rendering/render_on_minimap.md +++ b/xml_converter/doc/rendering/render_on_minimap.md @@ -3,7 +3,14 @@ name: Render on Minimap type: Boolean applies_to: [Icon, Trail] xml_fields: [MinimapVisibility, BHMinimapVisibility] -protobuf_field: tentative__render_on_minimap +protobuf_field: is_hidden_on_minimap +custom_functions: + read.xml: + function: inverted_xml_attribute_to_bool + side_effects: [] + write.xml: + function: bool_to_inverted_xml_attribute + side_effects: [] --- Allows or Prevents this object from being rendered on the minimap aka compass. diff --git a/xml_converter/integration_tests/test_cases/proto_is_hidden_on_minimap/input/pack/markers.bin b/xml_converter/integration_tests/test_cases/proto_is_hidden_on_minimap/input/pack/markers.bin new file mode 100644 index 00000000..9ed559cb --- /dev/null +++ b/xml_converter/integration_tests/test_cases/proto_is_hidden_on_minimap/input/pack/markers.bin @@ -0,0 +1,3 @@ + +D + My Category 2B \Ï)Cf¦RC{ÔWC  2B \Ï)Cf¦RC{ÔWCB(èÌ“^– \ No newline at end of file diff --git a/xml_converter/integration_tests/test_cases/proto_is_hidden_on_minimap/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/proto_is_hidden_on_minimap/output_proto/markers.bin new file mode 100644 index 00000000..9ed559cb --- /dev/null +++ b/xml_converter/integration_tests/test_cases/proto_is_hidden_on_minimap/output_proto/markers.bin @@ -0,0 +1,3 @@ + +D + My Category 2B \Ï)Cf¦RC{ÔWC  2B \Ï)Cf¦RC{ÔWCB(èÌ“^– \ No newline at end of file diff --git a/xml_converter/integration_tests/test_cases/proto_is_hidden_on_minimap/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/proto_is_hidden_on_minimap/output_xml/xml_file.xml new file mode 100644 index 00000000..6078d5fb --- /dev/null +++ b/xml_converter/integration_tests/test_cases/proto_is_hidden_on_minimap/output_xml/xml_file.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/xml_converter/integration_tests/test_cases/proto_is_hidden_on_minimap/testcase.yaml b/xml_converter/integration_tests/test_cases/proto_is_hidden_on_minimap/testcase.yaml new file mode 100644 index 00000000..d87f4066 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/proto_is_hidden_on_minimap/testcase.yaml @@ -0,0 +1,5 @@ +input_paths: + "pack": "proto" +expected_stdout: | +expected_stderr: | +expected_returncode: 0 diff --git a/xml_converter/integration_tests/test_cases/xml_render_on_minimap/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_render_on_minimap/input/pack/xml_file.xml new file mode 100644 index 00000000..9d304131 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/xml_render_on_minimap/input/pack/xml_file.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/xml_converter/integration_tests/test_cases/xml_render_on_minimap/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/xml_render_on_minimap/output_proto/markers.bin new file mode 100644 index 00000000..bc729a68 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/xml_render_on_minimap/output_proto/markers.bin @@ -0,0 +1,3 @@ + +Ë + My Category 2B \Ï)Cf¦RC{ÔWC  2B \Ï)Cf¦RC{ÔWC  2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC  2B \Ï)Cf¦RC{ÔWC  2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWCB(èÌ“^– \ No newline at end of file diff --git a/xml_converter/integration_tests/test_cases/xml_render_on_minimap/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_render_on_minimap/output_xml/xml_file.xml new file mode 100644 index 00000000..3a79c792 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/xml_render_on_minimap/output_xml/xml_file.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/xml_converter/integration_tests/test_cases/xml_render_on_minimap/testcase.yaml b/xml_converter/integration_tests/test_cases/xml_render_on_minimap/testcase.yaml new file mode 100644 index 00000000..9510c793 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/xml_render_on_minimap/testcase.yaml @@ -0,0 +1,5 @@ +input_paths: + "pack": "xml" +expected_stdout: | +expected_stderr: | +expected_returncode: 0 diff --git a/xml_converter/proto/waypoint.proto b/xml_converter/proto/waypoint.proto index 1a028d79..bd4c7bb5 100644 --- a/xml_converter/proto/waypoint.proto +++ b/xml_converter/proto/waypoint.proto @@ -55,11 +55,11 @@ message Icon { SpecializationFilter specialization_filter = 31; SpeciesFilter species_filter = 32; CullChirality cull_chirality = 33; + bool is_hidden_on_minimap = 36; float tentative__scale = 2048; bool tentative__render_ingame = 2049; bool tentative__render_on_map = 2050; - bool tentative__render_on_minimap = 2051; string bhdraft__schedule = 2052; float bhdraft__schedule_duration = 2053; } @@ -87,10 +87,10 @@ message Trail { SpeciesFilter species_filter = 28; int32 map_display_size = 29; CullChirality cull_chirality = 30; + bool is_hidden_on_minimap = 33; bool tentative__render_ingame = 2049; bool tentative__render_on_map = 2050; - bool tentative__render_on_minimap = 2051; string bhdraft__schedule = 2052; float bhdraft__schedule_duration = 2053; } diff --git a/xml_converter/src/icon_gen.cpp b/xml_converter/src/icon_gen.cpp index 36c87c83..29fd8d2a 100644 --- a/xml_converter/src/icon_gen.cpp +++ b/xml_converter/src/icon_gen.cpp @@ -194,10 +194,10 @@ bool Icon::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectorrender_on_map), &(this->render_on_map_is_set)); } else if (attributename == "minimapvisibility") { - xml_attribute_to_bool(attribute, errors, state, &(this->render_on_minimap), &(this->render_on_minimap_is_set)); + inverted_xml_attribute_to_bool(attribute, errors, state, &(this->render_on_minimap), &(this->render_on_minimap_is_set)); } else if (attributename == "bhminimapvisibility") { - xml_attribute_to_bool(attribute, errors, state, &(this->render_on_minimap), &(this->render_on_minimap_is_set)); + inverted_xml_attribute_to_bool(attribute, errors, state, &(this->render_on_minimap), &(this->render_on_minimap_is_set)); } else if (attributename == "behavior") { xml_attribute_to_reset_behavior(attribute, errors, state, &(this->reset_behavior), &(this->reset_behavior_is_set)); @@ -370,7 +370,7 @@ vector Icon::as_xml(XMLWriterState* state) const { xml_node_contents.push_back(bool_to_xml_attribute("MapVisibility", state, &this->render_on_map)); } if (this->render_on_minimap_is_set) { - xml_node_contents.push_back(bool_to_xml_attribute("MinimapVisibility", state, &this->render_on_minimap)); + xml_node_contents.push_back(bool_to_inverted_xml_attribute("MinimapVisibility", state, &this->render_on_minimap)); } if (this->reset_behavior_is_set) { xml_node_contents.push_back(reset_behavior_to_xml_attribute("Behavior", state, &this->reset_behavior)); @@ -548,7 +548,7 @@ waypoint::Icon Icon::as_protobuf(ProtoWriterState* state) const { bool_to_proto(this->render_on_map, state, setter); } if (this->render_on_minimap_is_set) { - std::function setter = [&proto_icon](bool val) { proto_icon.set_tentative__render_on_minimap(val); }; + std::function setter = [&proto_icon](bool val) { proto_icon.set_is_hidden_on_minimap(val); }; bool_to_proto(this->render_on_minimap, state, setter); } if (this->reset_behavior_is_set) { @@ -701,8 +701,8 @@ void Icon::parse_protobuf(waypoint::Icon proto_icon, ProtoReaderState* state) { if (proto_icon.tentative__render_on_map() != 0) { proto_to_bool(proto_icon.tentative__render_on_map(), state, &(this->render_on_map), &(this->render_on_map_is_set)); } - if (proto_icon.tentative__render_on_minimap() != 0) { - proto_to_bool(proto_icon.tentative__render_on_minimap(), state, &(this->render_on_minimap), &(this->render_on_minimap_is_set)); + if (proto_icon.is_hidden_on_minimap() != 0) { + proto_to_bool(proto_icon.is_hidden_on_minimap(), state, &(this->render_on_minimap), &(this->render_on_minimap_is_set)); } if (proto_icon.trigger().reset_behavior() != 0) { proto_to_reset_behavior(proto_icon.trigger().reset_behavior(), state, &(this->reset_behavior), &(this->reset_behavior_is_set)); diff --git a/xml_converter/src/trail_gen.cpp b/xml_converter/src/trail_gen.cpp index a22ff256..b7dba038 100644 --- a/xml_converter/src/trail_gen.cpp +++ b/xml_converter/src/trail_gen.cpp @@ -116,10 +116,10 @@ bool Trail::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectorrender_on_map), &(this->render_on_map_is_set)); } else if (attributename == "minimapvisibility") { - xml_attribute_to_bool(attribute, errors, state, &(this->render_on_minimap), &(this->render_on_minimap_is_set)); + inverted_xml_attribute_to_bool(attribute, errors, state, &(this->render_on_minimap), &(this->render_on_minimap_is_set)); } else if (attributename == "bhminimapvisibility") { - xml_attribute_to_bool(attribute, errors, state, &(this->render_on_minimap), &(this->render_on_minimap_is_set)); + inverted_xml_attribute_to_bool(attribute, errors, state, &(this->render_on_minimap), &(this->render_on_minimap_is_set)); } else if (attributename == "schedule") { xml_attribute_to_string(attribute, errors, state, &(this->schedule), &(this->schedule_is_set)); @@ -220,7 +220,7 @@ vector Trail::as_xml(XMLWriterState* state) const { xml_node_contents.push_back(bool_to_xml_attribute("MapVisibility", state, &this->render_on_map)); } if (this->render_on_minimap_is_set) { - xml_node_contents.push_back(bool_to_xml_attribute("MinimapVisibility", state, &this->render_on_minimap)); + xml_node_contents.push_back(bool_to_inverted_xml_attribute("MinimapVisibility", state, &this->render_on_minimap)); } if (this->schedule_is_set) { xml_node_contents.push_back(string_to_xml_attribute("Schedule", state, &this->schedule)); @@ -322,7 +322,7 @@ waypoint::Trail Trail::as_protobuf(ProtoWriterState* state) const { bool_to_proto(this->render_on_map, state, setter); } if (this->render_on_minimap_is_set) { - std::function setter = [&proto_trail](bool val) { proto_trail.set_tentative__render_on_minimap(val); }; + std::function setter = [&proto_trail](bool val) { proto_trail.set_is_hidden_on_minimap(val); }; bool_to_proto(this->render_on_minimap, state, setter); } if (this->schedule_is_set) { @@ -411,8 +411,8 @@ void Trail::parse_protobuf(waypoint::Trail proto_trail, ProtoReaderState* state) if (proto_trail.tentative__render_on_map() != 0) { proto_to_bool(proto_trail.tentative__render_on_map(), state, &(this->render_on_map), &(this->render_on_map_is_set)); } - if (proto_trail.tentative__render_on_minimap() != 0) { - proto_to_bool(proto_trail.tentative__render_on_minimap(), state, &(this->render_on_minimap), &(this->render_on_minimap_is_set)); + if (proto_trail.is_hidden_on_minimap() != 0) { + proto_to_bool(proto_trail.is_hidden_on_minimap(), state, &(this->render_on_minimap), &(this->render_on_minimap_is_set)); } if (proto_trail.bhdraft__schedule() != "") { proto_to_string(proto_trail.bhdraft__schedule(), state, &(this->schedule), &(this->schedule_is_set)); From a087e5e8f1b24e5601a0a2fa26b903561144a659 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Wed, 11 Sep 2024 00:38:38 -0400 Subject: [PATCH 532/539] Fixed a bug that caused trails to not inherit attributes correctly --- .../xml_inheritance/input/pack/texture_one.png | Bin 0 -> 99 bytes .../xml_inheritance/input/pack/xml_file.xml | 9 +++++++++ .../xml_inheritance/output_proto/markers.bin | Bin 0 -> 58 bytes .../xml_inheritance/output_proto/texture_one.png | Bin 0 -> 99 bytes .../xml_inheritance/output_xml/texture_one.png | Bin 0 -> 99 bytes .../xml_inheritance/output_xml/xml_file.xml | 9 +++++++++ .../test_cases/xml_inheritance/testcase.yaml | 5 +++++ xml_converter/src/packaging_xml.cpp | 2 +- 8 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 xml_converter/integration_tests/test_cases/xml_inheritance/input/pack/texture_one.png create mode 100644 xml_converter/integration_tests/test_cases/xml_inheritance/input/pack/xml_file.xml create mode 100644 xml_converter/integration_tests/test_cases/xml_inheritance/output_proto/markers.bin create mode 100644 xml_converter/integration_tests/test_cases/xml_inheritance/output_proto/texture_one.png create mode 100644 xml_converter/integration_tests/test_cases/xml_inheritance/output_xml/texture_one.png create mode 100644 xml_converter/integration_tests/test_cases/xml_inheritance/output_xml/xml_file.xml create mode 100644 xml_converter/integration_tests/test_cases/xml_inheritance/testcase.yaml diff --git a/xml_converter/integration_tests/test_cases/xml_inheritance/input/pack/texture_one.png b/xml_converter/integration_tests/test_cases/xml_inheritance/input/pack/texture_one.png new file mode 100644 index 0000000000000000000000000000000000000000..392885bb045268983c0e7f9a7151abceeebad090 GIT binary patch literal 99 zcmeAS@N?(olHy`uVBq!ia0vp^+(695$P6SS?92`TDYgKg5ZC`e1_OiRVj+-(gr|#R s2*>s0goK0#i3tLU2?>s_pBy;Z7+9_{gq+!ZHU^~D)78&qol`;+0E~JTx&QzG literal 0 HcmV?d00001 diff --git a/xml_converter/integration_tests/test_cases/xml_inheritance/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_inheritance/input/pack/xml_file.xml new file mode 100644 index 00000000..6d6285d8 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/xml_inheritance/input/pack/xml_file.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/xml_converter/integration_tests/test_cases/xml_inheritance/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/xml_inheritance/output_proto/markers.bin new file mode 100644 index 0000000000000000000000000000000000000000..a1b8ed6bf1c0a5c9eab5ba745754fc357379d58d GIT binary patch literal 58 zcmd;5=Hm9PRB%o#Nlni$s+3|8U{o+t0+UW08ZXYU9hw|BO^88Akc+=0wW6f7C^bGm KFIBG~FC74>V-Q&Y literal 0 HcmV?d00001 diff --git a/xml_converter/integration_tests/test_cases/xml_inheritance/output_proto/texture_one.png b/xml_converter/integration_tests/test_cases/xml_inheritance/output_proto/texture_one.png new file mode 100644 index 0000000000000000000000000000000000000000..392885bb045268983c0e7f9a7151abceeebad090 GIT binary patch literal 99 zcmeAS@N?(olHy`uVBq!ia0vp^+(695$P6SS?92`TDYgKg5ZC`e1_OiRVj+-(gr|#R s2*>s0goK0#i3tLU2?>s_pBy;Z7+9_{gq+!ZHU^~D)78&qol`;+0E~JTx&QzG literal 0 HcmV?d00001 diff --git a/xml_converter/integration_tests/test_cases/xml_inheritance/output_xml/texture_one.png b/xml_converter/integration_tests/test_cases/xml_inheritance/output_xml/texture_one.png new file mode 100644 index 0000000000000000000000000000000000000000..392885bb045268983c0e7f9a7151abceeebad090 GIT binary patch literal 99 zcmeAS@N?(olHy`uVBq!ia0vp^+(695$P6SS?92`TDYgKg5ZC`e1_OiRVj+-(gr|#R s2*>s0goK0#i3tLU2?>s_pBy;Z7+9_{gq+!ZHU^~D)78&qol`;+0E~JTx&QzG literal 0 HcmV?d00001 diff --git a/xml_converter/integration_tests/test_cases/xml_inheritance/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_inheritance/output_xml/xml_file.xml new file mode 100644 index 00000000..c6f53a62 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/xml_inheritance/output_xml/xml_file.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/xml_converter/integration_tests/test_cases/xml_inheritance/testcase.yaml b/xml_converter/integration_tests/test_cases/xml_inheritance/testcase.yaml new file mode 100644 index 00000000..9510c793 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/xml_inheritance/testcase.yaml @@ -0,0 +1,5 @@ +input_paths: + "pack": "xml" +expected_stdout: | +expected_stderr: | +expected_returncode: 0 diff --git a/xml_converter/src/packaging_xml.cpp b/xml_converter/src/packaging_xml.cpp index 3f096b1d..9e235ad2 100644 --- a/xml_converter/src/packaging_xml.cpp +++ b/xml_converter/src/packaging_xml.cpp @@ -168,7 +168,7 @@ vector parse_pois(rapidxml::xml_node<>* root_node, mapicon_attributes.size(); i++) { trail->init_xml_attribute( - categories[category_index]->icon_attributes[i], + categories[category_index]->trail_attributes[i], &ignored_errors, state); } From 7364bd888a2c827e605be21493d672639ffd6868 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Wed, 11 Sep 2024 22:23:11 -0400 Subject: [PATCH 533/539] Previous test worked by accident. Made an addition to a previous test that does similar things --- .../input/pack/texture_one.png | Bin .../input/pack/trail.trl | Bin 0 -> 44 bytes .../input/pack/xml_file.xml | 3 ++- .../output_proto/markers.bin | Bin 159 -> 242 bytes .../output_proto/texture_one.png | Bin .../output_xml/037aa160e392f1c8.trl | Bin 0 -> 44 bytes .../output_xml/texture_one.png | Bin .../output_xml/xml_file.xml | 7 ++++--- .../xml_inheritance/input/pack/xml_file.xml | 9 --------- .../xml_inheritance/output_proto/markers.bin | Bin 58 -> 0 bytes .../xml_inheritance/output_xml/xml_file.xml | 9 --------- .../test_cases/xml_inheritance/testcase.yaml | 5 ----- xml_converter/src/packaging_xml.cpp | 2 +- 13 files changed, 7 insertions(+), 28 deletions(-) rename xml_converter/integration_tests/test_cases/{xml_inheritance => xml_category_inheritance}/input/pack/texture_one.png (100%) create mode 100644 xml_converter/integration_tests/test_cases/xml_category_inheritance/input/pack/trail.trl rename xml_converter/integration_tests/test_cases/{xml_inheritance => xml_category_inheritance}/output_proto/texture_one.png (100%) create mode 100644 xml_converter/integration_tests/test_cases/xml_category_inheritance/output_xml/037aa160e392f1c8.trl rename xml_converter/integration_tests/test_cases/{xml_inheritance => xml_category_inheritance}/output_xml/texture_one.png (100%) delete mode 100644 xml_converter/integration_tests/test_cases/xml_inheritance/input/pack/xml_file.xml delete mode 100644 xml_converter/integration_tests/test_cases/xml_inheritance/output_proto/markers.bin delete mode 100644 xml_converter/integration_tests/test_cases/xml_inheritance/output_xml/xml_file.xml delete mode 100644 xml_converter/integration_tests/test_cases/xml_inheritance/testcase.yaml diff --git a/xml_converter/integration_tests/test_cases/xml_inheritance/input/pack/texture_one.png b/xml_converter/integration_tests/test_cases/xml_category_inheritance/input/pack/texture_one.png similarity index 100% rename from xml_converter/integration_tests/test_cases/xml_inheritance/input/pack/texture_one.png rename to xml_converter/integration_tests/test_cases/xml_category_inheritance/input/pack/texture_one.png diff --git a/xml_converter/integration_tests/test_cases/xml_category_inheritance/input/pack/trail.trl b/xml_converter/integration_tests/test_cases/xml_category_inheritance/input/pack/trail.trl new file mode 100644 index 0000000000000000000000000000000000000000..201ab83c8671d0e579b91b4f4f911c933b6a9de9 GIT binary patch literal 44 ncmZQzU|=u;Vg`l=dmwgTV0Zw;3_!d9L^}eRK>7d>3pfG*cS!~W literal 0 HcmV?d00001 diff --git a/xml_converter/integration_tests/test_cases/xml_category_inheritance/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_category_inheritance/input/pack/xml_file.xml index 108f244a..eb80027f 100644 --- a/xml_converter/integration_tests/test_cases/xml_category_inheritance/input/pack/xml_file.xml +++ b/xml_converter/integration_tests/test_cases/xml_category_inheritance/input/pack/xml_file.xml @@ -1,7 +1,7 @@ - + @@ -17,5 +17,6 @@ + diff --git a/xml_converter/integration_tests/test_cases/xml_category_inheritance/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/xml_category_inheritance/output_proto/markers.bin index 98788ad4502a7215e229ba79f32a38f148cfe7ff..caee33dc1c36d4cbe7e3d3c3da87ddb4d3e362e8 100644 GIT binary patch delta 174 zcmbQw_=$0XPkle5P?=DKl&Aosf{_zHF9X9pCs785IA>XghGou5rXXP}Eg>ETh6Z~E z1_lQpa*zV?fUE^Te852o$a?@}F*q_X2spZe6gqJf=!9Hpz2C7!N&svw7s6a8jvce^ z?ATtBbzX`aD5q}Z#0r*l;?SA2{B4#4pOp}UkRTU-Noqw&X;Er?eqO3xL0&ol1i&gd delta 69 zcmeywIG=HXk6MtBwUE4&u!4~jKQ9BrJtt8HhB#+ghK6O%P87d>3pfG*cS!~W literal 0 HcmV?d00001 diff --git a/xml_converter/integration_tests/test_cases/xml_inheritance/output_xml/texture_one.png b/xml_converter/integration_tests/test_cases/xml_category_inheritance/output_xml/texture_one.png similarity index 100% rename from xml_converter/integration_tests/test_cases/xml_inheritance/output_xml/texture_one.png rename to xml_converter/integration_tests/test_cases/xml_category_inheritance/output_xml/texture_one.png diff --git a/xml_converter/integration_tests/test_cases/xml_category_inheritance/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_category_inheritance/output_xml/xml_file.xml index 95f2e009..ed194efb 100644 --- a/xml_converter/integration_tests/test_cases/xml_category_inheritance/output_xml/xml_file.xml +++ b/xml_converter/integration_tests/test_cases/xml_category_inheritance/output_xml/xml_file.xml @@ -13,8 +13,9 @@ - - - + + + + diff --git a/xml_converter/integration_tests/test_cases/xml_inheritance/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_inheritance/input/pack/xml_file.xml deleted file mode 100644 index 6d6285d8..00000000 --- a/xml_converter/integration_tests/test_cases/xml_inheritance/input/pack/xml_file.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/xml_converter/integration_tests/test_cases/xml_inheritance/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/xml_inheritance/output_proto/markers.bin deleted file mode 100644 index a1b8ed6bf1c0a5c9eab5ba745754fc357379d58d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 58 zcmd;5=Hm9PRB%o#Nlni$s+3|8U{o+t0+UW08ZXYU9hw|BO^88Akc+=0wW6f7C^bGm KFIBG~FC74>V-Q&Y diff --git a/xml_converter/integration_tests/test_cases/xml_inheritance/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_inheritance/output_xml/xml_file.xml deleted file mode 100644 index c6f53a62..00000000 --- a/xml_converter/integration_tests/test_cases/xml_inheritance/output_xml/xml_file.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/xml_converter/integration_tests/test_cases/xml_inheritance/testcase.yaml b/xml_converter/integration_tests/test_cases/xml_inheritance/testcase.yaml deleted file mode 100644 index 9510c793..00000000 --- a/xml_converter/integration_tests/test_cases/xml_inheritance/testcase.yaml +++ /dev/null @@ -1,5 +0,0 @@ -input_paths: - "pack": "xml" -expected_stdout: | -expected_stderr: | -expected_returncode: 0 diff --git a/xml_converter/src/packaging_xml.cpp b/xml_converter/src/packaging_xml.cpp index 9e235ad2..b2806d37 100644 --- a/xml_converter/src/packaging_xml.cpp +++ b/xml_converter/src/packaging_xml.cpp @@ -166,7 +166,7 @@ vector parse_pois(rapidxml::xml_node<>* root_node, mapicon_attributes.size(); i++) { + for (size_t i = 0; i < categories[category_index]->trail_attributes.size(); i++) { trail->init_xml_attribute( categories[category_index]->trail_attributes[i], &ignored_errors, From 7e2596c369f7db0a3f7c58507770a05528f95f7c Mon Sep 17 00:00:00 2001 From: klingbolt Date: Wed, 11 Sep 2024 23:03:22 -0400 Subject: [PATCH 534/539] added tests for trail attributues --- .../input/pack/markers.bin | Bin 70 -> 77 bytes .../output_proto/markers.bin | Bin 70 -> 77 bytes .../output_xml/xml_file.xml | 2 ++ .../xml_render_ingame/input/pack/xml_file.xml | 8 ++++++++ .../xml_render_ingame/output_proto/markers.bin | Bin 206 -> 234 bytes .../xml_render_ingame/output_xml/xml_file.xml | 8 ++++++++ 6 files changed, 18 insertions(+) diff --git a/xml_converter/integration_tests/test_cases/proto_is_hidden_ingame/input/pack/markers.bin b/xml_converter/integration_tests/test_cases/proto_is_hidden_ingame/input/pack/markers.bin index 2416297b28e4d791f7d2c8cad7c2fb3eb0677933..6da03ce875a093b8825ffa346a90fb618aac9788 100644 GIT binary patch delta 26 icmZ?sW#aOl$Ydp`#QcMiQHjBcL*vC6wnLNSrU3v?>IZ)S delta 19 acmeZuW8!j|$YjOk#G&!x4BMf}ank@W4+by* diff --git a/xml_converter/integration_tests/test_cases/proto_is_hidden_ingame/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/proto_is_hidden_ingame/output_proto/markers.bin index 2416297b28e4d791f7d2c8cad7c2fb3eb0677933..6da03ce875a093b8825ffa346a90fb618aac9788 100644 GIT binary patch delta 26 icmZ?sW#aOl$Ydp`#QcMiQHjBcL*vC6wnLNSrU3v?>IZ)S delta 19 acmeZuW8!j|$YjOk#G&!x4BMf}ank@W4+by* diff --git a/xml_converter/integration_tests/test_cases/proto_is_hidden_ingame/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/proto_is_hidden_ingame/output_xml/xml_file.xml index 4ad18f6e..e647bc3e 100644 --- a/xml_converter/integration_tests/test_cases/proto_is_hidden_ingame/output_xml/xml_file.xml +++ b/xml_converter/integration_tests/test_cases/proto_is_hidden_ingame/output_xml/xml_file.xml @@ -5,5 +5,7 @@ + + diff --git a/xml_converter/integration_tests/test_cases/xml_render_ingame/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_render_ingame/input/pack/xml_file.xml index 917be8d6..38e3d973 100644 --- a/xml_converter/integration_tests/test_cases/xml_render_ingame/input/pack/xml_file.xml +++ b/xml_converter/integration_tests/test_cases/xml_render_ingame/input/pack/xml_file.xml @@ -11,5 +11,13 @@ + + + + + + + + diff --git a/xml_converter/integration_tests/test_cases/xml_render_ingame/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/xml_render_ingame/output_proto/markers.bin index 02eeace6709f9224e6975f3db1617a50ec2aa086..f7b462ac56d0e12c371ce25eb55a14820dd42ee8 100644 GIT binary patch delta 49 pcmX@d_==H<>-j{cLuyLQKNuMy1cMR-D$j{S-0pXLtIWA8ZXYU9hw|B4FFbI2xb5P diff --git a/xml_converter/integration_tests/test_cases/xml_render_ingame/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_render_ingame/output_xml/xml_file.xml index c71302b0..92b78696 100644 --- a/xml_converter/integration_tests/test_cases/xml_render_ingame/output_xml/xml_file.xml +++ b/xml_converter/integration_tests/test_cases/xml_render_ingame/output_xml/xml_file.xml @@ -11,5 +11,13 @@ + + + + + + + + From 2f823a72ecb61594e05033e064c5b3da3878c4ab Mon Sep 17 00:00:00 2001 From: klingbolt Date: Wed, 11 Sep 2024 23:28:35 -0400 Subject: [PATCH 535/539] added tests for trail attributues --- .../input/pack/markers.bin | Bin 70 -> 77 bytes .../output_proto/markers.bin | Bin 70 -> 77 bytes .../output_xml/xml_file.xml | 2 ++ .../xml_render_on_map/input/pack/xml_file.xml | 8 ++++++++ .../xml_render_on_map/output_proto/markers.bin | Bin 206 -> 234 bytes .../xml_render_on_map/output_xml/xml_file.xml | 8 ++++++++ 6 files changed, 18 insertions(+) diff --git a/xml_converter/integration_tests/test_cases/proto_is_hidden_on_map/input/pack/markers.bin b/xml_converter/integration_tests/test_cases/proto_is_hidden_on_map/input/pack/markers.bin index 06a072a0e7fda562e6817193284ebc9503b6640b..af452f483ee159d308a1637c605c49c7e3e31189 100644 GIT binary patch delta 26 hcmZ?sW#aOl$Ydp`#N5EdsKnsJq4DAj+o8#E(*Q{D2M7QF delta 19 acmeZuW8!j|$YjOk#G&!x4BMf}ank@W4+by* diff --git a/xml_converter/integration_tests/test_cases/proto_is_hidden_on_map/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/proto_is_hidden_on_map/output_proto/markers.bin index 06a072a0e7fda562e6817193284ebc9503b6640b..af452f483ee159d308a1637c605c49c7e3e31189 100644 GIT binary patch delta 26 hcmZ?sW#aOl$Ydp`#N5EdsKnsJq4DAj+o8#E(*Q{D2M7QF delta 19 acmeZuW8!j|$YjOk#G&!x4BMf}ank@W4+by* diff --git a/xml_converter/integration_tests/test_cases/proto_is_hidden_on_map/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/proto_is_hidden_on_map/output_xml/xml_file.xml index c01df540..d75bf7c1 100644 --- a/xml_converter/integration_tests/test_cases/proto_is_hidden_on_map/output_xml/xml_file.xml +++ b/xml_converter/integration_tests/test_cases/proto_is_hidden_on_map/output_xml/xml_file.xml @@ -5,5 +5,7 @@ + + diff --git a/xml_converter/integration_tests/test_cases/xml_render_on_map/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_render_on_map/input/pack/xml_file.xml index f250afbd..26e0fa9b 100644 --- a/xml_converter/integration_tests/test_cases/xml_render_on_map/input/pack/xml_file.xml +++ b/xml_converter/integration_tests/test_cases/xml_render_on_map/input/pack/xml_file.xml @@ -11,5 +11,13 @@ + + + + + + + + diff --git a/xml_converter/integration_tests/test_cases/xml_render_on_map/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/xml_render_on_map/output_proto/markers.bin index 7f148a4fc5f61858b7abccef49ac0873eaa5fc03..dabc52a20587390ff46756a7afb933d056154242 100644 GIT binary patch delta 49 ocmX@d_==H<>-j{cLuyLQ4NQy>f-0pXLtIWA8ZXYU9hw|B4FFbI2xb5P diff --git a/xml_converter/integration_tests/test_cases/xml_render_on_map/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_render_on_map/output_xml/xml_file.xml index d9bc1940..a797e091 100644 --- a/xml_converter/integration_tests/test_cases/xml_render_on_map/output_xml/xml_file.xml +++ b/xml_converter/integration_tests/test_cases/xml_render_on_map/output_xml/xml_file.xml @@ -11,5 +11,13 @@ + + + + + + + + From ec2f2e966b66f7921a8965c2ee97df5237090b16 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Wed, 11 Sep 2024 23:38:30 -0400 Subject: [PATCH 536/539] added tests for trail attributues --- .../input/pack/markers.bin | Bin 70 -> 77 bytes .../output_proto/markers.bin | Bin 70 -> 77 bytes .../output_xml/xml_file.xml | 2 ++ .../input/pack/xml_file.xml | 8 ++++++++ .../output_proto/markers.bin | Bin 206 -> 234 bytes .../output_xml/xml_file.xml | 8 ++++++++ 6 files changed, 18 insertions(+) diff --git a/xml_converter/integration_tests/test_cases/proto_is_hidden_on_minimap/input/pack/markers.bin b/xml_converter/integration_tests/test_cases/proto_is_hidden_on_minimap/input/pack/markers.bin index 9ed559cba0fa027b1e3a5694a390ee8aa7d588f6..c2170ee298e194123ea9c368151f82439504c6f7 100644 GIT binary patch delta 26 hcmZ?sW#aOl$Ydp`#N5HesKnsJq4DAj+o8#E(*Q|m2M_=N delta 19 acmeZuW8!j|$YjOk#G&!x4BMf}ank@W4+by* diff --git a/xml_converter/integration_tests/test_cases/proto_is_hidden_on_minimap/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/proto_is_hidden_on_minimap/output_proto/markers.bin index 9ed559cba0fa027b1e3a5694a390ee8aa7d588f6..c2170ee298e194123ea9c368151f82439504c6f7 100644 GIT binary patch delta 26 hcmZ?sW#aOl$Ydp`#N5HesKnsJq4DAj+o8#E(*Q|m2M_=N delta 19 acmeZuW8!j|$YjOk#G&!x4BMf}ank@W4+by* diff --git a/xml_converter/integration_tests/test_cases/proto_is_hidden_on_minimap/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/proto_is_hidden_on_minimap/output_xml/xml_file.xml index 6078d5fb..79285a4d 100644 --- a/xml_converter/integration_tests/test_cases/proto_is_hidden_on_minimap/output_xml/xml_file.xml +++ b/xml_converter/integration_tests/test_cases/proto_is_hidden_on_minimap/output_xml/xml_file.xml @@ -5,5 +5,7 @@ + + diff --git a/xml_converter/integration_tests/test_cases/xml_render_on_minimap/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_render_on_minimap/input/pack/xml_file.xml index 9d304131..091c4bf7 100644 --- a/xml_converter/integration_tests/test_cases/xml_render_on_minimap/input/pack/xml_file.xml +++ b/xml_converter/integration_tests/test_cases/xml_render_on_minimap/input/pack/xml_file.xml @@ -11,5 +11,13 @@ + + + + + + + + diff --git a/xml_converter/integration_tests/test_cases/xml_render_on_minimap/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/xml_render_on_minimap/output_proto/markers.bin index bc729a68695244f11bcfa4240a8710a807f1ce36..d121f97becbc6a69e719ff27cf8d7c2f3b835cc2 100644 GIT binary patch delta 49 ocmX@d_==H<>-j{cLuyLQ9ZZZ6f-0pXLtIWA8ZXYU9hw|B4FFbI2xb5P diff --git a/xml_converter/integration_tests/test_cases/xml_render_on_minimap/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_render_on_minimap/output_xml/xml_file.xml index 3a79c792..0109447b 100644 --- a/xml_converter/integration_tests/test_cases/xml_render_on_minimap/output_xml/xml_file.xml +++ b/xml_converter/integration_tests/test_cases/xml_render_on_minimap/output_xml/xml_file.xml @@ -11,5 +11,13 @@ + + + + + + + + From 631ba3c2a691663918aa77507adf17242164c2ab Mon Sep 17 00:00:00 2001 From: klingbolt Date: Thu, 19 Sep 2024 18:41:12 -0400 Subject: [PATCH 537/539] Rearranged test to make trail inheritance a seperate category --- .../input/pack/xml_file.xml | 9 +++++++-- .../output_proto/markers.bin | Bin 242 -> 259 bytes .../output_xml/xml_file.xml | 13 +++++++++---- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/xml_converter/integration_tests/test_cases/xml_category_inheritance/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_category_inheritance/input/pack/xml_file.xml index eb80027f..afa4bc60 100644 --- a/xml_converter/integration_tests/test_cases/xml_category_inheritance/input/pack/xml_file.xml +++ b/xml_converter/integration_tests/test_cases/xml_category_inheritance/input/pack/xml_file.xml @@ -1,14 +1,19 @@ - + + + + + + @@ -17,6 +22,6 @@ - + diff --git a/xml_converter/integration_tests/test_cases/xml_category_inheritance/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/xml_category_inheritance/output_proto/markers.bin index caee33dc1c36d4cbe7e3d3c3da87ddb4d3e362e8..130cd4f639f38efc5a7f548a19216b42e9d61518 100644 GIT binary patch delta 116 zcmeyw*vvG+M=eOmT1Z|>Si#7NpO=B*o|7m8L!7fLL&Gv>CyoN0kSneCJC;cCOK`2zUC{4pVRYgsejnPFwsyf&AqF8qF8-3# RijvZz)cE|oRK0?{bO4geB#r<8 delta 120 zcmZo>`ouWFN4B3)s7xqAN>qSR!N`f9mx1A)lPCj2oU<%L!!qZIi!B2RbV9DQ-tSl< zB>+~!g;3(ev18Vq9os9i&P#EFRumcPw%;Ik595EA6#FG;N^DJ@Ek&(BNM IE67U+0LOJAq5uE@ diff --git a/xml_converter/integration_tests/test_cases/xml_category_inheritance/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_category_inheritance/output_xml/xml_file.xml index ed194efb..68ac4112 100644 --- a/xml_converter/integration_tests/test_cases/xml_category_inheritance/output_xml/xml_file.xml +++ b/xml_converter/integration_tests/test_cases/xml_category_inheritance/output_xml/xml_file.xml @@ -9,13 +9,18 @@ + + + + + - - - - + + + + From 919b5501fb4683b3f27baceab4c0d8e5e22a0a7b Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sat, 21 Sep 2024 22:24:23 -0400 Subject: [PATCH 538/539] Changed the name waypoint to guildpoint --- .github/workflows/diff_protobin.yml | 4 +- CategoryData.gd | 4 +- Icon.gd | 4 +- ImportPackDialog.gd | 4 +- Spatial.gd | 256 +++++++++--------- Trail2D.gd | 6 +- Trail3D.gd | 6 +- waypoint.gd => guildpoint.gd | 190 ++++++------- xml_converter/CMakeLists.txt | 2 +- .../disable_player_cutout.md | 2 +- .../cpp_templates/attribute_template.hpp | 2 +- .../attribute_template_compoundvalue.cpp | 2 +- .../cpp_templates/attribute_template_enum.cpp | 2 +- .../attribute_template_multiflagvalue.cpp | 2 +- .../cpp_templates/class_template.cpp | 6 +- .../cpp_templates/class_template.hpp | 4 +- xml_converter/generators/generate_cpp.py | 4 +- xml_converter/generators/protobuf_types.py | 6 +- xml_converter/integration_tests/run_tests.py | 8 +- .../integration_tests/src/proto_utils.py | 14 +- .../{waypoint.proto => guildpoint.proto} | 4 +- xml_converter/src/attribute/color.cpp | 2 +- xml_converter/src/attribute/color.hpp | 2 +- .../src/attribute/cull_chirality_gen.cpp | 20 +- .../src/attribute/cull_chirality_gen.hpp | 6 +- .../src/attribute/euler_rotation_gen.cpp | 8 +- .../src/attribute/euler_rotation_gen.hpp | 6 +- .../src/attribute/festival_filter_gen.cpp | 8 +- .../src/attribute/festival_filter_gen.hpp | 6 +- .../src/attribute/map_type_filter_gen.cpp | 8 +- .../src/attribute/map_type_filter_gen.hpp | 6 +- .../src/attribute/marker_category.cpp | 10 +- .../src/attribute/marker_category.hpp | 6 +- .../src/attribute/mount_filter_gen.cpp | 8 +- .../src/attribute/mount_filter_gen.hpp | 6 +- xml_converter/src/attribute/position_gen.cpp | 8 +- xml_converter/src/attribute/position_gen.hpp | 6 +- .../src/attribute/profession_filter_gen.cpp | 8 +- .../src/attribute/profession_filter_gen.hpp | 6 +- .../src/attribute/reset_behavior_gen.cpp | 44 +-- .../src/attribute/reset_behavior_gen.hpp | 6 +- .../attribute/specialization_filter_gen.cpp | 8 +- .../attribute/specialization_filter_gen.hpp | 6 +- .../src/attribute/species_filter_gen.cpp | 8 +- .../src/attribute/species_filter_gen.hpp | 6 +- xml_converter/src/attribute/trail_data.cpp | 8 +- xml_converter/src/attribute/trail_data.hpp | 6 +- xml_converter/src/attribute/unique_id.cpp | 2 +- xml_converter/src/attribute/unique_id.hpp | 2 +- xml_converter/src/category_gen.cpp | 8 +- xml_converter/src/category_gen.hpp | 6 +- xml_converter/src/icon_gen.cpp | 34 +-- xml_converter/src/icon_gen.hpp | 6 +- xml_converter/src/packaging_protobin.cpp | 24 +- xml_converter/src/packaging_protobin.hpp | 2 +- .../src/state_structs/proto_reader_state.hpp | 4 +- xml_converter/src/trail_gen.cpp | 24 +- xml_converter/src/trail_gen.hpp | 6 +- xml_converter/src/xml_converter.cpp | 70 ++--- 59 files changed, 471 insertions(+), 471 deletions(-) rename waypoint.gd => guildpoint.gd (96%) rename xml_converter/proto/{waypoint.proto => guildpoint.proto} (99%) diff --git a/.github/workflows/diff_protobin.yml b/.github/workflows/diff_protobin.yml index 86d8ff2a..78dee1e0 100644 --- a/.github/workflows/diff_protobin.yml +++ b/.github/workflows/diff_protobin.yml @@ -27,14 +27,14 @@ jobs: mkdir -p $(dirname "$file") if [ -n "$(git ls-tree "origin/${{ github.base_ref }}" -- "$file")" ]; then git show origin/${{ github.base_ref }}:$file > $file._old - protoc --decode=waypoint.Waypoint xml_converter/proto/waypoint.proto < $file._old > $file.textproto._old + protoc --decode=guildpoint.Guildpoint xml_converter/proto/guildpoint.proto < $file._old > $file.textproto._old else touch $file.textproto._old fi if [ -n "$(git ls-tree "refs/pull/${{ github.event.pull_request.number }}/head" -- "$file")" ]; then git show refs/pull/${{ github.event.pull_request.number }}/head:$file > $file._new - protoc --decode=waypoint.Waypoint xml_converter/proto/waypoint.proto < $file._new > $file.textproto._new + protoc --decode=guildpoint.Guildpoint xml_converter/proto/guildpoint.proto < $file._new > $file.textproto._new else touch $file.textproto._new fi diff --git a/CategoryData.gd b/CategoryData.gd index dfad8d30..3c4a6b04 100644 --- a/CategoryData.gd +++ b/CategoryData.gd @@ -1,6 +1,6 @@ -const Waypoint = preload("res://waypoint.gd") +const Guildpoint = preload("res://guildpoint.gd") var category3d: Spatial var category2d: Node2D -var waypoint_category: Waypoint.Category +var guildpoint_category: Guildpoint.Category var is_visible = false diff --git a/Icon.gd b/Icon.gd index 2c3fa437..f4fc9209 100644 --- a/Icon.gd +++ b/Icon.gd @@ -1,8 +1,8 @@ extends Sprite3D -const Waypoint = preload("res://waypoint.gd") +const Guildpoint = preload("res://guildpoint.gd") -var waypoint: Waypoint.Icon +var guildpoint: Guildpoint.Icon var category: TreeItem func set_icon_image(texture_path: String): diff --git a/ImportPackDialog.gd b/ImportPackDialog.gd index 3db05f00..597bf7da 100644 --- a/ImportPackDialog.gd +++ b/ImportPackDialog.gd @@ -19,7 +19,7 @@ func _on_FileDialog_dir_selected(dir_path: String): FileHandler.create_directory_if_missing(new_path) var args: PoolStringArray = [ "--input-taco-path", dir_path, - "--output-waypoint-path", new_path, - "--output-split-waypoint-path", self.unsaved_markers_dir + "--output-guildpoint-path", new_path, + "--output-split-guildpoint-path", self.unsaved_markers_dir ] FileHandler.call_xml_converter(args) diff --git a/Spatial.gd b/Spatial.gd index 66206751..d31d934a 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -19,7 +19,7 @@ var next_texture_id: int = 0 # will be created. var currently_active_trail3d = null var currently_active_trail2d = null -var currently_active_waypoint_trail = null +var currently_active_guildpoint_trail = null var currently_active_category = null var map_was_open = false @@ -55,7 +55,7 @@ const gizmo_scene = preload("res://Gizmo/PointEdit.tscn") # Scripts containing code used by this scene const CategoryData = preload("res://CategoryData.gd") -const Waypoint = preload("res://waypoint.gd") +const Guildpoint = preload("res://guildpoint.gd") const FileHandler = preload("res://FileHandler.gd") # File path for the the json that contains a hash of the data files @@ -345,15 +345,15 @@ func decode_context_packet(spb: StreamPeerBuffer): print("New Map") var old_texture_path: String = "" old_texture_path = get_texture_path(self.next_texture_id) - if old_map_id != 0 and not read_hash(old_map_id) == make_hash(self.waypoint_data.to_bytes()): + if old_map_id != 0 and not read_hash(old_map_id) == make_hash(self.guildpoint_data.to_bytes()): print("Saving Old Map") save_map_data(old_map_id) print("Loading New Map") - load_waypoint_markers(self.map_id) + load_guildpoint_markers(self.map_id) self.next_texture_id = get_texture_index(old_texture_path) if self.next_texture_id == -1: - self.waypoint_data.add_textures().set_filepath(old_texture_path) - self.next_texture_id = self.waypoint_data.get_textures().size() - 1 + self.guildpoint_data.add_textures().set_filepath(old_texture_path) + self.next_texture_id = self.guildpoint_data.get_textures().size() - 1 reset_minimap_masks() @@ -400,7 +400,7 @@ func reset_3D_minimap_masks(category: Spatial): reset_3D_minimap_masks(subcategory) -var waypoint_data = Waypoint.Waypoint.new() +var guildpoint_data = Guildpoint.Guildpoint.new() # We save the marker data in this directory when the files are have been split # by Map ID. All changes made by the editor are automatically saved in these # files prior to export. @@ -408,21 +408,21 @@ var unsaved_markers_dir = "user://protobin_by_map_id/" var saved_markers_dir = "user://protobin/" var marker_file_path = "" -func load_waypoint_markers(map_id_to_load: int): +func load_guildpoint_markers(map_id_to_load: int): self.marker_file_path = self.unsaved_markers_dir + String(map_id_to_load) + ".bin" - self.waypoint_data = Waypoint.Waypoint.new() + self.guildpoint_data = Guildpoint.Guildpoint.new() clear_map_markers() init_category_tree() var file = File.new() print("Loading protobuf file from path ", self.marker_file_path) file.open(self.marker_file_path, file.READ) var data = file.get_buffer(file.get_len()) - self.waypoint_data.from_bytes(data) - if !Waypoint.PB_ERR.NO_ERRORS: + self.guildpoint_data.from_bytes(data) + if !Guildpoint.PB_ERR.NO_ERRORS: print("OK") else: - print(Waypoint.PB_ERR) - waypoint_categories_to_godot_nodes() + print(Guildpoint.PB_ERR) + guildpoint_categories_to_godot_nodes() ##########Gizmo Stuff########### @@ -510,12 +510,12 @@ func init_category_tree(): -func waypoint_categories_to_godot_nodes(): - for waypoint_category in self.waypoint_data.get_category(): - _waypoint_categories_to_godot_nodes(null, waypoint_category, self.markers_3d, self.markers_2d, false) +func guildpoint_categories_to_godot_nodes(): + for guildpoint_category in self.guildpoint_data.get_category(): + _guildpoint_categories_to_godot_nodes(null, guildpoint_category, self.markers_3d, self.markers_2d, false) -func _waypoint_categories_to_godot_nodes(item: TreeItem, waypoint_category: Waypoint.Category, parent_category3d: Spatial, parent_category2d: Node2D, collapsed: bool): +func _guildpoint_categories_to_godot_nodes(item: TreeItem, guildpoint_category: Guildpoint.Category, parent_category3d: Spatial, parent_category2d: Node2D, collapsed: bool): var godot_category3d = category3d_scene.instance() var godot_category2d = category2d_scene.instance() parent_category3d.add_subcategory(godot_category3d) @@ -523,12 +523,12 @@ func _waypoint_categories_to_godot_nodes(item: TreeItem, waypoint_category: Wayp var category_item: TreeItem = self.markers_ui.create_item(item) var category_data = CategoryData.new() - category_data.waypoint_category = waypoint_category + category_data.guildpoint_category = guildpoint_category category_data.category3d = godot_category3d category_data.category2d = godot_category2d category_item.set_metadata(0, category_data) - var category_name: String = waypoint_category.get_name() + var category_name: String = guildpoint_category.get_name() if category_name == "": print("Category found with no name.") category_name = "No Name" @@ -548,15 +548,15 @@ func _waypoint_categories_to_godot_nodes(item: TreeItem, waypoint_category: Wayp godot_category3d.visible = category_data.is_visible godot_category2d.visible = category_data.is_visible - for trail in waypoint_category.get_trail(): + for trail in guildpoint_category.get_trail(): gen_new_trail(trail, category_item) - for icon in waypoint_category.get_icon(): + for icon in guildpoint_category.get_icon(): gen_new_icon(icon, category_item) - for category_child in waypoint_category.get_children(): - _waypoint_categories_to_godot_nodes(category_item, category_child, godot_category3d, godot_category2d, true) + for category_child in guildpoint_category.get_children(): + _guildpoint_categories_to_godot_nodes(category_item, category_child, godot_category3d, godot_category2d, true) func apply_category_visibility_to_nodes(category_item: TreeItem): @@ -574,17 +574,17 @@ func apply_category_visibility_to_nodes(category_item: TreeItem): category_data.category2d.visible = category_data.is_visible -func gen_new_trail(waypoint_trail: Waypoint.Trail, category_item: TreeItem) -> Array: +func gen_new_trail(guildpoint_trail: Guildpoint.Trail, category_item: TreeItem) -> Array: # Create the texture to use from an image file # TODO: We want to be able to cache this data so that if a texture is used # by multiple objects we only need to keep ony copy of it in memory. #22. # TODO: We want to have two copies of each texture in memory one for 2D # which does not use srgb to render properly, and one for 3D which forces # srgb to render properly. Issue #23. - var texture_id: int = waypoint_trail.get_texture_id() + var texture_id: int = guildpoint_trail.get_texture_id() if texture_id == 0: var category_data = category_item.get_metadata(0) - print("Warning: No texture found in " , category_data.waypoint_category.get_name()) + print("Warning: No texture found in " , category_data.guildpoint_category.get_name()) # TODO(330): Error Textures var texture_path: String = self.unsaved_markers_dir + get_texture_path(texture_id) var texture_file = File.new() @@ -600,7 +600,7 @@ func gen_new_trail(waypoint_trail: Waypoint.Trail, category_item: TreeItem) -> A texture.create_from_image(image, 22) var new_trail3d = trail3d_scene.instance() - new_trail3d.waypoint = waypoint_trail + new_trail3d.guildpoint = guildpoint_trail new_trail3d.refresh_mesh() new_trail3d.set_texture(texture) var category_data = category_item.get_metadata(0) @@ -611,29 +611,29 @@ func gen_new_trail(waypoint_trail: Waypoint.Trail, category_item: TreeItem) -> A var new_trail2d = trail2d_scene.instance() var points_2d := PoolVector2Array() new_trail2d.texture = texture - new_trail2d.waypoint = waypoint_trail + new_trail2d.guildpoint = guildpoint_trail new_trail2d.refresh_points() category_data.category2d.add_trail2d(new_trail2d) return [new_trail3d, new_trail2d] -func gen_new_icon(waypoint_icon: Waypoint.Icon, category_item: TreeItem): - var texture_id: int = waypoint_icon.get_texture_id() +func gen_new_icon(guildpoint_icon: Guildpoint.Icon, category_item: TreeItem): + var texture_id: int = guildpoint_icon.get_texture_id() if texture_id == 0: var category_data = category_item.get_metadata(0) - print("Warning: No texture found in " , category_data.waypoint_category.get_name()) + print("Warning: No texture found in " , category_data.guildpoint_category.get_name()) # TODO(330) Error Textures var texture_path: String = self.unsaved_markers_dir + get_texture_path(texture_id) - var position = waypoint_icon.get_position() + var position = guildpoint_icon.get_position() if position == null: var category_data = category_item.get_metadata(0) - print("Warning: No position found for icon ", category_data.waypoint_category.get_name()) + print("Warning: No position found for icon ", category_data.guildpoint_category.get_name()) return var position_vector = Vector3(position.get_x(), position.get_y(), -position.get_z()) var new_icon = icon_scene.instance() new_icon.translation = position_vector new_icon.set_icon_image(texture_path) - new_icon.waypoint = waypoint_icon + new_icon.guildpoint = guildpoint_icon var category_data = category_item.get_metadata(0) category_data.category3d.add_icon(new_icon) @@ -641,7 +641,7 @@ func gen_new_icon(waypoint_icon: Waypoint.Icon, category_item: TreeItem): # Section of functions for saving data to file ################################################################################ func save_map_data(map_id: int): - var packed_bytes = self.waypoint_data.to_bytes() + var packed_bytes = self.guildpoint_data.to_bytes() var file = File.new() file.open(self.marker_file_path, file.WRITE) file.store_buffer(packed_bytes) @@ -695,15 +695,15 @@ func gen_adjustment_nodes(): if self.currently_active_category == null: print("No category selected") return - var waypoint_category = self.currently_active_category.get_metadata(0).waypoint_category + var guildpoint_category = self.currently_active_category.get_metadata(0).guildpoint_category var category3d = self.currently_active_category.get_metadata(0).category3d var category2d = self.currently_active_category.get_metadata(0).category2d - for trail_index in waypoint_category.get_trail().size(): - var waypoint_trail = waypoint_category.get_trail()[trail_index] + for trail_index in guildpoint_category.get_trail().size(): + var guildpoint_trail = guildpoint_category.get_trail()[trail_index] var trail3d = category3d.trails3d[trail_index] var trail2d = category2d.trails2d[trail_index] - for point_index in get_trail_point_count(waypoint_trail): - var gizmo_position = get_trail_point_position(waypoint_trail, point_index) + for point_index in get_trail_point_count(guildpoint_trail): + var gizmo_position = get_trail_point_position(guildpoint_trail, point_index) # Simplistic cull to prevent nodes that are too far away to be # visible from being created. Additional work can be done here # if this is not enough of an optimization in the future. @@ -711,24 +711,24 @@ func gen_adjustment_nodes(): continue var new_gizmo = gizmo_scene.instance() new_gizmo.translation = gizmo_position - new_gizmo.connect("selected", self, "on_trail_gizmo_selected", [waypoint_trail, trail3d, trail2d, point_index]) + new_gizmo.connect("selected", self, "on_trail_gizmo_selected", [guildpoint_trail, trail3d, trail2d, point_index]) new_gizmo.connect("deselected", self, "on_gizmo_deselected") - new_gizmo.connect("updated", self, "set_trail_point_position", [waypoint_trail, trail3d, trail2d, point_index]) + new_gizmo.connect("updated", self, "set_trail_point_position", [guildpoint_trail, trail3d, trail2d, point_index]) $Gizmos.add_child(new_gizmo) - for icon_index in waypoint_category.get_icon().size(): - var waypoint_icon = waypoint_category.get_icon()[icon_index] + for icon_index in guildpoint_category.get_icon().size(): + var guildpoint_icon = guildpoint_category.get_icon()[icon_index] var icon = category3d.icons[icon_index] var new_gizmo = gizmo_scene.instance() - new_gizmo.translation = get_icon_position(waypoint_icon) - new_gizmo.connect("selected", self, "on_icon_gizmo_selected", [waypoint_icon, icon]) + new_gizmo.translation = get_icon_position(guildpoint_icon) + new_gizmo.connect("selected", self, "on_icon_gizmo_selected", [guildpoint_icon, icon]) new_gizmo.connect("deselected", self, "on_gizmo_deselected") - new_gizmo.connect("updated", self, "set_icon_position", [waypoint_icon, icon]) + new_gizmo.connect("updated", self, "set_icon_position", [guildpoint_icon, icon]) $Gizmos.add_child(new_gizmo) var currently_selected_gizmo = null var currently_selected_icon = null -var currently_selected_waypoint_icon = null -var currently_selected_waypoint_trail = null +var currently_selected_guildpoint_icon = null +var currently_selected_guildpoint_trail = null var currently_selected_trail3d = null var currently_selected_trail2d = null var currently_selected_point_index = null @@ -736,19 +736,19 @@ var currently_selected_point_index = null func set_2D_position_from_3D_point(position: Vector3, trail2d: Line2D, index: int): trail2d.set_point_position(index, Vector2(position.x, position.z)) -func on_icon_gizmo_selected(object: Spatial, waypoint_icon: Waypoint.Icon, icon: Sprite3D): +func on_icon_gizmo_selected(object: Spatial, guildpoint_icon: Guildpoint.Icon, icon: Sprite3D): self.currently_selected_gizmo = object self.currently_selected_icon = icon - self.currently_selected_waypoint_icon = waypoint_icon + self.currently_selected_guildpoint_icon = guildpoint_icon $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/DeleteNode.disabled = false $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/SnapSelectedToPlayer.disabled = false $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/XZSnapToPlayer.disabled = false $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/YSnapToPlayer.disabled = false -func on_trail_gizmo_selected(object: Spatial, waypoint_trail: Waypoint.Trail, trail3d: Spatial, trail2d: Line2D, point_index: int): +func on_trail_gizmo_selected(object: Spatial, guildpoint_trail: Guildpoint.Trail, trail3d: Spatial, trail2d: Line2D, point_index: int): self.currently_selected_gizmo = object - self.currently_selected_waypoint_trail = waypoint_trail + self.currently_selected_guildpoint_trail = guildpoint_trail self.currently_selected_trail3d = trail3d self.currently_selected_trail2d = trail2d self.currently_selected_point_index = point_index @@ -764,8 +764,8 @@ func on_trail_gizmo_selected(object: Spatial, waypoint_trail: Waypoint.Trail, tr func on_gizmo_deselected(): self.currently_selected_gizmo = null self.currently_selected_icon = null - self.currently_selected_waypoint_icon = null - self.currently_selected_waypoint_trail = null + self.currently_selected_guildpoint_icon = null + self.currently_selected_guildpoint_trail = null self.currently_selected_trail3d = null self.currently_selected_trail2d = null self.currently_selected_point_index = null @@ -784,85 +784,85 @@ func clear_adjustment_nodes(): child.queue_free() ################################################################################ -# Update Waypoint datum +# Update Guildpoint datum ################################################################################ func get_texture_index(path: String) -> int: if path == "": return 0 - for i in self.waypoint_data.get_textures().size(): - if path == self.waypoint_data.get_textures()[i].get_filepath(): + for i in self.guildpoint_data.get_textures().size(): + if path == self.guildpoint_data.get_textures()[i].get_filepath(): return i return -1 func get_texture_path(texture_id: int) -> String: if texture_id == 0: return "" - if texture_id >= self.waypoint_data.get_textures().size() or texture_id < 0: + if texture_id >= self.guildpoint_data.get_textures().size() or texture_id < 0: toast("Invalid texture index found") # TODO(330): This should return an error texture filepath instead of empty string return "" - return self.waypoint_data.get_textures()[texture_id].get_filepath() + return self.guildpoint_data.get_textures()[texture_id].get_filepath() -func set_icon_position(new_position: Vector3, waypoint_icon: Waypoint.Icon, icon: Sprite3D): - if icon.waypoint != waypoint_icon: - push_error("Desync between Waypoint and Icon") - var position = waypoint_icon.new_position() +func set_icon_position(new_position: Vector3, guildpoint_icon: Guildpoint.Icon, icon: Sprite3D): + if icon.guildpoint != guildpoint_icon: + push_error("Desync between Guildpoint and Icon") + var position = guildpoint_icon.new_position() position.set_x(new_position.x) position.set_y(new_position.y) position.set_z(new_position.z) icon.set_position(new_position) -func remove_icon(waypoint_icon: Waypoint.Icon, icon: Sprite3D): - if icon.waypoint != waypoint_icon: - push_error("Desync between Waypoint and Icon") +func remove_icon(guildpoint_icon: Guildpoint.Icon, icon: Sprite3D): + if icon.guildpoint != guildpoint_icon: + push_error("Desync between Guildpoint and Icon") var category: Node = icon.get_parent() var icon_index: int = category.icons.find(icon) - category.waypoint_category.get_icon().remove(icon_index) + category.guildpoint_category.get_icon().remove(icon_index) category.category3d.remove_icon(icon) -func get_icon_position(waypoint_icon: Waypoint.Icon): +func get_icon_position(guildpoint_icon: Guildpoint.Icon): var position: Vector3 - position[0] = waypoint_icon.get_position().get_x() - position[1] = waypoint_icon.get_position().get_y() - position[2] = -waypoint_icon.get_position().get_z() + position[0] = guildpoint_icon.get_position().get_x() + position[1] = guildpoint_icon.get_position().get_y() + position[2] = -guildpoint_icon.get_position().get_z() return position -func set_trail_point_position(position: Vector3, waypoint_trail: Waypoint.Trail, trail3d: Spatial, trail2d: Line2D, point_index: int): - if trail3d.waypoint != trail2d.waypoint or trail2d.waypoint != waypoint_trail: - push_error("Desync between Waypoint, Trail3D, and Trail2D") - var trail_data = waypoint_trail.get_trail_data() +func set_trail_point_position(position: Vector3, guildpoint_trail: Guildpoint.Trail, trail3d: Spatial, trail2d: Line2D, point_index: int): + if trail3d.guildpoint != trail2d.guildpoint or trail2d.guildpoint != guildpoint_trail: + push_error("Desync between Guildpoint, Trail3D, and Trail2D") + var trail_data = guildpoint_trail.get_trail_data() trail_data.get_points_x()[point_index] = position.x trail_data.get_points_y()[point_index] = position.y trail_data.get_points_z()[point_index] = -position.z refresh_trail3d_points(trail3d) refresh_trail2d_points(trail2d) -func reverse_trail(waypoint_trail: Waypoint.Trail, trail3d: Spatial, trail2d: Line2D): - if trail3d.waypoint != trail2d.waypoint or trail2d.waypoint != waypoint_trail: - push_error("Desync between Waypoint, Trail3D, and Trail2D") - var trail_data = waypoint_trail.get_trail_data() +func reverse_trail(guildpoint_trail: Guildpoint.Trail, trail3d: Spatial, trail2d: Line2D): + if trail3d.guildpoint != trail2d.guildpoint or trail2d.guildpoint != guildpoint_trail: + push_error("Desync between Guildpoint, Trail3D, and Trail2D") + var trail_data = guildpoint_trail.get_trail_data() trail_data.get_points_x().invert() trail_data.get_points_y().invert() trail_data.get_points_z().invert() refresh_trail3d_points(trail3d) refresh_trail2d_points(trail2d) -func get_trail_point_count(waypoint_trail: Waypoint.Trail): - var trail_data = waypoint_trail.get_trail_data() +func get_trail_point_count(guildpoint_trail: Guildpoint.Trail): + var trail_data = guildpoint_trail.get_trail_data() return trail_data.get_points_x().size() -func get_trail_point_position(waypoint_trail: Waypoint.Trail, point_index: int): +func get_trail_point_position(guildpoint_trail: Guildpoint.Trail, point_index: int): var position: Vector3 - var trail_data = waypoint_trail.get_trail_data() + var trail_data = guildpoint_trail.get_trail_data() position[0] = trail_data.get_points_x()[point_index] position[1] = trail_data.get_points_y()[point_index] position[2] = -trail_data.get_points_z()[point_index] return position -func add_trail_point(position: Vector3, waypoint_trail: Waypoint.Trail, trail3d: Spatial, trail2d: Line2D, point_index: int = -1): - if trail3d.waypoint != trail2d.waypoint or trail2d.waypoint != waypoint_trail: - push_error("Desync between Waypoint, Trail3D, and Trail2D") - var trail_data = trail3d.waypoint.get_trail_data() +func add_trail_point(position: Vector3, guildpoint_trail: Guildpoint.Trail, trail3d: Spatial, trail2d: Line2D, point_index: int = -1): + if trail3d.guildpoint != trail2d.guildpoint or trail2d.guildpoint != guildpoint_trail: + push_error("Desync between Guildpoint, Trail3D, and Trail2D") + var trail_data = trail3d.guildpoint.get_trail_data() if point_index == -1: trail_data.get_points_x().append(position.x) trail_data.get_points_y().append(position.y) @@ -874,25 +874,25 @@ func add_trail_point(position: Vector3, waypoint_trail: Waypoint.Trail, trail3d: refresh_trail3d_points(trail3d) refresh_trail2d_points(trail2d) -func remove_trail_point(waypoint_trail: Waypoint.Trail, trail3d: Spatial, trail2d: Line2D, point_index: int): - if trail3d.waypoint != trail2d.waypoint or trail2d.waypoint != waypoint_trail: - push_error("Desync between Waypoint, Trail3D, and Trail2D") - var trail_data = trail3d.waypoint.get_trail_data() +func remove_trail_point(guildpoint_trail: Guildpoint.Trail, trail3d: Spatial, trail2d: Line2D, point_index: int): + if trail3d.guildpoint != trail2d.guildpoint or trail2d.guildpoint != guildpoint_trail: + push_error("Desync between Guildpoint, Trail3D, and Trail2D") + var trail_data = trail3d.guildpoint.get_trail_data() trail_data.get_points_x().remove(point_index) trail_data.get_points_y().remove(point_index) trail_data.get_points_z().remove(point_index) refresh_trail3d_points(trail3d) refresh_trail2d_points(trail2d) -func new_trail_point_after(waypoint_trail: Waypoint.Trail, trail3d: Spatial, trail2d: Line2D, point_index: int): - var start: Vector3 = get_trail_point_position(waypoint_trail, point_index) +func new_trail_point_after(guildpoint_trail: Guildpoint.Trail, trail3d: Spatial, trail2d: Line2D, point_index: int): + var start: Vector3 = get_trail_point_position(guildpoint_trail, point_index) var target_position: Vector3 - if get_trail_point_count(waypoint_trail) > point_index+1: - var end: Vector3 = get_trail_point_position(waypoint_trail, point_index+1) + if get_trail_point_count(guildpoint_trail) > point_index+1: + var end: Vector3 = get_trail_point_position(guildpoint_trail, point_index+1) target_position = ((start-end)/2) + end else: target_position = Vector3(self.player_position.x, self.player_position.y, -self.player_position.z) - add_trail_point(target_position, waypoint_trail, trail3d, trail2d, point_index+1) + add_trail_point(target_position, guildpoint_trail, trail3d, trail2d, point_index+1) func refresh_trail3d_points(trail3d: Spatial): trail3d.refresh_mesh() @@ -968,8 +968,8 @@ func _on_TexturePathOpen_file_selected(path: String): FileHandler.copy_file(path, self.unsaved_markers_dir.plus_file(next_texture_path)) var texture_index = get_texture_index(next_texture_path) if texture_index == -1: - self.waypoint_data.add_textures().set_filepath(next_texture_path) - texture_index = self.waypoint_data.get_textures().size() - 1 + self.guildpoint_data.add_textures().set_filepath(next_texture_path) + texture_index = self.guildpoint_data.get_textures().size() - 1 self.next_texture_id = texture_index @@ -980,20 +980,20 @@ func _on_TexturePathOpen_file_selected(path: String): func _on_NewTrail_pressed(): self.currently_active_trail3d = null self.currently_active_trail2d = null - self.currently_active_waypoint_trail = null + self.currently_active_guildpoint_trail = null ################################################################################ # Create a new icon and give it the texture ################################################################################ func _on_NewIcon_pressed(): - var waypoint_category: Waypoint.Category = self.currently_active_category.get_metadata(0).waypoint_category - var waypoint_icon = waypoint_category.add_icon() - var position = waypoint_icon.new_position() + var guildpoint_category: Guildpoint.Category = self.currently_active_category.get_metadata(0).guildpoint_category + var guildpoint_icon = guildpoint_category.add_icon() + var position = guildpoint_icon.new_position() position.set_x(self.player_position.x) position.set_y(self.player_position.y) position.set_z(-self.player_position.z) - waypoint_icon.set_texture_id(self.next_texture_id) - gen_new_icon(waypoint_icon, self.currently_active_category) + guildpoint_icon.set_texture_id(self.next_texture_id) + gen_new_icon(guildpoint_icon, self.currently_active_category) # A new trail point is created func _on_NewTrailPoint_pressed(): @@ -1001,18 +1001,18 @@ func _on_NewTrailPoint_pressed(): if self.currently_active_category == null: print("No category selected") return - var waypoint_category: Waypoint.Category = self.currently_active_category.get_metadata(0).waypoint_category - var waypoint_trail = waypoint_category.add_trail() - var trail_data = waypoint_trail.new_trail_data() + var guildpoint_category: Guildpoint.Category = self.currently_active_category.get_metadata(0).guildpoint_category + var guildpoint_trail = guildpoint_category.add_trail() + var trail_data = guildpoint_trail.new_trail_data() trail_data.add_points_x(self.player_position.x) trail_data.add_points_y(self.player_position.y) trail_data.add_points_z(-self.player_position.z) - waypoint_trail.set_texture_id(self.next_texture_id) - var new_trails: Array = gen_new_trail(waypoint_trail, self.currently_active_category) + guildpoint_trail.set_texture_id(self.next_texture_id) + var new_trails: Array = gen_new_trail(guildpoint_trail, self.currently_active_category) self.currently_active_trail3d = new_trails[0] self.currently_active_trail2d = new_trails[1] else: - add_trail_point(self.player_position, self.currently_active_waypoint_trail, self.currently_active_trail3d, self.currently_active_trail2d) + add_trail_point(self.player_position, self.currently_active_guildpoint_trail, self.currently_active_trail3d, self.currently_active_trail2d) func _on_NodeEditorDialog_hide(): on_gizmo_deselected() @@ -1021,18 +1021,18 @@ func _on_NodeEditorDialog_hide(): func _on_DeleteNode_pressed(): - if self.currently_selected_waypoint_icon != null: - remove_icon(self.currently_selected_waypoint_icon, self.currently_selected_icon) - if self.currently_selected_waypoint_trail != null : - remove_trail_point(self.currently_selected_waypoint_trail, self.currently_selected_trail3d, self.currently_active_trail2d, self.currently_selected_point_index) + if self.currently_selected_guildpoint_icon != null: + remove_icon(self.currently_selected_guildpoint_icon, self.currently_selected_icon) + if self.currently_selected_guildpoint_trail != null : + remove_trail_point(self.currently_selected_guildpoint_trail, self.currently_selected_trail3d, self.currently_active_trail2d, self.currently_selected_point_index) on_gizmo_deselected() clear_adjustment_nodes() gen_adjustment_nodes() func _on_NewTrailPointAfter_pressed(): - if self.currently_selected_waypoint_trail != null: - new_trail_point_after(self.currently_selected_waypoint_trail, self.currently_selected_trail3d, self.currently_selected_trail2d, self.currently_selected_point_index) + if self.currently_selected_guildpoint_trail != null: + new_trail_point_after(self.currently_selected_guildpoint_trail, self.currently_selected_trail3d, self.currently_selected_trail2d, self.currently_selected_point_index) on_gizmo_deselected() clear_adjustment_nodes() gen_adjustment_nodes() @@ -1062,21 +1062,21 @@ func _on_SnapSelectedToPlayer_pressed(): func _on_SetActiveTrail_pressed(): - self.currently_active_waypoint_trail = self.currently_selected_waypoint_trail + self.currently_active_guildpoint_trail = self.currently_selected_guildpoint_trail self.currently_active_trail3d = self.currently_selected_trail3d self.currently_active_trail2d = self.currently_selected_trail2d func _on_ReverseTrailDirection_pressed(): - if self.currently_selected_waypoint_trail != null: - reverse_trail(self.currently_selected_waypoint_trail, self.currently_selected_trail3d, self.currently_active_trail2d) + if self.currently_selected_guildpoint_trail != null: + reverse_trail(self.currently_selected_guildpoint_trail, self.currently_selected_trail3d, self.currently_active_trail2d) on_gizmo_deselected() clear_adjustment_nodes() gen_adjustment_nodes() func _on_ExitButton_pressed(): - if not read_hash(self.map_id) == make_hash(self.waypoint_data.to_bytes()): + if not read_hash(self.map_id) == make_hash(self.guildpoint_data.to_bytes()): save_map_data(self.map_id) exit_burrito() @@ -1092,7 +1092,7 @@ func _on_MarkersUI_cell_selected(): self.currently_active_category = category_item self.currently_active_trail2d = null self.currently_active_trail3d = null - self.currently_active_waypoint_trail = null + self.currently_active_guildpoint_trail = null on_gizmo_deselected() clear_adjustment_nodes() @@ -1110,19 +1110,19 @@ func _on_ImportPackDialog_dir_selected(dir): var user_data_dir = str(OS.get_user_data_dir()) var args: PoolStringArray = [ "--input-taco-path", dir, - "--input-waypoint-path", ProjectSettings.globalize_path(self.saved_markers_dir), - "--output-waypoint-path", ProjectSettings.globalize_path(self.saved_markers_dir), - "--output-split-waypoint-path", ProjectSettings.globalize_path(self.unsaved_markers_dir) + "--input-guildpoint-path", ProjectSettings.globalize_path(self.saved_markers_dir), + "--output-guildpoint-path", ProjectSettings.globalize_path(self.saved_markers_dir), + "--output-split-guildpoint-path", ProjectSettings.globalize_path(self.unsaved_markers_dir) ] FileHandler.call_xml_converter(args) save_hashes() - load_waypoint_markers(self.map_id) + load_guildpoint_markers(self.map_id) func _on_SaveData_pressed(): var user_data_dir = str(OS.get_user_data_dir()) var args: PoolStringArray = [ - "--input-waypoint-path", ProjectSettings.globalize_path(self.unsaved_markers_dir), - "--output-waypoint-path", ProjectSettings.globalize_path(self.saved_markers_dir), + "--input-guildpoint-path", ProjectSettings.globalize_path(self.unsaved_markers_dir), + "--output-guildpoint-path", ProjectSettings.globalize_path(self.saved_markers_dir), ] FileHandler.call_xml_converter(args) diff --git a/Trail2D.gd b/Trail2D.gd index 00fdd8a5..68bbe284 100644 --- a/Trail2D.gd +++ b/Trail2D.gd @@ -1,11 +1,11 @@ extends Line2D -const Waypoint = preload("res://waypoint.gd") -var waypoint: Waypoint.Trail +const Guildpoint = preload("res://guildpoint.gd") +var guildpoint: Guildpoint.Trail func refresh_points(): var trail_points := PoolVector2Array() - var trail_data = self.waypoint.get_trail_data() + var trail_data = self.guildpoint.get_trail_data() for index in range(0, trail_data.get_points_z().size()): trail_points.append(Vector2(trail_data.get_points_x()[index], -trail_data.get_points_z()[index])) self.points = trail_points diff --git a/Trail3D.gd b/Trail3D.gd index 258ffa74..fa41e410 100644 --- a/Trail3D.gd +++ b/Trail3D.gd @@ -1,17 +1,17 @@ extends Spatial -const Waypoint = preload("res://waypoint.gd") +const Guildpoint = preload("res://guildpoint.gd") var texture_path var color = Color(0.9, 0.1, 0.1) -var waypoint: Waypoint.Trail +var guildpoint: Guildpoint.Trail var category: TreeItem func refresh_mesh(): var tmpMesh = Mesh.new() var i = 0 var last_uv: float = 0.0 - var trail_data = self.waypoint.get_trail_data() + var trail_data = self.guildpoint.get_trail_data() for point_index in range(trail_data.get_points_x().size()-1): var point:Vector3 = Vector3(trail_data.get_points_x()[point_index], trail_data.get_points_y()[point_index], -trail_data.get_points_z()[point_index]) var next_point:Vector3 = Vector3(trail_data.get_points_x()[point_index+1], trail_data.get_points_y()[point_index+1], -trail_data.get_points_z()[point_index+1]) diff --git a/waypoint.gd b/guildpoint.gd similarity index 96% rename from waypoint.gd rename to guildpoint.gd index 00c6e815..83b08f8d 100644 --- a/waypoint.gd +++ b/guildpoint.gd @@ -660,7 +660,7 @@ class PBPacker: ############### USER DATA BEGIN ################ -class Waypoint: +class Guildpoint: func _init(): var service @@ -794,10 +794,10 @@ class Category: service.field = _is_separator data[_is_separator.tag] = service - _default_visibility = PBField.new("default_visibility", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 6, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + _is_hidden = PBField.new("is_hidden", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 6, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) service = PBServiceField.new() - service.field = _default_visibility - data[_default_visibility.tag] = service + service.field = _is_hidden + data[_is_hidden.tag] = service _tip_description = PBField.new("tip_description", PB_DATA_TYPE.STRING, PB_RULE.OPTIONAL, 7, true, DEFAULT_VALUES_3[PB_DATA_TYPE.STRING]) service = PBServiceField.new() @@ -862,14 +862,14 @@ class Category: func set_is_separator(value : bool) -> void: _is_separator.value = value - var _default_visibility: PBField - func get_default_visibility() -> bool: - return _default_visibility.value - func clear_default_visibility() -> void: + var _is_hidden: PBField + func get_is_hidden() -> bool: + return _is_hidden.value + func clear_is_hidden() -> void: data[6].state = PB_SERVICE_STATE.UNFILLED - _default_visibility.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] - func set_default_visibility(value : bool) -> void: - _default_visibility.value = value + _is_hidden.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_is_hidden(value : bool) -> void: + _is_hidden.value = value var _tip_description: PBField func get_tip_description() -> String: @@ -992,10 +992,10 @@ class Icon: service.field = _maximum_size_on_screen data[_maximum_size_on_screen.tag] = service - _scale_on_map_with_zoom = PBField.new("scale_on_map_with_zoom", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 23, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + _constant_size_on_map = PBField.new("constant_size_on_map", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 23, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) service = PBServiceField.new() - service.field = _scale_on_map_with_zoom - data[_scale_on_map_with_zoom.tag] = service + service.field = _constant_size_on_map + data[_constant_size_on_map.tag] = service _tip_description = PBField.new("tip_description", PB_DATA_TYPE.STRING, PB_RULE.OPTIONAL, 24, true, DEFAULT_VALUES_3[PB_DATA_TYPE.STRING]) service = PBServiceField.new() @@ -1053,25 +1053,25 @@ class Icon: service.field = _cull_chirality data[_cull_chirality.tag] = service - _tentative__scale = PBField.new("tentative__scale", PB_DATA_TYPE.FLOAT, PB_RULE.OPTIONAL, 2048, true, DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT]) + _is_hidden_ingame = PBField.new("is_hidden_ingame", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 34, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) service = PBServiceField.new() - service.field = _tentative__scale - data[_tentative__scale.tag] = service + service.field = _is_hidden_ingame + data[_is_hidden_ingame.tag] = service - _tentative__render_ingame = PBField.new("tentative__render_ingame", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 2049, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + _is_hidden_on_map = PBField.new("is_hidden_on_map", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 35, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) service = PBServiceField.new() - service.field = _tentative__render_ingame - data[_tentative__render_ingame.tag] = service + service.field = _is_hidden_on_map + data[_is_hidden_on_map.tag] = service - _tentative__render_on_map = PBField.new("tentative__render_on_map", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 2050, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + _is_hidden_on_minimap = PBField.new("is_hidden_on_minimap", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 36, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) service = PBServiceField.new() - service.field = _tentative__render_on_map - data[_tentative__render_on_map.tag] = service + service.field = _is_hidden_on_minimap + data[_is_hidden_on_minimap.tag] = service - _tentative__render_on_minimap = PBField.new("tentative__render_on_minimap", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 2051, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + _tentative__scale = PBField.new("tentative__scale", PB_DATA_TYPE.FLOAT, PB_RULE.OPTIONAL, 2048, true, DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT]) service = PBServiceField.new() - service.field = _tentative__render_on_minimap - data[_tentative__render_on_minimap.tag] = service + service.field = _tentative__scale + data[_tentative__scale.tag] = service _bhdraft__schedule = PBField.new("bhdraft__schedule", PB_DATA_TYPE.STRING, PB_RULE.OPTIONAL, 2052, true, DEFAULT_VALUES_3[PB_DATA_TYPE.STRING]) service = PBServiceField.new() @@ -1223,14 +1223,14 @@ class Icon: func set_maximum_size_on_screen(value : int) -> void: _maximum_size_on_screen.value = value - var _scale_on_map_with_zoom: PBField - func get_scale_on_map_with_zoom() -> bool: - return _scale_on_map_with_zoom.value - func clear_scale_on_map_with_zoom() -> void: + var _constant_size_on_map: PBField + func get_constant_size_on_map() -> bool: + return _constant_size_on_map.value + func clear_constant_size_on_map() -> void: data[23].state = PB_SERVICE_STATE.UNFILLED - _scale_on_map_with_zoom.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] - func set_scale_on_map_with_zoom(value : bool) -> void: - _scale_on_map_with_zoom.value = value + _constant_size_on_map.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_constant_size_on_map(value : bool) -> void: + _constant_size_on_map.value = value var _tip_description: PBField func get_tip_description() -> String: @@ -1328,6 +1328,33 @@ class Icon: func set_cull_chirality(value) -> void: _cull_chirality.value = value + var _is_hidden_ingame: PBField + func get_is_hidden_ingame() -> bool: + return _is_hidden_ingame.value + func clear_is_hidden_ingame() -> void: + data[34].state = PB_SERVICE_STATE.UNFILLED + _is_hidden_ingame.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_is_hidden_ingame(value : bool) -> void: + _is_hidden_ingame.value = value + + var _is_hidden_on_map: PBField + func get_is_hidden_on_map() -> bool: + return _is_hidden_on_map.value + func clear_is_hidden_on_map() -> void: + data[35].state = PB_SERVICE_STATE.UNFILLED + _is_hidden_on_map.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_is_hidden_on_map(value : bool) -> void: + _is_hidden_on_map.value = value + + var _is_hidden_on_minimap: PBField + func get_is_hidden_on_minimap() -> bool: + return _is_hidden_on_minimap.value + func clear_is_hidden_on_minimap() -> void: + data[36].state = PB_SERVICE_STATE.UNFILLED + _is_hidden_on_minimap.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_is_hidden_on_minimap(value : bool) -> void: + _is_hidden_on_minimap.value = value + var _tentative__scale: PBField func get_tentative__scale() -> float: return _tentative__scale.value @@ -1337,33 +1364,6 @@ class Icon: func set_tentative__scale(value : float) -> void: _tentative__scale.value = value - var _tentative__render_ingame: PBField - func get_tentative__render_ingame() -> bool: - return _tentative__render_ingame.value - func clear_tentative__render_ingame() -> void: - data[2049].state = PB_SERVICE_STATE.UNFILLED - _tentative__render_ingame.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] - func set_tentative__render_ingame(value : bool) -> void: - _tentative__render_ingame.value = value - - var _tentative__render_on_map: PBField - func get_tentative__render_on_map() -> bool: - return _tentative__render_on_map.value - func clear_tentative__render_on_map() -> void: - data[2050].state = PB_SERVICE_STATE.UNFILLED - _tentative__render_on_map.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] - func set_tentative__render_on_map(value : bool) -> void: - _tentative__render_on_map.value = value - - var _tentative__render_on_minimap: PBField - func get_tentative__render_on_minimap() -> bool: - return _tentative__render_on_minimap.value - func clear_tentative__render_on_minimap() -> void: - data[2051].state = PB_SERVICE_STATE.UNFILLED - _tentative__render_on_minimap.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] - func set_tentative__render_on_minimap(value : bool) -> void: - _tentative__render_on_minimap.value = value - var _bhdraft__schedule: PBField func get_bhdraft__schedule() -> String: return _bhdraft__schedule.value @@ -1519,20 +1519,20 @@ class Trail: service.field = _cull_chirality data[_cull_chirality.tag] = service - _tentative__render_ingame = PBField.new("tentative__render_ingame", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 2049, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + _is_hidden_ingame = PBField.new("is_hidden_ingame", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 31, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) service = PBServiceField.new() - service.field = _tentative__render_ingame - data[_tentative__render_ingame.tag] = service + service.field = _is_hidden_ingame + data[_is_hidden_ingame.tag] = service - _tentative__render_on_map = PBField.new("tentative__render_on_map", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 2050, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + _is_hidden_on_map = PBField.new("is_hidden_on_map", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 32, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) service = PBServiceField.new() - service.field = _tentative__render_on_map - data[_tentative__render_on_map.tag] = service + service.field = _is_hidden_on_map + data[_is_hidden_on_map.tag] = service - _tentative__render_on_minimap = PBField.new("tentative__render_on_minimap", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 2051, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + _is_hidden_on_minimap = PBField.new("is_hidden_on_minimap", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 33, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) service = PBServiceField.new() - service.field = _tentative__render_on_minimap - data[_tentative__render_on_minimap.tag] = service + service.field = _is_hidden_on_minimap + data[_is_hidden_on_minimap.tag] = service _bhdraft__schedule = PBField.new("bhdraft__schedule", PB_DATA_TYPE.STRING, PB_RULE.OPTIONAL, 2052, true, DEFAULT_VALUES_3[PB_DATA_TYPE.STRING]) service = PBServiceField.new() @@ -1742,32 +1742,32 @@ class Trail: func set_cull_chirality(value) -> void: _cull_chirality.value = value - var _tentative__render_ingame: PBField - func get_tentative__render_ingame() -> bool: - return _tentative__render_ingame.value - func clear_tentative__render_ingame() -> void: - data[2049].state = PB_SERVICE_STATE.UNFILLED - _tentative__render_ingame.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] - func set_tentative__render_ingame(value : bool) -> void: - _tentative__render_ingame.value = value - - var _tentative__render_on_map: PBField - func get_tentative__render_on_map() -> bool: - return _tentative__render_on_map.value - func clear_tentative__render_on_map() -> void: - data[2050].state = PB_SERVICE_STATE.UNFILLED - _tentative__render_on_map.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] - func set_tentative__render_on_map(value : bool) -> void: - _tentative__render_on_map.value = value - - var _tentative__render_on_minimap: PBField - func get_tentative__render_on_minimap() -> bool: - return _tentative__render_on_minimap.value - func clear_tentative__render_on_minimap() -> void: - data[2051].state = PB_SERVICE_STATE.UNFILLED - _tentative__render_on_minimap.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] - func set_tentative__render_on_minimap(value : bool) -> void: - _tentative__render_on_minimap.value = value + var _is_hidden_ingame: PBField + func get_is_hidden_ingame() -> bool: + return _is_hidden_ingame.value + func clear_is_hidden_ingame() -> void: + data[31].state = PB_SERVICE_STATE.UNFILLED + _is_hidden_ingame.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_is_hidden_ingame(value : bool) -> void: + _is_hidden_ingame.value = value + + var _is_hidden_on_map: PBField + func get_is_hidden_on_map() -> bool: + return _is_hidden_on_map.value + func clear_is_hidden_on_map() -> void: + data[32].state = PB_SERVICE_STATE.UNFILLED + _is_hidden_on_map.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_is_hidden_on_map(value : bool) -> void: + _is_hidden_on_map.value = value + + var _is_hidden_on_minimap: PBField + func get_is_hidden_on_minimap() -> bool: + return _is_hidden_on_minimap.value + func clear_is_hidden_on_minimap() -> void: + data[33].state = PB_SERVICE_STATE.UNFILLED + _is_hidden_on_minimap.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_is_hidden_on_minimap(value : bool) -> void: + _is_hidden_on_minimap.value = value var _bhdraft__schedule: PBField func get_bhdraft__schedule() -> String: diff --git a/xml_converter/CMakeLists.txt b/xml_converter/CMakeLists.txt index 5824ed49..fe1a3ebc 100644 --- a/xml_converter/CMakeLists.txt +++ b/xml_converter/CMakeLists.txt @@ -15,7 +15,7 @@ set(CORE_LIB core_lib) FIND_PACKAGE(Protobuf REQUIRED) INCLUDE_DIRECTORIES(${PROTOBUF_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) -PROTOBUF_GENERATE_CPP(PROTO_SRC PROTO_HEADER proto/waypoint.proto) +PROTOBUF_GENERATE_CPP(PROTO_SRC PROTO_HEADER proto/guildpoint.proto) # Add Dependencies file(GLOB_RECURSE SOURCES "src/*.cpp") diff --git a/xml_converter/doc/disable_player_cutout/disable_player_cutout.md b/xml_converter/doc/disable_player_cutout/disable_player_cutout.md index f2b54cf6..35fb7490 100644 --- a/xml_converter/doc/disable_player_cutout/disable_player_cutout.md +++ b/xml_converter/doc/disable_player_cutout/disable_player_cutout.md @@ -14,7 +14,7 @@ custom_functions: --- A flag to determine if an object can be made transparent when it is possibly occluding the player. -This value is inverted between the waypoint format value of "Disable Player Cutout" and the TacO xml format of "Can Fade" +This value is inverted between the guildpoint format value of "Disable Player Cutout" and the TacO xml format of "Can Fade" Notes diff --git a/xml_converter/generators/cpp_templates/attribute_template.hpp b/xml_converter/generators/cpp_templates/attribute_template.hpp index 9dfb866c..39f5e78c 100644 --- a/xml_converter/generators/cpp_templates/attribute_template.hpp +++ b/xml_converter/generators/cpp_templates/attribute_template.hpp @@ -10,7 +10,7 @@ #include "../state_structs/xml_reader_state.hpp" #include "../state_structs/xml_writer_state.hpp" {% if type == "Enum" %} - #include "waypoint.pb.h" + #include "guildpoint.pb.h" class XMLError; diff --git a/xml_converter/generators/cpp_templates/attribute_template_compoundvalue.cpp b/xml_converter/generators/cpp_templates/attribute_template_compoundvalue.cpp index b7d868ca..9d928085 100644 --- a/xml_converter/generators/cpp_templates/attribute_template_compoundvalue.cpp +++ b/xml_converter/generators/cpp_templates/attribute_template_compoundvalue.cpp @@ -7,7 +7,7 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" -#include "waypoint.pb.h" +#include "guildpoint.pb.h" using namespace std; diff --git a/xml_converter/generators/cpp_templates/attribute_template_enum.cpp b/xml_converter/generators/cpp_templates/attribute_template_enum.cpp index bbf8195e..240b8559 100644 --- a/xml_converter/generators/cpp_templates/attribute_template_enum.cpp +++ b/xml_converter/generators/cpp_templates/attribute_template_enum.cpp @@ -8,7 +8,7 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" -#include "waypoint.pb.h" +#include "guildpoint.pb.h" using namespace std; diff --git a/xml_converter/generators/cpp_templates/attribute_template_multiflagvalue.cpp b/xml_converter/generators/cpp_templates/attribute_template_multiflagvalue.cpp index b45c65c2..7663dcb7 100644 --- a/xml_converter/generators/cpp_templates/attribute_template_multiflagvalue.cpp +++ b/xml_converter/generators/cpp_templates/attribute_template_multiflagvalue.cpp @@ -8,7 +8,7 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" -#include "waypoint.pb.h" +#include "guildpoint.pb.h" using namespace std; diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index cba55e91..b19c20b9 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -100,8 +100,8 @@ vector {{cpp_class}}::as_xml(XMLWriterState* state) const { return xml_node_contents; } -waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf(ProtoWriterState* state) const { - waypoint::{{cpp_class}} proto_{{cpp_class_header}}; +guildpoint::{{cpp_class}} {{cpp_class}}::as_protobuf(ProtoWriterState* state) const { + guildpoint::{{cpp_class}} proto_{{cpp_class_header}}; {% for attribute_variable in attribute_variables %} {% if attribute_variable.is_component == false and attribute_variable.proto_info != None %} if (this->{{attribute_variable.attribute_flag_name}}) { @@ -117,7 +117,7 @@ waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf(ProtoWriterState* state) cons return proto_{{cpp_class_header}}; } -void {{cpp_class}}::parse_protobuf(waypoint::{{cpp_class}} proto_{{cpp_class_header}}, ProtoReaderState* state) { +void {{cpp_class}}::parse_protobuf(guildpoint::{{cpp_class}} proto_{{cpp_class_header}}, ProtoReaderState* state) { {% for attribute_variable in attribute_variables %} {% if attribute_variable.is_component == false and attribute_variable.proto_info != None %} {% if not attribute_variable.proto_info.is_proto_field_scalar %} diff --git a/xml_converter/generators/cpp_templates/class_template.hpp b/xml_converter/generators/cpp_templates/class_template.hpp index 6ff5f12f..9c4616d1 100644 --- a/xml_converter/generators/cpp_templates/class_template.hpp +++ b/xml_converter/generators/cpp_templates/class_template.hpp @@ -35,8 +35,8 @@ class {{cpp_class}} : public Parseable { virtual std::vector as_xml(XMLWriterState* state) const; virtual std::string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, XMLReaderState* state); - waypoint::{{cpp_class}} as_protobuf(ProtoWriterState* state) const; - void parse_protobuf(waypoint::{{cpp_class}} proto_{{cpp_class_header}}, ProtoReaderState* state); + guildpoint::{{cpp_class}} as_protobuf(ProtoWriterState* state) const; + void parse_protobuf(guildpoint::{{cpp_class}} proto_{{cpp_class_header}}, ProtoReaderState* state); {% if attributes_of_type_marker_category %} bool validate_attributes_of_type_marker_category(); {% endif %} diff --git a/xml_converter/generators/generate_cpp.py b/xml_converter/generators/generate_cpp.py index 0f74007a..b23ddc53 100644 --- a/xml_converter/generators/generate_cpp.py +++ b/xml_converter/generators/generate_cpp.py @@ -260,7 +260,7 @@ def generate_cpp_variable_data( cpp_includes.hpp_relative_includes.update([ "rapidxml-1.13/rapidxml.hpp", "parseable.hpp", - "waypoint.pb.h", + "guildpoint.pb.h", "state_structs/xml_reader_state.hpp", ]) cpp_includes.hpp_forward_declarations.update([ @@ -275,7 +275,7 @@ def generate_cpp_variable_data( "rapidxml-1.13/rapidxml.hpp", "string_helper.hpp", "rapid_helpers.hpp", - "waypoint.pb.h", + "guildpoint.pb.h", ]) if (doc_type == "Category"): diff --git a/xml_converter/generators/protobuf_types.py b/xml_converter/generators/protobuf_types.py index a855dffa..1d60c040 100644 --- a/xml_converter/generators/protobuf_types.py +++ b/xml_converter/generators/protobuf_types.py @@ -134,7 +134,7 @@ def proto_to_dict(proto_str): # type: ignore ################################################################################ # Gets all of the field types of the proto. ################################################################################ -with open("../proto/waypoint.proto") as f: +with open("../proto/guildpoint.proto") as f: proto_field_types = proto_to_dict(f.read()) # type: ignore @@ -176,7 +176,7 @@ def get_proto_field_cpp_type(message: str, field: str) -> str: return PROTO_TO_CPP_TYPES[value] # Otherwise assume this is a message or enum and return the qualified path to that instead. - return "waypoint::" + value + return "guildpoint::" + value def get_proto_field_cpp_prototype(message: str, field: str) -> Optional[str]: @@ -186,7 +186,7 @@ def get_proto_field_cpp_prototype(message: str, field: str) -> Optional[str]: return None return "namespace {package} {{\nclass {proto_field_type};\n}}".format( - package="waypoint", + package="guildpoint", proto_field_type=value, ) diff --git a/xml_converter/integration_tests/run_tests.py b/xml_converter/integration_tests/run_tests.py index 64589d29..4d99b9df 100755 --- a/xml_converter/integration_tests/run_tests.py +++ b/xml_converter/integration_tests/run_tests.py @@ -30,11 +30,11 @@ def run_xml_converter( if output_xml: cmd += ["--output-taco-path"] + output_xml if input_proto: - cmd += ["--input-waypoint-path"] + input_proto + cmd += ["--input-guildpoint-path"] + input_proto if output_proto: - cmd += ["--output-waypoint-path"] + output_proto + cmd += ["--output-guildpoint-path"] + output_proto if split_output_proto: - cmd += ["--output-split-waypoint-path"] + [split_output_proto] + cmd += ["--output-split-guildpoint-path"] + [split_output_proto] # Run the C++ program and capture its output result = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) @@ -118,7 +118,7 @@ def rebuild_xml_converter_binary() -> None: ################################################################################ line_patterns_to_ignore = [ r"^Loading taco pack .*$", - r"^Loading waypoint pack .*$", + r"^Loading guildpoint pack .*$", r"^The taco parse function took [0-9]+ milliseconds to run$", r"^The xml write function took [0-9]+ milliseconds to run$", r"^The protobuf read function took [0-9]+ milliseconds to run$", diff --git a/xml_converter/integration_tests/src/proto_utils.py b/xml_converter/integration_tests/src/proto_utils.py index 115689b1..6297fcf6 100644 --- a/xml_converter/integration_tests/src/proto_utils.py +++ b/xml_converter/integration_tests/src/proto_utils.py @@ -13,8 +13,8 @@ def compare_protos( if files_are_equal: return [] - expected_textproto = get_waypoint_textproto(expected_proto_path) - actual_textproto = get_waypoint_textproto(actual_proto_path) + expected_textproto = get_guildpoint_textproto(expected_proto_path) + actual_textproto = get_guildpoint_textproto(actual_proto_path) diff = list(difflib.unified_diff(actual_textproto.split("\n"), expected_textproto.split("\n"), fromfile=actual_proto_path, tofile=expected_proto_path, lineterm="")) @@ -39,14 +39,14 @@ def compare_binary_file(file_path_1: str, file_path_2: str) -> bool: ################################################################################ -# get_waypoint_textproto +# get_guildpoint_textproto # -# Reads a waypoint protobin and returns a stringy textproto value of the +# Reads a guildpoint protobin and returns a stringy textproto value of the # contents of the protobin. This makes it easier to diff the contents but also # can be used to easily inspect the values of the protobin. ################################################################################ -def get_waypoint_textproto(protobin_path: str) -> str: - proto_schema_path = "../proto/waypoint.proto" +def get_guildpoint_textproto(protobin_path: str) -> str: + proto_schema_path = "../proto/guildpoint.proto" proto_schema_basedir = "../proto" if not os.path.exists(protobin_path): @@ -56,7 +56,7 @@ def get_waypoint_textproto(protobin_path: str) -> str: result = subprocess.run( [ "protoc", - "--decode=waypoint.Waypoint", + "--decode=guildpoint.Guildpoint", "--proto_path=" + proto_schema_basedir, proto_schema_path ], diff --git a/xml_converter/proto/waypoint.proto b/xml_converter/proto/guildpoint.proto similarity index 99% rename from xml_converter/proto/waypoint.proto rename to xml_converter/proto/guildpoint.proto index fec043c6..427c8547 100644 --- a/xml_converter/proto/waypoint.proto +++ b/xml_converter/proto/guildpoint.proto @@ -1,8 +1,8 @@ syntax = "proto3"; -package waypoint; +package guildpoint; -message Waypoint { +message Guildpoint { repeated Category category = 1; repeated TextureData textures = 2; } diff --git a/xml_converter/src/attribute/color.cpp b/xml_converter/src/attribute/color.cpp index b4e6d358..637fba90 100644 --- a/xml_converter/src/attribute/color.cpp +++ b/xml_converter/src/attribute/color.cpp @@ -11,7 +11,7 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" -#include "waypoint.pb.h" +#include "guildpoint.pb.h" using namespace std; diff --git a/xml_converter/src/attribute/color.hpp b/xml_converter/src/attribute/color.hpp index 837ffbdd..752f45dc 100644 --- a/xml_converter/src/attribute/color.hpp +++ b/xml_converter/src/attribute/color.hpp @@ -12,7 +12,7 @@ class XMLError; -namespace waypoint { +namespace guildpoint { class RGBAColor; } diff --git a/xml_converter/src/attribute/cull_chirality_gen.cpp b/xml_converter/src/attribute/cull_chirality_gen.cpp index 9d2c9243..6e5b076b 100644 --- a/xml_converter/src/attribute/cull_chirality_gen.cpp +++ b/xml_converter/src/attribute/cull_chirality_gen.cpp @@ -8,7 +8,7 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" -#include "waypoint.pb.h" +#include "guildpoint.pb.h" using namespace std; @@ -56,20 +56,20 @@ string cull_chirality_to_xml_attribute( } void proto_to_cull_chirality( - waypoint::CullChirality input, + guildpoint::CullChirality input, ProtoReaderState*, CullChirality* value, bool* is_set) { switch (input) { - case waypoint::CullChirality::none: + case guildpoint::CullChirality::none: *value = CullChirality::none; *is_set = true; break; - case waypoint::CullChirality::clockwise: + case guildpoint::CullChirality::clockwise: *value = CullChirality::clockwise; *is_set = true; break; - case waypoint::CullChirality::counter_clockwise: + case guildpoint::CullChirality::counter_clockwise: *value = CullChirality::counter_clockwise; *is_set = true; break; @@ -83,19 +83,19 @@ void proto_to_cull_chirality( void cull_chirality_to_proto( CullChirality value, ProtoWriterState*, - std::function setter) { + std::function setter) { switch (value) { case CullChirality::none: - setter(waypoint::CullChirality::none); + setter(guildpoint::CullChirality::none); break; case CullChirality::clockwise: - setter(waypoint::CullChirality::clockwise); + setter(guildpoint::CullChirality::clockwise); break; case CullChirality::counter_clockwise: - setter(waypoint::CullChirality::counter_clockwise); + setter(guildpoint::CullChirality::counter_clockwise); break; default: - setter(waypoint::CullChirality::none); + setter(guildpoint::CullChirality::none); break; } } diff --git a/xml_converter/src/attribute/cull_chirality_gen.hpp b/xml_converter/src/attribute/cull_chirality_gen.hpp index 039bdefd..c50f95dc 100644 --- a/xml_converter/src/attribute/cull_chirality_gen.hpp +++ b/xml_converter/src/attribute/cull_chirality_gen.hpp @@ -9,7 +9,7 @@ #include "../state_structs/proto_writer_state.hpp" #include "../state_structs/xml_reader_state.hpp" #include "../state_structs/xml_writer_state.hpp" -#include "waypoint.pb.h" +#include "guildpoint.pb.h" class XMLError; @@ -31,7 +31,7 @@ std::string cull_chirality_to_xml_attribute( const CullChirality* value); void proto_to_cull_chirality( - waypoint::CullChirality input, + guildpoint::CullChirality input, ProtoReaderState* state, CullChirality* value, bool* is_set); @@ -39,4 +39,4 @@ void proto_to_cull_chirality( void cull_chirality_to_proto( CullChirality value, ProtoWriterState* state, - std::function setter); + std::function setter); diff --git a/xml_converter/src/attribute/euler_rotation_gen.cpp b/xml_converter/src/attribute/euler_rotation_gen.cpp index 8e4a311e..17dc2789 100644 --- a/xml_converter/src/attribute/euler_rotation_gen.cpp +++ b/xml_converter/src/attribute/euler_rotation_gen.cpp @@ -7,7 +7,7 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" -#include "waypoint.pb.h" +#include "guildpoint.pb.h" using namespace std; @@ -45,7 +45,7 @@ string euler_rotation_to_xml_attribute( } void proto_to_euler_rotation( - waypoint::EulerRotation input, + guildpoint::EulerRotation input, ProtoReaderState*, EulerRotation* value, bool* is_set) { @@ -60,8 +60,8 @@ void proto_to_euler_rotation( void euler_rotation_to_proto( EulerRotation value, ProtoWriterState*, - std::function setter) { - waypoint::EulerRotation* proto_euler_rotation = new waypoint::EulerRotation(); + std::function setter) { + guildpoint::EulerRotation* proto_euler_rotation = new guildpoint::EulerRotation(); proto_euler_rotation->set_x(value.x_rotation); proto_euler_rotation->set_y(value.y_rotation); proto_euler_rotation->set_z(value.z_rotation); diff --git a/xml_converter/src/attribute/euler_rotation_gen.hpp b/xml_converter/src/attribute/euler_rotation_gen.hpp index 91f5498c..c11951a8 100644 --- a/xml_converter/src/attribute/euler_rotation_gen.hpp +++ b/xml_converter/src/attribute/euler_rotation_gen.hpp @@ -11,7 +11,7 @@ #include "../state_structs/xml_writer_state.hpp" class XMLError; -namespace waypoint { +namespace guildpoint { class EulerRotation; } @@ -38,7 +38,7 @@ std::string euler_rotation_to_xml_attribute( const EulerRotation* value); void proto_to_euler_rotation( - waypoint::EulerRotation input, + guildpoint::EulerRotation input, ProtoReaderState* state, EulerRotation* value, bool* is_set); @@ -46,4 +46,4 @@ void proto_to_euler_rotation( void euler_rotation_to_proto( EulerRotation value, ProtoWriterState* state, - std::function setter); + std::function setter); diff --git a/xml_converter/src/attribute/festival_filter_gen.cpp b/xml_converter/src/attribute/festival_filter_gen.cpp index 86e44ec3..b21e67f1 100644 --- a/xml_converter/src/attribute/festival_filter_gen.cpp +++ b/xml_converter/src/attribute/festival_filter_gen.cpp @@ -8,7 +8,7 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" -#include "waypoint.pb.h" +#include "guildpoint.pb.h" using namespace std; @@ -95,7 +95,7 @@ string festival_filter_to_xml_attribute( } void proto_to_festival_filter( - waypoint::FestivalFilter input, + guildpoint::FestivalFilter input, ProtoReaderState*, FestivalFilter* value, bool* is_set) { @@ -114,8 +114,8 @@ void proto_to_festival_filter( void festival_filter_to_proto( FestivalFilter value, ProtoWriterState*, - std::function setter) { - waypoint::FestivalFilter* proto_festival_filter = new waypoint::FestivalFilter(); + std::function setter) { + guildpoint::FestivalFilter* proto_festival_filter = new guildpoint::FestivalFilter(); bool should_write = false; proto_festival_filter->set_dragonbash(value.dragonbash); should_write |= value.dragonbash; diff --git a/xml_converter/src/attribute/festival_filter_gen.hpp b/xml_converter/src/attribute/festival_filter_gen.hpp index 42ddc123..da0f4278 100644 --- a/xml_converter/src/attribute/festival_filter_gen.hpp +++ b/xml_converter/src/attribute/festival_filter_gen.hpp @@ -11,7 +11,7 @@ #include "../state_structs/xml_writer_state.hpp" class XMLError; -namespace waypoint { +namespace guildpoint { class FestivalFilter; } @@ -42,7 +42,7 @@ std::string festival_filter_to_xml_attribute( const FestivalFilter* value); void proto_to_festival_filter( - waypoint::FestivalFilter input, + guildpoint::FestivalFilter input, ProtoReaderState* state, FestivalFilter* value, bool* is_set); @@ -50,4 +50,4 @@ void proto_to_festival_filter( void festival_filter_to_proto( FestivalFilter value, ProtoWriterState* state, - std::function setter); + std::function setter); diff --git a/xml_converter/src/attribute/map_type_filter_gen.cpp b/xml_converter/src/attribute/map_type_filter_gen.cpp index 15621c57..7a1f1c04 100644 --- a/xml_converter/src/attribute/map_type_filter_gen.cpp +++ b/xml_converter/src/attribute/map_type_filter_gen.cpp @@ -8,7 +8,7 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" -#include "waypoint.pb.h" +#include "guildpoint.pb.h" using namespace std; @@ -211,7 +211,7 @@ string map_type_filter_to_xml_attribute( } void proto_to_map_type_filter( - waypoint::MapTypeFilter input, + guildpoint::MapTypeFilter input, ProtoReaderState*, MapTypeFilter* value, bool* is_set) { @@ -247,8 +247,8 @@ void proto_to_map_type_filter( void map_type_filter_to_proto( MapTypeFilter value, ProtoWriterState*, - std::function setter) { - waypoint::MapTypeFilter* proto_map_type_filter = new waypoint::MapTypeFilter(); + std::function setter) { + guildpoint::MapTypeFilter* proto_map_type_filter = new guildpoint::MapTypeFilter(); bool should_write = false; proto_map_type_filter->set_unknown_map(value.unknown_map); should_write |= value.unknown_map; diff --git a/xml_converter/src/attribute/map_type_filter_gen.hpp b/xml_converter/src/attribute/map_type_filter_gen.hpp index 05b5d749..c60952c4 100644 --- a/xml_converter/src/attribute/map_type_filter_gen.hpp +++ b/xml_converter/src/attribute/map_type_filter_gen.hpp @@ -11,7 +11,7 @@ #include "../state_structs/xml_writer_state.hpp" class XMLError; -namespace waypoint { +namespace guildpoint { class MapTypeFilter; } @@ -59,7 +59,7 @@ std::string map_type_filter_to_xml_attribute( const MapTypeFilter* value); void proto_to_map_type_filter( - waypoint::MapTypeFilter input, + guildpoint::MapTypeFilter input, ProtoReaderState* state, MapTypeFilter* value, bool* is_set); @@ -67,4 +67,4 @@ void proto_to_map_type_filter( void map_type_filter_to_proto( MapTypeFilter value, ProtoWriterState* state, - std::function setter); + std::function setter); diff --git a/xml_converter/src/attribute/marker_category.cpp b/xml_converter/src/attribute/marker_category.cpp index 36da71e0..5762e292 100644 --- a/xml_converter/src/attribute/marker_category.cpp +++ b/xml_converter/src/attribute/marker_category.cpp @@ -5,7 +5,7 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" -#include "waypoint.pb.h" +#include "guildpoint.pb.h" //////////////////////////////////////////////////////////////////////////////// // parse_marker_category @@ -40,7 +40,7 @@ std::string marker_category_to_xml_attribute( // Parses a marker category from a proto field. //////////////////////////////////////////////////////////////////////////////// void proto_to_marker_category( - waypoint::Category input, + guildpoint::Category input, ProtoReaderState*, MarkerCategory* value, bool* is_set) { @@ -53,13 +53,13 @@ void proto_to_marker_category( //////////////////////////////////////////////////////////////////////////////// // to_proto_marker_category // -// Returns a waypoint::Category so that it can be saved to proto. +// Returns a guildpoint::Category so that it can be saved to proto. //////////////////////////////////////////////////////////////////////////////// void marker_category_to_proto( MarkerCategory value, ProtoWriterState*, - std::function setter) { - waypoint::Category* category = new waypoint::Category(); + std::function setter) { + guildpoint::Category* category = new guildpoint::Category(); category->set_name(value.category); setter(category); } diff --git a/xml_converter/src/attribute/marker_category.hpp b/xml_converter/src/attribute/marker_category.hpp index 4d1d1548..19f2ad52 100644 --- a/xml_converter/src/attribute/marker_category.hpp +++ b/xml_converter/src/attribute/marker_category.hpp @@ -12,7 +12,7 @@ class XMLError; -namespace waypoint { +namespace guildpoint { class Category; } @@ -34,7 +34,7 @@ std::string marker_category_to_xml_attribute( const MarkerCategory* value); void proto_to_marker_category( - waypoint::Category input, + guildpoint::Category input, ProtoReaderState* state, MarkerCategory* value, bool* is_set); @@ -42,4 +42,4 @@ void proto_to_marker_category( void marker_category_to_proto( MarkerCategory value, ProtoWriterState* state, - std::function setter); + std::function setter); diff --git a/xml_converter/src/attribute/mount_filter_gen.cpp b/xml_converter/src/attribute/mount_filter_gen.cpp index 5366b4db..f16a3561 100644 --- a/xml_converter/src/attribute/mount_filter_gen.cpp +++ b/xml_converter/src/attribute/mount_filter_gen.cpp @@ -8,7 +8,7 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" -#include "waypoint.pb.h" +#include "guildpoint.pb.h" using namespace std; @@ -113,7 +113,7 @@ string mount_filter_to_xml_attribute( } void proto_to_mount_filter( - waypoint::MountFilter input, + guildpoint::MountFilter input, ProtoReaderState*, MountFilter* value, bool* is_set) { @@ -135,8 +135,8 @@ void proto_to_mount_filter( void mount_filter_to_proto( MountFilter value, ProtoWriterState*, - std::function setter) { - waypoint::MountFilter* proto_mount_filter = new waypoint::MountFilter(); + std::function setter) { + guildpoint::MountFilter* proto_mount_filter = new guildpoint::MountFilter(); bool should_write = false; proto_mount_filter->set_raptor(value.raptor); should_write |= value.raptor; diff --git a/xml_converter/src/attribute/mount_filter_gen.hpp b/xml_converter/src/attribute/mount_filter_gen.hpp index 6931c27c..45aa0013 100644 --- a/xml_converter/src/attribute/mount_filter_gen.hpp +++ b/xml_converter/src/attribute/mount_filter_gen.hpp @@ -11,7 +11,7 @@ #include "../state_structs/xml_writer_state.hpp" class XMLError; -namespace waypoint { +namespace guildpoint { class MountFilter; } @@ -45,7 +45,7 @@ std::string mount_filter_to_xml_attribute( const MountFilter* value); void proto_to_mount_filter( - waypoint::MountFilter input, + guildpoint::MountFilter input, ProtoReaderState* state, MountFilter* value, bool* is_set); @@ -53,4 +53,4 @@ void proto_to_mount_filter( void mount_filter_to_proto( MountFilter value, ProtoWriterState* state, - std::function setter); + std::function setter); diff --git a/xml_converter/src/attribute/position_gen.cpp b/xml_converter/src/attribute/position_gen.cpp index cf949a23..6256b5d5 100644 --- a/xml_converter/src/attribute/position_gen.cpp +++ b/xml_converter/src/attribute/position_gen.cpp @@ -7,7 +7,7 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" -#include "waypoint.pb.h" +#include "guildpoint.pb.h" using namespace std; @@ -35,7 +35,7 @@ void xml_attribute_to_position( } void proto_to_position( - waypoint::Position input, + guildpoint::Position input, ProtoReaderState*, Position* value, bool* is_set) { @@ -50,8 +50,8 @@ void proto_to_position( void position_to_proto( Position value, ProtoWriterState*, - std::function setter) { - waypoint::Position* proto_position = new waypoint::Position(); + std::function setter) { + guildpoint::Position* proto_position = new guildpoint::Position(); proto_position->set_x(value.x_position); proto_position->set_y(value.y_position); proto_position->set_z(value.z_position); diff --git a/xml_converter/src/attribute/position_gen.hpp b/xml_converter/src/attribute/position_gen.hpp index c4a2c5a5..4db97b31 100644 --- a/xml_converter/src/attribute/position_gen.hpp +++ b/xml_converter/src/attribute/position_gen.hpp @@ -11,7 +11,7 @@ #include "../state_structs/xml_writer_state.hpp" class XMLError; -namespace waypoint { +namespace guildpoint { class Position; } @@ -38,7 +38,7 @@ std::string position_to_xml_attribute( const Position* value); void proto_to_position( - waypoint::Position input, + guildpoint::Position input, ProtoReaderState* state, Position* value, bool* is_set); @@ -46,4 +46,4 @@ void proto_to_position( void position_to_proto( Position value, ProtoWriterState* state, - std::function setter); + std::function setter); diff --git a/xml_converter/src/attribute/profession_filter_gen.cpp b/xml_converter/src/attribute/profession_filter_gen.cpp index 2f8e9eaf..3d424304 100644 --- a/xml_converter/src/attribute/profession_filter_gen.cpp +++ b/xml_converter/src/attribute/profession_filter_gen.cpp @@ -8,7 +8,7 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" -#include "waypoint.pb.h" +#include "guildpoint.pb.h" using namespace std; @@ -106,7 +106,7 @@ string profession_filter_to_xml_attribute( } void proto_to_profession_filter( - waypoint::ProfessionFilter input, + guildpoint::ProfessionFilter input, ProtoReaderState*, ProfessionFilter* value, bool* is_set) { @@ -127,8 +127,8 @@ void proto_to_profession_filter( void profession_filter_to_proto( ProfessionFilter value, ProtoWriterState*, - std::function setter) { - waypoint::ProfessionFilter* proto_profession_filter = new waypoint::ProfessionFilter(); + std::function setter) { + guildpoint::ProfessionFilter* proto_profession_filter = new guildpoint::ProfessionFilter(); bool should_write = false; proto_profession_filter->set_guardian(value.guardian); should_write |= value.guardian; diff --git a/xml_converter/src/attribute/profession_filter_gen.hpp b/xml_converter/src/attribute/profession_filter_gen.hpp index 70ee4575..b9bcaaa3 100644 --- a/xml_converter/src/attribute/profession_filter_gen.hpp +++ b/xml_converter/src/attribute/profession_filter_gen.hpp @@ -11,7 +11,7 @@ #include "../state_structs/xml_writer_state.hpp" class XMLError; -namespace waypoint { +namespace guildpoint { class ProfessionFilter; } @@ -44,7 +44,7 @@ std::string profession_filter_to_xml_attribute( const ProfessionFilter* value); void proto_to_profession_filter( - waypoint::ProfessionFilter input, + guildpoint::ProfessionFilter input, ProtoReaderState* state, ProfessionFilter* value, bool* is_set); @@ -52,4 +52,4 @@ void proto_to_profession_filter( void profession_filter_to_proto( ProfessionFilter value, ProtoWriterState* state, - std::function setter); + std::function setter); diff --git a/xml_converter/src/attribute/reset_behavior_gen.cpp b/xml_converter/src/attribute/reset_behavior_gen.cpp index ec186d1f..af3b16b5 100644 --- a/xml_converter/src/attribute/reset_behavior_gen.cpp +++ b/xml_converter/src/attribute/reset_behavior_gen.cpp @@ -8,7 +8,7 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" -#include "waypoint.pb.h" +#include "guildpoint.pb.h" using namespace std; @@ -146,44 +146,44 @@ string reset_behavior_to_xml_attribute( } void proto_to_reset_behavior( - waypoint::ResetBehavior input, + guildpoint::ResetBehavior input, ProtoReaderState*, ResetBehavior* value, bool* is_set) { switch (input) { - case waypoint::ResetBehavior::always_visible: + case guildpoint::ResetBehavior::always_visible: *value = ResetBehavior::always_visible; *is_set = true; break; - case waypoint::ResetBehavior::map_change: + case guildpoint::ResetBehavior::map_change: *value = ResetBehavior::map_change; *is_set = true; break; - case waypoint::ResetBehavior::daily_reset: + case guildpoint::ResetBehavior::daily_reset: *value = ResetBehavior::daily_reset; *is_set = true; break; - case waypoint::ResetBehavior::never: + case guildpoint::ResetBehavior::never: *value = ResetBehavior::never; *is_set = true; break; - case waypoint::ResetBehavior::timer: + case guildpoint::ResetBehavior::timer: *value = ResetBehavior::timer; *is_set = true; break; - case waypoint::ResetBehavior::map_reset: + case guildpoint::ResetBehavior::map_reset: *value = ResetBehavior::map_reset; *is_set = true; break; - case waypoint::ResetBehavior::instance_change: + case guildpoint::ResetBehavior::instance_change: *value = ResetBehavior::instance_change; *is_set = true; break; - case waypoint::ResetBehavior::daily_reset_per_character: + case guildpoint::ResetBehavior::daily_reset_per_character: *value = ResetBehavior::daily_reset_per_character; *is_set = true; break; - case waypoint::ResetBehavior::weekly_reset: + case guildpoint::ResetBehavior::weekly_reset: *value = ResetBehavior::weekly_reset; *is_set = true; break; @@ -197,37 +197,37 @@ void proto_to_reset_behavior( void reset_behavior_to_proto( ResetBehavior value, ProtoWriterState*, - std::function setter) { + std::function setter) { switch (value) { case ResetBehavior::always_visible: - setter(waypoint::ResetBehavior::always_visible); + setter(guildpoint::ResetBehavior::always_visible); break; case ResetBehavior::map_change: - setter(waypoint::ResetBehavior::map_change); + setter(guildpoint::ResetBehavior::map_change); break; case ResetBehavior::daily_reset: - setter(waypoint::ResetBehavior::daily_reset); + setter(guildpoint::ResetBehavior::daily_reset); break; case ResetBehavior::never: - setter(waypoint::ResetBehavior::never); + setter(guildpoint::ResetBehavior::never); break; case ResetBehavior::timer: - setter(waypoint::ResetBehavior::timer); + setter(guildpoint::ResetBehavior::timer); break; case ResetBehavior::map_reset: - setter(waypoint::ResetBehavior::map_reset); + setter(guildpoint::ResetBehavior::map_reset); break; case ResetBehavior::instance_change: - setter(waypoint::ResetBehavior::instance_change); + setter(guildpoint::ResetBehavior::instance_change); break; case ResetBehavior::daily_reset_per_character: - setter(waypoint::ResetBehavior::daily_reset_per_character); + setter(guildpoint::ResetBehavior::daily_reset_per_character); break; case ResetBehavior::weekly_reset: - setter(waypoint::ResetBehavior::weekly_reset); + setter(guildpoint::ResetBehavior::weekly_reset); break; default: - setter(waypoint::ResetBehavior::always_visible); + setter(guildpoint::ResetBehavior::always_visible); break; } } diff --git a/xml_converter/src/attribute/reset_behavior_gen.hpp b/xml_converter/src/attribute/reset_behavior_gen.hpp index 6e79adfd..2110082b 100644 --- a/xml_converter/src/attribute/reset_behavior_gen.hpp +++ b/xml_converter/src/attribute/reset_behavior_gen.hpp @@ -9,7 +9,7 @@ #include "../state_structs/proto_writer_state.hpp" #include "../state_structs/xml_reader_state.hpp" #include "../state_structs/xml_writer_state.hpp" -#include "waypoint.pb.h" +#include "guildpoint.pb.h" class XMLError; @@ -37,7 +37,7 @@ std::string reset_behavior_to_xml_attribute( const ResetBehavior* value); void proto_to_reset_behavior( - waypoint::ResetBehavior input, + guildpoint::ResetBehavior input, ProtoReaderState* state, ResetBehavior* value, bool* is_set); @@ -45,4 +45,4 @@ void proto_to_reset_behavior( void reset_behavior_to_proto( ResetBehavior value, ProtoWriterState* state, - std::function setter); + std::function setter); diff --git a/xml_converter/src/attribute/specialization_filter_gen.cpp b/xml_converter/src/attribute/specialization_filter_gen.cpp index ffb25509..35638196 100644 --- a/xml_converter/src/attribute/specialization_filter_gen.cpp +++ b/xml_converter/src/attribute/specialization_filter_gen.cpp @@ -8,7 +8,7 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" -#include "waypoint.pb.h" +#include "guildpoint.pb.h" using namespace std; @@ -628,7 +628,7 @@ string specialization_filter_to_xml_attribute( } void proto_to_specialization_filter( - waypoint::SpecializationFilter input, + guildpoint::SpecializationFilter input, ProtoReaderState*, SpecializationFilter* value, bool* is_set) { @@ -712,8 +712,8 @@ void proto_to_specialization_filter( void specialization_filter_to_proto( SpecializationFilter value, ProtoWriterState*, - std::function setter) { - waypoint::SpecializationFilter* proto_specialization_filter = new waypoint::SpecializationFilter(); + std::function setter) { + guildpoint::SpecializationFilter* proto_specialization_filter = new guildpoint::SpecializationFilter(); bool should_write = false; proto_specialization_filter->set_elementalist_tempest(value.elementalist_tempest); should_write |= value.elementalist_tempest; diff --git a/xml_converter/src/attribute/specialization_filter_gen.hpp b/xml_converter/src/attribute/specialization_filter_gen.hpp index 7661117d..0f8398db 100644 --- a/xml_converter/src/attribute/specialization_filter_gen.hpp +++ b/xml_converter/src/attribute/specialization_filter_gen.hpp @@ -11,7 +11,7 @@ #include "../state_structs/xml_writer_state.hpp" class XMLError; -namespace waypoint { +namespace guildpoint { class SpecializationFilter; } @@ -107,7 +107,7 @@ std::string specialization_filter_to_xml_attribute( const SpecializationFilter* value); void proto_to_specialization_filter( - waypoint::SpecializationFilter input, + guildpoint::SpecializationFilter input, ProtoReaderState* state, SpecializationFilter* value, bool* is_set); @@ -115,4 +115,4 @@ void proto_to_specialization_filter( void specialization_filter_to_proto( SpecializationFilter value, ProtoWriterState* state, - std::function setter); + std::function setter); diff --git a/xml_converter/src/attribute/species_filter_gen.cpp b/xml_converter/src/attribute/species_filter_gen.cpp index 1a9f79b3..906e324c 100644 --- a/xml_converter/src/attribute/species_filter_gen.cpp +++ b/xml_converter/src/attribute/species_filter_gen.cpp @@ -8,7 +8,7 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" -#include "waypoint.pb.h" +#include "guildpoint.pb.h" using namespace std; @@ -78,7 +78,7 @@ string species_filter_to_xml_attribute( } void proto_to_species_filter( - waypoint::SpeciesFilter input, + guildpoint::SpeciesFilter input, ProtoReaderState*, SpeciesFilter* value, bool* is_set) { @@ -95,8 +95,8 @@ void proto_to_species_filter( void species_filter_to_proto( SpeciesFilter value, ProtoWriterState*, - std::function setter) { - waypoint::SpeciesFilter* proto_species_filter = new waypoint::SpeciesFilter(); + std::function setter) { + guildpoint::SpeciesFilter* proto_species_filter = new guildpoint::SpeciesFilter(); bool should_write = false; proto_species_filter->set_asura(value.asura); should_write |= value.asura; diff --git a/xml_converter/src/attribute/species_filter_gen.hpp b/xml_converter/src/attribute/species_filter_gen.hpp index 388bf206..14e48e94 100644 --- a/xml_converter/src/attribute/species_filter_gen.hpp +++ b/xml_converter/src/attribute/species_filter_gen.hpp @@ -11,7 +11,7 @@ #include "../state_structs/xml_writer_state.hpp" class XMLError; -namespace waypoint { +namespace guildpoint { class SpeciesFilter; } @@ -40,7 +40,7 @@ std::string species_filter_to_xml_attribute( const SpeciesFilter* value); void proto_to_species_filter( - waypoint::SpeciesFilter input, + guildpoint::SpeciesFilter input, ProtoReaderState* state, SpeciesFilter* value, bool* is_set); @@ -48,4 +48,4 @@ void proto_to_species_filter( void species_filter_to_proto( SpeciesFilter value, ProtoWriterState* state, - std::function setter); + std::function setter); diff --git a/xml_converter/src/attribute/trail_data.cpp b/xml_converter/src/attribute/trail_data.cpp index 341de3c3..f05b4c52 100644 --- a/xml_converter/src/attribute/trail_data.cpp +++ b/xml_converter/src/attribute/trail_data.cpp @@ -13,7 +13,7 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" -#include "waypoint.pb.h" +#include "guildpoint.pb.h" using namespace std; @@ -152,7 +152,7 @@ string trail_data_to_xml_attribute( // Parses a TrailData from a proto field. //////////////////////////////////////////////////////////////////////////////// void proto_to_trail_data( - waypoint::TrailData input, + guildpoint::TrailData input, ProtoReaderState*, TrailData* value, bool* is_set) { @@ -172,8 +172,8 @@ void proto_to_trail_data( void trail_data_to_proto( TrailData value, ProtoWriterState*, - std::function setter) { - waypoint::TrailData* trail_data = new waypoint::TrailData(); + std::function setter) { + guildpoint::TrailData* trail_data = new guildpoint::TrailData(); *trail_data->mutable_points_x() = {value.points_x.begin(), value.points_x.end()}; *trail_data->mutable_points_y() = {value.points_y.begin(), value.points_y.end()}; *trail_data->mutable_points_z() = {value.points_z.begin(), value.points_z.end()}; diff --git a/xml_converter/src/attribute/trail_data.hpp b/xml_converter/src/attribute/trail_data.hpp index 29e96d05..a123f499 100644 --- a/xml_converter/src/attribute/trail_data.hpp +++ b/xml_converter/src/attribute/trail_data.hpp @@ -12,7 +12,7 @@ class XMLError; -namespace waypoint { +namespace guildpoint { class TrailData; } @@ -40,7 +40,7 @@ std::string trail_data_to_xml_attribute( const bool* is_map_id_set); void proto_to_trail_data( - waypoint::TrailData input, + guildpoint::TrailData input, ProtoReaderState* state, TrailData* value, bool* is_set); @@ -48,4 +48,4 @@ void proto_to_trail_data( void trail_data_to_proto( TrailData value, ProtoWriterState* state, - std::function setter); + std::function setter); diff --git a/xml_converter/src/attribute/unique_id.cpp b/xml_converter/src/attribute/unique_id.cpp index 107ec2f8..dfaf8b2c 100644 --- a/xml_converter/src/attribute/unique_id.cpp +++ b/xml_converter/src/attribute/unique_id.cpp @@ -8,7 +8,7 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" -#include "waypoint.pb.h" +#include "guildpoint.pb.h" using namespace std; diff --git a/xml_converter/src/attribute/unique_id.hpp b/xml_converter/src/attribute/unique_id.hpp index e34a7df0..d535a612 100644 --- a/xml_converter/src/attribute/unique_id.hpp +++ b/xml_converter/src/attribute/unique_id.hpp @@ -13,7 +13,7 @@ class XMLError; -namespace waypoint { +namespace guildpoint { class GUID; } diff --git a/xml_converter/src/category_gen.cpp b/xml_converter/src/category_gen.cpp index 90be2254..f53f21d6 100644 --- a/xml_converter/src/category_gen.cpp +++ b/xml_converter/src/category_gen.cpp @@ -8,10 +8,10 @@ #include "attribute/bool.hpp" #include "attribute/string.hpp" +#include "guildpoint.pb.h" #include "rapid_helpers.hpp" #include "rapidxml-1.13/rapidxml.hpp" #include "string_helper.hpp" -#include "waypoint.pb.h" using namespace std; @@ -111,8 +111,8 @@ vector Category::as_xml(XMLWriterState* state) const { return xml_node_contents; } -waypoint::Category Category::as_protobuf(ProtoWriterState* state) const { - waypoint::Category proto_category; +guildpoint::Category Category::as_protobuf(ProtoWriterState* state) const { + guildpoint::Category proto_category; if (this->display_name_is_set) { std::function setter = [&proto_category](std::string val) { proto_category.set_name(val); }; display_name_and_name_to_proto_display_name(this->display_name, state, setter, &(this->name), &(this->name_is_set)); @@ -136,7 +136,7 @@ waypoint::Category Category::as_protobuf(ProtoWriterState* state) const { return proto_category; } -void Category::parse_protobuf(waypoint::Category proto_category, ProtoReaderState* state) { +void Category::parse_protobuf(guildpoint::Category proto_category, ProtoReaderState* state) { if (proto_category.name() != "") { proto_display_name_to_display_name_and_name(proto_category.name(), state, &(this->display_name), &(this->display_name_is_set), &(this->name), &(this->name_is_set)); } diff --git a/xml_converter/src/category_gen.hpp b/xml_converter/src/category_gen.hpp index 3bc738cf..9dd6ce4e 100644 --- a/xml_converter/src/category_gen.hpp +++ b/xml_converter/src/category_gen.hpp @@ -6,12 +6,12 @@ #include #include "attribute/unique_id.hpp" +#include "guildpoint.pb.h" #include "icon_gen.hpp" #include "parseable.hpp" #include "rapidxml-1.13/rapidxml.hpp" #include "state_structs/xml_reader_state.hpp" #include "trail_gen.hpp" -#include "waypoint.pb.h" class XMLError; @@ -38,6 +38,6 @@ class Category : public Parseable { virtual std::vector as_xml(XMLWriterState* state) const; virtual std::string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, XMLReaderState* state); - waypoint::Category as_protobuf(ProtoWriterState* state) const; - void parse_protobuf(waypoint::Category proto_category, ProtoReaderState* state); + guildpoint::Category as_protobuf(ProtoWriterState* state) const; + void parse_protobuf(guildpoint::Category proto_category, ProtoReaderState* state); }; diff --git a/xml_converter/src/icon_gen.cpp b/xml_converter/src/icon_gen.cpp index a74ab840..ea4817b0 100644 --- a/xml_converter/src/icon_gen.cpp +++ b/xml_converter/src/icon_gen.cpp @@ -8,10 +8,10 @@ #include "attribute/float.hpp" #include "attribute/int.hpp" #include "attribute/string.hpp" +#include "guildpoint.pb.h" #include "rapid_helpers.hpp" #include "rapidxml-1.13/rapidxml.hpp" #include "string_helper.hpp" -#include "waypoint.pb.h" using namespace std; @@ -409,8 +409,8 @@ vector Icon::as_xml(XMLWriterState* state) const { return xml_node_contents; } -waypoint::Icon Icon::as_protobuf(ProtoWriterState* state) const { - waypoint::Icon proto_icon; +guildpoint::Icon Icon::as_protobuf(ProtoWriterState* state) const { + guildpoint::Icon proto_icon; if (this->achievement_bit_index_is_set) { std::function setter = [&proto_icon](int val) { proto_icon.set_achievement_bit_index(val); }; int_to_proto(this->achievement_bit_index, state, setter); @@ -452,7 +452,7 @@ waypoint::Icon Icon::as_protobuf(ProtoWriterState* state) const { string_to_proto(this->copy_message, state, setter); } if (this->cull_chirality_is_set) { - std::function setter = [&proto_icon](waypoint::CullChirality val) { proto_icon.set_cull_chirality(val); }; + std::function setter = [&proto_icon](guildpoint::CullChirality val) { proto_icon.set_cull_chirality(val); }; cull_chirality_to_proto(this->cull_chirality, state, setter); } if (this->disable_player_cutout_is_set) { @@ -468,11 +468,11 @@ waypoint::Icon Icon::as_protobuf(ProtoWriterState* state) const { float_to_proto(this->distance_fade_start, state, setter); } if (this->euler_rotation_is_set) { - std::function setter = [&proto_icon](waypoint::EulerRotation* val) { proto_icon.set_allocated_euler_rotation(val); }; + std::function setter = [&proto_icon](guildpoint::EulerRotation* val) { proto_icon.set_allocated_euler_rotation(val); }; euler_rotation_to_proto(this->euler_rotation, state, setter); } if (this->festival_filter_is_set) { - std::function setter = [&proto_icon](waypoint::FestivalFilter* val) { proto_icon.set_allocated_festival_filter(val); }; + std::function setter = [&proto_icon](guildpoint::FestivalFilter* val) { proto_icon.set_allocated_festival_filter(val); }; festival_filter_to_proto(this->festival_filter, state, setter); } if (this->guid_is_set) { @@ -488,7 +488,7 @@ waypoint::Icon Icon::as_protobuf(ProtoWriterState* state) const { float_to_proto(this->height_offset, state, setter); } if (this->hide_category_is_set) { - std::function setter = [&proto_icon](waypoint::Category* val) { proto_icon.mutable_trigger()->set_allocated_action_hide_category(val); }; + std::function setter = [&proto_icon](guildpoint::Category* val) { proto_icon.mutable_trigger()->set_allocated_action_hide_category(val); }; marker_category_to_proto(this->hide_category, state, setter); } if (this->icon_is_set) { @@ -516,7 +516,7 @@ waypoint::Icon Icon::as_protobuf(ProtoWriterState* state) const { int_to_proto(this->map_id, state, setter); } if (this->map_type_filter_is_set) { - std::function setter = [&proto_icon](waypoint::MapTypeFilter* val) { proto_icon.set_allocated_map_type_filter(val); }; + std::function setter = [&proto_icon](guildpoint::MapTypeFilter* val) { proto_icon.set_allocated_map_type_filter(val); }; map_type_filter_to_proto(this->map_type_filter, state, setter); } if (this->maximum_size_on_screen_is_set) { @@ -528,15 +528,15 @@ waypoint::Icon Icon::as_protobuf(ProtoWriterState* state) const { int_to_proto(this->minimum_size_on_screen, state, setter); } if (this->mount_filter_is_set) { - std::function setter = [&proto_icon](waypoint::MountFilter* val) { proto_icon.set_allocated_mount_filter(val); }; + std::function setter = [&proto_icon](guildpoint::MountFilter* val) { proto_icon.set_allocated_mount_filter(val); }; mount_filter_to_proto(this->mount_filter, state, setter); } if (this->position_is_set) { - std::function setter = [&proto_icon](waypoint::Position* val) { proto_icon.set_allocated_position(val); }; + std::function setter = [&proto_icon](guildpoint::Position* val) { proto_icon.set_allocated_position(val); }; position_to_proto(this->position, state, setter); } if (this->profession_filter_is_set) { - std::function setter = [&proto_icon](waypoint::ProfessionFilter* val) { proto_icon.set_allocated_profession_filter(val); }; + std::function setter = [&proto_icon](guildpoint::ProfessionFilter* val) { proto_icon.set_allocated_profession_filter(val); }; profession_filter_to_proto(this->profession_filter, state, setter); } if (this->render_ingame_is_set) { @@ -552,7 +552,7 @@ waypoint::Icon Icon::as_protobuf(ProtoWriterState* state) const { bool_to_proto(this->render_on_minimap, state, setter); } if (this->reset_behavior_is_set) { - std::function setter = [&proto_icon](waypoint::ResetBehavior val) { proto_icon.mutable_trigger()->set_reset_behavior(val); }; + std::function setter = [&proto_icon](guildpoint::ResetBehavior val) { proto_icon.mutable_trigger()->set_reset_behavior(val); }; reset_behavior_to_proto(this->reset_behavior, state, setter); } if (this->reset_length_is_set) { @@ -568,19 +568,19 @@ waypoint::Icon Icon::as_protobuf(ProtoWriterState* state) const { float_to_proto(this->schedule_duration, state, setter); } if (this->show_category_is_set) { - std::function setter = [&proto_icon](waypoint::Category* val) { proto_icon.mutable_trigger()->set_allocated_action_show_category(val); }; + std::function setter = [&proto_icon](guildpoint::Category* val) { proto_icon.mutable_trigger()->set_allocated_action_show_category(val); }; marker_category_to_proto(this->show_category, state, setter); } if (this->specialization_filter_is_set) { - std::function setter = [&proto_icon](waypoint::SpecializationFilter* val) { proto_icon.set_allocated_specialization_filter(val); }; + std::function setter = [&proto_icon](guildpoint::SpecializationFilter* val) { proto_icon.set_allocated_specialization_filter(val); }; specialization_filter_to_proto(this->specialization_filter, state, setter); } if (this->species_filter_is_set) { - std::function setter = [&proto_icon](waypoint::SpeciesFilter* val) { proto_icon.set_allocated_species_filter(val); }; + std::function setter = [&proto_icon](guildpoint::SpeciesFilter* val) { proto_icon.set_allocated_species_filter(val); }; species_filter_to_proto(this->species_filter, state, setter); } if (this->toggle_category_is_set) { - std::function setter = [&proto_icon](waypoint::Category* val) { proto_icon.mutable_trigger()->set_allocated_action_toggle_category(val); }; + std::function setter = [&proto_icon](guildpoint::Category* val) { proto_icon.mutable_trigger()->set_allocated_action_toggle_category(val); }; marker_category_to_proto(this->toggle_category, state, setter); } if (this->tooltip_description_is_set) { @@ -598,7 +598,7 @@ waypoint::Icon Icon::as_protobuf(ProtoWriterState* state) const { return proto_icon; } -void Icon::parse_protobuf(waypoint::Icon proto_icon, ProtoReaderState* state) { +void Icon::parse_protobuf(guildpoint::Icon proto_icon, ProtoReaderState* state) { if (proto_icon.achievement_bit_index() != 0) { proto_to_int(proto_icon.achievement_bit_index(), state, &(this->achievement_bit_index), &(this->achievement_bit_index_is_set)); } diff --git a/xml_converter/src/icon_gen.hpp b/xml_converter/src/icon_gen.hpp index a49d9c44..fe2a8c10 100644 --- a/xml_converter/src/icon_gen.hpp +++ b/xml_converter/src/icon_gen.hpp @@ -18,10 +18,10 @@ #include "attribute/specialization_filter_gen.hpp" #include "attribute/species_filter_gen.hpp" #include "attribute/unique_id.hpp" +#include "guildpoint.pb.h" #include "parseable.hpp" #include "rapidxml-1.13/rapidxml.hpp" #include "state_structs/xml_reader_state.hpp" -#include "waypoint.pb.h" class XMLError; @@ -124,7 +124,7 @@ class Icon : public Parseable { virtual std::vector as_xml(XMLWriterState* state) const; virtual std::string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, XMLReaderState* state); - waypoint::Icon as_protobuf(ProtoWriterState* state) const; - void parse_protobuf(waypoint::Icon proto_icon, ProtoReaderState* state); + guildpoint::Icon as_protobuf(ProtoWriterState* state) const; + void parse_protobuf(guildpoint::Icon proto_icon, ProtoReaderState* state); bool validate_attributes_of_type_marker_category(); }; diff --git a/xml_converter/src/packaging_protobin.cpp b/xml_converter/src/packaging_protobin.cpp index 3fe1b03a..7d0dbc4e 100644 --- a/xml_converter/src/packaging_protobin.cpp +++ b/xml_converter/src/packaging_protobin.cpp @@ -12,7 +12,7 @@ #include "state_structs/proto_writer_state.hpp" #include "string_helper.hpp" #include "string_hierarchy.hpp" -#include "waypoint.pb.h" +#include "guildpoint.pb.h" using namespace std; @@ -23,9 +23,9 @@ using namespace std; //////////////////////////////////////////////////////////////////////////////// // //////////////////////////////////////////////////////////////////////////////// -void parse_waypoint_categories( +void parse_guildpoint_categories( string full_category_name, - ::waypoint::Category proto_category, + ::guildpoint::Category proto_category, map* marker_categories, vector* parsed_pois, ProtoReaderState* state) { @@ -55,7 +55,7 @@ void parse_waypoint_categories( } for (int i = 0; i < proto_category.children_size(); i++) { - parse_waypoint_categories(full_category_name + ".", proto_category.children(i), &(this_category->children), parsed_pois, state); + parse_guildpoint_categories(full_category_name + ".", proto_category.children(i), &(this_category->children), parsed_pois, state); } } @@ -64,7 +64,7 @@ void parse_waypoint_categories( //////////////////////////////////////////////////////////////////////////////// void read_protobuf_file(string proto_filepath, const string marker_pack_root_directory, map* marker_categories, vector* parsed_pois) { fstream infile; - waypoint::Waypoint proto_message; + guildpoint::Guildpoint proto_message; ProtoReaderState state; state.marker_pack_root_directory = marker_pack_root_directory; @@ -74,7 +74,7 @@ void read_protobuf_file(string proto_filepath, const string marker_pack_root_dir state.textures = proto_message.textures(); for (int i = 0; i < proto_message.category_size(); i++) { - parse_waypoint_categories("", proto_message.category(i), marker_categories, parsed_pois, &state); + parse_guildpoint_categories("", proto_message.category(i), marker_categories, parsed_pois, &state); } } @@ -89,7 +89,7 @@ void read_protobuf_file(string proto_filepath, const string marker_pack_root_dir // has contents that exist in the category filter. //////////////////////////////////////////////////////////////////////////////// struct MaybeCategory { - waypoint::Category category; + guildpoint::Category category; bool is_category; }; MaybeCategory build_category_objects( @@ -98,10 +98,10 @@ MaybeCategory build_category_objects( const std::map>& category_to_pois, vector* category_vector, ProtoWriterState* state) { - waypoint::Category category_proto = category->as_protobuf(state); + guildpoint::Category category_proto = category->as_protobuf(state); bool has_valid_contents = false; - vector categories_to_write; + vector categories_to_write; for (map::const_iterator it = category->children.begin(); it != category->children.end(); it++) { // This is currently a copy operation which is kind expensive @@ -156,13 +156,13 @@ MaybeCategory build_category_objects( return return_value; } -void proto_post_processing(ProtoWriterState* state, waypoint::Waypoint* proto) { +void proto_post_processing(ProtoWriterState* state, guildpoint::Guildpoint* proto) { if (state->textures.size() > 1) { // Handle the 0th index null value independently. proto->add_textures(); for (size_t i = 1; i < state->textures.size(); i++) { - waypoint::TextureData* texture_data = proto->add_textures(); + guildpoint::TextureData* texture_data = proto->add_textures(); texture_data->set_filepath(state->textures[i]->filename); } } @@ -181,7 +181,7 @@ void _write_protobuf_file( cout << "Unable to open " << filepath << endl; } - waypoint::Waypoint output_message; + guildpoint::Guildpoint output_message; for (map::const_iterator it = marker_categories->begin(); it != marker_categories->end(); it++) { string category_name = it->first; diff --git a/xml_converter/src/packaging_protobin.hpp b/xml_converter/src/packaging_protobin.hpp index 495ef54e..dffad592 100644 --- a/xml_converter/src/packaging_protobin.hpp +++ b/xml_converter/src/packaging_protobin.hpp @@ -8,7 +8,7 @@ #include "category_gen.hpp" #include "parseable.hpp" #include "string_hierarchy.hpp" -#include "waypoint.pb.h" +#include "guildpoint.pb.h" void read_protobuf_file( std::string proto_filepath, diff --git a/xml_converter/src/state_structs/proto_reader_state.hpp b/xml_converter/src/state_structs/proto_reader_state.hpp index 161fa1b2..e334a495 100644 --- a/xml_converter/src/state_structs/proto_reader_state.hpp +++ b/xml_converter/src/state_structs/proto_reader_state.hpp @@ -2,10 +2,10 @@ #include -#include "waypoint.pb.h" +#include "guildpoint.pb.h" struct ProtoReaderState { // A list of all of the textures with their paths. - google::protobuf::RepeatedPtrField<::waypoint::TextureData> textures; + google::protobuf::RepeatedPtrField<::guildpoint::TextureData> textures; std::string marker_pack_root_directory; }; diff --git a/xml_converter/src/trail_gen.cpp b/xml_converter/src/trail_gen.cpp index a8e45ad7..86856d61 100644 --- a/xml_converter/src/trail_gen.cpp +++ b/xml_converter/src/trail_gen.cpp @@ -8,10 +8,10 @@ #include "attribute/float.hpp" #include "attribute/int.hpp" #include "attribute/string.hpp" +#include "guildpoint.pb.h" #include "rapid_helpers.hpp" #include "rapidxml-1.13/rapidxml.hpp" #include "string_helper.hpp" -#include "waypoint.pb.h" using namespace std; @@ -247,8 +247,8 @@ vector Trail::as_xml(XMLWriterState* state) const { return xml_node_contents; } -waypoint::Trail Trail::as_protobuf(ProtoWriterState* state) const { - waypoint::Trail proto_trail; +guildpoint::Trail Trail::as_protobuf(ProtoWriterState* state) const { + guildpoint::Trail proto_trail; if (this->achievement_bit_index_is_set) { std::function setter = [&proto_trail](int val) { proto_trail.set_achievement_bit_index(val); }; int_to_proto(this->achievement_bit_index, state, setter); @@ -266,7 +266,7 @@ waypoint::Trail Trail::as_protobuf(ProtoWriterState* state) const { color_to_proto(this->color, state, setter); } if (this->cull_chirality_is_set) { - std::function setter = [&proto_trail](waypoint::CullChirality val) { proto_trail.set_cull_chirality(val); }; + std::function setter = [&proto_trail](guildpoint::CullChirality val) { proto_trail.set_cull_chirality(val); }; cull_chirality_to_proto(this->cull_chirality, state, setter); } if (this->disable_player_cutout_is_set) { @@ -282,7 +282,7 @@ waypoint::Trail Trail::as_protobuf(ProtoWriterState* state) const { float_to_proto(this->distance_fade_start, state, setter); } if (this->festival_filter_is_set) { - std::function setter = [&proto_trail](waypoint::FestivalFilter* val) { proto_trail.set_allocated_festival_filter(val); }; + std::function setter = [&proto_trail](guildpoint::FestivalFilter* val) { proto_trail.set_allocated_festival_filter(val); }; festival_filter_to_proto(this->festival_filter, state, setter); } if (this->guid_is_set) { @@ -302,15 +302,15 @@ waypoint::Trail Trail::as_protobuf(ProtoWriterState* state) const { int_to_proto(this->map_id, state, setter); } if (this->map_type_filter_is_set) { - std::function setter = [&proto_trail](waypoint::MapTypeFilter* val) { proto_trail.set_allocated_map_type_filter(val); }; + std::function setter = [&proto_trail](guildpoint::MapTypeFilter* val) { proto_trail.set_allocated_map_type_filter(val); }; map_type_filter_to_proto(this->map_type_filter, state, setter); } if (this->mount_filter_is_set) { - std::function setter = [&proto_trail](waypoint::MountFilter* val) { proto_trail.set_allocated_mount_filter(val); }; + std::function setter = [&proto_trail](guildpoint::MountFilter* val) { proto_trail.set_allocated_mount_filter(val); }; mount_filter_to_proto(this->mount_filter, state, setter); } if (this->profession_filter_is_set) { - std::function setter = [&proto_trail](waypoint::ProfessionFilter* val) { proto_trail.set_allocated_profession_filter(val); }; + std::function setter = [&proto_trail](guildpoint::ProfessionFilter* val) { proto_trail.set_allocated_profession_filter(val); }; profession_filter_to_proto(this->profession_filter, state, setter); } if (this->render_ingame_is_set) { @@ -334,11 +334,11 @@ waypoint::Trail Trail::as_protobuf(ProtoWriterState* state) const { float_to_proto(this->schedule_duration, state, setter); } if (this->specialization_filter_is_set) { - std::function setter = [&proto_trail](waypoint::SpecializationFilter* val) { proto_trail.set_allocated_specialization_filter(val); }; + std::function setter = [&proto_trail](guildpoint::SpecializationFilter* val) { proto_trail.set_allocated_specialization_filter(val); }; specialization_filter_to_proto(this->specialization_filter, state, setter); } if (this->species_filter_is_set) { - std::function setter = [&proto_trail](waypoint::SpeciesFilter* val) { proto_trail.set_allocated_species_filter(val); }; + std::function setter = [&proto_trail](guildpoint::SpeciesFilter* val) { proto_trail.set_allocated_species_filter(val); }; species_filter_to_proto(this->species_filter, state, setter); } if (this->texture_is_set) { @@ -346,7 +346,7 @@ waypoint::Trail Trail::as_protobuf(ProtoWriterState* state) const { image_to_proto(this->texture, state, setter); } if (this->trail_data_is_set) { - std::function setter = [&proto_trail](waypoint::TrailData* val) { proto_trail.set_allocated_trail_data(val); }; + std::function setter = [&proto_trail](guildpoint::TrailData* val) { proto_trail.set_allocated_trail_data(val); }; trail_data_to_proto(this->trail_data, state, setter); } if (this->trail_scale_is_set) { @@ -356,7 +356,7 @@ waypoint::Trail Trail::as_protobuf(ProtoWriterState* state) const { return proto_trail; } -void Trail::parse_protobuf(waypoint::Trail proto_trail, ProtoReaderState* state) { +void Trail::parse_protobuf(guildpoint::Trail proto_trail, ProtoReaderState* state) { if (proto_trail.achievement_bit_index() != 0) { proto_to_int(proto_trail.achievement_bit_index(), state, &(this->achievement_bit_index), &(this->achievement_bit_index_is_set)); } diff --git a/xml_converter/src/trail_gen.hpp b/xml_converter/src/trail_gen.hpp index 5d14ff10..73ac163d 100644 --- a/xml_converter/src/trail_gen.hpp +++ b/xml_converter/src/trail_gen.hpp @@ -16,10 +16,10 @@ #include "attribute/species_filter_gen.hpp" #include "attribute/trail_data.hpp" #include "attribute/unique_id.hpp" +#include "guildpoint.pb.h" #include "parseable.hpp" #include "rapidxml-1.13/rapidxml.hpp" #include "state_structs/xml_reader_state.hpp" -#include "waypoint.pb.h" class XMLError; @@ -82,7 +82,7 @@ class Trail : public Parseable { virtual std::vector as_xml(XMLWriterState* state) const; virtual std::string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, XMLReaderState* state); - waypoint::Trail as_protobuf(ProtoWriterState* state) const; - void parse_protobuf(waypoint::Trail proto_trail, ProtoReaderState* state); + guildpoint::Trail as_protobuf(ProtoWriterState* state) const; + void parse_protobuf(guildpoint::Trail proto_trail, ProtoReaderState* state); bool validate_attributes_of_type_marker_category(); }; diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 7f081d1f..66f1418e 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -28,7 +28,7 @@ #include "rapidxml-1.13/rapidxml_utils.hpp" #include "string_helper.hpp" #include "trail_gen.hpp" -#include "waypoint.pb.h" +#include "guildpoint.pb.h" using namespace std; @@ -135,16 +135,16 @@ void write_burrito_directory( //////////////////////////////////////////////////////////////////////////////// void process_data( vector input_taco_paths, - vector input_waypoint_paths, + vector input_guildpoint_paths, // These will eventually have additional arguments for each output path to // allow for splitting out a single markerpack vector output_taco_paths, - vector output_waypoint_paths, + vector output_guildpoint_paths, // This is a special output path used for burrito internal use that splits - // the waypoint protobins by map id. - string output_split_waypoint_dir) { + // the guildpoint protobins by map id. + string output_split_guildpoint_dir) { // All of the loaded pois and categories vector parsed_pois; map marker_categories; @@ -164,12 +164,12 @@ void process_data( auto ms = std::chrono::duration_cast(dur).count(); cout << "The taco parse function took " << ms << " milliseconds to run" << endl; - // Read in all the protobin waypoint markerpacks - for (size_t i = 0; i < input_waypoint_paths.size(); i++) { - cout << "Loading waypoint pack " << input_waypoint_paths[i] << endl; + // Read in all the protobin guildpoint markerpacks + for (size_t i = 0; i < input_guildpoint_paths.size(); i++) { + cout << "Loading guildpoint pack " << input_guildpoint_paths[i] << endl; read_burrito_directory( - input_waypoint_paths[i], + input_guildpoint_paths[i], &marker_categories, &parsed_pois); } @@ -184,17 +184,17 @@ void process_data( ms = std::chrono::duration_cast(dur).count(); cout << "The xml write function took " << ms << " milliseconds to run" << endl; - // Write all of the protobin waypoint paths - for (size_t i = 0; i < output_waypoint_paths.size(); i++) { - write_burrito_directory(output_waypoint_paths[i], &marker_categories, &parsed_pois); + // Write all of the protobin guildpoint paths + for (size_t i = 0; i < output_guildpoint_paths.size(); i++) { + write_burrito_directory(output_guildpoint_paths[i], &marker_categories, &parsed_pois); } - // Write the special map-split protbin waypoint file + // Write the special map-split protbin guildpoint file begin = chrono::high_resolution_clock::now(); - if (output_split_waypoint_dir != "") { + if (output_split_guildpoint_dir != "") { StringHierarchy category_filter; category_filter.add_path({}, true); - write_protobuf_file_per_map_id(output_split_waypoint_dir, category_filter, &marker_categories, &parsed_pois); + write_protobuf_file_per_map_id(output_split_guildpoint_dir, category_filter, &marker_categories, &parsed_pois); } end = chrono::high_resolution_clock::now(); dur = end - begin; @@ -210,18 +210,18 @@ void process_data( // receive. // // Example usage -// ./xml_converter --input-taco-paths ../packs/marker_pack --output-split-waypoint-path ../output_packs -// ./xml_converter --input-taco-paths ../packs/* --output-split-waypoint-path ../output_packs +// ./xml_converter --input-taco-paths ../packs/marker_pack --output-split-guildpoint-path ../output_packs +// ./xml_converter --input-taco-paths ../packs/* --output-split-guildpoint-path ../output_packs //////////////////////////////////////////////////////////////////////////////// int main(int argc, char* argv[]) { vector input_taco_paths; vector output_taco_paths; - vector input_waypoint_paths; - vector output_waypoint_paths; + vector input_guildpoint_paths; + vector output_guildpoint_paths; // Typically "~/.local/share/godot/app_userdata/Burrito/protobins" for // converting from xml markerpacks to internal protobuf files. - vector output_split_waypoint_paths; + vector output_split_guildpoint_paths; vector* arg_target = &input_taco_paths; @@ -232,39 +232,39 @@ int main(int argc, char* argv[]) { else if (!strcmp(argv[i], "--output-taco-path")) { arg_target = &output_taco_paths; } - else if (!strcmp(argv[i], "--input-waypoint-path")) { - arg_target = &input_waypoint_paths; + else if (!strcmp(argv[i], "--input-guildpoint-path")) { + arg_target = &input_guildpoint_paths; } - else if (!strcmp(argv[i], "--output-waypoint-path")) { - arg_target = &output_waypoint_paths; + else if (!strcmp(argv[i], "--output-guildpoint-path")) { + arg_target = &output_guildpoint_paths; } - else if (!strcmp(argv[i], "--output-split-waypoint-path")) { + else if (!strcmp(argv[i], "--output-split-guildpoint-path")) { // We dont actually support multiple values for this argument but // I am leaving this as-is because it is simpler. We can adjust the // CLI arg parsing later to properly capture this. - arg_target = &output_split_waypoint_paths; + arg_target = &output_split_guildpoint_paths; } else { arg_target->push_back(argv[i]); } } - // Strip all but the first output split waypoint argument, because we dont + // Strip all but the first output split guildpoint argument, because we dont // actually support multiple arguments. - string output_split_waypoint_dir = ""; - if (output_split_waypoint_paths.size() > 0) { - output_split_waypoint_dir = output_split_waypoint_paths[0]; + string output_split_guildpoint_dir = ""; + if (output_split_guildpoint_paths.size() > 0) { + output_split_guildpoint_dir = output_split_guildpoint_paths[0]; } - else if (output_split_waypoint_paths.size() > 1) { - cout << "Only one --output-split-waypoint-path is accepted" << endl; + else if (output_split_guildpoint_paths.size() > 1) { + cout << "Only one --output-split-guildpoint-path is accepted" << endl; } process_data( input_taco_paths, - input_waypoint_paths, + input_guildpoint_paths, output_taco_paths, - output_waypoint_paths, - output_split_waypoint_dir); + output_guildpoint_paths, + output_split_guildpoint_dir); return 0; } From cd209d558eaba50a670a0d77bc5808f17ca6808d Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sat, 21 Sep 2024 22:30:31 -0400 Subject: [PATCH 539/539] clang formating --- xml_converter/src/packaging_protobin.cpp | 2 +- xml_converter/src/packaging_protobin.hpp | 2 +- xml_converter/src/xml_converter.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/xml_converter/src/packaging_protobin.cpp b/xml_converter/src/packaging_protobin.cpp index 7d0dbc4e..2b2f0911 100644 --- a/xml_converter/src/packaging_protobin.cpp +++ b/xml_converter/src/packaging_protobin.cpp @@ -8,11 +8,11 @@ #include #include "category_gen.hpp" +#include "guildpoint.pb.h" #include "parseable.hpp" #include "state_structs/proto_writer_state.hpp" #include "string_helper.hpp" #include "string_hierarchy.hpp" -#include "guildpoint.pb.h" using namespace std; diff --git a/xml_converter/src/packaging_protobin.hpp b/xml_converter/src/packaging_protobin.hpp index dffad592..9cdc27a4 100644 --- a/xml_converter/src/packaging_protobin.hpp +++ b/xml_converter/src/packaging_protobin.hpp @@ -6,9 +6,9 @@ #include #include "category_gen.hpp" +#include "guildpoint.pb.h" #include "parseable.hpp" #include "string_hierarchy.hpp" -#include "guildpoint.pb.h" void read_protobuf_file( std::string proto_filepath, diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 66f1418e..4dbeb2cc 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -19,6 +19,7 @@ #include "attribute/marker_category.hpp" #include "category_gen.hpp" #include "file_helper.hpp" +#include "guildpoint.pb.h" #include "icon_gen.hpp" #include "packaging_protobin.hpp" #include "packaging_xml.hpp" @@ -28,7 +29,6 @@ #include "rapidxml-1.13/rapidxml_utils.hpp" #include "string_helper.hpp" #include "trail_gen.hpp" -#include "guildpoint.pb.h" using namespace std;